Title: [281274] trunk
Revision
281274
Author
[email protected]
Date
2021-08-19 15:28:50 -0700 (Thu, 19 Aug 2021)

Log Message

Rename AccessibilityUIElement::setSelectedVisibleTextRange to setSelectedTextMarkerRange for naming consistency and maintainability.
https://bugs.webkit.org/show_bug.cgi?id=229290
<rdar://problem/82128453>

Reviewed by Chris Fleizach.

Tools:

Renamed this method for consistency and to reflect what it is actually
doing. The goal is to avoid confusion with methods for VisiblePosition,
VisibleSelection and so forth, which are Core objects not exposed to AX
clients.

* DumpRenderTree/AccessibilityUIElement.cpp:
(setSelectedTextMarkerRangeCallback):
(AccessibilityUIElement::setSelectedTextMarkerRange):
(AccessibilityUIElement::getJSClass):
(setSelectedVisibleTextRangeCallback): Deleted.
(AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::setSelectedTextMarkerRange):
(AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::setSelectedTextMarkerRange):
(AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:
(WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.

LayoutTests:

Updated all test files to use new name.

* accessibility/mac/selected-visible-position-range.html:
* accessibility/mac/selection-sync.html:
* accessibility/mac/wk1-set-selected-text-marker-range-input-element.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (281273 => 281274)


--- trunk/LayoutTests/ChangeLog	2021-08-19 22:25:01 UTC (rev 281273)
+++ trunk/LayoutTests/ChangeLog	2021-08-19 22:28:50 UTC (rev 281274)
@@ -1,3 +1,17 @@
+2021-08-19  Andres Gonzalez  <[email protected]>
+
+        Rename AccessibilityUIElement::setSelectedVisibleTextRange to setSelectedTextMarkerRange for naming consistency and maintainability.
+        https://bugs.webkit.org/show_bug.cgi?id=229290
+        <rdar://problem/82128453>
+
+        Reviewed by Chris Fleizach.
+
+        Updated all test files to use new name.
+
+        * accessibility/mac/selected-visible-position-range.html:
+        * accessibility/mac/selection-sync.html:
+        * accessibility/mac/wk1-set-selected-text-marker-range-input-element.html:
+
 2021-08-19  Alan Bujtas  <[email protected]>
 
         [LFC][IFC] Add support for overflow-wrap: anywhere

Modified: trunk/LayoutTests/accessibility/mac/selected-visible-position-range.html (281273 => 281274)


--- trunk/LayoutTests/accessibility/mac/selected-visible-position-range.html	2021-08-19 22:25:01 UTC (rev 281273)
+++ trunk/LayoutTests/accessibility/mac/selected-visible-position-range.html	2021-08-19 22:28:50 UTC (rev 281274)
@@ -42,7 +42,7 @@
             var end = content.startTextMarkerForTextMarkerRange(selectedRange);
             var start = content.previousParagraphStartTextMarkerForTextMarker(end);
             var range = content.textMarkerRangeForMarkers(start, end);
-            content.setSelectedVisibleTextRange(range);
+            content.setSelectedTextMarkerRange(range);
 
             await waitFor(() => {
                 selectedRange = content.selectedTextMarkerRange();
@@ -54,7 +54,7 @@
             // Set the selection range to a collapsed range at the second character of the last paragraph.
             end = content.nextTextMarker(end);
             range = content.textMarkerRangeForMarkers(end, end);
-            content.setSelectedVisibleTextRange(range);
+            content.setSelectedTextMarkerRange(range);
 
             var index = -1;
             await waitFor(() => {

Modified: trunk/LayoutTests/accessibility/mac/selection-sync.html (281273 => 281274)


--- trunk/LayoutTests/accessibility/mac/selection-sync.html	2021-08-19 22:25:01 UTC (rev 281273)
+++ trunk/LayoutTests/accessibility/mac/selection-sync.html	2021-08-19 22:28:50 UTC (rev 281274)
@@ -81,8 +81,8 @@
         var markerFour = axTextbox.textMarkerForIndex(4);
         var moveRange = axTextbox.textMarkerRangeForMarkers(markerThree, markerThree);
         var extendRange = axTextbox.textMarkerRangeForMarkers(markerThree, markerFour);
-        webArea.setSelectedVisibleTextRange(moveRange);
-        webArea.setSelectedVisibleTextRange(extendRange);
+        webArea.setSelectedTextMarkerRange(moveRange);
+        webArea.setSelectedTextMarkerRange(extendRange);
     } else
         debug("window.accessibilityController is not present");
 

Modified: trunk/LayoutTests/accessibility/mac/wk1-set-selected-text-marker-range-input-element.html (281273 => 281274)


--- trunk/LayoutTests/accessibility/mac/wk1-set-selected-text-marker-range-input-element.html	2021-08-19 22:25:01 UTC (rev 281273)
+++ trunk/LayoutTests/accessibility/mac/wk1-set-selected-text-marker-range-input-element.html	2021-08-19 22:28:50 UTC (rev 281274)
@@ -30,7 +30,7 @@
             
             var iframe = document.getElementById("iframe");
             iframe.contentDocument.getElementById("input").focus();
-            webArea.setSelectedVisibleTextRange(selectedRange);
+            webArea.setSelectedTextMarkerRange(selectedRange);
             eventSender.keyDown("1");
             debug(input.stringValue);
             finishJSTest();

Modified: trunk/Tools/ChangeLog (281273 => 281274)


--- trunk/Tools/ChangeLog	2021-08-19 22:25:01 UTC (rev 281273)
+++ trunk/Tools/ChangeLog	2021-08-19 22:28:50 UTC (rev 281274)
@@ -1,3 +1,44 @@
+2021-08-19  Andres Gonzalez  <[email protected]>
+
+        Rename AccessibilityUIElement::setSelectedVisibleTextRange to setSelectedTextMarkerRange for naming consistency and maintainability.
+        https://bugs.webkit.org/show_bug.cgi?id=229290
+        <rdar://problem/82128453>
+
+        Reviewed by Chris Fleizach.
+
+        Renamed this method for consistency and to reflect what it is actually
+        doing. The goal is to avoid confusion with methods for VisiblePosition,
+        VisibleSelection and so forth, which are Core objects not exposed to AX
+        clients.
+
+        * DumpRenderTree/AccessibilityUIElement.cpp:
+        (setSelectedTextMarkerRangeCallback):
+        (AccessibilityUIElement::setSelectedTextMarkerRange):
+        (AccessibilityUIElement::getJSClass):
+        (setSelectedVisibleTextRangeCallback): Deleted.
+        (AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
+        * DumpRenderTree/AccessibilityUIElement.h:
+        * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
+        (AccessibilityUIElement::setSelectedTextMarkerRange):
+        (AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
+        * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+        (AccessibilityUIElement::setSelectedTextMarkerRange):
+        (AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
+        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+        * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        (WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
+        (WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
+        * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
+        (WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
+        (WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
+        * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+        (WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
+        (WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
+        * WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:
+        (WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
+        (WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
+
 2021-08-19  Jonathan Bedard  <[email protected]>
 
         [run-webkit-tests] Handle json crash logs (Part 1)

Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp (281273 => 281274)


--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp	2021-08-19 22:25:01 UTC (rev 281273)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp	2021-08-19 22:28:50 UTC (rev 281274)
@@ -1141,7 +1141,7 @@
     return AccessibilityTextMarker::makeJSAccessibilityTextMarker(context, toAXElement(thisObject)->nextSentenceEndTextMarkerForTextMarker(marker));
 }
 
-static JSValueRef setSelectedVisibleTextRangeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef setSelectedTextMarkerRangeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     AccessibilityUIElement* uiElement = toAXElement(thisObject);
     AccessibilityTextMarkerRange* textMarkerRange = nullptr;
@@ -1149,7 +1149,7 @@
         textMarkerRange = toTextMarkerRange(JSValueToObject(context, arguments[0], exception));
 
     if (uiElement)
-        return JSValueMakeBoolean(context, uiElement->setSelectedVisibleTextRange(textMarkerRange));
+        return JSValueMakeBoolean(context, uiElement->setSelectedTextMarkerRange(textMarkerRange));
 
     return JSValueMakeBoolean(context, false);
 }
@@ -1784,7 +1784,7 @@
     return nullptr;
 }
 
-bool AccessibilityUIElement::setSelectedVisibleTextRange(AccessibilityTextMarkerRange*)
+bool AccessibilityUIElement::setSelectedTextMarkerRange(AccessibilityTextMarkerRange*)
 {
     return false;
 }
@@ -2054,7 +2054,7 @@
         { "setSelectedChildAtIndex", setSelectedChildAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "removeSelectionAtIndex", removeSelectionAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setValue", setValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "setSelectedVisibleTextRange", setSelectedVisibleTextRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "setSelectedTextMarkerRange", setSelectedTextMarkerRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "selectedChildAtIndex", selectedChildAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "scrollToMakeVisible", scrollToMakeVisibleCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "scrollToGlobalPoint", scrollToGlobalPointCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },

Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.h (281273 => 281274)


--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.h	2021-08-19 22:25:01 UTC (rev 281273)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.h	2021-08-19 22:28:50 UTC (rev 281274)
@@ -279,7 +279,7 @@
     AccessibilityTextMarker nextSentenceEndTextMarkerForTextMarker(AccessibilityTextMarker*);
     AccessibilityTextMarkerRange selectedTextMarkerRange();
     void resetSelectedTextMarkerRange();
-    bool setSelectedVisibleTextRange(AccessibilityTextMarkerRange*);
+    bool setSelectedTextMarkerRange(AccessibilityTextMarkerRange*);
     bool replaceTextInRange(JSStringRef, int position, int length);
     bool insertText(JSStringRef);
 

Modified: trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm (281273 => 281274)


--- trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm	2021-08-19 22:25:01 UTC (rev 281273)
+++ trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm	2021-08-19 22:28:50 UTC (rev 281274)
@@ -597,7 +597,7 @@
     return nullptr;
 }
 
-bool AccessibilityUIElement::setSelectedVisibleTextRange(AccessibilityTextMarkerRange*)
+bool AccessibilityUIElement::setSelectedTextMarkerRange(AccessibilityTextMarkerRange*)
 {
     return false;
 }

Modified: trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm (281273 => 281274)


--- trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm	2021-08-19 22:25:01 UTC (rev 281273)
+++ trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm	2021-08-19 22:28:50 UTC (rev 281274)
@@ -1938,7 +1938,7 @@
     return nullptr;
 }
 
-bool AccessibilityUIElement::setSelectedVisibleTextRange(AccessibilityTextMarkerRange* markerRange)
+bool AccessibilityUIElement::setSelectedTextMarkerRange(AccessibilityTextMarkerRange* markerRange)
 {
     BEGIN_AX_OBJC_EXCEPTIONS
     [m_element accessibilitySetValue:markerRange->platformTextMarkerRange() forAttribute:NSAccessibilitySelectedTextMarkerRangeAttribute];

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h (281273 => 281274)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h	2021-08-19 22:25:01 UTC (rev 281273)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h	2021-08-19 22:28:50 UTC (rev 281274)
@@ -333,7 +333,7 @@
     RefPtr<AccessibilityTextMarker> textMarkerForIndex(int);
     RefPtr<AccessibilityTextMarker> startTextMarker();
     RefPtr<AccessibilityTextMarker> endTextMarker();
-    bool setSelectedVisibleTextRange(AccessibilityTextMarkerRange*);
+    bool setSelectedTextMarkerRange(AccessibilityTextMarkerRange*);
     RefPtr<AccessibilityTextMarkerRange> leftWordTextMarkerRangeForTextMarker(AccessibilityTextMarker*);
     RefPtr<AccessibilityTextMarkerRange> rightWordTextMarkerRangeForTextMarker(AccessibilityTextMarker*);
     RefPtr<AccessibilityTextMarker> previousWordStartTextMarkerForTextMarker(AccessibilityTextMarker*);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl (281273 => 281274)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl	2021-08-19 22:25:01 UTC (rev 281273)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl	2021-08-19 22:28:50 UTC (rev 281274)
@@ -249,7 +249,7 @@
     AccessibilityTextMarker textMarkerForIndex(long textIndex);
     readonly attribute AccessibilityTextMarker startTextMarker;
     readonly attribute AccessibilityTextMarker endTextMarker;
-    boolean setSelectedVisibleTextRange(AccessibilityTextMarkerRange range);
+    boolean setSelectedTextMarkerRange(AccessibilityTextMarkerRange range);
     AccessibilityTextMarkerRange leftWordTextMarkerRangeForTextMarker(AccessibilityTextMarker textMarker);
     AccessibilityTextMarkerRange rightWordTextMarkerRangeForTextMarker(AccessibilityTextMarker textMarker);
     AccessibilityTextMarker previousWordStartTextMarkerForTextMarker(AccessibilityTextMarker textMarker);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (281273 => 281274)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2021-08-19 22:25:01 UTC (rev 281273)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2021-08-19 22:28:50 UTC (rev 281274)
@@ -2167,7 +2167,7 @@
     return nullptr;
 }
 
-bool AccessibilityUIElement::setSelectedVisibleTextRange(AccessibilityTextMarkerRange*)
+bool AccessibilityUIElement::setSelectedTextMarkerRange(AccessibilityTextMarkerRange*)
 {
     return false;
 }

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (281273 => 281274)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm	2021-08-19 22:25:01 UTC (rev 281273)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm	2021-08-19 22:28:50 UTC (rev 281274)
@@ -930,7 +930,7 @@
     return [rangeDescription createJSStringRef];
 }
 
-bool AccessibilityUIElement::setSelectedVisibleTextRange(AccessibilityTextMarkerRange*)
+bool AccessibilityUIElement::setSelectedTextMarkerRange(AccessibilityTextMarkerRange*)
 {
     return false;
 }

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (281273 => 281274)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm	2021-08-19 22:25:01 UTC (rev 281273)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm	2021-08-19 22:28:50 UTC (rev 281274)
@@ -1472,7 +1472,7 @@
     END_AX_OBJC_EXCEPTIONS
 }
 
-bool AccessibilityUIElement::setSelectedVisibleTextRange(AccessibilityTextMarkerRange* markerRange)
+bool AccessibilityUIElement::setSelectedTextMarkerRange(AccessibilityTextMarkerRange* markerRange)
 {
     if (!markerRange)
         return false;

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp (281273 => 281274)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp	2021-08-19 22:25:01 UTC (rev 281273)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp	2021-08-19 22:28:50 UTC (rev 281274)
@@ -916,7 +916,7 @@
     return nullptr;
 }
 
-bool AccessibilityUIElement::setSelectedVisibleTextRange(AccessibilityTextMarkerRange*)
+bool AccessibilityUIElement::setSelectedTextMarkerRange(AccessibilityTextMarkerRange*)
 {
     notImplemented();
     return false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to