Skip to content

Commit

Permalink
132.0b2
Browse files Browse the repository at this point in the history
  • Loading branch information
bot committed Oct 3, 2024
1 parent f79d636 commit 8e7b249
Show file tree
Hide file tree
Showing 892 changed files with 99,671 additions and 60,500 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ interface nsIAccessibilityService : nsISupports
*/
nsIAccessible getAccessibleFromCache(in Node aNode);

/**
* Set the active cache domains. If any given domains are not currently
* active, then the accessibility service will enable them in all content
* processes, causing them to be cached.
*
* @param aCacheDomains [in] the cache domains to set
*/
void setCacheDomains(in unsigned long long aCacheDomains);

/**
* Create a new pivot for tracking a position and traversing a subtree.
*
Expand Down
2 changes: 0 additions & 2 deletions firefox-src-part/browser/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,5 @@ module.exports = {

// Disallow adding to native types
"no-extend-native": "error",

"no-shadow": "error",
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class AboutPrivateBrowsingChild extends RemotePageChild {
featureId: "pbNewtab",
});
if (experiment) {
Services.telemetry.recordEvent("aboutprivatebrowsing", "click", source);
Glean.aboutprivatebrowsing["click" + source].record();
}
return experiment;
}
Expand Down
12 changes: 3 additions & 9 deletions firefox-src-part/browser/actors/AboutProtectionsChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ export class AboutProtectionsChild extends RemotePageChild {
actorCreated() {
super.actorCreated();

this.exportFunctions(["RPMRecordTelemetryEvent"]);
this.exportFunctions(["RPMRecordGleanEvent"]);
}

RPMRecordTelemetryEvent(category, event, object, value, extra) {
return Services.telemetry.recordEvent(
category,
event,
object,
value,
extra
);
RPMRecordGleanEvent(category, name, extra) {
Glean[category]?.[name]?.record(extra);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ export class AboutProtectionsParent extends JSWindowActorParent {
switch (aMessage.name) {
case "OpenAboutLogins":
lazy.LoginHelper.openPasswordManager(win, {
entryPoint: "aboutprotections",
entryPoint: "Aboutprotections",
});
break;
case "OpenContentBlockingPreferences":
Expand Down
3 changes: 1 addition & 2 deletions firefox-src-part/browser/actors/ContextMenuChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class ContextMenuChild extends JSWindowActorChild {
"MozTogglePictureInPicture",
{
bubbles: true,
detail: { reason: "contextMenu" },
detail: { reason: "ContextMenu" },
},
this.contentWindow
);
Expand Down Expand Up @@ -943,7 +943,6 @@ export class ContextMenuChild extends JSWindowActorChild {
? undefined
: context.target.title || context.target.alt,
};
const { SVGAnimatedLength } = context.target.ownerGlobal;
if (SVGAnimatedLength.isInstance(context.imageInfo.height)) {
context.imageInfo.height = context.imageInfo.height.animVal.value;
}
Expand Down
21 changes: 8 additions & 13 deletions firefox-src-part/browser/actors/LinkHandlerParent.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class LinkHandlerParent extends JSWindowActorParent {
return;
}

if (aMsg.data.canUseForTab) {
if (!aMsg.data.isRichIcon) {
let tab = gBrowser.getTabForBrowser(browser);
if (tab.hasAttribute("busy")) {
tab.setAttribute("pendingicon", "true");
Expand All @@ -46,13 +46,6 @@ export class LinkHandlerParent extends JSWindowActorParent {
break;

case "Link:SetIcon":
// Cache the most recent icon and rich icon locally.
if (aMsg.data.canUseForTab) {
this.icon = aMsg.data;
} else {
this.richIcon = aMsg.data;
}

if (!gBrowser) {
return;
}
Expand All @@ -67,7 +60,7 @@ export class LinkHandlerParent extends JSWindowActorParent {
return;
}

if (aMsg.data.canUseForTab) {
if (!aMsg.data.isRichIcon) {
this.clearPendingIcon(gBrowser, browser);
}

Expand Down Expand Up @@ -108,19 +101,19 @@ export class LinkHandlerParent extends JSWindowActorParent {
{
pageURL,
originalURL,
canUseForTab,
expiration,
iconURL,
canStoreIcon,
beforePageShow,
isRichIcon,
}
) {
let tab = gBrowser.getTabForBrowser(browser);
if (!tab) {
return;
}

if (canUseForTab) {
if (!isRichIcon) {
this.clearPendingIcon(gBrowser, browser);
}

Expand Down Expand Up @@ -148,14 +141,16 @@ export class LinkHandlerParent extends JSWindowActorParent {
Services.io.newURI(pageURL),
Services.io.newURI(originalURL),
iconURI,
expiration && lazy.PlacesUtils.toPRTime(expiration)
expiration && lazy.PlacesUtils.toPRTime(expiration),
null,
isRichIcon
);
} catch (ex) {
console.error(ex);
}
}

if (canUseForTab) {
if (!isRichIcon) {
gBrowser.setIcon(tab, iconURL, originalURL, null, beforePageShow);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class ScreenshotsComponentChild extends JSWindowActorChild {

switch (event.type) {
case "beforeunload":
this.requestCancelScreenshot("navigation");
this.requestCancelScreenshot("Navigation");
break;
case "resize":
if (!this.#resizeTask && this.overlay?.initialized) {
Expand Down Expand Up @@ -148,8 +148,8 @@ export class ScreenshotsComponentChild extends JSWindowActorChild {
break;
}
case "Screenshots:RecordEvent": {
let { eventName, reason, args } = event.detail;
this.recordTelemetryEvent(eventName, reason, args);
let { eventName, args } = event.detail;
Glean.screenshots[eventName].record(args);
break;
}
case "Screenshots:ShowPanel":
Expand Down Expand Up @@ -424,8 +424,4 @@ export class ScreenshotsComponentChild extends JSWindowActorChild {
};
return rect;
}

recordTelemetryEvent(type, object, args = {}) {
Services.telemetry.recordEvent("screenshots", type, object, null, args);
}
}
13 changes: 12 additions & 1 deletion firefox-src-part/browser/actors/SearchSERPTelemetryChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
false
);

XPCOMUtils.defineLazyPreferenceGetter(
lazy,
"serpEventTelemetryCategorizationRegionEnabled",
"browser.search.serpEventTelemetryCategorization.regionEnabled",
false
);

ChromeUtils.defineLazyGetter(lazy, "logConsole", () => {
return console.createInstance({
prefix: "SearchTelemetry",
Expand All @@ -28,6 +35,7 @@ ChromeUtils.defineLazyGetter(lazy, "logConsole", () => {

export const CATEGORIZATION_SETTINGS = {
MAX_DOMAINS_TO_CATEGORIZE: 10,
HAS_MATCHING_REGION: "SearchTelemetry:HasMatchingRegion",
};

// Duplicated from SearchSERPTelemetry to avoid loading the module on content
Expand Down Expand Up @@ -1143,7 +1151,7 @@ class DomainExtractor {
}

let elements = document.querySelectorAll(extractorInfo.selectors);
if (!elements) {
if (!elements.length) {
continue;
}

Expand Down Expand Up @@ -1428,6 +1436,7 @@ export class SearchSERPTelemetryChild extends JSWindowActorChild {
* @type {number | null}
*/
#adTimeout;

/**
* Determines if there is a provider that matches the supplied URL and returns
* the information associated with that provider.
Expand Down Expand Up @@ -1537,6 +1546,7 @@ export class SearchSERPTelemetryChild extends JSWindowActorChild {

if (
lazy.serpEventTelemetryCategorization &&
lazy.serpEventTelemetryCategorizationRegionEnabled &&
providerInfo.domainExtraction &&
(eventType == "load" || eventType == "pageshow")
) {
Expand All @@ -1546,6 +1556,7 @@ export class SearchSERPTelemetryChild extends JSWindowActorChild {
providerInfo.domainExtraction.nonAds,
providerInfo.telemetryId
);

let adDomains = domainExtractor.extractDomainsFromDocument(
doc,
providerInfo.domainExtraction.ads,
Expand Down
Loading

0 comments on commit 8e7b249

Please sign in to comment.