Title: [196853] trunk
Revision
196853
Author
[email protected]
Date
2016-02-19 20:17:12 -0800 (Fri, 19 Feb 2016)

Log Message

Source/WebCore:
Bug 154366 - AX: AXObjectCache::visiblePositionForTextMarkerData() doesn't account for equivalent visibly equivalent positions
https://bugs.webkit.org/show_bug.cgi?id=154366

Patch by Doug Russell <[email protected]> on 2016-02-19
Reviewed by Chris Fleizach.

Test: accessibility/mac/text-marker-line-boundary.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::visiblePositionForTextMarkerData):

LayoutTests:
Bug 154366: AX: AXObjectCache::visiblePositionForTextMarkerData() doesn't account for visibly equivalent positions
https://bugs.webkit.org/show_bug.cgi?id=154366

Patch by Doug Russell <[email protected]> on 2016-02-19
Reviewed by Chris Fleizach.

* accessibility/mac/text-marker-line-boundary-expected.txt: Added.
* accessibility/mac/text-marker-line-boundary.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (196852 => 196853)


--- trunk/LayoutTests/ChangeLog	2016-02-20 03:24:22 UTC (rev 196852)
+++ trunk/LayoutTests/ChangeLog	2016-02-20 04:17:12 UTC (rev 196853)
@@ -1,3 +1,13 @@
+2016-02-19  Doug Russell  <[email protected]>
+
+        Bug 154366: AX: AXObjectCache::visiblePositionForTextMarkerData() doesn't account for visibly equivalent positions
+        https://bugs.webkit.org/show_bug.cgi?id=154366
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/mac/text-marker-line-boundary-expected.txt: Added.
+        * accessibility/mac/text-marker-line-boundary.html: Added.
+
 2016-02-19  Sukolsak Sakshuwong  <[email protected]>
 
         [INTL] Implement Number Format Functions

Added: trunk/LayoutTests/accessibility/mac/text-marker-line-boundary-expected.txt (0 => 196853)


--- trunk/LayoutTests/accessibility/mac/text-marker-line-boundary-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/mac/text-marker-line-boundary-expected.txt	2016-02-20 04:17:12 UTC (rev 196853)
@@ -0,0 +1,12 @@
+1 
+2
+This verifies that navigating through a line boundary with arrows returns
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS index == -1 is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/accessibility/mac/text-marker-line-boundary.html (0 => 196853)


--- trunk/LayoutTests/accessibility/mac/text-marker-line-boundary.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/mac/text-marker-line-boundary.html	2016-02-20 04:17:12 UTC (rev 196853)
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+    <script src=""
+    <body id="body" tabindex="0">
+        <div tabindex="0" id="text" contenteditable=true>
+            1
+            <br>2
+        </div>
+
+        <p id="description"></p>
+        <div id="console"></div>
+
+        <script>
+
+            description("This verifies that navigating through a line boundary with arrows returns");
+
+            var index = 0;
+            if (window.accessibilityController) {
+                accessibilityController.enableEnhancedAccessibility(true);
+                var webArea = accessibilityController.rootElement.childAtIndex(0);
+                webArea.setBoolAttributeValue("AXCaretBrowsingEnabled", true);
+
+                document.getElementById("text").focus();
+                var text = accessibilityController.focusedElement;
+
+                eventSender.keyDown("rightArrow");
+                eventSender.keyDown("rightArrow");
+                var textMarkerRange = text.selectedTextMarkerRange()
+                var endMarker = text.endTextMarkerForTextMarkerRange(textMarkerRange);
+                var nextMarker = text.nextTextMarker(endMarker);
+                var lineTextMarkerRange = text.lineTextMarkerRangeForTextMarker(nextMarker);
+                index = text.indexForTextMarker(nextMarker);
+                // -1 for NSNotFound
+                shouldBeFalse("index == -1");
+            }
+
+            </script>
+
+        <script src=""
+
+    </body>
+</html>
+

Modified: trunk/Source/WebCore/ChangeLog (196852 => 196853)


--- trunk/Source/WebCore/ChangeLog	2016-02-20 03:24:22 UTC (rev 196852)
+++ trunk/Source/WebCore/ChangeLog	2016-02-20 04:17:12 UTC (rev 196853)
@@ -1,3 +1,15 @@
+2016-02-19  Doug Russell  <[email protected]>
+
+        Bug 154366 - AX: AXObjectCache::visiblePositionForTextMarkerData() doesn't account for equivalent visibly equivalent positions
+        https://bugs.webkit.org/show_bug.cgi?id=154366
+
+        Reviewed by Chris Fleizach.
+
+        Test: accessibility/mac/text-marker-line-boundary.html
+
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::AXObjectCache::visiblePositionForTextMarkerData):
+
 2016-02-19  Simon Fraser  <[email protected]>
 
         Use more concrete types for parsing positions

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (196852 => 196853)


--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2016-02-20 03:24:22 UTC (rev 196852)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2016-02-20 04:17:12 UTC (rev 196853)
@@ -1418,10 +1418,7 @@
     AXObjectCache* cache = renderer->document().axObjectCache();
     if (!cache->isIDinUse(textMarkerData.axID))
         return VisiblePosition();
-    
-    if (deepPos.deprecatedNode() != textMarkerData.node || deepPos.deprecatedEditingOffset() != textMarkerData.offset)
-        return VisiblePosition();
-    
+
     return visiblePos;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to