diff options
Diffstat (limited to 'WebCore/accessibility/AccessibilityObject.cpp')
-rw-r--r-- | WebCore/accessibility/AccessibilityObject.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/WebCore/accessibility/AccessibilityObject.cpp b/WebCore/accessibility/AccessibilityObject.cpp index a6bb033..3ddcdc5 100644 --- a/WebCore/accessibility/AccessibilityObject.cpp +++ b/WebCore/accessibility/AccessibilityObject.cpp @@ -373,22 +373,7 @@ VisiblePositionRange AccessibilityObject::styleRangeForPosition(const VisiblePos // NOTE: Consider providing this utility method as AX API VisiblePositionRange AccessibilityObject::visiblePositionRangeForRange(const PlainTextRange& range) const { - unsigned textLength = text().length(); -#if PLATFORM(GTK) - // Gtk ATs need this for all text objects; not just text controls. - if (!textLength) { - Node* node = this->node(); - RenderObject* renderer = node ? node->renderer() : 0; - if (renderer && renderer->isText()) { - RenderText* renderText = toRenderText(renderer); - textLength = renderText ? renderText->textLength() : 0; - } - // Get the text length from the elements under the - // accessibility object if the value is still zero. - if (!textLength && allowsTextRanges()) - textLength = textUnderElement().length(); - } -#endif + unsigned textLength = getLengthForTextRange(); if (range.start + range.length > textLength) return VisiblePositionRange(); |