Bug 232133

Summary: ASSERT(node) triggered after surroundNodeRangeWithElement for node without editable style
Product: WebKit Reporter: Gabriel Nava Marino <gnavamarino>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, mifenton, simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Gabriel Nava Marino 2021-10-21 23:28:24 PDT
There are cases where if the last styled node was not parent node of a current text node, but we wish to style the text node we will add a style span to surround the text node. We do this via createStyleSpanElement. However, in order to properly insert the span within the current node, it requires the parent node to have editable style and renderer.
Comment 1 Gabriel Nava Marino 2021-10-21 23:31:44 PDT
Created attachment 442127 [details]
Patch
Comment 2 Gabriel Nava Marino 2021-10-22 10:04:58 PDT
Created attachment 442173 [details]
Patch
Comment 3 Simon Fraser (smfr) 2021-10-22 10:20:05 PDT
Comment on attachment 442173 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=442173&action=review

> Source/WebCore/ChangeLog:7
> +

There should be an analysis of the bug and what you did to fix it here.
Comment 4 Gabriel Nava Marino 2021-10-22 10:38:09 PDT
(In reply to Simon Fraser (smfr) from comment #3)
> Comment on attachment 442173 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=442173&action=review
> 
> > Source/WebCore/ChangeLog:7
> > +
> 
> There should be an analysis of the bug and what you did to fix it here.

Thank you, I will add an analysis here.
Comment 5 Gabriel Nava Marino 2021-10-22 10:43:20 PDT
Created attachment 442180 [details]
Patch
Comment 6 Gabriel Nava Marino 2021-10-22 11:25:51 PDT
Created attachment 442182 [details]
Patch
Comment 7 EWS 2021-10-25 10:48:31 PDT
Committed r284792 (243501@main): <https://commits.webkit.org/243501@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442182 [details].
Comment 8 Radar WebKit Bug Importer 2021-10-25 10:49:22 PDT
<rdar://problem/84620978>