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

Unified Diff: Source/core/svg/SVGGraphicsElement.cpp

Issue 132233010: [SVG] SVGAnimatedRect migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebsaed Created 6 years, 11 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/svg/SVGGraphicsElement.h ('k') | Source/core/svg/SVGGraphicsElement.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGGraphicsElement.cpp
diff --git a/Source/core/svg/SVGGraphicsElement.cpp b/Source/core/svg/SVGGraphicsElement.cpp
index 95bb0c2cd87f6466aff61fed9b86d4f499761283..f111f22b8bbdc838697f9bad82baee2bcdaa6c7f 100644
--- a/Source/core/svg/SVGGraphicsElement.cpp
+++ b/Source/core/svg/SVGGraphicsElement.cpp
@@ -223,28 +223,38 @@ SVGElement* SVGGraphicsElement::farthestViewportElement() const
return farthest;
}
-SVGRect SVGGraphicsElement::getBBox()
+FloatRect SVGGraphicsElement::getBBox()
{
document().updateLayoutIgnorePendingStylesheets();
// FIXME: Eventually we should support getBBox for detached elements.
if (!renderer())
- return SVGRect();
+ return FloatRect();
return renderer()->objectBoundingBox();
}
-SVGRect SVGGraphicsElement::getStrokeBBox()
+PassRefPtr<SVGRectTearOff> SVGGraphicsElement::getBBoxFromJavascript()
+{
+ return SVGRectTearOff::create(SVGRect::create(getBBox()), 0, PropertyIsNotAnimVal);
+}
+
+FloatRect SVGGraphicsElement::getStrokeBBox()
{
document().updateLayoutIgnorePendingStylesheets();
// FIXME: Eventually we should support getStrokeBBox for detached elements.
if (!renderer())
- return SVGRect();
+ return FloatRect();
return renderer()->strokeBoundingBox();
}
+PassRefPtr<SVGRectTearOff> SVGGraphicsElement::getStrokeBBoxFromJavascript()
+{
+ return SVGRectTearOff::create(SVGRect::create(getStrokeBBox()), 0, PropertyIsNotAnimVal);
+}
+
RenderObject* SVGGraphicsElement::createRenderer(RenderStyle*)
{
// By default, any subclass is expected to do path-based drawing
« no previous file with comments | « Source/core/svg/SVGGraphicsElement.h ('k') | Source/core/svg/SVGGraphicsElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698