Commit e60f13c6 authored by pdr@chromium.org's avatar pdr@chromium.org

[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
parent 2392ca40
......@@ -212,7 +212,6 @@ private:
float widthFromBlock(const RenderBlock*);
float multiplierFromBlock(const RenderBlock*);
void applyMultiplier(RenderObject*, float);
bool mightBeWiderOrNarrowerDescendant(const RenderBlock*);
bool isWiderOrNarrowerDescendant(Cluster*);
bool isLayoutRoot(const RenderBlock*) const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment