⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 176458 in webkit


Ignore:
Timestamp:
Nov 21, 2014, 11:48:21 AM (12 years ago)
Author:
Chris Dumez
Message:

Crash when setting 'transition-delay' CSS property to a calculated value
https://bugs.webkit.org/show_bug.cgi?id=138784

Reviewed by Sam Weinig.

Source/WebCore:

Update CSSPrimitiveValue::computeTime() to use primitiveType() instead
of m_primitiveUnitType so that it properly handles calculated values.
Without this, we would hit the ASSERT_NOT_REACHED() assertion in
computeTime() for calculated values.

Test: fast/css/transition-delay-calculated-value.html

  • css/CSSPrimitiveValue.h:

(WebCore::CSSPrimitiveValue::computeTime):

LayoutTests:

Add a layout test to check that setting the 'transition-delay' CSS
property to a calculated value does not crash and works as intended.

  • fast/css/transition-delay-calculated-value-expected.txt: Added.
  • fast/css/transition-delay-calculated-value.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r176456 r176458  
     12014-11-21  Chris Dumez  <cdumez@apple.com>
     2
     3        Crash when setting 'transition-delay' CSS property to a calculated value
     4        https://bugs.webkit.org/show_bug.cgi?id=138784
     5
     6        Reviewed by Sam Weinig.
     7
     8        Add a layout test to check that setting the 'transition-delay' CSS
     9        property to a calculated value does not crash and works as intended.
     10
     11        * fast/css/transition-delay-calculated-value-expected.txt: Added.
     12        * fast/css/transition-delay-calculated-value.html: Added.
     13
    1142014-11-20  Roger Fong  <roger_fong@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r176455 r176458  
     12014-11-21  Chris Dumez  <cdumez@apple.com>
     2
     3        Crash when setting 'transition-delay' CSS property to a calculated value
     4        https://bugs.webkit.org/show_bug.cgi?id=138784
     5
     6        Reviewed by Sam Weinig.
     7
     8        Update CSSPrimitiveValue::computeTime() to use primitiveType() instead
     9        of m_primitiveUnitType so that it properly handles calculated values.
     10        Without this, we would hit the ASSERT_NOT_REACHED() assertion in
     11        computeTime() for calculated values.
     12
     13        Test: fast/css/transition-delay-calculated-value.html
     14
     15        * css/CSSPrimitiveValue.h:
     16        (WebCore::CSSPrimitiveValue::computeTime):
     17
    1182014-11-21  Chris Dumez  <cdumez@apple.com>
    219
  • trunk/Source/WebCore/css/CSSPrimitiveValue.h

    r175197 r176458  
    260260    template <typename T, TimeUnit timeUnit> T computeTime()
    261261    {
    262         if (timeUnit == Seconds && m_primitiveUnitType == CSS_S)
     262        if (timeUnit == Seconds && primitiveType() == CSS_S)
    263263            return getValue<T>();
    264         if (timeUnit == Seconds && m_primitiveUnitType == CSS_MS)
     264        if (timeUnit == Seconds && primitiveType() == CSS_MS)
    265265            return getValue<T>() / 1000;
    266         if (timeUnit == Milliseconds && m_primitiveUnitType == CSS_MS)
     266        if (timeUnit == Milliseconds && primitiveType() == CSS_MS)
    267267            return getValue<T>();
    268         if (timeUnit == Milliseconds && m_primitiveUnitType == CSS_S)
     268        if (timeUnit == Milliseconds && primitiveType() == CSS_S)
    269269            return getValue<T>() * 1000;
    270270        ASSERT_NOT_REACHED();
Note: See TracChangeset for help on using the changeset viewer.