Changeset 62233 in webkit
- Timestamp:
- Jul 1, 2010 12:39:52 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r62232 r62233 1 2010-07-01 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 BogusCommentState should come in from the cold 6 https://bugs.webkit.org/show_bug.cgi?id=41439 7 8 Test progression => :) 9 10 * html5lib/runner-expected.txt: 11 * html5lib/webkit-resumer-expected.txt: 12 1 13 2010-07-01 Eric Seidel <eric@webkit.org> 2 14 -
trunk/LayoutTests/html5lib/runner-expected.txt
r62232 r62233 10 10 33 11 11 34 12 4113 12 50 14 13 51 -
trunk/LayoutTests/html5lib/webkit-resumer-expected.txt
r61956 r62233 158 158 CONSOLE MESSAGE: line 2: FOO<span>BAR</span>BAZ 159 159 resources/webkit01.dat: 160 519.3161 520.4162 521.5163 522.6164 523.7165 160 593.1 166 161 594.2 -
trunk/WebCore/ChangeLog
r62229 r62233 1 2010-07-01 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 BogusCommentState should come in from the cold 6 https://bugs.webkit.org/show_bug.cgi?id=41439 7 8 The BogusCommentState has always been wrong. The proximate issue is 9 that it didn't handle resuming correctly when parsing a partial input 10 stream. Now that we have EOF working properly, we can actually 11 implement this state correctly. 12 13 We need to distinguish when we enter this state from when we continue 14 in this state. We could do that with a branch for each character, but 15 it seemed easier to split the state in two, even though that leaves us 16 with one more state in our tokenizer than we have in the HTML5 spec. 17 18 * html/HTMLTokenizer.cpp: 19 (WebCore::HTMLTokenizer::nextToken): 20 * html/HTMLTokenizer.h: 21 (WebCore::HTMLTokenizer::): 22 1 23 2010-06-30 Adam Barth <abarth@webkit.org> 2 24 -
trunk/WebCore/html/HTMLTokenizer.cpp
r62229 r62233 1058 1058 1059 1059 BEGIN_STATE(BogusCommentState) { 1060 // FIXME: This state isn't correct because we'll terminate the1061 // comment early if we don't have the whole input stream available.1062 1060 m_token->beginComment(); 1063 while (!source.isEmpty()) { 1064 cc = m_inputStreamPreprocessor.nextInputCharacter(); 1065 if (cc == '>') 1066 return emitAndResumeIn(source, DataState); 1061 RECONSUME_IN(ContinueBogusCommentState); 1062 } 1063 END_STATE() 1064 1065 BEGIN_STATE(ContinueBogusCommentState) { 1066 if (cc == '>') 1067 return emitAndResumeIn(source, DataState); 1068 else if (cc == InputStreamPreprocessor::endOfFileMarker) 1069 return emitAndReconsumeIn(source, DataState); 1070 else { 1067 1071 m_token->appendToComment(cc); 1068 m_inputStreamPreprocessor.advance(source, m_lineNumber); 1069 // We ignore the return value (which indicates that |source| is 1070 // empty) because it's checked by the loop condition above. 1071 } 1072 m_state = DataState; 1073 return true; 1074 // FIXME: Handle EOF properly. 1072 ADVANCE_TO(ContinueBogusCommentState); 1073 } 1075 1074 } 1076 1075 END_STATE() -
trunk/WebCore/html/HTMLTokenizer.h
r62175 r62233 84 84 SelfClosingStartTagState, 85 85 BogusCommentState, 86 // The ContinueBogusCommentState is not in the HTML5 spec, but we use 87 // it internally to keep track of whether we've started the bogus 88 // comment token yet. 89 ContinueBogusCommentState, 86 90 MarkupDeclarationOpenState, 87 91 CommentStartState,
Note: See TracChangeset
for help on using the changeset viewer.