Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1599)

Issue 2122023002: Cross-process frames should be notified of device scale factor changes. (Closed)

Created:
4 years, 5 months ago by wjmaclean
Modified:
4 years, 4 months ago
Reviewers:
kenrb, Charlie Reis, oshima
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, yusukes+watch_chromium.org, shuchen+watch_chromium.org, nasko+codewatch_chromium.org, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, James Su, site-isolation-reviews_chromium.org, nasko
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cross-process frames should be notified of device scale factor changes. Existing pathways for communicating changes in device scale factor send the information to RenderWidget via ViewMsg_Resize. However, sub-frames have a top-level RenderWidget that isn't a RenderView, so the new device scale factor isn't properly communicated to the RenderViewImpl. This CL adds a pathway that transmits device scale factor changes as a PageMsg via WebContentsImpl, ensuring that all RenderViewImpls that need the information receive it. BUG=614215 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/8a795f3a48e4e77fabd7b0bb35ee43dac910bb80 Cr-Commit-Position: refs/heads/master@{#411451}

Patch Set 1 #

Patch Set 2 : Fix test. #

Total comments: 6

Patch Set 3 : Simpler access to device_scale_factor. #

Total comments: 5

Patch Set 4 : [WIP for testing on bots] Move GetScreenInfo to WebContentsView. #

Patch Set 5 : Fix oopif-webview tests. #

Patch Set 6 : Fix RenderWidgetHostTest.ResizeScreenInfo. #

Total comments: 6

Patch Set 7 : Address oshima@'s comments. #

Patch Set 8 : Add test for subframes getting correct DSF. #

Patch Set 9 : WIP Patch for testing on Windows bots. #

Patch Set 10 : Add Mac DSF update. #

Total comments: 4

Patch Set 11 : Remove testing change. #

Patch Set 12 : Rebase to master@{#411313}. #

Patch Set 13 : Version of patch without second test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+269 lines, -195 lines) Patch
M content/browser/devtools/protocol/color_picker.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/devtools/protocol/page_handler.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/frame_host/cross_process_frame_connector.h View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -2 lines 0 comments Download
M content/browser/frame_host/cross_process_frame_connector.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -7 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -7 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_delegate.h View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_delegate.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 2 chunks +7 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +18 lines, -11 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +0 lines, -23 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +5 lines, -43 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +17 lines, -25 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.h View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -7 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +8 lines, -36 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mus.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mus.cc View 1 2 3 2 chunks +0 lines, -8 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +30 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +10 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view.h View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_android.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_android.cc View 1 2 3 4 3 chunks +26 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura.cc View 1 2 3 2 chunks +42 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_child_frame.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_child_frame.cc View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_guest.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_guest.cc View 1 2 3 4 5 6 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_mac.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_mac.mm View 1 2 3 3 chunks +37 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_mus.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_mus.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M content/common/page_messages.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_widget.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +9 lines, -3 lines 0 comments Download
M content/test/test_render_view_host.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 65 (40 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2122023002/1
4 years, 5 months ago (2016-07-05 16:04:33 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/186182)
4 years, 5 months ago (2016-07-05 16:28:28 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2122023002/20001
4 years, 5 months ago (2016-07-05 18:27:43 UTC) #6
wjmaclean
oshima@ - This is still a WIP, but can you give it a quick once ...
4 years, 5 months ago (2016-07-05 18:56:39 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-07-05 19:23:46 UTC) #11
wjmaclean
oshima@ - can you look this over for basic sanity? I have embedded a couple ...
4 years, 5 months ago (2016-07-07 16:43:55 UTC) #13
oshima
sorry about the delay. looking now.
4 years, 5 months ago (2016-07-07 20:47:24 UTC) #14
oshima
For tests, there are only a couple of that tests dsf but may not be ...
4 years, 5 months ago (2016-07-07 22:45:43 UTC) #15
wjmaclean
See comments/questions below. https://codereview.chromium.org/2122023002/diff/20001/content/browser/renderer_host/render_widget_host_impl.cc File content/browser/renderer_host/render_widget_host_impl.cc (right): https://codereview.chromium.org/2122023002/diff/20001/content/browser/renderer_host/render_widget_host_impl.cc#newcode593 content/browser/renderer_host/render_widget_host_impl.cc:593: // ScaleToCeiledSize(new_size, device_scale_factor) ?? On 2016/07/07 ...
4 years, 5 months ago (2016-07-08 17:38:33 UTC) #16
oshima
https://codereview.chromium.org/2122023002/diff/40001/content/browser/renderer_host/render_widget_host_impl.cc File content/browser/renderer_host/render_widget_host_impl.cc (right): https://codereview.chromium.org/2122023002/diff/40001/content/browser/renderer_host/render_widget_host_impl.cc#newcode1225 content/browser/renderer_host/render_widget_host_impl.cc:1225: result->deviceScaleFactor = delegate_->DefaultDeviceScaleFactor(); Since delegate_ is always available (except ...
4 years, 5 months ago (2016-07-12 14:14:41 UTC) #17
wjmaclean
https://codereview.chromium.org/2122023002/diff/40001/content/browser/renderer_host/render_widget_host_impl.cc File content/browser/renderer_host/render_widget_host_impl.cc (right): https://codereview.chromium.org/2122023002/diff/40001/content/browser/renderer_host/render_widget_host_impl.cc#newcode1225 content/browser/renderer_host/render_widget_host_impl.cc:1225: result->deviceScaleFactor = delegate_->DefaultDeviceScaleFactor(); On 2016/07/12 14:14:41, oshima wrote: > ...
4 years, 4 months ago (2016-07-29 17:12:37 UTC) #33
oshima
thanks, looks good. https://codereview.chromium.org/2122023002/diff/40001/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/2122023002/diff/40001/content/renderer/render_widget.cc#newcode1575 content/renderer/render_widget.cc:1575: physical_backing_size_ = gfx::ScaleToCeiledSize(size_, device_scale_factor_); On 2016/07/29 ...
4 years, 4 months ago (2016-07-29 18:11:46 UTC) #34
wjmaclean
Ok, I think I see what you're asking w.r.t. to the code in RenderWidget ...
4 years, 4 months ago (2016-07-29 18:40:05 UTC) #37
wjmaclean
kenrb@ - Can you please review for SECURITY_OWNERS for page_messages.h ?
4 years, 4 months ago (2016-08-02 14:16:01 UTC) #42
Charlie Reis
On 2016/08/02 14:16:01, wjmaclean wrote: > kenrb@ - Can you please review for SECURITY_OWNERS for ...
4 years, 4 months ago (2016-08-08 17:19:16 UTC) #47
wjmaclean
On 2016/08/08 17:19:16, Charlie Reis wrote: > On 2016/08/02 14:16:01, wjmaclean wrote: > > kenrb@ ...
4 years, 4 months ago (2016-08-08 17:24:45 UTC) #48
wjmaclean
Here's an updated version of the CL that could be used for an OWNER's review ...
4 years, 4 months ago (2016-08-09 15:15:53 UTC) #49
kenrb
ipc lgtm
4 years, 4 months ago (2016-08-09 17:01:22 UTC) #50
Charlie Reis
LGTM from an owner's perspective, though I'm not familiar enough with this code for that ...
4 years, 4 months ago (2016-08-10 00:07:13 UTC) #51
oshima
lgtm I'll send my screen CL to owners once it passed dry run.
4 years, 4 months ago (2016-08-10 07:30:09 UTC) #52
wjmaclean
https://codereview.chromium.org/2122023002/diff/220001/ui/aura/window_tree_host.h File ui/aura/window_tree_host.h (right): https://codereview.chromium.org/2122023002/diff/220001/ui/aura/window_tree_host.h#newcode182 ui/aura/window_tree_host.h:182: // For testing : WJM On 2016/08/10 00:07:12, Charlie ...
4 years, 4 months ago (2016-08-10 15:54:26 UTC) #53
wjmaclean
Removed second test for now, will run on try bots and (if all is good) ...
4 years, 4 months ago (2016-08-11 18:37:01 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2122023002/280001
4 years, 4 months ago (2016-08-11 22:10:48 UTC) #61
commit-bot: I haz the power
Committed patchset #13 (id:280001)
4 years, 4 months ago (2016-08-11 23:50:21 UTC) #63
commit-bot: I haz the power
4 years, 4 months ago (2016-08-11 23:52:30 UTC) #65
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/8a795f3a48e4e77fabd7b0bb35ee43dac910bb80
Cr-Commit-Position: refs/heads/master@{#411451}

Powered by Google App Engine
This is Rietveld 408576698