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

Unified Diff: third_party/WebKit/Source/platform/graphics/Path.h

Issue 2168133002: Compute exact bounds for SVGPathElement::getBBox() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: empty subpath workaround 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/platform/graphics/Path.h
diff --git a/third_party/WebKit/Source/platform/graphics/Path.h b/third_party/WebKit/Source/platform/graphics/Path.h
index 5497706855a626a90bcde09b6cdcc7c693ff6043..c84b809add4bf32e6649cad6689a6f713b0ff946 100644
--- a/third_party/WebKit/Source/platform/graphics/Path.h
+++ b/third_party/WebKit/Source/platform/graphics/Path.h
@@ -78,8 +78,13 @@ public:
bool contains(const FloatPoint&) const;
bool contains(const FloatPoint&, WindRule) const;
bool strokeContains(const FloatPoint&, const StrokeData&) const;
- FloatRect boundingRect() const;
- FloatRect strokeBoundingRect(const StrokeData&) const;
+
+ enum class BoundsType {
+ Conservative, // Fast version, includes control points.
+ Exact, // Tight, slower version.
+ };
+ FloatRect boundingRect(BoundsType = BoundsType::Conservative) const;
+ FloatRect strokeBoundingRect(const StrokeData&, BoundsType = BoundsType::Conservative) const;
float length() const;
FloatPoint pointAtLength(float length) const;

Powered by Google App Engine
This is Rietveld 408576698