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

Unified Diff: Source/core/css/StyleSheetContents.cpp

Issue 1305973007: Clean up empty namespace handling and fix empty namespaces in compound selectors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@defaultns
Patch Set: Created 5 years, 3 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
« no previous file with comments | « Source/core/css/CSSSelectorList.cpp ('k') | Source/core/css/parser/CSSSelectorParser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/StyleSheetContents.cpp
diff --git a/Source/core/css/StyleSheetContents.cpp b/Source/core/css/StyleSheetContents.cpp
index 328cf80cc95b5ca97db57d8e6c35806663716e79..5c7304253063c8bdda010bf1297a5f51fe3003cf 100644
--- a/Source/core/css/StyleSheetContents.cpp
+++ b/Source/core/css/StyleSheetContents.cpp
@@ -274,7 +274,9 @@ void StyleSheetContents::parserAddNamespace(const AtomicString& prefix, const At
const AtomicString& StyleSheetContents::determineNamespace(const AtomicString& prefix)
{
if (prefix.isNull())
- return nullAtom; // No namespace. If an element/attribute has a namespace, we won't match it.
+ return defaultNamespace();
+ if (prefix.isEmpty())
+ return emptyAtom; // No namespace. If an element/attribute has a namespace, we won't match it.
if (prefix == starAtom)
return starAtom; // We'll match any namespace.
return m_namespaces.get(prefix);
« no previous file with comments | « Source/core/css/CSSSelectorList.cpp ('k') | Source/core/css/parser/CSSSelectorParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698