12013-02-07 Anton Vayvod <avayvod@chromium.org>
2
3 [Text Autosizing] Refactor isAutosizingCluster.
4 https://bugs.webkit.org/show_bug.cgi?id=109093
5
6 Refactoring to create more flexible version of isAutosizingCluster since there're more types
7 of autosizing cluster now: narrower than the parent cluster, wider than the parent cluster
8 and the one that doesn't depend on the parent cluster.
9
10 Reviewed by NOBODY (OOPS!).
11
12 Refactoring, no test changes.
13
14 * rendering/TextAutosizer.cpp:
15
16 (WebCore::TextAutosizer::isNarrowDescendant):
17
18 Separate check for the container to be of the narrow-descendant type. Was a part of
19 isAutosizingCluster().
20
21 (WebCore::TextAutosizer::isWiderDescendant):
22
23 Separate check for the container to be of the wider-descendant type. Was a part of
24 isAutosizingCluster().
25
26 (WebCore::TextAutosizer::isIndependentDescendant):
27
28 Separate check for the container to be autosized separately from the ancestor cluster.
29 Checks for conditions independent of the aforementioned cluster.
30
31 (WebCore::TextAutosizer::isAutosizingCluster):
32
33 Handful method to check all separate conditions together.
34
35 (WebCore::TextAutosizer::processSubtree):
36 (WebCore::TextAutosizer::processCluster):
37 (WebCore::TextAutosizer::processContainer):
38 (WebCore::TextAutosizer::clusterShouldBeAutosized):
39 (WebCore::TextAutosizer::measureDescendantTextWidth):
40 (WebCore::TextAutosizer::findFirstTextLeafNotInCluster):
41
42 The methods above were updated to use new functions/arguments.
43
44 * rendering/TextAutosizer.h:
45
46 Updated/added method definitions.
47