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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLTokenizer.h

Issue 2438263002: Possibly merge consecutive script fragments to reduce execution overhead
Patch Set: Created 4 years, 2 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 | « AUTHORS ('k') | third_party/WebKit/Source/core/html/parser/HTMLTokenizer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/parser/HTMLTokenizer.h
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLTokenizer.h b/third_party/WebKit/Source/core/html/parser/HTMLTokenizer.h
index ae7e5f61f8fc0e161e5546de2291fd675f9f4165..77e9e5fd33f198437dc1f23b83e0561e80b541c6 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLTokenizer.h
+++ b/third_party/WebKit/Source/core/html/parser/HTMLTokenizer.h
@@ -180,6 +180,19 @@ class CORE_EXPORT HTMLTokenizer {
m_state == HTMLTokenizer::RCDATAState ||
m_state == HTMLTokenizer::RAWTEXTState);
}
+ void reserveAttributeForCheck();
+ bool checkIfMergeScripts(SegmentedString&);
+ const HTMLToken::Attribute* getAttributeFromList(const QualifiedName& name) {
+ for (unsigned i = 0; i < m_temporaryAttributeList.size(); ++i) {
+ if (m_temporaryAttributeList.at(i).name() == name.localName())
+ return &m_temporaryAttributeList.at(i);
+ }
+ return 0;
+ }
+ bool compareAttribute(SegmentedString&, unsigned&);
+ bool compareAttributeValue(SegmentedString&, unsigned&, const QualifiedName&);
+
+ Vector<UChar, 32> m_temporaryAttributeValueBuffer;
private:
explicit HTMLTokenizer(const HTMLParserOptions&);
@@ -248,6 +261,8 @@ class CORE_EXPORT HTMLTokenizer {
// this member might be pointing to unallocated memory.
HTMLToken* m_token;
+ HTMLToken::AttributeList m_temporaryAttributeList;
+
// http://www.whatwg.org/specs/web-apps/current-work/#additional-allowed-character
UChar m_additionalAllowedCharacter;
« no previous file with comments | « AUTHORS ('k') | third_party/WebKit/Source/core/html/parser/HTMLTokenizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698