Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Unified Diff: third_party/WebKit/Source/core/dom/SelectorQuery.cpp

Issue 1616423003: Fix selector namespace prefix resolution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review issues Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/SelectorQuery.cpp
diff --git a/third_party/WebKit/Source/core/dom/SelectorQuery.cpp b/third_party/WebKit/Source/core/dom/SelectorQuery.cpp
index 37dbb07d7b9f13cb226c907fc9ebaf572d6cd496..dc4c9569eb13e6a8d63cb9fde02112a916674201 100644
--- a/third_party/WebKit/Source/core/dom/SelectorQuery.cpp
+++ b/third_party/WebKit/Source/core/dom/SelectorQuery.cpp
@@ -547,19 +547,13 @@ SelectorQuery* SelectorQueryCache::add(const AtomicString& selectors, const Docu
if (it != m_entries.end())
return it->value.get();
- CSSSelectorList selectorList = CSSParser::parseSelector(CSSParserContext(document, nullptr), selectors);
+ CSSSelectorList selectorList = CSSParser::parseSelector(CSSParserContext(document, nullptr), nullptr, selectors);
if (!selectorList.first()) {
exceptionState.throwDOMException(SyntaxError, "'" + selectors + "' is not a valid selector.");
return nullptr;
}
- // throw a NamespaceError if the selector includes any namespace prefixes.
- if (selectorList.selectorsNeedNamespaceResolution()) {
- exceptionState.throwDOMException(NamespaceError, "'" + selectors + "' contains namespaces, which are not supported.");
- return nullptr;
- }
-
const unsigned maximumSelectorQueryCacheSize = 256;
if (m_entries.size() == maximumSelectorQueryCacheSize)
m_entries.remove(m_entries.begin());
« no previous file with comments | « third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp ('k') | third_party/WebKit/Source/core/html/HTMLContentElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698