Bug 721220 - Send message back to java after tab selection is complete. r=mbrubeck

This commit is contained in:
Margaret Leibovic 2012-01-25 20:06:08 -08:00
parent 3638f8e3e4
commit 361cb84d37
2 changed files with 10 additions and 2 deletions

View File

@ -162,7 +162,7 @@ public class GeckoSoftwareLayerClient extends LayerClient implements GeckoEventL
GeckoAppShell.registerGeckoEventListener("Viewport:UpdateAndDraw", this);
GeckoAppShell.registerGeckoEventListener("Viewport:UpdateLater", this);
GeckoAppShell.registerGeckoEventListener("Document:Shown", this);
GeckoAppShell.registerGeckoEventListener("Tab:Selected", this);
GeckoAppShell.registerGeckoEventListener("Tab:Selected:Done", this);
sendResizeEventIfNecessary();
}
@ -519,7 +519,7 @@ public class GeckoSoftwareLayerClient extends LayerClient implements GeckoEventL
} else if ("Viewport:UpdateLater".equals(event)) {
mUpdateViewportOnEndDraw = true;
} else if (("Document:Shown".equals(event) ||
"Tab:Selected".equals(event)) &&
"Tab:Selected:Done".equals(event)) &&
(mTileLayer instanceof MultiTileLayer)) {
beginTransaction(mTileLayer);
try {

View File

@ -539,6 +539,14 @@ var BrowserApp = {
let evt = document.createEvent("UIEvents");
evt.initUIEvent("TabSelect", true, false, window, null);
aTab.browser.dispatchEvent(evt);
let message = {
gecko: {
type: "Tab:Selected:Done",
tabID: aTab.id
}
};
sendMessageToJava(message);
},
quit: function quit() {