From 361cb84d37af3de8007e8f2043406dd1985790a4 Mon Sep 17 00:00:00 2001 From: Margaret Leibovic Date: Wed, 25 Jan 2012 20:06:08 -0800 Subject: [PATCH] Bug 721220 - Send message back to java after tab selection is complete. r=mbrubeck --- mobile/android/base/gfx/GeckoSoftwareLayerClient.java | 4 ++-- mobile/android/chrome/content/browser.js | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mobile/android/base/gfx/GeckoSoftwareLayerClient.java b/mobile/android/base/gfx/GeckoSoftwareLayerClient.java index 97ce42fee27..00346f73bd7 100644 --- a/mobile/android/base/gfx/GeckoSoftwareLayerClient.java +++ b/mobile/android/base/gfx/GeckoSoftwareLayerClient.java @@ -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 { diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index 72da2b555c7..b26bfb658a2 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -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() {