Bug 66281 - Support cast from CSSPrimitiveValue to unsigned, and use in appropriate places in CSSStyleSelector::applyProperty
Summary: Support cast from CSSPrimitiveValue to unsigned, and use in appropriate place...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Luke Macpherson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-15 22:44 PDT by Luke Macpherson
Modified: 2011-08-17 17:07 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.70 KB, patch)
2011-08-15 22:49 PDT, Luke Macpherson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.