Changeset 99511 in webkit


Ignore:
Timestamp:
Nov 7, 2011 6:11:06 PM (12 years ago)
Author:
eae@chromium.org
Message:

Revert platform and scrolling to ints
https://bugs.webkit.org/show_bug.cgi?id=71585

Reviewed by Eric Seidel.

Replace all uses of LayoutUnit and related types with ints in platform
and scrolling code.

Source/WebCore:

No new tests.

  • page/FrameView.cpp:
  • page/FrameView.h:
  • platform/PopupMenuClient.h:
  • platform/ScrollAnimatorNone.cpp:
  • platform/ScrollAnimatorNone.h:
  • platform/ScrollView.cpp:
  • platform/ScrollView.h:
  • platform/ScrollableArea.h:
  • rendering/RenderLayer.cpp:
  • rendering/RenderLayer.h:
  • rendering/RenderListBox.cpp:
  • rendering/RenderListBox.h:
  • rendering/RenderMenuList.cpp:
  • rendering/RenderMenuList.h:
  • rendering/RenderTextControlSingleLine.cpp:
  • rendering/RenderTextControlSingleLine.h:

Source/WebKit/chromium:

  • tests/ScrollAnimatorNoneTest.cpp:

(MockScrollableArea::visibleHeight):
(MockScrollableArea::visibleWidth):

Source/WebKit2:

  • WebProcess/Plugins/PDF/BuiltInPDFView.cpp:

(WebKit::BuiltInPDFView::invalidateScrollbarRect):
(WebKit::BuiltInPDFView::visibleHeight):
(WebKit::BuiltInPDFView::visibleWidth):

  • WebProcess/Plugins/PDF/BuiltInPDFView.h:
Location:
trunk/Source
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r99510 r99511  
     12011-11-07  Emil A Eklund  <eae@chromium.org>
     2
     3        Revert platform and scrolling to ints
     4        https://bugs.webkit.org/show_bug.cgi?id=71585
     5
     6        Reviewed by Eric Seidel.
     7
     8        Replace all uses of LayoutUnit and related types with ints in platform
     9        and scrolling code.
     10
     11        No new tests.
     12
     13        * page/FrameView.cpp:
     14        * page/FrameView.h:
     15        * platform/PopupMenuClient.h:
     16        * platform/ScrollAnimatorNone.cpp:
     17        * platform/ScrollAnimatorNone.h:
     18        * platform/ScrollView.cpp:
     19        * platform/ScrollView.h:
     20        * platform/ScrollableArea.h:
     21        * rendering/RenderLayer.cpp:
     22        * rendering/RenderLayer.h:
     23        * rendering/RenderListBox.cpp:
     24        * rendering/RenderListBox.h:
     25        * rendering/RenderMenuList.cpp:
     26        * rendering/RenderMenuList.h:
     27        * rendering/RenderTextControlSingleLine.cpp:
     28        * rendering/RenderTextControlSingleLine.h:
     29
    1302011-11-07  Kentaro Hara  <haraken@chromium.org>
    231
  • trunk/Source/WebCore/page/FrameView.cpp

    r99508 r99511  
    13581358}
    13591359
    1360 LayoutUnit FrameView::scrollXForFixedPosition() const
    1361 {
    1362     LayoutUnit visibleContentWidth = visibleContentRect().width();
    1363     LayoutUnit maxX = contentsWidth() - visibleContentWidth;
     1360int FrameView::scrollXForFixedPosition() const
     1361{
     1362    int visibleContentWidth = visibleContentRect().width();
     1363    int maxX = contentsWidth() - visibleContentWidth;
    13641364
    13651365    if (maxX == 0)
    13661366        return 0;
    13671367
    1368     LayoutUnit x = scrollX();
     1368    int x = scrollX();
    13691369
    13701370    if (!scrollOrigin().x()) {
     
    13931393}
    13941394
    1395 LayoutUnit FrameView::scrollYForFixedPosition() const
    1396 {
    1397     LayoutUnit visibleContentHeight = visibleContentRect().height();
    1398 
    1399     LayoutUnit maxY = contentsHeight() - visibleContentHeight;
     1395int FrameView::scrollYForFixedPosition() const
     1396{
     1397    int visibleContentHeight = visibleContentRect().height();
     1398
     1399    int maxY = contentsHeight() - visibleContentHeight;
    14001400    if (maxY == 0)
    14011401        return 0;
    14021402
    1403     LayoutUnit y = scrollY();
     1403    int y = scrollY();
    14041404
    14051405    if (!scrollOrigin().y()) {
     
    14241424}
    14251425
    1426 LayoutSize FrameView::scrollOffsetForFixedPosition() const
    1427 {
    1428     return LayoutSize(scrollXForFixedPosition(), scrollYForFixedPosition());
    1429 }
    1430 
    1431 LayoutPoint FrameView::currentMousePosition() const
     1426IntSize FrameView::scrollOffsetForFixedPosition() const
     1427{
     1428    return IntSize(scrollXForFixedPosition(), scrollYForFixedPosition());
     1429}
     1430
     1431IntPoint FrameView::currentMousePosition() const
    14321432{
    14331433    return m_frame ? m_frame->eventHandler()->currentMousePosition() : IntPoint();
  • trunk/Source/WebCore/page/FrameView.h

    r99040 r99511  
    2828#include "AdjustViewSizeOrNot.h"
    2929#include "Color.h"
     30#include "LayoutTypes.h"
    3031#include "PaintPhase.h"
    3132#include "ScrollView.h"
     
    6566    virtual HostWindow* hostWindow() const;
    6667   
    67     virtual void invalidateRect(const LayoutRect&);
    68     virtual void setFrameRect(const LayoutRect&);
     68    virtual void invalidateRect(const IntRect&);
     69    virtual void setFrameRect(const IntRect&);
    6970
    7071#if ENABLE(REQUEST_ANIMATION_FRAME)
     
    8990    virtual void willRemoveHorizontalScrollbar(Scrollbar*);
    9091
    91     virtual void setContentsSize(const LayoutSize&);
     92    virtual void setContentsSize(const IntSize&);
    9293
    9394    void layout(bool allowSubtree = true);
     
    167168
    168169    virtual void setFixedVisibleContentRect(const IntRect&) OVERRIDE;
    169     void setScrollPosition(const LayoutPoint&);
     170    void setScrollPosition(const IntPoint&);
    170171    void scrollPositionChangedViaPlatformWidget();
    171172    virtual void repaintFixedElementsAfterScrolling();
     
    192193    // Functions for querying the current scrolled position, negating the effects of overhang
    193194    // and adjusting for page scale.
    194     LayoutUnit scrollXForFixedPosition() const;
    195     LayoutUnit scrollYForFixedPosition() const;
    196     LayoutSize scrollOffsetForFixedPosition() const;
     195    int scrollXForFixedPosition() const;
     196    int scrollYForFixedPosition() const;
     197    IntSize scrollOffsetForFixedPosition() const;
    197198
    198199    void beginDeferredRepaints();
     
    268269
    269270    // Methods to convert points and rects between the coordinate space of the renderer, and this view.
    270     virtual LayoutRect convertFromRenderer(const RenderObject*, const LayoutRect&) const;
    271     virtual LayoutRect convertToRenderer(const RenderObject*, const LayoutRect&) const;
    272     virtual LayoutPoint convertFromRenderer(const RenderObject*, const LayoutPoint&) const;
    273     virtual LayoutPoint convertToRenderer(const RenderObject*, const LayoutPoint&) const;
     271    virtual IntRect convertFromRenderer(const RenderObject*, const IntRect&) const;
     272    virtual IntRect convertToRenderer(const RenderObject*, const IntRect&) const;
     273    virtual IntPoint convertFromRenderer(const RenderObject*, const IntPoint&) const;
     274    virtual IntPoint convertToRenderer(const RenderObject*, const IntPoint&) const;
    274275
    275276    bool isFrameViewScrollCorner(RenderScrollbarPart* scrollCorner) const { return m_scrollCorner == scrollCorner; }
     
    286287    static void setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading(double p);
    287288
    288     virtual LayoutPoint currentMousePosition() const;
     289    virtual IntPoint currentMousePosition() const;
    289290
    290291    // FIXME: Remove this method once plugin loading is decoupled from layout.
     
    302303    bool isTrackingRepaints() const { return m_isTrackingRepaints; }
    303304    void resetTrackedRepaints() { m_trackedRepaintRects.clear(); }
    304     const Vector<LayoutRect>& trackedRepaintRects() const { return m_trackedRepaintRects; }
     305    const Vector<IntRect>& trackedRepaintRects() const { return m_trackedRepaintRects; }
    305306
    306307protected:
     
    342343    // Override ScrollView methods to do point conversion via renderers, in order to
    343344    // take transforms into account.
    344     virtual LayoutRect convertToContainingView(const LayoutRect&) const;
    345     virtual LayoutRect convertFromContainingView(const LayoutRect&) const;
    346     virtual LayoutPoint convertToContainingView(const LayoutPoint&) const;
    347     virtual LayoutPoint convertFromContainingView(const LayoutPoint&) const;
     345    virtual IntRect convertToContainingView(const IntRect&) const;
     346    virtual IntRect convertFromContainingView(const IntRect&) const;
     347    virtual IntPoint convertToContainingView(const IntPoint&) const;
     348    virtual IntPoint convertFromContainingView(const IntPoint&) const;
    348349
    349350    // ScrollableArea interface
    350     virtual void invalidateScrollbarRect(Scrollbar*, const LayoutRect&);
     351    virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&);
    351352    virtual bool isActive() const;
    352     virtual void getTickmarks(Vector<LayoutRect>&) const;
     353    virtual void getTickmarks(Vector<IntRect>&) const;
    353354    virtual void scrollTo(const IntSize&);
    354355    virtual void didStartRubberBand(const IntSize&) const;
     
    356357    virtual void didStartAnimatedScroll() const;
    357358    virtual void didCompleteAnimatedScroll() const;
    358     virtual void setVisibleScrollerThumbRect(const LayoutRect&);
     359    virtual void setVisibleScrollerThumbRect(const IntRect&);
    359360    virtual bool isOnActivePage() const;
    360361    virtual ScrollableArea* enclosingScrollableArea() const;
     
    457458   
    458459    bool m_isTrackingRepaints; // Used for testing.
    459     Vector<LayoutRect> m_trackedRepaintRects;
     460    Vector<IntRect> m_trackedRepaintRects;
    460461
    461462    bool m_shouldUpdateWhileOffscreen;
  • trunk/Source/WebCore/platform/PopupMenuClient.h

    r99016 r99511  
    2323#define PopupMenuClient_h
    2424
    25 #include "LayoutTypes.h"
    2625#include "PopupMenuStyle.h"
    2726#include "ScrollTypes.h"
     
    5352    virtual int clientInsetLeft() const = 0;
    5453    virtual int clientInsetRight() const = 0;
    55     virtual LayoutUnit clientPaddingLeft() const = 0;
    56     virtual LayoutUnit clientPaddingRight() const = 0;
     54    virtual int clientPaddingLeft() const = 0;
     55    virtual int clientPaddingRight() const = 0;
    5756    virtual int listSize() const = 0;
    5857    virtual int selectedIndex() const = 0;
  • trunk/Source/WebCore/platform/ScrollAnimatorNone.cpp

    r97902 r99511  
    203203}
    204204
    205 ScrollAnimatorNone::PerAxisData::PerAxisData(ScrollAnimatorNone* parent, float* currentPosition, LayoutUnit visibleLength)
     205ScrollAnimatorNone::PerAxisData::PerAxisData(ScrollAnimatorNone* parent, float* currentPosition, int visibleLength)
    206206    : m_currentPosition(currentPosition)
    207207    , m_visibleLength(visibleLength)
     
    367367}
    368368
    369 void ScrollAnimatorNone::PerAxisData::updateVisibleLength(LayoutUnit visibleLength)
     369void ScrollAnimatorNone::PerAxisData::updateVisibleLength(int visibleLength)
    370370{
    371371    m_visibleLength = visibleLength;
  • trunk/Source/WebCore/platform/ScrollAnimatorNone.h

    r97195 r99511  
    3434#if ENABLE(SMOOTH_SCROLLING)
    3535
    36 #include "LayoutTypes.h"
    3736#include "ScrollAnimator.h"
    3837#include "Timer.h"
     
    9493
    9594    struct PerAxisData {
    96         PerAxisData(ScrollAnimatorNone* parent, float* currentPos, LayoutUnit visibleLength);
     95        PerAxisData(ScrollAnimatorNone* parent, float* currentPos, int visibleLength);
    9796        void reset();
    9897        bool updateDataFromParameters(float step, float multiplier, float scrollableSize, double currentTime, Parameters*);
    9998        bool animateScroll(double currentTime);
    100         void updateVisibleLength(LayoutUnit visibleLength);
     99        void updateVisibleLength(int visibleLength);
    101100
    102101        static double curveAt(Curve, double t);
     
    130129        Curve m_releaseCurve;
    131130
    132         LayoutUnit m_visibleLength;
     131        int m_visibleLength;
    133132    };
    134133
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r99040 r99511  
    232232        return m_fixedVisibleContentRect;
    233233
    234     LayoutUnit verticalScrollbarWidth = verticalScrollbar() && !verticalScrollbar()->isOverlayScrollbar()
     234    int verticalScrollbarWidth = verticalScrollbar() && !verticalScrollbar()->isOverlayScrollbar()
    235235        && !includeScrollbars ? verticalScrollbar()->width() : 0;
    236     LayoutUnit horizontalScrollbarHeight = horizontalScrollbar() && !horizontalScrollbar()->isOverlayScrollbar()
     236    int horizontalScrollbarHeight = horizontalScrollbar() && !horizontalScrollbar()->isOverlayScrollbar()
    237237        && !includeScrollbars ? horizontalScrollbar()->height() : 0;
    238238
    239     return LayoutRect(LayoutPoint(m_scrollOffset.width(), m_scrollOffset.height()),
    240                       LayoutSize(max<LayoutUnit>(0, width() - verticalScrollbarWidth),
    241                                  max<LayoutUnit>(0, height() - horizontalScrollbarHeight)));
    242 
    243 }
    244 #endif
    245 
    246 LayoutUnit ScrollView::layoutWidth() const
     239    return IntRect(m_scrollOffset.width(),
     240                   m_scrollOffset.height(),
     241                   max(0, width() - verticalScrollbarWidth),
     242                   max(0, height() - horizontalScrollbarHeight));
     243}
     244#endif
     245
     246int ScrollView::layoutWidth() const
    247247{
    248248    return m_fixedLayoutSize.isEmpty() || !m_useFixedLayout ? visibleWidth() : m_fixedLayoutSize.width();
    249249}
    250250
    251 LayoutUnit ScrollView::layoutHeight() const
     251int ScrollView::layoutHeight() const
    252252{
    253253    return m_fixedLayoutSize.isEmpty() || !m_useFixedLayout ? visibleHeight() : m_fixedLayoutSize.height();
    254254}
    255255
    256 LayoutSize ScrollView::fixedLayoutSize() const
     256IntSize ScrollView::fixedLayoutSize() const
    257257{
    258258    return m_fixedLayoutSize;
    259259}
    260260
    261 void ScrollView::setFixedLayoutSize(const LayoutSize& newSize)
     261void ScrollView::setFixedLayoutSize(const IntSize& newSize)
    262262{
    263263    if (fixedLayoutSize() == newSize)
     
    280280}
    281281
    282 LayoutSize ScrollView::contentsSize() const
     282IntSize ScrollView::contentsSize() const
    283283{
    284284    return m_contentsSize;
    285285}
    286286
    287 void ScrollView::setContentsSize(const LayoutSize& newSize)
     287void ScrollView::setContentsSize(const IntSize& newSize)
    288288{
    289289    if (contentsSize() == newSize)
     
    406406}
    407407
    408 LayoutSize ScrollView::overhangAmount() const
    409 {
    410     LayoutSize stretch;
    411 
    412     LayoutUnit physicalScrollY = scrollPosition().y() + scrollOrigin().y();
     408IntSize ScrollView::overhangAmount() const
     409{
     410    IntSize stretch;
     411
     412    int physicalScrollY = scrollPosition().y() + scrollOrigin().y();
    413413    if (physicalScrollY < 0)
    414414        stretch.setHeight(physicalScrollY);
     
    416416        stretch.setHeight(physicalScrollY - (contentsHeight() - visibleHeight()));
    417417
    418     LayoutUnit physicalScrollX = scrollPosition().x() + scrollOrigin().x();
     418    int physicalScrollX = scrollPosition().x() + scrollOrigin().x();
    419419    if (physicalScrollX < 0)
    420420        stretch.setWidth(physicalScrollX);
     
    449449    }
    450450
    451     LayoutRect oldScrollCornerRect = scrollCornerRect();
     451    IntRect oldScrollCornerRect = scrollCornerRect();
    452452
    453453    bool hasHorizontalScrollbar = m_horizontalScrollbar;
     
    473473        bool sendContentResizedNotification = false;
    474474       
    475         LayoutSize docSize = contentsSize();
    476         LayoutSize frameSize = frameRect().size();
     475        IntSize docSize = contentsSize();
     476        IntSize frameSize = frameRect().size();
    477477
    478478        if (hScroll == ScrollbarAuto) {
     
    516516            contentsResized();
    517517            visibleContentsResized();
    518             LayoutSize newDocSize = contentsSize();
     518            IntSize newDocSize = contentsSize();
    519519            if (newDocSize == docSize) {
    520520                // The layout with the new scroll state had no impact on
     
    536536    if (m_horizontalScrollbar) {
    537537        int clientWidth = visibleWidth();
    538         LayoutUnit pageStep = max<LayoutUnit>(max<LayoutUnit>(clientWidth * Scrollbar::minFractionToStepWhenPaging(), clientWidth - Scrollbar::maxOverlapBetweenPages()), 1);
    539         LayoutRect oldRect(m_horizontalScrollbar->frameRect());
    540         LayoutRect hBarRect = LayoutRect(0,
    541                                          height() - m_horizontalScrollbar->height(),
    542                                          width() - (m_verticalScrollbar ? m_verticalScrollbar->width() : 0),
    543                                          m_horizontalScrollbar->height());
     538        int pageStep = max(max<int>(clientWidth * Scrollbar::minFractionToStepWhenPaging(), clientWidth - Scrollbar::maxOverlapBetweenPages()), 1);
     539        IntRect oldRect(m_horizontalScrollbar->frameRect());
     540        IntRect hBarRect(0,
     541                        height() - m_horizontalScrollbar->height(),
     542                        width() - (m_verticalScrollbar ? m_verticalScrollbar->width() : 0),
     543                        m_horizontalScrollbar->height());
    544544        m_horizontalScrollbar->setFrameRect(hBarRect);
    545545        if (!m_scrollbarsSuppressed && oldRect != m_horizontalScrollbar->frameRect())
     
    557557    if (m_verticalScrollbar) {
    558558        int clientHeight = visibleHeight();
    559         LayoutUnit pageStep = max<LayoutUnit>(max<LayoutUnit>(clientHeight * Scrollbar::minFractionToStepWhenPaging(), clientHeight - Scrollbar::maxOverlapBetweenPages()), 1);
    560         LayoutRect oldRect(m_verticalScrollbar->frameRect());
    561         LayoutRect vBarRect = LayoutRect(width() - m_verticalScrollbar->width(),
    562             0,
    563             m_verticalScrollbar->width(),
    564             height() - (m_horizontalScrollbar ? m_horizontalScrollbar->height() : 0));
     559        int pageStep = max(max<int>(clientHeight * Scrollbar::minFractionToStepWhenPaging(), clientHeight - Scrollbar::maxOverlapBetweenPages()), 1);
     560        IntRect oldRect(m_verticalScrollbar->frameRect());
     561        IntRect vBarRect(width() - m_verticalScrollbar->width(),
     562                         0,
     563                         m_verticalScrollbar->width(),
     564                         height() - (m_horizontalScrollbar ? m_horizontalScrollbar->height() : 0));
    565565        m_verticalScrollbar->setFrameRect(vBarRect);
    566566        if (!m_scrollbarsSuppressed && oldRect != m_verticalScrollbar->frameRect())
     
    604604    IntRect scrollViewRect = convertToContainingWindow(IntRect(0, 0, visibleWidth(), visibleHeight()));
    605605    if (hasOverlayScrollbars()) {
    606         LayoutUnit verticalScrollbarWidth = (verticalScrollbar() && !hasLayerForVerticalScrollbar()) ? verticalScrollbar()->width() : 0;
    607         LayoutUnit horizontalScrollbarHeight = (horizontalScrollbar() && !hasLayerForHorizontalScrollbar()) ? horizontalScrollbar()->height() : 0;
     606        int verticalScrollbarWidth = (verticalScrollbar() && !hasLayerForVerticalScrollbar()) ? verticalScrollbar()->width() : 0;
     607        int horizontalScrollbarHeight = (horizontalScrollbar() && !hasLayerForHorizontalScrollbar()) ? horizontalScrollbar()->height() : 0;
    608608       
    609609        scrollViewRect.setWidth(scrollViewRect.width() - verticalScrollbarWidth);
     
    631631        // FIXME: the pan icon is broken when accelerated compositing is on, since it will draw under the compositing layers.
    632632        // https://bugs.webkit.org/show_bug.cgi?id=47837
    633         LayoutUnit panIconDirtySquareSizeLength = 2 * (panIconSizeLength + max(abs(scrollDelta.width()), abs(scrollDelta.height()))); // We only want to repaint what's necessary
    634         LayoutPoint panIconDirtySquareLocation = LayoutPoint(m_panScrollIconPoint.x() - (panIconDirtySquareSizeLength / 2), m_panScrollIconPoint.y() - (panIconDirtySquareSizeLength / 2));
    635         LayoutRect panScrollIconDirtyRect = LayoutRect(panIconDirtySquareLocation , LayoutSize(panIconDirtySquareSizeLength, panIconDirtySquareSizeLength));
     633        int panIconDirtySquareSizeLength = 2 * (panIconSizeLength + max(abs(scrollDelta.width()), abs(scrollDelta.height()))); // We only want to repaint what's necessary
     634        IntPoint panIconDirtySquareLocation = IntPoint(m_panScrollIconPoint.x() - (panIconDirtySquareSizeLength / 2), m_panScrollIconPoint.y() - (panIconDirtySquareSizeLength / 2));
     635        IntRect panScrollIconDirtyRect = IntRect(panIconDirtySquareLocation, IntSize(panIconDirtySquareSizeLength, panIconDirtySquareSizeLength));
    636636        panScrollIconDirtyRect.intersect(clipRect);
    637637        hostWindow()->invalidateContentsAndWindow(panScrollIconDirtyRect, false /*immediate*/);
     
    649649
    650650    // Invalidate the overhang areas if they are visible.
    651     LayoutRect horizontalOverhangRect;
    652     LayoutRect verticalOverhangRect;
     651    IntRect horizontalOverhangRect;
     652    IntRect verticalOverhangRect;
    653653    calculateOverhangAreasForPainting(horizontalOverhangRect, verticalOverhangRect);
    654654#if USE(ACCELERATED_COMPOSITING) && PLATFORM(CHROMIUM) && ENABLE(RUBBER_BANDING)
     
    723723IntRect ScrollView::windowToContents(const IntRect& windowRect) const
    724724{
    725     LayoutRect viewRect = convertFromContainingWindow(windowRect);
     725    IntRect viewRect = convertFromContainingWindow(windowRect);
    726726    viewRect.move(scrollOffset());
    727727    return viewRect;
     
    744744}
    745745
    746 LayoutPoint ScrollView::screenToContents(const IntPoint& point) const
     746IntPoint ScrollView::screenToContents(const IntPoint& point) const
    747747{
    748748    if (platformWidget())
    749749        return platformScreenToContents(point);
    750750    if (!hostWindow())
    751         return LayoutPoint();
     751        return IntPoint();
    752752    return windowToContents(hostWindow()->screenToWindow(point));
    753753}
     
    813813        return 0;
    814814
    815     LayoutPoint viewPoint = convertFromContainingWindow(windowPoint);
     815    IntPoint viewPoint = convertFromContainingWindow(windowPoint);
    816816    if (m_horizontalScrollbar && m_horizontalScrollbar->frameRect().contains(viewPoint))
    817817        return m_horizontalScrollbar.get();
     
    851851#endif
    852852
    853 void ScrollView::setFrameRect(const LayoutRect& newRect)
    854 {
    855     LayoutRect oldRect = frameRect();
     853void ScrollView::setFrameRect(const IntRect& newRect)
     854{
     855    IntRect oldRect = frameRect();
    856856   
    857857    if (newRect == oldRect)
     
    884884        return;
    885885    graphicsLayer->setDrawsContent(true);
    886     LayoutRect scrollbarRect = scrollbar->frameRect();
     886    IntRect scrollbarRect = scrollbar->frameRect();
    887887    graphicsLayer->setPosition(scrollbarRect.location());
    888888    if (scrollbarRect.size() != graphicsLayer->size())
     
    891891}
    892892
    893 static void positionScrollCornerLayer(GraphicsLayer* graphicsLayer, const LayoutRect& cornerRect)
     893static void positionScrollCornerLayer(GraphicsLayer* graphicsLayer, const IntRect& cornerRect)
    894894{
    895895    if (!graphicsLayer)
     
    913913}
    914914
    915 void ScrollView::repaintContentRectangle(const LayoutRect& rect, bool now)
    916 {
    917     LayoutRect paintRect = rect;
     915void ScrollView::repaintContentRectangle(const IntRect& rect, bool now)
     916{
     917    IntRect paintRect = rect;
    918918    if (clipsRepaints() && !paintsEntireContents())
    919919        paintRect.intersect(visibleContentRect());
     
    931931}
    932932
    933 LayoutRect ScrollView::scrollCornerRect() const
    934 {
    935     LayoutRect cornerRect;
     933IntRect ScrollView::scrollCornerRect() const
     934{
     935    IntRect cornerRect;
    936936
    937937    if (hasOverlayScrollbars())
     
    939939
    940940    if (m_horizontalScrollbar && width() - m_horizontalScrollbar->width() > 0) {
    941         cornerRect.unite(LayoutRect(m_horizontalScrollbar->width(),
    942                                     height() - m_horizontalScrollbar->height(),
    943                                     width() - m_horizontalScrollbar->width(),
    944                                     m_horizontalScrollbar->height()));
     941        cornerRect.unite(IntRect(m_horizontalScrollbar->width(),
     942                                 height() - m_horizontalScrollbar->height(),
     943                                 width() - m_horizontalScrollbar->width(),
     944                                 m_horizontalScrollbar->height()));
    945945    }
    946946
    947947    if (m_verticalScrollbar && height() - m_verticalScrollbar->height() > 0) {
    948         cornerRect.unite(LayoutRect(width() - m_verticalScrollbar->width(),
    949                                     m_verticalScrollbar->height(),
    950                                     m_verticalScrollbar->width(),
    951                                     height() - m_verticalScrollbar->height()));
     948        cornerRect.unite(IntRect(width() - m_verticalScrollbar->width(),
     949                                 m_verticalScrollbar->height(),
     950                                 m_verticalScrollbar->width(),
     951                                 height() - m_verticalScrollbar->height()));
    952952    }
    953953   
     
    970970}
    971971
    972 void ScrollView::paintScrollCorner(GraphicsContext* context, const LayoutRect& cornerRect)
     972void ScrollView::paintScrollCorner(GraphicsContext* context, const IntRect& cornerRect)
    973973{
    974974    ScrollbarTheme::theme()->paintScrollCorner(this, context, cornerRect);
    975975}
    976976
    977 void ScrollView::invalidateScrollCornerRect(const LayoutRect& rect)
     977void ScrollView::invalidateScrollCornerRect(const IntRect& rect)
    978978{
    979979    invalidateRect(rect);
    980980}
    981981
    982 void ScrollView::paintScrollbars(GraphicsContext* context, const LayoutRect& rect)
     982void ScrollView::paintScrollbars(GraphicsContext* context, const IntRect& rect)
    983983{
    984984    if (m_horizontalScrollbar
     
    10081008}
    10091009
    1010 void ScrollView::paint(GraphicsContext* context, const LayoutRect& rect)
     1010void ScrollView::paint(GraphicsContext* context, const IntRect& rect)
    10111011{
    10121012    if (platformWidget()) {
     
    10231023    m_containsScrollableAreaWithOverlayScrollbars = false;
    10241024
    1025     LayoutRect clipRect = frameRect();
     1025    IntRect clipRect = frameRect();
    10261026    if (verticalScrollbar() && !verticalScrollbar()->isOverlayScrollbar())
    10271027        clipRect.setWidth(clipRect.width() - verticalScrollbar()->width());
     
    10291029        clipRect.setHeight(clipRect.height() - horizontalScrollbar()->height());
    10301030
    1031     LayoutRect documentDirtyRect = rect;
     1031    IntRect documentDirtyRect = rect;
    10321032    documentDirtyRect.intersect(clipRect);
    10331033
     
    10581058    if (!m_scrollbarsSuppressed && (m_horizontalScrollbar || m_verticalScrollbar)) {
    10591059        GraphicsContextStateSaver stateSaver(*context);
    1060         LayoutRect scrollViewDirtyRect = rect;
     1060        IntRect scrollViewDirtyRect = rect;
    10611061        scrollViewDirtyRect.intersect(frameRect());
    10621062        context->translate(x(), y());
     
    10711071}
    10721072
    1073 void ScrollView::calculateOverhangAreasForPainting(LayoutRect& horizontalOverhangRect, LayoutRect& verticalOverhangRect)
    1074 {
    1075     LayoutUnit verticalScrollbarWidth = (verticalScrollbar() && !verticalScrollbar()->isOverlayScrollbar())
     1073void ScrollView::calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntRect& verticalOverhangRect)
     1074{
     1075    int verticalScrollbarWidth = (verticalScrollbar() && !verticalScrollbar()->isOverlayScrollbar())
    10761076        ? verticalScrollbar()->width() : 0;
    1077     LayoutUnit horizontalScrollbarHeight = (horizontalScrollbar() && !horizontalScrollbar()->isOverlayScrollbar())
     1077    int horizontalScrollbarHeight = (horizontalScrollbar() && !horizontalScrollbar()->isOverlayScrollbar())
    10781078        ? horizontalScrollbar()->height() : 0;
    10791079
    1080     LayoutUnit physicalScrollY = scrollPosition().y() + scrollOrigin().y();
     1080    int physicalScrollY = scrollPosition().y() + scrollOrigin().y();
    10811081    if (physicalScrollY < 0) {
    10821082        horizontalOverhangRect = frameRect();
    10831083        horizontalOverhangRect.setHeight(-physicalScrollY);
    10841084    } else if (contentsHeight() && physicalScrollY > contentsHeight() - visibleHeight()) {
    1085         LayoutUnit height = physicalScrollY - (contentsHeight() - visibleHeight());
     1085        int height = physicalScrollY - (contentsHeight() - visibleHeight());
    10861086        horizontalOverhangRect = frameRect();
    10871087        horizontalOverhangRect.setY(frameRect().maxY() - height - horizontalScrollbarHeight);
     
    10891089    }
    10901090
    1091     LayoutUnit physicalScrollX = scrollPosition().x() + scrollOrigin().x();
     1091    int physicalScrollX = scrollPosition().x() + scrollOrigin().x();
    10921092    if (physicalScrollX < 0) {
    10931093        verticalOverhangRect.setWidth(-physicalScrollX);
     
    10991099            verticalOverhangRect.setY(frameRect().y());
    11001100    } else if (contentsWidth() && physicalScrollX > contentsWidth() - visibleWidth()) {
    1101         LayoutUnit width = physicalScrollX - (contentsWidth() - visibleWidth());
     1101        int width = physicalScrollX - (contentsWidth() - visibleWidth());
    11021102        verticalOverhangRect.setWidth(width);
    11031103        verticalOverhangRect.setHeight(frameRect().height() - horizontalOverhangRect.height());
     
    11101110}
    11111111
    1112 void ScrollView::paintOverhangAreas(GraphicsContext* context, const LayoutRect& horizontalOverhangRect, const LayoutRect& verticalOverhangRect, const LayoutRect& dirtyRect)
     1112void ScrollView::paintOverhangAreas(GraphicsContext* context, const IntRect& horizontalOverhangRect, const IntRect& verticalOverhangRect, const IntRect& dirtyRect)
    11131113{
    11141114    ScrollbarTheme::theme()->paintOverhangAreas(this, context, horizontalOverhangRect, verticalOverhangRect, dirtyRect);
    11151115}
    11161116
    1117 void ScrollView::calculateAndPaintOverhangAreas(GraphicsContext* context, const LayoutRect& dirtyRect)
    1118 {
    1119     LayoutRect horizontalOverhangRect;
    1120     LayoutRect verticalOverhangRect;
     1117void ScrollView::calculateAndPaintOverhangAreas(GraphicsContext* context, const IntRect& dirtyRect)
     1118{
     1119    IntRect horizontalOverhangRect;
     1120    IntRect verticalOverhangRect;
    11211121    calculateOverhangAreasForPainting(horizontalOverhangRect, verticalOverhangRect);
    11221122
     
    11301130        return false;
    11311131
    1132     LayoutPoint viewPoint = convertFromContainingWindow(windowPoint);
     1132    IntPoint viewPoint = convertFromContainingWindow(windowPoint);
    11331133
    11341134    if (m_horizontalScrollbar) {
    1135         LayoutUnit horizontalScrollbarYMin = m_horizontalScrollbar->frameRect().y();
    1136         LayoutUnit horizontalScrollbarYMax = m_horizontalScrollbar->frameRect().y() + m_horizontalScrollbar->frameRect().height();
    1137         LayoutUnit horizontalScrollbarXMin = m_horizontalScrollbar->frameRect().x() + m_horizontalScrollbar->frameRect().width();
     1135        int horizontalScrollbarYMin = m_horizontalScrollbar->frameRect().y();
     1136        int horizontalScrollbarYMax = m_horizontalScrollbar->frameRect().y() + m_horizontalScrollbar->frameRect().height();
     1137        int horizontalScrollbarXMin = m_horizontalScrollbar->frameRect().x() + m_horizontalScrollbar->frameRect().width();
    11381138
    11391139        return viewPoint.y() > horizontalScrollbarYMin && viewPoint.y() < horizontalScrollbarYMax && viewPoint.x() > horizontalScrollbarXMin;
    11401140    }
    11411141
    1142     LayoutUnit verticalScrollbarXMin = m_verticalScrollbar->frameRect().x();
    1143     LayoutUnit verticalScrollbarXMax = m_verticalScrollbar->frameRect().x() + m_verticalScrollbar->frameRect().width();
    1144     LayoutUnit verticalScrollbarYMin = m_verticalScrollbar->frameRect().y() + m_verticalScrollbar->frameRect().height();
     1142    int verticalScrollbarXMin = m_verticalScrollbar->frameRect().x();
     1143    int verticalScrollbarXMax = m_verticalScrollbar->frameRect().x() + m_verticalScrollbar->frameRect().width();
     1144    int verticalScrollbarYMin = m_verticalScrollbar->frameRect().y() + m_verticalScrollbar->frameRect().height();
    11451145   
    11461146    return viewPoint.x() > verticalScrollbarXMin && viewPoint.x() < verticalScrollbarXMax && viewPoint.y() > verticalScrollbarYMin;
     
    11531153}
    11541154
    1155 LayoutRect ScrollView::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const LayoutRect& localRect) const
     1155IntRect ScrollView::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntRect& localRect) const
    11561156{
    11571157    // Scrollbars won't be transformed within us
    1158     LayoutRect newRect = localRect;
     1158    IntRect newRect = localRect;
    11591159    newRect.moveBy(scrollbar->location());
    11601160    return newRect;
    11611161}
    11621162
    1163 LayoutRect ScrollView::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const LayoutRect& parentRect) const
    1164 {
    1165     LayoutRect newRect = parentRect;
     1163IntRect ScrollView::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const
     1164{
     1165    IntRect newRect = parentRect;
    11661166    // Scrollbars won't be transformed within us
    11671167    newRect.moveBy(-scrollbar->location());
     
    11701170
    11711171// FIXME: test these on windows
    1172 LayoutPoint ScrollView::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const LayoutPoint& localPoint) const
     1172IntPoint ScrollView::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntPoint& localPoint) const
    11731173{
    11741174    // Scrollbars won't be transformed within us
    1175     LayoutPoint newPoint = localPoint;
     1175    IntPoint newPoint = localPoint;
    11761176    newPoint.moveBy(scrollbar->location());
    11771177    return newPoint;
    11781178}
    11791179
    1180 LayoutPoint ScrollView::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const LayoutPoint& parentPoint) const
    1181 {
    1182     LayoutPoint newPoint = parentPoint;
     1180IntPoint ScrollView::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const
     1181{
     1182    IntPoint newPoint = parentPoint;
    11831183    // Scrollbars won't be transformed within us
    11841184    newPoint.moveBy(-scrollbar->location());
     
    12431243
    12441244
    1245 void ScrollView::addPanScrollIcon(const LayoutPoint& iconPosition)
     1245void ScrollView::addPanScrollIcon(const IntPoint& iconPosition)
    12461246{
    12471247    if (!hostWindow())
     
    13471347}
    13481348
    1349 IntRect ScrollView::platformContentsToScreen(const LayoutRect& rect) const
     1349IntRect ScrollView::platformContentsToScreen(const IntRect& rect) const
    13501350{
    13511351    return rect;
    13521352}
    13531353
    1354 LayoutPoint ScrollView::platformScreenToContents(const IntPoint& point) const
     1354IntPoint ScrollView::platformScreenToContents(const IntPoint& point) const
    13551355{
    13561356    return point;
     
    13661366}
    13671367
    1368 void ScrollView::platformRepaintContentRectangle(const LayoutRect&, bool /*now*/)
     1368void ScrollView::platformRepaintContentRectangle(const IntRect&, bool /*now*/)
    13691369{
    13701370}
  • trunk/Source/WebCore/platform/ScrollView.h

    r99002 r99511  
    147147    virtual IntRect visibleContentRect(bool includeScrollbars = false) const;
    148148    virtual void setFixedVisibleContentRect(const IntRect& visibleContentRect) { m_fixedVisibleContentRect = visibleContentRect; }
    149     LayoutUnit visibleWidth() const { return visibleContentRect().width(); }
    150     LayoutUnit visibleHeight() const { return visibleContentRect().height(); }
     149    int visibleWidth() const { return visibleContentRect().width(); }
     150    int visibleHeight() const { return visibleContentRect().height(); }
    151151
    152152    // Functions for getting/setting the size webkit should use to layout the contents. By default this is the same as the visible
     
    280280    virtual bool isPointInScrollbarCorner(const IntPoint&);
    281281    virtual bool scrollbarCornerPresent() const;
    282     virtual LayoutRect scrollCornerRect() const;
     282    virtual IntRect scrollCornerRect() const;
    283283    virtual void paintScrollCorner(GraphicsContext*, const IntRect& cornerRect);
    284284
  • trunk/Source/WebCore/platform/ScrollableArea.h

    r99002 r99511  
    2727#define ScrollableArea_h
    2828
    29 #include "LayoutTypes.h"
    3029#include "Scrollbar.h"
    3130#include <wtf/Vector.h>
     
    9392    void invalidateScrollbar(Scrollbar*, const IntRect&);
    9493    virtual bool isScrollCornerVisible() const = 0;
    95     virtual LayoutRect scrollCornerRect() const = 0;
     94    virtual IntRect scrollCornerRect() const = 0;
    9695    void invalidateScrollCorner(const IntRect&);
    9796    virtual void getTickmarks(Vector<IntRect>&) const { }
     
    128127    virtual IntPoint maximumScrollPosition() const { ASSERT_NOT_REACHED(); return IntPoint(); }
    129128    virtual IntRect visibleContentRect(bool /*includeScrollbars*/ = false) const { ASSERT_NOT_REACHED(); return IntRect(); }
    130     virtual LayoutUnit visibleHeight() const { ASSERT_NOT_REACHED(); return 0; }
    131     virtual LayoutUnit visibleWidth() const { ASSERT_NOT_REACHED(); return 0; }
     129    virtual int visibleHeight() const { ASSERT_NOT_REACHED(); return 0; }
     130    virtual int visibleWidth() const { ASSERT_NOT_REACHED(); return 0; }
    132131    virtual IntSize contentsSize() const { ASSERT_NOT_REACHED(); return IntSize(); }
    133132    virtual IntSize overhangAmount() const { ASSERT_NOT_REACHED(); return IntSize(); }
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r99307 r99511  
    12981298        return;
    12991299   
    1300     LayoutPoint currentMousePosition = frame->eventHandler()->currentMousePosition();
     1300    IntPoint currentMousePosition = frame->eventHandler()->currentMousePosition();
    13011301   
    13021302    // We need to check if the current mouse position is out of the window. When the mouse is out of the window, the position is incoherent
    1303     static LayoutPoint previousMousePosition;
     1303    static IntPoint previousMousePosition;
    13041304    if (currentMousePosition.x() < 0 || currentMousePosition.y() < 0)
    13051305        currentMousePosition = previousMousePosition;
     
    13071307        previousMousePosition = currentMousePosition;
    13081308
    1309     LayoutUnit xDelta = currentMousePosition.x() - sourcePoint.x();
    1310     LayoutUnit yDelta = currentMousePosition.y() - sourcePoint.y();
     1309    int xDelta = currentMousePosition.x() - sourcePoint.x();
     1310    int yDelta = currentMousePosition.y() - sourcePoint.y();
    13111311
    13121312    if (abs(xDelta) <= ScrollView::noPanScrollRadius) // at the center we let the space for the icon
     
    13461346        // If we are here, we were called on a renderer that can be programmatically scrolled, but doesn't
    13471347        // have an overflow clip. Which means that it is a document node that can be scrolled.
    1348         renderer()->view()->frameView()->scrollBy(LayoutSize(xDelta, yDelta));
     1348        renderer()->view()->frameView()->scrollBy(IntSize(xDelta, yDelta));
    13491349        // FIXME: If we didn't scroll the whole way, do we want to try looking at the frames ownerElement?
    13501350        // https://bugs.webkit.org/show_bug.cgi?id=28237
     
    13691369}
    13701370
    1371 void RenderLayer::scrollTo(LayoutUnit x, LayoutUnit y)
     1371void RenderLayer::scrollTo(int x, int y)
    13721372{
    13731373    RenderBox* box = renderBox();
     
    13861386    // is either occluded by another layer or clipped by an enclosing
    13871387    // layer or contains fixed backgrounds, etc.).
    1388     LayoutSize newScrollOffset = LayoutSize(x - scrollOrigin().x(), y - scrollOrigin().y());
     1388    IntSize newScrollOffset = IntSize(x - scrollOrigin().x(), y - scrollOrigin().y());
    13891389    if (m_scrollOffset == newScrollOffset)
    13901390        return;
     
    15021502                yOffset = max<LayoutUnit>(0, min(frameView->contentsHeight(), yOffset));
    15031503
    1504                 frameView->setScrollPosition(LayoutPoint(xOffset, yOffset));
     1504                frameView->setScrollPosition(IntPoint(xOffset, yOffset));
    15051505                parentLayer = renderer()->document()->ownerElement()->renderer()->enclosingLayer();
    15061506                newRect.setX(rect.x() - frameView->scrollX() + frameView->x());
     
    16191619#endif
    16201620
    1621     LayoutPoint currentDocumentPosition = frameView->windowToContents(frame->eventHandler()->currentMousePosition());
     1621    IntPoint currentDocumentPosition = frameView->windowToContents(frame->eventHandler()->currentMousePosition());
    16221622    scrollRectToVisible(LayoutRect(currentDocumentPosition, LayoutSize(1, 1)), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded);
    16231623}
     
    16881688}
    16891689
    1690 LayoutUnit RenderLayer::scrollSize(ScrollbarOrientation orientation) const
     1690int RenderLayer::scrollSize(ScrollbarOrientation orientation) const
    16911691{
    16921692    Scrollbar* scrollbar = ((orientation == HorizontalScrollbar) ? m_hBar : m_vBar).get();
     
    16941694}
    16951695
    1696 void RenderLayer::setScrollOffset(const LayoutPoint& offset)
     1696void RenderLayer::setScrollOffset(const IntPoint& offset)
    16971697{
    16981698    scrollTo(offset.x(), offset.y());
    16991699}
    17001700
    1701 LayoutUnit RenderLayer::scrollPosition(Scrollbar* scrollbar) const
     1701int RenderLayer::scrollPosition(Scrollbar* scrollbar) const
    17021702{
    17031703    if (scrollbar->orientation() == HorizontalScrollbar)
     
    17081708}
    17091709
    1710 LayoutPoint RenderLayer::scrollPosition() const
     1710IntPoint RenderLayer::scrollPosition() const
    17111711{
    17121712    return scrollOrigin() + m_scrollOffset;
    17131713}
    17141714
    1715 LayoutPoint RenderLayer::minimumScrollPosition() const
     1715IntPoint RenderLayer::minimumScrollPosition() const
    17161716{
    17171717    return scrollOrigin();
    17181718}
    17191719
    1720 LayoutPoint RenderLayer::maximumScrollPosition() const
     1720IntPoint RenderLayer::maximumScrollPosition() const
    17211721{
    17221722    // FIXME: m_scrollSize may not be up-to-date if m_scrollDimensionsDirty is true.
     
    17381738}
    17391739
    1740 LayoutSize RenderLayer::overhangAmount() const
    1741 {
    1742     return LayoutSize();
    1743 }
    1744 
    1745 void RenderLayer::didCompleteRubberBand(const LayoutSize&) const
     1740IntSize RenderLayer::overhangAmount() const
     1741{
     1742    return IntSize();
     1743}
     1744
     1745void RenderLayer::didCompleteRubberBand(const IntSize&) const
    17461746{
    17471747}
     
    17531753}
    17541754
    1755 static LayoutRect cornerRect(const RenderLayer* layer, const LayoutRect& bounds)
     1755static IntRect cornerRect(const RenderLayer* layer, const IntRect& bounds)
    17561756{
    17571757    int horizontalThickness;
     
    17721772        verticalThickness = layer->horizontalScrollbar()->height();
    17731773    }
    1774     return LayoutRect(bounds.maxX() - horizontalThickness - layer->renderer()->style()->borderRightWidth(),
    1775                       bounds.maxY() - verticalThickness - layer->renderer()->style()->borderBottomWidth(),
    1776                       horizontalThickness, verticalThickness);
    1777 }
    1778 
    1779 LayoutRect RenderLayer::scrollCornerRect() const
     1774    return IntRect(bounds.maxX() - horizontalThickness - layer->renderer()->style()->borderRightWidth(),
     1775                   bounds.maxY() - verticalThickness - layer->renderer()->style()->borderBottomWidth(),
     1776                   horizontalThickness, verticalThickness);
     1777}
     1778
     1779IntRect RenderLayer::scrollCornerRect() const
    17801780{
    17811781    // We have a scrollbar corner when a scrollbar is visible and not filling the entire length of the box.
     
    17881788    if ((hasHorizontalBar && hasVerticalBar) || (hasResizer && (hasHorizontalBar || hasVerticalBar)))
    17891789        return cornerRect(this, renderBox()->borderBoxRect());
    1790     return LayoutRect();
    1791 }
    1792 
    1793 static LayoutRect resizerCornerRect(const RenderLayer* layer, const LayoutRect& bounds)
     1790    return IntRect();
     1791}
     1792
     1793static IntRect resizerCornerRect(const RenderLayer* layer, const IntRect& bounds)
    17941794{
    17951795    ASSERT(layer->renderer()->isBox());
    17961796    if (layer->renderer()->style()->resize() == RESIZE_NONE)
    1797         return LayoutRect();
     1797        return IntRect();
    17981798    return cornerRect(layer, bounds);
    17991799}
    18001800
    1801 LayoutRect RenderLayer::scrollCornerAndResizerRect() const
     1801IntRect RenderLayer::scrollCornerAndResizerRect() const
    18021802{
    18031803    RenderBox* box = renderBox();
    18041804    if (!box)
    1805         return LayoutRect();
    1806     LayoutRect scrollCornerAndResizer = scrollCornerRect();
     1805        return IntRect();
     1806    IntRect scrollCornerAndResizer = scrollCornerRect();
    18071807    if (scrollCornerAndResizer.isEmpty())
    18081808        scrollCornerAndResizer = resizerCornerRect(this, box->borderBoxRect());
     
    18161816}
    18171817
    1818 LayoutRect RenderLayer::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const LayoutRect& scrollbarRect) const
     1818IntRect RenderLayer::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntRect& scrollbarRect) const
    18191819{
    18201820    RenderView* view = renderer()->view();
     
    18221822        return scrollbarRect;
    18231823
    1824     LayoutRect rect = scrollbarRect;
     1824    IntRect rect = scrollbarRect;
    18251825    rect.move(scrollbarOffset(scrollbar));
    18261826
     
    18281828}
    18291829
    1830 LayoutRect RenderLayer::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const LayoutRect& parentRect) const
     1830IntRect RenderLayer::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const
    18311831{
    18321832    RenderView* view = renderer()->view();
     
    18341834        return parentRect;
    18351835
    1836     LayoutRect rect = view->frameView()->convertToRenderer(renderer(), parentRect);
     1836    IntRect rect = view->frameView()->convertToRenderer(renderer(), parentRect);
    18371837    rect.move(-scrollbarOffset(scrollbar));
    18381838    return rect;
    18391839}
    18401840
    1841 LayoutPoint RenderLayer::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const LayoutPoint& scrollbarPoint) const
     1841IntPoint RenderLayer::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntPoint& scrollbarPoint) const
    18421842{
    18431843    RenderView* view = renderer()->view();
     
    18451845        return scrollbarPoint;
    18461846
    1847     LayoutPoint point = scrollbarPoint;
     1847    IntPoint point = scrollbarPoint;
    18481848    point.move(scrollbarOffset(scrollbar));
    18491849    return view->frameView()->convertFromRenderer(renderer(), point);
    18501850}
    18511851
    1852 LayoutPoint RenderLayer::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const LayoutPoint& parentPoint) const
     1852IntPoint RenderLayer::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const
    18531853{
    18541854    RenderView* view = renderer()->view();
     
    18561856        return parentPoint;
    18571857
    1858     LayoutPoint point = view->frameView()->convertToRenderer(renderer(), parentPoint);
     1858    IntPoint point = view->frameView()->convertToRenderer(renderer(), parentPoint);
    18591859
    18601860    point.move(-scrollbarOffset(scrollbar));
     
    18621862}
    18631863
    1864 LayoutSize RenderLayer::contentsSize() const
    1865 {
    1866     return LayoutSize(const_cast<RenderLayer*>(this)->scrollWidth(), const_cast<RenderLayer*>(this)->scrollHeight());
    1867 }
    1868 
    1869 LayoutUnit RenderLayer::visibleHeight() const
     1864IntSize RenderLayer::contentsSize() const
     1865{
     1866    return IntSize(const_cast<RenderLayer*>(this)->scrollWidth(), const_cast<RenderLayer*>(this)->scrollHeight());
     1867}
     1868
     1869int RenderLayer::visibleHeight() const
    18701870{
    18711871    return m_layerSize.height();
    18721872}
    18731873
    1874 LayoutUnit RenderLayer::visibleWidth() const
     1874int RenderLayer::visibleWidth() const
    18751875{
    18761876    return m_layerSize.width();
     
    18901890}
    18911891
    1892 LayoutPoint RenderLayer::currentMousePosition() const
    1893 {
    1894     return renderer()->frame() ? renderer()->frame()->eventHandler()->currentMousePosition() : LayoutPoint();
    1895 }
    1896 
    1897 LayoutSize RenderLayer::scrollbarOffset(const Scrollbar* scrollbar) const
     1892IntPoint RenderLayer::currentMousePosition() const
     1893{
     1894    return renderer()->frame() ? renderer()->frame()->eventHandler()->currentMousePosition() : IntPoint();
     1895}
     1896
     1897IntSize RenderLayer::scrollbarOffset(const Scrollbar* scrollbar) const
    18981898{
    18991899    RenderBox* box = renderBox();
    19001900
    19011901    if (scrollbar == m_vBar.get())
    1902         return LayoutSize(box->width() - box->borderRight() - scrollbar->width(), box->borderTop());
     1902        return IntSize(box->width() - box->borderRight() - scrollbar->width(), box->borderTop());
    19031903
    19041904    if (scrollbar == m_hBar.get())
    1905         return LayoutSize(box->borderLeft(), box->height() - box->borderBottom() - scrollbar->height());
     1905        return IntSize(box->borderLeft(), box->height() - box->borderBottom() - scrollbar->height());
    19061906   
    19071907    ASSERT_NOT_REACHED();
    1908     return LayoutSize();
    1909 }
    1910 
    1911 void RenderLayer::invalidateScrollbarRect(Scrollbar* scrollbar, const LayoutRect& rect)
     1908    return IntSize();
     1909}
     1910
     1911void RenderLayer::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect& rect)
    19121912{
    19131913#if USE(ACCELERATED_COMPOSITING)
     
    19241924    }
    19251925#endif
    1926     LayoutRect scrollRect = rect;
     1926    IntRect scrollRect = rect;
    19271927    RenderBox* box = renderBox();
    19281928    ASSERT(box);
     
    19341934}
    19351935
    1936 void RenderLayer::invalidateScrollCornerRect(const LayoutRect& rect)
     1936void RenderLayer::invalidateScrollCornerRect(const IntRect& rect)
    19371937{
    19381938#if USE(ACCELERATED_COMPOSITING)
     
    21042104        return;
    21052105
    2106     const LayoutRect& borderBox = box->borderBoxRect();
    2107     const LayoutRect& scrollCorner = scrollCornerRect();
    2108     LayoutRect absBounds(borderBox.location() + offsetFromLayer, borderBox.size());
     2106    const IntRect borderBox = box->borderBoxRect();
     2107    const IntRect& scrollCorner = scrollCornerRect();
     2108    IntRect absBounds(borderBox.location() + offsetFromLayer, borderBox.size());
    21092109    if (m_vBar)
    2110         m_vBar->setFrameRect(LayoutRect(absBounds.maxX() - box->borderRight() - m_vBar->width(),
    2111                                         absBounds.y() + box->borderTop(),
    2112                                         m_vBar->width(),
    2113                                         absBounds.height() - (box->borderTop() + box->borderBottom()) - scrollCorner.height()));
     2110        m_vBar->setFrameRect(IntRect(absBounds.maxX() - box->borderRight() - m_vBar->width(),
     2111                                     absBounds.y() + box->borderTop(),
     2112                                     m_vBar->width(),
     2113                                     absBounds.height() - (box->borderTop() + box->borderBottom()) - scrollCorner.height()));
    21142114
    21152115    if (m_hBar)
    2116         m_hBar->setFrameRect(LayoutRect(absBounds.x() + box->borderLeft(),
    2117                                         absBounds.maxY() - box->borderBottom() - m_hBar->height(),
    2118                                         absBounds.width() - (box->borderLeft() + box->borderRight()) - scrollCorner.width(),
    2119                                         m_hBar->height()));
     2116        m_hBar->setFrameRect(IntRect(absBounds.x() + box->borderLeft(),
     2117                                     absBounds.maxY() - box->borderBottom() - m_hBar->height(),
     2118                                     absBounds.width() - (box->borderLeft() + box->borderRight()) - scrollCorner.width(),
     2119                                     m_hBar->height()));
    21202120
    21212121#if USE(ACCELERATED_COMPOSITING)
     
    22082208    m_scrollSize.setHeight(overflowBottom() - overflowTop());
    22092209   
    2210     setScrollOrigin(LayoutPoint(-m_scrollOverflow.width(), -m_scrollOverflow.height()));
     2210    setScrollOrigin(IntPoint(-m_scrollOverflow.width(), -m_scrollOverflow.height()));
    22112211
    22122212    if (needHBar)
     
    22532253        // Layout may cause us to be in an invalid scroll position.  In this case we need
    22542254        // to pull our scroll offsets back to the max (or push them up to the min).
    2255         LayoutUnit newX = max<LayoutUnit>(0, min(scrollXOffset(), scrollWidth() - box->clientWidth()));
    2256         LayoutUnit newY = max<LayoutUnit>(0, min(scrollYOffset(), scrollHeight() - box->clientHeight()));
     2255        int newX = max(0, min(scrollXOffset(), scrollWidth() - box->clientWidth()));
     2256        int newY = max(0, min(scrollYOffset(), scrollHeight() - box->clientHeight()));
    22572257        if (newX != scrollXOffset() || newY != scrollYOffset())
    22582258            scrollToOffset(newX, newY);
     
    25032503    ASSERT(box);
    25042504   
    2505     LayoutRect resizeControlRect;
     2505    IntRect resizeControlRect;
    25062506    if (renderer()->style()->resize() != RESIZE_NONE) {
    25072507        resizeControlRect = resizerCornerRect(this, box->borderBoxRect());
     
    25102510    }
    25112511
    2512     LayoutUnit resizeControlSize = max<LayoutUnit>(resizeControlRect.height(), 0);
     2512    int resizeControlSize = max(resizeControlRect.height(), 0);
    25132513
    25142514    if (m_vBar) {
     
    25232523    }
    25242524
    2525     resizeControlSize = max<LayoutUnit>(resizeControlRect.width(), 0);
     2525    resizeControlSize = max(resizeControlRect.width(), 0);
    25262526    if (m_hBar) {
    25272527        LayoutRect hBarRect(box->borderLeft(),
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r99002 r99511  
    260260    void setLocation(LayoutUnit x, LayoutUnit y) { m_topLeft = LayoutPoint(x, y); }
    261261
    262     const LayoutSize& size() const { return m_layerSize; }
    263     void setSize(const LayoutSize& size) { m_layerSize = size; }
     262    const IntSize& size() const { return m_layerSize; }
     263    void setSize(const IntSize& size) { m_layerSize = size; }
    264264
    265265    LayoutRect rect() const { return LayoutRect(location(), size()); }
     
    280280    LayoutSize scrolledContentOffset() const { return scrollOffset() + m_scrollOverflow; }
    281281
    282     LayoutUnit scrollXOffset() const { return m_scrollOffset.width() + scrollOrigin().x(); }
    283     LayoutUnit scrollYOffset() const { return m_scrollOffset.height() + scrollOrigin().y(); }
    284     LayoutSize scrollOffset() const { return LayoutSize(scrollXOffset(), scrollYOffset()); }
     282    int scrollXOffset() const { return m_scrollOffset.width() + scrollOrigin().x(); }
     283    int scrollYOffset() const { return m_scrollOffset.height() + scrollOrigin().y(); }
     284    IntSize scrollOffset() const { return IntSize(scrollXOffset(), scrollYOffset()); }
    285285
    286286    void scrollToOffset(LayoutUnit, LayoutUnit, ScrollOffsetClamping = ScrollOffsetUnclamped);
     
    593593    bool shouldBeNormalFlowOnly() const;
    594594
    595     LayoutUnit scrollPosition(Scrollbar*) const;
     595    int scrollPosition(Scrollbar*) const;
    596596   
    597597    // ScrollableArea interface
    598     virtual void invalidateScrollbarRect(Scrollbar*, const LayoutRect&);
    599     virtual void invalidateScrollCornerRect(const LayoutRect&);
     598    virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&);
     599    virtual void invalidateScrollCornerRect(const IntRect&);
    600600    virtual bool isActive() const;
    601601    virtual bool isScrollCornerVisible() const;
    602     virtual LayoutRect scrollCornerRect() const;
    603     virtual LayoutRect convertFromScrollbarToContainingView(const Scrollbar*, const LayoutRect&) const;
    604     virtual LayoutRect convertFromContainingViewToScrollbar(const Scrollbar*, const LayoutRect&) const;
    605     virtual LayoutPoint convertFromScrollbarToContainingView(const Scrollbar*, const LayoutPoint&) const;
    606     virtual LayoutPoint convertFromContainingViewToScrollbar(const Scrollbar*, const LayoutPoint&) const;
    607     virtual LayoutUnit scrollSize(ScrollbarOrientation) const;
    608     virtual void setScrollOffset(const LayoutPoint&);
    609     virtual LayoutPoint scrollPosition() const;
    610     virtual LayoutPoint minimumScrollPosition() const;
    611     virtual LayoutPoint maximumScrollPosition() const;
     602    virtual IntRect scrollCornerRect() const;
     603    virtual IntRect convertFromScrollbarToContainingView(const Scrollbar*, const IntRect&) const;
     604    virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar*, const IntRect&) const;
     605    virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar*, const IntPoint&) const;
     606    virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, const IntPoint&) const;
     607    virtual int scrollSize(ScrollbarOrientation) const;
     608    virtual void setScrollOffset(const IntPoint&);
     609    virtual IntPoint scrollPosition() const;
     610    virtual IntPoint minimumScrollPosition() const;
     611    virtual IntPoint maximumScrollPosition() const;
    612612    virtual IntRect visibleContentRect(bool includeScrollbars) const;
    613     virtual LayoutUnit visibleHeight() const;
    614     virtual LayoutUnit visibleWidth() const;
    615     virtual LayoutSize contentsSize() const;
    616     virtual LayoutSize overhangAmount() const;
    617     virtual LayoutPoint currentMousePosition() const;
    618     virtual void didCompleteRubberBand(const LayoutSize&) const;
     613    virtual int visibleHeight() const;
     614    virtual int visibleWidth() const;
     615    virtual IntSize contentsSize() const;
     616    virtual IntSize overhangAmount() const;
     617    virtual IntPoint currentMousePosition() const;
     618    virtual void didCompleteRubberBand(const IntSize&) const;
    619619    virtual bool shouldSuspendScrollAnimations() const;
    620620    virtual bool isOnActivePage() const;
    621621
    622622    // Rectangle encompassing the scroll corner and resizer rect.
    623     LayoutRect scrollCornerAndResizerRect() const;
     623    IntRect scrollCornerAndResizerRect() const;
    624624
    625625    virtual void disconnectFromPage() { m_scrollableAreaPage = 0; }
    626626
    627627    // NOTE: This should only be called by the overriden setScrollOffset from ScrollableArea.
    628     void scrollTo(LayoutUnit, LayoutUnit);
    629 
    630     LayoutSize scrollbarOffset(const Scrollbar*) const;
     628    void scrollTo(int, int);
     629
     630    IntSize scrollbarOffset(const Scrollbar*) const;
    631631   
    632632    void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow);
     
    756756
    757757    // The layer's width/height
    758     LayoutSize m_layerSize;
     758    IntSize m_layerSize;
    759759
    760760    // Our scroll offsets if the view is scrolled.
    761     LayoutSize m_scrollOffset;
     761    IntSize m_scrollOffset;
    762762
    763763    LayoutSize m_scrollOverflow;
    764764   
    765765    // The width/height of our scrolled area.
    766     LayoutSize m_scrollSize;
     766    IntSize m_scrollSize;
    767767
    768768    // For layers with overflow, we have a pair of scrollbars.
  • trunk/Source/WebCore/rendering/RenderListBox.cpp

    r99016 r99511  
    542542void RenderListBox::autoscroll()
    543543{
    544     LayoutPoint pos = frame()->view()->windowToContents(frame()->eventHandler()->currentMousePosition());
     544    IntPoint pos = frame()->view()->windowToContents(frame()->eventHandler()->currentMousePosition());
    545545
    546546    int endIndex = scrollToward(pos);
     
    709709}
    710710
    711 void RenderListBox::invalidateScrollbarRect(Scrollbar* scrollbar, const LayoutRect& rect)
    712 {
    713     LayoutRect scrollRect = rect;
     711void RenderListBox::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect& rect)
     712{
     713    IntRect scrollRect = rect;
    714714    scrollRect.move(width() - borderRight() - scrollbar->width(), borderTop());
    715715    repaintRectangle(scrollRect);
    716716}
    717717
    718 LayoutRect RenderListBox::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const LayoutRect& scrollbarRect) const
     718IntRect RenderListBox::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntRect& scrollbarRect) const
    719719{
    720720    RenderView* view = this->view();
     
    722722        return scrollbarRect;
    723723
    724     LayoutRect rect = scrollbarRect;
    725 
    726     LayoutUnit scrollbarLeft = width() - borderRight() - scrollbar->width();
    727     LayoutUnit scrollbarTop = borderTop();
     724    IntRect rect = scrollbarRect;
     725
     726    int scrollbarLeft = width() - borderRight() - scrollbar->width();
     727    int scrollbarTop = borderTop();
    728728    rect.move(scrollbarLeft, scrollbarTop);
    729729
     
    731731}
    732732
    733 LayoutRect RenderListBox::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const LayoutRect& parentRect) const
     733IntRect RenderListBox::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const
    734734{
    735735    RenderView* view = this->view();
     
    737737        return parentRect;
    738738
    739     LayoutRect rect = view->frameView()->convertToRenderer(this, parentRect);
    740 
    741     LayoutUnit scrollbarLeft = width() - borderRight() - scrollbar->width();
    742     LayoutUnit scrollbarTop = borderTop();
     739    IntRect rect = view->frameView()->convertToRenderer(this, parentRect);
     740
     741    int scrollbarLeft = width() - borderRight() - scrollbar->width();
     742    int scrollbarTop = borderTop();
    743743    rect.move(-scrollbarLeft, -scrollbarTop);
    744744    return rect;
    745745}
    746746
    747 LayoutPoint RenderListBox::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const LayoutPoint& scrollbarPoint) const
     747IntPoint RenderListBox::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntPoint& scrollbarPoint) const
    748748{
    749749    RenderView* view = this->view();
     
    751751        return scrollbarPoint;
    752752
    753     LayoutPoint point = scrollbarPoint;
    754 
    755     LayoutUnit scrollbarLeft = width() - borderRight() - scrollbar->width();
    756     LayoutUnit scrollbarTop = borderTop();
     753    IntPoint point = scrollbarPoint;
     754
     755    int scrollbarLeft = width() - borderRight() - scrollbar->width();
     756    int scrollbarTop = borderTop();
    757757    point.move(scrollbarLeft, scrollbarTop);
    758758
     
    760760}
    761761
    762 LayoutPoint RenderListBox::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const LayoutPoint& parentPoint) const
     762IntPoint RenderListBox::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const
    763763{
    764764    RenderView* view = this->view();
     
    766766        return parentPoint;
    767767
    768     LayoutPoint point = view->frameView()->convertToRenderer(this, parentPoint);
    769 
    770     LayoutUnit scrollbarLeft = width() - borderRight() - scrollbar->width();
    771     LayoutUnit scrollbarTop = borderTop();
     768    IntPoint point = view->frameView()->convertToRenderer(this, parentPoint);
     769
     770    int scrollbarLeft = width() - borderRight() - scrollbar->width();
     771    int scrollbarTop = borderTop();
    772772    point.move(-scrollbarLeft, -scrollbarTop);
    773773    return point;
    774774}
    775775
    776 LayoutSize RenderListBox::contentsSize() const
    777 {
    778     return LayoutSize(scrollWidth(), scrollHeight());
    779 }
    780 
    781 LayoutUnit RenderListBox::visibleHeight() const
     776IntSize RenderListBox::contentsSize() const
     777{
     778    return IntSize(scrollWidth(), scrollHeight());
     779}
     780
     781int RenderListBox::visibleHeight() const
    782782{
    783783    return height();
    784784}
    785785
    786 LayoutUnit RenderListBox::visibleWidth() const
     786int RenderListBox::visibleWidth() const
    787787{
    788788    return width();
    789789}
    790790
    791 LayoutPoint RenderListBox::currentMousePosition() const
     791IntPoint RenderListBox::currentMousePosition() const
    792792{
    793793    RenderView* view = this->view();
    794794    if (!view)
    795         return LayoutPoint();
     795        return IntPoint();
    796796    return view->frameView()->currentMousePosition();
    797797}
  • trunk/Source/WebCore/rendering/RenderListBox.h

    r99016 r99511  
    103103    virtual LayoutUnit scrollPosition(Scrollbar*) const;
    104104    virtual void setScrollOffset(const LayoutPoint&);
    105     virtual void invalidateScrollbarRect(Scrollbar*, const LayoutRect&);
     105    virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&);
    106106    virtual bool isActive() const;
    107107    virtual bool isScrollCornerVisible() const { return false; } // We don't support resize on list boxes yet. If we did these would have to change.
    108     virtual LayoutRect scrollCornerRect() const { return LayoutRect(); }
    109     virtual void invalidateScrollCornerRect(const LayoutRect&) { }
    110     virtual LayoutRect convertFromScrollbarToContainingView(const Scrollbar*, const LayoutRect&) const;
    111     virtual LayoutRect convertFromContainingViewToScrollbar(const Scrollbar*, const LayoutRect&) const;
    112     virtual LayoutPoint convertFromScrollbarToContainingView(const Scrollbar*, const LayoutPoint&) const;
    113     virtual LayoutPoint convertFromContainingViewToScrollbar(const Scrollbar*, const LayoutPoint&) const;
     108    virtual IntRect scrollCornerRect() const { return IntRect(); }
     109    virtual void invalidateScrollCornerRect(const IntRect&) { }
     110    virtual IntRect convertFromScrollbarToContainingView(const Scrollbar*, const IntRect&) const;
     111    virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar*, const IntRect&) const;
     112    virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar*, const IntPoint&) const;
     113    virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, const IntPoint&) const;
    114114    virtual Scrollbar* verticalScrollbar() const { return m_vBar.get(); }
    115     virtual LayoutSize contentsSize() const;
    116     virtual LayoutUnit visibleHeight() const;
    117     virtual LayoutUnit visibleWidth() const;
    118     virtual LayoutPoint currentMousePosition() const;
     115    virtual IntSize contentsSize() const;
     116    virtual int visibleHeight() const;
     117    virtual int visibleWidth() const;
     118    virtual IntPoint currentMousePosition() const;
    119119    virtual bool shouldSuspendScrollAnimations() const;
    120120    virtual bool isOnActivePage() const;
  • trunk/Source/WebCore/rendering/RenderMenuList.cpp

    r99035 r99511  
    503503}
    504504
    505 LayoutUnit RenderMenuList::clientPaddingLeft() const
     505int RenderMenuList::clientPaddingLeft() const
    506506{
    507507    return paddingLeft() + m_innerBlock->paddingLeft();
     
    509509
    510510const int endOfLinePadding = 2;
    511 LayoutUnit RenderMenuList::clientPaddingRight() const
     511int RenderMenuList::clientPaddingRight() const
    512512{
    513513    if (style()->appearance() == MenulistPart || style()->appearance() == MenulistButtonPart) {
  • trunk/Source/WebCore/rendering/RenderMenuList.h

    r99016 r99511  
    9393    virtual int clientInsetLeft() const;
    9494    virtual int clientInsetRight() const;
    95     virtual LayoutUnit clientPaddingLeft() const;
    96     virtual LayoutUnit clientPaddingRight() const;
     95    virtual int clientPaddingLeft() const;
     96    virtual int clientPaddingRight() const;
    9797    virtual int listSize() const;
    9898    virtual int selectedIndex() const;
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r99016 r99511  
    629629}
    630630
    631 LayoutUnit RenderTextControlSingleLine::clientPaddingLeft() const
    632 {
    633     LayoutUnit padding = paddingLeft();
     631int RenderTextControlSingleLine::clientPaddingLeft() const
     632{
     633    int padding = paddingLeft();
    634634
    635635    HTMLElement* resultsButton = resultsButtonElement();
     
    640640}
    641641
    642 LayoutUnit RenderTextControlSingleLine::clientPaddingRight() const
    643 {
    644     LayoutUnit padding = paddingRight();
     642int RenderTextControlSingleLine::clientPaddingRight() const
     643{
     644    int padding = paddingRight();
    645645
    646646    HTMLElement* cancelButton = cancelButtonElement();
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h

    r99016 r99511  
    103103    virtual int clientInsetLeft() const;
    104104    virtual int clientInsetRight() const;
    105     virtual LayoutUnit clientPaddingLeft() const;
    106     virtual LayoutUnit clientPaddingRight() const;
     105    virtual int clientPaddingLeft() const;
     106    virtual int clientPaddingRight() const;
    107107    virtual int listSize() const;
    108108    virtual int selectedIndex() const;
  • trunk/Source/WebKit/chromium/ChangeLog

    r99509 r99511  
     12011-11-07  Emil A Eklund  <eae@chromium.org>
     2
     3        Revert platform and scrolling to ints
     4        https://bugs.webkit.org/show_bug.cgi?id=71585
     5
     6        Reviewed by Eric Seidel.
     7
     8        Replace all uses of LayoutUnit and related types with ints in platform
     9        and scrolling code.
     10
     11        * tests/ScrollAnimatorNoneTest.cpp:
     12        (MockScrollableArea::visibleHeight):
     13        (MockScrollableArea::visibleWidth):
     14
    1152011-11-07  Adam Barth  <abarth@webkit.org>
    216
  • trunk/Source/WebKit/chromium/tests/ScrollAnimatorNoneTest.cpp

    r95901 r99511  
    6565    MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*());
    6666
    67     virtual LayoutUnit visibleHeight() const { return 768; }
    68     virtual LayoutUnit visibleWidth() const { return 1024; }
     67    virtual int visibleHeight() const { return 768; }
     68    virtual int visibleWidth() const { return 1024; }
    6969
    7070    bool scrollAnimatorEnabled() const { return m_scrollAnimatorEnabled; }
  • trunk/Source/WebKit2/ChangeLog

    r99509 r99511  
     12011-11-07  Emil A Eklund  <eae@chromium.org>
     2
     3        Revert platform and scrolling to ints
     4        https://bugs.webkit.org/show_bug.cgi?id=71585
     5
     6        Reviewed by Eric Seidel.
     7
     8        Replace all uses of LayoutUnit and related types with ints in platform
     9        and scrolling code.
     10
     11        * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
     12        (WebKit::BuiltInPDFView::invalidateScrollbarRect):
     13        (WebKit::BuiltInPDFView::visibleHeight):
     14        (WebKit::BuiltInPDFView::visibleWidth):
     15        * WebProcess/Plugins/PDF/BuiltInPDFView.h:
     16
    1172011-11-07  Adam Barth  <abarth@webkit.org>
    218
  • trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp

    r99493 r99511  
    607607void BuiltInPDFView::invalidateScrollbarRect(Scrollbar* scrollbar, const LayoutRect& rect)
    608608{
    609     LayoutRect dirtyRect = rect;
     609    IntRect dirtyRect = rect;
    610610    dirtyRect.moveBy(scrollbar->location());
    611611    dirtyRect.moveBy(-pluginView()->location());
     
    653653}
    654654
    655 LayoutUnit BuiltInPDFView::visibleHeight() const
     655int BuiltInPDFView::visibleHeight() const
    656656{
    657657    return m_pluginSize.height();
    658658}
    659659
    660 LayoutUnit BuiltInPDFView::visibleWidth() const
     660int BuiltInPDFView::visibleWidth() const
    661661{
    662662    return m_pluginSize.width();
  • trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h

    r99241 r99511  
    127127    virtual WebCore::IntPoint minimumScrollPosition() const;
    128128    virtual WebCore::IntPoint maximumScrollPosition() const;
    129     virtual WebCore::LayoutUnit visibleHeight() const;
    130     virtual WebCore::LayoutUnit visibleWidth() const;
     129    virtual int visibleHeight() const;
     130    virtual int visibleWidth() const;
    131131    virtual WebCore::IntSize contentsSize() const;
    132132    virtual WebCore::Scrollbar* horizontalScrollbar() const  { return m_horizontalScrollbar.get(); }
Note: See TracChangeset for help on using the changeset viewer.