Changeset 176454 in webkit
- Timestamp:
- Nov 21, 2014 11:00:56 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r176453 r176454 1 2014-11-21 Chris Dumez <cdumez@apple.com> 2 3 Crash when setting 'font' CSS property to 'calc(2 * 3)' 4 https://bugs.webkit.org/show_bug.cgi?id=138933 5 6 Reviewed by Darin Adler. 7 8 Add a layout test to cover the case where the 'font' CSS property is 9 set to a value whose weight is a calculated value, to make sure it 10 does not crash and behaves as intended. 11 12 * fast/css/font-calculated-value-expected.txt: Added. 13 * fast/css/font-calculated-value.html: Added. 14 1 15 2014-11-21 Bear Travis <betravis@gmail.com> 2 16 -
trunk/Source/WebCore/ChangeLog
r176453 r176454 1 2014-11-21 Chris Dumez <cdumez@apple.com> 2 3 Crash when setting 'font' CSS property to 'calc(2 * 3)' 4 https://bugs.webkit.org/show_bug.cgi?id=138933 5 6 Reviewed by Darin Adler. 7 8 The CSS Parser was not handling calculated values when parsing the font 9 weight. This would lead us to hit an assertion when parsing a font 10 property whose weight is set to a calculated value. 11 12 This patch updates parseFontWeight() to properly handle calculated 13 values. 14 15 Test: fast/css/font-calculated-value.html 16 17 * css/CSSParser.cpp: 18 (WebCore::CSSParser::parseFontWeight): 19 1 20 2014-11-21 Bear Travis <betravis@gmail.com> 2 21 -
trunk/Source/WebCore/css/CSSParser.cpp
r176390 r176454 6449 6449 } 6450 6450 if (validUnit(value, FInteger | FNonNeg, CSSQuirksMode)) { 6451 int weight = static_cast<int>( value->fValue);6451 int weight = static_cast<int>(parsedDouble(value, ReleaseParsedCalcValue)); 6452 6452 if (!(weight % 100) && weight >= 100 && weight <= 900) { 6453 6453 addProperty(CSSPropertyFontWeight, cssValuePool().createIdentifierValue(createFontWeightValueKeyword(weight)), important);
Note: See TracChangeset
for help on using the changeset viewer.