<?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>170765</bug_id>
          
          <creation_ts>2017-04-12 01:07:05 -0700</creation_ts>
          <short_desc>Assertion failed under WebCore::ApplyStyleCommand::applyBlockStyle.</short_desc>
          <delta_ts>2022-12-09 05:53:10 -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>RESOLVED</bug_status>
          <resolution>FIXED</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Per Arne Vollan">pvollan</reporter>
          <assigned_to name="Per Arne Vollan">pvollan</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>mjs</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1296672</commentid>
    <comment_count>0</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-04-12 01:07:05 -0700</bug_when>
    <thetext>I have not been able to reproduce this myself, but in some cases an assertion fails under WebCore::ApplyStyleCommand::applyBlockStyle:

0   com.apple.JavaScriptCore      	0x000000010bfdaf64 WTFCrash + 36
1   com.apple.WebCore             	0x0000000111e9408f WebCore::ApplyStyleCommand::applyBlockStyle(WebCore::EditingStyle*) + 1535
2   com.apple.WebCore             	0x0000000111e93a5d WebCore::ApplyStyleCommand::doApply() + 349
3   com.apple.WebCore             	0x000000011210468a WebCore::CompositeEditCommand::apply() + 314
4   com.apple.WebCore             	0x0000000112104521 WebCore::applyCommand(WTF::PassRefPtr&lt;WebCore::CompositeEditCommand&gt;) + 17
5   com.apple.WebCore             	0x0000000112642639 WebCore::Editor::applyParagraphStyle(WebCore::StyleProperties*, WebCore::EditAction) + 521
6   com.apple.WebCore             	0x0000000112660349 WebCore::executeApplyParagraphStyle(WebCore::Frame&amp;, WebCore::EditorCommandSource, WebCore::EditAction, WebCore::CSSPropertyID, WTF::String const&amp;) + 233
7   com.apple.WebCore             	0x000000011265b5e2 WebCore::executeJustifyCenter(WebCore::Frame&amp;, WebCore::Event*, WebCore::EditorCommandSource, WTF::String const&amp;) + 98
8   com.apple.WebCore             	0x000000011265af33 WebCore::Editor::Command::execute(WTF::String const&amp;, WebCore::Event*) const + 211
9   com.apple.WebCore             	0x00000001124f2d69 WebCore::Document::execCommand(WTF::String const&amp;, bool, WTF::String const&amp;) + 89
10  com.apple.WebCore             	0x000000011307a124 WebCore::jsDocumentPrototypeFunctionExecCommandCaller(JSC::ExecState*, WebCore::JSDocument*, JSC::ThrowScope&amp;) + 660
11  com.apple.WebCore             	0x00000001130646f2 long long WebCore::BindingCaller&lt;WebCore::JSDocument&gt;::callOperation&lt;&amp;(WebCore::jsDocumentPrototypeFunctionExecCommandCaller(JSC::ExecState*, WebCore::JSDocument*, JSC::ThrowScope&amp;)), (WebCore::CastedThisErrorBehavior)0&gt;(JSC::ExecState*, char const*) + 658
12  com.apple.WebCore             	0x0000000113064448 WebCore::jsDocumentPrototypeFunctionExecCommand(JSC::ExecState*) + 40
13  ???                           	0x0000200287201028 0 + 35195229048872
14  com.apple.JavaScriptCore      	0x000000010b91f41f llint_entry + 29979</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1296674</commentid>
    <comment_count>1</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-04-12 01:17:26 -0700</bug_when>
    <thetext>rdar://problem/31441955</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1296683</commentid>
    <comment_count>2</comment_count>
      <attachid>306896</attachid>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-04-12 01:36:58 -0700</bug_when>
    <thetext>Created attachment 306896
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1296728</commentid>
    <comment_count>3</comment_count>
      <attachid>306896</attachid>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2017-04-12 07:54:41 -0700</bug_when>
    <thetext>Comment on attachment 306896
Patch

Occasionally, we use ASSERTS to detect early on when we get into an inconsistent or unexpected state, even though in release, we are able to handle the inconsistency gracefully (in this case, with an is&lt;&gt; check). So even though some error cases are handled gracefully by release builds, there may still be value in keeping an ASSERT for debug builds.

However, I&apos;m not certain this is the case here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298247</commentid>
    <comment_count>4</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-04-18 04:16:48 -0700</bug_when>
    <thetext>rdar://problem/30297145</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1657696</commentid>
    <comment_count>5</comment_count>
      <attachid>306896</attachid>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2020-05-30 19:21:58 -0700</bug_when>
    <thetext>Comment on attachment 306896
Patch

Not sure if this is a good change or not, but in any case the patch no longer applies as-is.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1916290</commentid>
    <comment_count>6</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-12-02 12:06:52 -0800</bug_when>
    <thetext>Blink updated it here - https://src.chromium.org/viewvc/blink?view=revision&amp;revision=177283

https://github.com/WebKit/WebKit/blob/85f4c97a6e063901a359c620aa1007c7c3ebd7ea/Source/WebCore/editing/ApplyStyleCommand.cpp#L269</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1917895</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-12-09 02:02:18 -0800</bug_when>
    <thetext>Committed 257617@main (eb072c37fe4e): &lt;https://commits.webkit.org/257617@main&gt;

Reviewed commits have been landed. Closing PR #7342 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1917921</commentid>
    <comment_count>8</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-12-09 05:53:10 -0800</bug_when>
    <thetext>&lt;rdar://problem/103178512&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>306896</attachid>
            <date>2017-04-12 01:36:58 -0700</date>
            <delta_ts>2020-05-30 19:21:58 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-170765-20170412013656.patch</filename>
            <type>text/plain</type>
            <size>1517</size>
            <attacher name="Per Arne Vollan">pvollan</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDIxNTI2MSkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE4IEBACisyMDE3LTA0LTEyICBQZXIgQXJu
ZSBWb2xsYW4gIDxwdm9sbGFuQGFwcGxlLmNvbT4KKworICAgICAgICBBc3NlcnRpb24gZmFpbGVk
IHVuZGVyIFdlYkNvcmU6OkFwcGx5U3R5bGVDb21tYW5kOjphcHBseUJsb2NrU3R5bGUuCisgICAg
ICAgIGh0dHBzOi8vYnVnc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2IEBAIHZvaWQgQXBwbHlTdHlsZUNvbW1hbmQ6
OmFwcGx5QmxvY2tTdHlsZSgKICAgICAgICAgICAgICAgICBpZiAobmV3QmxvY2spCiAgICAgICAg
ICAgICAgICAgICAgIGJsb2NrID0gbmV3QmxvY2s7CiAgICAgICAgICAgICB9Ci0gICAgICAgICAg
ICBBU1NFUlQoIWJsb2NrIHx8IGlzPEhUTUxFbGVtZW50PigqYmxvY2spKTsKICAgICAgICAgICAg
IGlmIChpczxIVE1MRWxlbWVudD4oYmxvY2suZ2V0KCkpKSB7CiAgICAgICAgICAgICAgICAgcmVt
b3ZlQ1NTU3R5bGUoc3R5bGUsIGRvd25jYXN0PEhUTUxFbGVtZW50PihibG9jay5nZXQoKSkpOwog
ICAgICAgICAgICAgICAgIGlmICghbV9yZW1vdmVPbmx5KQo=
</data>
<flag name="review"
          id="328216"
          type_id="1"
          status="-"
          setter="mjs"
    />
          </attachment>
      

    </bug>

</bugzilla>