Changeset 176301 in webkit
- Timestamp:
- Nov 18, 2014 6:05:34 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r176298 r176301 1 2014-11-18 Chris Dumez <cdumez@apple.com> 2 3 Crash when setting 'z-index' / 'flex-shrink' CSS properties to a calculated value 4 https://bugs.webkit.org/show_bug.cgi?id=138783 5 6 Reviewed by Andreas Kling. 7 8 Add layout tests to check that settings 'z-index' / 'flex-shrink' CSS 9 properties to a calculated value does not crash and behaves as 10 expected. 11 12 * fast/css/flex-shrink-calculated-value-expected.txt: Added. 13 * fast/css/flex-shrink-calculated-value.html: Added. 14 * fast/css/z-index-calculated-value-expected.txt: Added. 15 * fast/css/z-index-calculated-value.html: Added. 16 1 17 2014-11-18 Commit Queue <commit-queue@webkit.org> 2 18 -
trunk/Source/WebCore/ChangeLog
r176298 r176301 1 2014-11-18 Chris Dumez <cdumez@apple.com> 2 3 Crash when setting 'z-index' / 'flex-shrink' CSS properties to a calculated value 4 https://bugs.webkit.org/show_bug.cgi?id=138783 5 6 Reviewed by Andreas Kling. 7 8 Update operators converting CSSPrimitiveValue to integer / floating 9 point types to properly handle calculated values (e.g. 'calc(2 * 3)'). 10 Previously, this was not working in release builds and we would hit an 11 ASSERT_NOT_REACHED() in debug builds. 12 13 Tests: fast/css/flex-shrink-calculated-value.html 14 fast/css/z-index-calculated-value.html 15 16 * css/CSSPrimitiveValueMappings.h: 17 (WebCore::CSSPrimitiveValue::operator unsigned short): 18 (WebCore::CSSPrimitiveValue::operator int): 19 (WebCore::CSSPrimitiveValue::operator unsigned): 20 (WebCore::CSSPrimitiveValue::operator float): 21 1 22 2014-11-18 Commit Queue <commit-queue@webkit.org> 2 23 -
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
r176258 r176301 83 83 template<> inline CSSPrimitiveValue::operator unsigned short() const 84 84 { 85 if ( m_primitiveUnitType== CSS_NUMBER)86 return clampTo<unsigned short>(m_value.num);85 if (primitiveType() == CSS_NUMBER) 86 return getValue<unsigned short>(); 87 87 88 88 ASSERT_NOT_REACHED(); … … 92 92 template<> inline CSSPrimitiveValue::operator int() const 93 93 { 94 if ( m_primitiveUnitType== CSS_NUMBER)95 return clampTo<int>(m_value.num);94 if (primitiveType() == CSS_NUMBER) 95 return getValue<int>(); 96 96 97 97 ASSERT_NOT_REACHED(); … … 101 101 template<> inline CSSPrimitiveValue::operator unsigned() const 102 102 { 103 if ( m_primitiveUnitType== CSS_NUMBER)104 return clampTo<unsigned>(m_value.num);103 if (primitiveType() == CSS_NUMBER) 104 return getValue<unsigned>(); 105 105 106 106 ASSERT_NOT_REACHED(); … … 118 118 template<> inline CSSPrimitiveValue::operator float() const 119 119 { 120 if ( m_primitiveUnitType== CSS_NUMBER)121 return clampTo<float>(m_value.num);120 if (primitiveType() == CSS_NUMBER) 121 return getValue<float>(); 122 122 123 123 ASSERT_NOT_REACHED();
Note: See TracChangeset
for help on using the changeset viewer.