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

Unified Diff: Source/core/rendering/svg/SVGRenderSupport.cpp

Issue 355813004: [SVG2] Elements that don't render shouldn't contribute to ancestor bboxes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix nit Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/svg/RenderSVGShape.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGRenderSupport.cpp
diff --git a/Source/core/rendering/svg/SVGRenderSupport.cpp b/Source/core/rendering/svg/SVGRenderSupport.cpp
index 9dd0415e574bce090d11c0e3b03f23355eec91dd..cd31aef5a4c6cef225de8e1e003328d1bf195a1e 100644
--- a/Source/core/rendering/svg/SVGRenderSupport.cpp
+++ b/Source/core/rendering/svg/SVGRenderSupport.cpp
@@ -137,6 +137,10 @@ void SVGRenderSupport::computeContainerBoundingBoxes(const RenderObject* contain
if (current->isSVGHiddenContainer())
continue;
+ // Don't include elements in the union that do not render.
+ if (current->isSVGShape() && toRenderSVGShape(current)->isShapeEmpty())
f(malita) 2014/06/25 15:16:50 We have a similar check for containers in updateOb
+ continue;
+
const AffineTransform& transform = current->localToParentTransform();
updateObjectBoundingBox(objectBoundingBox, objectBoundingBoxValid, current,
transform.mapRect(current->objectBoundingBox()));
« no previous file with comments | « Source/core/rendering/svg/RenderSVGShape.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698