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

Issue 2457883004: DevTools: fix rounding of scale in device mode (Closed)

Created:
4 years, 1 month ago by luoe
Modified:
4 years, 1 month ago
Reviewers:
dgozman
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2883
Project:
chromium
Visibility:
Public.

Description

DevTools: fix rounding of scale in device mode While resizing the DevTools viewport to be smaller than the emulated device's screen size in responsive mode, _calculateAndEmulate() clamps the emulated screen size to preferredScaledWidth/Height(). The condition to do so checks whether the screen's dimensions are greater than the preferred-scaled dimensions. The sharp scale calculator in calculateFitScale() would find a scale nearby the precise value that would result in integer screen sizes. However, it was possible for the sharp scale to be greater than the actual scale, which resulted in a smaller preferredScaledWidth/Height() than was available. This edge case triggers the clamping condition, which led to inaccurate widths/heights that differed from user input. BUG=651123 NOTRY=true NOPRESUBMIT=true Review-Url: https://codereview.chromium.org/2449763002 Cr-Commit-Position: refs/heads/master@{#427583} (cherry picked from commit 2f5985ecef25664e1b6bba43b338683dd5d63c64)

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (4 generated)
luoe
This CL is to merge a change from ToT to 2883. Since I do not ...
4 years, 1 month ago (2016-10-27 22:56:19 UTC) #2
dgozman
lgtm
4 years, 1 month ago (2016-10-27 22:57:51 UTC) #4
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/2457883004/1
4 years, 1 month ago (2016-10-27 22:59:16 UTC) #6
commit-bot: I haz the power
4 years, 1 month ago (2016-10-27 23:01:26 UTC) #8
Message was sent while issue was closed.
Committed patchset #1 (id:1)

Powered by Google App Engine
This is Rietveld 408576698