Changeset 138111 in webkit


Ignore:
Timestamp:
Dec 18, 2012 8:33:14 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Text Autosizing: containers wider than their enclosing clusters should be autosized as separate clusters
https://bugs.webkit.org/show_bug.cgi?id=103627

Patch by Anton Vayvod <avayvod@chromium.org> on 2012-12-18
Reviewed by Julien Chaffraix.

Source/WebCore:

Some blocks of texts might be wider than their parent clusters and need to be autosized separately.

isAutosizingCluster() now checks for the width of the container being greater than the width of the lowest
common ancestor of the text nodes of the enclosing cluster. This block containing all text is passed to all
tree traversal methods.
An overloaded version is added for cases when we don't have the lowest common ancestor yet.

The change fixes several cases covered by existing tests.

  • rendering/TextAutosizer.cpp:

(WebCore::TextAutosizer::processSubtree):

Calls processCluster with a new number of arguments.

(WebCore::TextAutosizer::processCluster):

Passes block containing all text nodes into processContainer. Assertion removed since it can no longer be
checked without passing an additional parameter (the parent block containing all text) to the function
for the sake of this assertion only.

(WebCore::TextAutosizer::processContainer):

|parentBlockContainingAllText| parameter passed into isAutosizingCluster.

(WebCore::TextAutosizer::isAutosizingCluster(const RenderBlock*, const RenderBlock*)):

The overloaded method that is used when the render block checked is already known to be an autosizing
container and there's full information necessary to determine if it's a cluster like the parent block
containing all text within the enclosing cluster.
Considers a block a cluster if it is wider than its parent block containing all text within enclosing
cluster.

(WebCore::TextAutosizer::isAutosizingCluster(const RenderObject*)):

The overloaded method that checks for the given object to be an autosizing container first (for
convenience of the caller) and doesn't require information about the parent cluster. Used when such
information is not available, for example, in the process of retrieving the information for the parent
cluster or when looking for the root cluster in the tree.

(WebCore::TextAutosizer::clusterShouldBeAutosized):

Passes new parameter to measureDescendantTextWidth.

(WebCore::TextAutosizer::measureDescendantTextWidth):

Uses blockContainingAllText parameter to pass to isAutosizingCluster.

(WebCore::TextAutosizer::findDeepestBlockContainingAllText):

Assertion removed since it can no longer be checked without passing an additional parameter (the
parent block containing all text) to the function for the sake of this assertion only.

(WebCore::TextAutosizer::findFirstTextLeafNotInCluster):

Uses shorter isAutosizingCluster call.

LayoutTests:

Modified existing tests to reflect the new autosizing approach to handling of the elements that are
wider than the lowest common ancestor of the text nodes of the enclosing autosizing cluster.

  • fast/text-autosizing/cluster-wide-in-narrow-expected.html:
  • fast/text-autosizing/cluster-wide-in-narrow.html:
  • fast/text-autosizing/wide-child-expected.html:
  • fast/text-autosizing/wide-child.html:
  • fast/text-autosizing/wide-in-narrow-overflow-scroll-expected.html:
  • fast/text-autosizing/wide-in-narrow-overflow-scroll.html:
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r138107 r138111  
     12012-12-18  Anton Vayvod  <avayvod@chromium.org>
     2
     3        Text Autosizing: containers wider than their enclosing clusters should be autosized as separate clusters
     4        https://bugs.webkit.org/show_bug.cgi?id=103627
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        Modified existing tests to reflect the new autosizing approach to handling of the elements that are
     9        wider than the lowest common ancestor of the text nodes of the enclosing autosizing cluster.
     10
     11        * fast/text-autosizing/cluster-wide-in-narrow-expected.html:
     12        * fast/text-autosizing/cluster-wide-in-narrow.html:
     13        * fast/text-autosizing/wide-child-expected.html:
     14        * fast/text-autosizing/wide-child.html:
     15        * fast/text-autosizing/wide-in-narrow-overflow-scroll-expected.html:
     16        * fast/text-autosizing/wide-in-narrow-overflow-scroll.html:
     17
    1182012-12-18  Filip Pizlo  <fpizlo@apple.com>
    219
  • trunk/LayoutTests/fast/text-autosizing/cluster-wide-in-narrow-expected.html

    r129195 r138111  
    1818    </div>
    1919
    20     <div style="width: 800px; font-size: 1.25rem">
    21         This text should be autosized to just 20px computed font-size (16 * 400/320), since despite its width:800px it is part of the 400px wide root cluster.<br>
     20    <div style="width: 600px; font-size: 1.875rem">
     21        This text should be autosized to 30px computed font-size (16 * 600/320), since its width:600px makes it wider than the lowest common ancestor of its enclosing cluster, hence it will itself become a cluster.<br>
    2222        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    2323    </div>
    2424
    2525    <div style="font-size: 1.25rem">
    26         This text should similarly be autosized to 20px.<br>
     26        This text should be autosized to 20px computed font-size (16 * 400 / 320), since it's not an autosizing cluster itself and its parent element is the enclosing autosizing cluster which is 400px wide.<br>
    2727        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    2828    </div>
  • trunk/LayoutTests/fast/text-autosizing/cluster-wide-in-narrow.html

    r129195 r138111  
    2727    </div>
    2828
    29     <div style="width: 800px">
    30         This text should be autosized to just 20px computed font-size (16 * 400/320), since despite its width:800px it is part of the 400px wide root cluster.<br>
     29    <div style="width: 600px">
     30        This text should be autosized to 30px computed font-size (16 * 600/320), since its width:600px makes it wider than the lowest common ancestor of its enclosing cluster, hence it will itself become a cluster.<br>
    3131        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    3232    </div>
    3333
    3434    <div>
    35         This text should similarly be autosized to 20px.<br>
     35        This text should be autosized to 20px computed font-size (16 * 400 / 320), since it's not an autosizing cluster itself and its parent element is the enclosing autosizing cluster which is 400px wide.<br>
    3636        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    3737    </div>
  • trunk/LayoutTests/fast/text-autosizing/wide-child-expected.html

    r136047 r138111  
    1313
    1414<div style="width: 320px; font-size: 1rem">
    15         This text should not be autosized, as this div is the lowest common ancestor of the root cluster, and this div is narrow.<br>
     15    This text should not be autosized, as this div is the lowest common ancestor of the root cluster, and this div is narrow.<br>
    1616    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    17         <div style="width: 800px">
    18         This text should not be autosized since it doesn't affect the width of the parent block which is used to calculate the autosizing multiplier.<br>
    19         FIXME: Ideally this text should be autosized. Will need to be fixed later.<br>
     17    <div style="width: 800px; font-size: 2.5rem">
     18        This text should be autosized to 40px computed font size (16 * 800/320) since it's wider than the lowest common ancestor of its enclosing cluster so it becomes a cluster itself.<br>
    2019        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    2120    </div>
  • trunk/LayoutTests/fast/text-autosizing/wide-child.html

    r136047 r138111  
    2525    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    2626    <div style="width: 800px">
    27         This text should not be autosized since it doesn't affect the width of the parent block which is used to calculate the autosizing multiplier.<br>
    28         FIXME: Ideally this text should be autosized. Will need to be fixed later.<br>
     27        This text should be autosized to 40px computed font size (16 * 800/320) since it's wider than the lowest common ancestor of its enclosing cluster so it becomes a cluster itself.<br>
    2928        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    3029    </div>
  • trunk/LayoutTests/fast/text-autosizing/wide-in-narrow-overflow-scroll-expected.html

    r136047 r138111  
    1313
    1414<div style="width: 400px">
    15   <div style="overflow-x: scroll">
    16     <div style="width: 800px; font-size: 1.25rem">
    17         This text should be autosized to 20px computed font size (16 * 400/320), since this is part of the root cluster, whose text descendants are all contained within the 400px wide grandparent of this div.<br>
     15    <div style="overflow-x: scroll">
     16        <div style="width: 800px; font-size: 2.5rem">
     17            This text should be autosized to 40px computed font size (16 * 800/320) since it's wider than the lowest common ancestor of  its enclosing cluster so it becomes a cluster itself.<br>
     18            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
     19        </div>
     20    </div>
     21
     22    <div style="font-size: 1.25rem">
     23        This text should be autosized to 20px computed font size (16 * 400/320).<br>
    1824        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    1925    </div>
    20   </div>
    21 
    22   <div style="font-size: 1.25rem">
    23         This text should be autosized to 20px computed font size (16 * 400/320).<br>
    24         Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    25   </div>
    2626</div>
    2727
  • trunk/LayoutTests/fast/text-autosizing/wide-in-narrow-overflow-scroll.html

    r136047 r138111  
    2222
    2323<div style="width: 400px">
    24   <div style="overflow-x: scroll">
    25     <div style="width: 800px">
    26         This text should be autosized to 20px computed font size (16 * 400/320), since this is part of the root cluster, whose text descendants are all contained within the 400px wide grandparent of this div.<br>
     24    <div style="overflow-x: scroll">
     25        <div style="width: 800px">
     26            This text should be autosized to 40px computed font size (16 * 800/320) since it's wider than the lowest common ancestor of  its enclosing cluster so it becomes a cluster itself.<br>
     27            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
     28        </div>
     29    </div>
     30
     31    <div>
     32        This text should be autosized to 20px computed font size (16 * 400/320).<br>
    2733        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    2834    </div>
    29   </div>
    30 
    31   <div>
    32         This text should be autosized to 20px computed font size (16 * 400/320).<br>
    33         Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    34   </div>
    3535</div>
    3636
  • trunk/Source/WebCore/ChangeLog

    r138110 r138111  
     12012-12-18  Anton Vayvod  <avayvod@chromium.org>
     2
     3        Text Autosizing: containers wider than their enclosing clusters should be autosized as separate clusters
     4        https://bugs.webkit.org/show_bug.cgi?id=103627
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        Some blocks of texts might be wider than their parent clusters and need to be autosized separately.
     9
     10        isAutosizingCluster() now checks for the width of the container being greater than the width of the lowest
     11        common ancestor of the text nodes of the enclosing cluster. This block containing all text is passed to all
     12        tree traversal methods.
     13        An overloaded version is added for cases when we don't have the lowest common ancestor yet.
     14
     15        The change fixes several cases covered by existing tests.
     16
     17        * rendering/TextAutosizer.cpp:
     18        (WebCore::TextAutosizer::processSubtree):
     19
     20            Calls processCluster with a new number of arguments.
     21
     22        (WebCore::TextAutosizer::processCluster):
     23
     24            Passes block containing all text nodes into processContainer. Assertion removed since it can no longer be
     25            checked without passing an additional parameter (the parent block containing all text) to the function
     26            for the sake of this assertion only.
     27
     28        (WebCore::TextAutosizer::processContainer):
     29
     30            |parentBlockContainingAllText| parameter passed into isAutosizingCluster.
     31
     32        (WebCore::TextAutosizer::isAutosizingCluster(const RenderBlock*, const RenderBlock*)):
     33
     34            The overloaded method that is used when the render block checked is already known to be an autosizing
     35            container and there's full information necessary to determine if it's a cluster like the parent block
     36            containing all text within the enclosing cluster.
     37            Considers a block a cluster if it is wider than its parent block containing all text within enclosing
     38            cluster.
     39
     40        (WebCore::TextAutosizer::isAutosizingCluster(const RenderObject*)):
     41
     42            The overloaded method that checks for the given object to be an autosizing container first (for
     43            convenience of the caller) and doesn't require information about the parent cluster. Used when such
     44            information is not available, for example, in the process of retrieving the information for the parent
     45            cluster or when looking for the root cluster in the tree.
     46
     47        (WebCore::TextAutosizer::clusterShouldBeAutosized):
     48
     49            Passes new parameter to measureDescendantTextWidth.
     50
     51        (WebCore::TextAutosizer::measureDescendantTextWidth):
     52
     53            Uses blockContainingAllText parameter to pass to isAutosizingCluster.
     54
     55        (WebCore::TextAutosizer::findDeepestBlockContainingAllText):
     56
     57            Assertion removed since it can no longer be checked without passing an additional parameter (the
     58            parent block containing all text) to the function for the sake of this assertion only.
     59
     60        (WebCore::TextAutosizer::findFirstTextLeafNotInCluster):
     61            Uses shorter isAutosizingCluster call.
     62
    1632012-12-18  Alexey Proskuryakov  <ap@apple.com>
    264
  • trunk/Source/WebCore/rendering/TextAutosizer.cpp

    r137764 r138111  
    2727#include "Document.h"
    2828#include "InspectorInstrumentation.h"
     29#include "IntSize.h"
    2930#include "RenderObject.h"
    3031#include "RenderStyle.h"
     
    8687
    8788    RenderBlock* cluster = container;
    88     while (cluster && (!isAutosizingContainer(cluster) || !isAutosizingCluster(cluster)))
     89    while (cluster && !isAutosizingCluster(cluster))
    8990        cluster = cluster->containingBlock();
    9091
     
    9596void TextAutosizer::processCluster(RenderBlock* cluster, RenderBlock* container, RenderObject* subtreeRoot, const TextAutosizingWindowInfo& windowInfo)
    9697{
    97     ASSERT(isAutosizingCluster(cluster));
    98 
    9998    // Many pages set a max-width on their content. So especially for the
    10099    // RenderView, instead of just taking the width of |cluster| we find
     
    102101    // the cluster (i.e. the deepest wrapper block that contains all the text),
    103102    // and use its width instead.
    104     const RenderBlock* lowestCommonAncestor = findDeepestBlockContainingAllText(cluster);
    105     float commonAncestorWidth = lowestCommonAncestor->contentLogicalWidth();
     103    const RenderBlock* blockContainingAllText = findDeepestBlockContainingAllText(cluster);
     104    float textWidth = blockContainingAllText->contentLogicalWidth();
    106105
    107106    float multiplier = 1;
    108     if (clusterShouldBeAutosized(lowestCommonAncestor, commonAncestorWidth)) {
     107    if (clusterShouldBeAutosized(blockContainingAllText, textWidth)) {
    109108        int logicalWindowWidth = cluster->isHorizontalWritingMode() ? windowInfo.windowSize.width() : windowInfo.windowSize.height();
    110109        int logicalLayoutWidth = cluster->isHorizontalWritingMode() ? windowInfo.minLayoutSize.width() : windowInfo.minLayoutSize.height();
    111110        // Ignore box width in excess of the layout width, to avoid extreme multipliers.
    112         float logicalClusterWidth = std::min<float>(commonAncestorWidth, logicalLayoutWidth);
     111        float logicalClusterWidth = std::min<float>(textWidth, logicalLayoutWidth);
    113112
    114113        multiplier = logicalClusterWidth / logicalWindowWidth;
     
    117116    }
    118117
    119     processContainer(multiplier, container, subtreeRoot, windowInfo);
    120 }
    121 
    122 void TextAutosizer::processContainer(float multiplier, RenderBlock* container, RenderObject* subtreeRoot, const TextAutosizingWindowInfo& windowInfo)
     118    processContainer(multiplier, container, blockContainingAllText, subtreeRoot, windowInfo);
     119}
     120
     121void TextAutosizer::processContainer(float multiplier, RenderBlock* container, const RenderBlock* blockContainingAllText, RenderObject* subtreeRoot, const TextAutosizingWindowInfo& windowInfo)
    123122{
    124123    ASSERT(isAutosizingContainer(container));
    125124
    126     float localMultiplier = containerShouldbeAutosized(container) ? multiplier: 1;
     125    float localMultiplier = containerShouldBeAutosized(container) ? multiplier: 1;
    127126
    128127    RenderObject* descendant = nextInPreOrderSkippingDescendantsOfContainers(subtreeRoot, subtreeRoot);
     
    136135        } else if (isAutosizingContainer(descendant)) {
    137136            RenderBlock* descendantBlock = toRenderBlock(descendant);
    138             if (isAutosizingCluster(descendantBlock))
     137            if (isAutosizingCluster(descendantBlock, blockContainingAllText))
    139138                processCluster(descendantBlock, descendantBlock, descendantBlock, windowInfo);
    140139            else
    141                 processContainer(multiplier, descendantBlock, descendantBlock, windowInfo);
     140                processContainer(multiplier, descendantBlock, blockContainingAllText, descendantBlock, windowInfo);
    142141        }
    143142        descendant = nextInPreOrderSkippingDescendantsOfContainers(descendant, subtreeRoot);
     
    197196}
    198197
    199 bool TextAutosizer::isAutosizingCluster(const RenderBlock* renderer)
     198bool TextAutosizer::isAutosizingCluster(const RenderBlock* renderer, const RenderBlock* parentBlockContainingAllText)
    200199{
    201200    // "Autosizing clusters" are special autosizing containers within which we
    202201    // want to enforce a uniform text size multiplier, in the hopes of making
    203202    // the major sections of the page look internally consistent.
    204     // All their descendents (including other autosizing containers) must share
     203    // All their descendants (including other autosizing containers) must share
    205204    // the same multiplier, except for subtrees which are themselves clusters,
    206     // and some of their descendent containers might not be autosized at all
     205    // and some of their descendant containers might not be autosized at all
    207206    // (for example if their height is constrained).
    208207    // Additionally, clusterShouldBeAutosized requires each cluster to contain a
     
    213212    // flow roots correspond to box containers that behave somewhat
    214213    // independently from their parent (for example they don't overlap floats).
    215     // The definition of a flow flow root also conveniently includes most of the
     214    // The definition of a flow root also conveniently includes most of the
    216215    // ways that a box and its children can have significantly different width
    217216    // from the box's parent (we want to avoid having significantly different
    218217    // width blocks within a cluster, since the narrower blocks would end up
    219218    // larger than would otherwise be necessary).
     219    // Additionally, any containers that are wider than the |blockContainingAllText|
     220    // of their enclosing cluster also become clusters, since they need special
     221    // treatment due to their width.
    220222    ASSERT(isAutosizingContainer(renderer));
    221223
     
    228230        || renderer->hasColumns()
    229231        || renderer->containingBlock()->isHorizontalWritingMode() != renderer->isHorizontalWritingMode()
    230         || renderer->style()->isDisplayReplacedType();
     232        || renderer->style()->isDisplayReplacedType()
     233        || (parentBlockContainingAllText
     234            && renderer->contentLogicalWidth() > parentBlockContainingAllText->contentLogicalWidth());
    231235    // FIXME: Tables need special handling to multiply all their columns by
    232236    // the same amount even if they're different widths; so do hasColumns()
    233237    // containers, and probably flexboxes...
     238}
     239
     240bool TextAutosizer::isAutosizingCluster(const RenderObject* object)
     241{
     242    return isAutosizingContainer(object) && isAutosizingCluster(toRenderBlock(object), 0);
    234243}
    235244
     
    254263}
    255264
    256 bool TextAutosizer::containerShouldbeAutosized(const RenderBlock* container)
     265bool TextAutosizer::containerShouldBeAutosized(const RenderBlock* container)
    257266{
    258267    // Don't autosize block-level text that can't wrap (as it's likely to
     
    264273}
    265274
    266 bool TextAutosizer::clusterShouldBeAutosized(const RenderBlock* lowestCommonAncestor, float commonAncestorWidth)
     275bool TextAutosizer::clusterShouldBeAutosized(const RenderBlock* blockContainingAllText, float blockWidth)
    267276{
    268277    // Don't autosize clusters that contain less than 4 lines of text (in
     
    277286    // few lines of text you'll only need to pan across once or twice.
    278287    const float minLinesOfText = 4;
    279     float minTextWidth = commonAncestorWidth * minLinesOfText;
     288    float minTextWidth = blockWidth * minLinesOfText;
    280289    float textWidth = 0;
    281     measureDescendantTextWidth(lowestCommonAncestor, minTextWidth, textWidth);
     290    measureDescendantTextWidth(blockContainingAllText, blockContainingAllText, minTextWidth, textWidth);
    282291    if (textWidth >= minTextWidth)
    283292        return true;
     
    285294}
    286295
    287 void TextAutosizer::measureDescendantTextWidth(const RenderBlock* container, float minTextWidth, float& textWidth)
    288 {
    289     bool skipLocalText = !containerShouldbeAutosized(container);
     296void TextAutosizer::measureDescendantTextWidth(const RenderBlock* container, const RenderBlock* blockContainingAllText, float minTextWidth, float& textWidth)
     297{
     298    bool skipLocalText = !containerShouldBeAutosized(container);
    290299
    291300    RenderObject* descendant = nextInPreOrderSkippingDescendantsOfContainers(container, container);
     
    295304        } else if (isAutosizingContainer(descendant)) {
    296305            RenderBlock* descendantBlock = toRenderBlock(descendant);
    297             if (!isAutosizingCluster(descendantBlock))
    298                 measureDescendantTextWidth(descendantBlock, minTextWidth, textWidth);
     306            if (!isAutosizingCluster(descendantBlock, blockContainingAllText))
     307                measureDescendantTextWidth(descendantBlock, blockContainingAllText, minTextWidth, textWidth);
    299308        }
    300309        if (textWidth >= minTextWidth)
     
    322331const RenderBlock* TextAutosizer::findDeepestBlockContainingAllText(const RenderBlock* cluster)
    323332{
    324     ASSERT(isAutosizingCluster(cluster));
    325 
    326333    size_t firstDepth = 0;
    327334    const RenderObject* firstTextLeaf = findFirstTextLeafNotInCluster(cluster, firstDepth, FirstToLast);
     
    372379    const RenderObject* child = (direction == FirstToLast) ? parent->firstChild() : parent->lastChild();
    373380    while (child) {
    374         if (!isAutosizingContainer(child) || !isAutosizingCluster(toRenderBlock(child))) {
     381        if (!isAutosizingCluster(child)) {
    375382            const RenderObject* leaf = findFirstTextLeafNotInCluster(child, depth, direction);
    376383            if (leaf)
  • trunk/Source/WebCore/rendering/TextAutosizer.h

    r137738 r138111  
    2929#if ENABLE(TEXT_AUTOSIZING)
    3030
    31 #include "IntSize.h"
    3231#include <wtf/Noncopyable.h>
    3332#include <wtf/PassOwnPtr.h>
    34 #include <wtf/PassRefPtr.h>
    3533
    3634namespace WebCore {
     
    3937class RenderBlock;
    4038class RenderObject;
    41 class RenderStyle;
    4239class RenderText;
    4340struct TextAutosizingWindowInfo;
     
    6461
    6562    void processCluster(RenderBlock* cluster, RenderBlock* container, RenderObject* subtreeRoot, const TextAutosizingWindowInfo&);
    66     void processContainer(float multiplier, RenderBlock* container, RenderObject* subtreeRoot, const TextAutosizingWindowInfo&);
     63    void processContainer(float multiplier, RenderBlock* container, const RenderBlock* blockContainingAllText, RenderObject* subtreeRoot, const TextAutosizingWindowInfo&);
    6764
    6865    void setMultiplier(RenderObject*, float);
    6966
    7067    static bool isAutosizingContainer(const RenderObject*);
    71     static bool isAutosizingCluster(const RenderBlock*);
     68    static bool isAutosizingCluster(const RenderBlock*, const RenderBlock* parentBlockContainingAllText);
     69    static bool isAutosizingCluster(const RenderObject*);
    7270
    73     static bool containerShouldbeAutosized(const RenderBlock* container);
    74     static bool clusterShouldBeAutosized(const RenderBlock* lowestCommonAncestor, float commonAncestorWidth);
    75     static void measureDescendantTextWidth(const RenderBlock* container, float minTextWidth, float& textWidth);
     71    static bool containerShouldBeAutosized(const RenderBlock* container);
     72    static bool clusterShouldBeAutosized(const RenderBlock* blockContainingAllText, float blockWidth);
     73    static void measureDescendantTextWidth(const RenderBlock* container, const RenderBlock* blockContainingAllText, float minTextWidth, float& textWidth);
    7674
    7775    // Use to traverse the tree of descendants, excluding descendants of containers (but returning the containers themselves).
    78     static RenderObject* nextInPreOrderSkippingDescendantsOfContainers(const RenderObject* current, const RenderObject* stayWithin);
     76    static RenderObject* nextInPreOrderSkippingDescendantsOfContainers(const RenderObject*, const RenderObject* stayWithin);
    7977
    80     // Finds the lowest common ancestor of the first and the last descendant
    81     // text node (excluding those belonging to other autosizing clusters).
    8278    static const RenderBlock* findDeepestBlockContainingAllText(const RenderBlock* cluster);
    8379
Note: See TracChangeset for help on using the changeset viewer.