Title: [275017] trunk

Diff

Modified: trunk/LayoutTests/ChangeLog (275016 => 275017)


--- trunk/LayoutTests/ChangeLog	2021-03-25 13:41:51 UTC (rev 275016)
+++ trunk/LayoutTests/ChangeLog	2021-03-25 13:42:33 UTC (rev 275017)
@@ -1,3 +1,20 @@
+2021-03-25  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r274826 and r274968.
+        https://bugs.webkit.org/show_bug.cgi?id=223746
+
+        Added broken layout test
+
+        Reverted changesets:
+
+        "AX: textRectsFromMarkers always fails"
+        https://bugs.webkit.org/show_bug.cgi?id=223556
+        https://trac.webkit.org/changeset/274826
+
+        "AX: Add functions rectsForTextMarkerRange for testing"
+        https://bugs.webkit.org/show_bug.cgi?id=223705
+        https://trac.webkit.org/changeset/274968
+
 2021-03-24  Lauro Moura  <[email protected]>
 
         [GTK] Re-skip modern-media-controls tests after r274810

Deleted: trunk/LayoutTests/accessibility/ios-simulator/text-rects-for-range-matches-expected.txt (275016 => 275017)


--- trunk/LayoutTests/accessibility/ios-simulator/text-rects-for-range-matches-expected.txt	2021-03-25 13:41:51 UTC (rev 275016)
+++ trunk/LayoutTests/accessibility/ios-simulator/text-rects-for-range-matches-expected.txt	2021-03-25 13:42:33 UTC (rev 275017)
@@ -1,11 +0,0 @@
-This is some testing content.
-This tests that we are able to get the rects for a range correctly with matching text.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Rect for range should not be empty: NSRect: {{75, 26}, {37, 17}}
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/accessibility/ios-simulator/text-rects-for-range-matches.html (275016 => 275017)


--- trunk/LayoutTests/accessibility/ios-simulator/text-rects-for-range-matches.html	2021-03-25 13:41:51 UTC (rev 275016)
+++ trunk/LayoutTests/accessibility/ios-simulator/text-rects-for-range-matches.html	2021-03-25 13:42:33 UTC (rev 275017)
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-    <script src=""
-    <body id="body" tabindex="0">
-        <div tabindex="0" id="text">
-        This is some testing content. 
-        </div>
-
-        <p id="description"></p>
-        <div id="console"></div>
-
-        <script>
-
-            description("This tests that we are able to get the rects for a range correctly with matching text.");
-
-            if (window.accessibilityController) {
-                accessibilityController.enableEnhancedAccessibility(true);
-                var text = accessibilityController.rootElement.childAtIndex(0).childAtIndex(0);
-
-                var rectsForRange = text.rectsForTextMarkerRange(text.textMarkerRangeForElement(text), "testing");
-                debug("Rect for range should not be empty: " + rectsForRange);
-            }
-
-            </script>
-
-        <script src=""
-
-    </body>
-</html>
-

Modified: trunk/Source/WebCore/ChangeLog (275016 => 275017)


--- trunk/Source/WebCore/ChangeLog	2021-03-25 13:41:51 UTC (rev 275016)
+++ trunk/Source/WebCore/ChangeLog	2021-03-25 13:42:33 UTC (rev 275017)
@@ -1,3 +1,20 @@
+2021-03-25  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r274826 and r274968.
+        https://bugs.webkit.org/show_bug.cgi?id=223746
+
+        Added broken layout test
+
+        Reverted changesets:
+
+        "AX: textRectsFromMarkers always fails"
+        https://bugs.webkit.org/show_bug.cgi?id=223556
+        https://trac.webkit.org/changeset/274826
+
+        "AX: Add functions rectsForTextMarkerRange for testing"
+        https://bugs.webkit.org/show_bug.cgi?id=223705
+        https://trac.webkit.org/changeset/274968
+
 2021-03-25  Antoine Quint  <[email protected]>
 
         Improve interpolation of the shape-outside CSS property

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (275016 => 275017)


--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2021-03-25 13:41:51 UTC (rev 275016)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2021-03-25 13:42:33 UTC (rev 275017)
@@ -2033,24 +2033,15 @@
     
 Optional<SimpleRange> AXObjectCache::rangeMatchesTextNearRange(const SimpleRange& originalRange, const String& matchText)
 {
-    // Create a large enough range to find the text within it that's being searched for.
+    // Create a large enough range for searching the text within.
     unsigned textLength = matchText.length();
-    auto startPosition = VisiblePosition(makeContainerOffsetPosition(originalRange.start));
-    for (unsigned k = 0; k < textLength; k++) {
-        auto testPosition = startPosition.previous();
-        if (testPosition.isNull())
-            break;
-        startPosition = testPosition;
-    }
+    auto startPosition = visiblePositionForPositionWithOffset(makeContainerOffsetPosition(originalRange.start), -textLength);
+    auto endPosition = visiblePositionForPositionWithOffset(makeContainerOffsetPosition(originalRange.start), 2 * textLength);
+    if (startPosition.isNull())
+        startPosition = firstPositionInOrBeforeNode(originalRange.start.container.ptr());
+    if (endPosition.isNull())
+        endPosition = lastPositionInOrAfterNode(originalRange.end.container.ptr());
 
-    auto endPosition = VisiblePosition(makeContainerOffsetPosition(originalRange.end));
-    for (unsigned k = 0; k < textLength; k++) {
-        auto testPosition = endPosition.next();
-        if (testPosition.isNull())
-            break;
-        endPosition = testPosition;
-    }
-
     auto searchRange = makeSimpleRange(startPosition, endPosition);
     if (!searchRange || searchRange->collapsed())
         return WTF::nullopt;

Modified: trunk/Tools/ChangeLog (275016 => 275017)


--- trunk/Tools/ChangeLog	2021-03-25 13:41:51 UTC (rev 275016)
+++ trunk/Tools/ChangeLog	2021-03-25 13:42:33 UTC (rev 275017)
@@ -1,3 +1,20 @@
+2021-03-25  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r274826 and r274968.
+        https://bugs.webkit.org/show_bug.cgi?id=223746
+
+        Added broken layout test
+
+        Reverted changesets:
+
+        "AX: textRectsFromMarkers always fails"
+        https://bugs.webkit.org/show_bug.cgi?id=223556
+        https://trac.webkit.org/changeset/274826
+
+        "AX: Add functions rectsForTextMarkerRange for testing"
+        https://bugs.webkit.org/show_bug.cgi?id=223705
+        https://trac.webkit.org/changeset/274968
+
 2021-03-24  Jonathan Bedard  <[email protected]>
 
         Autoinstalling keyring-7.3.1 is failing with Python 2

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h (275016 => 275017)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h	2021-03-25 13:41:51 UTC (rev 275016)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h	2021-03-25 13:42:33 UTC (rev 275017)
@@ -317,7 +317,6 @@
     RefPtr<AccessibilityTextMarker> nextTextMarker(AccessibilityTextMarker*);
     RefPtr<AccessibilityUIElement> accessibilityElementForTextMarker(AccessibilityTextMarker*);
     JSRetainPtr<JSStringRef> stringForTextMarkerRange(AccessibilityTextMarkerRange*);
-    JSRetainPtr<JSStringRef> rectsForTextMarkerRange(AccessibilityTextMarkerRange*, JSStringRef);
     JSRetainPtr<JSStringRef> attributedStringForTextMarkerRange(AccessibilityTextMarkerRange*);
     JSRetainPtr<JSStringRef> attributedStringForTextMarkerRangeWithOptions(AccessibilityTextMarkerRange*, bool);
     int textMarkerRangeLength(AccessibilityTextMarkerRange*);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl (275016 => 275017)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl	2021-03-25 13:41:51 UTC (rev 275016)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl	2021-03-25 13:42:33 UTC (rev 275017)
@@ -234,7 +234,6 @@
     AccessibilityTextMarker nextTextMarker(AccessibilityTextMarker marker);
     AccessibilityUIElement accessibilityElementForTextMarker(AccessibilityTextMarker marker);
     DOMString stringForTextMarkerRange(AccessibilityTextMarkerRange range);
-    DOMString rectsForTextMarkerRange(AccessibilityTextMarkerRange range, DOMString searchText);
     DOMString attributedStringForTextMarkerRange(AccessibilityTextMarkerRange range);
     DOMString attributedStringForTextMarkerRangeWithOptions(AccessibilityTextMarkerRange range, boolean includeSpellCheck);
     long textMarkerRangeLength(AccessibilityTextMarkerRange range);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (275016 => 275017)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2021-03-25 13:41:51 UTC (rev 275016)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2021-03-25 13:42:33 UTC (rev 275017)
@@ -2126,12 +2126,6 @@
     return JSStringCreateWithCharacters(0, 0);
 }
 
-JSRetainPtr<JSStringRef> AccessibilityUIElement::rectsForTextMarkerRange(AccessibilityTextMarkerRange* markerRange, JSStringRef searchText)
-{
-    // FIXME: implement
-    return JSStringCreateWithCharacters(0, 0);
-}
-
 RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::textMarkerRangeForMarkers(AccessibilityTextMarker* startMarker, AccessibilityTextMarker* endMarker)
 {
     // FIXME: implement

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (275016 => 275017)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm	2021-03-25 13:41:51 UTC (rev 275016)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm	2021-03-25 13:42:33 UTC (rev 275017)
@@ -106,7 +106,6 @@
 - (NSArray *)textMarkerRange;
 - (NSInteger)lengthForTextMarkers:(NSArray *)textMarkers;
 - (NSString *)stringForTextMarkers:(NSArray *)markers;
-- (NSArray *)textRectsFromMarkers:(NSArray *)markers withText:(NSString *)text;
 - (id)startOrEndTextMarkerForTextMarkers:(NSArray*)textMarkers isStart:(BOOL)isStart;
 - (NSArray *)textMarkerRangeForMarkers:(NSArray *)textMarkers;
 - (NSInteger)positionForTextMarker:(id)marker;
@@ -1187,14 +1186,6 @@
     return [[m_element stringForTextMarkers:textMarkers] createJSStringRef];
 }
 
-JSRetainPtr<JSStringRef> AccessibilityUIElement::rectsForTextMarkerRange(AccessibilityTextMarkerRange* markerRange, JSStringRef text)
-{
-    id textMarkers = markerRange->platformTextMarkerRange();
-    if (![textMarkers isKindOfClass:[NSArray class]])
-        return createJSString();
-    return [[[m_element textRectsFromMarkers:textMarkers withText:[NSString stringWithJSStringRef:text]] componentsJoinedByString:@","] createJSStringRef];
-}
-
 RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::textMarkerRangeForMarkers(AccessibilityTextMarker* startMarker, AccessibilityTextMarker* endMarker)
 {
     NSArray *textMarkers = @[startMarker->platformTextMarker(), endMarker->platformTextMarker()];

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (275016 => 275017)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm	2021-03-25 13:41:51 UTC (rev 275016)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm	2021-03-25 13:42:33 UTC (rev 275017)
@@ -1808,12 +1808,6 @@
     return nullptr;
 }
 
-JSRetainPtr<JSStringRef> AccessibilityUIElement::rectsForTextMarkerRange(AccessibilityTextMarkerRange*, JSStringRef)
-{
-    // Not implemented on macOS
-    return nullptr;
-}
-
 RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::textMarkerRangeForMarkers(AccessibilityTextMarker* startMarker, AccessibilityTextMarker* endMarker)
 {
     BEGIN_AX_OBJC_EXCEPTIONS

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp (275016 => 275017)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp	2021-03-25 13:41:51 UTC (rev 275016)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp	2021-03-25 13:42:33 UTC (rev 275017)
@@ -814,12 +814,6 @@
     return nullptr;
 }
 
-JSRetainPtr<JSStringRef> AccessibilityUIElement::rectsForTextMarkerRange(AccessibilityTextMarkerRange*, JSStringRef)
-{
-    notImplemented();
-    return nullptr;
-}
-
 JSRetainPtr<JSStringRef> AccessibilityUIElement::stringForTextMarkerRange(AccessibilityTextMarkerRange*)
 {
     notImplemented();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to