diff --git a/browser/components/migration/content/aboutWelcomeBack.xhtml b/browser/components/migration/content/aboutWelcomeBack.xhtml index 0fa76d4d8713..e61a2b408e5d 100644 --- a/browser/components/migration/content/aboutWelcomeBack.xhtml +++ b/browser/components/migration/content/aboutWelcomeBack.xhtml @@ -52,6 +52,20 @@
+
+
+ + +
+ +
+ + +
+
+ aItem.checked)) { - // This should only be possible when we have no "cancel" button, and thus - // the "Restore session" button always remains enabled. In that case and - // when nothing is selected, we just want a new session. - startNewSession(); - return; - } + if (isTreeViewVisible()) { + if (!gTreeData.some(aItem => aItem.checked)) { + // This should only be possible when we have no "cancel" button, and thus + // the "Restore session" button always remains enabled. In that case and + // when nothing is selected, we just want a new session. + startNewSession(); + return; + } - // remove all unselected tabs from the state before restoring it - var ix = gStateObject.windows.length - 1; - for (var t = gTreeData.length - 1; t >= 0; t--) { - if (treeView.isContainer(t)) { - if (gTreeData[t].checked === 0) - // this window will be restored partially - gStateObject.windows[ix].tabs = - gStateObject.windows[ix].tabs.filter(function(aTabData, aIx) - gTreeData[t].tabs[aIx].checked); - else if (!gTreeData[t].checked) - // this window won't be restored at all - gStateObject.windows.splice(ix, 1); - ix--; + // remove all unselected tabs from the state before restoring it + var ix = gStateObject.windows.length - 1; + for (var t = gTreeData.length - 1; t >= 0; t--) { + if (treeView.isContainer(t)) { + if (gTreeData[t].checked === 0) + // this window will be restored partially + gStateObject.windows[ix].tabs = + gStateObject.windows[ix].tabs.filter(function(aTabData, aIx) + gTreeData[t].tabs[aIx].checked); + else if (!gTreeData[t].checked) + // this window won't be restored at all + gStateObject.windows.splice(ix, 1); + ix--; + } } } var stateString = JSON.stringify(gStateObject); diff --git a/browser/components/sessionstore/content/aboutSessionRestore.xhtml b/browser/components/sessionstore/content/aboutSessionRestore.xhtml index 6b22250d77d8..1281150b7ac1 100644 --- a/browser/components/sessionstore/content/aboutSessionRestore.xhtml +++ b/browser/components/sessionstore/content/aboutSessionRestore.xhtml @@ -57,7 +57,7 @@ + available="true" _window_label="&restorepage.windowLabel;"> diff --git a/browser/themes/shared/aboutWelcomeBack.css b/browser/themes/shared/aboutWelcomeBack.css index f38dda1881fd..dd79400b401a 100644 --- a/browser/themes/shared/aboutWelcomeBack.css +++ b/browser/themes/shared/aboutWelcomeBack.css @@ -4,4 +4,39 @@ #errorPageContainer { background-image: url("chrome://global/skin/icons/information-64.png"); + height: auto; +} + +/* tablist starts out hidden, but JS may make it visible in response to + clicks on the radio buttons by setting an "available" attribute. +*/ +#tabList { + display: none; +} + +#tabList[available] { + display: -moz-box; +} + +.radioRestoreContainer { + display: flex; +} + +.radioRestoreButton { + flex: 0 0 auto; +} + +.radioRestoreButton:-moz-focusring { + outline: 1px dotted black; +} + +.radioChooseLabel { + flex: 1 1 auto; +} + +/* We want errorTrailerDesc to have the same padding-top as errorShortDesc + has padding-bottom +*/ +#errorTrailerDesc { + padding-top: 1em; }