New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 819903 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

OOPIF clipping incorrectly when device emulation mode enabled.

Project Member Reported by fsam...@chromium.org, Mar 8 2018

Issue description

What steps will reproduce the problem?

1. Turn on --site-per-process.
2. Navigate to https://slashdot.org
3. Open up dev tools and enable device emulation mode.
4. Set to Responsive and show the device pixel ratio controls.
5. Play around with device pixel ratio and notice the odd OOPIF clipping change.

This is likely caused by the RenderWidgetScreenMetricsEmulator (RWSME).

RWSME lies about the ScreenInfo (including the device scale factor). When ScreenInfo changes, we inform BrowserPlugins and RenderFrameProxys of the change. The problem is the emulated ScreenInfo gets propagated to the child renderers which clip the viewport incorrectly (since the parent Blink already accounts for the scaling).

The solution is to always use the "original" ScreenInfo for RenderFrameProxy and BrowserPlugin.
 
Cc: kylec...@chromium.org
Unless anyone feels strongly about this one, I'm going to fix it for M67. This doesn't NEED to be merged into M66, does it? This is mostly a question for dgozman@ (devtools) and site isolation folks (creis@, nasko@, dcheng@).
Description: Show this description
Description: Show this description

Comment 4 by nasko@chromium.org, Mar 8 2018

I don't think this warrants merging in M66. M67 sgtm
Yep, 67 should be fine.
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a863f15cf84a128c419ba8e2b6d3da3b91499f55

commit a863f15cf84a128c419ba8e2b6d3da3b91499f55
Author: Fady Samuel <fsamuel@chromium.org>
Date: Fri Mar 09 16:10:03 2018

Surface synchronization: Pass original ScreenInfo to OOPIF/BrowserPlugin

In device emulation mode, the top level renderer devtools lies to Blink
about the size and scale factor by constructing an emulated ScreenInfo object.
Prior to this patch, we propagated that ScreenInfo down to OOPIFs and
BrowserPlugins. This caused double scaling of the compositor viewport size
in OOPIFs because the top level renderer had already scaled down the
surface embedded.

This CL instead plumbs down the original ScreenInfo which fixes the device
emulation problem.

Bug:  819903 ,  672962 
Change-Id: Ie32c2798edcbe8738c463edf86d45c86f33d0d5b
Reviewed-on: https://chromium-review.googlesource.com/956554
Commit-Queue: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Lucas Gadani <lfg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542130}
[modify] https://crrev.com/a863f15cf84a128c419ba8e2b6d3da3b91499f55/content/renderer/browser_plugin/browser_plugin.cc
[modify] https://crrev.com/a863f15cf84a128c419ba8e2b6d3da3b91499f55/content/renderer/input/render_widget_input_handler.cc
[modify] https://crrev.com/a863f15cf84a128c419ba8e2b6d3da3b91499f55/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/a863f15cf84a128c419ba8e2b6d3da3b91499f55/content/renderer/render_frame_proxy.cc
[modify] https://crrev.com/a863f15cf84a128c419ba8e2b6d3da3b91499f55/content/renderer/render_view_browsertest.cc
[modify] https://crrev.com/a863f15cf84a128c419ba8e2b6d3da3b91499f55/content/renderer/render_view_impl.cc
[modify] https://crrev.com/a863f15cf84a128c419ba8e2b6d3da3b91499f55/content/renderer/render_view_impl.h
[modify] https://crrev.com/a863f15cf84a128c419ba8e2b6d3da3b91499f55/content/renderer/render_widget.cc
[modify] https://crrev.com/a863f15cf84a128c419ba8e2b6d3da3b91499f55/content/renderer/render_widget.h

Status: Fixed (was: Assigned)

Comment 8 by samans@chromium.org, Mar 19 2018

Labels: Merge-Request-66 M-66
I would like to merge this into m66 because crrev.com/50d1e0c doesn't merge nicely without it. I already talked to Fady and he believes this CL is safe.
Project Member

Comment 9 by sheriffbot@chromium.org, Mar 19 2018

Labels: -Merge-Request-66 Merge-Review-66 Hotlist-Merge-Review
This bug requires manual review: M66 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-66 Merge-Approved-66
Approving merge for M66. Branch:3359
Project Member

Comment 11 by bugdroid1@chromium.org, Mar 20 2018

Labels: -merge-approved-66 merge-merged-3359
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/33ce7de78d85aacdb69bc5e122b9e86e53e1a696

commit 33ce7de78d85aacdb69bc5e122b9e86e53e1a696
Author: Fady Samuel <fsamuel@chromium.org>
Date: Tue Mar 20 12:51:34 2018

Surface synchronization: Pass original ScreenInfo to OOPIF/BrowserPlugin

In device emulation mode, the top level renderer devtools lies to Blink
about the size and scale factor by constructing an emulated ScreenInfo object.
Prior to this patch, we propagated that ScreenInfo down to OOPIFs and
BrowserPlugins. This caused double scaling of the compositor viewport size
in OOPIFs because the top level renderer had already scaled down the
surface embedded.

This CL instead plumbs down the original ScreenInfo which fixes the device
emulation problem.

Bug:  819903 ,  672962 
Change-Id: Ie32c2798edcbe8738c463edf86d45c86f33d0d5b
Reviewed-on: https://chromium-review.googlesource.com/956554
Commit-Queue: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Lucas Gadani <lfg@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#542130}(cherry picked from commit a863f15cf84a128c419ba8e2b6d3da3b91499f55)
Reviewed-on: https://chromium-review.googlesource.com/970781
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/branch-heads/3359@{#340}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/33ce7de78d85aacdb69bc5e122b9e86e53e1a696/content/renderer/browser_plugin/browser_plugin.cc
[modify] https://crrev.com/33ce7de78d85aacdb69bc5e122b9e86e53e1a696/content/renderer/input/render_widget_input_handler.cc
[modify] https://crrev.com/33ce7de78d85aacdb69bc5e122b9e86e53e1a696/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/33ce7de78d85aacdb69bc5e122b9e86e53e1a696/content/renderer/render_frame_proxy.cc
[modify] https://crrev.com/33ce7de78d85aacdb69bc5e122b9e86e53e1a696/content/renderer/render_view_browsertest.cc
[modify] https://crrev.com/33ce7de78d85aacdb69bc5e122b9e86e53e1a696/content/renderer/render_view_impl.cc
[modify] https://crrev.com/33ce7de78d85aacdb69bc5e122b9e86e53e1a696/content/renderer/render_view_impl.h
[modify] https://crrev.com/33ce7de78d85aacdb69bc5e122b9e86e53e1a696/content/renderer/render_widget.cc
[modify] https://crrev.com/33ce7de78d85aacdb69bc5e122b9e86e53e1a696/content/renderer/render_widget.h

Sign in to add a comment