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

Side by Side Diff: Source/core/layout/svg/SVGLayoutSupport.cpp

Issue 1025213002: Begin tracking why layout is invalidated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org>
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@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. All rights reserved. 5 * Copyright (C) 2009 Google, Inc. All rights reserved.
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2009-2010. 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 260 }
261 } 261 }
262 } 262 }
263 263
264 SubtreeLayoutScope layoutScope(*child); 264 SubtreeLayoutScope layoutScope(*child);
265 // Resource containers are nasty: they can invalidate clients outside th e current SubtreeLayoutScope. 265 // Resource containers are nasty: they can invalidate clients outside th e current SubtreeLayoutScope.
266 // Since they only care about viewport size changes (to resolve their re lative lengths), we trigger 266 // Since they only care about viewport size changes (to resolve their re lative lengths), we trigger
267 // their invalidation directly from SVGSVGElement::svgAttributeChange() or at a higher 267 // their invalidation directly from SVGSVGElement::svgAttributeChange() or at a higher
268 // SubtreeLayoutScope (in LayoutView::layout()). 268 // SubtreeLayoutScope (in LayoutView::layout()).
269 if (forceLayout && !child->isSVGResourceContainer()) 269 if (forceLayout && !child->isSVGResourceContainer())
270 layoutScope.setNeedsLayout(child); 270 layoutScope.setNeedsLayout(child, LayoutInvalidationReason::SvgChang ed);
271 271
272 // Lay out any referenced resources before the child. 272 // Lay out any referenced resources before the child.
273 layoutResourcesIfNeeded(child); 273 layoutResourcesIfNeeded(child);
274 child->layoutIfNeeded(); 274 child->layoutIfNeeded();
275 } 275 }
276 } 276 }
277 277
278 void SVGLayoutSupport::layoutResourcesIfNeeded(const LayoutObject* object) 278 void SVGLayoutSupport::layoutResourcesIfNeeded(const LayoutObject* object)
279 { 279 {
280 ASSERT(object); 280 ASSERT(object);
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 504
505 layer = layer->parent(); 505 layer = layer->parent();
506 } 506 }
507 507
508 ctm.scale(deviceScaleFactor); 508 ctm.scale(deviceScaleFactor);
509 509
510 return narrowPrecisionToFloat(sqrt((pow(ctm.xScale(), 2) + pow(ctm.yScale(), 2)) / 2)); 510 return narrowPrecisionToFloat(sqrt((pow(ctm.xScale(), 2) + pow(ctm.yScale(), 2)) / 2));
511 } 511 }
512 512
513 } 513 }
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGRoot.h ('k') | Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698