Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: Source/core/rendering/PaintInfo.h

Issue 200053005: [SVG] Transform animation leaves traces of text behind. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 bool shouldPaintWithinRoot(const RenderObject* renderer) const 78 bool shouldPaintWithinRoot(const RenderObject* renderer) const
79 { 79 {
80 return !paintingRoot || paintingRoot == renderer; 80 return !paintingRoot || paintingRoot == renderer;
81 } 81 }
82 82
83 bool forceBlackText() const { return paintBehavior & PaintBehaviorForceBlack Text; } 83 bool forceBlackText() const { return paintBehavior & PaintBehaviorForceBlack Text; }
84 84
85 bool skipRootBackground() const { return paintBehavior & PaintBehaviorSkipRo otBackground; } 85 bool skipRootBackground() const { return paintBehavior & PaintBehaviorSkipRo otBackground; }
86 bool paintRootBackgroundOnly() const { return paintBehavior & PaintBehaviorR ootBackgroundOnly; } 86 bool paintRootBackgroundOnly() const { return paintBehavior & PaintBehaviorR ootBackgroundOnly; }
87 87
88 void applyTransform(const AffineTransform& localToAncestorTransform, bool id entityStatusUnknown = true) 88 void applyTransform(const AffineTransform& localToAncestorTransform, bool id entityStatusUnknown = true)
Stephen Chennney 2014/03/19 12:11:05 What code uses this? I'm worried that this patch i
Erik Dahlström (inactive) 2014/03/19 14:00:10 All of the users of the PaintInfo.applyTransform m
89 { 89 {
90 if (identityStatusUnknown && localToAncestorTransform.isIdentity()) 90 if (identityStatusUnknown && localToAncestorTransform.isIdentity())
91 return; 91 return;
92 92
93 context->concatCTM(localToAncestorTransform); 93 context->concatCTM(localToAncestorTransform);
94 94
95 if (rect == infiniteRect()) 95 if (rect == infiniteRect())
96 return; 96 return;
97 97
98 rect = localToAncestorTransform.inverse().mapRect(rect); 98 if (localToAncestorTransform.isInvertible())
99 rect = localToAncestorTransform.inverse().mapRect(rect);
100 else
101 rect.setSize(IntSize(0, 0));
99 } 102 }
100 103
101 static IntRect infiniteRect() { return IntRect(LayoutRect::infiniteRect()); } 104 static IntRect infiniteRect() { return IntRect(LayoutRect::infiniteRect()); }
102 const RenderLayerModelObject* paintContainer() const { return m_paintContain er; } 105 const RenderLayerModelObject* paintContainer() const { return m_paintContain er; }
103 106
104 ListHashSet<RenderInline*>* outlineObjects() { return m_outlineObjects; } 107 ListHashSet<RenderInline*>* outlineObjects() { return m_outlineObjects; }
105 void setOutlineObjects(ListHashSet<RenderInline*>* objects) { m_outlineObjec ts = objects; } 108 void setOutlineObjects(ListHashSet<RenderInline*>* objects) { m_outlineObjec ts = objects; }
106 109
107 // FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout rendering/. 110 // FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout rendering/.
108 GraphicsContext* context; 111 GraphicsContext* context;
109 IntRect rect; 112 IntRect rect;
110 PaintPhase phase; 113 PaintPhase phase;
111 PaintBehavior paintBehavior; 114 PaintBehavior paintBehavior;
112 RenderObject* paintingRoot; // used to draw just one element and its visual kids 115 RenderObject* paintingRoot; // used to draw just one element and its visual kids
113 OverlapTestRequestMap* overlapTestRequests; 116 OverlapTestRequestMap* overlapTestRequests;
114 117
115 private: 118 private:
116 119
117 const RenderLayerModelObject* m_paintContainer; // the layer object that ori ginates the current painting 120 const RenderLayerModelObject* m_paintContainer; // the layer object that ori ginates the current painting
118 ListHashSet<RenderInline*>* m_outlineObjects; // used to list outlines that should be painted by a block with inline children 121 ListHashSet<RenderInline*>* m_outlineObjects; // used to list outlines that should be painted by a block with inline children
119 }; 122 };
120 123
121 } // namespace WebCore 124 } // namespace WebCore
122 125
123 #endif // PaintInfo_h 126 #endif // PaintInfo_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698