Changeset 63517 in webkit


Ignore:
Timestamp:
Jul 15, 2010 10:16:18 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-07-15 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Update LegacyHTMLTreeBuilder to insert whitespace between </head> and <body>
https://bugs.webkit.org/show_bug.cgi?id=42431

Insert these whitespace text nodes into the HTML element between <head>
and <body>, as required by HTML5. Previously, we just dropped them on
the floor.

  • html/LegacyHTMLTreeBuilder.cpp: (WebCore::LegacyHTMLTreeBuilder::handleError):

2010-07-15 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Update LegacyHTMLTreeBuilder to insert whitespace between </head> and <body>
https://bugs.webkit.org/show_bug.cgi?id=42431

Update expected results. These results match the HTML5 parser.

  • editing/deleting/delete-br-in-last-table-cell-expected.txt:
  • fast/innerHTML/005-expected.txt:
  • html5lib/resources/webkit01.dat:
  • html5lib/runner-expected.txt:
  • http/tests/webarchive/cross-origin-stylesheet-crash-expected.webarchive:
  • http/tests/webarchive/test-css-url-encoding-expected.webarchive:
  • http/tests/webarchive/test-css-url-encoding-shift-jis-expected.webarchive:
  • http/tests/webarchive/test-css-url-encoding-utf-8-expected.webarchive:
  • platform/mac/css2.1/t1204-root-e-expected.txt:
  • platform/mac/fast/css/empty-generated-content-expected.txt:
  • traversal/exception-forwarding-expected.txt:
  • traversal/script-tests/exception-forwarding.js:
  • webarchive/adopt-attribute-styled-body-webarchive-expected.webarchive:
  • webarchive/adopt-attribute-styled-node-webarchive-expected.webarchive:
  • webarchive/adopt-inline-styled-node-webarchive-expected.webarchive:
  • webarchive/archive-empty-frame-dom-expected.webarchive:
  • webarchive/archive-with-unencoded-url-expected.webarchive:
  • webarchive/test-body-background-expected.webarchive:
  • webarchive/test-css-import-expected.webarchive:
  • webarchive/test-css-url-resources-in-stylesheets-expected.webarchive:
  • webarchive/test-css-url-resources-inline-styles-expected.webarchive:
  • webarchive/test-duplicate-resources-expected.webarchive:
  • webarchive/test-frameset-expected.webarchive:
  • webarchive/test-img-src-expected.webarchive:
  • webarchive/test-input-src-expected.webarchive:
  • webarchive/test-link-href-expected.webarchive:
  • webarchive/test-link-rel-icon-expected.webarchive:
  • webarchive/test-object-data-expected.webarchive:
  • webarchive/test-script-src-expected.webarchive:
  • webarchive/test-table-background-expected.webarchive:
  • webarchive/test-td-background-expected.webarchive:
Location:
trunk
Files:
34 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r63515 r63517  
     12010-07-15  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Update LegacyHTMLTreeBuilder to insert whitespace between </head> and <body>
     6        https://bugs.webkit.org/show_bug.cgi?id=42431
     7
     8        Update expected results.  These results match the HTML5 parser.
     9
     10        * editing/deleting/delete-br-in-last-table-cell-expected.txt:
     11        * fast/innerHTML/005-expected.txt:
     12        * html5lib/resources/webkit01.dat:
     13        * html5lib/runner-expected.txt:
     14        * http/tests/webarchive/cross-origin-stylesheet-crash-expected.webarchive:
     15        * http/tests/webarchive/test-css-url-encoding-expected.webarchive:
     16        * http/tests/webarchive/test-css-url-encoding-shift-jis-expected.webarchive:
     17        * http/tests/webarchive/test-css-url-encoding-utf-8-expected.webarchive:
     18        * platform/mac/css2.1/t1204-root-e-expected.txt:
     19        * platform/mac/fast/css/empty-generated-content-expected.txt:
     20        * traversal/exception-forwarding-expected.txt:
     21        * traversal/script-tests/exception-forwarding.js:
     22        * webarchive/adopt-attribute-styled-body-webarchive-expected.webarchive:
     23        * webarchive/adopt-attribute-styled-node-webarchive-expected.webarchive:
     24        * webarchive/adopt-inline-styled-node-webarchive-expected.webarchive:
     25        * webarchive/archive-empty-frame-dom-expected.webarchive:
     26        * webarchive/archive-with-unencoded-url-expected.webarchive:
     27        * webarchive/test-body-background-expected.webarchive:
     28        * webarchive/test-css-import-expected.webarchive:
     29        * webarchive/test-css-url-resources-in-stylesheets-expected.webarchive:
     30        * webarchive/test-css-url-resources-inline-styles-expected.webarchive:
     31        * webarchive/test-duplicate-resources-expected.webarchive:
     32        * webarchive/test-frameset-expected.webarchive:
     33        * webarchive/test-img-src-expected.webarchive:
     34        * webarchive/test-input-src-expected.webarchive:
     35        * webarchive/test-link-href-expected.webarchive:
     36        * webarchive/test-link-rel-icon-expected.webarchive:
     37        * webarchive/test-object-data-expected.webarchive:
     38        * webarchive/test-script-src-expected.webarchive:
     39        * webarchive/test-table-background-expected.webarchive:
     40        * webarchive/test-td-background-expected.webarchive:
     41
    1422010-07-15  Geoffrey Garen  <ggaren@apple.com>
    243
  • trunk/LayoutTests/editing/deleting/delete-br-in-last-table-cell-expected.txt

    r63403 r63517  
    2222</#text>
    2323</HEAD>
     24<#text>
     25
     26</#text>
    2427<BODY>
    2528<#text>
  • trunk/LayoutTests/fast/innerHTML/005-expected.txt

    r14516 r63517  
    33<meta name="description" content="This tests html output">
    44<title>html innerHTML test</title>
    5 </head><body>
     5</head>
     6<body>
    67<span>Content:</span>
    78<pre id="content">placeholder</pre>
  • trunk/LayoutTests/html5lib/resources/webkit01.dat

    r62623 r63517  
    409409|           "a"
    410410|         <nobr>
     411
     412#data
     413<head></head>
     414<body></body>
     415#errors
     416#document
     417| <html>
     418|   <head>
     419|   "
     420"
     421|   <body>
     422
     423#data
     424<head></head> <style></style>ddd
     425#errors
     426#document
     427| <html>
     428|   <head>
     429|     <style>
     430|   " "
     431|   <body>
     432|     "ddd"
  • trunk/LayoutTests/html5lib/runner-expected.txt

    r63472 r63517  
    4378437833
    43794379
    4380 Test 20 of 33 in resources/webkit01.dat failed. Input:
     4380Test 20 of 35 in resources/webkit01.dat failed. Input:
    43814381<body></br foo="bar"></body>
    43824382Got:
     
    43924392|     <br>
    43934393
    4394 Test 22 of 33 in resources/webkit01.dat failed. Input:
     4394Test 22 of 35 in resources/webkit01.dat failed. Input:
    43954395<body></body></br foo="bar">
    43964396Got:
     
    44064406|     <br>
    44074407
    4408 Test 24 of 33 in resources/webkit01.dat failed. Input:
     4408Test 24 of 35 in resources/webkit01.dat failed. Input:
    44094409<html><body></body></html><!-- Hi there -->
    44104410Got:
     
    44194419| <!--  Hi there  -->
    44204420
    4421 Test 26 of 33 in resources/webkit01.dat failed. Input:
     4421Test 26 of 35 in resources/webkit01.dat failed. Input:
    44224422<html><body></body></html>x<!-- Hi there --></html><!-- Again -->
    44234423Got:
     
    44364436| <!--  Again  -->
    44374437
    4438 Test 27 of 33 in resources/webkit01.dat failed. Input:
     4438Test 27 of 35 in resources/webkit01.dat failed. Input:
    44394439<html><body></body></html>x<!-- Hi there --></body></html><!-- Again -->
    44404440Got:
     
    44534453| <!--  Again  -->
    44544454
    4455 Test 28 of 33 in resources/webkit01.dat failed. Input:
     4455Test 28 of 35 in resources/webkit01.dat failed. Input:
    44564456<html><body><ruby><div><rp>xx</rp></div></ruby></body></html>
    44574457Got:
     
    44724472|         "xx"
    44734473
    4474 Test 29 of 33 in resources/webkit01.dat failed. Input:
     4474Test 29 of 35 in resources/webkit01.dat failed. Input:
    44754475<html><body><ruby><div><rt>xx</rt></div></ruby></body></html>
    44764476Got:
     
    44914491|         "xx"
    44924492
    4493 Test 30 of 33 in resources/webkit01.dat failed. Input:
     4493Test 30 of 35 in resources/webkit01.dat failed. Input:
    44944494<html><frameset><!--1--><noframes>A</noframes><!--2--></frameset><!--3--><noframes>B</noframes><!--4--></html><!--5--><noframes>C</noframes><!--6-->
    44954495Got:
     
    45214521| <!-- 6 -->
    45224522
    4523 Test 31 of 33 in resources/webkit01.dat failed. Input:
     4523Test 31 of 35 in resources/webkit01.dat failed. Input:
    45244524<select><option>A<select><option>B<select><option>C<select><option>D<select><option>E<select><option>F<select><option>G<select>
    45254525Got:
     
    45654565|           "G"
    45664566
    4567 Test 33 of 33 in resources/webkit01.dat failed. Input:
     4567Test 33 of 35 in resources/webkit01.dat failed. Input:
    45684568<div><b></div><div><nobr>a<nobr>
    45694569Got:
  • trunk/LayoutTests/http/tests/webarchive/cross-origin-stylesheet-crash-expected.webarchive

    r50779 r63517  
    1212&lt;/script&gt;
    1313&lt;link rel="stylesheet" href="http://localhost:8000/webarchive/resources/localhost-stylesheet.css" type="text/css"&gt;
    14 &lt;/head&gt;&lt;body&gt;
     14&lt;/head&gt;
     15&lt;body&gt;
    1516This HTML links to an external stylesheet from a different security origin.&lt;br&gt;
    1617Making a webarchive of this page should not crash.
  • trunk/LayoutTests/http/tests/webarchive/test-css-url-encoding-expected.webarchive

    r39576 r63517  
    1414    layoutTestController.dumpDOMAsWebArchive();
    1515&lt;/script&gt;
    16 &lt;/head&gt;&lt;body&gt;
     16&lt;/head&gt;
     17&lt;body&gt;
    1718&lt;div&gt;
    1819Test for &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=11850"&gt;Bug 11850:
  • trunk/LayoutTests/http/tests/webarchive/test-css-url-encoding-shift-jis-expected.webarchive

    r39576 r63517  
    1616    layoutTestController.dumpDOMAsWebArchive();
    1717&lt;/script&gt;
    18 &lt;/head&gt;&lt;body&gt;
     18&lt;/head&gt;
     19&lt;body&gt;
    1920&lt;div&gt;
    2021Test for &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=11850"&gt;Bug 11850:
  • trunk/LayoutTests/http/tests/webarchive/test-css-url-encoding-utf-8-expected.webarchive

    r39576 r63517  
    1616    layoutTestController.dumpDOMAsWebArchive();
    1717&lt;/script&gt;
    18 &lt;/head&gt;&lt;body&gt;
     18&lt;/head&gt;
     19&lt;body&gt;
    1920&lt;div&gt;
    2021Test for &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=11850"&gt;Bug 11850:
  • trunk/LayoutTests/platform/mac/css2.1/t1204-root-e-expected.txt

    r25970 r63517  
    66      RenderInline (generated) at (0,0) size 0x0
    77        RenderText at (0,0) size 0x0
     8      RenderText {#text} at (0,0) size 0x0
    89    RenderBody {BODY} at (8,16) size 784x70
    910      RenderBlock {P} at (0,0) size 784x18
  • trunk/LayoutTests/platform/mac/fast/css/empty-generated-content-expected.txt

    r63403 r63517  
    33layer at (0,0) size 800x34
    44  RenderBlock {HTML} at (0,0) size 800x34
     5    RenderBlock (anonymous) at (0,0) size 800x0
     6      RenderText {#text} at (0,0) size 0x0
    57    RenderBody {BODY} at (8,8) size 784x18
    68      RenderText {#text} at (0,0) size 211x18
  • trunk/LayoutTests/traversal/exception-forwarding-expected.txt

    r30089 r63517  
    1414PASS w.nextSibling() threw exception Roses.
    1515PASS w.previousSibling() is null
    16 PASS w.nextSibling() is document.body
    17 PASS w.previousSibling() is document.body.previousSibling
     16PASS w.nextSibling() is document.body.previousSibling
     17PASS w.previousSibling() is document.head
    1818PASS iteration is 11
    1919PASS successfullyParsed is true
  • trunk/LayoutTests/traversal/script-tests/exception-forwarding.js

    r48553 r63517  
    2424shouldThrow("w.nextSibling()"); // 9
    2525shouldBe("w.previousSibling()", "null");
    26 shouldBe("w.nextSibling()", "document.body"); // 10
    27 shouldBe("w.previousSibling()", "document.body.previousSibling"); // 11
     26shouldBe("w.nextSibling()", "document.body.previousSibling"); // 10
     27shouldBe("w.previousSibling()", "document.head"); // 11
    2828shouldBe("iteration", "11");
    2929
  • trunk/LayoutTests/webarchive/adopt-attribute-styled-body-webarchive-expected.webarchive

    r43215 r63517  
    6464
    6565&lt;/script&gt;
    66 &lt;/head&gt;&lt;body onload="startTest();"&gt;
     66&lt;/head&gt;
     67
     68&lt;body onload="startTest();"&gt;
    6769&lt;span id="testSpan"&gt;This test takes a body with inline link color styling from a second window, moves it to the document of an iframe, makes sure the
    6870second window has closed, then makes a WebArchive.  The test passes if it doesn't crash.  If running the test in Safari then garbage collection might get in the
  • trunk/LayoutTests/webarchive/adopt-attribute-styled-node-webarchive-expected.webarchive

    r42955 r63517  
    6464
    6565&lt;/script&gt;
    66 &lt;/head&gt;&lt;body onload="startTest();"&gt;
     66&lt;/head&gt;
     67
     68&lt;body onload="startTest();"&gt;
    6769&lt;span id="testSpan"&gt;This test takes a node with mapped style attributes from a different document, moves it to this document, makes sure the other document has closed,
    6870then makes a WebArchive from this document.  The test passes if it doesn't crash.  If running the test in Safari then garbage collection might get in the
  • trunk/LayoutTests/webarchive/adopt-inline-styled-node-webarchive-expected.webarchive

    r42955 r63517  
    6464
    6565&lt;/script&gt;
    66 &lt;/head&gt;&lt;body onload="startTest();"&gt;
     66&lt;/head&gt;
     67
     68&lt;body onload="startTest();"&gt;
    6769&lt;span id="testSpan"&gt;This test takes a node with inline style from a different document, moves it to this document, makes sure the other document has closed,
    6870then makes a WebArchive from this document.  The test passes if it doesn't crash.  If running the test in Safari then garbage collection might get in the
  • trunk/LayoutTests/webarchive/archive-empty-frame-dom-expected.webarchive

    r61234 r63517  
    1212        layoutTestController.dumpDOMAsWebArchive();
    1313&lt;/script&gt;
    14 &lt;/head&gt;&lt;body&gt;
     14&lt;/head&gt;
     15&lt;body&gt;
    1516
    1617&lt;p&gt;
  • trunk/LayoutTests/webarchive/archive-with-unencoded-url-expected.webarchive

    r35076 r63517  
    1111        layoutTestController.dumpDOMAsWebArchive();
    1212&lt;/script&gt;
    13 &lt;/head&gt;&lt;body&gt;
     13&lt;/head&gt;
     14&lt;body&gt;
    1415&lt;form&gt;
    1516    &lt;input type="image" src="resources/apple.gif?foo|bar"&gt;
  • trunk/LayoutTests/webarchive/test-body-background-expected.webarchive

    r35076 r63517  
    1111        layoutTestController.dumpDOMAsWebArchive();
    1212&lt;/script&gt;
    13 &lt;/head&gt;&lt;body background="resources/apple.gif"&gt;
     13&lt;/head&gt;
     14&lt;body background="resources/apple.gif"&gt;
    1415
    1516
  • trunk/LayoutTests/webarchive/test-css-import-expected.webarchive

    r35076 r63517  
    1515    @import url('resources/test-css-import.css');
    1616&lt;/style&gt;
    17 &lt;/head&gt;&lt;body&gt;
     17&lt;/head&gt;
     18&lt;body&gt;
    1819&lt;div class="blue"&gt;This text should be blue.&lt;/div&gt;
    1920&lt;div class="red"&gt;This text should be red.&lt;/div&gt;
  • trunk/LayoutTests/webarchive/test-css-url-resources-in-stylesheets-expected.webarchive

    r39441 r63517  
    135135
    136136&lt;/style&gt;
    137 &lt;/head&gt;&lt;body onload="notifyDone()"&gt;
     137&lt;/head&gt;
     138&lt;body onload="notifyDone()"&gt;
    138139&lt;div&gt;&lt;p&gt;This page tests that url() resources referenced in CSS stylesheets are saved in webarchives.&lt;/p&gt;&lt;/div&gt;
    139140&lt;div class="background"&gt;This element should have one Apple logo in the background at the top left.&lt;/div&gt;
  • trunk/LayoutTests/webarchive/test-css-url-resources-inline-styles-expected.webarchive

    r39441 r63517  
    2929}
    3030&lt;/style&gt;
    31 &lt;/head&gt;&lt;body onload="notifyDone()"&gt;
     31&lt;/head&gt;
     32&lt;body onload="notifyDone()"&gt;
    3233&lt;div&gt;&lt;p&gt;This page tests that url() resources referenced in CSS stylesheets are saved in webarchives.&lt;/p&gt;&lt;/div&gt;
    3334&lt;div style="border: solid black 1px; height: 64px; background: url(resources/apple.gif?background) no-repeat top left;"&gt;This element should have one Apple logo in the background at the top left.&lt;/div&gt;
  • trunk/LayoutTests/webarchive/test-duplicate-resources-expected.webarchive

    r36704 r63517  
    1111&lt;script src="resources/dump-webarchive.js" language="javascript" type="text/javascript"&gt;&lt;/script&gt;
    1212&lt;link rel="stylesheet" href="resources/test-style.css" type="text/css"&gt;
    13 &lt;/head&gt;&lt;body&gt;
     13&lt;/head&gt;
     14&lt;body&gt;
    1415&lt;div&gt;
    1516  &lt;img src="resources/apple.gif"&gt;
     
    4243                                <string>&lt;html&gt;&lt;head&gt;
    4344&lt;link rel="stylesheet" href="test-style.css" type="text/css"&gt;
    44 &lt;/head&gt;&lt;body&gt;
     45&lt;/head&gt;
     46&lt;body&gt;
    4547&lt;div&gt;
    4648  &lt;img src="apple.gif"&gt;
  • trunk/LayoutTests/webarchive/test-frameset-expected.webarchive

    r35076 r63517  
    1111        layoutTestController.dumpDOMAsWebArchive();
    1212&lt;/script&gt;
    13 &lt;/head&gt;&lt;frameset rows="*"&gt;
     13&lt;/head&gt;
     14&lt;frameset rows="*"&gt;
    1415  &lt;frame src="resources/test-frame.html" name="myframe"&gt;
    1516&lt;/frameset&gt;&lt;/html&gt;</string>
     
    3132                                <string>&lt;html&gt;&lt;head&gt;
    3233&lt;link rel="stylesheet" href="test-style.css" type="text/css"&gt;
    33 &lt;/head&gt;&lt;body&gt;
     34&lt;/head&gt;
     35&lt;body&gt;
    3436&lt;div&gt;
    3537  &lt;img src="apple.gif"&gt;
  • trunk/LayoutTests/webarchive/test-img-src-expected.webarchive

    r35076 r63517  
    1111        layoutTestController.dumpDOMAsWebArchive();
    1212&lt;/script&gt;
    13 &lt;/head&gt;&lt;body&gt;
     13&lt;/head&gt;
     14&lt;body&gt;
    1415  &lt;img src="resources/apple.gif"&gt;
    1516
  • trunk/LayoutTests/webarchive/test-input-src-expected.webarchive

    r35076 r63517  
    1111        layoutTestController.dumpDOMAsWebArchive();
    1212&lt;/script&gt;
    13 &lt;/head&gt;&lt;body&gt;
     13&lt;/head&gt;
     14&lt;body&gt;
    1415&lt;form&gt;
    1516&lt;input type="image" src="resources/apple.gif"&gt;
  • trunk/LayoutTests/webarchive/test-link-href-expected.webarchive

    r35076 r63517  
    1212&lt;/script&gt;
    1313&lt;link rel="stylesheet" href="resources/test-style.css" type="text/css"&gt;
    14 &lt;/head&gt;&lt;body&gt;
     14&lt;/head&gt;
     15&lt;body&gt;
    1516&lt;div&gt;
    1617This text should be red sans-serif.
  • trunk/LayoutTests/webarchive/test-link-rel-icon-expected.webarchive

    r43499 r63517  
    1818&lt;/script&gt;
    1919&lt;link rel="icon" href="resources/favicon.ico" type="image/x-icon"&gt;
    20 &lt;/head&gt;&lt;body onload="runTest()"&gt;
     20&lt;/head&gt;
     21&lt;body onload="runTest()"&gt;
    2122
    2223
  • trunk/LayoutTests/webarchive/test-object-data-expected.webarchive

    r35076 r63517  
    1111        layoutTestController.dumpDOMAsWebArchive();
    1212&lt;/script&gt;
    13 &lt;/head&gt;&lt;body&gt;
     13&lt;/head&gt;
     14&lt;body&gt;
    1415  &lt;object data="resources/apple.gif" type="image/gif"&gt;&lt;/object&gt;
    1516
  • trunk/LayoutTests/webarchive/test-script-src-expected.webarchive

    r36704 r63517  
    88                <string>&lt;html&gt;&lt;head&gt;
    99&lt;script src="resources/dump-webarchive.js" type="text/javascript"&gt;&lt;/script&gt;
    10 &lt;/head&gt;&lt;body&gt;
     10&lt;/head&gt;
     11&lt;body&gt;
    1112
    1213
  • trunk/LayoutTests/webarchive/test-table-background-expected.webarchive

    r35076 r63517  
    1111        layoutTestController.dumpDOMAsWebArchive();
    1212&lt;/script&gt;
    13 &lt;/head&gt;&lt;body&gt;
     13&lt;/head&gt;
     14&lt;body&gt;
    1415  &lt;table background="resources/apple.gif" style="width: 52px; height: 64px;"&gt;
    1516    &lt;tbody&gt;&lt;tr&gt;
  • trunk/LayoutTests/webarchive/test-td-background-expected.webarchive

    r35076 r63517  
    1111        layoutTestController.dumpDOMAsWebArchive();
    1212&lt;/script&gt;
    13 &lt;/head&gt;&lt;body&gt;
     13&lt;/head&gt;
     14&lt;body&gt;
    1415  &lt;table&gt;
    1516    &lt;tbody&gt;&lt;tr&gt;
  • trunk/WebCore/ChangeLog

    r63516 r63517  
     12010-07-15  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Update LegacyHTMLTreeBuilder to insert whitespace between </head> and <body>
     6        https://bugs.webkit.org/show_bug.cgi?id=42431
     7
     8        Insert these whitespace text nodes into the HTML element between <head>
     9        and <body>, as required by HTML5.  Previously, we just dropped them on
     10        the floor.
     11
     12        * html/LegacyHTMLTreeBuilder.cpp:
     13        (WebCore::LegacyHTMLTreeBuilder::handleError):
     14
    1152010-07-15  Victor Wang  <victorw@chromium.org>
    216
  • trunk/WebCore/html/LegacyHTMLTreeBuilder.cpp

    r63472 r63517  
    284284        if (previousChild && previousChild->isTextNode()) {
    285285            // Only coalesce text nodes if the text node wouldn't be foster parented.
    286             if (!m_current->hasTagName(tableTag)
     286            if (!m_current->hasTagName(htmlTag)
     287                && !m_current->hasTagName(tableTag)
    287288                && !m_current->hasTagName(trTag)
    288289                && !m_current->hasTagName(theadTag)
     
    589590                if (n->isTextNode()) {
    590591                    Text* t = static_cast<Text*>(n);
    591                     if (t->containsOnlyWhitespace())
     592                    if (t->containsOnlyWhitespace()) {
     593                        if (m_head && !m_inBody) {
     594                            // We're between </head> and <body>.  According to
     595                            // the HTML5 parsing algorithm, we're supposed to
     596                            // insert whitespace text nodes into the HTML element.
     597                            ExceptionCode ec;
     598                            m_current->appendChild(n, ec);
     599                            return true;
     600                        }
    592601                        return false;
     602                    }
    593603                }
    594604                if (!m_haveFrameSet) {
Note: See TracChangeset for help on using the changeset viewer.