Bug 202905

Summary: Chromium test-case asserts with ASSERTION FAILED: node->parentNode() in editing code.
Product: WebKit Reporter: Emilio Cobos Álvarez (:emilio) <emilio>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Emilio Cobos Álvarez (:emilio) 2019-10-13 14:22:34 PDT
On master (247b0314320d499ae788b6ea993aa1d98e2d607e / r250962), WebKitGTK build.

Running this test-case:

 * https://cs.chromium.org/chromium/src/third_party/blink/web_tests/editing/execCommand/indent-table-cell-crash.html?rcl=753caf715d8f30f0c673f1b4b36dadfc75c3201f

Asserts like:

ASSERTION FAILED: node->parentNode()
../../Source/WebCore/dom/Position.h(274) : WebCore::Position WebCore::positionInParentAfterNode(const WebCore::Node*)
1   0x7f10b88b33d3 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18(WTFCrash+0x9) [0x7f10b88b33d3]
2   0x7f10c455c5f2 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN3WTF15CrashOnOverflow10overflowedEv+0) [0x7f10c455c5f2]
3   0x7f10c63fb78e /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore25positionInParentAfterNodeEPKNS_4NodeE+0x50) [0x7f10c63fb78e]
4   0x7f10c6b35e83 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore20IndentOutdentCommand20indentIntoBlockquoteERKNS_8PositionES3_RN3WTF6RefPtrINS_7ElementENS4_13DumbPtrTraitsIS6_EEEE+0x2cb) [0x7f10c6b35e83]
5   0x7f10c6b3706c /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore20IndentOutdentCommand11formatRangeERKNS_8PositionES3_S3_RN3WTF6RefPtrINS_7ElementENS4_13DumbPtrTraitsIS6_EEEE+0x62) [0x7f10c6b3706c]
6   0x7f10c8132f12 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore24ApplyBlockElementCommand15formatSelectionERKNS_15VisiblePositionES3_+0x9d8) [0x7f10c8132f12]
7   0x7f10c6b36fed /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore20IndentOutdentCommand15formatSelectionERKNS_15VisiblePositionES3_+0x39) [0x7f10c6b36fed]
8   0x7f10c813220a /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore24ApplyBlockElementCommand7doApplyEv+0x33a) [0x7f10c813220a]
9   0x7f10c813fcd3 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore20CompositeEditCommand5applyEv+0xf5) [0x7f10c813fcd3]
10  0x7f10c6b2368f /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(+0xcba268f) [0x7f10c6b2368f]
11  0x7f10c6b2762a /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZNK7WebCore6Editor7Command7executeERKN3WTF6StringEPNS_5EventE+0xdc) [0x7f10c6b2762a]
12  0x7f10c6912268 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore8Document11execCommandERKN3WTF6StringEbS4_+0x56) [0x7f10c6912268]
13  0x7f10c5620694 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(+0xb69f694) [0x7f10c5620694]
14  0x7f10c563a1b6 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(+0xb6b91b6) [0x7f10c563a1b6]
15  0x7f10c5620702 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore38jsDocumentPrototypeFunctionExecCommandEPN3JSC14JSGlobalObjectEPNS0_9CallFrameE+0x23) [0x7f10c5620702]
16  0x7f1062efa16b [0x7f1062efa16b]
Comment 1 Radar WebKit Bug Importer 2019-10-14 17:23:59 PDT
<rdar://problem/56271290>
Comment 2 Ahmad Saleem 2024-04-05 05:06:36 PDT
I am unable to reproduce this assert on WebKit ToT (277105@main) - Minibrowser WK2 Debug - https://jsfiddle.net/dgt051vL/ on macOS Sonoma 14.4.1.