mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1158309 - Initialize LayerView sooner; r=snorp
This commit is contained in:
parent
9fa1496350
commit
8b64ccfb1e
@ -1275,6 +1275,7 @@ public abstract class GeckoApp
|
||||
mRootLayout = (OuterLayout) findViewById(R.id.root_layout);
|
||||
mGeckoLayout = (RelativeLayout) findViewById(R.id.gecko_layout);
|
||||
mMainLayout = (RelativeLayout) findViewById(R.id.main_layout);
|
||||
mLayerView = (LayerView) findViewById(R.id.layer_view);
|
||||
|
||||
// Determine whether we should restore tabs.
|
||||
mShouldRestore = getSessionRestoreState(savedInstanceState);
|
||||
@ -1414,13 +1415,12 @@ public abstract class GeckoApp
|
||||
}
|
||||
}
|
||||
|
||||
if (mLayerView == null) {
|
||||
LayerView layerView = (LayerView) findViewById(R.id.layer_view);
|
||||
layerView.initializeView(EventDispatcher.getInstance());
|
||||
mLayerView = layerView;
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createObjectEvent(
|
||||
GeckoEvent.ACTION_OBJECT_LAYER_CLIENT, layerView.getLayerClientObject()));
|
||||
}
|
||||
// XXX our editor tests require the GeckoView to have focus to pass, so we have to
|
||||
// manually shift focus to the GeckoView. requestFocus apparently doesn't work at
|
||||
// this stage of starting up, so we have to unset and reset the focusability.
|
||||
mLayerView.setFocusable(false);
|
||||
mLayerView.setFocusable(true);
|
||||
mLayerView.setFocusableInTouchMode(true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -122,6 +122,10 @@ public class GeckoView extends LayerView
|
||||
// Perform common initialization for Fennec/GeckoView.
|
||||
GeckoAppShell.setLayerView(this);
|
||||
|
||||
initializeView(EventDispatcher.getInstance());
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createObjectEvent(
|
||||
GeckoEvent.ACTION_OBJECT_LAYER_CLIENT, getLayerClientObject()));
|
||||
|
||||
// TODO: Fennec currently takes care of its own initialization, so this
|
||||
// flag is a hack used in Fennec to prevent GeckoView initialization.
|
||||
// This should go away once Fennec also uses GeckoView for
|
||||
@ -181,13 +185,9 @@ public class GeckoView extends LayerView
|
||||
"Accessibility:Ready",
|
||||
"GeckoView:Message");
|
||||
|
||||
initializeView(EventDispatcher.getInstance());
|
||||
|
||||
if (GeckoThread.launch()) {
|
||||
// This is the first launch, so finish initialization and go.
|
||||
GeckoProfile profile = GeckoProfile.get(context).forceCreate();
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createObjectEvent(
|
||||
GeckoEvent.ACTION_OBJECT_LAYER_CLIENT, getLayerClientObject()));
|
||||
|
||||
} else if (GeckoThread.checkLaunchState(GeckoThread.LaunchState.GeckoRunning)) {
|
||||
// If Gecko is already running, that means the Activity was
|
||||
|
Loading…
Reference in New Issue
Block a user