WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
189643
Re-order Node flags based on semantics
https://bugs.webkit.org/show_bug.cgi?id=189643
Summary
Re-order Node flags based on semantics
Ryosuke Niwa
Reported
2018-09-14 18:48:45 PDT
Re-order Node flags so that flags used for similar purposes are grouped together.
Attachments
Cleanup
(3.33 KB, patch)
2018-09-14 18:52 PDT
,
Ryosuke Niwa
simon.fraser
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2018-09-14 18:52:13 PDT
Created
attachment 349845
[details]
Cleanup
Simon Fraser (smfr)
Comment 2
2018-09-14 19:01:16 PDT
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<>?
Ryosuke Niwa
Comment 3
2018-09-17 13:47:15 PDT
(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.
Ryosuke Niwa
Comment 4
2018-09-17 14:07:10 PDT
Committed
r236083
: <
https://trac.webkit.org/changeset/236083
>
Radar WebKit Bug Importer
Comment 5
2018-09-17 14:08:20 PDT
<
rdar://problem/44533292
>
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