Index: Source/core/accessibility/AXRenderObject.cpp |
diff --git a/Source/core/accessibility/AXRenderObject.cpp b/Source/core/accessibility/AXRenderObject.cpp |
index 58639de6792676352a73b738ad13d6ba8cc117b5..f7f8d2d6ad7880907e23355fb22894a95c5fbba0 100644 |
--- a/Source/core/accessibility/AXRenderObject.cpp |
+++ b/Source/core/accessibility/AXRenderObject.cpp |
@@ -2395,19 +2395,20 @@ LayoutRect AXRenderObject::computeElementRect() const |
if (obj->node()) // If we are a continuation, we want to make sure to use the primary renderer. |
obj = obj->node()->renderer(); |
- // absoluteFocusRingQuads will query the hierarchy below this element, which for large webpages can be very slow. |
+ // absoluteFocusRingBoundingBox will query the hierarchy below this element, which for large webpages can be very slow. |
// For a web area, which will have the most elements of any element, absoluteQuads should be used. |
// We should also use absoluteQuads for SVG elements, otherwise transforms won't be applied. |
- Vector<FloatQuad> quads; |
- if (obj->isText()) |
+ LayoutRect result; |
+ if (obj->isText()) { |
+ Vector<FloatQuad> quads; |
toRenderText(obj)->absoluteQuads(quads, 0, RenderText::ClipToEllipsis); |
- else if (isWebArea() || obj->isSVGRoot()) |
- obj->absoluteQuads(quads); |
- else |
- obj->absoluteFocusRingQuads(quads); |
- |
- LayoutRect result = boundingBoxForQuads(obj, quads); |
+ result = boundingBoxForQuads(obj, quads); |
+ } else if (isWebArea() || obj->isSVGRoot()) { |
+ result = obj->absoluteBoundingBoxRect(); |
+ } else { |
+ result = obj->absoluteFocusRingBoundingBoxRect(); |
+ } |
Document* document = this->document(); |
if (document && document->isSVGDocument()) |