| Index: third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp b/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp
|
| index b6e36cdc2feffc6060d2ca9d30c7bd0867b4be70..8510323af580f663f8e78fc1ebe8495c9e5e5532 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp
|
| @@ -173,17 +173,18 @@ SVGElement* SVGGraphicsElement::farthestViewportElement() const {
|
| }
|
|
|
| FloatRect SVGGraphicsElement::GetBBox() {
|
| - GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets();
|
| -
|
| - // FIXME: Eventually we should support getBBox for detached elements.
|
| - if (!GetLayoutObject())
|
| - return FloatRect();
|
| -
|
| + DCHECK(GetLayoutObject());
|
| return GetLayoutObject()->ObjectBoundingBox();
|
| }
|
|
|
| SVGRectTearOff* SVGGraphicsElement::getBBoxFromJavascript() {
|
| - return SVGRectTearOff::Create(SVGRect::Create(GetBBox()), 0,
|
| + GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets();
|
| +
|
| + // FIXME: Eventually we should support getBBox for detached elements.
|
| + FloatRect boundingBox;
|
| + if (GetLayoutObject())
|
| + boundingBox = GetBBox();
|
| + return SVGRectTearOff::Create(SVGRect::Create(boundingBox), 0,
|
| kPropertyIsNotAnimVal);
|
| }
|
|
|
|
|