Merge f-t to m-c, a=merge

This commit is contained in:
Phil Ringnalda 2015-09-20 17:58:11 -07:00
commit c44a0998bd
5 changed files with 30 additions and 5 deletions

View File

@ -43,7 +43,7 @@ label,
margin-top: 0;
}
.panel-header[hidden] {
.panel-header[hidden], .panel-item[hidden] {
display: none;
}

View File

@ -1,6 +1,5 @@
#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;

View File

@ -140,6 +140,7 @@
<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>

View File

@ -78,6 +78,7 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
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;
@ -228,6 +229,7 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
public ZoomedView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
isSimplifiedUI = true;
isBlockedFromAppearing = false;
getPrefs();
currentZoomFactorIndex = 0;
returnValue = new PointF();
@ -241,7 +243,8 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
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() {
@ -250,7 +253,8 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
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
@ -541,6 +545,9 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
}
private void startZoomDisplay(LayerView aLayerView, final int leftFromGecko, final int topFromGecko) {
if (isBlockedFromAppearing) {
return;
}
if (layerView == null) {
layerView = aLayerView;
layerView.addZoomedViewListener(this);
@ -625,6 +632,11 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
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);

View File

@ -4808,10 +4808,12 @@ var BrowserEventHandler = {
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);
@ -4825,6 +4827,17 @@ var BrowserEventHandler = {
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) {