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 39a3840..f46676e 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 333ad37..20d01aa 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 61f9a95..d552b16 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 a87b4d5..fa5ff28 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 6a12944..9009257 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 cca6009..efad29d 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 dfb0347..327f577 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 84dba45..53569ae 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 8ec2257..a51c895 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 db7917e..b50882e 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 a969d99..21b1181 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 e27f1f4..772f6e9 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 1630fb7..6554ca5 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)