Index: Source/core/html/parser/HTMLIdentifier.h |
diff --git a/Source/core/html/parser/HTMLIdentifier.h b/Source/core/html/parser/HTMLIdentifier.h |
index 003401314234ae5f0dfa3c35500594457900f15d..92af4ed97237364c660db60fd07c78a0fb632c53 100644 |
--- a/Source/core/html/parser/HTMLIdentifier.h |
+++ b/Source/core/html/parser/HTMLIdentifier.h |
@@ -56,6 +56,19 @@ public: |
m_string = String(vector); |
} |
+ HTMLIdentifier(const AtomicString& str, CharacterWidth width) |
abarth-chromium
2013/11/27 18:18:08
str -> string
Please use complete works in variab
oystein (OOO til 10th of July)
2013/11/27 18:46:33
Done.
|
+ : m_string(findIfKnown(str.characters16(), str.length())) |
abarth-chromium
2013/11/27 18:18:08
How do you know it's safe to call characters16? W
oystein (OOO til 10th of July)
2013/11/27 18:46:33
This is only ever used by the QualifiedName -> HTM
|
+ { |
+ if (m_string.impl()) |
+ return; |
+ if (width == Likely8Bit) |
+ m_string = StringImpl::create8BitIfPossible(str.characters16(), str.length()); |
+ else if (width == Force8Bit) |
+ m_string = String::make8BitFrom16BitSource(str.characters16(), str.length()); |
+ else |
+ m_string = str; |
+ } |
+ |
// asString should only be used on the main thread. |
const String& asString() const; |
// asStringImpl() is safe to call from any thread. |
@@ -65,6 +78,9 @@ public: |
bool isSafeToSendToAnotherThread() const { return m_string.isSafeToSendToAnotherThread(); } |
+ bool operator==(const QualifiedName&) const; |
+ bool operator!=(const QualifiedName& b) const; |
abarth-chromium
2013/11/27 18:18:08
Why does one of these functions have a formal para
oystein (OOO til 10th of July)
2013/11/27 18:46:33
Hm what ambiguity is there when comparing a Qualif
|
+ |
#ifndef NDEBUG |
static bool isKnown(const StringImpl*); |
#endif |