Merge mozilla-central to autoland

This commit is contained in:
Carsten "Tomcat" Book 2017-06-12 15:44:38 +02:00
Родитель 7f80207800 120e57745f
Коммит c468744a9a
19 изменённых файлов: 54 добавлений и 20 удалений

Просмотреть файл

@ -132,3 +132,4 @@ fc69febcbf6c0dcc4b3dfc7a346d8d348798a65f FIREFOX_AURORA_51_BASE
1196bf3032e1bce1fb07a01fd9082a767426c5fb FIREFOX_AURORA_52_BASE
f80dc9fc34680105b714a49b4704bb843f5f7004 FIREFOX_AURORA_53_BASE
6583496f169cd8a13c531ed16e98e8bf313eda8e FIREFOX_AURORA_54_BASE
f9605772a0c9098ed1bcaa98089b2c944ed69e9b FIREFOX_BETA_55_BASE

Просмотреть файл

@ -22,5 +22,5 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.
Bug 1346025 - Move vendored python modules to /third_party/python (need to clobber virtualenv)
Merge day clobber

Просмотреть файл

@ -1 +1 @@
55.0a1
56.0a1

Просмотреть файл

@ -1 +1 @@
55.0a1
56.0a1

Просмотреть файл

@ -10,4 +10,4 @@
# hardcoded milestones in the tree from these two files.
#--------------------------------------------------------
55.0a1
56.0a1

Просмотреть файл

@ -312,10 +312,12 @@
</activity>
#ifdef MOZ_ANDROID_CUSTOM_TABS
<activity android:name="org.mozilla.gecko.customtabs.CustomTabsActivity"
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize|locale|layoutDirection|smallestScreenSize|screenLayout"
android:windowSoftInputMode="stateUnspecified|adjustResize"
android:theme="@style/GeckoCustomTabs" />
#endif
<activity android:name="org.mozilla.gecko.webapps.WebAppActivity"
android:theme="@style/Theme.AppCompat.NoActionBar" />
@ -419,6 +421,7 @@
android:name="org.mozilla.gecko.telemetry.TelemetryUploadService"
android:exported="false"/>
#ifdef MOZ_ANDROID_CUSTOM_TABS
<service
android:name="org.mozilla.gecko.customtabs.GeckoCustomTabsService"
android:exported="true">
@ -426,6 +429,7 @@
<action android:name="android.support.customtabs.action.CustomTabsService" />
</intent-filter>
</service>
#endif
#include ../services/manifests/FxAccountAndroidManifest_services.xml.in

Просмотреть файл

@ -309,6 +309,13 @@ public class AppConstants {
false;
//#endif
public static final boolean MOZ_ANDROID_CUSTOM_TABS =
//#ifdef MOZ_ANDROID_CUSTOM_TABS
true;
//#else
false;
//#endif
// (bug 1266820) Temporarily disabled since no one is working on it.
public static final boolean SCREENSHOTS_IN_BOOKMARKS_ENABLED = false;

Просмотреть файл

@ -39,6 +39,7 @@ def _defines():
for var in ('MOZ_ANDROID_ACTIVITY_STREAM'
'MOZ_ANDROID_ANR_REPORTER',
'MOZ_ANDROID_BEAM',
'MOZ_ANDROID_CUSTOM_TABS',
'MOZ_ANDROID_DOWNLOADS_INTEGRATION',
'MOZ_ANDROID_DOWNLOAD_CONTENT_SERVICE',
'MOZ_ANDROID_EXCLUDE_FONTS',

Просмотреть файл

@ -65,9 +65,6 @@ public class Experiments {
// Enable Activity stream by default for users in the "opt out" group.
public static final String ACTIVITY_STREAM_OPT_OUT = "activity-stream-opt-out";
// User in this group will enable Custom Tabs
public static final String CUSTOM_TABS = "custom-tabs";
// Tabs tray: Arrange tabs in two columns in portrait mode
public static final String COMPACT_TABS = "compact-tabs";

Просмотреть файл

@ -6,7 +6,6 @@
package org.mozilla.gecko;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
@ -15,7 +14,6 @@ import android.support.customtabs.CustomTabsIntent;
import android.util.Log;
import org.mozilla.gecko.home.HomeConfig;
import org.mozilla.gecko.switchboard.SwitchBoard;
import org.mozilla.gecko.webapps.WebAppActivity;
import org.mozilla.gecko.webapps.WebAppIndexer;
import org.mozilla.gecko.customtabs.CustomTabsActivity;
@ -67,7 +65,9 @@ public class LauncherActivity extends Activity {
} else if (!isViewIntentWithURL(safeIntent)) {
dispatchNormalIntent();
} else if (isCustomTabsIntent(safeIntent) && isCustomTabsEnabled(this) ) {
// Is this a custom tabs intent, and are custom tabs enabled?
} else if (AppConstants.MOZ_ANDROID_CUSTOM_TABS && isCustomTabsIntent(safeIntent)
&& isCustomTabsEnabled()) {
dispatchCustomTabsIntent();
// Can we dispatch this VIEW action intent to the tab queue service?
@ -149,10 +149,6 @@ public class LauncherActivity extends Activity {
&& safeIntent.getDataString() != null;
}
private static boolean isCustomTabsEnabled(@NonNull final Context context) {
return SwitchBoard.isInExperiment(context, Experiments.CUSTOM_TABS);
}
private static boolean isCustomTabsIntent(@NonNull final SafeIntent safeIntent) {
return isViewIntentWithURL(safeIntent)
&& safeIntent.hasExtra(CustomTabsIntent.EXTRA_SESSION);
@ -162,6 +158,10 @@ public class LauncherActivity extends Activity {
return GeckoApp.ACTION_WEBAPP.equals(safeIntent.getAction());
}
private boolean isCustomTabsEnabled() {
return GeckoSharedPrefs.forApp(this).getBoolean(GeckoPreferences.PREFS_CUSTOM_TABS, false);
}
private boolean isDeepLink(SafeIntent intent) {
if (intent == null || intent.getData() == null || intent.getData().getScheme() == null
|| intent.getAction() == null) {

Просмотреть файл

@ -161,6 +161,7 @@ public class GeckoPreferences
public static final String PREFS_APP_UPDATE_LAST_BUILD_ID = "app.update.last_build_id";
public static final String PREFS_READ_PARTNER_CUSTOMIZATIONS_PROVIDER = NON_PREF_PREFIX + "distribution.read_partner_customizations_provider";
public static final String PREFS_READ_PARTNER_BOOKMARKS_PROVIDER = NON_PREF_PREFIX + "distribution.read_partner_bookmarks_provider";
public static final String PREFS_CUSTOM_TABS = NON_PREF_PREFIX + "customtabs";
public static final String PREFS_ACTIVITY_STREAM = NON_PREF_PREFIX + "experiments.activitystream";
public static final String PREFS_CATEGORY_EXPERIMENTAL_FEATURES = NON_PREF_PREFIX + "category_experimental";
public static final String PREFS_COMPACT_TABS = NON_PREF_PREFIX + "compact_tabs";
@ -695,6 +696,7 @@ public class GeckoPreferences
i--;
continue;
} else if (PREFS_CATEGORY_EXPERIMENTAL_FEATURES.equals(key)
&& !AppConstants.MOZ_ANDROID_CUSTOM_TABS
&& !ActivityStream.isUserSwitchable(this)) {
preferences.removePreference(pref);
i--;
@ -885,6 +887,10 @@ public class GeckoPreferences
i--;
continue;
}
} else if (PREFS_CUSTOM_TABS.equals(key) && !AppConstants.MOZ_ANDROID_CUSTOM_TABS) {
preferences.removePreference(pref);
i--;
continue;
} else if (PREFS_ACTIVITY_STREAM.equals(key)
&& !ActivityStream.isUserSwitchable(this)) {
preferences.removePreference(pref);

Просмотреть файл

@ -283,6 +283,11 @@
for experimental features. -->
<!ENTITY pref_category_experimental "Experimental features">
<!-- Custom Tabs is an Android API for allowing third-party apps to open URLs in a customized UI.
Instead of switching to the browser it appears as if the user stays in the third-party app.
For more see: https://developer.chrome.com/multidevice/android/customtabs -->
<!ENTITY pref_custom_tabs "Custom Tabs">
<!ENTITY pref_custom_tabs_summary3 "Allow apps to open websites using a customized version of &brandShortName;">
<!-- Localization note (custom_tabs_menu_item_open_in): The variable is replaced by the name of
default browser from user's preference, such as "Open in Firefox" -->
<!ENTITY custom_tabs_menu_item_open_in "Open in &formatS;">

Просмотреть файл

@ -89,6 +89,12 @@
android:title="@string/pref_activity_stream"
android:summary="@string/pref_activity_stream_summary" />
<SwitchPreference android:key="android.not_a_preference.customtabs"
android:title="@string/pref_custom_tabs"
android:summary="@string/pref_custom_tabs_summary"
android:defaultValue="false" />
</PreferenceCategory>
</PreferenceScreen>

Просмотреть файл

@ -241,6 +241,8 @@
<string name="pref_category_experimental">&pref_category_experimental;</string>
<string name="pref_custom_tabs">&pref_custom_tabs;</string>
<string name="pref_custom_tabs_summary">&pref_custom_tabs_summary3;</string>
<string name="custom_tabs_menu_item_open_in">&custom_tabs_menu_item_open_in;</string>
<string name="custom_tabs_menu_footer">&custom_tabs_menu_footer;</string>
<string name="custom_tabs_hint_url_copy">&custom_tabs_hint_url_copy;</string>

Просмотреть файл

@ -68,6 +68,10 @@ project_flag('MOZ_ANDROID_DOWNLOAD_CONTENT_SERVICE',
help='Background service for downloading additional content at runtime',
default=True)
project_flag('MOZ_ANDROID_CUSTOM_TABS',
help='Enable support for Android custom tabs',
default=milestone.is_nightly)
# Enable the Switchboard A/B framework code.
# Note: The framework is always included in the app. This flag controls
# usage of the framework.

Просмотреть файл

@ -1474,10 +1474,6 @@ nsCookieService::TryInitDB(bool aRecreateDB)
}
}
// make operations on the table asynchronous, for performance
mDefaultDBState->dbConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
"PRAGMA synchronous = OFF"));
// Use write-ahead-logging for performance. We cap the autocheckpoint limit at
// 16 pages (around 500KB).
mDefaultDBState->dbConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING(

Просмотреть файл

@ -45,7 +45,7 @@ EXTRA_PP_JS_MODULES['services-sync'] += [
]
# Definitions used by constants.js
DEFINES['weave_version'] = '1.57.0'
DEFINES['weave_version'] = '1.58.0'
DEFINES['weave_id'] = '{340c2bbc-ce74-4362-90b5-7c26312808ef}'
EXTRA_JS_MODULES['services-sync'].engines += [

Просмотреть файл

@ -5242,6 +5242,10 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
NSToIntRound((mHorResizeMargin - mNonClientOffset.right) * scale);
clientRect->bottom -=
NSToIntRound((mVertResizeMargin - mNonClientOffset.bottom) * scale);
// Make client rect's width and height more than 0 to
// avoid problems of webrender and angle.
clientRect->right = std::max(clientRect->right, clientRect->left + 1);
clientRect->bottom = std::max(clientRect->bottom, clientRect->top + 1);
result = true;
*aRetValue = 0;
@ -5397,6 +5401,7 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
case WM_DESTROY:
// clean up.
DestroyLayerManager();
OnDestroy();
result = true;
break;

Просмотреть файл

@ -22,7 +22,7 @@ namespace mozilla {
*/
struct Module
{
static const unsigned int kVersion = 55;
static const unsigned int kVersion = 56;
struct CIDEntry;