<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[286052] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/286052">286052</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2021-11-19 01:01:37 -0800 (Fri, 19 Nov 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>REGRESSION(<a href="http://trac.webkit.org/projects/webkit/changeset/285859">r285859</a>) [GTK][WPE] a number of accessibility/* tests crash on GTK and WPE
https://bugs.webkit.org/show_bug.cgi?id=233221

Patch by Arcady Goldmints-Orlov <agoldmints@igalia.com> on 2021-11-19
Reviewed by Carlos Garcia Campos.

Tools:

Add null checks in the ATK code to ensure AccessibilityUIElement::create()
is not passed a NULL pointer.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
(WTR::AccessibilityController::focusedElement):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::getChildren):
(WTR::AccessibilityUIElement::getChildrenWithRange):

LayoutTests:

* platform/glib/TestExpectations:
* platform/glib/accessibility/add-children-pseudo-element-expected.txt:
* platform/glib/accessibility/aria-modal-text-descendants-expected.txt: Added.
* platform/glib/accessibility/table-cell-display-block-expected.txt: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformglibTestExpectations">trunk/LayoutTests/platform/glib/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformglibaccessibilityaddchildrenpseudoelementexpectedtxt">trunk/LayoutTests/platform/glib/accessibility/add-children-pseudo-element-expected.txt</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityControllerAtkcpp">trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp">trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformglibaccessibilityariamodaltextdescendantsexpectedtxt">trunk/LayoutTests/platform/glib/accessibility/aria-modal-text-descendants-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformglibaccessibilitytablecelldisplayblockexpectedtxt">trunk/LayoutTests/platform/glib/accessibility/table-cell-display-block-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (286051 => 286052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2021-11-19 08:54:33 UTC (rev 286051)
+++ trunk/LayoutTests/ChangeLog 2021-11-19 09:01:37 UTC (rev 286052)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2021-11-19  Arcady Goldmints-Orlov  <agoldmints@igalia.com>
+
+        REGRESSION(r285859) [GTK][WPE] a number of accessibility/* tests crash on GTK and WPE
+        https://bugs.webkit.org/show_bug.cgi?id=233221
+
+        Reviewed by Carlos Garcia Campos.
+
+        * platform/glib/TestExpectations:
+        * platform/glib/accessibility/add-children-pseudo-element-expected.txt:
+        * platform/glib/accessibility/aria-modal-text-descendants-expected.txt: Added.
+        * platform/glib/accessibility/table-cell-display-block-expected.txt: Added.
+
</ins><span class="cx"> 2021-11-18  Frédéric Wang  <fwang@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         Nullptr crash in SimplifiedBackwardsTextIterator::range() via previousSentencePosition
</span></span></pre></div>
<a id="trunkLayoutTestsplatformglibTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/glib/TestExpectations (286051 => 286052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/glib/TestExpectations 2021-11-19 08:54:33 UTC (rev 286051)
+++ trunk/LayoutTests/platform/glib/TestExpectations    2021-11-19 09:01:37 UTC (rev 286052)
</span><span class="lines">@@ -2013,7 +2013,7 @@
</span><span class="cx"> webkit.org/b/160248 fast/text/synthetic-bold-transformed.html [ ImageOnlyFailure ]
</span><span class="cx"> webkit.org/b/160248 fast/text/trailing-word-detection.html [ Failure ]
</span><span class="cx"> webkit.org/b/160249 fast/shrink-wrap/rect-shrink-wrap.html [ ImageOnlyFailure ]
</span><del>-webkit.org/b/161583 accessibility/auto-fill-types.html [ Failure ]
</del><ins>+webkit.org/b/161583 accessibility/auto-fill-types.html [ Timeout ]
</ins><span class="cx"> webkit.org/b/161589 css3/masking/mask-repeat-space-padding.html [ ImageOnlyFailure ]
</span><span class="cx"> webkit.org/b/162815 fast/text/variations/font-face-clamp.html [ ImageOnlyFailure ]
</span><span class="cx"> webkit.org/b/162815 fast/text/variations/font-selection-properties.html [ ImageOnlyFailure ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformglibaccessibilityaddchildrenpseudoelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/glib/accessibility/add-children-pseudo-element-expected.txt (286051 => 286052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/glib/accessibility/add-children-pseudo-element-expected.txt   2021-11-19 08:54:33 UTC (rev 286051)
+++ trunk/LayoutTests/platform/glib/accessibility/add-children-pseudo-element-expected.txt      2021-11-19 09:01:37 UTC (rev 286052)
</span><span class="lines">@@ -1,4 +1,3 @@
</span><del>-Language Email
</del><span class="cx"> Make sure that we are updating the render block flow element's children correctly.
</span><span class="cx"> 
</span><span class="cx"> On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
</span><span class="lines">@@ -5,7 +4,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> PASS element.childrenCount is 2
</span><del>-PASS element.childrenCount is 1
</del><ins>+PASS element.childrenCount === 1
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsplatformglibaccessibilityariamodaltextdescendantsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/glib/accessibility/aria-modal-text-descendants-expected.txt (0 => 286052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/glib/accessibility/aria-modal-text-descendants-expected.txt                           (rev 0)
+++ trunk/LayoutTests/platform/glib/accessibility/aria-modal-text-descendants-expected.txt      2021-11-19 09:01:37 UTC (rev 286052)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+This tests text descendants of modal dialog are accessible.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS backgroundAccessible() is false
+FAIL text.isIgnored should be false. Threw exception TypeError: null is not an object (evaluating 'text.isIgnored')
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Other page content with a dummy focusable element
+
+Display a dialog
+
+Just an example.
+
+text
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformglibaccessibilitytablecelldisplayblockexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/glib/accessibility/table-cell-display-block-expected.txt (0 => 286052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/glib/accessibility/table-cell-display-block-expected.txt                              (rev 0)
+++ trunk/LayoutTests/platform/glib/accessibility/table-cell-display-block-expected.txt 2021-11-19 09:01:37 UTC (rev 286052)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+This tests that if a table cell uses display:block, the table cell will still be accessible
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS cell1a.isEqual(cell1b) is true
+PASS cell1a.role is 'AXRole: AXCell'
+PASS domCell1.style.display is 'block'
+PASS table2.role is 'AXRole: AXGroup'
+FAIL cell2.role == 'AXRole: AXCell' should be false. Threw exception TypeError: null is not an object (evaluating 'cell2.role')
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (286051 => 286052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2021-11-19 08:54:33 UTC (rev 286051)
+++ trunk/Tools/ChangeLog       2021-11-19 09:01:37 UTC (rev 286052)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2021-11-19  Arcady Goldmints-Orlov  <agoldmints@igalia.com>
+
+        REGRESSION(r285859) [GTK][WPE] a number of accessibility/* tests crash on GTK and WPE
+        https://bugs.webkit.org/show_bug.cgi?id=233221
+
+        Reviewed by Carlos Garcia Campos.
+
+        Add null checks in the ATK code to ensure AccessibilityUIElement::create()
+        is not passed a NULL pointer.
+
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
+        (WTR::AccessibilityController::focusedElement):
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        (WTR::AccessibilityUIElement::getChildren):
+        (WTR::AccessibilityUIElement::getChildrenWithRange):
+
</ins><span class="cx"> 2021-11-19  Carlos Garcia Campos  <cgarcia@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         [GTK][a11y] Add implementation of hyperlink interface when building with ATSPI
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityControllerAtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp (286051 => 286052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp   2021-11-19 08:54:33 UTC (rev 286051)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp      2021-11-19 09:01:37 UTC (rev 286052)
</span><span class="lines">@@ -117,6 +117,9 @@
</span><span class="cx">     WKBundlePageRef page = InjectedBundle::singleton().page()->page();
</span><span class="cx">     void* root = WKAccessibilityFocusedObject(page);
</span><span class="cx"> 
</span><ins>+    if (!ATK_IS_OBJECT(root))
+        return nullptr;
+
</ins><span class="cx">     return AccessibilityUIElement::create(static_cast<AtkObject*>(root));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (286051 => 286052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp    2021-11-19 08:54:33 UTC (rev 286051)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp       2021-11-19 09:01:37 UTC (rev 286052)
</span><span class="lines">@@ -745,6 +745,10 @@
</span><span class="cx">     int count = childrenCount();
</span><span class="cx">     for (int i = 0; i < count; i++) {
</span><span class="cx">         GRefPtr<AtkObject> child = adoptGRef(atk_object_ref_accessible_child(ATK_OBJECT(m_element.get()), i));
</span><ins>+
+        if (!ATK_IS_OBJECT(child.get()))
+            continue;
+
</ins><span class="cx">         children.append(AccessibilityUIElement::create(child.get()));
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -756,6 +760,10 @@
</span><span class="cx">     unsigned end = location + length;
</span><span class="cx">     for (unsigned i = location; i < end; i++) {
</span><span class="cx">         GRefPtr<AtkObject> child = adoptGRef(atk_object_ref_accessible_child(ATK_OBJECT(m_element.get()), i));
</span><ins>+
+        if (!ATK_IS_OBJECT(child.get()))
+            continue;
+
</ins><span class="cx">         children.append(AccessibilityUIElement::create(child.get()));
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>