Test accessibility/insert-children-assert.html is crashing since added in r216980
Backtrace: STDERR: ASSERTION FAILED: lastChildRenderer->node() STDERR: /Source/WebCore/accessibility/AccessibilityRenderObject.cpp(644) : virtual WTF::String WebCore::AccessibilityRenderObject::textUnderElement(WebCore::AccessibilityTextUnderElementMode) const STDERR: 1 0x7f20190684ab /WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18(WTFCrash+0x1e) [0x7f20190684ab] STDERR: 2 0x7f2026b7b2e9 /WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::AccessibilityRenderObject::textUnderElement(WebCore::AccessibilityTextUnderElementMode) const+0x301) [0x7f2026b7b2e9] STDERR: 3 0x7f2026bc9fd1 /WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(+0x93c8fd1) [0x7f2026bc9fd1] STDERR: 4 0x7f1fc5a23a07 /WebKitBuild/Debug/lib/libTestRunnerInjectedBundle.so(WTR::AccessibilityUIElement::stringValue()+0xef) [0x7f1fc5a23a07] STDERR: 5 0x7f1fc5a0a42e /WebKitBuild/Debug/lib/libTestRunnerInjectedBundle.so(WTR::JSAccessibilityUIElement::stringValue(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const**)+0x6a) [0x7f1fc5a0a42e] STDERR: 6 0x7f2017f13280 /WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18(JSC::JSCallbackObject<JSC::JSDestructibleObject>::getStaticValue(JSC::ExecState*, JSC::PropertyName)+0x1c2) [0x7f2017f13280] STDERR: 7 0x7f2017f0acf2 /WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18(JSC::JSCallbackObject<JSC::JSDestructibleObject>::getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&)+0x498) [0x7f2017f0acf2] STDERR: 8 0x7f2025904798 /WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(JSC::JSObject::getNonIndexPropertySlot(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&)+0x1c6) [0x7f2025904798] STDERR: 9 0x7f2025903ea4 /WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(JSC::JSObject::getPropertySlot(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&)+0xd8) [0x7f2025903ea4] STDERR: 10 0x7f20185bf387 /WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18(JSC::JSValue::getPropertySlot(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&) const+0x1e9) [0x7f20185bf387] STDERR: 11 0x7f20185bf0e2 /WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18(JSC::JSValue::get(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&) const+0xac) [0x7f20185bf0e2] STDERR: 12 0x7f2018ab7b36 /WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18(+0x27fcb36) [0x7f2018ab7b36] STDERR: 13 0x7f2018aae742 /WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18(+0x27f3742) [0x7f2018aae742] STDERR: LEAK: 1 WebPageProxy
<rdar://problem/37030990>
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 thing differently, we don't include the static text elements individually, and parent element uses textUnderElement() to get all the pieces together. I think we could just turn the asserts into actual null checks. That won't fix the test (because it expects the mac behavior of having static text nodes in the tree), but at least it won't crash.
Created attachment 367036 [details] Patch
Committed r244105: <https://trac.webkit.org/changeset/244105>