Bug 725167 - Don't reposition Android plugin views that aren't in view hierarchy r=blassey
authorJames Willcox <jwillcox@mozilla.com>
Fri, 23 Mar 2012 16:19:15 -0400
changeset 90662 9303899517acb207369e27622ca27da07a3da9fc
parent 90661 bd0d926a44f44a14af33a016b84303558328ff9f
child 90663 b3034380214d0acf249971d12c3d452319c8dc2f
push id1069
push usermfinkle@mozilla.com
push dateWed, 04 Apr 2012 14:22:33 +0000
treeherdermozilla-aurora@883536e3b5da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey
bugs725167
milestone13.0a2
Bug 725167 - Don't reposition Android plugin views that aren't in view hierarchy r=blassey
mobile/android/base/GeckoApp.java
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -1564,17 +1564,18 @@ abstract public class GeckoApp
         for (View view : tab.getPluginViews()) {
             PluginLayoutParams lp = (PluginLayoutParams)view.getLayoutParams();
             lp.reposition(targetViewport);
 
             if (setVisible) {
                 view.setVisibility(View.VISIBLE);
             }
 
-            mPluginContainer.updateViewLayout(view, lp);
+            if (mPluginContainer.indexOfChild(view) >= 0)
+                mPluginContainer.updateViewLayout(view, lp);
         }
     }
 
     public void setFullScreen(final boolean fullscreen) {
         mMainHandler.post(new Runnable() { 
             public void run() {
                 // Hide/show the system notification bar
                 Window window = getWindow();