Title: [227523] trunk
Revision
227523
Author
[email protected]
Date
2018-01-24 08:09:52 -0800 (Wed, 24 Jan 2018)

Log Message

[GTK] Fix some test failures in ATK selection handling.
https://bugs.webkit.org/show_bug.cgi?id=168369
<rdar://problem/30534881>

Reviewed by Joanmarie Diggs.

Source/WebCore:

In r208479, selectionBelongsToObject was changed to return false if the
intersectsNode call returns an exception.

In particular, this caused accessibility/gtk/text-at-offset-textarea.html
to fail. In this test, the selection is situated in the shadow DOM of the
textarea, while the node that is checked for intersection is the textarea
itself. In line with the standard, intersectsNode returns an exception in
this case.

This caused webkitAccessibleText{Word, Line, Sentence}ForBoundary to stop
returning the expected text in the tested case. Removing this check fixes
the test, along with some others.

Tests: accessibility/gtk/text-at-offset-textarea.html
       accessibility/gtk/text-at-offset-textinput.html
       accessibility/selected-text-range-aria-elements.html
       accessibility/textarea-selected-text-range.html

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getSelectionOffsetsForObject): Remove the selectionBelongsToObject() call.

LayoutTests:

Update test expectations for tests that pass again.

* platform/gtk/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (227522 => 227523)


--- trunk/LayoutTests/ChangeLog	2018-01-24 15:57:58 UTC (rev 227522)
+++ trunk/LayoutTests/ChangeLog	2018-01-24 16:09:52 UTC (rev 227523)
@@ -1,3 +1,15 @@
+2018-01-24  Ms2ger  <[email protected]>
+
+        [GTK] Fix some test failures in ATK selection handling.
+        https://bugs.webkit.org/show_bug.cgi?id=168369
+        <rdar://problem/30534881>
+
+        Reviewed by Joanmarie Diggs.
+
+        Update test expectations for tests that pass again.
+
+        * platform/gtk/TestExpectations:
+
 2018-01-24  Manuel Rego Casasnovas  <[email protected]>
 
         Update paths of CSS tests from WPT

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (227522 => 227523)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2018-01-24 15:57:58 UTC (rev 227522)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2018-01-24 16:09:52 UTC (rev 227523)
@@ -2935,8 +2935,6 @@
 webkit.org/b/151267 imported/blink/svg/filters/feDropShadow-linearrgb-flood-color.svg [ ImageOnlyFailure ]
 webkit.org/b/151267 imported/blink/webexposed/webkit-focus-ring-exposed-to-quirks-mode.html [ ImageOnlyFailure ]
 
-webkit.org/b/152057 accessibility/textarea-selected-text-range.html [ Failure Timeout ]
-
 webkit.org/b/152788 imported/mozilla/svg/filter-scaled-02.html [ ImageOnlyFailure Pass ]
 
 webkit.org/b/152821 imported/w3c/css/css-multicol-1/multicol-basic-001.html [ ImageOnlyFailure ]
@@ -3079,10 +3077,7 @@
 
 webkit.org/b/168192 http/tests/media/hls/video-duration-accessibility.html [ Timeout Failure ]
 
-webkit.org/b/168369 accessibility/gtk/text-at-offset-textarea.html [ Failure ]
-webkit.org/b/168369 accessibility/gtk/text-at-offset-textinput.html [ Failure ]
 webkit.org/b/168370 accessibility/hidden-th-still-column-header.html [ Failure ]
-webkit.org/b/168370 accessibility/selected-text-range-aria-elements.html [ Failure ]
 
 webkit.org/b/168373 fullscreen/video-controls-rtl.html [ Failure ]
 webkit.org/b/168373 media/media-preload-no-delay-loadevent.html [ Failure ]

Modified: trunk/Source/WebCore/ChangeLog (227522 => 227523)


--- trunk/Source/WebCore/ChangeLog	2018-01-24 15:57:58 UTC (rev 227522)
+++ trunk/Source/WebCore/ChangeLog	2018-01-24 16:09:52 UTC (rev 227523)
@@ -1,3 +1,32 @@
+2018-01-24  Ms2ger  <[email protected]>
+
+        [GTK] Fix some test failures in ATK selection handling.
+        https://bugs.webkit.org/show_bug.cgi?id=168369
+        <rdar://problem/30534881>
+
+        Reviewed by Joanmarie Diggs.
+
+        In r208479, selectionBelongsToObject was changed to return false if the
+        intersectsNode call returns an exception.
+
+        In particular, this caused accessibility/gtk/text-at-offset-textarea.html
+        to fail. In this test, the selection is situated in the shadow DOM of the
+        textarea, while the node that is checked for intersection is the textarea
+        itself. In line with the standard, intersectsNode returns an exception in
+        this case.
+
+        This caused webkitAccessibleText{Word, Line, Sentence}ForBoundary to stop
+        returning the expected text in the tested case. Removing this check fixes
+        the test, along with some others.
+
+        Tests: accessibility/gtk/text-at-offset-textarea.html
+               accessibility/gtk/text-at-offset-textinput.html
+               accessibility/selected-text-range-aria-elements.html
+               accessibility/textarea-selected-text-range.html
+
+        * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
+        (getSelectionOffsetsForObject): Remove the selectionBelongsToObject() call.
+
 2018-01-18  Sergio Villar Senin  <[email protected]>
 
         [WebVR] Add OpenVR to the tree and to the build

Modified: trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp (227522 => 227523)


--- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp	2018-01-24 15:57:58 UTC (rev 227522)
+++ trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp	2018-01-24 16:09:52 UTC (rev 227523)
@@ -391,13 +391,6 @@
     Position firstValidPosition = firstPositionInOrBeforeNode(node->firstDescendant());
     Position lastValidPosition = lastPositionInOrAfterNode(node->lastDescendant());
 
-    // Early return with proper values if the selection falls entirely out of the object.
-    if (!selectionBelongsToObject(coreObject, selection)) {
-        startOffset = comparePositions(selection.start(), firstValidPosition) <= 0 ? 0 : accessibilityObjectLength(coreObject);
-        endOffset = startOffset;
-        return;
-    }
-
     // Find the proper range for the selection that falls inside the object.
     Position nodeRangeStart = selection.start();
     if (comparePositions(nodeRangeStart, firstValidPosition) < 0)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to