<?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>127341</bug_id>
          
          <creation_ts>2014-01-21 05:26:11 -0800</creation_ts>
          <short_desc>ASSERTION FAILED: m_refChild-&gt;parentNode()-&gt;hasEditableStyle() || !m_refChild-&gt;parentNode()-&gt;renderer() in WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand</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>528+ (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=239533</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>
          
          <blocked>116980</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Renata Hodovan">rhodovan.u-szeged</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>koivisto</cc>
    
    <cc>sam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>970224</commentid>
    <comment_count>0</comment_count>
      <attachid>221736</attachid>
    <who name="Renata Hodovan">rhodovan.u-szeged</who>
    <bug_when>2014-01-21 05:26:11 -0800</bug_when>
    <thetext>Created attachment 221736
Test case

The test:

foo
&lt;div contenteditable=&quot;false&quot;&gt;
	&lt;span contenteditable=&quot;true&quot;&gt;&lt;/span&gt;
&lt;/div&gt;      
&lt;iframe onload=&quot;document.designMode=&amp;apos;on&amp;apos;;     
				document.execCommand(&amp;apos;selectall&amp;apos;);     
				document.execCommand(&amp;apos;italic&amp;apos;);&quot;&gt;


The backtrace:

ASSERTION FAILED: m_refChild-&gt;parentNode()-&gt;hasEditableStyle() || !m_refChild-&gt;parentNode()-&gt;renderer()
/home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/InsertNodeBeforeCommand.cpp(48) : WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand(WTF::PassRefPtr&lt;WebCore::Node&gt;, WTF::PassRefPtr&lt;WebCore::Node&gt;, WebCore::ShouldAssumeContentIsAlwaysEditable)
1   0x7ffff5c172a1 WTFCrash
2   0x7ffff0ac7ca4 WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand(WTF::PassRefPtr&lt;WebCore::Node&gt;, WTF::PassRefPtr&lt;WebCore::Node&gt;, WebCore::ShouldAssumeContentIsAlwaysEditable)
3   0x7ffff0a817f3 WebCore::InsertNodeBeforeCommand::create(WTF::PassRefPtr&lt;WebCore::Node&gt;, WTF::PassRefPtr&lt;WebCore::Node&gt;, WebCore::ShouldAssumeContentIsAlwaysEditable)
4   0x7ffff0a79470 WebCore::CompositeEditCommand::insertNodeBefore(WTF::PassRefPtr&lt;WebCore::Node&gt;, WTF::PassRefPtr&lt;WebCore::Node&gt;, WebCore::ShouldAssumeContentIsAlwaysEditable)
5   0x7ffff0a70b51 WebCore::ApplyStyleCommand::surroundNodeRangeWithElement(WTF::PassRefPtr&lt;WebCore::Node&gt;, WTF::PassRefPtr&lt;WebCore::Node&gt;, WTF::PassRefPtr&lt;WebCore::Element&gt;)
6   0x7ffff0a72023 WebCore::ApplyStyleCommand::applyInlineStyleChange(WTF::PassRefPtr&lt;WebCore::Node&gt;, WTF::PassRefPtr&lt;WebCore::Node&gt;, WebCore::StyleChange&amp;, WebCore::ApplyStyleCommand::EAddStyledElement)
7   0x7ffff0a6d7a7 WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange(WebCore::EditingStyle*, WTF::PassRefPtr&lt;WebCore::Node&gt;, WTF::PassRefPtr&lt;WebCore::Node&gt;)
8   0x7ffff0a6cd0a WebCore::ApplyStyleCommand::fixRangeAndApplyInlineStyle(WebCore::EditingStyle*, WebCore::Position const&amp;, WebCore::Position const&amp;)
9   0x7ffff0a6c945 WebCore::ApplyStyleCommand::applyInlineStyle(WebCore::EditingStyle*)
10  0x7ffff0a69a37 WebCore::ApplyStyleCommand::doApply()
11  0x7ffff0a78c54 WebCore::CompositeEditCommand::apply()
12  0x7ffff0a78a4c WebCore::applyCommand(WTF::PassRefPtr&lt;WebCore::CompositeEditCommand&gt;)
13  0x7ffff0a9c3ea WebCore::Editor::applyStyle(WebCore::StyleProperties*, WebCore::EditAction)
14  0x7ffff0aaccd0
15  0x7ffff0aad2df
16  0x7ffff0ab0ad6
17  0x7ffff0ab1f22 WebCore::Editor::Command::execute(WTF::String const&amp;, WebCore::Event*) const
18  0x7ffff0976ab2 WebCore::Document::execCommand(WTF::String const&amp;, bool, WTF::String const&amp;)
19  0x7ffff1812910 WebCore::jsDocumentPrototypeFunctionExecCommand(JSC::ExecState*)
20  0x7fff9d5640e5

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5c172a6 in WTFCrash () at /home/reni/Data/REPOS/webkit_sec/Source/WTF/wtf/Assertions.cpp:333
333	    *(int *)(uintptr_t)0xbbadbeef = 0;
(gdb) bt
#0  0x00007ffff5c172a6 in WTFCrash () at /home/reni/Data/REPOS/webkit_sec/Source/WTF/wtf/Assertions.cpp:333
#1  0x00007ffff0ac7ca4 in WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand (this=0x11feeb0, insertChild=..., refChild=..., 
    shouldAssumeContentIsAlwaysEditable=WebCore::DoNotAssumeContentIsAlwaysEditable)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/InsertNodeBeforeCommand.cpp:48
#2  0x00007ffff0a817f3 in WebCore::InsertNodeBeforeCommand::create (childToInsert=..., childToInsertBefore=..., 
    shouldAssumeContentIsAlwaysEditable=WebCore::DoNotAssumeContentIsAlwaysEditable)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/InsertNodeBeforeCommand.h:38
#3  0x00007ffff0a79470 in WebCore::CompositeEditCommand::insertNodeBefore (this=0x121c040, insertChild=..., refChild=..., 
    shouldAssumeContentIsAlwaysEditable=WebCore::DoNotAssumeContentIsAlwaysEditable)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/CompositeEditCommand.cpp:345
#4  0x00007ffff0a70b51 in WebCore::ApplyStyleCommand::surroundNodeRangeWithElement (this=0x121c040, passedStartNode=..., endNode=..., elementToInsert=...)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/ApplyStyleCommand.cpp:1355
#5  0x00007ffff0a72023 in WebCore::ApplyStyleCommand::applyInlineStyleChange (this=0x121c040, passedStart=..., passedEnd=..., styleChange=..., 
    addStyledElement=WebCore::ApplyStyleCommand::AddStyledElement) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/ApplyStyleCommand.cpp:1498
#6  0x00007ffff0a6d7a7 in WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange (this=0x121c040, style=0x122ceb0, startNode=..., pastEndNode=...)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/ApplyStyleCommand.cpp:832
#7  0x00007ffff0a6cd0a in WebCore::ApplyStyleCommand::fixRangeAndApplyInlineStyle (this=0x121c040, style=0x122ceb0, start=..., end=...)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/ApplyStyleCommand.cpp:717
#8  0x00007ffff0a6c945 in WebCore::ApplyStyleCommand::applyInlineStyle (this=0x121c040, style=0x122ceb0)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/ApplyStyleCommand.cpp:680
#9  0x00007ffff0a69a37 in WebCore::ApplyStyleCommand::doApply (this=0x121c040)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/ApplyStyleCommand.cpp:220
#10 0x00007ffff0a78c54 in WebCore::CompositeEditCommand::apply (this=0x121c040)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/CompositeEditCommand.cpp:227
#11 0x00007ffff0a78a4c in WebCore::applyCommand (command=...) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/CompositeEditCommand.cpp:182
#12 0x00007ffff0a9c3ea in WebCore::Editor::applyStyle (this=0x7c8620, style=0x11f9ff0, editingAction=WebCore::EditActionUnspecified)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/Editor.cpp:982
#13 0x00007ffff0aaccd0 in WebCore::applyCommandToFrame (frame=..., source=WebCore::CommandFromDOM, action=WebCore::EditActionItalics, style=0x11f9ff0)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/EditorCommand.cpp:110
#14 0x00007ffff0aad2df in WebCore::executeToggleStyle (frame=..., source=WebCore::CommandFromDOM, action=WebCore::EditActionItalics, 
    propertyID=WebCore::CSSPropertyFontStyle, offValue=0x7ffff208a14c &quot;normal&quot;, onValue=0x7ffff208a153 &quot;italic&quot;)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/EditorCommand.cpp:171
#15 0x00007ffff0ab0ad6 in WebCore::executeToggleItalic (frame=..., source=WebCore::CommandFromDOM)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/EditorCommand.cpp:1119
#16 0x00007ffff0ab1f22 in WebCore::Editor::Command::execute (this=0x7fffffff9ad0, parameter=..., triggeringEvent=0x0)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/EditorCommand.cpp:1740
#17 0x00007ffff0976ab2 in WebCore::Document::execCommand (this=0x11c7f10, commandName=..., userInterface=false, value=...)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/dom/Document.cpp:4220
#18 0x00007ffff1812910 in WebCore::jsDocumentPrototypeFunctionExecCommand (exec=0x7fff93d8bf40)
    at /home/reni/Data/REPOS/webkit_sec/WebKitBuild/Debug/DerivedSources/WebCore/JSDocument.cpp:3369
#19 0x00007fff9d5640e5 in ?? ()
#20 0x00007fff93d8bf90 in ?? ()
#21 0x00007ffff5c05421 in llint_op_call () from /home/reni/Data/REPOS/webkit_sec/WebKitBuild/Debug/lib/libjavascriptcore_efl.so.0
#22 0x00007fff9d564900 in ?? ()
#23 0x00000000011416d0 in ?? ()
#24 0x0000000000000001 in ?? ()
#25 0x0000000000000001 in ?? ()
#26 0x0000000000770670 in ?? ()
#27 0x0000000000000000 in ?? ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1173697</commentid>
    <comment_count>1</comment_count>
    <who name="Renata Hodovan">rhodovan.u-szeged</who>
    <bug_when>2016-03-11 04:14:16 -0800</bug_when>
    <thetext>It&apos;s still valid on ToT WebKit.
Validated on r197952 both with Mac and EFL builds.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217145</commentid>
    <comment_count>2</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2016-08-03 13:51:15 -0700</bug_when>
    <thetext>This still occurs under r204037.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217148</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-08-03 13:52:24 -0700</bug_when>
    <thetext>&lt;rdar://problem/27685023&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>221736</attachid>
            <date>2014-01-21 05:26:11 -0800</date>
            <delta_ts>2014-01-21 05:26:11 -0800</delta_ts>
            <desc>Test case</desc>
            <filename>lastCrash.html</filename>
            <type>text/html</type>
            <size>243</size>
            <attacher name="Renata Hodovan">rhodovan.u-szeged</attacher>
            
              <data encoding="base64">Zm9vCjxkaXYgY29udGVudGVkaXRhYmxlPSJmYWxzZSI+Cgk8c3BhbiBjb250ZW50ZWRpdGFibGU9
InRydWUiPjwvc3Bhbj4KPC9kaXY+ICAgICAgCjxpZnJhbWUgb25sb2FkPSJkb2N1bWVudC5kZXNp
Z25Nb2RlPSZhcG9zO29uJmFwb3M7OyAgICAgCgkJCQlkb2N1bWVudC5leGVjQ29tbWFuZCgmYXBv
cztzZWxlY3RhbGwmYXBvczspOyAgICAgCgkJCQlkb2N1bWVudC5leGVjQ29tbWFuZCgmYXBvcztp
dGFsaWMmYXBvczspOyI+
</data>

          </attachment>
      

    </bug>

</bugzilla>