author | Steven Michaud <smichaud@pobox.com> |
Mon, 20 Dec 2010 13:49:37 -0600 | |
changeset 59526 | 1ff07ed94d79bff26a8ccbe901ddfa6d88c53eb3 |
parent 59525 | 608fc8fa26dc6fe38f7d91a4fdade24522ac7339 |
child 59527 | 8777141fa716f8679959c8d7d60892a9b4a52831 |
push id | 17648 |
push user | smichaud@pobox.com |
push date | Mon, 20 Dec 2010 19:50:18 +0000 |
treeherder | mozilla-central@1ff07ed94d79 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | josh, blocking2.0BetaN |
bugs | 618487 |
milestone | 2.0b9pre |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
layout/generic/nsObjectFrame.cpp | file | annotate | diff | comparison | revisions | |
layout/generic/nsObjectFrame.h | file | annotate | diff | comparison | revisions |
--- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -1088,17 +1088,17 @@ nsObjectFrame::FixupWindow(const nsSize& #else mInstanceOwner->UpdateWindowPositionAndClipRect(PR_FALSE); #endif NotifyPluginReflowObservers(); } nsresult -nsObjectFrame::CallSetWindow() +nsObjectFrame::CallSetWindow(PRBool aCheckIsHidden) { NPWindow *win = nsnull; nsresult rv = NS_ERROR_FAILURE; nsCOMPtr<nsIPluginInstance> pi; if (!mInstanceOwner || NS_FAILED(rv = mInstanceOwner->GetInstance(*getter_AddRefs(pi))) || !pi || @@ -1106,17 +1106,17 @@ nsObjectFrame::CallSetWindow() !win) return rv; nsPluginNativeWindow *window = (nsPluginNativeWindow *)win; #ifdef XP_MACOSX mInstanceOwner->FixUpPluginWindow(ePluginPaintDisable); #endif - if (IsHidden()) + if (aCheckIsHidden && IsHidden()) return NS_ERROR_FAILURE; // refresh the plugin port as well window->window = mInstanceOwner->GetPluginPortFromWidget(); // Adjust plugin dimensions according to pixel snap results // and reduce amount of SetWindow calls nsPresContext* presContext = PresContext(); @@ -3330,17 +3330,17 @@ NS_IMETHODIMP nsPluginInstanceOwner::Set #else return NS_ERROR_NOT_IMPLEMENTED; #endif } NS_IMETHODIMP nsPluginInstanceOwner::SetWindow() { NS_ENSURE_TRUE(mObjectFrame, NS_ERROR_NULL_POINTER); - return mObjectFrame->CallSetWindow(); + return mObjectFrame->CallSetWindow(PR_FALSE); } NPError nsPluginInstanceOwner::ShowNativeContextMenu(NPMenu* menu, void* event) { if (!menu || !event) return NPERR_GENERIC_ERROR; #ifdef XP_MACOSX
--- a/layout/generic/nsObjectFrame.h +++ b/layout/generic/nsObjectFrame.h @@ -216,17 +216,17 @@ protected: * Adjust the plugin's idea of its size, using aSize as its new size. * (aSize must be in twips) */ void FixupWindow(const nsSize& aSize); /** * Sets up the plugin window and calls SetWindow on the plugin. */ - nsresult CallSetWindow(); + nsresult CallSetWindow(PRBool aCheckIsHidden = PR_TRUE); PRBool IsFocusable(PRInt32 *aTabIndex = nsnull, PRBool aWithMouse = PR_FALSE); // check attributes and optionally CSS to see if we should display anything PRBool IsHidden(PRBool aCheckVisibilityStyle = PR_TRUE) const; PRBool IsOpaque() const;