<table><tr><td><svg><desc><td> parses incorrectly
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Dec 2011 21:35:23 +0000 (21:35 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Dec 2011 21:35:23 +0000 (21:35 +0000)
commitf39a60259ab4efe9a74142c0a304ea5e0d277294
tree61b5e9bf60be8d40ff885d621074c7e826db0b1a
parent97b5be7b08d2ebfceb6443961e5b3c8c1c63e24b
<table><tr><td><svg><desc><td> parses incorrectly
https://bugs.webkit.org/show_bug.cgi?id=68106

Reviewed by Eric Seidel.

Source/WebCore:

This patch updates our implementation of the HTML5 parser to account
for recent changes in the spec.  The main change in this patch is to
remove the "in foreign content" state from the tree builder.  Rather
than maintaining this as a separate state, the parser now introspects
on the stack of open elements to determine whether the parser is in
foriegn content.  In the process, I've deleted some now-unused
machinery in the tree builder.

Tested by the html5lib LayoutTests.  These tests show the progression
in our spec compliance.

* html/parser/HTMLElementStack.cpp:
* html/parser/HTMLElementStack.h:
* html/parser/HTMLTreeBuilder.cpp:
* html/parser/HTMLTreeBuilder.h:
* mathml/mathattrs.in:

LayoutTests:

* html5lib/resources/webkit01.dat:
    - This test had an incorrect expectation that matched our previous
      behavior.  The new expected result matches Firefox's
      implemenation as well.
* html5lib/runner-expected.txt:
* platform/chromium/html5lib/runner-expected.txt:
    - Updated to show test progressions.  The one non-monotonic
      improvement is some churn in which of the unsafe-text tests we
      pass.  I'll look into this issue in a future patch.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/html5lib/resources/webkit01.dat
LayoutTests/html5lib/runner-expected.txt
LayoutTests/platform/chromium/html5lib/runner-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/html/parser/HTMLConstructionSite.h
Source/WebCore/html/parser/HTMLElementStack.cpp
Source/WebCore/html/parser/HTMLElementStack.h
Source/WebCore/html/parser/HTMLTreeBuilder.cpp
Source/WebCore/html/parser/HTMLTreeBuilder.h
Source/WebCore/mathml/mathattrs.in