Changeset 63798 in webkit


Ignore:
Timestamp:
Jul 20, 2010 7:30:19 PM (14 years ago)
Author:
abarth@webkit.org
Message:

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 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):
Location:
trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r63795 r63798  
     12010-07-20  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Include attributes when reconstructing elements in HTML5 tree builder
     6        https://bugs.webkit.org/show_bug.cgi?id=42594
     7
     8        * html5lib/runner-expected-html5.txt:
     9
    1102010-07-20  Tony Chang  <tony@chromium.org>
    211
  • trunk/LayoutTests/html5lib/runner-expected-html5.txt

    r63793 r63798  
    362362|           <td>
    363363|             "B"
     364resources/adoption02.dat:
     3652
     366
     367Test 2 of 2 in resources/adoption02.dat failed. Input:
     368<b id="b">1<i id="i">2<p>3<script>document.getElementById("b").id = "c";document.getElementById("i").id = "j"</script></b>4
     369Got:
     370| <html>
     371|   <head>
     372|   <body>
     373|     <b>
     374|       id="c"
     375|       "1"
     376|       <i>
     377|         id="j"
     378|         "2"
     379|     <i>
     380|       id="j"
     381|       <p>
     382|         <b>
     383|           id="c"
     384|           "3"
     385|           <script>
     386|             "document.getElementById("b").id = "c";document.getElementById("i").id = "j""
     387|         "4"
     388Expected:
     389| <html>
     390|   <head>
     391|   <body>
     392|     <b>
     393|       id="c"
     394|       "1"
     395|       <i>
     396|         id="j"
     397|         "2"
     398|     <i>
     399|       id="i"
     400|       <p>
     401|         <b>
     402|           id="b"
     403|           "3"
     404|           <script>
     405|             "document.getElementById("b").id = "c";document.getElementById("i").id = "j""
     406|         "4"
    364407resources/inbody01.dat: PASS
    365408
     
    369412
    370413resources/tricky01.dat:
    371 2
    3724146
    373 
    374 Test 2 of 9 in resources/tricky01.dat failed. Input:
    375 <html>
    376 <font color=red><i>Italic and Red<p>Italic and Red </font> Just italic.</p> Italic only.</i> Plain
    377 <p>I should not be red. <font color=red>Red. <i>Italic and red.</p>
    378 <p>Italic and red. </i> Red.</font> I should not be red.</p>
    379 <b>Bold <i>Bold and italic</b> Only Italic </i> Plain
    380 Got:
    381 | <html>
    382 |   <head>
    383 |   <body>
    384 |     <font>
    385 |       color="red"
    386 |       <i>
    387 |         "Italic and Red"
    388 |     <i>
    389 |       <p>
    390 |         <font>
    391 |           "Italic and Red "
    392 |         " Just italic."
    393 |       " Italic only."
    394 |     " Plain
    395 "
    396 |     <p>
    397 |       "I should not be red. "
    398 |       <font>
    399 |         color="red"
    400 |         "Red. "
    401 |         <i>
    402 |           "Italic and red."
    403 |     <font>
    404 |       color="red"
    405 |       <i>
    406 |         "
    407 "
    408 |     <p>
    409 |       <font>
    410 |         <i>
    411 |           "Italic and red. "
    412 |         " Red."
    413 |       " I should not be red."
    414 |     "
    415 "
    416 |     <b>
    417 |       "Bold "
    418 |       <i>
    419 |         "Bold and italic"
    420 |     <i>
    421 |       " Only Italic "
    422 |     " Plain"
    423 Expected:
    424 | <html>
    425 |   <head>
    426 |   <body>
    427 |     <font>
    428 |       color="red"
    429 |       <i>
    430 |         "Italic and Red"
    431 |     <i>
    432 |       <p>
    433 |         <font>
    434 |           color="red"
    435 |           "Italic and Red "
    436 |         " Just italic."
    437 |       " Italic only."
    438 |     " Plain
    439 "
    440 |     <p>
    441 |       "I should not be red. "
    442 |       <font>
    443 |         color="red"
    444 |         "Red. "
    445 |         <i>
    446 |           "Italic and red."
    447 |     <font>
    448 |       color="red"
    449 |       <i>
    450 |         "
    451 "
    452 |     <p>
    453 |       <font>
    454 |         color="red"
    455 |         <i>
    456 |           "Italic and red. "
    457 |         " Red."
    458 |       " I should not be red."
    459 |     "
    460 "
    461 |     <b>
    462 |       "Bold "
    463 |       <i>
    464 |         "Bold and italic"
    465 |     <i>
    466 |       " Only Italic "
    467 |     " Plain"
    468415
    469416Test 6 of 9 in resources/tricky01.dat failed. Input:
  • trunk/LayoutTests/html5lib/runner-expected.txt

    r63793 r63798  
    49544954|           <td>
    49554955|             "2"
     4956resources/adoption02.dat:
     49572
     4958
     4959Test 2 of 2 in resources/adoption02.dat failed. Input:
     4960<b id="b">1<i id="i">2<p>3<script>document.getElementById("b").id = "c";document.getElementById("i").id = "j"</script></b>4
     4961Got:
     4962| <html>
     4963|   <head>
     4964|   <body>
     4965|     <b>
     4966|       id="c"
     4967|       "1"
     4968|       <i>
     4969|         id="j"
     4970|         "2"
     4971|     <i>
     4972|       id="j"
     4973|       <p>
     4974|         <b>
     4975|           id="c"
     4976|           "3"
     4977|           <script>
     4978|             "document.getElementById("b").id = "c";document.getElementById("i").id = "j""
     4979|         "4"
     4980Expected:
     4981| <html>
     4982|   <head>
     4983|   <body>
     4984|     <b>
     4985|       id="c"
     4986|       "1"
     4987|       <i>
     4988|         id="j"
     4989|         "2"
     4990|     <i>
     4991|       id="i"
     4992|       <p>
     4993|         <b>
     4994|           id="b"
     4995|           "3"
     4996|           <script>
     4997|             "document.getElementById("b").id = "c";document.getElementById("i").id = "j""
     4998|         "4"
    49564999resources/inbody01.dat: PASS
    49575000
  • trunk/LayoutTests/html5lib/runner.html

    r63793 r63798  
    6262        'resources/comments01.dat',
    6363        'resources/adoption01.dat',
     64        'resources/adoption02.dat',
    6465        'resources/inbody01.dat',
    6566        'resources/isindex.dat',
  • trunk/WebCore/ChangeLog

    r63794 r63798  
     12010-07-20  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Include attributes when reconstructing elements in HTML5 tree builder
     6        https://bugs.webkit.org/show_bug.cgi?id=42594
     7
     8        Remove FIXME now that we have a test.
     9
     10        * html/HTMLConstructionSite.cpp:
     11        (WebCore::HTMLConstructionSite::createHTMLElementFromElementRecord):
     12
    1132010-07-20  Sam Weinig  <sam@webkit.org>
    214
  • trunk/WebCore/html/HTMLConstructionSite.cpp

    r63762 r63798  
    315315PassRefPtr<Element> HTMLConstructionSite::createHTMLElementFromElementRecord(HTMLElementStack::ElementRecord* record)
    316316{
    317     // FIXME: This will change to use
    318     // return createHTMLElementFromSavedElement(record->element());
    319     // in a later patch once tested.
    320     AtomicHTMLToken fakeToken(HTMLToken::StartTag, record->element()->localName());
    321     return createHTMLElement(fakeToken);
     317    return createHTMLElementFromSavedElement(record->element());
    322318}
    323319
Note: See TracChangeset for help on using the changeset viewer.