ValueRange looks like this: enum ValueRange { ValueRangeAll, ValueRangeNonNegative } It should be an `enum class : uint8_t`. This would make it smaller (one byte versus four) and harder to misuse.
Created attachment 426915 [details] Patch
Darin, here's one follow-up from https://bugs.webkit.org/show_bug.cgi?id=224718#c24 (parsing @counter-style descriptors).
Committed r276550 (236990@main): <https://commits.webkit.org/236990@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 426915 [details].
<rdar://problem/77106648>
Comment on attachment 426915 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426915&action=review > Source/WebCore/ChangeLog:23 > + making it smaller (one byte versus four) and harder to misuse (no > + auto-coercion to number types). Seems like a great change. For future reference, adding the underlying type of uint8_t is independent of changing from enum to enum class. Both are good ideas. I believe that for two-value enumerations, bool is an even better underlying type than uint8_t, and on the modern compilers we are compiling with both will use a single byte for storage.