Title: [244105] trunk
Revision
244105
Author
[email protected]
Date
2019-04-10 00:59:14 -0700 (Wed, 10 Apr 2019)

Log 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:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (244104 => 244105)


--- trunk/LayoutTests/ChangeLog	2019-04-10 07:22:52 UTC (rev 244104)
+++ trunk/LayoutTests/ChangeLog	2019-04-10 07:59:14 UTC (rev 244105)
@@ -1,3 +1,16 @@
+2019-04-10  Carlos Garcia Campos  <[email protected]>
+
+        [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.
+
+        Update the test to expect the whole content text on atk and remove the test expectations.
+
+        * accessibility/insert-children-assert.html:
+        * platform/gtk/TestExpectations:
+
 2019-04-09  John Wilander  <[email protected]>
 
         Add Resource Load Statistics test case for Ping

Modified: trunk/LayoutTests/accessibility/insert-children-assert.html (244104 => 244105)


--- trunk/LayoutTests/accessibility/insert-children-assert.html	2019-04-10 07:22:52 UTC (rev 244104)
+++ trunk/LayoutTests/accessibility/insert-children-assert.html	2019-04-10 07:59:14 UTC (rev 244105)
@@ -27,7 +27,11 @@
 
     if ("webkitRequestFullScreen" in Element.prototype) {
         var content = accessibilityController.accessibleElementById("content");
-        var value = "AXValue: d";
+        var value;
+        if (accessibilityController.platformName == "atk")
+            value = "AXValue: ab<\\n>c<\\n>de<\\n>";
+        else
+            value = "AXValue: d";
         document.body.offsetTop;
         var span = document.getElementsByTagName('span')[0];
 

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (244104 => 244105)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2019-04-10 07:22:52 UTC (rev 244104)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2019-04-10 07:59:14 UTC (rev 244105)
@@ -1287,8 +1287,6 @@
 
 webkit.org/b/163782 media/video-played-ranges-1.html [ Crash Pass Failure ]
 
-webkit.org/b/172281 accessibility/insert-children-assert.html [ Crash ]
-
 webkit.org/b/172955 media/video-preload.html [ Crash Pass ]
 
 webkit.org/b/175575 imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay-with-slow-text-tracks.html [ Crash Pass ]

Modified: trunk/Source/WebCore/ChangeLog (244104 => 244105)


--- trunk/Source/WebCore/ChangeLog	2019-04-10 07:22:52 UTC (rev 244104)
+++ trunk/Source/WebCore/ChangeLog	2019-04-10 07:59:14 UTC (rev 244105)
@@ -1,3 +1,21 @@
+2019-04-10  Carlos Garcia Campos  <[email protected]>
+
+        [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.
+
+        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):
+
 2019-04-09  Keith Rollin  <[email protected]>
 
         Unreviewed build maintenance -- update .xcfilelists.

Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (244104 => 244105)


--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2019-04-10 07:22:52 UTC (rev 244104)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2019-04-10 07:59:14 UTC (rev 244105)
@@ -640,10 +640,7 @@
             // defining one based in the two external positions defining the boundaries of the subtree.
             RenderObject* firstChildRenderer = m_renderer->firstChildSlow();
             RenderObject* lastChildRenderer = m_renderer->lastChildSlow();
-            if (firstChildRenderer && lastChildRenderer) {
-                ASSERT(firstChildRenderer->node());
-                ASSERT(lastChildRenderer->node());
-
+            if (firstChildRenderer && firstChildRenderer->node() && lastChildRenderer && lastChildRenderer->node()) {
                 // We define the start and end positions for the range as the ones right before and after
                 // the first and the last nodes in the DOM tree that is wrapped inside the anonymous block.
                 Node* firstNodeInBlock = firstChildRenderer->node();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to