- 04 Jun, 2010 9 commits
-
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 Make all the state transitions in the machine explicit. This allows us to remove all the break statements, which won't work correctly after we change the macro definitions. Also, while I was looking at every line of code, I fixed a bunch of the one-line-if style errors introduces in my previous patches. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 Change the intent of the loop to match what it's going to be once we remove the loop. This is a whitespace only change that will make the final diff much, much smaller. Sorry for the transient ugly style. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 Introduce ADVANCE_TO macro. This is the last macro we need to introduce. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 Fix the rest of the RECONSUME_IN cases that were missed by our script. Also, reorder some assigment to prepare for the ADVANCE_TO patch. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 This patch handles the FLUSH_AND_ADVANCE_TO case. Again, this patch introduces style errors that will be fixed shortly. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 This patch handles the FLUSH_EMIT_AND_RESUME_IN case. This patch introduces some bad style w.r.t. one-line if statements, but we'll fix them all automatically in cleanup patch when we're done. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 More small steps. This patch deals with emitting tokens. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 The next step: using macros to delimit each state. Evetually, we're going to change what these macros expand to. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 We're going to do this patch in small steps to make it easier to verify correctness. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 02 Jun, 2010 1 commit
-
-
eric@webkit.org authored
Reviewed by Adam Barth. HTML5 parser does not track line numbers https://bugs.webkit.org/show_bug.cgi?id=39984 Update our expectations to show the proper line numbers. These new line numbers match what the old parser produces. * html5lib/runner-expected-html5.txt: * html5lib/webkit-resumer-expected-html5.txt: 2010-06-02 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. HTML5 parser does not track line numbers https://bugs.webkit.org/show_bug.cgi?id=39984 This adds rudimentary line-number tracking to the HTML5Lexer. We'll still need to handle \r\n cases eventually, but this fixes the vast majority of our line-number related failures. Fixes 268 layout tests. :) * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::reset): - Reset m_lineNumber to 0. (WebCore::HTML5Lexer::consumeEntity): - Pass m_lineNumber to advance(). (WebCore::HTML5Lexer::nextToken): - Pass m_lineNumber to advance(). * html/HTML5Lexer.h: (WebCore::HTML5Lexer::lineNumber): - Expose m_lineNumber for HTML5Tokenizer. (WebCore::HTML5Lexer::columnNumber): - Mirrors the implementation in the old HTMLTokenizer. we might some day support column number tracking in the Lexer. It certainly would be possible. * html/HTML5ScriptRunner.cpp: (WebCore::HTML5ScriptRunner::HTML5ScriptRunner): - ASSERT we're passed a host. (WebCore::HTML5ScriptRunner::sourceFromPendingScript): - Use PendingScript.startingLineNumber when PendingScript is an inline script. (WebCore::HTML5ScriptRunner::execute): - Now expects a start line number passed from the TreeBuilder. (WebCore::HTML5ScriptRunner::runScript): - Now expects a start line number. * html/HTML5ScriptRunner.h: (WebCore::HTML5ScriptRunner::PendingScript::PendingScript): - Track startingLineNumber for any inline script. * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::begin): - Add a FIXME. The old HTMLTokenizer resets its "lexer" state here. (WebCore::HTML5Tokenizer::pumpLexer): - Pass scriptStartLine to the HTML5ScriptRunner (WebCore::HTML5Tokenizer::lineNumber): - Implementation for Tokenizer.h (WebCore::HTML5Tokenizer::columnNumber): - Implementation for Tokenizer.h * html/HTML5Tokenizer.h: * html/HTML5TreeBuilder.cpp: (WebCore::HTML5TreeBuilder::HTML5TreeBuilder): - Initialize the new line number tracking variables. (WebCore::HTML5TreeBuilder::handleScriptEndTag): - Save off the line number from the start tag to pass to the ScriptRunner. (WebCore::HTML5TreeBuilder::takeScriptToProcess): - Return the line number from the start tag. (WebCore::HTML5TreeBuilder::passTokenToLegacyParser): - Save off the line number of ever script start tag we see. * html/HTML5TreeBuilder.h: - Keep both the line number of the last start tag, and the line number of the script we know we're expecting our caller to run before resuming parsing. These are separate to keep the code clean, especially since the last script start tag line number is a hack specific to using the old HTMLParser. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 01 Jun, 2010 1 commit
-
-
eric@webkit.org authored
Reviewed by Eric Seidel. Fix default action for EndTagOpenState https://bugs.webkit.org/show_bug.cgi?id=39982 Add a test for a bogus end tag to webkit01.dat and update expected results now that we pass some more tests. Adding this test revealed a bug in resuming the bogus comment state. I've left these broken expectations, but I'll fix the bug in a future patch. (The bug existed prior to this patch, just not the test.) * html5lib/resources/webkit01.dat: * html5lib/runner-expected-html5.txt: * html5lib/webkit-resumer-expected-html5.txt: 2010-05-31 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Fix default action for EndTagOpenState https://bugs.webkit.org/show_bug.cgi?id=39982 Add a test for a bogus end tag to webkit01.dat and update expected results now that we pass some more tests. Adding this test revealed a bug in resuming the bogus comment state. I've left these broken expectations, but I'll fix the bug in a future patch. (The bug existed prior to this patch, just not the test.) * html5lib/resources/webkit01.dat: * html5lib/runner-expected-html5.txt: * html5lib/webkit-resumer-expected-html5.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 31 May, 2010 1 commit
-
-
eric@webkit.org authored
Reviewed by Darin Adler. Fix LayoutTests/fast/parser/xml-declaration-missing-ending-mark.html in HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=39939 Add some tests for the bogus comment state. * html5lib/resources/comments01.dat: * html5lib/runner-expected.txt: 2010-05-30 Adam Barth <abarth@webkit.org> Reviewed by Darin Adler. Fix LayoutTests/fast/parser/xml-declaration-missing-ending-mark.html in HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=39939 Turns out we need to implement the bogus comment state. :) * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 28 May, 2010 2 commits
-
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Named entities in attributes aren't parsed correctly by HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=39873 I misplaced this if statement when writing this code originally. Now that we have test coverage for this paragraph in the spec, we can see and fix the bug. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::consumeEntity): 2010-05-28 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Named entities in attributes aren't parsed correctly by HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=39873 Add a test suite for parsing entities in attributes and update expected results. * html5lib/resources/entities02.dat: Added. * html5lib/runner-expected-html5.txt: * html5lib/runner-expected.txt: * html5lib/runner.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Handle edge cases in HTML5 entity parsing https://bugs.webkit.org/show_bug.cgi?id=39823 The HTML5 specification tells us to handle HTML entities in a somewhat complicated way. This patch attempts to correctly handle numeric entities. Some of this code is duplicated from HTMLTokenizer. * html/HTML5Lexer.cpp: (WebCore::HTMLNames::): (WebCore::HTMLNames::adjustEntity): (WebCore::HTMLNames::legalEntityFor): (WebCore::HTML5Lexer::consumeEntity): (WebCore::HTML5Lexer::processEntity): (WebCore::HTML5Lexer::nextToken): (WebCore::HTML5Lexer::emitCodePoint): * html/HTML5Lexer.h: 2010-05-28 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Handle edge cases in HTML5 entity parsing https://bugs.webkit.org/show_bug.cgi?id=39823 Tests a bunch of the edge cases of entity handling in the HTML5 specification. * html5lib/resources/entities01.dat: * html5lib/runner-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 27 May, 2010 1 commit
-
-
eric@webkit.org authored
Reviewed by Adam Barth. Add <pre>/<listing> hack to HTML5Lexer to fix the last remaining HTML5 test suite regressions https://bugs.webkit.org/show_bug.cgi?id=39818 * html5lib/runner-expected-html5.txt: 2010-05-27 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. Add <pre>/<listing> hack to HTML5Lexer to fix the last remaining HTML5 test suite regressions https://bugs.webkit.org/show_bug.cgi?id=39818 HTML parsers are supposed to ignore the first \n after a <pre> or <listing> tag for authoring convenience. Our new HTML5Lexer didn't have this hack yet so there were 4 HTML5 tests failing. Fixing this fixed the last of the HTML5 test suite regressions using the HTML5Lexer vs the old lexer. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::reset): (WebCore::HTML5Lexer::nextToken): * html/HTML5Lexer.h: (WebCore::HTML5Lexer::skipLeading...
-
- 26 May, 2010 2 commits
-
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Fix webkit01.dat resumer tests in HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=39796 Update expectations to show massive passage. * html5lib/webkit-resumer-expected-html5.txt: 2010-05-26 Nate Chapin <japhet@chromium.org> Reviewed by Adam Barth. Factor PageCache functionality out of FrameLoader and into PageCache. https://bugs.webkit.org/show_bug.cgi?id=39382 Refactor only, so no new tests. * history/PageCache.cpp: (WebCore::pageCacheLogPrefix): (WebCore::pageCacheLog): (WebCore::logCanCacheFrameDecision): (WebCore::logCanCachePageDecision): (WebCore::PageCache::canCachePageContainingThisFrame): (WebCore::PageCache::canCache): (WebCore::PageCache::add): (WebCore::PageCache::get): * history/PageCache.h: * loader/DocumentLoader.cpp: * loader/FrameLoader.cpp: (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::prepareForCachedPageRestore): (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): (WebCore::FrameLoader::loadProvisionalItemFromCachedPage): (WebCore::FrameLoader::navigateToDifferentDocument): * loader/FrameLoader.h: (WebCore::FrameLoader::quickRedirectComing): * svg/graphics/SVGImage.cpp: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Make HTML5 lexer not ASSERT when resuming partial parses https://bugs.webkit.org/show_bug.cgi?id=39755 Add a test suite for partial parsing. This test runs all our parsing test cases, but stops and starts the parser at every character in the parse stream to make sure we resume parsing properly. Currently, a bunch of the test cases are commented out, but I'll comment them back in as I get them running. * html5lib/webkit-resumer-expected-html5.txt: Added. * html5lib/webkit-resumer-expected.txt: Added. * html5lib/webkit-resumer.html: Added. 2010-05-26 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Make HTML5 lexer not ASSERT when resuming partial parses https://bugs.webkit.org/show_bug.cgi?id=39755 I'm working through a variation of the webkit-runner.html test suite that stops the parser at every character to make sure we can resume parsing correctly. This patch fixes some errors caught by ASSERTs, which prevent the basic tests from running to completion. There's a bunch more work to do, however. Test: html5lib/webkit-resumer.html * html/HTML5Lexer.cpp: (WebCore::HTMLNames::isEndTagBufferingState): (WebCore::HTML5Lexer::nextToken): (WebCore::HTML5Lexer::addToPossibleEndTag): * html/HTML5Lexer.h: * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::write): * html/HTML5Tokenizer.h: 2010-05-26 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Make HTML5 lexer not ASSERT when resuming partial parses https://bugs.webkit.org/show_bug.cgi?id=39755 Add webkit-resumer.html to the HTML5 parser test suite. * Scripts/test-html5-parser: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 25 May, 2010 2 commits
-
-
abarth@webkit.org authored
Unreviewed. Fix typo pointed out by Maciej. * html/HTML5Lexer.cpp: (WebCore::HTMLNames::unconsumeCharacters): (WebCore::HTML5Lexer::consumeEntity): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. First cut at HTML5 entities https://bugs.webkit.org/show_bug.cgi?id=39649 Update the expected results to show the new passing tests. Yay! * html5lib/webkit-runner-expected-html5.txt: 2010-05-24 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. First cut at HTML5 entities https://bugs.webkit.org/show_bug.cgi?id=39649 There's still a bunch more work to do to get our entity parsing fully up to spec. This patch contains the bulk of the implementation however. The basics are covered by the existing html5lib tests. I'll add more detailed tests in a followup patch. * html/HTML5Lexer.cpp: (WebCore::HTMLNames::legalEntityFor): (WebCore::HTMLNames::isHexDigit): (WebCore::HTMLNames::isAlphaNumeric): (WebCore::HTMLNames::uncomsumeCharacters): (WebCore::HTML5Lexer::consumeEntity): (WebCore::HTML5Lexer::nextToken): (WebCore::HTML5Lexer::haveBufferedCharacterToken): * html/HTML5Lexer.h: (WebCore::HTML5Lexer::): * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::write): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 24 May, 2010 3 commits
-
-
abarth@webkit.org authored
Reviewed by Adam Barth. Add RCDATA and RAWTEXT suport to the HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=39642 Adam Barth wrote half of this patch. * html/HTML5TreeBuilder.cpp: (WebCore::HTML5TreeBuilder::passTokenToLegacyParser): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Teach the HTML5 parser how to lex escaped script data https://bugs.webkit.org/show_bug.cgi?id=39630 Add a bunch of tests for parsing script data. I think these tests drive the lexer into all the script data states. * html5lib/resources/scriptdata01.dat: Added. * html5lib/webkit-runner-expected-html5.txt: * html5lib/webkit-runner-expected.txt: * html5lib/webkit-runner.html: 2010-05-24 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Teach the HTML5 parser how to lex escaped script data https://bugs.webkit.org/show_bug.cgi?id=39630 * html/HTML5Lexer.cpp: (WebCore::HTMLNames::vectorEqualsString): (WebCore::HTML5Lexer::nextToken): (WebCore::HTML5Lexer::temporaryBufferIs): (WebCore::HTML5Lexer::isAppropriateEndTag): (WebCore::HTML5Lexer::maybeFlushBufferedEndTag): (WebCore::HTML5Lexer::flushBufferedEndTag): * html/HTML5Lexer.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Teach the HTML5 parser to lex DOCTYPEs https://bugs.webkit.org/show_bug.cgi?id=39571 * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): * html/HTML5Lexer.h: * html/HTML5Token.h: (WebCore::HTML5Token::beginDOCTYPE): (WebCore::HTML5Token::publicIdentifier): (WebCore::HTML5Token::systemIdentifier): (WebCore::HTML5Token::setPublicIdentifierToEmptyString): (WebCore::HTML5Token::setSystemIdentifierToEmptyString): (WebCore::HTML5Token::appendToPublicIdentifier): (WebCore::HTML5Token::appendToSystemIdentifier): (WebCore::HTML5Token::DoctypeData::DoctypeData): * html/HTML5TreeBuilder.cpp: (WebCore::convertToOldStyle): (WebCore::HTML5TreeBuilder::passTokenToLegacyParser): * platform/text/SegmentedString.h: (WebCore::SegmentedString::lookAheadIgnoringCase): (WebCore::SegmentedString::advanceAndASSERTIgnoringCase): 2010-05-24 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Teach the HTML5 parser to lex DOCTYPEs https://bugs.webkit.org/show_bug.cgi?id=39571 Add tests for DOCTYPEs. * html5lib/resources/doctype01.dat: Added. * html5lib/webkit-runner.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 23 May, 2010 3 commits
-
-
eric@webkit.org authored
Reviewed by Eric Seidel. Teach HTML5 parser how to lex comments correctly https://bugs.webkit.org/show_bug.cgi?id=39537 Added a new data file for testing comment parsing. There are some more things we can test here once we implement the bogus comment state. * html5lib/resources/comments01.dat: Added. * html5lib/webkit-runner-expected.txt: - Some of these tests fail in our current parser because our current parser doesn't comply with HTML5. I've set these expectations to failing so the tests will "pass" in the current parser. I've double-checked the results in comments01.dat with a nightly build of Firefox to make sure we agree on our implementation of the spec. * html5lib/webkit-runner.html: 2010-05-23 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Teach HTML5 parser how to lex commen...
-
eric@webkit.org authored
Reviewed by Eric Seidel. Make the html5lib parser tests run using the HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=39533 This patch adds a version of runner.html that's easier to parse (e.g., no doctype or HTML comments) as well as a new test data file. The exciting thing is that this test passes in the new HTML5 parser using this runner. Once the HTML5 parser is strong enough, we'll remove webkit-runner.html and have runner.html run the new webkit*.dat files. * html5lib/resources/webkit01.dat: Added. * html5lib/webkit-runner-expected.txt: Added. * html5lib/webkit-runner.html: Added. 2010-05-23 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Make the html5lib parser tests run using the HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=39533 Turns out we're just one small tweak away from running the html5lib tests. After this patch lands, we should be able to introduce tests for every change to the HTML5 parser. Test: html5lib/webkit-runner.html * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
eric@webkit.org authored
Reviewed by Eric Seidel. Make HTML5 parser parse <script>alert("<hi>");</script> https://bugs.webkit.org/show_bug.cgi?id=39525 More progress towards getting the html5lib test harness running. We need to parse script data in the ScriptDataState. The spec says the parser should set the lexer's state to ScriptDataState, but we want to keep using the existing parser for a while so I've added some temporary logic to HTML5Tokenizer to set the state in the lexer. To get this case running, I needed to flesh out a bunch of the ScriptDataState logic. There's a bunch more to do, but this is a start. I'm not 100% happy with this patch, but it lets us execute a simplified version of the test harness up to the point where it starts running the first test. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): (WebCore::HTML5Lexer::isAppropriateEndTag): (WebCore::HTML5Lexer::emitCurrentTagToken): * html/HTML5Lexer.h: (WebCore::HTML5Lexer::setState): * html/HTML5Token.h: (WebCore::HTML5Token::beginEndTag): (WebCore::HTML5Token::appendToCharacter): (WebCore::HTML5Token::name): * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::write): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 22 May, 2010 1 commit
-
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Parse attributes with HTML5 lexer https://bugs.webkit.org/show_bug.cgi?id=39520 This patch lets the HTML5 lexer parse attributes, as in <div attr="foo"></div>. This patch is on the critical path to running the html5lib tests. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): * html/HTML5Lexer.h: * html/HTML5Token.h: (WebCore::HTML5Token::beginStartTag): (WebCore::HTML5Token::beginEndTag): (WebCore::HTML5Token::addNewAttribute): (WebCore::HTML5Token::appendToAttributeName): (WebCore::HTML5Token::appendToAttributeValue): (WebCore::HTML5Token::attributes): * html/HTML5Tokenizer.cpp: (WebCore::convertToOldStyle): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 19 May, 2010 2 commits
-
-
abarth@webkit.org authored
Reviewed by David Hyatt. Change the API of nextToken to distinguish between emitting a token and just running out of input https://bugs.webkit.org/show_bug.cgi?id=39349 I'm not sure there's a functional difference with this patch yet, but as discussed with Eric, we need this to handle attributes. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::reset): (WebCore::HTML5Lexer::nextToken): * html/HTML5Lexer.h: * html/HTML5Token.h: (WebCore::HTML5Token::HTML5Token): (WebCore::HTML5Token::clear): (WebCore::HTML5Token::beginStartTag): (WebCore::HTML5Token::beginEndTag): (WebCore::HTML5Token::beginCharacter): * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::write): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Make the HTML5 parser correctly parse <div>Hello</div> https://bugs.webkit.org/show_bug.cgi?id=39345 Again, this patch is covered by a large number of LayoutTests. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::HTML5Lexer): (WebCore::HTML5Lexer::reset): (WebCore::HTML5Lexer::nextToken): (WebCore::HTML5Lexer::emitCommentToken): (WebCore::HTML5Lexer::emitCharacter): (WebCore::HTML5Lexer::emitCurrentTagToken): * html/HTML5Lexer.h: * html/HTML5Token.h: (WebCore::HTML5Token::beginCharacter): (WebCore::HTML5Token::appendToCharacter): (WebCore::HTML5Token::characters): * html/HTML5Tokenizer.cpp: (WebCore::convertToOldStyle): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 18 May, 2010 9 commits
-
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Make the HTML5 parser actually parse <div></div> https://bugs.webkit.org/show_bug.cgi?id=39342 This patch is covered by every LayoutTest. Yes. All of them. :) * html/HTML5Lexer.cpp: (WebCore::toLowerCase): (WebCore::HTML5Lexer::HTML5Lexer): (WebCore::HTML5Lexer::nextToken): (WebCore::HTML5Lexer::emitCharacter): * html/HTML5Lexer.h: * html/HTML5Token.h: (WebCore::HTML5Token::HTML5Token): (WebCore::HTML5Token::beginStartTag): (WebCore::HTML5Token::beginEndTag): (WebCore::HTML5Token::appendToName): (WebCore::HTML5Token::type): (WebCore::HTML5Token::name): (WebCore::HTML5Token::selfClosing): (WebCore::HTML5Token::attrs): * html/HTML5Tokenizer.cpp: (WebCore::convertToOldStyle): (WebCore::HTML5Tokenizer::write): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Implement the DOCTYPE states for the HTML5 lexer https://bugs.webkit.org/show_bug.cgi?id=39335 * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): (WebCore::emitCurrentDoctypeToken): * html/HTML5Lexer.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Implement comment states for HTML5 lexer https://bugs.webkit.org/show_bug.cgi?id=39334 * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Add more state to the HTML5 lexer https://bugs.webkit.org/show_bug.cgi?id=39333 This code is just transliteration from the spec. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::HTML5Lexer): (WebCore::HTML5Lexer::nextToken): * html/HTML5Lexer.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59721 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Implement two more lexer states https://bugs.webkit.org/show_bug.cgi?id=39298 No tests because Eric is still working on wiring up the lexer to the test harness. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): (WebCore::HTML5Lexer::emitParseError): (WebCore::HTML5Lexer::emitCurrentTagToken): * html/HTML5Lexer.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
eric@webkit.org authored
Reviewed by Adam Barth. Make it possible to enable the new HTML5Tokenizer for testing https://bugs.webkit.org/show_bug.cgi?id=39275 I added html5ParserEnabled to Settings so that we can enable/disable the HTML5 parser for testing. I also ripped out a bunch of dead code from HTML5Lexer. I had to add HTML5Lexer/HTML5Tokenizer to all build systems so that the build wouldn't fail now that we reference these classes from HTMLDocument. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.xcodeproj/project.pbxproj: * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::reset): (WebCore::isWhitespace): (WebCore::HTML5Lexer::nextToken): * html/HTML5Lexer.h: * html/HTML5Tokenizer.cpp: Added. (WebCore::HTML5Tokenizer::HTML5Tokenizer): (WebCore::HTML5Tokenizer::~HTML5Tokenizer): (WebCore::HTML5Tokenizer::begin): (WebCore::HTML5Tokenizer::write): (WebCore::HTML5Tokenizer::end): (WebCore::HTML5Tokenizer::finish): (WebCore::HTML5Tokenizer::isWaitingForScripts): * html/HTML5Tokenizer.h: Added. * html/HTMLDocument.cpp: (WebCore::HTMLDocument::createTokenizer): * html/HTMLTokenizer.h: * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createTokenizer): * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setHTML5ParserEnabled): (WebCore::Settings::html5ParserEnabled): 2010-05-18 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth (and Maciej Stachowiak). Make it possible to enable the new HTML5Tokenizer for testing https://bugs.webkit.org/show_bug.cgi?id=39275 Expose the WebCore::Settings::html5ParserEnabled as a private WebKit setting. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (-[WebPreferences html5ParserEnabled]): (-[WebPreferences setHTML5ParserEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChangedNotification:]): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Not reviewed, build fix. Attempt to fix build for v8 bindings (untested). * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::clearWindowShell): * bindings/v8/ScriptController.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Implement ScriptData states for HTML5Lexer https://bugs.webkit.org/show_bug.cgi?id=39273 This patch implements more of the lexer states according to the HTML5 specification. Currently, this code is compiled by not tested. We're working on bringing up a test harness in parallel with transliterating the spec into code. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::tokenize): (WebCore::HTML5Lexer::temporaryBufferIs): * html/HTML5Lexer.h: (WebCore::HTML5Lexer::): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
eric@webkit.org authored
Reviewed by Adam Barth. Rename HTML5Tokenzier to HTML5Lexer so that we can add a new HTML5Tokenizer which implements Tokenizer https://bugs.webkit.org/show_bug.cgi?id=39272 Strictly a rename, no functionality change. * WebCore.xcodeproj/project.pbxproj: * html/HTML5Lexer.cpp: Added. * html/HTML5Lexer.h: Added. * html/HTML5Tokenizer.cpp: Removed. * html/HTML5Tokenizer.h: Removed. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 17 May, 2010 3 commits
-
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Implement RAWTEXT tokenizer states https://bugs.webkit.org/show_bug.cgi?id=39267 More tokenizer states. There's a bunch of functionality notImplemented that we'll come back to. * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::tokenize): * html/HTML5Tokenizer.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Implement more parser states in HTML5Tokenizer https://bugs.webkit.org/show_bug.cgi?id=39265 This patch implements some easy states. I'll come back and do the harder states later. * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::tokenize): (WebCore::HTML5Tokenizer::emitParseError): * html/HTML5Tokenizer.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
abarth@webkit.org authored
Reviewed by Eric Seidel. Update states in HTML5Tokenizer to match HTML5 spec https://bugs.webkit.org/show_bug.cgi?id=39264 I've also implemented the DataState. More states to follow. * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::reset): (WebCore::HTML5Tokenizer::tokenize): * html/HTML5Tokenizer.h: (WebCore::HTML5Tokenizer::): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-