зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central and b2g-inbound
This commit is contained in:
Коммит
7f812a8b36
|
@ -750,3 +750,6 @@ pref("dom.promise.enabled", false);
|
|||
// (only applies when marionette is disabled)
|
||||
// 0 disables the timer.
|
||||
pref("b2g.adb.timeout-hours", 12);
|
||||
|
||||
// InputMethod so we can do soft keyboards
|
||||
pref("dom.mozInputMethod.enabled", true);
|
||||
|
|
|
@ -462,35 +462,21 @@ var shell = {
|
|||
}
|
||||
break;
|
||||
case 'mozbrowserloadstart':
|
||||
if (content.document.location == 'about:blank')
|
||||
if (content.document.location == 'about:blank') {
|
||||
this.contentBrowser.addEventListener('mozbrowserlocationchange', this, true);
|
||||
return;
|
||||
}
|
||||
|
||||
this.contentBrowser.removeEventListener('mozbrowserloadstart', this, true);
|
||||
|
||||
this.reportCrash(true);
|
||||
|
||||
Cu.import('resource://gre/modules/Webapps.jsm');
|
||||
DOMApplicationRegistry.allAppsLaunchable = true;
|
||||
|
||||
this.sendEvent(window, 'ContentStart');
|
||||
|
||||
content.addEventListener('load', function shell_homeLoaded() {
|
||||
content.removeEventListener('load', shell_homeLoaded);
|
||||
shell.isHomeLoaded = true;
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
libcutils.property_set('sys.boot_completed', '1');
|
||||
#endif
|
||||
|
||||
Services.obs.notifyObservers(null, "browser-ui-startup-complete", "");
|
||||
|
||||
if ('pendingChromeEvents' in shell) {
|
||||
shell.pendingChromeEvents.forEach((shell.sendChromeEvent).bind(shell));
|
||||
}
|
||||
delete shell.pendingChromeEvents;
|
||||
});
|
||||
|
||||
this.notifyContentStart();
|
||||
break;
|
||||
case 'mozbrowserlocationchange':
|
||||
if (content.document.location == 'about:blank') {
|
||||
return;
|
||||
}
|
||||
|
||||
this.notifyContentStart();
|
||||
break;
|
||||
|
||||
case 'MozApplicationManifest':
|
||||
try {
|
||||
if (!Services.prefs.getBoolPref('browser.cache.offline.enable'))
|
||||
|
@ -592,6 +578,36 @@ var shell = {
|
|||
sender.sendAsyncMessage(activity.response, { success: false });
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
notifyContentStart: function shell_notifyContentStart() {
|
||||
this.contentBrowser.removeEventListener('mozbrowserloadstart', this, true);
|
||||
this.contentBrowser.removeEventListener('mozbrowserlocationchange', this, true);
|
||||
|
||||
let content = this.contentBrowser.contentWindow;
|
||||
|
||||
this.reportCrash(true);
|
||||
|
||||
Cu.import('resource://gre/modules/Webapps.jsm');
|
||||
DOMApplicationRegistry.allAppsLaunchable = true;
|
||||
|
||||
this.sendEvent(window, 'ContentStart');
|
||||
|
||||
content.addEventListener('load', function shell_homeLoaded() {
|
||||
content.removeEventListener('load', shell_homeLoaded);
|
||||
shell.isHomeLoaded = true;
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
libcutils.property_set('sys.boot_completed', '1');
|
||||
#endif
|
||||
|
||||
Services.obs.notifyObservers(null, "browser-ui-startup-complete", "");
|
||||
|
||||
if ('pendingChromeEvents' in shell) {
|
||||
shell.pendingChromeEvents.forEach((shell.sendChromeEvent).bind(shell));
|
||||
}
|
||||
delete shell.pendingChromeEvents;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -15,14 +15,6 @@ component {88b3eb21-d072-4e3b-886d-f89d8c49fe59} UpdatePrompt.js
|
|||
contract @mozilla.org/updates/update-prompt;1 {88b3eb21-d072-4e3b-886d-f89d8c49fe59}
|
||||
#endif
|
||||
|
||||
# MozKeyboard.js
|
||||
component {397a7fdf-2254-47be-b74e-76625a1a66d5} MozKeyboard.js
|
||||
contract @mozilla.org/b2g-keyboard;1 {397a7fdf-2254-47be-b74e-76625a1a66d5}
|
||||
category JavaScript-navigator-property mozKeyboard @mozilla.org/b2g-keyboard;1
|
||||
|
||||
component {4607330d-e7d2-40a4-9eb8-43967eae0142} MozKeyboard.js
|
||||
contract @mozilla.org/b2g-inputmethod;1 {4607330d-e7d2-40a4-9eb8-43967eae0142}
|
||||
|
||||
# DirectoryProvider.js
|
||||
component {9181eb7c-6f87-11e1-90b1-4f59d80dd2e5} DirectoryProvider.js
|
||||
contract @mozilla.org/browser/directory-provider;1 {9181eb7c-6f87-11e1-90b1-4f59d80dd2e5}
|
||||
|
|
|
@ -20,7 +20,6 @@ EXTRA_COMPONENTS += [
|
|||
'ContentPermissionPrompt.js',
|
||||
'FilePicker.js',
|
||||
'MailtoProtocolHandler.js',
|
||||
'MozKeyboard.js',
|
||||
'PaymentGlue.js',
|
||||
'ProcessGlobal.js',
|
||||
'SmsProtocolHandler.js',
|
||||
|
@ -41,7 +40,6 @@ if CONFIG['MOZ_UPDATER']:
|
|||
|
||||
EXTRA_JS_MODULES += [
|
||||
'ErrorPage.jsm',
|
||||
'Keyboard.jsm',
|
||||
'SignInToWebsite.jsm',
|
||||
'TelURIParser.jsm',
|
||||
]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"revision": "b0d3052513341e467a178ce82b372aba9783fe91",
|
||||
"revision": "2f7fa802679f9ebfcd2021865aaf2ece4adae34f",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
component {397a7fdf-2254-47be-b74e-76625a1a66d5} MozKeyboard.js
|
||||
contract @mozilla.org/b2g-keyboard;1 {397a7fdf-2254-47be-b74e-76625a1a66d5}
|
||||
category JavaScript-navigator-property mozKeyboard @mozilla.org/b2g-keyboard;1
|
||||
|
||||
component {4607330d-e7d2-40a4-9eb8-43967eae0142} MozKeyboard.js
|
||||
contract @mozilla.org/b2g-inputmethod;1 {4607330d-e7d2-40a4-9eb8-43967eae0142}
|
|
@ -0,0 +1,14 @@
|
|||
# -*- 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/.
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'MozKeyboard.js',
|
||||
'InputMethod.manifest',
|
||||
]
|
||||
|
||||
EXTRA_JS_MODULES += [
|
||||
'Keyboard.jsm',
|
||||
]
|
|
@ -5,7 +5,8 @@
|
|||
*/
|
||||
|
||||
[JSImplementation="@mozilla.org/b2g-inputmethod;1",
|
||||
NavigatorProperty="mozInputMethod"]
|
||||
NavigatorProperty="mozInputMethod",
|
||||
Pref="dom.mozInputMethod.enabled"]
|
||||
interface MozInputMethod : EventTarget {
|
||||
// Input Method Manager contain a few global methods expose to apps
|
||||
readonly attribute MozInputMethodManager mgmt;
|
||||
|
@ -27,7 +28,8 @@ interface MozInputMethod : EventTarget {
|
|||
|
||||
// Manages the list of IMEs, enables/disables IME and switches to an
|
||||
// IME.
|
||||
[JSImplementation="@mozilla.org/b2g-imm;1"]
|
||||
[JSImplementation="@mozilla.org/b2g-imm;1",
|
||||
Pref="dom.mozInputMethod.enabled"]
|
||||
interface MozInputMethodManager {
|
||||
// Ask the OS to show a list of available IMEs for users to switch from.
|
||||
// OS should ignore this request if the app is currently not the active one.
|
||||
|
@ -55,7 +57,8 @@ interface MozInputMethodManager {
|
|||
// It also hosts the methods available to the keyboard app to mutate the input field represented.
|
||||
// An "input context" gets void when the app is no longer allowed to interact with the text field,
|
||||
// e.g., the text field does no longer exist, the app is being switched to background, and etc.
|
||||
[JSImplementation="@mozilla.org/b2g-inputcontext;1"]
|
||||
[JSImplementation="@mozilla.org/b2g-inputcontext;1",
|
||||
Pref="dom.mozInputMethod.enabled"]
|
||||
interface MozInputContext: EventTarget {
|
||||
// The tag name of input field, which is enum of "input", "textarea", or "contenteditable"
|
||||
readonly attribute DOMString? type;
|
||||
|
@ -82,6 +85,10 @@ interface MozInputContext: EventTarget {
|
|||
readonly attribute long selectionStart;
|
||||
readonly attribute long selectionEnd;
|
||||
|
||||
// The start and stop position of the selection.
|
||||
readonly attribute DOMString? textBeforeCursor;
|
||||
readonly attribute DOMString? textAfterCursor;
|
||||
|
||||
/*
|
||||
* Set the selection range of the the editable text.
|
||||
* Note: This method cannot be used to move the cursor during composition. Calling this
|
||||
|
|
|
@ -180,6 +180,7 @@ webidl_files = \
|
|||
IDBVersionChangeEvent.webidl \
|
||||
ImageData.webidl \
|
||||
ImageDocument.webidl \
|
||||
InputMethod.webidl \
|
||||
InspectorUtils.webidl \
|
||||
KeyboardEvent.webidl \
|
||||
KeyEvent.webidl \
|
||||
|
@ -534,9 +535,3 @@ test_webidl_files := \
|
|||
else
|
||||
test_webidl_files := $(NULL)
|
||||
endif
|
||||
|
||||
ifdef MOZ_B2G
|
||||
webidl_files += \
|
||||
InputMethod.webidl \
|
||||
$(NULL)
|
||||
endif
|
||||
|
|
|
@ -4372,3 +4372,6 @@ pref("dom.forms.inputmode", false);
|
|||
#else
|
||||
pref("dom.forms.inputmode", true);
|
||||
#endif
|
||||
|
||||
// InputMethods for soft keyboards in B2G
|
||||
pref("dom.mozInputMethod.enabled", false);
|
||||
|
|
Загрузка…
Ссылка в новой задаче