DescriptionClassRootNodeList should start from rootNode, not the first child of rootNode.
When some selector like ".class > div" (a class selector is not the right-most one),
ClassRootNodeList is used to find all elements which match the class selector (in this case, .class).
Suppose that we have the following DOM tree and we try document.body.querySelector('.class > div') and
document.body.querySelectorAll('class > div').
<body class='.class'>
<div></div>
</body>
If ClassRootNodeList starts from a given rootNode, i.e. document.body,
since there are no child elements of body whose class attirbute is "class",
the querySelector and querySelectorAll doesn't match any elements. This is a problem.
BUG=304069
TEST=fast/selectors/querySelector-leftmost-selector-matches-rootNode.html
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=159014
Patch Set 1 #
Total comments: 2
Patch Set 2 : Patch for landing #
Messages
Total messages: 6 (0 generated)
|