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

Issue 197883013: [FastTextAutosizer] Refactor for understandability (Closed)

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

Description

[FastTextAutosizer] Refactor for understandability This patch is a followup to [1] to cleanup the dependencies on the old text autosizer. The largest change in this patch is to remove the "container" concept and rely only on clusters and blocks in the FastTextAutosizer. The big changes in this patch include: * formInputTags vector -> isFormInput(const Element*) Passing around a static vector was unnecessarily confusing. This patch refactors the formInput statics into a single function: isFormInput. * isAutosizingContainer -> !isExemptFromAutosizer The logic of isAutosizingContainer has been switched in isExemptFromAutosizer and I think the new name better reflects what this function does. * containerIsRowOfLinks -> blockContainsRowOfLinks * contentHeightIsConstrained -> blockHeightConstrained * containerContainsOneOfTags -> blockContainsFormInput * containerShouldBeAutosized -> !blockPreventedFromAutosizing The logic of containerShouldBeAutosized has been switched in blockPreventedFromAutosizing. I think this better reflects what this function does. * blockMightBecomeAutosizingCluster has been added. * isFingerprintingCandidate has been removed in favor of blockMightBecomeAutosizingCluster [1] https://codereview.chromium.org/200603002 BUG=302005 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169511

Patch Set 1 #

Total comments: 10

Patch Set 2 : Address reviewer comments + minor cleanups. #

Total comments: 5

Patch Set 3 : Address reviewer comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -128 lines) Patch
M Source/core/rendering/FastTextAutosizer.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/rendering/FastTextAutosizer.cpp View 1 2 15 chunks +100 lines, -127 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
pdr.
Ready for an initial review. It may be best to split this up.
6 years, 9 months ago (2014-03-16 00:40:12 UTC) #1
skobes
https://codereview.chromium.org/197883013/diff/1/Source/core/rendering/FastTextAutosizer.cpp File Source/core/rendering/FastTextAutosizer.cpp (right): https://codereview.chromium.org/197883013/diff/1/Source/core/rendering/FastTextAutosizer.cpp#newcode76 Source/core/rendering/FastTextAutosizer.cpp:76: static bool isExemptFromAutosizer(const RenderObject* renderer) If this returns false, ...
6 years, 9 months ago (2014-03-17 19:20:44 UTC) #2
pdr.
Thanks for the review. PTAL https://codereview.chromium.org/197883013/diff/1/Source/core/rendering/FastTextAutosizer.cpp File Source/core/rendering/FastTextAutosizer.cpp (right): https://codereview.chromium.org/197883013/diff/1/Source/core/rendering/FastTextAutosizer.cpp#newcode76 Source/core/rendering/FastTextAutosizer.cpp:76: static bool isExemptFromAutosizer(const RenderObject* ...
6 years, 9 months ago (2014-03-18 21:55:00 UTC) #3
skobes
https://codereview.chromium.org/197883013/diff/20001/Source/core/rendering/FastTextAutosizer.cpp File Source/core/rendering/FastTextAutosizer.cpp (right): https://codereview.chromium.org/197883013/diff/20001/Source/core/rendering/FastTextAutosizer.cpp#newcode259 Source/core/rendering/FastTextAutosizer.cpp:259: if (!block->isRenderView() && !blockMightBecomeAutosizingCluster(block)) It shouldn't be necessary to ...
6 years, 9 months ago (2014-03-19 00:04:33 UTC) #4
skobes
https://codereview.chromium.org/197883013/diff/20001/Source/core/rendering/FastTextAutosizer.cpp File Source/core/rendering/FastTextAutosizer.cpp (right): https://codereview.chromium.org/197883013/diff/20001/Source/core/rendering/FastTextAutosizer.cpp#newcode494 Source/core/rendering/FastTextAutosizer.cpp:494: // FIXME: This check wants to be blockMightBecomeAutosizingCluster but ...
6 years, 9 months ago (2014-03-19 00:09:58 UTC) #5
pdr.
PTAL https://codereview.chromium.org/197883013/diff/20001/Source/core/rendering/FastTextAutosizer.cpp File Source/core/rendering/FastTextAutosizer.cpp (right): https://codereview.chromium.org/197883013/diff/20001/Source/core/rendering/FastTextAutosizer.cpp#newcode259 Source/core/rendering/FastTextAutosizer.cpp:259: if (!block->isRenderView() && !blockMightBecomeAutosizingCluster(block)) On 2014/03/19 00:04:33, skobes ...
6 years, 9 months ago (2014-03-19 00:14:00 UTC) #6
skobes
lgtm The extra isRenderView() is probably left over from when we allowed the subtree layout ...
6 years, 9 months ago (2014-03-19 00:23:32 UTC) #7
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 9 months ago (2014-03-19 00:25:56 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pdr@chromium.org/197883013/30001
6 years, 9 months ago (2014-03-19 00:26:00 UTC) #9
commit-bot: I haz the power
6 years, 9 months ago (2014-03-19 02:54:06 UTC) #10
Message was sent while issue was closed.
Change committed as 169511

Powered by Google App Engine
This is Rietveld 408576698