mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 508115. Don't reparent the views for popups, since they should always have the root view as their parent. r=dbaron
--HG-- extra : rebase_source : 1d8057694cde33a56fdabb57d51c9ff600c904a0
This commit is contained in:
parent
8f20569aa3
commit
54036c8405
48
layout/generic/crashtests/508115-1.xul
Normal file
48
layout/generic/crashtests/508115-1.xul
Normal file
@ -0,0 +1,48 @@
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
onload="setTimeout(doTest, 0)"
|
||||
class="reftest-wait">
|
||||
<script class="testbody" type="application/javascript"><![CDATA[
|
||||
function doTest() {
|
||||
document.getElementById("panel").style.display = '';
|
||||
document.getElementById("deck").selectedIndex = 1;
|
||||
document.getElementById("anchor").open = true;
|
||||
document.getElementById("container").style.width = "0";
|
||||
document.getElementById("anchor2").open = true;
|
||||
}
|
||||
var count = 0;
|
||||
function shown() {
|
||||
++count;
|
||||
if (count >= 2) {
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
}
|
||||
]]></script>
|
||||
<deck id="deck" style="margin:50px;">
|
||||
<vbox></vbox>
|
||||
<vbox id="panel" style="display:none">
|
||||
<vbox>
|
||||
<menulist id="anchor">
|
||||
<menupopup id="popup" onpopupshown="shown()">
|
||||
<menuitem label="One"/>
|
||||
<menuitem label="Two"/>
|
||||
<menuitem label="Three"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</deck>
|
||||
<description>
|
||||
<html:div id="container">
|
||||
<html:span id="span" style="-moz-transform: translate(0,0)">Hello Kitty
|
||||
<menulist id="anchor2" style="display:-moz-inline-box;">
|
||||
<menupopup id="popup" onpopupshown="shown()">
|
||||
<menuitem label="One"/>
|
||||
<menuitem label="Two"/>
|
||||
<menuitem label="Three"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</html:span>
|
||||
</html:div>
|
||||
</description>
|
||||
</window>
|
@ -237,3 +237,4 @@ load 480345-1.html
|
||||
load 494332-1.html
|
||||
load 501535-1.html
|
||||
load 505912-1.html
|
||||
load 508115-1.html
|
||||
|
@ -521,6 +521,12 @@ ReparentFrameViewTo(nsIFrame* aFrame,
|
||||
|
||||
// Does aFrame have a view?
|
||||
if (aFrame->HasView()) {
|
||||
#ifdef MOZ_XUL
|
||||
if (aFrame->GetType() == nsGkAtoms::menuPopupFrame) {
|
||||
// This view must be parented by the root view, don't reparent it.
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
nsIView* view = aFrame->GetView();
|
||||
// Verify that the current parent view is what we think it is
|
||||
//nsIView* parentView;
|
||||
|
Loading…
Reference in New Issue
Block a user