<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>239533</bug_id>
          
          <creation_ts>2022-04-20 02:05:15 -0700</creation_ts>
          <short_desc>ASSERTION FAILED: !m_insertChild-&gt;parentNode() on editing/inserting/insert-list-user-select-none-crash.html</short_desc>
          <delta_ts>2022-11-17 04:48:46 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>HTML Editing</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=123732</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=127341</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=121949</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=75845</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Nguyen (:ntim)">ntim</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1862860</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2022-04-20 02:05:15 -0700</bug_when>
    <thetext>This started crashing after r293028, but it&apos;s not a direct cause of that bug. You can also reproduce before r293028 by replacing `user-select: none;` in the test with `user-select: text`.

https://build.webkit.org/results/Apple-Monterey-Debug-AppleSilicon-WK1-Tests/r249767@main%20(2275)/results.html

stderr:
2022-04-19 12:29:55.919 DumpRenderTree[61599:138005588] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-04-19 12:29:55.919 DumpRenderTree[61599:138005588] nil host used in call to allowsAnyHTTPSCertificateForHost:
ASSERTION FAILED: !m_insertChild-&gt;parentNode()
./editing/InsertNodeBeforeCommand.cpp(43) : WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand(Ref&lt;WebCore::Node&gt; &amp;&amp;, WebCore::Node &amp;, WebCore::ShouldAssumeContentIsAlwaysEditable, WebCore::EditAction)
1   0x117fd3634 WTFCrash
2   0x121489d10 WebCore::JSDOMGlobalObject* JSC::jsCast&lt;WebCore::JSDOMGlobalObject*, JSC::JSGlobalObject&gt;(JSC::JSGlobalObject*)
3   0x1246ed70c WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand(WTF::Ref&lt;WebCore::Node, WTF::RawPtrTraits&lt;WebCore::Node&gt; &gt;&amp;&amp;, WebCore::Node&amp;, WebCore::ShouldAssumeContentIsAlwaysEditable, WebCore::EditAction)
4   0x1246ed850 WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand(WTF::Ref&lt;WebCore::Node, WTF::RawPtrTraits&lt;WebCore::Node&gt; &gt;&amp;&amp;, WebCore::Node&amp;, WebCore::ShouldAssumeContentIsAlwaysEditable, WebCore::EditAction)
5   0x124654c30 WebCore::InsertNodeBeforeCommand::create(WTF::Ref&lt;WebCore::Node, WTF::RawPtrTraits&lt;WebCore::Node&gt; &gt;&amp;&amp;, WebCore::Node&amp;, WebCore::ShouldAssumeContentIsAlwaysEditable, WebCore::EditAction)
6   0x12464f924 WebCore::CompositeEditCommand::insertNodeBefore(WTF::Ref&lt;WebCore::Node, WTF::RawPtrTraits&lt;WebCore::Node&gt; &gt;&amp;&amp;, WebCore::Node&amp;, WebCore::ShouldAssumeContentIsAlwaysEditable)
7   0x12470037c WebCore::RemoveNodePreservingChildrenCommand::doApply()
8   0x124653f2c WebCore::CompositeEditCommand::applyCommandToComposite(WTF::Ref&lt;WebCore::EditCommand, WTF::RawPtrTraits&lt;WebCore::EditCommand&gt; &gt;&amp;&amp;)
9   0x12464981c WebCore::CompositeEditCommand::removeNodePreservingChildren(WebCore::Node&amp;, WebCore::ShouldAssumeContentIsAlwaysEditable)
10  0x12470ba50 WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline(WebCore::ReplaceSelectionCommand::InsertedNodes&amp;)
11  0x12470f188 WebCore::ReplaceSelectionCommand::doApply()
12  0x124653f2c WebCore::CompositeEditCommand::applyCommandToComposite(WTF::Ref&lt;WebCore::EditCommand, WTF::RawPtrTraits&lt;WebCore::EditCommand&gt; &gt;&amp;&amp;)
13  0x124658c64 WebCore::CompositeEditCommand::moveParagraphs(WebCore::VisiblePosition const&amp;, WebCore::VisiblePosition const&amp;, WebCore::VisiblePosition const&amp;, bool, bool)
14  0x12465a08c WebCore::CompositeEditCommand::moveParagraph(WebCore::VisiblePosition const&amp;, WebCore::VisiblePosition const&amp;, WebCore::VisiblePosition const&amp;, bool, bool)
15  0x1246eccc4 WebCore::InsertListCommand::listifyParagraph(WebCore::VisiblePosition const&amp;, WebCore::QualifiedName const&amp;)
16  0x1246ebd44 WebCore::InsertListCommand::doApplyForSingleParagraph(bool, WebCore::HTMLQualifiedName const&amp;, WebCore::SimpleRange&amp;)
17  0x1246eb4f8 WebCore::InsertListCommand::doApply()
18  0x124641700 WebCore::CompositeEditCommand::apply()
19  0x1246d2f54 WebCore::executeInsertOrderedList(WebCore::Frame&amp;, WebCore::Event*, WebCore::EditorCommandSource, WTF::String const&amp;)
20  0x1246a8268 WebCore::Editor::Command::execute(WTF::String const&amp;, WebCore::Event*) const
21  0x12435496c WebCore::Document::execCommand(WTF::String const&amp;, bool, WTF::String const&amp;)
22  0x121955514 WebCore::jsDocumentPrototypeFunction_execCommandBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSDocument*)
23  0x121954ffc long long WebCore::IDLOperation&lt;WebCore::JSDocument&gt;::call&lt;&amp;(WebCore::jsDocumentPrototypeFunction_execCommandBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSDocument*)), (WebCore::CastedThisErrorBehavior)0&gt;(JSC::JSGlobalObject&amp;, JSC::CallFrame&amp;, char const*)
24  0x12193f4f0 WebCore::jsDocumentPrototypeFunction_execCommand(JSC::JSGlobalObject*, JSC::CallFrame*)
25  0x28000c03c
26  0x11862d290 llint_entry
27  0x118606e44 vmEntryToJavaScript
28  0x1195d4880 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*)
29  0x1195d3e38 JSC::Interpreter::executeProgram(JSC::SourceCode const&amp;, JSC::JSGlobalObject*, JSC::JSObject*)
30  0x119a5c318 JSC::evaluate(JSC::JSGlobalObject*, JSC::SourceCode const&amp;, JSC::JSValue, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;)
31  0x119a5c45c JSC::profiledEvaluate(JSC::JSGlobalObject*, JSC::ProfilingReason, JSC::SourceCode const&amp;, JSC::JSValue, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1862861</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2022-04-20 02:09:53 -0700</bug_when>
    <thetext>Test gardening: https://commits.webkit.org/r293088</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864757</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-04-27 02:06:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/92385812&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1913146</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-11-17 04:43:23 -0800</bug_when>
    <thetext>Tim - I fixed similar looking Assertion issue with this commit:

https://github.com/WebKit/WebKit/commit/531d3679e268acaf10750ee50bdce95007891bdb

Do you think it can fix this issue?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>