Bug 1003441 - Check that the new frame is also a nsSubDocumentFrame (i.e. that Init has picked up the detached views). r=roc

This commit is contained in:
Mats Palmgren 2015-05-27 22:18:36 +00:00
parent bbda9e7e91
commit 7b3aa8766d
3 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="setTimeout(boom,0,1)">
<splitter style="all: inherit;">
<box/>
<box/>
<box/>
<box/>
<iframe id="a" src="aaa"/>
</splitter>
<script id="script" xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[//<![CDATA[
var doc = document;
function boom(i) {
if (i>6)
return;
var x=doc.getElementsByTagName('*');
if (x[i] && x[i+1]) {
var temp = x[i+1].getAttribute('style');
x[i+1].setAttribute('style', x[i].getAttribute('style'));
x[i].setAttribute('style', temp);
} else {
return;
}
i++;
setTimeout(boom,50,i);
}
//]]>
</script>
</window>

View File

@ -559,6 +559,7 @@ load 973701-2.xhtml
load 986899.html
load 1001233.html
load 1001258-1.html
load 1003441.xul
pref(layout.css.grid.enabled,true) load 1015562.html
asserts(1-2) load 1015563-1.html
asserts(1-2) load 1015563-2.html

View File

@ -937,7 +937,7 @@ public:
if (!mPresShell->IsDestroying()) {
mPresShell->FlushPendingNotifications(Flush_Frames);
}
nsIFrame* frame = mFrameElement->GetPrimaryFrame();
nsSubDocumentFrame* frame = do_QueryFrame(mFrameElement->GetPrimaryFrame());
if ((!frame && mHideViewerIfFrameless) ||
mPresShell->IsDestroying()) {
// Either the frame element has no nsIFrame or the presshell is being