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. a=merge
This commit is contained in:
commit
e2138cfe06
@ -908,6 +908,23 @@ AnimationsTimeline.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
getAnimationTooltipText: function(state) {
|
||||
let getTime = time => L10N.getFormatStr("player.timeLabel",
|
||||
L10N.numberWithDecimals(time / 1000, 2));
|
||||
|
||||
let title = L10N.getFormatStr("timeline." + state.type + ".nameLabel",
|
||||
state.name);
|
||||
let delay = L10N.getStr("player.animationDelayLabel") + " " +
|
||||
getTime(state.delay);
|
||||
let duration = L10N.getStr("player.animationDurationLabel") + " " +
|
||||
getTime(state.duration);
|
||||
let iterations = L10N.getStr("player.animationIterationCountLabel") + " " +
|
||||
(state.iterationCount ||
|
||||
L10N.getStr("player.infiniteIterationCountText"));
|
||||
|
||||
return [title, duration, iterations, delay].join("\n");
|
||||
},
|
||||
|
||||
drawTimeBlock: function({state}, el) {
|
||||
let width = el.offsetWidth;
|
||||
|
||||
@ -940,8 +957,7 @@ AnimationsTimeline.prototype = {
|
||||
parent: iterations,
|
||||
attributes: {
|
||||
"class": "name",
|
||||
"title": L10N.getFormatStr("timeline." + state.type + ".nameLabel",
|
||||
state.name)
|
||||
"title": this.getAnimationTooltipText(state)
|
||||
},
|
||||
textContent: state.name
|
||||
});
|
||||
|
@ -42,6 +42,7 @@ support-files =
|
||||
[browser_animation_timeline_scrubber_moves.js]
|
||||
[browser_animation_timeline_shows_delay.js]
|
||||
[browser_animation_timeline_shows_iterations.js]
|
||||
[browser_animation_timeline_shows_time_info.js]
|
||||
[browser_animation_timeline_takes_rate_into_account.js]
|
||||
[browser_animation_timeline_ui.js]
|
||||
[browser_animation_toggle_button_resets_on_navigate.js]
|
||||
|
@ -0,0 +1,29 @@
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Check that the timeline-based UI displays animations' duration, delay and
|
||||
// iteration counts in tooltips.
|
||||
|
||||
add_task(function*() {
|
||||
yield addTab(TEST_URL_ROOT + "doc_simple_animation.html");
|
||||
let {panel} = yield openAnimationInspectorNewUI();
|
||||
yield waitForAllAnimationTargets(panel);
|
||||
|
||||
info("Getting the animation element from the panel");
|
||||
let timelineEl = panel.animationsTimelineComponent.rootWrapperEl;
|
||||
let timeBlockNameEls = timelineEl.querySelectorAll(".time-block .name");
|
||||
|
||||
// Verify that each time-block's name element has a tooltip that looks sort of
|
||||
// ok. We don't need to test the actual content.
|
||||
for (let el of timeBlockNameEls) {
|
||||
ok(el.hasAttribute("title"), "The tooltip is defined");
|
||||
|
||||
let title = el.getAttribute("title");
|
||||
ok(title.match(/Delay: [\d.]+s/), "The tooltip shows the delay");
|
||||
ok(title.match(/Duration: [\d.]+s/), "The tooltip shows the delay");
|
||||
ok(title.match(/Repeats: /), "The tooltip shows the iterations");
|
||||
}
|
||||
});
|
@ -7,6 +7,9 @@
|
||||
*/
|
||||
|
||||
let test = Task.async(function*() {
|
||||
// This test seems to take a long time to cleanup.
|
||||
requestLongerTimeout(2);
|
||||
|
||||
let { target, panel, toolbox } = yield initPerformance(SIMPLE_URL);
|
||||
let { RecordingsView, PerformanceController, PerformanceView,
|
||||
EVENTS, $, L10N } = panel.panelWin;
|
||||
|
@ -9,6 +9,9 @@
|
||||
*/
|
||||
|
||||
let test = Task.async(function*() {
|
||||
// This test seems to take a long time to cleanup.
|
||||
requestLongerTimeout(2);
|
||||
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { PerformanceController, PerformanceView, RecordingsView,
|
||||
EVENTS, $ } = panel.panelWin;
|
||||
|
@ -41,6 +41,12 @@ player.animationIterationCountLabel=Repeats:
|
||||
# player.animationIterationCountLabel string, instead of a number.
|
||||
player.infiniteIterationCount=∞
|
||||
|
||||
# LOCALIZATION NOTE (player.infiniteIterationCountText):
|
||||
# See player.infiniteIterationCount for a description of what this is.
|
||||
# Unlike player.infiniteIterationCount, this string isn't used in HTML, but in
|
||||
# a tooltip.
|
||||
player.infiniteIterationCountText=∞
|
||||
|
||||
# LOCALIZATION NOTE (player.timeLabel):
|
||||
# This string is displayed in each animation player widget, to indicate either
|
||||
# how long (in seconds) the animation lasts, or what is the animation's current
|
||||
|
@ -106,11 +106,20 @@
|
||||
padding-left: 7px;
|
||||
}
|
||||
|
||||
/* This changes the direction of the main notification box on the url bar. */
|
||||
#notification-popup-box:-moz-locale-dir(rtl),
|
||||
/* This adds a second flip for the notification anchors, as they don't switch direction
|
||||
for RTL mode. */
|
||||
.notification-anchor-icon:-moz-locale-dir(rtl) {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
/* For the anchor icons in the chat window, we don't have the notification popup box,
|
||||
so we need to cancel the RTL transform. */
|
||||
.notification-anchor-icon.chat-toolbarbutton:-moz-locale-dir(rtl) {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.notification-anchor-icon {
|
||||
%ifdef MOZ_WIDGET_GTK
|
||||
list-style-image: url(moz-icon://stock/gtk-dialog-info?size=16);
|
||||
|
@ -27,6 +27,7 @@ import android.content.Context;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
public final class HomeConfig {
|
||||
/**
|
||||
@ -1218,7 +1219,7 @@ public final class HomeConfig {
|
||||
private void findNewDefault() {
|
||||
// Pick the first panel that is neither disabled nor currently
|
||||
// set as default.
|
||||
for (PanelConfig panelConfig : mConfigMap.values()) {
|
||||
for (PanelConfig panelConfig : makeOrderedCopy(false)) {
|
||||
if (!panelConfig.isDefault() && !panelConfig.isDisabled()) {
|
||||
setDefault(panelConfig.getId());
|
||||
return;
|
||||
|
@ -345,13 +345,17 @@ public class TopSitesPanel extends HomeFragment {
|
||||
return;
|
||||
}
|
||||
|
||||
final Context context = view.getContext();
|
||||
|
||||
// Long pressed item was a Top Sites GridView item, handle it.
|
||||
MenuInflater inflater = new MenuInflater(view.getContext());
|
||||
MenuInflater inflater = new MenuInflater(context);
|
||||
inflater.inflate(R.menu.home_contextmenu, menu);
|
||||
|
||||
// Hide unused menu items.
|
||||
menu.findItem(R.id.home_edit_bookmark).setVisible(false);
|
||||
|
||||
menu.findItem(R.id.home_remove).setVisible(RestrictedProfiles.isAllowed(context, Restriction.DISALLOW_CLEAR_HISTORY));
|
||||
|
||||
TopSitesGridContextMenuInfo info = (TopSitesGridContextMenuInfo) menuInfo;
|
||||
menu.setHeaderTitle(info.getDisplayTitle());
|
||||
|
||||
@ -372,9 +376,13 @@ public class TopSitesPanel extends HomeFragment {
|
||||
menu.findItem(R.id.home_share).setVisible(false);
|
||||
}
|
||||
|
||||
if (!RestrictedProfiles.isAllowed(view.getContext(), Restriction.DISALLOW_PRIVATE_BROWSING)) {
|
||||
if (!RestrictedProfiles.isAllowed(context, Restriction.DISALLOW_PRIVATE_BROWSING)) {
|
||||
menu.findItem(R.id.home_open_private_tab).setVisible(false);
|
||||
}
|
||||
|
||||
// We only show these menu items on the reading list panel:
|
||||
menu.findItem(R.id.mark_read).setVisible(false);
|
||||
menu.findItem(R.id.mark_unread).setVisible(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -132,6 +132,7 @@ OnSharedPreferenceChangeListener
|
||||
public static final String PREFS_VOICE_INPUT_ENABLED = NON_PREF_PREFIX + "voice_input_enabled";
|
||||
public static final String PREFS_QRCODE_ENABLED = NON_PREF_PREFIX + "qrcode_enabled";
|
||||
private static final String PREFS_DEVTOOLS = NON_PREF_PREFIX + "devtools.enabled";
|
||||
private static final String PREFS_DISPLAY = NON_PREF_PREFIX + "display.enabled";
|
||||
private static final String PREFS_CUSTOMIZE_HOME = NON_PREF_PREFIX + "customize_home";
|
||||
private static final String PREFS_TRACKING_PROTECTION_PRIVATE_BROWSING = "privacy.trackingprotection.pbmode.enabled";
|
||||
private static final String PREFS_TRACKING_PROTECTION_LEARN_MORE = NON_PREF_PREFIX + "trackingprotection.learn_more";
|
||||
@ -706,12 +707,16 @@ OnSharedPreferenceChangeListener
|
||||
}
|
||||
}
|
||||
if (PREFS_DEVTOOLS.equals(key) &&
|
||||
RestrictedProfiles.isUserRestricted(this)) {
|
||||
!RestrictedProfiles.isAllowed(this, Restriction.DISALLOW_DEVELOPER_TOOLS)) {
|
||||
preferences.removePreference(pref);
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
if (PREFS_DISPLAY.equals(key) && !RestrictedProfiles.isAllowed(this, Restriction.DISALLOW_DISPLAY_SETTINGS)) {
|
||||
preferences.removePreference(pref);
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (PREFS_CUSTOMIZE_HOME.equals(key)) {
|
||||
if (!RestrictedProfiles.isAllowed(this, Restriction.DISALLOW_CUSTOMIZE_HOME)) {
|
||||
preferences.removePreference(pref);
|
||||
|
@ -23,4 +23,16 @@
|
||||
<style name="ActionBar.GeckoPreferences" parent="@android:style/Widget.Material.ActionBar.Solid">
|
||||
</style>
|
||||
|
||||
<style name="GeckoAppBase" parent="Gecko">
|
||||
<item name="android:actionButtonStyle">@style/GeckoActionBar.Button</item>
|
||||
<item name="android:listViewStyle">@style/Widget.ListView</item>
|
||||
<item name="android:panelBackground">@drawable/menu_panel_bg</item>
|
||||
<item name="android:spinnerDropDownItemStyle">@style/Widget.DropDownItem.Spinner</item>
|
||||
<item name="android:spinnerItemStyle">@style/Widget.TextView.SpinnerItem</item>
|
||||
<item name="menuItemActionViewStyle">@style/Widget.MenuItemActionView</item>
|
||||
<item name="menuItemDefaultStyle">@style/Widget.MenuItemDefault</item>
|
||||
<item name="menuItemSecondaryActionBarStyle">@style/Widget.MenuItemSecondaryActionBar</item>
|
||||
<item name="tabGridLayoutViewStyle">@style/Widget.TabsGridLayout</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
@ -26,7 +26,8 @@
|
||||
|
||||
<PreferenceScreen android:title="@string/pref_category_display"
|
||||
android:summary="@string/pref_category_display_summary"
|
||||
android:fragment="org.mozilla.gecko.preferences.GeckoPreferenceFragment" >
|
||||
android:fragment="org.mozilla.gecko.preferences.GeckoPreferenceFragment"
|
||||
android:key="android.not_a_preference.display.enabled" >
|
||||
<extra android:name="resource"
|
||||
android:value="preferences_display" />
|
||||
</PreferenceScreen>
|
||||
|
@ -25,7 +25,8 @@ public class GuestProfileConfiguration implements RestrictionConfiguration {
|
||||
Restriction.DISALLOW_SET_IMAGE,
|
||||
Restriction.DISALLOW_MODIFY_ACCOUNTS,
|
||||
Restriction.DISALLOW_REMOTE_DEBUGGING,
|
||||
Restriction.DISALLOW_IMPORT_SETTINGS
|
||||
Restriction.DISALLOW_IMPORT_SETTINGS,
|
||||
Restriction.DISALLOW_DEVELOPER_TOOLS
|
||||
);
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@ -38,7 +39,8 @@ public class GuestProfileConfiguration implements RestrictionConfiguration {
|
||||
);
|
||||
|
||||
private static final List<String> BANNED_URLS = Arrays.asList(
|
||||
"about:config"
|
||||
"about:config",
|
||||
"about:addons"
|
||||
);
|
||||
|
||||
@Override
|
||||
@ -59,6 +61,7 @@ public class GuestProfileConfiguration implements RestrictionConfiguration {
|
||||
return false;
|
||||
}
|
||||
|
||||
url = url.toLowerCase();
|
||||
for (String banned : BANNED_URLS) {
|
||||
if (url.startsWith(banned)) {
|
||||
return false;
|
||||
|
@ -30,7 +30,8 @@ public class RestrictedProfileConfiguration implements RestrictionConfiguration
|
||||
Restriction.DISALLOW_DISPLAY_SETTINGS,
|
||||
Restriction.DISALLOW_CLEAR_HISTORY,
|
||||
Restriction.DISALLOW_MASTER_PASSWORD,
|
||||
Restriction.DISALLOW_GUEST_BROWSING
|
||||
Restriction.DISALLOW_GUEST_BROWSING,
|
||||
Restriction.DISALLOW_DEFAULT_THEME
|
||||
);
|
||||
|
||||
private Context context;
|
||||
|
@ -54,8 +54,9 @@ public enum Restriction {
|
||||
|
||||
DISALLOW_MASTER_PASSWORD(18, "no_master_password", R.string.restriction_disallow_master_password_title),
|
||||
|
||||
DISALLOW_GUEST_BROWSING(19, "no_guest_browsing", R.string.restriction_disallow_guest_browsing_title);
|
||||
DISALLOW_GUEST_BROWSING(19, "no_guest_browsing", R.string.restriction_disallow_guest_browsing_title),
|
||||
|
||||
DISALLOW_DEFAULT_THEME(20, "no_default_theme", 0);
|
||||
|
||||
public final int id;
|
||||
public final String name;
|
||||
|
@ -58,6 +58,11 @@ public class RestrictionProvider extends BroadcastReceiver {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (restriction == Restriction.DISALLOW_DEFAULT_THEME) {
|
||||
// This restriction is not configurable
|
||||
continue;
|
||||
}
|
||||
|
||||
RestrictionEntry entry = createRestrictionEntryWithDefaultValue(context, restriction,
|
||||
oldRestrictions.getBoolean(restriction.name, true));
|
||||
entries.add(entry);
|
||||
|
@ -3080,7 +3080,10 @@ var LightWeightThemeWebInstaller = {
|
||||
BrowserApp.deck.addEventListener("PreviewBrowserTheme", this, false, true);
|
||||
BrowserApp.deck.addEventListener("ResetBrowserThemePreview", this, false, true);
|
||||
|
||||
if (ParentalControls.parentalControlsEnabled && !this._manager.currentTheme) {
|
||||
if (ParentalControls.parentalControlsEnabled &&
|
||||
!this._manager.currentTheme &&
|
||||
!ParentalControls.isAllowed(ParentalControls.DEFAULT_THEME)) {
|
||||
// We are using the DEFAULT_THEME restriction to differentiate between restricted profiles & guest mode - Bug 1199596
|
||||
this._installParentalControlsTheme();
|
||||
}
|
||||
},
|
||||
@ -5562,7 +5565,12 @@ var FormAssistant = {
|
||||
|
||||
if (this._showValidationMessage(focused))
|
||||
break;
|
||||
this._showAutoCompleteSuggestions(focused, function () {});
|
||||
let checkResultsClick = hasResults => {
|
||||
if (!hasResults) {
|
||||
this._hideFormAssistPopup();
|
||||
}
|
||||
};
|
||||
this._showAutoCompleteSuggestions(focused, checkResultsClick);
|
||||
} else {
|
||||
// temporarily hide the form assist popup while we're panning or zooming the page
|
||||
this._hideFormAssistPopup();
|
||||
|
@ -11,7 +11,7 @@ interface nsIFile;
|
||||
interface nsIInterfaceRequestor;
|
||||
interface nsIArray;
|
||||
|
||||
[scriptable, uuid(ed14d186-e902-4d41-86cb-8949fd7b53d7)]
|
||||
[scriptable, uuid(f9962e65-5369-4346-8c44-84d5319abfc2)]
|
||||
interface nsIParentalControlsService : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -36,6 +36,7 @@ interface nsIParentalControlsService : nsISupports
|
||||
const short CLEAR_HISTORY = 17; // Clear browsing history
|
||||
const short MASTER_PASSWORD = 18; // Setting master password for logins
|
||||
const short GUEST_BROWSING = 19; // Disallow usage of guest browsing
|
||||
const short DEFAULT_THEME = 20; // Use default theme or a special parental controls theme
|
||||
|
||||
/**
|
||||
* @returns true if the current user account has parental controls
|
||||
|
Loading…
Reference in New Issue
Block a user