Changeset 140446 in webkit
- Timestamp:
- Jan 22, 2013, 11:55:01 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r140445 r140446 1 2013-01-22 Adam Barth <abarth@webkit.org> 2 3 Wean BackgroundHTMLParser off HTMLInputStream 4 https://bugs.webkit.org/show_bug.cgi?id=107575 5 6 Reviewed by Eric Seidel. 7 8 The BackgroundHTMLParser doesn't need to use HTMLInputStream because it 9 doesn't need to handle nested calls to document.write. Instead, we can 10 just use a SegmentedString directly, which will let us checkpoint 11 m_input for speculation. 12 13 * html/parser/BackgroundHTMLParser.cpp: 14 (WebCore::BackgroundHTMLParser::append): 15 (WebCore::BackgroundHTMLParser::finish): 16 (WebCore::BackgroundHTMLParser::markEndOfFile): 17 (WebCore): 18 (WebCore::BackgroundHTMLParser::pumpTokenizer): 19 * html/parser/BackgroundHTMLParser.h: 20 (BackgroundHTMLParser): 21 1 22 2013-01-22 Sergio Villar Senin <svillar@igalia.com> 2 23 -
trunk/Source/WebCore/html/parser/BackgroundHTMLParser.cpp
r140441 r140446 102 102 void BackgroundHTMLParser::append(const String& input) 103 103 { 104 m_input.append ToEnd(input);104 m_input.append(SegmentedString(input)); 105 105 pumpTokenizer(); 106 106 } … … 114 114 void BackgroundHTMLParser::finish() 115 115 { 116 ASSERT(!m_input.haveSeenEndOfFile()); 117 m_input.markEndOfFile(); 116 markEndOfFile(); 118 117 pumpTokenizer(); 118 } 119 120 void BackgroundHTMLParser::markEndOfFile() 121 { 122 // FIXME: This should use InputStreamPreprocessor::endOfFileMarker 123 // once InputStreamPreprocessor is split off into its own header. 124 const LChar endOfFileMarker = 0; 125 126 ASSERT(!m_input.isClosed()); 127 m_input.append(SegmentedString(String(&endOfFileMarker, 1))); 128 m_input.close(); 119 129 } 120 130 … … 160 170 return; 161 171 162 while (m_tokenizer->nextToken(m_input .current(), m_token)) {172 while (m_tokenizer->nextToken(m_input, m_token)) { 163 173 m_pendingTokens.append(CompactHTMLToken(m_token)); 164 174 m_token.clear(); -
trunk/Source/WebCore/html/parser/BackgroundHTMLParser.h
r140441 r140446 30 30 31 31 #include "CompactHTMLToken.h" 32 #include "HTMLInputStream.h"33 32 #include "HTMLParserOptions.h" 34 33 #include "HTMLToken.h" … … 61 60 explicit BackgroundHTMLParser(const HTMLParserOptions&, ParserIdentifier); 62 61 62 void markEndOfFile(); 63 63 void pumpTokenizer(); 64 64 void simulateTreeBuilder(const CompactHTMLToken&); … … 66 66 void sendTokensToMainThread(); 67 67 68 HTMLInputStreamm_input;68 SegmentedString m_input; 69 69 HTMLToken m_token; 70 70 bool m_isPausedWaitingForScripts;
Note:
See TracChangeset
for help on using the changeset viewer.