mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge m-c to m-i
This commit is contained in:
commit
c069607bff
@ -811,11 +811,7 @@ pref("plugin.state.f5 sam inspection host plugin", 2);
|
|||||||
// display door hanger if flash not installed
|
// display door hanger if flash not installed
|
||||||
pref("plugins.notifyMissingFlash", true);
|
pref("plugins.notifyMissingFlash", true);
|
||||||
|
|
||||||
#ifdef XP_WIN
|
|
||||||
pref("browser.preferences.instantApply", false);
|
|
||||||
#else
|
|
||||||
pref("browser.preferences.instantApply", true);
|
pref("browser.preferences.instantApply", true);
|
||||||
#endif
|
|
||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
pref("browser.preferences.animateFadeIn", true);
|
pref("browser.preferences.animateFadeIn", true);
|
||||||
#else
|
#else
|
||||||
@ -823,7 +819,7 @@ pref("browser.preferences.animateFadeIn", false);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Toggles between the two Preferences implementations, pop-up window and in-content
|
// Toggles between the two Preferences implementations, pop-up window and in-content
|
||||||
pref("browser.preferences.inContent", false);
|
pref("browser.preferences.inContent", true);
|
||||||
|
|
||||||
pref("browser.download.show_plugins_in_list", true);
|
pref("browser.download.show_plugins_in_list", true);
|
||||||
pref("browser.download.hide_plugins_without_extensions", true);
|
pref("browser.download.hide_plugins_without_extensions", true);
|
||||||
|
@ -99,10 +99,9 @@ function test_multiple_windows() {
|
|||||||
ok(notification2, "2nd window has a global notification box.");
|
ok(notification2, "2nd window has a global notification box.");
|
||||||
|
|
||||||
let policy;
|
let policy;
|
||||||
|
|
||||||
let displayCount = 0;
|
let displayCount = 0;
|
||||||
let prefPaneClosed = false;
|
let prefWindowClosed = false;
|
||||||
let childWindowClosed = false;
|
let mutationObserversRemoved = false;
|
||||||
|
|
||||||
function onAlertDisplayed() {
|
function onAlertDisplayed() {
|
||||||
displayCount++;
|
displayCount++;
|
||||||
@ -116,24 +115,26 @@ function test_multiple_windows() {
|
|||||||
// We register two independent observers and we need both to clean up
|
// We register two independent observers and we need both to clean up
|
||||||
// properly. This handles gating for test completion.
|
// properly. This handles gating for test completion.
|
||||||
function maybeFinish() {
|
function maybeFinish() {
|
||||||
if (!prefPaneClosed) {
|
if (!prefWindowClosed) {
|
||||||
dump("Not finishing test yet because pref pane isn't closed.\n");
|
dump("Not finishing test yet because pref pane isn't closed.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!childWindowClosed) {
|
if (!mutationObserversRemoved) {
|
||||||
dump("Not finishing test yet because child window isn't closed.\n");
|
dump("Not finishing test yet because mutation observers haven't been removed yet.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window2.close();
|
||||||
|
|
||||||
dump("Finishing multiple window test.\n");
|
dump("Finishing multiple window test.\n");
|
||||||
rootLogger.removeAppender(dumpAppender);
|
rootLogger.removeAppender(dumpAppender);
|
||||||
delete dumpAppender;
|
delete dumpAppender;
|
||||||
delete rootLogger;
|
delete rootLogger;
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
let closeCount = 0;
|
let closeCount = 0;
|
||||||
|
|
||||||
function onAlertClose() {
|
function onAlertClose() {
|
||||||
closeCount++;
|
closeCount++;
|
||||||
|
|
||||||
@ -151,8 +152,7 @@ function test_multiple_windows() {
|
|||||||
is(notification1.allNotifications.length, 0, "No notifications remain on main window.");
|
is(notification1.allNotifications.length, 0, "No notifications remain on main window.");
|
||||||
is(notification2.allNotifications.length, 0, "No notifications remain on 2nd window.");
|
is(notification2.allNotifications.length, 0, "No notifications remain on 2nd window.");
|
||||||
|
|
||||||
window2.close();
|
mutationObserversRemoved = true;
|
||||||
childWindowClosed = true;
|
|
||||||
maybeFinish();
|
maybeFinish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,11 +170,11 @@ function test_multiple_windows() {
|
|||||||
Services.obs.addObserver(function observer(prefWin, topic, data) {
|
Services.obs.addObserver(function observer(prefWin, topic, data) {
|
||||||
Services.obs.removeObserver(observer, "advanced-pane-loaded");
|
Services.obs.removeObserver(observer, "advanced-pane-loaded");
|
||||||
|
|
||||||
ok(true, "Pref pane opened on info bar button press.");
|
ok(true, "Advanced preferences opened on info bar button press.");
|
||||||
executeSoon(function soon() {
|
executeSoon(function soon() {
|
||||||
dump("Closing pref pane.\n");
|
dump("Closing preferences.\n");
|
||||||
prefWin.close();
|
prefWin.close();
|
||||||
prefPaneClosed = true;
|
prefWindowClosed = true;
|
||||||
maybeFinish();
|
maybeFinish();
|
||||||
});
|
});
|
||||||
}, "advanced-pane-loaded", false);
|
}, "advanced-pane-loaded", false);
|
||||||
|
@ -38,6 +38,11 @@ function checkPreferences(prefsWin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
|
if (Services.prefs.getBoolPref("browser.preferences.inContent")) {
|
||||||
|
// Bug 881576 - ensure this works with inContent prefs.
|
||||||
|
todo(false, "Bug 881576 - this test needs to be updated for inContent prefs");
|
||||||
|
return;
|
||||||
|
}
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
gBrowser.selectedBrowser.addEventListener("load", function onload() {
|
gBrowser.selectedBrowser.addEventListener("load", function onload() {
|
||||||
gBrowser.selectedBrowser.removeEventListener("load", onload, true);
|
gBrowser.selectedBrowser.removeEventListener("load", onload, true);
|
||||||
@ -50,18 +55,13 @@ function test() {
|
|||||||
// window to open - which we track either via a window watcher (for
|
// window to open - which we track either via a window watcher (for
|
||||||
// the window-based prefs) or via an "Initialized" event (for
|
// the window-based prefs) or via an "Initialized" event (for
|
||||||
// in-content prefs.)
|
// in-content prefs.)
|
||||||
if (Services.prefs.getBoolPref("browser.preferences.inContent")) {
|
Services.ww.registerNotification(function wwobserver(aSubject, aTopic, aData) {
|
||||||
// Bug 881576 - ensure this works with inContent prefs.
|
if (aTopic != "domwindowopened")
|
||||||
todo(false, "Bug 881576 - this test needs to be updated for inContent prefs");
|
return;
|
||||||
} else {
|
Services.ww.unregisterNotification(wwobserver);
|
||||||
Services.ww.registerNotification(function wwobserver(aSubject, aTopic, aData) {
|
checkPreferences(aSubject);
|
||||||
if (aTopic != "domwindowopened")
|
});
|
||||||
return;
|
PopupNotifications.panel.firstElementChild.button.click();
|
||||||
Services.ww.unregisterNotification(wwobserver);
|
|
||||||
checkPreferences(aSubject);
|
|
||||||
});
|
|
||||||
PopupNotifications.panel.firstElementChild.button.click();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
Services.prefs.setIntPref("offline-apps.quota.warn", 1);
|
Services.prefs.setIntPref("offline-apps.quota.warn", 1);
|
||||||
|
@ -505,10 +505,13 @@ function openPreferences(paneID, extraArgs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (newLoad) {
|
if (newLoad) {
|
||||||
browser.addEventListener("load", function onload() {
|
Services.obs.addObserver(function advancedPaneLoadedObs(prefWin, topic, data) {
|
||||||
browser.removeEventListener("load", onload, true);
|
if (prefWin != browser.contentWindow) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Services.obs.removeObserver(advancedPaneLoadedObs, "advanced-pane-loaded");
|
||||||
switchToPane();
|
switchToPane();
|
||||||
}, true);
|
}, "advanced-pane-loaded", false);
|
||||||
} else {
|
} else {
|
||||||
switchToPane();
|
switchToPane();
|
||||||
}
|
}
|
||||||
|
@ -772,15 +772,16 @@ let CustomizableUIInternal = {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let container = areaNode.customizationTarget;
|
||||||
let widgetNode = window.document.getElementById(aWidgetId);
|
let widgetNode = window.document.getElementById(aWidgetId);
|
||||||
if (!widgetNode) {
|
if (widgetNode && isOverflowable) {
|
||||||
|
container = areaNode.overflowable.getContainerFor(widgetNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!widgetNode || !container.contains(widgetNode)) {
|
||||||
INFO("Widget not found, unable to remove");
|
INFO("Widget not found, unable to remove");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let container = areaNode.customizationTarget;
|
|
||||||
if (isOverflowable) {
|
|
||||||
container = areaNode.overflowable.getContainerFor(widgetNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.notifyListeners("onWidgetBeforeDOMChange", widgetNode, null, container, true);
|
this.notifyListeners("onWidgetBeforeDOMChange", widgetNode, null, container, true);
|
||||||
|
|
||||||
|
@ -108,6 +108,7 @@ skip-if = os == "linux"
|
|||||||
[browser_993322_widget_notoolbar.js]
|
[browser_993322_widget_notoolbar.js]
|
||||||
[browser_995164_registerArea_during_customize_mode.js]
|
[browser_995164_registerArea_during_customize_mode.js]
|
||||||
[browser_996364_registerArea_different_properties.js]
|
[browser_996364_registerArea_different_properties.js]
|
||||||
|
[browser_996635_remove_non_widgets.js]
|
||||||
[browser_1003588_no_specials_in_panel.js]
|
[browser_1003588_no_specials_in_panel.js]
|
||||||
[browser_1008559_anchor_undo_restore.js]
|
[browser_1008559_anchor_undo_restore.js]
|
||||||
[browser_bootstrapped_custom_toolbar.js]
|
[browser_bootstrapped_custom_toolbar.js]
|
||||||
|
@ -0,0 +1,43 @@
|
|||||||
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
// NB: This is testing what happens if something that /isn't/ a customizable
|
||||||
|
// widget gets used in CustomizableUI APIs. Don't use this as an example of
|
||||||
|
// what should happen in a "normal" case or how you should use the API.
|
||||||
|
function test() {
|
||||||
|
// First create a button that isn't customizable, and add it in the nav-bar,
|
||||||
|
// but not in the customizable part of it (the customization target) but
|
||||||
|
// next to the main (hamburger) menu button.
|
||||||
|
const buttonID = "Test-non-widget-non-removable-button";
|
||||||
|
let btn = document.createElement("toolbarbutton");
|
||||||
|
btn.id = buttonID;
|
||||||
|
btn.label = "Hi";
|
||||||
|
btn.setAttribute("style", "width: 20px; height: 20px; background-color: red");
|
||||||
|
document.getElementById("nav-bar").appendChild(btn);
|
||||||
|
registerCleanupFunction(function() {
|
||||||
|
btn.remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Now try to add this non-customizable button to the tabstrip. This will
|
||||||
|
// update the internal bookkeeping (ie placements) information, but shouldn't
|
||||||
|
// move the node.
|
||||||
|
CustomizableUI.addWidgetToArea(buttonID, CustomizableUI.AREA_TABSTRIP);
|
||||||
|
let placement = CustomizableUI.getPlacementOfWidget(buttonID);
|
||||||
|
// Check our bookkeeping
|
||||||
|
ok(placement, "Button should be placed");
|
||||||
|
is(placement && placement.area, CustomizableUI.AREA_TABSTRIP, "Should be placed on tabstrip.");
|
||||||
|
// Check we didn't move the node.
|
||||||
|
is(btn.parentNode && btn.parentNode.id, "nav-bar", "Actual button should still be on navbar.");
|
||||||
|
|
||||||
|
// Now remove the node again. This should remove the bookkeeping, but again
|
||||||
|
// not affect the actual node.
|
||||||
|
CustomizableUI.removeWidgetFromArea(buttonID);
|
||||||
|
placement = CustomizableUI.getPlacementOfWidget(buttonID);
|
||||||
|
// Check our bookkeeping:
|
||||||
|
ok(!placement, "Button should no longer have a placement.");
|
||||||
|
// Check our node.
|
||||||
|
is(btn.parentNode && btn.parentNode.id, "nav-bar", "Actual button should still be on navbar.");
|
||||||
|
}
|
||||||
|
|
@ -71,6 +71,9 @@ var gAdvancedPane = {
|
|||||||
#endif
|
#endif
|
||||||
this.updateActualCacheSize();
|
this.updateActualCacheSize();
|
||||||
this.updateActualAppCacheSize();
|
this.updateActualAppCacheSize();
|
||||||
|
|
||||||
|
// Notify observers that the UI is now ready
|
||||||
|
Services.obs.notifyObservers(window, "advanced-pane-loaded", null);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -44,6 +44,7 @@ function selectCategory(name) {
|
|||||||
let categories = document.getElementById("categories");
|
let categories = document.getElementById("categories");
|
||||||
let item = categories.querySelector(".category[value=" + name + "]");
|
let item = categories.querySelector(".category[value=" + name + "]");
|
||||||
categories.selectedItem = item;
|
categories.selectedItem = item;
|
||||||
|
gotoPref(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
function gotoPref(page) {
|
function gotoPref(page) {
|
||||||
|
@ -3,7 +3,3 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
%include ../../shared/devtools/debugger.inc.css
|
%include ../../shared/devtools/debugger.inc.css
|
||||||
|
|
||||||
.devtools-sidebar-tabs > tabs > tab {
|
|
||||||
min-height: 24px !important;
|
|
||||||
}
|
|
||||||
|
@ -542,7 +542,7 @@
|
|||||||
/* Toolbar controls */
|
/* Toolbar controls */
|
||||||
|
|
||||||
.devtools-sidebar-tabs > tabs > tab {
|
.devtools-sidebar-tabs > tabs > tab {
|
||||||
min-height: 1em !important;
|
min-height: 24px !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,15 +3,3 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
%include ../../shared/devtools/debugger.inc.css
|
%include ../../shared/devtools/debugger.inc.css
|
||||||
|
|
||||||
.devtools-sidebar-tabs > tabs > tab {
|
|
||||||
min-height: 22px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#instruments-pane-toggle:hover {
|
|
||||||
-moz-image-region: rect(0px,32px,16px,16px);
|
|
||||||
}
|
|
||||||
|
|
||||||
#instruments-pane-toggle:hover:active {
|
|
||||||
-moz-image-region: rect(0px,48px,16px,32px);
|
|
||||||
}
|
|
||||||
|
@ -432,7 +432,7 @@ abstract public class BrowserApp extends GeckoApp
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
BrowserDB.removeReadingListItemWithURL(getContentResolver(), url);
|
BrowserDB.removeReadingListItemWithURL(getContentResolver(), url);
|
||||||
showToast(R.string.reading_list_removed, Toast.LENGTH_SHORT);
|
showToast(R.string.page_removed, Toast.LENGTH_SHORT);
|
||||||
|
|
||||||
final int count = BrowserDB.getReadingListCount(getContentResolver());
|
final int count = BrowserDB.getReadingListCount(getContentResolver());
|
||||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Reader:ListCountUpdated", Integer.toString(count)));
|
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Reader:ListCountUpdated", Integer.toString(count)));
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
package org.mozilla.gecko;
|
package org.mozilla.gecko;
|
||||||
|
|
||||||
import org.mozilla.gecko.mozglue.RobocopTarget;
|
import org.mozilla.gecko.mozglue.RobocopTarget;
|
||||||
import org.mozilla.gecko.util.ThreadUtils;
|
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
@ -19,7 +18,6 @@ import java.util.Arrays;
|
|||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@code GeckoSharedPrefs} provides scoped SharedPreferences instances.
|
* {@code GeckoSharedPrefs} provides scoped SharedPreferences instances.
|
||||||
@ -59,9 +57,6 @@ public final class GeckoSharedPrefs {
|
|||||||
// For disabling migration when getting a SharedPreferences instance
|
// For disabling migration when getting a SharedPreferences instance
|
||||||
private static final EnumSet<Flags> disableMigrations = EnumSet.of(Flags.DISABLE_MIGRATIONS);
|
private static final EnumSet<Flags> disableMigrations = EnumSet.of(Flags.DISABLE_MIGRATIONS);
|
||||||
|
|
||||||
// Timeout for migration commits to be done (10 seconds)
|
|
||||||
private static final int MIGRATION_COMMIT_TIMEOUT_MSEC = 10000;
|
|
||||||
|
|
||||||
// The keys that have to be moved from ProfileManager's default
|
// The keys that have to be moved from ProfileManager's default
|
||||||
// shared prefs to the profile from version 0 to 1.
|
// shared prefs to the profile from version 0 to 1.
|
||||||
private static final String[] PROFILE_MIGRATIONS_0_TO_1 = {
|
private static final String[] PROFILE_MIGRATIONS_0_TO_1 = {
|
||||||
@ -254,7 +249,6 @@ public final class GeckoSharedPrefs {
|
|||||||
return pmPrefs.edit().clear();
|
return pmPrefs.edit().clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
private static void putEntry(Editor to, String key, Object value) {
|
private static void putEntry(Editor to, String key, Object value) {
|
||||||
Log.d(LOGTAG, "Migrating key = " + key + " with value = " + value);
|
Log.d(LOGTAG, "Migrating key = " + key + " with value = " + value);
|
||||||
|
|
||||||
|
@ -191,21 +191,34 @@ abstract class HomeFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (itemId == R.id.home_remove) {
|
if (itemId == R.id.home_remove) {
|
||||||
// Prioritize removing a history entry over a bookmark in the case of a combined item.
|
// Track notification queuing of removal so we don't notify multiple times.
|
||||||
if (info.hasHistoryId()) {
|
boolean notifyQueued = false;
|
||||||
new RemoveHistoryTask(context, info.historyId).execute();
|
final String url = info.url;
|
||||||
return true;
|
|
||||||
|
// This might be a reading list item. Try removing it by url.
|
||||||
|
(new RemoveReadingListItemTask(context, url)).execute();
|
||||||
|
|
||||||
|
if (info.isInReadingList()) {
|
||||||
|
// For reading list, this may still double-notify because reading list is in Gecko.
|
||||||
|
notifyQueued = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.hasBookmarkId()) {
|
if (info.hasBookmarkId()) {
|
||||||
new RemoveBookmarkTask(context, info.bookmarkId).execute();
|
new RemoveBookmarkTask(context, info.bookmarkId, !notifyQueued).execute();
|
||||||
return true;
|
notifyQueued = true;
|
||||||
|
} else {
|
||||||
|
new RemoveBookmarkTask(context, url, false).execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.isInReadingList()) {
|
if (info.hasHistoryId()) {
|
||||||
(new RemoveReadingListItemTask(context, info.readingListItemId, info.url)).execute();
|
new RemoveHistoryTask(context, info.historyId, !notifyQueued).execute();
|
||||||
return true;
|
notifyQueued = true;
|
||||||
|
} else {
|
||||||
|
// We can't know for sure if there is also a history item, but try anyways.
|
||||||
|
new RemoveHistoryTask(context, url, false).execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return notifyQueued;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -274,36 +287,53 @@ abstract class HomeFragment extends Fragment {
|
|||||||
private static class RemoveBookmarkTask extends UiAsyncTask<Void, Void, Void> {
|
private static class RemoveBookmarkTask extends UiAsyncTask<Void, Void, Void> {
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
private final int mId;
|
private final int mId;
|
||||||
|
private final String mUrl;
|
||||||
|
private final boolean mNotify;
|
||||||
|
|
||||||
public RemoveBookmarkTask(Context context, int id) {
|
public RemoveBookmarkTask(Context context, int id, String url, boolean notify) {
|
||||||
super(ThreadUtils.getBackgroundHandler());
|
super(ThreadUtils.getBackgroundHandler());
|
||||||
|
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mId = id;
|
mId = id;
|
||||||
|
mUrl = url;
|
||||||
|
mNotify = notify;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RemoveBookmarkTask(Context context, int id, boolean notify) {
|
||||||
|
this(context, id, null, notify);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RemoveBookmarkTask(Context context, String url, boolean notify) {
|
||||||
|
this(context, -1, url, notify);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Void doInBackground(Void... params) {
|
public Void doInBackground(Void... params) {
|
||||||
ContentResolver cr = mContext.getContentResolver();
|
ContentResolver cr = mContext.getContentResolver();
|
||||||
BrowserDB.removeBookmark(cr, mId);
|
if (mId > 0) {
|
||||||
|
BrowserDB.removeBookmark(cr, mId);
|
||||||
|
} else {
|
||||||
|
BrowserDB.removeBookmarksWithURL(cr, mUrl);
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPostExecute(Void result) {
|
public void onPostExecute(Void result) {
|
||||||
Toast.makeText(mContext, R.string.bookmark_removed, Toast.LENGTH_SHORT).show();
|
if (mNotify) {
|
||||||
|
Toast.makeText(mContext, R.string.page_removed, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class RemoveReadingListItemTask extends UiAsyncTask<Void, Void, Void> {
|
private static class RemoveReadingListItemTask extends UiAsyncTask<Void, Void, Void> {
|
||||||
private final int mId;
|
|
||||||
private final String mUrl;
|
private final String mUrl;
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
|
|
||||||
public RemoveReadingListItemTask(Context context, int id, String url) {
|
public RemoveReadingListItemTask(Context context, String url) {
|
||||||
super(ThreadUtils.getBackgroundHandler());
|
super(ThreadUtils.getBackgroundHandler());
|
||||||
mId = id;
|
|
||||||
mUrl = url;
|
mUrl = url;
|
||||||
mContext = context;
|
mContext = context;
|
||||||
}
|
}
|
||||||
@ -311,7 +341,7 @@ abstract class HomeFragment extends Fragment {
|
|||||||
@Override
|
@Override
|
||||||
public Void doInBackground(Void... params) {
|
public Void doInBackground(Void... params) {
|
||||||
ContentResolver cr = mContext.getContentResolver();
|
ContentResolver cr = mContext.getContentResolver();
|
||||||
BrowserDB.removeReadingListItem(cr, mId);
|
BrowserDB.removeReadingListItemWithURL(cr, mUrl);
|
||||||
|
|
||||||
GeckoEvent e = GeckoEvent.createBroadcastEvent("Reader:Remove", mUrl);
|
GeckoEvent e = GeckoEvent.createBroadcastEvent("Reader:Remove", mUrl);
|
||||||
GeckoAppShell.sendEventToGecko(e);
|
GeckoAppShell.sendEventToGecko(e);
|
||||||
@ -323,23 +353,41 @@ abstract class HomeFragment extends Fragment {
|
|||||||
private static class RemoveHistoryTask extends UiAsyncTask<Void, Void, Void> {
|
private static class RemoveHistoryTask extends UiAsyncTask<Void, Void, Void> {
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
private final int mId;
|
private final int mId;
|
||||||
|
private final String mUrl;
|
||||||
|
private final boolean mNotify;
|
||||||
|
|
||||||
public RemoveHistoryTask(Context context, int id) {
|
public RemoveHistoryTask(Context context, int id, boolean notify) {
|
||||||
|
this(context, id, null, notify);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RemoveHistoryTask(Context context, String url, boolean notify) {
|
||||||
|
this(context, -1, url, notify);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RemoveHistoryTask(Context context, int id, String url, boolean notify) {
|
||||||
super(ThreadUtils.getBackgroundHandler());
|
super(ThreadUtils.getBackgroundHandler());
|
||||||
|
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mId = id;
|
mId = id;
|
||||||
|
mUrl = url;
|
||||||
|
mNotify = notify;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Void doInBackground(Void... params) {
|
public Void doInBackground(Void... params) {
|
||||||
BrowserDB.removeHistoryEntry(mContext.getContentResolver(), mId);
|
if (mId > 0) {
|
||||||
|
BrowserDB.removeHistoryEntry(mContext.getContentResolver(), mId);
|
||||||
|
} else {
|
||||||
|
BrowserDB.removeHistoryEntry(mContext.getContentResolver(), mUrl);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPostExecute(Void result) {
|
public void onPostExecute(Void result) {
|
||||||
Toast.makeText(mContext, R.string.history_removed, Toast.LENGTH_SHORT).show();
|
if (mNotify) {
|
||||||
|
Toast.makeText(mContext, R.string.page_removed, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -292,7 +292,10 @@ size. -->
|
|||||||
whether or not the dynamic toolbar is enabled. -->
|
whether or not the dynamic toolbar is enabled. -->
|
||||||
<!ENTITY pref_scroll_title_bar "Scroll title bar">
|
<!ENTITY pref_scroll_title_bar "Scroll title bar">
|
||||||
|
|
||||||
<!ENTITY history_removed "Page removed">
|
<!-- Localization note (page_removed): This string appears in a toast message when
|
||||||
|
any page is removed frome about:home. This includes pages that are in history,
|
||||||
|
bookmarks, or reading list. -->
|
||||||
|
<!ENTITY page_removed "Page removed">
|
||||||
|
|
||||||
<!ENTITY bookmark_edit_title "Edit Bookmark">
|
<!ENTITY bookmark_edit_title "Edit Bookmark">
|
||||||
<!ENTITY bookmark_edit_name "Name">
|
<!ENTITY bookmark_edit_name "Name">
|
||||||
@ -307,7 +310,6 @@ size. -->
|
|||||||
<!ENTITY site_settings_no_settings "There are no settings to clear.">
|
<!ENTITY site_settings_no_settings "There are no settings to clear.">
|
||||||
|
|
||||||
<!ENTITY reading_list_added "Page added to your Reading List">
|
<!ENTITY reading_list_added "Page added to your Reading List">
|
||||||
<!ENTITY reading_list_removed "Page removed from your Reading List">
|
|
||||||
<!ENTITY reading_list_failed "Failed to add page to your Reading List">
|
<!ENTITY reading_list_failed "Failed to add page to your Reading List">
|
||||||
<!ENTITY reading_list_duplicate "Page already in your Reading List">
|
<!ENTITY reading_list_duplicate "Page already in your Reading List">
|
||||||
|
|
||||||
|
@ -250,7 +250,6 @@
|
|||||||
<string name="site_settings_no_settings">&site_settings_no_settings;</string>
|
<string name="site_settings_no_settings">&site_settings_no_settings;</string>
|
||||||
|
|
||||||
<string name="reading_list_added">&reading_list_added;</string>
|
<string name="reading_list_added">&reading_list_added;</string>
|
||||||
<string name="reading_list_removed">&reading_list_removed;</string>
|
|
||||||
<string name="reading_list_failed">&reading_list_failed;</string>
|
<string name="reading_list_failed">&reading_list_failed;</string>
|
||||||
<string name="reading_list_duplicate">&reading_list_duplicate;</string>
|
<string name="reading_list_duplicate">&reading_list_duplicate;</string>
|
||||||
|
|
||||||
@ -279,7 +278,7 @@
|
|||||||
|
|
||||||
<string name="pref_scroll_title_bar">&pref_scroll_title_bar;</string>
|
<string name="pref_scroll_title_bar">&pref_scroll_title_bar;</string>
|
||||||
|
|
||||||
<string name="history_removed">&history_removed;</string>
|
<string name="page_removed">&page_removed;</string>
|
||||||
|
|
||||||
<string name="bookmark_edit_title">&bookmark_edit_title;</string>
|
<string name="bookmark_edit_title">&bookmark_edit_title;</string>
|
||||||
<string name="bookmark_edit_name">&bookmark_edit_name;</string>
|
<string name="bookmark_edit_name">&bookmark_edit_name;</string>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
admin.google.com: did not receive HSTS header (error ignored - included regardless)
|
admin.google.com: did not receive HSTS header (error ignored - included regardless)
|
||||||
|
airbnb.com: did not receive HSTS header
|
||||||
alpha.irccloud.com: could not connect to host
|
alpha.irccloud.com: could not connect to host
|
||||||
anycoin.me: did not receive HSTS header
|
anycoin.me: did not receive HSTS header
|
||||||
api.mega.co.nz: could not connect to host
|
api.mega.co.nz: could not connect to host
|
||||||
@ -21,6 +22,7 @@ checkout.google.com: did not receive HSTS header (error ignored - included regar
|
|||||||
chrome-devtools-frontend.appspot.com: did not receive HSTS header (error ignored - included regardless)
|
chrome-devtools-frontend.appspot.com: did not receive HSTS header (error ignored - included regardless)
|
||||||
chrome.google.com: did not receive HSTS header (error ignored - included regardless)
|
chrome.google.com: did not receive HSTS header (error ignored - included regardless)
|
||||||
cloud.google.com: did not receive HSTS header (error ignored - included regardless)
|
cloud.google.com: did not receive HSTS header (error ignored - included regardless)
|
||||||
|
cloudns.com.au: could not connect to host
|
||||||
code.google.com: did not receive HSTS header (error ignored - included regardless)
|
code.google.com: did not receive HSTS header (error ignored - included regardless)
|
||||||
codereview.chromium.org: did not receive HSTS header (error ignored - included regardless)
|
codereview.chromium.org: did not receive HSTS header (error ignored - included regardless)
|
||||||
crate.io: did not receive HSTS header
|
crate.io: did not receive HSTS header
|
||||||
@ -109,6 +111,7 @@ talk.google.com: did not receive HSTS header (error ignored - included regardles
|
|||||||
talkgadget.google.com: did not receive HSTS header (error ignored - included regardless)
|
talkgadget.google.com: did not receive HSTS header (error ignored - included regardless)
|
||||||
translate.googleapis.com: did not receive HSTS header (error ignored - included regardless)
|
translate.googleapis.com: did not receive HSTS header (error ignored - included regardless)
|
||||||
uprotect.it: could not connect to host
|
uprotect.it: could not connect to host
|
||||||
|
usaa.com: did not receive HSTS header
|
||||||
wallet.google.com: did not receive HSTS header (error ignored - included regardless)
|
wallet.google.com: did not receive HSTS header (error ignored - included regardless)
|
||||||
webmail.mayfirst.org: did not receive HSTS header
|
webmail.mayfirst.org: did not receive HSTS header
|
||||||
wepay.com: max-age too low: 2592000
|
wepay.com: max-age too low: 2592000
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
const PRTime gPreloadListExpirationTime = INT64_C(1410603446398000);
|
const PRTime gPreloadListExpirationTime = INT64_C(1411207598857000);
|
||||||
|
|
||||||
class nsSTSPreload
|
class nsSTSPreload
|
||||||
{
|
{
|
||||||
@ -140,7 +140,7 @@ static const nsSTSPreload kSTSPreloadList[] = {
|
|||||||
{ "mail.de", true },
|
{ "mail.de", true },
|
||||||
{ "mail.google.com", true },
|
{ "mail.google.com", true },
|
||||||
{ "mailbox.org", false },
|
{ "mailbox.org", false },
|
||||||
{ "makeyourlaws.org", false },
|
{ "makeyourlaws.org", true },
|
||||||
{ "manage.zenpayroll.com", false },
|
{ "manage.zenpayroll.com", false },
|
||||||
{ "manager.linode.com", false },
|
{ "manager.linode.com", false },
|
||||||
{ "market.android.com", true },
|
{ "market.android.com", true },
|
||||||
@ -153,6 +153,7 @@ static const nsSTSPreload kSTSPreloadList[] = {
|
|||||||
{ "members.mayfirst.org", false },
|
{ "members.mayfirst.org", false },
|
||||||
{ "members.nearlyfreespeech.net", false },
|
{ "members.nearlyfreespeech.net", false },
|
||||||
{ "mnsure.org", true },
|
{ "mnsure.org", true },
|
||||||
|
{ "mobile.usaa.com", false },
|
||||||
{ "mudcrab.us", true },
|
{ "mudcrab.us", true },
|
||||||
{ "my.onlime.ch", false },
|
{ "my.onlime.ch", false },
|
||||||
{ "my.xero.com", false },
|
{ "my.xero.com", false },
|
||||||
@ -210,6 +211,7 @@ static const nsSTSPreload kSTSPreloadList[] = {
|
|||||||
{ "stocktrade.de", false },
|
{ "stocktrade.de", false },
|
||||||
{ "stripe.com", true },
|
{ "stripe.com", true },
|
||||||
{ "strongest-privacy.com", true },
|
{ "strongest-privacy.com", true },
|
||||||
|
{ "subrosa.io", true },
|
||||||
{ "support.mayfirst.org", false },
|
{ "support.mayfirst.org", false },
|
||||||
{ "surkatty.org", true },
|
{ "surkatty.org", true },
|
||||||
{ "talk.google.com", true },
|
{ "talk.google.com", true },
|
||||||
@ -228,6 +230,7 @@ static const nsSTSPreload kSTSPreloadList[] = {
|
|||||||
{ "wiz.biz", true },
|
{ "wiz.biz", true },
|
||||||
{ "writeapp.me", false },
|
{ "writeapp.me", false },
|
||||||
{ "www.aclu.org", false },
|
{ "www.aclu.org", false },
|
||||||
|
{ "www.airbnb.com", true },
|
||||||
{ "www.apollo-auto.com", true },
|
{ "www.apollo-auto.com", true },
|
||||||
{ "www.banking.co.at", false },
|
{ "www.banking.co.at", false },
|
||||||
{ "www.braintreepayments.com", false },
|
{ "www.braintreepayments.com", false },
|
||||||
@ -246,7 +249,7 @@ static const nsSTSPreload kSTSPreloadList[] = {
|
|||||||
{ "www.irccloud.com", false },
|
{ "www.irccloud.com", false },
|
||||||
{ "www.linode.com", false },
|
{ "www.linode.com", false },
|
||||||
{ "www.lookout.com", false },
|
{ "www.lookout.com", false },
|
||||||
{ "www.makeyourlaws.org", false },
|
{ "www.makeyourlaws.org", true },
|
||||||
{ "www.mydigipass.com", false },
|
{ "www.mydigipass.com", false },
|
||||||
{ "www.mylookout.com", false },
|
{ "www.mylookout.com", false },
|
||||||
{ "www.noisebridge.net", false },
|
{ "www.noisebridge.net", false },
|
||||||
@ -257,6 +260,7 @@ static const nsSTSPreload kSTSPreloadList[] = {
|
|||||||
{ "www.therapynotes.com", false },
|
{ "www.therapynotes.com", false },
|
||||||
{ "www.torproject.org", false },
|
{ "www.torproject.org", false },
|
||||||
{ "www.twitter.com", false },
|
{ "www.twitter.com", false },
|
||||||
|
{ "www.usaa.com", false },
|
||||||
{ "www.zenpayroll.com", false },
|
{ "www.zenpayroll.com", false },
|
||||||
{ "zenpayroll.com", false },
|
{ "zenpayroll.com", false },
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="refreshdiv">
|
<div id="refreshdiv">
|
||||||
<button id="refreshButton">&aboutNetworking.refresh;</button>
|
<button id="refreshButton">&aboutNetworking.refresh;</button>
|
||||||
<input id="autorefcheck" type="checkbox" name="Autorefresh" />&aboutNetworking.autoRefresh;
|
<label><input id="autorefcheck" type="checkbox" name="Autorefresh" />&aboutNetworking.autoRefresh;</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="http" class="tab active">
|
<div id="http" class="tab active">
|
||||||
|
@ -209,17 +209,17 @@ add_task(function* testOpenPreferences() {
|
|||||||
let deferred = Promise.defer();
|
let deferred = Promise.defer();
|
||||||
Services.obs.addObserver(function observer(prefWin, topic, data) {
|
Services.obs.addObserver(function observer(prefWin, topic, data) {
|
||||||
Services.obs.removeObserver(observer, "advanced-pane-loaded");
|
Services.obs.removeObserver(observer, "advanced-pane-loaded");
|
||||||
|
|
||||||
info("Advanced preference pane opened.");
|
info("Advanced preference pane opened.");
|
||||||
|
executeSoon(function() {
|
||||||
|
// We want this test to fail if the preferences pane changes.
|
||||||
|
let el = prefWin.document.getElementById("dataChoicesPanel");
|
||||||
|
is_element_visible(el);
|
||||||
|
|
||||||
// We want this test to fail if the preferences pane changes.
|
prefWin.close();
|
||||||
let el = prefWin.document.getElementById("dataChoicesPanel");
|
info("Closed preferences pane.");
|
||||||
is_element_visible(el);
|
|
||||||
|
|
||||||
prefWin.close();
|
deferred.resolve();
|
||||||
info("Closed preferences pane.");
|
});
|
||||||
|
|
||||||
deferred.resolve();
|
|
||||||
}, "advanced-pane-loaded", false);
|
}, "advanced-pane-loaded", false);
|
||||||
|
|
||||||
info("Loading preferences pane.");
|
info("Loading preferences pane.");
|
||||||
|
@ -432,12 +432,12 @@ function is_hidden(aElement) {
|
|||||||
|
|
||||||
function is_element_visible(aElement, aMsg) {
|
function is_element_visible(aElement, aMsg) {
|
||||||
isnot(aElement, null, "Element should not be null, when checking visibility");
|
isnot(aElement, null, "Element should not be null, when checking visibility");
|
||||||
ok(!is_hidden(aElement), aMsg);
|
ok(!is_hidden(aElement), aMsg || (aElement + " should be visible"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function is_element_hidden(aElement, aMsg) {
|
function is_element_hidden(aElement, aMsg) {
|
||||||
isnot(aElement, null, "Element should not be null, when checking visibility");
|
isnot(aElement, null, "Element should not be null, when checking visibility");
|
||||||
ok(is_hidden(aElement), aMsg);
|
ok(is_hidden(aElement), aMsg || (aElement + " should be hidden"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user