Skip to content

Commit

Permalink
134.0b9
Browse files Browse the repository at this point in the history
  • Loading branch information
bot committed Dec 12, 2024
1 parent 127a17b commit c032025
Show file tree
Hide file tree
Showing 188 changed files with 11,065 additions and 2,496 deletions.
4 changes: 2 additions & 2 deletions firefox-src-part/browser/actors/LinkHandlerChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ export class LinkHandlerChild extends JSWindowActorChild {
isRichIcon = true;
// fall through
case "icon":
if (iconAdded || link.hasAttribute("mask")) {
// Masked icons are not supported yet.
if (iconAdded || link.hasAttribute("color") || rel.includes("mask")) {
// TODO (Bug 1337397): Add support for mask-icon favicons.
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ main {
.only-search &,
.only-topsites & {
@media (min-width: $break-point-large) {
position: fixed;
position: absolute;
inset-block-end: var(--space-large);
inset-inline-start: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,9 @@
}

// Note this breakpoint doesn't use set the same default width (746px).
// The sections layout uses a different $break-point-layout-variant but not $break-point-large.
// This rule below maintains the topsites layout to stack two rows x four tiles
// The sections layout uses a different $break-point-layout-variant
// but not $break-point-large. This rule below maintains
// the topsites layout to stack two rows x four tiles
// when the sections grid changes to a two column layout
@media (min-width: $break-point-large) {
.ds-layout-topsites .hide-for-narrow {
Expand Down Expand Up @@ -253,6 +254,17 @@
}
}

.hide-for-narrow {
display: none;

@media (min-width: $break-point-large) {
display: none;
}

@media (min-width: $break-point-widest) {
display: inline-block;
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@

.logo-and-wordmark-wrapper {
margin-block-end: var(--space-xxlarge);

// Bug 1934636 - Logo is positioned absolutely and
// does not need a bottom margin applied
.layout-variant-b & {
margin-block-end: 0;
}
}

@media (height <=700px) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,17 @@ $glyph-forward: url('chrome://browser/skin/forward.svg');
}

.logo-and-wordmark {
position: fixed;
position: absolute;
inset-inline-start: 40px;
inset-block-start: 40px;

@media (min-width: $break-point-layout-variant) {
inset-inline-start: 20px;
}

@media (min-width: $break-point-large) {
inset-inline-start: 40px;
}
}

&.no-search {
Expand All @@ -187,6 +195,31 @@ $glyph-forward: url('chrome://browser/skin/forward.svg');
}
}

&.no-search.has-sections-grid {
.body-wrapper {
@media (min-width: $break-point-sections-variant) {
margin-block-start: 0;
}
}

.logo-and-wordmark {
inset-inline-start: 20px;

@media (min-width: $break-point-small) {
inset-inline-start: 40px;
}

@media (min-width: $break-point-layout-variant) {
inset-inline-start: 20px;
}

@media (min-width: $break-point-large) {
inset-inline-start: 40px;
}
}

}

.search-inner-wrapper {
width: 200px;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function LocationSearch({ outerClassName }) {
ref={inputRef}
list="merino-location-list"
type="text"
placeholder="Search location"
data-l10n-id="newtab-weather-change-location-search-input-placeholder"
onChange={handleChange}
value={userInput}
onKeyDown={handleKeyDown}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@
inset-block-start: 40px;
margin-block-start: 0;

@media (min-width: $break-point-layout-variant) {
inset-inline-end: 20px;
}

@media (min-width: $break-point-large) {
inset-inline-end: 40px;
}

.weatherSponsorText {
float: inline-end;

Expand All @@ -104,6 +112,23 @@
}
}

.no-search.layout-variant-b {
.weather {
inset-inline-end: 20px;

@media (min-width: $break-point-small) {
inset-inline-end: 40px;
}

@media (min-width: $break-point-layout-variant) {
inset-inline-end: 20px;
}

@media (min-width: $break-point-large) {
inset-inline-end: 40px;
}
}
}

// Edge case: users with weather enabled/search enabled
.has-weather.has-search {
Expand Down
87 changes: 85 additions & 2 deletions firefox-src-part/browser/components/newtab/css/activity-stream.css
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ main section {
}
@media (min-width: 866px) {
.no-search .no-sections .wallpaper-attribution, .only-search .wallpaper-attribution, .only-topsites .wallpaper-attribution {
position: fixed;
position: absolute;
inset-block-end: var(--space-large);
inset-inline-start: 0;
}
Expand Down Expand Up @@ -1588,10 +1588,20 @@ main section {
margin-block-start: 16px;
}
.layout-variant-b.has-recommended-stories .logo-and-wordmark {
position: fixed;
position: absolute;
inset-inline-start: 40px;
inset-block-start: 40px;
}
@media (min-width: 724px) {
.layout-variant-b.has-recommended-stories .logo-and-wordmark {
inset-inline-start: 20px;
}
}
@media (min-width: 866px) {
.layout-variant-b.has-recommended-stories .logo-and-wordmark {
inset-inline-start: 40px;
}
}
.layout-variant-b.has-recommended-stories.no-search .body-wrapper {
margin-block-start: 0;
}
Expand All @@ -1605,6 +1615,29 @@ main section {
margin-block-start: 0;
}
}
@media (min-width: 1390px) {
.layout-variant-b.has-recommended-stories.no-search.has-sections-grid .body-wrapper {
margin-block-start: 0;
}
}
.layout-variant-b.has-recommended-stories.no-search.has-sections-grid .logo-and-wordmark {
inset-inline-start: 20px;
}
@media (min-width: 510px) {
.layout-variant-b.has-recommended-stories.no-search.has-sections-grid .logo-and-wordmark {
inset-inline-start: 40px;
}
}
@media (min-width: 724px) {
.layout-variant-b.has-recommended-stories.no-search.has-sections-grid .logo-and-wordmark {
inset-inline-start: 20px;
}
}
@media (min-width: 866px) {
.layout-variant-b.has-recommended-stories.no-search.has-sections-grid .logo-and-wordmark {
inset-inline-start: 40px;
}
}
.layout-variant-b.has-recommended-stories .search-inner-wrapper {
width: 200px;
}
Expand Down Expand Up @@ -2477,6 +2510,18 @@ main section {
inset-block-start: 40px;
margin-block-start: 0;
}
@media (min-width: 724px) {
.no-search.layout-variant-b .weather,
.layout-variant-b .weather {
inset-inline-end: 20px;
}
}
@media (min-width: 866px) {
.no-search.layout-variant-b .weather,
.layout-variant-b .weather {
inset-inline-end: 40px;
}
}
.no-search.layout-variant-b .weather .weatherSponsorText,
.layout-variant-b .weather .weatherSponsorText {
float: inline-end;
Expand All @@ -2492,6 +2537,25 @@ main section {
margin-inline-end: 5px;
}

.no-search.layout-variant-b .weather {
inset-inline-end: 20px;
}
@media (min-width: 510px) {
.no-search.layout-variant-b .weather {
inset-inline-end: 40px;
}
}
@media (min-width: 724px) {
.no-search.layout-variant-b .weather {
inset-inline-end: 20px;
}
}
@media (min-width: 866px) {
.no-search.layout-variant-b .weather {
inset-inline-end: 40px;
}
}

.has-weather.has-search .outer-wrapper:not(.only-search) {
padding-top: 0;
}
Expand Down Expand Up @@ -4465,6 +4529,22 @@ main section {
width: 1311px;
}
}
.has-sections-grid.layout-variant-a .ds-outer-wrapper-breakpoint-override .ds-layout-topsites .hide-for-narrow,
.has-sections-grid.layout-variant-b .ds-outer-wrapper-breakpoint-override .ds-layout-topsites .hide-for-narrow {
display: none;
}
@media (min-width: 866px) {
.has-sections-grid.layout-variant-a .ds-outer-wrapper-breakpoint-override .ds-layout-topsites .hide-for-narrow,
.has-sections-grid.layout-variant-b .ds-outer-wrapper-breakpoint-override .ds-layout-topsites .hide-for-narrow {
display: none;
}
}
@media (min-width: 1122px) {
.has-sections-grid.layout-variant-a .ds-outer-wrapper-breakpoint-override .ds-layout-topsites .hide-for-narrow,
.has-sections-grid.layout-variant-b .ds-outer-wrapper-breakpoint-override .ds-layout-topsites .hide-for-narrow {
display: inline-block;
}
}

.has-sections-grid .ds-outer-wrapper-breakpoint-override main {
width: auto;
Expand Down Expand Up @@ -6547,6 +6627,9 @@ main section {
.thumbs-ui-compact .search-wrapper .logo-and-wordmark-wrapper {
margin-block-end: var(--space-xxlarge);
}
.layout-variant-b .thumbs-ui-compact .search-wrapper .logo-and-wordmark-wrapper {
margin-block-end: 0;
}
@media (height <= 700px) {
.thumbs-ui-compact .search-wrapper {
padding: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11078,7 +11078,7 @@ function LocationSearch({
ref: inputRef,
list: "merino-location-list",
type: "text",
placeholder: "Search location",
"data-l10n-id": "newtab-weather-change-location-search-input-placeholder",
onChange: handleChange,
value: userInput,
onKeyDown: handleKeyDown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,17 +372,18 @@ class _MLSuggest {
}

// Remove the city and state values from the query
let locValues = Object.values(location).filter(v => !!v);
let locValues = Object.values(location)
.map(loc => loc?.replace(/\W+/g, " "))
.filter(loc => loc?.trim());

// Regular expression to remove locations
// This handles single & multi-worded cities/states
let locPattern = locValues
.map(loc => `\\b${loc.replace(/[-/\\^$*+?.()|[\]{}]'/g, "\\$&")}\\b`)
.join("|");
let locPattern = locValues.map(loc => `\\b${loc}\\b`).join("|");
let locRegex = new RegExp(locPattern, "g");

// Remove locations, trim whitespace, and split words
let words = query
.replace(/\W+/g, " ")
.replace(locRegex, "")
.split(/\W+/)
.filter(word => !!word.length);
Expand Down
12 changes: 7 additions & 5 deletions firefox-src-part/browser/modules/SiteDataManager.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,9 @@ export var SiteDataManager = {
},

/**
* Removes all site data for the specified list of domains and hosts.
* This includes site data of subdomains belonging to the domains or hosts and
* partitioned storage. Data is cleared per storage jar, which means if we
* Removes all site data and caches for the specified list of domains and
* hosts. This includes data of subdomains belonging to the domains or hosts
* and partitioned storage. Data is cleared per storage jar, which means if we
* clear "example.com", we will also clear third parties embedded on
* "example.com". Additionally we will clear all data of "example.com" (as a
* third party) from other jars.
Expand Down Expand Up @@ -538,13 +538,15 @@ export var SiteDataManager = {
schemelessSite,
{},
true,
Ci.nsIClearDataService.CLEAR_COOKIES_AND_SITE_DATA,
Ci.nsIClearDataService.CLEAR_COOKIES_AND_SITE_DATA |
Ci.nsIClearDataService.CLEAR_ALL_CACHES,
resolve
);
} else {
clearData.deleteDataFromLocalFiles(
true,
Ci.nsIClearDataService.CLEAR_COOKIES_AND_SITE_DATA,
Ci.nsIClearDataService.CLEAR_COOKIES_AND_SITE_DATA |
Ci.nsIClearDataService.CLEAR_ALL_CACHES,
resolve
);
}
Expand Down
1 change: 0 additions & 1 deletion firefox-src-part/devtools/client/preferences/debugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,4 @@ pref("devtools.debugger.features.map-expression-bindings", true);
pref("devtools.debugger.features.log-points", true);
pref("devtools.debugger.features.inline-preview", true);
pref("devtools.debugger.features.javascript-tracing", false);
pref("devtools.debugger.features.codemirror-next", true);
pref("devtools.debugger.features.overlay", true);
Loading

0 comments on commit c032025

Please sign in to comment.