Bug 1078304 - Call GeckoAppShell.setLayerView early; r=snorp a=topcrasher,tracking-firefox35

This commit is contained in:
Jim Chen 2014-10-22 12:51:43 -04:00
parent d2137aa03d
commit 1c71d9bdca
3 changed files with 3 additions and 3 deletions

View File

@ -1422,7 +1422,6 @@ public abstract class GeckoApp
LayerView layerView = (LayerView) findViewById(R.id.layer_view); LayerView layerView = (LayerView) findViewById(R.id.layer_view);
layerView.initializeView(EventDispatcher.getInstance()); layerView.initializeView(EventDispatcher.getInstance());
mLayerView = layerView; mLayerView = layerView;
GeckoAppShell.setLayerView(layerView);
GeckoAppShell.sendEventToGecko(GeckoEvent.createObjectEvent( GeckoAppShell.sendEventToGecko(GeckoEvent.createObjectEvent(
GeckoEvent.ACTION_OBJECT_LAYER_CLIENT, layerView.getLayerClientObject())); GeckoEvent.ACTION_OBJECT_LAYER_CLIENT, layerView.getLayerClientObject()));

View File

@ -122,6 +122,9 @@ public class GeckoView extends LayerView
} }
private void init(Context context, String url, boolean doInit) { private void init(Context context, String url, boolean doInit) {
// Perform common initialization for Fennec/GeckoView.
GeckoAppShell.setLayerView(this);
// TODO: Fennec currently takes care of its own initialization, so this // TODO: Fennec currently takes care of its own initialization, so this
// flag is a hack used in Fennec to prevent GeckoView initialization. // flag is a hack used in Fennec to prevent GeckoView initialization.
// This should go away once Fennec also uses GeckoView for // This should go away once Fennec also uses GeckoView for
@ -185,7 +188,6 @@ public class GeckoView extends LayerView
GeckoProfile profile = GeckoProfile.get(context).forceCreate(); GeckoProfile profile = GeckoProfile.get(context).forceCreate();
BrowserDB.initialize(profile.getName()); BrowserDB.initialize(profile.getName());
GeckoAppShell.setLayerView(this);
GeckoAppShell.sendEventToGecko(GeckoEvent.createObjectEvent( GeckoAppShell.sendEventToGecko(GeckoEvent.createObjectEvent(
GeckoEvent.ACTION_OBJECT_LAYER_CLIENT, getLayerClientObject())); GeckoEvent.ACTION_OBJECT_LAYER_CLIENT, getLayerClientObject()));
GeckoThread.createAndStart(); GeckoThread.createAndStart();

View File

@ -318,7 +318,6 @@ public class LayerView extends FrameLayout implements Tabs.OnTabsChangedListener
public void setInputConnectionHandler(InputConnectionHandler inputConnectionHandler) { public void setInputConnectionHandler(InputConnectionHandler inputConnectionHandler) {
mInputConnectionHandler = inputConnectionHandler; mInputConnectionHandler = inputConnectionHandler;
mLayerClient.forceRedraw(null);
} }
@Override @Override