Bug 225303

Summary: Fix for assert crash in AXObjectCache::visiblePositionForTextMarkerData.
Product: WebKit Reporter: Andres Gonzalez <andresg_22>
Component: AccessibilityAssignee: Andres Gonzalez <andresg_22>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Andres Gonzalez 2021-05-03 07:17:16 PDT
Fix for assert crash in AXObjectCache::visiblePositionForTextMarkerData.
Comment 1 Radar WebKit Bug Importer 2021-05-03 07:17:25 PDT
<rdar://problem/77453921>
Comment 2 Andres Gonzalez 2021-05-03 07:29:53 PDT
ASSERTION FAILED: !m_anchorNode || !m_anchorNode->isPseudoElement()
./dom/Position.cpp(123) : WebCore::Position::Position(WebCore::Node *, WebCore::Position::AnchorType)
1   0x532f16f39 WTFCrash
2   0x543c0587b WTFCrashWithInfo(int, char const*, char const*, int)
3   0x546c85e3c WebCore::Position::Position(WebCore::Node*, WebCore::Position::AnchorType)
4   0x546c85f63 WebCore::Position::Position(WebCore::Node*, WebCore::Position::AnchorType)
5   0x544939e23 WebCore::positionBeforeNode(WebCore::Node*)
6   0x546c8a27b WebCore::PositionIterator::operator WebCore::Position() const
7   0x546c88aa1 WebCore::Position::upstream(WebCore::EditingBoundaryCrossingRule) const
8   0x546e78ca9 WebCore::VisiblePosition::canonicalPosition(WebCore::Position const&)
9   0x546e78b48 WebCore::VisiblePosition::VisiblePosition(WebCore::Position const&, WebCore::Affinity)
10  0x546e7926c WebCore::VisiblePosition::VisiblePosition(WebCore::Position const&, WebCore::Affinity)
11  0x5462ed28a WebCore::AXObjectCache::visiblePositionForTextMarkerData(WebCore::TextMarkerData&)
12  0x54431a439 WebCore::visiblePositionForTextMarker(WebCore::AXObjectCache*, __AXTextMarker const*)
13  0x54431a5e1 WebCore::visiblePositionRangeForTextMarkerRange(WebCore::AXObjectCache*, __AXTextMarkerRange const*)
14  0x548b2e36a -[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]::$_39::operator()() const
15  0x548b2e2f8 void WebCore::Accessibility::performFunctionOnMainThread<-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]::$_39>(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]::$_39&&)::'lambda'()::operator()() const
16  0x548b2e299 WTF::Detail::CallableWrapper<void WebCore::Accessibility::performFunctionOnMainThread<-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]::$_39>(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]::$_39&&)::'lambda'(), void>::call()
17  0x532f3e482 WTF::Function<void ()>::operator()() const
18  0x532f7ead8 void WTF::callOnMainAndWait<(WTF::MainStyle)0>(WTF::Function<void ()>&&)
19  0x532f7ea7d WTF::callOnMainThreadAndWait(WTF::Function<void ()>&&)
20  0x548b1aede void WebCore::Accessibility::performFunctionOnMainThread<-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]::$_39>(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]::$_39&&)
21  0x548b1a45d -[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]
22  0x548b2db13 -[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]::$_38::operator()() const
23  0x548b2d9b9 WTF::Detail::CallableWrapper<-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]::$_38, void>::call()
Comment 3 Andres Gonzalez 2021-05-03 07:46:06 PDT
Created attachment 427556 [details]
Patch
Comment 4 chris fleizach 2021-05-03 09:32:19 PDT
Comment on attachment 427556 [details]
Patch

can a test be added that would hit this on the debug servers? or do those not run tests?
Comment 5 Andres Gonzalez 2021-05-07 10:04:59 PDT
Created attachment 428006 [details]
Patch
Comment 6 Andres Gonzalez 2021-05-10 08:07:24 PDT
Created attachment 428170 [details]
Patch
Comment 7 EWS 2021-05-10 12:50:27 PDT
Committed r277286 (237550@main): <https://commits.webkit.org/237550@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 428170 [details].