Merge f-t to m-c, a=merge
authorPhil Ringnalda <philringnalda@gmail.com>
Sun, 20 Sep 2015 17:58:11 -0700
changeset 297770 d9724506c66754540416e8435ad3c1feabf29590
parent 297765 4013ca84d244faa3361641a441a5efccf0f6e2d4 (current diff)
parent 297769 a680fbd6535e07ddbeb00c138edcbe72f4810dbb (diff)
child 297771 d49db60f3894b375ff7d905e11d639939c2f3b3a
child 297778 d8a0713852e320cd887579affc09981977cd7a02
child 297785 564f9c049d15ff59c6b10e1d81f51397ec3a94b9
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge f-t to m-c, a=merge
--- a/browser/devtools/webide/themes/panel-listing.css
+++ b/browser/devtools/webide/themes/panel-listing.css
@@ -38,17 +38,17 @@ label,
   font-weight: 700;
   width: 100%;
 }
 
 .panel-header:first-child {
   margin-top: 0;
 }
 
-.panel-header[hidden] {
+.panel-header[hidden], .panel-item[hidden] {
   display: none;
 }
 
 #runtime-panel-simulator,
 .panel-item-complex {
   clear: both;
   position: relative;
 }
--- a/browser/themes/shared/urlbarSearchSuggestionsNotification.inc.css
+++ b/browser/themes/shared/urlbarSearchSuggestionsNotification.inc.css
@@ -1,11 +1,10 @@
 #PopupAutoCompleteRichResult > hbox[anonid="search-suggestions-notification"] {
   border-bottom: 1px solid hsla(210, 4%, 10%, 0.14);
-  color: -moz-FieldText;
   background-color: hsla(210, 4%, 10%, 0.07);
   padding: 6px 0;
   -moz-padding-start: 44px;
   -moz-padding-end: 6px;
   background-image: url("chrome://browser/skin/info.svg");
   background-clip: padding-box;
   background-position: 20px center;
   background-repeat: no-repeat;
--- a/mobile/android/base/AndroidManifest.xml.in
+++ b/mobile/android/base/AndroidManifest.xml.in
@@ -135,16 +135,17 @@
                         android:targetActivity="@MOZ_ANDROID_BROWSER_INTENT_CLASS@">
             <!-- android:priority ranges between -1000 and 1000.  We never want
                  another activity to usurp the MAIN action, so we ratchet our
                  priority up. -->
             <intent-filter android:priority="999">
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
                 <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER"/>
+                <category android:name="android.intent.category.APP_BROWSER" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
 
             <meta-data android:name="com.sec.minimode.icon.portrait.normal"
                        android:resource="@drawable/icon"/>
 
             <meta-data android:name="com.sec.minimode.icon.landscape.normal"
                        android:resource="@drawable/icon" />
--- a/mobile/android/base/ZoomedView.java
+++ b/mobile/android/base/ZoomedView.java
@@ -73,16 +73,17 @@ public class ZoomedView extends FrameLay
     private LayerView layerView;
     private int viewWidth;
     private int viewHeight; // Only the zoomed view height, no toolbar, no shadow ...
     private int viewContainerWidth;
     private int viewContainerHeight; // Zoomed view height with toolbar and other elements like shadow, ...
     private int containterSize; // shadow, margin, ...
     private Point lastPosition;
     private boolean shouldSetVisibleOnUpdate;
+    private boolean isBlockedFromAppearing; // Prevent the display of the zoomedview while FormAssistantPopup is visible
     private PointF returnValue;
     private final PointF animationStart;
     private ImageView closeButton;
     private TextView changeZoomFactorButton;
     private boolean toolbarOnTop;
     private float offsetDueToToolBarPosition;
     private int toolbarHeight;
     private int cornerRadius;
@@ -223,39 +224,42 @@ public class ZoomedView extends FrameLay
 
     public ZoomedView(Context context, AttributeSet attrs) {
         this(context, attrs, 0);
     }
 
     public ZoomedView(Context context, AttributeSet attrs, int defStyle) {
         super(context, attrs, defStyle);
         isSimplifiedUI = true;
+        isBlockedFromAppearing = false;
         getPrefs();
         currentZoomFactorIndex = 0;
         returnValue = new PointF();
         animationStart = new PointF();
         requestRenderRunnable = new Runnable() {
             @Override
             public void run() {
                 requestZoomedViewRender();
             }
         };
         touchListener = new ZoomedViewTouchListener();
         EventDispatcher.getInstance().registerGeckoThreadListener(this,
                 "Gesture:clusteredLinksClicked", "Window:Resize", "Content:LocationChange",
-                "Gesture:CloseZoomedView", "Browser:ZoomToPageWidth", "Browser:ZoomToRect");
+                "Gesture:CloseZoomedView", "Browser:ZoomToPageWidth", "Browser:ZoomToRect",
+                "FormAssist:AutoComplete", "FormAssist:Hide");
     }
 
     void destroy() {
         PrefsHelper.removeObserver(prefDefaultZoomFactorObserverId);
         PrefsHelper.removeObserver(prefSimplifiedUIObserverId);
         ThreadUtils.removeCallbacksFromUiThread(requestRenderRunnable);
         EventDispatcher.getInstance().unregisterGeckoThreadListener(this,
                 "Gesture:clusteredLinksClicked", "Window:Resize", "Content:LocationChange",
-                "Gesture:CloseZoomedView", "Browser:ZoomToPageWidth", "Browser:ZoomToRect");
+                "Gesture:CloseZoomedView", "Browser:ZoomToPageWidth", "Browser:ZoomToRect",
+                "FormAssist:AutoComplete", "FormAssist:Hide");
     }
 
     // This method (onFinishInflate) is called only when the zoomed view class is used inside
     // an xml structure <org.mozilla.gecko.ZoomedView ...
     // It won't be called if the class is used from java code like "new  ZoomedView(context);"
     @Override
     protected void onFinishInflate() {
         super.onFinishInflate();
@@ -536,16 +540,19 @@ public class ZoomedView extends FrameLay
             @Override
             public boolean isObserver() {
                 return true;
             }
         });
     }
 
     private void startZoomDisplay(LayerView aLayerView, final int leftFromGecko, final int topFromGecko) {
+        if (isBlockedFromAppearing) {
+            return;
+        }
         if (layerView == null) {
             layerView = aLayerView;
             layerView.addZoomedViewListener(this);
             layerView.getDynamicToolbarAnimator().addTranslationListener(this);
             ImmutableViewportMetrics metrics = layerView.getViewportMetrics();
             setCapturedSize(metrics);
         }
         startTimeReRender = 0;
@@ -620,16 +627,21 @@ public class ZoomedView extends FrameLay
                         ImmutableViewportMetrics metrics = layerView.getViewportMetrics();
                         refreshZoomedViewSize(metrics);
                     } else if (event.equals("Content:LocationChange")) {
                         stopZoomDisplay(false);
                     } else if (event.equals("Gesture:CloseZoomedView") ||
                             event.equals("Browser:ZoomToPageWidth") ||
                             event.equals("Browser:ZoomToRect")) {
                         stopZoomDisplay(true);
+                    } else if (event.equals("FormAssist:AutoComplete")) {
+                        isBlockedFromAppearing = true;
+                        stopZoomDisplay(true);
+                    } else if (event.equals("FormAssist:Hide")) {
+                        isBlockedFromAppearing = false;
                     }
                 } catch (JSONException e) {
                     Log.e(LOGTAG, "JSON exception", e);
                 }
             }
         });
     }
 
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -4803,33 +4803,46 @@ var BrowserEventHandler = {
         this._cancelTapHighlight();
         break;
 
       case "Gesture:ClickInZoomedView":
         this._clickInZoomedView = true;
         break;
 
       case "Gesture:SingleTap": {
+        let focusedElement = null;
         try {
           // If the element was previously focused, show the caret attached to it.
           let element = this._highlightElement;
-          if (element && element == BrowserApp.getFocusedInput(BrowserApp.selectedBrowser)) {
+          focusedElement = BrowserApp.getFocusedInput(BrowserApp.selectedBrowser);
+          if (element && element == focusedElement) {
             let result = SelectionHandler.attachCaret(element);
             if (result !== SelectionHandler.ERROR_NONE) {
               dump("Unexpected failure during caret attach: " + result);
             }
           }
         } catch(e) {
           Cu.reportError(e);
         }
 
         let data = JSON.parse(aData);
         let {x, y} = data;
 
         if (this._inCluster && this._clickInZoomedView != true) {
+          // If there is a focused element, the display of the zoomed view won't remove the focus.
+          // In this case, the form assistant linked to the focused element will never be closed.
+          // To avoid this situation, the focus is moved and the form assistant is closed.
+          if (focusedElement) {
+            try {
+              Services.focus.moveFocus(BrowserApp.selectedBrowser.contentWindow, null, Services.focus.MOVEFOCUS_ROOT, 0);
+            } catch(e) {
+              Cu.reportError(e);
+            }
+            Messaging.sendRequest({ type: "FormAssist:Hide" });
+          }
           this._clusterClicked(x, y);
         } else {
           if (this._clickInZoomedView != true) {
             this._closeZoomedView();
           }
           // The _highlightElement was chosen after fluffing the touch events
           // that led to this SingleTap, so by fluffing the mouse events, they
           // should find the same target since we fluff them again below.