Re-order Node flags so that flags used for similar purposes are grouped together.
Created attachment 349845 [details] Cleanup
Comment on attachment 349845 [details] Cleanup View in context: https://bugs.webkit.org/attachment.cgi?id=349845&action=review > Source/WebCore/dom/Node.h:566 > - IsConnectedFlag = 1 << 6, > - IsInShadowTreeFlag = 1 << 7, > - IsDocumentNodeFlag = 1 << 8, > - IsShadowRootFlag = 1 << 9, > + IsDocumentNodeFlag = 1 << 6, > + IsShadowRootFlag = 1 << 7, > + IsConnectedFlag = 1 << 8, > + IsInShadowTreeFlag = 1 << 9, > HasRareDataFlag = 1 << 10, I would prefer all the "= 1 << N" be aligned, so it's easy to see that they are increasing by one, but not everyone agrees. > Source/WebCore/dom/Node.h:584 > + StyleValidityShift = 22, Does this break our ability to use this enum with OptionSet<>?
(In reply to Simon Fraser (smfr) from comment #2) > Comment on attachment 349845 [details] > Cleanup > > View in context: > https://bugs.webkit.org/attachment.cgi?id=349845&action=review > > > Source/WebCore/dom/Node.h:566 > > - IsConnectedFlag = 1 << 6, > > - IsInShadowTreeFlag = 1 << 7, > > - IsDocumentNodeFlag = 1 << 8, > > - IsShadowRootFlag = 1 << 9, > > + IsDocumentNodeFlag = 1 << 6, > > + IsShadowRootFlag = 1 << 7, > > + IsConnectedFlag = 1 << 8, > > + IsInShadowTreeFlag = 1 << 9, > > HasRareDataFlag = 1 << 10, > > I would prefer all the "= 1 << N" be aligned, so it's easy to see that they > are increasing by one, but not everyone agrees. Well, if we did that, then we'd have to re-align them whenever a flag with a longer name than the current longest one is added. > > Source/WebCore/dom/Node.h:584 > > + StyleValidityShift = 22, > > Does this break our ability to use this enum with OptionSet<>? Yes. But we can probably just add two vales of StyleValidity directly to NodeFlags and do the manual conversion instead.
Committed r236083: <https://trac.webkit.org/changeset/236083>
<rdar://problem/44533292>