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 #
Messages
Total messages: 10 (0 generated)
|