Changeset 173688 in webkit
- Timestamp:
- Sep 17, 2014 1:54:50 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r173681 r173688 1 2014-09-16 Yusuke Suzuki <utatane.tea@gmail.com> 2 3 filterRootById accidentally clears inAdjacentChain flag 4 https://bugs.webkit.org/show_bug.cgi?id=136851 5 6 Reviewed by Benjamin Poulain. 7 8 When SubSelector comes, `inAdjacentChain` flag is cleared to false. 9 So for example, `document.querySelector("span#id + ok")` doesn't work correctly. 10 In this patch, we handles SubSelector relation correctly; don't change `inAdjacentChain` flag 11 to filter the right search root node. 12 13 * fast/selectors/filter-root-node-with-selector-contains-adjacents-expected.txt: Added. 14 * fast/selectors/filter-root-node-with-selector-contains-adjacents.html: Added. 15 1 16 2014-09-16 Yusuke Suzuki <utatane.tea@gmail.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r173687 r173688 1 2014-09-16 Yusuke Suzuki <utatane.tea@gmail.com> 2 3 filterRootById accidentally clears inAdjacentChain flag 4 https://bugs.webkit.org/show_bug.cgi?id=136851 5 6 Reviewed by Benjamin Poulain. 7 8 Test: fast/selectors/filter-root-node-with-selector-contains-adjacents.html 9 10 * dom/SelectorQuery.cpp: 11 (WebCore::filterRootById): 12 1 13 2014-09-16 Carlos Garcia Campos <cgarcia@igalia.com> 2 14 -
trunk/Source/WebCore/dom/SelectorQuery.cpp
r173590 r173688 1 1 /* 2 2 * Copyright (C) 2011, 2013, 2014 Apple Inc. All rights reserved. 3 * Copyright (C) 2014 Yusuke Suzuki <utatane.tea@gmail.com> 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 244 245 } 245 246 } 247 if (selector->relation() == CSSSelector::SubSelector) 248 continue; 246 249 if (selector->relation() == CSSSelector::DirectAdjacent || selector->relation() == CSSSelector::IndirectAdjacent) 247 250 inAdjacentChain = true; … … 584 587 if (m_entries.size() == maximumSelectorQueryCacheSize) 585 588 m_entries.remove(m_entries.begin()); 586 589 587 590 return m_entries.add(selectors, std::make_unique<SelectorQuery>(WTF::move(selectorList))).iterator->value.get(); 588 591 }
Note: See TracChangeset
for help on using the changeset viewer.