Back out 364bc6209cc5 (bug 1134501) for jetpack bustage

This commit is contained in:
Phil Ringnalda 2015-04-15 22:08:20 -07:00
Родитель 73ef930712
Коммит 1c5973f626
12 изменённых файлов: 14 добавлений и 108 удалений

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

@ -251,8 +251,6 @@ pref("browser.uitour.loglevel", "Error");
pref("browser.uitour.requireSecure", true); pref("browser.uitour.requireSecure", true);
pref("browser.uitour.themeOrigin", "https://addons.mozilla.org/%LOCALE%/firefox/themes/"); pref("browser.uitour.themeOrigin", "https://addons.mozilla.org/%LOCALE%/firefox/themes/");
pref("browser.uitour.url", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/tour/"); pref("browser.uitour.url", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/tour/");
// This is used as a regexp match against the page's URL.
pref("browser.uitour.readerViewTrigger", "^https:\/\/www\.mozilla\.org\/[^\/]+\/firefox\/reading\/start");
pref("browser.customizemode.tip0.shown", false); pref("browser.customizemode.tip0.shown", false);
pref("browser.customizemode.tip0.learnMoreUrl", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/customize"); pref("browser.customizemode.tip0.learnMoreUrl", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/customize");

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

@ -4203,7 +4203,6 @@ var XULBrowserWindow = {
BookmarkingUI.onLocationChange(); BookmarkingUI.onLocationChange();
SocialUI.updateState(location); SocialUI.updateState(location);
UITour.onLocationChange(location);
} }
// Utility functions for disabling find // Utility functions for disabling find

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

@ -285,13 +285,9 @@ if (typeof Mozilla == 'undefined') {
_sendEvent('forceShowReaderIcon'); _sendEvent('forceShowReaderIcon');
}; };
Mozilla.UITour.toggleReaderMode = function(feature) {
_sendEvent('toggleReaderMode');
};
})(); })();
// Make this library Require-able. // Make this library Require-able.
if (typeof module !== 'undefined' && module.exports) { if (typeof module !== 'undefined' && module.exports) {
module.exports = Mozilla.UITour; module.exports = Mozilla.UITour;
} }

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

@ -27,15 +27,12 @@ XPCOMUtils.defineLazyModuleGetter(this, "BrowserUITelemetry",
"resource:///modules/BrowserUITelemetry.jsm"); "resource:///modules/BrowserUITelemetry.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Metrics", XPCOMUtils.defineLazyModuleGetter(this, "Metrics",
"resource://gre/modules/Metrics.jsm"); "resource://gre/modules/Metrics.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ReaderMode",
"resource://gre/modules/ReaderMode.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ReaderParent", XPCOMUtils.defineLazyModuleGetter(this, "ReaderParent",
"resource:///modules/ReaderParent.jsm"); "resource:///modules/ReaderParent.jsm");
// See LOG_LEVELS in Console.jsm. Common examples: "All", "Info", "Warn", & "Error". // See LOG_LEVELS in Console.jsm. Common examples: "All", "Info", "Warn", & "Error".
const PREF_LOG_LEVEL = "browser.uitour.loglevel"; const PREF_LOG_LEVEL = "browser.uitour.loglevel";
const PREF_SEENPAGEIDS = "browser.uitour.seenPageIDs"; const PREF_SEENPAGEIDS = "browser.uitour.seenPageIDs";
const PREF_READERVIEW_TRIGGER = "browser.uitour.readerViewTrigger";
const BACKGROUND_PAGE_ACTIONS_ALLOWED = new Set([ const BACKGROUND_PAGE_ACTIONS_ALLOWED = new Set([
"endUrlbarCapture", "endUrlbarCapture",
@ -193,7 +190,6 @@ this.UITour = {
}], }],
["privateWindow", {query: "#privatebrowsing-button"}], ["privateWindow", {query: "#privatebrowsing-button"}],
["quit", {query: "#PanelUI-quit"}], ["quit", {query: "#PanelUI-quit"}],
["readerMode-urlBar", {query: "#reader-mode-button"}],
["search", { ["search", {
infoPanelOffsetX: 18, infoPanelOffsetX: 18,
infoPanelPosition: "after_start", infoPanelPosition: "after_start",
@ -348,22 +344,6 @@ this.UITour = {
JSON.stringify([...this.seenPageIDs])); JSON.stringify([...this.seenPageIDs]));
}, },
get _readerViewTriggerRegEx() {
delete this.readerViewTriggerRegEx;
let readerViewUITourTrigger = Services.prefs.getCharPref(PREF_READERVIEW_TRIGGER);
return this._readerViewTriggerRegEx = new RegExp(readerViewUITourTrigger, "i");
},
onLocationChange: function(aLocation) {
// The ReadingList/ReaderView tour page is expected to run in Reader View,
// which disables JavaScript on the page. To get around that, we
// automatically start a pre-defined tour on page load.
let originalUrl = ReaderMode.getOriginalUrl(aLocation);
if (this._readerViewTriggerRegEx.test(originalUrl)) {
this.startSubTour("readinglist");
}
},
onPageEvent: function(aMessage, aEvent) { onPageEvent: function(aMessage, aEvent) {
let browser = aMessage.target; let browser = aMessage.target;
let window = browser.ownerDocument.defaultView; let window = browser.ownerDocument.defaultView;
@ -705,13 +685,6 @@ this.UITour = {
ReaderParent.forceShowReaderIcon(browser); ReaderParent.forceShowReaderIcon(browser);
break; break;
} }
case "toggleReaderMode": {
let targetPromise = this.getTarget(window, "readerMode-urlBar");
targetPromise.then(target => {
ReaderParent.toggleReaderMode({target: target.node});
});
}
} }
if (!this.tourBrowsersByWindow.has(window)) { if (!this.tourBrowsersByWindow.has(window)) {
@ -1747,20 +1720,6 @@ this.UITour = {
}); });
}, },
startSubTour: function (aFeature) {
if (aFeature != "string") {
log.error("startSubTour: No feature option specified");
return;
}
if (aFeature == "readinglist") {
ReaderParent.showReaderModeInfoPanel(browser);
} else {
log.error("startSubTour: Unknown feature option specified");
return;
}
},
addNavBarWidget: function (aTarget, aMessageManager, aCallbackID) { addNavBarWidget: function (aTarget, aMessageManager, aCallbackID) {
if (aTarget.node) { if (aTarget.node) {
log.error("addNavBarWidget: can't add a widget already present:", aTarget); log.error("addNavBarWidget: can't add a widget already present:", aTarget);

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

@ -9,32 +9,30 @@ support-files =
[browser_UITour.js] [browser_UITour.js]
skip-if = os == "linux" || e10s # Intermittent failures, bug 951965 skip-if = os == "linux" || e10s # Intermittent failures, bug 951965
[browser_UITour2.js] [browser_UITour2.js]
skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly
# [browser_UITour3.js] Bug 1113038 # [browser_UITour3.js] Bug 1113038
# skip-if = os == "linux" || e10s # Linux: Bug 986760, Bug 989101; e10s: Bug 1073247 - UITour.jsm not e10s friendly # skip-if = os == "linux" || e10s # Linux: Bug 986760, Bug 989101; e10s: Bug 941428 - UITour.jsm not e10s friendly
[browser_UITour_availableTargets.js] [browser_UITour_availableTargets.js]
skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly
[browser_UITour_detach_tab.js] [browser_UITour_detach_tab.js]
skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly
[browser_UITour_annotation_size_attributes.js] [browser_UITour_annotation_size_attributes.js]
skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly. skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly.
[browser_UITour_forceReaderMode.js] [browser_UITour_forceReaderMode.js]
skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly. skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly.
[browser_UITour_toggleReaderMode.js]
skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly
[browser_UITour_heartbeat.js] [browser_UITour_heartbeat.js]
skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly. skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly.
[browser_UITour_loop.js] [browser_UITour_loop.js]
skip-if = os == "linux" || e10s # Bug 1073247 - UITour.jsm not e10s friendly. skip-if = os == "linux" || e10s # Bug 941428 - UITour.jsm not e10s friendly.
[browser_UITour_modalDialog.js] [browser_UITour_modalDialog.js]
skip-if = os != "mac" || e10s # modal dialog disabling only working on OS X.Bug 1073247 - UITour.jsm not e10s friendly skip-if = os != "mac" || e10s # modal dialog disabling only working on OS X.Bug 941428 - UITour.jsm not e10s friendly
[browser_UITour_observe.js] [browser_UITour_observe.js]
skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly. skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly.
[browser_UITour_panel_close_annotation.js] [browser_UITour_panel_close_annotation.js]
skip-if = true # Disabled due to frequent failures, bugs 1026310 and 1032137 skip-if = true # Disabled due to frequent failures, bugs 1026310 and 1032137
[browser_UITour_registerPageID.js] [browser_UITour_registerPageID.js]
skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly
[browser_UITour_sync.js] [browser_UITour_sync.js]
skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly
[browser_UITour_resetProfile.js] [browser_UITour_resetProfile.js]
skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly

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

@ -39,7 +39,6 @@ let tests = [
"devtools", "devtools",
"privateWindow", "privateWindow",
"quit", "quit",
"readerMode-urlBar",
"search", "search",
"searchIcon", "searchIcon",
"urlbar", "urlbar",
@ -70,7 +69,6 @@ let tests = [
"home", "home",
"privateWindow", "privateWindow",
"quit", "quit",
"readerMode-urlBar",
"search", "search",
"searchIcon", "searchIcon",
"urlbar", "urlbar",
@ -106,7 +104,6 @@ let tests = [
"devtools", "devtools",
"privateWindow", "privateWindow",
"quit", "quit",
"readerMode-urlBar",
"urlbar", "urlbar",
...(hasWebIDE ? ["webide"] : []) ...(hasWebIDE ? ["webide"] : [])
]); ]);

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

@ -1,20 +0,0 @@
"use strict";
let gTestTab;
let gContentAPI;
let gContentWindow;
Components.utils.import("resource:///modules/UITour.jsm");
function test() {
UITourTest();
}
let tests = [
taskify(function*() {
ok(!gBrowser.selectedBrowser.currentURI.spec.startsWith("about:reader"), "Should not be in reader mode at start of test.");
gContentAPI.toggleReaderMode();
yield waitForConditionPromise(() => gBrowser.selectedBrowser.currentURI.spec.startsWith("about:reader"));
ok(gBrowser.selectedBrowser.currentURI.spec.startsWith("about:reader"), "Should be in reader mode now.");
})
];

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

@ -16,7 +16,6 @@ Cu.import("resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils","resource://gre/modules/PlacesUtils.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils","resource://gre/modules/PlacesUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ReaderMode", "resource://gre/modules/ReaderMode.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "ReaderMode", "resource://gre/modules/ReaderMode.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ReadingList", "resource:///modules/readinglist/ReadingList.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "ReadingList", "resource:///modules/readinglist/ReadingList.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "UITour", "resource:///modules/UITour.jsm");
const gStringBundle = Services.strings.createBundle("chrome://global/locale/aboutReader.properties"); const gStringBundle = Services.strings.createBundle("chrome://global/locale/aboutReader.properties");
@ -189,23 +188,6 @@ let ReaderParent = {
} }
}, },
/**
* Shows an info panel from the UITour for Reader Mode.
*
* @param browser The <browser> that the tour should be started for.
*/
showReaderModeInfoPanel(browser) {
let win = browser.ownerDocument.defaultView;
let targetPromise = UITour.getTarget(win, "readerMode-urlBar");
targetPromise.then(target => {
let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
UITour.showInfo(win, browser.messageManager, target,
browserBundle.GetStringFromName("readerView.promo.firstDetectedArticle.title"),
browserBundle.GetStringFromName("readerView.promo.firstDetectedArticle.body"),
"chrome://browser/skin/reader-tour.png");
});
},
/** /**
* Gets an article for a given URL. This method will download and parse a document. * Gets an article for a given URL. This method will download and parse a document.
* *

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

@ -93,7 +93,6 @@ browser.jar:
skin/classic/browser/session-restore.svg (../shared/incontent-icons/session-restore.svg) skin/classic/browser/session-restore.svg (../shared/incontent-icons/session-restore.svg)
skin/classic/browser/tab-crashed.svg (../shared/incontent-icons/tab-crashed.svg) skin/classic/browser/tab-crashed.svg (../shared/incontent-icons/tab-crashed.svg)
skin/classic/browser/welcome-back.svg (../shared/incontent-icons/welcome-back.svg) skin/classic/browser/welcome-back.svg (../shared/incontent-icons/welcome-back.svg)
skin/classic/browser/reader-tour.png (../shared/reader/reader-tour.png)
skin/classic/browser/readerMode.svg (../shared/reader/readerMode.svg) skin/classic/browser/readerMode.svg (../shared/reader/readerMode.svg)
skin/classic/browser/readinglist/icons.svg (../shared/readinglist/icons.svg) skin/classic/browser/readinglist/icons.svg (../shared/readinglist/icons.svg)
skin/classic/browser/readinglist/readinglist-icon.svg (../shared/readinglist/readinglist-icon.svg) skin/classic/browser/readinglist/readinglist-icon.svg (../shared/readinglist/readinglist-icon.svg)

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

@ -145,7 +145,6 @@ browser.jar:
skin/classic/browser/session-restore.svg (../shared/incontent-icons/session-restore.svg) skin/classic/browser/session-restore.svg (../shared/incontent-icons/session-restore.svg)
skin/classic/browser/tab-crashed.svg (../shared/incontent-icons/tab-crashed.svg) skin/classic/browser/tab-crashed.svg (../shared/incontent-icons/tab-crashed.svg)
skin/classic/browser/welcome-back.svg (../shared/incontent-icons/welcome-back.svg) skin/classic/browser/welcome-back.svg (../shared/incontent-icons/welcome-back.svg)
skin/classic/browser/reader-tour.png (../shared/reader/reader-tour.png)
skin/classic/browser/readerMode.svg (../shared/reader/readerMode.svg) skin/classic/browser/readerMode.svg (../shared/reader/readerMode.svg)
skin/classic/browser/readinglist/icons.svg (../shared/readinglist/icons.svg) skin/classic/browser/readinglist/icons.svg (../shared/readinglist/icons.svg)
skin/classic/browser/readinglist/readinglist-icon.svg (../shared/readinglist/readinglist-icon.svg) skin/classic/browser/readinglist/readinglist-icon.svg (../shared/readinglist/readinglist-icon.svg)

Двоичные данные
browser/themes/shared/reader/reader-tour.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 12 KiB

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

@ -128,7 +128,6 @@ browser.jar:
skin/classic/browser/session-restore.svg (../shared/incontent-icons/session-restore.svg) skin/classic/browser/session-restore.svg (../shared/incontent-icons/session-restore.svg)
skin/classic/browser/tab-crashed.svg (../shared/incontent-icons/tab-crashed.svg) skin/classic/browser/tab-crashed.svg (../shared/incontent-icons/tab-crashed.svg)
skin/classic/browser/welcome-back.svg (../shared/incontent-icons/welcome-back.svg) skin/classic/browser/welcome-back.svg (../shared/incontent-icons/welcome-back.svg)
skin/classic/browser/reader-tour.png (../shared/reader/reader-tour.png)
skin/classic/browser/readerMode.svg (../shared/reader/readerMode.svg) skin/classic/browser/readerMode.svg (../shared/reader/readerMode.svg)
skin/classic/browser/readinglist/icons.svg (../shared/readinglist/icons.svg) skin/classic/browser/readinglist/icons.svg (../shared/readinglist/icons.svg)
skin/classic/browser/readinglist/readinglist-icon.svg (../shared/readinglist/readinglist-icon.svg) skin/classic/browser/readinglist/readinglist-icon.svg (../shared/readinglist/readinglist-icon.svg)