WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 128934
Make TreeScope::rootNode return a reference
https://bugs.webkit.org/show_bug.cgi?id=128934
Summary
Make TreeScope::rootNode return a reference
Antti Koivisto
Reported
2014-02-17 14:41:48 PST
It is never null
Attachments
patch
(17.96 KB, patch)
2014-02-17 14:56 PST
,
Antti Koivisto
kling
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2014-02-17 14:56:21 PST
Created
attachment 224428
[details]
patch
Andreas Kling
Comment 2
2014-02-17 15:02:49 PST
Comment on
attachment 224428
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=224428&action=review
r=me assuming it builds.
> Source/WebCore/dom/Document.cpp:716 > + ContainerNode& rootNode = scope->rootNode(); > + for (auto& element : descendantsOfType<Element>(rootNode)) {
I don't think you need the 'rootNode' local.
> Source/WebCore/dom/ShadowRoot.h:98 > +inline bool isShadowRoot(const Node& node) { return node.isElementNode() && toElement(node).isShadowRoot(); }
Why do you need the isElementNode() check? Node has isShadowRoot().
> Source/WebCore/dom/ShadowRoot.h:100 > +NODE_TYPE_CASTS(ShadowRoot);
You don't need the semicolon here.
Antti Koivisto
Comment 3
2014-02-17 15:24:36 PST
https://trac.webkit.org/r164251
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