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

Issue 263563006: [FastTextAutosizer] Remove printing checks from enabled() (Closed)

Created:
6 years, 7 months ago by pdr.
Modified:
6 years, 7 months ago
Reviewers:
skobes
CC:
blink-reviews, blink-reviews-rendering, bemjb+rendering_chromium.org, dsinclair, zoltan1, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, pdr., rune+blink
Visibility:
Public.

Description

[FastTextAutosizer] Remove printing checks from enabled() This is first of two patches to refactor our enabled() code for understandability. This patch removes the document->printing() check from enabled() and refactors updatePageInfo to reduce duplicated code. When printing is enabled / disabled, updatePageInfo is always called which is what enables this refactoring. Printing doesn't change often so there's no reason to check it multiple times for each block :) Cleanups: 1) enabled() has been merged into shouldHandleLayout() since all callers always checked both. 2) We had duplicated logic for the two cases when we should reset multipliers in updatePageInfo. These have been combined and changing "m_hasAutosized" has been moved out of resetMultipliers and into updatePageInfo so almost no PageInfo-related state is modified outside updatePageInfo. 3) Unnecessary calls to m_document->page()->mainFrame() have been removed in updatePageInfo. This change is a little messy but I hope it's clear how much of this will be cleaned up once enabled() goes away. Slimming down enabled() will be a perf win as well. BUG=367864 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173020

Patch Set 1 #

Total comments: 8

Patch Set 2 : Update per reviewer comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -51 lines) Patch
A LayoutTests/fast/text-autosizing/print-autosizing.html View 1 1 chunk +31 lines, -0 lines 0 comments Download
A LayoutTests/fast/text-autosizing/print-autosizing-expected.html View 1 chunk +25 lines, -0 lines 0 comments Download
M Source/core/rendering/FastTextAutosizer.cpp View 1 7 chunks +46 lines, -51 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
pdr.
6 years, 7 months ago (2014-04-30 04:40:55 UTC) #1
skobes
lgtm https://codereview.chromium.org/263563006/diff/1/LayoutTests/fast/text-autosizing/print-autosizing.html File LayoutTests/fast/text-autosizing/print-autosizing.html (right): https://codereview.chromium.org/263563006/diff/1/LayoutTests/fast/text-autosizing/print-autosizing.html#newcode16 LayoutTests/fast/text-autosizing/print-autosizing.html:16: onload = function() { I think if you ...
6 years, 7 months ago (2014-04-30 18:28:08 UTC) #2
pdr.
Thanks! Followup patch coming right up https://codereview.chromium.org/263563006/diff/1/LayoutTests/fast/text-autosizing/print-autosizing.html File LayoutTests/fast/text-autosizing/print-autosizing.html (right): https://codereview.chromium.org/263563006/diff/1/LayoutTests/fast/text-autosizing/print-autosizing.html#newcode16 LayoutTests/fast/text-autosizing/print-autosizing.html:16: onload = function() ...
6 years, 7 months ago (2014-04-30 18:49:01 UTC) #3
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 7 months ago (2014-04-30 18:49:05 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pdr@chromium.org/263563006/20001
6 years, 7 months ago (2014-04-30 18:49:23 UTC) #5
commit-bot: I haz the power
6 years, 7 months ago (2014-04-30 19:51:54 UTC) #6
Message was sent while issue was closed.
Change committed as 173020

Powered by Google App Engine
This is Rietveld 408576698