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

Issue 209353003: Clean up handling of autosizing state changes. (Closed)

Created:
6 years, 9 months ago by skobes
Modified:
6 years, 9 months ago
CC:
blink-reviews, zoltan1, dsinclair, sof, eae+blinkwatch, leviw+renderwatch, dglazkov+blink, adamk+blink_chromium.org, jchaffraix+rendering, Inactive, bemjb+rendering_chromium.org, pdr., rune+blink, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@crap_base
Visibility:
Public.

Description

Clean up handling of autosizing state changes. All page-level state changes now go through updatePageInfo, which marks blocks as needing layout if their multipliers might need updating. This simplifies the flow and ensures the page updates correctly on orientation changes and movements of the text scaling slider in accessibility settings. BUG=353309, 347384 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169997

Patch Set 1 #

Total comments: 13

Patch Set 2 : Address review comments. #

Total comments: 13

Patch Set 3 : Address review comments. #

Patch Set 4 : Update TestExpectations. #

Patch Set 5 : Fix segfault in unit test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -46 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
A LayoutTests/fast/text-autosizing/font-scale-factor-change.html View 1 1 chunk +30 lines, -0 lines 0 comments Download
A LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html View 1 1 chunk +18 lines, -0 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/frame/FrameView.cpp View 1 2 3 4 3 chunks +13 lines, -0 lines 0 comments Download
M Source/core/page/Page.cpp View 1 2 2 chunks +9 lines, -9 lines 0 comments Download
M Source/core/rendering/FastTextAutosizer.h View 1 2 5 chunks +10 lines, -8 lines 0 comments Download
M Source/core/rendering/FastTextAutosizer.cpp View 1 2 10 chunks +78 lines, -26 lines 0 comments Download
M Source/web/WebViewImpl.cpp View 1 2 3 3 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 45 (0 generated)
skobes
Based on http://crrev.com/208693006.
6 years, 9 months ago (2014-03-22 06:23:21 UTC) #1
pdr.
https://codereview.chromium.org/209353003/diff/1/LayoutTests/fast/text-autosizing/font-scale-factor-change.html File LayoutTests/fast/text-autosizing/font-scale-factor-change.html (right): https://codereview.chromium.org/209353003/diff/1/LayoutTests/fast/text-autosizing/font-scale-factor-change.html#newcode19 LayoutTests/fast/text-autosizing/font-scale-factor-change.html:19: setTimeout(function() { This test is failing for me locally ...
6 years, 9 months ago (2014-03-24 01:03:18 UTC) #2
timvolodine
https://codereview.chromium.org/209353003/diff/1/LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html File LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html (right): https://codereview.chromium.org/209353003/diff/1/LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html#newcode12 LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html:12: <div style="font-size: 32px"> Usually we use relative style instead ...
6 years, 9 months ago (2014-03-24 15:24:27 UTC) #3
esprehn
Lgtm, but no tests? We really need tests otherwise someone will just delete it.
6 years, 9 months ago (2014-03-25 01:18:35 UTC) #4
esprehn
On 2014/03/25 01:18:35, esprehn wrote: > Lgtm, but no tests? We really need tests otherwise ...
6 years, 9 months ago (2014-03-25 01:21:08 UTC) #5
skobes
https://codereview.chromium.org/209353003/diff/1/LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html File LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html (right): https://codereview.chromium.org/209353003/diff/1/LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html#newcode12 LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html:12: <div style="font-size: 32px"> On 2014/03/24 15:24:27, timvolodine wrote: > ...
6 years, 9 months ago (2014-03-25 01:23:24 UTC) #6
pdr.
https://codereview.chromium.org/209353003/diff/20001/Source/core/rendering/FastTextAutosizer.cpp File Source/core/rendering/FastTextAutosizer.cpp (right): https://codereview.chromium.org/209353003/diff/20001/Source/core/rendering/FastTextAutosizer.cpp#newcode856 Source/core/rendering/FastTextAutosizer.cpp:856: renderer->setStyle(style.release()); This can cause us to go back through ...
6 years, 9 months ago (2014-03-25 04:23:41 UTC) #7
timvolodine
https://codereview.chromium.org/209353003/diff/20001/LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html File LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html (right): https://codereview.chromium.org/209353003/diff/20001/LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html#newcode12 LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html:12: <div style="font-size: 2rem"> so the 2 is due to ...
6 years, 9 months ago (2014-03-25 13:08:14 UTC) #8
skobes
https://codereview.chromium.org/209353003/diff/20001/LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html File LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html (right): https://codereview.chromium.org/209353003/diff/20001/LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html#newcode12 LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html:12: <div style="font-size: 2rem"> On 2014/03/25 13:08:14, timvolodine wrote: > ...
6 years, 9 months ago (2014-03-25 18:25:26 UTC) #9
skobes
+ojan for Source/web OWNERS.
6 years, 9 months ago (2014-03-25 19:35:29 UTC) #10
abarth-chromium
Source/web LGTM
6 years, 9 months ago (2014-03-25 20:45:09 UTC) #11
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 9 months ago (2014-03-25 21:25:58 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skobes@chromium.org/209353003/50001
6 years, 9 months ago (2014-03-25 21:26:11 UTC) #13
skobes
The CQ bit was unchecked by skobes@chromium.org
6 years, 9 months ago (2014-03-25 21:30:00 UTC) #14
skobes
Got an LG from Philip via chat, so I'll go ahead and submit this. Tim, ...
6 years, 9 months ago (2014-03-25 21:32:57 UTC) #15
skobes
The CQ bit was checked by skobes@chromium.org
6 years, 9 months ago (2014-03-25 21:33:02 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skobes@chromium.org/209353003/50001
6 years, 9 months ago (2014-03-25 21:33:07 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-25 21:54:18 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_rel
6 years, 9 months ago (2014-03-25 21:54:19 UTC) #19
skobes
The CQ bit was checked by skobes@chromium.org
6 years, 9 months ago (2014-03-25 21:57:48 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skobes@chromium.org/209353003/170001
6 years, 9 months ago (2014-03-25 21:57:58 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-25 22:28:19 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_rel
6 years, 9 months ago (2014-03-25 22:28:20 UTC) #23
skobes
On 2014/03/25 22:28:20, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 9 months ago (2014-03-25 22:30:46 UTC) #24
skobes
The CQ bit was checked by skobes@chromium.org
6 years, 9 months ago (2014-03-25 22:55:02 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skobes@chromium.org/209353003/170001
6 years, 9 months ago (2014-03-25 22:55:11 UTC) #26
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-25 23:01:35 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 9 months ago (2014-03-25 23:01:35 UTC) #28
skobes
The CQ bit was checked by skobes@chromium.org
6 years, 9 months ago (2014-03-25 23:09:28 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skobes@chromium.org/209353003/170001
6 years, 9 months ago (2014-03-25 23:09:35 UTC) #30
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-25 23:20:26 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_rel
6 years, 9 months ago (2014-03-25 23:20:27 UTC) #32
skobes
The CQ bit was checked by skobes@chromium.org
6 years, 9 months ago (2014-03-25 23:36:12 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skobes@chromium.org/209353003/280001
6 years, 9 months ago (2014-03-25 23:36:27 UTC) #34
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-25 23:46:30 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_compile_dbg
6 years, 9 months ago (2014-03-25 23:46:31 UTC) #36
skobes
The CQ bit was checked by skobes@chromium.org
6 years, 9 months ago (2014-03-25 23:53:41 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skobes@chromium.org/209353003/280001
6 years, 9 months ago (2014-03-25 23:53:49 UTC) #38
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-26 00:40:24 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 9 months ago (2014-03-26 00:40:25 UTC) #40
skobes
The CQ bit was checked by skobes@chromium.org
6 years, 9 months ago (2014-03-26 00:44:41 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skobes@chromium.org/209353003/280001
6 years, 9 months ago (2014-03-26 00:44:44 UTC) #42
commit-bot: I haz the power
Change committed as 169997
6 years, 9 months ago (2014-03-26 01:26:09 UTC) #43
vsevik
A revert of this CL has been created in https://codereview.chromium.org/212163006/ by vsevik@chromium.org. The reason for ...
6 years, 9 months ago (2014-03-26 12:21:23 UTC) #44
timvolodine
6 years, 9 months ago (2014-03-26 12:32:59 UTC) #45
Message was sent while issue was closed.
https://codereview.chromium.org/209353003/diff/20001/LayoutTests/fast/text-au...
File LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html
(right):

https://codereview.chromium.org/209353003/diff/20001/LayoutTests/fast/text-au...
LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html:12: <div
style="font-size: 2rem">
On 2014/03/25 18:25:26, skobes wrote:
> On 2014/03/25 13:08:14, timvolodine wrote:
> > so the 2 is due to setFontScaleFactor(2)? I understand there is no actual
> > autosizing (i.e. multiplier 320/320=1) involved here? if that's the case
maybe
> > add something to the explaining text.
> 
> I'm not following what you mean here.  Autosizing is how the font scale factor
> is implemented.

What I meant is that you are testing the accessibility setting only. Usually we
use width=800 for autosizing resulting in 800/320=2.5 multiplier. You seem to
use width=320, so if there was no call to setFontScaleFactor(2) the text would
not be autosized. In that this test differs from the others and that is what I
was trying to clarify. But this is just a nit ;), as it does not impact code or
functionality.

Powered by Google App Engine
This is Rietveld 408576698