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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
--- /dev/null
+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
+
--- /dev/null
+<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>
+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
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());
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)