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

Side by Side Diff: Source/core/html/parser/HTMLDocumentParser.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 22 matching lines...) Expand all
33 #include "core/html/parser/BackgroundHTMLInputStream.h" 33 #include "core/html/parser/BackgroundHTMLInputStream.h"
34 #include "core/html/parser/CompactHTMLToken.h" 34 #include "core/html/parser/CompactHTMLToken.h"
35 #include "core/html/parser/HTMLInputStream.h" 35 #include "core/html/parser/HTMLInputStream.h"
36 #include "core/html/parser/HTMLParserOptions.h" 36 #include "core/html/parser/HTMLParserOptions.h"
37 #include "core/html/parser/HTMLPreloadScanner.h" 37 #include "core/html/parser/HTMLPreloadScanner.h"
38 #include "core/html/parser/HTMLScriptRunnerHost.h" 38 #include "core/html/parser/HTMLScriptRunnerHost.h"
39 #include "core/html/parser/HTMLSourceTracker.h" 39 #include "core/html/parser/HTMLSourceTracker.h"
40 #include "core/html/parser/HTMLToken.h" 40 #include "core/html/parser/HTMLToken.h"
41 #include "core/html/parser/HTMLTokenizer.h" 41 #include "core/html/parser/HTMLTokenizer.h"
42 #include "core/html/parser/HTMLTreeBuilderSimulator.h" 42 #include "core/html/parser/HTMLTreeBuilderSimulator.h"
43 #include "core/html/parser/TextResourceDecoder.h"
44 #include "core/html/parser/XSSAuditor.h" 43 #include "core/html/parser/XSSAuditor.h"
45 #include "core/html/parser/XSSAuditorDelegate.h" 44 #include "core/html/parser/XSSAuditorDelegate.h"
46 #include "platform/text/SegmentedString.h" 45 #include "platform/text/SegmentedString.h"
47 #include "wtf/Deque.h" 46 #include "wtf/Deque.h"
48 #include "wtf/OwnPtr.h" 47 #include "wtf/OwnPtr.h"
49 #include "wtf/WeakPtr.h" 48 #include "wtf/WeakPtr.h"
50 #include "wtf/text/TextPosition.h" 49 #include "wtf/text/TextPosition.h"
51 50
52 namespace WebCore { 51 namespace WebCore {
53 52
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 struct ParsedChunk { 89 struct ParsedChunk {
91 OwnPtr<CompactHTMLTokenStream> tokens; 90 OwnPtr<CompactHTMLTokenStream> tokens;
92 PreloadRequestStream preloads; 91 PreloadRequestStream preloads;
93 XSSInfoStream xssInfos; 92 XSSInfoStream xssInfos;
94 HTMLTokenizer::State tokenizerState; 93 HTMLTokenizer::State tokenizerState;
95 HTMLTreeBuilderSimulator::State treeBuilderState; 94 HTMLTreeBuilderSimulator::State treeBuilderState;
96 HTMLInputCheckpoint inputCheckpoint; 95 HTMLInputCheckpoint inputCheckpoint;
97 TokenPreloadScannerCheckpoint preloadScannerCheckpoint; 96 TokenPreloadScannerCheckpoint preloadScannerCheckpoint;
98 }; 97 };
99 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); 98 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>);
100 void didReceiveEncodingDataFromBackgroundParser(const DocumentEncodingData&) ;
101
102 virtual void appendBytes(const char* bytes, size_t length) OVERRIDE;
103 virtual void flush() OVERRIDE FINAL;
104 virtual void setDecoder(PassOwnPtr<TextResourceDecoder>) OVERRIDE FINAL;
105 99
106 UseCounter* useCounter() { return UseCounter::getFrom(contextForParsingSessi on()); } 100 UseCounter* useCounter() { return UseCounter::getFrom(contextForParsingSessi on()); }
107 101
108 protected: 102 protected:
109 virtual void insert(const SegmentedString&) OVERRIDE FINAL; 103 virtual void insert(const SegmentedString&) OVERRIDE FINAL;
110 virtual void append(PassRefPtr<StringImpl>) OVERRIDE; 104 virtual void append(PassRefPtr<StringImpl>) OVERRIDE;
111 virtual void finish() OVERRIDE FINAL; 105 virtual void finish() OVERRIDE FINAL;
112 106
113 HTMLDocumentParser(HTMLDocument*, bool reportErrors); 107 HTMLDocumentParser(HTMLDocument*, bool reportErrors);
114 HTMLDocumentParser(DocumentFragment*, Element* contextElement, ParserContent Policy); 108 HTMLDocumentParser(DocumentFragment*, Element* contextElement, ParserContent Policy);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 199
206 bool m_isPinnedToMainThread; 200 bool m_isPinnedToMainThread;
207 bool m_endWasDelayed; 201 bool m_endWasDelayed;
208 bool m_haveBackgroundParser; 202 bool m_haveBackgroundParser;
209 unsigned m_pumpSessionNestingLevel; 203 unsigned m_pumpSessionNestingLevel;
210 }; 204 };
211 205
212 } 206 }
213 207
214 #endif 208 #endif
OLDNEW
« no previous file with comments | « Source/core/html/parser/CSSPreloadScanner.h ('k') | Source/core/html/parser/HTMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698