no-bug: Sync upstream Firefox to version 150.0.2 (gh-13601)

This commit is contained in:
mr. m
2026-05-07 18:28:25 +02:00
committed by GitHub
parent b999a932ac
commit 9c88e3a84f
5 changed files with 19 additions and 15 deletions

View File

@@ -313,16 +313,18 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature {
// content process since it does not take into account scroll. This way, we can
// be sure that the coordinates are correct.
const tabPanelsRect = gBrowser.tabpanels.getBoundingClientRect();
const zoomLevel =
this.#currentParentTab?.linkedBrowser.browsingContext.fullZoom || 1;
const rect = new DOMRect(
data.clientX + tabPanelsRect.left,
data.clientY + tabPanelsRect.top,
data.width,
data.height
data.clientX / zoomLevel + tabPanelsRect.left,
data.clientY / zoomLevel + tabPanelsRect.top,
data.width / zoomLevel,
data.height / zoomLevel
);
return await this.#imageBitmapToObjectURL(
await window.browsingContext.currentWindowGlobal.drawSnapshot(
rect,
1,
zoomLevel,
"transparent",
undefined
)

View File

@@ -66,11 +66,13 @@ export class ZenGlanceChild extends JSWindowActorChild {
) {
rect = originalTargetRect;
}
// Change the rect to make sure we take into account zoom.
const zoom = this.browsingContext.fullZoom;
this.sendAsyncMessage("ZenGlance:RecordLinkClickData", {
clientX: rect.left,
clientY: rect.top,
width: rect.width,
height: rect.height,
clientX: rect.left * zoom,
clientY: rect.top * zoom,
width: rect.width * zoom,
height: rect.height * zoom,
});
}