Shrink the CSSPropertyID enum type
Created attachment 248194 [details] Patch
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?
Created attachment 248243 [details] Patch
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.
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.
Created attachment 248273 [details] Patch
Comment on attachment 248273 [details] Patch Clearing flags on attachment: 248273 Committed r181320: <http://trac.webkit.org/changeset/181320>
All reviewed patches have been landed. Closing bug.