--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -86,17 +86,17 @@ static const RedirEntry kRedirMap[] = {
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
nsIAboutModule::ALLOW_SCRIPT |
nsIAboutModule::MAKE_LINKABLE |
nsIAboutModule::ENABLE_INDEXED_DB },
// the newtab's actual URL will be determined when the channel is created
{ "newtab", "about:blank",
nsIAboutModule::ALLOW_SCRIPT },
- { "preferences", "chrome://browser/content/preferences/in-content/preferences.xul",
+ { "preferences", "chrome://browser/content/preferences/in-content-new/preferences.xul",
nsIAboutModule::ALLOW_SCRIPT },
{ "downloads", "chrome://browser/content/downloads/contentAreaDownloadsView.xul",
nsIAboutModule::ALLOW_SCRIPT },
#ifdef MOZ_SERVICES_HEALTHREPORT
{ "healthreport", "chrome://browser/content/abouthealthreport/abouthealth.xhtml",
nsIAboutModule::ALLOW_SCRIPT },
#endif
{ "accounts", "chrome://browser/content/aboutaccounts/aboutaccounts.xhtml",
--- a/browser/components/preferences/applicationManager.xul
+++ b/browser/components/preferences/applicationManager.xul
@@ -17,17 +17,17 @@
style="&appManager.style;"
persist="screenX screenY">
<script type="application/javascript"
src="chrome://browser/content/utilityOverlay.js"/>
<script type="application/javascript"
src="chrome://browser/content/preferences/applicationManager.js"/>
<script type="application/javascript"
- src="chrome://browser/content/preferences/in-content/applications.js"/>
+ src="chrome://browser/content/preferences/in-content-new/applications.js"/>
<commandset id="appManagerCommandSet">
<command id="cmd_remove"
oncommand="gAppManagerDialog.remove();"
disabled="true"/>
</commandset>
<keyset id="appManagerKeyset">
rename from browser/components/preferences/in-content/advanced.js
rename to browser/components/preferences/in-content-new/advanced.js
new file mode 100644
--- /dev/null
+++ b/browser/components/preferences/in-content-new/advanced.xul
@@ -0,0 +1,194 @@
+# 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/.
+
+<!-- Advanced panel -->
+
+#ifdef MOZ_UPDATER
+ <script type="application/javascript" src="chrome://browser/content/aboutDialog-appUpdater.js"/>
+#endif
+
+<script type="application/javascript"
+ src="chrome://browser/content/preferences/in-content-new/advanced.js"/>
+
+<preferences id="advancedPreferences" hidden="true" data-category="paneAdvanced">
+ <preference id="browser.preferences.advanced.selectedTabIndex"
+ name="browser.preferences.advanced.selectedTabIndex"
+ type="int"/>
+
+<!-- Update tab -->
+#ifdef MOZ_UPDATER
+ <preference id="app.update.enabled"
+ name="app.update.enabled"
+ type="bool"/>
+ <preference id="app.update.auto"
+ name="app.update.auto"
+ type="bool"/>
+
+ <preference id="app.update.disable_button.showUpdateHistory"
+ name="app.update.disable_button.showUpdateHistory"
+ type="bool"/>
+
+#ifdef MOZ_MAINTENANCE_SERVICE
+ <preference id="app.update.service.enabled"
+ name="app.update.service.enabled"
+ type="bool"/>
+#endif
+#endif
+
+ <preference id="browser.search.update"
+ name="browser.search.update"
+ type="bool"/>
+</preferences>
+
+#ifdef HAVE_SHELL_SERVICE
+ <stringbundle id="bundleShell" src="chrome://browser/locale/shellservice.properties"/>
+ <stringbundle id="bundleBrand" src="chrome://branding/locale/brand.properties"/>
+#endif
+
+<hbox id="header-advanced"
+ class="header"
+ hidden="true"
+ data-category="paneAdvanced">
+ <label class="header-name" flex="1">&paneUpdates.title;</label>
+</hbox>
+
+<!-- Update -->
+<groupbox id="updateApp" data-category="paneAdvanced" hidden="true">
+ <caption><label>&updateApplication.label;</label></caption>
+ <hbox align="start">
+ <vbox flex="1">
+ <description>
+ &updateApplication.version.pre;<label id="version"/>&updateApplication.version.post;
+ <label id="releasenotes" class="learnMore text-link" hidden="true">&releaseNotes.link;</label>
+ </description>
+ <description id="distribution" class="text-blurb" hidden="true"/>
+ <description id="distributionId" class="text-blurb" hidden="true"/>
+ </vbox>
+#ifdef MOZ_UPDATER
+ <spacer flex="1"/>
+ <vbox>
+ <button id="showUpdateHistory"
+ class="accessory-button"
+ label="&updateHistory2.label;"
+ accesskey="&updateHistory2.accesskey;"
+ preference="app.update.disable_button.showUpdateHistory"/>
+ </vbox>
+#endif
+ </hbox>
+#ifdef MOZ_UPDATER
+ <vbox id="updateBox">
+ <deck id="updateDeck" orient="vertical">
+ <hbox id="checkForUpdates" align="center">
+ <spacer flex="1"/>
+ <button id="checkForUpdatesButton"
+ label="&update.checkForUpdatesButton.label;"
+ accesskey="&update.checkForUpdatesButton.accesskey;"
+ oncommand="gAppUpdater.checkForUpdates();"/>
+ </hbox>
+ <hbox id="downloadAndInstall" align="center">
+ <spacer flex="1"/>
+ <button id="downloadAndInstallButton"
+ oncommand="gAppUpdater.startDownload();"/>
+ <!-- label and accesskey will be filled by JS -->
+ </hbox>
+ <hbox id="apply" align="center">
+ <spacer flex="1"/>
+ <button id="updateButton"
+ label="&update.updateButton.label3;"
+ accesskey="&update.updateButton.accesskey;"
+ oncommand="gAppUpdater.buttonRestartAfterDownload();"/>
+ </hbox>
+ <hbox id="checkingForUpdates" align="center">
+ <image class="update-throbber"/><label>&update.checkingForUpdates;</label>
+ <spacer flex="1"/>
+ <button label="&update.checkForUpdatesButton.label;"
+ accesskey="&update.checkForUpdatesButton.accesskey;"
+ disabled="true"/>
+ </hbox>
+ <hbox id="downloading" align="center">
+ <image class="update-throbber"/><label>&update.downloading.start;</label><label id="downloadStatus"/><label>&update.downloading.end;</label>
+ </hbox>
+ <hbox id="applying" align="center">
+ <image class="update-throbber"/><label>&update.applying;</label>
+ </hbox>
+ <hbox id="downloadFailed" align="center">
+ <label>&update.failed.start;</label><label id="failedLink" class="text-link">&update.failed.linkText;</label><label>&update.failed.end;</label>
+ <spacer flex="1"/>
+ <button label="&update.checkForUpdatesButton.label;"
+ accesskey="&update.checkForUpdatesButton.accesskey;"
+ oncommand="gAppUpdater.checkForUpdates();"/>
+ </hbox>
+ <hbox id="adminDisabled" align="center">
+ <label>&update.adminDisabled;</label>
+ <spacer flex="1"/>
+ <button label="&update.checkForUpdatesButton.label;"
+ accesskey="&update.checkForUpdatesButton.accesskey;"
+ disabled="true"/>
+ </hbox>
+ <hbox id="noUpdatesFound" align="center">
+ <label>&update.noUpdatesFound;</label>
+ <spacer flex="1"/>
+ <button label="&update.checkForUpdatesButton.label;"
+ accesskey="&update.checkForUpdatesButton.accesskey;"
+ oncommand="gAppUpdater.checkForUpdates();"/>
+ </hbox>
+ <hbox id="otherInstanceHandlingUpdates" align="center">
+ <label>&update.otherInstanceHandlingUpdates;</label>
+ <spacer flex="1"/>
+ <button label="&update.checkForUpdatesButton.label;"
+ accesskey="&update.checkForUpdatesButton.accesskey;"
+ disabled="true"/>
+ </hbox>
+ <hbox id="manualUpdate" align="center">
+ <label>&update.manual.start;</label><label id="manualLink" class="text-link"/><label>&update.manual.end;</label>
+ <spacer flex="1"/>
+ <button label="&update.checkForUpdatesButton.label;"
+ accesskey="&update.checkForUpdatesButton.accesskey;"
+ disabled="true"/>
+ </hbox>
+ <hbox id="unsupportedSystem" align="center">
+ <label>&update.unsupported.start;</label><label id="unsupportedLink" class="text-link">&update.unsupported.linkText;</label><label>&update.unsupported.end;</label>
+ <spacer flex="1"/>
+ <button label="&update.checkForUpdatesButton.label;"
+ accesskey="&update.checkForUpdatesButton.accesskey;"
+ disabled="true"/>
+ </hbox>
+ <hbox id="restarting" align="center">
+ <image class="update-throbber"/><label>&update.restarting;</label>
+ <spacer flex="1"/>
+ <button label="&update.updateButton.label3;"
+ accesskey="&update.updateButton.accesskey;"
+ disabled="true"/>
+ </hbox>
+ </deck>
+ </vbox>
+#endif
+
+ <separator/>
+#ifdef MOZ_UPDATER
+ <description>&updateApplication.description;</description>
+ <radiogroup id="updateRadioGroup">
+ <radio id="autoDesktop"
+ value="auto"
+ label="&updateAuto2.label;"
+ accesskey="&updateAuto2.accesskey;"/>
+ <radio value="checkOnly"
+ label="&updateCheckChoose2.label;"
+ accesskey="&updateCheckChoose2.accesskey;"/>
+ <radio value="manual"
+ label="&updateManual2.label;"
+ accesskey="&updateManual2.accesskey;"/>
+ </radiogroup>
+#ifdef MOZ_MAINTENANCE_SERVICE
+ <checkbox id="useService"
+ label="&useService.label;"
+ accesskey="&useService.accesskey;"
+ preference="app.update.service.enabled"/>
+#endif
+#endif
+ <checkbox id="enableSearchUpdate"
+ label="&enableSearchUpdate2.label;"
+ accesskey="&enableSearchUpdate2.accesskey;"
+ preference="browser.search.update"/>
+</groupbox>
rename from browser/components/preferences/in-content/applications.js
rename to browser/components/preferences/in-content-new/applications.js
new file mode 100644
--- /dev/null
+++ b/browser/components/preferences/in-content-new/applications.xul
@@ -0,0 +1,131 @@
+# 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/.
+
+<!-- Applications panel -->
+
+<script type="application/javascript"
+ src="chrome://browser/content/preferences/in-content-new/applications.js"/>
+
+<preferences id="feedsPreferences" hidden="true" data-category="paneApplications">
+ <preference id="browser.feeds.handler"
+ name="browser.feeds.handler"
+ type="string"/>
+ <preference id="browser.feeds.handler.default"
+ name="browser.feeds.handler.default"
+ type="string"/>
+ <preference id="browser.feeds.handlers.application"
+ name="browser.feeds.handlers.application"
+ type="file"/>
+ <preference id="browser.feeds.handlers.webservice"
+ name="browser.feeds.handlers.webservice"
+ type="string"/>
+
+ <preference id="browser.videoFeeds.handler"
+ name="browser.videoFeeds.handler"
+ type="string"/>
+ <preference id="browser.videoFeeds.handler.default"
+ name="browser.videoFeeds.handler.default"
+ type="string"/>
+ <preference id="browser.videoFeeds.handlers.application"
+ name="browser.videoFeeds.handlers.application"
+ type="file"/>
+ <preference id="browser.videoFeeds.handlers.webservice"
+ name="browser.videoFeeds.handlers.webservice"
+ type="string"/>
+
+ <preference id="browser.audioFeeds.handler"
+ name="browser.audioFeeds.handler"
+ type="string"/>
+ <preference id="browser.audioFeeds.handler.default"
+ name="browser.audioFeeds.handler.default"
+ type="string"/>
+ <preference id="browser.audioFeeds.handlers.application"
+ name="browser.audioFeeds.handlers.application"
+ type="file"/>
+ <preference id="browser.audioFeeds.handlers.webservice"
+ name="browser.audioFeeds.handlers.webservice"
+ type="string"/>
+
+ <preference id="pref.downloads.disable_button.edit_actions"
+ name="pref.downloads.disable_button.edit_actions"
+ type="bool"/>
+</preferences>
+
+<keyset data-category="paneApplications">
+ <!-- Ctrl+f/k focus the search box in the Applications pane.
+ These <key>s have oncommand attributes because of bug 371900. -->
+ <key key="&focusSearch1.key;" modifiers="accel" id="focusSearch1" oncommand=";"/>
+ <key key="&focusSearch2.key;" modifiers="accel" id="focusSearch2" oncommand=";"/>
+</keyset>
+
+<hbox id="header-applications"
+ class="header"
+ hidden="true"
+ data-category="paneApplications">
+ <label class="header-name" flex="1">&paneFilesApplications.title;</label>
+</hbox>
+
+<vbox id="applicationsContent"
+ data-category="paneApplications"
+ hidden="true"
+ flex="1">
+
+ <!--Downloads-->
+ <groupbox id="downloadsGroup">
+ <caption><label>&downloads.label;</label></caption>
+
+ <radiogroup id="saveWhere"
+ preference="browser.download.useDownloadDir"
+ onsyncfrompreference="return gApplicationsPane.readUseDownloadDir();">
+ <hbox id="saveToRow">
+ <radio id="saveTo"
+ value="true"
+ label="&saveTo.label;"
+ accesskey="&saveTo.accesskey;"
+ aria-labelledby="saveTo downloadFolder"/>
+ <filefield id="downloadFolder"
+ flex="1"
+ preference="browser.download.folderList"
+ preference-editable="true"
+ aria-labelledby="saveTo"
+ onsyncfrompreference="return gApplicationsPane.displayDownloadDirPref();"/>
+ <button id="chooseFolder"
+#ifdef XP_MACOSX
+ accesskey="&chooseFolderMac.accesskey;"
+ label="&chooseFolderMac.label;"
+#else
+ accesskey="&chooseFolderWin.accesskey;"
+ label="&chooseFolderWin.label;"
+#endif
+ />
+ </hbox>
+ <radio id="alwaysAsk"
+ value="false"
+ label="&alwaysAskWhere.label;"
+ accesskey="&alwaysAskWhere.accesskey;"/>
+ </radiogroup>
+ </groupbox>
+
+ <groupbox id="applicationsGroup">
+ <caption><label>&applications.label;</label></caption>
+ <description>&applications.description;</description>
+ <textbox id="filter" flex="1"
+ type="search"
+ placeholder="&filter2.emptytext;"
+ aria-controls="handlersView"/>
+
+ <richlistbox id="handlersView" orient="vertical" persist="lastSelectedType"
+ preference="pref.downloads.disable_button.edit_actions"
+ flex="1">
+ <listheader equalsize="always">
+ <treecol id="typeColumn" label="&typeColumn.label;" value="type"
+ accesskey="&typeColumn.accesskey;" persist="sortDirection"
+ flex="1" sortDirection="ascending"/>
+ <treecol id="actionColumn" label="&actionColumn2.label;" value="action"
+ accesskey="&actionColumn2.accesskey;" persist="sortDirection"
+ flex="1"/>
+ </listheader>
+ </richlistbox>
+ </groupbox>
+</vbox>
rename from browser/components/preferences/in-content/containers.js
rename to browser/components/preferences/in-content-new/containers.js
new file mode 100644
--- /dev/null
+++ b/browser/components/preferences/in-content-new/containers.xul
@@ -0,0 +1,52 @@
+# 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/.
+
+<!-- Containers panel -->
+
+<script type="application/javascript"
+ src="chrome://browser/content/preferences/in-content-new/containers.js"/>
+
+<preferences id="containerPreferences" hidden="true" data-category="paneContainer">
+ <!-- Containers -->
+ <preference id="privacy.userContext.enabled"
+ name="privacy.userContext.enabled"
+ type="bool"/>
+
+</preferences>
+
+<hbox hidden="true"
+ class="container-header-links"
+ data-category="paneContainers">
+ <label class="text-link" id="backContainersLink">&backLink.label;</label>
+</hbox>
+
+<hbox id="header-containers"
+ class="header"
+ hidden="true"
+ data-category="paneContainers">
+ <label class="header-name" flex="1">&paneContainers.title;</label>
+</hbox>
+
+<!-- Containers -->
+<groupbox id="browserContainersGroup" data-category="paneContainers" hidden="true">
+ <vbox id="browserContainersbox">
+
+ <richlistbox id="containersView" orient="vertical" persist="lastSelectedType"
+ flex="1">
+ <listheader equalsize="always">
+ <treecol id="typeColumn" value="type"
+ persist="sortDirection"
+ flex="1" sortDirection="ascending"/>
+ <treecol id="actionColumn" value="action"
+ persist="sortDirection"
+ flex="1"/>
+ </listheader>
+ </richlistbox>
+ </vbox>
+ <vbox>
+ <hbox flex="1">
+ <button onclick="gContainersPane.onAddButtonClick();" accesskey="&addButton.accesskey;" label="&addButton.label;"/>
+ </hbox>
+ </vbox>
+</groupbox>
rename from browser/components/preferences/in-content/findInPage.js
rename to browser/components/preferences/in-content-new/findInPage.js
new file mode 100644
--- /dev/null
+++ b/browser/components/preferences/in-content-new/jar.mn
@@ -0,0 +1,16 @@
+# 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/.
+
+browser.jar:
+ content/browser/preferences/in-content-new/preferences.js
+* content/browser/preferences/in-content-new/preferences.xul
+ content/browser/preferences/in-content-new/subdialogs.js
+
+ content/browser/preferences/in-content-new/main.js
+ content/browser/preferences/in-content-new/privacy.js
+ content/browser/preferences/in-content-new/containers.js
+ content/browser/preferences/in-content-new/advanced.js
+ content/browser/preferences/in-content-new/applications.js
+ content/browser/preferences/in-content-new/sync.js
+ content/browser/preferences/in-content-new/findInPage.js
rename from browser/components/preferences/in-content/main.js
rename to browser/components/preferences/in-content-new/main.js
new file mode 100644
--- /dev/null
+++ b/browser/components/preferences/in-content-new/main.xul
@@ -0,0 +1,593 @@
+# 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/.
+
+<!-- General panel -->
+
+<script type="application/javascript"
+ src="chrome://browser/content/preferences/in-content-new/main.js"/>
+
+<script type="application/javascript"
+ src="chrome://mozapps/content/preferences/fontbuilder.js"/>
+
+<stringbundle id="engineManagerBundle" src="chrome://browser/locale/engineManager.properties"/>
+
+<stringbundle id="bundlePreferences" src="chrome://browser/locale/preferences.properties"/>
+
+<preferences id="mainPreferences" hidden="true" data-category="paneGeneral">
+
+#ifdef E10S_TESTING_ONLY
+ <preference id="browser.tabs.remote.autostart"
+ name="browser.tabs.remote.autostart"
+ type="bool"/>
+ <preference id="e10sTempPref"
+ name="browser.tabs.remote.autostart.2"
+ type="bool"/>
+ <preference id="e10sForceEnable"
+ name="browser.tabs.remote.force-enable"
+ type="bool"/>
+#endif
+
+ <!-- Startup -->
+ <preference id="browser.startup.page"
+ name="browser.startup.page"
+ type="int"/>
+ <preference id="browser.startup.homepage"
+ name="browser.startup.homepage"
+ type="wstring"/>
+
+#ifdef HAVE_SHELL_SERVICE
+ <preference id="browser.shell.checkDefaultBrowser"
+ name="browser.shell.checkDefaultBrowser"
+ type="bool"/>
+
+ <preference id="pref.general.disable_button.default_browser"
+ name="pref.general.disable_button.default_browser"
+ type="bool"/>
+#endif
+
+ <preference id="pref.browser.homepage.disable_button.current_page"
+ name="pref.browser.homepage.disable_button.current_page"
+ type="bool"/>
+ <preference id="pref.browser.homepage.disable_button.bookmark_page"
+ name="pref.browser.homepage.disable_button.bookmark_page"
+ type="bool"/>
+ <preference id="pref.browser.homepage.disable_button.restore_default"
+ name="pref.browser.homepage.disable_button.restore_default"
+ type="bool"/>
+
+ <preference id="browser.privatebrowsing.autostart"
+ name="browser.privatebrowsing.autostart"
+ type="bool"/>
+
+ <!-- Search Engine -->
+ <preference id="browser.search.suggest.enabled"
+ name="browser.search.suggest.enabled"
+ type="bool"/>
+
+ <preference id="browser.urlbar.suggest.searches"
+ name="browser.urlbar.suggest.searches"
+ type="bool"/>
+
+ <preference id="browser.search.hiddenOneOffs"
+ name="browser.search.hiddenOneOffs"
+ type="unichar"/>
+
+ <!-- Downloads -->
+ <preference id="browser.download.useDownloadDir"
+ name="browser.download.useDownloadDir"
+ type="bool"/>
+
+ <preference id="browser.download.folderList"
+ name="browser.download.folderList"
+ type="int"/>
+ <preference id="browser.download.dir"
+ name="browser.download.dir"
+ type="file"/>
+ <!-- Tab preferences
+ Preferences:
+
+ browser.link.open_newwindow
+ 1 opens such links in the most recent window or tab,
+ 2 opens such links in a new window,
+ 3 opens such links in a new tab
+ browser.tabs.loadInBackground
+ - true if display should switch to a new tab which has been opened from a
+ link, false if display shouldn't switch
+ browser.tabs.warnOnClose
+ - true if when closing a window with multiple tabs the user is warned and
+ allowed to cancel the action, false to just close the window
+ browser.tabs.warnOnOpen
+ - true if the user should be warned if he attempts to open a lot of tabs at
+ once (e.g. a large folder of bookmarks), false otherwise
+ browser.taskbar.previews.enable
+ - true if tabs are to be shown in the Windows 7 taskbar
+ -->
+
+ <preference id="browser.link.open_newwindow"
+ name="browser.link.open_newwindow"
+ type="int"/>
+ <preference id="browser.tabs.loadInBackground"
+ name="browser.tabs.loadInBackground"
+ type="bool"
+ inverted="true"/>
+ <preference id="browser.tabs.warnOnClose"
+ name="browser.tabs.warnOnClose"
+ type="bool"/>
+ <preference id="browser.tabs.warnOnOpen"
+ name="browser.tabs.warnOnOpen"
+ type="bool"/>
+ <preference id="browser.sessionstore.restore_on_demand"
+ name="browser.sessionstore.restore_on_demand"
+ type="bool"/>
+#ifdef XP_WIN
+ <preference id="browser.taskbar.previews.enable"
+ name="browser.taskbar.previews.enable"
+ type="bool"/>
+#endif
+ <preference id="browser.ctrlTab.previews"
+ name="browser.ctrlTab.previews"
+ type="bool"/>
+
+ <!-- Fonts -->
+ <preference id="font.language.group"
+ name="font.language.group"
+ type="wstring"/>
+
+ <!-- Languages -->
+ <preference id="browser.translation.detectLanguage"
+ name="browser.translation.detectLanguage"
+ type="bool"/>
+
+ <!-- General tab -->
+
+ <!-- Accessibility
+ * accessibility.browsewithcaret
+ - true enables keyboard navigation and selection within web pages using a
+ visible caret, false uses normal keyboard navigation with no caret
+ * accessibility.typeaheadfind
+ - when set to true, typing outside text areas and input boxes will
+ automatically start searching for what's typed within the current
+ document; when set to false, no search action happens -->
+ <preference id="accessibility.browsewithcaret"
+ name="accessibility.browsewithcaret"
+ type="bool"/>
+ <preference id="accessibility.typeaheadfind"
+ name="accessibility.typeaheadfind"
+ type="bool"/>
+ <preference id="accessibility.blockautorefresh"
+ name="accessibility.blockautorefresh"
+ type="bool"/>
+#ifdef XP_WIN
+ <preference id="ui.osk.enabled"
+ name="ui.osk.enabled"
+ type="bool"/>
+#endif
+ <!-- Browsing
+ * general.autoScroll
+ - when set to true, clicking the scroll wheel on the mouse activates a
+ mouse mode where moving the mouse down scrolls the document downward with
+ speed correlated with the distance of the cursor from the original
+ position at which the click occurred (and likewise with movement upward);
+ if false, this behavior is disabled
+ * general.smoothScroll
+ - set to true to enable finer page scrolling than line-by-line on page-up,
+ page-down, and other such page movements -->
+ <preference id="general.autoScroll"
+ name="general.autoScroll"
+ type="bool"/>
+ <preference id="general.smoothScroll"
+ name="general.smoothScroll"
+ type="bool"/>
+#ifdef XP_WIN
+ <preference id="gfx.direct2d.disabled"
+ name="gfx.direct2d.disabled"
+ type="bool"
+ inverted="true"/>
+#endif
+ <preference id="layout.spellcheckDefault"
+ name="layout.spellcheckDefault"
+ type="int"/>
+
+#ifdef MOZ_TELEMETRY_REPORTING
+ <preference id="toolkit.telemetry.enabled"
+ name="toolkit.telemetry.enabled"
+ type="bool"/>
+#endif
+
+ <preference id="browser.preferences.defaultPerformanceSettings.enabled"
+ name="browser.preferences.defaultPerformanceSettings.enabled"
+ type="bool"/>
+
+ <preference id="dom.ipc.processCount"
+ name="dom.ipc.processCount"
+ type="int"/>
+
+ <preference id="layers.acceleration.disabled"
+ name="layers.acceleration.disabled"
+ type="bool"
+ inverted="true"/>
+</preferences>
+
+<hbox id="header-general"
+ class="header"
+ hidden="true"
+ data-category="paneGeneral">
+ <label class="header-name" flex="1">&paneGeneral.title;</label>
+</hbox>
+
+<!-- Startup -->
+<groupbox id="startupGroup"
+ data-category="paneGeneral"
+ hidden="true">
+ <caption><label>&startup.label;</label></caption>
+
+#ifdef MOZ_DEV_EDITION
+ <vbox id="separateProfileBox">
+ <checkbox id="separateProfileMode"
+ label="&separateProfileMode.label;"/>
+ <hbox align="center" class="indent">
+ <label id="useFirefoxSync">&useFirefoxSync.label;</label>
+ <deck id="getStarted">
+ <label class="text-link">&getStarted.notloggedin.label;</label>
+ <label class="text-link">&getStarted.configured.label;</label>
+ </deck>
+ </hbox>
+ </vbox>
+#endif
+
+#ifdef E10S_TESTING_ONLY
+ <checkbox id="e10sAutoStart"
+ label="&e10sEnabled.label;"/>
+#endif
+
+#ifdef HAVE_SHELL_SERVICE
+ <vbox id="defaultBrowserBox">
+ <checkbox id="alwaysCheckDefault" preference="browser.shell.checkDefaultBrowser"
+ label="&alwaysCheckDefault2.label;" accesskey="&alwaysCheckDefault2.accesskey;"/>
+ <deck id="setDefaultPane">
+ <hbox align="center" class="indent">
+ <label id="isNotDefaultLabel" flex="1">&isNotDefault.label;</label>
+ <button id="setDefaultButton"
+ class="accessory-button"
+ label="&setAsMyDefaultBrowser2.label;" accesskey="&setAsMyDefaultBrowser2.accesskey;"
+ preference="pref.general.disable_button.default_browser"/>
+ </hbox>
+ <hbox align="center" class="indent">
+ <label id="isDefaultLabel" flex="1">&isDefault.label;</label>
+ </hbox>
+ </deck>
+ <separator class="thin"/>
+ </vbox>
+#endif
+
+ <html:table id="startupTable">
+ <html:tr>
+ <html:td class="label-cell">
+ <label accesskey="&startupPage2.accesskey;"
+ control="browserStartupPage">&startupPage2.label;</label>
+ </html:td>
+ <html:td class="content-cell">
+ <menulist id="browserStartupPage"
+ class="content-cell-item"
+ preference="browser.startup.page">
+ <menupopup>
+ <menuitem label="&startupUserHomePage.label;"
+ value="1"
+ id="browserStartupHomePage"/>
+ <menuitem label="&startupBlankPage.label;"
+ value="0"
+ id="browserStartupBlank"/>
+ <menuitem label="&startupPrevSession.label;"
+ value="3"
+ id="browserStartupLastSession"/>
+ </menupopup>
+ </menulist>
+ </html:td>
+ </html:tr>
+ <html:tr>
+ <html:td class="label-cell">
+ <label accesskey="&homepage2.accesskey;"
+ control="browserHomePage">&homepage2.label;</label>
+ </html:td>
+ <html:td class="content-cell">
+ <textbox id="browserHomePage"
+ class="padded uri-element content-cell-item"
+ type="autocomplete"
+ autocompletesearch="unifiedcomplete"
+ onsyncfrompreference="return gMainPane.syncFromHomePref();"
+ onsynctopreference="return gMainPane.syncToHomePref(this.value);"
+ placeholder="&abouthome.pageTitle;"
+ preference="browser.startup.homepage"/>
+ </html:td>
+ </html:tr>
+ <html:tr>
+ <html:td class="label-cell" />
+ <html:td class="content-cell homepage-buttons">
+ <button id="useCurrent"
+ class="content-cell-item"
+ label=""
+ accesskey="&useCurrentPage.accesskey;"
+ label1="&useCurrentPage.label;"
+ label2="&useMultiple.label;"
+ preference="pref.browser.homepage.disable_button.current_page"/>
+ <button id="useBookmark"
+ class="content-cell-item"
+ label="&chooseBookmark.label;"
+ accesskey="&chooseBookmark.accesskey;"
+ preference="pref.browser.homepage.disable_button.bookmark_page"/>
+ <button id="restoreDefaultHomePage"
+ class="content-cell-item"
+ label="&restoreDefault.label;"
+ accesskey="&restoreDefault.accesskey;"
+ preference="pref.browser.homepage.disable_button.restore_default"/>
+ </html:td>
+ </html:tr>
+ </html:table>
+</groupbox>
+
+<!-- Default Search Engine -->
+<groupbox id="defaultEngineGroup" data-category="paneGeneral" data-subcategory="search">
+ <caption label="&defaultSearchEngine.label;"/>
+ <label>&chooseYourDefaultSearchEngine.label;</label>
+ <box align="start">
+ <menulist id="defaultEngine">
+ <menupopup/>
+ </menulist>
+ </box>
+ <checkbox id="suggestionsInSearchFieldsCheckbox"
+ label="&provideSearchSuggestions.label;"
+ accesskey="&provideSearchSuggestions.accesskey;"
+ preference="browser.search.suggest.enabled"/>
+ <vbox class="indent">
+ <checkbox id="urlBarSuggestion" label="&showURLBarSuggestions.label;"
+ accesskey="&showURLBarSuggestions.accesskey;"
+ preference="browser.urlbar.suggest.searches"/>
+ <hbox id="urlBarSuggestionPermanentPBLabel"
+ align="center" class="indent">
+ <label flex="1">&urlBarSuggestionsPermanentPB.label;</label>
+ </hbox>
+ </vbox>
+</groupbox>
+
+<groupbox id="oneClickSearchProvidersGroup" data-category="paneGeneral" data-subcategory="search">
+ <caption label="&oneClickSearchEngines.label;"/>
+ <label>&chooseWhichOneToDisplay.label;</label>
+
+ <tree id="engineList" flex="1" rows="8" hidecolumnpicker="true" editable="true"
+ seltype="single" allowunderflowscroll="true">
+ <treechildren id="engineChildren" flex="1"/>
+ <treecols>
+ <treecol id="engineShown" type="checkbox" editable="true" sortable="false"/>
+ <treecol id="engineName" flex="4" label="&engineNameColumn.label;" sortable="false"/>
+ <treecol id="engineKeyword" flex="1" label="&engineKeywordColumn.label;" editable="true"
+ sortable="false"/>
+ </treecols>
+ </tree>
+
+ <hbox>
+ <button id="restoreDefaultSearchEngines"
+ label="&restoreDefaultSearchEngines.label;"
+ accesskey="&restoreDefaultSearchEngines.accesskey;"/>
+ <spacer flex="1"/>
+ <button id="removeEngineButton"
+ class="searchEngineAction accessory-button"
+ label="&removeEngine.label;"
+ accesskey="&removeEngine.accesskey;"
+ disabled="true"/>
+ </hbox>
+
+ <separator class="thin"/>
+
+ <hbox id="addEnginesBox" pack="start">
+ <label id="addEngines" class="text-link">&addMoreSearchEngines2.label;</label>
+ </hbox>
+</groupbox>
+
+<!-- Tab preferences -->
+<groupbox data-category="paneGeneral"
+ hidden="true">
+ <caption><label>&tabsGroup.label;</label></caption>
+
+ <checkbox id="ctrlTabRecentlyUsedOrder" label="&ctrlTabRecentlyUsedOrder.label;"
+ accesskey="&ctrlTabRecentlyUsedOrder.accesskey;"
+ preference="browser.ctrlTab.previews"/>
+
+ <checkbox id="linkTargeting" label="&newWindowsAsTabs.label;"
+ accesskey="&newWindowsAsTabs.accesskey;"
+ preference="browser.link.open_newwindow"
+ onsyncfrompreference="return gMainPane.readLinkTarget();"
+ onsynctopreference="return gMainPane.writeLinkTarget();"/>
+
+ <checkbox id="warnCloseMultiple" label="&warnOnCloseMultipleTabs.label;"
+ accesskey="&warnOnCloseMultipleTabs.accesskey;"
+ preference="browser.tabs.warnOnClose"/>
+
+ <checkbox id="warnOpenMany" label="&warnOnOpenManyTabs.label;"
+ accesskey="&warnOnOpenManyTabs.accesskey;"
+ preference="browser.tabs.warnOnOpen"/>
+
+ <checkbox id="switchToNewTabs" label="&switchLinksToNewTabs.label;"
+ accesskey="&switchLinksToNewTabs.accesskey;"
+ preference="browser.tabs.loadInBackground"/>
+
+#ifdef XP_WIN
+ <checkbox id="showTabsInTaskbar" label="&showTabsInTaskbar.label;"
+ accesskey="&showTabsInTaskbar.accesskey;"
+ preference="browser.taskbar.previews.enable"/>
+#endif
+</groupbox>
+
+<!-- Accessibility -->
+<groupbox data-category="paneGeneral" id="accessibilityGroup">
+ <caption><label>&accessibility.label;</label></caption>
+
+#ifdef XP_WIN
+ <checkbox id="useOnScreenKeyboard"
+ hidden="true"
+ label="&useOnScreenKeyboard.label;"
+ accesskey="&useOnScreenKeyboard.accesskey;"
+ preference="ui.osk.enabled"/>
+#endif
+ <checkbox id="useCursorNavigation"
+ label="&useCursorNavigation.label;"
+ accesskey="&useCursorNavigation.accesskey;"
+ preference="accessibility.browsewithcaret"/>
+ <checkbox id="searchStartTyping"
+ label="&searchOnStartTyping.label;"
+ accesskey="&searchOnStartTyping.accesskey;"
+ preference="accessibility.typeaheadfind"/>
+ <checkbox id="blockAutoRefresh"
+ label="&blockAutoReload.label;"
+ accesskey="&blockAutoReload.accesskey;"
+ preference="accessibility.blockautorefresh"/>
+</groupbox>
+
+<!-- Languages -->
+<groupbox id="languagesGroup" data-category="paneGeneral" hidden="true">
+ <caption><label>&languages.label;</label></caption>
+
+ <hbox id="languagesBox" align="center">
+ <description flex="1" control="chooseLanguage">&chooseLanguage.label;</description>
+ <button id="chooseLanguage"
+ class="accessory-button"
+ label="&chooseButton.label;"
+ accesskey="&chooseButton.accesskey;"/>
+ </hbox>
+
+ <hbox id="translationBox" hidden="true">
+ <hbox align="center" flex="1">
+ <checkbox id="translate" preference="browser.translation.detectLanguage"
+ label="&translateWebPages.label;." accesskey="&translateWebPages.accesskey;"
+ onsyncfrompreference="return gMainPane.updateButtons('translateButton',
+ 'browser.translation.detectLanguage');"/>
+ <hbox id="bingAttribution" hidden="true">
+ <label>&translation.options.attribution.beforeLogo;</label>
+ <separator orient="vertical" class="thin"/>
+ <image id="translationAttributionImage" aria-label="Microsoft Translator"
+ src="chrome://browser/content/microsoft-translator-attribution.png"/>
+ <separator orient="vertical" class="thin"/>
+ <label>&translation.options.attribution.afterLogo;</label>
+ </hbox>
+ </hbox>
+ <button id="translateButton"
+ class="accessory-button"
+ label="&translateExceptions.label;"
+ accesskey="&translateExceptions.accesskey;"/>
+ </hbox>
+ <checkbox id="checkSpelling"
+ label="&checkUserSpelling.label;"
+ accesskey="&checkUserSpelling.accesskey;"
+ onsyncfrompreference="return gMainPane.readCheckSpelling();"
+ onsynctopreference="return gMainPane.writeCheckSpelling();"
+ preference="layout.spellcheckDefault"/>
+</groupbox>
+
+
+<!-- Fonts and Colors -->
+<groupbox id="fontsGroup" data-category="paneGeneral" hidden="true">
+ <caption><label>&fontsAndColors.label;</label></caption>
+
+ <vbox>
+ <hbox id="fontSettings">
+ <hbox align="center">
+ <label control="defaultFont" accesskey="&defaultFont2.accesskey;">&defaultFont2.label;</label>
+ <menulist id="defaultFont" delayprefsave="true" onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
+ <label id="defaultFontSizeLabel" control="defaultFontSize" accesskey="&defaultSize2.accesskey;">&defaultSize2.label;</label>
+ <menulist id="defaultFontSize" delayprefsave="true">
+ <menupopup>
+ <menuitem value="9" label="9"/>
+ <menuitem value="10" label="10"/>
+ <menuitem value="11" label="11"/>
+ <menuitem value="12" label="12"/>
+ <menuitem value="13" label="13"/>
+ <menuitem value="14" label="14"/>
+ <menuitem value="15" label="15"/>
+ <menuitem value="16" label="16"/>
+ <menuitem value="17" label="17"/>
+ <menuitem value="18" label="18"/>
+ <menuitem value="20" label="20"/>
+ <menuitem value="22" label="22"/>
+ <menuitem value="24" label="24"/>
+ <menuitem value="26" label="26"/>
+ <menuitem value="28" label="28"/>
+ <menuitem value="30" label="30"/>
+ <menuitem value="32" label="32"/>
+ <menuitem value="34" label="34"/>
+ <menuitem value="36" label="36"/>
+ <menuitem value="40" label="40"/>
+ <menuitem value="44" label="44"/>
+ <menuitem value="48" label="48"/>
+ <menuitem value="56" label="56"/>
+ <menuitem value="64" label="64"/>
+ <menuitem value="72" label="72"/>
+ </menupopup>
+ </menulist>
+ </hbox>
+ <spacer flex="1" />
+ <button id="advancedFonts"
+ class="accessory-button"
+ icon="select-font"
+ label="&advancedFonts.label;"
+ accesskey="&advancedFonts.accesskey;"/>
+ </hbox>
+ <hbox id="colorsSettings">
+ <spacer flex="1" />
+ <button id="colors"
+ class="accessory-button"
+ icon="select-color"
+ label="&colors.label;"
+ accesskey="&colors.accesskey;"/>
+ </hbox>
+ </vbox>
+</groupbox>
+
+<!-- Browsing -->
+<groupbox id="browsingGroup" data-category="paneGeneral">
+ <caption><label>&browsing.label;</label></caption>
+
+ <checkbox id="useAutoScroll"
+ label="&useAutoScroll.label;"
+ accesskey="&useAutoScroll.accesskey;"
+ preference="general.autoScroll"/>
+ <checkbox id="useSmoothScrolling"
+ label="&useSmoothScrolling.label;"
+ accesskey="&useSmoothScrolling.accesskey;"
+ preference="general.smoothScroll"/>
+</groupbox>
+
+<!-- Performance -->
+<groupbox id="performanceGroup" data-category="paneGeneral" hidden="true">
+ <caption><label>&performance.label;</label></caption>
+
+ <hbox align="center">
+ <checkbox id="useRecommendedPerformanceSettings"
+ label="&useRecommendedPerformanceSettings2.label;"
+ accesskey="&useRecommendedPerformanceSettings2.accesskey;"
+ preference="browser.preferences.defaultPerformanceSettings.enabled"/>
+ <label id="performanceSettingsLearnMore" class="learnMore text-link">&performanceSettingsLearnMore.label;</label>
+ </hbox>
+ <description class="indent">&useRecommendedPerformanceSettings2.description;</description>
+
+ <vbox id="performanceSettings" class="indent" hidden="true">
+ <checkbox id="allowHWAccel"
+ label="&allowHWAccel.label;"
+ accesskey="&allowHWAccel.accesskey;"
+ preference="layers.acceleration.disabled"/>
+ <hbox align="center">
+ <label id="limitContentProcess" accesskey="&limitContentProcess2.accesskey;" control="contentProcessCount">&limitContentProcess2.label;</label>
+ <menulist id="contentProcessCount" preference="dom.ipc.processCount">
+ <menupopup>
+ <menuitem label="1" value="1"/>
+ <menuitem label="2" value="2"/>
+ <menuitem label="3" value="3"/>
+ <menuitem label="4" value="4"/>
+ <menuitem label="5" value="5"/>
+ <menuitem label="6" value="6"/>
+ <menuitem label="7" value="7"/>
+ </menupopup>
+ </menulist>
+ </hbox>
+ <description>&limitContentProcess2.description;</description>
+ </vbox>
+</groupbox>
rename from browser/components/preferences/in-content/moz.build
rename to browser/components/preferences/in-content-new/moz.build
rename from browser/components/preferences/in-content/preferences.js
rename to browser/components/preferences/in-content-new/preferences.js
new file mode 100644
--- /dev/null
+++ b/browser/components/preferences/in-content-new/preferences.xul
@@ -0,0 +1,211 @@
+<?xml version="1.0"?>
+<!-- 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/. -->
+
+<?xml-stylesheet href="chrome://global/skin/global.css"?>
+
+<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
+<?xml-stylesheet href="chrome://global/skin/in-content/common.css"?>
+<?xml-stylesheet
+ href="chrome://browser/skin/preferences/in-content-new/preferences.css"?>
+<?xml-stylesheet
+ href="chrome://browser/content/preferences/handlers.css"?>
+<?xml-stylesheet href="chrome://browser/skin/preferences/applications.css"?>
+<?xml-stylesheet href="chrome://browser/skin/preferences/in-content-new/search.css"?>
+<?xml-stylesheet href="chrome://browser/skin/preferences/in-content-new/containers.css"?>
+
+<!DOCTYPE page [
+<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
+<!ENTITY % globalPreferencesDTD SYSTEM "chrome://global/locale/preferences.dtd">
+<!ENTITY % preferencesDTD SYSTEM
+ "chrome://browser/locale/preferences/preferences.dtd">
+<!ENTITY % privacyDTD SYSTEM "chrome://browser/locale/preferences/privacy.dtd">
+<!ENTITY % tabsDTD SYSTEM "chrome://browser/locale/preferences/tabs.dtd">
+<!ENTITY % searchDTD SYSTEM "chrome://browser/locale/preferences/search.dtd">
+<!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
+<!ENTITY % syncDTD SYSTEM "chrome://browser/locale/preferences/sync.dtd">
+<!ENTITY % securityDTD SYSTEM
+ "chrome://browser/locale/preferences/security.dtd">
+<!ENTITY % containersDTD SYSTEM
+ "chrome://browser/locale/preferences/containers.dtd">
+<!ENTITY % sanitizeDTD SYSTEM "chrome://browser/locale/sanitize.dtd">
+<!ENTITY % mainDTD SYSTEM "chrome://browser/locale/preferences/main.dtd">
+<!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd">
+<!ENTITY % contentDTD SYSTEM "chrome://browser/locale/preferences/content.dtd">
+<!ENTITY % applicationsDTD SYSTEM
+ "chrome://browser/locale/preferences/applications.dtd">
+<!ENTITY % advancedDTD SYSTEM
+ "chrome://browser/locale/preferences/advanced.dtd">
+<!ENTITY % aboutDialogDTD SYSTEM "chrome://browser/locale/aboutDialog.dtd" >
+%aboutDialogDTD;
+%brandDTD;
+%globalPreferencesDTD;
+%preferencesDTD;
+%privacyDTD;
+%tabsDTD;
+%searchDTD;
+%syncBrandDTD;
+%syncDTD;
+%securityDTD;
+%containersDTD;
+%sanitizeDTD;
+%mainDTD;
+%aboutHomeDTD;
+%contentDTD;
+%applicationsDTD;
+%advancedDTD;
+]>
+
+#ifdef XP_WIN
+#define USE_WIN_TITLE_STYLE
+#endif
+
+<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ disablefastfind="true"
+#ifdef USE_WIN_TITLE_STYLE
+ title="&prefWindow.titleWin;">
+#else
+ title="&prefWindow.title;">
+#endif
+
+ <html:link rel="shortcut icon"
+ href="chrome://browser/skin/preferences/in-content-new/favicon.ico"/>
+
+ <script type="application/javascript"
+ src="chrome://browser/content/utilityOverlay.js"/>
+ <script type="application/javascript"
+ src="chrome://browser/content/preferences/in-content-new/preferences.js"/>
+ <script src="chrome://browser/content/preferences/in-content-new/findInPage.js"/>
+ <script src="chrome://browser/content/preferences/in-content-new/subdialogs.js"/>
+
+ <stringbundle id="bundleBrand"
+ src="chrome://branding/locale/brand.properties"/>
+ <stringbundle id="bundlePreferences"
+ src="chrome://browser/locale/preferences/preferences.properties"/>
+
+ <stringbundleset id="appManagerBundleset">
+ <stringbundle id="appManagerBundle"
+ src="chrome://browser/locale/preferences/applicationManager.properties"/>
+ </stringbundleset>
+
+ <stack flex="1">
+ <hbox flex="1">
+
+ <!-- category list -->
+ <richlistbox id="categories">
+ <richlistitem id="category-search-results"
+ class="category"
+ value="paneSearchResults"
+ helpTopic="prefs-main"
+ tooltiptext="&paneSearchResults.title;"
+ align="center"
+ hidden="true">
+ <image class="category-icon"/>
+ <label class="category-name" flex="1">&paneSearchResults.title;</label>
+ </richlistitem>
+
+ <richlistitem id="category-general"
+ class="category"
+ value="paneGeneral"
+ helpTopic="prefs-main"
+ tooltiptext="&paneGeneral.title;"
+ align="center">
+ <image class="category-icon"/>
+ <label class="category-name" flex="1">&paneGeneral.title;</label>
+ </richlistitem>
+
+ <richlistitem id="category-application"
+ class="category"
+ value="paneApplications"
+ helpTopic="prefs-applications"
+ tooltiptext="&paneFilesApplications.title;"
+ align="center">
+ <image class="category-icon"/>
+ <label class="category-name" flex="1">&paneFilesApplications.title;</label>
+ </richlistitem>
+
+ <richlistitem id="category-containers"
+ class="category"
+ value="paneContainers"
+ helpTopic="prefs-containers"
+ hidden="true"/>
+
+ <richlistitem id="category-sync"
+ class="category"
+ value="paneSync"
+ helpTopic="prefs-weave"
+ tooltiptext="&paneSync1.title;"
+ align="center">
+ <image class="category-icon"/>
+ <label class="category-name" flex="1">&paneSync1.title;</label>
+ </richlistitem>
+
+ <richlistitem id="category-privacy"
+ class="category"
+ value="panePrivacy"
+ helpTopic="prefs-privacy"
+ tooltiptext="&panePrivacySecurity.title;"
+ align="center">
+ <image class="category-icon"/>
+ <label class="category-name" flex="1">&panePrivacySecurity.title;</label>
+ </richlistitem>
+
+ <richlistitem id="category-advanced"
+ class="category"
+ value="paneAdvanced"
+ helpTopic="prefs-advanced-general"
+ tooltiptext="&paneUpdates.title;"
+ align="center">
+ <image class="category-icon"/>
+ <label class="category-name" flex="1">&paneUpdates.title;</label>
+ </richlistitem>
+ </richlistbox>
+
+ <keyset>
+ <!-- Disable the findbar because it doesn't work properly.
+ Remove this keyset once bug 1094240 ("disablefastfind" attribute
+ broken in e10s mode) is fixed. -->
+ <key key="&focusSearch1.key;" modifiers="accel" id="focusSearch1" oncommand=";"/>
+ </keyset>
+
+ <html:a class="help-button" target="_blank" aria-label="&helpButton2.label;">&helpButton2.label;</html:a>
+
+ <vbox class="main-content" flex="1">
+ <hbox pack="end">
+ <textbox type="search" id="searchInput" placeholder="&searchInput.label;" hidden="true"
+ clickSelectsAll="true"/>
+ </hbox>
+ <prefpane id="mainPrefPane">
+#include searchResults.xul
+#include main.xul
+#include privacy.xul
+#include containers.xul
+#include advanced.xul
+#include applications.xul
+#include sync.xul
+ </prefpane>
+ </vbox>
+ </hbox>
+
+ <vbox id="dialogOverlay" align="center" pack="center">
+ <groupbox id="dialogBox"
+ orient="vertical"
+ pack="end"
+ role="dialog"
+ aria-labelledby="dialogTitle">
+ <caption flex="1" align="center">
+ <label id="dialogTitle" flex="1"></label>
+ <button id="dialogClose"
+ class="close-icon"
+ aria-label="&preferencesCloseButton.label;"/>
+ </caption>
+ <browser id="dialogFrame"
+ name="dialogFrame"
+ autoscroll="false"
+ disablehistory="true"/>
+ </groupbox>
+ </vbox>
+ </stack>
+</page>
rename from browser/components/preferences/in-content/privacy.js
rename to browser/components/preferences/in-content-new/privacy.js
new file mode 100644
--- /dev/null
+++ b/browser/components/preferences/in-content-new/privacy.xul
@@ -0,0 +1,737 @@
+# 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/.
+
+<!-- Privacy panel -->
+
+<script type="application/javascript"
+ src="chrome://browser/content/preferences/in-content-new/privacy.js"/>
+
+<preferences id="privacyPreferences" hidden="true" data-category="panePrivacy">
+
+ <!-- Tracking -->
+ <preference id="privacy.trackingprotection.enabled"
+ name="privacy.trackingprotection.enabled"
+ type="bool"/>
+ <preference id="privacy.trackingprotection.pbmode.enabled"
+ name="privacy.trackingprotection.pbmode.enabled"
+ type="bool"/>
+
+ <!-- XXX button prefs -->
+ <preference id="pref.privacy.disable_button.cookie_exceptions"
+ name="pref.privacy.disable_button.cookie_exceptions"
+ type="bool"/>
+ <preference id="pref.privacy.disable_button.view_cookies"
+ name="pref.privacy.disable_button.view_cookies"
+ type="bool"/>
+ <preference id="pref.privacy.disable_button.change_blocklist"
+ name="pref.privacy.disable_button.change_blocklist"
+ type="bool"/>
+ <preference id="pref.privacy.disable_button.tracking_protection_exceptions"
+ name="pref.privacy.disable_button.tracking_protection_exceptions"
+ type="bool"/>
+
+ <!-- Location Bar -->
+ <preference id="browser.urlbar.autocomplete.enabled"
+ name="browser.urlbar.autocomplete.enabled"
+ type="bool"/>
+ <preference id="browser.urlbar.suggest.bookmark"
+ name="browser.urlbar.suggest.bookmark"
+ type="bool"/>
+ <preference id="browser.urlbar.suggest.history"
+ name="browser.urlbar.suggest.history"
+ type="bool"/>
+ <preference id="browser.urlbar.suggest.openpage"
+ name="browser.urlbar.suggest.openpage"
+ type="bool"/>
+
+ <!-- History -->
+ <preference id="places.history.enabled"
+ name="places.history.enabled"
+ type="bool"/>
+ <preference id="browser.formfill.enable"
+ name="browser.formfill.enable"
+ type="bool"/>
+ <preference id="privacy.history.custom"
+ name="privacy.history.custom"
+ type="bool"/>
+ <!-- Cookies -->
+ <preference id="network.cookie.cookieBehavior"
+ name="network.cookie.cookieBehavior"
+ type="int"/>
+ <preference id="network.cookie.lifetimePolicy"
+ name="network.cookie.lifetimePolicy"
+ type="int"/>
+ <preference id="network.cookie.blockFutureCookies"
+ name="network.cookie.blockFutureCookies"
+ type="bool"/>
+ <!-- Clear Private Data -->
+ <preference id="privacy.sanitize.sanitizeOnShutdown"
+ name="privacy.sanitize.sanitizeOnShutdown"
+ type="bool"/>
+ <preference id="privacy.sanitize.timeSpan"
+ name="privacy.sanitize.timeSpan"
+ type="int"/>
+ <!-- Private Browsing -->
+ <preference id="browser.privatebrowsing.autostart"
+ name="browser.privatebrowsing.autostart"
+ type="bool"/>
+
+ <!-- DRM content -->
+ <preference id="media.eme.enabled"
+ name="media.eme.enabled"
+ type="bool"/>
+
+ <!-- Popups -->
+ <preference id="dom.disable_open_during_load"
+ name="dom.disable_open_during_load"
+ type="bool"/>
+ <!-- Passwords -->
+ <preference id="signon.rememberSignons" name="signon.rememberSignons" type="bool"/>
+
+ <!-- XXX buttons -->
+ <preference id="pref.privacy.disable_button.view_passwords"
+ name="pref.privacy.disable_button.view_passwords"
+ type="bool"/>
+ <preference id="pref.privacy.disable_button.view_passwords_exceptions"
+ name="pref.privacy.disable_button.view_passwords_exceptions"
+ type="bool"/>
+
+ <!-- Certificates tab
+ * security.default_personal_cert
+ - a string:
+ "Select Automatically" select a certificate automatically when a site
+ requests one
+ "Ask Every Time" present a dialog to the user so he can select
+ the certificate to use on a site which
+ requests one -->
+ <preference id="security.default_personal_cert"
+ name="security.default_personal_cert"
+ type="string"/>
+
+ <preference id="security.disable_button.openCertManager"
+ name="security.disable_button.openCertManager"
+ type="bool"/>
+
+ <preference id="security.disable_button.openDeviceManager"
+ name="security.disable_button.openDeviceManager"
+ type="bool"/>
+
+ <preference id="security.OCSP.enabled"
+ name="security.OCSP.enabled"
+ type="int"/>
+
+ <!-- Add-ons, malware, phishing -->
+ <preference id="xpinstall.whitelist.required"
+ name="xpinstall.whitelist.required"
+ type="bool"/>
+
+ <preference id="browser.safebrowsing.malware.enabled"
+ name="browser.safebrowsing.malware.enabled"
+ type="bool"/>
+ <preference id="browser.safebrowsing.phishing.enabled"
+ name="browser.safebrowsing.phishing.enabled"
+ type="bool"/>
+
+ <preference id="browser.safebrowsing.downloads.enabled"
+ name="browser.safebrowsing.downloads.enabled"
+ type="bool"/>
+
+ <preference id="urlclassifier.malwareTable"
+ name="urlclassifier.malwareTable"
+ type="string"/>
+
+ <preference id="browser.safebrowsing.downloads.remote.block_potentially_unwanted"
+ name="browser.safebrowsing.downloads.remote.block_potentially_unwanted"
+ type="bool"/>
+ <preference id="browser.safebrowsing.downloads.remote.block_uncommon"
+ name="browser.safebrowsing.downloads.remote.block_uncommon"
+ type="bool"/>
+
+ <!-- Network tab -->
+ <preference id="browser.cache.disk.capacity"
+ name="browser.cache.disk.capacity"
+ type="int"/>
+ <preference id="browser.offline-apps.notify"
+ name="browser.offline-apps.notify"
+ type="bool"/>
+
+ <preference id="browser.cache.disk.smart_size.enabled"
+ name="browser.cache.disk.smart_size.enabled"
+ inverted="true"
+ type="bool"/>
+
+ <!-- Data Choices tab -->
+#ifdef MOZ_CRASHREPORTER
+ <preference id="browser.crashReports.unsubmittedCheck.autoSubmit"
+ name="browser.crashReports.unsubmittedCheck.autoSubmit"
+ type="bool"/>
+#endif
+
+</preferences>
+
+<stringbundle id="bundlePreferences" src="chrome://browser/locale/preferences/preferences.properties"/>
+
+<hbox id="header-privacy"
+ class="header"
+ hidden="true"
+ data-category="panePrivacy">
+ <label class="header-name" flex="1">&panePrivacySecurity.title;</label>
+</hbox>
+
+
+<!-- History -->
+<groupbox id="historyGroup" data-category="panePrivacy" hidden="true">
+ <caption><label>&history.label;</label></caption>
+ <hbox align="center">
+ <label id="historyModeLabel"
+ control="historyMode"
+ accesskey="&historyHeader2.pre.accesskey;">&historyHeader2.pre.label;
+ </label>
+ <menulist id="historyMode">
+ <menupopup>
+ <menuitem label="&historyHeader.remember.label;" value="remember"/>
+ <menuitem label="&historyHeader.dontremember.label;" value="dontremember"/>
+ <menuitem label="&historyHeader.custom.label;" value="custom"/>
+ </menupopup>
+ </menulist>
+ <label>&historyHeader.post.label;</label>
+ </hbox>
+ <deck id="historyPane">
+ <vbox id="historyRememberPane">
+ <hbox align="center" flex="1">
+ <vbox flex="1">
+ <description>&rememberDescription.label;</description>
+ <separator class="thin"/>
+ <description>&rememberActions.pre.label;<label
+ class="text-link" id="historyRememberClear"
+ >&rememberActions.clearHistory.label;</label>&rememberActions.middle.label;<label
+ class="text-link" id="historyRememberCookies"
+ >&rememberActions.removeCookies.label;</label>&rememberActions.post.label;</description>
+ </vbox>
+ </hbox>
+ </vbox>
+ <vbox id="historyDontRememberPane">
+ <hbox align="center" flex="1">
+ <vbox flex="1">
+ <description>&dontrememberDescription.label;</description>
+ <separator class="thin"/>
+ <description>&dontrememberActions.pre.label;<label
+ class="text-link" id="historyDontRememberClear"
+ >&dontrememberActions.clearHistory.label;</label>&dontrememberActions.post.label;</description>
+ </vbox>
+ </hbox>
+ </vbox>
+ <vbox id="historyCustomPane">
+ <separator class="thin"/>
+ <vbox>
+ <checkbox id="privateBrowsingAutoStart"
+ label="&privateBrowsingPermanent2.label;"
+ accesskey="&privateBrowsingPermanent2.accesskey;"
+ preference="browser.privatebrowsing.autostart"/>
+ <vbox class="indent">
+ <checkbox id="rememberHistory"
+ label="&rememberHistory2.label;"
+ accesskey="&rememberHistory2.accesskey;"
+ preference="places.history.enabled"/>
+ <checkbox id="rememberForms"
+ label="&rememberSearchForm.label;"
+ accesskey="&rememberSearchForm.accesskey;"
+ preference="browser.formfill.enable"/>
+ <hbox id="cookiesBox">
+ <checkbox id="acceptCookies" label="&acceptCookies.label;"
+ preference="network.cookie.cookieBehavior"
+ accesskey="&acceptCookies.accesskey;"
+ onsyncfrompreference="return gPrivacyPane.readAcceptCookies();"
+ onsynctopreference="return gPrivacyPane.writeAcceptCookies();"
+ flex="1" />
+ <button id="cookieExceptions"
+ class="accessory-button"
+ label="&cookieExceptions.label;" accesskey="&cookieExceptions.accesskey;"
+ preference="pref.privacy.disable_button.cookie_exceptions"/>
+ </hbox>
+ <hbox id="acceptThirdPartyRow"
+ class="indent"
+ align="center">
+ <label id="acceptThirdPartyLabel" control="acceptThirdPartyMenu"
+ accesskey="&acceptThirdParty.pre.accesskey;">&acceptThirdParty.pre.label;</label>
+ <menulist id="acceptThirdPartyMenu" preference="network.cookie.cookieBehavior"
+ onsyncfrompreference="return gPrivacyPane.readAcceptThirdPartyCookies();"
+ onsynctopreference="return gPrivacyPane.writeAcceptThirdPartyCookies();">
+ <menupopup>
+ <menuitem label="&acceptThirdParty.always.label;" value="always"/>
+ <menuitem label="&acceptThirdParty.visited.label;" value="visited"/>
+ <menuitem label="&acceptThirdParty.never.label;" value="never"/>
+ </menupopup>
+ </menulist>
+ </hbox>
+ <hbox id="keepRow"
+ class="indent"
+ align="center">
+ <label id="keepUntil"
+ control="keepCookiesUntil"
+ accesskey="&keepUntil.accesskey;">&keepUntil.label;</label>
+ <menulist id="keepCookiesUntil"
+ preference="network.cookie.lifetimePolicy">
+ <menupopup>
+ <menuitem label="&expire.label;" value="0"/>
+ <menuitem label="&close.label;" value="2"/>
+ </menupopup>
+ </menulist>
+ <spacer flex="1"/>
+ <button id="showCookiesButton"
+ class="accessory-button"
+ label="&showCookies.label;" accesskey="&showCookies.accesskey;"
+ preference="pref.privacy.disable_button.view_cookies"/>
+ </hbox>
+ <hbox id="clearDataBox"
+ align="center">
+ <checkbox id="alwaysClear"
+ preference="privacy.sanitize.sanitizeOnShutdown"
+ label="&clearOnClose.label;"
+ accesskey="&clearOnClose.accesskey;"
+ flex="1" />
+ <button id="clearDataSettings"
+ class="accessory-button"
+ label="&clearOnCloseSettings.label;"
+ accesskey="&clearOnCloseSettings.accesskey;"/>
+ </hbox>
+ </vbox>
+ </vbox>
+ </vbox>
+ </deck>
+</groupbox>
+
+<!-- Passwords -->
+<groupbox id="passwordsGroup" orient="vertical" data-category="panePrivacy" hidden="true">
+ <caption><label>&formsAndPasswords.label;</label></caption>
+
+ <vbox id="passwordSettings">
+ <hbox id="savePasswordsBox">
+ <checkbox id="savePasswords"
+ label="&rememberLogins1.label;" accesskey="&rememberLogins1.accesskey;"
+ preference="signon.rememberSignons"
+ onsyncfrompreference="return gPrivacyPane.readSavePasswords();"
+ flex="1" />
+ <button id="passwordExceptions"
+ class="accessory-button"
+ label="&passwordExceptions.label;"
+ accesskey="&passwordExceptions.accesskey;"
+ preference="pref.privacy.disable_button.view_passwords_exceptions"/>
+ </hbox>
+ <hbox id="showPasswordBox" pack="end">
+ <button id="showPasswords"
+ class="accessory-button"
+ label="&savedLogins.label;" accesskey="&savedLogins.accesskey;"
+ preference="pref.privacy.disable_button.view_passwords"/>
+ </hbox>
+ </vbox>
+ <hbox id="masterPasswordRow">
+ <checkbox id="useMasterPassword"
+ label="&useMasterPassword.label;"
+ accesskey="&useMasterPassword.accesskey;"
+ flex="1" />
+ <button id="changeMasterPassword"
+ class="accessory-button"
+ label="&changeMasterPassword.label;"
+ accesskey="&changeMasterPassword.accesskey;"/>
+ </hbox>
+</groupbox>
+
+<!-- Tracking -->
+<groupbox id="trackingGroup" data-category="panePrivacy" hidden="true">
+ <caption><label>&trackingProtectionHeader2.label;</label></caption>
+ <vbox id="trackingprotectionbox" hidden="true">
+ <hbox align="start">
+ <vbox flex="1">
+ <description>
+ &trackingProtection.description;
+ <label id="trackingProtectionLearnMore" class="learnMore text-link">&trackingProtectionLearnMore.label;</label>
+ </description>
+ <description id="trackingProtectionDesc"
+ control="trackingProtectionRadioGroup">
+ &trackingProtection.radioGroupLabel;
+ </description>
+ </vbox>
+ <spacer flex="1"/>
+ <vbox id="trackingProtectionAdvancedSettings">
+ <button id="trackingProtectionExceptions"
+ class="accessory-button"
+ label="&trackingProtectionExceptions.label;"
+ accesskey="&trackingProtectionExceptions.accesskey;"
+ preference="pref.privacy.disable_button.tracking_protection_exceptions"/>
+ <button id="changeBlockList"
+ class="accessory-button"
+ label="&changeBlockList.label;"
+ accesskey="&changeBlockList.accesskey;"
+ preference="pref.privacy.disable_button.change_blocklist"/>
+ </vbox>
+ </hbox>
+ <radiogroup id="trackingProtectionRadioGroup" aria-labelledby="trackingProtectionDesc">
+ <radio value="always"
+ label="&trackingProtectionAlways.label;"
+ accesskey="&trackingProtectionAlways.accesskey;"/>
+ <radio value="private"
+ label="&trackingProtectionPrivate.label;"
+ accesskey="&trackingProtectionPrivate.accesskey;"/>
+ <radio value="never"
+ label="&trackingProtectionNever.label;"
+ accesskey="&trackingProtectionNever.accesskey;"/>
+ </radiogroup>
+ </vbox>
+ <vbox id="trackingprotectionpbmbox">
+ <caption><label>&tracking.label;</label></caption>
+ <hbox align="center">
+ <checkbox id="trackingProtectionPBM"
+ preference="privacy.trackingprotection.pbmode.enabled"
+ accesskey="&trackingProtectionPBM5.accesskey;"
+ label="&trackingProtectionPBM5.label;" />
+ <label id="trackingProtectionPBMLearnMore"
+ class="learnMore text-link">&trackingProtectionPBMLearnMore.label;</label>
+ <spacer flex="1" />
+ <button id="changeBlockListPBM"
+ label="&changeBlockList.label;" accesskey="&changeBlockList.accesskey;"
+ preference="pref.privacy.disable_button.change_blocklist"/>
+ </hbox>
+ </vbox>
+ <vbox>
+ <description>&doNotTrack.pre.label;<label
+ class="text-link" id="doNotTrackSettings"
+ >&doNotTrack.settings.label;</label>&doNotTrack.post.label;</description>
+ </vbox>
+</groupbox>
+
+<!-- Pop-ups -->
+<groupbox id="miscGroup" data-category="panePrivacy" hidden="true">
+ <caption><label>&popups.label;</label></caption>
+ <hbox align="start">
+ <checkbox id="popupPolicy" preference="dom.disable_open_during_load"
+ label="&blockPopups.label;" accesskey="&blockPopups.accesskey;"
+ onsyncfrompreference="return gPrivacyPane.updateButtons('popupPolicyButton',
+ 'dom.disable_open_during_load');"
+ flex="1" />
+ <button id="popupPolicyButton"
+ class="accessory-button"
+ label="&popupExceptions.label;"
+ accesskey="&popupExceptions.accesskey;"/>
+ </hbox>
+</groupbox>
+
+<!-- Notifications -->
+<groupbox id="notificationsGroup" data-category="panePrivacy" hidden="true">
+ <caption><label>¬ificationsPolicy.label;</label></caption>
+ <grid>
+ <columns>
+ <column flex="1"/>
+ <column/>
+ </columns>
+ <rows>
+ <row id="notificationsPolicyRow" align="center">
+ <hbox flex="1">
+ <label id="notificationsPolicy">¬ificationsPolicyDesc3.label;</label>
+ <label id="notificationsPolicyLearnMore"
+ class="learnMore text-link">¬ificationsPolicyLearnMore.label;</label>
+ </hbox>
+ <hbox pack="end">
+ <button id="notificationsPolicyButton"
+ class="accessory-button"
+ label="¬ificationsPolicyButton.label;"
+ accesskey="¬ificationsPolicyButton.accesskey;"/>
+ </hbox>
+ </row>
+ </rows>
+ </grid>
+ <vbox id="notificationsDoNotDisturbBox" hidden="true">
+ <checkbox id="notificationsDoNotDisturb" label="¬ificationsDoNotDisturb.label;"
+ accesskey="¬ificationsDoNotDisturb.accesskey;"/>
+ <label id="notificationsDoNotDisturbDetails"
+ class="indent">¬ificationsDoNotDisturbDetails.value;</label>
+ </vbox>
+</groupbox>
+
+<!-- Location Bar -->
+<groupbox id="locationBarGroup"
+ data-category="panePrivacy"
+ hidden="true">
+ <caption><label>&locationBar.label;</label></caption>
+ <label id="locationBarSuggestionLabel">&locbar.suggest2.label;</label>
+ <checkbox id="historySuggestion" label="&locbar.history.label;"
+ accesskey="&locbar.history.accesskey;"
+ preference="browser.urlbar.suggest.history"/>
+ <checkbox id="bookmarkSuggestion" label="&locbar.bookmarks.label;"
+ accesskey="&locbar.bookmarks.accesskey;"
+ preference="browser.urlbar.suggest.bookmark"/>
+ <checkbox id="openpageSuggestion" label="&locbar.openpage.label;"
+ accesskey="&locbar.openpage.accesskey;"
+ preference="browser.urlbar.suggest.openpage"/>
+ <label class="text-link" onclick="gotoPref('general')">
+ &suggestionSettings2.label;
+ </label>
+</groupbox>
+
+<!-- addons, forgery (phishing) UI Security -->
+<groupbox id="addonsPhishingGroup" data-category="panePrivacy" hidden="true">
+ <caption><label>&security.label;</label></caption>
+
+ <hbox id="addonInstallBox">
+ <checkbox id="warnAddonInstall"
+ label="&warnOnAddonInstall.label;"
+ accesskey="&warnOnAddonInstall.accesskey;"
+ preference="xpinstall.whitelist.required"
+ onsyncfrompreference="return gPrivacyPane.readWarnAddonInstall();"
+ flex="1" />
+ <button id="addonExceptions"
+ class="accessory-button"
+ label="&addonExceptions.label;"
+ accesskey="&addonExceptions.accesskey;"/>
+ </hbox>
+
+ <separator class="thin"/>
+ <checkbox id="enableSafeBrowsing"
+ label="&enableSafeBrowsing.label;"
+ accesskey="&enableSafeBrowsing.accesskey;" />
+ <vbox class="indent">
+ <checkbox id="blockDownloads"
+ label="&blockDownloads.label;"
+ accesskey="&blockDownloads.accesskey;" />
+ <checkbox id="blockUncommonUnwanted"
+ label="&blockUncommonAndUnwanted.label;"
+ accesskey="&blockUncommonAndUnwanted.accesskey;" />
+ </vbox>
+</groupbox>
+
+<!-- Certificates -->
+<groupbox id="certSelection" data-category="panePrivacy" hidden="true">
+ <caption><label>&certificateTab.label;</label></caption>
+ <description id="CertSelectionDesc" control="certSelection">&certPersonal2.description;</description>
+
+ <!--
+ The values on these radio buttons may look like l10n issues, but
+ they're not - this preference uses *those strings* as its values.
+ I KID YOU NOT.
+ -->
+ <radiogroup id="certSelection"
+ preftype="string"
+ preference="security.default_personal_cert"
+ aria-labelledby="CertSelectionDesc">
+ <radio label="&selectCerts.auto;"
+ accesskey="&selectCerts.auto.accesskey;"
+ value="Select Automatically"/>
+ <radio label="&selectCerts.ask;"
+ accesskey="&selectCerts.ask.accesskey;"
+ value="Ask Every Time"/>
+ </radiogroup>
+ <hbox align="start">
+ <checkbox id="enableOCSP"
+ label="&enableOCSP.label;"
+ accesskey="&enableOCSP.accesskey;"
+ onsyncfrompreference="return gPrivacyPane.readEnableOCSP();"
+ onsynctopreference="return gPrivacyPane.writeEnableOCSP();"
+ preference="security.OCSP.enabled"
+ flex="1" />
+ <vbox>
+ <button id="viewCertificatesButton"
+ class="accessory-button"
+ label="&viewCerts.label;"
+ accesskey="&viewCerts.accesskey;"
+ preference="security.disable_button.openCertManager"/>
+ <button id="viewSecurityDevicesButton"
+ class="accessory-button"
+ label="&viewSecurityDevices.label;"
+ accesskey="&viewSecurityDevices.accesskey;"
+ preference="security.disable_button.openDeviceManager"/>
+ </vbox>
+ </hbox>
+</groupbox>
+
+<!-- DRM Content -->
+<groupbox id="drmGroup" data-category="panePrivacy" hidden="true">
+ <caption><label>&drmContent.label;</label></caption>
+ <grid id="contentGrid2">
+ <columns>
+ <column flex="1"/>
+ <column/>
+ </columns>
+ <rows id="contentRows-2">
+ <row id="playDRMContentRow">
+ <hbox align="center">
+ <checkbox id="playDRMContent" preference="media.eme.enabled"
+ label="&playDRMContent.label;" accesskey="&playDRMContent.accesskey;"/>
+ <label id="playDRMContentLink" class="learnMore text-link">
+ &playDRMContent.learnMore.label;
+ </label>
+ </hbox>
+ </row>
+ </rows>
+ </grid>
+</groupbox>
+
+<!-- Containers -->
+<groupbox id="browserContainersGroup" data-category="panePrivacy" hidden="true">
+ <vbox id="browserContainersbox" hidden="true">
+ <caption><label>&browserContainersHeader.label;</label></caption>
+ <hbox align="center">
+ <checkbox id="browserContainersCheckbox"
+ label="&browserContainersEnabled.label;"
+ accesskey="&browserContainersEnabled.accesskey;"
+ preference="privacy.userContext.enabled"
+ onsyncfrompreference="return gPrivacyPane.readBrowserContainersCheckbox();"/>
+ <label id="browserContainersLearnMore" class="learnMore text-link">
+ &browserContainersLearnMore.label;
+ </label>
+ <spacer flex="1"/>
+ <button id="browserContainersSettings"
+ class="accessory-button"
+ label="&browserContainersSettings.label;"
+ accesskey="&browserContainersSettings.accesskey;"/>
+ </hbox>
+ </vbox>
+</groupbox>
+
+<!-- Network -->
+<!-- Connection -->
+<groupbox id="connectionGroup" data-category="panePrivacy" hidden="true">
+ <caption><label>&connection.label;</label></caption>
+
+ <hbox align="center">
+ <description flex="1" control="connectionSettings">&connectionDesc.label;</description>
+ <button id="connectionSettings"
+ class="accessory-button"
+ icon="network"
+ label="&connectionSettings.label;"
+ accesskey="&connectionSettings.accesskey;"/>
+ </hbox>
+</groupbox>
+
+<!-- Cache -->
+<groupbox id="cacheGroup" data-category="panePrivacy" hidden="true">
+ <caption><label>&httpCache.label;</label></caption>
+
+ <hbox align="center">
+ <label id="actualDiskCacheSize" flex="1"/>
+ <button id="clearCacheButton"
+ class="accessory-button"
+ icon="clear"
+ label="&clearCacheNow.label;" accesskey="&clearCacheNow.accesskey;"/>
+ </hbox>
+ <checkbox preference="browser.cache.disk.smart_size.enabled"
+ id="allowSmartSize"
+ onsyncfrompreference="return gPrivacyPane.readSmartSizeEnabled();"
+ label="&overrideSmartCacheSize.label;"
+ accesskey="&overrideSmartCacheSize.accesskey;"/>
+ <hbox align="center" class="indent">
+ <label id="useCacheBefore" control="cacheSize"
+ accesskey="&limitCacheSizeBefore.accesskey;">
+ &limitCacheSizeBefore.label;
+ </label>
+ <textbox id="cacheSize" type="number" size="4" max="1024"
+ aria-labelledby="useCacheBefore cacheSize useCacheAfter"/>
+ <label id="useCacheAfter" flex="1">&limitCacheSizeAfter.label;</label>
+ </hbox>
+</groupbox>
+
+<!-- Offline apps -->
+<groupbox id="offlineGroup" data-category="panePrivacy" hidden="true" data-hidden-from-search="true">
+ <caption><label>&offlineStorage2.label;</label></caption>
+
+ <hbox align="center">
+ <label id="actualAppCacheSize" flex="1"/>
+ <button id="clearOfflineAppCacheButton"
+ class="accessory-button"
+ icon="clear"
+ label="&clearOfflineAppCacheNow.label;" accesskey="&clearOfflineAppCacheNow.accesskey;"/>
+ </hbox>
+ <hbox align="center">
+ <checkbox id="offlineNotify"
+ label="&offlineStorageNotify.label;" accesskey="&offlineStorageNotify.accesskey;"
+ preference="browser.offline-apps.notify"
+ onsyncfrompreference="return gPrivacyPane.readOfflineNotify();"
+ flex="1" />
+ <button id="offlineNotifyExceptions"
+ class="accessory-button"
+ label="&offlineStorageNotifyExceptions.label;"
+ accesskey="&offlineStorageNotifyExceptions.accesskey;"/>
+ </hbox>
+ <hbox>
+ <vbox flex="1">
+ <label id="offlineAppsListLabel">&offlineAppsList2.label;</label>
+ <listbox id="offlineAppsList"
+ flex="1"
+ aria-labelledby="offlineAppsListLabel">
+ </listbox>
+ </vbox>
+ <vbox pack="end">
+ <button id="offlineAppsListRemove"
+ class="accessory-button"
+ disabled="true"
+ label="&offlineAppsListRemove.label;"
+ accesskey="&offlineAppsListRemove.accesskey;"/>
+ </vbox>
+ </hbox>
+</groupbox>
+
+<!-- Site Data -->
+<groupbox id="siteDataGroup" hidden="true" data-category="panePrivacy" data-hidden-from-search="true">
+ <caption><label>&siteData.label;</label></caption>
+
+ <hbox align="baseline">
+ <label id="totalSiteDataSize"></label>
+ <label id="siteDataLearnMoreLink" class="learnMore text-link" value="&siteDataLearnMoreLink.label;"></label>
+ <spacer flex="1" />
+ <button id="clearSiteDataButton"
+ class="accessory-button"
+ icon="clear"
+ label="&clearSiteData.label;" accesskey="&clearSiteData.accesskey;"/>
+ </hbox>
+ <vbox align="end">
+ <button id="siteDataSettings"
+ class="accessory-button"
+ label="&siteDataSettings.label;"
+ accesskey="&siteDataSettings.accesskey;"/>
+ </vbox>
+</groupbox>
+
+<!-- Data Choices -->
+#ifdef MOZ_TELEMETRY_REPORTING
+<groupbox id="historyGroup" data-category="panePrivacy" data-subcategory="reports" hidden="true">
+<caption><label>&reports.label;</label></caption>
+ <hbox align="center">
+ <checkbox id="submitHealthReportBox" label="&enableHealthReport.label;"
+ accesskey="&enableHealthReport.accesskey;"/>
+ <label id="FHRLearnMore"
+ class="learnMore text-link">&healthReportLearnMore.label;</label>
+ </hbox>
+ <description class="indent">&healthReportDesc.label;</description>
+ <vbox class="indent">
+ <hbox align="center">
+ <checkbox id="submitTelemetryBox" preference="toolkit.telemetry.enabled"
+ label="&enableTelemetryData.label;"
+ accesskey="&enableTelemetryData.accesskey;"/>
+ <label id="telemetryLearnMore"
+ class="learnMore text-link">&telemetryLearnMore.label;</label>
+ </hbox>
+ <description id="telemetryDataDesc"
+ class="indent">&telemetryDesc.label;</description>
+ </vbox>
+</groupbox>
+#endif
+
+#ifdef MOZ_DATA_REPORTING
+#ifdef MOZ_CRASHREPORTER
+<groupbox id="crashReporterGroup" data-category="panePrivacy" data-subcategory="reports" hidden="true">
+#ifndef MOZ_TELEMETRY_REPORTING
+<caption><label>&reports.label;</label></caption>
+#endif
+ <hbox align="center">
+ <checkbox id="automaticallySubmitCrashesBox"
+ preference="browser.crashReports.unsubmittedCheck.autoSubmit"
+ label="&alwaysSubmitCrashReports.label;"
+ accesskey="&alwaysSubmitCrashReports.accesskey;"/>
+ <label id="crashReporterLearnMore"
+ class="learnMore text-link">&crashReporterLearnMore.label;</label>
+ </hbox>
+ <description class="indent">&crashReporterDesc2.label;</description>
+</groupbox>
+
+#endif
+#endif
rename from browser/components/preferences/in-content/searchResults.xul
rename to browser/components/preferences/in-content-new/searchResults.xul
new file mode 100644
--- /dev/null
+++ b/browser/components/preferences/in-content-new/subdialogs.js
@@ -0,0 +1,451 @@
+/* - 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/. */
+
+/* import-globals-from ../../../base/content/utilityOverlay.js */
+/* import-globals-from preferences.js */
+
+"use strict";
+
+var gSubDialog = {
+ _closingCallback: null,
+ _closingEvent: null,
+ _isClosing: false,
+ _frame: null,
+ _overlay: null,
+ _box: null,
+ _openedURL: null,
+ _injectedStyleSheets: [
+ "chrome://browser/skin/preferences/preferences.css",
+ "chrome://global/skin/in-content/common.css",
+ "chrome://browser/skin/preferences/in-content-new/preferences.css",
+ "chrome://browser/skin/preferences/in-content-new/dialog.css",
+ ],
+ _resizeObserver: null,
+
+ init() {
+ this._frame = document.getElementById("dialogFrame");
+ this._overlay = document.getElementById("dialogOverlay");
+ this._box = document.getElementById("dialogBox");
+ this._closeButton = document.getElementById("dialogClose");
+ },
+
+ updateTitle(aEvent) {
+ if (aEvent.target != gSubDialog._frame.contentDocument)
+ return;
+ document.getElementById("dialogTitle").textContent = gSubDialog._frame.contentDocument.title;
+ },
+
+ injectXMLStylesheet(aStylesheetURL) {
+ let contentStylesheet = this._frame.contentDocument.createProcessingInstruction(
+ "xml-stylesheet",
+ 'href="' + aStylesheetURL + '" type="text/css"'
+ );
+ this._frame.contentDocument.insertBefore(contentStylesheet,
+ this._frame.contentDocument.documentElement);
+ },
+
+ open(aURL, aFeatures = null, aParams = null, aClosingCallback = null) {
+ // If we're already open/opening on this URL, do nothing.
+ if (this._openedURL == aURL && !this._isClosing) {
+ return;
+ }
+ // If we're open on some (other) URL or we're closing, open when closing has finished.
+ if (this._openedURL || this._isClosing) {
+ if (!this._isClosing) {
+ this.close();
+ }
+ let args = Array.from(arguments);
+ this._closingPromise.then(() => {
+ this.open.apply(this, args);
+ });
+ return;
+ }
+ this._addDialogEventListeners();
+
+ let features = (aFeatures ? aFeatures + "," : "") + "resizable,dialog=no,centerscreen";
+ let dialog = window.openDialog(aURL, "dialogFrame", features, aParams);
+ if (aClosingCallback) {
+ this._closingCallback = aClosingCallback.bind(dialog);
+ }
+
+ this._closingEvent = null;
+ this._isClosing = false;
+ this._openedURL = aURL;
+
+ features = features.replace(/,/g, "&");
+ let featureParams = new URLSearchParams(features.toLowerCase());
+ this._box.setAttribute("resizable", featureParams.has("resizable") &&
+ featureParams.get("resizable") != "no" &&
+ featureParams.get("resizable") != "0");
+ },
+
+ close(aEvent = null) {
+ if (this._isClosing) {
+ return;
+ }
+ this._isClosing = true;
+ this._closingPromise = new Promise(resolve => {
+ this._resolveClosePromise = resolve;
+ });
+
+ if (this._closingCallback) {
+ try {
+ this._closingCallback.call(null, aEvent);
+ } catch (ex) {
+ Cu.reportError(ex);
+ }
+ this._closingCallback = null;
+ }
+
+ this._removeDialogEventListeners();
+
+ this._overlay.style.visibility = "";
+ // Clear the sizing inline styles.
+ this._frame.removeAttribute("style");
+ // Clear the sizing attributes
+ this._box.removeAttribute("width");
+ this._box.removeAttribute("height");
+ this._box.style.removeProperty("min-height");
+ this._box.style.removeProperty("min-width");
+
+ setTimeout(() => {
+ // Unload the dialog after the event listeners run so that the load of about:blank isn't
+ // cancelled by the ESC <key>.
+ let onBlankLoad = e => {
+ if (this._frame.contentWindow.location.href == "about:blank") {
+ this._frame.removeEventListener("load", onBlankLoad);
+ // We're now officially done closing, so update the state to reflect that.
+ this._openedURL = null;
+ this._isClosing = false;
+ this._resolveClosePromise();
+ }
+ };
+ this._frame.addEventListener("load", onBlankLoad);
+ this._frame.loadURI("about:blank");
+ }, 0);
+ },
+
+ handleEvent(aEvent) {
+ switch (aEvent.type) {
+ case "click":
+ // Close the dialog if the user clicked the overlay background, just
+ // like when the user presses the ESC key (case "command" below).
+ if (aEvent.target === this._overlay) {
+ this._frame.contentWindow.close();
+ }
+ break;
+ case "command":
+ this._frame.contentWindow.close();
+ break;
+ case "dialogclosing":
+ this._onDialogClosing(aEvent);
+ break;
+ case "DOMTitleChanged":
+ this.updateTitle(aEvent);
+ break;
+ case "DOMFrameContentLoaded":
+ this._onContentLoaded(aEvent);
+ break;
+ case "load":
+ this._onLoad(aEvent);
+ break;
+ case "unload":
+ this._onUnload(aEvent);
+ break;
+ case "keydown":
+ this._onKeyDown(aEvent);
+ break;
+ case "focus":
+ this._onParentWinFocus(aEvent);
+ break;
+ }
+ },
+
+ /* Private methods */
+
+ _onUnload(aEvent) {
+ if (aEvent.target.location.href == this._openedURL) {
+ this._frame.contentWindow.close();
+ }
+ },
+
+ _onContentLoaded(aEvent) {
+ if (aEvent.target != this._frame || aEvent.target.contentWindow.location == "about:blank") {
+ return;
+ }
+
+ for (let styleSheetURL of this._injectedStyleSheets) {
+ this.injectXMLStylesheet(styleSheetURL);
+ }
+
+ // Provide the ability for the dialog to know that it is being loaded "in-content".
+ this._frame.contentDocument.documentElement.setAttribute("subdialog", "true");
+
+ this._frame.contentWindow.addEventListener("dialogclosing", this);
+
+ let oldResizeBy = this._frame.contentWindow.resizeBy;
+ this._frame.contentWindow.resizeBy = function(resizeByWidth, resizeByHeight) {
+ // Only handle resizeByHeight currently.
+ let frameHeight = gSubDialog._frame.clientHeight;
+ let boxMinHeight = parseFloat(getComputedStyle(gSubDialog._box).minHeight, 10);
+
+ gSubDialog._frame.style.height = (frameHeight + resizeByHeight) + "px";
+ gSubDialog._box.style.minHeight = (boxMinHeight + resizeByHeight) + "px";
+
+ oldResizeBy.call(gSubDialog._frame.contentWindow, resizeByWidth, resizeByHeight);
+ };
+
+ // Make window.close calls work like dialog closing.
+ let oldClose = this._frame.contentWindow.close;
+ this._frame.contentWindow.close = function() {
+ var closingEvent = gSubDialog._closingEvent;
+ if (!closingEvent) {
+ closingEvent = new CustomEvent("dialogclosing", {
+ bubbles: true,
+ detail: { button: null },
+ });
+
+ gSubDialog._frame.contentWindow.dispatchEvent(closingEvent);
+ }
+
+ gSubDialog.close(closingEvent);
+ oldClose.call(gSubDialog._frame.contentWindow);
+ };
+
+ // XXX: Hack to make focus during the dialog's load functions work. Make the element visible
+ // sooner in DOMContentLoaded but mostly invisible instead of changing visibility just before
+ // the dialog's load event.
+ this._overlay.style.visibility = "visible";
+ this._overlay.style.opacity = "0.01";
+ },
+
+ _onLoad(aEvent) {
+ if (aEvent.target.contentWindow.location == "about:blank") {
+ return;
+ }
+
+ // Do this on load to wait for the CSS to load and apply before calculating the size.
+ let docEl = this._frame.contentDocument.documentElement;
+
+ let groupBoxTitle = document.getAnonymousElementByAttribute(this._box, "class", "groupbox-title");
+ let groupBoxTitleHeight = groupBoxTitle.clientHeight +
+ parseFloat(getComputedStyle(groupBoxTitle).borderBottomWidth);
+
+ let groupBoxBody = document.getAnonymousElementByAttribute(this._box, "class", "groupbox-body");
+ // These are deduced from styles which we don't change, so it's safe to get them now:
+ let boxVerticalPadding = 2 * parseFloat(getComputedStyle(groupBoxBody).paddingTop);
+ let boxHorizontalPadding = 2 * parseFloat(getComputedStyle(groupBoxBody).paddingLeft);
+ let boxHorizontalBorder = 2 * parseFloat(getComputedStyle(this._box).borderLeftWidth);
+ let boxVerticalBorder = 2 * parseFloat(getComputedStyle(this._box).borderTopWidth);
+
+ // The difference between the frame and box shouldn't change, either:
+ let boxRect = this._box.getBoundingClientRect();
+ let frameRect = this._frame.getBoundingClientRect();
+ let frameSizeDifference = (frameRect.top - boxRect.top) + (boxRect.bottom - frameRect.bottom);
+
+ // Then determine and set a bunch of width stuff:
+ let frameMinWidth = docEl.style.width || docEl.scrollWidth + "px";
+ let frameWidth = docEl.getAttribute("width") ? docEl.getAttribute("width") + "px" :
+ frameMinWidth;
+ this._frame.style.width = frameWidth;
+ this._box.style.minWidth = "calc(" +
+ (boxHorizontalBorder + boxHorizontalPadding) +
+ "px + " + frameMinWidth + ")";
+
+ // Now do the same but for the height. We need to do this afterwards because otherwise
+ // XUL assumes we'll optimize for height and gives us "wrong" values which then are no
+ // longer correct after we set the width:
+ let frameMinHeight = docEl.style.height || docEl.scrollHeight + "px";
+ let frameHeight = docEl.getAttribute("height") ? docEl.getAttribute("height") + "px" :
+ frameMinHeight;
+
+ // Now check if the frame height we calculated is possible at this window size,
+ // accounting for titlebar, padding/border and some spacing.
+ let maxHeight = window.innerHeight - frameSizeDifference - 30;
+ // Do this with a frame height in pixels...
+ let comparisonFrameHeight;
+ if (frameHeight.endsWith("em")) {
+ let fontSize = parseFloat(getComputedStyle(this._frame).fontSize);
+ comparisonFrameHeight = parseFloat(frameHeight, 10) * fontSize;
+ } else if (frameHeight.endsWith("px")) {
+ comparisonFrameHeight = parseFloat(frameHeight, 10);
+ } else {
+ Cu.reportError("This dialog (" + this._frame.contentWindow.location.href + ") " +
+ "set a height in non-px-non-em units ('" + frameHeight + "'), " +
+ "which is likely to lead to bad sizing in in-content preferences. " +
+ "Please consider changing this.");
+ comparisonFrameHeight = parseFloat(frameHeight);
+ }
+
+ if (comparisonFrameHeight > maxHeight) {
+ // If the height is bigger than that of the window, we should let the contents scroll:
+ frameHeight = maxHeight + "px";
+ frameMinHeight = maxHeight + "px";
+ let containers = this._frame.contentDocument.querySelectorAll(".largeDialogContainer");
+ for (let container of containers) {
+ container.classList.add("doScroll");
+ }
+ }
+
+ this._frame.style.height = frameHeight;
+ this._box.style.minHeight = "calc(" +
+ (boxVerticalBorder + groupBoxTitleHeight + boxVerticalPadding) +
+ "px + " + frameMinHeight + ")";
+
+ this._overlay.style.visibility = "visible";
+ this._overlay.style.opacity = ""; // XXX: focus hack continued from _onContentLoaded
+
+ if (this._box.getAttribute("resizable") == "true") {
+ this._resizeObserver = new MutationObserver(this._onResize);
+ this._resizeObserver.observe(this._box, {attributes: true});
+ }
+
+ this._trapFocus();
+ },
+
+ _onResize(mutations) {
+ let frame = gSubDialog._frame;
+ // The width and height styles are needed for the initial
+ // layout of the frame, but afterward they need to be removed
+ // or their presence will restrict the contents of the <browser>
+ // from resizing to a smaller size.
+ frame.style.removeProperty("width");
+ frame.style.removeProperty("height");
+
+ let docEl = frame.contentDocument.documentElement;
+ let persistedAttributes = docEl.getAttribute("persist");
+ if (!persistedAttributes ||
+ (!persistedAttributes.includes("width") &&
+ !persistedAttributes.includes("height"))) {
+ return;
+ }
+
+ for (let mutation of mutations) {
+ if (mutation.attributeName == "width") {
+ docEl.setAttribute("width", docEl.scrollWidth);
+ } else if (mutation.attributeName == "height") {
+ docEl.setAttribute("height", docEl.scrollHeight);
+ }
+ }
+ },
+
+ _onDialogClosing(aEvent) {
+ this._frame.contentWindow.removeEventListener("dialogclosing", this);
+ this._closingEvent = aEvent;
+ },
+
+ _onKeyDown(aEvent) {
+ if (aEvent.currentTarget == window && aEvent.keyCode == aEvent.DOM_VK_ESCAPE &&
+ !aEvent.defaultPrevented) {
+ this.close(aEvent);
+ return;
+ }
+ if (aEvent.keyCode != aEvent.DOM_VK_TAB ||
+ aEvent.ctrlKey || aEvent.altKey || aEvent.metaKey) {
+ return;
+ }
+
+ let fm = Services.focus;
+
+ function isLastFocusableElement(el) {
+ // XXXgijs unfortunately there is no way to get the last focusable element without asking
+ // the focus manager to move focus to it.
+ let rv = el == fm.moveFocus(gSubDialog._frame.contentWindow, null, fm.MOVEFOCUS_LAST, 0);
+ fm.setFocus(el, 0);
+ return rv;
+ }
+
+ let forward = !aEvent.shiftKey;
+ // check if focus is leaving the frame (incl. the close button):
+ if ((aEvent.target == this._closeButton && !forward) ||
+ (isLastFocusableElement(aEvent.originalTarget) && forward)) {
+ aEvent.preventDefault();
+ aEvent.stopImmediatePropagation();
+ let parentWin = this._getBrowser().ownerGlobal;
+ if (forward) {
+ fm.moveFocus(parentWin, null, fm.MOVEFOCUS_FIRST, fm.FLAG_BYKEY);
+ } else {
+ // Somehow, moving back 'past' the opening doc is not trivial. Cheat by doing it in 2 steps:
+ fm.moveFocus(window, null, fm.MOVEFOCUS_ROOT, fm.FLAG_BYKEY);
+ fm.moveFocus(parentWin, null, fm.MOVEFOCUS_BACKWARD, fm.FLAG_BYKEY);
+ }
+ }
+ },
+
+ _onParentWinFocus(aEvent) {
+ // Explicitly check for the focus target of |window| to avoid triggering this when the window
+ // is refocused
+ if (aEvent.target != this._closeButton && aEvent.target != window) {
+ this._closeButton.focus();
+ }
+ },
+
+ _addDialogEventListeners() {
+ // Make the close button work.
+ this._closeButton.addEventListener("command", this);
+
+ // DOMTitleChanged isn't fired on the frame, only on the chromeEventHandler
+ let chromeBrowser = this._getBrowser();
+ chromeBrowser.addEventListener("DOMTitleChanged", this, true);
+
+ // Similarly DOMFrameContentLoaded only fires on the top window
+ window.addEventListener("DOMFrameContentLoaded", this, true);
+
+ // Wait for the stylesheets injected during DOMContentLoaded to load before showing the dialog
+ // otherwise there is a flicker of the stylesheet applying.
+ this._frame.addEventListener("load", this);
+
+ chromeBrowser.addEventListener("unload", this, true);
+
+ // Ensure we get <esc> keypresses even if nothing in the subdialog is focusable
+ // (happens on OS X when only text inputs and lists are focusable, and
+ // the subdialog only has checkboxes/radiobuttons/buttons)
+ window.addEventListener("keydown", this, true);
+
+ this._overlay.addEventListener("click", this, true);
+ },
+
+ _removeDialogEventListeners() {
+ let chromeBrowser = this._getBrowser();
+ chromeBrowser.removeEventListener("DOMTitleChanged", this, true);
+ chromeBrowser.removeEventListener("unload", this, true);
+
+ this._closeButton.removeEventListener("command", this);
+
+ window.removeEventListener("DOMFrameContentLoaded", this, true);
+ this._frame.removeEventListener("load", this);
+ this._frame.contentWindow.removeEventListener("dialogclosing", this);
+ window.removeEventListener("keydown", this, true);
+
+ this._overlay.removeEventListener("click", this, true);
+
+ if (this._resizeObserver) {
+ this._resizeObserver.disconnect();
+ this._resizeObserver = null;
+ }
+ this._untrapFocus();
+ },
+
+ _trapFocus() {
+ let fm = Services.focus;
+ fm.moveFocus(this._frame.contentWindow, null, fm.MOVEFOCUS_FIRST, 0);
+ this._frame.contentDocument.addEventListener("keydown", this, true);
+ this._closeButton.addEventListener("keydown", this);
+
+ window.addEventListener("focus", this, true);
+ },
+
+ _untrapFocus() {
+ this._frame.contentDocument.removeEventListener("keydown", this, true);
+ this._closeButton.removeEventListener("keydown", this);
+ window.removeEventListener("focus", this);
+ },
+
+ _getBrowser() {
+ return window.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIWebNavigation)
+ .QueryInterface(Ci.nsIDocShell)
+ .chromeEventHandler;
+ },
+};
rename from browser/components/preferences/in-content/sync.js
rename to browser/components/preferences/in-content-new/sync.js
new file mode 100755
--- /dev/null
+++ b/browser/components/preferences/in-content-new/sync.xul
@@ -0,0 +1,225 @@
+# 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/.
+
+<!-- Sync panel -->
+
+<preferences id="syncEnginePrefs" hidden="true" data-category="paneSync">
+ <preference id="engine.addons"
+ name="services.sync.engine.addons"
+ type="bool"/>
+ <preference id="engine.bookmarks"
+ name="services.sync.engine.bookmarks"
+ type="bool"/>
+ <preference id="engine.history"
+ name="services.sync.engine.history"
+ type="bool"/>
+ <preference id="engine.tabs"
+ name="services.sync.engine.tabs"
+ type="bool"/>
+ <preference id="engine.prefs"
+ name="services.sync.engine.prefs"
+ type="bool"/>
+ <preference id="engine.passwords"
+ name="services.sync.engine.passwords"
+ type="bool"/>
+</preferences>
+
+<script type="application/javascript"
+ src="chrome://browser/content/preferences/in-content-new/sync.js"/>
+
+<hbox id="header-sync"
+ class="header"
+ hidden="true"
+ data-category="paneSync">
+ <label class="header-name" flex="1">&paneSync1.title;</label>
+</hbox>
+
+<deck id="weavePrefsDeck" data-category="paneSync" hidden="true">
+ <vbox id="noFxaAccount">
+ <hbox>
+ <vbox id="fxaContentWrapper">
+ <groupbox id="noFxaGroup">
+ <vbox>
+ <label id="noFxaCaption">&signedOut.caption;</label>
+ <description id="noFxaDescription" flex="1">&signedOut.description;</description>
+ <hbox class="fxaAccountBox">
+ <vbox>
+ <image class="fxaFirefoxLogo"/>
+ </vbox>
+ <vbox flex="1">
+ <label id="signedOutAccountBoxTitle">&signedOut.accountBox.title;</label>
+ <hbox class="fxaAccountBoxButtons">
+ <button id="noFxaSignUp" label="&signedOut.accountBox.create;" accesskey="&signedOut.accountBox.create.accesskey;"></button>
+ <button id="noFxaSignIn" label="&signedOut.accountBox.signin;" accesskey="&signedOut.accountBox.signin.accesskey;"></button>
+ </hbox>
+ </vbox>
+ </hbox>
+ </vbox>
+ </groupbox>
+ </vbox>
+ <vbox>
+ <html:img class="fxaSyncIllustration" src="chrome://browser/skin/fxa/sync-illustration.svg"/>
+ </vbox>
+ </hbox>
+ <label class="fxaMobilePromo">
+ &mobilePromo3.start;<!-- We put these comments to avoid inserting white spaces
+ --><label id="fxaMobilePromo-android"
+ class="androidLink text-link"><!--
+ -->&mobilePromo3.androidLink;</label><!--
+ -->&mobilePromo3.iOSBefore;<!--
+ --><label id="fxaMobilePromo-ios"
+ class="iOSLink text-link"><!--
+ -->&mobilePromo3.iOSLink;</label><!--
+ -->&mobilePromo3.end;
+ </label>
+ </vbox>
+
+ <vbox id="hasFxaAccount">
+ <hbox>
+ <vbox id="fxaContentWrapper">
+ <groupbox id="fxaGroup">
+ <caption><label>&syncBrand.fxAccount.label;</label></caption>
+ <deck id="fxaLoginStatus">
+
+ <!-- logged in and verified and all is good -->
+ <hbox id="fxaLoginVerified" class="fxaAccountBox">
+ <vbox align="center" pack="center">
+ <image id="fxaProfileImage" class="actionable"
+ role="button"
+ onclick="gSyncPane.openChangeProfileImage(event);"
+ onkeypress="gSyncPane.openChangeProfileImage(event);"
+ tooltiptext="&profilePicture.tooltip;"/>
+ </vbox>
+ <vbox flex="1" pack="center">
+ <label id="fxaDisplayName" hidden="true"/>
+ <label id="fxaEmailAddress1"/>
+ <hbox class="fxaAccountBoxButtons">
+ <button id="fxaUnlinkButton" label="&disconnect3.label;" accesskey="&disconnect3.accesskey;"/>
+ <html:a id="verifiedManage" target="_blank"
+ accesskey="&verifiedManage.accesskey;"
+ onkeypress="gSyncPane.openManageFirefoxAccount(event);"><!--
+ -->&verifiedManage.label;</html:a>
+ </hbox>
+ </vbox>
+ </hbox>
+
+ <!-- logged in to an unverified account -->
+ <hbox id="fxaLoginUnverified" class="fxaAccountBox">
+ <vbox>
+ <image id="fxaProfileImage"/>
+ </vbox>
+ <vbox flex="1">
+ <hbox>
+ <vbox><image id="fxaLoginRejectedWarning"/></vbox>
+ <description flex="1">
+ &signedInUnverified.beforename.label;
+ <label id="fxaEmailAddress2"/>
+ &signedInUnverified.aftername.label;
+ </description>
+ </hbox>
+ <hbox class="fxaAccountBoxButtons">
+ <button id="verifyFxaAccount" label="&verify.label;" accesskey="&verify.accesskey;"></button>
+ <button id="unverifiedUnlinkFxaAccount" label="&forget.label;" accesskey="&forget.accesskey;"></button>
+ </hbox>
+ </vbox>
+ </hbox>
+
+ <!-- logged in locally but server rejected credentials -->
+ <hbox id="fxaLoginRejected" class="fxaAccountBox">
+ <vbox>
+ <image id="fxaProfileImage"/>
+ </vbox>
+ <vbox flex="1">
+ <hbox>
+ <vbox><image id="fxaLoginRejectedWarning"/></vbox>
+ <description flex="1">
+ &signedInLoginFailure.beforename.label;
+ <label id="fxaEmailAddress3"/>
+ &signedInLoginFailure.aftername.label;
+ </description>
+ </hbox>
+ <hbox class="fxaAccountBoxButtons">
+ <button id="rejectReSignIn" label="&signIn.label;" accesskey="&signIn.accesskey;"></button>
+ <button id="rejectUnlinkFxaAccount" label="&forget.label;" accesskey="&forget.accesskey;"></button>
+ </hbox>
+ </vbox>
+ </hbox>
+ </deck>
+ </groupbox>
+ <groupbox id="syncOptions">
+ <caption><label>&signedIn.settings.label;</label></caption>
+ <description>&signedIn.settings.description;</description>
+ <hbox id="fxaSyncEngines">
+ <vbox align="start" flex="1">
+ <checkbox label="&engine.tabs.label2;"
+ accesskey="&engine.tabs.accesskey;"
+ preference="engine.tabs"/>
+ <checkbox label="&engine.bookmarks.label;"
+ accesskey="&engine.bookmarks.accesskey;"
+ preference="engine.bookmarks"/>
+ <checkbox label="&engine.logins.label;"
+ accesskey="&engine.logins.accesskey;"
+ preference="engine.passwords"/>
+ </vbox>
+ <vbox align="start" flex="1">
+ <checkbox label="&engine.history.label;"
+ accesskey="&engine.history.accesskey;"
+ preference="engine.history"/>
+ <checkbox label="&engine.addons.label;"
+ accesskey="&engine.addons.accesskey;"
+ preference="engine.addons"/>
+ <checkbox label="&engine.prefs.label;"
+ accesskey="&engine.prefs.accesskey;"
+ preference="engine.prefs"/>
+ </vbox>
+ <spacer/>
+ </hbox>
+ </groupbox>
+ </vbox>
+ <vbox>
+ <html:img class="fxaSyncIllustration" src="chrome://browser/skin/fxa/sync-illustration.svg"/>
+ </vbox>
+ </hbox>
+ <groupbox>
+ <caption>
+ <label control="fxaSyncComputerName">
+ &fxaSyncDeviceName.label;
+ </label>
+ </caption>
+ <hbox id="fxaDeviceName">
+ <textbox id="fxaSyncComputerName" disabled="true"/>
+ <hbox>
+ <button id="fxaChangeDeviceName"
+ label="&changeSyncDeviceName2.label;"
+ accesskey="&changeSyncDeviceName2.accesskey;"/>
+ <button id="fxaCancelChangeDeviceName"
+ label="&cancelChangeSyncDeviceName.label;"
+ accesskey="&cancelChangeSyncDeviceName.accesskey;"
+ hidden="true"/>
+ <button id="fxaSaveChangeDeviceName"
+ label="&saveChangeSyncDeviceName.label;"
+ accesskey="&saveChangeSyncDeviceName.accesskey;"
+ hidden="true"/>
+ </hbox>
+ </hbox>
+ </groupbox>
+ <label class="fxaMobilePromo">
+ &mobilePromo3.start;<!-- We put these comments to avoid inserting white spaces
+ --><label class="androidLink text-link" id="fxaMobilePromo-android-hasFxaAccount"><!--
+ -->&mobilePromo3.androidLink;</label><!--
+ -->&mobilePromo3.iOSBefore;<!--
+ --><label class="iOSLink text-link" id="fxaMobilePromo-ios-hasFxaAccount"><!--
+ -->&mobilePromo3.iOSLink;</label><!--
+ -->&mobilePromo3.end;
+ </label>
+ <vbox id="tosPP-small" align="start">
+ <label id="tosPP-small-ToS" class="text-link">
+ &prefs.tosLink.label;
+ </label>
+ <label id="tosPP-small-PP" class="text-link">
+ &fxaPrivacyNotice.link.label;
+ </label>
+ </vbox>
+ </vbox>
+</deck>
rename from browser/components/preferences/in-content/tests/.eslintrc.js
rename to browser/components/preferences/in-content-new/tests/.eslintrc.js
rename from browser/components/preferences/in-content/tests/browser.ini
rename to browser/components/preferences/in-content-new/tests/browser.ini
rename from browser/components/preferences/in-content/tests/browser_advanced_update.js
rename to browser/components/preferences/in-content-new/tests/browser_advanced_update.js
rename from browser/components/preferences/in-content/tests/browser_applications_selection.js
rename to browser/components/preferences/in-content-new/tests/browser_applications_selection.js
rename from browser/components/preferences/in-content/tests/browser_basic_rebuild_fonts_test.js
rename to browser/components/preferences/in-content-new/tests/browser_basic_rebuild_fonts_test.js
rename from browser/components/preferences/in-content/tests/browser_bug1018066_resetScrollPosition.js
rename to browser/components/preferences/in-content-new/tests/browser_bug1018066_resetScrollPosition.js
rename from browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js
rename to browser/components/preferences/in-content-new/tests/browser_bug1020245_openPreferences_to_paneContent.js
rename from browser/components/preferences/in-content/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.js
rename to browser/components/preferences/in-content-new/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.js
rename from browser/components/preferences/in-content/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.xul
rename to browser/components/preferences/in-content-new/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.xul
rename from browser/components/preferences/in-content/tests/browser_bug410900.js
rename to browser/components/preferences/in-content-new/tests/browser_bug410900.js
rename from browser/components/preferences/in-content/tests/browser_bug705422.js
rename to browser/components/preferences/in-content-new/tests/browser_bug705422.js
rename from browser/components/preferences/in-content/tests/browser_bug731866.js
rename to browser/components/preferences/in-content-new/tests/browser_bug731866.js
rename from browser/components/preferences/in-content/tests/browser_bug795764_cachedisabled.js
rename to browser/components/preferences/in-content-new/tests/browser_bug795764_cachedisabled.js
rename from browser/components/preferences/in-content/tests/browser_change_app_handler.js
rename to browser/components/preferences/in-content-new/tests/browser_change_app_handler.js
rename from browser/components/preferences/in-content/tests/browser_checkspelling.js
rename to browser/components/preferences/in-content-new/tests/browser_checkspelling.js
rename from browser/components/preferences/in-content/tests/browser_connection.js
rename to browser/components/preferences/in-content-new/tests/browser_connection.js
rename from browser/components/preferences/in-content/tests/browser_connection_bug388287.js
rename to browser/components/preferences/in-content-new/tests/browser_connection_bug388287.js
rename from browser/components/preferences/in-content/tests/browser_cookies_exceptions.js
rename to browser/components/preferences/in-content-new/tests/browser_cookies_exceptions.js
rename from browser/components/preferences/in-content/tests/browser_defaultbrowser_alwayscheck.js
rename to browser/components/preferences/in-content-new/tests/browser_defaultbrowser_alwayscheck.js
rename from browser/components/preferences/in-content/tests/browser_engines.js
rename to browser/components/preferences/in-content-new/tests/browser_engines.js
rename from browser/components/preferences/in-content/tests/browser_healthreport.js
rename to browser/components/preferences/in-content-new/tests/browser_healthreport.js
rename from browser/components/preferences/in-content/tests/browser_homepages_filter_aboutpreferences.js
rename to browser/components/preferences/in-content-new/tests/browser_homepages_filter_aboutpreferences.js
rename from browser/components/preferences/in-content/tests/browser_layersacceleration.js
rename to browser/components/preferences/in-content-new/tests/browser_layersacceleration.js
rename from browser/components/preferences/in-content/tests/browser_masterpassword.js
rename to browser/components/preferences/in-content-new/tests/browser_masterpassword.js
rename from browser/components/preferences/in-content/tests/browser_notifications_do_not_disturb.js
rename to browser/components/preferences/in-content-new/tests/browser_notifications_do_not_disturb.js
rename from browser/components/preferences/in-content/tests/browser_performance.js
rename to browser/components/preferences/in-content-new/tests/browser_performance.js
rename from browser/components/preferences/in-content/tests/browser_permissions_urlFieldHidden.js
rename to browser/components/preferences/in-content-new/tests/browser_permissions_urlFieldHidden.js
rename from browser/components/preferences/in-content/tests/browser_privacypane_1.js
rename to browser/components/preferences/in-content-new/tests/browser_privacypane_1.js
rename from browser/components/preferences/in-content/tests/browser_privacypane_3.js
rename to browser/components/preferences/in-content-new/tests/browser_privacypane_3.js
rename from browser/components/preferences/in-content/tests/browser_privacypane_4.js
rename to browser/components/preferences/in-content-new/tests/browser_privacypane_4.js
rename from browser/components/preferences/in-content/tests/browser_privacypane_5.js
rename to browser/components/preferences/in-content-new/tests/browser_privacypane_5.js
rename from browser/components/preferences/in-content/tests/browser_privacypane_8.js
rename to browser/components/preferences/in-content-new/tests/browser_privacypane_8.js
rename from browser/components/preferences/in-content/tests/browser_proxy_backup.js
rename to browser/components/preferences/in-content-new/tests/browser_proxy_backup.js
rename from browser/components/preferences/in-content/tests/browser_sanitizeOnShutdown_prefLocked.js
rename to browser/components/preferences/in-content-new/tests/browser_sanitizeOnShutdown_prefLocked.js
rename from browser/components/preferences/in-content/tests/browser_search_within_preferences.js
rename to browser/components/preferences/in-content-new/tests/browser_search_within_preferences.js
rename from browser/components/preferences/in-content/tests/browser_searchsuggestions.js
rename to browser/components/preferences/in-content-new/tests/browser_searchsuggestions.js
rename from browser/components/preferences/in-content/tests/browser_security.js
rename to browser/components/preferences/in-content-new/tests/browser_security.js
new file mode 100644
--- /dev/null
+++ b/browser/components/preferences/in-content-new/tests/browser_siteData.js
@@ -0,0 +1,426 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
+
+Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+/* import-globals-from ../../../../../testing/modules/sinon-1.16.1.js */
+Services.scriptloader.loadSubScript("resource://testing-common/sinon-1.16.1.js");
+
+const TEST_QUOTA_USAGE_HOST = "example.com";
+const TEST_QUOTA_USAGE_ORIGIN = "https://" + TEST_QUOTA_USAGE_HOST;
+const TEST_QUOTA_USAGE_URL = TEST_QUOTA_USAGE_ORIGIN + "/browser/browser/components/preferences/in-content-new/tests/site_data_test.html";
+const TEST_OFFLINE_HOST = "example.org";
+const TEST_OFFLINE_ORIGIN = "https://" + TEST_OFFLINE_HOST;
+const TEST_OFFLINE_URL = TEST_OFFLINE_ORIGIN + "/browser/browser/components/preferences/in-content-new/tests/offline/offline.html";
+const REMOVE_DIALOG_URL = "chrome://browser/content/preferences/siteDataRemoveSelected.xul";
+
+const { NetUtil } = Cu.import("resource://gre/modules/NetUtil.jsm", {});
+const { DownloadUtils } = Cu.import("resource://gre/modules/DownloadUtils.jsm", {});
+const { SiteDataManager } = Cu.import("resource:///modules/SiteDataManager.jsm", {});
+const { OfflineAppCacheHelper } = Cu.import("resource:///modules/offlineAppCache.jsm", {});
+
+const mockOfflineAppCacheHelper = {
+ clear: null,
+
+ originalClear: null,
+
+ register() {
+ this.originalClear = OfflineAppCacheHelper.clear;
+ this.clear = sinon.spy();
+ OfflineAppCacheHelper.clear = this.clear;
+ },
+
+ unregister() {
+ OfflineAppCacheHelper.clear = this.originalClear;
+ }
+};
+
+function getPersistentStoragePermStatus(origin) {
+ let uri = NetUtil.newURI(origin);
+ let principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
+ return Services.perms.testExactPermissionFromPrincipal(principal, "persistent-storage");
+}
+
+function getQuotaUsage(origin) {
+ return new Promise(resolve => {
+ let uri = NetUtil.newURI(origin);
+ let principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
+ Services.qms.getUsageForPrincipal(principal, request => resolve(request.result.usage));
+ });
+}
+
+// XXX: The intermittent bug 1331851
+// The implementation of nsICacheStorageConsumptionObserver must be passed as weak referenced,
+// so we must hold this observer here well. If we didn't, there would be a chance that
+// in Linux debug test run the observer was released before the operation at gecko was completed
+// (may be because of a relatively quicker GC cycle or a relatively slower operation).
+// As a result of that, we would never get the cache usage we want so the test would fail from timeout.
+const cacheUsageGetter = {
+ _promise: null,
+ _resolve: null,
+ get() {
+ if (!this._promise) {
+ this._promise = new Promise(resolve => {
+ this._resolve = resolve;
+ Services.cache2.asyncGetDiskConsumption(this);
+ });
+ }
+ return this._promise;
+ },
+ // nsICacheStorageConsumptionObserver implementations
+ onNetworkCacheDiskConsumption(usage) {
+ cacheUsageGetter._promise = null;
+ cacheUsageGetter._resolve(usage);
+ },
+ QueryInterface: XPCOMUtils.generateQI([
+ Components.interfaces.nsICacheStorageConsumptionObserver,
+ Components.interfaces.nsISupportsWeakReference
+ ]),
+};
+
+function promiseCookiesCleared() {
+ return TestUtils.topicObserved("cookie-changed", (subj, data) => {
+ return data === "cleared";
+ });
+}
+
+registerCleanupFunction(function() {
+ delete window.sinon;
+ delete window.setImmediate;
+ delete window.clearImmediate;
+ mockOfflineAppCacheHelper.unregister();
+});
+
+// Test listing site using quota usage or site using appcache
+add_task(async function() {
+ await SpecialPowers.pushPrefEnv({set: [["browser.storageManager.enabled", true]]});
+
+ // Open a test site which would save into appcache
+ await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_OFFLINE_URL);
+ await BrowserTestUtils.removeTab(gBrowser.selectedTab);
+
+ // Open a test site which would save into quota manager
+ await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_QUOTA_USAGE_URL);
+ await waitForEvent(gBrowser.selectedBrowser.contentWindow, "test-indexedDB-done");
+ await BrowserTestUtils.removeTab(gBrowser.selectedTab);
+
+ let updatedPromise = promiseSiteDataManagerSitesUpdated();
+ await openPreferencesViaOpenPreferencesAPI("privacy", { leaveOpen: true });
+ await updatedPromise;
+ await openSiteDataSettingsDialog();
+ let doc = gBrowser.selectedBrowser.contentDocument;
+ let dialogFrame = doc.getElementById("dialogFrame");
+ let frameDoc = dialogFrame.contentDocument;
+
+ let siteItems = frameDoc.getElementsByTagName("richlistitem");
+ is(siteItems.length, 2, "Should list sites using quota usage or appcache");
+
+ let appcacheSite = frameDoc.querySelector(`richlistitem[host="${TEST_OFFLINE_HOST}"]`);
+ ok(appcacheSite, "Should list site using appcache");
+
+ let qoutaUsageSite = frameDoc.querySelector(`richlistitem[host="${TEST_QUOTA_USAGE_HOST}"]`);
+ ok(qoutaUsageSite, "Should list site using quota usage");
+
+ // Always remember to clean up
+ OfflineAppCacheHelper.clear();
+ await new Promise(resolve => {
+ let principal = Services.scriptSecurityManager
+ .createCodebasePrincipalFromOrigin(TEST_QUOTA_USAGE_ORIGIN);
+ let request = Services.qms.clearStoragesForPrincipal(principal, null, true);
+ request.callback = resolve;
+ });
+ await BrowserTestUtils.removeTab(gBrowser.selectedTab);
+});
+
+// Test buttons are disabled and loading message shown while updating sites
+add_task(async function() {
+ await SpecialPowers.pushPrefEnv({set: [["browser.storageManager.enabled", true]]});
+ let updatedPromise = promiseSiteDataManagerSitesUpdated();
+ await openPreferencesViaOpenPreferencesAPI("privacy", { leaveOpen: true });
+ await updatedPromise;
+
+ let actual = null;
+ let expected = null;
+ let doc = gBrowser.selectedBrowser.contentDocument;
+ let clearBtn = doc.getElementById("clearSiteDataButton");
+ let settingsButton = doc.getElementById("siteDataSettings");
+ let prefStrBundle = doc.getElementById("bundlePreferences");
+ let totalSiteDataSizeLabel = doc.getElementById("totalSiteDataSize");
+ is(clearBtn.disabled, false, "Should enable clear button after sites updated");
+ is(settingsButton.disabled, false, "Should enable settings button after sites updated");
+ await SiteDataManager.getTotalUsage()
+ .then(usage => {
+ actual = totalSiteDataSizeLabel.textContent;
+ expected = prefStrBundle.getFormattedString(
+ "totalSiteDataSize", DownloadUtils.convertByteUnits(usage));
+ is(actual, expected, "Should show the right total site data size");
+ });
+
+ Services.obs.notifyObservers(null, "sitedatamanager:updating-sites");
+ is(clearBtn.disabled, true, "Should disable clear button while updating sites");
+ is(settingsButton.disabled, true, "Should disable settings button while updating sites");
+ actual = totalSiteDataSizeLabel.textContent;
+ expected = prefStrBundle.getString("loadingSiteDataSize");
+ is(actual, expected, "Should show the loading message while updating");
+
+ Services.obs.notifyObservers(null, "sitedatamanager:sites-updated");
+ is(clearBtn.disabled, false, "Should enable clear button after sites updated");
+ is(settingsButton.disabled, false, "Should enable settings button after sites updated");
+ await SiteDataManager.getTotalUsage()
+ .then(usage => {
+ actual = totalSiteDataSizeLabel.textContent;
+ expected = prefStrBundle.getFormattedString(
+ "totalSiteDataSize", DownloadUtils.convertByteUnits(usage));
+ is(actual, expected, "Should show the right total site data size");
+ });
+
+ await BrowserTestUtils.removeTab(gBrowser.selectedTab);
+});
+
+// Test the function of the "Clear All Data" button
+add_task(async function() {
+ await SpecialPowers.pushPrefEnv({set: [["browser.storageManager.enabled", true]]});
+ addPersistentStoragePerm(TEST_QUOTA_USAGE_ORIGIN);
+
+ await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_QUOTA_USAGE_URL);
+ await waitForEvent(gBrowser.selectedBrowser.contentWindow, "test-indexedDB-done");
+ await BrowserTestUtils.removeTab(gBrowser.selectedTab);
+
+ await openPreferencesViaOpenPreferencesAPI("privacy", { leaveOpen: true });
+
+ // Test the initial states
+ let cacheUsage = await cacheUsageGetter.get();
+ let quotaUsage = await getQuotaUsage(TEST_QUOTA_USAGE_ORIGIN);
+ let totalUsage = await SiteDataManager.getTotalUsage();
+ Assert.greater(cacheUsage, 0, "The cache usage should not be 0");
+ Assert.greater(quotaUsage, 0, "The quota usage should not be 0");
+ Assert.greater(totalUsage, 0, "The total usage should not be 0");
+
+ // Test cancelling "Clear All Data"
+ // Click "Clear All Data" button and then cancel
+ let doc = gBrowser.selectedBrowser.contentDocument;
+ let cancelPromise = promiseAlertDialogOpen("cancel");
+ let clearBtn = doc.getElementById("clearSiteDataButton");
+ clearBtn.doCommand();
+ await cancelPromise;
+
+ // Test the items are not removed
+ let status = getPersistentStoragePermStatus(TEST_QUOTA_USAGE_ORIGIN);
+ is(status, Ci.nsIPermissionManager.ALLOW_ACTION, "Should not remove permission");
+
+ cacheUsage = await cacheUsageGetter.get();
+ quotaUsage = await getQuotaUsage(TEST_QUOTA_USAGE_ORIGIN);
+ totalUsage = await SiteDataManager.getTotalUsage();
+ Assert.greater(cacheUsage, 0, "The cache usage should not be 0");
+ Assert.greater(quotaUsage, 0, "The quota usage should not be 0");
+ Assert.greater(totalUsage, 0, "The total usage should not be 0");
+ // Test cancelling "Clear All Data" ends
+
+ // Test accepting "Clear All Data"
+ // Click "Clear All Data" button and then accept
+ let acceptPromise = promiseAlertDialogOpen("accept");
+ let updatePromise = promiseSiteDataManagerSitesUpdated();
+ let cookiesClearedPromise = promiseCookiesCleared();
+
+ mockOfflineAppCacheHelper.register();
+ clearBtn.doCommand();
+ await acceptPromise;
+ await updatePromise;
+ mockOfflineAppCacheHelper.unregister();
+
+ // Test all the items are removed
+ await cookiesClearedPromise;
+
+ ok(mockOfflineAppCacheHelper.clear.calledOnce, "Should clear app cache");
+
+ status = getPersistentStoragePermStatus(TEST_QUOTA_USAGE_ORIGIN);
+ is(status, Ci.nsIPermissionManager.UNKNOWN_ACTION, "Should remove permission");
+
+ cacheUsage = await cacheUsageGetter.get();
+ quotaUsage = await getQuotaUsage(TEST_QUOTA_USAGE_ORIGIN);
+ totalUsage = await SiteDataManager.getTotalUsage();
+ is(cacheUsage, 0, "The cache usage should be removed");
+ is(quotaUsage, 0, "The quota usage should be removed");
+ is(totalUsage, 0, "The total usage should be removed");
+ // Test accepting "Clear All Data" ends
+
+ await BrowserTestUtils.removeTab(gBrowser.selectedTab);
+});
+
+// Test sorting
+add_task(async function() {
+ await SpecialPowers.pushPrefEnv({set: [["browser.storageManager.enabled", true]]});
+ mockSiteDataManager.register(SiteDataManager);
+ mockSiteDataManager.fakeSites = [
+ {
+ usage: 1024,
+ principal: Services.scriptSecurityManager
+ .createCodebasePrincipalFromOrigin("https://account.xyz.com"),
+ persisted: true
+ },
+ {
+ usage: 1024 * 2,
+ principal: Services.scriptSecurityManager
+ .createCodebasePrincipalFromOrigin("https://books.foo.com"),
+ persisted: false
+ },
+ {
+ usage: 1024 * 3,
+ principal: Services.scriptSecurityManager
+ .createCodebasePrincipalFromOrigin("http://cinema.bar.com"),
+ persisted: true
+ },
+ ];
+
+ let updatePromise = promiseSiteDataManagerSitesUpdated();
+ await openPreferencesViaOpenPreferencesAPI("privacy", { leaveOpen: true });
+ await updatePromise;
+ await openSiteDataSettingsDialog();
+
+ let doc = gBrowser.selectedBrowser.contentDocument;
+ let dialogFrame = doc.getElementById("dialogFrame");
+ let frameDoc = dialogFrame.contentDocument;
+ let hostCol = frameDoc.getElementById("hostCol");
+ let usageCol = frameDoc.getElementById("usageCol");
+ let statusCol = frameDoc.getElementById("statusCol");
+ let sitesList = frameDoc.getElementById("sitesList");
+
+ // Test default sorting
+ assertSortByUsage("descending");
+
+ // Test sorting on the usage column
+ usageCol.click();
+ assertSortByUsage("ascending");
+ usageCol.click();
+ assertSortByUsage("descending");
+
+ // Test sorting on the host column
+ hostCol.click();
+ assertSortByHost("ascending");
+ hostCol.click();
+ assertSortByHost("descending");
+
+ // Test sorting on the permission status column
+ statusCol.click();
+ assertSortByStatus("ascending");
+ statusCol.click();
+ assertSortByStatus("descending");
+
+ mockSiteDataManager.unregister();
+ await BrowserTestUtils.removeTab(gBrowser.selectedTab);
+
+ function assertSortByHost(order) {
+ let siteItems = sitesList.getElementsByTagName("richlistitem");
+ for (let i = 0; i < siteItems.length - 1; ++i) {
+ let aHost = siteItems[i].getAttribute("host");
+ let bHost = siteItems[i + 1].getAttribute("host");
+ let result = aHost.localeCompare(bHost);
+ if (order == "ascending") {
+ Assert.lessOrEqual(result, 0, "Should sort sites in the ascending order by host");
+ } else {
+ Assert.greaterOrEqual(result, 0, "Should sort sites in the descending order by host");
+ }
+ }
+ }
+
+ function assertSortByStatus(order) {
+ let siteItems = sitesList.getElementsByTagName("richlistitem");
+ for (let i = 0; i < siteItems.length - 1; ++i) {
+ let aHost = siteItems[i].getAttribute("host");
+ let bHost = siteItems[i + 1].getAttribute("host");
+ let a = findSiteByHost(aHost);
+ let b = findSiteByHost(bHost);
+ let result = 0;
+ if (a.persisted && !b.persisted) {
+ result = 1;
+ } else if (!a.persisted && b.persisted) {
+ result = -1;
+ }
+ if (order == "ascending") {
+ Assert.lessOrEqual(result, 0, "Should sort sites in the ascending order by permission status");
+ } else {
+ Assert.greaterOrEqual(result, 0, "Should sort sites in the descending order by permission status");
+ }
+ }
+ }
+
+ function assertSortByUsage(order) {
+ let siteItems = sitesList.getElementsByTagName("richlistitem");
+ for (let i = 0; i < siteItems.length - 1; ++i) {
+ let aHost = siteItems[i].getAttribute("host");
+ let bHost = siteItems[i + 1].getAttribute("host");
+ let a = findSiteByHost(aHost);
+ let b = findSiteByHost(bHost);
+ let result = a.usage - b.usage;
+ if (order == "ascending") {
+ Assert.lessOrEqual(result, 0, "Should sort sites in the ascending order by usage");
+ } else {
+ Assert.greaterOrEqual(result, 0, "Should sort sites in the descending order by usage");
+ }
+ }
+ }
+
+ function findSiteByHost(host) {
+ return mockSiteDataManager.fakeSites.find(site => site.principal.URI.host == host);
+ }
+});
+
+// Test search on the host column
+add_task(async function() {
+ await SpecialPowers.pushPrefEnv({set: [["browser.storageManager.enabled", true]]});
+ mockSiteDataManager.register(SiteDataManager);
+ mockSiteDataManager.fakeSites = [
+ {
+ usage: 1024,
+ principal: Services.scriptSecurityManager
+ .createCodebasePrincipalFromOrigin("https://account.xyz.com"),
+ persisted: true
+ },
+ {
+ usage: 1024,
+ principal: Services.scriptSecurityManager
+ .createCodebasePrincipalFromOrigin("https://shopping.xyz.com"),
+ persisted: false
+ },
+ {
+ usage: 1024,
+ principal: Services.scriptSecurityManager
+ .createCodebasePrincipalFromOrigin("http://cinema.bar.com"),
+ persisted: true
+ },
+ {
+ usage: 1024,
+ principal: Services.scriptSecurityManager
+ .createCodebasePrincipalFromOrigin("http://email.bar.com"),
+ persisted: false
+ },
+ ];
+ let fakeHosts = mockSiteDataManager.fakeSites.map(site => site.principal.URI.host);
+
+ let updatePromise = promiseSiteDataManagerSitesUpdated();
+ await openPreferencesViaOpenPreferencesAPI("privacy", { leaveOpen: true });
+ await updatePromise;
+ await openSiteDataSettingsDialog();
+
+ let doc = gBrowser.selectedBrowser.contentDocument;
+ let frameDoc = doc.getElementById("dialogFrame").contentDocument;
+ let searchBox = frameDoc.getElementById("searchBox");
+
+ searchBox.value = "xyz";
+ searchBox.doCommand();
+ assertSitesListed(doc, fakeHosts.filter(host => host.includes("xyz")));
+
+ searchBox.value = "bar";
+ searchBox.doCommand();
+ assertSitesListed(doc, fakeHosts.filter(host => host.includes("bar")));
+
+ searchBox.value = "";
+ searchBox.doCommand();
+ assertSitesListed(doc, fakeHosts);
+
+ mockSiteDataManager.unregister();
+ await BrowserTestUtils.removeTab(gBrowser.selectedTab);
+});
rename from browser/components/preferences/in-content/tests/browser_siteData2.js
rename to browser/components/preferences/in-content-new/tests/browser_siteData2.js
rename from browser/components/preferences/in-content/tests/browser_subdialogs.js
rename to browser/components/preferences/in-content-new/tests/browser_subdialogs.js
rename from browser/components/preferences/in-content/tests/browser_telemetry.js
rename to browser/components/preferences/in-content-new/tests/browser_telemetry.js
rename from browser/components/preferences/in-content/tests/head.js
rename to browser/components/preferences/in-content-new/tests/head.js
rename from browser/components/preferences/in-content/tests/offline/manifest.appcache
rename to browser/components/preferences/in-content-new/tests/offline/manifest.appcache
rename from browser/components/preferences/in-content/tests/offline/offline.html
rename to browser/components/preferences/in-content-new/tests/offline/offline.html
rename from browser/components/preferences/in-content/tests/privacypane_tests_perwindow.js
rename to browser/components/preferences/in-content-new/tests/privacypane_tests_perwindow.js
rename from browser/components/preferences/in-content/tests/site_data_test.html
rename to browser/components/preferences/in-content-new/tests/site_data_test.html
rename from browser/components/preferences/in-content/tests/subdialog.xul
rename to browser/components/preferences/in-content-new/tests/subdialog.xul
rename from browser/components/preferences/in-content/tests/subdialog2.xul
rename to browser/components/preferences/in-content-new/tests/subdialog2.xul
deleted file mode 100644
--- a/browser/components/preferences/in-content/advanced.xul
+++ /dev/null
@@ -1,194 +0,0 @@
-# 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/.
-
-<!-- Advanced panel -->
-
-#ifdef MOZ_UPDATER
- <script type="application/javascript" src="chrome://browser/content/aboutDialog-appUpdater.js"/>
-#endif
-
-<script type="application/javascript"
- src="chrome://browser/content/preferences/in-content/advanced.js"/>
-
-<preferences id="advancedPreferences" hidden="true" data-category="paneAdvanced">
- <preference id="browser.preferences.advanced.selectedTabIndex"
- name="browser.preferences.advanced.selectedTabIndex"
- type="int"/>
-
-<!-- Update tab -->
-#ifdef MOZ_UPDATER
- <preference id="app.update.enabled"
- name="app.update.enabled"
- type="bool"/>
- <preference id="app.update.auto"
- name="app.update.auto"
- type="bool"/>
-
- <preference id="app.update.disable_button.showUpdateHistory"
- name="app.update.disable_button.showUpdateHistory"
- type="bool"/>
-
-#ifdef MOZ_MAINTENANCE_SERVICE
- <preference id="app.update.service.enabled"
- name="app.update.service.enabled"
- type="bool"/>
-#endif
-#endif
-
- <preference id="browser.search.update"
- name="browser.search.update"
- type="bool"/>
-</preferences>
-
-#ifdef HAVE_SHELL_SERVICE
- <stringbundle id="bundleShell" src="chrome://browser/locale/shellservice.properties"/>
- <stringbundle id="bundleBrand" src="chrome://branding/locale/brand.properties"/>
-#endif
-
-<hbox id="header-advanced"
- class="header"
- hidden="true"
- data-category="paneAdvanced">
- <label class="header-name" flex="1">&paneUpdates.title;</label>
-</hbox>
-
-<!-- Update -->
-<groupbox id="updateApp" data-category="paneAdvanced" hidden="true">
- <caption><label>&updateApplication.label;</label></caption>
- <hbox align="start">
- <vbox flex="1">
- <description>
- &updateApplication.version.pre;<label id="version"/>&updateApplication.version.post;
- <label id="releasenotes" class="learnMore text-link" hidden="true">&releaseNotes.link;</label>
- </description>
- <description id="distribution" class="text-blurb" hidden="true"/>
- <description id="distributionId" class="text-blurb" hidden="true"/>
- </vbox>
-#ifdef MOZ_UPDATER
- <spacer flex="1"/>
- <vbox>
- <button id="showUpdateHistory"
- class="accessory-button"
- label="&updateHistory2.label;"
- accesskey="&updateHistory2.accesskey;"
- preference="app.update.disable_button.showUpdateHistory"/>
- </vbox>
-#endif
- </hbox>
-#ifdef MOZ_UPDATER
- <vbox id="updateBox">
- <deck id="updateDeck" orient="vertical">
- <hbox id="checkForUpdates" align="center">
- <spacer flex="1"/>
- <button id="checkForUpdatesButton"
- label="&update.checkForUpdatesButton.label;"
- accesskey="&update.checkForUpdatesButton.accesskey;"
- oncommand="gAppUpdater.checkForUpdates();"/>
- </hbox>
- <hbox id="downloadAndInstall" align="center">
- <spacer flex="1"/>
- <button id="downloadAndInstallButton"
- oncommand="gAppUpdater.startDownload();"/>
- <!-- label and accesskey will be filled by JS -->
- </hbox>
- <hbox id="apply" align="center">
- <spacer flex="1"/>
- <button id="updateButton"
- label="&update.updateButton.label3;"
- accesskey="&update.updateButton.accesskey;"
- oncommand="gAppUpdater.buttonRestartAfterDownload();"/>
- </hbox>
- <hbox id="checkingForUpdates" align="center">
- <image class="update-throbber"/><label>&update.checkingForUpdates;</label>
- <spacer flex="1"/>
- <button label="&update.checkForUpdatesButton.label;"
- accesskey="&update.checkForUpdatesButton.accesskey;"
- disabled="true"/>
- </hbox>
- <hbox id="downloading" align="center">
- <image class="update-throbber"/><label>&update.downloading.start;</label><label id="downloadStatus"/><label>&update.downloading.end;</label>
- </hbox>
- <hbox id="applying" align="center">
- <image class="update-throbber"/><label>&update.applying;</label>
- </hbox>
- <hbox id="downloadFailed" align="center">
- <label>&update.failed.start;</label><label id="failedLink" class="text-link">&update.failed.linkText;</label><label>&update.failed.end;</label>
- <spacer flex="1"/>
- <button label="&update.checkForUpdatesButton.label;"
- accesskey="&update.checkForUpdatesButton.accesskey;"
- oncommand="gAppUpdater.checkForUpdates();"/>
- </hbox>
- <hbox id="adminDisabled" align="center">
- <label>&update.adminDisabled;</label>
- <spacer flex="1"/>
- <button label="&update.checkForUpdatesButton.label;"
- accesskey="&update.checkForUpdatesButton.accesskey;"
- disabled="true"/>
- </hbox>
- <hbox id="noUpdatesFound" align="center">
- <label>&update.noUpdatesFound;</label>
- <spacer flex="1"/>
- <button label="&update.checkForUpdatesButton.label;"
- accesskey="&update.checkForUpdatesButton.accesskey;"
- oncommand="gAppUpdater.checkForUpdates();"/>
- </hbox>
- <hbox id="otherInstanceHandlingUpdates" align="center">
- <label>&update.otherInstanceHandlingUpdates;</label>
- <spacer flex="1"/>
- <button label="&update.checkForUpdatesButton.label;"
- accesskey="&update.checkForUpdatesButton.accesskey;"
- disabled="true"/>
- </hbox>
- <hbox id="manualUpdate" align="center">
- <label>&update.manual.start;</label><label id="manualLink" class="text-link"/><label>&update.manual.end;</label>
- <spacer flex="1"/>
- <button label="&update.checkForUpdatesButton.label;"
- accesskey="&update.checkForUpdatesButton.accesskey;"
- disabled="true"/>
- </hbox>
- <hbox id="unsupportedSystem" align="center">
- <label>&update.unsupported.start;</label><label id="unsupportedLink" class="text-link">&update.unsupported.linkText;</label><label>&update.unsupported.end;</label>
- <spacer flex="1"/>
- <button label="&update.checkForUpdatesButton.label;"
- accesskey="&update.checkForUpdatesButton.accesskey;"
- disabled="true"/>
- </hbox>
- <hbox id="restarting" align="center">
- <image class="update-throbber"/><label>&update.restarting;</label>
- <spacer flex="1"/>
- <button label="&update.updateButton.label3;"
- accesskey="&update.updateButton.accesskey;"
- disabled="true"/>
- </hbox>
- </deck>
- </vbox>
-#endif
-
- <separator/>
-#ifdef MOZ_UPDATER
- <description>&updateApplication.description;</description>
- <radiogroup id="updateRadioGroup">
- <radio id="autoDesktop"
- value="auto"
- label="&updateAuto2.label;"
- accesskey="&updateAuto2.accesskey;"/>
- <radio value="checkOnly"
- label="&updateCheckChoose2.label;"
- accesskey="&updateCheckChoose2.accesskey;"/>
- <radio value="manual"
- label="&updateManual2.label;"
- accesskey="&updateManual2.accesskey;"/>
- </radiogroup>
-#ifdef MOZ_MAINTENANCE_SERVICE
- <checkbox id="useService"
- label="&useService.label;"
- accesskey="&useService.accesskey;"
- preference="app.update.service.enabled"/>
-#endif
-#endif
- <checkbox id="enableSearchUpdate"
- label="&enableSearchUpdate2.label;"
- accesskey="&enableSearchUpdate2.accesskey;"
- preference="browser.search.update"/>
-</groupbox>
deleted file mode 100644
--- a/browser/components/preferences/in-content/applications.xul
+++ /dev/null
@@ -1,131 +0,0 @@
-# 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/.
-
-<!-- Applications panel -->
-
-<script type="application/javascript"
- src="chrome://browser/content/preferences/in-content/applications.js"/>
-
-<preferences id="feedsPreferences" hidden="true" data-category="paneApplications">
- <preference id="browser.feeds.handler"
- name="browser.feeds.handler"
- type="string"/>
- <preference id="browser.feeds.handler.default"
- name="browser.feeds.handler.default"
- type="string"/>
- <preference id="browser.feeds.handlers.application"
- name="browser.feeds.handlers.application"
- type="file"/>
- <preference id="browser.feeds.handlers.webservice"
- name="browser.feeds.handlers.webservice"
- type="string"/>
-
- <preference id="browser.videoFeeds.handler"
- name="browser.videoFeeds.handler"
- type="string"/>
- <preference id="browser.videoFeeds.handler.default"
- name="browser.videoFeeds.handler.default"
- type="string"/>
- <preference id="browser.videoFeeds.handlers.application"
- name="browser.videoFeeds.handlers.application"
- type="file"/>
- <preference id="browser.videoFeeds.handlers.webservice"
- name="browser.videoFeeds.handlers.webservice"
- type="string"/>
-
- <preference id="browser.audioFeeds.handler"
- name="browser.audioFeeds.handler"
- type="string"/>
- <preference id="browser.audioFeeds.handler.default"
- name="browser.audioFeeds.handler.default"
- type="string"/>
- <preference id="browser.audioFeeds.handlers.application"
- name="browser.audioFeeds.handlers.application"
- type="file"/>
- <preference id="browser.audioFeeds.handlers.webservice"
- name="browser.audioFeeds.handlers.webservice"
- type="string"/>
-
- <preference id="pref.downloads.disable_button.edit_actions"
- name="pref.downloads.disable_button.edit_actions"
- type="bool"/>
-</preferences>
-
-<keyset data-category="paneApplications">
- <!-- Ctrl+f/k focus the search box in the Applications pane.
- These <key>s have oncommand attributes because of bug 371900. -->
- <key key="&focusSearch1.key;" modifiers="accel" id="focusSearch1" oncommand=";"/>
- <key key="&focusSearch2.key;" modifiers="accel" id="focusSearch2" oncommand=";"/>
-</keyset>
-
-<hbox id="header-applications"
- class="header"
- hidden="true"
- data-category="paneApplications">
- <label class="header-name" flex="1">&paneFilesApplications.title;</label>
-</hbox>
-
-<vbox id="applicationsContent"
- data-category="paneApplications"
- hidden="true"
- flex="1">
-
- <!--Downloads-->
- <groupbox id="downloadsGroup">
- <caption><label>&downloads.label;</label></caption>
-
- <radiogroup id="saveWhere"
- preference="browser.download.useDownloadDir"
- onsyncfrompreference="return gApplicationsPane.readUseDownloadDir();">
- <hbox id="saveToRow">
- <radio id="saveTo"
- value="true"
- label="&saveTo.label;"
- accesskey="&saveTo.accesskey;"
- aria-labelledby="saveTo downloadFolder"/>
- <filefield id="downloadFolder"
- flex="1"
- preference="browser.download.folderList"
- preference-editable="true"
- aria-labelledby="saveTo"
- onsyncfrompreference="return gApplicationsPane.displayDownloadDirPref();"/>
- <button id="chooseFolder"
-#ifdef XP_MACOSX
- accesskey="&chooseFolderMac.accesskey;"
- label="&chooseFolderMac.label;"
-#else
- accesskey="&chooseFolderWin.accesskey;"
- label="&chooseFolderWin.label;"
-#endif
- />
- </hbox>
- <radio id="alwaysAsk"
- value="false"
- label="&alwaysAskWhere.label;"
- accesskey="&alwaysAskWhere.accesskey;"/>
- </radiogroup>
- </groupbox>
-
- <groupbox id="applicationsGroup">
- <caption><label>&applications.label;</label></caption>
- <description>&applications.description;</description>
- <textbox id="filter" flex="1"
- type="search"
- placeholder="&filter2.emptytext;"
- aria-controls="handlersView"/>
-
- <richlistbox id="handlersView" orient="vertical" persist="lastSelectedType"
- preference="pref.downloads.disable_button.edit_actions"
- flex="1">
- <listheader equalsize="always">
- <treecol id="typeColumn" label="&typeColumn.label;" value="type"
- accesskey="&typeColumn.accesskey;" persist="sortDirection"
- flex="1" sortDirection="ascending"/>
- <treecol id="actionColumn" label="&actionColumn2.label;" value="action"
- accesskey="&actionColumn2.accesskey;" persist="sortDirection"
- flex="1"/>
- </listheader>
- </richlistbox>
- </groupbox>
-</vbox>
deleted file mode 100644
--- a/browser/components/preferences/in-content/containers.xul
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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/.
-
-<!-- Containers panel -->
-
-<script type="application/javascript"
- src="chrome://browser/content/preferences/in-content/containers.js"/>
-
-<preferences id="containerPreferences" hidden="true" data-category="paneContainer">
- <!-- Containers -->
- <preference id="privacy.userContext.enabled"
- name="privacy.userContext.enabled"
- type="bool"/>
-
-</preferences>
-
-<hbox hidden="true"
- class="container-header-links"
- data-category="paneContainers">
- <label class="text-link" id="backContainersLink">&backLink.label;</label>
-</hbox>
-
-<hbox id="header-containers"
- class="header"
- hidden="true"
- data-category="paneContainers">
- <label class="header-name" flex="1">&paneContainers.title;</label>
-</hbox>
-
-<!-- Containers -->
-<groupbox id="browserContainersGroup" data-category="paneContainers" hidden="true">
- <vbox id="browserContainersbox">
-
- <richlistbox id="containersView" orient="vertical" persist="lastSelectedType"
- flex="1">
- <listheader equalsize="always">
- <treecol id="typeColumn" value="type"
- persist="sortDirection"
- flex="1" sortDirection="ascending"/>
- <treecol id="actionColumn" value="action"
- persist="sortDirection"
- flex="1"/>
- </listheader>
- </richlistbox>
- </vbox>
- <vbox>
- <hbox flex="1">
- <button onclick="gContainersPane.onAddButtonClick();" accesskey="&addButton.accesskey;" label="&addButton.label;"/>
- </hbox>
- </vbox>
-</groupbox>
deleted file mode 100644
--- a/browser/components/preferences/in-content/jar.mn
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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/.
-
-browser.jar:
- content/browser/preferences/in-content/preferences.js
-* content/browser/preferences/in-content/preferences.xul
- content/browser/preferences/in-content/subdialogs.js
-
- content/browser/preferences/in-content/main.js
- content/browser/preferences/in-content/privacy.js
- content/browser/preferences/in-content/containers.js
- content/browser/preferences/in-content/advanced.js
- content/browser/preferences/in-content/applications.js
- content/browser/preferences/in-content/sync.js
- content/browser/preferences/in-content/findInPage.js
deleted file mode 100644
--- a/browser/components/preferences/in-content/main.xul
+++ /dev/null
@@ -1,593 +0,0 @@
-# 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/.
-
-<!-- General panel -->
-
-<script type="application/javascript"
- src="chrome://browser/content/preferences/in-content/main.js"/>
-
-<script type="application/javascript"
- src="chrome://mozapps/content/preferences/fontbuilder.js"/>
-
-<stringbundle id="engineManagerBundle" src="chrome://browser/locale/engineManager.properties"/>
-
-<stringbundle id="bundlePreferences" src="chrome://browser/locale/preferences.properties"/>
-
-<preferences id="mainPreferences" hidden="true" data-category="paneGeneral">
-
-#ifdef E10S_TESTING_ONLY
- <preference id="browser.tabs.remote.autostart"
- name="browser.tabs.remote.autostart"
- type="bool"/>
- <preference id="e10sTempPref"
- name="browser.tabs.remote.autostart.2"
- type="bool"/>
- <preference id="e10sForceEnable"
- name="browser.tabs.remote.force-enable"
- type="bool"/>
-#endif
-
- <!-- Startup -->
- <preference id="browser.startup.page"
- name="browser.startup.page"
- type="int"/>
- <preference id="browser.startup.homepage"
- name="browser.startup.homepage"
- type="wstring"/>
-
-#ifdef HAVE_SHELL_SERVICE
- <preference id="browser.shell.checkDefaultBrowser"
- name="browser.shell.checkDefaultBrowser"
- type="bool"/>
-
- <preference id="pref.general.disable_button.default_browser"
- name="pref.general.disable_button.default_browser"
- type="bool"/>
-#endif
-
- <preference id="pref.browser.homepage.disable_button.current_page"
- name="pref.browser.homepage.disable_button.current_page"
- type="bool"/>
- <preference id="pref.browser.homepage.disable_button.bookmark_page"
- name="pref.browser.homepage.disable_button.bookmark_page"
- type="bool"/>
- <preference id="pref.browser.homepage.disable_button.restore_default"
- name="pref.browser.homepage.disable_button.restore_default"
- type="bool"/>
-
- <preference id="browser.privatebrowsing.autostart"
- name="browser.privatebrowsing.autostart"
- type="bool"/>
-
- <!-- Search Engine -->
- <preference id="browser.search.suggest.enabled"
- name="browser.search.suggest.enabled"
- type="bool"/>
-
- <preference id="browser.urlbar.suggest.searches"
- name="browser.urlbar.suggest.searches"
- type="bool"/>
-
- <preference id="browser.search.hiddenOneOffs"
- name="browser.search.hiddenOneOffs"
- type="unichar"/>
-
- <!-- Downloads -->
- <preference id="browser.download.useDownloadDir"
- name="browser.download.useDownloadDir"
- type="bool"/>
-
- <preference id="browser.download.folderList"
- name="browser.download.folderList"
- type="int"/>
- <preference id="browser.download.dir"
- name="browser.download.dir"
- type="file"/>
- <!-- Tab preferences
- Preferences:
-
- browser.link.open_newwindow
- 1 opens such links in the most recent window or tab,
- 2 opens such links in a new window,
- 3 opens such links in a new tab
- browser.tabs.loadInBackground
- - true if display should switch to a new tab which has been opened from a
- link, false if display shouldn't switch
- browser.tabs.warnOnClose
- - true if when closing a window with multiple tabs the user is warned and
- allowed to cancel the action, false to just close the window
- browser.tabs.warnOnOpen
- - true if the user should be warned if he attempts to open a lot of tabs at
- once (e.g. a large folder of bookmarks), false otherwise
- browser.taskbar.previews.enable
- - true if tabs are to be shown in the Windows 7 taskbar
- -->
-
- <preference id="browser.link.open_newwindow"
- name="browser.link.open_newwindow"
- type="int"/>
- <preference id="browser.tabs.loadInBackground"
- name="browser.tabs.loadInBackground"
- type="bool"
- inverted="true"/>
- <preference id="browser.tabs.warnOnClose"
- name="browser.tabs.warnOnClose"
- type="bool"/>
- <preference id="browser.tabs.warnOnOpen"
- name="browser.tabs.warnOnOpen"
- type="bool"/>
- <preference id="browser.sessionstore.restore_on_demand"
- name="browser.sessionstore.restore_on_demand"
- type="bool"/>
-#ifdef XP_WIN
- <preference id="browser.taskbar.previews.enable"
- name="browser.taskbar.previews.enable"
- type="bool"/>
-#endif
- <preference id="browser.ctrlTab.previews"
- name="browser.ctrlTab.previews"
- type="bool"/>
-
- <!-- Fonts -->
- <preference id="font.language.group"
- name="font.language.group"
- type="wstring"/>
-
- <!-- Languages -->
- <preference id="browser.translation.detectLanguage"
- name="browser.translation.detectLanguage"
- type="bool"/>
-
- <!-- General tab -->
-
- <!-- Accessibility
- * accessibility.browsewithcaret
- - true enables keyboard navigation and selection within web pages using a
- visible caret, false uses normal keyboard navigation with no caret
- * accessibility.typeaheadfind
- - when set to true, typing outside text areas and input boxes will
- automatically start searching for what's typed within the current
- document; when set to false, no search action happens -->
- <preference id="accessibility.browsewithcaret"
- name="accessibility.browsewithcaret"
- type="bool"/>
- <preference id="accessibility.typeaheadfind"
- name="accessibility.typeaheadfind"
- type="bool"/>
- <preference id="accessibility.blockautorefresh"
- name="accessibility.blockautorefresh"
- type="bool"/>
-#ifdef XP_WIN
- <preference id="ui.osk.enabled"
- name="ui.osk.enabled"
- type="bool"/>
-#endif
- <!-- Browsing
- * general.autoScroll
- - when set to true, clicking the scroll wheel on the mouse activates a
- mouse mode where moving the mouse down scrolls the document downward with
- speed correlated with the distance of the cursor from the original
- position at which the click occurred (and likewise with movement upward);
- if false, this behavior is disabled
- * general.smoothScroll
- - set to true to enable finer page scrolling than line-by-line on page-up,
- page-down, and other such page movements -->
- <preference id="general.autoScroll"
- name="general.autoScroll"
- type="bool"/>
- <preference id="general.smoothScroll"
- name="general.smoothScroll"
- type="bool"/>
-#ifdef XP_WIN
- <preference id="gfx.direct2d.disabled"
- name="gfx.direct2d.disabled"
- type="bool"
- inverted="true"/>
-#endif
- <preference id="layout.spellcheckDefault"
- name="layout.spellcheckDefault"
- type="int"/>
-
-#ifdef MOZ_TELEMETRY_REPORTING
- <preference id="toolkit.telemetry.enabled"
- name="toolkit.telemetry.enabled"
- type="bool"/>
-#endif
-
- <preference id="browser.preferences.defaultPerformanceSettings.enabled"
- name="browser.preferences.defaultPerformanceSettings.enabled"
- type="bool"/>
-
- <preference id="dom.ipc.processCount"
- name="dom.ipc.processCount"
- type="int"/>
-
- <preference id="layers.acceleration.disabled"
- name="layers.acceleration.disabled"
- type="bool"
- inverted="true"/>
-</preferences>
-
-<hbox id="header-general"
- class="header"
- hidden="true"
- data-category="paneGeneral">
- <label class="header-name" flex="1">&paneGeneral.title;</label>
-</hbox>
-
-<!-- Startup -->
-<groupbox id="startupGroup"
- data-category="paneGeneral"
- hidden="true">
- <caption><label>&startup.label;</label></caption>
-
-#ifdef MOZ_DEV_EDITION
- <vbox id="separateProfileBox">
- <checkbox id="separateProfileMode"
- label="&separateProfileMode.label;"/>
- <hbox align="center" class="indent">
- <label id="useFirefoxSync">&useFirefoxSync.label;</label>
- <deck id="getStarted">
- <label class="text-link">&getStarted.notloggedin.label;</label>
- <label class="text-link">&getStarted.configured.label;</label>
- </deck>
- </hbox>
- </vbox>
-#endif
-
-#ifdef E10S_TESTING_ONLY
- <checkbox id="e10sAutoStart"
- label="&e10sEnabled.label;"/>
-#endif
-
-#ifdef HAVE_SHELL_SERVICE
- <vbox id="defaultBrowserBox">
- <checkbox id="alwaysCheckDefault" preference="browser.shell.checkDefaultBrowser"
- label="&alwaysCheckDefault2.label;" accesskey="&alwaysCheckDefault2.accesskey;"/>
- <deck id="setDefaultPane">
- <hbox align="center" class="indent">
- <label id="isNotDefaultLabel" flex="1">&isNotDefault.label;</label>
- <button id="setDefaultButton"
- class="accessory-button"
- label="&setAsMyDefaultBrowser2.label;" accesskey="&setAsMyDefaultBrowser2.accesskey;"
- preference="pref.general.disable_button.default_browser"/>
- </hbox>
- <hbox align="center" class="indent">
- <label id="isDefaultLabel" flex="1">&isDefault.label;</label>
- </hbox>
- </deck>
- <separator class="thin"/>
- </vbox>
-#endif
-
- <html:table id="startupTable">
- <html:tr>
- <html:td class="label-cell">
- <label accesskey="&startupPage2.accesskey;"
- control="browserStartupPage">&startupPage2.label;</label>
- </html:td>
- <html:td class="content-cell">
- <menulist id="browserStartupPage"
- class="content-cell-item"
- preference="browser.startup.page">
- <menupopup>
- <menuitem label="&startupUserHomePage.label;"
- value="1"
- id="browserStartupHomePage"/>
- <menuitem label="&startupBlankPage.label;"
- value="0"
- id="browserStartupBlank"/>
- <menuitem label="&startupPrevSession.label;"
- value="3"
- id="browserStartupLastSession"/>
- </menupopup>
- </menulist>
- </html:td>
- </html:tr>
- <html:tr>
- <html:td class="label-cell">
- <label accesskey="&homepage2.accesskey;"
- control="browserHomePage">&homepage2.label;</label>
- </html:td>
- <html:td class="content-cell">
- <textbox id="browserHomePage"
- class="padded uri-element content-cell-item"
- type="autocomplete"
- autocompletesearch="unifiedcomplete"
- onsyncfrompreference="return gMainPane.syncFromHomePref();"
- onsynctopreference="return gMainPane.syncToHomePref(this.value);"
- placeholder="&abouthome.pageTitle;"
- preference="browser.startup.homepage"/>
- </html:td>
- </html:tr>
- <html:tr>
- <html:td class="label-cell" />
- <html:td class="content-cell homepage-buttons">
- <button id="useCurrent"
- class="content-cell-item"
- label=""
- accesskey="&useCurrentPage.accesskey;"
- label1="&useCurrentPage.label;"
- label2="&useMultiple.label;"
- preference="pref.browser.homepage.disable_button.current_page"/>
- <button id="useBookmark"
- class="content-cell-item"
- label="&chooseBookmark.label;"
- accesskey="&chooseBookmark.accesskey;"
- preference="pref.browser.homepage.disable_button.bookmark_page"/>
- <button id="restoreDefaultHomePage"
- class="content-cell-item"
- label="&restoreDefault.label;"
- accesskey="&restoreDefault.accesskey;"
- preference="pref.browser.homepage.disable_button.restore_default"/>
- </html:td>
- </html:tr>
- </html:table>
-</groupbox>
-
-<!-- Default Search Engine -->
-<groupbox id="defaultEngineGroup" data-category="paneGeneral" data-subcategory="search">
- <caption label="&defaultSearchEngine.label;"/>
- <label>&chooseYourDefaultSearchEngine.label;</label>
- <box align="start">
- <menulist id="defaultEngine">
- <menupopup/>
- </menulist>
- </box>
- <checkbox id="suggestionsInSearchFieldsCheckbox"
- label="&provideSearchSuggestions.label;"
- accesskey="&provideSearchSuggestions.accesskey;"
- preference="browser.search.suggest.enabled"/>
- <vbox class="indent">
- <checkbox id="urlBarSuggestion" label="&showURLBarSuggestions.label;"
- accesskey="&showURLBarSuggestions.accesskey;"
- preference="browser.urlbar.suggest.searches"/>
- <hbox id="urlBarSuggestionPermanentPBLabel"
- align="center" class="indent">
- <label flex="1">&urlBarSuggestionsPermanentPB.label;</label>
- </hbox>
- </vbox>
-</groupbox>
-
-<groupbox id="oneClickSearchProvidersGroup" data-category="paneGeneral" data-subcategory="search">
- <caption label="&oneClickSearchEngines.label;"/>
- <label>&chooseWhichOneToDisplay.label;</label>
-
- <tree id="engineList" flex="1" rows="8" hidecolumnpicker="true" editable="true"
- seltype="single" allowunderflowscroll="true">
- <treechildren id="engineChildren" flex="1"/>
- <treecols>
- <treecol id="engineShown" type="checkbox" editable="true" sortable="false"/>
- <treecol id="engineName" flex="4" label="&engineNameColumn.label;" sortable="false"/>
- <treecol id="engineKeyword" flex="1" label="&engineKeywordColumn.label;" editable="true"
- sortable="false"/>
- </treecols>
- </tree>
-
- <hbox>
- <button id="restoreDefaultSearchEngines"
- label="&restoreDefaultSearchEngines.label;"
- accesskey="&restoreDefaultSearchEngines.accesskey;"/>
- <spacer flex="1"/>
- <button id="removeEngineButton"
- class="searchEngineAction accessory-button"
- label="&removeEngine.label;"
- accesskey="&removeEngine.accesskey;"
- disabled="true"/>
- </hbox>
-
- <separator class="thin"/>
-
- <hbox id="addEnginesBox" pack="start">
- <label id="addEngines" class="text-link">&addMoreSearchEngines2.label;</label>
- </hbox>
-</groupbox>
-
-<!-- Tab preferences -->
-<groupbox data-category="paneGeneral"
- hidden="true">
- <caption><label>&tabsGroup.label;</label></caption>
-
- <checkbox id="ctrlTabRecentlyUsedOrder" label="&ctrlTabRecentlyUsedOrder.label;"
- accesskey="&ctrlTabRecentlyUsedOrder.accesskey;"
- preference="browser.ctrlTab.previews"/>
-
- <checkbox id="linkTargeting" label="&newWindowsAsTabs.label;"
- accesskey="&newWindowsAsTabs.accesskey;"
- preference="browser.link.open_newwindow"
- onsyncfrompreference="return gMainPane.readLinkTarget();"
- onsynctopreference="return gMainPane.writeLinkTarget();"/>
-
- <checkbox id="warnCloseMultiple" label="&warnOnCloseMultipleTabs.label;"
- accesskey="&warnOnCloseMultipleTabs.accesskey;"
- preference="browser.tabs.warnOnClose"/>
-
- <checkbox id="warnOpenMany" label="&warnOnOpenManyTabs.label;"
- accesskey="&warnOnOpenManyTabs.accesskey;"
- preference="browser.tabs.warnOnOpen"/>
-
- <checkbox id="switchToNewTabs" label="&switchLinksToNewTabs.label;"
- accesskey="&switchLinksToNewTabs.accesskey;"
- preference="browser.tabs.loadInBackground"/>
-
-#ifdef XP_WIN
- <checkbox id="showTabsInTaskbar" label="&showTabsInTaskbar.label;"
- accesskey="&showTabsInTaskbar.accesskey;"
- preference="browser.taskbar.previews.enable"/>
-#endif
-</groupbox>
-
-<!-- Accessibility -->
-<groupbox data-category="paneGeneral" id="accessibilityGroup">
- <caption><label>&accessibility.label;</label></caption>
-
-#ifdef XP_WIN
- <checkbox id="useOnScreenKeyboard"
- hidden="true"
- label="&useOnScreenKeyboard.label;"
- accesskey="&useOnScreenKeyboard.accesskey;"
- preference="ui.osk.enabled"/>
-#endif
- <checkbox id="useCursorNavigation"
- label="&useCursorNavigation.label;"
- accesskey="&useCursorNavigation.accesskey;"
- preference="accessibility.browsewithcaret"/>
- <checkbox id="searchStartTyping"
- label="&searchOnStartTyping.label;"
- accesskey="&searchOnStartTyping.accesskey;"
- preference="accessibility.typeaheadfind"/>
- <checkbox id="blockAutoRefresh"
- label="&blockAutoReload.label;"
- accesskey="&blockAutoReload.accesskey;"
- preference="accessibility.blockautorefresh"/>
-</groupbox>
-
-<!-- Languages -->
-<groupbox id="languagesGroup" data-category="paneGeneral" hidden="true">
- <caption><label>&languages.label;</label></caption>
-
- <hbox id="languagesBox" align="center">
- <description flex="1" control="chooseLanguage">&chooseLanguage.label;</description>
- <button id="chooseLanguage"
- class="accessory-button"
- label="&chooseButton.label;"
- accesskey="&chooseButton.accesskey;"/>
- </hbox>
-
- <hbox id="translationBox" hidden="true">
- <hbox align="center" flex="1">
- <checkbox id="translate" preference="browser.translation.detectLanguage"
- label="&translateWebPages.label;." accesskey="&translateWebPages.accesskey;"
- onsyncfrompreference="return gMainPane.updateButtons('translateButton',
- 'browser.translation.detectLanguage');"/>
- <hbox id="bingAttribution" hidden="true">
- <label>&translation.options.attribution.beforeLogo;</label>
- <separator orient="vertical" class="thin"/>
- <image id="translationAttributionImage" aria-label="Microsoft Translator"
- src="chrome://browser/content/microsoft-translator-attribution.png"/>
- <separator orient="vertical" class="thin"/>
- <label>&translation.options.attribution.afterLogo;</label>
- </hbox>
- </hbox>
- <button id="translateButton"
- class="accessory-button"
- label="&translateExceptions.label;"
- accesskey="&translateExceptions.accesskey;"/>
- </hbox>
- <checkbox id="checkSpelling"
- label="&checkUserSpelling.label;"
- accesskey="&checkUserSpelling.accesskey;"
- onsyncfrompreference="return gMainPane.readCheckSpelling();"
- onsynctopreference="return gMainPane.writeCheckSpelling();"
- preference="layout.spellcheckDefault"/>
-</groupbox>
-
-
-<!-- Fonts and Colors -->
-<groupbox id="fontsGroup" data-category="paneGeneral" hidden="true">
- <caption><label>&fontsAndColors.label;</label></caption>
-
- <vbox>
- <hbox id="fontSettings">
- <hbox align="center">
- <label control="defaultFont" accesskey="&defaultFont2.accesskey;">&defaultFont2.label;</label>
- <menulist id="defaultFont" delayprefsave="true" onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
- <label id="defaultFontSizeLabel" control="defaultFontSize" accesskey="&defaultSize2.accesskey;">&defaultSize2.label;</label>
- <menulist id="defaultFontSize" delayprefsave="true">
- <menupopup>
- <menuitem value="9" label="9"/>
- <menuitem value="10" label="10"/>
- <menuitem value="11" label="11"/>
- <menuitem value="12" label="12"/>
- <menuitem value="13" label="13"/>
- <menuitem value="14" label="14"/>
- <menuitem value="15" label="15"/>
- <menuitem value="16" label="16"/>
- <menuitem value="17" label="17"/>
- <menuitem value="18" label="18"/>
- <menuitem value="20" label="20"/>
- <menuitem value="22" label="22"/>
- <menuitem value="24" label="24"/>
- <menuitem value="26" label="26"/>
- <menuitem value="28" label="28"/>
- <menuitem value="30" label="30"/>
- <menuitem value="32" label="32"/>
- <menuitem value="34" label="34"/>
- <menuitem value="36" label="36"/>
- <menuitem value="40" label="40"/>
- <menuitem value="44" label="44"/>
- <menuitem value="48" label="48"/>
- <menuitem value="56" label="56"/>
- <menuitem value="64" label="64"/>
- <menuitem value="72" label="72"/>
- </menupopup>
- </menulist>
- </hbox>
- <spacer flex="1" />
- <button id="advancedFonts"
- class="accessory-button"
- icon="select-font"
- label="&advancedFonts.label;"
- accesskey="&advancedFonts.accesskey;"/>
- </hbox>
- <hbox id="colorsSettings">
- <spacer flex="1" />
- <button id="colors"
- class="accessory-button"
- icon="select-color"
- label="&colors.label;"
- accesskey="&colors.accesskey;"/>
- </hbox>
- </vbox>
-</groupbox>
-
-<!-- Browsing -->
-<groupbox id="browsingGroup" data-category="paneGeneral">
- <caption><label>&browsing.label;</label></caption>
-
- <checkbox id="useAutoScroll"
- label="&useAutoScroll.label;"
- accesskey="&useAutoScroll.accesskey;"
- preference="general.autoScroll"/>
- <checkbox id="useSmoothScrolling"
- label="&useSmoothScrolling.label;"
- accesskey="&useSmoothScrolling.accesskey;"
- preference="general.smoothScroll"/>
-</groupbox>
-
-<!-- Performance -->
-<groupbox id="performanceGroup" data-category="paneGeneral" hidden="true">
- <caption><label>&performance.label;</label></caption>
-
- <hbox align="center">
- <checkbox id="useRecommendedPerformanceSettings"
- label="&useRecommendedPerformanceSettings2.label;"
- accesskey="&useRecommendedPerformanceSettings2.accesskey;"
- preference="browser.preferences.defaultPerformanceSettings.enabled"/>
- <label id="performanceSettingsLearnMore" class="learnMore text-link">&performanceSettingsLearnMore.label;</label>
- </hbox>
- <description class="indent">&useRecommendedPerformanceSettings2.description;</description>
-
- <vbox id="performanceSettings" class="indent" hidden="true">
- <checkbox id="allowHWAccel"
- label="&allowHWAccel.label;"
- accesskey="&allowHWAccel.accesskey;"
- preference="layers.acceleration.disabled"/>
- <hbox align="center">
- <label id="limitContentProcess" accesskey="&limitContentProcess2.accesskey;" control="contentProcessCount">&limitContentProcess2.label;</label>
- <menulist id="contentProcessCount" preference="dom.ipc.processCount">
- <menupopup>
- <menuitem label="1" value="1"/>
- <menuitem label="2" value="2"/>
- <menuitem label="3" value="3"/>
- <menuitem label="4" value="4"/>
- <menuitem label="5" value="5"/>
- <menuitem label="6" value="6"/>
- <menuitem label="7" value="7"/>
- </menupopup>
- </menulist>
- </hbox>
- <description>&limitContentProcess2.description;</description>
- </vbox>
-</groupbox>
deleted file mode 100644
--- a/browser/components/preferences/in-content/preferences.xul
+++ /dev/null
@@ -1,211 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-
-<?xml-stylesheet href="chrome://global/skin/global.css"?>
-
-<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
-<?xml-stylesheet href="chrome://global/skin/in-content/common.css"?>
-<?xml-stylesheet
- href="chrome://browser/skin/preferences/in-content/preferences.css"?>
-<?xml-stylesheet
- href="chrome://browser/content/preferences/handlers.css"?>
-<?xml-stylesheet href="chrome://browser/skin/preferences/applications.css"?>
-<?xml-stylesheet href="chrome://browser/skin/preferences/in-content/search.css"?>
-<?xml-stylesheet href="chrome://browser/skin/preferences/in-content/containers.css"?>
-
-<!DOCTYPE page [
-<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
-<!ENTITY % globalPreferencesDTD SYSTEM "chrome://global/locale/preferences.dtd">
-<!ENTITY % preferencesDTD SYSTEM
- "chrome://browser/locale/preferences/preferences.dtd">
-<!ENTITY % privacyDTD SYSTEM "chrome://browser/locale/preferences/privacy.dtd">
-<!ENTITY % tabsDTD SYSTEM "chrome://browser/locale/preferences/tabs.dtd">
-<!ENTITY % searchDTD SYSTEM "chrome://browser/locale/preferences/search.dtd">
-<!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
-<!ENTITY % syncDTD SYSTEM "chrome://browser/locale/preferences/sync.dtd">
-<!ENTITY % securityDTD SYSTEM
- "chrome://browser/locale/preferences/security.dtd">
-<!ENTITY % containersDTD SYSTEM
- "chrome://browser/locale/preferences/containers.dtd">
-<!ENTITY % sanitizeDTD SYSTEM "chrome://browser/locale/sanitize.dtd">
-<!ENTITY % mainDTD SYSTEM "chrome://browser/locale/preferences/main.dtd">
-<!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd">
-<!ENTITY % contentDTD SYSTEM "chrome://browser/locale/preferences/content.dtd">
-<!ENTITY % applicationsDTD SYSTEM
- "chrome://browser/locale/preferences/applications.dtd">
-<!ENTITY % advancedDTD SYSTEM
- "chrome://browser/locale/preferences/advanced.dtd">
-<!ENTITY % aboutDialogDTD SYSTEM "chrome://browser/locale/aboutDialog.dtd" >
-%aboutDialogDTD;
-%brandDTD;
-%globalPreferencesDTD;
-%preferencesDTD;
-%privacyDTD;
-%tabsDTD;
-%searchDTD;
-%syncBrandDTD;
-%syncDTD;
-%securityDTD;
-%containersDTD;
-%sanitizeDTD;
-%mainDTD;
-%aboutHomeDTD;
-%contentDTD;
-%applicationsDTD;
-%advancedDTD;
-]>
-
-#ifdef XP_WIN
-#define USE_WIN_TITLE_STYLE
-#endif
-
-<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:html="http://www.w3.org/1999/xhtml"
- disablefastfind="true"
-#ifdef USE_WIN_TITLE_STYLE
- title="&prefWindow.titleWin;">
-#else
- title="&prefWindow.title;">
-#endif
-
- <html:link rel="shortcut icon"
- href="chrome://browser/skin/preferences/in-content/favicon.ico"/>
-
- <script type="application/javascript"
- src="chrome://browser/content/utilityOverlay.js"/>
- <script type="application/javascript"
- src="chrome://browser/content/preferences/in-content/preferences.js"/>
- <script src="chrome://browser/content/preferences/in-content/findInPage.js"/>
- <script src="chrome://browser/content/preferences/in-content/subdialogs.js"/>
-
- <stringbundle id="bundleBrand"
- src="chrome://branding/locale/brand.properties"/>
- <stringbundle id="bundlePreferences"
- src="chrome://browser/locale/preferences/preferences.properties"/>
-
- <stringbundleset id="appManagerBundleset">
- <stringbundle id="appManagerBundle"
- src="chrome://browser/locale/preferences/applicationManager.properties"/>
- </stringbundleset>
-
- <stack flex="1">
- <hbox flex="1">
-
- <!-- category list -->
- <richlistbox id="categories">
- <richlistitem id="category-search-results"
- class="category"
- value="paneSearchResults"
- helpTopic="prefs-main"
- tooltiptext="&paneSearchResults.title;"
- align="center"
- hidden="true">
- <image class="category-icon"/>
- <label class="category-name" flex="1">&paneSearchResults.title;</label>
- </richlistitem>
-
- <richlistitem id="category-general"
- class="category"
- value="paneGeneral"
- helpTopic="prefs-main"
- tooltiptext="&paneGeneral.title;"
- align="center">
- <image class="category-icon"/>
- <label class="category-name" flex="1">&paneGeneral.title;</label>
- </richlistitem>
-
- <richlistitem id="category-application"
- class="category"
- value="paneApplications"
- helpTopic="prefs-applications"
- tooltiptext="&paneFilesApplications.title;"
- align="center">
- <image class="category-icon"/>
- <label class="category-name" flex="1">&paneFilesApplications.title;</label>
- </richlistitem>
-
- <richlistitem id="category-containers"
- class="category"
- value="paneContainers"
- helpTopic="prefs-containers"
- hidden="true"/>
-
- <richlistitem id="category-sync"
- class="category"
- value="paneSync"
- helpTopic="prefs-weave"
- tooltiptext="&paneSync1.title;"
- align="center">
- <image class="category-icon"/>
- <label class="category-name" flex="1">&paneSync1.title;</label>
- </richlistitem>
-
- <richlistitem id="category-privacy"
- class="category"
- value="panePrivacy"
- helpTopic="prefs-privacy"
- tooltiptext="&panePrivacySecurity.title;"
- align="center">
- <image class="category-icon"/>
- <label class="category-name" flex="1">&panePrivacySecurity.title;</label>
- </richlistitem>
-
- <richlistitem id="category-advanced"
- class="category"
- value="paneAdvanced"
- helpTopic="prefs-advanced-general"
- tooltiptext="&paneUpdates.title;"
- align="center">
- <image class="category-icon"/>
- <label class="category-name" flex="1">&paneUpdates.title;</label>
- </richlistitem>
- </richlistbox>
-
- <keyset>
- <!-- Disable the findbar because it doesn't work properly.
- Remove this keyset once bug 1094240 ("disablefastfind" attribute
- broken in e10s mode) is fixed. -->
- <key key="&focusSearch1.key;" modifiers="accel" id="focusSearch1" oncommand=";"/>
- </keyset>
-
- <html:a class="help-button" target="_blank" aria-label="&helpButton2.label;">&helpButton2.label;</html:a>
-
- <vbox class="main-content" flex="1">
- <hbox pack="end">
- <textbox type="search" id="searchInput" placeholder="&searchInput.label;" hidden="true"
- clickSelectsAll="true"/>
- </hbox>
- <prefpane id="mainPrefPane">
-#include searchResults.xul
-#include main.xul
-#include privacy.xul
-#include containers.xul
-#include advanced.xul
-#include applications.xul
-#include sync.xul
- </prefpane>
- </vbox>
- </hbox>
-
- <vbox id="dialogOverlay" align="center" pack="center">
- <groupbox id="dialogBox"
- orient="vertical"
- pack="end"
- role="dialog"
- aria-labelledby="dialogTitle">
- <caption flex="1" align="center">
- <label id="dialogTitle" flex="1"></label>
- <button id="dialogClose"
- class="close-icon"
- aria-label="&preferencesCloseButton.label;"/>
- </caption>
- <browser id="dialogFrame"
- name="dialogFrame"
- autoscroll="false"
- disablehistory="true"/>
- </groupbox>
- </vbox>
- </stack>
-</page>
deleted file mode 100644
--- a/browser/components/preferences/in-content/privacy.xul
+++ /dev/null
@@ -1,737 +0,0 @@
-# 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/.
-
-<!-- Privacy panel -->
-
-<script type="application/javascript"
- src="chrome://browser/content/preferences/in-content/privacy.js"/>
-
-<preferences id="privacyPreferences" hidden="true" data-category="panePrivacy">
-
- <!-- Tracking -->
- <preference id="privacy.trackingprotection.enabled"
- name="privacy.trackingprotection.enabled"
- type="bool"/>
- <preference id="privacy.trackingprotection.pbmode.enabled"
- name="privacy.trackingprotection.pbmode.enabled"
- type="bool"/>
-
- <!-- XXX button prefs -->
- <preference id="pref.privacy.disable_button.cookie_exceptions"
- name="pref.privacy.disable_button.cookie_exceptions"
- type="bool"/>
- <preference id="pref.privacy.disable_button.view_cookies"
- name="pref.privacy.disable_button.view_cookies"
- type="bool"/>
- <preference id="pref.privacy.disable_button.change_blocklist"
- name="pref.privacy.disable_button.change_blocklist"
- type="bool"/>
- <preference id="pref.privacy.disable_button.tracking_protection_exceptions"
- name="pref.privacy.disable_button.tracking_protection_exceptions"
- type="bool"/>
-
- <!-- Location Bar -->
- <preference id="browser.urlbar.autocomplete.enabled"
- name="browser.urlbar.autocomplete.enabled"
- type="bool"/>
- <preference id="browser.urlbar.suggest.bookmark"
- name="browser.urlbar.suggest.bookmark"
- type="bool"/>
- <preference id="browser.urlbar.suggest.history"
- name="browser.urlbar.suggest.history"
- type="bool"/>
- <preference id="browser.urlbar.suggest.openpage"
- name="browser.urlbar.suggest.openpage"
- type="bool"/>
-
- <!-- History -->
- <preference id="places.history.enabled"
- name="places.history.enabled"
- type="bool"/>
- <preference id="browser.formfill.enable"
- name="browser.formfill.enable"
- type="bool"/>
- <preference id="privacy.history.custom"
- name="privacy.history.custom"
- type="bool"/>
- <!-- Cookies -->
- <preference id="network.cookie.cookieBehavior"
- name="network.cookie.cookieBehavior"
- type="int"/>
- <preference id="network.cookie.lifetimePolicy"
- name="network.cookie.lifetimePolicy"
- type="int"/>
- <preference id="network.cookie.blockFutureCookies"
- name="network.cookie.blockFutureCookies"
- type="bool"/>
- <!-- Clear Private Data -->
- <preference id="privacy.sanitize.sanitizeOnShutdown"
- name="privacy.sanitize.sanitizeOnShutdown"
- type="bool"/>
- <preference id="privacy.sanitize.timeSpan"
- name="privacy.sanitize.timeSpan"
- type="int"/>
- <!-- Private Browsing -->
- <preference id="browser.privatebrowsing.autostart"
- name="browser.privatebrowsing.autostart"
- type="bool"/>
-
- <!-- DRM content -->
- <preference id="media.eme.enabled"
- name="media.eme.enabled"
- type="bool"/>
-
- <!-- Popups -->
- <preference id="dom.disable_open_during_load"
- name="dom.disable_open_during_load"
- type="bool"/>
- <!-- Passwords -->
- <preference id="signon.rememberSignons" name="signon.rememberSignons" type="bool"/>
-
- <!-- XXX buttons -->
- <preference id="pref.privacy.disable_button.view_passwords"
- name="pref.privacy.disable_button.view_passwords"
- type="bool"/>
- <preference id="pref.privacy.disable_button.view_passwords_exceptions"
- name="pref.privacy.disable_button.view_passwords_exceptions"
- type="bool"/>
-
- <!-- Certificates tab
- * security.default_personal_cert
- - a string:
- "Select Automatically" select a certificate automatically when a site
- requests one
- "Ask Every Time" present a dialog to the user so he can select
- the certificate to use on a site which
- requests one -->
- <preference id="security.default_personal_cert"
- name="security.default_personal_cert"
- type="string"/>
-
- <preference id="security.disable_button.openCertManager"
- name="security.disable_button.openCertManager"
- type="bool"/>
-
- <preference id="security.disable_button.openDeviceManager"
- name="security.disable_button.openDeviceManager"
- type="bool"/>
-
- <preference id="security.OCSP.enabled"
- name="security.OCSP.enabled"
- type="int"/>
-
- <!-- Add-ons, malware, phishing -->
- <preference id="xpinstall.whitelist.required"
- name="xpinstall.whitelist.required"
- type="bool"/>
-
- <preference id="browser.safebrowsing.malware.enabled"
- name="browser.safebrowsing.malware.enabled"
- type="bool"/>
- <preference id="browser.safebrowsing.phishing.enabled"
- name="browser.safebrowsing.phishing.enabled"
- type="bool"/>
-
- <preference id="browser.safebrowsing.downloads.enabled"
- name="browser.safebrowsing.downloads.enabled"
- type="bool"/>
-
- <preference id="urlclassifier.malwareTable"
- name="urlclassifier.malwareTable"
- type="string"/>
-
- <preference id="browser.safebrowsing.downloads.remote.block_potentially_unwanted"
- name="browser.safebrowsing.downloads.remote.block_potentially_unwanted"
- type="bool"/>
- <preference id="browser.safebrowsing.downloads.remote.block_uncommon"
- name="browser.safebrowsing.downloads.remote.block_uncommon"
- type="bool"/>
-
- <!-- Network tab -->
- <preference id="browser.cache.disk.capacity"
- name="browser.cache.disk.capacity"
- type="int"/>
- <preference id="browser.offline-apps.notify"
- name="browser.offline-apps.notify"
- type="bool"/>
-
- <preference id="browser.cache.disk.smart_size.enabled"
- name="browser.cache.disk.smart_size.enabled"
- inverted="true"
- type="bool"/>
-
- <!-- Data Choices tab -->
-#ifdef MOZ_CRASHREPORTER
- <preference id="browser.crashReports.unsubmittedCheck.autoSubmit"
- name="browser.crashReports.unsubmittedCheck.autoSubmit"
- type="bool"/>
-#endif
-
-</preferences>
-
-<stringbundle id="bundlePreferences" src="chrome://browser/locale/preferences/preferences.properties"/>
-
-<hbox id="header-privacy"
- class="header"
- hidden="true"
- data-category="panePrivacy">
- <label class="header-name" flex="1">&panePrivacySecurity.title;</label>
-</hbox>
-
-
-<!-- History -->
-<groupbox id="historyGroup" data-category="panePrivacy" hidden="true">
- <caption><label>&history.label;</label></caption>
- <hbox align="center">
- <label id="historyModeLabel"
- control="historyMode"
- accesskey="&historyHeader2.pre.accesskey;">&historyHeader2.pre.label;
- </label>
- <menulist id="historyMode">
- <menupopup>
- <menuitem label="&historyHeader.remember.label;" value="remember"/>
- <menuitem label="&historyHeader.dontremember.label;" value="dontremember"/>
- <menuitem label="&historyHeader.custom.label;" value="custom"/>
- </menupopup>
- </menulist>
- <label>&historyHeader.post.label;</label>
- </hbox>
- <deck id="historyPane">
- <vbox id="historyRememberPane">
- <hbox align="center" flex="1">
- <vbox flex="1">
- <description>&rememberDescription.label;</description>
- <separator class="thin"/>
- <description>&rememberActions.pre.label;<label
- class="text-link" id="historyRememberClear"
- >&rememberActions.clearHistory.label;</label>&rememberActions.middle.label;<label
- class="text-link" id="historyRememberCookies"
- >&rememberActions.removeCookies.label;</label>&rememberActions.post.label;</description>
- </vbox>
- </hbox>
- </vbox>
- <vbox id="historyDontRememberPane">
- <hbox align="center" flex="1">
- <vbox flex="1">
- <description>&dontrememberDescription.label;</description>
- <separator class="thin"/>
- <description>&dontrememberActions.pre.label;<label
- class="text-link" id="historyDontRememberClear"
- >&dontrememberActions.clearHistory.label;</label>&dontrememberActions.post.label;</description>
- </vbox>
- </hbox>
- </vbox>
- <vbox id="historyCustomPane">
- <separator class="thin"/>
- <vbox>
- <checkbox id="privateBrowsingAutoStart"
- label="&privateBrowsingPermanent2.label;"
- accesskey="&privateBrowsingPermanent2.accesskey;"
- preference="browser.privatebrowsing.autostart"/>
- <vbox class="indent">
- <checkbox id="rememberHistory"
- label="&rememberHistory2.label;"
- accesskey="&rememberHistory2.accesskey;"
- preference="places.history.enabled"/>
- <checkbox id="rememberForms"
- label="&rememberSearchForm.label;"
- accesskey="&rememberSearchForm.accesskey;"
- preference="browser.formfill.enable"/>
- <hbox id="cookiesBox">
- <checkbox id="acceptCookies" label="&acceptCookies.label;"
- preference="network.cookie.cookieBehavior"
- accesskey="&acceptCookies.accesskey;"
- onsyncfrompreference="return gPrivacyPane.readAcceptCookies();"
- onsynctopreference="return gPrivacyPane.writeAcceptCookies();"
- flex="1" />
- <button id="cookieExceptions"
- class="accessory-button"
- label="&cookieExceptions.label;" accesskey="&cookieExceptions.accesskey;"
- preference="pref.privacy.disable_button.cookie_exceptions"/>
- </hbox>
- <hbox id="acceptThirdPartyRow"
- class="indent"
- align="center">
- <label id="acceptThirdPartyLabel" control="acceptThirdPartyMenu"
- accesskey="&acceptThirdParty.pre.accesskey;">&acceptThirdParty.pre.label;</label>
- <menulist id="acceptThirdPartyMenu" preference="network.cookie.cookieBehavior"
- onsyncfrompreference="return gPrivacyPane.readAcceptThirdPartyCookies();"
- onsynctopreference="return gPrivacyPane.writeAcceptThirdPartyCookies();">
- <menupopup>
- <menuitem label="&acceptThirdParty.always.label;" value="always"/>
- <menuitem label="&acceptThirdParty.visited.label;" value="visited"/>
- <menuitem label="&acceptThirdParty.never.label;" value="never"/>
- </menupopup>
- </menulist>
- </hbox>
- <hbox id="keepRow"
- class="indent"
- align="center">
- <label id="keepUntil"
- control="keepCookiesUntil"
- accesskey="&keepUntil.accesskey;">&keepUntil.label;</label>
- <menulist id="keepCookiesUntil"
- preference="network.cookie.lifetimePolicy">
- <menupopup>
- <menuitem label="&expire.label;" value="0"/>
- <menuitem label="&close.label;" value="2"/>
- </menupopup>
- </menulist>
- <spacer flex="1"/>
- <button id="showCookiesButton"
- class="accessory-button"
- label="&showCookies.label;" accesskey="&showCookies.accesskey;"
- preference="pref.privacy.disable_button.view_cookies"/>
- </hbox>
- <hbox id="clearDataBox"
- align="center">
- <checkbox id="alwaysClear"
- preference="privacy.sanitize.sanitizeOnShutdown"
- label="&clearOnClose.label;"
- accesskey="&clearOnClose.accesskey;"
- flex="1" />
- <button id="clearDataSettings"
- class="accessory-button"
- label="&clearOnCloseSettings.label;"
- accesskey="&clearOnCloseSettings.accesskey;"/>
- </hbox>
- </vbox>
- </vbox>
- </vbox>
- </deck>
-</groupbox>
-
-<!-- Passwords -->
-<groupbox id="passwordsGroup" orient="vertical" data-category="panePrivacy" hidden="true">
- <caption><label>&formsAndPasswords.label;</label></caption>
-
- <vbox id="passwordSettings">
- <hbox id="savePasswordsBox">
- <checkbox id="savePasswords"
- label="&rememberLogins1.label;" accesskey="&rememberLogins1.accesskey;"
- preference="signon.rememberSignons"
- onsyncfrompreference="return gPrivacyPane.readSavePasswords();"
- flex="1" />
- <button id="passwordExceptions"
- class="accessory-button"
- label="&passwordExceptions.label;"
- accesskey="&passwordExceptions.accesskey;"
- preference="pref.privacy.disable_button.view_passwords_exceptions"/>
- </hbox>
- <hbox id="showPasswordBox" pack="end">
- <button id="showPasswords"
- class="accessory-button"
- label="&savedLogins.label;" accesskey="&savedLogins.accesskey;"
- preference="pref.privacy.disable_button.view_passwords"/>
- </hbox>
- </vbox>
- <hbox id="masterPasswordRow">
- <checkbox id="useMasterPassword"
- label="&useMasterPassword.label;"
- accesskey="&useMasterPassword.accesskey;"
- flex="1" />
- <button id="changeMasterPassword"
- class="accessory-button"
- label="&changeMasterPassword.label;"
- accesskey="&changeMasterPassword.accesskey;"/>
- </hbox>
-</groupbox>
-
-<!-- Tracking -->
-<groupbox id="trackingGroup" data-category="panePrivacy" hidden="true">
- <caption><label>&trackingProtectionHeader2.label;</label></caption>
- <vbox id="trackingprotectionbox" hidden="true">
- <hbox align="start">
- <vbox flex="1">
- <description>
- &trackingProtection.description;
- <label id="trackingProtectionLearnMore" class="learnMore text-link">&trackingProtectionLearnMore.label;</label>
- </description>
- <description id="trackingProtectionDesc"
- control="trackingProtectionRadioGroup">
- &trackingProtection.radioGroupLabel;
- </description>
- </vbox>
- <spacer flex="1"/>
- <vbox id="trackingProtectionAdvancedSettings">
- <button id="trackingProtectionExceptions"
- class="accessory-button"
- label="&trackingProtectionExceptions.label;"
- accesskey="&trackingProtectionExceptions.accesskey;"
- preference="pref.privacy.disable_button.tracking_protection_exceptions"/>
- <button id="changeBlockList"
- class="accessory-button"
- label="&changeBlockList.label;"
- accesskey="&changeBlockList.accesskey;"
- preference="pref.privacy.disable_button.change_blocklist"/>
- </vbox>
- </hbox>
- <radiogroup id="trackingProtectionRadioGroup" aria-labelledby="trackingProtectionDesc">
- <radio value="always"
- label="&trackingProtectionAlways.label;"
- accesskey="&trackingProtectionAlways.accesskey;"/>
- <radio value="private"
- label="&trackingProtectionPrivate.label;"
- accesskey="&trackingProtectionPrivate.accesskey;"/>
- <radio value="never"
- label="&trackingProtectionNever.label;"
- accesskey="&trackingProtectionNever.accesskey;"/>
- </radiogroup>
- </vbox>
- <vbox id="trackingprotectionpbmbox">
- <caption><label>&tracking.label;</label></caption>
- <hbox align="center">
- <checkbox id="trackingProtectionPBM"
- preference="privacy.trackingprotection.pbmode.enabled"
- accesskey="&trackingProtectionPBM5.accesskey;"
- label="&trackingProtectionPBM5.label;" />
- <label id="trackingProtectionPBMLearnMore"
- class="learnMore text-link">&trackingProtectionPBMLearnMore.label;</label>
- <spacer flex="1" />
- <button id="changeBlockListPBM"
- label="&changeBlockList.label;" accesskey="&changeBlockList.accesskey;"
- preference="pref.privacy.disable_button.change_blocklist"/>
- </hbox>
- </vbox>
- <vbox>
- <description>&doNotTrack.pre.label;<label
- class="text-link" id="doNotTrackSettings"
- >&doNotTrack.settings.label;</label>&doNotTrack.post.label;</description>
- </vbox>
-</groupbox>
-
-<!-- Pop-ups -->
-<groupbox id="miscGroup" data-category="panePrivacy" hidden="true">
- <caption><label>&popups.label;</label></caption>
- <hbox align="start">
- <checkbox id="popupPolicy" preference="dom.disable_open_during_load"
- label="&blockPopups.label;" accesskey="&blockPopups.accesskey;"
- onsyncfrompreference="return gPrivacyPane.updateButtons('popupPolicyButton',
- 'dom.disable_open_during_load');"
- flex="1" />
- <button id="popupPolicyButton"
- class="accessory-button"
- label="&popupExceptions.label;"
- accesskey="&popupExceptions.accesskey;"/>
- </hbox>
-</groupbox>
-
-<!-- Notifications -->
-<groupbox id="notificationsGroup" data-category="panePrivacy" hidden="true">
- <caption><label>¬ificationsPolicy.label;</label></caption>
- <grid>
- <columns>
- <column flex="1"/>
- <column/>
- </columns>
- <rows>
- <row id="notificationsPolicyRow" align="center">
- <hbox flex="1">
- <label id="notificationsPolicy">¬ificationsPolicyDesc3.label;</label>
- <label id="notificationsPolicyLearnMore"
- class="learnMore text-link">¬ificationsPolicyLearnMore.label;</label>
- </hbox>
- <hbox pack="end">
- <button id="notificationsPolicyButton"
- class="accessory-button"
- label="¬ificationsPolicyButton.label;"
- accesskey="¬ificationsPolicyButton.accesskey;"/>
- </hbox>
- </row>
- </rows>
- </grid>
- <vbox id="notificationsDoNotDisturbBox" hidden="true">
- <checkbox id="notificationsDoNotDisturb" label="¬ificationsDoNotDisturb.label;"
- accesskey="¬ificationsDoNotDisturb.accesskey;"/>
- <label id="notificationsDoNotDisturbDetails"
- class="indent">¬ificationsDoNotDisturbDetails.value;</label>
- </vbox>
-</groupbox>
-
-<!-- Location Bar -->
-<groupbox id="locationBarGroup"
- data-category="panePrivacy"
- hidden="true">
- <caption><label>&locationBar.label;</label></caption>
- <label id="locationBarSuggestionLabel">&locbar.suggest2.label;</label>
- <checkbox id="historySuggestion" label="&locbar.history.label;"
- accesskey="&locbar.history.accesskey;"
- preference="browser.urlbar.suggest.history"/>
- <checkbox id="bookmarkSuggestion" label="&locbar.bookmarks.label;"
- accesskey="&locbar.bookmarks.accesskey;"
- preference="browser.urlbar.suggest.bookmark"/>
- <checkbox id="openpageSuggestion" label="&locbar.openpage.label;"
- accesskey="&locbar.openpage.accesskey;"
- preference="browser.urlbar.suggest.openpage"/>
- <label class="text-link" onclick="gotoPref('general')">
- &suggestionSettings2.label;
- </label>
-</groupbox>
-
-<!-- addons, forgery (phishing) UI Security -->
-<groupbox id="addonsPhishingGroup" data-category="panePrivacy" hidden="true">
- <caption><label>&security.label;</label></caption>
-
- <hbox id="addonInstallBox">
- <checkbox id="warnAddonInstall"
- label="&warnOnAddonInstall.label;"
- accesskey="&warnOnAddonInstall.accesskey;"
- preference="xpinstall.whitelist.required"
- onsyncfrompreference="return gPrivacyPane.readWarnAddonInstall();"
- flex="1" />
- <button id="addonExceptions"
- class="accessory-button"
- label="&addonExceptions.label;"
- accesskey="&addonExceptions.accesskey;"/>
- </hbox>
-
- <separator class="thin"/>
- <checkbox id="enableSafeBrowsing"
- label="&enableSafeBrowsing.label;"
- accesskey="&enableSafeBrowsing.accesskey;" />
- <vbox class="indent">
- <checkbox id="blockDownloads"
- label="&blockDownloads.label;"
- accesskey="&blockDownloads.accesskey;" />
- <checkbox id="blockUncommonUnwanted"
- label="&blockUncommonAndUnwanted.label;"
- accesskey="&blockUncommonAndUnwanted.accesskey;" />
- </vbox>
-</groupbox>
-
-<!-- Certificates -->
-<groupbox id="certSelection" data-category="panePrivacy" hidden="true">
- <caption><label>&certificateTab.label;</label></caption>
- <description id="CertSelectionDesc" control="certSelection">&certPersonal2.description;</description>
-
- <!--
- The values on these radio buttons may look like l10n issues, but
- they're not - this preference uses *those strings* as its values.
- I KID YOU NOT.
- -->
- <radiogroup id="certSelection"
- preftype="string"
- preference="security.default_personal_cert"
- aria-labelledby="CertSelectionDesc">
- <radio label="&selectCerts.auto;"
- accesskey="&selectCerts.auto.accesskey;"
- value="Select Automatically"/>
- <radio label="&selectCerts.ask;"
- accesskey="&selectCerts.ask.accesskey;"
- value="Ask Every Time"/>
- </radiogroup>
- <hbox align="start">
- <checkbox id="enableOCSP"
- label="&enableOCSP.label;"
- accesskey="&enableOCSP.accesskey;"
- onsyncfrompreference="return gPrivacyPane.readEnableOCSP();"
- onsynctopreference="return gPrivacyPane.writeEnableOCSP();"
- preference="security.OCSP.enabled"
- flex="1" />
- <vbox>
- <button id="viewCertificatesButton"
- class="accessory-button"
- label="&viewCerts.label;"
- accesskey="&viewCerts.accesskey;"
- preference="security.disable_button.openCertManager"/>
- <button id="viewSecurityDevicesButton"
- class="accessory-button"
- label="&viewSecurityDevices.label;"
- accesskey="&viewSecurityDevices.accesskey;"
- preference="security.disable_button.openDeviceManager"/>
- </vbox>
- </hbox>
-</groupbox>
-
-<!-- DRM Content -->
-<groupbox id="drmGroup" data-category="panePrivacy" hidden="true">
- <caption><label>&drmContent.label;</label></caption>
- <grid id="contentGrid2">
- <columns>
- <column flex="1"/>
- <column/>
- </columns>
- <rows id="contentRows-2">
- <row id="playDRMContentRow">
- <hbox align="center">
- <checkbox id="playDRMContent" preference="media.eme.enabled"
- label="&playDRMContent.label;" accesskey="&playDRMContent.accesskey;"/>
- <label id="playDRMContentLink" class="learnMore text-link">
- &playDRMContent.learnMore.label;
- </label>
- </hbox>
- </row>
- </rows>
- </grid>
-</groupbox>
-
-<!-- Containers -->
-<groupbox id="browserContainersGroup" data-category="panePrivacy" hidden="true">
- <vbox id="browserContainersbox" hidden="true">
- <caption><label>&browserContainersHeader.label;</label></caption>
- <hbox align="center">
- <checkbox id="browserContainersCheckbox"
- label="&browserContainersEnabled.label;"
- accesskey="&browserContainersEnabled.accesskey;"
- preference="privacy.userContext.enabled"
- onsyncfrompreference="return gPrivacyPane.readBrowserContainersCheckbox();"/>
- <label id="browserContainersLearnMore" class="learnMore text-link">
- &browserContainersLearnMore.label;
- </label>
- <spacer flex="1"/>
- <button id="browserContainersSettings"
- class="accessory-button"
- label="&browserContainersSettings.label;"
- accesskey="&browserContainersSettings.accesskey;"/>
- </hbox>
- </vbox>
-</groupbox>
-
-<!-- Network -->
-<!-- Connection -->
-<groupbox id="connectionGroup" data-category="panePrivacy" hidden="true">
- <caption><label>&connection.label;</label></caption>
-
- <hbox align="center">
- <description flex="1" control="connectionSettings">&connectionDesc.label;</description>
- <button id="connectionSettings"
- class="accessory-button"
- icon="network"
- label="&connectionSettings.label;"
- accesskey="&connectionSettings.accesskey;"/>
- </hbox>
-</groupbox>
-
-<!-- Cache -->
-<groupbox id="cacheGroup" data-category="panePrivacy" hidden="true">
- <caption><label>&httpCache.label;</label></caption>
-
- <hbox align="center">
- <label id="actualDiskCacheSize" flex="1"/>
- <button id="clearCacheButton"
- class="accessory-button"
- icon="clear"
- label="&clearCacheNow.label;" accesskey="&clearCacheNow.accesskey;"/>
- </hbox>
- <checkbox preference="browser.cache.disk.smart_size.enabled"
- id="allowSmartSize"
- onsyncfrompreference="return gPrivacyPane.readSmartSizeEnabled();"
- label="&overrideSmartCacheSize.label;"
- accesskey="&overrideSmartCacheSize.accesskey;"/>
- <hbox align="center" class="indent">
- <label id="useCacheBefore" control="cacheSize"
- accesskey="&limitCacheSizeBefore.accesskey;">
- &limitCacheSizeBefore.label;
- </label>
- <textbox id="cacheSize" type="number" size="4" max="1024"
- aria-labelledby="useCacheBefore cacheSize useCacheAfter"/>
- <label id="useCacheAfter" flex="1">&limitCacheSizeAfter.label;</label>
- </hbox>
-</groupbox>
-
-<!-- Offline apps -->
-<groupbox id="offlineGroup" data-category="panePrivacy" hidden="true" data-hidden-from-search="true">
- <caption><label>&offlineStorage2.label;</label></caption>
-
- <hbox align="center">
- <label id="actualAppCacheSize" flex="1"/>
- <button id="clearOfflineAppCacheButton"
- class="accessory-button"
- icon="clear"
- label="&clearOfflineAppCacheNow.label;" accesskey="&clearOfflineAppCacheNow.accesskey;"/>
- </hbox>
- <hbox align="center">
- <checkbox id="offlineNotify"
- label="&offlineStorageNotify.label;" accesskey="&offlineStorageNotify.accesskey;"
- preference="browser.offline-apps.notify"
- onsyncfrompreference="return gPrivacyPane.readOfflineNotify();"
- flex="1" />
- <button id="offlineNotifyExceptions"
- class="accessory-button"
- label="&offlineStorageNotifyExceptions.label;"
- accesskey="&offlineStorageNotifyExceptions.accesskey;"/>
- </hbox>
- <hbox>
- <vbox flex="1">
- <label id="offlineAppsListLabel">&offlineAppsList2.label;</label>
- <listbox id="offlineAppsList"
- flex="1"
- aria-labelledby="offlineAppsListLabel">
- </listbox>
- </vbox>
- <vbox pack="end">
- <button id="offlineAppsListRemove"
- class="accessory-button"
- disabled="true"
- label="&offlineAppsListRemove.label;"
- accesskey="&offlineAppsListRemove.accesskey;"/>
- </vbox>
- </hbox>
-</groupbox>
-
-<!-- Site Data -->
-<groupbox id="siteDataGroup" hidden="true" data-category="panePrivacy" data-hidden-from-search="true">
- <caption><label>&siteData.label;</label></caption>
-
- <hbox align="baseline">
- <label id="totalSiteDataSize"></label>
- <label id="siteDataLearnMoreLink" class="learnMore text-link" value="&siteDataLearnMoreLink.label;"></label>
- <spacer flex="1" />
- <button id="clearSiteDataButton"
- class="accessory-button"
- icon="clear"
- label="&clearSiteData.label;" accesskey="&clearSiteData.accesskey;"/>
- </hbox>
- <vbox align="end">
- <button id="siteDataSettings"
- class="accessory-button"
- label="&siteDataSettings.label;"
- accesskey="&siteDataSettings.accesskey;"/>
- </vbox>
-</groupbox>
-
-<!-- Data Choices -->
-#ifdef MOZ_TELEMETRY_REPORTING
-<groupbox id="historyGroup" data-category="panePrivacy" data-subcategory="reports" hidden="true">
-<caption><label>&reports.label;</label></caption>
- <hbox align="center">
- <checkbox id="submitHealthReportBox" label="&enableHealthReport.label;"
- accesskey="&enableHealthReport.accesskey;"/>
- <label id="FHRLearnMore"
- class="learnMore text-link">&healthReportLearnMore.label;</label>
- </hbox>
- <description class="indent">&healthReportDesc.label;</description>
- <vbox class="indent">
- <hbox align="center">
- <checkbox id="submitTelemetryBox" preference="toolkit.telemetry.enabled"
- label="&enableTelemetryData.label;"
- accesskey="&enableTelemetryData.accesskey;"/>
- <label id="telemetryLearnMore"
- class="learnMore text-link">&telemetryLearnMore.label;</label>
- </hbox>
- <description id="telemetryDataDesc"
- class="indent">&telemetryDesc.label;</description>
- </vbox>
-</groupbox>
-#endif
-
-#ifdef MOZ_DATA_REPORTING
-#ifdef MOZ_CRASHREPORTER
-<groupbox id="crashReporterGroup" data-category="panePrivacy" data-subcategory="reports" hidden="true">
-#ifndef MOZ_TELEMETRY_REPORTING
-<caption><label>&reports.label;</label></caption>
-#endif
- <hbox align="center">
- <checkbox id="automaticallySubmitCrashesBox"
- preference="browser.crashReports.unsubmittedCheck.autoSubmit"
- label="&alwaysSubmitCrashReports.label;"
- accesskey="&alwaysSubmitCrashReports.accesskey;"/>
- <label id="crashReporterLearnMore"
- class="learnMore text-link">&crashReporterLearnMore.label;</label>
- </hbox>
- <description class="indent">&crashReporterDesc2.label;</description>
-</groupbox>
-
-#endif
-#endif
deleted file mode 100644
--- a/browser/components/preferences/in-content/subdialogs.js
+++ /dev/null
@@ -1,451 +0,0 @@
-/* - 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/. */
-
-/* import-globals-from ../../../base/content/utilityOverlay.js */
-/* import-globals-from preferences.js */
-
-"use strict";
-
-var gSubDialog = {
- _closingCallback: null,
- _closingEvent: null,
- _isClosing: false,
- _frame: null,
- _overlay: null,
- _box: null,
- _openedURL: null,
- _injectedStyleSheets: [
- "chrome://browser/skin/preferences/preferences.css",
- "chrome://global/skin/in-content/common.css",
- "chrome://browser/skin/preferences/in-content/preferences.css",
- "chrome://browser/skin/preferences/in-content/dialog.css",
- ],
- _resizeObserver: null,
-
- init() {
- this._frame = document.getElementById("dialogFrame");
- this._overlay = document.getElementById("dialogOverlay");
- this._box = document.getElementById("dialogBox");
- this._closeButton = document.getElementById("dialogClose");
- },
-
- updateTitle(aEvent) {
- if (aEvent.target != gSubDialog._frame.contentDocument)
- return;
- document.getElementById("dialogTitle").textContent = gSubDialog._frame.contentDocument.title;
- },
-
- injectXMLStylesheet(aStylesheetURL) {
- let contentStylesheet = this._frame.contentDocument.createProcessingInstruction(
- "xml-stylesheet",
- 'href="' + aStylesheetURL + '" type="text/css"'
- );
- this._frame.contentDocument.insertBefore(contentStylesheet,
- this._frame.contentDocument.documentElement);
- },
-
- open(aURL, aFeatures = null, aParams = null, aClosingCallback = null) {
- // If we're already open/opening on this URL, do nothing.
- if (this._openedURL == aURL && !this._isClosing) {
- return;
- }
- // If we're open on some (other) URL or we're closing, open when closing has finished.
- if (this._openedURL || this._isClosing) {
- if (!this._isClosing) {
- this.close();
- }
- let args = Array.from(arguments);
- this._closingPromise.then(() => {
- this.open.apply(this, args);
- });
- return;
- }
- this._addDialogEventListeners();
-
- let features = (aFeatures ? aFeatures + "," : "") + "resizable,dialog=no,centerscreen";
- let dialog = window.openDialog(aURL, "dialogFrame", features, aParams);
- if (aClosingCallback) {
- this._closingCallback = aClosingCallback.bind(dialog);
- }
-
- this._closingEvent = null;
- this._isClosing = false;
- this._openedURL = aURL;
-
- features = features.replace(/,/g, "&");
- let featureParams = new URLSearchParams(features.toLowerCase());
- this._box.setAttribute("resizable", featureParams.has("resizable") &&
- featureParams.get("resizable") != "no" &&
- featureParams.get("resizable") != "0");
- },
-
- close(aEvent = null) {
- if (this._isClosing) {
- return;
- }
- this._isClosing = true;
- this._closingPromise = new Promise(resolve => {
- this._resolveClosePromise = resolve;
- });
-
- if (this._closingCallback) {
- try {
- this._closingCallback.call(null, aEvent);
- } catch (ex) {
- Cu.reportError(ex);
- }
- this._closingCallback = null;
- }
-
- this._removeDialogEventListeners();
-
- this._overlay.style.visibility = "";
- // Clear the sizing inline styles.
- this._frame.removeAttribute("style");
- // Clear the sizing attributes
- this._box.removeAttribute("width");
- this._box.removeAttribute("height");
- this._box.style.removeProperty("min-height");
- this._box.style.removeProperty("min-width");
-
- setTimeout(() => {
- // Unload the dialog after the event listeners run so that the load of about:blank isn't
- // cancelled by the ESC <key>.
- let onBlankLoad = e => {
- if (this._frame.contentWindow.location.href == "about:blank") {
- this._frame.removeEventListener("load", onBlankLoad);
- // We're now officially done closing, so update the state to reflect that.
- this._openedURL = null;
- this._isClosing = false;
- this._resolveClosePromise();
- }
- };
- this._frame.addEventListener("load", onBlankLoad);
- this._frame.loadURI("about:blank");
- }, 0);
- },
-
- handleEvent(aEvent) {
- switch (aEvent.type) {
- case "click":
- // Close the dialog if the user clicked the overlay background, just
- // like when the user presses the ESC key (case "command" below).
- if (aEvent.target === this._overlay) {
- this._frame.contentWindow.close();
- }
- break;
- case "command":
- this._frame.contentWindow.close();
- break;
- case "dialogclosing":
- this._onDialogClosing(aEvent);
- break;
- case "DOMTitleChanged":
- this.updateTitle(aEvent);
- break;
- case "DOMFrameContentLoaded":
- this._onContentLoaded(aEvent);
- break;
- case "load":
- this._onLoad(aEvent);
- break;
- case "unload":
- this._onUnload(aEvent);
- break;
- case "keydown":
- this._onKeyDown(aEvent);
- break;
- case "focus":
- this._onParentWinFocus(aEvent);
- break;
- }
- },
-
- /* Private methods */
-
- _onUnload(aEvent) {
- if (aEvent.target.location.href == this._openedURL) {
- this._frame.contentWindow.close();
- }
- },
-
- _onContentLoaded(aEvent) {
- if (aEvent.target != this._frame || aEvent.target.contentWindow.location == "about:blank") {
- return;
- }
-
- for (let styleSheetURL of this._injectedStyleSheets) {
- this.injectXMLStylesheet(styleSheetURL);
- }
-
- // Provide the ability for the dialog to know that it is being loaded "in-content".
- this._frame.contentDocument.documentElement.setAttribute("subdialog", "true");
-
- this._frame.contentWindow.addEventListener("dialogclosing", this);
-
- let oldResizeBy = this._frame.contentWindow.resizeBy;
- this._frame.contentWindow.resizeBy = function(resizeByWidth, resizeByHeight) {
- // Only handle resizeByHeight currently.
- let frameHeight = gSubDialog._frame.clientHeight;
- let boxMinHeight = parseFloat(getComputedStyle(gSubDialog._box).minHeight, 10);
-
- gSubDialog._frame.style.height = (frameHeight + resizeByHeight) + "px";
- gSubDialog._box.style.minHeight = (boxMinHeight + resizeByHeight) + "px";
-
- oldResizeBy.call(gSubDialog._frame.contentWindow, resizeByWidth, resizeByHeight);
- };
-
- // Make window.close calls work like dialog closing.
- let oldClose = this._frame.contentWindow.close;
- this._frame.contentWindow.close = function() {
- var closingEvent = gSubDialog._closingEvent;
- if (!closingEvent) {
- closingEvent = new CustomEvent("dialogclosing", {
- bubbles: true,
- detail: { button: null },
- });
-
- gSubDialog._frame.contentWindow.dispatchEvent(closingEvent);
- }
-
- gSubDialog.close(closingEvent);
- oldClose.call(gSubDialog._frame.contentWindow);
- };
-
- // XXX: Hack to make focus during the dialog's load functions work. Make the element visible
- // sooner in DOMContentLoaded but mostly invisible instead of changing visibility just before
- // the dialog's load event.
- this._overlay.style.visibility = "visible";
- this._overlay.style.opacity = "0.01";
- },
-
- _onLoad(aEvent) {
- if (aEvent.target.contentWindow.location == "about:blank") {
- return;
- }
-
- // Do this on load to wait for the CSS to load and apply before calculating the size.
- let docEl = this._frame.contentDocument.documentElement;
-
- let groupBoxTitle = document.getAnonymousElementByAttribute(this._box, "class", "groupbox-title");
- let groupBoxTitleHeight = groupBoxTitle.clientHeight +
- parseFloat(getComputedStyle(groupBoxTitle).borderBottomWidth);
-
- let groupBoxBody = document.getAnonymousElementByAttribute(this._box, "class", "groupbox-body");
- // These are deduced from styles which we don't change, so it's safe to get them now:
- let boxVerticalPadding = 2 * parseFloat(getComputedStyle(groupBoxBody).paddingTop);
- let boxHorizontalPadding = 2 * parseFloat(getComputedStyle(groupBoxBody).paddingLeft);
- let boxHorizontalBorder = 2 * parseFloat(getComputedStyle(this._box).borderLeftWidth);
- let boxVerticalBorder = 2 * parseFloat(getComputedStyle(this._box).borderTopWidth);
-
- // The difference between the frame and box shouldn't change, either:
- let boxRect = this._box.getBoundingClientRect();
- let frameRect = this._frame.getBoundingClientRect();
- let frameSizeDifference = (frameRect.top - boxRect.top) + (boxRect.bottom - frameRect.bottom);
-
- // Then determine and set a bunch of width stuff:
- let frameMinWidth = docEl.style.width || docEl.scrollWidth + "px";
- let frameWidth = docEl.getAttribute("width") ? docEl.getAttribute("width") + "px" :
- frameMinWidth;
- this._frame.style.width = frameWidth;
- this._box.style.minWidth = "calc(" +
- (boxHorizontalBorder + boxHorizontalPadding) +
- "px + " + frameMinWidth + ")";
-
- // Now do the same but for the height. We need to do this afterwards because otherwise
- // XUL assumes we'll optimize for height and gives us "wrong" values which then are no
- // longer correct after we set the width:
- let frameMinHeight = docEl.style.height || docEl.scrollHeight + "px";
- let frameHeight = docEl.getAttribute("height") ? docEl.getAttribute("height") + "px" :
- frameMinHeight;
-
- // Now check if the frame height we calculated is possible at this window size,
- // accounting for titlebar, padding/border and some spacing.
- let maxHeight = window.innerHeight - frameSizeDifference - 30;
- // Do this with a frame height in pixels...
- let comparisonFrameHeight;
- if (frameHeight.endsWith("em")) {
- let fontSize = parseFloat(getComputedStyle(this._frame).fontSize);
- comparisonFrameHeight = parseFloat(frameHeight, 10) * fontSize;
- } else if (frameHeight.endsWith("px")) {
- comparisonFrameHeight = parseFloat(frameHeight, 10);
- } else {
- Cu.reportError("This dialog (" + this._frame.contentWindow.location.href + ") " +
- "set a height in non-px-non-em units ('" + frameHeight + "'), " +
- "which is likely to lead to bad sizing in in-content preferences. " +
- "Please consider changing this.");
- comparisonFrameHeight = parseFloat(frameHeight);
- }
-
- if (comparisonFrameHeight > maxHeight) {
- // If the height is bigger than that of the window, we should let the contents scroll:
- frameHeight = maxHeight + "px";
- frameMinHeight = maxHeight + "px";
- let containers = this._frame.contentDocument.querySelectorAll(".largeDialogContainer");
- for (let container of containers) {
- container.classList.add("doScroll");
- }
- }
-
- this._frame.style.height = frameHeight;
- this._box.style.minHeight = "calc(" +
- (boxVerticalBorder + groupBoxTitleHeight + boxVerticalPadding) +
- "px + " + frameMinHeight + ")";
-
- this._overlay.style.visibility = "visible";
- this._overlay.style.opacity = ""; // XXX: focus hack continued from _onContentLoaded
-
- if (this._box.getAttribute("resizable") == "true") {
- this._resizeObserver = new MutationObserver(this._onResize);
- this._resizeObserver.observe(this._box, {attributes: true});
- }
-
- this._trapFocus();
- },
-
- _onResize(mutations) {
- let frame = gSubDialog._frame;
- // The width and height styles are needed for the initial
- // layout of the frame, but afterward they need to be removed
- // or their presence will restrict the contents of the <browser>
- // from resizing to a smaller size.
- frame.style.removeProperty("width");
- frame.style.removeProperty("height");
-
- let docEl = frame.contentDocument.documentElement;
- let persistedAttributes = docEl.getAttribute("persist");
- if (!persistedAttributes ||
- (!persistedAttributes.includes("width") &&
- !persistedAttributes.includes("height"))) {
- return;
- }
-
- for (let mutation of mutations) {
- if (mutation.attributeName == "width") {
- docEl.setAttribute("width", docEl.scrollWidth);
- } else if (mutation.attributeName == "height") {
- docEl.setAttribute("height", docEl.scrollHeight);
- }
- }
- },
-
- _onDialogClosing(aEvent) {
- this._frame.contentWindow.removeEventListener("dialogclosing", this);
- this._closingEvent = aEvent;
- },
-
- _onKeyDown(aEvent) {
- if (aEvent.currentTarget == window && aEvent.keyCode == aEvent.DOM_VK_ESCAPE &&
- !aEvent.defaultPrevented) {
- this.close(aEvent);
- return;
- }
- if (aEvent.keyCode != aEvent.DOM_VK_TAB ||
- aEvent.ctrlKey || aEvent.altKey || aEvent.metaKey) {
- return;
- }
-
- let fm = Services.focus;
-
- function isLastFocusableElement(el) {
- // XXXgijs unfortunately there is no way to get the last focusable element without asking
- // the focus manager to move focus to it.
- let rv = el == fm.moveFocus(gSubDialog._frame.contentWindow, null, fm.MOVEFOCUS_LAST, 0);
- fm.setFocus(el, 0);
- return rv;
- }
-
- let forward = !aEvent.shiftKey;
- // check if focus is leaving the frame (incl. the close button):
- if ((aEvent.target == this._closeButton && !forward) ||
- (isLastFocusableElement(aEvent.originalTarget) && forward)) {
- aEvent.preventDefault();
- aEvent.stopImmediatePropagation();
- let parentWin = this._getBrowser().ownerGlobal;
- if (forward) {
- fm.moveFocus(parentWin, null, fm.MOVEFOCUS_FIRST, fm.FLAG_BYKEY);
- } else {
- // Somehow, moving back 'past' the opening doc is not trivial. Cheat by doing it in 2 steps:
- fm.moveFocus(window, null, fm.MOVEFOCUS_ROOT, fm.FLAG_BYKEY);
- fm.moveFocus(parentWin, null, fm.MOVEFOCUS_BACKWARD, fm.FLAG_BYKEY);
- }
- }
- },
-
- _onParentWinFocus(aEvent) {
- // Explicitly check for the focus target of |window| to avoid triggering this when the window
- // is refocused
- if (aEvent.target != this._closeButton && aEvent.target != window) {
- this._closeButton.focus();
- }
- },
-
- _addDialogEventListeners() {
- // Make the close button work.
- this._closeButton.addEventListener("command", this);
-
- // DOMTitleChanged isn't fired on the frame, only on the chromeEventHandler
- let chromeBrowser = this._getBrowser();
- chromeBrowser.addEventListener("DOMTitleChanged", this, true);
-
- // Similarly DOMFrameContentLoaded only fires on the top window
- window.addEventListener("DOMFrameContentLoaded", this, true);
-
- // Wait for the stylesheets injected during DOMContentLoaded to load before showing the dialog
- // otherwise there is a flicker of the stylesheet applying.
- this._frame.addEventListener("load", this);
-
- chromeBrowser.addEventListener("unload", this, true);
-
- // Ensure we get <esc> keypresses even if nothing in the subdialog is focusable
- // (happens on OS X when only text inputs and lists are focusable, and
- // the subdialog only has checkboxes/radiobuttons/buttons)
- window.addEventListener("keydown", this, true);
-
- this._overlay.addEventListener("click", this, true);
- },
-
- _removeDialogEventListeners() {
- let chromeBrowser = this._getBrowser();
- chromeBrowser.removeEventListener("DOMTitleChanged", this, true);
- chromeBrowser.removeEventListener("unload", this, true);
-
- this._closeButton.removeEventListener("command", this);
-
- window.removeEventListener("DOMFrameContentLoaded", this, true);
- this._frame.removeEventListener("load", this);
- this._frame.contentWindow.removeEventListener("dialogclosing", this);
- window.removeEventListener("keydown", this, true);
-
- this._overlay.removeEventListener("click", this, true);
-
- if (this._resizeObserver) {
- this._resizeObserver.disconnect();
- this._resizeObserver = null;
- }
- this._untrapFocus();
- },
-
- _trapFocus() {
- let fm = Services.focus;
- fm.moveFocus(this._frame.contentWindow, null, fm.MOVEFOCUS_FIRST, 0);
- this._frame.contentDocument.addEventListener("keydown", this, true);
- this._closeButton.addEventListener("keydown", this);
-
- window.addEventListener("focus", this, true);
- },
-
- _untrapFocus() {
- this._frame.contentDocument.removeEventListener("keydown", this, true);
- this._closeButton.removeEventListener("keydown", this);
- window.removeEventListener("focus", this);
- },
-
- _getBrowser() {
- return window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShell)
- .chromeEventHandler;
- },
-};
deleted file mode 100755
--- a/browser/components/preferences/in-content/sync.xul
+++ /dev/null
@@ -1,225 +0,0 @@
-# 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/.
-
-<!-- Sync panel -->
-
-<preferences id="syncEnginePrefs" hidden="true" data-category="paneSync">
- <preference id="engine.addons"
- name="services.sync.engine.addons"
- type="bool"/>
- <preference id="engine.bookmarks"
- name="services.sync.engine.bookmarks"
- type="bool"/>
- <preference id="engine.history"
- name="services.sync.engine.history"
- type="bool"/>
- <preference id="engine.tabs"
- name="services.sync.engine.tabs"
- type="bool"/>
- <preference id="engine.prefs"
- name="services.sync.engine.prefs"
- type="bool"/>
- <preference id="engine.passwords"
- name="services.sync.engine.passwords"
- type="bool"/>
-</preferences>
-
-<script type="application/javascript"
- src="chrome://browser/content/preferences/in-content/sync.js"/>
-
-<hbox id="header-sync"
- class="header"
- hidden="true"
- data-category="paneSync">
- <label class="header-name" flex="1">&paneSync1.title;</label>
-</hbox>
-
-<deck id="weavePrefsDeck" data-category="paneSync" hidden="true">
- <vbox id="noFxaAccount">
- <hbox>
- <vbox id="fxaContentWrapper">
- <groupbox id="noFxaGroup">
- <vbox>
- <label id="noFxaCaption">&signedOut.caption;</label>
- <description id="noFxaDescription" flex="1">&signedOut.description;</description>
- <hbox class="fxaAccountBox">
- <vbox>
- <image class="fxaFirefoxLogo"/>
- </vbox>
- <vbox flex="1">
- <label id="signedOutAccountBoxTitle">&signedOut.accountBox.title;</label>
- <hbox class="fxaAccountBoxButtons">
- <button id="noFxaSignUp" label="&signedOut.accountBox.create;" accesskey="&signedOut.accountBox.create.accesskey;"></button>
- <button id="noFxaSignIn" label="&signedOut.accountBox.signin;" accesskey="&signedOut.accountBox.signin.accesskey;"></button>
- </hbox>
- </vbox>
- </hbox>
- </vbox>
- </groupbox>
- </vbox>
- <vbox>
- <html:img class="fxaSyncIllustration" src="chrome://browser/skin/fxa/sync-illustration.svg"/>
- </vbox>
- </hbox>
- <label class="fxaMobilePromo">
- &mobilePromo3.start;<!-- We put these comments to avoid inserting white spaces
- --><label id="fxaMobilePromo-android"
- class="androidLink text-link"><!--
- -->&mobilePromo3.androidLink;</label><!--
- -->&mobilePromo3.iOSBefore;<!--
- --><label id="fxaMobilePromo-ios"
- class="iOSLink text-link"><!--
- -->&mobilePromo3.iOSLink;</label><!--
- -->&mobilePromo3.end;
- </label>
- </vbox>
-
- <vbox id="hasFxaAccount">
- <hbox>
- <vbox id="fxaContentWrapper">
- <groupbox id="fxaGroup">
- <caption><label>&syncBrand.fxAccount.label;</label></caption>
- <deck id="fxaLoginStatus">
-
- <!-- logged in and verified and all is good -->
- <hbox id="fxaLoginVerified" class="fxaAccountBox">
- <vbox align="center" pack="center">
- <image id="fxaProfileImage" class="actionable"
- role="button"
- onclick="gSyncPane.openChangeProfileImage(event);"
- onkeypress="gSyncPane.openChangeProfileImage(event);"
- tooltiptext="&profilePicture.tooltip;"/>
- </vbox>
- <vbox flex="1" pack="center">
- <label id="fxaDisplayName" hidden="true"/>
- <label id="fxaEmailAddress1"/>
- <hbox class="fxaAccountBoxButtons">
- <button id="fxaUnlinkButton" label="&disconnect3.label;" accesskey="&disconnect3.accesskey;"/>
- <html:a id="verifiedManage" target="_blank"
- accesskey="&verifiedManage.accesskey;"
- onkeypress="gSyncPane.openManageFirefoxAccount(event);"><!--
- -->&verifiedManage.label;</html:a>
- </hbox>
- </vbox>
- </hbox>
-
- <!-- logged in to an unverified account -->
- <hbox id="fxaLoginUnverified" class="fxaAccountBox">
- <vbox>
- <image id="fxaProfileImage"/>
- </vbox>
- <vbox flex="1">
- <hbox>
- <vbox><image id="fxaLoginRejectedWarning"/></vbox>
- <description flex="1">
- &signedInUnverified.beforename.label;
- <label id="fxaEmailAddress2"/>
- &signedInUnverified.aftername.label;
- </description>
- </hbox>
- <hbox class="fxaAccountBoxButtons">
- <button id="verifyFxaAccount" label="&verify.label;" accesskey="&verify.accesskey;"></button>
- <button id="unverifiedUnlinkFxaAccount" label="&forget.label;" accesskey="&forget.accesskey;"></button>
- </hbox>
- </vbox>
- </hbox>
-
- <!-- logged in locally but server rejected credentials -->
- <hbox id="fxaLoginRejected" class="fxaAccountBox">
- <vbox>
- <image id="fxaProfileImage"/>
- </vbox>
- <vbox flex="1">
- <hbox>
- <vbox><image id="fxaLoginRejectedWarning"/></vbox>
- <description flex="1">
- &signedInLoginFailure.beforename.label;
- <label id="fxaEmailAddress3"/>
- &signedInLoginFailure.aftername.label;
- </description>
- </hbox>
- <hbox class="fxaAccountBoxButtons">
- <button id="rejectReSignIn" label="&signIn.label;" accesskey="&signIn.accesskey;"></button>
- <button id="rejectUnlinkFxaAccount" label="&forget.label;" accesskey="&forget.accesskey;"></button>
- </hbox>
- </vbox>
- </hbox>
- </deck>
- </groupbox>
- <groupbox id="syncOptions">
- <caption><label>&signedIn.settings.label;</label></caption>
- <description>&signedIn.settings.description;</description>
- <hbox id="fxaSyncEngines">
- <vbox align="start" flex="1">
- <checkbox label="&engine.tabs.label2;"
- accesskey="&engine.tabs.accesskey;"
- preference="engine.tabs"/>
- <checkbox label="&engine.bookmarks.label;"
- accesskey="&engine.bookmarks.accesskey;"
- preference="engine.bookmarks"/>
- <checkbox label="&engine.logins.label;"
- accesskey="&engine.logins.accesskey;"
- preference="engine.passwords"/>
- </vbox>
- <vbox align="start" flex="1">
- <checkbox label="&engine.history.label;"
- accesskey="&engine.history.accesskey;"
- preference="engine.history"/>
- <checkbox label="&engine.addons.label;"
- accesskey="&engine.addons.accesskey;"
- preference="engine.addons"/>
- <checkbox label="&engine.prefs.label;"
- accesskey="&engine.prefs.accesskey;"
- preference="engine.prefs"/>
- </vbox>
- <spacer/>
- </hbox>
- </groupbox>
- </vbox>
- <vbox>
- <html:img class="fxaSyncIllustration" src="chrome://browser/skin/fxa/sync-illustration.svg"/>
- </vbox>
- </hbox>
- <groupbox>
- <caption>
- <label control="fxaSyncComputerName">
- &fxaSyncDeviceName.label;
- </label>
- </caption>
- <hbox id="fxaDeviceName">
- <textbox id="fxaSyncComputerName" disabled="true"/>
- <hbox>
- <button id="fxaChangeDeviceName"
- label="&changeSyncDeviceName2.label;"
- accesskey="&changeSyncDeviceName2.accesskey;"/>
- <button id="fxaCancelChangeDeviceName"
- label="&cancelChangeSyncDeviceName.label;"
- accesskey="&cancelChangeSyncDeviceName.accesskey;"
- hidden="true"/>
- <button id="fxaSaveChangeDeviceName"
- label="&saveChangeSyncDeviceName.label;"
- accesskey="&saveChangeSyncDeviceName.accesskey;"
- hidden="true"/>
- </hbox>
- </hbox>
- </groupbox>
- <label class="fxaMobilePromo">
- &mobilePromo3.start;<!-- We put these comments to avoid inserting white spaces
- --><label class="androidLink text-link" id="fxaMobilePromo-android-hasFxaAccount"><!--
- -->&mobilePromo3.androidLink;</label><!--
- -->&mobilePromo3.iOSBefore;<!--
- --><label class="iOSLink text-link" id="fxaMobilePromo-ios-hasFxaAccount"><!--
- -->&mobilePromo3.iOSLink;</label><!--
- -->&mobilePromo3.end;
- </label>
- <vbox id="tosPP-small" align="start">
- <label id="tosPP-small-ToS" class="text-link">
- &prefs.tosLink.label;
- </label>
- <label id="tosPP-small-PP" class="text-link">
- &fxaPrivacyNotice.link.label;
- </label>
- </vbox>
- </vbox>
-</deck>
deleted file mode 100644
--- a/browser/components/preferences/in-content/tests/browser_siteData.js
+++ /dev/null
@@ -1,426 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-/* import-globals-from ../../../../../testing/modules/sinon-1.16.1.js */
-Services.scriptloader.loadSubScript("resource://testing-common/sinon-1.16.1.js");
-
-const TEST_QUOTA_USAGE_HOST = "example.com";
-const TEST_QUOTA_USAGE_ORIGIN = "https://" + TEST_QUOTA_USAGE_HOST;
-const TEST_QUOTA_USAGE_URL = TEST_QUOTA_USAGE_ORIGIN + "/browser/browser/components/preferences/in-content/tests/site_data_test.html";
-const TEST_OFFLINE_HOST = "example.org";
-const TEST_OFFLINE_ORIGIN = "https://" + TEST_OFFLINE_HOST;
-const TEST_OFFLINE_URL = TEST_OFFLINE_ORIGIN + "/browser/browser/components/preferences/in-content/tests/offline/offline.html";
-const REMOVE_DIALOG_URL = "chrome://browser/content/preferences/siteDataRemoveSelected.xul";
-
-const { NetUtil } = Cu.import("resource://gre/modules/NetUtil.jsm", {});
-const { DownloadUtils } = Cu.import("resource://gre/modules/DownloadUtils.jsm", {});
-const { SiteDataManager } = Cu.import("resource:///modules/SiteDataManager.jsm", {});
-const { OfflineAppCacheHelper } = Cu.import("resource:///modules/offlineAppCache.jsm", {});
-
-const mockOfflineAppCacheHelper = {
- clear: null,
-
- originalClear: null,
-
- register() {
- this.originalClear = OfflineAppCacheHelper.clear;
- this.clear = sinon.spy();
- OfflineAppCacheHelper.clear = this.clear;
- },
-
- unregister() {
- OfflineAppCacheHelper.clear = this.originalClear;
- }
-};
-
-function getPersistentStoragePermStatus(origin) {
- let uri = NetUtil.newURI(origin);
- let principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
- return Services.perms.testExactPermissionFromPrincipal(principal, "persistent-storage");
-}
-
-function getQuotaUsage(origin) {
- return new Promise(resolve => {
- let uri = NetUtil.newURI(origin);
- let principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
- Services.qms.getUsageForPrincipal(principal, request => resolve(request.result.usage));
- });
-}
-
-// XXX: The intermittent bug 1331851
-// The implementation of nsICacheStorageConsumptionObserver must be passed as weak referenced,
-// so we must hold this observer here well. If we didn't, there would be a chance that
-// in Linux debug test run the observer was released before the operation at gecko was completed
-// (may be because of a relatively quicker GC cycle or a relatively slower operation).
-// As a result of that, we would never get the cache usage we want so the test would fail from timeout.
-const cacheUsageGetter = {
- _promise: null,
- _resolve: null,
- get() {
- if (!this._promise) {
- this._promise = new Promise(resolve => {
- this._resolve = resolve;
- Services.cache2.asyncGetDiskConsumption(this);
- });
- }
- return this._promise;
- },
- // nsICacheStorageConsumptionObserver implementations
- onNetworkCacheDiskConsumption(usage) {
- cacheUsageGetter._promise = null;
- cacheUsageGetter._resolve(usage);
- },
- QueryInterface: XPCOMUtils.generateQI([
- Components.interfaces.nsICacheStorageConsumptionObserver,
- Components.interfaces.nsISupportsWeakReference
- ]),
-};
-
-function promiseCookiesCleared() {
- return TestUtils.topicObserved("cookie-changed", (subj, data) => {
- return data === "cleared";
- });
-}
-
-registerCleanupFunction(function() {
- delete window.sinon;
- delete window.setImmediate;
- delete window.clearImmediate;
- mockOfflineAppCacheHelper.unregister();
-});
-
-// Test listing site using quota usage or site using appcache
-add_task(async function() {
- await SpecialPowers.pushPrefEnv({set: [["browser.storageManager.enabled", true]]});
-
- // Open a test site which would save into appcache
- await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_OFFLINE_URL);
- await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-
- // Open a test site which would save into quota manager
- await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_QUOTA_USAGE_URL);
- await waitForEvent(gBrowser.selectedBrowser.contentWindow, "test-indexedDB-done");
- await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-
- let updatedPromise = promiseSiteDataManagerSitesUpdated();
- await openPreferencesViaOpenPreferencesAPI("privacy", { leaveOpen: true });
- await updatedPromise;
- await openSiteDataSettingsDialog();
- let doc = gBrowser.selectedBrowser.contentDocument;
- let dialogFrame = doc.getElementById("dialogFrame");
- let frameDoc = dialogFrame.contentDocument;
-
- let siteItems = frameDoc.getElementsByTagName("richlistitem");
- is(siteItems.length, 2, "Should list sites using quota usage or appcache");
-
- let appcacheSite = frameDoc.querySelector(`richlistitem[host="${TEST_OFFLINE_HOST}"]`);
- ok(appcacheSite, "Should list site using appcache");
-
- let qoutaUsageSite = frameDoc.querySelector(`richlistitem[host="${TEST_QUOTA_USAGE_HOST}"]`);
- ok(qoutaUsageSite, "Should list site using quota usage");
-
- // Always remember to clean up
- OfflineAppCacheHelper.clear();
- await new Promise(resolve => {
- let principal = Services.scriptSecurityManager
- .createCodebasePrincipalFromOrigin(TEST_QUOTA_USAGE_ORIGIN);
- let request = Services.qms.clearStoragesForPrincipal(principal, null, true);
- request.callback = resolve;
- });
- await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-});
-
-// Test buttons are disabled and loading message shown while updating sites
-add_task(async function() {
- await SpecialPowers.pushPrefEnv({set: [["browser.storageManager.enabled", true]]});
- let updatedPromise = promiseSiteDataManagerSitesUpdated();
- await openPreferencesViaOpenPreferencesAPI("privacy", { leaveOpen: true });
- await updatedPromise;
-
- let actual = null;
- let expected = null;
- let doc = gBrowser.selectedBrowser.contentDocument;
- let clearBtn = doc.getElementById("clearSiteDataButton");
- let settingsButton = doc.getElementById("siteDataSettings");
- let prefStrBundle = doc.getElementById("bundlePreferences");
- let totalSiteDataSizeLabel = doc.getElementById("totalSiteDataSize");
- is(clearBtn.disabled, false, "Should enable clear button after sites updated");
- is(settingsButton.disabled, false, "Should enable settings button after sites updated");
- await SiteDataManager.getTotalUsage()
- .then(usage => {
- actual = totalSiteDataSizeLabel.textContent;
- expected = prefStrBundle.getFormattedString(
- "totalSiteDataSize", DownloadUtils.convertByteUnits(usage));
- is(actual, expected, "Should show the right total site data size");
- });
-
- Services.obs.notifyObservers(null, "sitedatamanager:updating-sites");
- is(clearBtn.disabled, true, "Should disable clear button while updating sites");
- is(settingsButton.disabled, true, "Should disable settings button while updating sites");
- actual = totalSiteDataSizeLabel.textContent;
- expected = prefStrBundle.getString("loadingSiteDataSize");
- is(actual, expected, "Should show the loading message while updating");
-
- Services.obs.notifyObservers(null, "sitedatamanager:sites-updated");
- is(clearBtn.disabled, false, "Should enable clear button after sites updated");
- is(settingsButton.disabled, false, "Should enable settings button after sites updated");
- await SiteDataManager.getTotalUsage()
- .then(usage => {
- actual = totalSiteDataSizeLabel.textContent;
- expected = prefStrBundle.getFormattedString(
- "totalSiteDataSize", DownloadUtils.convertByteUnits(usage));
- is(actual, expected, "Should show the right total site data size");
- });
-
- await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-});
-
-// Test the function of the "Clear All Data" button
-add_task(async function() {
- await SpecialPowers.pushPrefEnv({set: [["browser.storageManager.enabled", true]]});
- addPersistentStoragePerm(TEST_QUOTA_USAGE_ORIGIN);
-
- await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_QUOTA_USAGE_URL);
- await waitForEvent(gBrowser.selectedBrowser.contentWindow, "test-indexedDB-done");
- await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-
- await openPreferencesViaOpenPreferencesAPI("privacy", { leaveOpen: true });
-
- // Test the initial states
- let cacheUsage = await cacheUsageGetter.get();
- let quotaUsage = await getQuotaUsage(TEST_QUOTA_USAGE_ORIGIN);
- let totalUsage = await SiteDataManager.getTotalUsage();
- Assert.greater(cacheUsage, 0, "The cache usage should not be 0");
- Assert.greater(quotaUsage, 0, "The quota usage should not be 0");
- Assert.greater(totalUsage, 0, "The total usage should not be 0");
-
- // Test cancelling "Clear All Data"
- // Click "Clear All Data" button and then cancel
- let doc = gBrowser.selectedBrowser.contentDocument;
- let cancelPromise = promiseAlertDialogOpen("cancel");
- let clearBtn = doc.getElementById("clearSiteDataButton");
- clearBtn.doCommand();
- await cancelPromise;
-
- // Test the items are not removed
- let status = getPersistentStoragePermStatus(TEST_QUOTA_USAGE_ORIGIN);
- is(status, Ci.nsIPermissionManager.ALLOW_ACTION, "Should not remove permission");
-
- cacheUsage = await cacheUsageGetter.get();
- quotaUsage = await getQuotaUsage(TEST_QUOTA_USAGE_ORIGIN);
- totalUsage = await SiteDataManager.getTotalUsage();
- Assert.greater(cacheUsage, 0, "The cache usage should not be 0");
- Assert.greater(quotaUsage, 0, "The quota usage should not be 0");
- Assert.greater(totalUsage, 0, "The total usage should not be 0");
- // Test cancelling "Clear All Data" ends
-
- // Test accepting "Clear All Data"
- // Click "Clear All Data" button and then accept
- let acceptPromise = promiseAlertDialogOpen("accept");
- let updatePromise = promiseSiteDataManagerSitesUpdated();
- let cookiesClearedPromise = promiseCookiesCleared();
-
- mockOfflineAppCacheHelper.register();
- clearBtn.doCommand();
- await acceptPromise;
- await updatePromise;
- mockOfflineAppCacheHelper.unregister();
-
- // Test all the items are removed
- await cookiesClearedPromise;
-
- ok(mockOfflineAppCacheHelper.clear.calledOnce, "Should clear app cache");
-
- status = getPersistentStoragePermStatus(TEST_QUOTA_USAGE_ORIGIN);
- is(status, Ci.nsIPermissionManager.UNKNOWN_ACTION, "Should remove permission");
-
- cacheUsage = await cacheUsageGetter.get();
- quotaUsage = await getQuotaUsage(TEST_QUOTA_USAGE_ORIGIN);
- totalUsage = await SiteDataManager.getTotalUsage();
- is(cacheUsage, 0, "The cache usage should be removed");
- is(quotaUsage, 0, "The quota usage should be removed");
- is(totalUsage, 0, "The total usage should be removed");
- // Test accepting "Clear All Data" ends
-
- await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-});
-
-// Test sorting
-add_task(async function() {
- await SpecialPowers.pushPrefEnv({set: [["browser.storageManager.enabled", true]]});
- mockSiteDataManager.register(SiteDataManager);
- mockSiteDataManager.fakeSites = [
- {
- usage: 1024,
- principal: Services.scriptSecurityManager
- .createCodebasePrincipalFromOrigin("https://account.xyz.com"),
- persisted: true
- },
- {
- usage: 1024 * 2,
- principal: Services.scriptSecurityManager
- .createCodebasePrincipalFromOrigin("https://books.foo.com"),
- persisted: false
- },
- {
- usage: 1024 * 3,
- principal: Services.scriptSecurityManager
- .createCodebasePrincipalFromOrigin("http://cinema.bar.com"),
- persisted: true
- },
- ];
-
- let updatePromise = promiseSiteDataManagerSitesUpdated();
- await openPreferencesViaOpenPreferencesAPI("privacy", { leaveOpen: true });
- await updatePromise;
- await openSiteDataSettingsDialog();
-
- let doc = gBrowser.selectedBrowser.contentDocument;
- let dialogFrame = doc.getElementById("dialogFrame");
- let frameDoc = dialogFrame.contentDocument;
- let hostCol = frameDoc.getElementById("hostCol");
- let usageCol = frameDoc.getElementById("usageCol");
- let statusCol = frameDoc.getElementById("statusCol");
- let sitesList = frameDoc.getElementById("sitesList");
-
- // Test default sorting
- assertSortByUsage("descending");
-
- // Test sorting on the usage column
- usageCol.click();
- assertSortByUsage("ascending");
- usageCol.click();
- assertSortByUsage("descending");
-
- // Test sorting on the host column
- hostCol.click();
- assertSortByHost("ascending");
- hostCol.click();
- assertSortByHost("descending");
-
- // Test sorting on the permission status column
- statusCol.click();
- assertSortByStatus("ascending");
- statusCol.click();
- assertSortByStatus("descending");
-
- mockSiteDataManager.unregister();
- await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-
- function assertSortByHost(order) {
- let siteItems = sitesList.getElementsByTagName("richlistitem");
- for (let i = 0; i < siteItems.length - 1; ++i) {
- let aHost = siteItems[i].getAttribute("host");
- let bHost = siteItems[i + 1].getAttribute("host");
- let result = aHost.localeCompare(bHost);
- if (order == "ascending") {
- Assert.lessOrEqual(result, 0, "Should sort sites in the ascending order by host");
- } else {
- Assert.greaterOrEqual(result, 0, "Should sort sites in the descending order by host");
- }
- }
- }
-
- function assertSortByStatus(order) {
- let siteItems = sitesList.getElementsByTagName("richlistitem");
- for (let i = 0; i < siteItems.length - 1; ++i) {
- let aHost = siteItems[i].getAttribute("host");
- let bHost = siteItems[i + 1].getAttribute("host");
- let a = findSiteByHost(aHost);
- let b = findSiteByHost(bHost);
- let result = 0;
- if (a.persisted && !b.persisted) {
- result = 1;
- } else if (!a.persisted && b.persisted) {
- result = -1;
- }
- if (order == "ascending") {
- Assert.lessOrEqual(result, 0, "Should sort sites in the ascending order by permission status");
- } else {
- Assert.greaterOrEqual(result, 0, "Should sort sites in the descending order by permission status");
- }
- }
- }
-
- function assertSortByUsage(order) {
- let siteItems = sitesList.getElementsByTagName("richlistitem");
- for (let i = 0; i < siteItems.length - 1; ++i) {
- let aHost = siteItems[i].getAttribute("host");
- let bHost = siteItems[i + 1].getAttribute("host");
- let a = findSiteByHost(aHost);
- let b = findSiteByHost(bHost);
- let result = a.usage - b.usage;
- if (order == "ascending") {
- Assert.lessOrEqual(result, 0, "Should sort sites in the ascending order by usage");
- } else {
- Assert.greaterOrEqual(result, 0, "Should sort sites in the descending order by usage");
- }
- }
- }
-
- function findSiteByHost(host) {
- return mockSiteDataManager.fakeSites.find(site => site.principal.URI.host == host);
- }
-});
-
-// Test search on the host column
-add_task(async function() {
- await SpecialPowers.pushPrefEnv({set: [["browser.storageManager.enabled", true]]});
- mockSiteDataManager.register(SiteDataManager);
- mockSiteDataManager.fakeSites = [
- {
- usage: 1024,
- principal: Services.scriptSecurityManager
- .createCodebasePrincipalFromOrigin("https://account.xyz.com"),
- persisted: true
- },
- {
- usage: 1024,
- principal: Services.scriptSecurityManager
- .createCodebasePrincipalFromOrigin("https://shopping.xyz.com"),
- persisted: false
- },
- {
- usage: 1024,
- principal: Services.scriptSecurityManager
- .createCodebasePrincipalFromOrigin("http://cinema.bar.com"),
- persisted: true
- },
- {
- usage: 1024,
- principal: Services.scriptSecurityManager
- .createCodebasePrincipalFromOrigin("http://email.bar.com"),
- persisted: false
- },
- ];
- let fakeHosts = mockSiteDataManager.fakeSites.map(site => site.principal.URI.host);
-
- let updatePromise = promiseSiteDataManagerSitesUpdated();
- await openPreferencesViaOpenPreferencesAPI("privacy", { leaveOpen: true });
- await updatePromise;
- await openSiteDataSettingsDialog();
-
- let doc = gBrowser.selectedBrowser.contentDocument;
- let frameDoc = doc.getElementById("dialogFrame").contentDocument;
- let searchBox = frameDoc.getElementById("searchBox");
-
- searchBox.value = "xyz";
- searchBox.doCommand();
- assertSitesListed(doc, fakeHosts.filter(host => host.includes("xyz")));
-
- searchBox.value = "bar";
- searchBox.doCommand();
- assertSitesListed(doc, fakeHosts.filter(host => host.includes("bar")));
-
- searchBox.value = "";
- searchBox.doCommand();
- assertSitesListed(doc, fakeHosts);
-
- mockSiteDataManager.unregister();
- await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-});
--- a/browser/components/preferences/moz.build
+++ b/browser/components/preferences/moz.build
@@ -1,22 +1,22 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
DIRS += [
- 'in-content-old',
- 'in-content'
+ 'in-content-new',
+ 'in-content-old'
]
BROWSER_CHROME_MANIFESTS += [
- 'in-content-old/tests/browser.ini',
- 'in-content/tests/browser.ini'
+ 'in-content-new/tests/browser.ini',
+ 'in-content-old/tests/browser.ini'
]
for var in ('MOZ_APP_NAME', 'MOZ_MACBUNDLE_NAME'):
DEFINES[var] = CONFIG[var]
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3', 'cocoa'):
DEFINES['HAVE_SHELL_SERVICE'] = 1
--- a/browser/components/preferences/siteDataRemoveSelected.xul
+++ b/browser/components/preferences/siteDataRemoveSelected.xul
@@ -1,17 +1,17 @@
<?xml version="1.0"?>
<!-- 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/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/preferences/siteDataSettings.css" type="text/css"?>
-<?xml-stylesheet href="chrome://browser/skin/preferences/in-content/siteDataSettings.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/skin/preferences/in-content-new/siteDataSettings.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/siteDataSettings.dtd" >
<dialog id="SiteDataRemoveSelectedDialog"
windowtype="Browser:SiteDataRemoveSelected"
width="500"
title="&removingDialog.title;"
onload="gSiteDataRemoveSelected.init();"
--- a/browser/components/preferences/siteDataSettings.xul
+++ b/browser/components/preferences/siteDataSettings.xul
@@ -2,17 +2,17 @@
<!-- 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/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/preferences/siteDataSettings.css" type="text/css"?>
-<?xml-stylesheet href="chrome://browser/skin/preferences/in-content/siteDataSettings.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/skin/preferences/in-content-new/siteDataSettings.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/siteDataSettings.dtd" >
<window id="SiteDataSettingsDialog" windowtype="Browser:SiteDataSettings"
class="windowDialog" title="&window.title;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="width: 45em;"
onload="gSiteDataSettings.init();"
--- a/browser/extensions/formautofill/content/editProfile.xhtml
+++ b/browser/extensions/formautofill/content/editProfile.xhtml
@@ -4,17 +4,17 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Profile Autofill - Edit Profile</title>
<!-- common.css and dialog.css need to be included until this file can be
- loaded as a stacked subdialog. -->
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css" />
- <link rel="stylesheet" href="chrome://browser/skin/preferences/in-content/dialog.css" />
+ <link rel="stylesheet" href="chrome://browser/skin/preferences/in-content-new/dialog.css" />
<link rel="stylesheet" href="chrome://formautofill-shared/skin/editProfile.css" />
<link rel="stylesheet" href="chrome://formautofill/skin/editProfile.css" />
<script src="chrome://formautofill/content/editProfile.js"></script>
</head>
<body>
<form>
<label id="given-name-container">
<span>First Name</span>
--- a/browser/installer/allowed-dupes.mn
+++ b/browser/installer/allowed-dupes.mn
@@ -16,26 +16,26 @@ browser/chrome/browser/content/browser/p
browser/chrome/browser/content/browser/preferences/in-content-old/containers.js
browser/chrome/browser/content/browser/preferences/in-content-old/content.js
browser/chrome/browser/content/browser/preferences/in-content-old/main.js
browser/chrome/browser/content/browser/preferences/in-content-old/preferences.js
browser/chrome/browser/content/browser/preferences/in-content-old/privacy.js
browser/chrome/browser/content/browser/preferences/in-content-old/search.js
browser/chrome/browser/content/browser/preferences/in-content-old/security.js
browser/chrome/browser/content/browser/preferences/in-content-old/sync.js
-browser/chrome/browser/content/browser/preferences/in-content/advanced.js
-browser/chrome/browser/content/browser/preferences/in-content/applications.js
-browser/chrome/browser/content/browser/preferences/in-content/containers.js
-browser/chrome/browser/content/browser/preferences/in-content/content.js
-browser/chrome/browser/content/browser/preferences/in-content/main.js
-browser/chrome/browser/content/browser/preferences/in-content/preferences.js
-browser/chrome/browser/content/browser/preferences/in-content/privacy.js
-browser/chrome/browser/content/browser/preferences/in-content/search.js
-browser/chrome/browser/content/browser/preferences/in-content/security.js
-browser/chrome/browser/content/browser/preferences/in-content/sync.js
+browser/chrome/browser/content/browser/preferences/in-content-new/advanced.js
+browser/chrome/browser/content/browser/preferences/in-content-new/applications.js
+browser/chrome/browser/content/browser/preferences/in-content-new/containers.js
+browser/chrome/browser/content/browser/preferences/in-content-new/content.js
+browser/chrome/browser/content/browser/preferences/in-content-new/main.js
+browser/chrome/browser/content/browser/preferences/in-content-new/preferences.js
+browser/chrome/browser/content/browser/preferences/in-content-new/privacy.js
+browser/chrome/browser/content/browser/preferences/in-content-new/search.js
+browser/chrome/browser/content/browser/preferences/in-content-new/security.js
+browser/chrome/browser/content/browser/preferences/in-content-new/sync.js
browser/chrome/en-US/locale/browser/preferences-old/applications.dtd
browser/chrome/en-US/locale/browser/preferences-old/containers.properties
browser/chrome/en-US/locale/browser/preferences-old/containers.dtd
browser/chrome/en-US/locale/browser/preferences-old/tabs.dtd
browser/chrome/en-US/locale/browser/preferences-old/preferences.dtd
browser/chrome/en-US/locale/browser/preferences-old/search.dtd
browser/chrome/en-US/locale/browser/preferences-old/security.dtd
browser/chrome/en-US/locale/browser/preferences-old/main.dtd
@@ -58,22 +58,22 @@ browser/chrome/en-US/locale/browser/pref
browser/chrome/en-US/locale/browser/preferences/advanced.dtd
browser/chrome/en-US/locale/browser/preferences/preferences.properties
browser/chrome/browser/skin/classic/browser/preferences/in-content-old/search.css
browser/chrome/browser/skin/classic/browser/preferences/in-content-old/containers.css
browser/chrome/browser/skin/classic/browser/preferences/in-content-old/favicon.ico
browser/chrome/browser/skin/classic/browser/preferences/in-content-old/icons.svg
browser/chrome/browser/skin/classic/browser/preferences/in-content-old/preferences.css
browser/chrome/browser/skin/classic/browser/preferences/in-content-old/dialog.css
-browser/chrome/browser/skin/classic/browser/preferences/in-content/search.css
-browser/chrome/browser/skin/classic/browser/preferences/in-content/containers.css
-browser/chrome/browser/skin/classic/browser/preferences/in-content/favicon.ico
-browser/chrome/browser/skin/classic/browser/preferences/in-content/icons.svg
-browser/chrome/browser/skin/classic/browser/preferences/in-content/preferences.css
-browser/chrome/browser/skin/classic/browser/preferences/in-content/dialog.css
+browser/chrome/browser/skin/classic/browser/preferences/in-content-new/search.css
+browser/chrome/browser/skin/classic/browser/preferences/in-content-new/containers.css
+browser/chrome/browser/skin/classic/browser/preferences/in-content-new/favicon.ico
+browser/chrome/browser/skin/classic/browser/preferences/in-content-new/icons.svg
+browser/chrome/browser/skin/classic/browser/preferences/in-content-new/preferences.css
+browser/chrome/browser/skin/classic/browser/preferences/in-content-new/dialog.css
# browser branding / themes is bug 1313106
browser/chrome/browser/content/branding/icon128.png
browser/chrome/browser/content/branding/icon16.png
browser/chrome/browser/content/branding/icon32.png
browser/chrome/browser/content/branding/icon48.png
browser/chrome/browser/content/browser/defaultthemes/5.header.png
browser/chrome/browser/content/browser/extension.svg
browser/chrome/browser/content/browser/places/bookmarkProperties.xul
--- a/browser/themes/linux/jar.mn
+++ b/browser/themes/linux/jar.mn
@@ -61,19 +61,19 @@ browser.jar:
skin/classic/browser/places/query.png (places/query.png)
skin/classic/browser/places/tag.png (places/tag.png)
skin/classic/browser/places/toolbarDropMarker.png (places/toolbarDropMarker.png)
skin/classic/browser/places/unsortedBookmarks.png (places/unsortedBookmarks.png)
skin/classic/browser/places/downloads.png (places/downloads.png)
skin/classic/browser/preferences/alwaysAsk.png (preferences/alwaysAsk.png)
skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
* skin/classic/browser/preferences/in-content-old/preferences.css (preferences/in-content-old/preferences.css)
-* skin/classic/browser/preferences/in-content/preferences.css (preferences/in-content/preferences.css)
+* skin/classic/browser/preferences/in-content-new/preferences.css (preferences/in-content-new/preferences.css)
* skin/classic/browser/preferences/in-content-old/dialog.css (preferences/in-content-old/dialog.css)
-* skin/classic/browser/preferences/in-content/dialog.css (preferences/in-content/dialog.css)
+* skin/classic/browser/preferences/in-content-new/dialog.css (preferences/in-content-new/dialog.css)
skin/classic/browser/preferences/applications.css (preferences/applications.css)
skin/classic/browser/social/services-16.png (social/services-16.png)
skin/classic/browser/social/services-64.png (social/services-64.png)
skin/classic/browser/tabbrowser/alltabs.png (tabbrowser/alltabs.png)
skin/classic/browser/tabbrowser/alltabs-inverted.png (tabbrowser/alltabs-inverted.png)
skin/classic/browser/tabbrowser/newtab.svg (tabbrowser/newtab.svg)
skin/classic/browser/tabbrowser/newtab-inverted.svg (tabbrowser/newtab-inverted.svg)
skin/classic/browser/tabbrowser/tab-active-middle.png (tabbrowser/tab-active-middle.png)
rename from browser/themes/linux/preferences/in-content/dialog.css
rename to browser/themes/linux/preferences/in-content-new/dialog.css
rename from browser/themes/linux/preferences/in-content/preferences.css
rename to browser/themes/linux/preferences/in-content-new/preferences.css
--- a/browser/themes/osx/jar.mn
+++ b/browser/themes/osx/jar.mn
@@ -94,19 +94,19 @@ browser.jar:
skin/classic/browser/places/tag@2x.png (places/tag@2x.png)
skin/classic/browser/places/downloads.png (places/downloads.png)
skin/classic/browser/places/livemark-item.png (places/livemark-item.png)
skin/classic/browser/preferences/alwaysAsk.png (preferences/alwaysAsk.png)
skin/classic/browser/preferences/application.png (preferences/application.png)
skin/classic/browser/preferences/saveFile.png (preferences/saveFile.png)
* skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
* skin/classic/browser/preferences/in-content-old/preferences.css (preferences/in-content-old/preferences.css)
-* skin/classic/browser/preferences/in-content/preferences.css (preferences/in-content/preferences.css)
+* skin/classic/browser/preferences/in-content-new/preferences.css (preferences/in-content-new/preferences.css)
* skin/classic/browser/preferences/in-content-old/dialog.css (preferences/in-content-old/dialog.css)
-* skin/classic/browser/preferences/in-content/dialog.css (preferences/in-content/dialog.css)
+* skin/classic/browser/preferences/in-content-new/dialog.css (preferences/in-content-new/dialog.css)
skin/classic/browser/preferences/applications.css (preferences/applications.css)
skin/classic/browser/social/services-16.png (social/services-16.png)
skin/classic/browser/social/services-16@2x.png (social/services-16@2x.png)
skin/classic/browser/social/services-64.png (social/services-64.png)
skin/classic/browser/social/services-64@2x.png (social/services-64@2x.png)
skin/classic/browser/tabbrowser/alltabs-box-bkgnd-icon.png (tabbrowser/alltabs-box-bkgnd-icon.png)
skin/classic/browser/tabbrowser/alltabs-box-bkgnd-icon@2x.png (tabbrowser/alltabs-box-bkgnd-icon@2x.png)
skin/classic/browser/tabbrowser/alltabs-box-bkgnd-icon-inverted.png (tabbrowser/alltabs-box-bkgnd-icon-inverted.png)
rename from browser/themes/osx/preferences/in-content/dialog.css
rename to browser/themes/osx/preferences/in-content-new/dialog.css
rename from browser/themes/osx/preferences/in-content/preferences.css
rename to browser/themes/osx/preferences/in-content-new/preferences.css
--- a/browser/themes/shared/incontentprefs/preferences.inc.css
+++ b/browser/themes/shared/incontentprefs/preferences.inc.css
@@ -69,37 +69,37 @@ treecol {
* preferences.js, so use collapse instead of display: none; if it's hidden
*/
#categories > .category[hidden="true"] {
display: -moz-box;
visibility: collapse;
}
#category-general > .category-icon {
- list-style-image: url("chrome://browser/skin/preferences/in-content/icons.svg#general");
+ list-style-image: url("chrome://browser/skin/preferences/in-content-new/icons.svg#general");
}
#category-application > .category-icon {
- list-style-image: url("chrome://browser/skin/preferences/in-content/icons.svg#content");
+ list-style-image: url("chrome://browser/skin/preferences/in-content-new/icons.svg#content");
}
#category-privacy > .category-icon {
- list-style-image: url("chrome://browser/skin/preferences/in-content/icons.svg#security");
+ list-style-image: url("chrome://browser/skin/preferences/in-content-new/icons.svg#security");
}
#category-sync > .category-icon {
- list-style-image: url("chrome://browser/skin/preferences/in-content/icons.svg#sync");
+ list-style-image: url("chrome://browser/skin/preferences/in-content-new/icons.svg#sync");
}
#category-advanced > .category-icon {
- list-style-image: url("chrome://browser/skin/preferences/in-content/icons.svg#advanced");
+ list-style-image: url("chrome://browser/skin/preferences/in-content-new/icons.svg#advanced");
}
#category-search-results > .category-icon {
- list-style-image: url("chrome://browser/skin/preferences/in-content/icons.svg#searchResults");
+ list-style-image: url("chrome://browser/skin/preferences/in-content-new/icons.svg#searchResults");
}
@media (max-width: 800px) {
.category-name {
display: none;
}
.help-button {
font-size: 0 !important;
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
@@ -73,21 +73,21 @@
skin/classic/browser/info.svg (../shared/info.svg)
* skin/classic/browser/menuPanel.svg (../shared/menuPanel.svg)
* skin/classic/browser/menuPanel-small.svg (../shared/menuPanel-small.svg)
* skin/classic/browser/notification-icons.svg (../shared/notification-icons.svg)
skin/classic/browser/tracking-protection-16.svg (../shared/identity-block/tracking-protection-16.svg)
skin/classic/browser/newtab/close.png (../shared/newtab/close.png)
skin/classic/browser/newtab/controls.svg (../shared/newtab/controls.svg)
skin/classic/browser/panel-icons.svg (../shared/panel-icons.svg)
- skin/classic/browser/preferences/in-content/favicon.ico (../shared/incontentprefs/favicon.ico)
- skin/classic/browser/preferences/in-content/icons.svg (../shared/incontentprefs/icons.svg)
- skin/classic/browser/preferences/in-content/search.css (../shared/incontentprefs/search.css)
- skin/classic/browser/preferences/in-content/siteDataSettings.css (../shared/incontentprefs/siteDataSettings.css)
-* skin/classic/browser/preferences/in-content/containers.css (../shared/incontentprefs/containers.css)
+ skin/classic/browser/preferences/in-content-new/favicon.ico (../shared/incontentprefs/favicon.ico)
+ skin/classic/browser/preferences/in-content-new/icons.svg (../shared/incontentprefs/icons.svg)
+ skin/classic/browser/preferences/in-content-new/search.css (../shared/incontentprefs/search.css)
+ skin/classic/browser/preferences/in-content-new/siteDataSettings.css (../shared/incontentprefs/siteDataSettings.css)
+* skin/classic/browser/preferences/in-content-new/containers.css (../shared/incontentprefs/containers.css)
skin/classic/browser/preferences/in-content-old/favicon.ico (../shared/incontentprefs-old/favicon.ico)
skin/classic/browser/preferences/in-content-old/icons.svg (../shared/incontentprefs-old/icons.svg)
skin/classic/browser/preferences/in-content-old/search.css (../shared/incontentprefs-old/search.css)
* skin/classic/browser/preferences/in-content-old/containers.css (../shared/incontentprefs-old/containers.css)
* skin/classic/browser/preferences/containers.css (../shared/preferences/containers.css)
skin/classic/browser/fxa/default-avatar.svg (../shared/fxa/default-avatar.svg)
skin/classic/browser/fxa/logo.png (../shared/fxa/logo.png)
skin/classic/browser/fxa/logo@2x.png (../shared/fxa/logo@2x.png)
--- a/browser/themes/windows/jar.mn
+++ b/browser/themes/windows/jar.mn
@@ -79,19 +79,19 @@ browser.jar:
skin/classic/browser/places/unsortedBookmarks.png (places/unsortedBookmarks.png)
skin/classic/browser/places/downloads.png (places/downloads.png)
skin/classic/browser/places/livemark-item.png (places/livemark-item.png)
skin/classic/browser/preferences/alwaysAsk.png (preferences/alwaysAsk.png)
skin/classic/browser/preferences/application.png (preferences/application.png)
skin/classic/browser/preferences/saveFile.png (preferences/saveFile.png)
skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
* skin/classic/browser/preferences/in-content-old/preferences.css (preferences/in-content-old/preferences.css)
-* skin/classic/browser/preferences/in-content/preferences.css (preferences/in-content/preferences.css)
+* skin/classic/browser/preferences/in-content-new/preferences.css (preferences/in-content-new/preferences.css)
* skin/classic/browser/preferences/in-content-old/dialog.css (preferences/in-content-old/dialog.css)
-* skin/classic/browser/preferences/in-content/dialog.css (preferences/in-content/dialog.css)
+* skin/classic/browser/preferences/in-content-new/dialog.css (preferences/in-content-new/dialog.css)
skin/classic/browser/preferences/applications.css (preferences/applications.css)
skin/classic/browser/social/services-16.png (social/services-16.png)
skin/classic/browser/social/services-64.png (social/services-64.png)
skin/classic/browser/tabbrowser/newtab.svg (tabbrowser/newtab.svg)
skin/classic/browser/tabbrowser/newtab-win7.svg (tabbrowser/newtab-win7.svg)
skin/classic/browser/tabbrowser/newtab-inverted.svg (tabbrowser/newtab-inverted.svg)
skin/classic/browser/tabbrowser/newtab-inverted-win7.svg (tabbrowser/newtab-inverted-win7.svg)
skin/classic/browser/tabbrowser/tab-active-middle.png (tabbrowser/tab-active-middle.png)
rename from browser/themes/windows/preferences/in-content/dialog.css
rename to browser/themes/windows/preferences/in-content-new/dialog.css
new file mode 100644
--- /dev/null
+++ b/browser/themes/windows/preferences/in-content-new/preferences.css
@@ -0,0 +1,56 @@
+/* - 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/. */
+
+%include ../../../shared/incontentprefs/preferences.inc.css
+
+@media (-moz-windows-default-theme: 0) {
+ #category-general > .category-icon {
+ list-style-image: url("chrome://browser/skin/preferences/in-content-new/icons.svg#general-native");
+ }
+
+ #category-application > .category-icon {
+ list-style-image: url("chrome://browser/skin/preferences/in-content-new/icons.svg#applications-native");
+ }
+
+ #category-privacy > .category-icon {
+ list-style-image: url("chrome://browser/skin/preferences/in-content-new/icons.svg#privacy-native");
+ }
+
+ #category-sync > .category-icon {
+ list-style-image: url("chrome://browser/skin/preferences/in-content-new/icons.svg#sync-native");
+ }
+
+ #category-advanced > .category-icon {
+ list-style-image: url("chrome://browser/skin/preferences/in-content-new/icons.svg#advanced-native");
+ }
+
+ #category-search-results > .category-icon {
+ list-style-image: url("chrome://browser/skin/preferences/in-content-new/icons.svg#searchResults-native");
+ }
+}
+
+.actionsMenu > .menulist-label-box > .menulist-icon {
+ margin-inline-end: 9px;
+}
+
+textbox + button,
+filefield + button {
+ margin-inline-start: -4px;
+}
+
+#advancedPrefs {
+ padding-bottom: 0; /* override padding from normal preferences.css */
+}
+
+#fxaProfileImage {
+ -moz-user-focus: normal;
+}
+
+/**
+ * Dialog
+ */
+
+#dialogTitle {
+ font-size: 1em;
+}
deleted file mode 100644
--- a/browser/themes/windows/preferences/in-content/preferences.css
+++ /dev/null
@@ -1,56 +0,0 @@
-/* - 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/. */
-
-%include ../../../shared/incontentprefs/preferences.inc.css
-
-@media (-moz-windows-default-theme: 0) {
- #category-general > .category-icon {
- list-style-image: url("chrome://browser/skin/preferences/in-content/icons.svg#general-native");
- }
-
- #category-application > .category-icon {
- list-style-image: url("chrome://browser/skin/preferences/in-content/icons.svg#applications-native");
- }
-
- #category-privacy > .category-icon {
- list-style-image: url("chrome://browser/skin/preferences/in-content/icons.svg#privacy-native");
- }
-
- #category-sync > .category-icon {
- list-style-image: url("chrome://browser/skin/preferences/in-content/icons.svg#sync-native");
- }
-
- #category-advanced > .category-icon {
- list-style-image: url("chrome://browser/skin/preferences/in-content/icons.svg#advanced-native");
- }
-
- #category-search-results > .category-icon {
- list-style-image: url("chrome://browser/skin/preferences/in-content/icons.svg#searchResults-native");
- }
-}
-
-.actionsMenu > .menulist-label-box > .menulist-icon {
- margin-inline-end: 9px;
-}
-
-textbox + button,
-filefield + button {
- margin-inline-start: -4px;
-}
-
-#advancedPrefs {
- padding-bottom: 0; /* override padding from normal preferences.css */
-}
-
-#fxaProfileImage {
- -moz-user-focus: normal;
-}
-
-/**
- * Dialog
- */
-
-#dialogTitle {
- font-size: 1em;
-}
--- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Tabs.jsm
+++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Tabs.jsm
@@ -4,17 +4,17 @@
"use strict";
this.EXPORTED_SYMBOLS = ["Tabs"];
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
const CUST_TAB = "chrome://browser/skin/customizableui/customizeFavicon.ico";
-const PREFS_TAB = "chrome://browser/skin/preferences/in-content/favicon.ico";
+const PREFS_TAB = "chrome://browser/skin/preferences/in-content-new/favicon.ico";
const DEFAULT_FAVICON_TAB = `data:text/html,<meta charset="utf-8">
<title>No favicon</title>`;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Timer.jsm");
this.Tabs = {
init(libDir) {},
--- a/testing/runtimes/mochitest-browser-chrome-e10s.runtimes.json
+++ b/testing/runtimes/mochitest-browser-chrome-e10s.runtimes.json
@@ -430,36 +430,36 @@
"browser/components/places/tests/browser/browser_bookmarklet_windowOpen.js": 2811,
"browser/components/places/tests/browser/browser_bookmarksProperties.js": 4908,
"browser/components/places/tests/browser/browser_forgetthissite_single.js": 2712,
"browser/components/places/tests/browser/browser_library_commands.js": 6259,
"browser/components/places/tests/browser/browser_library_middleclick.js": 4930,
"browser/components/places/tests/browser/browser_library_views_liveupdate.js": 9129,
"browser/components/places/tests/browser/browser_sort_in_library.js": 2771,
"browser/components/places/tests/browser/browser_views_liveupdate.js": 4735,
- "browser/components/preferences/in-content/tests/browser_advanced_siteData.js": 5809,
- "browser/components/preferences/in-content/tests/browser_advanced_update.js": 4994,
- "browser/components/preferences/in-content/tests/browser_basic_rebuild_fonts_test.js": 3402,
- "browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js": 8840,
- "browser/components/preferences/in-content/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.js": 3776,
- "browser/components/preferences/in-content/tests/browser_bug731866.js": 4124,
- "browser/components/preferences/in-content/tests/browser_connection_bug388287.js": 5029,
- "browser/components/preferences/in-content/tests/browser_cookies_exceptions.js": 32201,
- "browser/components/preferences/in-content/tests/browser_defaultbrowser_alwayscheck.js": 3689,
- "browser/components/preferences/in-content/tests/browser_homepages_filter_aboutpreferences.js": 3358,
- "browser/components/preferences/in-content/tests/browser_permissions_urlFieldHidden.js": 4320,
- "browser/components/preferences/in-content/tests/browser_privacypane_1.js": 13262,
- "browser/components/preferences/in-content/tests/browser_privacypane_3.js": 12449,
- "browser/components/preferences/in-content/tests/browser_privacypane_4.js": 21002,
- "browser/components/preferences/in-content/tests/browser_privacypane_5.js": 12584,
- "browser/components/preferences/in-content/tests/browser_privacypane_8.js": 12359,
- "browser/components/preferences/in-content/tests/browser_sanitizeOnShutdown_prefLocked.js": 4144,
- "browser/components/preferences/in-content/tests/browser_searchsuggestions.js": 3473,
- "browser/components/preferences/in-content/tests/browser_security.js": 16398,
- "browser/components/preferences/in-content/tests/browser_subdialogs.js": 9718,
+ "browser/components/preferences/in-content-new/tests/browser_advanced_siteData.js": 5809,
+ "browser/components/preferences/in-content-new/tests/browser_advanced_update.js": 4994,
+ "browser/components/preferences/in-content-new/tests/browser_basic_rebuild_fonts_test.js": 3402,
+ "browser/components/preferences/in-content-new/tests/browser_bug1020245_openPreferences_to_paneContent.js": 8840,
+ "browser/components/preferences/in-content-new/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.js": 3776,
+ "browser/components/preferences/in-content-new/tests/browser_bug731866.js": 4124,
+ "browser/components/preferences/in-content-new/tests/browser_connection_bug388287.js": 5029,
+ "browser/components/preferences/in-content-new/tests/browser_cookies_exceptions.js": 32201,
+ "browser/components/preferences/in-content-new/tests/browser_defaultbrowser_alwayscheck.js": 3689,
+ "browser/components/preferences/in-content-new/tests/browser_homepages_filter_aboutpreferences.js": 3358,
+ "browser/components/preferences/in-content-new/tests/browser_permissions_urlFieldHidden.js": 4320,
+ "browser/components/preferences/in-content-new/tests/browser_privacypane_1.js": 13262,
+ "browser/components/preferences/in-content-new/tests/browser_privacypane_3.js": 12449,
+ "browser/components/preferences/in-content-new/tests/browser_privacypane_4.js": 21002,
+ "browser/components/preferences/in-content-new/tests/browser_privacypane_5.js": 12584,
+ "browser/components/preferences/in-content-new/tests/browser_privacypane_8.js": 12359,
+ "browser/components/preferences/in-content-new/tests/browser_sanitizeOnShutdown_prefLocked.js": 4144,
+ "browser/components/preferences/in-content-new/tests/browser_searchsuggestions.js": 3473,
+ "browser/components/preferences/in-content-new/tests/browser_security.js": 16398,
+ "browser/components/preferences/in-content-new/tests/browser_subdialogs.js": 9718,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_DownloadLastDirWithCPS.js": 6766,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js": 5869,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_aboutHomeButtonAfterWindowClose.js": 4184,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_aboutSessionRestore.js": 4488,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_blobUrl.js": 4308,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_cache.js": 3564,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_certexceptionsui.js": 2834,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_concurrent.js": 8634,
@@ -850,9 +850,9 @@
"toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js": 3676,
"toolkit/mozapps/extensions/test/xpinstall/browser_concurrent_installs.js": 3441,
"toolkit/mozapps/extensions/test/xpinstall/browser_localfile.js": 3563,
"toolkit/mozapps/extensions/test/xpinstall/browser_localfile3.js": 2933,
"toolkit/mozapps/extensions/test/xpinstall/browser_localfile4.js": 3829,
"toolkit/mozapps/extensions/test/xpinstall/browser_signed_multiple.js": 2684,
"uriloader/exthandler/tests/mochitest/browser_web_protocol_handlers.js": 4533
}
-}
\ No newline at end of file
+}
--- a/testing/runtimes/mochitest-browser-chrome.runtimes.json
+++ b/testing/runtimes/mochitest-browser-chrome.runtimes.json
@@ -400,38 +400,38 @@
"browser/components/places/tests/browser/browser_forgetthissite_single.js": 2492,
"browser/components/places/tests/browser/browser_library_batch_delete.js": 2138,
"browser/components/places/tests/browser/browser_library_commands.js": 5823,
"browser/components/places/tests/browser/browser_library_infoBox.js": 2070,
"browser/components/places/tests/browser/browser_library_middleclick.js": 4660,
"browser/components/places/tests/browser/browser_library_views_liveupdate.js": 9015,
"browser/components/places/tests/browser/browser_sort_in_library.js": 2706,
"browser/components/places/tests/browser/browser_views_liveupdate.js": 4275,
- "browser/components/preferences/in-content/tests/browser_advanced_siteData.js": 4546,
- "browser/components/preferences/in-content/tests/browser_advanced_update.js": 3765,
- "browser/components/preferences/in-content/tests/browser_basic_rebuild_fonts_test.js": 2815,
- "browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js": 7119,
- "browser/components/preferences/in-content/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.js": 3072,
- "browser/components/preferences/in-content/tests/browser_bug731866.js": 3887,
- "browser/components/preferences/in-content/tests/browser_connection.js": 2059,
- "browser/components/preferences/in-content/tests/browser_connection_bug388287.js": 4792,
- "browser/components/preferences/in-content/tests/browser_cookies_exceptions.js": 24898,
- "browser/components/preferences/in-content/tests/browser_defaultbrowser_alwayscheck.js": 3312,
- "browser/components/preferences/in-content/tests/browser_homepages_filter_aboutpreferences.js": 2566,
- "browser/components/preferences/in-content/tests/browser_permissions_urlFieldHidden.js": 3240,
- "browser/components/preferences/in-content/tests/browser_privacypane_1.js": 12582,
- "browser/components/preferences/in-content/tests/browser_privacypane_3.js": 11813,
- "browser/components/preferences/in-content/tests/browser_privacypane_4.js": 19735,
- "browser/components/preferences/in-content/tests/browser_privacypane_5.js": 11639,
- "browser/components/preferences/in-content/tests/browser_privacypane_8.js": 11650,
- "browser/components/preferences/in-content/tests/browser_proxy_backup.js": 2184,
- "browser/components/preferences/in-content/tests/browser_sanitizeOnShutdown_prefLocked.js": 3107,
- "browser/components/preferences/in-content/tests/browser_searchsuggestions.js": 2438,
- "browser/components/preferences/in-content/tests/browser_security.js": 11804,
- "browser/components/preferences/in-content/tests/browser_subdialogs.js": 8790,
+ "browser/components/preferences/in-content-new/tests/browser_advanced_siteData.js": 4546,
+ "browser/components/preferences/in-content-new/tests/browser_advanced_update.js": 3765,
+ "browser/components/preferences/in-content-new/tests/browser_basic_rebuild_fonts_test.js": 2815,
+ "browser/components/preferences/in-content-new/tests/browser_bug1020245_openPreferences_to_paneContent.js": 7119,
+ "browser/components/preferences/in-content-new/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.js": 3072,
+ "browser/components/preferences/in-content-new/tests/browser_bug731866.js": 3887,
+ "browser/components/preferences/in-content-new/tests/browser_connection.js": 2059,
+ "browser/components/preferences/in-content-new/tests/browser_connection_bug388287.js": 4792,
+ "browser/components/preferences/in-content-new/tests/browser_cookies_exceptions.js": 24898,
+ "browser/components/preferences/in-content-new/tests/browser_defaultbrowser_alwayscheck.js": 3312,
+ "browser/components/preferences/in-content-new/tests/browser_homepages_filter_aboutpreferences.js": 2566,
+ "browser/components/preferences/in-content-new/tests/browser_permissions_urlFieldHidden.js": 3240,
+ "browser/components/preferences/in-content-new/tests/browser_privacypane_1.js": 12582,
+ "browser/components/preferences/in-content-new/tests/browser_privacypane_3.js": 11813,
+ "browser/components/preferences/in-content-new/tests/browser_privacypane_4.js": 19735,
+ "browser/components/preferences/in-content-new/tests/browser_privacypane_5.js": 11639,
+ "browser/components/preferences/in-content-new/tests/browser_privacypane_8.js": 11650,
+ "browser/components/preferences/in-content-new/tests/browser_proxy_backup.js": 2184,
+ "browser/components/preferences/in-content-new/tests/browser_sanitizeOnShutdown_prefLocked.js": 3107,
+ "browser/components/preferences/in-content-new/tests/browser_searchsuggestions.js": 2438,
+ "browser/components/preferences/in-content-new/tests/browser_security.js": 11804,
+ "browser/components/preferences/in-content-new/tests/browser_subdialogs.js": 8790,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_DownloadLastDirWithCPS.js": 6301,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js": 4713,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_aboutHomeButtonAfterWindowClose.js": 3379,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_aboutSessionRestore.js": 3345,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_blobUrl.js": 3606,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_cache.js": 2957,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_certexceptionsui.js": 2477,
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_concurrent.js": 7935,
@@ -849,9 +849,9 @@
"toolkit/mozapps/extensions/test/xpinstall/browser_auth4.js": 2193,
"toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js": 2663,
"toolkit/mozapps/extensions/test/xpinstall/browser_concurrent_installs.js": 2840,
"toolkit/mozapps/extensions/test/xpinstall/browser_httphash5.js": 1977,
"toolkit/mozapps/extensions/test/xpinstall/browser_httphash6.js": 2262,
"toolkit/mozapps/extensions/test/xpinstall/browser_signed_multiple.js": 2368,
"uriloader/exthandler/tests/mochitest/browser_web_protocol_handlers.js": 4136
}
-}
\ No newline at end of file
+}