Commit 5ee08c3d authored by fs@opera.com's avatar fs@opera.com

Drop SVGElement::getBoundingBox

The two users can be trivially replaced with queries on the layout tree
instead.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@201973 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent a1cdff5e
......@@ -999,10 +999,8 @@ IntRect Element::boundsInViewportSpace()
Vector<FloatQuad> quads;
if (isSVGElement() && layoutObject()) {
// Get the bounding rectangle from the SVG model.
SVGElement* svgElement = toSVGElement(this);
FloatRect localRect;
if (svgElement->getBoundingBox(localRect))
quads.append(layoutObject()->localToAbsoluteQuad(localRect));
if (toSVGElement(this)->isSVGGraphicsElement())
quads.append(layoutObject()->localToAbsoluteQuad(layoutObject()->objectBoundingBox()));
} else {
// Get the bounding rectangle from the box model.
if (layoutBoxModelObject())
......@@ -1045,10 +1043,8 @@ ClientRect* Element::getBoundingClientRect()
if (elementLayoutObject) {
if (isSVGElement() && !elementLayoutObject->isSVGRoot()) {
// Get the bounding rectangle from the SVG model.
SVGElement* svgElement = toSVGElement(this);
FloatRect localRect;
if (svgElement->getBoundingBox(localRect))
quads.append(elementLayoutObject->localToAbsoluteQuad(localRect));
if (toSVGElement(this)->isSVGGraphicsElement())
quads.append(elementLayoutObject->localToAbsoluteQuad(elementLayoutObject->objectBoundingBox()));
} else if (elementLayoutObject->isBoxModelObject() || elementLayoutObject->isBR()) {
elementLayoutObject->absoluteQuads(quads);
}
......
......@@ -501,15 +501,6 @@ const WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>& SVGElement::instanc
return svgRareData()->elementInstances();
}
bool SVGElement::getBoundingBox(FloatRect& rect)
{
if (!isSVGGraphicsElement())
return false;
rect = toSVGGraphicsElement(this)->getBBox();
return true;
}
void SVGElement::setCursorElement(SVGCursorElement* cursorElement)
{
SVGElementRareData* rareData = ensureSVGRareData();
......
......@@ -113,8 +113,6 @@ public:
void mapInstanceToElement(SVGElement*);
void removeInstanceMapping(SVGElement*);
bool getBoundingBox(FloatRect&);
void setCursorElement(SVGCursorElement*);
void setCursorImageValue(CSSCursorImageValue*);
......
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