Simplify some shadow crossing logic in SelectorQuery.cpp
ElementTraversal::firstWithin is the same as doing ::next(rootNode, &rootNode) we can just do that here. We can also use isOpenOrV0() to remove some verbose checks, and finally we don't need to check isShadowHost (which contains a bunch of duplciate checks) and can just null check ::shadow() which is equivalent. BUG=703900 Review-Url: https://codereview.chromium.org/2782483004 Cr-Commit-Position: refs/heads/master@{#460544}
Showing
Please register or sign in to comment