Bug 1390174 - Expand the home page and when Firefox starts prefs r?dao
MozReview-Commit-ID: 3HlabfuSkpQ
--- a/browser/components/preferences/in-content-new/main.js
+++ b/browser/components/preferences/in-content-new/main.js
@@ -762,26 +762,26 @@ var gMainPane = {
/**
* Hide/show the "Show my windows and tabs from last time" option based
* on the value of the browser.privatebrowsing.autostart pref.
*/
updateBrowserStartupLastSession() {
let pbAutoStartPref = document.getElementById("browser.privatebrowsing.autostart");
let startupPref = document.getElementById("browser.startup.page");
- let menu = document.getElementById("browserStartupPage");
+ let group = document.getElementById("browserStartupPage");
let option = document.getElementById("browserStartupLastSession");
if (pbAutoStartPref.value) {
option.setAttribute("disabled", "true");
if (option.selected) {
- menu.selectedItem = document.getElementById("browserStartupHomePage");
+ group.selectedItem = document.getElementById("browserStartupHomePage");
}
} else {
option.removeAttribute("disabled");
- startupPref.updateElements(); // select the correct index in the startup menulist
+ startupPref.updateElements(); // select the correct radio in the startup group
}
},
// TABS
/*
* Preferences:
*
--- a/browser/components/preferences/in-content-new/main.xul
+++ b/browser/components/preferences/in-content-new/main.xul
@@ -316,84 +316,77 @@
label="&setAsMyDefaultBrowser3.label;" accesskey="&setAsMyDefaultBrowser3.accesskey;"
preference="pref.general.disable_button.default_browser"/>
</hbox>
<hbox align="center" class="indent">
<image class="face-smile"/>
<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 class="tableGroup">
- <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 class="tableSubGroup">
- <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"
- searchkeywords="&selectBookmark.title; &selectBookmark.label;"/>
- <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>
+ <vbox id="startupPageBox">
+ <label accesskey="&startupPage2.accesskey;"
+ control="browserStartupPage">&startupPage2.label;</label>
+ <radiogroup id="browserStartupPage"
+ preference="browser.startup.page">
+ <radio label="&startupUserHomePage.label;"
+ value="1"
+ id="browserStartupHomePage"/>
+ <radio label="&startupBlankPage.label;"
+ value="0"
+ id="browserStartupBlank"/>
+ <radio label="&startupPrevSession.label;"
+ value="3"
+ id="browserStartupLastSession"/>
+ </radiogroup>
+ </vbox>
+</groupbox>
+
+<!-- Home Page -->
+<groupbox id="homepageGroup"
+ data-category="paneGeneral"
+ hidden="true">
+ <caption><label>&homepage2.label;</label></caption>
+
+ <vbox>
+ <textbox id="browserHomePage"
+ class="uri-element"
+ type="autocomplete"
+ autocompletesearch="unifiedcomplete"
+ onsyncfrompreference="return gMainPane.syncFromHomePref();"
+ onsynctopreference="return gMainPane.syncToHomePref(this.value);"
+ placeholder="&abouthome.pageTitle;"
+ preference="browser.startup.homepage"/>
+ </vbox>
+
+ <hbox class="homepage-buttons">
+ <button id="useCurrent"
+ flex="1"
+ class="homepage-button"
+ label=""
+ accesskey="&useCurrentPage.accesskey;"
+ label1="&useCurrentPage.label;"
+ label2="&useMultiple.label;"
+ preference="pref.browser.homepage.disable_button.current_page"/>
+ <button id="useBookmark"
+ flex="1"
+ class="homepage-button"
+ label="&chooseBookmark.label;"
+ accesskey="&chooseBookmark.accesskey;"
+ preference="pref.browser.homepage.disable_button.bookmark_page"
+ searchkeywords="&selectBookmark.title; &selectBookmark.label;"/>
+ <button id="restoreDefaultHomePage"
+ flex="1"
+ class="homepage-button"
+ label="&restoreDefault.label;"
+ accesskey="&restoreDefault.accesskey;"
+ preference="pref.browser.homepage.disable_button.restore_default"/>
+ </hbox>
</groupbox>
<!-- Tab preferences -->
<groupbox data-category="paneGeneral"
hidden="true">
<caption><label>&tabsGroup.label;</label></caption>
<checkbox id="ctrlTabRecentlyUsedOrder" label="&ctrlTabRecentlyUsedOrder.label;"
--- a/browser/components/preferences/in-content-new/tests/browser_search_subdialogs_within_preferences_1.js
+++ b/browser/components/preferences/in-content-new/tests/browser_search_subdialogs_within_preferences_1.js
@@ -7,17 +7,17 @@ add_task(async function() {
await SpecialPowers.pushPrefEnv({"set": [["browser.preferences.search", true]]});
});
/**
* Test for searching for the "Set Home Page" subdialog.
*/
add_task(async function() {
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
- await evaluateSearchResults("Set Home Page", "startupGroup");
+ await evaluateSearchResults("Set Home Page", "homepageGroup");
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
});
/**
* Test for searching for the "Languages" subdialog.
*/
add_task(async function() {
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
--- a/browser/components/preferences/in-content-new/tests/browser_search_within_preferences_1.js
+++ b/browser/components/preferences/in-content-new/tests/browser_search_within_preferences_1.js
@@ -125,16 +125,17 @@ add_task(async function() {
}
await searchCompletedPromise;
// Checks if back to generalPane
for (let i = 0; i < mainPrefTag.childElementCount; i++) {
let child = mainPrefTag.children[i]
if (child.id == "paneGeneral"
|| child.id == "startupGroup"
+ || child.id == "homepageGroup"
|| child.id == "languagesGroup"
|| child.id == "fontsGroup"
|| child.id == "downloadsGroup"
|| child.id == "applicationsGroup"
|| child.id == "drmGroup"
|| child.id == "updateApp"
|| child.id == "browsingGroup"
|| child.id == "performanceGroup"
--- a/browser/themes/shared/incontentprefs/preferences.inc.css
+++ b/browser/themes/shared/incontentprefs/preferences.inc.css
@@ -149,70 +149,31 @@ separator.thin:not([orient="vertical"])
justify-content: space-between;
}
.header[hidden=true] {
display: none;
}
/* General Pane */
-
-#startupGroup {
- margin-top: 0px !important;
-}
-
-#startupTable {
- margin-top: 32px;
- margin-inline-end: -4px;
- border-collapse: collapse;
-}
-
-#startupTable > tr > td {
- padding: 0; /* remove the padding from html.css */
-}
-
-#startupTable > .tableGroup > td {
+#startupPageBox {
padding-top: 32px;
}
-#startupTable > .tableSubGroup > td {
- padding-top: 8px;
-}
-
-#startupTable > tr > .label-cell {
- text-align: end;
- width: 0; /* make the column as small as possible */
-}
-
-#startupTable > tr > .content-cell:not(:first-child) {
- padding-inline-start: 8px;
-}
-
-#startupTable > tr > .label-cell > label {
- white-space: nowrap;
+#browserHomePage {
+ margin-inline-start: 0;
+ margin-inline-end: 0;
}
-#startupTable > tr > .content-cell > menulist,
-#startupTable > tr > .content-cell > textbox {
- width: calc(100% - 8px);
- margin-left: 4px;
- margin-right: 4px;
+.homepage-button:first-of-type {
+ margin-inline-start: 0;
}
-#startupTable > tr > .homepage-buttons {
- display: flex;
- flex-wrap: wrap;
-}
-
-#startupTable > tr > .homepage-buttons > .content-cell-item {
- flex-grow: 1;
-}
-
-.content-cell-item {
- margin: 2px 4px;
+.homepage-button:last-of-type {
+ margin-inline-end: 0;
}
#getStarted {
font-size: 90%;
}
#isNotDefaultLabel,
#signedOutAccountBoxTitle {