Skip to content

Commit

Permalink
merge mozilla-central to mozilla-inbound on a CLOSED TREE. r=merge a=…
Browse files Browse the repository at this point in the history
…merge on a CLOSED TREE
  • Loading branch information
Archaeopteryx committed Oct 8, 2017
2 parents e7f32cc + 1033bfa commit b76b8d0
Show file tree
Hide file tree
Showing 110 changed files with 23,810 additions and 22,726 deletions.
211 changes: 101 additions & 110 deletions browser/base/content/abouthome/aboutHome.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
html {
font: message-box;
font-size: 100%;
background-color: hsl(0,0%,95%);
color: #000;
background-color: #F9F9FA;
color: #0C0C0D;
height: 100%;
}

Expand Down Expand Up @@ -37,127 +37,91 @@ a {

#topSection {
text-align: center;
margin-top: -90px;
position: relative;
}

#brandLogo {
height: 192px;
width: 192px;
margin: 22px auto 31px;
margin: 0 auto 20px;
background-image: url("chrome://branding/content/about-logo.png");
background-size: 192px auto;
background-position: center center;
background-repeat: no-repeat;
}

#searchIconAndTextContainer,
#searchWrapper,
#snippets {
width: 470px;
}

#searchIconAndTextContainer {
display: -moz-box;
height: 36px;
#searchWrapper {
cursor: default;
display: flex;
position: relative;
}

#searchIcon {
border: 1px transparent;
padding: 0;
margin: 0;
width: 36px;
margin: 0 auto;
height: 36px;
background: url("chrome://browser/skin/search-indicator-magnifying-glass.svg") center center no-repeat;
position: absolute;
}

#searchText {
margin-left: 0;
-moz-box-flex: 1;
padding-top: 6px;
padding-bottom: 6px;
padding-inline-start: 34px;
padding-inline-end: 8px;
background: hsla(0,0%,100%,.9) padding-box;
border: 1px solid;
border-radius: 2px 0 0 2px;
border-color: hsla(210,54%,20%,.15) hsla(210,54%,20%,.17) hsla(210,54%,20%,.2);
box-shadow: 0 1px 0 hsla(210,65%,9%,.02) inset,
0 0 2px hsla(210,65%,9%,.1) inset,
0 1px 0 hsla(0,0%,100%,.2);
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 3px;
box-shadow: 0 1px 4px 0 rgba(12, 12, 13, 0.1);
color: inherit;
unicode-bidi: plaintext;
}

#searchText:dir(rtl) {
border-radius: 0 2px 2px 0;
}

#searchText[aria-expanded="true"] {
border-radius: 2px 0 0 0;
padding: 0;
padding-inline-end: 36px;
padding-inline-start: 35px;
width: 100%;
font-size: 15px;
}

#searchText[aria-expanded="true"]:dir(rtl) {
border-radius: 0 2px 0 0;
#searchText:active,
#searchText:focus {
border-color: #0A84FF;
box-shadow: 0 0 0 2px #0A84FF;
}

#searchText[keepfocus],
#searchText:focus,
#searchText[autofocus] {
border-color: hsla(206,100%,60%,.6) hsla(206,76%,52%,.6) hsla(204,100%,40%,.6);
#searchIcon {
background: url("chrome://browser/skin/search-glass.svg") no-repeat 12px center/16px;
fill: rgba(12, 12, 13, 0.4);
-moz-context-properties: fill;
position: absolute;
offset-inline-start: 0;
height: 35px;
width: 35px;
}

#searchSubmit {
margin-inline-start: -1px;
color: transparent;
background: url("chrome://browser/skin/search-arrow-go.svg") center center no-repeat, linear-gradient(hsla(0,0%,100%,.8), hsla(0,0%,100%,.1)) padding-box;
background: url("chrome://browser/skin/forward.svg") no-repeat center center;
border-radius: 0 3px 3px 0;
border: 0;
width: 36px;
fill: rgba(12, 12, 13, 0.4);
-moz-context-properties: fill;
fill: #616366;
padding: 0;
border: 1px solid;
border-color: hsla(210,54%,20%,.15) hsla(210,54%,20%,.17) hsla(210,54%,20%,.2) transparent;
border-radius: 0 2px 2px 0;
box-shadow: 0 0 2px hsla(0,0%,100%,.5) inset,
0 1px 0 hsla(0,0%,100%,.2);
cursor: pointer;
transition-property: background-color, border-color, box-shadow;
transition-duration: 150ms;
width: 50px;
}

#searchSubmit:dir(rtl) {
transform: scaleX(-1);
background-size: 16px 16px;
height: 100%;
offset-inline-end: 0;
position: absolute;
color: transparent;
}

#searchText:focus + #searchSubmit,
#searchText[keepfocus] + #searchSubmit,
#searchText + #searchSubmit:hover,
#searchText[autofocus] + #searchSubmit {
border-color: #59b5fc #45a3e7 #3294d5;
#searchSubmit:focus, #searchSubmit:hover {
background-color: rgba(12, 12, 13, 0.1);
cursor: pointer;
}

#searchText:focus + #searchSubmit,
#searchText[keepfocus] + #searchSubmit,
#searchText[autofocus] + #searchSubmit {
background-image: url("chrome://browser/skin/search-arrow-go.svg"), linear-gradient(#4cb1ff, #1793e5);
fill: white;
box-shadow: 0 1px 0 hsla(0,0%,100%,.2) inset,
0 0 0 1px hsla(0,0%,100%,.1) inset,
0 1px 0 hsla(210,54%,20%,.03);
#searchSubmit:active {
background-color: rgba(12, 12, 13, 0.15);
}

#searchText + #searchSubmit:hover {
background-image: url("chrome://browser/skin/search-arrow-go.svg"), linear-gradient(#66bdff, #0d9eff);
fill: white;
box-shadow: 0 1px 0 hsla(0,0%,100%,.2) inset,
0 0 0 1px hsla(0,0%,100%,.1) inset,
0 1px 0 hsla(210,54%,20%,.03),
0 0 4px hsla(206,100%,20%,.2);
#searchSubmit:dir(rtl) {
transform: scaleX(-1);
}

#searchText + #searchSubmit:hover:active {
box-shadow: 0 1px 1px hsla(211,79%,6%,.1) inset,
0 0 1px hsla(211,79%,6%,.2) inset;
transition-duration: 0ms;
.contentSearchSuggestionTable {
border: 0;
transform: translateY(2px);
}

#defaultSnippet1,
Expand Down Expand Up @@ -203,7 +167,7 @@ a {
}

#launcher {
display: -moz-box;
display: none;
-moz-box-align: center;
-moz-box-pack: center;
width: 100%;
Expand All @@ -215,7 +179,7 @@ a {

#launcher:not([session]),
body[narrow] #launcher[session] {
display: block; /* display separator and restore button on separate lines */
display: none; /* display separator and restore button on separate lines */
text-align: center;
white-space: nowrap; /* prevent navigational buttons from wrapping */
}
Expand Down Expand Up @@ -346,28 +310,6 @@ body[narrow] #restorePreviousSession::before {
width: 32px;
}

#aboutMozilla {
display: block;
position: relative; /* pin wordmark to edge of document, not of viewport */
-moz-box-ordinal-group: 0;
opacity: .2;
transition: opacity 150ms;
}

#aboutMozilla:hover {
opacity: .6;
}

#aboutMozilla::before {
content: url("chrome://browser/content/abouthome/mozilla.svg");
display: block;
position: absolute;
top: 12px;
offset-inline-end: 12px;
width: 67px;
height: 19px;
}

/* [HiDPI]
* At resolutions above 1dppx, prefer downscaling the 2x Retina graphics
* rather than upscaling the original-size ones (bug 818940).
Expand Down Expand Up @@ -437,3 +379,52 @@ body[narrow] #restorePreviousSession::before {
transform-origin: top center;
}
}

/* Overrides for onboarding
These overrides hide the Firefox logo (since about:home has a
large logo already) and make the helper icon larger */

#about-home #onboarding-notification-body,
#about-home #onboarding-notification-tour-title {
color: #0C0C0D;
}

#about-home #onboarding-notification-body {
padding-inline-start: 46px;
}

#about-home #onboarding-notification-tour-message {
margin-bottom: 0;
}

#about-home #onboarding-notification-tour-icon {
display: none;
}

#about-home #onboarding-notification-tour-title::before {
display: block;
position: absolute;
top: 0;
offset-inline-start: 0;
height: 100%;
width: 42px;
background-size: 42px;
background-position: center;
-moz-context-properties: fill;
fill: #4A4A4F;
}

#about-home #onboarding-notification-bar {
z-index: 100;
}

/* Overrides for snippets
These changes make it so that snippets do not affect the height of the
main element, so that elements don't move around on page load. */
#snippetContainer {
position: absolute;
left: 50%;
top: 100%;
margin-left: -235px;
width: 470px;
}
1 change: 0 additions & 1 deletion browser/base/content/abouthome/aboutHome.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ window.addEventListener("pageshow", function() {
// Delay search engine setup, cause browser.js::BrowserOnAboutPageLoad runs
// later and may use asynchronous getters.
window.gObserver.observe(document.documentElement, { attributes: true });
window.gObserver.observe(document.getElementById("launcher"), { attributes: true });
fitToWidth();
setupSearch();
window.addEventListener("resize", fitToWidth);
Expand Down
7 changes: 2 additions & 5 deletions browser/base/content/abouthome/aboutHome.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
src="chrome://browser/content/contentSearchUI.js"/>
</head>

<body dir="&locale.dir;">
<body id="about-home" dir="&locale.dir;">
<div class="spacer"/>
<div id="topSection">
<div id="brandLogo"></div>

<div id="searchIconAndTextContainer">
<div id="searchWrapper">
<div id="searchIcon"/>
<input type="text" name="q" value="" id="searchText" maxlength="256"
placeholder="&searchInput.placeholder;"
Expand Down Expand Up @@ -73,8 +73,5 @@
<div id="restorePreviousSessionSeparator"/>
<button class="launchButton" id="restorePreviousSession">&historyRestoreLastSession.label;</button>
</div>

<a id="aboutMozilla" href="https://www.mozilla.org/about/?utm_source=about-home&amp;utm_medium=Referral"
aria-label="&abouthome.aboutMozilla.label;"/>
</body>
</html>
3 changes: 0 additions & 3 deletions browser/base/content/abouthome/mozilla.svg

This file was deleted.

7 changes: 5 additions & 2 deletions browser/base/content/test/about/browser_aboutHome_input.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ add_task(async function setup() {
]});
});

// The following two tests need to be skipped for the time being, since we're
// no longer showing the launcher options on about:home. When we remove about:home
// and all of it's code, we can delete these tests
add_task(async function() {
info("Pressing Space while the Addons button is focused should activate it");

Expand All @@ -37,7 +40,7 @@ add_task(async function() {
is(browser.currentURI.spec, "about:addons",
"Should have seen the about:addons tab");
});
});
}).skip();

add_task(async function() {
info("Sync button should open about:preferences#sync");
Expand All @@ -59,7 +62,7 @@ add_task(async function() {
is(result.params.urlParams.entrypoint, "abouthome",
"openPreferences should be called with abouthome entrypoint");
});
});
}).skip();

add_task(async function() {
info("Pressing any key should focus the search box in the page, and send the key to it");
Expand Down
1 change: 1 addition & 0 deletions browser/base/content/test/urlbar/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ support-files =
[browser_urlbar_locationchange_urlbar_edit_dos.js]
support-files =
file_urlbar_edit_dos.html
[browser_urlbar_remove_match.js]
[browser_urlbar_searchsettings.js]
[browser_urlbar_search_speculative_connect.js]
[browser_urlbar_search_speculative_connect_engine.js]
Expand Down
28 changes: 28 additions & 0 deletions browser/base/content/test/urlbar/browser_urlbar_remove_match.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* eslint-disable mozilla/no-arbitrary-setTimeout */
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */

add_task(async function test_remove_history() {
const TEST_URL = "http://remove.me/from_urlbar/";
await PlacesTestUtils.addVisits(TEST_URL);

registerCleanupFunction(async function() {
await PlacesUtils.history.clear();
});

let promiseVisitRemoved = PlacesTestUtils.waitForNotification(
"onDeleteURI", uri => uri.spec == TEST_URL, "history");
await promiseAutocompleteResultPopup("remove.me/from_urlbar");
await BrowserTestUtils.waitForCondition(
() => gURLBar.popup.richlistbox.children.length > 1 &&
gURLBar.popup.richlistbox.children[1].getAttribute("ac-value") == TEST_URL,
"Waiting for the result to appear");
EventUtils.synthesizeKey("VK_DOWN", {});
Assert.equal(gURLBar.popup.richlistbox.selectedIndex, 1);
let options = AppConstants.platform == "macosx" ? { shiftKey: true } : {};
EventUtils.synthesizeKey("VK_DELETE", options);
await promiseVisitRemoved;
await BrowserTestUtils.waitForCondition(
() => !gURLBar.popup.richlistbox.children.some(c => !c.collapsed && c.getAttribute("ac-value") == TEST_URL),
"Waiting for the result to disappear");
});
1 change: 0 additions & 1 deletion browser/base/jar.mn
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ browser.jar:
content/browser/abouthome/settings.png (content/abouthome/settings.png)
content/browser/abouthome/restore.png (content/abouthome/restore.png)
content/browser/abouthome/restore-large.png (content/abouthome/restore-large.png)
content/browser/abouthome/mozilla.svg (content/abouthome/mozilla.svg)
content/browser/abouthome/[email protected] (content/abouthome/[email protected])
content/browser/abouthome/[email protected] (content/abouthome/[email protected])
content/browser/abouthome/[email protected] (content/abouthome/[email protected])
Expand Down
Loading

0 comments on commit b76b8d0

Please sign in to comment.