<?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>151095</bug_id>
          
          <creation_ts>2015-11-10 07:46:11 -0800</creation_ts>
          <short_desc>Should never be reached failure in WebCore::fontWeightIsBold</short_desc>
          <delta_ts>2025-03-06 16:59: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 Local 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=133796</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>cdumez</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1140765</commentid>
    <comment_count>0</comment_count>
      <attachid>265177</attachid>
    <who name="Renata Hodovan">rhodovan.u-szeged</who>
    <bug_when>2015-11-10 07:46:11 -0800</bug_when>
    <thetext>Created attachment 265177
Test

Load the attached test with debug MiniBrowser:

&lt;!DOCTYPE html&gt;
a
&lt;style&gt;
* {
    font-weight:lighter;
}
&lt;/style&gt;
a
&lt;style&gt;
* {
    font-weight:900;
}
&lt;/style&gt;
&lt;script&gt;
    document.designMode = &apos;on&apos;;
    document.execCommand(&quot;selectAll&quot;, false, null);
    document.execCommand(&quot;insertOrderedList&quot; , false , null);
&lt;/script&gt;


OS: Ubuntu 15.04 x86_64
Checked build: debug EFL
Checked version: 29ae33c


Backtrace:

SHOULD NEVER BE REACHED
../../Source/WebCore/editing/EditingStyle.cpp(1764) : bool WebCore::fontWeightIsBold(WebCore::CSSValue&amp;)
1   0x7fa3d850e89f WTFCrash
2   0x7fa3de78038f
3   0x7fa3de7816c8
4   0x7fa3de7811e9
5   0x7fa3de784d1a WTF::PassRefPtr&lt;WebCore::MutableStyleProperties&gt; WebCore::getPropertiesNotIn&lt;WebCore::MutableStyleProperties&gt;(WebCore::StyleProperties&amp;, WebCore::MutableStyleProperties&amp;)
6   0x7fa3de77d07c WebCore::EditingStyle::removeStyleFromRulesAndContext(WebCore::StyledElement*, WebCore::Node*)
7   0x7fa3de7c95db WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline(WebCore::ReplaceSelectionCommand::InsertedNodes&amp;)
8   0x7fa3de7cec09 WebCore::ReplaceSelectionCommand::doApply()
9   0x7fa3df941220 WebCore::CompositeEditCommand::applyCommandToComposite(WTF::PassRefPtr&lt;WebCore::EditCommand&gt;)
10  0x7fa3df949bf2 WebCore::CompositeEditCommand::moveParagraphs(WebCore::VisiblePosition const&amp;, WebCore::VisiblePosition const&amp;, WebCore::VisiblePosition const&amp;, bool, bool)
11  0x7fa3df948dcf WebCore::CompositeEditCommand::moveParagraph(WebCore::VisiblePosition const&amp;, WebCore::VisiblePosition const&amp;, WebCore::VisiblePosition const&amp;, bool, bool)
12  0x7fa3de7c2c74 WebCore::InsertListCommand::listifyParagraph(WebCore::VisiblePosition const&amp;, WebCore::QualifiedName const&amp;)
13  0x7fa3de7c12e8 WebCore::InsertListCommand::doApplyForSingleParagraph(bool, WebCore::HTMLQualifiedName const&amp;, WebCore::Range*)
14  0x7fa3de7c068a WebCore::InsertListCommand::doApply()
15  0x7fa3df940f4c WebCore::CompositeEditCommand::apply()
16  0x7fa3df940cfd WebCore::applyCommand(WTF::PassRefPtr&lt;WebCore::CompositeEditCommand&gt;)
17  0x7fa3de7a5ab3
18  0x7fa3de7a959e WebCore::Editor::Command::execute(WTF::String const&amp;, WebCore::Event*) const
19  0x7fa3de64dd39 WebCore::Document::execCommand(WTF::String const&amp;, bool, WTF::String const&amp;)
20  0x7fa3dfd8022d WebCore::jsDocumentPrototypeFunctionExecCommand(JSC::ExecState*)
21  0x7fa37b7ff0c8
Aborted (core dumped)

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fa3d850e8a4 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:321
321     *(int *)(uintptr_t)0xbbadbeef = 0;
(gdb) bt
#0  0x00007fa3d850e8a4 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:321
#1  0x00007fa3de78038f in WebCore::fontWeightIsBold (fontWeight=...) at ../../Source/WebCore/editing/EditingStyle.cpp:1764
#2  0x00007fa3de7816c8 in WebCore::fontWeightIsBold&lt;WebCore::MutableStyleProperties&gt; (style=...) at ../../Source/WebCore/editing/EditingStyle.cpp:1772
#3  0x00007fa3de7811e9 in WebCore::extractPropertiesNotIn&lt;WebCore::MutableStyleProperties&gt; (styleWithRedundantProperties=..., baseStyle=...)
    at ../../Source/WebCore/editing/EditingStyle.cpp:1786
#4  0x00007fa3de784d1a in WebCore::getPropertiesNotIn&lt;WebCore::MutableStyleProperties&gt; (styleWithRedundantProperties=..., baseStyle=...)
    at ../../Source/WebCore/editing/EditingStyle.cpp:1805
#5  0x00007fa3de77d07c in WebCore::EditingStyle::removeStyleFromRulesAndContext (this=0x7fa3bbb99240, element=0x7fa3bbbe38f0, context=0x7fa3bbbe3c30)
    at ../../Source/WebCore/editing/EditingStyle.cpp:1337
#6  0x00007fa3de7c95db in WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline (this=0x7fa3bba89360, insertedNodes=...)
    at ../../Source/WebCore/editing/ReplaceSelectionCommand.cpp:517
#7  0x00007fa3de7cec09 in WebCore::ReplaceSelectionCommand::doApply (this=0x7fa3bba89360) at ../../Source/WebCore/editing/ReplaceSelectionCommand.cpp:1161
#8  0x00007fa3df941220 in WebCore::CompositeEditCommand::applyCommandToComposite (this=0x7fa3bbbb52d0, prpCommand=...)
    at ../../Source/WebCore/editing/CompositeEditCommand.cpp:278
#9  0x00007fa3df949bf2 in WebCore::CompositeEditCommand::moveParagraphs (this=0x7fa3bbbb52d0, startOfParagraphToMove=..., endOfParagraphToMove=..., 
    destination=..., preserveSelection=true, preserveStyle=true) at ../../Source/WebCore/editing/CompositeEditCommand.cpp:1318
#10 0x00007fa3df948dcf in WebCore::CompositeEditCommand::moveParagraph (this=0x7fa3bbbb52d0, startOfParagraphToMove=..., endOfParagraphToMove=..., 
    destination=..., preserveSelection=true, preserveStyle=true) at ../../Source/WebCore/editing/CompositeEditCommand.cpp:1212
#11 0x00007fa3de7c2c74 in WebCore::InsertListCommand::listifyParagraph (this=0x7fa3bbbb52d0, originalStart=..., listTag=...)
    at ../../Source/WebCore/editing/InsertListCommand.cpp:396
#12 0x00007fa3de7c12e8 in WebCore::InsertListCommand::doApplyForSingleParagraph (this=0x7fa3bbbb52d0, forceCreateList=false, listTag=..., 
    currentSelection=0x7fa3bbb73dc0) at ../../Source/WebCore/editing/InsertListCommand.cpp:259
#13 0x00007fa3de7c068a in WebCore::InsertListCommand::doApply (this=0x7fa3bbbb52d0) at ../../Source/WebCore/editing/InsertListCommand.cpp:195
#14 0x00007fa3df940f4c in WebCore::CompositeEditCommand::apply (this=0x7fa3bbbb52d0) at ../../Source/WebCore/editing/CompositeEditCommand.cpp:227
#15 0x00007fa3df940cfd in WebCore::applyCommand (command=...) at ../../Source/WebCore/editing/CompositeEditCommand.cpp:186
#16 0x00007fa3de7a5ab3 in WebCore::executeInsertOrderedList (frame=...) at ../../Source/WebCore/editing/EditorCommand.cpp:518
#17 0x00007fa3de7a959e in WebCore::Editor::Command::execute (this=0x7ffeb8307410, parameter=..., triggeringEvent=0x0)
    at ../../Source/WebCore/editing/EditorCommand.cpp:1703
#18 0x00007fa3de64dd39 in WebCore::Document::execCommand (this=0x7fa3bb826a40, commandName=..., userInterface=false, value=...)
    at ../../Source/WebCore/dom/Document.cpp:4657
#19 0x00007fa3dfd8022d in WebCore::jsDocumentPrototypeFunctionExecCommand (state=0x7ffeb83074e0) at DerivedSources/WebCore/JSDocument.cpp:5066
#20 0x00007fa37b7ff0c8 in ?? ()
#21 0x00007ffeb8307560 in ?? ()
#22 0x00007fa3d84b7036 in llint_entry () from webkit/WebKitBuild/Debug/lib/libjavascriptcore_efl.so.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217758</commentid>
    <comment_count>1</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2016-08-04 18:19:14 -0700</bug_when>
    <thetext>This reproduces in r204037.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217759</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-08-04 18:19:29 -0700</bug_when>
    <thetext>&lt;rdar://problem/27711671&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>265177</attachid>
            <date>2015-11-10 07:46:11 -0800</date>
            <delta_ts>2015-11-10 07:46:11 -0800</delta_ts>
            <desc>Test</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>261</size>
            <attacher name="Renata Hodovan">rhodovan.u-szeged</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CmEKPHN0eWxlPgoqIHsKCWZvbnQtd2VpZ2h0OmxpZ2h0ZXI7Cn0KPC9z
dHlsZT4KYQo8c3R5bGU+CiogewoJZm9udC13ZWlnaHQ6OTAwOwp9Cjwvc3R5bGU+CjxzY3JpcHQ+
Cglkb2N1bWVudC5kZXNpZ25Nb2RlID0gJ29uJzsKCWRvY3VtZW50LmV4ZWNDb21tYW5kKCJzZWxl
Y3RBbGwiLCBmYWxzZSwgbnVsbCk7Cglkb2N1bWVudC5leGVjQ29tbWFuZCgiaW5zZXJ0T3JkZXJl
ZExpc3QiICwgZmFsc2UgLCBudWxsKTsKPC9zY3JpcHQ+
</data>

          </attachment>
      

    </bug>

</bugzilla>