Changeset 154037 in webkit
- Timestamp:
- Aug 13, 2013 7:16:56 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r154035 r154037 1 2013-08-13 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION(r150187): Safari fails to render allrecipe.com comment popups 4 https://bugs.webkit.org/show_bug.cgi?id=119780 5 6 Reviewed by Benjamin Poulain. 7 8 * fast/selectors/querySelector-id-with-multiple-elements-with-same-id-expected.txt: Added. 9 * fast/selectors/querySelector-id-with-multiple-elements-with-same-id.html: Added. 10 1 11 2013-08-13 Sam Weinig <sam@webkit.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r154036 r154037 1 2013-08-13 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION(r150187): Safari fails to render allrecipe.com comment popups 4 https://bugs.webkit.org/show_bug.cgi?id=119780 5 6 Reviewed by Benjamin Poulain. 7 8 The bug was caused by SelectorDataList::executeFastPathForIdSelector not verifying that 9 elements found by getAllElementsById are descendents of rootNode when there are multiple 10 elements of the same id. This resulted in querySelector and querySelectorAll of an element 11 returning nodes outside of the element. 12 13 Fixed the bug by checking this condition when we have multiple elements of the same id. 14 15 Test: fast/selectors/querySelector-id-with-multiple-elements-with-same-id.html 16 17 * dom/SelectorQuery.cpp: 18 (WebCore::SelectorDataList::executeFastPathForIdSelector): 19 1 20 2013-08-12 Ryosuke Niwa <rniwa@webkit.org> 2 21 -
trunk/Source/WebCore/dom/SelectorQuery.cpp
r153939 r154037 133 133 ASSERT(elements); 134 134 size_t count = elements->size(); 135 bool rootNodeIsTreeScopeRoot = isTreeScopeRoot(rootNode); 135 136 for (size_t i = 0; i < count; ++i) { 136 137 Element* element = elements->at(i); 137 if ( selectorMatches(selectorData, element, rootNode)) {138 if ((rootNodeIsTreeScopeRoot || element->isDescendantOf(rootNode)) && selectorMatches(selectorData, element, rootNode)) { 138 139 matchedElements.append(element); 139 140 if (firstMatchOnly)
Note: See TracChangeset
for help on using the changeset viewer.