Bug 622117. Fix flag collision. r=smaug

This commit is contained in:
Boris Zbarsky 2011-01-03 20:46:19 -06:00
Родитель d4e5ed2167
Коммит 8735d7f805
3 изменённых файлов: 46 добавлений и 1 удалений

Просмотреть файл

@ -453,6 +453,7 @@ _TEST_FILES2 = \
test_treewalker_nextsibling.xml \
test_bug614058.html \
test_bug590771.html \
test_bug622117.html \
$(NULL)
# This test fails on the Mac for some reason

Просмотреть файл

@ -0,0 +1,44 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=622117
-->
<head>
<title>Test for Bug 622117</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.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=622117">Mozilla Bug 622117</a>
<p id="display">
<iframe id="testframe"
src="data:text/html,<a href='data:text/plain,PASS' onclick='throw 1'>Click me</a>">
</iframe>
</p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 622117 **/
SimpleTest.waitForExplicitFinish();
const PASSURL = "data:text/plain,PASS";
SimpleTest.waitForFocus(function() {
$("testframe").onload = function() {
is(this.contentDocument.documentElement.textContent, "PASS", "Should have loaded link");
SimpleTest.finish();
};
var win = $("testframe").contentWindow;
var a = win.document.getElementsByTagName("a")[0];
synthesizeMouseAtCenter(a, {}, win);
});
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -158,7 +158,7 @@ class nsHashKey;
#define NS_EVENT_FLAG_EXCEPTION_THROWN 0x10000
#define NS_EVENT_FLAG_PREVENT_ANCHOR_ACTIONS 0x10000
#define NS_EVENT_FLAG_PREVENT_ANCHOR_ACTIONS 0x20000
#define NS_EVENT_CAPTURE_MASK (~(NS_EVENT_FLAG_BUBBLE | NS_EVENT_FLAG_NO_CONTENT_DISPATCH))
#define NS_EVENT_BUBBLE_MASK (~(NS_EVENT_FLAG_CAPTURE | NS_EVENT_FLAG_NO_CONTENT_DISPATCH))