mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 340017. Make document.formName work in XHTML. r=bzbarsky
This commit is contained in:
parent
73f9a129d8
commit
e0f8a87194
@ -2635,11 +2635,6 @@ nsHTMLDocument::ResolveName(const nsAString& aName,
|
||||
{
|
||||
*aResult = nsnull;
|
||||
|
||||
if (!mIsRegularHTML) {
|
||||
// We don't dynamically resolve names on non-HTML documents.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAtom> name(do_GetAtom(aName));
|
||||
|
||||
// We have built a table and cache the named items. The table will
|
||||
|
@ -97,6 +97,7 @@ _TEST_FILES = test_bug1682.html \
|
||||
test_bug486741.html \
|
||||
test_bug497242.xhtml \
|
||||
test_bug512367.html \
|
||||
test_bug340017.xhtml \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
|
28
content/html/document/test/test_bug340017.xhtml
Normal file
28
content/html/document/test/test_bug340017.xhtml
Normal file
@ -0,0 +1,28 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=340017
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 340017</title>
|
||||
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=340017">Mozilla Bug 340017</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
<form id="frmfoo" name="foo" action="" />
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
<![CDATA[
|
||||
|
||||
/** Test for Bug 340017 **/
|
||||
is(document.foo, document.getElementById("frmfoo"),
|
||||
"The form with name 'foo' should be a document accessible property");
|
||||
]]>
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user