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

Issue 73203003: Refactor how font scale factor appears in the emulation panel (Closed)

Created:
7 years, 1 month ago by pdr.
Modified:
7 years, 1 month ago
Reviewers:
dgozman, skobes, pfeldman
CC:
blink-reviews, caseq+blink_chromium.org, loislo+blink_chromium.org, eustas+blink_chromium.org, alph+blink_chromium.org, yurys+blink_chromium.org, lushnikov+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, paulirish+reviews_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, aandrey+blink_chromium.org
Visibility:
Public.

Description

Refactor how font scale factor appears in the emulation panel This patch refactors the confusing font scale factor setting. A screenshot is available at http://pr.gg/asnew.png Changes included in this patch: 1) Added updated tooltips for DPR, text autosizing, and the use android text metrics checkbox. This patch also moves the tooltips to be on both the input element and the associated label. 2) Removes the font scale factor textbox. Instead of manually entering this value, it will automatically be calculated if the new "Use Android font metrics" checkbox is checked. 3) Adds a new "Use Android font metrics" checkbox and auto-check it based on which emulation preset is chosen. When text autosizing is disabled, this checkbox will be disabled. 4) Minor refactoring of metrics.fontScaleFactor() which now computes the factor on-demand (it's cheap). Some usecases: If an iOS device is emulated, the text autosizing box will be checked but the android font metrics box will not. If an Android device is emulated, both checkboxes are checked. If a custom device is being emulated, the user can choose whether to use android's font metrics. BUG=319092 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162250

Patch Set 1 #

Total comments: 3

Patch Set 2 : Address reviewer commetns #

Patch Set 3 : *Address reviewer cmoments #

Total comments: 6

Patch Set 4 : Update per reviewer comments #

Total comments: 2

Patch Set 5 : getElementsByTagName("input")[0] -> firstChild #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -123 lines) Patch
M Source/devtools/front_end/OverridesSupport.js View 1 2 3 8 chunks +44 lines, -61 lines 0 comments Download
M Source/devtools/front_end/OverridesView.js View 1 2 3 4 7 chunks +66 lines, -62 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
pdr.
7 years, 1 month ago (2013-11-15 03:58:40 UTC) #1
dgozman
I'd prefer "Use Android font metrics" checkbox to be below "Enable test autosizing" with an ...
7 years, 1 month ago (2013-11-15 09:40:15 UTC) #2
skobes
https://codereview.chromium.org/73203003/diff/1/Source/devtools/front_end/OverridesSupport.js File Source/devtools/front_end/OverridesSupport.js (right): https://codereview.chromium.org/73203003/diff/1/Source/devtools/front_end/OverridesSupport.js#newcode204 Source/devtools/front_end/OverridesSupport.js:204: * Android uses a font scale factor for text ...
7 years, 1 month ago (2013-11-15 19:30:39 UTC) #3
pdr.
Updated the checkboxes to not be in the table and used indentation for the android ...
7 years, 1 month ago (2013-11-15 23:13:16 UTC) #4
skobes
lgtm https://codereview.chromium.org/73203003/diff/1/Source/devtools/front_end/OverridesSupport.js File Source/devtools/front_end/OverridesSupport.js (right): https://codereview.chromium.org/73203003/diff/1/Source/devtools/front_end/OverridesSupport.js#newcode204 Source/devtools/front_end/OverridesSupport.js:204: * Android uses a font scale factor for ...
7 years, 1 month ago (2013-11-15 23:26:03 UTC) #5
paulirish
I think there's two risks with the word "Android" here in the UI: 1) While ...
7 years, 1 month ago (2013-11-16 00:59:05 UTC) #6
pdr.
On 2013/11/15 23:26:03, skobes wrote: > > My understanding is that we'll use your updated ...
7 years, 1 month ago (2013-11-16 04:15:00 UTC) #7
pfeldman
https://codereview.chromium.org/73203003/diff/80001/Source/devtools/front_end/OverridesView.js File Source/devtools/front_end/OverridesView.js (right): https://codereview.chromium.org/73203003/diff/80001/Source/devtools/front_end/OverridesView.js#newcode513 Source/devtools/front_end/OverridesView.js:513: this._useAndroidFontMetricsCheckbox.disabled = !metrics.textAutosizing; Do we want these settings to ...
7 years, 1 month ago (2013-11-16 12:59:08 UTC) #8
pdr.
Thanks for the review. I've updated the change description and screenshot (http://pr.gg/asnew.png). PTAL https://codereview.chromium.org/73203003/diff/80001/Source/devtools/front_end/OverridesView.js File ...
7 years, 1 month ago (2013-11-16 23:47:53 UTC) #9
pfeldman
https://codereview.chromium.org/73203003/diff/150001/Source/devtools/front_end/OverridesView.js File Source/devtools/front_end/OverridesView.js (right): https://codereview.chromium.org/73203003/diff/150001/Source/devtools/front_end/OverridesView.js#newcode572 Source/devtools/front_end/OverridesView.js:572: this._textAutosizingOverrideCheckbox = textAutosizingOverrideElement.getElementsByTagName("input")[0]; nit: this is no better than ...
7 years, 1 month ago (2013-11-18 14:45:08 UTC) #10
pfeldman
lgtm
7 years, 1 month ago (2013-11-18 19:14:55 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pdr@chromium.org/73203003/220001
7 years, 1 month ago (2013-11-18 23:32:35 UTC) #12
commit-bot: I haz the power
7 years, 1 month ago (2013-11-19 00:48:25 UTC) #13
Message was sent while issue was closed.
Change committed as 162250

Powered by Google App Engine
This is Rietveld 408576698