Skip to content

Commit

Permalink
Bug 1287004 - Give PuppetWidgets in parent process a compositor bridg…
Browse files Browse the repository at this point in the history
…e (r=mattwoodrow)
  • Loading branch information
bill-mccloskey committed Sep 14, 2016
1 parent 3480df7 commit a430c0a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gfx/tests/browser/browser_windowless_troubleshoot_crash.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ add_task(function* test_windowlessBrowserTroubleshootCrash() {
let winUtils = webNav.document.defaultView.
QueryInterface(Ci.nsIInterfaceRequestor).
getInterface(Ci.nsIDOMWindowUtils);
is(winUtils.layerManagerType, "None", "windowless browser's layerManagerType should be 'None'");
is(winUtils.layerManagerType, "Basic", "windowless browser's layerManagerType should be 'Basic'");

ok(true, "not crashed");

Expand Down
8 changes: 8 additions & 0 deletions widget/PuppetWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,14 @@ PuppetWidget::GetLayerManager(PLayerTransactionChild* aShadowManager,
LayersBackend aBackendHint,
LayerManagerPersistence aPersistence)
{
if (XRE_IsParentProcess()) {
// A PuppetWidget in the parent process is for a windowless browser. Let's
// try to pretend this is a normal top-level window.
return nsBaseWidget::GetLayerManager(aShadowManager,
aBackendHint,
aPersistence);
}

if (!mLayerManager) {
mLayerManager = new ClientLayerManager(this);
}
Expand Down

0 comments on commit a430c0a

Please sign in to comment.