RESOLVED FIXED 62964
Support cast from CSSPrimitiveValue to short and use for CSSPropertyWidows and CSSPropertyOrphans.
https://bugs.webkit.org/show_bug.cgi?id=62964
Summary Support cast from CSSPrimitiveValue to short and use for CSSPropertyWidows an...
Luke Macpherson
Reported 2011-06-19 22:28:14 PDT
Support cast from CSSPrimitiveValue to short and use for CSSPropertyWidows and CSSPropertyOrphans.
Attachments
Patch (2.76 KB, patch)
2011-06-19 22:29 PDT, Luke Macpherson
no flags
Patch (2.77 KB, patch)
2011-06-19 23:44 PDT, Luke Macpherson
no flags
Luke Macpherson
Comment 1 2011-06-19 22:29:47 PDT
Eric Seidel (no email)
Comment 2 2011-06-19 23:36:03 PDT
Comment on attachment 97746 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=97746&action=review These seem kinda scary. But maybe they're useful? > Source/WebCore/ChangeLog:8 > + No new tests. (OOPS!) This will cause the cq to fail. Normally you replace this with a list of tests or why testing is impossible/impractical/unnecessary.
Luke Macpherson
Comment 3 2011-06-19 23:38:07 PDT
(In reply to comment #2) > (From update of attachment 97746 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=97746&action=review > > These seem kinda scary. But maybe they're useful? > > > Source/WebCore/ChangeLog:8 > > + No new tests. (OOPS!) > > This will cause the cq to fail. Normally you replace this with a list of tests or why testing is impossible/impractical/unnecessary. Ack. Yeah just overlooked that.
Luke Macpherson
Comment 4 2011-06-19 23:44:00 PDT
Dimitri Glazkov (Google)
Comment 5 2011-06-20 08:34:53 PDT
Comment on attachment 97753 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=97753&action=review > Source/WebCore/css/CSSPrimitiveValueMappings.h:57 > +template<> inline CSSPrimitiveValue::operator short() const I worry that we're getting a bit too fancy here. Will I be able to understand what this means 2 years from now?
Luke Macpherson
Comment 6 2011-06-22 10:21:50 PDT
Since CSSPrimitiveValue is essentially a union of all possible CSS types, including the number type, being able to cast CSSPrimitiveValue to numeric types seems reasonable. Could you expand on why you think this will be hard to understand (or harder than the numerous other casts that CSSPrimitiveValue supports)?
Dimitri Glazkov (Google)
Comment 7 2011-06-22 10:29:53 PDT
Comment on attachment 97753 [details] Patch I think it's because I have an unnatural antipathy toward templates and operators.
WebKit Review Bot
Comment 8 2011-06-22 10:42:41 PDT
Comment on attachment 97753 [details] Patch Clearing flags on attachment: 97753 Committed r89448: <http://trac.webkit.org/changeset/89448>
WebKit Review Bot
Comment 9 2011-06-22 10:42:45 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.