Reviewed by Eric Seidel.
Include attributes when reconstructing elements in HTML5 tree builder
https://bugs.webkit.org/show_bug.cgi?id=42594
* html5lib/runner-expected-html5.txt:
2010-07-20 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Include attributes when reconstructing elements in HTML5 tree builder
https://bugs.webkit.org/show_bug.cgi?id=42594
Remove FIXME now that we have a test.
* html/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::createHTMLElementFromElementRecord):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63798
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2010-07-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Include attributes when reconstructing elements in HTML5 tree builder
+ https://bugs.webkit.org/show_bug.cgi?id=42594
+
+ * html5lib/runner-expected-html5.txt:
+
2010-07-20 Tony Chang <tony@chromium.org>
Not reviewed, chromium test expectation.
--- /dev/null
+#data
+<b>1<i>2<p>3</b>4
+#errors
+#document
+| <html>
+| <head>
+| <body>
+| <b>
+| "1"
+| <i>
+| "2"
+| <i>
+| <p>
+| <b>
+| "3"
+| "4"
+
+#data
+<b id="b">1<i id="i">2<p>3<script>document.getElementById("b").id = "c";document.getElementById("i").id = "j"</script></b>4
+#errors
+#document
+| <html>
+| <head>
+| <body>
+| <b>
+| id="c"
+| "1"
+| <i>
+| id="j"
+| "2"
+| <i>
+| id="i"
+| <p>
+| <b>
+| id="b"
+| "3"
+| <script>
+| "document.getElementById("b").id = "c";document.getElementById("i").id = "j""
+| "4"
| <tr>
| <td>
| "B"
-resources/inbody01.dat: PASS
-
-resources/isindex.dat: PASS
-
-resources/tables01.dat: PASS
-
-resources/tricky01.dat:
+resources/adoption02.dat:
2
-6
-Test 2 of 9 in resources/tricky01.dat failed. Input:
-<html>
-<font color=red><i>Italic and Red<p>Italic and Red </font> Just italic.</p> Italic only.</i> Plain
-<p>I should not be red. <font color=red>Red. <i>Italic and red.</p>
-<p>Italic and red. </i> Red.</font> I should not be red.</p>
-<b>Bold <i>Bold and italic</b> Only Italic </i> Plain
+Test 2 of 2 in resources/adoption02.dat failed. Input:
+<b id="b">1<i id="i">2<p>3<script>document.getElementById("b").id = "c";document.getElementById("i").id = "j"</script></b>4
Got:
| <html>
| <head>
| <body>
-| <font>
-| color="red"
-| <i>
-| "Italic and Red"
-| <i>
-| <p>
-| <font>
-| "Italic and Red "
-| " Just italic."
-| " Italic only."
-| " Plain
-"
-| <p>
-| "I should not be red. "
-| <font>
-| color="red"
-| "Red. "
-| <i>
-| "Italic and red."
-| <font>
-| color="red"
-| <i>
-| "
-"
-| <p>
-| <font>
-| <i>
-| "Italic and red. "
-| " Red."
-| " I should not be red."
-| "
-"
| <b>
-| "Bold "
+| id="c"
+| "1"
| <i>
-| "Bold and italic"
+| id="j"
+| "2"
| <i>
-| " Only Italic "
-| " Plain"
+| id="j"
+| <p>
+| <b>
+| id="c"
+| "3"
+| <script>
+| "document.getElementById("b").id = "c";document.getElementById("i").id = "j""
+| "4"
Expected:
| <html>
| <head>
| <body>
-| <font>
-| color="red"
-| <i>
-| "Italic and Red"
-| <i>
-| <p>
-| <font>
-| color="red"
-| "Italic and Red "
-| " Just italic."
-| " Italic only."
-| " Plain
-"
-| <p>
-| "I should not be red. "
-| <font>
-| color="red"
-| "Red. "
-| <i>
-| "Italic and red."
-| <font>
-| color="red"
-| <i>
-| "
-"
-| <p>
-| <font>
-| color="red"
-| <i>
-| "Italic and red. "
-| " Red."
-| " I should not be red."
-| "
-"
| <b>
-| "Bold "
+| id="c"
+| "1"
| <i>
-| "Bold and italic"
+| id="j"
+| "2"
| <i>
-| " Only Italic "
-| " Plain"
+| id="i"
+| <p>
+| <b>
+| id="b"
+| "3"
+| <script>
+| "document.getElementById("b").id = "c";document.getElementById("i").id = "j""
+| "4"
+resources/inbody01.dat: PASS
+
+resources/isindex.dat: PASS
+
+resources/tables01.dat: PASS
+
+resources/tricky01.dat:
+6
Test 6 of 9 in resources/tricky01.dat failed. Input:
<TABLE>
| <tr>
| <td>
| "2"
+resources/adoption02.dat:
+2
+
+Test 2 of 2 in resources/adoption02.dat failed. Input:
+<b id="b">1<i id="i">2<p>3<script>document.getElementById("b").id = "c";document.getElementById("i").id = "j"</script></b>4
+Got:
+| <html>
+| <head>
+| <body>
+| <b>
+| id="c"
+| "1"
+| <i>
+| id="j"
+| "2"
+| <i>
+| id="j"
+| <p>
+| <b>
+| id="c"
+| "3"
+| <script>
+| "document.getElementById("b").id = "c";document.getElementById("i").id = "j""
+| "4"
+Expected:
+| <html>
+| <head>
+| <body>
+| <b>
+| id="c"
+| "1"
+| <i>
+| id="j"
+| "2"
+| <i>
+| id="i"
+| <p>
+| <b>
+| id="b"
+| "3"
+| <script>
+| "document.getElementById("b").id = "c";document.getElementById("i").id = "j""
+| "4"
resources/inbody01.dat: PASS
resources/isindex.dat:
'resources/entities02.dat',
'resources/comments01.dat',
'resources/adoption01.dat',
+ 'resources/adoption02.dat',
'resources/inbody01.dat',
'resources/isindex.dat',
'resources/tables01.dat',
+2010-07-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Include attributes when reconstructing elements in HTML5 tree builder
+ https://bugs.webkit.org/show_bug.cgi?id=42594
+
+ Remove FIXME now that we have a test.
+
+ * html/HTMLConstructionSite.cpp:
+ (WebCore::HTMLConstructionSite::createHTMLElementFromElementRecord):
+
2010-07-20 Sam Weinig <sam@webkit.org>
Reviewed by Brady Eidson.
PassRefPtr<Element> HTMLConstructionSite::createHTMLElementFromElementRecord(HTMLElementStack::ElementRecord* record)
{
- // FIXME: This will change to use
- // return createHTMLElementFromSavedElement(record->element());
- // in a later patch once tested.
- AtomicHTMLToken fakeToken(HTMLToken::StartTag, record->element()->localName());
- return createHTMLElement(fakeToken);
+ return createHTMLElementFromSavedElement(record->element());
}
namespace {