mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 16:22:00 +00:00
Backed out changeset 1b67ef7bd374 (bug 1822170) for assertion failures on Accessible.cpp. CLOSED TREE
This commit is contained in:
parent
5a9d677542
commit
5df0512bdd
@ -327,10 +327,6 @@ NSAttributedString* CachedTextMarkerRange::AttributedText() const {
|
||||
TextLeafPoint attributesNext;
|
||||
do {
|
||||
attributesNext = start.FindTextAttrsStart(eDirNext, false);
|
||||
if (attributesNext == start) {
|
||||
MOZ_ASSERT_UNREACHABLE("Cannot proceed further in attribute run");
|
||||
break;
|
||||
}
|
||||
RefPtr<AccAttributes> attributes = start.GetTextAttributes();
|
||||
MOZ_ASSERT(attributes);
|
||||
if (attributes && !attributes->Equal(currentRun)) {
|
||||
|
@ -415,13 +415,9 @@ static GeckoTextMarkerRange TextMarkerSubrange(Accessible* aAccessible,
|
||||
|
||||
NSRange r = [aRange rangeValue];
|
||||
start.Offset() += r.location;
|
||||
end.Offset() = start.Offset() + r.length;
|
||||
end.Offset() = start.Offset() + r.location + r.length;
|
||||
|
||||
textMarkerRange = GeckoTextMarkerRange(start, end);
|
||||
// Crop range to accessible
|
||||
textMarkerRange.Crop(aAccessible);
|
||||
|
||||
return textMarkerRange;
|
||||
return GeckoTextMarkerRange(start, end);
|
||||
}
|
||||
|
||||
- (NSString*)moxStringForRange:(NSValue*)range {
|
||||
|
@ -61,24 +61,6 @@ addAccessibleTask(
|
||||
[" ", "#000000", "#ffffff", null, null, null, 16, null, null],
|
||||
["test", "#0000ee", "#ffffff", 1, "#0000ee", null, 16, "a2", null],
|
||||
]);
|
||||
|
||||
// Test different NSRange parameters for AXAttributedStringForRange
|
||||
let worldLeaf = findAccessibleChildByID(accDoc, "a1").firstChild;
|
||||
let wordStaticText = worldLeaf.nativeInterface.QueryInterface(
|
||||
Ci.nsIAccessibleMacInterface
|
||||
);
|
||||
attributedText = wordStaticText.getParameterizedAttributeValue(
|
||||
"AXAttributedStringForRange",
|
||||
NSRange(4, 1)
|
||||
);
|
||||
is(attributedText.length, 1, "Last character is in single attribute run");
|
||||
is(attributedText[0].string, "d", "Last character matches");
|
||||
|
||||
attributedText = wordStaticText.getParameterizedAttributeValue(
|
||||
"AXAttributedStringForRange",
|
||||
NSRange(5, 1)
|
||||
);
|
||||
is(attributedText.length, 0, "Range is past accessible bounds");
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -65,7 +65,7 @@ addAccessibleTask(
|
||||
NSRange(3, 6)
|
||||
);
|
||||
|
||||
is(str, "lo, th", "AXStringForRange matches.");
|
||||
is(str, "lo, this ", "AXStringForRange matches.");
|
||||
|
||||
let smallBounds = textLeaf.getParameterizedAttributeValue(
|
||||
"AXBoundsForRange",
|
||||
|
Loading…
Reference in New Issue
Block a user