From 6d58cc3ee17606ff8102dbb9380589efc726aa08 Mon Sep 17 00:00:00 2001 From: Shane Caraveo Date: Tue, 29 Dec 2015 15:40:52 -0800 Subject: [PATCH] Bug 1215694 move pocket to a system addon, r=Gijs, r=glandium part 1: reorganize file locations, r=Gijs part 2: remove built-in pocket code, r=Gijs part 3: l10n support, r=glandium part 4: move code/functionality from part 2 into the addon, r=Gijs part 5: remove dead code, r=Gijs part 6: create a simple api for addons to add to reader mode, r=Gijs part 7: various test fixes related to cui behaviour and pocket, r=me --- browser/app/profile/firefox.js | 7 - browser/base/content/browser-context.inc | 8 - browser/base/content/browser-menubar.inc | 7 - browser/base/content/browser-places.js | 7 - browser/base/content/browser-social.js | 3 +- browser/base/content/browser.js | 31 -- browser/base/content/browser.xul | 10 +- browser/base/content/nsContextMenu.js | 31 -- .../content/test/social/browser_addons.js | 4 +- .../base/content/test/social/browser_share.js | 1 - .../test/social/browser_social_contextmenu.js | 2 +- .../test/social/browser_social_marks.js | 11 +- .../social/browser_social_marks_context.js | 8 +- .../test/social/browser_social_status.js | 5 +- .../content/test/social/social_activate.html | 2 +- .../test/social/social_activate_basic.html | 2 +- .../base/content/test/social/social_worker.js | 2 +- browser/components/about/AboutRedirector.cpp | 12 - browser/components/build/nsModule.cpp | 2 - .../customizableui/CustomizableUI.jsm | 18 +- .../customizableui/CustomizableWidgets.jsm | 68 --- .../customizableui/content/panelUI.inc.xul | 10 - browser/components/moz.build | 1 - browser/components/pocket/jar.mn | 48 -- .../test/browser_UITour_availableTargets.js | 20 +- .../uitour/test/browser_UITour_pocket.js | 2 +- browser/extensions/moz.build | 1 + browser/extensions/pocket/bootstrap.js | 502 ++++++++++++++++++ .../pocket/content}/Pocket.jsm | 4 +- .../pocket/content}/main.js | 294 +--------- .../pocket/content}/panels/css/firasans.css | 0 .../pocket/content}/panels/css/normalize.css | 0 .../pocket/content}/panels/css/saved.css | 0 .../pocket/content}/panels/css/signup.css | 0 .../panels/fonts/FiraSans-Regular.woff | Bin .../pocket/content/panels/img}/pocket.svg | 0 .../content}/panels/img/pocketerror@1x.png | Bin .../content}/panels/img/pocketerror@2x.png | Bin .../content}/panels/img/pocketlogo@1x.png | Bin .../content}/panels/img/pocketlogo@2x.png | Bin .../content}/panels/img/pocketlogosolo@1x.png | Bin .../content}/panels/img/pocketlogosolo@2x.png | Bin .../content}/panels/img/pocketmenuitem16.png | Bin .../panels/img/pocketmenuitem16@2x.png | Bin .../panels/img/pocketsignup_button@1x.png | Bin .../panels/img/pocketsignup_button@2x.png | Bin .../panels/img/pocketsignup_devices@1x.png | Bin .../panels/img/pocketsignup_devices@2x.png | Bin .../panels/img/pocketsignup_hero@1x.png | Bin .../panels/img/pocketsignup_hero@2x.png | Bin .../panels/img/signup_firefoxlogo@1x.png | Bin .../panels/img/signup_firefoxlogo@2x.png | Bin .../content}/panels/img/signup_help@1x.png | Bin .../content}/panels/img/signup_help@2x.png | Bin .../content}/panels/img/signup_or@1x.png | Bin .../content}/panels/img/signup_or@2x.png | Bin .../content}/panels/img/tag_close@1x.png | Bin .../content}/panels/img/tag_close@2x.png | Bin .../panels/img/tag_closeactive@1x.png | Bin .../panels/img/tag_closeactive@2x.png | Bin .../pocket/content}/panels/js/messages.js | 0 .../pocket/content}/panels/js/saved.js | 0 .../pocket/content}/panels/js/signup.js | 0 .../pocket/content}/panels/js/tmpl.js | 0 .../panels/js/vendor/handlebars.runtime.js | 0 .../panels/js/vendor/jquery-2.1.1.min.js | 0 .../panels/js/vendor/jquery.tokeninput.min.js | 0 .../pocket/content}/panels/license.txt | 0 .../pocket/content}/panels/saved.html | 2 +- .../pocket/content}/panels/signup.html | 2 +- .../tmpl/saved_premiumextras.handlebars | 0 .../panels/tmpl/saved_premiumshell.handlebars | 0 .../panels/tmpl/saved_shell.handlebars | 0 .../panels/tmpl/signup_shell.handlebars | 0 .../tmpl/signupstoryboard_shell.handlebars | 0 .../pocket/content/pktApi.jsm} | 15 +- browser/extensions/pocket/install.rdf.in | 31 ++ browser/extensions/pocket/jar.mn | 12 + .../pocket/locales/en-US/pocket.properties} | 10 + browser/extensions/pocket/locales/jar.mn | 8 + .../pocket/locales}/moz.build | 4 +- browser/extensions/pocket/moz.build | 17 + .../extensions/pocket/skin/linux/pocket.css | 0 browser/extensions/pocket/skin/osx/pocket.css | 38 ++ .../extensions/pocket/skin/shared/pocket.css | 68 +++ .../extensions/pocket/skin/windows/pocket.css | 9 + browser/locales/Makefile.in | 1 + .../locales/en-US/chrome/browser/browser.dtd | 7 - .../customizableWidgets.properties | 5 - browser/locales/filter.py | 3 +- browser/locales/jar.mn | 1 - browser/locales/l10n.ini | 1 + browser/modules/ReaderParent.jsm | 28 - browser/themes/linux/browser.css | 6 - browser/themes/osx/browser.css | 26 - browser/themes/shared/browser.inc | 2 +- .../customizableui/panelUIOverlay.inc.css | 14 +- browser/themes/shared/menupanel.inc.css | 18 - browser/themes/shared/toolbarbuttons.inc.css | 24 - browser/themes/windows/browser.css | 6 - python/mozbuild/mozbuild/jar.py | 2 +- testing/profiles/prefs_general.js | 2 + toolkit/components/reader/AboutReader.jsm | 63 +-- .../reader/content/aboutReader.html | 1 - toolkit/themes/shared/aboutReaderControls.css | 8 - toolkit/themes/shared/jar.inc.mn | 1 - 106 files changed, 799 insertions(+), 759 deletions(-) delete mode 100644 browser/components/pocket/jar.mn create mode 100644 browser/extensions/pocket/bootstrap.js rename browser/{components/pocket => extensions/pocket/content}/Pocket.jsm (95%) rename browser/{components/pocket => extensions/pocket/content}/main.js (70%) rename browser/{components/pocket => extensions/pocket/content}/panels/css/firasans.css (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/css/normalize.css (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/css/saved.css (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/css/signup.css (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/fonts/FiraSans-Regular.woff (100%) rename {toolkit/themes/shared/reader => browser/extensions/pocket/content/panels/img}/pocket.svg (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/pocketerror@1x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/pocketerror@2x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/pocketlogo@1x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/pocketlogo@2x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/pocketlogosolo@1x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/pocketlogosolo@2x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/pocketmenuitem16.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/pocketmenuitem16@2x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/pocketsignup_button@1x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/pocketsignup_button@2x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/pocketsignup_devices@1x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/pocketsignup_devices@2x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/pocketsignup_hero@1x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/pocketsignup_hero@2x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/signup_firefoxlogo@1x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/signup_firefoxlogo@2x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/signup_help@1x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/signup_help@2x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/signup_or@1x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/signup_or@2x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/tag_close@1x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/tag_close@2x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/tag_closeactive@1x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/img/tag_closeactive@2x.png (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/js/messages.js (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/js/saved.js (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/js/signup.js (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/js/tmpl.js (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/js/vendor/handlebars.runtime.js (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/js/vendor/jquery-2.1.1.min.js (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/js/vendor/jquery.tokeninput.min.js (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/license.txt (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/saved.html (93%) rename browser/{components/pocket => extensions/pocket/content}/panels/signup.html (92%) rename browser/{components/pocket => extensions/pocket/content}/panels/tmpl/saved_premiumextras.handlebars (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/tmpl/saved_premiumshell.handlebars (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/tmpl/saved_shell.handlebars (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/tmpl/signup_shell.handlebars (100%) rename browser/{components/pocket => extensions/pocket/content}/panels/tmpl/signupstoryboard_shell.handlebars (100%) rename browser/{components/pocket/pktApi.js => extensions/pocket/content/pktApi.jsm} (97%) create mode 100644 browser/extensions/pocket/install.rdf.in create mode 100644 browser/extensions/pocket/jar.mn rename browser/{locales/en-US/chrome/browser/browser-pocket.properties => extensions/pocket/locales/en-US/pocket.properties} (74%) create mode 100644 browser/extensions/pocket/locales/jar.mn rename browser/{components/pocket => extensions/pocket/locales}/moz.build (67%) create mode 100644 browser/extensions/pocket/moz.build create mode 100644 browser/extensions/pocket/skin/linux/pocket.css create mode 100644 browser/extensions/pocket/skin/osx/pocket.css create mode 100644 browser/extensions/pocket/skin/shared/pocket.css create mode 100644 browser/extensions/pocket/skin/windows/pocket.css diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index f05671b7507..f607f700b26 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1611,13 +1611,6 @@ pref("reader.parse-node-limit", 0); // and because (normally) these errors are not persisted anywhere. pref("reader.errors.includeURLs", true); -pref("browser.pocket.enabled", true); -pref("browser.pocket.api", "api.getpocket.com"); -pref("browser.pocket.site", "getpocket.com"); -pref("browser.pocket.oAuthConsumerKey", "40249-e88c401e1b1f2242d9e441c4"); -pref("browser.pocket.useLocaleList", true); -pref("browser.pocket.enabledLocales", "cs de en-GB en-US en-ZA es-ES es-MX fr hu it ja ja-JP-mac ko nl pl pt-BR pt-PT ru zh-CN zh-TW"); - pref("view_source.tab", true); pref("dom.serviceWorkers.enabled", true); diff --git a/browser/base/content/browser-context.inc b/browser/base/content/browser-context.inc index e3e0df56c23..de54d820ae9 100644 --- a/browser/base/content/browser-context.inc +++ b/browser/base/content/browser-context.inc @@ -79,10 +79,6 @@ label="&saveLinkCmd.label;" accesskey="&saveLinkCmd.accesskey;" oncommand="gContextMenu.saveLink();"/> - @@ -270,10 +266,6 @@ label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey2;" oncommand="gContextMenu.savePageAs();"/> - diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc index def28fa73a3..a649b515501 100644 --- a/browser/base/content/browser-menubar.inc +++ b/browser/base/content/browser-menubar.inc @@ -413,7 +413,6 @@ oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);" onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);" onpopupshowing="BookmarkingUI.onMainMenuPopupShowing(event); - BookmarkingUI.updatePocketItemVisibility('menu_'); if (!this.parentNode._placesView) new PlacesMenu(event, 'place:folder=BOOKMARKS_MENU');" tooltip="bhTooltip" popupsinherittooltip="true"> @@ -422,12 +421,6 @@ command="Browser:ShowAllBookmarks" key="manBookmarkKb"/> - -