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

Unified Diff: third_party/WebKit/Source/core/svg/SVGPathElement.cpp

Issue 2168133002: Compute exact bounds for SVGPathElement::getBBox() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 4 years, 5 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: third_party/WebKit/Source/core/svg/SVGPathElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGPathElement.cpp b/third_party/WebKit/Source/core/svg/SVGPathElement.cpp
index 88a13ac0bcec7f485cadd66024accc97260060a9..d2ef6546dcf1d3244a4d853c4e5e2946e46b0349 100644
--- a/third_party/WebKit/Source/core/svg/SVGPathElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGPathElement.cpp
@@ -207,4 +207,12 @@ void SVGPathElement::removedFrom(ContainerNode* rootParent)
invalidateMPathDependencies();
}
+FloatRect SVGPathElement::getBBox()
+{
+ document().updateStyleAndLayoutIgnorePendingStylesheets();
+
+ // We want the exact bounds.
+ return SVGPathElement::asPath().boundingRect(Path::BoundsType::Exact);
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathElement.h ('k') | third_party/WebKit/Source/platform/graphics/Path.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698