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

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

Issue 133273007: Revert "Moved text decoding to the parser thread" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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/HTMLBaseElement.cpp ('k') | Source/core/html/parser/BackgroundHTMLParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/BackgroundHTMLParser.h
diff --git a/Source/core/html/parser/BackgroundHTMLParser.h b/Source/core/html/parser/BackgroundHTMLParser.h
index f1a76fd000577676c9ef0ea5b580076ebfeb221d..b9b5a511c49d5ef2ff926353764448aa7ffb06f4 100644
--- a/Source/core/html/parser/BackgroundHTMLParser.h
+++ b/Source/core/html/parser/BackgroundHTMLParser.h
@@ -31,6 +31,8 @@
#include "core/html/parser/HTMLParserOptions.h"
#include "core/html/parser/HTMLPreloadScanner.h"
#include "core/html/parser/HTMLSourceTracker.h"
+#include "core/html/parser/HTMLToken.h"
+#include "core/html/parser/HTMLTokenizer.h"
#include "core/html/parser/HTMLTreeBuilderSimulator.h"
#include "core/html/parser/XSSAuditorDelegate.h"
#include "wtf/PassOwnPtr.h"
@@ -39,7 +41,6 @@
namespace WebCore {
class HTMLDocumentParser;
-class SharedBuffer;
class XSSAuditor;
class BackgroundHTMLParser {
@@ -50,10 +51,13 @@ public:
WeakPtr<HTMLDocumentParser> parser;
OwnPtr<XSSAuditor> xssAuditor;
OwnPtr<TokenPreloadScanner> preloadScanner;
- OwnPtr<TextResourceDecoder> decoder;
};
- static void start(PassRefPtr<WeakReference<BackgroundHTMLParser> >, PassOwnPtr<Configuration>);
+ static void create(PassRefPtr<WeakReference<BackgroundHTMLParser> > reference, PassOwnPtr<Configuration> config)
+ {
+ new BackgroundHTMLParser(reference, config);
+ // Caller must free by calling stop().
+ }
struct Checkpoint {
WeakPtr<HTMLDocumentParser> parser;
@@ -65,9 +69,7 @@ public:
String unparsedInput;
};
- void appendBytes(PassOwnPtr<Vector<char> >);
- void setDecoder(PassOwnPtr<TextResourceDecoder>);
- void flush();
+ void append(const String&);
void resumeFrom(PassOwnPtr<Checkpoint>);
void startedChunkWithCheckpoint(HTMLInputCheckpoint);
void finish();
@@ -77,13 +79,10 @@ public:
private:
BackgroundHTMLParser(PassRefPtr<WeakReference<BackgroundHTMLParser> >, PassOwnPtr<Configuration>);
- ~BackgroundHTMLParser();
- void append(const String&);
void markEndOfFile();
void pumpTokenizer();
void sendTokensToMainThread();
- void updateDocument(const String& decodedData);
WeakPtrFactory<BackgroundHTMLParser> m_weakFactory;
BackgroundHTMLInputStream m_input;
@@ -100,8 +99,6 @@ private:
OwnPtr<XSSAuditor> m_xssAuditor;
OwnPtr<TokenPreloadScanner> m_preloadScanner;
- OwnPtr<TextResourceDecoder> m_decoder;
- DocumentEncodingData m_lastSeenEncodingData;
};
}
« no previous file with comments | « Source/core/html/HTMLBaseElement.cpp ('k') | Source/core/html/parser/BackgroundHTMLParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698