mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 669012 - Part a: ignore for and event attributes for SVG elements; r=smaug+hsivonen.
This commit is contained in:
parent
98a2a7433a
commit
921d8dd46e
@ -196,6 +196,10 @@ IsScriptEventHandler(nsIScriptElement *aScriptElement)
|
||||
nsCOMPtr<nsIContent> contElement = do_QueryInterface(aScriptElement);
|
||||
NS_ASSERTION(contElement, "nsIScriptElement isn't nsIContent");
|
||||
|
||||
if (!contElement->IsHTML()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsAutoString forAttr, eventAttr;
|
||||
if (!contElement->GetAttr(kNameSpaceID_None, nsGkAtoms::_for, forAttr) ||
|
||||
!contElement->GetAttr(kNameSpaceID_None, nsGkAtoms::event, eventAttr)) {
|
||||
|
@ -270,6 +270,7 @@ _TEST_FILES = \
|
||||
test_bug664299.html \
|
||||
test_bug666200.html \
|
||||
test_bug666666.html \
|
||||
test_bug669012.html \
|
||||
test_bug674558.html \
|
||||
test_bug583533.html \
|
||||
test_restore_from_parser_fragment.html \
|
||||
|
45
content/html/content/test/test_bug669012.html
Normal file
45
content/html/content/test/test_bug669012.html
Normal file
@ -0,0 +1,45 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=669012
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 669012</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=669012">Mozilla Bug 669012</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
<script>
|
||||
var run = 0;
|
||||
</script>
|
||||
<svg>
|
||||
<script>
|
||||
run++;
|
||||
ok(true, "Should run SVG script without attributes")
|
||||
</script>
|
||||
<script for=window event=onload>
|
||||
run++;
|
||||
ok(true, "Should run SVG script with for=window event=onload")
|
||||
</script>
|
||||
<script for=window event=foo>
|
||||
run++;
|
||||
ok(true, "Should run SVG script with for=window event=foo")
|
||||
</script>
|
||||
<script for=foo event=onload>
|
||||
run++;
|
||||
ok(true, "Should run SVG script with for=foo event=onload")
|
||||
</script>
|
||||
</svg>
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
/** Test for Bug 669012 **/
|
||||
is(run, 4, "Should have run all tests")
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user