Changeset 90791 in webkit


Ignore:
Timestamp:
Jul 11, 2011 4:31:19 PM (13 years ago)
Author:
leviw@chromium.org
Message:

2011-07-11 Levi Weintraub <leviw@chromium.org>

Switch lineTop and lineBottom to new layout types
https://bugs.webkit.org/show_bug.cgi?id=64317

Reviewed by Eric Seidel.

Changing lineTop and lineBottom to LayoutUnits and preparing all uses
of them for the upcoming conversion.

No new tests, no new functionality.

  • rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::nodeAtPoint):
  • rendering/EllipsisBox.h:
  • rendering/GapRects.h: (WebCore::GapRects::left): (WebCore::GapRects::center): (WebCore::GapRects::right): (WebCore::GapRects::uniteLeft): (WebCore::GapRects::uniteCenter): (WebCore::GapRects::uniteRight): (WebCore::GapRects::operator LayoutRect):
  • rendering/InlineBox.cpp: (WebCore::InlineBox::nodeAtPoint):
  • rendering/InlineBox.h:
  • rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesInBlockDirection): (WebCore::InlineFlowBox::flipLinesInBlockDirection): (WebCore::InlineFlowBox::computeOverflow): (WebCore::InlineFlowBox::setLayoutOverflow): (WebCore::InlineFlowBox::setVisualOverflow): (WebCore::InlineFlowBox::setOverflowFromLogicalRects): (WebCore::InlineFlowBox::nodeAtPoint):
  • rendering/InlineFlowBox.h: (WebCore::InlineFlowBox::layoutOverflowRect): (WebCore::InlineFlowBox::visualOverflowRect):
  • rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::nodeAtPoint):
  • rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::anyLineIntersectsRect):
  • rendering/RenderLineBoxList.h:
  • rendering/RenderListItem.cpp: (WebCore::RenderListItem::positionListMarker):
  • rendering/RenderTextControl.h:
  • rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::adjustControlHeightBasedOnLineHeight):
  • rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
  • rendering/RenderTextControlSingleLine.h:
  • rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::nodeAtPoint):
  • rendering/RootInlineBox.h: (WebCore::RootInlineBox::lineTop): (WebCore::RootInlineBox::lineBottom): (WebCore::RootInlineBox::setLineTopBottomPositions): (WebCore::RootInlineBox::logicalTopVisualOverflow): (WebCore::RootInlineBox::logicalBottomVisualOverflow): (WebCore::RootInlineBox::logicalTopLayoutOverflow): (WebCore::RootInlineBox::logicalBottomLayoutOverflow):
  • rendering/svg/SVGInlineFlowBox.h:
  • rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::nodeAtPoint):
  • rendering/svg/SVGInlineTextBox.h:
  • rendering/svg/SVGRootInlineBox.h:
Location:
trunk/Source/WebCore
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r90788 r90791  
     12011-07-11  Levi Weintraub  <leviw@chromium.org>
     2
     3        Switch lineTop and lineBottom to new layout types
     4        https://bugs.webkit.org/show_bug.cgi?id=64317
     5
     6        Reviewed by Eric Seidel.
     7
     8        Changing lineTop and lineBottom to LayoutUnits and preparing all uses
     9        of them for the upcoming conversion.
     10
     11        No new tests, no new functionality.
     12
     13        * rendering/EllipsisBox.cpp:
     14        (WebCore::EllipsisBox::nodeAtPoint):
     15        * rendering/EllipsisBox.h:
     16        * rendering/GapRects.h:
     17        (WebCore::GapRects::left):
     18        (WebCore::GapRects::center):
     19        (WebCore::GapRects::right):
     20        (WebCore::GapRects::uniteLeft):
     21        (WebCore::GapRects::uniteCenter):
     22        (WebCore::GapRects::uniteRight):
     23        (WebCore::GapRects::operator LayoutRect):
     24        * rendering/InlineBox.cpp:
     25        (WebCore::InlineBox::nodeAtPoint):
     26        * rendering/InlineBox.h:
     27        * rendering/InlineFlowBox.cpp:
     28        (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
     29        (WebCore::InlineFlowBox::flipLinesInBlockDirection):
     30        (WebCore::InlineFlowBox::computeOverflow):
     31        (WebCore::InlineFlowBox::setLayoutOverflow):
     32        (WebCore::InlineFlowBox::setVisualOverflow):
     33        (WebCore::InlineFlowBox::setOverflowFromLogicalRects):
     34        (WebCore::InlineFlowBox::nodeAtPoint):
     35        * rendering/InlineFlowBox.h:
     36        (WebCore::InlineFlowBox::layoutOverflowRect):
     37        (WebCore::InlineFlowBox::visualOverflowRect):
     38        * rendering/InlineTextBox.cpp:
     39        (WebCore::InlineTextBox::nodeAtPoint):
     40        * rendering/RenderLineBoxList.cpp:
     41        (WebCore::RenderLineBoxList::anyLineIntersectsRect):
     42        * rendering/RenderLineBoxList.h:
     43        * rendering/RenderListItem.cpp:
     44        (WebCore::RenderListItem::positionListMarker):
     45        * rendering/RenderTextControl.h:
     46        * rendering/RenderTextControlMultiLine.cpp:
     47        (WebCore::RenderTextControlMultiLine::adjustControlHeightBasedOnLineHeight):
     48        * rendering/RenderTextControlSingleLine.cpp:
     49        (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
     50        * rendering/RenderTextControlSingleLine.h:
     51        * rendering/RootInlineBox.cpp:
     52        (WebCore::RootInlineBox::nodeAtPoint):
     53        * rendering/RootInlineBox.h:
     54        (WebCore::RootInlineBox::lineTop):
     55        (WebCore::RootInlineBox::lineBottom):
     56        (WebCore::RootInlineBox::setLineTopBottomPositions):
     57        (WebCore::RootInlineBox::logicalTopVisualOverflow):
     58        (WebCore::RootInlineBox::logicalBottomVisualOverflow):
     59        (WebCore::RootInlineBox::logicalTopLayoutOverflow):
     60        (WebCore::RootInlineBox::logicalBottomLayoutOverflow):
     61        * rendering/svg/SVGInlineFlowBox.h:
     62        * rendering/svg/SVGInlineTextBox.cpp:
     63        (WebCore::SVGInlineTextBox::nodeAtPoint):
     64        * rendering/svg/SVGInlineTextBox.h:
     65        * rendering/svg/SVGRootInlineBox.h:
     66
    1672011-07-11  Martin Robinson  <mrobinson@igalia.com>
    268
  • trunk/Source/WebCore/rendering/EllipsisBox.cpp

    r90698 r90791  
    103103}
    104104
    105 bool EllipsisBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int lineTop, int lineBottom)
     105bool EllipsisBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
    106106{
    107107    LayoutPoint adjustedLocation = accumulatedOffset + roundedLayoutPoint(topLeft());
  • trunk/Source/WebCore/rendering/EllipsisBox.h

    r90600 r90791  
    4141
    4242    virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
    43     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int lineTop, int lineBottom);
     43    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom);
    4444    void setSelectionState(RenderObject::SelectionState s) { m_selectionState = s; }
    4545    IntRect selectionRect();
  • trunk/Source/WebCore/rendering/GapRects.h

    r39556 r90791  
    2424#define GapRects_h
    2525
    26 #include "IntRect.h"
     26#include "LayoutTypes.h"
    2727
    2828namespace WebCore {
    2929
    3030    struct GapRects {
    31         const IntRect& left() const { return m_left; }
    32         const IntRect& center() const { return m_center; }
    33         const IntRect& right() const { return m_right; }
     31        const LayoutRect& left() const { return m_left; }
     32        const LayoutRect& center() const { return m_center; }
     33        const LayoutRect& right() const { return m_right; }
    3434       
    35         void uniteLeft(const IntRect& r) { m_left.unite(r); }
    36         void uniteCenter(const IntRect& r) { m_center.unite(r); }
    37         void uniteRight(const IntRect& r) { m_right.unite(r); }
     35        void uniteLeft(const LayoutRect& r) { m_left.unite(r); }
     36        void uniteCenter(const LayoutRect& r) { m_center.unite(r); }
     37        void uniteRight(const LayoutRect& r) { m_right.unite(r); }
    3838        void unite(const GapRects& o) { uniteLeft(o.left()); uniteCenter(o.center()); uniteRight(o.right()); }
    3939
    40         operator IntRect() const
     40        operator LayoutRect() const
    4141        {
    42             IntRect result = m_left;
     42            LayoutRect result = m_left;
    4343            result.unite(m_center);
    4444            result.unite(m_right);
     
    5353
    5454    private:
    55         IntRect m_left;
    56         IntRect m_center;
    57         IntRect m_right;
     55        LayoutRect m_left;
     56        LayoutRect m_center;
     57        LayoutRect m_right;
    5858    };
    5959
  • trunk/Source/WebCore/rendering/InlineBox.cpp

    r90600 r90791  
    225225}
    226226
    227 bool InlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int /* lineTop */, int /*lineBottom*/)
     227bool InlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/)
    228228{
    229229    // Hit test all phases of replaced elements atomically, as though the replaced element established its
  • trunk/Source/WebCore/rendering/InlineBox.h

    r90600 r90791  
    128128
    129129    virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
    130     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int lineTop, int lineBottom);
     130    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom);
    131131
    132132    InlineBox* next() const { return m_next; }
  • trunk/Source/WebCore/rendering/InlineFlowBox.cpp

    r90600 r90791  
    573573}
    574574
    575 void InlineFlowBox::placeBoxesInBlockDirection(int top, int maxHeight, int maxAscent, bool strictMode, int& lineTop, int& lineBottom, bool& setLineTop,
    576                                                int& lineTopIncludingMargins, int& lineBottomIncludingMargins, bool& hasAnnotationsBefore, bool& hasAnnotationsAfter, FontBaseline baselineType)
     575void InlineFlowBox::placeBoxesInBlockDirection(int top, int maxHeight, int maxAscent, bool strictMode, LayoutUnit& lineTop, LayoutUnit& lineBottom, bool& setLineTop,
     576                                               LayoutUnit& lineTopIncludingMargins, LayoutUnit& lineBottomIncludingMargins, bool& hasAnnotationsBefore, bool& hasAnnotationsAfter, FontBaseline baselineType)
    577577{
    578578    bool isRootBox = isRootInlineBox();
     
    582582    }
    583583
    584     int adjustmentForChildrenWithSameLineHeightAndBaseline = 0;
     584    LayoutUnit adjustmentForChildrenWithSameLineHeightAndBaseline = 0;
    585585    if (descendantsHaveSameLineHeightAndBaseline()) {
    586586        adjustmentForChildrenWithSameLineHeightAndBaseline = logicalTop();
     
    608608                && !(inlineFlowBox->descendantsHaveSameLineHeightAndBaseline() && inlineFlowBox->hasTextDescendants()))
    609609                childAffectsTopBottomPos = false;
    610             int posAdjust = maxAscent - curr->baselinePosition(baselineType);
     610            LayoutUnit posAdjust = maxAscent - curr->baselinePosition(baselineType);
    611611            curr->setLogicalTop(curr->logicalTop() + top + posAdjust);
    612612        }
    613613       
    614         int newLogicalTop = curr->logicalTop();
    615         int newLogicalTopIncludingMargins = newLogicalTop;
    616         int boxHeight = curr->logicalHeight();
    617         int boxHeightIncludingMargins = boxHeight;
     614        LayoutUnit newLogicalTop = curr->logicalTop();
     615        LayoutUnit newLogicalTopIncludingMargins = newLogicalTop;
     616        LayoutUnit boxHeight = curr->logicalHeight();
     617        LayoutUnit boxHeightIncludingMargins = boxHeight;
    618618           
    619619        if (curr->isText() || curr->isInlineFlowBox()) {
     
    629629            RenderBox* box = toRenderBox(curr->renderer());
    630630            newLogicalTopIncludingMargins = newLogicalTop;
    631             int overSideMargin = curr->isHorizontal() ? box->marginTop() : box->marginRight();
    632             int underSideMargin = curr->isHorizontal() ? box->marginBottom() : box->marginLeft();
     631            LayoutUnit overSideMargin = curr->isHorizontal() ? box->marginTop() : box->marginRight();
     632            LayoutUnit underSideMargin = curr->isHorizontal() ? box->marginBottom() : box->marginLeft();
    633633            newLogicalTop += overSideMargin;
    634634            boxHeightIncludingMargins += overSideMargin + underSideMargin;
     
    649649                RenderRubyRun* rubyRun = toRenderRubyRun(curr->renderer());
    650650                if (RenderRubyBase* rubyBase = rubyRun->rubyBase()) {
    651                     int bottomRubyBaseLeading = (curr->logicalHeight() - rubyBase->logicalBottom()) + rubyBase->logicalHeight() - (rubyBase->lastRootBox() ? rubyBase->lastRootBox()->lineBottom() : 0);
    652                     int topRubyBaseLeading = rubyBase->logicalTop() + (rubyBase->firstRootBox() ? rubyBase->firstRootBox()->lineTop() : 0);
     651                    LayoutUnit bottomRubyBaseLeading = (curr->logicalHeight() - rubyBase->logicalBottom()) + rubyBase->logicalHeight() - (rubyBase->lastRootBox() ? rubyBase->lastRootBox()->lineBottom() : 0);
     652                    LayoutUnit topRubyBaseLeading = rubyBase->logicalTop() + (rubyBase->firstRootBox() ? rubyBase->firstRootBox()->lineTop() : 0);
    653653                    newLogicalTop += !renderer()->style()->isFlippedLinesWritingMode() ? topRubyBaseLeading : bottomRubyBaseLeading;
    654654                    boxHeight -= (topRubyBaseLeading + bottomRubyBaseLeading);
     
    704704}
    705705
    706 void InlineFlowBox::flipLinesInBlockDirection(int lineTop, int lineBottom)
     706void InlineFlowBox::flipLinesInBlockDirection(LayoutUnit lineTop, LayoutUnit lineBottom)
    707707{
    708708    // Flip the box on the line such that the top is now relative to the lineBottom instead of the lineTop.
     
    824824}
    825825
    826 void InlineFlowBox::computeOverflow(int lineTop, int lineBottom, GlyphOverflowAndFallbackFontsMap& textBoxDataMap)
     826void InlineFlowBox::computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, GlyphOverflowAndFallbackFontsMap& textBoxDataMap)
    827827{
    828828    // If we know we have no overflow, we can just bail.
     
    833833    // Layout overflow is used to determine scrolling extent, so it still includes child layers and also factors in
    834834    // transforms, relative positioning, etc.
    835     IntRect logicalLayoutOverflow(enclosingIntRect(logicalFrameRectIncludingLineHeight(lineTop, lineBottom)));
    836     IntRect logicalVisualOverflow(logicalLayoutOverflow);
     835    LayoutRect logicalLayoutOverflow(enclosingLayoutRect(logicalFrameRectIncludingLineHeight(lineTop, lineBottom)));
     836    LayoutRect logicalVisualOverflow(logicalLayoutOverflow);
    837837 
    838838    // box-shadow on root line boxes is applying to the block and not to the lines.
     
    848848            if (rt->isBR())
    849849                continue;
    850             IntRect textBoxOverflow(enclosingIntRect(text->logicalFrameRect()));
     850            LayoutRect textBoxOverflow(enclosingLayoutRect(text->logicalFrameRect()));
    851851            addTextBoxVisualOverflow(text, textBoxDataMap, textBoxOverflow);
    852852            logicalVisualOverflow.unite(textBoxOverflow);
     
    856856            if (!flow->boxModelObject()->hasSelfPaintingLayer())
    857857                logicalVisualOverflow.unite(flow->logicalVisualOverflowRect(lineTop, lineBottom));
    858             IntRect childLayoutOverflow = flow->logicalLayoutOverflowRect(lineTop, lineBottom);
     858            LayoutRect childLayoutOverflow = flow->logicalLayoutOverflowRect(lineTop, lineBottom);
    859859            childLayoutOverflow.move(flow->boxModelObject()->relativePositionLogicalOffset());
    860860            logicalLayoutOverflow.unite(childLayoutOverflow);
     
    866866}
    867867
    868 void InlineFlowBox::setLayoutOverflow(const IntRect& rect, int lineTop, int lineBottom)
    869 {
    870     IntRect frameBox = enclosingIntRect(frameRectIncludingLineHeight(lineTop, lineBottom));
     868void InlineFlowBox::setLayoutOverflow(const LayoutRect& rect, LayoutUnit lineTop, LayoutUnit lineBottom)
     869{
     870    LayoutRect frameBox = enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
    871871    if (frameBox.contains(rect) || rect.isEmpty())
    872872        return;
     
    878878}
    879879
    880 void InlineFlowBox::setVisualOverflow(const IntRect& rect, int lineTop, int lineBottom)
    881 {
    882     IntRect frameBox = enclosingIntRect(frameRectIncludingLineHeight(lineTop, lineBottom));
     880void InlineFlowBox::setVisualOverflow(const LayoutRect& rect, LayoutUnit lineTop, LayoutUnit lineBottom)
     881{
     882    LayoutRect frameBox = enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
    883883    if (frameBox.contains(rect) || rect.isEmpty())
    884884        return;
     
    890890}
    891891
    892 void InlineFlowBox::setOverflowFromLogicalRects(const IntRect& logicalLayoutOverflow, const IntRect& logicalVisualOverflow, int lineTop, int lineBottom)
    893 {
    894     IntRect layoutOverflow(isHorizontal() ? logicalLayoutOverflow : logicalLayoutOverflow.transposedRect());
     892void InlineFlowBox::setOverflowFromLogicalRects(const LayoutRect& logicalLayoutOverflow, const LayoutRect& logicalVisualOverflow, LayoutUnit lineTop, LayoutUnit lineBottom)
     893{
     894    LayoutRect layoutOverflow(isHorizontal() ? logicalLayoutOverflow : logicalLayoutOverflow.transposedRect());
    895895    setLayoutOverflow(layoutOverflow, lineTop, lineBottom);
    896896   
    897     IntRect visualOverflow(isHorizontal() ? logicalVisualOverflow : logicalVisualOverflow.transposedRect());
     897    LayoutRect visualOverflow(isHorizontal() ? logicalVisualOverflow : logicalVisualOverflow.transposedRect());
    898898    setVisualOverflow(visualOverflow, lineTop, lineBottom);
    899899}
    900900
    901 bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int lineTop, int lineBottom)
     901bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
    902902{
    903903    LayoutRect overflowRect(visualOverflowRect(lineTop, lineBottom));
  • trunk/Source/WebCore/rendering/InlineFlowBox.h

    r90600 r90791  
    110110    void paintBoxShadow(GraphicsContext*, RenderStyle*, ShadowStyle, const LayoutRect&);
    111111    virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
    112     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int lineTop, int lineBottom);
     112    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom);
    113113
    114114    virtual RenderLineBoxList* rendererLineBoxes() const;
     
    171171    void adjustMaxAscentAndDescent(int& maxAscent, int& maxDescent,
    172172                                   int maxPositionTop, int maxPositionBottom);
    173     void placeBoxesInBlockDirection(int logicalTop, int maxHeight, int maxAscent, bool strictMode, int& lineTop, int& lineBottom, bool& setLineTop,
    174                                     int& lineTopIncludingMargins, int& lineBottomIncludingMargins, bool& hasAnnotationsBefore, bool& hasAnnotationsAfter, FontBaseline);
    175     void flipLinesInBlockDirection(int lineTop, int lineBottom);
     173    void placeBoxesInBlockDirection(LayoutUnit logicalTop, LayoutUnit maxHeight, LayoutUnit maxAscent, bool strictMode, LayoutUnit& lineTop, LayoutUnit& lineBottom, bool& setLineTop,
     174                                    LayoutUnit& lineTopIncludingMargins, LayoutUnit& lineBottomIncludingMargins, bool& hasAnnotationsBefore, bool& hasAnnotationsAfter, FontBaseline);
     175    void flipLinesInBlockDirection(LayoutUnit lineTop, LayoutUnit lineBottom);
    176176    bool requiresIdeographicBaseline(const GlyphOverflowAndFallbackFontsMap&) const;
    177177
     
    179179    int computeUnderAnnotationAdjustment(int allowedPosition) const;
    180180
    181     void computeOverflow(int lineTop, int lineBottom, GlyphOverflowAndFallbackFontsMap&);
     181    void computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, GlyphOverflowAndFallbackFontsMap&);
    182182   
    183183    void removeChild(InlineBox* child);
     
    199199    LayoutRect layoutOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) const
    200200    {
    201         return m_overflow ? m_overflow->layoutOverflowRect() : enclosingIntRect(frameRectIncludingLineHeight(lineTop, lineBottom));
     201        return m_overflow ? m_overflow->layoutOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
    202202    }
    203203    LayoutUnit logicalLeftLayoutOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->minXLayoutOverflow() : m_overflow->minYLayoutOverflow()) : logicalLeft(); }
     
    225225    LayoutRect visualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) const
    226226    {
    227         return m_overflow ? m_overflow->visualOverflowRect() : enclosingIntRect(frameRectIncludingLineHeight(lineTop, lineBottom));
     227        return m_overflow ? m_overflow->visualOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
    228228    }
    229229    LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->minXVisualOverflow() : m_overflow->minYVisualOverflow()) : logicalLeft(); }
  • trunk/Source/WebCore/rendering/InlineTextBox.cpp

    r90600 r90791  
    346346}
    347347
    348 bool InlineTextBox::nodeAtPoint(const HitTestRequest&, HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int /* lineTop */, int /*lineBottom*/)
     348bool InlineTextBox::nodeAtPoint(const HitTestRequest&, HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/)
    349349{
    350350    if (isLineBreak())
  • trunk/Source/WebCore/rendering/RenderLineBoxList.cpp

    r90698 r90791  
    172172}
    173173
    174 bool RenderLineBoxList::anyLineIntersectsRect(RenderBoxModelObject* renderer, const IntRect& rect, const IntPoint& offset, bool usePrintRect, int outlineSize) const
     174bool RenderLineBoxList::anyLineIntersectsRect(RenderBoxModelObject* renderer, const LayoutRect& rect, const LayoutPoint& offset, bool usePrintRect, LayoutUnit outlineSize) const
    175175{
    176176    // We can check the first box and last box and avoid painting/hit testing if we don't
     
    180180    RootInlineBox* firstRootBox = firstLineBox()->root();
    181181    RootInlineBox* lastRootBox = lastLineBox()->root();
    182     int firstLineTop = firstLineBox()->logicalTopVisualOverflow(firstRootBox->lineTop());
     182    LayoutUnit firstLineTop = firstLineBox()->logicalTopVisualOverflow(firstRootBox->lineTop());
    183183    if (usePrintRect && !firstLineBox()->parent())
    184184        firstLineTop = min(firstLineTop, firstLineBox()->root()->lineTop());
    185     int lastLineBottom = lastLineBox()->logicalBottomVisualOverflow(lastRootBox->lineBottom());
     185    LayoutUnit lastLineBottom = lastLineBox()->logicalBottomVisualOverflow(lastRootBox->lineBottom());
    186186    if (usePrintRect && !lastLineBox()->parent())
    187187        lastLineBottom = max(lastLineBottom, lastLineBox()->root()->lineBottom());
    188     int logicalTop = firstLineTop - outlineSize;
    189     int logicalBottom = outlineSize + lastLineBottom;
     188    LayoutUnit logicalTop = firstLineTop - outlineSize;
     189    LayoutUnit logicalBottom = outlineSize + lastLineBottom;
    190190   
    191191    return rangeIntersectsRect(renderer, logicalTop, logicalBottom, rect, offset);
  • trunk/Source/WebCore/rendering/RenderLineBoxList.h

    r90667 r90791  
    6868   
    6969private:
    70     bool anyLineIntersectsRect(RenderBoxModelObject*, const IntRect&, const IntPoint&, bool usePrintRect = false, int outlineSize = 0) const;
    71     bool lineIntersectsDirtyRect(RenderBoxModelObject*, InlineFlowBox*, const PaintInfo&, const IntPoint&) const;
    72     bool rangeIntersectsRect(RenderBoxModelObject*, int logicalTop, int logicalBottom, const IntRect&, const IntPoint&) const;
     70    bool anyLineIntersectsRect(RenderBoxModelObject*, const LayoutRect&, const LayoutPoint&, bool usePrintRect = false, LayoutUnit outlineSize = 0) const;
     71    bool lineIntersectsDirtyRect(RenderBoxModelObject*, InlineFlowBox*, const PaintInfo&, const LayoutPoint&) const;
     72    bool rangeIntersectsRect(RenderBoxModelObject*, LayoutUnit logicalTop, LayoutUnit logicalBottom, const LayoutRect&, const LayoutPoint&) const;
    7373
    7474    // For block flows, each box represents the root inline box for a line in the
  • trunk/Source/WebCore/rendering/RenderListItem.cpp

    r90675 r90791  
    252252{
    253253    if (m_marker && m_marker->parent()->isBox() && !m_marker->isInside() && m_marker->inlineBoxWrapper()) {
    254         int markerOldLogicalLeft = m_marker->logicalLeft();
    255         int blockOffset = 0;
    256         int lineOffset = 0;
     254        LayoutUnit markerOldLogicalLeft = m_marker->logicalLeft();
     255        LayoutUnit blockOffset = 0;
     256        LayoutUnit lineOffset = 0;
    257257        for (RenderBox* o = m_marker->parentBox(); o != this; o = o->parentBox()) {
    258258            blockOffset += o->logicalTop();
     
    261261
    262262        bool adjustOverflow = false;
    263         int markerLogicalLeft;
     263        LayoutUnit markerLogicalLeft;
    264264        RootInlineBox* root = m_marker->inlineBoxWrapper()->root();
    265265        bool hitSelfPaintingLayer = false;
    266266       
    267267        RootInlineBox* rootBox = m_marker->inlineBoxWrapper()->root();
    268         int lineTop = rootBox->lineTop();
    269         int lineBottom = rootBox->lineBottom();
     268        LayoutUnit lineTop = rootBox->lineTop();
     269        LayoutUnit lineBottom = rootBox->lineBottom();
    270270
    271271        // FIXME: Need to account for relative positioning in the layout overflow.
    272272        if (style()->isLeftToRightDirection()) {
    273             int leftLineOffset = logicalLeftOffsetForLine(blockOffset, logicalLeftOffsetForLine(blockOffset, false), false);
     273            LayoutUnit leftLineOffset = logicalLeftOffsetForLine(blockOffset, logicalLeftOffsetForLine(blockOffset, false), false);
    274274            markerLogicalLeft = leftLineOffset - lineOffset - paddingStart() - borderStart() + m_marker->marginStart();
    275275            m_marker->inlineBoxWrapper()->adjustLineDirectionPosition(markerLogicalLeft - markerOldLogicalLeft);
    276276            for (InlineFlowBox* box = m_marker->inlineBoxWrapper()->parent(); box; box = box->parent()) {
    277                 IntRect newLogicalVisualOverflowRect = box->logicalVisualOverflowRect(lineTop, lineBottom);
    278                 IntRect newLogicalLayoutOverflowRect = box->logicalLayoutOverflowRect(lineTop, lineBottom);
     277                LayoutRect newLogicalVisualOverflowRect = box->logicalVisualOverflowRect(lineTop, lineBottom);
     278                LayoutRect newLogicalLayoutOverflowRect = box->logicalLayoutOverflowRect(lineTop, lineBottom);
    279279                if (markerLogicalLeft < newLogicalVisualOverflowRect.x() && !hitSelfPaintingLayer) {
    280280                    newLogicalVisualOverflowRect.setWidth(newLogicalVisualOverflowRect.maxX() - markerLogicalLeft);
     
    295295        } else {
    296296            markerLogicalLeft = m_marker->logicalLeft() + paddingStart() + borderStart() + m_marker->marginEnd();
    297             int rightLineOffset = logicalRightOffsetForLine(blockOffset, logicalRightOffsetForLine(blockOffset, false), false);
     297            LayoutUnit rightLineOffset = logicalRightOffsetForLine(blockOffset, logicalRightOffsetForLine(blockOffset, false), false);
    298298            markerLogicalLeft = rightLineOffset - lineOffset + paddingStart() + borderStart() + m_marker->marginEnd();
    299299            m_marker->inlineBoxWrapper()->adjustLineDirectionPosition(markerLogicalLeft - markerOldLogicalLeft);
    300300            for (InlineFlowBox* box = m_marker->inlineBoxWrapper()->parent(); box; box = box->parent()) {
    301                 IntRect newLogicalVisualOverflowRect = box->logicalVisualOverflowRect(lineTop, lineBottom);
    302                 IntRect newLogicalLayoutOverflowRect = box->logicalLayoutOverflowRect(lineTop, lineBottom);
     301                LayoutRect newLogicalVisualOverflowRect = box->logicalVisualOverflowRect(lineTop, lineBottom);
     302                LayoutRect newLogicalLayoutOverflowRect = box->logicalLayoutOverflowRect(lineTop, lineBottom);
    303303                if (markerLogicalLeft + m_marker->logicalWidth() > newLogicalVisualOverflowRect.maxX() && !hitSelfPaintingLayer) {
    304304                    newLogicalVisualOverflowRect.setWidth(markerLogicalLeft + m_marker->logicalWidth() - newLogicalVisualOverflowRect.x());
     
    319319
    320320        if (adjustOverflow) {
    321             IntRect markerRect(markerLogicalLeft + lineOffset, blockOffset, m_marker->width(), m_marker->height());
     321            LayoutRect markerRect(markerLogicalLeft + lineOffset, blockOffset, m_marker->width(), m_marker->height());
    322322            if (!style()->isHorizontalWritingMode())
    323323                markerRect = markerRect.transposedRect();
  • trunk/Source/WebCore/rendering/RenderTextControl.h

    r90775 r90791  
    7474    virtual float getAvgCharWidth(AtomicString family);
    7575    virtual int preferredContentWidth(float charWidth) const = 0;
    76     virtual void adjustControlHeightBasedOnLineHeight(int lineHeight) = 0;
     76    virtual void adjustControlHeightBasedOnLineHeight(LayoutUnit lineHeight) = 0;
    7777    virtual RenderStyle* textBaseStyle() const = 0;
    7878
  • trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp

    r90775 r90791  
    9393}
    9494
    95 void RenderTextControlMultiLine::adjustControlHeightBasedOnLineHeight(int lineHeight)
     95void RenderTextControlMultiLine::adjustControlHeightBasedOnLineHeight(LayoutUnit lineHeight)
    9696{
    9797    setHeight(height() + lineHeight * static_cast<HTMLTextAreaElement*>(node())->rows());
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r90775 r90791  
    481481}
    482482
    483 void RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight(int lineHeight)
     483void RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight(LayoutUnit lineHeight)
    484484{
    485485    HTMLElement* resultsButton = resultsButtonElement();
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h

    r90775 r90791  
    8282    virtual float getAvgCharWidth(AtomicString family);
    8383    virtual int preferredContentWidth(float charWidth) const;
    84     virtual void adjustControlHeightBasedOnLineHeight(int lineHeight);
     84    virtual void adjustControlHeightBasedOnLineHeight(LayoutUnit lineHeight);
    8585
    8686    virtual void updateFromElement();
  • trunk/Source/WebCore/rendering/RootInlineBox.cpp

    r90600 r90791  
    190190}
    191191
    192 bool RootInlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int lineTop, int lineBottom)
     192bool RootInlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
    193193{
    194194    if (hasEllipsisBox() && visibleToHitTesting()) {
  • trunk/Source/WebCore/rendering/RootInlineBox.h

    r90600 r90791  
    4848    virtual void adjustPosition(float dx, float dy);
    4949
    50     int lineTop() const { return m_lineTop; }
    51     int lineBottom() const { return m_lineBottom; }
     50    LayoutUnit lineTop() const { return m_lineTop; }
     51    LayoutUnit lineBottom() const { return m_lineBottom; }
    5252
    5353    int paginationStrut() const { return m_paginationStrut; }
     
    6161
    6262    int alignBoxesInBlockDirection(int heightOfBlock, GlyphOverflowAndFallbackFontsMap&, VerticalPositionCache&);
    63     void setLineTopBottomPositions(int top, int bottom);
     63    void setLineTopBottomPositions(LayoutUnit top, LayoutUnit bottom)
     64    {
     65        m_lineTop = top;
     66        m_lineBottom = bottom;
     67    }
    6468
    6569    virtual RenderLineBoxList* rendererLineBoxes() const;
     
    99103
    100104    virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
    101     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int lineTop, int lineBottom);
     105    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom);
    102106
    103107    bool hasSelectedChildren() const { return m_hasSelectedChildrenOrCanHaveLeadingExpansion; }
     
    146150    bool includesRootLineBoxFontOrLeading() const;
    147151   
    148     int logicalTopVisualOverflow() const
     152    LayoutUnit logicalTopVisualOverflow() const
    149153    {
    150154        return InlineFlowBox::logicalTopVisualOverflow(lineTop());
    151155    }
    152     int logicalBottomVisualOverflow() const
     156    LayoutUnit logicalBottomVisualOverflow() const
    153157    {
    154158        return InlineFlowBox::logicalBottomVisualOverflow(lineBottom());
    155159    }
    156     int logicalTopLayoutOverflow() const
     160    LayoutUnit logicalTopLayoutOverflow() const
    157161    {
    158162        return InlineFlowBox::logicalTopLayoutOverflow(lineTop());
    159163    }
    160     int logicalBottomLayoutOverflow() const
     164    LayoutUnit logicalBottomLayoutOverflow() const
    161165    {
    162166        return InlineFlowBox::logicalBottomLayoutOverflow(lineBottom());
     
    180184    RefPtr<BidiContext> m_lineBreakContext;
    181185
    182     int m_lineTop;
    183     int m_lineBottom;
     186    LayoutUnit m_lineTop;
     187    LayoutUnit m_lineBottom;
    184188
    185189    int m_paginationStrut;
     
    204208};
    205209
    206 inline void RootInlineBox::setLineTopBottomPositions(int top, int bottom)
    207 {
    208     m_lineTop = top;
    209     m_lineBottom = bottom;
    210 }
    211 
    212210} // namespace WebCore
    213211
  • trunk/Source/WebCore/rendering/svg/SVGInlineFlowBox.h

    r87753 r90791  
    4242
    4343    void paintSelectionBackground(PaintInfo&);
    44     virtual void paint(PaintInfo&, const IntPoint&, int lineTop, int lineBottom);
     44    virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
    4545
    4646    virtual IntRect calculateBoundaries() const;
  • trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp

    r90515 r90791  
    729729}
    730730
    731 bool SVGInlineTextBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int, int)
     731bool SVGInlineTextBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit, LayoutUnit)
    732732{
    733733    // FIXME: integrate with InlineTextBox::nodeAtPoint better.
  • trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.h

    r90515 r90791  
    4747
    4848    void paintSelectionBackground(PaintInfo&);
    49     virtual void paint(PaintInfo&, const IntPoint&, int lineTop, int lineBottom);
     49    virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
    5050    virtual IntRect selectionRect(int startPosition, int endPosition);
    5151
     
    7878    void paintText(GraphicsContext*, RenderStyle*, RenderStyle* selectionStyle, const SVGTextFragment&, bool hasSelection, bool paintSelectedTextOnly);
    7979
    80     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int lineTop, int lineBottom);
     80    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom);
    8181
    8282private:
  • trunk/Source/WebCore/rendering/svg/SVGRootInlineBox.h

    r87753 r90791  
    4646    void setLogicalHeight(int height) { m_logicalHeight = height; }
    4747
    48     virtual void paint(PaintInfo&, const IntPoint&, int lineTop, int lineBottom);
     48    virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
    4949
    5050    void computePerCharacterLayoutInformation();
Note: See TracChangeset for help on using the changeset viewer.