chore: update browser_patches to 9ad8c4d334 (#34973)
This commit is contained in:
parent
8d8c9a55cd
commit
6a99f3a39a
|
@ -1,3 +1,3 @@
|
|||
REMOTE_URL="https://github.com/mozilla/gecko-dev"
|
||||
BASE_BRANCH="release"
|
||||
BASE_REVISION="5cfa81898f6eef8fb1abe463e5253cea5bc17f3f"
|
||||
BASE_REVISION="4764531b2bb14867dde520d74f6a3c88690e0751"
|
||||
|
|
|
@ -384,6 +384,7 @@ class PageTarget {
|
|||
this._linkedBrowser = tab.linkedBrowser;
|
||||
this._browserContext = browserContext;
|
||||
this._viewportSize = undefined;
|
||||
this._zoom = 1;
|
||||
this._initialDPPX = this._linkedBrowser.browsingContext.overrideDPPX;
|
||||
this._url = 'about:blank';
|
||||
this._openerId = opener ? opener.id() : undefined;
|
||||
|
@ -496,6 +497,7 @@ class PageTarget {
|
|||
this.updateUserAgent(browsingContext);
|
||||
this.updatePlatform(browsingContext);
|
||||
this.updateDPPXOverride(browsingContext);
|
||||
this.updateZoom(browsingContext);
|
||||
this.updateEmulatedMedia(browsingContext);
|
||||
this.updateColorSchemeOverride(browsingContext);
|
||||
this.updateReducedMotionOverride(browsingContext);
|
||||
|
@ -534,7 +536,16 @@ class PageTarget {
|
|||
}
|
||||
|
||||
updateDPPXOverride(browsingContext = undefined) {
|
||||
(browsingContext || this._linkedBrowser.browsingContext).overrideDPPX = this._browserContext.deviceScaleFactor || this._initialDPPX;
|
||||
browsingContext ||= this._linkedBrowser.browsingContext;
|
||||
const dppx = this._zoom * (this._browserContext.deviceScaleFactor || this._initialDPPX);
|
||||
browsingContext.overrideDPPX = dppx;
|
||||
}
|
||||
|
||||
async updateZoom(browsingContext = undefined) {
|
||||
browsingContext ||= this._linkedBrowser.browsingContext;
|
||||
// Update dpr first, and then UI zoom.
|
||||
this.updateDPPXOverride(browsingContext);
|
||||
browsingContext.fullZoom = this._zoom;
|
||||
}
|
||||
|
||||
_updateModalDialogs() {
|
||||
|
@ -584,7 +595,7 @@ class PageTarget {
|
|||
const toolbarTop = stackRect.y;
|
||||
this._window.resizeBy(width - this._window.innerWidth, height + toolbarTop - this._window.innerHeight);
|
||||
|
||||
await this._channel.connect('').send('awaitViewportDimensions', { width, height });
|
||||
await this._channel.connect('').send('awaitViewportDimensions', { width: width / this._zoom, height: height / this._zoom });
|
||||
} else {
|
||||
this._linkedBrowser.style.removeProperty('width');
|
||||
this._linkedBrowser.style.removeProperty('height');
|
||||
|
@ -596,8 +607,8 @@ class PageTarget {
|
|||
|
||||
const actualSize = this._linkedBrowser.getBoundingClientRect();
|
||||
await this._channel.connect('').send('awaitViewportDimensions', {
|
||||
width: actualSize.width,
|
||||
height: actualSize.height,
|
||||
width: actualSize.width / this._zoom,
|
||||
height: actualSize.height / this._zoom,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -650,6 +661,14 @@ class PageTarget {
|
|||
await this.updateViewportSize();
|
||||
}
|
||||
|
||||
async setZoom(zoom) {
|
||||
// This is default range from the ZoomManager.
|
||||
if (zoom < 0.3 || zoom > 5)
|
||||
throw new Error('Invalid zoom value, must be between 0.3 and 5');
|
||||
this._zoom = zoom;
|
||||
await this.updateZoom();
|
||||
}
|
||||
|
||||
close(runBeforeUnload = false) {
|
||||
this._gBrowser.removeTab(this._tab, {
|
||||
skipPermitUnload: !runBeforeUnload,
|
||||
|
|
|
@ -240,6 +240,10 @@ class PageHandler {
|
|||
await this._pageTarget.setViewportSize(viewportSize === null ? undefined : viewportSize);
|
||||
}
|
||||
|
||||
async ['Page.setZoom']({zoom}) {
|
||||
await this._pageTarget.setZoom(zoom);
|
||||
}
|
||||
|
||||
async ['Runtime.evaluate'](options) {
|
||||
return await this._contentPage.send('evaluate', options);
|
||||
}
|
||||
|
|
|
@ -794,6 +794,11 @@ const Page = {
|
|||
viewportSize: t.Nullable(pageTypes.Size),
|
||||
},
|
||||
},
|
||||
'setZoom': {
|
||||
params: {
|
||||
zoom: t.Number,
|
||||
},
|
||||
},
|
||||
'bringToFront': {
|
||||
params: {
|
||||
},
|
||||
|
|
|
@ -23,8 +23,8 @@ XPCOM_MANIFESTS += [
|
|||
LOCAL_INCLUDES += [
|
||||
'/dom/media/systemservices',
|
||||
'/media/libyuv/libyuv/include',
|
||||
'/third_party/abseil-cpp',
|
||||
'/third_party/libwebrtc',
|
||||
'/third_party/libwebrtc/third_party/abseil-cpp',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
|
|
|
@ -343,10 +343,17 @@ nsresult nsScreencastService::StartVideoRecording(nsIScreencastServiceClient* aC
|
|||
return NS_ERROR_FAILURE;
|
||||
|
||||
gfx::IntMargin margin;
|
||||
auto bounds = widget->GetScreenBounds().ToUnknownRect();
|
||||
// Screen bounds is the widget location on screen.
|
||||
auto screenBounds = widget->GetScreenBounds().ToUnknownRect();
|
||||
// Client bounds is the content location, in terms of parent widget.
|
||||
// To use it, we need to translate it to screen coordinates first.
|
||||
auto clientBounds = widget->GetClientBounds().ToUnknownRect();
|
||||
for (auto parent = widget->GetParent(); parent != nullptr; parent = parent->GetParent()) {
|
||||
auto pb = parent->GetClientBounds().ToUnknownRect();
|
||||
clientBounds.MoveBy(pb.X(), pb.Y());
|
||||
}
|
||||
// Crop the image to exclude frame (if any).
|
||||
margin = bounds - clientBounds;
|
||||
margin = screenBounds - clientBounds;
|
||||
// Crop the image to exclude controls.
|
||||
margin.top += offsetTop;
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -88,6 +88,10 @@ pref("geo.provider.testing", true);
|
|||
// THESE ARE NICHE PROPERTIES THAT ARE NICE TO HAVE
|
||||
// =================================================================
|
||||
|
||||
// We never want to have interactive screen capture picker enabled in FF build.
|
||||
pref("media.getdisplaymedia.screencapturekit.enabled", false);
|
||||
pref("media.getdisplaymedia.screencapturekit.picker.enabled", false);
|
||||
|
||||
// Enable software-backed webgl. See https://phabricator.services.mozilla.com/D164016
|
||||
pref("webgl.forbid-software", false);
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
REMOTE_URL="https://github.com/WebKit/WebKit.git"
|
||||
BASE_BRANCH="main"
|
||||
BASE_REVISION="76c95d6131edd36775a5eac01e297926fc974be8"
|
||||
BASE_REVISION="71b1107b4656f116936a278cb4948cc2db56998c"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1 +1 @@
|
|||
1006
|
||||
1007
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
winldd-win64.zip
|
||||
winldd-win64.tar.br
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
SET /p BUILD_NUMBER=<BUILD_NUMBER
|
||||
SET CL=/DBUILD_NUMBER=%BUILD_NUMBER%
|
||||
%DEVENV% %~dp0\PrintDeps.sln /build "Release|x64"
|
||||
|
||||
call "%VS_PATH%\VC\Auxiliary\Build\vcvars64.bat"
|
||||
devenv %~dp0\PrintDeps.sln /build "Release|x64"
|
||||
|
|
Loading…
Reference in New Issue