Changeset 166114 in webkit


Ignore:
Timestamp:
Mar 22, 2014 8:16:42 AM (10 years ago)
Author:
Darin Adler
Message:

ASSERTION FAILED: std::isfinite(num) in WebCore::CSSPrimitiveValue::CSSPrimitiveValue
https://bugs.webkit.org/show_bug.cgi?id=127361

Source/WebCore:

Huge numbers represented by the 'INF' value can not be used
in CSS rules, so they make the assert fail. We have to make
sure that the parsed property value is finite, otherwise
the property will be dropped.

Test: fast/css/infinite-floating-value.html

Patch by Martin Hodovan <mhodovan@inf.u-szeged.hu> on 2014-03-22

  • css/CSSValuePool.cpp:

(WebCore::CSSValuePool::createValue):

LayoutTests:

Added test shows that CSS rules containing huge numbers
(which are transformed into 'INF' values after parsing)
are dropped.

Patch by Martin Hodovan <mhodovan@inf.u-szeged.hu> on 2014-03-22
Reviewed by Darin Adler.

  • fast/css/infinite-floating-value-expected.txt: Added.
  • fast/css/infinite-floating-value.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r166107 r166114  
     12014-03-22  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
     2
     3        ASSERTION FAILED: std::isfinite(num) in WebCore::CSSPrimitiveValue::CSSPrimitiveValue
     4        https://bugs.webkit.org/show_bug.cgi?id=127361
     5
     6        Added test shows that CSS rules containing huge numbers
     7        (which are transformed into 'INF' values after parsing)
     8        are dropped.
     9
     10        Reviewed by Darin Adler.
     11
     12        * fast/css/infinite-floating-value-expected.txt: Added.
     13        * fast/css/infinite-floating-value.html: Added.
     14
    1152014-03-21  Mark Lam  <mark.lam@apple.com>
    216
  • trunk/Source/WebCore/ChangeLog

    r166111 r166114  
     12014-03-22  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
     2
     3        ASSERTION FAILED: std::isfinite(num) in WebCore::CSSPrimitiveValue::CSSPrimitiveValue
     4        https://bugs.webkit.org/show_bug.cgi?id=127361
     5
     6        Huge numbers represented by the 'INF' value can not be used
     7        in CSS rules, so they make the assert fail. We have to make
     8        sure that the parsed property value is finite, otherwise
     9        the property will be dropped.
     10
     11        Test: fast/css/infinite-floating-value.html
     12
     13        * css/CSSValuePool.cpp:
     14        (WebCore::CSSValuePool::createValue):
     15
    1162014-03-21  Zalan Bujtas  <zalan@apple.com>
    217
  • trunk/Source/WebCore/css/CSSValuePool.cpp

    r165607 r166114  
    9090PassRef<CSSPrimitiveValue> CSSValuePool::createValue(double value, CSSPrimitiveValue::UnitTypes type)
    9191{
     92    if (std::isinf(value))
     93        return createIdentifierValue(CSSValueID::CSSValueInvalid);
     94
    9295    if (value < 0 || value > maximumCacheableIntegerValue)
    9396        return CSSPrimitiveValue::create(value, type);
Note: See TracChangeset for help on using the changeset viewer.