Bug 66281

Summary: Support cast from CSSPrimitiveValue to unsigned, and use in appropriate places in CSSStyleSelector::applyProperty
Product: WebKit Reporter: Luke Macpherson <macpherson>
Component: New BugsAssignee: Luke Macpherson <macpherson>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, macpherson, mitz, simon.fraser, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Luke Macpherson 2011-08-15 22:44:24 PDT
Support cast from CSSPrimitiveValue to unsigned, and use in appropriate places in CSSStyleSelector::applyProperty
Comment 1 Luke Macpherson 2011-08-15 22:49:09 PDT
Created attachment 104008 [details]
Patch
Comment 2 Eric Seidel (no email) 2011-08-17 11:26:35 PDT
Comment on attachment 104008 [details]
Patch

Seems previously it would ignore bad values, and now this will ASSERT on bad values, is that a correct reading?  Could you end up getting the grammar to hand the style-selector a non-number here?
Comment 3 Luke Macpherson 2011-08-17 16:26:32 PDT
That is correct, and it should be an assert because anything other than a number would indicate a bug in 

CSSParser.cpp:1524 - 1528
case CSSPropertyWebkitBoxFlex:
    validPrimitive = validUnit(value, FNumber, m_strict);
    break;
case CSSPropertyWebkitBoxFlexGroup:
case CSSPropertyWebkitBoxOrdinalGroup:
    validPrimitive = validUnit(value, FInteger | FNonNeg, true);

As you can see only the appropriate types are considered valid.
Comment 4 WebKit Review Bot 2011-08-17 17:07:12 PDT
Comment on attachment 104008 [details]
Patch

Clearing flags on attachment: 104008

Committed r93263: <http://trac.webkit.org/changeset/93263>
Comment 5 WebKit Review Bot 2011-08-17 17:07:16 PDT
All reviewed patches have been landed.  Closing bug.