1. 04 Jun, 2010 9 commits
  2. 02 Jun, 2010 1 commit
    • eric@webkit.org's avatar
      2010-06-02 Eric Seidel <eric@webkit.org> · 7e86028c
      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
      7e86028c
  3. 01 Jun, 2010 1 commit
    • eric@webkit.org's avatar
      2010-05-31 Adam Barth <abarth@webkit.org> · 715c149d
      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
      715c149d
  4. 31 May, 2010 1 commit
  5. 28 May, 2010 2 commits
    • abarth@webkit.org's avatar
      2010-05-28 Adam Barth <abarth@webkit.org> · 036a420c
      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
      036a420c
    • abarth@webkit.org's avatar
      2010-05-28 Adam Barth <abarth@webkit.org> · fc8e393e
      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
      fc8e393e
  6. 27 May, 2010 1 commit
    • eric@webkit.org's avatar
      2010-05-27 Eric Seidel <eric@webkit.org> · 3f0d7bf8
      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...
      3f0d7bf8
  7. 26 May, 2010 2 commits
    • abarth@webkit.org's avatar
      2010-05-26 Adam Barth <abarth@webkit.org> · 76e97fff
      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
      76e97fff
    • abarth@webkit.org's avatar
      2010-05-26 Adam Barth <abarth@webkit.org> · 656187c0
      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
      656187c0
  8. 25 May, 2010 2 commits
    • abarth@webkit.org's avatar
      2010-05-25 Adam Barth <abarth@webkit.org> · 7ad367da
      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
      7ad367da
    • abarth@webkit.org's avatar
      2010-05-24 Adam Barth <abarth@webkit.org> · ed1f7c11
      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
      ed1f7c11
  9. 24 May, 2010 3 commits
    • abarth@webkit.org's avatar
      2010-05-24 Eric Seidel <eric@webkit.org> · 7279ee2f
      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
      7279ee2f
    • abarth@webkit.org's avatar
      2010-05-24 Adam Barth <abarth@webkit.org> · 91463047
      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
      91463047
    • abarth@webkit.org's avatar
      2010-05-24 Adam Barth <abarth@webkit.org> · 01ea231a
      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
      01ea231a
  10. 23 May, 2010 3 commits
    • eric@webkit.org's avatar
      2010-05-23 Adam Barth <abarth@webkit.org> · 1b4078bd
      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...
      1b4078bd
    • eric@webkit.org's avatar
      2010-05-23 Adam Barth <abarth@webkit.org> · 82b4d03a
      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
      82b4d03a
    • eric@webkit.org's avatar
      2010-05-23 Adam Barth <abarth@webkit.org> · 38adf9ce
      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
      38adf9ce
  11. 22 May, 2010 1 commit
    • abarth@webkit.org's avatar
      2010-05-21 Adam Barth <abarth@webkit.org> · 3454dd30
      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
      3454dd30
  12. 19 May, 2010 2 commits
    • abarth@webkit.org's avatar
      2010-05-19 Adam Barth <abarth@webkit.org> · c0b247de
      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
      c0b247de
    • abarth@webkit.org's avatar
      2010-05-18 Adam Barth <abarth@webkit.org> · c2f2b026
      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
      c2f2b026
  13. 18 May, 2010 9 commits
  14. 17 May, 2010 3 commits