WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
142456
Shrink the CSSPropertyID enum type
https://bugs.webkit.org/show_bug.cgi?id=142456
Summary
Shrink the CSSPropertyID enum type
Zan Dobersek
Reported
2015-03-08 12:08:36 PDT
Shrink the CSSPropertyID enum type
Attachments
Patch
(1.31 KB, patch)
2015-03-08 12:18 PDT
,
Zan Dobersek
no flags
Details
Formatted Diff
Diff
Patch
(1.81 KB, patch)
2015-03-09 06:50 PDT
,
Zan Dobersek
no flags
Details
Formatted Diff
Diff
Patch
(2.46 KB, patch)
2015-03-09 14:01 PDT
,
Zan Dobersek
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Zan Dobersek
Comment 1
2015-03-08 12:18:13 PDT
Created
attachment 248194
[details]
Patch
Sam Weinig
Comment 2
2015-03-08 13:40:04 PDT
Comment on
attachment 248194
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=248194&action=review
> Source/WebCore/css/makeprop.pl:279 > +enum CSSPropertyID : uint16_t {
Can you generate a static_assert (in CSSPropertyNames.cpp or somewhere similar) that asserts that the largest generated CSSPropertyID fits in 16bits?
Zan Dobersek
Comment 3
2015-03-09 06:50:53 PDT
Created
attachment 248243
[details]
Patch
Darin Adler
Comment 4
2015-03-09 13:23:55 PDT
Comment on
attachment 248243
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=248243&action=review
> Source/WebCore/css/makeprop.pl:137 > +static_assert(numCSSProperties + 1 <= std::numeric_limits<uint16_t>::max(), "CSSPropertyID should fit into uint16_t.");
Windows compiler doesn’t seem to be able to handle assertions that involve the numeric_limits max function; insufficient constexpr implementation perhaps?
> Source/WebCore/css/makeprop.pl:283 > +enum CSSPropertyID : uint16_t {
Need to remove the "< 0" check in CSSPrimitiveValue.cpp to make the compiler happy. Not sure why that < 0 was there.
Zan Dobersek
Comment 5
2015-03-09 13:47:28 PDT
Comment on
attachment 248243
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=248243&action=review
>> Source/WebCore/css/makeprop.pl:137 >> +static_assert(numCSSProperties + 1 <= std::numeric_limits<uint16_t>::max(), "CSSPropertyID should fit into uint16_t."); > > Windows compiler doesn’t seem to be able to handle assertions that involve the numeric_limits max function; insufficient constexpr implementation perhaps?
constexpr support in MSVC 2013 is non-existent.
Zan Dobersek
Comment 6
2015-03-09 14:01:49 PDT
Created
attachment 248273
[details]
Patch
Zan Dobersek
Comment 7
2015-03-10 02:21:47 PDT
Comment on
attachment 248273
[details]
Patch Clearing flags on attachment: 248273 Committed
r181320
: <
http://trac.webkit.org/changeset/181320
>
Zan Dobersek
Comment 8
2015-03-10 02:21:56 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.
Top of Page
Format For Printing
XML
Clone This Bug