mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 621618 patch 4: Make conditions in Element::RemoveFromIdTable match those in AddToIdTable, to avoid asymmetric calls to the document's functions. r=bzbarsky
This commit is contained in:
parent
2367771127
commit
af015e471f
@ -736,7 +736,7 @@ Element::RemoveFromIdTable(nsIAtom* aId)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
nsIDocument* doc = GetCurrentDoc();
|
nsIDocument* doc = GetCurrentDoc();
|
||||||
if (doc) {
|
if (doc && (!IsInAnonymousSubtree() || doc->IsXUL())) {
|
||||||
// id can be null during mutation events evilness. Also, XUL elements
|
// id can be null during mutation events evilness. Also, XUL elements
|
||||||
// loose their proto attributes during cc-unlink, so this can happen
|
// loose their proto attributes during cc-unlink, so this can happen
|
||||||
// during cc-unlink too.
|
// during cc-unlink too.
|
||||||
|
@ -21,9 +21,6 @@ function f() {
|
|||||||
SimpleTest.waitForExplicitFinish();
|
SimpleTest.waitForExplicitFinish();
|
||||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||||
|
|
||||||
// When the document is torn down or <svg> is removed, we hit bug 621618
|
|
||||||
SimpleTest.expectAssertions(1);
|
|
||||||
|
|
||||||
var frameLoadCount = 0;
|
var frameLoadCount = 0;
|
||||||
function frameLoaded() {
|
function frameLoaded() {
|
||||||
frameLoadCount++;
|
frameLoadCount++;
|
||||||
@ -33,11 +30,7 @@ function frameLoaded() {
|
|||||||
} else if (frameLoadCount == 2) {
|
} else if (frameLoadCount == 2) {
|
||||||
isnot(SpecialPowers.wrap(window.frame1).location.href.indexOf('chrome://'),
|
isnot(SpecialPowers.wrap(window.frame1).location.href.indexOf('chrome://'),
|
||||||
0, 'plugin shouldnt be able to cause navigation to chrome URLs');
|
0, 'plugin shouldnt be able to cause navigation to chrome URLs');
|
||||||
|
SimpleTest.finish();
|
||||||
// Make sure we trigger bug 621618 before the test finishes so the assertion
|
|
||||||
// is attributed to this test.
|
|
||||||
document.body.removeChild(document.querySelector("svg"));
|
|
||||||
SimpleTest.executeSoon(function() { SimpleTest.finish(); });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user