Backed out changeset 1b67ef7bd374 (bug 1822170) for assertion failures on Accessible.cpp. CLOSED TREE

This commit is contained in:
Marian-Vasile Laza 2023-03-15 20:46:00 +02:00
Родитель 5a9d677542
Коммит 5df0512bdd
4 изменённых файлов: 3 добавлений и 29 удалений

Просмотреть файл

@ -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",