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

Unified Diff: Source/core/html/parser/HTMLToken.h

Issue 342933003: Remove an unneccessary FIXME comment for HTMLToken (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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/html/parser/HTMLConstructionSite.cpp ('k') | Source/core/html/parser/HTMLTokenizer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLToken.h
diff --git a/Source/core/html/parser/HTMLToken.h b/Source/core/html/parser/HTMLToken.h
index e2b67fc33aa0894ad2f202b7a7e5fbda7455279b..ca56fc249843559aa963106ec21b3d6b3caa65bd 100644
--- a/Source/core/html/parser/HTMLToken.h
+++ b/Source/core/html/parser/HTMLToken.h
@@ -27,6 +27,7 @@
#define HTMLToken_h
#include "core/dom/Attribute.h"
+#include "core/html/parser/HTMLParserIdioms.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/RefPtr.h"
@@ -43,11 +44,10 @@ public:
{
}
- // FIXME: This should use String instead of Vector<UChar>.
bool m_hasPublicIdentifier;
bool m_hasSystemIdentifier;
- WTF::Vector<UChar> m_publicIdentifier;
- WTF::Vector<UChar> m_systemIdentifier;
+ String m_publicIdentifier;
+ String m_systemIdentifier;
bool m_forceQuirks;
};
@@ -112,6 +112,18 @@ public:
m_orAllData = 0;
}
+ void finalizeDoctypePublicIdentifier()
+ {
+ m_doctypeData->m_publicIdentifier = attemptStaticStringCreation(m_identifierBuffer, Likely8Bit);
+ m_identifierBuffer.clear();
+ }
+
+ void finalizeDoctypeSystemIdentifier()
+ {
+ m_doctypeData->m_systemIdentifier = StringImpl::create8BitIfPossible(m_identifierBuffer);
+ m_identifierBuffer.clear();
+ }
+
bool isUninitialized() { return m_type == Uninitialized; }
Type type() const { return m_type; }
@@ -190,14 +202,14 @@ public:
}
// FIXME: Distinguish between a missing public identifer and an empty one.
- const WTF::Vector<UChar>& publicIdentifier() const
+ const String& publicIdentifier() const
{
ASSERT(m_type == DOCTYPE);
return m_doctypeData->m_publicIdentifier;
}
// FIXME: Distinguish between a missing system identifer and an empty one.
- const WTF::Vector<UChar>& systemIdentifier() const
+ const String& systemIdentifier() const
{
ASSERT(m_type == DOCTYPE);
return m_doctypeData->m_systemIdentifier;
@@ -207,14 +219,12 @@ public:
{
ASSERT(m_type == DOCTYPE);
m_doctypeData->m_hasPublicIdentifier = true;
- m_doctypeData->m_publicIdentifier.clear();
}
void setSystemIdentifierToEmptyString()
{
ASSERT(m_type == DOCTYPE);
m_doctypeData->m_hasSystemIdentifier = true;
- m_doctypeData->m_systemIdentifier.clear();
}
void appendToPublicIdentifier(UChar character)
@@ -222,7 +232,7 @@ public:
ASSERT(character);
ASSERT(m_type == DOCTYPE);
ASSERT(m_doctypeData->m_hasPublicIdentifier);
- m_doctypeData->m_publicIdentifier.append(character);
+ m_identifierBuffer.append(character);
}
void appendToSystemIdentifier(UChar character)
@@ -230,7 +240,7 @@ public:
ASSERT(character);
ASSERT(m_type == DOCTYPE);
ASSERT(m_doctypeData->m_hasSystemIdentifier);
- m_doctypeData->m_systemIdentifier.append(character);
+ m_identifierBuffer.append(character);
}
PassOwnPtr<DoctypeData> releaseDoctypeData()
@@ -442,6 +452,7 @@ private:
int m_baseOffset;
DataVector m_data;
UChar m_orAllData;
+ Vector<UChar> m_identifierBuffer;
abarth-chromium 2014/06/19 16:07:02 You haven't actually improved anything because you
// For StartTag and EndTag
bool m_selfClosing;
« no previous file with comments | « Source/core/html/parser/HTMLConstructionSite.cpp ('k') | Source/core/html/parser/HTMLTokenizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698