Summary: | Make TreeScope::rootNode return a reference | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antti Koivisto <koivisto> | ||||
Component: | DOM | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | ||||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Antti Koivisto
2014-02-17 14:41:48 PST
Created attachment 224428 [details]
patch
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. |