summaryrefslogtreecommitdiffstats
path: root/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
diff options
context:
space:
mode:
authorAndrei Popescu <andreip@google.com>2009-08-19 14:09:30 +0100
committerAndrei Popescu <andreip@google.com>2009-08-19 14:09:30 +0100
commit058ccc7ba0a4d59b9f6e92808332aa9895425fc7 (patch)
tree276aad5a2bbc2fd7d65d21bfca42c9de88b3dd20 /WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
parent2796dd1bf3b4b01e7e1d96ea91bd3a212f647579 (diff)
downloadexternal_webkit-058ccc7ba0a4d59b9f6e92808332aa9895425fc7.zip
external_webkit-058ccc7ba0a4d59b9f6e92808332aa9895425fc7.tar.gz
external_webkit-058ccc7ba0a4d59b9f6e92808332aa9895425fc7.tar.bz2
Revert "Merge WebKit r47420"
This reverts commit d227fc870c7a697500a3c900c31baf05fb9a8524.
Diffstat (limited to 'WebCore/accessibility/mac/AccessibilityObjectWrapper.mm')
-rw-r--r--WebCore/accessibility/mac/AccessibilityObjectWrapper.mm20
1 files changed, 1 insertions, 19 deletions
diff --git a/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm b/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
index 75cefee..d1e0599 100644
--- a/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
+++ b/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
@@ -378,7 +378,7 @@ static void AXAttributeStringSetSpelling(NSMutableAttributedString* attrString,
// add misspelling attribute for the intersection of the marker and the range
int rStart = range.location + (marker.startOffset - offset);
- int rLength = min(marker.endOffset, endOffset) - marker.startOffset;
+ int rLength = MIN(marker.endOffset, endOffset) - marker.startOffset;
NSRange spellRange = NSMakeRange(rStart, rLength);
AXAttributeStringSetNumber(attrString, NSAccessibilityMisspelledTextAttribute, [NSNumber numberWithBool:YES], spellRange);
@@ -478,9 +478,6 @@ static NSString* nsStringForReplacedNode(Node* replacedNode)
- (NSAttributedString*)doAXAttributedStringForTextMarkerRange:(WebCoreTextMarkerRange*)textMarkerRange
{
- if (!m_object)
- return nil;
-
// extract the start and end VisiblePosition
VisiblePosition startVisiblePosition = visiblePositionForStartOfTextMarkerRange(textMarkerRange);
if (startVisiblePosition.isNull())
@@ -490,7 +487,6 @@ static NSString* nsStringForReplacedNode(Node* replacedNode)
if (endVisiblePosition.isNull())
return nil;
- VisiblePositionRange visiblePositionRange(startVisiblePosition, endVisiblePosition);
// iterate over the range to build the AX attributed string
NSMutableAttributedString* attrString = [[NSMutableAttributedString alloc] init];
TextIterator it(makeRange(startVisiblePosition, endVisiblePosition).get());
@@ -503,11 +499,6 @@ static NSString* nsStringForReplacedNode(Node* replacedNode)
// non-zero length means textual node, zero length means replaced node (AKA "attachments" in AX)
if (it.length() != 0) {
- // Add the text of the list marker item if necessary.
- String listMarkerText = m_object->listMarkerTextForNodeAndPosition(node, VisiblePosition(it.range()->startPosition()));
- if (!listMarkerText.isEmpty())
- AXAttributedStringAppendText(attrString, node, offset, listMarkerText.characters(), listMarkerText.length());
-
AXAttributedStringAppendText(attrString, node, offset, it.characters(), it.length());
} else {
Node* replacedNode = node->childNode(offset);
@@ -1590,7 +1581,6 @@ static NSString* roleValueToNSString(AccessibilityRole value)
@"AXStyleTextMarkerRangeForTextMarker",
@"AXLengthForTextMarkerRange",
NSAccessibilityBoundsForRangeParameterizedAttribute,
- NSAccessibilityStringForRangeParameterizedAttribute,
nil];
}
@@ -1942,14 +1932,6 @@ static RenderObject* rendererForView(NSView* view)
NSRect rect = m_object->boundsForVisiblePositionRange(VisiblePositionRange(start, end));
return [NSValue valueWithRect:rect];
}
-
- if ([attribute isEqualToString:NSAccessibilityStringForRangeParameterizedAttribute]) {
- VisiblePosition start = m_object->visiblePositionForIndex(range.location);
- VisiblePosition end = m_object->visiblePositionForIndex(range.location+range.length);
- if (start.isNull() || end.isNull())
- return nil;
- return m_object->stringForVisiblePositionRange(VisiblePositionRange(start, end));
- }
if ([attribute isEqualToString: @"AXAttributedStringForTextMarkerRange"])
return [self doAXAttributedStringForTextMarkerRange:textMarkerRange];