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

Issue 26929003: Add text autosizing override in the inspector. (Closed)

Created:
7 years, 2 months ago by pdr.
Modified:
7 years, 2 months ago
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

Add text autosizing override in the inspector. This patch adds a checkbox to the inspector for enabling text autosizing. Screenshot: http://pr.gg/as2.png This gives developers the ability to test mobile text layout/rendering on a desktop (and vice-versa). This patch has two components (Inspector changes and Blink changes): 1) A checkbox for text autosizing has been added to the inspector under the Device Metrics section. This checkbox has been wired up to the metrics.textAutosizing property. Default text autosizing settings have been added for the various pre-provided user agent strings. I explored implementing the checkbox outside the device metrics section (https://codereview.chromium.org/25735003) but the feature doesn't make a lot of sense unless a device scale value is set. A downside to the approach taken in the current patch is it is not possible to disable text autosizing on a mobile device without overriding device metrics; I think this is a reasonable tradeoff. I also explored implementing this checkbox as a tri-state dropdown (https://codereview.chromium.org/27119002) so users could test overriding device metrics but use the default setting for text autosizing. I think the resulting UI is overly complex for the average developer. 2) This patch also wires up Blink's Settings to the text autosizing feature. A ternary enum has been added to track whether autosizing is overridden in Settings. Because the device metrics overrides do not actually scale the window (to maintain crisp rendering), I used the text autosizing window size override. BUG=302005 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=160027

Patch Set 1 #

Total comments: 14

Patch Set 2 : Address reviewer comments #

Patch Set 3 : Address reviewer comments #

Total comments: 5

Patch Set 4 : Address reviewer comments #

Patch Set 5 : Fix [DefaultReturn] bug #

Patch Set 6 : Add optional flag in protocol.json #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -38 lines) Patch
M Source/core/inspector/InspectorInstrumentation.idl View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/inspector/InspectorPageAgent.h View 1 2 3 4 5 3 chunks +8 lines, -5 lines 0 comments Download
Source/core/inspector/InspectorPageAgent.cpp View 1 2 3 4 5 7 chunks +32 lines, -9 lines 0 comments Download
M Source/core/page/Settings.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/page/Settings.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download
M Source/devtools/front_end/OverridesSupport.js View 1 6 chunks +26 lines, -8 lines 0 comments Download
M Source/devtools/front_end/OverridesView.js View 1 6 chunks +25 lines, -14 lines 0 comments Download
M Source/devtools/protocol.json View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 20 (0 generated)
pdr.
Ready for review!
7 years, 2 months ago (2013-10-14 04:51:26 UTC) #1
pdr.
@pfeldman, @dgozman, ping?
7 years, 2 months ago (2013-10-15 23:55:27 UTC) #2
pfeldman
https://codereview.chromium.org/26929003/diff/1/Source/core/page/Settings.cpp File Source/core/page/Settings.cpp (right): https://codereview.chromium.org/26929003/diff/1/Source/core/page/Settings.cpp#newcode252 Source/core/page/Settings.cpp:252: void Settings::setTextAutosizingEnabledOverride(TextAutosizingOverride textAutosizingOverride) Instead of introducing a new setting ...
7 years, 2 months ago (2013-10-16 05:34:14 UTC) #3
skobes
https://codereview.chromium.org/26929003/diff/1/Source/core/inspector/InspectorPageAgent.cpp File Source/core/inspector/InspectorPageAgent.cpp (right): https://codereview.chromium.org/26929003/diff/1/Source/core/inspector/InspectorPageAgent.cpp#newcode411 Source/core/inspector/InspectorPageAgent.cpp:411: m_state->setBoolean(PageAgentState::pageAgentFitWindow, false); Do you also need m_state->setBoolean(PageAgentState::pageAgentTextAutosizingOverride, false) here? ...
7 years, 2 months ago (2013-10-16 19:38:09 UTC) #4
pfeldman
https://codereview.chromium.org/26929003/diff/1/Source/devtools/front_end/OverridesView.js File Source/devtools/front_end/OverridesView.js (right): https://codereview.chromium.org/26929003/diff/1/Source/devtools/front_end/OverridesView.js#newcode139 Source/devtools/front_end/OverridesView.js:139: // When present, the third element lists device metrics ...
7 years, 2 months ago (2013-10-17 16:31:15 UTC) #5
pdr.
Updated! @pfeldman, can you take another look? https://codereview.chromium.org/26929003/diff/1/Source/core/inspector/InspectorPageAgent.cpp File Source/core/inspector/InspectorPageAgent.cpp (right): https://codereview.chromium.org/26929003/diff/1/Source/core/inspector/InspectorPageAgent.cpp#newcode411 Source/core/inspector/InspectorPageAgent.cpp:411: m_state->setBoolean(PageAgentState::pageAgentFitWindow, false); ...
7 years, 2 months ago (2013-10-18 01:28:44 UTC) #6
pfeldman
lgtm https://codereview.chromium.org/26929003/diff/27001/Source/devtools/protocol.json File Source/devtools/protocol.json (right): https://codereview.chromium.org/26929003/diff/27001/Source/devtools/protocol.json#newcode344 Source/devtools/protocol.json:344: { "name": "textAutosizing", "type": "boolean", "description": "Whether to ...
7 years, 2 months ago (2013-10-18 12:01:26 UTC) #7
skobes
https://codereview.chromium.org/26929003/diff/27001/Source/core/inspector/InspectorPageAgent.cpp File Source/core/inspector/InspectorPageAgent.cpp (right): https://codereview.chromium.org/26929003/diff/27001/Source/core/inspector/InspectorPageAgent.cpp#newcode1211 Source/core/inspector/InspectorPageAgent.cpp:1211: return m_state->getBoolean(PageAgentState::pageAgentTextAutosizingOverride); Does this handle the case where the ...
7 years, 2 months ago (2013-10-18 17:17:06 UTC) #8
pfeldman
https://codereview.chromium.org/26929003/diff/27001/Source/core/inspector/InspectorPageAgent.cpp File Source/core/inspector/InspectorPageAgent.cpp (right): https://codereview.chromium.org/26929003/diff/27001/Source/core/inspector/InspectorPageAgent.cpp#newcode1211 Source/core/inspector/InspectorPageAgent.cpp:1211: return m_state->getBoolean(PageAgentState::pageAgentTextAutosizingOverride); On 2013/10/18 17:17:07, skobes wrote: > Does ...
7 years, 2 months ago (2013-10-18 17:26:51 UTC) #9
pdr.
https://codereview.chromium.org/26929003/diff/27001/Source/core/inspector/InspectorPageAgent.cpp File Source/core/inspector/InspectorPageAgent.cpp (right): https://codereview.chromium.org/26929003/diff/27001/Source/core/inspector/InspectorPageAgent.cpp#newcode1211 Source/core/inspector/InspectorPageAgent.cpp:1211: return m_state->getBoolean(PageAgentState::pageAgentTextAutosizingOverride); On 2013/10/18 17:26:52, pfeldman wrote: > On ...
7 years, 2 months ago (2013-10-18 18:46:09 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pdr@chromium.org/26929003/147001
7 years, 2 months ago (2013-10-18 18:47:15 UTC) #11
skobes
lgtm
7 years, 2 months ago (2013-10-18 18:47:40 UTC) #12
commit-bot: I haz the power
Retried try job too often on win_blink_rel for step(s) webkit_unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_blink_rel&number=12294
7 years, 2 months ago (2013-10-18 21:07:37 UTC) #13
pdr.
On 2013/10/18 21:07:37, I haz the power (commit-bot) wrote: > Retried try job too often ...
7 years, 2 months ago (2013-10-20 01:35:55 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pdr@chromium.org/26929003/337001
7 years, 2 months ago (2013-10-20 01:36:16 UTC) #15
commit-bot: I haz the power
Retried try job too often on linux_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink_rel&number=8955
7 years, 2 months ago (2013-10-20 02:53:31 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pdr@chromium.org/26929003/547001
7 years, 2 months ago (2013-10-20 03:24:53 UTC) #17
commit-bot: I haz the power
Retried try job too often on win_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_blink_rel&number=12507
7 years, 2 months ago (2013-10-20 04:26:03 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pdr@chromium.org/26929003/547001
7 years, 2 months ago (2013-10-20 04:33:21 UTC) #19
commit-bot: I haz the power
7 years, 2 months ago (2013-10-20 05:10:06 UTC) #20
Message was sent while issue was closed.
Change committed as 160027

Powered by Google App Engine
This is Rietveld 408576698