Changeset 99024 in webkit


Ignore:
Timestamp:
Nov 1, 2011 6:33:15 PM (12 years ago)
Author:
leviw@chromium.org
Message:

Amend missing uses of LayoutUnit in RenderBlock
https://bugs.webkit.org/show_bug.cgi?id=71254

Reviewed by Darin Adler.

Switching relevant uses of integers in RenderBlock to LayoutUnits.

No new tests -- no changes in behavior.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::MarginInfo::MarginInfo):
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::adjustFloatingBlock):
(WebCore::RenderBlock::clearFloatsIfNeeded):
(WebCore::RenderBlock::layoutBlockChild):
(WebCore::RenderBlock::paintColumnRules):
(WebCore::RenderBlock::paintContents):
(WebCore::clipOutPositionedObjects):
(WebCore::RenderBlock::removeFloatingObject):
(WebCore::RenderBlock::nextFloatLogicalBottomBelow):
(WebCore::RenderBlock::getClearDelta):
(WebCore::positionForPointRespectingEditingBoundaries):
(WebCore::RenderBlock::calcColumnWidth):
(WebCore::RenderBlock::layoutColumns):
(WebCore::RenderBlock::adjustRectForColumns):
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
(WebCore::RenderBlock::baselinePosition):
(WebCore::getHeightForLineCount):
(WebCore::RenderBlock::setPaginationStrut):
(WebCore::RenderBlock::applyBeforeBreak):
(WebCore::RenderBlock::applyAfterBreak):
(WebCore::RenderBlock::adjustForUnsplittableChild):

  • rendering/RenderBlock.h:

(WebCore::RenderBlock::availableLogicalWidthForLine):
(WebCore::RenderBlock::paginationStrut):
(WebCore::RenderBlock::availableLogicalWidthForContent):
(WebCore::RenderBlock::FloatWithRect::FloatWithRect):
(WebCore::RenderBlock::MarginInfo::setPositiveMargin):
(WebCore::RenderBlock::MarginInfo::setNegativeMargin):
(WebCore::RenderBlock::MarginInfo::setPositiveMarginIfLarger):
(WebCore::RenderBlock::MarginInfo::setNegativeMarginIfLarger):
(WebCore::RenderBlock::MarginInfo::setMargin):
(WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter):
(WebCore::RenderBlock::FloatIntervalSearchAdapter::lowValue):
(WebCore::RenderBlock::FloatIntervalSearchAdapter::highValue):
(WebCore::RenderBlock::RenderBlockRareData::positiveMarginBeforeDefault):
(WebCore::RenderBlock::RenderBlockRareData::negativeMarginBeforeDefault):
(WebCore::RenderBlock::RenderBlockRareData::positiveMarginAfterDefault):
(WebCore::RenderBlock::RenderBlockRareData::negativeMarginAfterDefault):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r99022 r99024  
     12011-11-01  Levi Weintraub  <leviw@chromium.org>
     2
     3        Amend missing uses of LayoutUnit in RenderBlock
     4        https://bugs.webkit.org/show_bug.cgi?id=71254
     5
     6        Reviewed by Darin Adler.
     7
     8        Switching relevant uses of integers in RenderBlock to LayoutUnits.
     9
     10        No new tests -- no changes in behavior.
     11
     12        * rendering/RenderBlock.cpp:
     13        (WebCore::RenderBlock::MarginInfo::MarginInfo):
     14        (WebCore::RenderBlock::layoutBlock):
     15        (WebCore::RenderBlock::adjustFloatingBlock):
     16        (WebCore::RenderBlock::clearFloatsIfNeeded):
     17        (WebCore::RenderBlock::layoutBlockChild):
     18        (WebCore::RenderBlock::paintColumnRules):
     19        (WebCore::RenderBlock::paintContents):
     20        (WebCore::clipOutPositionedObjects):
     21        (WebCore::RenderBlock::removeFloatingObject):
     22        (WebCore::RenderBlock::nextFloatLogicalBottomBelow):
     23        (WebCore::RenderBlock::getClearDelta):
     24        (WebCore::positionForPointRespectingEditingBoundaries):
     25        (WebCore::RenderBlock::calcColumnWidth):
     26        (WebCore::RenderBlock::layoutColumns):
     27        (WebCore::RenderBlock::adjustRectForColumns):
     28        (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
     29        (WebCore::RenderBlock::baselinePosition):
     30        (WebCore::getHeightForLineCount):
     31        (WebCore::RenderBlock::setPaginationStrut):
     32        (WebCore::RenderBlock::applyBeforeBreak):
     33        (WebCore::RenderBlock::applyAfterBreak):
     34        (WebCore::RenderBlock::adjustForUnsplittableChild):
     35        * rendering/RenderBlock.h:
     36        (WebCore::RenderBlock::availableLogicalWidthForLine):
     37        (WebCore::RenderBlock::paginationStrut):
     38        (WebCore::RenderBlock::availableLogicalWidthForContent):
     39        (WebCore::RenderBlock::FloatWithRect::FloatWithRect):
     40        (WebCore::RenderBlock::MarginInfo::setPositiveMargin):
     41        (WebCore::RenderBlock::MarginInfo::setNegativeMargin):
     42        (WebCore::RenderBlock::MarginInfo::setPositiveMarginIfLarger):
     43        (WebCore::RenderBlock::MarginInfo::setNegativeMarginIfLarger):
     44        (WebCore::RenderBlock::MarginInfo::setMargin):
     45        (WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter):
     46        (WebCore::RenderBlock::FloatIntervalSearchAdapter::lowValue):
     47        (WebCore::RenderBlock::FloatIntervalSearchAdapter::highValue):
     48        (WebCore::RenderBlock::RenderBlockRareData::positiveMarginBeforeDefault):
     49        (WebCore::RenderBlock::RenderBlockRareData::negativeMarginBeforeDefault):
     50        (WebCore::RenderBlock::RenderBlockRareData::positiveMarginAfterDefault):
     51        (WebCore::RenderBlock::RenderBlockRareData::negativeMarginAfterDefault):
     52
    1532011-11-01  Luke Macpherson   <macpherson@chromium.org>
    254
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r98763 r99024  
    12421242        LayoutUnit oldHeight =  logicalHeight();
    12431243        LayoutUnit oldLogicalTop = logicalTop();
    1244         setLogicalHeight(INT_MAX / 2);
     1244        setLogicalHeight(numeric_limits<LayoutUnit>::max() / 2);
    12451245        computeLogicalHeight();
    12461246        enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage());
     
    17251725}
    17261726
    1727 LayoutUnit RenderBlock::clearFloatsIfNeeded(RenderBox* child, MarginInfo& marginInfo, int oldTopPosMargin, int oldTopNegMargin, int yPos)
     1727LayoutUnit RenderBlock::clearFloatsIfNeeded(RenderBox* child, MarginInfo& marginInfo, LayoutUnit oldTopPosMargin, LayoutUnit oldTopNegMargin, LayoutUnit yPos)
    17281728{
    17291729    LayoutUnit heightIncrease = getClearDelta(child, yPos);
     
    21362136    }
    21372137
    2138     // FIXME: Change to use roughlyEquals when we move to float.
    2139     // See https://bugs.webkit.org/show_bug.cgi?id=66148
    21402138    ASSERT(oldLayoutDelta == view()->layoutDelta());
    21412139}
     
    23892387    ColumnInfo* colInfo = columnInfo();
    23902388    unsigned colCount = columnCount(colInfo);
     2389
    23912390    bool antialias = shouldAntialiasLines(paintInfo.context);
    23922391
     
    25022501        return;
    25032502
     2503    // We don't want to hand off painting in the line box tree with the accumulated error of the render tree, as this will cause
     2504    // us to mess up painting aligned things (such as underlines in text) with both the render tree and line box tree's error.
     2505    LayoutPoint roundedPaintOffset = roundedIntPoint(paintOffset);
    25042506    if (childrenInline())
    2505         m_lineBoxes.paint(this, paintInfo, paintOffset);
     2507        m_lineBoxes.paint(this, paintInfo, roundedPaintOffset);
    25062508    else
    2507         paintChildren(paintInfo, paintOffset);
     2509        paintChildren(paintInfo, roundedPaintOffset);
    25082510}
    25092511
     
    28952897    for (RenderBlock::PositionedObjectsListHashSet::const_iterator it = positionedObjects->begin(); it != end; ++it) {
    28962898        RenderBox* r = *it;
    2897         paintInfo->context->clipOut(LayoutRect(offset.x() + r->x(), offset.y() + r->y(), r->width(), r->height()));
     2899        paintInfo->context->clipOut(IntRect(offset.x() + r->x(), offset.y() + r->y(), r->width(), r->height()));
    28982900    }
    28992901}
     
    32973299            FloatingObject* r = *it;
    32983300            if (childrenInline()) {
    3299                 int logicalTop = logicalTopForFloat(r);
    3300                 int logicalBottom = logicalBottomForFloat(r);
     3301                LayoutUnit logicalTop = logicalTopForFloat(r);
     3302                LayoutUnit logicalBottom = logicalBottomForFloat(r);
    33013303
    33023304                // Fix for https://bugs.webkit.org/show_bug.cgi?id=54995.
    3303                 if (logicalBottom < 0 || logicalBottom < logicalTop || logicalTop == numeric_limits<int>::max())
    3304                     logicalBottom = numeric_limits<int>::max();
     3305                if (logicalBottom < 0 || logicalBottom < logicalTop || logicalTop == numeric_limits<LayoutUnit>::max())
     3306                    logicalBottom = numeric_limits<LayoutUnit>::max();
    33053307                else {
    33063308                    // Special-case zero- and less-than-zero-height floats: those don't touch
     
    36913693    }
    36923694
    3693     return bottom == numeric_limits<LayoutUnit>::max() ? logicalHeight : bottom;
     3695    return bottom == numeric_limits<LayoutUnit>::max() ? 0 : bottom;
    36943696}
    36953697
     
    43134315        childLocation += child->relativePositionOffset();
    43144316    // FIXME: This is wrong if the child's writing-mode is different from the parent's.
    4315     LayoutPoint pointInChildCoordinates(pointInParentCoordinates - childLocation);
     4317    LayoutPoint pointInChildCoordinates(toLayoutPoint(pointInParentCoordinates - childLocation));
    43164318
    43174319    // If this is an anonymous renderer, we just recur normally
     
    44774479{   
    44784480    // Calculate our column width and column count.
     4481    // FIXME: Can overflow on fast/block/float/float-not-removed-from-next-sibling4.html, see https://bugs.webkit.org/show_bug.cgi?id=68744
    44794482    unsigned desiredColumnCount = 1;
    4480     int desiredColumnWidth = contentLogicalWidth();
     4483    LayoutUnit desiredColumnWidth = contentLogicalWidth();
    44814484   
    44824485    // For now, we don't support multi-column layouts when printing, since we have to do a lot of work for proper pagination.
     
    44864489    }
    44874490       
    4488     int availWidth = desiredColumnWidth;
    4489     int colGap = columnGap();
    4490     int colWidth = max(1, static_cast<int>(style()->columnWidth()));
    4491     int colCount = max(1, static_cast<int>(style()->columnCount()));
     4491    LayoutUnit availWidth = desiredColumnWidth;
     4492    LayoutUnit colGap = columnGap();
     4493    LayoutUnit colWidth = max<LayoutUnit>(1, LayoutUnit(style()->columnWidth()));
     4494    int colCount = max<int>(1, style()->columnCount());
    44924495
    44934496    if (style()->hasAutoColumnWidth() && !style()->hasAutoColumnCount()) {
    44944497        desiredColumnCount = colCount;
    4495         desiredColumnWidth = max<int>(0, (availWidth - ((desiredColumnCount - 1) * colGap)) / desiredColumnCount);
     4498        desiredColumnWidth = max<LayoutUnit>(0, (availWidth - ((desiredColumnCount - 1) * colGap)) / desiredColumnCount);
    44964499    } else if (!style()->hasAutoColumnWidth() && style()->hasAutoColumnCount()) {
    4497         desiredColumnCount = max<int>(1, (float)(availWidth + colGap) / (colWidth + colGap));
     4500        desiredColumnCount = max<LayoutUnit>(1, (availWidth + colGap) / (colWidth + colGap));
    44984501        desiredColumnWidth = ((availWidth + colGap) / desiredColumnCount) - colGap;
    44994502    } else {
    4500         desiredColumnCount = max(min<int>(colCount, (float)(availWidth + colGap) / (colWidth + colGap)), 1);
     4503        desiredColumnCount = max<LayoutUnit>(min<LayoutUnit>(colCount, (availWidth + colGap) / (colWidth + colGap)), 1);
    45014504        desiredColumnWidth = ((availWidth + colGap) / desiredColumnCount) - colGap;
    45024505    }
     
    45834586}
    45844587
    4585 bool RenderBlock::layoutColumns(bool hasSpecifiedPageLogicalHeight, int pageLogicalHeight, LayoutStateMaintainer& statePusher)
     4588bool RenderBlock::layoutColumns(bool hasSpecifiedPageLogicalHeight, LayoutUnit pageLogicalHeight, LayoutStateMaintainer& statePusher)
    45864589{
    45874590    if (!hasColumns())
     
    45994602            // maximum page break distance.
    46004603            if (!pageLogicalHeight) {
    4601                 LayoutUnit distanceBetweenBreaks = max(colInfo->maximumDistanceBetweenForcedBreaks(),
    4602                                                 view()->layoutState()->pageLogicalOffset(borderBefore() + paddingBefore() + contentLogicalHeight()) - colInfo->forcedBreakOffset());
     4604                LayoutUnit distanceBetweenBreaks = max<LayoutUnit>(colInfo->maximumDistanceBetweenForcedBreaks(),
     4605                                                                   view()->layoutState()->pageLogicalOffset(borderBefore() + paddingBefore() + contentLogicalHeight()) - colInfo->forcedBreakOffset());
    46034606                columnHeight = max(colInfo->minimumColumnHeight(), distanceBetweenBreaks);
    46044607            }
    46054608        } else if (contentLogicalHeight() > pageLogicalHeight * desiredColumnCount) {
    46064609            // Now that we know the intrinsic height of the columns, we have to rebalance them.
    4607             columnHeight = max(colInfo->minimumColumnHeight(), ceiledLayoutUnit((float)contentLogicalHeight() / desiredColumnCount));
     4610            columnHeight = max<LayoutUnit>(colInfo->minimumColumnHeight(), ceilf((float)contentLogicalHeight() / desiredColumnCount));
    46084611        }
    46094612       
     
    47244727    LayoutUnit startOffset = max(isHorizontal ? r.y() : r.x(), beforeBorderPadding);
    47254728    LayoutUnit endOffset = min<LayoutUnit>(isHorizontal ? r.maxY() : r.maxX(), beforeBorderPadding + colCount * colHeight);
    4726    
     4729
     4730    // FIXME: Can overflow on fast/block/float/float-not-removed-from-next-sibling4.html, see https://bugs.webkit.org/show_bug.cgi?id=68744
    47274731    unsigned startColumn = (startOffset - beforeBorderPadding) / colHeight;
    47284732    unsigned endColumn = (endOffset - beforeBorderPadding) / colHeight;
     
    47344738        LayoutRect colRect = columnRectAt(colInfo, startColumn);
    47354739        LayoutRect repaintRect = r;
     4740
    47364741        if (colInfo->progressionAxis() == ColumnInfo::InlineAxis) {
    47374742            if (isHorizontal)
     
    54385443            : (layer()->horizontalScrollbar() || layer()->scrollXOffset() != 0)))) || (isWritingModeRoot() && !isRubyRun());
    54395444       
    5440         int baselinePos = ignoreBaseline ? -1 : lastLineBoxBaseline();
     5445        int baselinePos = ignoreBaseline ? LayoutUnit(-1) : lastLineBoxBaseline();
    54415446       
    54425447        int bottomOfContent = direction == HorizontalLine ? borderTop() + paddingTop() + contentHeight() : borderRight() + paddingRight() + contentWidth();
     
    59545959}
    59555960
    5956 void RenderBlock::setPaginationStrut(int strut)
     5961void RenderBlock::setPaginationStrut(LayoutUnit strut)
    59575962{
    59585963    if (!m_rareData) {
     
    62856290}
    62866291
    6287 int RenderBlock::applyBeforeBreak(RenderBox* child, int logicalOffset)
     6292LayoutUnit RenderBlock::applyBeforeBreak(RenderBox* child, LayoutUnit logicalOffset)
    62886293{
    62896294    // FIXME: Add page break checking here when we support printing.
     
    63016306}
    63026307
    6303 int RenderBlock::applyAfterBreak(RenderBox* child, int logicalOffset, MarginInfo& marginInfo)
     6308LayoutUnit RenderBlock::applyAfterBreak(RenderBox* child, LayoutUnit logicalOffset, MarginInfo& marginInfo)
    63046309{
    63056310    // FIXME: Add page break checking here when we support printing.
  • trunk/Source/WebCore/rendering/RenderBlock.h

    r97282 r99024  
    130130    LayoutUnit availableLogicalWidthForLine(LayoutUnit position, bool firstLine, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage) const
    131131    {
    132         return max(0, logicalRightOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage)
     132        return max<LayoutUnit>(0, logicalRightOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage)
    133133            - logicalLeftOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage));
    134134    }
     
    231231    LayoutRect columnRectAt(ColumnInfo*, unsigned) const;
    232232
    233     int paginationStrut() const { return m_rareData ? m_rareData->m_paginationStrut : 0; }
    234     void setPaginationStrut(int);
     233    LayoutUnit paginationStrut() const { return m_rareData ? m_rareData->m_paginationStrut : 0; }
     234    void setPaginationStrut(LayoutUnit);
    235235   
    236236    // The page logical offset is the object's offset from the top of the page in the page progression
     
    297297    LayoutUnit availableLogicalWidthForContent(RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage) const
    298298    {
    299         return max(0, logicalRightOffsetForContent(region, offsetFromLogicalTopOfFirstPage) -
     299        return max<LayoutUnit>(0, logicalRightOffsetForContent(region, offsetFromLogicalTopOfFirstPage) -
    300300            logicalLeftOffsetForContent(region, offsetFromLogicalTopOfFirstPage)); }
    301301    LayoutUnit startOffsetForContent(RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage) const
     
    477477        FloatWithRect(RenderBox* f)
    478478            : object(f)
    479             , rect(IntRect(f->x() - f->marginLeft(), f->y() - f->marginTop(), f->width() + f->marginLeft() + f->marginRight(), f->height() + f->marginTop() + f->marginBottom()))
     479            , rect(LayoutRect(f->x() - f->marginLeft(), f->y() - f->marginTop(), f->width() + f->marginLeft() + f->marginRight(), f->height() + f->marginTop() + f->marginBottom()))
    480480            , everHadLayout(f->m_everHadLayout)
    481481        {
     
    483483
    484484        RenderBox* object;
    485         IntRect rect;
     485        LayoutRect rect;
    486486        bool everHadLayout;
    487487    };
     
    575575    LayoutUnit logicalRightForFloat(const FloatingObject* child) const { return isHorizontalWritingMode() ? child->maxX() : child->maxY(); }
    576576    LayoutUnit logicalWidthForFloat(const FloatingObject* child) const { return isHorizontalWritingMode() ? child->width() : child->height(); }
     577
    577578    void setLogicalTopForFloat(FloatingObject* child, LayoutUnit logicalTop)
    578579    {
     
    770771
    771772    void calcColumnWidth();
    772     bool layoutColumns(bool hasSpecifiedPageLogicalHeight, int pageLogicalHeight, LayoutStateMaintainer&);
     773    bool layoutColumns(bool hasSpecifiedPageLogicalHeight, LayoutUnit pageLogicalHeight, LayoutStateMaintainer&);
    773774    void makeChildrenAnonymousColumnBlocks(RenderObject* beforeChild, RenderBlock* newBlockBox, RenderObject* newChild);
    774775
     
    826827        void setMarginAfterQuirk(bool b) { m_marginAfterQuirk = b; }
    827828        void setDeterminedMarginBeforeQuirk(bool b) { m_determinedMarginBeforeQuirk = b; }
    828         void setPositiveMargin(int p) { m_positiveMargin = p; }
    829         void setNegativeMargin(int n) { m_negativeMargin = n; }
    830         void setPositiveMarginIfLarger(int p) { if (p > m_positiveMargin) m_positiveMargin = p; }
    831         void setNegativeMarginIfLarger(int n) { if (n > m_negativeMargin) m_negativeMargin = n; }
    832 
    833         void setMargin(int p, int n) { m_positiveMargin = p; m_negativeMargin = n; }
     829        void setPositiveMargin(LayoutUnit p) { m_positiveMargin = p; }
     830        void setNegativeMargin(LayoutUnit n) { m_negativeMargin = n; }
     831        void setPositiveMarginIfLarger(LayoutUnit p)
     832        {
     833            if (p > m_positiveMargin)
     834                m_positiveMargin = p;
     835        }
     836        void setNegativeMarginIfLarger(LayoutUnit n)
     837        {
     838            if (n > m_negativeMargin)
     839                m_negativeMargin = n;
     840        }
     841
     842        void setMargin(LayoutUnit p, LayoutUnit n) { m_positiveMargin = p; m_negativeMargin = n; }
    834843
    835844        bool atBeforeSideOfBlock() const { return m_atBeforeSideOfBlock; }
     
    855864    bool handleRunInChild(RenderBox* child);
    856865    LayoutUnit collapseMargins(RenderBox* child, MarginInfo&);
    857     LayoutUnit clearFloatsIfNeeded(RenderBox* child, MarginInfo&, int oldTopPosMargin, int oldTopNegMargin, int yPos);
     866    LayoutUnit clearFloatsIfNeeded(RenderBox* child, MarginInfo&, LayoutUnit oldTopPosMargin, LayoutUnit oldTopNegMargin, LayoutUnit yPos);
    858867    LayoutUnit estimateLogicalTopPosition(RenderBox* child, const MarginInfo&, LayoutUnit& estimateWithoutPagination);
    859868    void determineLogicalLeftPositionForChild(RenderBox* child);
     
    881890    bool hasNextPage(LayoutUnit logicalOffset, PageBoundaryRule = ExcludePageBoundary) const;
    882891
    883     int applyBeforeBreak(RenderBox* child, int logicalOffset); // If the child has a before break, then return a new yPos that shifts to the top of the next page/column.
    884     int applyAfterBreak(RenderBox* child, int logicalOffset, MarginInfo& marginInfo); // If the child has an after break, then return a new offset that shifts to the top of the next page/column.
     892    LayoutUnit applyBeforeBreak(RenderBox* child, LayoutUnit logicalOffset); // If the child has a before break, then return a new yPos that shifts to the top of the next page/column.
     893    LayoutUnit applyAfterBreak(RenderBox* child, LayoutUnit logicalOffset, MarginInfo&); // If the child has an after break, then return a new offset that shifts to the top of the next page/column.
    885894
    886895    LayoutUnit pageLogicalHeightForOffset(LayoutUnit offset) const;
     
    916925    typedef ListHashSet<FloatingObject*, 4, FloatingObjectHashFunctions> FloatingObjectSet;
    917926    typedef FloatingObjectSet::const_iterator FloatingObjectSetIterator;
    918     typedef PODInterval<LayoutUnit, FloatingObject*> FloatingObjectInterval;
    919     typedef PODIntervalTree<LayoutUnit, FloatingObject*> FloatingObjectTree;
     927    typedef PODInterval<int, FloatingObject*> FloatingObjectInterval;
     928    typedef PODIntervalTree<int, FloatingObject*> FloatingObjectTree;
    920929   
    921930    template <FloatingObject::Type FloatTypeValue>
     
    924933        typedef FloatingObjectInterval IntervalType;
    925934       
    926         FloatIntervalSearchAdapter(const RenderBlock* renderer, LayoutUnit value, LayoutUnit& offset, LayoutUnit* heightRemaining)
     935        FloatIntervalSearchAdapter(const RenderBlock* renderer, int value, LayoutUnit& offset, LayoutUnit* heightRemaining)
    927936            : m_renderer(renderer)
    928937            , m_value(value)
     
    932941        }
    933942       
    934         inline LayoutUnit lowValue() const { return m_value; }
    935         inline LayoutUnit highValue() const { return m_value; }
     943        inline int lowValue() const { return m_value; }
     944        inline int highValue() const { return m_value; }
    936945        void collectIfNeeded(const IntervalType&) const;
    937946
    938947    private:
    939948        const RenderBlock* m_renderer;
    940         LayoutUnit m_value;
     949        int m_value;
    941950        LayoutUnit& m_offset;
    942951        LayoutUnit* m_heightRemaining;
     
    10041013        }
    10051014
    1006         static int positiveMarginBeforeDefault(const RenderBlock* block)
     1015        static LayoutUnit positiveMarginBeforeDefault(const RenderBlock* block)
    10071016        {
    10081017            return std::max<LayoutUnit>(block->marginBefore(), 0);
    10091018        }
    10101019       
    1011         static int negativeMarginBeforeDefault(const RenderBlock* block)
     1020        static LayoutUnit negativeMarginBeforeDefault(const RenderBlock* block)
    10121021        {
    10131022            return std::max<LayoutUnit>(-block->marginBefore(), 0);
    10141023        }
    1015         static int positiveMarginAfterDefault(const RenderBlock* block)
     1024        static LayoutUnit positiveMarginAfterDefault(const RenderBlock* block)
    10161025        {
    10171026            return std::max<LayoutUnit>(block->marginAfter(), 0);
    10181027        }
    1019         static int negativeMarginAfterDefault(const RenderBlock* block)
     1028        static LayoutUnit negativeMarginAfterDefault(const RenderBlock* block)
    10201029        {
    10211030            return std::max<LayoutUnit>(-block->marginAfter(), 0);
Note: See TracChangeset for help on using the changeset viewer.