<?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>127342</bug_id>
          
          <creation_ts>2014-01-21 05:50:36 -0800</creation_ts>
          <short_desc>ASSERTION FAILED: node == end.deprecatedNode() || !node-&gt;contains(end.deprecatedNode()) in WebCore::ApplyStyleCommand::removeInlineStyle</short_desc>
          <delta_ts>2023-01-20 10:42:55 -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>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <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>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>koivisto</cc>
    
    <cc>rniwa</cc>
    
    <cc>sam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

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

The test:

&lt;applet code=&quot;applet1.class&quot;&gt;foo
	&lt;small&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;);     
					document.execCommand(&amp;apos;RemoveFormat&amp;apos;);&quot;
			seamless&gt;&lt;/iframe&gt;
&lt;/applet&gt;


The backtrace:

ASSERTION FAILED: node == end.deprecatedNode() || !node-&gt;contains(end.deprecatedNode())
/home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/ApplyStyleCommand.cpp(1126) : void WebCore::ApplyStyleCommand::removeInlineStyle(WebCore::EditingStyle*, const WebCore::Position&amp;, const WebCore::Position&amp;)
1   0x7ffff5c172a1 WTFCrash
2   0x7ffff0a6f36c WebCore::ApplyStyleCommand::removeInlineStyle(WebCore::EditingStyle*, WebCore::Position const&amp;, WebCore::Position const&amp;)
3   0x7ffff0a6c4ca WebCore::ApplyStyleCommand::applyInlineStyle(WebCore::EditingStyle*)
4   0x7ffff0a69a37 WebCore::ApplyStyleCommand::doApply()
5   0x7ffff0a78e94 WebCore::CompositeEditCommand::applyCommandToComposite(WTF::PassRefPtr&lt;WebCore::EditCommand&gt;)
6   0x7ffff0ad42c5 WebCore::RemoveFormatCommand::doApply()
7   0x7ffff0a78c54 WebCore::CompositeEditCommand::apply()
8   0x7ffff0a78a4c WebCore::applyCommand(WTF::PassRefPtr&lt;WebCore::CompositeEditCommand&gt;)
9   0x7ffff0a9c041 WebCore::Editor::removeFormattingAndStyle()
10  0x7ffff0ab03db
11  0x7ffff0ab1f22 WebCore::Editor::Command::execute(WTF::String const&amp;, WebCore::Event*) const
12  0x7ffff0976ab2 WebCore::Document::execCommand(WTF::String const&amp;, bool, WTF::String const&amp;)
13  0x7ffff1812910 WebCore::jsDocumentPrototypeFunctionExecCommand(JSC::ExecState*)
14  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  0x00007ffff0a6f36c in WebCore::ApplyStyleCommand::removeInlineStyle (this=0x12000a0, style=0x12230f0, start=..., end=...)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/ApplyStyleCommand.cpp:1126
#2  0x00007ffff0a6c4ca in WebCore::ApplyStyleCommand::applyInlineStyle (this=0x12000a0, style=0x12230f0)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/ApplyStyleCommand.cpp:637
#3  0x00007ffff0a69a37 in WebCore::ApplyStyleCommand::doApply (this=0x12000a0)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/ApplyStyleCommand.cpp:220
#4  0x00007ffff0a78e94 in WebCore::CompositeEditCommand::applyCommandToComposite (this=0x1200b90, prpCommand=...)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/CompositeEditCommand.cpp:278
#5  0x00007ffff0ad42c5 in WebCore::RemoveFormatCommand::doApply (this=0x1200b90)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/RemoveFormatCommand.cpp:92
#6  0x00007ffff0a78c54 in WebCore::CompositeEditCommand::apply (this=0x1200b90)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/CompositeEditCommand.cpp:227
#7  0x00007ffff0a78a4c in WebCore::applyCommand (command=...) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/CompositeEditCommand.cpp:182
#8  0x00007ffff0a9c041 in WebCore::Editor::removeFormattingAndStyle (this=0x750200) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/Editor.cpp:914
#9  0x00007ffff0ab03db in WebCore::executeRemoveFormat (frame=...) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/EditorCommand.cpp:985
#10 0x00007ffff0ab1f22 in WebCore::Editor::Command::execute (this=0x7fffffff9ad0, parameter=..., triggeringEvent=0x0)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/editing/EditorCommand.cpp:1740
#11 0x00007ffff0976ab2 in WebCore::Document::execCommand (this=0x11c8ad0, commandName=..., userInterface=false, value=...)
    at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/dom/Document.cpp:4220
#12 0x00007ffff1812910 in WebCore::jsDocumentPrototypeFunctionExecCommand (exec=0x7fff93d8bf40)
    at /home/reni/Data/REPOS/webkit_sec/WebKitBuild/Debug/DerivedSources/WebCore/JSDocument.cpp:3369
#13 0x00007fff9d5640e5 in ?? ()
#14 0x00007fff93d8bf90 in ?? ()
#15 0x00007ffff5c05421 in llint_op_call () from /home/reni/Data/REPOS/webkit_sec/WebKitBuild/Debug/lib/libjavascriptcore_efl.so.0
#16 0x00007fff9d564900 in ?? ()
#17 0x0000000001141e20 in ?? ()
#18 0x0000000000000001 in ?? ()
#19 0x0000000000000001 in ?? ()
#20 0x00000000011596b0 in ?? ()
#21 0x0000000000000000 in ?? ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1144414</commentid>
    <comment_count>1</comment_count>
      <attachid>266153</attachid>
    <who name="Renata Hodovan">rhodovan.u-szeged</who>
    <bug_when>2015-11-25 05:44:09 -0800</bug_when>
    <thetext>Created attachment 266153
Test

New test case since the old one doesn&apos;t repro anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217152</commentid>
    <comment_count>2</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2016-08-03 13:53:40 -0700</bug_when>
    <thetext>This still reproduces under r204037.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217153</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-08-03 13:55:19 -0700</bug_when>
    <thetext>&lt;rdar://problem/27685108&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1926970</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-01-20 10:42:55 -0800</bug_when>
    <thetext>I am able to reproduce this assert failed using MiniBrowser WK2 Debug Build based of 259136@main and I get this:

ASSERTION FAILED: node == end.deprecatedNode() || !node-&gt;contains(end.deprecatedNode())
editing/ApplyStyleCommand.cpp(1133) : void WebCore::ApplyStyleCommand::removeInlineStyle(WebCore::EditingStyle &amp;, const WebCore::Position &amp;, const WebCore::Position &amp;)
1   0x13a6c6d84 WTFCrash
2   0x280832730 WTFCrashWithInfo(int, char const*, char const*, int)
3   0x283db5a28 WebCore::ApplyStyleCommand::removeInlineStyle(WebCore::EditingStyle&amp;, WebCore::Position const&amp;, WebCore::Position const&amp;)
4   0x283db21d8 WebCore::ApplyStyleCommand::applyInlineStyle(WebCore::EditingStyle&amp;)
5   0x283db0604 WebCore::ApplyStyleCommand::doApply()
6   0x283dac198 WebCore::CompositeEditCommand::apply()
7   0x283e0c730 WebCore::Editor::applyStyle(WTF::RefPtr&lt;WebCore::EditingStyle, WTF::RawPtrTraits&lt;WebCore::EditingStyle&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::EditingStyle&gt; &gt;&amp;&amp;, WebCore::EditAction, WebCore::Editor::ColorFilterMode)
8   0x283e41250 WebCore::applyCommandToFrame(WebCore::Frame&amp;, WebCore::EditorCommandSource, WebCore::EditAction, WTF::Ref&lt;WebCore::EditingStyle, WTF::RawPtrTraits&lt;WebCore::EditingStyle&gt; &gt;&amp;&amp;)
9   0x283e413d8 WebCore::executeToggleStyle(WebCore::Frame&amp;, WebCore::EditorCommandSource, WebCore::EditAction, WebCore::CSSPropertyID, WTF::ASCIILiteral, WTF::ASCIILiteral)
10  0x283e3de9c WebCore::executeToggleItalic(WebCore::Frame&amp;, WebCore::Event*, WebCore::EditorCommandSource, WTF::String const&amp;)
11  0x283e12a30 WebCore::Editor::Command::execute(WTF::String const&amp;, WebCore::Event*) const
12  0x283a99ef0 WebCore::Document::execCommand(WTF::String const&amp;, bool, WTF::String const&amp;)
13  0x280be2e5c WebCore::jsDocumentPrototypeFunction_execCommandBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSDocument*)
14  0x280be2944 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*)
15  0x280bcda00 WebCore::jsDocumentPrototypeFunction_execCommand(JSC::JSGlobalObject*, JSC::CallFrame*)
16  0x2a4e5403c (null)
17  0x13adee990 llint_entry
18  0x13adc8eec vmEntryToJavaScript
19  0x13be27a5c JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*)
20  0x13be26ff8 JSC::Interpreter::executeProgram(JSC::SourceCode const&amp;, JSC::JSGlobalObject*, JSC::JSObject*)
21  0x13c290110 JSC::evaluate(JSC::JSGlobalObject*, JSC::SourceCode const&amp;, JSC::JSValue, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;)
22  0x13c290254 JSC::profiledEvaluate(JSC::JSGlobalObject*, JSC::ProfilingReason, JSC::SourceCode const&amp;, JSC::JSValue, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;)
23  0x283240254 WebCore::JSExecState::profiledEvaluate(JSC::JSGlobalObject*, JSC::ProfilingReason, JSC::SourceCode const&amp;, JSC::JSValue, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;)
24  0x28323fd28 WebCore::ScriptController::evaluateInWorld(WebCore::ScriptSourceCode const&amp;, WebCore::DOMWrapperWorld&amp;)
25  0x28323fb5c WebCore::ScriptController::evaluateInWorldIgnoringException(WebCore::ScriptSourceCode const&amp;, WebCore::DOMWrapperWorld&amp;)
26  0x28324050c WebCore::ScriptController::evaluateIgnoringException(WebCore::ScriptSourceCode const&amp;)
27  0x283cbd164 WebCore::ScriptElement::executeClassicScript(WebCore::ScriptSourceCode const&amp;)
28  0x283cbb2e8 WebCore::ScriptElement::prepareScript(WTF::TextPosition const&amp;, WebCore::ScriptElement::LegacyTypeSupport)
29  0x284323810 WebCore::HTMLScriptRunner::runScript(WebCore::ScriptElement&amp;, WTF::TextPosition const&amp;)
30  0x28432363c WebCore::HTMLScriptRunner::execute(WTF::Ref&lt;WebCore::ScriptElement, WTF::RawPtrTraits&lt;WebCore::ScriptElement&gt; &gt;&amp;&amp;, WTF::TextPosition const&amp;)
31  0x2842fb1f4 WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder()</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>221737</attachid>
            <date>2014-01-21 05:50:36 -0800</date>
            <delta_ts>2015-11-25 05:44:09 -0800</delta_ts>
            <desc>Test case</desc>
            <filename>lastCrash.html</filename>
            <type>text/html</type>
            <size>292</size>
            <attacher name="Renata Hodovan">rhodovan.u-szeged</attacher>
            
              <data encoding="base64">PGFwcGxldCBjb2RlPSJhcHBsZXQxLmNsYXNzIj5mb28KCTxzbWFsbD4KCTxpZnJhbWUgb25sb2Fk
PSJkb2N1bWVudC5kZXNpZ25Nb2RlPSZhcG9zO29uJmFwb3M7OyAgICAgCgkJCQkJZG9jdW1lbnQu
ZXhlY0NvbW1hbmQoJmFwb3M7c2VsZWN0YWxsJmFwb3M7KTsgICAgIAoJCQkJCWRvY3VtZW50LmV4
ZWNDb21tYW5kKCZhcG9zO2l0YWxpYyZhcG9zOyk7ICAgICAKCQkJCQlkb2N1bWVudC5leGVjQ29t
bWFuZCgmYXBvcztSZW1vdmVGb3JtYXQmYXBvczspOyIKCQkJc2VhbWxlc3M+PC9pZnJhbWU+Cjwv
YXBwbGV0Pg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>266153</attachid>
            <date>2015-11-25 05:44:09 -0800</date>
            <delta_ts>2015-11-25 05:44:09 -0800</delta_ts>
            <desc>Test</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>176</size>
            <attacher name="Renata Hodovan">rhodovan.u-szeged</attacher>
            
              <data encoding="base64">PG91dHB1dD5hCjxzY3JpcHQ+CiAgICBkb2N1bWVudC5kZXNpZ25Nb2RlID0gJ29uJzsKICAgIGRv
Y3VtZW50LmV4ZWNDb21tYW5kKCJzZWxlY3RBbGwiKTsKICAgIGRvY3VtZW50LmV4ZWNDb21tYW5k
KCJqdXN0aWZ5TGVmdCIpOwogICAgZG9jdW1lbnQuZXhlY0NvbW1hbmQoIml0YWxpYyIpOwo8L3Nj
cmlwdD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>