Commit 8e497d03 authored by fs@opera.com's avatar fs@opera.com

Drop getBBox() override on SVGPathElement

path().boundingRect() is exactly what objectBoundingBox() will return
for LayoutSVGPath, so the implementation from SVGGraphicElement can be
used.

Review URL: https://codereview.chromium.org/1315983012

git-svn-id: svn://svn.chromium.org/blink/trunk@201917 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent affd440b
...@@ -270,19 +270,4 @@ void SVGPathElement::pathSegListChanged(ListModification listModification) ...@@ -270,19 +270,4 @@ void SVGPathElement::pathSegListChanged(ListModification listModification)
markForLayoutAndParentResourceInvalidation(layoutObject); markForLayoutAndParentResourceInvalidation(layoutObject);
} }
FloatRect SVGPathElement::getBBox()
{
// By default, getBBox() returns objectBoundingBox but that will include
// markers so we override it to return just the path's bounding rect.
document().updateLayoutIgnorePendingStylesheets();
// FIXME: Eventually we should support getBBox for detached elements.
if (!layoutObject())
return FloatRect();
LayoutSVGShape* layoutObject = toLayoutSVGShape(this->layoutObject());
return layoutObject->path().boundingRect();
}
} // namespace blink } // namespace blink
...@@ -96,8 +96,6 @@ public: ...@@ -96,8 +96,6 @@ public:
void pathSegListChanged(ListModification = ListModificationUnknown); void pathSegListChanged(ListModification = ListModificationUnknown);
FloatRect getBBox() override;
DECLARE_VIRTUAL_TRACE(); DECLARE_VIRTUAL_TRACE();
private: private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment