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

Unified Diff: Source/core/rendering/svg/RenderSVGRect.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: 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
Index: Source/core/rendering/svg/RenderSVGRect.cpp
diff --git a/Source/core/rendering/svg/RenderSVGRect.cpp b/Source/core/rendering/svg/RenderSVGRect.cpp
index 5fd79e7f626db218567312903f35270f851a0349..abfcc4ab3ce1ac98314d69d021bb40007080f769 100644
--- a/Source/core/rendering/svg/RenderSVGRect.cpp
+++ b/Source/core/rendering/svg/RenderSVGRect.cpp
@@ -129,4 +129,13 @@ bool RenderSVGRect::shapeDependentFillContains(const FloatPoint& point, const Wi
return m_fillBoundingBox.contains(point.x(), point.y());
}
+bool RenderSVGRect::isRenderingDisabled() const
+{
+ // Some combinations of attributes cause SVG elements
+ // to not render.
+ // For rects a negative dimension is an error and
+ // a zero dimension disables rendering.
+ return m_fillBoundingBox.isEmpty();
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698