Changeset 244105 in webkit


Ignore:
Timestamp:
Apr 10, 2019 12:59:14 AM (5 years ago)
Author:
Carlos Garcia Campos
Message:

[ATK] Test accessibility/insert-children-assert.html is crashing since added in r216980
https://bugs.webkit.org/show_bug.cgi?id=172281
<rdar://problem/37030990>

Reviewed by Joanmarie Diggs.

Source/WebCore:

The crash happens because at some point the test tries to get the anonymous block text, getting the RenderText as
first child and RenderFullScreen as last child and the latter doesn't have a node. This is because in atk we do
things differently, we don't include the static text elements individually, but parent element uses
textUnderElement() to get all the pieces together. We can just turn the asserts into actual nullptr checks.

Fixes: accessibility/insert-children-assert.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::textUnderElement const):

LayoutTests:

Update the test to expect the whole content text on atk and remove the test expectations.

  • accessibility/insert-children-assert.html:
  • platform/gtk/TestExpectations:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r244101 r244105  
     12019-04-10  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [ATK] Test accessibility/insert-children-assert.html is crashing since added in r216980
     4        https://bugs.webkit.org/show_bug.cgi?id=172281
     5        <rdar://problem/37030990>
     6
     7        Reviewed by Joanmarie Diggs.
     8
     9        Update the test to expect the whole content text on atk and remove the test expectations.
     10
     11        * accessibility/insert-children-assert.html:
     12        * platform/gtk/TestExpectations:
     13
    1142019-04-09  John Wilander  <wilander@apple.com>
    215
  • trunk/LayoutTests/accessibility/insert-children-assert.html

    r217171 r244105  
    2828    if ("webkitRequestFullScreen" in Element.prototype) {
    2929        var content = accessibilityController.accessibleElementById("content");
    30         var value = "AXValue: d";
     30        var value;
     31        if (accessibilityController.platformName == "atk")
     32            value = "AXValue: ab<\\n>c<\\n>de<\\n>";
     33        else
     34            value = "AXValue: d";
    3135        document.body.offsetTop;
    3236        var span = document.getElementsByTagName('span')[0];
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r243841 r244105  
    12881288webkit.org/b/163782 media/video-played-ranges-1.html [ Crash Pass Failure ]
    12891289
    1290 webkit.org/b/172281 accessibility/insert-children-assert.html [ Crash ]
    1291 
    12921290webkit.org/b/172955 media/video-preload.html [ Crash Pass ]
    12931291
  • trunk/Source/WebCore/ChangeLog

    r244100 r244105  
     12019-04-10  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [ATK] Test accessibility/insert-children-assert.html is crashing since added in r216980
     4        https://bugs.webkit.org/show_bug.cgi?id=172281
     5        <rdar://problem/37030990>
     6
     7        Reviewed by Joanmarie Diggs.
     8
     9        The crash happens because at some point the test tries to get the anonymous block text, getting the RenderText as
     10        first child and RenderFullScreen as last child and the latter doesn't have a node. This is because in atk we do
     11        things differently, we don't include the static text elements individually, but parent element uses
     12        textUnderElement() to get all the pieces together. We can just turn the asserts into actual nullptr checks.
     13
     14        Fixes: accessibility/insert-children-assert.html
     15
     16        * accessibility/AccessibilityRenderObject.cpp:
     17        (WebCore::AccessibilityRenderObject::textUnderElement const):
     18
    1192019-04-09  Keith Rollin  <krollin@apple.com>
    220
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r244061 r244105  
    641641            RenderObject* firstChildRenderer = m_renderer->firstChildSlow();
    642642            RenderObject* lastChildRenderer = m_renderer->lastChildSlow();
    643             if (firstChildRenderer && lastChildRenderer) {
    644                 ASSERT(firstChildRenderer->node());
    645                 ASSERT(lastChildRenderer->node());
    646 
     643            if (firstChildRenderer && firstChildRenderer->node() && lastChildRenderer && lastChildRenderer->node()) {
    647644                // We define the start and end positions for the range as the ones right before and after
    648645                // the first and the last nodes in the DOM tree that is wrapped inside the anonymous block.
Note: See TracChangeset for help on using the changeset viewer.