1. 10 Jul, 2010 1 commit
  2. 09 Jul, 2010 13 commits
    • eric@webkit.org's avatar
      2010-07-09 Eric Seidel <eric@webkit.org> · 7e7d85fb
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Get rid of manual case maps in HTMLTreeBuilder
              https://bugs.webkit.org/show_bug.cgi?id=42000
      
              No functional change, thus no tests.
      
              * html/HTMLTreeBuilder.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7e7d85fb
    • eric@webkit.org's avatar
      2010-07-09 Eric Seidel <eric@webkit.org> · b583beb3
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Fix SVG tag name casing for HTMLTreeBuilder
              https://bugs.webkit.org/show_bug.cgi?id=41998
      
              * html5lib/runner-expected-html5.txt:
      2010-07-09  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
      
              Reviewed by Kenneth Rohde Christiansen.
      
              [Qt] GraphicsLayerQt must have syncCompositingStateForThisLayerOnly() implemented
              https://bugs.webkit.org/show_bug.cgi?id=41954
      
              Add GraphicsLayerQt::syncCompositingStateForThisLayerOnly, a non-recursive
              implementation of GraphicsLayerQt::syncCompositingState and which targets
              the current layer only.
      
              * platform/graphics/qt/GraphicsLayerQt.cpp:
              (WebCore::GraphicsLayerQt::syncCompositingStateForThisLayerOnly):
              * platform/graphics/qt/GraphicsLayerQt.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b583beb3
    • eric@webkit.org's avatar
      2010-07-09 Eric Seidel <eric@webkit.org> · 3791196d
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Implement SVG attribute case mapping for HTMLTreeBuilder
              https://bugs.webkit.org/show_bug.cgi?id=41949
      
              Update results now that we pass 3 more tests.
      
              * html5lib/runner-expected-html5.txt:
      2010-07-09  Eric Seidel  <eric@webkit.org>
      
              Reviewed by Adam Barth.
      
              Implement SVG attribute case mapping for HTMLTreeBuilder
              https://bugs.webkit.org/show_bug.cgi?id=41949
      
              Tested by html5lib/runner.html.
      
              * html/HTMLTreeBuilder.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62994 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3791196d
    • abarth@webkit.org's avatar
      2010-07-09 Adam Barth <abarth@webkit.org> · 90a72e60
      abarth@webkit.org authored
              Unreviewed build fix.
      
              We recently taught the HTMLTokenizer to recognize self-closing tags,
              <http://trac.webkit.org/changeset/62926>, but that confused the
              LegacyHTMLTreeBuilder.  It turns out that it's much happier if we never
              say a tag is self-closing.
      
              * html/HTMLTreeBuilder.cpp:
              (WebCore::convertToOldStyle):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      90a72e60
    • eric@webkit.org's avatar
      2010-07-09 Eric Seidel <eric@webkit.org> · 86b7fdf5
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Implement self closing start tag state in the tokenizer
              https://bugs.webkit.org/show_bug.cgi?id=41946
      
              * html5lib/runner-expected-html5.txt:
               - Yay progressions!
      2010-07-09  Eric Seidel  <eric@webkit.org>
      
              Reviewed by Adam Barth.
      
              Implement self closing start tag state in the tokenizer
              https://bugs.webkit.org/show_bug.cgi?id=41946
      
              Amazingly we got this far w/o needing self closing.
              The LegacyHTMLTreeBuilder clearly uses the self-closing
              state, but the fact that we never exposed it seems to
              not have caused any test failures.  Sad.
      
              The new HTMLTreeBuilder only needs the self closing state
              for foreign content mode (and a few parse error cases).
      
              * html/HTMLToken.h:
              (WebCore::HTMLToken::setSelfClosing):
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::nextToken):
              * html/HTMLTreeBuilder.cpp:
              (WebCore::):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      86b7fdf5
    • eric@webkit.org's avatar
      2010-07-09 Eric Seidel <eric@webkit.org> · 23a1da12
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Add setInsertionMode setter in preparation for "in foreign content" mode
              https://bugs.webkit.org/show_bug.cgi?id=41942
      
              "in foreign content" mode needs to be able to use a fake
              insertion mode for processing.  We need to be able to save the
              original insertion mode, set a fake one, and then restore the original
              if it wasn't changed.  To detect changes, we need all callsites to
              use a setInsertionMode accessor instead of m_insertionMode =
      
              No functional changes, thus no tests.
      
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processStartTagForInBody):
              (WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup):
              (WebCore::HTMLTreeBuilder::processStartTagForInTable):
              (WebCore::HTMLTreeBuilder::processStartTag):
              (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
              (WebCore::HTMLTreeBuilder::setInsertionModeAndEnd):
              (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
              (WebCore::HTMLTreeBuilder::processEndTagForInCell):
              (WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption):
              (WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
              (WebCore::HTMLTreeBuilder::processEndTag):
              (WebCore::HTMLTreeBuilder::processCharacter):
              (WebCore::HTMLTreeBuilder::processDefaultForInTableTextMode):
              (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
              (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
              (WebCore::HTMLTreeBuilder::processScriptStartTag):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      23a1da12
    • abarth@webkit.org's avatar
      2010-07-09 Adam Barth <abarth@webkit.org> · 2e6286aa
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Implementing pending table characters
              https://bugs.webkit.org/show_bug.cgi?id=41916
      
              This turned out to not be as scary as I thought it would be.
      
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processDoctypeToken):
              (WebCore::HTMLTreeBuilder::processStartTag):
              (WebCore::HTMLTreeBuilder::processEndTag):
              (WebCore::HTMLTreeBuilder::processComment):
              (WebCore::HTMLTreeBuilder::processCharacter):
              (WebCore::HTMLTreeBuilder::processEndOfFile):
              (WebCore::HTMLTreeBuilder::processDefaultForInTableTextMode):
              * html/HTMLTreeBuilder.h:
      2010-07-09  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Implementing pending table characters
              https://bugs.webkit.org/show_bug.cgi?id=41916
      
              This doesn't quite fix all the tests, but it fixes a bunch of them.
      
              * html5lib/runner-expected-html5.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e6286aa
    • abarth@webkit.org's avatar
      2010-07-08 Adam Barth <abarth@webkit.org> · 0190eb08
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Handle whitespace correctly
              https://bugs.webkit.org/show_bug.cgi?id=41907
      
              This patch introduces an extra memcpy in the character token pipeline.
              I'll remove the memcpy in a future patch.
      
              * html/HTMLConstructionSite.cpp:
              (WebCore::HTMLConstructionSite::insertTextNode):
              * html/HTMLConstructionSite.h:
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processCharacter):
              * html/HTMLTreeBuilder.h:
      2010-07-08  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Handle whitespace correctly
              https://bugs.webkit.org/show_bug.cgi?id=41907
      
              Update expectations to show massive progression.
      
              * html5lib/resources/doctype01.dat:
                - When I created this test, I set the expectations incorrectly.  The
                  new expectations now match the spec and Minefield.
              * html5lib/runner-expected-html5.txt:
              * html5lib/runner-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0190eb08
    • eric@webkit.org's avatar
      2010-07-09 Eric Seidel <eric@webkit.org> · 366f82fb
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Move more mode handling into functions for later re-use
              https://bugs.webkit.org/show_bug.cgi?id=41939
      
              No functional changes, thus no tests.
      
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
              (WebCore::HTMLTreeBuilder::processEndTagForInRow):
              (WebCore::HTMLTreeBuilder::processEndTagForInCell):
              (WebCore::HTMLTreeBuilder::processEndTag):
              * html/HTMLTreeBuilder.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      366f82fb
    • eric@webkit.org's avatar
      2010-07-09 Eric Seidel <eric@webkit.org> · f983e162
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Add new popUntilPopped functions to clean up code
              https://bugs.webkit.org/show_bug.cgi?id=41936
      
              Pretty self explanatory.  Much awesome code reduction.
      
              No functional changes, thus no tests.
      
              * html/HTMLElementStack.cpp:
              (WebCore::HTMLElementStack::popUntilPopped):
              * html/HTMLElementStack.h:
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
              (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
              (WebCore::HTMLTreeBuilder::processEndTagForInBody):
              (WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption):
              (WebCore::HTMLTreeBuilder::processTableEndTagForInTable):
              (WebCore::HTMLTreeBuilder::processEndTag):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f983e162
    • eric@webkit.org's avatar
      2010-07-09 Eric Seidel <eric@webkit.org> · 65744da2
      eric@webkit.org authored
              Unreviewed.  Just renaming (discussed with Adam Barth).
      
              Rename createElement* to createHTMLElement* to better reflect
              behavior.  This is in preparation for adding foreign content support.
      
              * html/HTMLConstructionSite.cpp:
              (WebCore::HTMLConstructionSite::createHTMLElementAndAttachToCurrent):
              (WebCore::HTMLConstructionSite::insertHTMLHtmlElement):
              (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
              (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
              (WebCore::HTMLConstructionSite::insertHTMLElement):
              (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
              (WebCore::HTMLConstructionSite::createHTMLElement):
              * html/HTMLConstructionSite.h:
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      65744da2
    • eric@webkit.org's avatar
      2010-07-09 Eric Seidel <eric@webkit.org> · 77597e1b
      eric@webkit.org authored
              Unreviewed.  Just renaming (discussed with Adam Barth).
      
              Rename insertElement to insertHTMLElement and
              insertSelfClosingElement to insertSelfClosingHTMLElement
              to better reflect what they actually do.  This is in preparation
              for adding foreign content support.
      
              * html/HTMLConstructionSite.cpp:
              (WebCore::HTMLConstructionSite::insertHTMLElement):
              (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
              (WebCore::HTMLConstructionSite::insertFormattingElement):
              (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements):
              (WebCore::HTMLConstructionSite::fosterParent):
              * html/HTMLConstructionSite.h:
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
              (WebCore::HTMLTreeBuilder::processStartTagForInBody):
              (WebCore::HTMLTreeBuilder::processStartTagForInTable):
              (WebCore::HTMLTreeBuilder::processStartTag):
              (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
              (WebCore::HTMLTreeBuilder::processStartTagForInHead):
              (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
              (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      77597e1b
    • eric@webkit.org's avatar
      2010-07-08 Eric Seidel <eric@webkit.org> · b5bdd28c
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Unwrap a few || blocks for easier readability
              https://bugs.webkit.org/show_bug.cgi?id=41838
      
              No functional change, thus no tests.
      
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::adjustedLexerState):
              (WebCore::HTMLTreeBuilder::processStartTagForInBody):
              (WebCore::HTMLTreeBuilder::processStartTagForInTable):
              (WebCore::HTMLTreeBuilder::processStartTag):
              (WebCore::HTMLTreeBuilder::processEndTagForInBody):
              (WebCore::HTMLTreeBuilder::processEndTag):
              (WebCore::HTMLTreeBuilder::processComment):
              (WebCore::HTMLTreeBuilder::processStartTagForInHead):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b5bdd28c
  3. 08 Jul, 2010 1 commit
    • abarth@webkit.org's avatar
      2010-07-08 Adam Barth <abarth@webkit.org> · 23d7847f
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Get my head wrapped around processCharacter
              https://bugs.webkit.org/show_bug.cgi?id=41812
      
              Minor test progression.
      
              * html5lib/runner-expected-html5.txt:
      2010-07-08  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Get my head wrapped around processCharacter
              https://bugs.webkit.org/show_bug.cgi?id=41812
      
              The bulk of the patch is just stubbing out functions to document what
              the spec tells us to do.  I'll implement these functions in subsequent
              patches.
      
              * html/HTMLConstructionSite.h:
              (WebCore::HTMLConstructionSite::insertLeadingWhitespace):
              (WebCore::HTMLConstructionSite::insertLeadingWhitespaceWithActiveFormattingElements):
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processCharacter):
              * html/HTMLTreeBuilder.h:
              (WebCore::HTMLTreeBuilder::skipLeadingWhitespace):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      23d7847f
  4. 07 Jul, 2010 8 commits
  5. 06 Jul, 2010 17 commits
    • abarth@webkit.org's avatar
      2010-07-06 Eric Seidel <eric@webkit.org> · 3fd2ee4a
      abarth@webkit.org authored
              Reviewed by Adam Barth.
      
              Fix <nobr><nobr> case in HTMLTreeBuilder
              https://bugs.webkit.org/show_bug.cgi?id=41735
      
              We were both not handling <nobr> correctly, as well as
              never hitting the <nobr> case because our formatting
              elements check was overzealous.
      
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processStartTagForInBody):
      2010-07-06  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Implement start table tag in table mode
              https://bugs.webkit.org/show_bug.cgi?id=41736
      
              * html5lib/runner-expected-html5.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3fd2ee4a
    • eric@webkit.org's avatar
      2010-07-06 Eric Seidel <eric@webkit.org> · ea4c4253
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Fix <nobr><nobr> case in HTMLTreeBuilder
              https://bugs.webkit.org/show_bug.cgi?id=41735
      
              * html5lib/runner-expected-html5.txt:
      2010-07-06  Eric Seidel  <eric@webkit.org>
      
              Reviewed by Adam Barth.
      
              Fix <nobr><nobr> case in HTMLTreeBuilder
              https://bugs.webkit.org/show_bug.cgi?id=41735
      
              We were both not handling <nobr> correctly, as well as
              never hitting the <nobr> case because our formatting
              elements check was overzealous.
      
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processStartTagForInBody):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ea4c4253
    • abarth@webkit.org's avatar
      2010-07-06 Adam Barth <abarth@webkit.org> · 95692193
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Implement "act as if the banana has been peeled" (for lack of a better term)
              https://bugs.webkit.org/show_bug.cgi?id=41734
      
              The spec has a tricky passage that says "whenever a node would be
              inserted into the current node, it must instead be foster parented."
              This patch attempts to implement that requirement.
      
              * html/HTMLConstructionSite.cpp:
              (WebCore::HTMLConstructionSite::attach):
              (WebCore::HTMLConstructionSite::HTMLConstructionSite):
              (WebCore::HTMLConstructionSite::insertHTMLHtmlElement):
              (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
              (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
              (WebCore::HTMLConstructionSite::insertScriptElement):
              (WebCore::HTMLConstructionSite::fosterParent):
              * html/HTMLConstructionSite.h:
              (WebCore::HTMLConstructionSite::RedirectToFosterParentGuard::RedirectToFosterParentGuard):
              (WebCore::HTMLConstructionSite::RedirectToFosterParentGuard::~RedirectToFosterParentGuard):
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processStartTagForInTable):
              (WebCore::HTMLTreeBuilder::processEndTagForInTable):
              * html/HTMLTreeBuilder.h:
      2010-07-06  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Implement "act as if the banana has been peeled" (for lack of a better term)
              https://bugs.webkit.org/show_bug.cgi?id=41734
      
              Massive test progression.
      
              * html5lib/runner-expected-html5.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      95692193
    • eric@webkit.org's avatar
      2010-07-06 Eric Seidel <eric@webkit.org> · d6f9f187
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Fix </optgroup> in "in select" mode
              https://bugs.webkit.org/show_bug.cgi?id=41733
      
              * html5lib/runner-expected-html5.txt:
      2010-07-06  Eric Seidel  <eric@webkit.org>
      
              Reviewed by Adam Barth.
      
              Fix </optgroup> in "in select" mode
              https://bugs.webkit.org/show_bug.cgi?id=41733
      
              I had to add a oneBelowTop() accessor.
              I added some ASSERTs after looking at the fragment case
              documentation.  I'm now convinced that top() and oneBeforeTop()
              should never be NULL, so we just ASSERT they aren't.
      
              This is a very obscure corner of the HTML spec, but at least
              we have a test for it.  This makes one more html5lib test pass.
      
              * html/HTMLConstructionSite.h:
              (WebCore::HTMLConstructionSite::oneBelowTop):
              * html/HTMLElementStack.cpp:
              (WebCore::HTMLElementStack::topRecord):
              (WebCore::HTMLElementStack::top):
              (WebCore::HTMLElementStack::oneBelowTop):
              * html/HTMLElementStack.h:
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processEndTag):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d6f9f187
    • eric@webkit.org's avatar
      2010-07-06 Eric Seidel <eric@webkit.org> · 0725ac2f
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Fix "in row" "Anything else" handling of end tags
              https://bugs.webkit.org/show_bug.cgi?id=41731
      
              I also fixed </br> handling to follow the spec more closely
              since it implementation was old and didn't use all our
              new processFake* hotness.
      
              This is already covered by 3 tests, however we don't
              pass them yet, due to lack of table foster parenting
              code (which Adam is working on as we speak).
      
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processEndTagForInBody):
              (WebCore::HTMLTreeBuilder::processEndTag):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0725ac2f
    • eric@webkit.org's avatar
      2010-07-06 Eric Seidel <eric@webkit.org> · 35fc7250
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              "In cell" does not correctly handle <td><tr> or <td><td>
              https://bugs.webkit.org/show_bug.cgi?id=41729
      
              * html5lib/resources/tables01.dat:
               - Added a case for <td><tr> since it was missing from the rest of the suite.
              * html5lib/runner-expected-html5.txt:
              * html5lib/runner-expected.txt:
      2010-07-06  Eric Seidel  <eric@webkit.org>
      
              Reviewed by Adam Barth.
      
              "In cell" does not correctly handle <td><tr> or <td><td>
              https://bugs.webkit.org/show_bug.cgi?id=41729
      
              This change is mostly cleanup to try and prevent forgetting
              tag name checks in the future by using inlines to reduce
              copy/paste code.
      
              3 little bugs in InCellMode:
               - Missing trTag from the long or statement (reason for the cleanup)
               - Used || instead of &&
               - Forgot to reprocess the tag after closeTheCell()
      
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processStartTagForInBody):
              (WebCore::HTMLTreeBuilder::processStartTagForInTable):
              (WebCore::HTMLTreeBuilder::processStartTag):
              (WebCore::HTMLTreeBuilder::processEndTagForInTable):
              (WebCore::HTMLTreeBuilder::processEndTag):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      35fc7250
    • abarth@webkit.org's avatar
      2010-07-06 Adam Barth <abarth@webkit.org> · bc13cf06
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Move fosterParent to HTMLConstructionSite
              https://bugs.webkit.org/show_bug.cgi?id=41728
      
              This paves the way for handling the default case of InTableMode
              properly.
      
              * html/HTMLConstructionSite.cpp:
              (WebCore::HTMLConstructionSite::fosterParent):
              * html/HTMLConstructionSite.h:
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc13cf06
    • abarth@webkit.org's avatar
      2010-07-06 Adam Barth <abarth@webkit.org> · 995a5980
      abarth@webkit.org authored
              Rubber-stamped by Eric Seidel.
      
              Move HTMLConstructionSite to its own file.  No behavior change.
      
              * Android.mk:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * html/HTMLConstructionSite.cpp: Copied from WebCore/html/HTMLTreeBuilder.cpp.
              (WebCore::HTMLNames::hasImpliedEndTag):
              (WebCore::HTMLConstructionSite::attach):
              (WebCore::HTMLConstructionSite::HTMLConstructionSite):
              (WebCore::HTMLConstructionSite::~HTMLConstructionSite):
              (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
              (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
              (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody):
              (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody):
              * html/HTMLConstructionSite.h: Copied from WebCore/html/HTMLTreeBuilder.h.
              * html/HTMLTreeBuilder.cpp:
              * html/HTMLTreeBuilder.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      995a5980
    • eric@webkit.org's avatar
      2010-07-06 Eric Seidel <eric@webkit.org> · 114c4436
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Add support for <li>, <dd> and <dt> nested tag closing
              https://bugs.webkit.org/show_bug.cgi?id=41720
      
              * html5lib/resources/webkit01.dat:
               - Add test for <dd><dt> since this wasn't well covered.
              * html5lib/runner-expected-html5.txt:
              * html5lib/runner-expected.txt:
      2010-07-06  Eric Seidel  <eric@webkit.org>
      
              Reviewed by Adam Barth.
      
              Add support for <li>, <dd> and <dt> nested tag closing
              https://bugs.webkit.org/show_bug.cgi?id=41720
      
              li, dd, and dt have nearly identical logic in HTML5, so I
              attempted to make them share as much code as possible.
      
              This fixes a bunch of subtests for html5lib/runner.html
      
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
              (WebCore::HTMLTreeBuilder::processStartTagForInBody):
              (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
              (WebCore::HTMLTreeBuilder::furthestBlockForFormattingElement):
              * html/HTMLTreeBuilder.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      114c4436
    • abarth@webkit.org's avatar
      2010-07-06 Adam Barth <abarth@webkit.org> · 9b9f35da
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Factor HTMLConstructionSite out of HTMLTreeBuilder
              https://bugs.webkit.org/show_bug.cgi?id=41716
      
              The HTMLContructionSite is the model object on which the
              HTMLTreeBuilder (a controller) acts.
      
              No behavior change.  I'll move this class into its own file in a
              followup patch.
      
              * html/HTMLFormattingElementList.h:
              (WebCore::HTMLFormattingElementList::at):
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
              (WebCore::HTMLConstructionSite::HTMLConstructionSite):
              (WebCore::HTMLTreeBuilder::passTokenToLegacyParser):
              (WebCore::HTMLTreeBuilder::processDoctypeToken):
              (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
              (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
              (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody):
              (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody):
              (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInScope):
              (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
              (WebCore::HTMLTreeBuilder::processStartTagForInBody):
              (WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup):
              (WebCore::HTMLTreeBuilder::closeTheCell):
              (WebCore::HTMLTreeBuilder::processStartTagForInTable):
              (WebCore::HTMLTreeBuilder::processStartTag):
              (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
              (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
              (WebCore::HTMLTreeBuilder::furthestBlockForFormattingElement):
              (WebCore::HTMLTreeBuilder::findFosterParentFor):
              (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
              (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
              (WebCore::HTMLTreeBuilder::processEndTagForInBody):
              (WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption):
              (WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
              (WebCore::HTMLTreeBuilder::processEndTagForInTable):
              (WebCore::HTMLTreeBuilder::processEndTag):
              (WebCore::HTMLTreeBuilder::processComment):
              (WebCore::HTMLTreeBuilder::processCharacter):
              (WebCore::HTMLTreeBuilder::processEndOfFile):
              (WebCore::HTMLTreeBuilder::processDefaultForBeforeHTMLMode):
              (WebCore::HTMLTreeBuilder::processStartTagForInHead):
              (WebCore::HTMLConstructionSite::insertDoctype):
              (WebCore::HTMLConstructionSite::insertComment):
              (WebCore::HTMLConstructionSite::insertCommentOnDocument):
              (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
              (WebCore::HTMLConstructionSite::createElementAndAttachToCurrent):
              (WebCore::HTMLConstructionSite::insertHTMLHtmlElement):
              (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
              (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
              (WebCore::HTMLConstructionSite::insertElement):
              (WebCore::HTMLConstructionSite::insertSelfClosingElement):
              (WebCore::HTMLConstructionSite::insertFormattingElement):
              (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
              (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
              (WebCore::HTMLConstructionSite::insertScriptElement):
              (WebCore::HTMLTreeBuilder::processScriptStartTag):
              (WebCore::HTMLConstructionSite::insertTextNode):
              (WebCore::HTMLConstructionSite::createElement):
              (WebCore::HTMLTreeBuilder::indexOfFirstUnopenFormattingElement):
              (WebCore::HTMLTreeBuilder::reconstructTheActiveFormattingElements):
              (WebCore::HTMLTreeBuilder::generateImpliedEndTagsWithExclusion):
              (WebCore::HTMLTreeBuilder::generateImpliedEndTags):
              * html/HTMLTreeBuilder.h:
              (WebCore::HTMLConstructionSite::currentElement):
              (WebCore::HTMLConstructionSite::openElements):
              (WebCore::HTMLConstructionSite::activeFormattingElements):
              (WebCore::HTMLConstructionSite::head):
              (WebCore::HTMLConstructionSite::form):
              (WebCore::HTMLConstructionSite::releaseForm):
              (WebCore::HTMLConstructionSite::setForm):
              (WebCore::HTMLConstructionSite::fragmentScriptingPermission):
              (WebCore::HTMLConstructionSite::attach):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9b9f35da
    • abarth@webkit.org's avatar
      2010-07-06 Adam Barth <abarth@webkit.org> · e6eebbc8
      abarth@webkit.org authored
              Unreviewed.
      
              Make the remaining insertion modes explicit.
      
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processStartTag):
              (WebCore::HTMLTreeBuilder::processEndTag):
              (WebCore::HTMLTreeBuilder::processCharacter):
              (WebCore::HTMLTreeBuilder::processEndOfFile):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e6eebbc8
    • abarth@webkit.org's avatar
      2010-07-06 Adam Barth <abarth@webkit.org> · 512b6ae0
      abarth@webkit.org authored
              Address reviewer comments from https://bugs.webkit.org/show_bug.cgi?id=41671
      
              Deploy isTableBodyContextTag where possible.  No behavior change.
      
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processStartTagForInBody):
              (WebCore::HTMLTreeBuilder::processStartTag):
              (WebCore::HTMLTreeBuilder::processEndTagForInTable):
              (WebCore::HTMLTreeBuilder::processEndTag):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      512b6ae0
    • abarth@webkit.org's avatar
      2010-07-06 Adam Barth <abarth@webkit.org> · 4da82a5b
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Implement InTableBodyMode
              https://bugs.webkit.org/show_bug.cgi?id=41671
      
              In the process of implementing this patch, Eric and I discussed some of
              the high-level organization of the HTMLTreeBuilder class.  We'd like to
              split it up into smaller pieces.  In the meantime, I've reordered some
              of the declarations in the header to make the relations between the
              different kinds of functions clearer.
      
              * html/HTMLElementStack.cpp:
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
              (WebCore::HTMLTreeBuilder::processStartTagForInBody):
              (WebCore::HTMLTreeBuilder::processStartTagForInTable):
              (WebCore::HTMLTreeBuilder::processStartTag):
              (WebCore::HTMLTreeBuilder::processEndTagForInTable):
              (WebCore::HTMLTreeBuilder::processEndTag):
              (WebCore::HTMLTreeBuilder::processCharacter):
              (WebCore::HTMLTreeBuilder::processEndOfFile):
              * html/HTMLTreeBuilder.h:
      2010-07-06  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Implement InTableBodyMode
              https://bugs.webkit.org/show_bug.cgi?id=41671
      
              * html5lib/runner-expected-html5.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4da82a5b
    • abarth@webkit.org's avatar
      2010-07-06 Eric Seidel <eric@webkit.org> · 2d59db04
      abarth@webkit.org authored
              Reviewed by Adam Barth.
      
              Add processing for "in cell" mode and end tag processing for "in row"
              https://bugs.webkit.org/show_bug.cgi?id=41688
      
              I added several new table tests, not all of which pass yet.
              Remaining failures exist due to lack of full "in table body" mode
              support, which Adam has an outstanding patch for.
              I believe all of the various branches added by this change are
              covered now by our tests.
      
              * html/HTMLElementStack.cpp:
               - Added QualifiedName versions of inScope functions.
                 Using tagName.localName() is wrong for non-HTML elements,
                 in preparation for supporting foreign content we should centralize
                 our handling of QualifiedName in these functions instead of
                 sprinkling more .localName() calls around the code.
              (WebCore::HTMLElementStack::inScope):
              (WebCore::HTMLElementStack::inListItemScope):
              (WebCore::HTMLElementStack::inTableScope):
              * html/HTMLElementStack.h:
              * html/HTMLFormattingElementList.cpp:
              (WebCore::HTMLFormattingElementList::Entry::operator==):
              (WebCore::HTMLFormattingElementList::Entry::operator!=):
               - Calling element() on markers will assert, so use m_element.
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::closeTheCell):
               - Implemented per the spec.
              (WebCore::HTMLTreeBuilder::processStartTag):
               - Use isTableBodyContextTag where possible.
               - Add InCellMode.
              (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
               - Use isTableBodyContextTag where possible.
              (WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
               - This code is needed from at least two callsites.
              (WebCore::HTMLTreeBuilder::processEndTag):
               - Add InCellMode and InRowMode
              (WebCore::HTMLTreeBuilder::processCharacter):
              (WebCore::HTMLTreeBuilder::processEndOfFile):
              * html/HTMLTreeBuilder.h:
      2010-07-06  Eric Seidel  <eric@webkit.org>
      
              Reviewed by Adam Barth.
      
              Add processing for "in cell" mode and end tag processing for "in row"
              https://bugs.webkit.org/show_bug.cgi?id=41688
      
              * html5lib/resources/tables01.dat:
              * html5lib/runner-expected-html5.txt:
              * html5lib/runner-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d59db04
    • abarth@webkit.org's avatar
      2010-07-06 Eric Seidel <eric@webkit.org> · d672b204
      abarth@webkit.org authored
              Reviewed by Adam Barth.
      
              Make <a> auto-close any parent <a> tag
              https://bugs.webkit.org/show_bug.cgi?id=41684
      
              I first fixed <a> to auto-close surrounding <a> tags.
              That caused about 3 more test passes and one new test failure.
              The test failure was due to <marque> not adding a marker
              to the active formatting elements.
      
              So I made a one-line change to fix <marque>.  However that hit an
              ASSERT due to a bug in indexOfFirstUnopenFormattingElement.
              Fixing indexOfFirstUnopenFormattingElement fixed another bunch of
              Adoption Agency related tests (clearly this was the second typo
              which was causing all the adoption agency failures).
              
              However fixing <marque> and indexOfFirstUnopenFormattingElement,
              added yet another failure due to missing support for </p>
              automatically adding an implicit <p> tag.  Fixing </p> finally
              got the tests to a stable (all improving) state.
      
              In the end, these 4 minor (and very well tested) tweaks fixed a total
              of 9 subtests in html5lib/runner.html.
              Another subtest progressed, but did not fully pass due to missing
              <table> foster-parenting support.
      
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processStartTagForInBody):
              (WebCore::HTMLTreeBuilder::processEndTagForInBody):
              (WebCore::HTMLTreeBuilder::indexOfFirstUnopenFormattingElement):
      2010-07-06  Eric Seidel  <eric@webkit.org>
      
              Reviewed by Adam Barth.
      
              Make <a> auto-close any parent <a> tag
              https://bugs.webkit.org/show_bug.cgi?id=41684
      
              * html5lib/runner-expected-html5.txt:
               - Update expectations now that we pass 9 more subtests.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d672b204
    • abarth@webkit.org's avatar
      2010-07-06 Adam Barth <abarth@webkit.org> · 62391882
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Implement InColgroupMode
              https://bugs.webkit.org/show_bug.cgi?id=41663
      
              * html5lib/runner-expected-html5.txt:
      2010-07-06  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Implement InColgroupMode
              https://bugs.webkit.org/show_bug.cgi?id=41663
      
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup):
              (WebCore::HTMLTreeBuilder::processStartTag):
              (WebCore::HTMLTreeBuilder::processEndTag):
              (WebCore::HTMLTreeBuilder::processCharacter):
              (WebCore::HTMLTreeBuilder::processEndOfFile):
              * html/HTMLTreeBuilder.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62391882
    • eric@webkit.org's avatar
      2010-07-06 Eric Seidel <eric@webkit.org> · c9d32150
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Implement bookmarking for HTML5 Adoption Agency algorithm
              https://bugs.webkit.org/show_bug.cgi?id=41659
      
              Added 3 new adoption tests because the suite didn't
              cover all the bookmarking cases.
      
              * html5lib/runner-expected-html5.txt:
               - Fixes tests!
              * html5lib/resources/adoption01.dat
      2010-07-06  Eric Seidel  <eric@webkit.org>
      
              Reviewed by Adam Barth.
      
              Implement bookmarking for HTML5 Adoption Agency algorithm
              https://bugs.webkit.org/show_bug.cgi?id=41659
      
              Was easier than I expected it to be.
              Fixes a bunch of html5lib/runner.html tests.
      
              * html/HTMLFormattingElementList.cpp:
              (WebCore::HTMLFormattingElementList::bookmarkFor):
              (WebCore::HTMLFormattingElementList::insertAt):
              * html/HTMLFormattingElementList.h:
              (WebCore::HTMLFormattingElementList::Bookmark::Bookmark):
              (WebCore::HTMLFormattingElementList::Bookmark::moveToAfter):
              (WebCore::HTMLFormattingElementList::Bookmark::elementBefore):
              (WebCore::HTMLFormattingElementList::Bookmark::elementAfter):
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9d32150