mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge fx-team to m-c
This commit is contained in:
commit
0c5a7facf3
@ -5,7 +5,7 @@
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!DOCTYPE html [
|
||||
<!ENTITY % webideDTD SYSTEM "chrome://webide/locale/webide.dtd" >
|
||||
<!ENTITY % webideDTD SYSTEM "chrome://webide/content/webide.dtd" >
|
||||
%webideDTD;
|
||||
]>
|
||||
|
||||
|
@ -10,3 +10,9 @@ webide.jar:
|
||||
content/newapp.js (newapp.js)
|
||||
content/details.xhtml (details.xhtml)
|
||||
content/details.js (details.js)
|
||||
|
||||
# Temporarily include locales in content, until we're ready
|
||||
# to localize webide
|
||||
|
||||
content/webide.dtd (../locales/en-US/webide.dtd)
|
||||
content/webide.properties (../locales/en-US/webide.properties)
|
||||
|
@ -5,7 +5,7 @@
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % webideDTD SYSTEM "chrome://webide/locale/webide.dtd" >
|
||||
<!ENTITY % webideDTD SYSTEM "chrome://webide/content/webide.dtd" >
|
||||
%webideDTD;
|
||||
]>
|
||||
|
||||
|
@ -15,7 +15,7 @@ const {AppProjects} = require("devtools/app-manager/app-projects");
|
||||
const {Connection} = require("devtools/client/connection-manager");
|
||||
const {AppManager} = require("devtools/app-manager");
|
||||
|
||||
const Strings = Services.strings.createBundle("chrome://webide/locale/webide.properties");
|
||||
const Strings = Services.strings.createBundle("chrome://webide/content/webide.properties");
|
||||
|
||||
const HTML = "http://www.w3.org/1999/xhtml";
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % webideDTD SYSTEM "chrome://webide/locale/webide.dtd" >
|
||||
<!ENTITY % webideDTD SYSTEM "chrome://webide/content/webide.dtd" >
|
||||
%webideDTD;
|
||||
]>
|
||||
|
||||
|
@ -1,5 +0,0 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DEFINES += -DAB_CD=$(AB_CD)
|
@ -1,10 +0,0 @@
|
||||
#filter substitution
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
|
||||
webide.jar:
|
||||
% locale webide @AB_CD@ %locale/
|
||||
locale/webide.dtd (%webide.dtd)
|
||||
locale/webide.properties (%webide.properties)
|
@ -1,7 +0,0 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
JAR_MANIFESTS += ['jar.mn']
|
@ -6,7 +6,6 @@
|
||||
|
||||
PARALLEL_DIRS += [
|
||||
'content',
|
||||
'locales',
|
||||
'themes',
|
||||
]
|
||||
|
||||
|
@ -422,7 +422,11 @@
|
||||
background-image: url("chrome://browser/skin/privatebrowsing-mask-tabstrip-XPVista7.png");
|
||||
}
|
||||
|
||||
#private-browsing-indicator-titlebar > .private-browsing-indicator {
|
||||
/* We're intentionally using the titlebar asset here for fullscreen mode.
|
||||
* See bug 1008183.
|
||||
*/
|
||||
#private-browsing-indicator-titlebar > .private-browsing-indicator,
|
||||
#main-window[inFullscreen] #TabsToolbar > .private-browsing-indicator {
|
||||
background-image: url("chrome://browser/skin/privatebrowsing-mask-titlebar-XPVista7.png");
|
||||
}
|
||||
}
|
||||
|
@ -2855,7 +2855,7 @@ chatbox {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#main-window[privatebrowsingmode=temporary]:not([tabsintitlebar]) #TabsToolbar > .private-browsing-indicator {
|
||||
#main-window[privatebrowsingmode=temporary]:-moz-any([inFullscreen],:not([tabsintitlebar])) #TabsToolbar > .private-browsing-indicator {
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
@ -2865,7 +2865,12 @@ chatbox {
|
||||
width: 48px;
|
||||
}
|
||||
|
||||
#private-browsing-indicator-titlebar > .private-browsing-indicator {
|
||||
/* Bug 1008183: We're intentionally using the titlebar asset here for fullscreen
|
||||
* mode, since the tabstrip "mimics" the titlebar in that case with its own
|
||||
* min/max/close window buttons.
|
||||
*/
|
||||
#private-browsing-indicator-titlebar > .private-browsing-indicator,
|
||||
#main-window[inFullscreen] #TabsToolbar > .private-browsing-indicator {
|
||||
background: url("chrome://browser/skin/privatebrowsing-mask-titlebar.png") no-repeat center 0px;
|
||||
-moz-margin-end: 4px;
|
||||
width: 40px;
|
||||
@ -2883,6 +2888,14 @@ chatbox {
|
||||
background-image: url("chrome://browser/skin/privatebrowsing-mask-titlebar-XPVista7-tall.png");
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
/* We're intentionally using the titlebar asset here for fullscreen mode.
|
||||
* See bug 1008183.
|
||||
*/
|
||||
#main-window[inFullscreen] #TabsToolbar > .private-browsing-indicator {
|
||||
background-image: url("chrome://browser/skin/privatebrowsing-mask-titlebar-XPVista7.png");
|
||||
}
|
||||
|
||||
#main-window[sizemode="maximized"] > #titlebar > #titlebar-content > #titlebar-buttonbox-container > #private-browsing-indicator-titlebar > .private-browsing-indicator {
|
||||
top: -5px;
|
||||
}
|
||||
@ -2893,7 +2906,11 @@ chatbox {
|
||||
%endif
|
||||
|
||||
@media (-moz-windows-classic) {
|
||||
#private-browsing-indicator-titlebar > .private-browsing-indicator {
|
||||
/* We're intentionally using the titlebar asset here for fullscreen mode.
|
||||
* See bug 1008183.
|
||||
*/
|
||||
#private-browsing-indicator-titlebar > .private-browsing-indicator,
|
||||
#main-window[inFullscreen] #TabsToolbar > .private-browsing-indicator {
|
||||
background-image: url("chrome://browser/skin/privatebrowsing-mask-titlebar-XPVista7.png");
|
||||
}
|
||||
/**
|
||||
|
@ -11,14 +11,12 @@ import org.mozilla.gecko.toolbar.BrowserToolbar.OnDismissListener;
|
||||
import org.mozilla.gecko.toolbar.BrowserToolbar.OnFilterListener;
|
||||
import org.mozilla.gecko.CustomEditText;
|
||||
import org.mozilla.gecko.CustomEditText.OnKeyPreImeListener;
|
||||
import org.mozilla.gecko.InputMethods;
|
||||
import org.mozilla.gecko.util.GamepadUtils;
|
||||
import org.mozilla.gecko.util.StringUtils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
import android.text.Editable;
|
||||
import android.text.InputType;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
@ -27,13 +25,11 @@ import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.View.OnKeyListener;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
/**
|
||||
* {@code ToolbarEditText} is the text entry used when the toolbar
|
||||
* is in edit state. It handles all the necessary input method machinery
|
||||
* as well as the tracking of different text types (empty, search, or url).
|
||||
* is in edit state. It handles all the necessary input method machinery.
|
||||
* It's meant to be owned by {@code ToolbarEditLayout}.
|
||||
*/
|
||||
public class ToolbarEditText extends CustomEditText
|
||||
@ -41,28 +37,11 @@ public class ToolbarEditText extends CustomEditText
|
||||
|
||||
private static final String LOGTAG = "GeckoToolbarEditText";
|
||||
|
||||
// Used to track the current type of content in the
|
||||
// text entry so that ToolbarEditLayout can update its
|
||||
// state accordingly.
|
||||
enum TextType {
|
||||
EMPTY,
|
||||
SEARCH_QUERY,
|
||||
URL
|
||||
}
|
||||
|
||||
interface OnTextTypeChangeListener {
|
||||
public void onTextTypeChange(ToolbarEditText editText, TextType textType);
|
||||
}
|
||||
|
||||
private final Context mContext;
|
||||
|
||||
// Type of the URL bar go/search button
|
||||
private TextType mToolbarTextType;
|
||||
|
||||
private OnCommitListener mCommitListener;
|
||||
private OnDismissListener mDismissListener;
|
||||
private OnFilterListener mFilterListener;
|
||||
private OnTextTypeChangeListener mTextTypeListener;
|
||||
|
||||
// The previous autocomplete result returned to us
|
||||
private String mAutoCompleteResult = "";
|
||||
@ -73,8 +52,6 @@ public class ToolbarEditText extends CustomEditText
|
||||
public ToolbarEditText(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
mContext = context;
|
||||
|
||||
mToolbarTextType = TextType.EMPTY;
|
||||
}
|
||||
|
||||
void setOnCommitListener(OnCommitListener listener) {
|
||||
@ -89,10 +66,6 @@ public class ToolbarEditText extends CustomEditText
|
||||
mFilterListener = listener;
|
||||
}
|
||||
|
||||
void setOnTextTypeChangeListener(OnTextTypeChangeListener listener) {
|
||||
mTextTypeListener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachedToWindow() {
|
||||
setOnKeyListener(new KeyListener());
|
||||
@ -144,12 +117,6 @@ public class ToolbarEditText extends CustomEditText
|
||||
setSelection(text.length(), result.length());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabled(boolean enabled) {
|
||||
super.setEnabled(enabled);
|
||||
updateTextTypeFromText(getText().toString());
|
||||
}
|
||||
|
||||
private void resetAutocompleteState() {
|
||||
mAutoCompleteResult = "";
|
||||
mAutoCompletePrefix = null;
|
||||
@ -170,29 +137,6 @@ public class ToolbarEditText extends CustomEditText
|
||||
return false;
|
||||
}
|
||||
|
||||
private void setTextType(TextType textType) {
|
||||
mToolbarTextType = textType;
|
||||
|
||||
if (mTextTypeListener != null) {
|
||||
mTextTypeListener.onTextTypeChange(this, textType);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateTextTypeFromText(String text) {
|
||||
if (text.length() == 0) {
|
||||
setTextType(TextType.EMPTY);
|
||||
return;
|
||||
}
|
||||
|
||||
final TextType newType;
|
||||
if (StringUtils.isSearchQuery(text, mToolbarTextType == TextType.SEARCH_QUERY)) {
|
||||
newType = TextType.SEARCH_QUERY;
|
||||
} else {
|
||||
newType = TextType.URL;
|
||||
}
|
||||
setTextType(newType);
|
||||
}
|
||||
|
||||
private class TextChangeListener implements TextWatcher {
|
||||
@Override
|
||||
public void afterTextChanged(final Editable s) {
|
||||
@ -232,8 +176,6 @@ public class ToolbarEditText extends CustomEditText
|
||||
onAutocomplete(mAutoCompleteResult);
|
||||
}
|
||||
}
|
||||
|
||||
updateTextTypeFromText(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user