⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 107303 in webkit


Ignore:
Timestamp:
Feb 9, 2012, 4:21:31 PM (15 years ago)
Author:
cevans@google.com
Message:

Merge 106694
BUG=112151
Review URL: https://chromiumcodereview.appspot.com/9371032

Location:
branches/chromium/1025
Files:
7 edited
4 copied

Legend:

Unmodified
Added
Removed
  • branches/chromium/1025/Source/WebCore/rendering/RenderBlock.cpp

    r106228 r107303  
    12081208}
    12091209
     1210void RenderBlock::computeInitialRegionRangeForBlock()
     1211{
     1212    if (inRenderFlowThread()) {
     1213        // Set our start and end regions. No regions above or below us will be considered by our children. They are
     1214        // effectively clamped to our region range.
     1215        LayoutUnit oldHeight =  logicalHeight();
     1216        LayoutUnit oldLogicalTop = logicalTop();
     1217        setLogicalHeight(numeric_limits<LayoutUnit>::max() / 2);
     1218        computeLogicalHeight();
     1219        enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage());
     1220        setLogicalHeight(oldHeight);
     1221        setLogicalTop(oldLogicalTop);
     1222    }
     1223}
     1224
     1225void RenderBlock::computeRegionRangeForBlock()
     1226{
     1227    if (inRenderFlowThread())
     1228        enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage());
     1229}
     1230
    12101231void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight, BlockLayoutPass layoutPass)
    12111232{
     
    12671288    RenderStyle* styleToUse = style();
    12681289    LayoutStateMaintainer statePusher(renderView, this, locationOffset(), hasColumns() || hasTransform() || hasReflection() || styleToUse->isFlippedBlocksWritingMode(), pageLogicalHeight, pageLogicalHeightChanged, colInfo);
    1269    
     1290
    12701291    if (inRenderFlowThread()) {
    12711292        // Regions changing widths can force us to relayout our children.
    12721293        if (logicalWidthChangedInRegions())
    12731294            relayoutChildren = true;
    1274    
    1275         // Set our start and end regions. No regions above or below us will be considered by our children. They are
    1276         // effectively clamped to our region range.
    1277         LayoutUnit oldHeight =  logicalHeight();
    1278         LayoutUnit oldLogicalTop = logicalTop();
    1279         setLogicalHeight(numeric_limits<LayoutUnit>::max() / 2);
    1280         computeLogicalHeight();
    1281         enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage());
    1282         setLogicalHeight(oldHeight);
    1283         setLogicalTop(oldLogicalTop);
    1284     }
     1295    }
     1296    computeInitialRegionRangeForBlock();
    12851297
    12861298    // We use four values, maxTopPos, maxTopNeg, maxBottomPos, and maxBottomNeg, to track
     
    13601372    bool needAnotherLayoutPass = layoutPositionedObjects(relayoutChildren || isRoot());
    13611373
    1362     if (inRenderFlowThread())
    1363         enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage());
     1374    computeRegionRangeForBlock();
    13641375
    13651376    // Add overflow from children (unless we're multi-column, since in that case all our child overflow is clipped anyway).
  • branches/chromium/1025/Source/WebCore/rendering/RenderBlock.h

    r106150 r107303  
    449449#endif
    450450
     451    void computeInitialRegionRangeForBlock();
     452    void computeRegionRangeForBlock();
    451453private:
    452454    virtual RenderObjectChildList* virtualChildren() { return children(); }
     
    469471    void addChildIgnoringContinuation(RenderObject* newChild, RenderObject* beforeChild);
    470472    void addChildToAnonymousColumnBlocks(RenderObject* newChild, RenderObject* beforeChild);
     473
    471474    virtual void addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, RenderObject* beforeChild = 0);
    472475   
  • branches/chromium/1025/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp

    r103209 r107303  
    229229    LayoutStateMaintainer statePusher(view(), this, LayoutSize(x(), y()), hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode());
    230230
     231    if (inRenderFlowThread()) {
     232        // Regions changing widths can force us to relayout our children.
     233        if (logicalWidthChangedInRegions())
     234            relayoutChildren = true;
     235    }
     236    computeInitialRegionRangeForBlock();
     237
    231238    LayoutSize previousSize = size();
    232239
     
    267274
    268275    bool needAnotherLayoutPass = layoutPositionedObjects(relayoutChildren || isRoot());
     276
     277    computeRegionRangeForBlock();
    269278
    270279    if (!isFloatingOrPositioned() && height() == 0) {
  • branches/chromium/1025/Source/WebCore/rendering/RenderFlexibleBox.cpp

    r106129 r107303  
    167167    LayoutStateMaintainer statePusher(view(), this, IntSize(x(), y()), hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode());
    168168
     169    if (inRenderFlowThread()) {
     170        // Regions changing widths can force us to relayout our children.
     171        if (logicalWidthChangedInRegions())
     172            relayoutChildren = true;
     173    }
     174    computeInitialRegionRangeForBlock();
     175
    169176    IntSize previousSize = size();
    170177
     
    193200
    194201    layoutPositionedObjects(relayoutChildren || isRoot());
     202
     203    computeRegionRangeForBlock();
    195204
    196205    // FIXME: css3/flexbox/repaint-rtl-column.html seems to repaint more overflow than it needs to.
  • branches/chromium/1025/Source/WebCore/rendering/RenderFlowThread.cpp

    r106281 r107303  
    205205{
    206206    ASSERT(renderRegion);
     207
    207208    m_regionRangeMap.clear();
    208209    m_regionList.remove(renderRegion);
     
    629630    RenderRegion* endRegion;
    630631    getRegionRangeForBox(box, startRegion, endRegion);
    631    
     632
    632633    for (RenderRegionList::iterator iter = m_regionList.find(startRegion); iter != m_regionList.end(); ++iter) {
    633634        RenderRegion* region = *iter;
     
    638639            break;
    639640    }
    640    
     641
     642#ifndef NDEBUG
     643    // We have to make sure we did not left any boxes with region info attached in regions.
     644    for (RenderRegionList::iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
     645        RenderRegion* region = *iter;
     646        if (!region->isValid())
     647            continue;
     648        ASSERT(!region->renderBoxRegionInfo(box));
     649    }
     650#endif
     651
    641652    m_regionRangeMap.remove(box);
    642653}
  • branches/chromium/1025/Source/WebCore/rendering/RenderRegion.cpp

    r106291 r107303  
    1414 *    provided with the distribution.
    1515 *
    16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY
     16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
    1717 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1818 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     
    4848    , m_isValid(false)
    4949    , m_hasCustomRegionStyle(false)
    50 #ifndef NDEBUG
    51     , m_insideRegionPaint(false)
    52 #endif
    5350{
    5451}
     
    135132        return;
    136133
    137 #ifndef NDEBUG
    138     m_insideRegionPaint = true;
    139 #endif
    140 
    141134    setRegionBoxesRegionStyle();
    142135    m_flowThread->paintIntoRegion(paintInfo, this, LayoutPoint(paintOffset.x() + borderLeft() + paddingLeft(), paintOffset.y() + borderTop() + paddingTop()));
    143136    restoreRegionBoxesOriginalStyle();
    144 
    145 #ifndef NDEBUG
    146     m_insideRegionPaint = false;
    147 #endif
    148137}
    149138
  • branches/chromium/1025/Source/WebCore/rendering/RenderRegion.h

    r106281 r107303  
    110110    bool m_isValid;
    111111    bool m_hasCustomRegionStyle;
    112 
    113 #ifndef NDEBUG
    114     bool m_insideRegionPaint;
    115 #endif
    116112};
    117113
Note: See TracChangeset for help on using the changeset viewer.