Changeset 36624 in webkit
- Timestamp:
- Sep 18, 2008 3:18:01 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r36608 r36624 1 2008-09-18 Beth Dakin <bdakin@apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 Test for https://bugs.webkit.org/show_bug.cgi?id=20515 Crash upon 6 parsing CSS: unicode-range: searchfield-cancel-buttonpt=-webkit- 7 dashboard-region= 8 and corresponding: <rdar://problem/6174100> 9 10 * fast/css/variables/invalid-identifier-expected.txt: Added. 11 * fast/css/variables/invalid-identifier.html: Added. 12 1 13 2008-09-18 Mark Rowe <mrowe@apple.com> 2 14 -
trunk/WebCore/ChangeLog
r36623 r36624 1 2008-09-18 Beth Dakin <bdakin@apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 Fix for https://bugs.webkit.org/show_bug.cgi?id=20515 Crash upon 6 parsing CSS: unicode-range: searchfield-cancel-buttonpt=-webkit- 7 dashboard-region= 8 and corresponding: <rdar://problem/6174100> 9 10 This patch makes CSSParserValue::createCSSValue handle unknown 11 identifiers. 12 13 * css/CSSParserValues.cpp: 14 (WebCore::CSSParserValue::createCSSValue): If we have an identifier 15 with no id (an unknown identifier) create a CSSPrimitiveValue of 16 type CSS_PARSER_IDENTIFIER 17 * css/CSSPrimitiveValue.cpp: 18 (WebCore::CSSPrimitiveValue::cssText): 19 (WebCore::CSSPrimitiveValue::parserValue): 20 * css/CSSPrimitiveValue.h: 21 (WebCore::CSSPrimitiveValue::): 22 1 23 2008-09-18 Sam Weinig <sam@webkit.org> 2 24 -
trunk/WebCore/css/CSSParserValues.cpp
r35351 r36624 62 62 if (id) 63 63 parsedValue = CSSPrimitiveValue::createIdentifier(id); 64 else if (unit == CSSPrimitiveValue::CSS_IDENT) 65 parsedValue = CSSPrimitiveValue::create(string, CSSPrimitiveValue::CSS_PARSER_IDENTIFIER); 64 66 else if (unit == CSSPrimitiveValue::CSS_NUMBER && isInt) 65 67 parsedValue = CSSPrimitiveValue::create(fValue, CSSPrimitiveValue::CSS_PARSER_INTEGER); -
trunk/WebCore/css/CSSPrimitiveValue.cpp
r35351 r36624 770 770 text = String(&c, 1U); 771 771 break; 772 case CSS_PARSER_IDENTIFIER: 773 text = quoteStringIfNeeded(m_value.string); 774 break; 772 775 } 773 776 return text; … … 829 832 value.isInt = true; 830 833 break; 834 case CSS_PARSER_IDENTIFIER: 835 value.string.characters = const_cast<UChar*>(m_value.string->characters()); 836 value.string.length = m_value.string->length(); 837 value.unit = CSSPrimitiveValue::CSS_IDENT; 838 break; 831 839 case CSS_UNKNOWN: 832 840 case CSS_ATTR: -
trunk/WebCore/css/CSSPrimitiveValue.h
r35351 r36624 76 76 CSS_PARSER_VARIABLE_EQUALS_SYNTAX = 106, 77 77 CSS_PARSER_VARIABLE_DOLLAR_SYNTAX = 107, 78 CSS_PARSER_HEXCOLOR = 108 78 CSS_PARSER_HEXCOLOR = 108, 79 80 // This is used internally for unknown identifiers 81 CSS_PARSER_IDENTIFIER = 109 79 82 }; 80 83
Note: See TracChangeset
for help on using the changeset viewer.