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

Issue 1737733002: [DevTools] Handle emulated device scale factor and original device scale factor properly. (Closed)

Created:
4 years, 10 months ago by oshima
Modified:
4 years, 9 months ago
Reviewers:
tkent, kinuko, dgozman
CC:
apavlov+blink_chromium.org, blink-reviews, caseq+blink_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, devtools-reviews_chromium.org, jam, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, pfeldman, pfeldman+blink_chromium.org, sergeyv+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle emulated device scale factor and original device scale factor properly in use-zoom-for-dsf mode. * The zoom level is set to the original device scale factor (m_compositorDeviceScaleFactorOverride). * Sets the page's dsf to emulated dsf / original dsf so that device pixel ratio becomes emulated dsf. * Explicitly call ScreenMetricsEmuation::Apply so that RenderWidget can tell if it's in emulation mode. * Remove DevToolsHost.convertLengthForEmbedder because it's no longer necessary. BUG=584709 TEST=RenderViewImplScaleFactorTest.ScreenMetricsEmulation* (existing ScreenMetricsEmulation has been migrated to RenderViewImplScakeFactirTest.ScreenMetricsEmulationWithOriginalDSF1) also tested manually Committed: https://crrev.com/50872a70a931c93798061e5976b86499123fa1d0 Cr-Commit-Position: refs/heads/master@{#379277}

Patch Set 1 : #

Total comments: 10

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 8

Patch Set 5 : #

Patch Set 6 : add comment #

Total comments: 3

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -75 lines) Patch
M content/common/content_switches_internal.h View 2 chunks +2 lines, -1 line 0 comments Download
M content/renderer/devtools/render_widget_screen_metrics_emulator.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/devtools/render_widget_screen_metrics_emulator.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/gpu/render_widget_compositor.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 2 3 4 5 7 chunks +93 lines, -34 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M content/renderer/render_widget.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 chunks +22 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/DevToolsHost.cpp View 1 2 3 4 5 6 1 chunk +6 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/DevToolsHost.idl View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/devtools.js View 1 2 1 chunk +1 line, -7 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/externs.js View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 4 5 3 chunks +15 lines, -2 lines 0 comments Download

Messages

Total messages: 68 (39 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1737733002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1737733002/120001
4 years, 10 months ago (2016-02-27 05:11:48 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-27 06:13:35 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1737733002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1737733002/220001
4 years, 9 months ago (2016-02-29 03:53:51 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/151253)
4 years, 9 months ago (2016-02-29 04:03:01 UTC) #17
oshima
4 years, 9 months ago (2016-02-29 19:19:47 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1737733002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1737733002/280001
4 years, 9 months ago (2016-02-29 19:19:59 UTC) #27
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/151454)
4 years, 9 months ago (2016-02-29 19:33:38 UTC) #30
oshima
Hi, seems like I sent this prematualy, sorry about that. I'll send you when it's ...
4 years, 9 months ago (2016-02-29 20:18:18 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1737733002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1737733002/320001
4 years, 9 months ago (2016-02-29 20:23:31 UTC) #36
dgozman
Good that we now know what to fix. Let's clean it up a little bit ...
4 years, 9 months ago (2016-02-29 20:26:20 UTC) #37
oshima
https://codereview.chromium.org/1737733002/diff/280001/content/renderer/devtools/render_widget_screen_metrics_emulator.cc File content/renderer/devtools/render_widget_screen_metrics_emulator.cc (right): https://codereview.chromium.org/1737733002/diff/280001/content/renderer/devtools/render_widget_screen_metrics_emulator.cc#newcode25 content/renderer/devtools/render_widget_screen_metrics_emulator.cc:25: // Apply(); On 2016/02/29 20:26:20, dgozman wrote: > Why ...
4 years, 9 months ago (2016-02-29 21:28:03 UTC) #38
dgozman
https://codereview.chromium.org/1737733002/diff/280001/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/1737733002/diff/280001/content/renderer/render_widget.cc#newcode1486 content/renderer/render_widget.cc:1486: compositor_->SetPaintedDeviceScaleFactor(GetOriginalDeviceScaleFactor()); On 2016/02/29 21:28:03, oshima wrote: > On 2016/02/29 ...
4 years, 9 months ago (2016-02-29 21:38:41 UTC) #39
oshima
Uploaded new patch. https://codereview.chromium.org/1737733002/diff/280001/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/1737733002/diff/280001/content/renderer/render_widget.cc#newcode1486 content/renderer/render_widget.cc:1486: compositor_->SetPaintedDeviceScaleFactor(GetOriginalDeviceScaleFactor()); On 2016/02/29 21:38:41, dgozman wrote: ...
4 years, 9 months ago (2016-02-29 22:59:50 UTC) #40
oshima
ping? Let me know if you want me to work on refactoring CL now.
4 years, 9 months ago (2016-03-02 00:58:13 UTC) #41
dgozman
Sorry, this one slipped from my radar. Now I got used to GetOriginalDeviceScaleFactor(), but I'm ...
4 years, 9 months ago (2016-03-02 01:19:57 UTC) #42
oshima
https://codereview.chromium.org/1737733002/diff/360001/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/1737733002/diff/360001/content/renderer/render_widget.cc#newcode591 content/renderer/render_widget.cc:591: screen_metrics_emulator_->Apply(); On 2016/03/02 01:19:56, dgozman wrote: > Similarly, you'll ...
4 years, 9 months ago (2016-03-02 03:15:07 UTC) #43
dgozman
emulation lgtm
4 years, 9 months ago (2016-03-03 02:48:21 UTC) #44
oshima
tkent -> third_party/WebKit owner kinuko -> content/ owner
4 years, 9 months ago (2016-03-03 05:15:48 UTC) #47
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1737733002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1737733002/400001
4 years, 9 months ago (2016-03-03 05:16:08 UTC) #49
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-03 06:32:18 UTC) #51
kinuko
lgtm, assuming that emulation logic lgt dgozman https://codereview.chromium.org/1737733002/diff/400001/content/renderer/render_view_browsertest.cc File content/renderer/render_view_browsertest.cc (right): https://codereview.chromium.org/1737733002/diff/400001/content/renderer/render_view_browsertest.cc#newcode2673 content/renderer/render_view_browsertest.cc:2673: TEST_F(RenderViewImplScaleFactorTest, ScreenMetricsEmulationWithOriginalDSF1) ...
4 years, 9 months ago (2016-03-03 08:29:08 UTC) #52
tkent
https://codereview.chromium.org/1737733002/diff/400001/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp File third_party/WebKit/Source/core/inspector/DevToolsHost.cpp (left): https://codereview.chromium.org/1737733002/diff/400001/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp#oldcode167 third_party/WebKit/Source/core/inspector/DevToolsHost.cpp:167: return m_frontendFrame ? m_frontendFrame->pageZoomFactor() : 1; The original code ...
4 years, 9 months ago (2016-03-03 13:05:55 UTC) #53
oshima
https://codereview.chromium.org/1737733002/diff/400001/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp File third_party/WebKit/Source/core/inspector/DevToolsHost.cpp (left): https://codereview.chromium.org/1737733002/diff/400001/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp#oldcode167 third_party/WebKit/Source/core/inspector/DevToolsHost.cpp:167: return m_frontendFrame ? m_frontendFrame->pageZoomFactor() : 1; On 2016/03/03 13:05:55, ...
4 years, 9 months ago (2016-03-03 14:20:55 UTC) #54
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1737733002/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1737733002/420001
4 years, 9 months ago (2016-03-03 18:01:54 UTC) #56
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-03 19:17:33 UTC) #58
tkent
lgtm
4 years, 9 months ago (2016-03-03 23:00:48 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1737733002/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1737733002/420001
4 years, 9 months ago (2016-03-04 13:18:42 UTC) #64
commit-bot: I haz the power
Committed patchset #7 (id:420001)
4 years, 9 months ago (2016-03-04 13:26:29 UTC) #66
commit-bot: I haz the power
4 years, 9 months ago (2016-03-04 13:27:46 UTC) #68
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/50872a70a931c93798061e5976b86499123fa1d0
Cr-Commit-Position: refs/heads/master@{#379277}

Powered by Google App Engine
This is Rietveld 408576698