[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 Review URL: https://codereview.chromium.org/197883013 git-svn-id: svn://svn.chromium.org/blink/trunk@169511 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
This diff is collapsed.
Please register or sign in to comment