Changeset 227523 in webkit


Ignore:
Timestamp:
Jan 24, 2018 8:09:52 AM (6 years ago)
Author:
Ms2ger@igalia.com
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:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r227521 r227523  
     12018-01-24  Ms2ger  <Ms2ger@igalia.com>
     2
     3        [GTK] Fix some test failures in ATK selection handling.
     4        https://bugs.webkit.org/show_bug.cgi?id=168369
     5        <rdar://problem/30534881>
     6
     7        Reviewed by Joanmarie Diggs.
     8
     9        Update test expectations for tests that pass again.
     10
     11        * platform/gtk/TestExpectations:
     12
    1132018-01-24  Manuel Rego Casasnovas  <rego@igalia.com>
    214
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r227521 r227523  
    29362936webkit.org/b/151267 imported/blink/webexposed/webkit-focus-ring-exposed-to-quirks-mode.html [ ImageOnlyFailure ]
    29372937
    2938 webkit.org/b/152057 accessibility/textarea-selected-text-range.html [ Failure Timeout ]
    2939 
    29402938webkit.org/b/152788 imported/mozilla/svg/filter-scaled-02.html [ ImageOnlyFailure Pass ]
    29412939
     
    30803078webkit.org/b/168192 http/tests/media/hls/video-duration-accessibility.html [ Timeout Failure ]
    30813079
    3082 webkit.org/b/168369 accessibility/gtk/text-at-offset-textarea.html [ Failure ]
    3083 webkit.org/b/168369 accessibility/gtk/text-at-offset-textinput.html [ Failure ]
    30843080webkit.org/b/168370 accessibility/hidden-th-still-column-header.html [ Failure ]
    3085 webkit.org/b/168370 accessibility/selected-text-range-aria-elements.html [ Failure ]
    30863081
    30873082webkit.org/b/168373 fullscreen/video-controls-rtl.html [ Failure ]
  • trunk/Source/WebCore/ChangeLog

    r227518 r227523  
     12018-01-24  Ms2ger  <Ms2ger@igalia.com>
     2
     3        [GTK] Fix some test failures in ATK selection handling.
     4        https://bugs.webkit.org/show_bug.cgi?id=168369
     5        <rdar://problem/30534881>
     6
     7        Reviewed by Joanmarie Diggs.
     8
     9        In r208479, selectionBelongsToObject was changed to return false if the
     10        intersectsNode call returns an exception.
     11
     12        In particular, this caused accessibility/gtk/text-at-offset-textarea.html
     13        to fail. In this test, the selection is situated in the shadow DOM of the
     14        textarea, while the node that is checked for intersection is the textarea
     15        itself. In line with the standard, intersectsNode returns an exception in
     16        this case.
     17
     18        This caused webkitAccessibleText{Word, Line, Sentence}ForBoundary to stop
     19        returning the expected text in the tested case. Removing this check fixes
     20        the test, along with some others.
     21
     22        Tests: accessibility/gtk/text-at-offset-textarea.html
     23               accessibility/gtk/text-at-offset-textinput.html
     24               accessibility/selected-text-range-aria-elements.html
     25               accessibility/textarea-selected-text-range.html
     26
     27        * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
     28        (getSelectionOffsetsForObject): Remove the selectionBelongsToObject() call.
     29
    1302018-01-18  Sergio Villar Senin  <svillar@igalia.com>
    231
  • trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp

    r224074 r227523  
    392392    Position lastValidPosition = lastPositionInOrAfterNode(node->lastDescendant());
    393393
    394     // Early return with proper values if the selection falls entirely out of the object.
    395     if (!selectionBelongsToObject(coreObject, selection)) {
    396         startOffset = comparePositions(selection.start(), firstValidPosition) <= 0 ? 0 : accessibilityObjectLength(coreObject);
    397         endOffset = startOffset;
    398         return;
    399     }
    400 
    401394    // Find the proper range for the selection that falls inside the object.
    402395    Position nodeRangeStart = selection.start();
Note: See TracChangeset for help on using the changeset viewer.