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

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

Issue 208103002: [repaint-after-layout] Only repaint SVG root element when needed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderBlockLineLayout.cpp ('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) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. 5 * Copyright (C) 2009 Google, Inc.
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 return document().frame()->ownerRenderer()->availableLogicalHeight(Inclu deMarginBorderPadding); 188 return document().frame()->ownerRenderer()->availableLogicalHeight(Inclu deMarginBorderPadding);
189 189
190 // SVG embedded via SVGImage (background-image/border-image/etc) / Inline SV G. 190 // SVG embedded via SVGImage (background-image/border-image/etc) / Inline SV G.
191 return RenderReplaced::computeReplacedLogicalHeight(); 191 return RenderReplaced::computeReplacedLogicalHeight();
192 } 192 }
193 193
194 void RenderSVGRoot::layout() 194 void RenderSVGRoot::layout()
195 { 195 {
196 ASSERT(needsLayout()); 196 ASSERT(needsLayout());
197 197
198 LayoutRectRecorder recorder(*this);
199
200 // Arbitrary affine transforms are incompatible with LayoutState. 198 // Arbitrary affine transforms are incompatible with LayoutState.
201 LayoutStateDisabler layoutStateDisabler(*this); 199 LayoutStateDisabler layoutStateDisabler(*this);
202 200
203 bool needsLayout = selfNeedsLayout(); 201 bool needsLayout = selfNeedsLayout();
202 LayoutRectRecorder recorder(*this, checkForRepaint() && needsLayout);
204 LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && needsLayou t); 203 LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && needsLayou t);
205 204
206 LayoutSize oldSize = size(); 205 LayoutSize oldSize = size();
207 updateLogicalWidth(); 206 updateLogicalWidth();
208 updateLogicalHeight(); 207 updateLogicalHeight();
209 buildLocalToBorderBoxTransform(); 208 buildLocalToBorderBoxTransform();
210 209
211 SVGRenderSupport::layoutResourcesIfNeeded(this); 210 SVGRenderSupport::layoutResourcesIfNeeded(this);
212 211
213 SVGSVGElement* svg = toSVGSVGElement(node()); 212 SVGSVGElement* svg = toSVGSVGElement(node());
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 441
443 bool RenderSVGRoot::hasRelativeLogicalHeight() const 442 bool RenderSVGRoot::hasRelativeLogicalHeight() const
444 { 443 {
445 SVGSVGElement* svg = toSVGSVGElement(node()); 444 SVGSVGElement* svg = toSVGSVGElement(node());
446 ASSERT(svg); 445 ASSERT(svg);
447 446
448 return svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties).isPercent(); 447 return svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties).isPercent();
449 } 448 }
450 449
451 } 450 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlockLineLayout.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698