From d25ba7d760b017b038e5aa6c0a605b4a330eb68d Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 21 May 2014 11:38:25 +0200 Subject: Recommit working copy to repo with proper line endings. --- browser/base/Makefile.in | 43 + browser/base/content/aboutDialog.css | 76 + browser/base/content/aboutDialog.js | 608 ++ browser/base/content/aboutDialog.xul | 135 + browser/base/content/aboutRobots-icon.png | Bin 0 -> 9817 bytes browser/base/content/aboutRobots-widget-left.png | Bin 0 -> 2224 bytes browser/base/content/aboutRobots.xhtml | 108 + browser/base/content/aboutSocialError.xhtml | 124 + .../base/content/abouthealthreport/abouthealth.css | 15 + .../base/content/abouthealthreport/abouthealth.js | 141 + .../content/abouthealthreport/abouthealth.xhtml | 32 + browser/base/content/abouthome/aboutHome.css | 431 ++ browser/base/content/abouthome/aboutHome.js | 565 ++ browser/base/content/abouthome/aboutHome.xhtml | 72 + browser/base/content/abouthome/addons.png | Bin 0 -> 1444 bytes browser/base/content/abouthome/addons@2x.png | Bin 0 -> 3783 bytes browser/base/content/abouthome/apps.png | Bin 0 -> 961 bytes browser/base/content/abouthome/apps@2x.png | Bin 0 -> 2562 bytes browser/base/content/abouthome/bookmarks.png | Bin 0 -> 1276 bytes browser/base/content/abouthome/bookmarks@2x.png | Bin 0 -> 2946 bytes browser/base/content/abouthome/downloads.png | Bin 0 -> 898 bytes browser/base/content/abouthome/downloads@2x.png | Bin 0 -> 2018 bytes browser/base/content/abouthome/history.png | Bin 0 -> 1654 bytes browser/base/content/abouthome/history@2x.png | Bin 0 -> 4629 bytes browser/base/content/abouthome/mozilla.png | Bin 0 -> 2684 bytes browser/base/content/abouthome/mozilla@2x.png | Bin 0 -> 5647 bytes browser/base/content/abouthome/noise.png | Bin 0 -> 4025 bytes browser/base/content/abouthome/restore-large.png | Bin 0 -> 2841 bytes .../base/content/abouthome/restore-large@2x.png | Bin 0 -> 7267 bytes browser/base/content/abouthome/restore.png | Bin 0 -> 1796 bytes browser/base/content/abouthome/restore@2x.png | Bin 0 -> 4810 bytes browser/base/content/abouthome/settings.png | Bin 0 -> 1557 bytes browser/base/content/abouthome/settings@2x.png | Bin 0 -> 3836 bytes browser/base/content/abouthome/snippet1.png | Bin 0 -> 1470 bytes browser/base/content/abouthome/snippet1@2x.png | Bin 0 -> 3243 bytes browser/base/content/abouthome/snippet2.png | Bin 0 -> 3287 bytes browser/base/content/abouthome/snippet2@2x.png | Bin 0 -> 11027 bytes browser/base/content/abouthome/sync.png | Bin 0 -> 1879 bytes browser/base/content/abouthome/sync@2x.png | Bin 0 -> 4615 bytes browser/base/content/baseMenuOverlay.xul | 107 + browser/base/content/blockedSite.xhtml | 193 + browser/base/content/browser-addons.js | 417 ++ browser/base/content/browser-appmenu.inc | 400 ++ browser/base/content/browser-charsetmenu.inc | 145 + browser/base/content/browser-context.inc | 403 ++ .../content/browser-data-submission-info-bar.js | 136 + browser/base/content/browser-doctype.inc | 25 + browser/base/content/browser-feeds.js | 224 + browser/base/content/browser-fullScreen.js | 605 ++ browser/base/content/browser-fullZoom.js | 557 ++ browser/base/content/browser-gestureSupport.js | 1059 +++ browser/base/content/browser-menubar.inc | 623 ++ browser/base/content/browser-places.js | 1286 ++++ browser/base/content/browser-plugins.js | 1053 +++ browser/base/content/browser-safebrowsing.js | 53 + browser/base/content/browser-sets.inc | 420 ++ browser/base/content/browser-social.js | 1406 ++++ browser/base/content/browser-syncui.js | 467 ++ browser/base/content/browser-tabPreviews.js | 1051 +++ browser/base/content/browser-tabPreviews.xml | 75 + browser/base/content/browser-thumbnails.js | 198 + browser/base/content/browser-title.css | 181 + browser/base/content/browser-webrtcUI.js | 55 + browser/base/content/browser.css | 723 ++ browser/base/content/browser.js | 7265 ++++++++++++++++++++ browser/base/content/browser.xul | 1116 +++ browser/base/content/browserMountPoints.inc | 12 + browser/base/content/chatWindow.xul | 109 + browser/base/content/content.js | 45 + browser/base/content/downloadManagerOverlay.xul | 32 + browser/base/content/global-scripts.inc | 13 + browser/base/content/hiddenWindow.xul | 19 + browser/base/content/highlighter.css | 105 + browser/base/content/imagedocument.png | Bin 0 -> 2185 bytes browser/base/content/jsConsoleOverlay.xul | 18 + browser/base/content/macBrowserOverlay.xul | 64 + browser/base/content/newtab/cells.js | 126 + browser/base/content/newtab/drag.js | 151 + browser/base/content/newtab/dragDataHelper.js | 22 + browser/base/content/newtab/drop.js | 150 + browser/base/content/newtab/dropPreview.js | 222 + browser/base/content/newtab/dropTargetShim.js | 188 + browser/base/content/newtab/grid.js | 171 + browser/base/content/newtab/newTab.css | 209 + browser/base/content/newtab/newTab.js | 57 + browser/base/content/newtab/newTab.xul | 54 + browser/base/content/newtab/page.js | 135 + browser/base/content/newtab/sites.js | 192 + browser/base/content/newtab/transformations.js | 265 + browser/base/content/newtab/undo.js | 116 + browser/base/content/newtab/updater.js | 186 + browser/base/content/nsContextMenu.js | 1623 +++++ browser/base/content/openLocation.js | 133 + browser/base/content/openLocation.xul | 57 + browser/base/content/overrides/app-license.html | 6 + browser/base/content/padlock.css | 193 + browser/base/content/padlock.js | 193 + browser/base/content/padlock.xul | 63 + browser/base/content/padlock_classic_broken.png | Bin 0 -> 726 bytes browser/base/content/padlock_classic_ev.png | Bin 0 -> 566 bytes browser/base/content/padlock_classic_https.png | Bin 0 -> 589 bytes browser/base/content/padlock_mod_broken.png | Bin 0 -> 728 bytes browser/base/content/padlock_mod_ev.png | Bin 0 -> 290 bytes browser/base/content/padlock_mod_https.png | Bin 0 -> 338 bytes browser/base/content/padlock_mod_low.png | Bin 0 -> 342 bytes browser/base/content/pageinfo/feeds.js | 59 + browser/base/content/pageinfo/feeds.xml | 40 + browser/base/content/pageinfo/pageInfo.css | 26 + browser/base/content/pageinfo/pageInfo.js | 1276 ++++ browser/base/content/pageinfo/pageInfo.xml | 29 + browser/base/content/pageinfo/pageInfo.xul | 558 ++ browser/base/content/pageinfo/permissions.js | 357 + browser/base/content/pageinfo/security.js | 345 + browser/base/content/popup-notifications.inc | 108 + browser/base/content/report-phishing-overlay.xul | 35 + browser/base/content/safeMode.css | 8 + browser/base/content/safeMode.js | 152 + browser/base/content/safeMode.xul | 87 + browser/base/content/sanitize.js | 518 ++ browser/base/content/sanitize.xul | 183 + browser/base/content/sanitizeDialog.css | 23 + browser/base/content/sanitizeDialog.js | 910 +++ browser/base/content/socialchat.xml | 747 ++ browser/base/content/softwareUpdateOverlay.xul | 18 + .../base/content/sync/aboutSyncTabs-bindings.xml | 46 + browser/base/content/sync/aboutSyncTabs.css | 11 + browser/base/content/sync/aboutSyncTabs.js | 251 + browser/base/content/sync/aboutSyncTabs.xul | 68 + browser/base/content/sync/addDevice.js | 157 + browser/base/content/sync/addDevice.xul | 129 + browser/base/content/sync/genericChange.js | 234 + browser/base/content/sync/genericChange.xul | 123 + browser/base/content/sync/key.xhtml | 54 + browser/base/content/sync/notification.xml | 129 + browser/base/content/sync/progress.js | 71 + browser/base/content/sync/progress.xhtml | 55 + browser/base/content/sync/quota.js | 268 + browser/base/content/sync/quota.xul | 65 + browser/base/content/sync/setup.js | 1088 +++ browser/base/content/sync/setup.xul | 504 ++ browser/base/content/sync/utils.js | 218 + browser/base/content/tabbrowser.css | 65 + browser/base/content/tabbrowser.xml | 4801 +++++++++++++ browser/base/content/test/Makefile.in | 372 + browser/base/content/test/POSTSearchEngine.xml | 6 + browser/base/content/test/alltabslistener.html | 8 + browser/base/content/test/app_bug575561.html | 19 + .../base/content/test/app_subframe_bug575561.html | 12 + browser/base/content/test/audio.ogg | Bin 0 -> 47411 bytes browser/base/content/test/authenticate.sjs | 220 + browser/base/content/test/blockNoPlugins.xml | 7 + browser/base/content/test/blockPluginHard.xml | 11 + .../content/test/blockPluginVulnerableNoUpdate.xml | 11 + .../test/blockPluginVulnerableUpdatable.xml | 11 + .../base/content/test/browser_CTP_context_menu.js | 103 + browser/base/content/test/browser_CTP_data_urls.js | 256 + browser/base/content/test/browser_CTP_drag_drop.js | 104 + browser/base/content/test/browser_URLBarSetURI.js | 82 + .../base/content/test/browser_aboutHealthReport.js | 105 + browser/base/content/test/browser_aboutHome.js | 520 ++ .../base/content/test/browser_aboutSyncProgress.js | 102 + browser/base/content/test/browser_addon_bar.js | 63 + .../content/test/browser_addon_bar_aomlistener.js | 67 + .../content/test/browser_addon_bar_close_button.js | 19 + .../content/test/browser_addon_bar_shortcut.js | 18 + browser/base/content/test/browser_allTabsPanel.js | 162 + .../base/content/test/browser_alltabslistener.js | 204 + .../base/content/test/browser_blob-channelname.js | 11 + .../base/content/test/browser_bookmark_titles.js | 86 + browser/base/content/test/browser_bug304198.js | 125 + browser/base/content/test/browser_bug321000.js | 80 + browser/base/content/test/browser_bug329212.js | 43 + browser/base/content/test/browser_bug356571.js | 91 + browser/base/content/test/browser_bug380960.js | 91 + browser/base/content/test/browser_bug386835.js | 89 + browser/base/content/test/browser_bug405137.js | 5 + browser/base/content/test/browser_bug406216.js | 54 + browser/base/content/test/browser_bug409481.js | 83 + browser/base/content/test/browser_bug409624.js | 73 + browser/base/content/test/browser_bug413915.js | 59 + browser/base/content/test/browser_bug416661.js | 43 + browser/base/content/test/browser_bug417483.js | 26 + browser/base/content/test/browser_bug419612.js | 32 + browser/base/content/test/browser_bug422590.js | 50 + browser/base/content/test/browser_bug423833.js | 138 + browser/base/content/test/browser_bug424101.js | 53 + browser/base/content/test/browser_bug427559.js | 40 + browser/base/content/test/browser_bug432599.js | 127 + browser/base/content/test/browser_bug435035.js | 16 + browser/base/content/test/browser_bug435325.js | 72 + browser/base/content/test/browser_bug441778.js | 46 + browser/base/content/test/browser_bug455852.js | 16 + browser/base/content/test/browser_bug460146.js | 51 + browser/base/content/test/browser_bug462289.js | 85 + browser/base/content/test/browser_bug462673.js | 53 + browser/base/content/test/browser_bug477014.js | 55 + browser/base/content/test/browser_bug479408.js | 17 + .../content/test/browser_bug479408_sample.html | 4 + browser/base/content/test/browser_bug481560.js | 27 + browser/base/content/test/browser_bug484315.js | 23 + browser/base/content/test/browser_bug491431.js | 34 + browser/base/content/test/browser_bug495058.js | 43 + browser/base/content/test/browser_bug517902.js | 41 + browser/base/content/test/browser_bug519216.js | 50 + browser/base/content/test/browser_bug520538.js | 15 + browser/base/content/test/browser_bug521216.js | 47 + browser/base/content/test/browser_bug533232.js | 36 + browser/base/content/test/browser_bug537474.js | 8 + browser/base/content/test/browser_bug550565.js | 21 + browser/base/content/test/browser_bug553455.js | 903 +++ browser/base/content/test/browser_bug555224.js | 40 + browser/base/content/test/browser_bug555767.js | 68 + browser/base/content/test/browser_bug556061.js | 96 + browser/base/content/test/browser_bug559991.js | 42 + browser/base/content/test/browser_bug561623.js | 29 + browser/base/content/test/browser_bug561636.js | 474 ++ browser/base/content/test/browser_bug562649.js | 27 + browser/base/content/test/browser_bug563588.js | 30 + browser/base/content/test/browser_bug565575.js | 13 + browser/base/content/test/browser_bug565667.js | 59 + browser/base/content/test/browser_bug567306.js | 44 + browser/base/content/test/browser_bug575561.js | 90 + browser/base/content/test/browser_bug575830.js | 33 + browser/base/content/test/browser_bug577121.js | 24 + browser/base/content/test/browser_bug578534.js | 29 + browser/base/content/test/browser_bug579872.js | 29 + browser/base/content/test/browser_bug580638.js | 58 + browser/base/content/test/browser_bug580956.js | 29 + browser/base/content/test/browser_bug581242.js | 21 + browser/base/content/test/browser_bug581253.js | 102 + browser/base/content/test/browser_bug581947.js | 90 + browser/base/content/test/browser_bug585558.js | 152 + browser/base/content/test/browser_bug585785.js | 35 + browser/base/content/test/browser_bug585830.js | 25 + browser/base/content/test/browser_bug590206.js | 136 + browser/base/content/test/browser_bug592338.js | 136 + browser/base/content/test/browser_bug594131.js | 23 + browser/base/content/test/browser_bug595507.js | 39 + browser/base/content/test/browser_bug596687.js | 26 + browser/base/content/test/browser_bug597218.js | 38 + browser/base/content/test/browser_bug598923.js | 33 + browser/base/content/test/browser_bug599325.js | 21 + browser/base/content/test/browser_bug609700.js | 20 + browser/base/content/test/browser_bug616836.js | 4 + browser/base/content/test/browser_bug623155.js | 136 + browser/base/content/test/browser_bug623893.js | 46 + browser/base/content/test/browser_bug624734.js | 23 + browser/base/content/test/browser_bug647886.js | 36 + browser/base/content/test/browser_bug655584.js | 23 + browser/base/content/test/browser_bug664672.js | 19 + browser/base/content/test/browser_bug676619.js | 121 + browser/base/content/test/browser_bug678392-1.html | 12 + browser/base/content/test/browser_bug678392-2.html | 12 + browser/base/content/test/browser_bug678392.js | 192 + browser/base/content/test/browser_bug710878.js | 29 + browser/base/content/test/browser_bug719271.js | 89 + browser/base/content/test/browser_bug724239.js | 33 + browser/base/content/test/browser_bug734076.js | 107 + browser/base/content/test/browser_bug735471.js | 59 + browser/base/content/test/browser_bug743421.js | 118 + browser/base/content/test/browser_bug744745.js | 46 + browser/base/content/test/browser_bug749738.js | 36 + browser/base/content/test/browser_bug752516.js | 48 + .../content/test/browser_bug763468_perwindowpb.js | 64 + .../content/test/browser_bug767836_perwindowpb.js | 83 + browser/base/content/test/browser_bug771331.js | 82 + browser/base/content/test/browser_bug783614.js | 13 + browser/base/content/test/browser_bug787619.js | 52 + browser/base/content/test/browser_bug797677.js | 47 + browser/base/content/test/browser_bug812562.js | 96 + browser/base/content/test/browser_bug816527.js | 122 + browser/base/content/test/browser_bug817947.js | 56 + browser/base/content/test/browser_bug818118.js | 48 + browser/base/content/test/browser_bug820497.js | 61 + browser/base/content/test/browser_bug822367.js | 196 + browser/base/content/test/browser_bug832435.js | 23 + browser/base/content/test/browser_bug839103.js | 159 + browser/base/content/test/browser_bug880101.js | 50 + browser/base/content/test/browser_bug902156.js | 213 + browser/base/content/test/browser_canonizeURL.js | 54 + .../base/content/test/browser_clearplugindata.html | 32 + .../base/content/test/browser_clearplugindata.js | 140 + .../test/browser_clearplugindata_noage.html | 32 + .../base/content/test/browser_contentAreaClick.js | 307 + .../test/browser_contextSearchTabPosition.js | 68 + browser/base/content/test/browser_ctrlTab.js | 151 + browser/base/content/test/browser_customize.js | 24 + .../test/browser_customize_popupNotification.js | 27 + .../test/browser_datareporting_notification.js | 198 + browser/base/content/test/browser_disablechrome.js | 216 + browser/base/content/test/browser_discovery.js | 159 + browser/base/content/test/browser_drag.js | 45 + browser/base/content/test/browser_duplicateIDs.js | 8 + browser/base/content/test/browser_findbarClose.js | 40 + .../content/test/browser_fullscreen-window-open.js | 394 ++ .../base/content/test/browser_gestureSupport.js | 671 ++ .../base/content/test/browser_getshortcutoruri.js | 146 + browser/base/content/test/browser_hide_removing.js | 35 + browser/base/content/test/browser_homeDrop.js | 91 + browser/base/content/test/browser_identity_UI.js | 119 + .../content/test/browser_keywordBookmarklets.js | 38 + browser/base/content/test/browser_keywordSearch.js | 86 + .../content/test/browser_keywordSearch_postData.js | 94 + .../base/content/test/browser_lastAccessedTab.js | 26 + .../content/test/browser_locationBarCommand.js | 213 + .../test/browser_locationBarExternalLoad.js | 65 + .../content/test/browser_middleMouse_inherit.js | 55 + browser/base/content/test/browser_minimize.js | 37 + .../test/browser_offlineQuotaNotification.js | 74 + .../base/content/test/browser_overflowScroll.js | 87 + browser/base/content/test/browser_pageInfo.js | 38 + .../base/content/test/browser_pageInfo_plugins.js | 187 + .../base/content/test/browser_page_style_menu.js | 67 + browser/base/content/test/browser_pinnedTabs.js | 73 + .../base/content/test/browser_plainTextLinks.js | 115 + .../test/browser_pluginCrashCommentAndURL.js | 154 + .../content/test/browser_pluginnotification.js | 841 +++ .../base/content/test/browser_pluginplaypreview.js | 317 + .../content/test/browser_pluginplaypreview2.js | 179 + .../test/browser_plugins_added_dynamically.js | 179 + .../base/content/test/browser_popupNotification.js | 991 +++ browser/base/content/test/browser_popupUI.js | 57 + .../test/browser_private_browsing_window.js | 65 + .../base/content/test/browser_private_no_prompt.js | 13 + browser/base/content/test/browser_relatedTabs.js | 49 + .../content/test/browser_removeTabsToTheEnd.js | 24 + .../test/browser_sanitize-download-history.js | 142 + .../test/browser_sanitize-passwordDisabledHosts.js | 41 + .../test/browser_sanitize-sitepermissions.js | 37 + .../content/test/browser_sanitize-timespans.js | 810 +++ .../base/content/test/browser_sanitizeDialog.js | 1099 +++ .../test/browser_sanitizeDialog_treeView.js | 632 ++ .../content/test/browser_save_link-perwindowpb.js | 167 + .../test/browser_save_private_link_perwindowpb.js | 131 + browser/base/content/test/browser_save_video.js | 91 + browser/base/content/test/browser_scope.js | 4 + .../base/content/test/browser_selectTabAtIndex.js | 19 + browser/base/content/test/browser_tabDrop.js | 71 + .../browser_tabMatchesInAwesomebar_perwindowpb.js | 249 + .../test/browser_tab_drag_drop_perwindow.js | 50 + browser/base/content/test/browser_tab_dragdrop.js | 118 + browser/base/content/test/browser_tab_dragdrop2.js | 52 + .../content/test/browser_tab_dragdrop2_frame1.xul | 167 + browser/base/content/test/browser_tabfocus.js | 278 + .../base/content/test/browser_tabopen_reflows.js | 126 + browser/base/content/test/browser_tabs_isActive.js | 29 + browser/base/content/test/browser_tabs_owner.js | 32 + browser/base/content/test/browser_typeAheadFind.js | 28 + browser/base/content/test/browser_unloaddialogs.js | 134 + browser/base/content/test/browser_urlHighlight.js | 112 + .../content/test/browser_urlbarAutoFillTrimURLs.js | 85 + browser/base/content/test/browser_urlbarCopying.js | 204 + browser/base/content/test/browser_urlbarEnter.js | 69 + browser/base/content/test/browser_urlbarRevert.js | 29 + browser/base/content/test/browser_urlbarStop.js | 40 + .../base/content/test/browser_urlbarTrimURLs.js | 89 + .../test/browser_urlbar_search_healthreport.js | 65 + .../base/content/test/browser_utilityOverlay.js | 62 + .../content/test/browser_visibleFindSelection.js | 39 + browser/base/content/test/browser_visibleTabs.js | 93 + .../test/browser_visibleTabs_bookmarkAllPages.js | 34 + .../test/browser_visibleTabs_bookmarkAllTabs.js | 66 + .../test/browser_visibleTabs_contextMenu.js | 54 + .../content/test/browser_visibleTabs_tabPreview.js | 41 + .../content/test/browser_wyciwyg_urlbarCopying.js | 39 + browser/base/content/test/browser_zbug569342.js | 78 + browser/base/content/test/bug364677-data.xml | 5 + .../base/content/test/bug364677-data.xml^headers^ | 1 + browser/base/content/test/bug395533-data.txt | 6 + browser/base/content/test/bug564387.html | 11 + browser/base/content/test/bug564387_video1.ogv | Bin 0 -> 28942 bytes .../content/test/bug564387_video1.ogv^headers^ | 3 + browser/base/content/test/bug592338.html | 24 + browser/base/content/test/bug792517-2.html | 5 + browser/base/content/test/bug792517.html | 5 + browser/base/content/test/bug792517.sjs | 13 + browser/base/content/test/bug839103.css | 1 + browser/base/content/test/ctxmenu-image.png | Bin 0 -> 5401 bytes browser/base/content/test/disablechrome.html | 4 + browser/base/content/test/discovery.html | 8 + browser/base/content/test/domplate_test.js | 51 + browser/base/content/test/download_page.html | 47 + browser/base/content/test/dummy_page.html | 8 + browser/base/content/test/feed_discovery.html | 113 + browser/base/content/test/feed_tab.html | 17 + .../base/content/test/file_bug550565_favicon.ico | Bin 0 -> 1406 bytes .../base/content/test/file_bug550565_popup.html | 12 + browser/base/content/test/file_bug822367_1.html | 18 + browser/base/content/test/file_bug822367_1.js | 1 + browser/base/content/test/file_bug822367_2.html | 16 + browser/base/content/test/file_bug822367_3.html | 27 + browser/base/content/test/file_bug822367_4.html | 18 + browser/base/content/test/file_bug822367_4.js | 1 + browser/base/content/test/file_bug822367_4B.html | 18 + browser/base/content/test/file_bug822367_5.html | 24 + browser/base/content/test/file_bug822367_6.html | 16 + browser/base/content/test/file_bug902156.js | 5 + browser/base/content/test/file_bug902156_1.html | 15 + browser/base/content/test/file_bug902156_2.html | 17 + browser/base/content/test/file_bug902156_3.html | 15 + .../content/test/file_fullscreen-window-open.html | 24 + .../content/test/gZipOfflineChild.cacheManifest | 2 + .../test/gZipOfflineChild.cacheManifest^headers^ | 1 + browser/base/content/test/gZipOfflineChild.html | Bin 0 -> 298 bytes .../content/test/gZipOfflineChild.html^headers^ | 2 + .../test/gZipOfflineChild_uncompressed.html | 21 + browser/base/content/test/head.js | 400 ++ browser/base/content/test/head_plain.js | 15 + .../test/healthreport_testRemoteCommands.html | 128 + browser/base/content/test/moz.build | 8 + browser/base/content/test/moz.png | Bin 0 -> 580 bytes browser/base/content/test/newtab/Makefile.in | 38 + .../content/test/newtab/browser_newtab_block.js | 61 + .../test/newtab/browser_newtab_bug721442.js | 23 + .../test/newtab/browser_newtab_bug722273.js | 68 + .../test/newtab/browser_newtab_bug723102.js | 19 + .../test/newtab/browser_newtab_bug723121.js | 30 + .../test/newtab/browser_newtab_bug725996.js | 23 + .../test/newtab/browser_newtab_bug734043.js | 27 + .../test/newtab/browser_newtab_bug735987.js | 26 + .../test/newtab/browser_newtab_bug752841.js | 53 + .../test/newtab/browser_newtab_bug765628.js | 27 + .../test/newtab/browser_newtab_bug876313.js | 24 + .../content/test/newtab/browser_newtab_disable.js | 34 + .../test/newtab/browser_newtab_drag_drop.js | 74 + .../test/newtab/browser_newtab_drag_drop_ext.js | 55 + .../test/newtab/browser_newtab_drop_preview.js | 22 + .../content/test/newtab/browser_newtab_focus.js | 57 + .../browser_newtab_perwindow_private_browsing.js | 68 + .../content/test/newtab/browser_newtab_reset.js | 28 + .../content/test/newtab/browser_newtab_tabsync.js | 61 + .../content/test/newtab/browser_newtab_undo.js | 49 + .../content/test/newtab/browser_newtab_unpin.js | 56 + browser/base/content/test/newtab/head.js | 390 ++ browser/base/content/test/newtab/moz.build | 6 + .../base/content/test/offlineChild.cacheManifest | 2 + .../test/offlineChild.cacheManifest^headers^ | 1 + browser/base/content/test/offlineChild.html | 20 + .../base/content/test/offlineChild2.cacheManifest | 2 + .../test/offlineChild2.cacheManifest^headers^ | 1 + browser/base/content/test/offlineChild2.html | 20 + .../base/content/test/offlineEvent.cacheManifest | 2 + .../test/offlineEvent.cacheManifest^headers^ | 1 + browser/base/content/test/offlineEvent.html | 9 + .../test/offlineQuotaNotification.cacheManifest | 7 + .../content/test/offlineQuotaNotification.html | 9 + browser/base/content/test/page_style_sample.html | 40 + .../content/test/pluginCrashCommentAndURL.html | 27 + .../base/content/test/plugin_add_dynamically.html | 17 + .../content/test/plugin_alternate_content.html | 9 + browser/base/content/test/plugin_both.html | 10 + browser/base/content/test/plugin_both2.html | 10 + browser/base/content/test/plugin_bug744745.html | 12 + browser/base/content/test/plugin_bug749455.html | 8 + browser/base/content/test/plugin_bug752516.html | 24 + browser/base/content/test/plugin_bug787619.html | 9 + browser/base/content/test/plugin_bug797677.html | 5 + browser/base/content/test/plugin_bug820497.html | 17 + .../base/content/test/plugin_clickToPlayAllow.html | 9 + .../base/content/test/plugin_clickToPlayDeny.html | 9 + browser/base/content/test/plugin_data_url.html | 11 + .../content/test/plugin_hidden_to_visible.html | 11 + browser/base/content/test/plugin_test.html | 9 + browser/base/content/test/plugin_test2.html | 10 + browser/base/content/test/plugin_test3.html | 9 + browser/base/content/test/plugin_two_types.html | 9 + browser/base/content/test/plugin_unknown.html | 9 + browser/base/content/test/print_postdata.sjs | 22 + browser/base/content/test/privateBrowsingMode.js | 3 + browser/base/content/test/redirect_bug623155.sjs | 16 + browser/base/content/test/social/Makefile.in | 47 + browser/base/content/test/social/blocklist.xml | 6 + browser/base/content/test/social/browser_addons.js | 327 + .../base/content/test/social/browser_blocklist.js | 179 + .../content/test/social/browser_chat_tearoff.js | 121 + .../base/content/test/social/browser_defaults.js | 14 + browser/base/content/test/social/browser_share.js | 140 + .../test/social/browser_social_activation.js | 348 + .../test/social/browser_social_chatwindow.js | 472 ++ .../social/browser_social_chatwindow_resize.js | 90 + .../test/social/browser_social_chatwindowfocus.js | 360 + .../test/social/browser_social_errorPage.js | 183 + .../content/test/social/browser_social_flyout.js | 164 + .../test/social/browser_social_isVisible.js | 67 + .../test/social/browser_social_markButton.js | 187 + .../test/social/browser_social_mozSocial_API.js | 81 + .../test/social/browser_social_multiprovider.js | 111 + .../test/social/browser_social_perwindowPB.js | 82 + .../content/test/social/browser_social_sidebar.js | 105 + .../content/test/social/browser_social_toolbar.js | 195 + .../content/test/social/browser_social_window.js | 145 + browser/base/content/test/social/head.js | 517 ++ browser/base/content/test/social/moz.build | 7 + browser/base/content/test/social/moz.png | Bin 0 -> 580 bytes .../base/content/test/social/opengraph/Makefile.in | 21 + .../base/content/test/social/opengraph/moz.build | 4 + .../test/social/opengraph/og_invalid_url.html | 11 + .../content/test/social/opengraph/opengraph.html | 13 + .../test/social/opengraph/shortlink_linkrel.html | 10 + .../test/social/opengraph/shorturl_link.html | 10 + .../test/social/opengraph/shorturl_linkrel.html | 25 + browser/base/content/test/social/share.html | 18 + .../base/content/test/social/social_activate.html | 45 + .../test/social/social_activate_iframe.html | 11 + browser/base/content/test/social/social_chat.html | 32 + .../base/content/test/social/social_flyout.html | 37 + .../base/content/test/social/social_mark_image.png | Bin 0 -> 934 bytes browser/base/content/test/social/social_panel.html | 24 + .../base/content/test/social/social_sidebar.html | 47 + .../base/content/test/social/social_window.html | 17 + browser/base/content/test/social/social_worker.js | 149 + browser/base/content/test/subtst_contextmenu.html | 71 + browser/base/content/test/test_bug364677.html | 32 + browser/base/content/test/test_bug395533.html | 39 + browser/base/content/test/test_bug435035.html | 1 + browser/base/content/test/test_bug452451.html | 96 + browser/base/content/test/test_bug462673.html | 18 + browser/base/content/test/test_bug628179.html | 10 + browser/base/content/test/test_bug839103.html | 10 + browser/base/content/test/test_contextmenu.html | 1088 +++ browser/base/content/test/test_feed_discovery.html | 54 + .../content/test/test_offlineNotification.html | 126 + browser/base/content/test/test_offline_gzip.html | 112 + .../base/content/test/test_wyciwyg_copying.html | 13 + browser/base/content/test/title_test.svg | 59 + browser/base/content/test/video.ogg | Bin 0 -> 285310 bytes browser/base/content/test/zoom_test.html | 14 + browser/base/content/urlbarBindings.xml | 2198 ++++++ browser/base/content/utilityOverlay.js | 686 ++ browser/base/content/viewSourceOverlay.xul | 26 + browser/base/content/web-panels.js | 103 + browser/base/content/web-panels.xul | 71 + browser/base/content/win6BrowserOverlay.xul | 12 + browser/base/jar.mn | 143 + browser/base/moz.build | 7 + 535 files changed, 76579 insertions(+) create mode 100644 browser/base/Makefile.in create mode 100644 browser/base/content/aboutDialog.css create mode 100644 browser/base/content/aboutDialog.js create mode 100644 browser/base/content/aboutDialog.xul create mode 100644 browser/base/content/aboutRobots-icon.png create mode 100644 browser/base/content/aboutRobots-widget-left.png create mode 100644 browser/base/content/aboutRobots.xhtml create mode 100644 browser/base/content/aboutSocialError.xhtml create mode 100644 browser/base/content/abouthealthreport/abouthealth.css create mode 100644 browser/base/content/abouthealthreport/abouthealth.js create mode 100644 browser/base/content/abouthealthreport/abouthealth.xhtml create mode 100644 browser/base/content/abouthome/aboutHome.css create mode 100644 browser/base/content/abouthome/aboutHome.js create mode 100644 browser/base/content/abouthome/aboutHome.xhtml create mode 100644 browser/base/content/abouthome/addons.png create mode 100644 browser/base/content/abouthome/addons@2x.png create mode 100644 browser/base/content/abouthome/apps.png create mode 100644 browser/base/content/abouthome/apps@2x.png create mode 100644 browser/base/content/abouthome/bookmarks.png create mode 100644 browser/base/content/abouthome/bookmarks@2x.png create mode 100644 browser/base/content/abouthome/downloads.png create mode 100644 browser/base/content/abouthome/downloads@2x.png create mode 100644 browser/base/content/abouthome/history.png create mode 100644 browser/base/content/abouthome/history@2x.png create mode 100644 browser/base/content/abouthome/mozilla.png create mode 100644 browser/base/content/abouthome/mozilla@2x.png create mode 100644 browser/base/content/abouthome/noise.png create mode 100644 browser/base/content/abouthome/restore-large.png create mode 100644 browser/base/content/abouthome/restore-large@2x.png create mode 100644 browser/base/content/abouthome/restore.png create mode 100644 browser/base/content/abouthome/restore@2x.png create mode 100644 browser/base/content/abouthome/settings.png create mode 100644 browser/base/content/abouthome/settings@2x.png create mode 100644 browser/base/content/abouthome/snippet1.png create mode 100644 browser/base/content/abouthome/snippet1@2x.png create mode 100644 browser/base/content/abouthome/snippet2.png create mode 100644 browser/base/content/abouthome/snippet2@2x.png create mode 100644 browser/base/content/abouthome/sync.png create mode 100644 browser/base/content/abouthome/sync@2x.png create mode 100644 browser/base/content/baseMenuOverlay.xul create mode 100644 browser/base/content/blockedSite.xhtml create mode 100644 browser/base/content/browser-addons.js create mode 100644 browser/base/content/browser-appmenu.inc create mode 100644 browser/base/content/browser-charsetmenu.inc create mode 100644 browser/base/content/browser-context.inc create mode 100644 browser/base/content/browser-data-submission-info-bar.js create mode 100644 browser/base/content/browser-doctype.inc create mode 100644 browser/base/content/browser-feeds.js create mode 100644 browser/base/content/browser-fullScreen.js create mode 100644 browser/base/content/browser-fullZoom.js create mode 100644 browser/base/content/browser-gestureSupport.js create mode 100644 browser/base/content/browser-menubar.inc create mode 100644 browser/base/content/browser-places.js create mode 100644 browser/base/content/browser-plugins.js create mode 100644 browser/base/content/browser-safebrowsing.js create mode 100644 browser/base/content/browser-sets.inc create mode 100644 browser/base/content/browser-social.js create mode 100644 browser/base/content/browser-syncui.js create mode 100644 browser/base/content/browser-tabPreviews.js create mode 100644 browser/base/content/browser-tabPreviews.xml create mode 100644 browser/base/content/browser-thumbnails.js create mode 100644 browser/base/content/browser-title.css create mode 100644 browser/base/content/browser-webrtcUI.js create mode 100644 browser/base/content/browser.css create mode 100644 browser/base/content/browser.js create mode 100644 browser/base/content/browser.xul create mode 100644 browser/base/content/browserMountPoints.inc create mode 100644 browser/base/content/chatWindow.xul create mode 100644 browser/base/content/content.js create mode 100644 browser/base/content/downloadManagerOverlay.xul create mode 100644 browser/base/content/global-scripts.inc create mode 100644 browser/base/content/hiddenWindow.xul create mode 100644 browser/base/content/highlighter.css create mode 100644 browser/base/content/imagedocument.png create mode 100644 browser/base/content/jsConsoleOverlay.xul create mode 100644 browser/base/content/macBrowserOverlay.xul create mode 100644 browser/base/content/newtab/cells.js create mode 100644 browser/base/content/newtab/drag.js create mode 100644 browser/base/content/newtab/dragDataHelper.js create mode 100644 browser/base/content/newtab/drop.js create mode 100644 browser/base/content/newtab/dropPreview.js create mode 100644 browser/base/content/newtab/dropTargetShim.js create mode 100644 browser/base/content/newtab/grid.js create mode 100644 browser/base/content/newtab/newTab.css create mode 100644 browser/base/content/newtab/newTab.js create mode 100644 browser/base/content/newtab/newTab.xul create mode 100644 browser/base/content/newtab/page.js create mode 100644 browser/base/content/newtab/sites.js create mode 100644 browser/base/content/newtab/transformations.js create mode 100644 browser/base/content/newtab/undo.js create mode 100644 browser/base/content/newtab/updater.js create mode 100644 browser/base/content/nsContextMenu.js create mode 100644 browser/base/content/openLocation.js create mode 100644 browser/base/content/openLocation.xul create mode 100644 browser/base/content/overrides/app-license.html create mode 100644 browser/base/content/padlock.css create mode 100644 browser/base/content/padlock.js create mode 100644 browser/base/content/padlock.xul create mode 100644 browser/base/content/padlock_classic_broken.png create mode 100644 browser/base/content/padlock_classic_ev.png create mode 100644 browser/base/content/padlock_classic_https.png create mode 100644 browser/base/content/padlock_mod_broken.png create mode 100644 browser/base/content/padlock_mod_ev.png create mode 100644 browser/base/content/padlock_mod_https.png create mode 100644 browser/base/content/padlock_mod_low.png create mode 100644 browser/base/content/pageinfo/feeds.js create mode 100644 browser/base/content/pageinfo/feeds.xml create mode 100644 browser/base/content/pageinfo/pageInfo.css create mode 100644 browser/base/content/pageinfo/pageInfo.js create mode 100644 browser/base/content/pageinfo/pageInfo.xml create mode 100644 browser/base/content/pageinfo/pageInfo.xul create mode 100644 browser/base/content/pageinfo/permissions.js create mode 100644 browser/base/content/pageinfo/security.js create mode 100644 browser/base/content/popup-notifications.inc create mode 100644 browser/base/content/report-phishing-overlay.xul create mode 100644 browser/base/content/safeMode.css create mode 100644 browser/base/content/safeMode.js create mode 100644 browser/base/content/safeMode.xul create mode 100644 browser/base/content/sanitize.js create mode 100644 browser/base/content/sanitize.xul create mode 100644 browser/base/content/sanitizeDialog.css create mode 100644 browser/base/content/sanitizeDialog.js create mode 100644 browser/base/content/socialchat.xml create mode 100644 browser/base/content/softwareUpdateOverlay.xul create mode 100644 browser/base/content/sync/aboutSyncTabs-bindings.xml create mode 100644 browser/base/content/sync/aboutSyncTabs.css create mode 100644 browser/base/content/sync/aboutSyncTabs.js create mode 100644 browser/base/content/sync/aboutSyncTabs.xul create mode 100644 browser/base/content/sync/addDevice.js create mode 100644 browser/base/content/sync/addDevice.xul create mode 100644 browser/base/content/sync/genericChange.js create mode 100644 browser/base/content/sync/genericChange.xul create mode 100644 browser/base/content/sync/key.xhtml create mode 100644 browser/base/content/sync/notification.xml create mode 100644 browser/base/content/sync/progress.js create mode 100644 browser/base/content/sync/progress.xhtml create mode 100644 browser/base/content/sync/quota.js create mode 100644 browser/base/content/sync/quota.xul create mode 100644 browser/base/content/sync/setup.js create mode 100644 browser/base/content/sync/setup.xul create mode 100644 browser/base/content/sync/utils.js create mode 100644 browser/base/content/tabbrowser.css create mode 100644 browser/base/content/tabbrowser.xml create mode 100644 browser/base/content/test/Makefile.in create mode 100644 browser/base/content/test/POSTSearchEngine.xml create mode 100644 browser/base/content/test/alltabslistener.html create mode 100644 browser/base/content/test/app_bug575561.html create mode 100644 browser/base/content/test/app_subframe_bug575561.html create mode 100644 browser/base/content/test/audio.ogg create mode 100644 browser/base/content/test/authenticate.sjs create mode 100644 browser/base/content/test/blockNoPlugins.xml create mode 100644 browser/base/content/test/blockPluginHard.xml create mode 100644 browser/base/content/test/blockPluginVulnerableNoUpdate.xml create mode 100644 browser/base/content/test/blockPluginVulnerableUpdatable.xml create mode 100644 browser/base/content/test/browser_CTP_context_menu.js create mode 100644 browser/base/content/test/browser_CTP_data_urls.js create mode 100644 browser/base/content/test/browser_CTP_drag_drop.js create mode 100644 browser/base/content/test/browser_URLBarSetURI.js create mode 100644 browser/base/content/test/browser_aboutHealthReport.js create mode 100644 browser/base/content/test/browser_aboutHome.js create mode 100644 browser/base/content/test/browser_aboutSyncProgress.js create mode 100644 browser/base/content/test/browser_addon_bar.js create mode 100644 browser/base/content/test/browser_addon_bar_aomlistener.js create mode 100644 browser/base/content/test/browser_addon_bar_close_button.js create mode 100644 browser/base/content/test/browser_addon_bar_shortcut.js create mode 100644 browser/base/content/test/browser_allTabsPanel.js create mode 100644 browser/base/content/test/browser_alltabslistener.js create mode 100644 browser/base/content/test/browser_blob-channelname.js create mode 100644 browser/base/content/test/browser_bookmark_titles.js create mode 100644 browser/base/content/test/browser_bug304198.js create mode 100644 browser/base/content/test/browser_bug321000.js create mode 100644 browser/base/content/test/browser_bug329212.js create mode 100644 browser/base/content/test/browser_bug356571.js create mode 100644 browser/base/content/test/browser_bug380960.js create mode 100644 browser/base/content/test/browser_bug386835.js create mode 100644 browser/base/content/test/browser_bug405137.js create mode 100644 browser/base/content/test/browser_bug406216.js create mode 100644 browser/base/content/test/browser_bug409481.js create mode 100644 browser/base/content/test/browser_bug409624.js create mode 100644 browser/base/content/test/browser_bug413915.js create mode 100644 browser/base/content/test/browser_bug416661.js create mode 100644 browser/base/content/test/browser_bug417483.js create mode 100644 browser/base/content/test/browser_bug419612.js create mode 100644 browser/base/content/test/browser_bug422590.js create mode 100644 browser/base/content/test/browser_bug423833.js create mode 100644 browser/base/content/test/browser_bug424101.js create mode 100644 browser/base/content/test/browser_bug427559.js create mode 100644 browser/base/content/test/browser_bug432599.js create mode 100644 browser/base/content/test/browser_bug435035.js create mode 100644 browser/base/content/test/browser_bug435325.js create mode 100644 browser/base/content/test/browser_bug441778.js create mode 100644 browser/base/content/test/browser_bug455852.js create mode 100644 browser/base/content/test/browser_bug460146.js create mode 100644 browser/base/content/test/browser_bug462289.js create mode 100644 browser/base/content/test/browser_bug462673.js create mode 100644 browser/base/content/test/browser_bug477014.js create mode 100644 browser/base/content/test/browser_bug479408.js create mode 100644 browser/base/content/test/browser_bug479408_sample.html create mode 100644 browser/base/content/test/browser_bug481560.js create mode 100644 browser/base/content/test/browser_bug484315.js create mode 100644 browser/base/content/test/browser_bug491431.js create mode 100644 browser/base/content/test/browser_bug495058.js create mode 100644 browser/base/content/test/browser_bug517902.js create mode 100644 browser/base/content/test/browser_bug519216.js create mode 100644 browser/base/content/test/browser_bug520538.js create mode 100644 browser/base/content/test/browser_bug521216.js create mode 100644 browser/base/content/test/browser_bug533232.js create mode 100644 browser/base/content/test/browser_bug537474.js create mode 100644 browser/base/content/test/browser_bug550565.js create mode 100644 browser/base/content/test/browser_bug553455.js create mode 100644 browser/base/content/test/browser_bug555224.js create mode 100644 browser/base/content/test/browser_bug555767.js create mode 100644 browser/base/content/test/browser_bug556061.js create mode 100644 browser/base/content/test/browser_bug559991.js create mode 100644 browser/base/content/test/browser_bug561623.js create mode 100644 browser/base/content/test/browser_bug561636.js create mode 100644 browser/base/content/test/browser_bug562649.js create mode 100644 browser/base/content/test/browser_bug563588.js create mode 100644 browser/base/content/test/browser_bug565575.js create mode 100644 browser/base/content/test/browser_bug565667.js create mode 100644 browser/base/content/test/browser_bug567306.js create mode 100644 browser/base/content/test/browser_bug575561.js create mode 100644 browser/base/content/test/browser_bug575830.js create mode 100644 browser/base/content/test/browser_bug577121.js create mode 100644 browser/base/content/test/browser_bug578534.js create mode 100644 browser/base/content/test/browser_bug579872.js create mode 100644 browser/base/content/test/browser_bug580638.js create mode 100644 browser/base/content/test/browser_bug580956.js create mode 100644 browser/base/content/test/browser_bug581242.js create mode 100644 browser/base/content/test/browser_bug581253.js create mode 100644 browser/base/content/test/browser_bug581947.js create mode 100644 browser/base/content/test/browser_bug585558.js create mode 100644 browser/base/content/test/browser_bug585785.js create mode 100644 browser/base/content/test/browser_bug585830.js create mode 100644 browser/base/content/test/browser_bug590206.js create mode 100644 browser/base/content/test/browser_bug592338.js create mode 100644 browser/base/content/test/browser_bug594131.js create mode 100644 browser/base/content/test/browser_bug595507.js create mode 100644 browser/base/content/test/browser_bug596687.js create mode 100644 browser/base/content/test/browser_bug597218.js create mode 100644 browser/base/content/test/browser_bug598923.js create mode 100644 browser/base/content/test/browser_bug599325.js create mode 100644 browser/base/content/test/browser_bug609700.js create mode 100644 browser/base/content/test/browser_bug616836.js create mode 100644 browser/base/content/test/browser_bug623155.js create mode 100644 browser/base/content/test/browser_bug623893.js create mode 100644 browser/base/content/test/browser_bug624734.js create mode 100644 browser/base/content/test/browser_bug647886.js create mode 100644 browser/base/content/test/browser_bug655584.js create mode 100644 browser/base/content/test/browser_bug664672.js create mode 100644 browser/base/content/test/browser_bug676619.js create mode 100644 browser/base/content/test/browser_bug678392-1.html create mode 100644 browser/base/content/test/browser_bug678392-2.html create mode 100644 browser/base/content/test/browser_bug678392.js create mode 100644 browser/base/content/test/browser_bug710878.js create mode 100644 browser/base/content/test/browser_bug719271.js create mode 100644 browser/base/content/test/browser_bug724239.js create mode 100644 browser/base/content/test/browser_bug734076.js create mode 100644 browser/base/content/test/browser_bug735471.js create mode 100644 browser/base/content/test/browser_bug743421.js create mode 100644 browser/base/content/test/browser_bug744745.js create mode 100644 browser/base/content/test/browser_bug749738.js create mode 100644 browser/base/content/test/browser_bug752516.js create mode 100644 browser/base/content/test/browser_bug763468_perwindowpb.js create mode 100644 browser/base/content/test/browser_bug767836_perwindowpb.js create mode 100644 browser/base/content/test/browser_bug771331.js create mode 100644 browser/base/content/test/browser_bug783614.js create mode 100644 browser/base/content/test/browser_bug787619.js create mode 100644 browser/base/content/test/browser_bug797677.js create mode 100644 browser/base/content/test/browser_bug812562.js create mode 100644 browser/base/content/test/browser_bug816527.js create mode 100644 browser/base/content/test/browser_bug817947.js create mode 100644 browser/base/content/test/browser_bug818118.js create mode 100644 browser/base/content/test/browser_bug820497.js create mode 100644 browser/base/content/test/browser_bug822367.js create mode 100644 browser/base/content/test/browser_bug832435.js create mode 100644 browser/base/content/test/browser_bug839103.js create mode 100644 browser/base/content/test/browser_bug880101.js create mode 100644 browser/base/content/test/browser_bug902156.js create mode 100644 browser/base/content/test/browser_canonizeURL.js create mode 100644 browser/base/content/test/browser_clearplugindata.html create mode 100644 browser/base/content/test/browser_clearplugindata.js create mode 100644 browser/base/content/test/browser_clearplugindata_noage.html create mode 100644 browser/base/content/test/browser_contentAreaClick.js create mode 100644 browser/base/content/test/browser_contextSearchTabPosition.js create mode 100644 browser/base/content/test/browser_ctrlTab.js create mode 100644 browser/base/content/test/browser_customize.js create mode 100644 browser/base/content/test/browser_customize_popupNotification.js create mode 100644 browser/base/content/test/browser_datareporting_notification.js create mode 100644 browser/base/content/test/browser_disablechrome.js create mode 100644 browser/base/content/test/browser_discovery.js create mode 100644 browser/base/content/test/browser_drag.js create mode 100644 browser/base/content/test/browser_duplicateIDs.js create mode 100644 browser/base/content/test/browser_findbarClose.js create mode 100644 browser/base/content/test/browser_fullscreen-window-open.js create mode 100644 browser/base/content/test/browser_gestureSupport.js create mode 100644 browser/base/content/test/browser_getshortcutoruri.js create mode 100644 browser/base/content/test/browser_hide_removing.js create mode 100644 browser/base/content/test/browser_homeDrop.js create mode 100644 browser/base/content/test/browser_identity_UI.js create mode 100644 browser/base/content/test/browser_keywordBookmarklets.js create mode 100644 browser/base/content/test/browser_keywordSearch.js create mode 100644 browser/base/content/test/browser_keywordSearch_postData.js create mode 100644 browser/base/content/test/browser_lastAccessedTab.js create mode 100644 browser/base/content/test/browser_locationBarCommand.js create mode 100644 browser/base/content/test/browser_locationBarExternalLoad.js create mode 100644 browser/base/content/test/browser_middleMouse_inherit.js create mode 100644 browser/base/content/test/browser_minimize.js create mode 100644 browser/base/content/test/browser_offlineQuotaNotification.js create mode 100644 browser/base/content/test/browser_overflowScroll.js create mode 100644 browser/base/content/test/browser_pageInfo.js create mode 100644 browser/base/content/test/browser_pageInfo_plugins.js create mode 100644 browser/base/content/test/browser_page_style_menu.js create mode 100644 browser/base/content/test/browser_pinnedTabs.js create mode 100644 browser/base/content/test/browser_plainTextLinks.js create mode 100644 browser/base/content/test/browser_pluginCrashCommentAndURL.js create mode 100644 browser/base/content/test/browser_pluginnotification.js create mode 100644 browser/base/content/test/browser_pluginplaypreview.js create mode 100644 browser/base/content/test/browser_pluginplaypreview2.js create mode 100644 browser/base/content/test/browser_plugins_added_dynamically.js create mode 100644 browser/base/content/test/browser_popupNotification.js create mode 100644 browser/base/content/test/browser_popupUI.js create mode 100644 browser/base/content/test/browser_private_browsing_window.js create mode 100644 browser/base/content/test/browser_private_no_prompt.js create mode 100644 browser/base/content/test/browser_relatedTabs.js create mode 100644 browser/base/content/test/browser_removeTabsToTheEnd.js create mode 100644 browser/base/content/test/browser_sanitize-download-history.js create mode 100644 browser/base/content/test/browser_sanitize-passwordDisabledHosts.js create mode 100644 browser/base/content/test/browser_sanitize-sitepermissions.js create mode 100644 browser/base/content/test/browser_sanitize-timespans.js create mode 100644 browser/base/content/test/browser_sanitizeDialog.js create mode 100644 browser/base/content/test/browser_sanitizeDialog_treeView.js create mode 100644 browser/base/content/test/browser_save_link-perwindowpb.js create mode 100644 browser/base/content/test/browser_save_private_link_perwindowpb.js create mode 100644 browser/base/content/test/browser_save_video.js create mode 100644 browser/base/content/test/browser_scope.js create mode 100644 browser/base/content/test/browser_selectTabAtIndex.js create mode 100644 browser/base/content/test/browser_tabDrop.js create mode 100644 browser/base/content/test/browser_tabMatchesInAwesomebar_perwindowpb.js create mode 100644 browser/base/content/test/browser_tab_drag_drop_perwindow.js create mode 100644 browser/base/content/test/browser_tab_dragdrop.js create mode 100644 browser/base/content/test/browser_tab_dragdrop2.js create mode 100644 browser/base/content/test/browser_tab_dragdrop2_frame1.xul create mode 100644 browser/base/content/test/browser_tabfocus.js create mode 100644 browser/base/content/test/browser_tabopen_reflows.js create mode 100644 browser/base/content/test/browser_tabs_isActive.js create mode 100644 browser/base/content/test/browser_tabs_owner.js create mode 100644 browser/base/content/test/browser_typeAheadFind.js create mode 100644 browser/base/content/test/browser_unloaddialogs.js create mode 100644 browser/base/content/test/browser_urlHighlight.js create mode 100644 browser/base/content/test/browser_urlbarAutoFillTrimURLs.js create mode 100644 browser/base/content/test/browser_urlbarCopying.js create mode 100644 browser/base/content/test/browser_urlbarEnter.js create mode 100644 browser/base/content/test/browser_urlbarRevert.js create mode 100644 browser/base/content/test/browser_urlbarStop.js create mode 100644 browser/base/content/test/browser_urlbarTrimURLs.js create mode 100644 browser/base/content/test/browser_urlbar_search_healthreport.js create mode 100644 browser/base/content/test/browser_utilityOverlay.js create mode 100644 browser/base/content/test/browser_visibleFindSelection.js create mode 100644 browser/base/content/test/browser_visibleTabs.js create mode 100644 browser/base/content/test/browser_visibleTabs_bookmarkAllPages.js create mode 100644 browser/base/content/test/browser_visibleTabs_bookmarkAllTabs.js create mode 100644 browser/base/content/test/browser_visibleTabs_contextMenu.js create mode 100644 browser/base/content/test/browser_visibleTabs_tabPreview.js create mode 100644 browser/base/content/test/browser_wyciwyg_urlbarCopying.js create mode 100644 browser/base/content/test/browser_zbug569342.js create mode 100644 browser/base/content/test/bug364677-data.xml create mode 100644 browser/base/content/test/bug364677-data.xml^headers^ create mode 100644 browser/base/content/test/bug395533-data.txt create mode 100644 browser/base/content/test/bug564387.html create mode 100644 browser/base/content/test/bug564387_video1.ogv create mode 100644 browser/base/content/test/bug564387_video1.ogv^headers^ create mode 100644 browser/base/content/test/bug592338.html create mode 100644 browser/base/content/test/bug792517-2.html create mode 100644 browser/base/content/test/bug792517.html create mode 100644 browser/base/content/test/bug792517.sjs create mode 100644 browser/base/content/test/bug839103.css create mode 100644 browser/base/content/test/ctxmenu-image.png create mode 100644 browser/base/content/test/disablechrome.html create mode 100644 browser/base/content/test/discovery.html create mode 100644 browser/base/content/test/domplate_test.js create mode 100644 browser/base/content/test/download_page.html create mode 100644 browser/base/content/test/dummy_page.html create mode 100644 browser/base/content/test/feed_discovery.html create mode 100644 browser/base/content/test/feed_tab.html create mode 100644 browser/base/content/test/file_bug550565_favicon.ico create mode 100644 browser/base/content/test/file_bug550565_popup.html create mode 100644 browser/base/content/test/file_bug822367_1.html create mode 100644 browser/base/content/test/file_bug822367_1.js create mode 100644 browser/base/content/test/file_bug822367_2.html create mode 100644 browser/base/content/test/file_bug822367_3.html create mode 100644 browser/base/content/test/file_bug822367_4.html create mode 100644 browser/base/content/test/file_bug822367_4.js create mode 100644 browser/base/content/test/file_bug822367_4B.html create mode 100644 browser/base/content/test/file_bug822367_5.html create mode 100644 browser/base/content/test/file_bug822367_6.html create mode 100644 browser/base/content/test/file_bug902156.js create mode 100644 browser/base/content/test/file_bug902156_1.html create mode 100644 browser/base/content/test/file_bug902156_2.html create mode 100644 browser/base/content/test/file_bug902156_3.html create mode 100644 browser/base/content/test/file_fullscreen-window-open.html create mode 100644 browser/base/content/test/gZipOfflineChild.cacheManifest create mode 100644 browser/base/content/test/gZipOfflineChild.cacheManifest^headers^ create mode 100644 browser/base/content/test/gZipOfflineChild.html create mode 100644 browser/base/content/test/gZipOfflineChild.html^headers^ create mode 100644 browser/base/content/test/gZipOfflineChild_uncompressed.html create mode 100644 browser/base/content/test/head.js create mode 100644 browser/base/content/test/head_plain.js create mode 100644 browser/base/content/test/healthreport_testRemoteCommands.html create mode 100644 browser/base/content/test/moz.build create mode 100644 browser/base/content/test/moz.png create mode 100644 browser/base/content/test/newtab/Makefile.in create mode 100644 browser/base/content/test/newtab/browser_newtab_block.js create mode 100644 browser/base/content/test/newtab/browser_newtab_bug721442.js create mode 100644 browser/base/content/test/newtab/browser_newtab_bug722273.js create mode 100644 browser/base/content/test/newtab/browser_newtab_bug723102.js create mode 100644 browser/base/content/test/newtab/browser_newtab_bug723121.js create mode 100644 browser/base/content/test/newtab/browser_newtab_bug725996.js create mode 100644 browser/base/content/test/newtab/browser_newtab_bug734043.js create mode 100644 browser/base/content/test/newtab/browser_newtab_bug735987.js create mode 100644 browser/base/content/test/newtab/browser_newtab_bug752841.js create mode 100644 browser/base/content/test/newtab/browser_newtab_bug765628.js create mode 100644 browser/base/content/test/newtab/browser_newtab_bug876313.js create mode 100644 browser/base/content/test/newtab/browser_newtab_disable.js create mode 100644 browser/base/content/test/newtab/browser_newtab_drag_drop.js create mode 100644 browser/base/content/test/newtab/browser_newtab_drag_drop_ext.js create mode 100644 browser/base/content/test/newtab/browser_newtab_drop_preview.js create mode 100644 browser/base/content/test/newtab/browser_newtab_focus.js create mode 100644 browser/base/content/test/newtab/browser_newtab_perwindow_private_browsing.js create mode 100644 browser/base/content/test/newtab/browser_newtab_reset.js create mode 100644 browser/base/content/test/newtab/browser_newtab_tabsync.js create mode 100644 browser/base/content/test/newtab/browser_newtab_undo.js create mode 100644 browser/base/content/test/newtab/browser_newtab_unpin.js create mode 100644 browser/base/content/test/newtab/head.js create mode 100644 browser/base/content/test/newtab/moz.build create mode 100644 browser/base/content/test/offlineChild.cacheManifest create mode 100644 browser/base/content/test/offlineChild.cacheManifest^headers^ create mode 100644 browser/base/content/test/offlineChild.html create mode 100644 browser/base/content/test/offlineChild2.cacheManifest create mode 100644 browser/base/content/test/offlineChild2.cacheManifest^headers^ create mode 100644 browser/base/content/test/offlineChild2.html create mode 100644 browser/base/content/test/offlineEvent.cacheManifest create mode 100644 browser/base/content/test/offlineEvent.cacheManifest^headers^ create mode 100644 browser/base/content/test/offlineEvent.html create mode 100644 browser/base/content/test/offlineQuotaNotification.cacheManifest create mode 100644 browser/base/content/test/offlineQuotaNotification.html create mode 100644 browser/base/content/test/page_style_sample.html create mode 100644 browser/base/content/test/pluginCrashCommentAndURL.html create mode 100644 browser/base/content/test/plugin_add_dynamically.html create mode 100644 browser/base/content/test/plugin_alternate_content.html create mode 100644 browser/base/content/test/plugin_both.html create mode 100644 browser/base/content/test/plugin_both2.html create mode 100644 browser/base/content/test/plugin_bug744745.html create mode 100644 browser/base/content/test/plugin_bug749455.html create mode 100644 browser/base/content/test/plugin_bug752516.html create mode 100644 browser/base/content/test/plugin_bug787619.html create mode 100644 browser/base/content/test/plugin_bug797677.html create mode 100644 browser/base/content/test/plugin_bug820497.html create mode 100644 browser/base/content/test/plugin_clickToPlayAllow.html create mode 100644 browser/base/content/test/plugin_clickToPlayDeny.html create mode 100644 browser/base/content/test/plugin_data_url.html create mode 100644 browser/base/content/test/plugin_hidden_to_visible.html create mode 100644 browser/base/content/test/plugin_test.html create mode 100644 browser/base/content/test/plugin_test2.html create mode 100644 browser/base/content/test/plugin_test3.html create mode 100644 browser/base/content/test/plugin_two_types.html create mode 100644 browser/base/content/test/plugin_unknown.html create mode 100644 browser/base/content/test/print_postdata.sjs create mode 100644 browser/base/content/test/privateBrowsingMode.js create mode 100644 browser/base/content/test/redirect_bug623155.sjs create mode 100644 browser/base/content/test/social/Makefile.in create mode 100644 browser/base/content/test/social/blocklist.xml create mode 100644 browser/base/content/test/social/browser_addons.js create mode 100644 browser/base/content/test/social/browser_blocklist.js create mode 100644 browser/base/content/test/social/browser_chat_tearoff.js create mode 100644 browser/base/content/test/social/browser_defaults.js create mode 100644 browser/base/content/test/social/browser_share.js create mode 100644 browser/base/content/test/social/browser_social_activation.js create mode 100644 browser/base/content/test/social/browser_social_chatwindow.js create mode 100644 browser/base/content/test/social/browser_social_chatwindow_resize.js create mode 100644 browser/base/content/test/social/browser_social_chatwindowfocus.js create mode 100644 browser/base/content/test/social/browser_social_errorPage.js create mode 100644 browser/base/content/test/social/browser_social_flyout.js create mode 100644 browser/base/content/test/social/browser_social_isVisible.js create mode 100644 browser/base/content/test/social/browser_social_markButton.js create mode 100644 browser/base/content/test/social/browser_social_mozSocial_API.js create mode 100644 browser/base/content/test/social/browser_social_multiprovider.js create mode 100644 browser/base/content/test/social/browser_social_perwindowPB.js create mode 100644 browser/base/content/test/social/browser_social_sidebar.js create mode 100644 browser/base/content/test/social/browser_social_toolbar.js create mode 100644 browser/base/content/test/social/browser_social_window.js create mode 100644 browser/base/content/test/social/head.js create mode 100644 browser/base/content/test/social/moz.build create mode 100644 browser/base/content/test/social/moz.png create mode 100644 browser/base/content/test/social/opengraph/Makefile.in create mode 100644 browser/base/content/test/social/opengraph/moz.build create mode 100644 browser/base/content/test/social/opengraph/og_invalid_url.html create mode 100644 browser/base/content/test/social/opengraph/opengraph.html create mode 100644 browser/base/content/test/social/opengraph/shortlink_linkrel.html create mode 100644 browser/base/content/test/social/opengraph/shorturl_link.html create mode 100644 browser/base/content/test/social/opengraph/shorturl_linkrel.html create mode 100644 browser/base/content/test/social/share.html create mode 100644 browser/base/content/test/social/social_activate.html create mode 100644 browser/base/content/test/social/social_activate_iframe.html create mode 100644 browser/base/content/test/social/social_chat.html create mode 100644 browser/base/content/test/social/social_flyout.html create mode 100644 browser/base/content/test/social/social_mark_image.png create mode 100644 browser/base/content/test/social/social_panel.html create mode 100644 browser/base/content/test/social/social_sidebar.html create mode 100644 browser/base/content/test/social/social_window.html create mode 100644 browser/base/content/test/social/social_worker.js create mode 100644 browser/base/content/test/subtst_contextmenu.html create mode 100644 browser/base/content/test/test_bug364677.html create mode 100644 browser/base/content/test/test_bug395533.html create mode 100644 browser/base/content/test/test_bug435035.html create mode 100644 browser/base/content/test/test_bug452451.html create mode 100644 browser/base/content/test/test_bug462673.html create mode 100644 browser/base/content/test/test_bug628179.html create mode 100644 browser/base/content/test/test_bug839103.html create mode 100644 browser/base/content/test/test_contextmenu.html create mode 100644 browser/base/content/test/test_feed_discovery.html create mode 100644 browser/base/content/test/test_offlineNotification.html create mode 100644 browser/base/content/test/test_offline_gzip.html create mode 100644 browser/base/content/test/test_wyciwyg_copying.html create mode 100644 browser/base/content/test/title_test.svg create mode 100644 browser/base/content/test/video.ogg create mode 100644 browser/base/content/test/zoom_test.html create mode 100644 browser/base/content/urlbarBindings.xml create mode 100644 browser/base/content/utilityOverlay.js create mode 100644 browser/base/content/viewSourceOverlay.xul create mode 100644 browser/base/content/web-panels.js create mode 100644 browser/base/content/web-panels.xul create mode 100644 browser/base/content/win6BrowserOverlay.xul create mode 100644 browser/base/jar.mn create mode 100644 browser/base/moz.build (limited to 'browser/base') diff --git a/browser/base/Makefile.in b/browser/base/Makefile.in new file mode 100644 index 000000000..285ef15f0 --- /dev/null +++ b/browser/base/Makefile.in @@ -0,0 +1,43 @@ +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +DEPTH = @DEPTH@ +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +include $(topsrcdir)/config/config.mk + +abs_srcdir = $(call core_abspath,$(srcdir)) + +CHROME_DEPS += $(abs_srcdir)/content/overrides/app-license.html + +include $(topsrcdir)/config/rules.mk + +PRE_RELEASE_SUFFIX := "" + +DEFINES += \ + -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \ + -DAPP_LICENSE_BLOCK=$(abs_srcdir)/content/overrides/app-license.html \ + -DPRE_RELEASE_SUFFIX="$(PRE_RELEASE_SUFFIX)" \ + $(NULL) + +ifneq (,$(filter windows gtk2 gtk3 cocoa, $(MOZ_WIDGET_TOOLKIT))) +DEFINES += -DHAVE_SHELL_SERVICE=1 +endif + +ifneq (,$(filter windows cocoa gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT))) +DEFINES += -DCONTEXT_COPY_IMAGE_CONTENTS=1 +endif + +ifneq (,$(filter windows cocoa, $(MOZ_WIDGET_TOOLKIT))) +DEFINES += -DCAN_DRAW_IN_TITLEBAR=1 +endif + +ifneq (,$(filter windows gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT))) +DEFINES += -DMENUBAR_CAN_AUTOHIDE=1 +endif diff --git a/browser/base/content/aboutDialog.css b/browser/base/content/aboutDialog.css new file mode 100644 index 000000000..7145ef1c7 --- /dev/null +++ b/browser/base/content/aboutDialog.css @@ -0,0 +1,76 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#PMaboutDialog { + width: 620px; +} + +#PMrightBox { + background-image: url("chrome://branding/content/about-wordmark.png"); + background-repeat: no-repeat; + /* padding-top creates room for the wordmark */ + padding-top: 38px; + margin-top:20px; +} + +#PMrightBox:-moz-locale-dir(rtl) { + background-position: 100% 0; +} + +#PMbottomBox { + padding: 15px 10px 0; +} + +#PMversion { + margin-top: 10px; + -moz-margin-start: 0; + -moz-user-select: text; + -moz-user-focus: normal; + cursor: text; +} + +#distribution, +#distributionId { + font-weight: bold; + display: none; + margin-top: 0; + margin-bottom: 0; +} + +.text-blurb { + margin-bottom: 10px; + -moz-margin-start: 0; + -moz-padding-start: 0; +} + +#updateButton, +#updateDeck > hbox > label { + -moz-margin-start: 0; + -moz-padding-start: 0; +} + +.update-throbber { + width: 16px; + min-height: 16px; + -moz-margin-end: 3px; + list-style-image: url("chrome://global/skin/icons/loading_16.png"); +} + +.text-link, +.text-link:focus { + margin: 0px; + padding: 0px; +} + +.bottom-link, +.bottom-link:focus { + text-align: center; + margin: 0 40px; +} + +#currentChannel { + margin: 0; + padding: 0; + font-weight: bold; +} diff --git a/browser/base/content/aboutDialog.js b/browser/base/content/aboutDialog.js new file mode 100644 index 000000000..ea8350cbb --- /dev/null +++ b/browser/base/content/aboutDialog.js @@ -0,0 +1,608 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +// Services = object with smart getters for common XPCOM services +Components.utils.import("resource://gre/modules/Services.jsm"); + +const PREF_EM_HOTFIX_ID = "extensions.hotfix.id"; + +function init(aEvent) +{ + if (aEvent.target != document) + return; + + try { + var distroId = Services.prefs.getCharPref("distribution.id"); + if (distroId) { + var distroVersion = Services.prefs.getCharPref("distribution.version"); + + var distroIdField = document.getElementById("distributionId"); + distroIdField.value = distroId + " - " + distroVersion; + distroIdField.style.display = "block"; + + // This must be set last because it might not exist due to bug 895473. + var distroAbout = Services.prefs.getComplexValue("distribution.about", + Components.interfaces.nsISupportsString); + var distroField = document.getElementById("distribution"); + distroField.value = distroAbout; + distroField.style.display = "block"; + } + } + catch (e) { + // Pref is unset + Components.utils.reportError(e); + } + + // Include the build ID and display warning if this is an "a#" (nightly or aurora) build + let version = Services.appinfo.version; + if (/a\d+$/.test(version)) { + let buildID = Services.appinfo.appBuildID; + let buildDate = buildID.slice(0,4) + "-" + buildID.slice(4,6) + "-" + buildID.slice(6,8); + document.getElementById("version").textContent += " (" + buildDate + ")"; + document.getElementById("experimental").hidden = false; + document.getElementById("communityDesc").hidden = true; + } + +#ifdef MOZ_UPDATER + gAppUpdater = new appUpdater(); + +#if MOZ_UPDATE_CHANNEL != release + let defaults = Services.prefs.getDefaultBranch(""); + let channelLabel = document.getElementById("currentChannel"); + channelLabel.value = defaults.getCharPref("app.update.channel"); +#endif +#endif + +#ifdef XP_MACOSX + // it may not be sized at this point, and we need its width to calculate its position + window.sizeToContent(); + window.moveTo((screen.availWidth / 2) - (window.outerWidth / 2), screen.availHeight / 5); +#endif +} + +#ifdef MOZ_UPDATER +Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); +Components.utils.import("resource://gre/modules/DownloadUtils.jsm"); +Components.utils.import("resource://gre/modules/AddonManager.jsm"); + +var gAppUpdater; + +function onUnload(aEvent) { + if (gAppUpdater.isChecking) + gAppUpdater.checker.stopChecking(Components.interfaces.nsIUpdateChecker.CURRENT_CHECK); + // Safe to call even when there isn't a download in progress. + gAppUpdater.removeDownloadListener(); + gAppUpdater = null; +} + + +function appUpdater() +{ + this.updateDeck = document.getElementById("updateDeck"); + + // Hide the update deck when there is already an update window open to avoid + // syncing issues between them. + if (Services.wm.getMostRecentWindow("Update:Wizard")) { + this.updateDeck.hidden = true; + return; + } + + XPCOMUtils.defineLazyServiceGetter(this, "aus", + "@mozilla.org/updates/update-service;1", + "nsIApplicationUpdateService"); + XPCOMUtils.defineLazyServiceGetter(this, "checker", + "@mozilla.org/updates/update-checker;1", + "nsIUpdateChecker"); + XPCOMUtils.defineLazyServiceGetter(this, "um", + "@mozilla.org/updates/update-manager;1", + "nsIUpdateManager"); + + this.bundle = Services.strings. + createBundle("chrome://browser/locale/browser.properties"); + + this.updateBtn = document.getElementById("updateButton"); + + // The button label value must be set so its height is correct. + this.setupUpdateButton("update.checkInsideButton"); + + let manualURL = Services.urlFormatter.formatURLPref("app.update.url.manual"); + let manualLink = document.getElementById("manualLink"); + manualLink.value = manualURL; + manualLink.href = manualURL; + document.getElementById("failedLink").href = manualURL; + + if (this.updateDisabledAndLocked) { + this.selectPanel("adminDisabled"); + return; + } + + if (this.isPending || this.isApplied) { + this.setupUpdateButton("update.restart." + + (this.isMajor ? "upgradeButton" : "updateButton")); + return; + } + + if (this.aus.isOtherInstanceHandlingUpdates) { + this.selectPanel("otherInstanceHandlingUpdates"); + return; + } + + if (this.isDownloading) { + this.startDownload(); + return; + } + + if (this.updateEnabled && this.updateAuto) { + this.selectPanel("checkingForUpdates"); + this.isChecking = true; + this.checker.checkForUpdates(this.updateCheckListener, true); + return; + } +} + +appUpdater.prototype = +{ + // true when there is an update check in progress. + isChecking: false, + + // true when there is an update already staged / ready to be applied. + get isPending() { + if (this.update) { + return this.update.state == "pending" || + this.update.state == "pending-service"; + } + return this.um.activeUpdate && + (this.um.activeUpdate.state == "pending" || + this.um.activeUpdate.state == "pending-service"); + }, + + // true when there is an update already installed in the background. + get isApplied() { + if (this.update) + return this.update.state == "applied" || + this.update.state == "applied-service"; + return this.um.activeUpdate && + (this.um.activeUpdate.state == "applied" || + this.um.activeUpdate.state == "applied-service"); + }, + + // true when there is an update download in progress. + get isDownloading() { + if (this.update) + return this.update.state == "downloading"; + return this.um.activeUpdate && + this.um.activeUpdate.state == "downloading"; + }, + + // true when the update type is major. + get isMajor() { + if (this.update) + return this.update.type == "major"; + return this.um.activeUpdate.type == "major"; + }, + + // true when updating is disabled by an administrator. + get updateDisabledAndLocked() { + return !this.updateEnabled && + Services.prefs.prefIsLocked("app.update.enabled"); + }, + + // true when updating is enabled. + get updateEnabled() { + try { + return Services.prefs.getBoolPref("app.update.enabled"); + } + catch (e) { } + return true; // Firefox default is true + }, + + // true when updating in background is enabled. + get backgroundUpdateEnabled() { + return this.updateEnabled && + gAppUpdater.aus.canStageUpdates; + }, + + // true when updating is automatic. + get updateAuto() { + try { + return Services.prefs.getBoolPref("app.update.auto"); + } + catch (e) { } + return true; // Firefox default is true + }, + + /** + * Sets the deck's selected panel. + * + * @param aChildID + * The id of the deck's child to select. + */ + selectPanel: function(aChildID) { + this.updateDeck.selectedPanel = document.getElementById(aChildID); + this.updateBtn.disabled = (aChildID != "updateButtonBox"); + }, + + /** + * Sets the update button's label and accesskey. + * + * @param aKeyPrefix + * The prefix for the properties file entry to use for setting the + * label and accesskey. + */ + setupUpdateButton: function(aKeyPrefix) { + this.updateBtn.label = this.bundle.GetStringFromName(aKeyPrefix + ".label"); + this.updateBtn.accessKey = this.bundle.GetStringFromName(aKeyPrefix + ".accesskey"); + if (!document.commandDispatcher.focusedElement || + document.commandDispatcher.focusedElement == this.updateBtn) + this.updateBtn.focus(); + }, + + /** + * Handles oncommand for the update button. + */ + buttonOnCommand: function() { + if (this.isPending || this.isApplied) { + // Notify all windows that an application quit has been requested. + let cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"]. + createInstance(Components.interfaces.nsISupportsPRBool); + Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart"); + + // Something aborted the quit process. + if (cancelQuit.data) + return; + + let appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"]. + getService(Components.interfaces.nsIAppStartup); + + // If already in safe mode restart in safe mode (bug 327119) + if (Services.appinfo.inSafeMode) { + appStartup.restartInSafeMode(Components.interfaces.nsIAppStartup.eAttemptQuit); + return; + } + + appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit | + Components.interfaces.nsIAppStartup.eRestart); + return; + } + + const URI_UPDATE_PROMPT_DIALOG = "chrome://mozapps/content/update/updates.xul"; + // Firefox no longer displays a license for updates and the licenseURL check + // is just in case a distibution does. + if (this.update && (this.update.billboardURL || this.update.licenseURL || + this.addons.length != 0)) { + var ary = null; + ary = Components.classes["@mozilla.org/supports-array;1"]. + createInstance(Components.interfaces.nsISupportsArray); + ary.AppendElement(this.update); + var openFeatures = "chrome,centerscreen,dialog=no,resizable=no,titlebar,toolbar=no"; + Services.ww.openWindow(null, URI_UPDATE_PROMPT_DIALOG, "", openFeatures, ary); + window.close(); + return; + } + + this.selectPanel("checkingForUpdates"); + this.isChecking = true; + this.checker.checkForUpdates(this.updateCheckListener, true); + }, + + /** + * Implements nsIUpdateCheckListener. The methods implemented by + * nsIUpdateCheckListener are in a different scope from nsIIncrementalDownload + * to make it clear which are used by each interface. + */ + updateCheckListener: { + /** + * See nsIUpdateService.idl + */ + onCheckComplete: function(aRequest, aUpdates, aUpdateCount) { + gAppUpdater.isChecking = false; + gAppUpdater.update = gAppUpdater.aus. + selectUpdate(aUpdates, aUpdates.length); + if (!gAppUpdater.update) { + gAppUpdater.selectPanel("noUpdatesFound"); + return; + } + + if (gAppUpdater.update.unsupported) { + if (gAppUpdater.update.detailsURL) { + let unsupportedLink = document.getElementById("unsupportedLink"); + unsupportedLink.href = gAppUpdater.update.detailsURL; + } + gAppUpdater.selectPanel("unsupportedSystem"); + return; + } + + if (!gAppUpdater.aus.canApplyUpdates) { + gAppUpdater.selectPanel("manualUpdate"); + return; + } + + // Firefox no longer displays a license for updates and the licenseURL + // check is just in case a distibution does. + if (gAppUpdater.update.billboardURL || gAppUpdater.update.licenseURL) { + gAppUpdater.selectPanel("updateButtonBox"); + gAppUpdater.setupUpdateButton("update.openUpdateUI." + + (this.isMajor ? "upgradeButton" + : "applyButton")); + return; + } + + if (!gAppUpdater.update.appVersion || + Services.vc.compare(gAppUpdater.update.appVersion, + Services.appinfo.version) == 0) { + gAppUpdater.startDownload(); + return; + } + + gAppUpdater.checkAddonCompatibility(); + }, + + /** + * See nsIUpdateService.idl + */ + onError: function(aRequest, aUpdate) { + // Errors in the update check are treated as no updates found. If the + // update check fails repeatedly without a success the user will be + // notified with the normal app update user interface so this is safe. + gAppUpdater.isChecking = false; + gAppUpdater.selectPanel("noUpdatesFound"); + }, + + /** + * See nsISupports.idl + */ + QueryInterface: function(aIID) { + if (!aIID.equals(Components.interfaces.nsIUpdateCheckListener) && + !aIID.equals(Components.interfaces.nsISupports)) + throw Components.results.NS_ERROR_NO_INTERFACE; + return this; + } + }, + + /** + * Checks the compatibility of add-ons for the application update. + */ + checkAddonCompatibility: function() { + try { + var hotfixID = Services.prefs.getCharPref(PREF_EM_HOTFIX_ID); + } + catch (e) { } + + var self = this; + AddonManager.getAllAddons(function(aAddons) { + self.addons = []; + self.addonsCheckedCount = 0; + aAddons.forEach(function(aAddon) { + // Protect against code that overrides the add-ons manager and doesn't + // implement the isCompatibleWith or the findUpdates method. + if (!("isCompatibleWith" in aAddon) || !("findUpdates" in aAddon)) { + let errMsg = "Add-on doesn't implement either the isCompatibleWith " + + "or the findUpdates method!"; + if (aAddon.id) + errMsg += " Add-on ID: " + aAddon.id; + Components.utils.reportError(errMsg); + return; + } + + // If an add-on isn't appDisabled and isn't userDisabled then it is + // either active now or the user expects it to be active after the + // restart. If that is the case and the add-on is not installed by the + // application and is not compatible with the new application version + // then the user should be warned that the add-on will become + // incompatible. If an addon's type equals plugin it is skipped since + // checking plugins compatibility information isn't supported and + // getting the scope property of a plugin breaks in some environments + // (see bug 566787). The hotfix add-on is also ignored as it shouldn't + // block the user from upgrading. + try { + if (aAddon.type != "plugin" && aAddon.id != hotfixID && + !aAddon.appDisabled && !aAddon.userDisabled && + aAddon.scope != AddonManager.SCOPE_APPLICATION && + aAddon.isCompatible && + !aAddon.isCompatibleWith(self.update.appVersion, + self.update.platformVersion)) + self.addons.push(aAddon); + } + catch (e) { + Components.utils.reportError(e); + } + }); + self.addonsTotalCount = self.addons.length; + if (self.addonsTotalCount == 0) { + self.startDownload(); + return; + } + + self.checkAddonsForUpdates(); + }); + }, + + /** + * Checks if there are updates for add-ons that are incompatible with the + * application update. + */ + checkAddonsForUpdates: function() { + this.addons.forEach(function(aAddon) { + aAddon.findUpdates(this, AddonManager.UPDATE_WHEN_NEW_APP_DETECTED, + this.update.appVersion, + this.update.platformVersion); + }, this); + }, + + /** + * See XPIProvider.jsm + */ + onCompatibilityUpdateAvailable: function(aAddon) { + for (var i = 0; i < this.addons.length; ++i) { + if (this.addons[i].id == aAddon.id) { + this.addons.splice(i, 1); + break; + } + } + }, + + /** + * See XPIProvider.jsm + */ + onUpdateAvailable: function(aAddon, aInstall) { + if (!Services.blocklist.isAddonBlocklisted(aAddon.id, aInstall.version, + this.update.appVersion, + this.update.platformVersion)) { + // Compatibility or new version updates mean the same thing here. + this.onCompatibilityUpdateAvailable(aAddon); + } + }, + + /** + * See XPIProvider.jsm + */ + onUpdateFinished: function(aAddon) { + ++this.addonsCheckedCount; + + if (this.addonsCheckedCount < this.addonsTotalCount) + return; + + if (this.addons.length == 0) { + // Compatibility updates or new version updates were found for all add-ons + this.startDownload(); + return; + } + + this.selectPanel("updateButtonBox"); + this.setupUpdateButton("update.openUpdateUI." + + (this.isMajor ? "upgradeButton" : "applyButton")); + }, + + /** + * Starts the download of an update mar. + */ + startDownload: function() { + if (!this.update) + this.update = this.um.activeUpdate; + this.update.QueryInterface(Components.interfaces.nsIWritablePropertyBag); + this.update.setProperty("foregroundDownload", "true"); + + this.aus.pauseDownload(); + let state = this.aus.downloadUpdate(this.update, false); + if (state == "failed") { + this.selectPanel("downloadFailed"); + return; + } + + this.setupDownloadingUI(); + }, + + /** + * Switches to the UI responsible for tracking the download. + */ + setupDownloadingUI: function() { + this.downloadStatus = document.getElementById("downloadStatus"); + this.downloadStatus.value = + DownloadUtils.getTransferTotal(0, this.update.selectedPatch.size); + this.selectPanel("downloading"); + this.aus.addDownloadListener(this); + }, + + removeDownloadListener: function() { + if (this.aus) { + this.aus.removeDownloadListener(this); + } + }, + + /** + * See nsIRequestObserver.idl + */ + onStartRequest: function(aRequest, aContext) { + }, + + /** + * See nsIRequestObserver.idl + */ + onStopRequest: function(aRequest, aContext, aStatusCode) { + switch (aStatusCode) { + case Components.results.NS_ERROR_UNEXPECTED: + if (this.update.selectedPatch.state == "download-failed" && + (this.update.isCompleteUpdate || this.update.patchCount != 2)) { + // Verification error of complete patch, informational text is held in + // the update object. + this.removeDownloadListener(); + this.selectPanel("downloadFailed"); + break; + } + // Verification failed for a partial patch, complete patch is now + // downloading so return early and do NOT remove the download listener! + break; + case Components.results.NS_BINDING_ABORTED: + // Do not remove UI listener since the user may resume downloading again. + break; + case Components.results.NS_OK: + this.removeDownloadListener(); + if (this.backgroundUpdateEnabled) { + this.selectPanel("applying"); + let update = this.um.activeUpdate; + let self = this; + Services.obs.addObserver(function (aSubject, aTopic, aData) { + // Update the UI when the background updater is finished + let status = aData; + if (status == "applied" || status == "applied-service" || + status == "pending" || status == "pending-service") { + // If the update is successfully applied, or if the updater has + // fallen back to non-staged updates, show the Restart to Update + // button. + self.selectPanel("updateButtonBox"); + self.setupUpdateButton("update.restart." + + (self.isMajor ? "upgradeButton" : "updateButton")); + } else if (status == "failed") { + // Background update has failed, let's show the UI responsible for + // prompting the user to update manually. + self.selectPanel("downloadFailed"); + } else if (status == "downloading") { + // We've fallen back to downloading the full update because the + // partial update failed to get staged in the background. + // Therefore we need to keep our observer. + self.setupDownloadingUI(); + return; + } + Services.obs.removeObserver(arguments.callee, "update-staged"); + }, "update-staged", false); + } else { + this.selectPanel("updateButtonBox"); + this.setupUpdateButton("update.restart." + + (this.isMajor ? "upgradeButton" : "updateButton")); + } + break; + default: + this.removeDownloadListener(); + this.selectPanel("downloadFailed"); + break; + } + + }, + + /** + * See nsIProgressEventSink.idl + */ + onStatus: function(aRequest, aContext, aStatus, aStatusArg) { + }, + + /** + * See nsIProgressEventSink.idl + */ + onProgress: function(aRequest, aContext, aProgress, aProgressMax) { + this.downloadStatus.value = + DownloadUtils.getTransferTotal(aProgress, aProgressMax); + }, + + /** + * See nsISupports.idl + */ + QueryInterface: function(aIID) { + if (!aIID.equals(Components.interfaces.nsIProgressEventSink) && + !aIID.equals(Components.interfaces.nsIRequestObserver) && + !aIID.equals(Components.interfaces.nsISupports)) + throw Components.results.NS_ERROR_NO_INTERFACE; + return this; + } +}; +#endif diff --git a/browser/base/content/aboutDialog.xul b/browser/base/content/aboutDialog.xul new file mode 100644 index 000000000..5ce8212f4 --- /dev/null +++ b/browser/base/content/aboutDialog.xul @@ -0,0 +1,135 @@ + + +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + + + + + + +%brandDTD; + +%aboutDialogDTD; +]> + +#ifdef XP_MACOSX + +#endif + + + + + + + + + + + +
+ + +
+

&robots.errorTitleText;

+
+ + +
+ + +
+

&robots.errorShortDescText;

+
+ + +
+
    +
  • &robots.errorLongDesc1;
  • +
  • &robots.errorLongDesc2;
  • +
  • &robots.errorLongDesc3;
  • +
  • &robots.errorLongDesc4;
  • +
+
+ + +
+

&robots.errorTrailerDescText;

+
+ +
+ + + + + + +
+ + + diff --git a/browser/base/content/aboutSocialError.xhtml b/browser/base/content/aboutSocialError.xhtml new file mode 100644 index 000000000..6bef2d7bd --- /dev/null +++ b/browser/base/content/aboutSocialError.xhtml @@ -0,0 +1,124 @@ + + + + + + %htmlDTD; + + %netErrorDTD; +]> + + + + &loadError.label; + + + + +
+

+

+
+
+
+ + + + diff --git a/browser/base/content/abouthealthreport/abouthealth.css b/browser/base/content/abouthealthreport/abouthealth.css new file mode 100644 index 000000000..3dd40fc24 --- /dev/null +++ b/browser/base/content/abouthealthreport/abouthealth.css @@ -0,0 +1,15 @@ +* { + margin: 0; + padding: 0; +} + +html, body { + height: 100%; +} + +#remote-report { + width: 100%; + height: 100%; + border: 0; + display: flex; +} diff --git a/browser/base/content/abouthealthreport/abouthealth.js b/browser/base/content/abouthealthreport/abouthealth.js new file mode 100644 index 000000000..84c054bca --- /dev/null +++ b/browser/base/content/abouthealthreport/abouthealth.js @@ -0,0 +1,141 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +"use strict"; + +const {classes: Cc, interfaces: Ci, utils: Cu} = Components; + +Cu.import("resource://gre/modules/Preferences.jsm"); +Cu.import("resource://gre/modules/Services.jsm"); + +const reporter = Cc["@mozilla.org/datareporting/service;1"] + .getService(Ci.nsISupports) + .wrappedJSObject + .healthReporter; + +const policy = Cc["@mozilla.org/datareporting/service;1"] + .getService(Ci.nsISupports) + .wrappedJSObject + .policy; + +const prefs = new Preferences("datareporting.healthreport."); + + +let healthReportWrapper = { + init: function () { + reporter.onInit().then(healthReportWrapper.refreshPayload, + healthReportWrapper.handleInitFailure); + + let iframe = document.getElementById("remote-report"); + iframe.addEventListener("load", healthReportWrapper.initRemotePage, false); + let report = this._getReportURI(); + iframe.src = report.spec; + prefs.observe("uploadEnabled", this.updatePrefState, healthReportWrapper); + }, + + uninit: function () { + prefs.ignore("uploadEnabled", this.updatePrefState, healthReportWrapper); + }, + + _getReportURI: function () { + let url = Services.urlFormatter.formatURLPref("datareporting.healthreport.about.reportUrl"); + return Services.io.newURI(url, null, null); + }, + + onOptIn: function () { + policy.recordHealthReportUploadEnabled(true, + "Health report page sent opt-in command."); + this.updatePrefState(); + }, + + onOptOut: function () { + policy.recordHealthReportUploadEnabled(false, + "Health report page sent opt-out command."); + this.updatePrefState(); + }, + + updatePrefState: function () { + try { + let prefs = { + enabled: policy.healthReportUploadEnabled, + } + this.injectData("prefs", prefs); + } catch (e) { + this.reportFailure(this.ERROR_PREFS_FAILED); + } + }, + + refreshPayload: function () { + reporter.collectAndObtainJSONPayload().then(healthReportWrapper.updatePayload, + healthReportWrapper.handlePayloadFailure); + }, + + updatePayload: function (data) { + healthReportWrapper.injectData("payload", data); + }, + + injectData: function (type, content) { + let report = this._getReportURI(); + + // file URIs can't be used for targetOrigin, so we use "*" for this special case + // in all other cases, pass in the URL to the report so we properly restrict the message dispatch + let reportUrl = report.scheme == "file" ? "*" : report.spec; + + let data = { + type: type, + content: content + } + + let iframe = document.getElementById("remote-report"); + iframe.contentWindow.postMessage(data, reportUrl); + }, + + handleRemoteCommand: function (evt) { + switch (evt.detail.command) { + case "DisableDataSubmission": + this.onOptOut(); + break; + case "EnableDataSubmission": + this.onOptIn(); + break; + case "RequestCurrentPrefs": + this.updatePrefState(); + break; + case "RequestCurrentPayload": + this.refreshPayload(); + break; + default: + Cu.reportError("Unexpected remote command received: " + evt.detail.command + ". Ignoring command."); + break; + } + }, + + initRemotePage: function () { + let iframe = document.getElementById("remote-report").contentDocument; + iframe.addEventListener("RemoteHealthReportCommand", + function onCommand(e) {healthReportWrapper.handleRemoteCommand(e);}, + false); + healthReportWrapper.updatePrefState(); + }, + + // error handling + ERROR_INIT_FAILED: 1, + ERROR_PAYLOAD_FAILED: 2, + ERROR_PREFS_FAILED: 3, + + reportFailure: function (error) { + let details = { + errorType: error, + } + healthReportWrapper.injectData("error", details); + }, + + handleInitFailure: function () { + healthReportWrapper.reportFailure(healthReportWrapper.ERROR_INIT_FAILED); + }, + + handlePayloadFailure: function () { + healthReportWrapper.reportFailure(healthReportWrapper.ERROR_PAYLOAD_FAILED); + }, +} diff --git a/browser/base/content/abouthealthreport/abouthealth.xhtml b/browser/base/content/abouthealthreport/abouthealth.xhtml new file mode 100644 index 000000000..62b27e266 --- /dev/null +++ b/browser/base/content/abouthealthreport/abouthealth.xhtml @@ -0,0 +1,32 @@ + + + + %htmlDTD; + + %brandDTD; + + %securityPrefsDTD; + + %aboutHealthReportDTD; +]> + + + + &abouthealth.pagetitle; + + + + + + + +
+ + +
+

&safeb.blocked.phishingPage.title;

+

&safeb.blocked.malwarePage.title;

+
+ +
+ + +
+

&safeb.blocked.phishingPage.shortDesc;

+

&safeb.blocked.malwarePage.shortDesc;

+
+ + +
+

&safeb.blocked.phishingPage.longDesc;

+

&safeb.blocked.malwarePage.longDesc;

+
+ + +
+ + + +
+
+
+ +
+
+ + + + diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js new file mode 100644 index 000000000..b638f31f9 --- /dev/null +++ b/browser/base/content/browser-addons.js @@ -0,0 +1,417 @@ +# -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +const gXPInstallObserver = { + _findChildShell: function (aDocShell, aSoughtShell) + { + if (aDocShell == aSoughtShell) + return aDocShell; + + var node = aDocShell.QueryInterface(Components.interfaces.nsIDocShellTreeNode); + for (var i = 0; i < node.childCount; ++i) { + var docShell = node.getChildAt(i); + docShell = this._findChildShell(docShell, aSoughtShell); + if (docShell == aSoughtShell) + return docShell; + } + return null; + }, + + _getBrowser: function (aDocShell) + { + for (let browser of gBrowser.browsers) { + if (this._findChildShell(browser.docShell, aDocShell)) + return browser; + } + return null; + }, + + observe: function (aSubject, aTopic, aData) + { + var brandBundle = document.getElementById("bundle_brand"); + var installInfo = aSubject.QueryInterface(Components.interfaces.amIWebInstallInfo); + var win = installInfo.originatingWindow; + var shell = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor) + .getInterface(Components.interfaces.nsIWebNavigation) + .QueryInterface(Components.interfaces.nsIDocShell); + var browser = this._getBrowser(shell); + if (!browser) + return; + const anchorID = "addons-notification-icon"; + var messageString, action; + var brandShortName = brandBundle.getString("brandShortName"); + + var notificationID = aTopic; + // Make notifications persist a minimum of 30 seconds + var options = { + timeout: Date.now() + 30000 + }; + + switch (aTopic) { + case "addon-install-disabled": + notificationID = "xpinstall-disabled" + + if (gPrefService.prefIsLocked("xpinstall.enabled")) { + messageString = gNavigatorBundle.getString("xpinstallDisabledMessageLocked"); + buttons = []; + } + else { + messageString = gNavigatorBundle.getString("xpinstallDisabledMessage"); + + action = { + label: gNavigatorBundle.getString("xpinstallDisabledButton"), + accessKey: gNavigatorBundle.getString("xpinstallDisabledButton.accesskey"), + callback: function editPrefs() { + gPrefService.setBoolPref("xpinstall.enabled", true); + } + }; + } + + PopupNotifications.show(browser, notificationID, messageString, anchorID, + action, null, options); + break; + case "addon-install-blocked": + messageString = gNavigatorBundle.getFormattedString("xpinstallPromptWarning", + [brandShortName, installInfo.originatingURI.host]); + + let secHistogram = Components.classes["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry).getHistogramById("SECURITY_UI"); + action = { + label: gNavigatorBundle.getString("xpinstallPromptAllowButton"), + accessKey: gNavigatorBundle.getString("xpinstallPromptAllowButton.accesskey"), + callback: function() { + secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED_CLICK_THROUGH); + installInfo.install(); + } + }; + + secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED); + PopupNotifications.show(browser, notificationID, messageString, anchorID, + action, null, options); + break; + case "addon-install-started": + var needsDownload = function needsDownload(aInstall) { + return aInstall.state != AddonManager.STATE_DOWNLOADED; + } + // If all installs have already been downloaded then there is no need to + // show the download progress + if (!installInfo.installs.some(needsDownload)) + return; + notificationID = "addon-progress"; + messageString = gNavigatorBundle.getString("addonDownloading"); + messageString = PluralForm.get(installInfo.installs.length, messageString); + options.installs = installInfo.installs; + options.contentWindow = browser.contentWindow; + options.sourceURI = browser.currentURI; + options.eventCallback = function(aEvent) { + if (aEvent != "removed") + return; + options.contentWindow = null; + options.sourceURI = null; + }; + PopupNotifications.show(browser, notificationID, messageString, anchorID, + null, null, options); + break; + case "addon-install-failed": + // TODO This isn't terribly ideal for the multiple failure case + for (let install of installInfo.installs) { + let host = (installInfo.originatingURI instanceof Ci.nsIStandardURL) && + installInfo.originatingURI.host; + if (!host) + host = (install.sourceURI instanceof Ci.nsIStandardURL) && + install.sourceURI.host; + + let error = (host || install.error == 0) ? "addonError" : "addonLocalError"; + if (install.error != 0) + error += install.error; + else if (install.addon.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED) + error += "Blocklisted"; + else + error += "Incompatible"; + + messageString = gNavigatorBundle.getString(error); + messageString = messageString.replace("#1", install.name); + if (host) + messageString = messageString.replace("#2", host); + messageString = messageString.replace("#3", brandShortName); + messageString = messageString.replace("#4", Services.appinfo.version); + + PopupNotifications.show(browser, notificationID, messageString, anchorID, + action, null, options); + } + break; + case "addon-install-complete": + var needsRestart = installInfo.installs.some(function(i) { + return i.addon.pendingOperations != AddonManager.PENDING_NONE; + }); + + if (needsRestart) { + messageString = gNavigatorBundle.getString("addonsInstalledNeedsRestart"); + action = { + label: gNavigatorBundle.getString("addonInstallRestartButton"), + accessKey: gNavigatorBundle.getString("addonInstallRestartButton.accesskey"), + callback: function() { + Application.restart(); + } + }; + } + else { + messageString = gNavigatorBundle.getString("addonsInstalled"); + action = null; + } + + messageString = PluralForm.get(installInfo.installs.length, messageString); + messageString = messageString.replace("#1", installInfo.installs[0].name); + messageString = messageString.replace("#2", installInfo.installs.length); + messageString = messageString.replace("#3", brandShortName); + + // Remove notificaion on dismissal, since it's possible to cancel the + // install through the addons manager UI, making the "restart" prompt + // irrelevant. + options.removeOnDismissal = true; + + PopupNotifications.show(browser, notificationID, messageString, anchorID, + action, null, options); + break; + } + } +}; + +/* + * When addons are installed/uninstalled, check and see if the number of items + * on the add-on bar changed: + * - If an add-on was installed, incrementing the count, show the bar. + * - If an add-on was uninstalled, and no more items are left, hide the bar. + */ +let AddonsMgrListener = { + get addonBar() document.getElementById("addon-bar"), + get statusBar() document.getElementById("status-bar"), + getAddonBarItemCount: function() { + // Take into account the contents of the status bar shim for the count. + var itemCount = this.statusBar.childNodes.length; + + var defaultOrNoninteractive = this.addonBar.getAttribute("defaultset") + .split(",") + .concat(["separator", "spacer", "spring"]); + for (let item of this.addonBar.currentSet.split(",")) { + if (defaultOrNoninteractive.indexOf(item) == -1) + itemCount++; + } + + return itemCount; + }, + onInstalling: function(aAddon) { + this.lastAddonBarCount = this.getAddonBarItemCount(); + }, + onInstalled: function(aAddon) { + if (this.getAddonBarItemCount() > this.lastAddonBarCount) + setToolbarVisibility(this.addonBar, true); + }, + onUninstalling: function(aAddon) { + this.lastAddonBarCount = this.getAddonBarItemCount(); + }, + onUninstalled: function(aAddon) { + if (this.getAddonBarItemCount() == 0) + setToolbarVisibility(this.addonBar, false); + }, + onEnabling: function(aAddon) this.onInstalling(), + onEnabled: function(aAddon) this.onInstalled(), + onDisabling: function(aAddon) this.onUninstalling(), + onDisabled: function(aAddon) this.onUninstalled(), +}; + + +var LightWeightThemeWebInstaller = { + handleEvent: function (event) { + switch (event.type) { + case "InstallBrowserTheme": + case "PreviewBrowserTheme": + case "ResetBrowserThemePreview": + // ignore requests from background tabs + if (event.target.ownerDocument.defaultView.top != content) + return; + } + switch (event.type) { + case "InstallBrowserTheme": + this._installRequest(event); + break; + case "PreviewBrowserTheme": + this._preview(event); + break; + case "ResetBrowserThemePreview": + this._resetPreview(event); + break; + case "pagehide": + case "TabSelect": + this._resetPreview(); + break; + } + }, + + get _manager () { + var temp = {}; + Cu.import("resource://gre/modules/LightweightThemeManager.jsm", temp); + delete this._manager; + return this._manager = temp.LightweightThemeManager; + }, + + _installRequest: function (event) { + var node = event.target; + var data = this._getThemeFromNode(node); + if (!data) + return; + + if (this._isAllowed(node)) { + this._install(data); + return; + } + + var allowButtonText = + gNavigatorBundle.getString("lwthemeInstallRequest.allowButton"); + var allowButtonAccesskey = + gNavigatorBundle.getString("lwthemeInstallRequest.allowButton.accesskey"); + var message = + gNavigatorBundle.getFormattedString("lwthemeInstallRequest.message", + [node.ownerDocument.location.host]); + var buttons = [{ + label: allowButtonText, + accessKey: allowButtonAccesskey, + callback: function () { + LightWeightThemeWebInstaller._install(data); + } + }]; + + this._removePreviousNotifications(); + + var notificationBox = gBrowser.getNotificationBox(); + var notificationBar = + notificationBox.appendNotification(message, "lwtheme-install-request", "", + notificationBox.PRIORITY_INFO_MEDIUM, + buttons); + notificationBar.persistence = 1; + }, + + _install: function (newLWTheme) { + var previousLWTheme = this._manager.currentTheme; + + var listener = { + onEnabling: function(aAddon, aRequiresRestart) { + if (!aRequiresRestart) + return; + + let messageString = gNavigatorBundle.getFormattedString("lwthemeNeedsRestart.message", + [aAddon.name], 1); + + let action = { + label: gNavigatorBundle.getString("lwthemeNeedsRestart.button"), + accessKey: gNavigatorBundle.getString("lwthemeNeedsRestart.accesskey"), + callback: function () { + Application.restart(); + } + }; + + let options = { + timeout: Date.now() + 30000 + }; + + PopupNotifications.show(gBrowser.selectedBrowser, "addon-theme-change", + messageString, "addons-notification-icon", + action, null, options); + }, + + onEnabled: function(aAddon) { + LightWeightThemeWebInstaller._postInstallNotification(newLWTheme, previousLWTheme); + } + }; + + AddonManager.addAddonListener(listener); + this._manager.currentTheme = newLWTheme; + AddonManager.removeAddonListener(listener); + }, + + _postInstallNotification: function (newTheme, previousTheme) { + function text(id) { + return gNavigatorBundle.getString("lwthemePostInstallNotification." + id); + } + + var buttons = [{ + label: text("undoButton"), + accessKey: text("undoButton.accesskey"), + callback: function () { + LightWeightThemeWebInstaller._manager.forgetUsedTheme(newTheme.id); + LightWeightThemeWebInstaller._manager.currentTheme = previousTheme; + } + }, { + label: text("manageButton"), + accessKey: text("manageButton.accesskey"), + callback: function () { + BrowserOpenAddonsMgr("addons://list/theme"); + } + }]; + + this._removePreviousNotifications(); + + var notificationBox = gBrowser.getNotificationBox(); + var notificationBar = + notificationBox.appendNotification(text("message"), + "lwtheme-install-notification", "", + notificationBox.PRIORITY_INFO_MEDIUM, + buttons); + notificationBar.persistence = 1; + notificationBar.timeout = Date.now() + 20000; // 20 seconds + }, + + _removePreviousNotifications: function () { + var box = gBrowser.getNotificationBox(); + + ["lwtheme-install-request", + "lwtheme-install-notification"].forEach(function (value) { + var notification = box.getNotificationWithValue(value); + if (notification) + box.removeNotification(notification); + }); + }, + + _previewWindow: null, + _preview: function (event) { + if (!this._isAllowed(event.target)) + return; + + var data = this._getThemeFromNode(event.target); + if (!data) + return; + + this._resetPreview(); + + this._previewWindow = event.target.ownerDocument.defaultView; + this._previewWindow.addEventListener("pagehide", this, true); + gBrowser.tabContainer.addEventListener("TabSelect", this, false); + + this._manager.previewTheme(data); + }, + + _resetPreview: function (event) { + if (!this._previewWindow || + event && !this._isAllowed(event.target)) + return; + + this._previewWindow.removeEventListener("pagehide", this, true); + this._previewWindow = null; + gBrowser.tabContainer.removeEventListener("TabSelect", this, false); + + this._manager.resetPreview(); + }, + + _isAllowed: function (node) { + var pm = Services.perms; + + var uri = node.ownerDocument.documentURIObject; + return pm.testPermission(uri, "install") == pm.ALLOW_ACTION; + }, + + _getThemeFromNode: function (node) { + return this._manager.parseTheme(node.getAttribute("data-browsertheme"), + node.baseURI); + } +} diff --git a/browser/base/content/browser-appmenu.inc b/browser/base/content/browser-appmenu.inc new file mode 100644 index 000000000..87276a537 --- /dev/null +++ b/browser/base/content/browser-appmenu.inc @@ -0,0 +1,400 @@ +# -*- Mode: HTML -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#define ID_PREFIX appmenu_developer_ +#define OMIT_ACCESSKEYS +#include browser-charsetmenu.inc +#undef ID_PREFIX +#undef OMIT_ACCESSKEYS + + + + +#define ID_PREFIX appmenu_ +#define OMIT_ACCESSKEYS +#include browser-charsetmenu.inc +#undef ID_PREFIX +#undef OMIT_ACCESSKEYS + +#ifdef MOZ_SERVICES_SYNC + + + +#endif + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#ifdef MOZ_SERVICES_SYNC + +#endif + + + + + + + + + + + + + + + + + + + + + + + + + + +#ifdef MOZ_SERVICES_HEALTHREPORT + +#endif + + + + + + + + + + + diff --git a/browser/base/content/browser-charsetmenu.inc b/browser/base/content/browser-charsetmenu.inc new file mode 100644 index 000000000..c6ac63e3b --- /dev/null +++ b/browser/base/content/browser-charsetmenu.inc @@ -0,0 +1,145 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#filter substitution + +#expand + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/browser/base/content/browser-context.inc b/browser/base/content/browser-context.inc new file mode 100644 index 000000000..90f045ead --- /dev/null +++ b/browser/base/content/browser-context.inc @@ -0,0 +1,403 @@ +# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#ifdef CONTEXT_COPY_IMAGE_CONTENTS + +#endif + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +