зеркало из https://github.com/mozilla/gecko-dev.git
Bug 508908. Disable windowed plugins in popup windows, since they don't work. r=dbaron
--HG-- extra : rebase_source : 1acfac3d3613d332586fade393f2911552bd03e0
This commit is contained in:
Родитель
ab84f5ebd3
Коммит
f4e4f7e7d2
|
@ -2357,8 +2357,8 @@ nsRootPresContext::UpdatePluginGeometry(nsIFrame* aChangedSubtree)
|
|||
GetPluginGeometryUpdates(aChangedSubtree, &configurations);
|
||||
if (configurations.IsEmpty())
|
||||
return;
|
||||
nsIWidget* widget = configurations[0].mChild->GetParent();
|
||||
NS_ASSERTION(widget, "Plugin must have a parent");
|
||||
nsIWidget* widget = FrameManager()->GetRootFrame()->GetWindow();
|
||||
NS_ASSERTION(widget, "Plugins must have a parent window");
|
||||
widget->ConfigureChildren(configurations);
|
||||
DidApplyPluginGeometryUpdates();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
function boom()
|
||||
{
|
||||
var sel = document.createElementNS("http://www.w3.org/1999/xhtml", "select");
|
||||
var opt;
|
||||
for (var i = 0; i < 43; ++i) {
|
||||
opt = document.createElementNS("http://www.w3.org/1999/xhtml", "option");
|
||||
opt.appendChild(document.createTextNode(i));
|
||||
sel.appendChild(opt);
|
||||
}
|
||||
opt.selected = "selected";
|
||||
document.getElementById("div").appendChild(sel);
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="boom();"><div id="div"></div><embed src="http://zombo.com/inrozxa.swf"></embed></body>
|
||||
</html>
|
|
@ -267,6 +267,7 @@ load 494332-1.html
|
|||
load 501535-1.html
|
||||
load 503961-1.xhtml
|
||||
load 503961-2.html
|
||||
load 508908-1.html
|
||||
load 505912-1.html
|
||||
# load 508115-1.html
|
||||
load 511482.html
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
#endif
|
||||
#include "nsDisplayList.h"
|
||||
#include "nsBidiUtils.h"
|
||||
#include "nsFrameManager.h"
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
@ -1815,8 +1816,15 @@ nsGfxScrollFrameInner::ViewPositionDidChange(nsIScrollableView* aScrollable,
|
|||
nsPoint childOffset = mScrolledFrame->GetView()->GetOffsetTo(mOuter->GetView());
|
||||
mScrolledFrame->SetPosition(childOffset);
|
||||
|
||||
mOuter->PresContext()->RootPresContext()->
|
||||
GetPluginGeometryUpdates(mOuter, aConfigurations);
|
||||
nsRootPresContext* rootPresContext = mOuter->PresContext()->RootPresContext();
|
||||
// Only update plugin geometry if we're scrolling in the root widget.
|
||||
// In particular if we're scrolling inside a popup widget, we don't
|
||||
// want to update plugins since they don't belong to this widget (we
|
||||
// don't display windowed plugins in popups).
|
||||
if (mOuter->GetWindow() ==
|
||||
rootPresContext->FrameManager()->GetRootFrame()->GetWindow()) {
|
||||
rootPresContext->GetPluginGeometryUpdates(mOuter, aConfigurations);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -725,7 +725,14 @@ nsObjectFrame::CreateWidget(nscoord aWidth,
|
|||
rpc->RegisterPluginForGeometryUpdates(this);
|
||||
rpc->UpdatePluginGeometry(this);
|
||||
|
||||
mWidget->Show(PR_TRUE);
|
||||
// If this frame has an ancestor with a widget which is not
|
||||
// the root prescontext's widget, then this plugin should not be
|
||||
// displayed, so don't show the widget. If we show the widget, the
|
||||
// plugin may appear in the main window. In Web content this would
|
||||
// only happen with a plugin in a XUL popup.
|
||||
if (parentWidget == GetWindow()) {
|
||||
mWidget->Show(PR_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
if (mWidget) {
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||
<menulist>
|
||||
<menupopup>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</window>
|
|
@ -0,0 +1,15 @@
|
|||
<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>
|
||||
function doTest() {
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
</script>
|
||||
<menulist>
|
||||
<menupopup>
|
||||
<html:embed type="application/x-test"></html:embed>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</window>
|
|
@ -1313,6 +1313,7 @@ fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") == 488692-1.html 488692-1-ref.html # needs
|
|||
== 507762-2.html 507762-2-ref.html
|
||||
== 507762-3.html 507762-1-ref.html
|
||||
== 507762-4.html 507762-2-ref.html
|
||||
== 508908-1.xul 508908-1-ref.xul
|
||||
== 508919-1.xhtml 508919-1-ref.xhtml
|
||||
== 509155-1.xhtml 509155-1-ref.xhtml
|
||||
== 512410.html 512410-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче