<?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>130542</bug_id>
          
          <creation_ts>2014-03-20 15:54:29 -0700</creation_ts>
          <short_desc>Inline style allows numbers with scientific notations without further checking: assert!</short_desc>
          <delta_ts>2014-03-20 19:15:23 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dirk Schulze">krit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>kling</cc>
    
    <cc>koivisto</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>tonikitoo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>992774</commentid>
    <comment_count>0</comment_count>
      <attachid>227349</attachid>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2014-03-20 15:54:29 -0700</bug_when>
    <thetext>Created attachment 227349
Example - assertion

The parsing for setting inline style with JS seems to differ from markup parsing. The following is interpreted as number with scientific notation: 2e500

The numbers seem not to be checked for overflow:

document.getElementsByTagName(&apos;div&apos;)[0].style.marginTop = &apos;2e500px&apos;;

causes an ASSERT:

ASSERTION FAILED: std::isfinite(num)
CSSPrimitiveValue.cpp(259) : WebCore::CSSPrimitiveValue::CSSPrimitiveValue(double, WebCore::CSSPrimitiveValue::UnitTypes)
1   0x1059f0a30 WTFCrash
2   0x107548bec WebCore::CSSPrimitiveValue::CSSPrimitiveValue(double, WebCore::CSSPrimitiveValue::UnitTypes)
3   0x107548af5 WebCore::CSSPrimitiveValue::CSSPrimitiveValue(double, WebCore::CSSPrimitiveValue::UnitTypes)
4   0x10744e5d1 WebCore::CSSPrimitiveValue::create(double, WebCore::CSSPrimitiveValue::UnitTypes)
5   0x107593c94 WebCore::CSSValuePool::createValue(double, WebCore::CSSPrimitiveValue::UnitTypes)
6   0x1074edef5 WebCore::parseSimpleLengthValue(WebCore::MutableStyleProperties*, WebCore::CSSPropertyID, WTF::String const&amp;, bool, WebCore::CSSParserMode)
7   0x1074edbd0 WebCore::CSSParser::parseValue(WebCore::MutableStyleProperties*, WebCore::CSSPropertyID, WTF::String const&amp;, bool, WebCore::CSSParserMode, WebCore::StyleSheetContents*)
8   0x108db260f WebCore::MutableStyleProperties::setProperty(WebCore::CSSPropertyID, WTF::String const&amp;, bool, WebCore::StyleSheetContents*)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>992865</commentid>
    <comment_count>1</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2014-03-20 19:15:23 -0700</bug_when>
    <thetext>Duplicated of bug 127361?</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>227349</attachid>
            <date>2014-03-20 15:54:29 -0700</date>
            <delta_ts>2014-03-20 15:54:29 -0700</delta_ts>
            <desc>Example - assertion</desc>
            <filename>crash.html</filename>
            <type>text/html</type>
            <size>99</size>
            <attacher name="Dirk Schulze">krit</attacher>
            
              <data encoding="base64">PGRpdj48L2Rpdj4KPHNjcmlwdD4KZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2Rpdicp
WzBdLnN0eWxlLm1hcmdpblRvcCA9ICcyZTUwMHB4JzsKPC9zY3JpcHQ+
</data>

          </attachment>
      

    </bug>

</bugzilla>