Index: Source/core/dom/QualifiedName.h |
diff --git a/Source/core/dom/QualifiedName.h b/Source/core/dom/QualifiedName.h |
index 38673154a67f16684d3b44f5d599e697de86d8cd..891651e87e2ad66dae392d0cea0ac3804db78910 100644 |
--- a/Source/core/dom/QualifiedName.h |
+++ b/Source/core/dom/QualifiedName.h |
@@ -21,10 +21,11 @@ |
#ifndef QualifiedName_h |
#define QualifiedName_h |
-#include <wtf/Forward.h> |
-#include <wtf/HashTraits.h> |
-#include <wtf/RefCounted.h> |
-#include <wtf/text/AtomicString.h> |
+#include "wtf/Forward.h" |
+#include "wtf/HashTraits.h" |
+#include "wtf/LiteralSet.h" |
+#include "wtf/RefCounted.h" |
+#include "wtf/text/AtomicString.h" |
namespace WebCore { |
@@ -128,6 +129,24 @@ inline unsigned hashComponents(const QualifiedNameComponents& buf) |
return StringHasher::hashMemory<sizeof(QualifiedNameComponents)>(&buf); |
} |
+struct QualifiedNameComparer { |
+ static bool lessThan(const QualifiedName* const& a, const QualifiedName* const& b) |
+ { |
+ return a->impl() < b->impl(); |
+ } |
+}; |
+ |
+typedef LiteralSet<const QualifiedName*, QualifiedNameComparer> QualifiedNameLiteralSet; |
+ |
+struct LocalNameComparer { |
+ static bool lessThan(const QualifiedName* const& a, const QualifiedName* const& b) |
+ { |
+ return a->localName().impl() < b->localName().impl(); |
+ } |
+}; |
+ |
+typedef LiteralSet<const QualifiedName*, LocalNameComparer> LocalNameLiteralSet; |
+ |
struct QualifiedNameHash { |
static unsigned hash(const QualifiedName& name) { return hash(name.impl()); } |