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

Side by Side Diff: Source/core/rendering/svg/RenderSVGModelObject.cpp

Issue 260963012: Override repaintTreeAfterLayout for RenderSVGModelObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adjust TC again for increased resilience to platform differences. Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/svg/RenderSVGModelObject.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2009, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 32
33 #include "core/rendering/svg/RenderSVGModelObject.h" 33 #include "core/rendering/svg/RenderSVGModelObject.h"
34 34
35 #include "SVGNames.h" 35 #include "SVGNames.h"
36 #include "core/rendering/RenderView.h"
36 #include "core/rendering/svg/RenderSVGRoot.h" 37 #include "core/rendering/svg/RenderSVGRoot.h"
37 #include "core/rendering/svg/SVGResourcesCache.h" 38 #include "core/rendering/svg/SVGResourcesCache.h"
38 #include "core/svg/SVGGraphicsElement.h" 39 #include "core/svg/SVGGraphicsElement.h"
39 40
40 namespace WebCore { 41 namespace WebCore {
41 42
42 RenderSVGModelObject::RenderSVGModelObject(SVGElement* node) 43 RenderSVGModelObject::RenderSVGModelObject(SVGElement* node)
43 : RenderObject(node) 44 : RenderObject(node)
44 { 45 {
45 } 46 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 return false; 117 return false;
117 } 118 }
118 119
119 // The SVG addFocusRingRects() method adds rects in local coordinates so the def ault absoluteFocusRingQuads 120 // The SVG addFocusRingRects() method adds rects in local coordinates so the def ault absoluteFocusRingQuads
120 // returns incorrect values for SVG objects. Overriding this method provides acc ess to the absolute bounds. 121 // returns incorrect values for SVG objects. Overriding this method provides acc ess to the absolute bounds.
121 void RenderSVGModelObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads) 122 void RenderSVGModelObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads)
122 { 123 {
123 quads.append(localToAbsoluteQuad(FloatQuad(repaintRectInLocalCoordinates())) ); 124 quads.append(localToAbsoluteQuad(FloatQuad(repaintRectInLocalCoordinates())) );
124 } 125 }
125 126
127 void RenderSVGModelObject::repaintTreeAfterLayout()
128 {
129 // Note: This is a reduced version of RenderBox::repaintTreeAfterLayout().
130 // FIXME: Should share code with RenderBox::repaintTreeAfterLayout().
131 LayoutStateDisabler layoutStateDisabler(*this);
132
133 ASSERT(RuntimeEnabledFeatures::repaintAfterLayoutEnabled());
134 ASSERT(!needsLayout());
135
136 const LayoutRect oldRepaintRect = previousRepaintRect();
137 const LayoutPoint oldPositionFromRepaintContainer = previousPositionFromRepa intContainer();
138 RenderLayerModelObject* repaintContainer = containerForRepaint();
139 setPreviousRepaintRect(clippedOverflowRectForRepaint(repaintContainer));
140 setPreviousPositionFromRepaintContainer(positionFromRepaintContainer(repaint Container));
141
142 // If we are set to do a full repaint that means the RenderView will be
143 // invalidated. We can then skip issuing of invalidations for the child
144 // renderers as they'll be covered by the RenderView.
145 if (view()->doingFullRepaint()) {
146 RenderObject::repaintTreeAfterLayout();
147 return;
148 }
149
150 const LayoutRect& newRepaintRect = previousRepaintRect();
151 const LayoutPoint& newPositionFromRepaintContainer = previousPositionFromRep aintContainer();
152 repaintAfterLayoutIfNeeded(containerForRepaint(),
153 shouldDoFullRepaintAfterLayout(), oldRepaintRect, oldPositionFromRepaint Container, &newRepaintRect, &newPositionFromRepaintContainer);
154
155 RenderObject::repaintTreeAfterLayout();
156 }
157
126 } // namespace WebCore 158 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGModelObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698