summaryrefslogtreecommitdiffstats
path: root/WebCore/accessibility/AccessibilityObject.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-09-29 17:32:26 +0100
committerSteve Block <steveblock@google.com>2010-09-29 17:35:08 +0100
commit68513a70bcd92384395513322f1b801e7bf9c729 (patch)
tree161b50f75a5921d61731bb25e730005994fcec85 /WebCore/accessibility/AccessibilityObject.cpp
parentfd5c6425ce58eb75211be7718d5dee960842a37e (diff)
downloadexternal_webkit-68513a70bcd92384395513322f1b801e7bf9c729.zip
external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.gz
external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.bz2
Merge WebKit at r67908: Initial merge by Git
Change-Id: I43a553e7b3299b28cb6ee8aa035ed70fe342b972
Diffstat (limited to 'WebCore/accessibility/AccessibilityObject.cpp')
-rw-r--r--WebCore/accessibility/AccessibilityObject.cpp17
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();