Closed Bug 1103177 Opened 10 years ago Closed 10 years ago

[e10s] Native plugin windows in torn out tabs remain associated with original window

Categories

(Core Graveyard :: Plug-ins, defect)

x86_64
All
defect
Not set
normal

Tracking

(e10sm5+, firefox38 fixed)

RESOLVED FIXED
mozilla38
Tracking Status
e10s m5+ ---
firefox38 --- fixed

People

(Reporter: jimm, Assigned: jimm)

References

Details

Attachments

(1 file)

STR:

1) open a test plugin page
2) open another tab
3) tear the test plugin page out to a new window

result: plugin window remains visible in original window.
Assignee: nobody → jmathies
nsIWidget has a ReparentNativeWidget call which I'm hoping gets called here. Neither PuppetWidget or PluginWidgetProxy handle this correctly.
SwapWithOtherRemoteLoader fails to invoke the BeginSwapDocShells/EndSwapDocShells methods on the documents in the child processes, so frames like nsPluginFrame never get a notification.

Here's the nsPluginFrame stack in single process:

xul.dll!nsPluginFrame::BeginSwapDocShells(nsISupports * aSupports, void * __formal)
xul.dll!EnumerateObservers(nsPtrHashKey<nsISupports> * aEntry, void * aData)
xul.dll!nsTHashtable<nsPtrHashKey<nsISupports> >::s_EnumStub(PLDHashTable * aTable, PLDHashEntryHdr * aEntry, unsigned int aNumber, void * aArg)
xul.dll!PLDHashTable::Enumerate(PLDHashOperator (PLDHashTable *, PLDHashEntryHdr *, unsigned int, void *) * aEtor, void * aArg)
xul.dll!PL_DHashTableEnumerate(PLDHashTable * aTable, PLDHashOperator (PLDHashTable *, PLDHashEntryHdr *, unsigned int, void *) * aEtor, void * aArg)
xul.dll!nsTHashtable<nsPtrHashKey<nsISupports> >::EnumerateEntries(PLDHashOperator (nsPtrHashKey<nsISupports> *, void *) * aEnumFunc, void * aUserArg)
xul.dll!nsIDocument::EnumerateActivityObservers(void (nsISupports *, void *) * aEnumerator, void * aData)
xul.dll!BeginSwapDocShellsForDocument(nsIDocument * aDocument, void * __formal)
xul.dll!BeginSwapDocShellsForViews(nsView * aSibling)
xul.dll!nsSubDocumentFrame::BeginSwapDocShells(nsIFrame * aOther)
xul.dll!nsFrameLoader::SwapWithOtherLoader(nsFrameLoader * aOther, nsRefPtr<nsFrameLoader> & aFirstToSwap, nsRefPtr<nsFrameLoader> & aSecondToSwap)
Blocks: 918634
Interesting and a little odd that the swap calls are static methods on nsPluginFrame - 

http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsPluginFrame.cpp#1810

We call these for all activity observers, and the method then figure out if the observer is in fact a plugin.

Anyway, somehow we need to get this forwarded over. Plus we need to figure out how to get the information over for reparenting these native windows.

It might be interesting to consider that we also want to support this with multiple content process...
I can fix this without going over ipc to the child, but I'll need the widget tracking implemented in bug 1095754.
Depends on: 1095754
Blocks: 1106243
Attached patch patchSplinter Review
This takes care of proper plugin parenting after a tab gets dragged out.
Attachment #8560402 - Flags: review?(roc)
https://hg.mozilla.org/mozilla-central/rev/05417328ad73

dom/base/nsFrameLoader.cpp.rej ???
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Flags: needinfo?(jmathies)
(In reply to Ryan VanderMeulen [:RyanVM UTC-5] from comment #9)
> https://hg.mozilla.org/mozilla-central/rev/05417328ad73
> 
> dom/base/nsFrameLoader.cpp.rej ???

oops!
Flags: needinfo?(jmathies)
(In reply to Jim Mathies [:jimm] from comment #10)
> (In reply to Ryan VanderMeulen [:RyanVM UTC-5] from comment #9)
> > https://hg.mozilla.org/mozilla-central/rev/05417328ad73
> > 
> > dom/base/nsFrameLoader.cpp.rej ???
> 
> oops!

https://hg.mozilla.org/integration/mozilla-inbound/rev/041bb339a4ea
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: