Skip to content

Commit

Permalink
[M111] Disallow locking aspect ratio for Document Picture in Picture.
Browse files Browse the repository at this point in the history
This CL removes the `lockAspectRatio` option from blink.  It does
not remove the plumbing in the browser side, to avoid a conflict
with an ongoing refactor.  The browser side will be removed as
part of a follow-up.

Corresponding spec change:
WICG/document-picture-in-picture#20

(cherry picked from commit e7ecb1d)

Bug: 1410379
Change-Id: I3dcc62c1247b44b37490826c3fc03c825e828095
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4194966
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Tommy Steimel <steimel@chromium.org>
Commit-Queue: Frank Liberato <liberato@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1098016}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4209915
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Auto-Submit: Frank Liberato <liberato@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/branch-heads/5563@{#66}
Cr-Branched-From: 3ac59a6-refs/heads/main@{#1097615}
  • Loading branch information
liberato-at-chromium authored and Chromium LUCI CQ committed Jan 31, 2023
1 parent 92fc3e4 commit a5b05dc
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion content/renderer/render_frame_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6277,7 +6277,8 @@ WebView* RenderFrameImpl::CreateNewWindow(
pip_mojom_opts->width = pip_options->width;
pip_mojom_opts->height = pip_options->height;
pip_mojom_opts->initial_aspect_ratio = pip_options->initial_aspect_ratio;
pip_mojom_opts->lock_aspect_ratio = pip_options->lock_aspect_ratio;
// TODO(crbug.com/1410379): Remove this from mojom and the browser side.
pip_mojom_opts->lock_aspect_ratio = false;
params->pip_options = std::move(pip_mojom_opts);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ struct WebPictureInPictureWindowOptions {
uint64_t width = 0;
uint64_t height = 0;
double initial_aspect_ratio = 0.0;
bool lock_aspect_ratio = false;
};

} // namespace blink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ dictionary DocumentPictureInPictureOptions {
[EnforceRange] unsigned long long width = 0;
[EnforceRange] unsigned long long height = 0;
double initialAspectRatio = 0.0;
boolean lockAspectRatio = false;
boolean copyStyleSheets = false;
};
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ void PictureInPictureControllerImpl::CreateDocumentPictureInPictureWindow(
web_options.width = options->width();
web_options.height = options->height();
web_options.initial_aspect_ratio = options->initialAspectRatio();
web_options.lock_aspect_ratio = options->lockAspectRatio();

// If either width or height is specified, then both must be specified.
if (web_options.width > 0 && web_options.height == 0) {
Expand Down

0 comments on commit a5b05dc

Please sign in to comment.