Bug 202901

Summary: Chromium test-case asserts with ASSERTION FAILED: anchorType() == PositionIsOffsetInAnchor
Product: WebKit Reporter: Emilio Cobos Álvarez (:emilio) <emilio>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: 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:03:52 PDT
On master (247b0314320d499ae788b6ea993aa1d98e2d607e / r250962), WebKitGTK build.

Running this test-case: https://cs.chromium.org/chromium/src/third_party/blink/web_tests/editing/execCommand/remove-foramt-mixed-editable-crash.html?rcl=753caf715d8f30f0c673f1b4b36dadfc75c3201f

(Yeah, the test name has a typo, foramt rather than format)

Asserts like:

ASSERTION FAILED: anchorType() == PositionIsOffsetInAnchor
../../Source/WebCore/dom/Position.h(94) : int WebCore::Position::offsetInContainerNode() const
1   0x7fccbeb993d3 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18(WTFCrash+0x9) [0x7fccbeb993d3]
2   0x7fccca8425f2 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN3WTF15CrashOnOverflow10overflowedEv+0) [0x7fccca8425f2]
3   0x7fcccc67eaa8 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZNK7WebCore8Position21offsetInContainerNodeEv+0x4a) [0x7fcccc67eaa8]
4   0x7fccce420877 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore17ApplyStyleCommand17removeInlineStyleERNS_12EditingStyleERKNS_8PositionES5_+0x737) [0x7fccce420877]
5   0x7fccce41db29 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore17ApplyStyleCommand16applyInlineStyleERNS_12EditingStyleE+0x867) [0x7fccce41db29]
6   0x7fccce41b07a /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore17ApplyStyleCommand7doApplyEv+0x124) [0x7fccce41b07a]
7   0x7fccce42617e /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore20CompositeEditCommand23applyCommandToCompositeEON3WTF3RefINS_11EditCommandENS1_13DumbPtrTraitsIS3_EEEE+0x4a) [0x7fccce42617e]
8   0x7fcccce3c279 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore19RemoveFormatCommand7doApplyEv+0xff) [0x7fcccce3c279]
9   0x7fccce425cd3 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore20CompositeEditCommand5applyEv+0xf5) [0x7fccce425cd3]
10  0x7fccccdf7a14 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore6Editor24removeFormattingAndStyleEv+0x3e) [0x7fccccdf7a14]
11  0x7fcccce0b465 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(+0xcba4465) [0x7fcccce0b465]
12  0x7fcccce0d62a /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZNK7WebCore6Editor7Command7executeERKN3WTF6StringEPNS_5EventE+0xdc) [0x7fcccce0d62a]
13  0x7fccccbf8268 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore8Document11execCommandERKN3WTF6StringEbS4_+0x56) [0x7fccccbf8268]
14  0x7fcccb906694 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(+0xb69f694) [0x7fcccb906694]
15  0x7fcccb9201b6 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(+0xb6b91b6) [0x7fcccb9201b6]
16  0x7fcccb906702 /home/emilio/src/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore38jsDocumentPrototypeFunctionExecCommandEPN3JSC14JSGlobalObjectEPNS0_9CallFrameE+0x23) [0x7fcccb906702]
17  0x7fcc691ce16b [0x7fcc691ce16b]
Comment 1 Radar WebKit Bug Importer 2019-10-14 17:24:49 PDT
<rdar://problem/56271317>
Comment 2 EWS 2022-12-06 01:00:33 PST
Committed 257399@main (919c3b81c047): <https://commits.webkit.org/257399@main>

Reviewed commits have been landed. Closing PR #7112 and removing active labels.