mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 497519 part 1. Clear the undisplayed map correctly in the presence of XBL. r=dbaron,bzbarsky
This commit is contained in:
parent
f7cd534013
commit
bb8491a3fd
28
layout/base/crashtests/497519-1.xhtml
Normal file
28
layout/base/crashtests/497519-1.xhtml
Normal file
@ -0,0 +1,28 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
|
||||
<xbl:bindings xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
<xbl:binding id="foo"><xbl:content><div style="position:relative;"><xbl:children/></div></xbl:content></xbl:binding>
|
||||
</xbl:bindings>
|
||||
|
||||
<script>
|
||||
<![CDATA[
|
||||
function test() {
|
||||
document.getElementById("span").innerHTML = "<table><tr><td></td></tr></table>";
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="test();">
|
||||
|
||||
<div style="-moz-binding: url(#foo)">
|
||||
|
||||
<div style="display:none">text</div>
|
||||
<span id="span">text</span>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -239,5 +239,6 @@ load 492014.xhtml
|
||||
load 492112-1.xhtml
|
||||
load 492163-1.xhtml
|
||||
load 495350-1.html
|
||||
load 497519-1.xhtml
|
||||
load 500467-1.html
|
||||
load 501878-1.html
|
||||
|
@ -667,6 +667,24 @@ nsFrameManager::ClearAllUndisplayedContentIn(nsIContent* aParentContent)
|
||||
if (mUndisplayedMap) {
|
||||
mUndisplayedMap->RemoveNodesFor(aParentContent);
|
||||
}
|
||||
|
||||
// Need to look at aParentContent's content list due to XBL insertions.
|
||||
// Nodes in aParentContent's content list do not have aParentContent as a
|
||||
// parent, but are treated as children of aParentContent. We get access to
|
||||
// the content list via GetXBLChildNodesFor and just ignore any nodes we
|
||||
// don't care about.
|
||||
nsINodeList* list =
|
||||
aParentContent->GetOwnerDoc()->BindingManager()->GetXBLChildNodesFor(aParentContent);
|
||||
if (list) {
|
||||
PRUint32 length;
|
||||
list->GetLength(&length);
|
||||
for (PRUint32 i = 0; i < length; ++i) {
|
||||
nsIContent* child = list->GetNodeAt(i);
|
||||
if (child->GetParent() != aParentContent) {
|
||||
ClearUndisplayedContentIn(child, child->GetParent());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user