It is never null
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.
https://trac.webkit.org/r164251