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

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

Issue 1099963003: Support type selector for camel-cased SVG elements in HTML. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase issue. querySelector didn't use tagMatches anymore. Created 5 years, 7 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: Source/core/css/SelectorFilter.cpp
diff --git a/Source/core/css/SelectorFilter.cpp b/Source/core/css/SelectorFilter.cpp
index 42d4e3fd28cf558ab50cb26974734b93df647d15..0c9f7935c796f36528d9ddafc371b7540aa78588 100644
--- a/Source/core/css/SelectorFilter.cpp
+++ b/Source/core/css/SelectorFilter.cpp
@@ -30,6 +30,7 @@
#include "core/css/SelectorFilter.h"
#include "core/css/CSSSelector.h"
+#include "core/dom/Document.h"
namespace blink {
@@ -38,7 +39,10 @@ enum { TagNameSalt = 13, IdAttributeSalt = 17, ClassAttributeSalt = 19 };
static inline void collectElementIdentifierHashes(const Element& element, Vector<unsigned, 4>& identifierHashes)
{
- identifierHashes.append(element.localName().impl()->existingHash() * TagNameSalt);
+ AtomicString localName = element.localName();
+ if (!element.isHTMLElement() && element.document().isHTMLDocument())
+ localName = localName.lower();
+ identifierHashes.append(localName.impl()->existingHash() * TagNameSalt);
if (element.hasID())
identifierHashes.append(element.idForStyleResolution().impl()->existingHash() * IdAttributeSalt);
if (element.isStyledElement() && element.hasClass()) {

Powered by Google App Engine
This is Rietveld 408576698