Reviewed by Darin.
authorharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Aug 2005 23:58:28 +0000 (23:58 +0000)
committerharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Aug 2005 23:58:28 +0000 (23:58 +0000)
        Landed by David Harrison.

        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4475
          <noscript>, <noframes>, <nolayer> and <noembed> elements should be in the DOM

        Test cases added:
        * layout-tests/fast/dom/no-elements-expected.txt: Added.
        * layout-tests/fast/dom/no-elements.html: Added.

        * khtml/html/html_elementimpl.cpp:
        (blockTagList):
        Add noembed and nolayer to the list of block tags.

        * khtml/html/htmlparser.cpp:
        (HTMLParser::noembedCreateErrorCheck):
        (HTMLParser::noframesCreateErrorCheck):
        (HTMLParser::noscriptCreateErrorCheck):
        (HTMLParser::nolayerCreateErrorCheck):
        Make sure these elements are created, but that they won't have any children.
        (Except for <noscript> when JavaScript is turned off).

        * layout-tests/dom/html/level2/html/HTMLElement113-expected.txt:
        * layout-tests/dom/html/level2/html/HTMLElement114-expected.txt:
        * layout-tests/dom/html/level2/html/HTMLElement142-expected.txt:
        * layout-tests/dom/html/level2/html/HTMLElement143-expected.txt:
        * layout-tests/dom/html/level2/html/HTMLElement26-expected.txt:
        * layout-tests/dom/html/level2/html/HTMLElement27-expected.txt:
        * layout-tests/dom/html/level2/html/HTMLElement55-expected.txt:
        * layout-tests/dom/html/level2/html/HTMLElement56-expected.txt:
        * layout-tests/dom/html/level2/html/HTMLElement84-expected.txt:
        * layout-tests/dom/html/level2/html/HTMLElement85-expected.txt:
        These tests pass now.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@10272 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
LayoutTests/dom/html/level2/html/HTMLElement113-expected.txt
LayoutTests/dom/html/level2/html/HTMLElement114-expected.txt
LayoutTests/dom/html/level2/html/HTMLElement142-expected.txt
LayoutTests/dom/html/level2/html/HTMLElement143-expected.txt
LayoutTests/dom/html/level2/html/HTMLElement26-expected.txt
LayoutTests/dom/html/level2/html/HTMLElement27-expected.txt
LayoutTests/dom/html/level2/html/HTMLElement55-expected.txt
LayoutTests/dom/html/level2/html/HTMLElement56-expected.txt
LayoutTests/dom/html/level2/html/HTMLElement84-expected.txt
LayoutTests/dom/html/level2/html/HTMLElement85-expected.txt
LayoutTests/fast/dom/no-elements-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/no-elements.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23
WebCore/khtml/html/html_elementimpl.cpp
WebCore/khtml/html/htmlparser.cpp

index 39a384066e1be0bc4256cfaccdaf1d5ae7a85bce..f46676e80002a0d2bdeef572c7968f31572f46ad 100644 (file)
@@ -1,3 +1,2 @@
-Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement113        
-Status:        failure
-Detail:        Asize: assertEquals failed, actual 0, expected 1.
+Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement113
+Status:        Success
index 333ad37750e2137282511f1e9a607e009796edf6..20d01aa1ade01d79e44987221e9ba6a41803f378 100644 (file)
@@ -1,3 +1,2 @@
-Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement114        
-Status:        failure
-Detail:        Asize: assertEquals failed, actual 0, expected 1.
+Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement114
+Status:        Success
index 61f9a959aef791fc35900d83b2a721e49162ebb3..d552b165d8e6a0f946580cf46c9e20dc15a3146e 100644 (file)
@@ -1,3 +1,2 @@
-Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement142        
-Status:        failure
-Detail:        Asize: assertEquals failed, actual 0, expected 1.
+Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement142
+Status:        Success
index a87b4d5fdd731f73ade3a3e3f27c995379cd2936..fa5ff28346ec775c35fdb42b35df6bd2980a35ca 100644 (file)
@@ -1,3 +1,2 @@
-Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement143        
-Status:        failure
-Detail:        Asize: assertEquals failed, actual 0, expected 1.
+Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement143
+Status:        Success
index 6a12944c64230e8375ba8d8755fe1e05abe80079..9009257931236233c4d10a55123715987b8c0652 100644 (file)
@@ -1,3 +1,2 @@
-Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement26 
-Status:        failure
-Detail:        Asize: assertEquals failed, actual 0, expected 1.
+Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement26
+Status:        Success
index cca6009d268c4490542bbfbca4e28be110756fd9..efad29d7472d2ea0458064139cfc67b7e0d1aadb 100644 (file)
@@ -1,3 +1,2 @@
-Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement27 
-Status:        failure
-Detail:        Asize: assertEquals failed, actual 0, expected 1.
+Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement27
+Status:        Success
index dfb034794acb042ae8d39751c844124f1b096198..327f5773b7c69f3fe1224330f194a6b1964ac9fc 100644 (file)
@@ -1,3 +1,2 @@
-Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement55 
-Status:        failure
-Detail:        Asize: assertEquals failed, actual 0, expected 1.
+Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement55
+Status:        Success
index 84dba4536bc12898d162075d669acdd707948cb0..53569aec57bce1b5ea28325a9fe96070d033a80b 100644 (file)
@@ -1,3 +1,2 @@
-Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement56 
-Status:        failure
-Detail:        Asize: assertEquals failed, actual 0, expected 1.
+Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement56
+Status:        Success
index 8ec2257345303f1ff7a3891fd76b7c37edd32a62..a51c895009f6cb7d93e7c6cd93870b886cfa46f2 100644 (file)
@@ -1,3 +1,2 @@
-Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement84 
-Status:        failure
-Detail:        Asize: assertEquals failed, actual 0, expected 1.
+Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement84
+Status:        Success
index db7917ede83249a32ede944cf372b5fcadf03c30..b50882e76cca143c6d1567615aaa33b65f8813e1 100644 (file)
@@ -1,3 +1,2 @@
-Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement85 
-Status:        failure
-Detail:        Asize: assertEquals failed, actual 0, expected 1.
+Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement85
+Status:        Success
diff --git a/LayoutTests/fast/dom/no-elements-expected.txt b/LayoutTests/fast/dom/no-elements-expected.txt
new file mode 100644 (file)
index 0000000..bb56ba3
--- /dev/null
@@ -0,0 +1,3 @@
+This tests that the elements noframes, nolayer, noscript and noembed are created as elements and put in the DOM tree. The elements should not contain any children. If the test is successful, the text "Success" will be seen below.
+Success
+
diff --git a/LayoutTests/fast/dom/no-elements.html b/LayoutTests/fast/dom/no-elements.html
new file mode 100644 (file)
index 0000000..434779b
--- /dev/null
@@ -0,0 +1,48 @@
+<html>
+<head>
+<style>
+</style>
+<script>
+function debug(str) {
+       li = document.createElement('li');
+       li.appendChild(document.createTextNode(str));
+       document.getElementById('console').appendChild(li);
+}
+
+function checkElement(id) {
+       t = document.getElementById(id);
+       
+       if (t == null)
+               return false;
+               
+       if (t.firstChild != null)
+               return false;
+               
+       return true;
+}
+
+function runTests() {
+       if (window.layoutTestController)
+               layoutTestController.dumpAsText();
+               
+       if (!checkElement('noframes') ||
+               !checkElement('nolayer') ||
+               !checkElement('noscript') ||
+               !checkElement('noembed')) 
+               debug("Failure");
+       else
+               debug("Success");
+}
+
+</script>
+</head>
+<body onload="runTests()">
+This tests that the elements noframes, nolayer, noscript and noembed are created as elements and put in the DOM tree. The elements should not contain any children. If the test is successful, the text "Success" will be seen below.
+<noframes id="noframes">This is noframes</noframes>
+<nolayer id="nolayer">This is nolayer</nolayer>
+<noscript id="noscript">This is noscript</noscript>
+<noembed id="noembed">This is noembed</noembed>
+<ul id="console">
+</ul>
+</body>
+</html>
index a969d992930dd1dc30af6f1e4035ce0a829b27ec..21b1181375697da30c4b2f20f1f1d358ec0895ae 100644 (file)
@@ -1,10 +1,47 @@
+2005-08-19  Anders Carlsson  <andersca@mac.com>
+
+        Reviewed by Darin.
+        Landed by David Harrison.
+
+        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4475
+          <noscript>, <noframes>, <nolayer> and <noembed> elements should be in the DOM
+
+        Test cases added:
+        * layout-tests/fast/dom/no-elements-expected.txt: Added.
+        * layout-tests/fast/dom/no-elements.html: Added.
+
+        * khtml/html/html_elementimpl.cpp:
+        (blockTagList):
+        Add noembed and nolayer to the list of block tags.
+        
+        * khtml/html/htmlparser.cpp:
+        (HTMLParser::noembedCreateErrorCheck):
+        (HTMLParser::noframesCreateErrorCheck):
+        (HTMLParser::noscriptCreateErrorCheck):
+        (HTMLParser::nolayerCreateErrorCheck):
+        Make sure these elements are created, but that they won't have any children.
+        (Except for <noscript> when JavaScript is turned off).
+        
+        * layout-tests/dom/html/level2/html/HTMLElement113-expected.txt:
+        * layout-tests/dom/html/level2/html/HTMLElement114-expected.txt:
+        * layout-tests/dom/html/level2/html/HTMLElement142-expected.txt:
+        * layout-tests/dom/html/level2/html/HTMLElement143-expected.txt:
+        * layout-tests/dom/html/level2/html/HTMLElement26-expected.txt:
+        * layout-tests/dom/html/level2/html/HTMLElement27-expected.txt:
+        * layout-tests/dom/html/level2/html/HTMLElement55-expected.txt:
+        * layout-tests/dom/html/level2/html/HTMLElement56-expected.txt:
+        * layout-tests/dom/html/level2/html/HTMLElement84-expected.txt:
+        * layout-tests/dom/html/level2/html/HTMLElement85-expected.txt:
+        These tests pass now.
+
 2005-08-19  Darin Adler  <darin@apple.com>
 
         Reviewed by Maciej.
         Landed by David Harrison.
         
-        Test cases added: Manual test because Darin saw no way to exercise the hit testing code from JavaScript.
+        Test cases added:
        manual-tests/onclick_in_noncontent.html: Added.
+        (a manual test because Darin saw no way to exercise the hit testing code from JavaScript)
 
         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3662
           onClick event for TD element doesn't fire unless its contents are clicked
index e27f1f4dbd249c72be8dd5200e1c34e499f47e5d..772f6e922cc948f1b745aca0427d3cd559addf4a 100644 (file)
@@ -884,6 +884,8 @@ HashSet<DOMStringImpl*, PointerHash<DOMStringImpl*> >* blockTagList() {
         tagList.insert(centerTag.localName().implementation());
         tagList.insert(noscriptTag.localName().implementation());
         tagList.insert(noframesTag.localName().implementation());
+        tagList.insert(noembedTag.localName().implementation());
+        tagList.insert(nolayerTag.localName().implementation());
         tagList.insert(blockquoteTag.localName().implementation());
         tagList.insert(formTag.localName().implementation());
         tagList.insert(isindexTag.localName().implementation());
index 1630fb71df0b1e7cc90f6ae870bdd5f891e995b1..6554ca50ad9a0793c15ca1e7151b1409fdc65db1 100644 (file)
@@ -742,25 +742,26 @@ bool HTMLParser::tableSectionCreateErrorCheck(Token* t, NodeImpl*& result)
 bool HTMLParser::noembedCreateErrorCheck(Token* t, NodeImpl*& result)
 {
     setSkipMode(noembedTag);
-    return false;
+    return true;
 }
 
 bool HTMLParser::noframesCreateErrorCheck(Token* t, NodeImpl*& result)
 {
     setSkipMode(noframesTag);
-    return false;
+    return true;
 }
 
 bool HTMLParser::noscriptCreateErrorCheck(Token* t, NodeImpl*& result)
 {
     if (HTMLWidget && HTMLWidget->part()->jScriptEnabled())
         setSkipMode(noscriptTag);
-    return false;
+    return true;
 }
 
 bool HTMLParser::nolayerCreateErrorCheck(Token* t, NodeImpl*& result)
 {
-    return false;
+    setSkipMode(nolayerTag);
+    return true;
 }
 
 NodeImpl *HTMLParser::getNode(Token* t)