Chromium Code Reviews
DescriptionAdd 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 #
Messages
Total messages: 20 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||