Summary: | Crash upon parsing CSS: unicode-range: searchfield-cancel-buttonpt=-webkit-dashboard-region= | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Robert Swiecki <robert.swiecki+wkbugs> | ||||||
Component: | WebKit Misc. | Assignee: | Beth Dakin <bdakin> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | Keywords: | HasReduction, InRadar | ||||||
Priority: | P1 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Attachments: |
|
Description
Robert Swiecki
2008-08-25 13:26:37 PDT
CSSParserValue::createCSSValue needs to handle unknown identifiers. It drops them on the floor right now and returns 0. Then the value list ends up with a null item. We should fix this method to actually create a CSSPrimitiveValue that can really be used. (Will probably need a new unit type like CSS_PARSER_IDENTIFIER for unknown identifiers.) Created attachment 23537 [details]
Patch to handle invalid IDs
Comment on attachment 23537 [details]
Patch to handle invalid IDs
All you're doing is making a value that has absolutely no contents. You need to actually store the string and implement the round-tripping like the other CSS_PARSER_*** types do.
We're going to be turning CSS variables off, which means this bug isn't that high priority.
Created attachment 23539 [details]
Patch 2
I see. Using the other CSS_PARSER… types as a model, I think this does that.
Comment on attachment 23539 [details]
Patch 2
+ case CSS_PARSER_IDENTIFIER:
+ text = quoteStringIfNeeded(m_value.string);
Add a "break;" in case we add more cases in the future.
This line is wrong:
+ value.unit = m_type;
It should set the type to CSS_IDENT.
Please put the layout test under fast/css/variables, since when we turn CSS variables off, we don't want to have to look for tests in other subdirectories.
Fix those two things and r=me
Fixed both and moved the tests. Thanks, Dave! |