Changeset 92626 in webkit


Ignore:
Timestamp:
Aug 8, 2011 1:13:48 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r92610.
http://trac.webkit.org/changeset/92610
https://bugs.webkit.org/show_bug.cgi?id=65868

Caused assertion failures when running fast/multicol tests
(Requested by andersca on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-08-08

PerformanceTests:

  • Layout/floats.html:

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj:
  • platform/PODIntervalTree.h:

(WebCore::PODIntervalTree::allOverlaps):
(WebCore::PODIntervalTree::searchForOverlapsFrom):

  • platform/PODRedBlackTree.h:

(WebCore::PODRedBlackTree::add):
(WebCore::PODRedBlackTree::remove):
(WebCore::PODRedBlackTree::contains):
(WebCore::PODRedBlackTree::visitInorder):
(WebCore::PODRedBlackTree::size):
(WebCore::PODRedBlackTree::checkInvariants):
(WebCore::PODRedBlackTree::dump):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::addOverflowFromFloats):
(WebCore::RenderBlock::repaintOverhangingFloats):
(WebCore::RenderBlock::paintFloats):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::removeFloatingObject):
(WebCore::RenderBlock::removeFloatingObjectsBelow):
(WebCore::RenderBlock::positionNewFloats):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):
(WebCore::RenderBlock::nextFloatLogicalBottomBelow):
(WebCore::RenderBlock::lowestFloatLogicalBottom):
(WebCore::RenderBlock::addPositionedFloats):
(WebCore::RenderBlock::clearFloats):
(WebCore::RenderBlock::addOverhangingFloats):
(WebCore::RenderBlock::hasOverhangingFloat):
(WebCore::RenderBlock::addIntrudingFloats):
(WebCore::RenderBlock::markSiblingsWithFloatsForLayout):
(WebCore::RenderBlock::hitTestFloats):
(WebCore::RenderBlock::adjustForBorderFit):
(WebCore::RenderBlock::FloatingObjects::clear):

  • rendering/RenderBlock.h:

(WebCore::RenderBlock::FloatingObject::FloatingObject):
(WebCore::RenderBlock::FloatingObject::setX):
(WebCore::RenderBlock::FloatingObject::setY):
(WebCore::RenderBlock::FloatingObject::setWidth):
(WebCore::RenderBlock::FloatingObject::setHeight):
(WebCore::RenderBlock::FloatingObject::setFrameRect):
(WebCore::RenderBlock::FloatingObjects::FloatingObjects):
(WebCore::RenderBlock::FloatingObjects::set):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::linkToEndLineIfNeeded):
(WebCore::RenderBlock::matchedEndLine):
(WebCore::RenderBlock::positionNewFloatOnLine):

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r92610 r92626  
     12011-08-08  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r92610.
     4        http://trac.webkit.org/changeset/92610
     5        https://bugs.webkit.org/show_bug.cgi?id=65868
     6
     7        Caused assertion failures when running fast/multicol tests
     8        (Requested by andersca on #webkit).
     9
     10        * Layout/floats.html:
     11
    1122011-08-08  Alexandru Chiculita  <achicu@adobe.com>
    213
  • trunk/PerformanceTests/Layout/floats.html

    r92610 r92626  
    3131            }
    3232
    33             function createSet(width, height, nested)
     33            function createSet(width, height)
    3434            {
    3535                var container = createElement("div", document.body, "container");
     
    3737                    for (var x = 0; x < width; ++x)
    3838                        createElement("div", container, "float", "float" + x + "_" + y);
    39 
    40                     var nestedContainer = container;
    41                     for ( ; nested > 0; --nested)
    42                         nestedContainer = createElement("div", nestedContainer, "nested", "nested" + x + "_" + nested);
    43                    
    4439                    createElement("div", container, "float-end", "end" + x)
    4540                }
     
    5348            }
    5449
    55             function test(width, height, nested)
     50            function test(width, height)
    5651            {
    57                 nested = nested || 0;
    58 
    5952                document.getElementById("test_panel").style.display = "none";
    6053                document.getElementById("framerate_panel").style.display = "block";
    6154
    62                 createSet(width, height, nested);
     55                createSet(width, height);
    6356                var updates = 0;
    6457                var startTime = new Date();
     
    9992            <button onclick="test(50, 100)">50 by 100</button>
    10093            <button onclick="test(100, 100)">100 by 100</button>
    101             <p>Nested divs:</p>
    102             <button onclick="test(2, 100, 100)">2 by 100, 100 nested</button>
    103             <button onclick="test(20, 100, 100)">20 by 100, 100 nested</button>
    104             <button onclick="test(50, 100, 100)">50 by 100, 100 nested</button>
    105             <button onclick="test(100, 100, 100)">100 by 100, 100 nested</button>
    10694        </div>
    10795    </body>
  • trunk/Source/WebCore/ChangeLog

    r92625 r92626  
     12011-08-08  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r92610.
     4        http://trac.webkit.org/changeset/92610
     5        https://bugs.webkit.org/show_bug.cgi?id=65868
     6
     7        Caused assertion failures when running fast/multicol tests
     8        (Requested by andersca on #webkit).
     9
     10        * WebCore.xcodeproj/project.pbxproj:
     11        * platform/PODIntervalTree.h:
     12        (WebCore::PODIntervalTree::allOverlaps):
     13        (WebCore::PODIntervalTree::searchForOverlapsFrom):
     14        * platform/PODRedBlackTree.h:
     15        (WebCore::PODRedBlackTree::add):
     16        (WebCore::PODRedBlackTree::remove):
     17        (WebCore::PODRedBlackTree::contains):
     18        (WebCore::PODRedBlackTree::visitInorder):
     19        (WebCore::PODRedBlackTree::size):
     20        (WebCore::PODRedBlackTree::checkInvariants):
     21        (WebCore::PODRedBlackTree::dump):
     22        * rendering/RenderBlock.cpp:
     23        (WebCore::RenderBlock::styleDidChange):
     24        (WebCore::RenderBlock::addOverflowFromFloats):
     25        (WebCore::RenderBlock::repaintOverhangingFloats):
     26        (WebCore::RenderBlock::paintFloats):
     27        (WebCore::RenderBlock::selectionGaps):
     28        (WebCore::RenderBlock::insertFloatingObject):
     29        (WebCore::RenderBlock::removeFloatingObject):
     30        (WebCore::RenderBlock::removeFloatingObjectsBelow):
     31        (WebCore::RenderBlock::positionNewFloats):
     32        (WebCore::RenderBlock::logicalLeftOffsetForLine):
     33        (WebCore::RenderBlock::logicalRightOffsetForLine):
     34        (WebCore::RenderBlock::nextFloatLogicalBottomBelow):
     35        (WebCore::RenderBlock::lowestFloatLogicalBottom):
     36        (WebCore::RenderBlock::addPositionedFloats):
     37        (WebCore::RenderBlock::clearFloats):
     38        (WebCore::RenderBlock::addOverhangingFloats):
     39        (WebCore::RenderBlock::hasOverhangingFloat):
     40        (WebCore::RenderBlock::addIntrudingFloats):
     41        (WebCore::RenderBlock::markSiblingsWithFloatsForLayout):
     42        (WebCore::RenderBlock::hitTestFloats):
     43        (WebCore::RenderBlock::adjustForBorderFit):
     44        (WebCore::RenderBlock::FloatingObjects::clear):
     45        * rendering/RenderBlock.h:
     46        (WebCore::RenderBlock::FloatingObject::FloatingObject):
     47        (WebCore::RenderBlock::FloatingObject::setX):
     48        (WebCore::RenderBlock::FloatingObject::setY):
     49        (WebCore::RenderBlock::FloatingObject::setWidth):
     50        (WebCore::RenderBlock::FloatingObject::setHeight):
     51        (WebCore::RenderBlock::FloatingObject::setFrameRect):
     52        (WebCore::RenderBlock::FloatingObjects::FloatingObjects):
     53        (WebCore::RenderBlock::FloatingObjects::set):
     54        * rendering/RenderBlockLineLayout.cpp:
     55        (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
     56        (WebCore::RenderBlock::linkToEndLineIfNeeded):
     57        (WebCore::RenderBlock::matchedEndLine):
     58        (WebCore::RenderBlock::positionNewFloatOnLine):
     59
    1602011-08-08  Emil A Eklund  <eae@chromium.org>
    261
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r92610 r92626  
    13371337                508CCA4F13CF106B003151F3 /* RenderFlowThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 508CCA4D13CF106B003151F3 /* RenderFlowThread.h */; };
    13381338                508CCA5013CF106B003151F3 /* RenderFlowThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 508CCA4E13CF106B003151F3 /* RenderFlowThread.cpp */; };
    1339                 5097C5A313EABA7E002DE4AF /* PODArena.h in Headers */ = {isa = PBXBuildFile; fileRef = 5097C59F13EABA7E002DE4AF /* PODArena.h */; settings = {ATTRIBUTES = (Private, ); }; };
    1340                 5097C5A413EABA7E002DE4AF /* PODInterval.h in Headers */ = {isa = PBXBuildFile; fileRef = 5097C5A013EABA7E002DE4AF /* PODInterval.h */; settings = {ATTRIBUTES = (Private, ); }; };
    1341                 5097C5A513EABA7E002DE4AF /* PODIntervalTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 5097C5A113EABA7E002DE4AF /* PODIntervalTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
    1342                 5097C5A613EABA7E002DE4AF /* PODRedBlackTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 5097C5A213EABA7E002DE4AF /* PODRedBlackTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
    13431339                50E566D6139E38C500214433 /* CSSWrapShapes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 501BAAB11395114B00F7ACEB /* CSSWrapShapes.cpp */; };
    13441340                510184690B08602A004A825F /* CachedPage.h in Headers */ = {isa = PBXBuildFile; fileRef = 510184670B08602A004A825F /* CachedPage.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    79427938                508CCA4D13CF106B003151F3 /* RenderFlowThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderFlowThread.h; sourceTree = "<group>"; };
    79437939                508CCA4E13CF106B003151F3 /* RenderFlowThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderFlowThread.cpp; sourceTree = "<group>"; };
    7944                 5097C59F13EABA7E002DE4AF /* PODArena.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODArena.h; sourceTree = "<group>"; };
    7945                 5097C5A013EABA7E002DE4AF /* PODInterval.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODInterval.h; sourceTree = "<group>"; };
    7946                 5097C5A113EABA7E002DE4AF /* PODIntervalTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODIntervalTree.h; sourceTree = "<group>"; };
    7947                 5097C5A213EABA7E002DE4AF /* PODRedBlackTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODRedBlackTree.h; sourceTree = "<group>"; };
    79487940                510184670B08602A004A825F /* CachedPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedPage.h; sourceTree = "<group>"; };
    79497941                510184680B08602A004A825F /* CachedPage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedPage.cpp; sourceTree = "<group>"; };
     
    1901719009                        isa = PBXGroup;
    1901819010                        children = (
    19019                                 5097C59F13EABA7E002DE4AF /* PODArena.h */,
    19020                                 5097C5A013EABA7E002DE4AF /* PODInterval.h */,
    19021                                 5097C5A113EABA7E002DE4AF /* PODIntervalTree.h */,
    19022                                 5097C5A213EABA7E002DE4AF /* PODRedBlackTree.h */,
    1902319011                                49E912A40EFAC8E6009D0CAF /* animation */,
    1902419012                                FD31604012B026A300C1A359 /* audio */,
     
    2336723355                                977E2E0F12F0FC9C00C13379 /* XSSAuditor.h in Headers */,
    2336823356                                FD537353137B651800008DCE /* ZeroPole.h in Headers */,
    23369                                 5097C5A313EABA7E002DE4AF /* PODArena.h in Headers */,
    23370                                 5097C5A413EABA7E002DE4AF /* PODInterval.h in Headers */,
    23371                                 5097C5A513EABA7E002DE4AF /* PODIntervalTree.h in Headers */,
    23372                                 5097C5A613EABA7E002DE4AF /* PODRedBlackTree.h in Headers */,
    2337323357                        );
    2337423358                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Source/WebCore/platform/PODIntervalTree.h

    r92610 r92626  
    4141#endif
    4242
    43 template <class T, class UserData = void*>
    44 class PODIntervalSearchAdapter {
    45 public:
    46     typedef PODInterval<T, UserData> IntervalType;
    47    
    48     PODIntervalSearchAdapter(Vector<IntervalType>& result, const T& lowValue, const T& highValue)
    49         : m_result(result)
    50         , m_lowValue(lowValue)
    51         , m_highValue(highValue)
    52     {
    53     }
    54    
    55     const T& lowValue() const { return m_lowValue; }
    56     const T& highValue() const { return m_highValue; }
    57     void collectIfNeeded(const IntervalType& data) const
    58     {
    59         if (data.overlaps(m_lowValue, m_highValue))
    60             m_result.append(data);
    61     }
    62 
    63 private:
    64     Vector<IntervalType>& m_result;
    65     T m_lowValue;
    66     T m_highValue;
    67 };
    68 
    6943// An interval tree, which is a form of augmented red-black tree. It
    7044// supports efficient (O(lg n)) insertion, removal and querying of
     
    7751    // this tree.
    7852    typedef PODInterval<T, UserData> IntervalType;
    79     typedef PODIntervalSearchAdapter<T, UserData> IntervalSearchAdapterType;
    80 
    81     PODIntervalTree(UninitializedTreeEnum unitializedTree)
    82         : PODRedBlackTree<IntervalType>(unitializedTree)
    83     {
    84         init();
    85     }
    86    
     53
    8754    PODIntervalTree()
    8855        : PODRedBlackTree<IntervalType>()
     
    11481        // Explicit dereference of "this" required because of
    11582        // inheritance rules in template classes.
    116         IntervalSearchAdapterType adapter(result, interval.low(), interval.high());
    117         searchForOverlapsFrom<IntervalSearchAdapterType>(this->root(), adapter);
    118     }
    119    
    120     template <class AdapterType>
    121     void allOverlapsWithAdapter(AdapterType& adapter) const
    122     {
    123         // Explicit dereference of "this" required because of
    124         // inheritance rules in template classes.
    125         searchForOverlapsFrom<AdapterType>(this->root(), adapter);
     83        searchForOverlapsFrom(this->root(), interval, result);
    12684    }
    12785
     
    155113    // interval to the result vector. The intervals are sorted by
    156114    // increasing low endpoint.
    157     template <class AdapterType>
    158     void searchForOverlapsFrom(IntervalNode* node, AdapterType& adapter) const
     115    void searchForOverlapsFrom(IntervalNode* node, const IntervalType& interval, Vector<IntervalType>& res) const
    159116    {
    160117        if (!node)
     
    169126            // This is phrased this way to avoid the need for operator
    170127            // <= on type T.
    171             && !(left->data().maxHigh() < adapter.lowValue()))
    172             searchForOverlapsFrom<AdapterType>(left, adapter);
     128            && !(left->data().maxHigh() < interval.low()))
     129            searchForOverlapsFrom(left, interval, res);
    173130
    174131        // Check for overlap with current node.
    175         adapter.collectIfNeeded(node->data());
     132        if (node->data().overlaps(interval))
     133            res.append(node->data());
    176134
    177135        // See whether we need to traverse the right subtree.
    178136        // This is phrased this way to avoid the need for operator <=
    179137        // on type T.
    180         if (!(adapter.highValue() < node->data().low()))
    181             searchForOverlapsFrom<AdapterType>(node->right(), adapter);
     138        if (!(interval.high() < node->data().low()))
     139            searchForOverlapsFrom(node->right(), interval, res);
    182140    }
    183141
  • trunk/Source/WebCore/platform/PODRedBlackTree.h

    r92611 r92626  
    9191#endif
    9292
    93 enum UninitializedTreeEnum {
    94     UninitializedTree
    95 };
    96 
    9793template<class T>
    9894class PODRedBlackTree {
     
    106102    };
    107103
    108     // Constructs a new red-black tree without allocating an arena.
    109     // isInitialized will return false in this case. initIfNeeded can be used
    110     // to init the structure. This constructor is usefull for creating
    111     // lazy initialized tree.
    112     PODRedBlackTree(UninitializedTreeEnum)
    113         : m_root(0)
    114         , m_needsFullOrderingComparisons(false)
    115 #ifndef NDEBUG
    116         , m_verboseDebugging(false)
    117 #endif
    118     {
    119     }
    120 
    121104    // Constructs a new red-black tree, allocating temporary objects
    122105    // from a newly constructed PODArena.
     
    145128    virtual ~PODRedBlackTree() { }
    146129
    147     // Clearing will delete the contents of the tree. After this call
    148     // isInitialized will return false.
    149     void clear()
    150     {
    151         m_arena = 0;
    152         m_root = 0;
    153     }
    154    
    155     bool isInitialized() const
    156     {
    157         return m_arena;
    158     }
    159    
    160     void initIfNeeded()
    161     {
    162         if (!m_arena)
    163             m_arena = PODArena::create();
    164     }
    165 
    166130    void add(const T& data)
    167131    {
    168         ASSERT(isInitialized());
    169132        Node* node = m_arena->allocateObject<Node, T>(data);
    170133        insertNode(node);
     
    174137    bool remove(const T& data)
    175138    {
    176         ASSERT(isInitialized());
    177139        Node* node = treeSearch(data);
    178140        if (node) {
     
    183145    }
    184146
    185     bool contains(const T& data) const
    186     {
    187         ASSERT(isInitialized());
    188         return treeSearch(data);
    189     }
     147    bool contains(const T& data) const { return treeSearch(data); }
    190148
    191149    void visitInorder(Visitor* visitor) const
    192150    {
    193         ASSERT(isInitialized());
    194151        if (!m_root)
    195152            return;
     
    199156    int size() const
    200157    {
    201         ASSERT(isInitialized());
    202158        Counter counter;
    203159        visitInorder(&counter);
     
    213169    virtual bool checkInvariants() const
    214170    {
    215         ASSERT(isInitialized());
    216171        int blackCount;
    217172        return checkInvariantsFromNode(m_root, &blackCount);
     
    223178    void dump() const
    224179    {
    225         if (m_arena)
    226             dumpFromNode(m_root, 0);
     180        dumpFromNode(m_root, 0);
    227181    }
    228182
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r92610 r92626  
    275275    if (diff == StyleDifferenceLayout && s_canPropagateFloatIntoSibling && !canPropagateFloatIntoSibling && hasOverhangingFloats()) {
    276276        RenderBlock* parentBlock = this;
    277         const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     277        FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    278278        FloatingObjectSetIterator end = floatingObjectSet.end();
    279279
     
    14371437        return;
    14381438
    1439     const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     1439    FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    14401440    FloatingObjectSetIterator end = floatingObjectSet.end();
    14411441    for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
     
    22952295    // in this block. Better yet would be to push extra state for the containers of other floats.
    22962296    LayoutStateDisabler layoutStateDisabler(view());
    2297     const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     2297    FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    22982298    FloatingObjectSetIterator end = floatingObjectSet.end();
    22992299    for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
     
    26282628        return;
    26292629
    2630     const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     2630    FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    26312631    FloatingObjectSetIterator end = floatingObjectSet.end();
    26322632    for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
     
    28802880                clipOutPositionedObjects(paintInfo, IntPoint(cb->x(), cb->y()), cb->m_positionedObjects.get()); // FIXME: Not right for flipped writing modes.
    28812881        if (m_floatingObjects) {
    2882             const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     2882            FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    28832883            FloatingObjectSetIterator end = floatingObjectSet.end();
    28842884            for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
     
    31913191    // Create the list of special objects if we don't aleady have one
    31923192    if (!m_floatingObjects)
    3193         m_floatingObjects = adoptPtr(new FloatingObjects(isHorizontalWritingMode()));
     3193        m_floatingObjects = adoptPtr(new FloatingObjects);
    31943194    else {
    31953195        // Don't insert the object again if it's already in the list
    3196         const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     3196        FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    31973197        FloatingObjectSetIterator it = floatingObjectSet.find<RenderBox*, FloatingObjectHashTranslator>(o);
    31983198        if (it != floatingObjectSet.end())
     
    32253225    newObj->m_renderer = o;
    32263226
    3227     m_floatingObjects->add(newObj);
     3227    m_floatingObjects->increaseObjectsCount(newObj->type());
     3228    m_floatingObjects->set().add(newObj);
    32283229   
    32293230    return newObj;
     
    32333234{
    32343235    if (m_floatingObjects) {
    3235         const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    3236         FloatingObjectSetIterator it = floatingObjectSet.find<RenderBox*, FloatingObjectHashTranslator>(o);
     3236        FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     3237        FloatingObjectSet::iterator it = floatingObjectSet.find<RenderBox*, FloatingObjectHashTranslator>(o);
    32373238        if (it != floatingObjectSet.end()) {
    32383239            FloatingObject* r = *it;
     
    32593260                markLinesDirtyInBlockRange(0, logicalBottom);
    32603261            }
    3261             m_floatingObjects->remove(r);
     3262            m_floatingObjects->decreaseObjectsCount(r->type());
     3263            floatingObjectSet.remove(it);
    32623264            ASSERT(!r->m_originatingLine);
    32633265            delete r;
     
    32713273        return;
    32723274   
    3273     const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     3275    FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    32743276    FloatingObject* curr = floatingObjectSet.last();
    32753277    while (curr != lastFloat && (!curr->isPlaced() || logicalTopForFloat(curr) >= logicalOffset)) {
    3276         m_floatingObjects->remove(curr);
     3278        m_floatingObjects->decreaseObjectsCount(curr->type());
     3279        floatingObjectSet.removeLast();
    32773280        ASSERT(!curr->m_originatingLine);
    32783281        delete curr;
     
    32863289        return false;
    32873290
    3288     const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     3291    FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    32893292    if (floatingObjectSet.isEmpty())
    32903293        return false;
     
    34013404        setLogicalHeightForFloat(floatingObject, logicalHeightForChild(childBox) + marginBeforeForChild(childBox) + marginAfterForChild(childBox));
    34023405
    3403         m_floatingObjects->addPlacedObject(floatingObject);
     3406        floatingObject->setIsPlaced();
    34043407
    34053408        // If the child moved, we have to repaint it.
     
    35033506#endif
    35043507
    3505 template <RenderBlock::FloatingObject::Type FloatTypeValue>
    3506 inline void RenderBlock::FloatIntervalSearchAdapter<FloatTypeValue>::collectIfNeeded(const IntervalType& interval) const
    3507 {
    3508     const FloatingObject* r = interval.data();
    3509     if (r->type() == FloatTypeValue && interval.low() <= m_value && m_value < interval.high()) {
    3510         // All the objects returned from the tree should be already placed.
    3511         ASSERT(r->isPlaced() && m_renderer->logicalTopForFloat(r) <= m_value && m_renderer->logicalBottomForFloat(r) > m_value);
    3512 
    3513         if (FloatTypeValue == FloatingObject::FloatLeft
    3514             && m_renderer->logicalRightForFloat(r) > m_offset) {
    3515             m_offset = m_renderer->logicalRightForFloat(r);
    3516             if (m_heightRemaining)
    3517                 *m_heightRemaining = m_renderer->logicalBottomForFloat(r) - m_value;
    3518         }
    3519 
    3520         if (FloatTypeValue == FloatingObject::FloatRight
    3521             && m_renderer->logicalLeftForFloat(r) < m_offset) {
    3522             m_offset = m_renderer->logicalLeftForFloat(r);
    3523             if (m_heightRemaining)
    3524                 *m_heightRemaining = m_renderer->logicalBottomForFloat(r) - m_value;
    3525         }
    3526     }
    3527 }
    3528 
     3508// FIXME: The logicalLeftOffsetForLine/logicalRightOffsetForLine functions are very slow if there are many floats
     3509// present. We need to add a structure to floating objects to represent "lines" of floats.  Then instead of checking
     3510// each float individually, we'd just walk backwards through the "lines" and stop when we hit a line that is fully above
     3511// the vertical offset that we'd like to check.  Computing the "lines" would be rather complicated, but could replace the left
     3512// objects and right objects count hack that is currently used here.
    35293513LayoutUnit RenderBlock::logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const
    35303514{
     
    35343518            *heightRemaining = 1;
    35353519
    3536         FloatIntervalSearchAdapter<FloatingObject::FloatLeft> adapter(this, logicalTop, left, heightRemaining);
    3537         m_floatingObjects->placedFloatsTree().allOverlapsWithAdapter(adapter);
     3520        // We know the list is non-empty, since we have "left" objects to search for.
     3521        // Therefore we can assume that begin != end, and that we can do at least one
     3522        // decrement.
     3523        FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     3524        FloatingObjectSetIterator begin = floatingObjectSet.begin();
     3525        FloatingObjectSetIterator it = floatingObjectSet.end();
     3526        do {
     3527            --it;
     3528            FloatingObject* r = *it;
     3529            if (r->isPlaced() && logicalTopForFloat(r) <= logicalTop && logicalBottomForFloat(r) > logicalTop
     3530                && r->type() == FloatingObject::FloatLeft
     3531                && logicalRightForFloat(r) > left) {
     3532                left = max(left, logicalRightForFloat(r));
     3533                if (heightRemaining)
     3534                    *heightRemaining = logicalBottomForFloat(r) - logicalTop;
     3535            }
     3536        } while (it != begin);
    35383537    }
    35393538
     
    35553554        if (heightRemaining)
    35563555            *heightRemaining = 1;
    3557 
    3558         FloatIntervalSearchAdapter<FloatingObject::FloatRight> adapter(this, logicalTop, right, heightRemaining);
    3559         m_floatingObjects->placedFloatsTree().allOverlapsWithAdapter(adapter);
     3556           
     3557        // We know the list is non-empty, since we have "right" objects to search for.
     3558        // Therefore we can assume that begin != end, and that we can do at least one
     3559        // decrement.
     3560        FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     3561        FloatingObjectSetIterator begin = floatingObjectSet.begin();
     3562        FloatingObjectSetIterator it = floatingObjectSet.end();
     3563        do {
     3564            --it;
     3565            FloatingObject* r = *it;
     3566            if (r->isPlaced() && logicalTopForFloat(r) <= logicalTop && logicalBottomForFloat(r) > logicalTop
     3567                && r->type() == FloatingObject::FloatRight
     3568                && logicalLeftForFloat(r) < right) {
     3569                right = min(right, logicalLeftForFloat(r));
     3570                if (heightRemaining)
     3571                    *heightRemaining = logicalBottomForFloat(r) - logicalTop;
     3572            }
     3573        } while (it != begin);
    35603574    }
    35613575   
     
    35823596
    35833597    int bottom = INT_MAX;
    3584     const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     3598    FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    35853599    FloatingObjectSetIterator end = floatingObjectSet.end();
    35863600    for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
     
    35993613        return 0;
    36003614    int lowestFloatBottom = 0;
    3601     const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     3615    FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    36023616    FloatingObjectSetIterator end = floatingObjectSet.end();
    36033617    for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
     
    36473661        setLogicalTopForFloat(floatingObject, logicalTopForChild(positionedObject) - marginBeforeForChild(positionedObject));
    36483662        setLogicalHeightForFloat(floatingObject, logicalHeightForChild(positionedObject) + marginBeforeForChild(positionedObject) + marginAfterForChild(positionedObject));
    3649 
    3650         m_floatingObjects->addPlacedObject(floatingObject);
     3663        floatingObject->setIsPlaced(true);
    36513664       
    36523665        m_hasPositionedFloats = true;
     
    36563669void RenderBlock::clearFloats(BlockLayoutPass layoutPass)
    36573670{
    3658     if (m_floatingObjects)
    3659         m_floatingObjects->setHorizontalWritingMode(isHorizontalWritingMode());
    3660 
    36613671    // Clear our positioned floats boolean.
    36623672    m_hasPositionedFloats = false;
     
    36773687
    36783688    if (m_floatingObjects) {
    3679         const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     3689        FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    36803690        if (childrenInline()) {
    3681             FloatingObjectSetIterator end = floatingObjectSet.end();
    3682             for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
     3691            FloatingObjectSet::iterator end = floatingObjectSet.end();
     3692            for (FloatingObjectSet::iterator it = floatingObjectSet.begin(); it != end; ++it) {
    36833693                FloatingObject* f = *it;
    36843694                floatMap.add(f->m_renderer, f);
     
    37323742        int changeLogicalBottom = numeric_limits<int>::min();
    37333743        if (m_floatingObjects) {
    3734             const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     3744            FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    37353745            FloatingObjectSetIterator end = floatingObjectSet.end();
    37363746            for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
     
    38143824                // We create the floating object list lazily.
    38153825                if (!m_floatingObjects)
    3816                     m_floatingObjects = adoptPtr(new FloatingObjects(isHorizontalWritingMode()));
    3817 
    3818                 m_floatingObjects->add(floatingObj);
     3826                    m_floatingObjects = adoptPtr(new FloatingObjects);
     3827
     3828                m_floatingObjects->increaseObjectsCount(floatingObj->type());
     3829                m_floatingObjects->set().add(floatingObj);
    38193830            }
    38203831        } else {
     
    38433854        return false;
    38443855
    3845     const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     3856    FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    38463857    FloatingObjectSetIterator it = floatingObjectSet.find<RenderBox*, FloatingObjectHashTranslator>(renderer);
    38473858    if (it == floatingObjectSet.end())
     
    38593870    logicalLeftOffset += (isHorizontalWritingMode() ? marginLeft() : marginTop());
    38603871
    3861     const FloatingObjectSet& prevSet = prev->m_floatingObjects->set();
     3872    FloatingObjectSet& prevSet = prev->m_floatingObjects->set();
    38623873    FloatingObjectSetIterator prevEnd = prevSet.end();
    38633874    for (FloatingObjectSetIterator prevIt = prevSet.begin(); prevIt != prevEnd; ++prevIt) {
     
    38873898                // We create the floating object list lazily.
    38883899                if (!m_floatingObjects)
    3889                     m_floatingObjects = adoptPtr(new FloatingObjects(isHorizontalWritingMode()));
    3890                 m_floatingObjects->add(floatingObj);
     3900                    m_floatingObjects = adoptPtr(new FloatingObjects);
     3901                m_floatingObjects->increaseObjectsCount(floatingObj->type());
     3902                m_floatingObjects->set().add(floatingObj);
    38913903            }
    38923904        }
     
    39293941void RenderBlock::markSiblingsWithFloatsForLayout()
    39303942{
    3931     const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     3943    FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    39323944    FloatingObjectSetIterator end = floatingObjectSet.end();
    39333945    for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
     
    40814093    }
    40824094
    4083     const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     4095    FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    40844096    FloatingObjectSetIterator begin = floatingObjectSet.begin();
    40854097    for (FloatingObjectSetIterator it = floatingObjectSet.end(); it != begin;) {
     
    56885700       
    56895701        if (m_floatingObjects) {
    5690             const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     5702            FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    56915703            FloatingObjectSetIterator end = floatingObjectSet.end();
    56925704            for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
     
    64326444{
    64336445    m_set.clear();
    6434     m_placedFloatsTree.clear();
    64356446    m_leftObjectsCount = 0;
    64366447    m_rightObjectsCount = 0;
     
    64586469}
    64596470
    6460 inline RenderBlock::FloatingObjectInterval RenderBlock::FloatingObjects::intervalForFloatingObject(FloatingObject* floatingObject)
    6461 {
    6462     if (m_horizontalWritingMode)
    6463         return RenderBlock::FloatingObjectInterval(floatingObject->y(), floatingObject->maxY(), floatingObject);
    6464     return RenderBlock::FloatingObjectInterval(floatingObject->x(), floatingObject->maxX(), floatingObject);
    6465 }
    6466 
    6467 void RenderBlock::FloatingObjects::addPlacedObject(FloatingObject* floatingObject)
    6468 {
    6469     ASSERT(!floatingObject->isInPlacedTree());
    6470 
    6471     floatingObject->setIsPlaced(true);
    6472     if (m_placedFloatsTree.isInitialized())
    6473         m_placedFloatsTree.add(intervalForFloatingObject(floatingObject));
    6474 
    6475 #ifndef NDEBUG
    6476     floatingObject->setIsInPlacedTree(true);     
    6477 #endif
    6478 }
    6479 
    6480 void RenderBlock::FloatingObjects::removePlacedObject(FloatingObject* floatingObject)
    6481 {
    6482     ASSERT(floatingObject->isPlaced() && floatingObject->isInPlacedTree());
    6483 
    6484     if (m_placedFloatsTree.isInitialized()) {
    6485         bool removed = m_placedFloatsTree.remove(intervalForFloatingObject(floatingObject));
    6486         ASSERT_UNUSED(removed, removed);
    6487     }
    6488    
    6489     floatingObject->setIsPlaced(false);
    6490 #ifndef NDEBUG
    6491     floatingObject->setIsInPlacedTree(false);
    6492 #endif
    6493 }
    6494 
    6495 inline void RenderBlock::FloatingObjects::add(FloatingObject* floatingObject)
    6496 {
    6497     increaseObjectsCount(floatingObject->type());
    6498     m_set.add(floatingObject);
    6499     if (floatingObject->isPlaced())
    6500         addPlacedObject(floatingObject);
    6501 }
    6502 
    6503 inline void RenderBlock::FloatingObjects::remove(FloatingObject* floatingObject)
    6504 {
    6505     decreaseObjectsCount(floatingObject->type());
    6506     m_set.remove(floatingObject);
    6507     ASSERT(floatingObject->isPlaced() || !floatingObject->isInPlacedTree());
    6508     if (floatingObject->isPlaced())
    6509         removePlacedObject(floatingObject);
    6510 }
    6511 
    6512 void RenderBlock::FloatingObjects::computePlacedFloatsTree()
    6513 {
    6514     ASSERT(!m_placedFloatsTree.isInitialized());
    6515     if (m_set.isEmpty())
    6516         return;
    6517     m_placedFloatsTree.initIfNeeded();
    6518     FloatingObjectSetIterator it = m_set.begin();
    6519     FloatingObjectSetIterator end = m_set.end();
    6520     for (; it != end; ++it) {
    6521         FloatingObject* floatingObject = *it;
    6522         if (floatingObject->isPlaced())
    6523             m_placedFloatsTree.add(intervalForFloatingObject(floatingObject));
    6524     }
    6525 }
    6526 
    65276471TextRun RenderBlock::constructTextRun(RenderObject* context, const Font& font, const UChar* characters, int length, RenderStyle* style, TextRun::ExpansionBehavior expansion, TextRunFlags flags)
    65286472{
     
    65596503}
    65606504
    6561 // These helpers are only used by the PODIntervalTree for debugging purposes.
    6562 String ValueToString<int>::string(const int value)
    6563 {
    6564     return String::number(value);
    6565 }
    6566 
    6567 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::FloatingObject* floatingObject)
    6568 {
    6569     return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x(), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY());
    6570 }
    6571 
    65726505#endif
    65736506
  • trunk/Source/WebCore/rendering/RenderBlock.h

    r92610 r92626  
    2525
    2626#include "GapRects.h"
    27 #include "PODIntervalTree.h"
    2827#include "RenderBox.h"
    2928#include "RenderLineBoxList.h"
     
    6968public:
    7069    friend class LineLayoutState;
    71 #ifndef NDEBUG
    72     // Used by the PODIntervalTree for debugging the FloatingObject.
    73     template <class> friend struct ValueToString;
    74 #endif
    75 
    7670    RenderBlock(Node*);
    7771    virtual ~RenderBlock();
     
    429423            , m_isDescendant(false)
    430424            , m_isPlaced(false)
    431 #ifndef NDEBUG
    432             , m_isInPlacedTree(false)
    433 #endif
    434425        {
    435426            ASSERT(type != NoFloat);
     
    451442            , m_isDescendant(false)
    452443            , m_isPlaced(true)
    453 #ifndef NDEBUG
    454             , m_isInPlacedTree(false)
    455 #endif
    456444        {
    457445        }
     
    470458        int height() const { return m_frameRect.height(); }
    471459
    472         void setX(int x) { ASSERT(!isInPlacedTree()); m_frameRect.setX(x); }
    473         void setY(int y) { ASSERT(!isInPlacedTree()); m_frameRect.setY(y); }
    474         void setWidth(int width) { ASSERT(!isInPlacedTree()); m_frameRect.setWidth(width); }
    475         void setHeight(int height) { ASSERT(!isInPlacedTree()); m_frameRect.setHeight(height); }
     460        void setX(int x) { m_frameRect.setX(x); }
     461        void setY(int y) { m_frameRect.setY(y); }
     462        void setWidth(int width) { m_frameRect.setWidth(width); }
     463        void setHeight(int height) { m_frameRect.setHeight(height); }
    476464
    477465        const IntRect& frameRect() const { ASSERT(isPlaced()); return m_frameRect; }
    478         void setFrameRect(const IntRect& frameRect) { ASSERT(!isInPlacedTree()); m_frameRect = frameRect; }
    479 
    480 #ifndef NDEBUG
    481         bool isInPlacedTree() const { return m_isInPlacedTree; }
    482         void setIsInPlacedTree(bool value) { m_isInPlacedTree = value; }
    483 #endif
     466        void setFrameRect(const IntRect& frameRect) { m_frameRect = frameRect; }
    484467
    485468        RenderBox* m_renderer;
     
    491474        bool m_isDescendant : 1;
    492475        bool m_isPlaced : 1;
    493 #ifndef NDEBUG
    494         bool m_isInPlacedTree : 1;
    495 #endif
    496476    };
    497477
     
    820800    typedef ListHashSet<FloatingObject*, 4, FloatingObjectHashFunctions> FloatingObjectSet;
    821801    typedef FloatingObjectSet::const_iterator FloatingObjectSetIterator;
    822     typedef PODInterval<LayoutUnit, FloatingObject*> FloatingObjectInterval;
    823     typedef PODIntervalTree<LayoutUnit, FloatingObject*> FloatingObjectTree;
    824    
    825     template <FloatingObject::Type FloatTypeValue>
    826     class FloatIntervalSearchAdapter {
    827     public:
    828         typedef FloatingObjectInterval IntervalType;
    829        
    830         FloatIntervalSearchAdapter(const RenderBlock* renderer, LayoutUnit value, LayoutUnit& offset, LayoutUnit* heightRemaining)
    831             : m_renderer(renderer)
    832             , m_value(value)
    833             , m_offset(offset)
    834             , m_heightRemaining(heightRemaining)
    835         {
    836         }
    837        
    838         inline LayoutUnit lowValue() const { return m_value; }
    839         inline LayoutUnit highValue() const { return m_value; }
    840         void collectIfNeeded(const IntervalType&) const;
    841 
    842     private:
    843         const RenderBlock* m_renderer;
    844         LayoutUnit m_value;
    845         LayoutUnit& m_offset;
    846         LayoutUnit* m_heightRemaining;
    847     };
    848 
    849802    class FloatingObjects {
    850803    public:
    851         FloatingObjects(bool horizontalWritingMode)
    852             : m_placedFloatsTree(UninitializedTree)
    853             , m_leftObjectsCount(0)
     804        FloatingObjects()
     805            : m_leftObjectsCount(0)
    854806            , m_rightObjectsCount(0)
    855807            , m_positionedObjectsCount(0)
    856             , m_horizontalWritingMode(horizontalWritingMode)
    857808        {
    858809        }
    859810
    860811        void clear();
    861         void add(FloatingObject*);
    862         void remove(FloatingObject*);
    863         void addPlacedObject(FloatingObject*);
    864         void removePlacedObject(FloatingObject*);
    865         void setHorizontalWritingMode(bool b = true) { m_horizontalWritingMode = b; }
    866 
     812        void increaseObjectsCount(FloatingObject::Type);
     813        void decreaseObjectsCount(FloatingObject::Type);
    867814        bool hasLeftObjects() const { return m_leftObjectsCount > 0; }
    868815        bool hasRightObjects() const { return m_rightObjectsCount > 0; }
    869816        bool hasPositionedObjects() const { return m_positionedObjectsCount > 0; }
    870         const FloatingObjectSet& set() const { return m_set; }
    871         const FloatingObjectTree& placedFloatsTree()
    872         {
    873             computePlacedFloatsTreeIfNeeded();
    874             return m_placedFloatsTree;
    875         }
     817        FloatingObjectSet& set() { return m_set; }
     818
    876819    private:
    877         void computePlacedFloatsTree();
    878         inline void computePlacedFloatsTreeIfNeeded()
    879         {
    880             if (!m_placedFloatsTree.isInitialized())
    881                 computePlacedFloatsTree();
    882         }
    883         void increaseObjectsCount(FloatingObject::Type);
    884         void decreaseObjectsCount(FloatingObject::Type);
    885         FloatingObjectInterval intervalForFloatingObject(FloatingObject*);
    886 
    887820        FloatingObjectSet m_set;
    888         FloatingObjectTree m_placedFloatsTree;
    889821        unsigned m_leftObjectsCount;
    890822        unsigned m_rightObjectsCount;
    891823        unsigned m_positionedObjectsCount;
    892         bool m_horizontalWritingMode;
    893824    };
    894825    OwnPtr<FloatingObjects> m_floatingObjects;
     
    965896void toRenderBlock(const RenderBlock*);
    966897
    967 #ifndef NDEBUG
    968 // These structures are used by PODIntervalTree for debugging purposes.
    969 template <> struct ValueToString<int> {
    970     static String string(const int value);
    971 };
    972 template<> struct ValueToString<RenderBlock::FloatingObject*> {
    973     static String string(const RenderBlock::FloatingObject*);
    974 };
    975 #endif
    976 
    977898} // namespace WebCore
    978899
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r92610 r92626  
    10921092
    10931093        if (m_floatingObjects && lastRootBox()) {
    1094             const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     1094            FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    10951095            FloatingObjectSetIterator it = floatingObjectSet.begin();
    10961096            FloatingObjectSetIterator end = floatingObjectSet.end();
     
    11731173        }
    11741174
    1175         const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     1175        FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    11761176        FloatingObjectSetIterator it = floatingObjectSet.begin();
    11771177        FloatingObjectSetIterator end = floatingObjectSet.end();
     
    14921492        int logicalBottom = lastLine->blockLogicalHeight() + abs(delta);
    14931493
    1494         const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     1494        FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    14951495        FloatingObjectSetIterator end = floatingObjectSet.end();
    14961496        for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
     
    15291529                int logicalBottom = lastLine->blockLogicalHeight() + abs(delta);
    15301530
    1531                 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     1531                FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    15321532                FloatingObjectSetIterator end = floatingObjectSet.end();
    15331533                for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
     
    25512551        return true;
    25522552
    2553     const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     2553    FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    25542554    ASSERT(floatingObjectSet.last() == newFloat);
    25552555
     
    25762576                toRenderBlock(o)->setChildNeedsLayout(true, false);
    25772577            o->layoutIfNeeded();
    2578             m_floatingObjects->removePlacedObject(f);
    25792578            setLogicalTopForFloat(f, logicalTopForFloat(f) + f->m_paginationStrut);
    2580             m_floatingObjects->addPlacedObject(f);
    25812579        }
    25822580    }
Note: See TracChangeset for help on using the changeset viewer.