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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGSVGElement.cpp

Issue 2573653003: Remove LayoutSVGViewportContainer's calcViewport and pointIsInsideViewportClip (Closed)
Patch Set: Add code and TODO about removing setNeeds calls Created 4 years 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) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2007 Apple Inc. All rights reserved.
5 * Copyright (C) 2014 Google, Inc. 5 * Copyright (C) 2014 Google, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } else { 274 } else {
275 invalidateSVGPresentationAttributeStyle(); 275 invalidateSVGPresentationAttributeStyle();
276 setNeedsStyleRecalc(LocalStyleChange, 276 setNeedsStyleRecalc(LocalStyleChange,
277 StyleChangeReasonForTracing::fromAttribute(attrName)); 277 StyleChangeReasonForTracing::fromAttribute(attrName));
278 } 278 }
279 } 279 }
280 280
281 if (SVGFitToViewBox::isKnownAttribute(attrName)) { 281 if (SVGFitToViewBox::isKnownAttribute(attrName)) {
282 updateRelativeLengthsOrViewBox = true; 282 updateRelativeLengthsOrViewBox = true;
283 invalidateRelativeLengthClients(); 283 invalidateRelativeLengthClients();
284 if (LayoutObject* object = layoutObject())
285 object->setNeedsTransformUpdate();
286 } 284 }
287 285
288 if (updateRelativeLengthsOrViewBox || 286 if (updateRelativeLengthsOrViewBox ||
289 SVGZoomAndPan::isKnownAttribute(attrName)) { 287 SVGZoomAndPan::isKnownAttribute(attrName)) {
290 SVGElement::InvalidationGuard invalidationGuard(this); 288 SVGElement::InvalidationGuard invalidationGuard(this);
291 if (layoutObject()) 289 if (auto* layoutObject = this->layoutObject()) {
292 markForLayoutAndParentResourceInvalidation(layoutObject()); 290 markForLayoutAndParentResourceInvalidation(layoutObject);
291 layoutObject->setNeedsBoundariesUpdate();
fs 2016/12/13 10:11:23 This is a bugfix? (Well, I guess the next line is
pdr. 2016/12/13 19:48:55 This was me jumping the gun on that TODO. I've rev
292 layoutObject->setNeedsTransformUpdate();
293 }
293 return; 294 return;
294 } 295 }
295 296
296 SVGGraphicsElement::svgAttributeChanged(attrName); 297 SVGGraphicsElement::svgAttributeChanged(attrName);
297 } 298 }
298 299
299 // FloatRect::intersects does not consider horizontal or vertical lines (because 300 // FloatRect::intersects does not consider horizontal or vertical lines (because
300 // of isEmpty()). 301 // of isEmpty()).
301 static bool intersectsAllowingEmpty(const FloatRect& r1, const FloatRect& r2) { 302 static bool intersectsAllowingEmpty(const FloatRect& r1, const FloatRect& r2) {
302 if (r1.width() < 0 || r1.height() < 0 || r2.width() < 0 || r2.height() < 0) 303 if (r1.width() < 0 || r1.height() < 0 || r2.width() < 0 || r2.height() < 0)
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 visitor->trace(m_width); 761 visitor->trace(m_width);
761 visitor->trace(m_height); 762 visitor->trace(m_height);
762 visitor->trace(m_translation); 763 visitor->trace(m_translation);
763 visitor->trace(m_timeContainer); 764 visitor->trace(m_timeContainer);
764 visitor->trace(m_viewSpec); 765 visitor->trace(m_viewSpec);
765 SVGGraphicsElement::trace(visitor); 766 SVGGraphicsElement::trace(visitor);
766 SVGFitToViewBox::trace(visitor); 767 SVGFitToViewBox::trace(visitor);
767 } 768 }
768 769
769 } // namespace blink 770 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698