Skip to content

Commit

Permalink
127.0b5
Browse files Browse the repository at this point in the history
  • Loading branch information
bot committed May 23, 2024
1 parent 3eb48e8 commit 154d697
Show file tree
Hide file tree
Showing 56 changed files with 1,476 additions and 1,194 deletions.
2 changes: 1 addition & 1 deletion firefox-src-part/browser/app/profile/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -1695,7 +1695,7 @@ pref("browser.newtab.preload", true);

// Weather widget for newtab
pref("browser.newtabpage.activity-stream.system.showWeather", false);
pref("browser.newtabpage.activity-stream.showWeather", false);
pref("browser.newtabpage.activity-stream.showWeather", true);
pref("browser.newtabpage.activity-stream.weather.query", "");
pref("browser.newtabpage.activity-stream.weather.locationSearchEnabled", false);
pref("browser.newtabpage.activity-stream.weather.temperatureUnits", "f");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ export const INITIAL_STATE = {
Weather: {
// do we have the data from WeatherFeed yet?
initialized: false,
// stub out demo data while building the feature
suggestions: [],
lastUpdated: null,
},
Expand Down Expand Up @@ -867,9 +866,8 @@ function Weather(prevState = INITIAL_STATE.Weather, action) {
...prevState,
suggestions: action.data.suggestions,
lastUpdated: action.data.date,
initialized: true,
};
case at.WEATHER_INIT:
return { ...prevState, initialized: true };
default:
return prevState;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export class BaseContent extends React.PureComponent {
return (
<p
className={`wallpaper-attribution`}
key={name}
key={name.string}
data-l10n-id="newtab-wallpaper-attribution"
data-l10n-args={JSON.stringify({
author_string: name.string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class _Weather extends React.PureComponent {
// Check if weather should be rendered
const isWeatherEnabled = this.props.Prefs.values["system.showWeather"];

if (!isWeatherEnabled) {
if (!isWeatherEnabled || !this.props.Weather.initialized) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5665,7 +5665,6 @@ const INITIAL_STATE = {
Weather: {
// do we have the data from WeatherFeed yet?
initialized: false,
// stub out demo data while building the feature
suggestions: [],
lastUpdated: null,
},
Expand Down Expand Up @@ -6425,9 +6424,8 @@ function Weather(prevState = INITIAL_STATE.Weather, action) {
...prevState,
suggestions: action.data.suggestions,
lastUpdated: action.data.date,
initialized: true,
};
case actionTypes.WEATHER_INIT:
return { ...prevState, initialized: true };
default:
return prevState;
}
Expand Down Expand Up @@ -9668,7 +9666,7 @@ class _Weather extends (external_React_default()).PureComponent {
render() {
// Check if weather should be rendered
const isWeatherEnabled = this.props.Prefs.values["system.showWeather"];
if (!isWeatherEnabled) {
if (!isWeatherEnabled || !this.props.Weather.initialized) {
return false;
}
const {
Expand Down Expand Up @@ -9975,7 +9973,7 @@ class BaseContent extends (external_React_default()).PureComponent {
if (activeWallpaper && wallpaperList && name.url) {
return /*#__PURE__*/external_React_default().createElement("p", {
className: `wallpaper-attribution`,
key: name,
key: name.string,
"data-l10n-id": "newtab-wallpaper-attribution",
"data-l10n-args": JSON.stringify({
author_string: name.string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class WeatherFeed {
}

init() {
this.fetch();
this.fetch(true /* isStartup */);
}

stopFetching() {
Expand Down Expand Up @@ -84,7 +84,7 @@ export class WeatherFeed {
this.suggestions = suggestions ?? [];
}

async fetch() {
async fetch(isStartup = false) {
// Keep a handle on the `MerinoClient` instance that exists at the start of
// this fetch. If fetching stops or this `Weather` instance is uninitialized
// during the fetch, `#merino` will be nulled, and the fetch should stop. We
Expand All @@ -93,18 +93,21 @@ export class WeatherFeed {
await this.fetchHelper();

if (this.suggestions.length) {
this.update();
this.update(isStartup);
}
}

update() {
update(isStartup) {
this.store.dispatch(
ac.BroadcastToContent({
type: at.WEATHER_UPDATE,
data: {
suggestions: this.suggestions,
lastUpdated: this.lastUpdated,
},
meta: {
isStartup,
},
})
);
}
Expand Down Expand Up @@ -135,7 +138,8 @@ export class WeatherFeed {
if (action.data.name === "weather.query") {
await this.fetch();
} else if (
action.data.name === "showWeather" &&
(action.data.name === "showWeather" ||
action.data.name === "system.showWeather") &&
action.data.value &&
this.isEnabled()
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1224,14 +1224,19 @@ export var ScreenshotsUtils = {
* @param dataUrl The image data
* @param browser The current browser
* @param data Telemetry data
* @returns true if the download succeeds, otherwise false
*/
async downloadScreenshot(title, dataUrl, browser, data) {
// Guard against missing image data.
if (!dataUrl) {
return;
return false;
}

let filename = await getFilename(title, browser);
let { filename, accepted } = await getFilename(title, browser);

if (!accepted) {
return false;
}

const targetFile = new lazy.FileUtils.File(filename);

Expand Down Expand Up @@ -1259,6 +1264,8 @@ export var ScreenshotsUtils = {
new Blob([filename]).size
})`
);

return false;
}

let extra = await this.getActor(browser).sendQuery(
Expand All @@ -1274,6 +1281,8 @@ export var ScreenshotsUtils = {
SCREENSHOTS_LAST_SAVED_METHOD_PREF,
"download"
);

return true;
},

recordTelemetryEvent(type, object, args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ export async function getFilename(filenameTitle, browser) {
};
let accepted = await promiseTargetFile(fpParams, browser.ownerGlobal);
if (!accepted) {
return null;
return { filename: null, accepted };
}
filename = fpParams.file.path;
}
return filename;
return { filename, accepted: true };
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,16 @@ class ScreenshotsPreview extends MozLitElement {
}

/**
* Disable all the buttons. After a button click, we will always close the
* window so there is no need to re-enable the buttons.
* Enable all the buttons. This will only happen when the download button is
* clicked and the file picker is closed without saving the image.
*/
enableButtons() {
this.buttons.forEach(button => (button.disabled = false));
}

/**
* Disable all the buttons so they can't be clicked multiple times before
* successfully copying or downloading the image.
*/
disableButtons() {
this.buttons.forEach(button => (button.disabled = true));
Expand All @@ -176,13 +184,18 @@ class ScreenshotsPreview extends MozLitElement {

// Wait for the image to be loaded before we save it
let imageSrc = await this.imageLoadedPromise();
await lazy.ScreenshotsUtils.downloadScreenshot(
let downloadSucceeded = await lazy.ScreenshotsUtils.downloadScreenshot(
null,
imageSrc,
this.openerBrowser,
{ object: "preview_download" }
);
this.close();

if (downloadSucceeded) {
this.close();
} else {
this.enableButtons();
}
}

async saveToClipboard() {
Expand Down
9 changes: 9 additions & 0 deletions firefox-src-part/devtools/client/debugger/src/utils/source.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,15 @@ function resolveFileURL(
}

export function getFormattedSourceId(id) {
if (typeof id != "string") {
console.error(
"Expected source id to be a string, got",
typeof id,
" | id:",
id
);
return "";
}
return id.substring(id.lastIndexOf("/") + 1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ class Message extends Component {
JSON.stringify(
this.props.message,
function (key, value) {
if (key === "targetFront") {
return null;
}

// The message can hold one or multiple fronts that we need to serialize
if (value?.getGrip) {
return value.getGrip();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ class SourcesManager extends EventEmitter {
this._thread.threadLifetimePool.manage(actor);

this._sourceActors.set(source, actor);
if (this._sourcesByInternalSourceId && source.id) {
// source.id can be 0 for WASM sources
if (this._sourcesByInternalSourceId && Number.isInteger(source.id)) {
this._sourcesByInternalSourceId.set(source.id, source);
}

Expand Down Expand Up @@ -157,7 +158,8 @@ class SourcesManager extends EventEmitter {
if (!this._sourcesByInternalSourceId) {
this._sourcesByInternalSourceId = new Map();
for (const source of this._thread.dbg.findSources()) {
if (source.id) {
// source.id can be 0 for WASM sources
if (Number.isInteger(source.id)) {
this._sourcesByInternalSourceId.set(source.id, source);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,21 @@
<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_unknown_protocol_title">تانینمایان پروتکل</string>

<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_file_not_found_title">فایل تاپیلمادی</string>

<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_file_access_denied_title">فایلؽن ایشلدیلمه‌سینه ایجازه وئریلمه‌دی</string>

<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_proxy_connection_refused_title">پروکسی سرور باغلانتی‌نی رد ائتدی</string>

<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_unknown_proxy_host_title">پروکسی سرور تاپیلمادی</string>

<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_safe_browsing_malware_uri_title">ضرر وئریجی سایت سورونو</string>

<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_safe_browsing_unwanted_uri_title">ایستنمیه‌ن سایت سورونو</string>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@
<string name="mozac_browser_menu_extensions_manager">Merañ an askouezhioù</string>
<!-- Content description for the action bar "up" button -->
<string name="action_bar_up_description">Adpignat</string>
</resources>
<!-- Content description for the action bar "up" button of the add-ons sub menu item -->
<string name="mozac_browser_menu_addons_description" moz:removedIn="126" tools:ignore="UnusedResources">Enlugelladoù, pignat</string>
<!-- Content description for the action bar "up" button of the extensions sub menu item -->
<string name="mozac_browser_menu_extensions_content_description">Askouezhioù, pignat</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
<!-- Content description (not visible, for screen readers etc.): Indicates the overflow menu has a highlight -->
<string name="mozac_browser_menu_highlighted">Nabarmendua</string>
<!-- Label for add-ons submenu section -->
<string name="mozac_browser_menu_addons">Gehigarriak</string>
<string name="mozac_browser_menu_addons" moz:removedIn="126" tools:ignore="UnusedResources">Gehigarriak</string>
<!-- Label for extensions submenu section -->
<string name="mozac_browser_menu_extensions">Hedapenak</string>
<!-- Label for add-ons sub menu item for add-ons manager -->
<string name="mozac_browser_menu_addons_manager">Gehigarrien kudeatzailea</string>
<string name="mozac_browser_menu_addons_manager" moz:removedIn="126" tools:ignore="UnusedResources">Gehigarrien kudeatzailea</string>
<!-- Label for extensions sub menu item for extensions manager -->
<string name="mozac_browser_menu_extensions_manager">Hedapenen kudeatzailea</string>
<!-- Content description for the action bar "up" button -->
<string name="action_bar_up_description">Nabigatu gora</string>
<!-- Content description for the action bar "up" button of the add-ons sub menu item -->
<string name="mozac_browser_menu_addons_description">Gehigarriak, nabigatu gora</string>
</resources>
<string name="mozac_browser_menu_addons_description" moz:removedIn="126" tools:ignore="UnusedResources">Gehigarriak, nabigatu gora</string>
<!-- Content description for the action bar "up" button of the extensions sub menu item -->
<string name="mozac_browser_menu_extensions_content_description">Hedapenak, nabigatu gora</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<resources>
<!-- Content description (not visible, for screen readers etc.): Description for the overflow menu button in the browser toolbar. -->
<string name="mozac_browser_toolbar_menu_button">Meny</string>
<!-- Content description: For the clear URL text button. -->
<string name="mozac_clear_button_description">Tøm</string>
<!-- Content description: For the tracking protection toolbar icon, it is set when the site has tracking protection enabled, but none trackers have been blocked or detected. -->
<string name="mozac_browser_toolbar_content_description_tracking_protection_on_no_trackers_blocked">Sporingsbeskyttelse er på</string>
Expand All @@ -14,5 +15,5 @@
<!-- Announcement made by the screen reader when the progress bar is shown and a page is loading -->
<string name="mozac_browser_toolbar_progress_loading">Laster</string>
<!-- Content description: For the autoplay toolbar icon, it is set when the auto play permission is blocking content playing.-->
<string name="mozac_browser_toolbar_content_description_autoplay_blocked">Noe av innholdet er blokkert av autoavspillings-innstillingene </string>
<string name="mozac_browser_toolbar_content_description_autoplay_blocked">Noe av innholdet er blokkert av autoavspillings-innstillingene</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
<string name="mozac_browser_toolbar_menu_button">Lañser</string>
<!-- Content description: For the clear URL text button. -->
<string name="mozac_clear_button_description">Skarzhañ</string>
<!-- Content description: For the tracking protection toolbar icon, it is set when the site has tracking protection enabled, but none trackers have been blocked or detected. -->
<string name="mozac_browser_toolbar_content_description_tracking_protection_on_no_trackers_blocked">Gweredekaet eo ar gware heuliañ</string>
<!-- Content description: For the tracking protection toolbar icon, it is set when the site has tracking protection enabled, and trackers have been blocked or detected.-->
<string name="mozac_browser_toolbar_content_description_tracking_protection_on_trackers_blocked1">Stanket ez eus bet heulierien gant ar gwarez heuliañ</string>
<!-- Content description: For the tracking protection toolbar icon, it is set when the site has tracking protection disabled.-->
<string name="mozac_browser_toolbar_content_description_tracking_protection_off_for_a_site1">Diweredekaet eo bet ar gwarez heuliañ evit al lecʼhienn-mañ</string>
<!-- Content description: For the site security information icon (the site security icon).-->
<string name="mozac_browser_toolbar_content_description_site_info">Titouroù al lecʼhienn</string>
<!-- Announcement made by the screen reader when the progress bar is shown and a page is loading -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<resources>
<!-- Content description (not visible, for screen readers etc.): Description for the overflow menu button in the browser toolbar. -->
<string name="mozac_browser_toolbar_menu_button">Meni</string>
<!-- Content description: For the clear URL text button. -->
<string name="mozac_clear_button_description">Očisti</string>
<!-- Content description: For the tracking protection toolbar icon, it is set when the site has tracking protection enabled, but none trackers have been blocked or detected. -->
<string name="mozac_browser_toolbar_content_description_tracking_protection_on_no_trackers_blocked">Zaštita od praćenja uključena</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<resources>
<!-- Content description (not visible, for screen readers etc.): Description for the overflow menu button in the browser toolbar. -->
<string name="mozac_browser_toolbar_menu_button">Menua</string>
<!-- Content description: For the clear URL text button. -->
<string name="mozac_clear_button_description">Garbitu</string>
<!-- Content description: For the tracking protection toolbar icon, it is set when the site has tracking protection enabled, but none trackers have been blocked or detected. -->
<string name="mozac_browser_toolbar_content_description_tracking_protection_on_no_trackers_blocked">Jarraipenaren babesa gaituta dago</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,16 @@
<string name="mozac_browser_toolbar_menu_button">Meny</string>
<!-- Content description: For the clear URL text button. -->
<string name="mozac_clear_button_description">Tøm</string>
</resources>
<!-- Content description: For the tracking protection toolbar icon, it is set when the site has tracking protection enabled, but none trackers have been blocked or detected. -->
<string name="mozac_browser_toolbar_content_description_tracking_protection_on_no_trackers_blocked">Sporingsbeskyttelse er på</string>
<!-- Content description: For the tracking protection toolbar icon, it is set when the site has tracking protection enabled, and trackers have been blocked or detected.-->
<string name="mozac_browser_toolbar_content_description_tracking_protection_on_trackers_blocked1">Sporingsbeskyttelse har blokkert sporere</string>
<!-- Content description: For the tracking protection toolbar icon, it is set when the site has tracking protection disabled.-->
<string name="mozac_browser_toolbar_content_description_tracking_protection_off_for_a_site1">Sporingsbeskyttelse er slått av for dette nettstedet</string>
<!-- Content description: For the site security information icon (the site security icon).-->
<string name="mozac_browser_toolbar_content_description_site_info">Informasjon om nettstedet</string>
<!-- Announcement made by the screen reader when the progress bar is shown and a page is loading -->
<string name="mozac_browser_toolbar_progress_loading">Laster</string>
<!-- Content description: For the autoplay toolbar icon, it is set when the auto play permission is blocking content playing.-->
<string name="mozac_browser_toolbar_content_description_autoplay_blocked">Noe av innholdet er blokkert av autoavspillings-innstillingene</string>
</resources>
Loading

0 comments on commit 154d697

Please sign in to comment.