Changeset 93429 in webkit


Ignore:
Timestamp:
Aug 19, 2011 12:26:03 PM (13 years ago)
Author:
eae@chromium.org
Message:

Switch RenderLayer to to new layout types
https://bugs.webkit.org/show_bug.cgi?id=66507

Reviewed by Eric Seidel.

Convert RenderLayer to new layout abstraction.

No new tests as no new functionality.

  • rendering/LayoutTypes.h:

(WebCore::flooredLayoutSize):

  • rendering/RenderLayer.cpp:
  • rendering/RenderLayer.h:
  • rendering/RenderLayerBacking.cpp:
  • rendering/RenderLayerBacking.h:
  • rendering/RenderLayerCompositor.cpp:
  • rendering/RenderLayerCompositor.h:
Location:
trunk/Source/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r93428 r93429  
     12011-08-19  Emil A Eklund  <eae@chromium.org>
     2
     3        Switch RenderLayer to to new layout types
     4        https://bugs.webkit.org/show_bug.cgi?id=66507
     5
     6        Reviewed by Eric Seidel.
     7
     8        Convert RenderLayer to new layout abstraction.
     9
     10        No new tests as no new functionality.
     11
     12        * rendering/LayoutTypes.h:
     13        (WebCore::flooredLayoutSize):
     14        * rendering/RenderLayer.cpp:
     15        * rendering/RenderLayer.h:
     16        * rendering/RenderLayerBacking.cpp:
     17        * rendering/RenderLayerBacking.h:
     18        * rendering/RenderLayerCompositor.cpp:
     19        * rendering/RenderLayerCompositor.h:
     20
    1212011-08-19  Mihnea Ovidenie  <mihnea@adobe.com>
    222
  • trunk/Source/WebCore/rendering/LayoutTypes.h

    r93334 r93429  
    7272}
    7373
     74inline LayoutSize flooredLayoutSize(const FloatPoint& p)
     75{
     76    return LayoutSize(static_cast<int>(p.x()), static_cast<int>(p.y()));
     77}
     78
    7479inline LayoutUnit roundedLayoutUnit(float value)
    7580{
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r93287 r93429  
    254254}
    255255
    256 void RenderLayer::updateLayerPositions(UpdateLayerPositionsFlags flags, IntPoint* cachedOffset)
     256void RenderLayer::updateLayerPositions(UpdateLayerPositionsFlags flags, LayoutPoint* cachedOffset)
    257257{
    258258    updateLayerPosition(); // For relpositioned layers or non-positioned layers,
    259259                           // we need to keep in sync, since we may have shifted relative
    260260                           // to our parent layer.
    261     IntPoint oldCachedOffset;
     261    LayoutPoint oldCachedOffset;
    262262    if (cachedOffset) {
    263263        // We can't cache our offset to the repaint container if the mapping is anything more complex than a simple translation
     
    276276                cachedOffset->move(m_topLeft.x(), m_topLeft.y()); // Fast case
    277277            else {
    278                 IntPoint offset;
     278                LayoutPoint offset;
    279279                convertToLayerCoords(root(), offset);
    280280                *cachedOffset = offset;
     
    283283    }
    284284
    285     IntPoint offset;
     285    LayoutPoint offset;
    286286    if (cachedOffset) {
    287287        offset = *cachedOffset;
    288288#ifndef NDEBUG
    289         IntPoint nonCachedOffset;
     289        LayoutPoint nonCachedOffset;
    290290        convertToLayerCoords(root(), nonCachedOffset);
    291291        ASSERT(offset == nonCachedOffset);
     
    310310
    311311        RenderBoxModelObject* repaintContainer = renderer()->containerForRepaint();
    312         IntRect newRect = renderer()->clippedOverflowRectForRepaint(repaintContainer);
    313         IntRect newOutlineBox = renderer()->outlineBoundsForRepaint(repaintContainer, cachedOffset);
     312        LayoutRect newRect = renderer()->clippedOverflowRectForRepaint(repaintContainer);
     313        LayoutRect newOutlineBox = renderer()->outlineBoundsForRepaint(repaintContainer, cachedOffset);
    314314        // FIXME: Should ASSERT that value calculated for newOutlineBox using the cached offset is the same
    315315        // as the value not using the cached offset, but we can't due to https://bugs.webkit.org/show_bug.cgi?id=37048
     
    327327        m_outlineBox = newOutlineBox;
    328328    } else {
    329         m_repaintRect = IntRect();
    330         m_outlineBox = IntRect();
     329        m_repaintRect = LayoutRect();
     330        m_outlineBox = LayoutRect();
    331331    }
    332332
     
    363363}
    364364
    365 IntRect RenderLayer::repaintRectIncludingDescendants() const
    366 {
    367     IntRect repaintRect = m_repaintRect;
     365LayoutRect RenderLayer::repaintRectIncludingDescendants() const
     366{
     367    LayoutRect repaintRect = m_repaintRect;
    368368    for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
    369369        repaintRect.unite(child->repaintRectIncludingDescendants());
     
    642642void RenderLayer::updateLayerPosition()
    643643{
    644     IntPoint localPoint;
    645     IntSize inlineBoundingBoxOffset; // We don't put this into the RenderLayer x/y for inlines, so we need to subtract it out when done.
     644    LayoutPoint localPoint;
     645    LayoutSize inlineBoundingBoxOffset; // We don't put this into the RenderLayer x/y for inlines, so we need to subtract it out when done.
    646646    if (renderer()->isRenderInline()) {
    647647        RenderInline* inlineFlow = toRenderInline(renderer());
    648         IntRect lineBox = inlineFlow->linesBoundingBox();
     648        LayoutRect lineBox = inlineFlow->linesBoundingBox();
    649649        setSize(lineBox.size());
    650650        inlineBoundingBoxOffset = toSize(lineBox.location());
     
    681681
    682682        // For positioned layers, we subtract out the enclosing positioned layer's scroll offset.
    683         IntSize offset = positionedParent->scrolledContentOffset();
     683        LayoutSize offset = positionedParent->scrolledContentOffset();
    684684        localPoint -= offset;
    685685       
    686686        if (renderer()->isPositioned() && positionedParent->renderer()->isRelPositioned() && positionedParent->renderer()->isRenderInline()) {
    687             IntSize offset = toRenderInline(positionedParent->renderer())->relativePositionedInlineOffset(toRenderBox(renderer()));
     687            LayoutSize offset = toRenderInline(positionedParent->renderer())->relativePositionedInlineOffset(toRenderBox(renderer()));
    688688            localPoint += offset;
    689689        }
     
    692692            // FIXME: Composited layers ignore pagination, so about the best we can do is make sure they're offset into the appropriate column.
    693693            // They won't split across columns properly.
    694             IntSize columnOffset;
     694            LayoutSize columnOffset;
    695695            parent()->renderer()->adjustForColumns(columnOffset, localPoint);
    696696            localPoint += columnOffset;
    697697        }
    698698
    699         IntSize scrollOffset = parent()->scrolledContentOffset();
     699        LayoutSize scrollOffset = parent()->scrolledContentOffset();
    700700        localPoint -= scrollOffset;
    701701    }
     
    705705        localPoint.move(m_relativeOffset);
    706706    } else {
    707         m_relativeOffset = IntSize();
     707        m_relativeOffset = LayoutSize();
    708708    }
    709709
     
    723723
    724724    // Maybe fetch the perspective from the backing?
    725     const IntRect borderBox = toRenderBox(renderer())->borderBoxRect();
     725    const LayoutRect borderBox = toRenderBox(renderer())->borderBoxRect();
    726726    const float boxWidth = borderBox.width();
    727727    const float boxHeight = borderBox.height();
     
    748748        return FloatPoint();
    749749
    750     const IntRect borderBox = toRenderBox(renderer())->borderBoxRect();
     750    const LayoutRect borderBox = toRenderBox(renderer())->borderBoxRect();
    751751    RenderStyle* style = renderer()->style();
    752752
     
    849849}
    850850
    851 IntPoint RenderLayer::absoluteToContents(const IntPoint& absolutePoint) const
     851LayoutPoint RenderLayer::absoluteToContents(const LayoutPoint& absolutePoint) const
    852852{
    853853    // We don't use convertToLayerCoords because it doesn't know about transforms
    854     return roundedIntPoint(renderer()->absoluteToLocal(absolutePoint, false, true));
     854    return roundedLayoutPoint(renderer()->absoluteToLocal(absolutePoint, false, true));
    855855}
    856856
     
    887887}
    888888
    889 static IntRect transparencyClipBox(const RenderLayer* l, const RenderLayer* rootLayer, PaintBehavior paintBehavior);
    890 
    891 static void expandClipRectForDescendantsAndReflection(IntRect& clipRect, const RenderLayer* l, const RenderLayer* rootLayer, PaintBehavior paintBehavior)
     889static LayoutRect transparencyClipBox(const RenderLayer*, const RenderLayer* rootLayer, PaintBehavior);
     890
     891static void expandClipRectForDescendantsAndReflection(LayoutRect& clipRect, const RenderLayer* layer, const RenderLayer* rootLayer, PaintBehavior paintBehavior)
    892892{
    893893    // If we have a mask, then the clip is limited to the border box area (and there is
    894894    // no need to examine child layers).
    895     if (!l->renderer()->hasMask()) {
     895    if (!layer->renderer()->hasMask()) {
    896896        // Note: we don't have to walk z-order lists since transparent elements always establish
    897897        // a stacking context.  This means we can just walk the layer tree directly.
    898         for (RenderLayer* curr = l->firstChild(); curr; curr = curr->nextSibling()) {
    899             if (!l->reflection() || l->reflectionLayer() != curr)
     898        for (RenderLayer* curr = layer->firstChild(); curr; curr = curr->nextSibling()) {
     899            if (!layer->reflection() || layer->reflectionLayer() != curr)
    900900                clipRect.unite(transparencyClipBox(curr, rootLayer, paintBehavior));
    901901        }
     
    906906    // FIXME: Accelerated compositing will eventually want to do something smart here to avoid incorporating this
    907907    // size into the parent layer.
    908     if (l->renderer()->hasReflection()) {
    909         IntPoint delta;
    910         l->convertToLayerCoords(rootLayer, delta);
     908    if (layer->renderer()->hasReflection()) {
     909        LayoutPoint delta;
     910        layer->convertToLayerCoords(rootLayer, delta);
    911911        clipRect.move(-delta.x(), -delta.y());
    912         clipRect.unite(l->renderBox()->reflectedRect(clipRect));
     912        clipRect.unite(layer->renderBox()->reflectedRect(clipRect));
    913913        clipRect.moveBy(delta);
    914914    }
    915915}
    916916
    917 static IntRect transparencyClipBox(const RenderLayer* l, const RenderLayer* rootLayer, PaintBehavior paintBehavior)
     917static LayoutRect transparencyClipBox(const RenderLayer* layer, const RenderLayer* rootLayer, PaintBehavior paintBehavior)
    918918{
    919919    // FIXME: Although this function completely ignores CSS-imposed clipping, we did already intersect with the
     
    921921    // would be better to respect clips.
    922922   
    923     if (rootLayer != l && l->paintsWithTransform(paintBehavior)) {
     923    if (rootLayer != layer && layer->paintsWithTransform(paintBehavior)) {
    924924        // The best we can do here is to use enclosed bounding boxes to establish a "fuzzy" enough clip to encompass
    925925        // the transformed layer and all of its children.
    926         IntPoint delta;
    927         l->convertToLayerCoords(rootLayer, delta);
     926        LayoutPoint delta;
     927        layer->convertToLayerCoords(rootLayer, delta);
    928928
    929929        TransformationMatrix transform;
    930930        transform.translate(delta.x(), delta.y());
    931         transform = transform * *l->transform();
    932 
    933         IntRect clipRect = l->boundingBox(l);
    934         expandClipRectForDescendantsAndReflection(clipRect, l, l, paintBehavior);
     931        transform = transform * *layer->transform();
     932
     933        LayoutRect clipRect = layer->boundingBox(layer);
     934        expandClipRectForDescendantsAndReflection(clipRect, layer, layer, paintBehavior);
    935935        return transform.mapRect(clipRect);
    936936    }
    937937   
    938     IntRect clipRect = l->boundingBox(rootLayer);
    939     expandClipRectForDescendantsAndReflection(clipRect, l, rootLayer, paintBehavior);
     938    LayoutRect clipRect = layer->boundingBox(rootLayer);
     939    expandClipRectForDescendantsAndReflection(clipRect, layer, rootLayer, paintBehavior);
    940940    return clipRect;
    941941}
     
    953953        m_usedTransparency = true;
    954954        p->save();
    955         IntRect clipRect = transparencyClipBox(this, rootLayer, paintBehavior);
     955        LayoutRect clipRect = transparencyClipBox(this, rootLayer, paintBehavior);
    956956        p->clip(clipRect);
    957957        p->beginTransparencyLayer(renderer()->opacity());
     
    11161116
    11171117void
    1118 RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, IntPoint& location) const
     1118RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutPoint& location) const
    11191119{
    11201120    if (ancestorLayer == this)
     
    11261126        // localToAbsolute() on the RenderView.
    11271127        FloatPoint absPos = renderer()->localToAbsolute(FloatPoint(), true);
    1128         location += flooredIntSize(absPos);
     1128        location += flooredLayoutSize(absPos);
    11291129        return;
    11301130    }
     
    11501150
    11511151        if (fixedPositionContainerLayer != ancestorLayer) {
    1152             IntPoint fixedContainerCoords;
     1152            LayoutPoint fixedContainerCoords;
    11531153            convertToLayerCoords(fixedPositionContainerLayer, fixedContainerCoords);
    11541154
    1155             IntPoint ancestorCoords;
     1155            LayoutPoint ancestorCoords;
    11561156            ancestorLayer->convertToLayerCoords(fixedPositionContainerLayer, ancestorCoords);
    11571157
     
    11831183            RenderLayer* positionedAncestor = parentLayer->enclosingPositionedAncestor();
    11841184
    1185             IntPoint thisCoords;
     1185            LayoutPoint thisCoords;
    11861186            convertToLayerCoords(positionedAncestor, thisCoords);
    11871187           
    1188             IntPoint ancestorCoords;
     1188            LayoutPoint ancestorCoords;
    11891189            ancestorLayer->convertToLayerCoords(positionedAncestor, ancestorCoords);
    11901190
     
    12041204
    12051205void
    1206 RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, IntRect& rect) const
    1207 {
    1208     IntPoint delta;
     1206RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutRect& rect) const
     1207{
     1208    LayoutPoint delta;
    12091209    convertToLayerCoords(ancestorLayer, delta);
    12101210    rect.move(-delta.x(), -delta.y());
     
    12251225}
    12261226
    1227 void RenderLayer::panScrollFromPoint(const IntPoint& sourcePoint)
     1227void RenderLayer::panScrollFromPoint(const LayoutPoint& sourcePoint)
    12281228{
    12291229    Frame* frame = renderer()->frame();
     
    12311231        return;
    12321232   
    1233     IntPoint currentMousePosition = frame->eventHandler()->currentMousePosition();
     1233    LayoutPoint currentMousePosition = frame->eventHandler()->currentMousePosition();
    12341234   
    12351235    // 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
    1236     static IntPoint previousMousePosition;
     1236    static LayoutPoint previousMousePosition;
    12371237    if (currentMousePosition.x() < 0 || currentMousePosition.y() < 0)
    12381238        currentMousePosition = previousMousePosition;
     
    12401240        previousMousePosition = currentMousePosition;
    12411241
    1242     int xDelta = currentMousePosition.x() - sourcePoint.x();
    1243     int yDelta = currentMousePosition.y() - sourcePoint.y();
     1242    LayoutUnit xDelta = currentMousePosition.x() - sourcePoint.x();
     1243    LayoutUnit yDelta = currentMousePosition.y() - sourcePoint.y();
    12441244
    12451245    if (abs(xDelta) <= ScrollView::noPanScrollRadius) // at the center we let the space for the icon
     
    12511251}
    12521252
    1253 void RenderLayer::scrollByRecursively(int xDelta, int yDelta)
     1253void RenderLayer::scrollByRecursively(LayoutUnit xDelta, LayoutUnit yDelta)
    12541254{
    12551255    if (!xDelta && !yDelta)
     
    12611261
    12621262    if (renderer()->hasOverflowClip() && !restrictedByLineClamp) {
    1263         int newOffsetX = scrollXOffset() + xDelta;
    1264         int newOffsetY = scrollYOffset() + yDelta;
     1263        LayoutUnit newOffsetX = scrollXOffset() + xDelta;
     1264        LayoutUnit newOffsetY = scrollYOffset() + yDelta;
    12651265        scrollToOffset(newOffsetX, newOffsetY);
    12661266
    12671267        // If this layer can't do the scroll we ask the next layer up that can scroll to try
    1268         int leftToScrollX = newOffsetX - scrollXOffset();
    1269         int leftToScrollY = newOffsetY - scrollYOffset();
     1268        LayoutUnit leftToScrollX = newOffsetX - scrollXOffset();
     1269        LayoutUnit leftToScrollY = newOffsetY - scrollYOffset();
    12701270        if ((leftToScrollX || leftToScrollY) && renderer()->parent()) {
    12711271            if (RenderLayer* scrollableLayer = enclosingScrollableLayer())
     
    12791279        // If we are here, we were called on a renderer that can be programmatically scrolled, but doesn't
    12801280        // have an overflow clip. Which means that it is a document node that can be scrolled.
    1281         renderer()->view()->frameView()->scrollBy(IntSize(xDelta, yDelta));
     1281        renderer()->view()->frameView()->scrollBy(LayoutSize(xDelta, yDelta));
    12821282        // FIXME: If we didn't scroll the whole way, do we want to try looking at the frames ownerElement?
    12831283        // https://bugs.webkit.org/show_bug.cgi?id=28237
     
    12851285}
    12861286
    1287 void RenderLayer::scrollToOffset(int x, int y, ScrollOffsetClamping clamp)
     1287void RenderLayer::scrollToOffset(LayoutUnit x, LayoutUnit y, ScrollOffsetClamping clamp)
    12881288{
    12891289    if (clamp == ScrollOffsetClamped) {
     
    12921292            return;
    12931293
    1294         int maxX = scrollWidth() - box->clientWidth();
    1295         int maxY = scrollHeight() - box->clientHeight();
    1296 
    1297         x = min(max(x, 0), maxX);
    1298         y = min(max(y, 0), maxY);
    1299     }
    1300    
    1301     ScrollableArea::scrollToOffsetWithoutAnimation(IntPoint(x, y));
    1302 }
    1303 
    1304 void RenderLayer::scrollTo(int x, int y)
     1294        LayoutUnit maxX = scrollWidth() - box->clientWidth();
     1295        LayoutUnit maxY = scrollHeight() - box->clientHeight();
     1296
     1297        x = min(max<LayoutUnit>(x, 0), maxX);
     1298        y = min(max<LayoutUnit>(y, 0), maxY);
     1299    }
     1300   
     1301    ScrollableArea::scrollToOffsetWithoutAnimation(LayoutPoint(x, y));
     1302}
     1303
     1304void RenderLayer::scrollTo(LayoutUnit x, LayoutUnit y)
    13051305{
    13061306    RenderBox* box = renderBox();
     
    13191319    // is either occluded by another layer or clipped by an enclosing
    13201320    // layer or contains fixed backgrounds, etc.).
    1321     IntSize newScrollOffset = IntSize(x - m_scrollOrigin.x(), y - m_scrollOrigin.y());
     1321    LayoutSize newScrollOffset = LayoutSize(x - m_scrollOrigin.x(), y - m_scrollOrigin.y());
    13221322    if (m_scrollOffset == newScrollOffset)
    13231323        return;
     
    13591359
    13601360    RenderBoxModelObject* repaintContainer = renderer()->containerForRepaint();
    1361     IntRect rectForRepaint = renderer()->clippedOverflowRectForRepaint(repaintContainer);
     1361    LayoutRect rectForRepaint = renderer()->clippedOverflowRectForRepaint(repaintContainer);
    13621362
    13631363    Frame* frame = renderer()->frame();
     
    13811381}
    13821382
    1383 void RenderLayer::scrollRectToVisible(const IntRect& rect, const ScrollAlignment& alignX, const ScrollAlignment& alignY)
     1383void RenderLayer::scrollRectToVisible(const LayoutRect& rect, const ScrollAlignment& alignX, const ScrollAlignment& alignY)
    13841384{
    13851385    RenderLayer* parentLayer = 0;
    1386     IntRect newRect = rect;
     1386    LayoutRect newRect = rect;
    13871387
    13881388    // We may end up propagating a scroll event. It is important that we suspend events until
     
    14061406        absPos.move(box->borderLeft(), box->borderTop());
    14071407
    1408         IntRect layerBounds = IntRect(absPos.x() + scrollXOffset(), absPos.y() + scrollYOffset(), box->clientWidth(), box->clientHeight());
    1409         IntRect exposeRect = IntRect(rect.x() + scrollXOffset(), rect.y() + scrollYOffset(), rect.width(), rect.height());
    1410         IntRect r = getRectToExpose(layerBounds, exposeRect, alignX, alignY);
     1408        LayoutRect layerBounds = LayoutRect(absPos.x() + scrollXOffset(), absPos.y() + scrollYOffset(), box->clientWidth(), box->clientHeight());
     1409        LayoutRect exposeRect = LayoutRect(rect.x() + scrollXOffset(), rect.y() + scrollYOffset(), rect.width(), rect.height());
     1410        LayoutRect r = getRectToExpose(layerBounds, exposeRect, alignX, alignY);
    14111411       
    1412         int xOffset = r.x() - absPos.x();
    1413         int yOffset = r.y() - absPos.y();
     1412        LayoutUnit xOffset = r.x() - absPos.x();
     1413        LayoutUnit yOffset = r.y() - absPos.y();
    14141414        // Adjust offsets if they're outside of the allowable range.
    1415         xOffset = max(0, min(scrollWidth() - layerBounds.width(), xOffset));
    1416         yOffset = max(0, min(scrollHeight() - layerBounds.height(), yOffset));
     1415        xOffset = max<LayoutUnit>(0, min(scrollWidth() - layerBounds.width(), xOffset));
     1416        yOffset = max<LayoutUnit>(0, min(scrollHeight() - layerBounds.height(), yOffset));
    14171417       
    14181418        if (xOffset != scrollXOffset() || yOffset != scrollYOffset()) {
    1419             int diffX = scrollXOffset();
    1420             int diffY = scrollYOffset();
     1419            LayoutUnit diffX = scrollXOffset();
     1420            LayoutUnit diffY = scrollYOffset();
    14211421            scrollToOffset(xOffset, yOffset);
    14221422            diffX = scrollXOffset() - diffX;
     
    14281428        if (frameView) {
    14291429            if (renderer()->document() && renderer()->document()->ownerElement() && renderer()->document()->ownerElement()->renderer()) {
    1430                 IntRect viewRect = frameView->visibleContentRect();
    1431                 IntRect r = getRectToExpose(viewRect, rect, alignX, alignY);
     1430                LayoutRect viewRect = frameView->visibleContentRect();
     1431                LayoutRect r = getRectToExpose(viewRect, rect, alignX, alignY);
    14321432               
    1433                 int xOffset = r.x();
    1434                 int yOffset = r.y();
     1433                LayoutUnit xOffset = r.x();
     1434                LayoutUnit yOffset = r.y();
    14351435                // Adjust offsets if they're outside of the allowable range.
    1436                 xOffset = max(0, min(frameView->contentsWidth(), xOffset));
    1437                 yOffset = max(0, min(frameView->contentsHeight(), yOffset));
    1438 
    1439                 frameView->setScrollPosition(IntPoint(xOffset, yOffset));
     1436                xOffset = max<LayoutUnit>(0, min(frameView->contentsWidth(), xOffset));
     1437                yOffset = max<LayoutUnit>(0, min(frameView->contentsHeight(), yOffset));
     1438
     1439                frameView->setScrollPosition(LayoutPoint(xOffset, yOffset));
    14401440                parentLayer = renderer()->document()->ownerElement()->renderer()->enclosingLayer();
    14411441                newRect.setX(rect.x() - frameView->scrollX() + frameView->x());
    14421442                newRect.setY(rect.y() - frameView->scrollY() + frameView->y());
    14431443            } else {
    1444                 IntRect viewRect = frameView->visibleContentRect();
    1445                 IntRect r = getRectToExpose(viewRect, rect, alignX, alignY);
     1444                LayoutRect viewRect = frameView->visibleContentRect();
     1445                LayoutRect r = getRectToExpose(viewRect, rect, alignX, alignY);
    14461446               
    14471447                frameView->setScrollPosition(r.location());
     
    14671467}
    14681468
    1469 IntRect RenderLayer::getRectToExpose(const IntRect &visibleRect, const IntRect &exposeRect, const ScrollAlignment& alignX, const ScrollAlignment& alignY)
     1469LayoutRect RenderLayer::getRectToExpose(const LayoutRect &visibleRect, const LayoutRect &exposeRect, const ScrollAlignment& alignX, const ScrollAlignment& alignY)
    14701470{
    14711471    // Determine the appropriate X behavior.
    14721472    ScrollBehavior scrollX;
    1473     IntRect exposeRectX(exposeRect.x(), visibleRect.y(), exposeRect.width(), visibleRect.height());
    1474     int intersectWidth = intersection(visibleRect, exposeRectX).width();
     1473    LayoutRect exposeRectX(exposeRect.x(), visibleRect.y(), exposeRect.width(), visibleRect.height());
     1474    LayoutUnit intersectWidth = intersection(visibleRect, exposeRectX).width();
    14751475    if (intersectWidth == exposeRect.width() || intersectWidth >= MIN_INTERSECT_FOR_REVEAL)
    14761476        // If the rectangle is fully visible, use the specified visible behavior.
     
    14941494
    14951495    // Given the X behavior, compute the X coordinate.
    1496     int x;
     1496    LayoutUnit x;
    14971497    if (scrollX == noScroll)
    14981498        x = visibleRect.x();
     
    15061506    // Determine the appropriate Y behavior.
    15071507    ScrollBehavior scrollY;
    1508     IntRect exposeRectY(visibleRect.x(), exposeRect.y(), visibleRect.width(), exposeRect.height());
    1509     int intersectHeight = intersection(visibleRect, exposeRectY).height();
     1508    LayoutRect exposeRectY(visibleRect.x(), exposeRect.y(), visibleRect.width(), exposeRect.height());
     1509    LayoutUnit intersectHeight = intersection(visibleRect, exposeRectY).height();
    15101510    if (intersectHeight == exposeRect.height())
    15111511        // If the rectangle is fully visible, use the specified visible behavior.
     
    15271527
    15281528    // Given the Y behavior, compute the Y coordinate.
    1529     int y;
     1529    LayoutUnit y;
    15301530    if (scrollY == noScroll)
    15311531        y = visibleRect.y();
     
    15371537        y = exposeRect.y();
    15381538
    1539     return IntRect(IntPoint(x, y), visibleRect.size());
     1539    return LayoutRect(LayoutPoint(x, y), visibleRect.size());
    15401540}
    15411541
     
    15541554#endif
    15551555
    1556     IntPoint currentDocumentPosition = frameView->windowToContents(frame->eventHandler()->currentMousePosition());
    1557     scrollRectToVisible(IntRect(currentDocumentPosition, IntSize(1, 1)), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded);
     1556    LayoutPoint currentDocumentPosition = frameView->windowToContents(frame->eventHandler()->currentMousePosition());
     1557    scrollRectToVisible(LayoutRect(currentDocumentPosition, LayoutSize(1, 1)), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded);
    15581558}
    15591559
     
    16231623}
    16241624
    1625 int RenderLayer::scrollSize(ScrollbarOrientation orientation) const
     1625LayoutUnit RenderLayer::scrollSize(ScrollbarOrientation orientation) const
    16261626{
    16271627    Scrollbar* scrollbar = ((orientation == HorizontalScrollbar) ? m_hBar : m_vBar).get();
     
    16291629}
    16301630
    1631 void RenderLayer::setScrollOffset(const IntPoint& offset)
     1631void RenderLayer::setScrollOffset(const LayoutPoint& offset)
    16321632{
    16331633    scrollTo(offset.x(), offset.y());
    16341634}
    16351635
    1636 int RenderLayer::scrollPosition(Scrollbar* scrollbar) const
     1636LayoutUnit RenderLayer::scrollPosition(Scrollbar* scrollbar) const
    16371637{
    16381638    if (scrollbar->orientation() == HorizontalScrollbar)
     
    16431643}
    16441644
    1645 IntPoint RenderLayer::scrollPosition() const
     1645LayoutPoint RenderLayer::scrollPosition() const
    16461646{
    16471647    return m_scrollOrigin + m_scrollOffset;
    16481648}
    16491649
    1650 IntPoint RenderLayer::minimumScrollPosition() const
     1650LayoutPoint RenderLayer::minimumScrollPosition() const
    16511651{
    16521652    return m_scrollOrigin;
    16531653}
    16541654
    1655 IntPoint RenderLayer::maximumScrollPosition() const
     1655LayoutPoint RenderLayer::maximumScrollPosition() const
    16561656{
    16571657    // FIXME: m_scrollSize may not be up-to-date if m_scrollDimensionsDirty is true.
     
    16591659}
    16601660
    1661 IntRect RenderLayer::visibleContentRect(bool includeScrollbars) const
    1662 {
    1663     int verticalScrollbarWidth = 0;
    1664     int horizontalScrollbarHeight = 0;
     1661LayoutRect RenderLayer::visibleContentRect(bool includeScrollbars) const
     1662{
     1663    LayoutUnit verticalScrollbarWidth = 0;
     1664    LayoutUnit horizontalScrollbarHeight = 0;
    16651665    if (includeScrollbars) {
    16661666        verticalScrollbarWidth = (verticalScrollbar() && !verticalScrollbar()->isOverlayScrollbar()) ? verticalScrollbar()->width() : 0;
     
    16681668    }
    16691669   
    1670     return IntRect(IntPoint(scrollXOffset(), scrollYOffset()),
    1671                    IntSize(max(0, m_layerSize.width() - verticalScrollbarWidth),
    1672                            max(0, m_layerSize.height() - horizontalScrollbarHeight)));
    1673 }
    1674 
    1675 IntSize RenderLayer::overhangAmount() const
    1676 {
    1677     return IntSize();
    1678 }
    1679 
    1680 void RenderLayer::didCompleteRubberBand(const IntSize&) const
     1670    return LayoutRect(LayoutPoint(scrollXOffset(), scrollYOffset()),
     1671                      LayoutSize(max<LayoutUnit>(0, m_layerSize.width() - verticalScrollbarWidth),
     1672                                 max<LayoutUnit>(0, m_layerSize.height() - horizontalScrollbarHeight)));
     1673}
     1674
     1675LayoutSize RenderLayer::overhangAmount() const
     1676{
     1677    return LayoutSize();
     1678}
     1679
     1680void RenderLayer::didCompleteRubberBand(const LayoutSize&) const
    16811681{
    16821682}
     
    16881688}
    16891689
    1690 static IntRect cornerRect(const RenderLayer* layer, const IntRect& bounds)
     1690static LayoutRect cornerRect(const RenderLayer* layer, const LayoutRect& bounds)
    16911691{
    16921692    int horizontalThickness;
     
    17071707        verticalThickness = layer->horizontalScrollbar()->height();
    17081708    }
    1709     return IntRect(bounds.maxX() - horizontalThickness - layer->renderer()->style()->borderRightWidth(),
    1710                    bounds.maxY() - verticalThickness - layer->renderer()->style()->borderBottomWidth(),
    1711                    horizontalThickness, verticalThickness);
    1712 }
    1713 
    1714 IntRect RenderLayer::scrollCornerRect() const
     1709    return LayoutRect(bounds.maxX() - horizontalThickness - layer->renderer()->style()->borderRightWidth(),
     1710                      bounds.maxY() - verticalThickness - layer->renderer()->style()->borderBottomWidth(),
     1711                      horizontalThickness, verticalThickness);
     1712}
     1713
     1714LayoutRect RenderLayer::scrollCornerRect() const
    17151715{
    17161716    // We have a scrollbar corner when a scrollbar is visible and not filling the entire length of the box.
     
    17231723    if ((hasHorizontalBar && hasVerticalBar) || (hasResizer && (hasHorizontalBar || hasVerticalBar)))
    17241724        return cornerRect(this, renderBox()->borderBoxRect());
    1725     return IntRect();
    1726 }
    1727 
    1728 static IntRect resizerCornerRect(const RenderLayer* layer, const IntRect& bounds)
     1725    return LayoutRect();
     1726}
     1727
     1728static LayoutRect resizerCornerRect(const RenderLayer* layer, const LayoutRect& bounds)
    17291729{
    17301730    ASSERT(layer->renderer()->isBox());
    17311731    if (layer->renderer()->style()->resize() == RESIZE_NONE)
    1732         return IntRect();
     1732        return LayoutRect();
    17331733    return cornerRect(layer, bounds);
    17341734}
    17351735
    1736 IntRect RenderLayer::scrollCornerAndResizerRect() const
     1736LayoutRect RenderLayer::scrollCornerAndResizerRect() const
    17371737{
    17381738    RenderBox* box = renderBox();
    17391739    if (!box)
    1740         return IntRect();
    1741     IntRect scrollCornerAndResizer = scrollCornerRect();
     1740        return LayoutRect();
     1741    LayoutRect scrollCornerAndResizer = scrollCornerRect();
    17421742    if (scrollCornerAndResizer.isEmpty())
    17431743        scrollCornerAndResizer = resizerCornerRect(this, box->borderBoxRect());
     
    17511751}
    17521752
    1753 IntRect RenderLayer::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntRect& scrollbarRect) const
     1753LayoutRect RenderLayer::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const LayoutRect& scrollbarRect) const
    17541754{
    17551755    RenderView* view = renderer()->view();
     
    17571757        return scrollbarRect;
    17581758
    1759     IntRect rect = scrollbarRect;
     1759    LayoutRect rect = scrollbarRect;
    17601760    rect.move(scrollbarOffset(scrollbar));
    17611761
     
    17631763}
    17641764
    1765 IntRect RenderLayer::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const
     1765LayoutRect RenderLayer::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const LayoutRect& parentRect) const
    17661766{
    17671767    RenderView* view = renderer()->view();
     
    17691769        return parentRect;
    17701770
    1771     IntRect rect = view->frameView()->convertToRenderer(renderer(), parentRect);
     1771    LayoutRect rect = view->frameView()->convertToRenderer(renderer(), parentRect);
    17721772    rect.move(-scrollbarOffset(scrollbar));
    17731773    return rect;
    17741774}
    17751775
    1776 IntPoint RenderLayer::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntPoint& scrollbarPoint) const
     1776LayoutPoint RenderLayer::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const LayoutPoint& scrollbarPoint) const
    17771777{
    17781778    RenderView* view = renderer()->view();
     
    17801780        return scrollbarPoint;
    17811781
    1782     IntPoint point = scrollbarPoint;
     1782    LayoutPoint point = scrollbarPoint;
    17831783    point.move(scrollbarOffset(scrollbar));
    17841784    return view->frameView()->convertFromRenderer(renderer(), point);
    17851785}
    17861786
    1787 IntPoint RenderLayer::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const
     1787LayoutPoint RenderLayer::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const LayoutPoint& parentPoint) const
    17881788{
    17891789    RenderView* view = renderer()->view();
     
    17911791        return parentPoint;
    17921792
    1793     IntPoint point = view->frameView()->convertToRenderer(renderer(), parentPoint);
     1793    LayoutPoint point = view->frameView()->convertToRenderer(renderer(), parentPoint);
    17941794
    17951795    point.move(-scrollbarOffset(scrollbar));
     
    17971797}
    17981798
    1799 IntSize RenderLayer::contentsSize() const
    1800 {
    1801     return IntSize(const_cast<RenderLayer*>(this)->scrollWidth(), const_cast<RenderLayer*>(this)->scrollHeight());
     1799LayoutSize RenderLayer::contentsSize() const
     1800{
     1801    return LayoutSize(const_cast<RenderLayer*>(this)->scrollWidth(), const_cast<RenderLayer*>(this)->scrollHeight());
    18021802}
    18031803
     
    18251825}
    18261826
    1827 IntPoint RenderLayer::currentMousePosition() const
    1828 {
    1829     return renderer()->frame() ? renderer()->frame()->eventHandler()->currentMousePosition() : IntPoint();
    1830 }
    1831 
    1832 IntSize RenderLayer::scrollbarOffset(const Scrollbar* scrollbar) const
     1827LayoutPoint RenderLayer::currentMousePosition() const
     1828{
     1829    return renderer()->frame() ? renderer()->frame()->eventHandler()->currentMousePosition() : LayoutPoint();
     1830}
     1831
     1832LayoutSize RenderLayer::scrollbarOffset(const Scrollbar* scrollbar) const
    18331833{
    18341834    RenderBox* box = renderBox();
    18351835
    18361836    if (scrollbar == m_vBar.get())
    1837         return IntSize(box->width() - box->borderRight() - scrollbar->width(), box->borderTop());
     1837        return LayoutSize(box->width() - box->borderRight() - scrollbar->width(), box->borderTop());
    18381838
    18391839    if (scrollbar == m_hBar.get())
    1840         return IntSize(box->borderLeft(), box->height() - box->borderBottom() - scrollbar->height());
     1840        return LayoutSize(box->borderLeft(), box->height() - box->borderBottom() - scrollbar->height());
    18411841   
    18421842    ASSERT_NOT_REACHED();
    1843     return IntSize();
    1844 }
    1845 
    1846 void RenderLayer::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect& rect)
     1843    return LayoutSize();
     1844}
     1845
     1846void RenderLayer::invalidateScrollbarRect(Scrollbar* scrollbar, const LayoutRect& rect)
    18471847{
    18481848#if USE(ACCELERATED_COMPOSITING)
     
    18591859    }
    18601860#endif
    1861     IntRect scrollRect = rect;
     1861    LayoutRect scrollRect = rect;
    18621862    RenderBox* box = renderBox();
    18631863    ASSERT(box);
     
    18691869}
    18701870
    1871 void RenderLayer::invalidateScrollCornerRect(const IntRect& rect)
     1871void RenderLayer::invalidateScrollCornerRect(const LayoutRect& rect)
    18721872{
    18731873#if USE(ACCELERATED_COMPOSITING)
     
    20302030}
    20312031
    2032 void RenderLayer::positionOverflowControls(const IntSize& offsetFromLayer)
     2032void RenderLayer::positionOverflowControls(const LayoutSize& offsetFromLayer)
    20332033{
    20342034    if (!m_hBar && !m_vBar && (!renderer()->hasOverflowClip() || renderer()->style()->resize() == RESIZE_NONE))
     
    20392039        return;
    20402040
    2041     const IntRect& borderBox = box->borderBoxRect();
    2042     const IntRect& scrollCorner = scrollCornerRect();
    2043     IntRect absBounds(borderBox.location() + offsetFromLayer, borderBox.size());
     2041    const LayoutRect& borderBox = box->borderBoxRect();
     2042    const LayoutRect& scrollCorner = scrollCornerRect();
     2043    LayoutRect absBounds(borderBox.location() + offsetFromLayer, borderBox.size());
    20442044    if (m_vBar)
    2045         m_vBar->setFrameRect(IntRect(absBounds.maxX() - box->borderRight() - m_vBar->width(),
    2046                                      absBounds.y() + box->borderTop(),
    2047                                      m_vBar->width(),
    2048                                      absBounds.height() - (box->borderTop() + box->borderBottom()) - scrollCorner.height()));
     2045        m_vBar->setFrameRect(LayoutRect(absBounds.maxX() - box->borderRight() - m_vBar->width(),
     2046                                        absBounds.y() + box->borderTop(),
     2047                                        m_vBar->width(),
     2048                                        absBounds.height() - (box->borderTop() + box->borderBottom()) - scrollCorner.height()));
    20492049
    20502050    if (m_hBar)
    2051         m_hBar->setFrameRect(IntRect(absBounds.x() + box->borderLeft(),
    2052                                      absBounds.maxY() - box->borderBottom() - m_hBar->height(),
    2053                                      absBounds.width() - (box->borderLeft() + box->borderRight()) - scrollCorner.width(),
    2054                                      m_hBar->height()));
     2051        m_hBar->setFrameRect(LayoutRect(absBounds.x() + box->borderLeft(),
     2052                                        absBounds.maxY() - box->borderBottom() - m_hBar->height(),
     2053                                        absBounds.width() - (box->borderLeft() + box->borderRight()) - scrollCorner.width(),
     2054                                        m_hBar->height()));
    20552055
    20562056#if USE(ACCELERATED_COMPOSITING)
     
    20712071
    20722072    if (GraphicsLayer* layer = layerForScrollCorner()) {
    2073         const IntRect& scrollCornerAndResizer = scrollCornerAndResizerRect();
     2073        const LayoutRect& scrollCornerAndResizer = scrollCornerAndResizerRect();
    20742074        layer->setPosition(scrollCornerAndResizer.location());
    20752075        layer->setSize(scrollCornerAndResizer.size());
     
    20842084}
    20852085
    2086 int RenderLayer::scrollWidth()
     2086LayoutUnit RenderLayer::scrollWidth()
    20872087{
    20882088    if (m_scrollDimensionsDirty)
     
    20912091}
    20922092
    2093 int RenderLayer::scrollHeight()
     2093LayoutUnit RenderLayer::scrollHeight()
    20942094{
    20952095    if (m_scrollDimensionsDirty)
     
    20982098}
    20992099
    2100 int RenderLayer::overflowTop() const
     2100LayoutUnit RenderLayer::overflowTop() const
    21012101{
    21022102    RenderBox* box = renderBox();
    2103     IntRect overflowRect(box->layoutOverflowRect());
     2103    LayoutRect overflowRect(box->layoutOverflowRect());
    21042104    box->flipForWritingMode(overflowRect);
    21052105    return overflowRect.y();
    21062106}
    21072107
    2108 int RenderLayer::overflowBottom() const
     2108LayoutUnit RenderLayer::overflowBottom() const
    21092109{
    21102110    RenderBox* box = renderBox();
    2111     IntRect overflowRect(box->layoutOverflowRect());
     2111    LayoutRect overflowRect(box->layoutOverflowRect());
    21122112    box->flipForWritingMode(overflowRect);
    21132113    return overflowRect.maxY();
    21142114}
    21152115
    2116 int RenderLayer::overflowLeft() const
     2116LayoutUnit RenderLayer::overflowLeft() const
    21172117{
    21182118    RenderBox* box = renderBox();
    2119     IntRect overflowRect(box->layoutOverflowRect());
     2119    LayoutRect overflowRect(box->layoutOverflowRect());
    21202120    box->flipForWritingMode(overflowRect);
    21212121    return overflowRect.x();
    21222122}
    21232123
    2124 int RenderLayer::overflowRight() const
     2124LayoutUnit RenderLayer::overflowRight() const
    21252125{
    21262126    RenderBox* box = renderBox();
    2127     IntRect overflowRect(box->layoutOverflowRect());
     2127    LayoutRect overflowRect(box->layoutOverflowRect());
    21282128    box->flipForWritingMode(overflowRect);
    21292129    return overflowRect.maxX();
     
    21432143    m_scrollSize.setHeight(overflowBottom() - overflowTop());
    21442144   
    2145     m_scrollOrigin = IntPoint(-m_scrollOverflow.width(), -m_scrollOverflow.height());
     2145    m_scrollOrigin = LayoutPoint(-m_scrollOverflow.width(), -m_scrollOverflow.height());
    21462146
    21472147    if (needHBar)
     
    21882188        // Layout may cause us to be in an invalid scroll position.  In this case we need
    21892189        // to pull our scroll offsets back to the max (or push them up to the min).
    2190         int newX = max(0, min(scrollXOffset(), scrollWidth() - box->clientWidth()));
    2191         int newY = max(0, min(scrollYOffset(), scrollHeight() - box->clientHeight()));
     2190        LayoutUnit newX = max<LayoutUnit>(0, min(scrollXOffset(), scrollWidth() - box->clientWidth()));
     2191        LayoutUnit newY = max<LayoutUnit>(0, min(scrollYOffset(), scrollHeight() - box->clientHeight()));
    21922192        if (newX != scrollXOffset() || newY != scrollYOffset()) {
    21932193            RenderView* view = renderer()->view();
     
    22592259    // Set up the range (and page step/line step).
    22602260    if (m_hBar) {
    2261         int clientWidth = box->clientWidth();
    2262         int pageStep = max(max<int>(clientWidth * Scrollbar::minFractionToStepWhenPaging(), clientWidth - Scrollbar::maxOverlapBetweenPages()), 1);
     2261        LayoutUnit clientWidth = box->clientWidth();
     2262        LayoutUnit pageStep = max<LayoutUnit>(max<LayoutUnit>(clientWidth * Scrollbar::minFractionToStepWhenPaging(), clientWidth - Scrollbar::maxOverlapBetweenPages()), 1);
    22632263        m_hBar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
    22642264        m_hBar->setProportion(clientWidth, m_scrollSize.width());
    22652265    }
    22662266    if (m_vBar) {
    2267         int clientHeight = box->clientHeight();
    2268         int pageStep = max(max<int>(clientHeight * Scrollbar::minFractionToStepWhenPaging(), clientHeight - Scrollbar::maxOverlapBetweenPages()), 1);
     2267        LayoutUnit clientHeight = box->clientHeight();
     2268        LayoutUnit pageStep = max<LayoutUnit>(max<LayoutUnit>(clientHeight * Scrollbar::minFractionToStepWhenPaging(), clientHeight - Scrollbar::maxOverlapBetweenPages()), 1);
    22692269        m_vBar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
    22702270        m_vBar->setProportion(clientHeight, m_scrollSize.height());
     
    22812281}
    22822282
    2283 void RenderLayer::paintOverflowControls(GraphicsContext* context, const LayoutPoint& paintOffset, const IntRect& damageRect, bool paintingOverlayControls)
     2283void RenderLayer::paintOverflowControls(GraphicsContext* context, const LayoutPoint& paintOffset, const LayoutRect& damageRect, bool paintingOverlayControls)
    22842284{
    22852285    // Don't do anything if we have no overflow.
     
    24092409}
    24102410
    2411 bool RenderLayer::isPointInResizeControl(const IntPoint& absolutePoint) const
     2411bool RenderLayer::isPointInResizeControl(const LayoutPoint& absolutePoint) const
    24122412{
    24132413    if (!renderer()->hasOverflowClip() || renderer()->style()->resize() == RESIZE_NONE)
     
    24172417    ASSERT(box);
    24182418
    2419     IntPoint localPoint = absoluteToContents(absolutePoint);
    2420 
    2421     IntRect localBounds(0, 0, box->width(), box->height());
     2419    LayoutPoint localPoint = absoluteToContents(absolutePoint);
     2420
     2421    LayoutRect localBounds(0, 0, box->width(), box->height());
    24222422    return resizerCornerRect(this, localBounds).contains(localPoint);
    24232423}
    24242424   
    2425 bool RenderLayer::hitTestOverflowControls(HitTestResult& result, const IntPoint& localPoint)
     2425bool RenderLayer::hitTestOverflowControls(HitTestResult& result, const LayoutPoint& localPoint)
    24262426{
    24272427    if (!m_hBar && !m_vBar && (!renderer()->hasOverflowClip() || renderer()->style()->resize() == RESIZE_NONE))
     
    24312431    ASSERT(box);
    24322432   
    2433     IntRect resizeControlRect;
     2433    LayoutRect resizeControlRect;
    24342434    if (renderer()->style()->resize() != RESIZE_NONE) {
    24352435        resizeControlRect = resizerCornerRect(this, box->borderBoxRect());
     
    24382438    }
    24392439
    2440     int resizeControlSize = max(resizeControlRect.height(), 0);
     2440    LayoutUnit resizeControlSize = max<LayoutUnit>(resizeControlRect.height(), 0);
    24412441
    24422442    if (m_vBar) {
    2443         IntRect vBarRect(box->width() - box->borderRight() - m_vBar->width(),
    2444                          box->borderTop(),
    2445                          m_vBar->width(),
    2446                          box->height() - (box->borderTop() + box->borderBottom()) - (m_hBar ? m_hBar->height() : resizeControlSize));
     2443        LayoutRect vBarRect(box->width() - box->borderRight() - m_vBar->width(),
     2444                            box->borderTop(),
     2445                            m_vBar->width(),
     2446                            box->height() - (box->borderTop() + box->borderBottom()) - (m_hBar ? m_hBar->height() : resizeControlSize));
    24472447        if (vBarRect.contains(localPoint)) {
    24482448            result.setScrollbar(m_vBar.get());
     
    24512451    }
    24522452
    2453     resizeControlSize = max(resizeControlRect.width(), 0);
     2453    resizeControlSize = max<LayoutUnit>(resizeControlRect.width(), 0);
    24542454    if (m_hBar) {
    2455         IntRect hBarRect(box->borderLeft(),
    2456                          box->height() - box->borderBottom() - m_hBar->height(),
    2457                          box->width() - (box->borderLeft() + box->borderRight()) - (m_vBar ? m_vBar->width() : resizeControlSize),
    2458                          m_hBar->height());
     2455        LayoutRect hBarRect(box->borderLeft(),
     2456                            box->height() - box->borderBottom() - m_hBar->height(),
     2457                            box->width() - (box->borderLeft() + box->borderRight()) - (m_vBar ? m_vBar->width() : resizeControlSize),
     2458                            m_hBar->height());
    24592459        if (hBarRect.contains(localPoint)) {
    24602460            result.setScrollbar(m_hBar.get());
     
    24712471}
    24722472
    2473 void RenderLayer::paint(GraphicsContext* p, const IntRect& damageRect, PaintBehavior paintBehavior, RenderObject *paintingRoot)
     2473void RenderLayer::paint(GraphicsContext* p, const LayoutRect& damageRect, PaintBehavior paintBehavior, RenderObject *paintingRoot)
    24742474{
    24752475    OverlapTestRequestMap overlapTestRequests;
     
    24802480}
    24812481
    2482 void RenderLayer::paintOverlayScrollbars(GraphicsContext* p, const IntRect& damageRect, PaintBehavior paintBehavior, RenderObject *paintingRoot)
     2482void RenderLayer::paintOverlayScrollbars(GraphicsContext* p, const LayoutRect& damageRect, PaintBehavior paintBehavior, RenderObject *paintingRoot)
    24832483{
    24842484    if (!m_containsDirtyOverlayScrollbars)
     
    24892489}
    24902490
    2491 static void setClip(GraphicsContext* p, const IntRect& paintDirtyRect, const IntRect& clipRect)
     2491static void setClip(GraphicsContext* p, const LayoutRect& paintDirtyRect, const LayoutRect& clipRect)
    24922492{
    24932493    if (paintDirtyRect == clipRect)
     
    24972497}
    24982498
    2499 static void restoreClip(GraphicsContext* p, const IntRect& paintDirtyRect, const IntRect& clipRect)
     2499static void restoreClip(GraphicsContext* p, const LayoutRect& paintDirtyRect, const LayoutRect& clipRect)
    25002500{
    25012501    if (paintDirtyRect == clipRect)
     
    25082508    Vector<OverlapTestRequestClient*> overlappedRequestClients;
    25092509    OverlapTestRequestMap::iterator end = overlapTestRequests.end();
    2510     IntRect boundingBox = layer->boundingBox(rootLayer);
     2510    LayoutRect boundingBox = layer->boundingBox(rootLayer);
    25112511    for (OverlapTestRequestMap::iterator it = overlapTestRequests.begin(); it != end; ++it) {
    25122512        if (!boundingBox.intersects(it->second))
     
    25282528
    25292529void RenderLayer::paintLayer(RenderLayer* rootLayer, GraphicsContext* p,
    2530                         const IntRect& paintDirtyRect, PaintBehavior paintBehavior,
     2530                        const LayoutRect& paintDirtyRect, PaintBehavior paintBehavior,
    25312531                        RenderObject* paintingRoot, OverlapTestRequestMap* overlapTestRequests,
    25322532                        PaintLayerFlags paintFlags)
     
    25752575
    25762576        // Make sure the parent's clip rects have been calculated.
    2577         IntRect clipRect = paintDirtyRect;
     2577        LayoutRect clipRect = paintDirtyRect;
    25782578        if (parent()) {
    25792579            clipRect = backgroundClipRect(rootLayer, paintFlags & PaintLayerTemporaryClipRects);
     
    25862586        // Adjust the transform such that the renderer's upper left corner will paint at (0,0) in user space.
    25872587        // This involves subtracting out the position of the layer in our current coordinate space.
    2588         IntPoint delta;
     2588        LayoutPoint delta;
    25892589        convertToLayerCoords(rootLayer, delta);
    25902590        TransformationMatrix transform(layerTransform);
     
    26182618
    26192619    // Calculate the clip rects we should use.
    2620     IntRect layerBounds, damageRect, clipRectToApply, outlineRect;
     2620    LayoutRect layerBounds, damageRect, clipRectToApply, outlineRect;
    26212621    calculateRects(rootLayer, paintDirtyRect, layerBounds, damageRect, clipRectToApply, outlineRect, localPaintFlags & PaintLayerTemporaryClipRects);
    2622     IntPoint paintOffset = toPoint(layerBounds.location() - renderBoxLocation());
     2622    LayoutPoint paintOffset = toPoint(layerBounds.location() - renderBoxLocation());
    26232623                             
    26242624    // Ensure our lists are up-to-date.
     
    27292729
    27302730void RenderLayer::paintList(Vector<RenderLayer*>* list, RenderLayer* rootLayer, GraphicsContext* p,
    2731                             const IntRect& paintDirtyRect, PaintBehavior paintBehavior,
     2731                            const LayoutRect& paintDirtyRect, PaintBehavior paintBehavior,
    27322732                            RenderObject* paintingRoot, OverlapTestRequestMap* overlapTestRequests,
    27332733                            PaintLayerFlags paintFlags)
     
    27462746
    27472747void RenderLayer::paintPaginatedChildLayer(RenderLayer* childLayer, RenderLayer* rootLayer, GraphicsContext* context,
    2748                                            const IntRect& paintDirtyRect, PaintBehavior paintBehavior,
     2748                                           const LayoutRect& paintDirtyRect, PaintBehavior paintBehavior,
    27492749                                           RenderObject* paintingRoot, OverlapTestRequestMap* overlapTestRequests,
    27502750                                           PaintLayerFlags paintFlags)
     
    27662766
    27672767void RenderLayer::paintChildLayerIntoColumns(RenderLayer* childLayer, RenderLayer* rootLayer, GraphicsContext* context,
    2768                                              const IntRect& paintDirtyRect, PaintBehavior paintBehavior,
     2768                                             const LayoutRect& paintDirtyRect, PaintBehavior paintBehavior,
    27692769                                             RenderObject* paintingRoot, OverlapTestRequestMap* overlapTestRequests,
    27702770                                             PaintLayerFlags paintFlags, const Vector<RenderLayer*>& columnLayers, size_t colIndex)
     
    27762776        return;
    27772777   
    2778     IntPoint layerOffset;
     2778    LayoutPoint layerOffset;
    27792779    columnBlock->layer()->convertToLayerCoords(rootLayer, layerOffset);
    27802780   
     
    27862786    for (unsigned i = 0; i < colCount; i++) {
    27872787        // For each rect, we clip to the rect, and then we adjust our coords.
    2788         IntRect colRect = columnBlock->columnRectAt(colInfo, i);
     2788        LayoutRect colRect = columnBlock->columnRectAt(colInfo, i);
    27892789        columnBlock->flipForWritingMode(colRect);
    27902790        int logicalLeftOffset = (isHorizontal ? colRect.x() : colRect.y()) - columnBlock->logicalLeftOffsetForContent();
    2791         IntSize offset = isHorizontal ? IntSize(logicalLeftOffset, currLogicalTopOffset) : IntSize(currLogicalTopOffset, logicalLeftOffset);
     2791        LayoutSize offset = isHorizontal ? LayoutSize(logicalLeftOffset, currLogicalTopOffset) : LayoutSize(currLogicalTopOffset, logicalLeftOffset);
    27922792
    27932793        colRect.moveBy(layerOffset);
    27942794
    2795         IntRect localDirtyRect(paintDirtyRect);
     2795        LayoutRect localDirtyRect(paintDirtyRect);
    27962796        localDirtyRect.intersect(colRect);
    27972797       
     
    28212821                // Adjust the transform such that the renderer's upper left corner will paint at (0,0) in user space.
    28222822                // This involves subtracting out the position of the layer in our current coordinate space.
    2823                 IntPoint childOffset;
     2823                LayoutPoint childOffset;
    28242824                columnLayers[colIndex - 1]->convertToLayerCoords(rootLayer, childOffset);
    28252825                TransformationMatrix transform;
     
    28452845}
    28462846
    2847 static inline IntRect frameVisibleRect(RenderObject* renderer)
     2847static inline LayoutRect frameVisibleRect(RenderObject* renderer)
    28482848{
    28492849    FrameView* frameView = renderer->document()->view();
    28502850    if (!frameView)
    2851         return IntRect();
     2851        return LayoutRect();
    28522852
    28532853    return frameView->visibleContentRect();
     
    28582858    renderer()->document()->updateLayout();
    28592859   
    2860     IntRect hitTestArea = renderer()->view()->documentRect();
     2860    LayoutRect hitTestArea = renderer()->view()->documentRect();
    28612861    if (!request.ignoreClipping())
    28622862        hitTestArea.intersect(frameVisibleRect(renderer()));
     
    29932993        // Make sure the parent's clip rects have been calculated.
    29942994        if (parent()) {
    2995             IntRect clipRect = backgroundClipRect(rootLayer, useTemporaryClipRects, IncludeOverlayScrollbarSize);
     2995            LayoutRect clipRect = backgroundClipRect(rootLayer, useTemporaryClipRects, IncludeOverlayScrollbarSize);
    29962996            // Go ahead and test the enclosing clip now.
    29972997            if (!clipRect.intersects(hitTestArea))
     
    33833383    if (renderer()->hasOverflowClip() || renderer()->hasClip()) {
    33843384        // This layer establishes a clip of some kind.
    3385         IntPoint offset;
     3385        LayoutPoint offset;
    33863386        convertToLayerCoords(rootLayer, offset);
    33873387        RenderView* view = renderer()->view();
     
    33923392       
    33933393        if (renderer()->hasOverflowClip()) {
    3394             IntRect newOverflowClip = toRenderBox(renderer())->overflowClipRect(offset, relevancy);
     3394            LayoutRect newOverflowClip = toRenderBox(renderer())->overflowClipRect(offset, relevancy);
    33953395            clipRects.setOverflowClipRect(intersection(newOverflowClip, clipRects.overflowClipRect()));
    33963396            if (renderer()->isPositioned() || renderer()->isRelPositioned())
     
    33983398        }
    33993399        if (renderer()->hasClip()) {
    3400             IntRect newPosClip = toRenderBox(renderer())->clipRect(offset);
     3400            LayoutRect newPosClip = toRenderBox(renderer())->clipRect(offset);
    34013401            clipRects.setPosClipRect(intersection(newPosClip, clipRects.posClipRect()));
    34023402            clipRects.setOverflowClipRect(intersection(newPosClip, clipRects.overflowClipRect()));
     
    34183418}
    34193419
    3420 IntRect RenderLayer::backgroundClipRect(const RenderLayer* rootLayer, bool temporaryClipRects, OverlayScrollbarSizeRelevancy relevancy) const
    3421 {
    3422     IntRect backgroundRect;
     3420LayoutRect RenderLayer::backgroundClipRect(const RenderLayer* rootLayer, bool temporaryClipRects, OverlayScrollbarSizeRelevancy relevancy) const
     3421{
     3422    LayoutRect backgroundRect;
    34233423    if (parent()) {
    34243424        ClipRects parentRects;
     
    34733473            do {
    34743474                if (boxShadow->style() == Normal) {
    3475                     IntRect shadowRect = layerBounds;
     3475                    LayoutRect shadowRect = layerBounds;
    34763476                    shadowRect.move(boxShadow->x(), boxShadow->y());
    34773477                    shadowRect.inflate(boxShadow->blur() + boxShadow->spread());
     
    34873487}
    34883488
    3489 IntRect RenderLayer::childrenClipRect() const
     3489LayoutRect RenderLayer::childrenClipRect() const
    34903490{
    34913491    RenderView* renderView = renderer()->view();
    34923492    RenderLayer* clippingRootLayer = clippingRoot();
    3493     IntRect layerBounds, backgroundRect, foregroundRect, outlineRect;
     3493    LayoutRect layerBounds, backgroundRect, foregroundRect, outlineRect;
    34943494    calculateRects(clippingRootLayer, renderView->unscaledDocumentRect(), layerBounds, backgroundRect, foregroundRect, outlineRect);
    34953495    return clippingRootLayer->renderer()->localToAbsoluteQuad(FloatQuad(foregroundRect)).enclosingBoundingBox();
    34963496}
    34973497
    3498 IntRect RenderLayer::selfClipRect() const
     3498LayoutRect RenderLayer::selfClipRect() const
    34993499{
    35003500    RenderView* renderView = renderer()->view();
    35013501    RenderLayer* clippingRootLayer = clippingRoot();
    3502     IntRect layerBounds, backgroundRect, foregroundRect, outlineRect;
     3502    LayoutRect layerBounds, backgroundRect, foregroundRect, outlineRect;
    35033503    calculateRects(clippingRootLayer, renderView->documentRect(), layerBounds, backgroundRect, foregroundRect, outlineRect);
    35043504    return clippingRootLayer->renderer()->localToAbsoluteQuad(FloatQuad(backgroundRect)).enclosingBoundingBox();
    35053505}
    35063506
    3507 void RenderLayer::addBlockSelectionGapsBounds(const IntRect& bounds)
     3507void RenderLayer::addBlockSelectionGapsBounds(const LayoutRect& bounds)
    35083508{
    35093509    m_blockSelectionGapsBounds.unite(bounds);
     
    35123512void RenderLayer::clearBlockSelectionGapsBounds()
    35133513{
    3514     m_blockSelectionGapsBounds = IntRect();
     3514    m_blockSelectionGapsBounds = LayoutRect();
    35153515    for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
    35163516        child->clearBlockSelectionGapsBounds();
     
    35253525        return;
    35263526
    3527     IntRect rect = m_blockSelectionGapsBounds;
     3527    LayoutRect rect = m_blockSelectionGapsBounds;
    35283528    rect.move(-scrolledContentOffset());
    35293529    if (renderer()->hasOverflowClip())
    3530         rect.intersect(toRenderBox(renderer())->overflowClipRect(IntPoint()));
     3530        rect.intersect(toRenderBox(renderer())->overflowClipRect(LayoutPoint()));
    35313531    if (renderer()->hasClip())
    3532         rect.intersect(toRenderBox(renderer())->clipRect(IntPoint()));
     3532        rect.intersect(toRenderBox(renderer())->clipRect(LayoutPoint()));
    35333533    if (!rect.isEmpty())
    35343534        renderer()->repaintRectangle(rect);
    35353535}
    35363536
    3537 bool RenderLayer::intersectsDamageRect(const IntRect& layerBounds, const IntRect& damageRect, const RenderLayer* rootLayer) const
     3537bool RenderLayer::intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& damageRect, const RenderLayer* rootLayer) const
    35383538{
    35393539    // Always examine the canvas and the root.
     
    35483548    ASSERT(view);
    35493549    if (view && !renderer()->isRenderInline()) {
    3550         IntRect b = layerBounds;
     3550        LayoutRect b = layerBounds;
    35513551        b.inflate(view->maximalOutlineSize());
    35523552        if (b.intersects(damageRect))
     
    35593559}
    35603560
    3561 IntRect RenderLayer::localBoundingBox() const
     3561LayoutRect RenderLayer::localBoundingBox() const
    35623562{
    35633563    // There are three special cases we need to consider.
     
    35703570    // as part of our bounding box.  We do this because we are the responsible layer for both hit testing and painting those
    35713571    // floats.
    3572     IntRect result;
     3572    LayoutRect result;
    35733573    if (renderer()->isRenderInline())
    35743574        result = toRenderInline(renderer())->linesVisualOverflowBoundingBox();
     
    35773577        for (RenderObject* child = renderer()->firstChild(); child; child = child->nextSibling()) {
    35783578            if (child->isTableCell()) {
    3579                 IntRect bbox = toRenderBox(child)->borderBoxRect();
     3579                LayoutRect bbox = toRenderBox(child)->borderBoxRect();
    35803580                result.unite(bbox);
    3581                 IntRect overflowRect = renderBox()->visualOverflowRect();
     3581                LayoutRect overflowRect = renderBox()->visualOverflowRect();
    35823582                if (bbox != overflowRect)
    35833583                    result.unite(overflowRect);
     
    35903590            result = box->maskClipRect();
    35913591        else {
    3592             IntRect bbox = box->borderBoxRect();
     3592            LayoutRect bbox = box->borderBoxRect();
    35933593            result = bbox;
    3594             IntRect overflowRect = box->visualOverflowRect();
     3594            LayoutRect overflowRect = box->visualOverflowRect();
    35953595            if (bbox != overflowRect)
    35963596                result.unite(overflowRect);
     
    36063606}
    36073607
    3608 IntRect RenderLayer::boundingBox(const RenderLayer* ancestorLayer) const
     3608LayoutRect RenderLayer::boundingBox(const RenderLayer* ancestorLayer) const
    36093609{   
    3610     IntRect result = localBoundingBox();
     3610    LayoutRect result = localBoundingBox();
    36113611    if (renderer()->isBox())
    36123612        renderBox()->flipForWritingMode(result);
    36133613    else
    36143614        renderer()->containingBlock()->flipForWritingMode(result);
    3615     IntPoint delta;
     3615    LayoutPoint delta;
    36163616    convertToLayerCoords(ancestorLayer, delta);
    36173617    result.moveBy(delta);
     
    36193619}
    36203620
    3621 IntRect RenderLayer::absoluteBoundingBox() const
     3621LayoutRect RenderLayer::absoluteBoundingBox() const
    36223622{
    36233623    return boundingBox(root());
     
    39433943}
    39443944
    3945 void RenderLayer::setBackingNeedsRepaintInRect(const IntRect& r)
     3945void RenderLayer::setBackingNeedsRepaintInRect(const LayoutRect& r)
    39463946{
    39473947    // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here,
     
    39513951        // If we're trying to repaint the placeholder document layer, propagate the
    39523952        // repaint to the native view system.
    3953         IntRect absRect(r);
    3954         IntPoint delta;
     3953        LayoutRect absRect(r);
     3954        LayoutPoint delta;
    39553955        convertToLayerCoords(root(), delta);
    39563956        absRect.moveBy(delta);
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r92874 r93429  
    7777    }
    7878
    79     ClipRects(const IntRect& r)
     79    ClipRects(const LayoutRect& r)
    8080        : m_overflowClipRect(r)
    8181        , m_fixedClipRect(r)
     
    9595    }
    9696
    97     void reset(const IntRect& r)
     97    void reset(const LayoutRect& r)
    9898    {
    9999        m_overflowClipRect = r;
     
    103103    }
    104104   
    105     const IntRect& overflowClipRect() const { return m_overflowClipRect; }
    106     void setOverflowClipRect(const IntRect& r) { m_overflowClipRect = r; }
    107 
    108     const IntRect& fixedClipRect() const { return m_fixedClipRect; }
    109     void setFixedClipRect(const IntRect&r) { m_fixedClipRect = r; }
    110 
    111     const IntRect& posClipRect() const { return m_posClipRect; }
    112     void setPosClipRect(const IntRect& r) { m_posClipRect = r; }
     105    const LayoutRect& overflowClipRect() const { return m_overflowClipRect; }
     106    void setOverflowClipRect(const LayoutRect& r) { m_overflowClipRect = r; }
     107
     108    const LayoutRect& fixedClipRect() const { return m_fixedClipRect; }
     109    void setFixedClipRect(const LayoutRect&r) { m_fixedClipRect = r; }
     110
     111    const LayoutRect& posClipRect() const { return m_posClipRect; }
     112    void setPosClipRect(const LayoutRect& r) { m_posClipRect = r; }
    113113
    114114    bool fixed() const { return m_fixed; }
     
    148148
    149149private:
    150     IntRect m_overflowClipRect;
    151     IntRect m_fixedClipRect;
    152     IntRect m_posClipRect;
     150    LayoutRect m_overflowClipRect;
     151    LayoutRect m_fixedClipRect;
     152    LayoutRect m_posClipRect;
    153153    unsigned m_refCnt : 31;
    154154    bool m_fixed : 1;
     
    182182    // if layer compositing is being used,
    183183    void setBackingNeedsRepaint();
    184     void setBackingNeedsRepaintInRect(const IntRect& r); // r is in the coordinate space of the layer's render object
     184    void setBackingNeedsRepaintInRect(const LayoutRect&); // r is in the coordinate space of the layer's render object
    185185    void repaintIncludingNonCompositingDescendants(RenderBoxModelObject* repaintContainer);
    186186#endif
     
    220220    LayoutRect rect() const { return LayoutRect(location(), size()); }
    221221
    222     int scrollWidth();
    223     int scrollHeight();
    224 
    225     void panScrollFromPoint(const IntPoint&);
     222    LayoutUnit scrollWidth();
     223    LayoutUnit scrollHeight();
     224
     225    void panScrollFromPoint(const LayoutPoint&);
    226226
    227227    // Scrolling methods for layers that can scroll their overflow.
    228     void scrollByRecursively(int xDelta, int yDelta);
    229 
    230     IntSize scrolledContentOffset() const { return scrollOffset() + m_scrollOverflow; }
    231 
    232     int scrollXOffset() const { return m_scrollOffset.width() + m_scrollOrigin.x(); }
    233     int scrollYOffset() const { return m_scrollOffset.height() + m_scrollOrigin.y(); }
    234     IntSize scrollOffset() const { return IntSize(scrollXOffset(), scrollYOffset()); }
     228    void scrollByRecursively(LayoutUnit xDelta, LayoutUnit yDelta);
     229
     230    LayoutSize scrolledContentOffset() const { return scrollOffset() + m_scrollOverflow; }
     231
     232    LayoutUnit scrollXOffset() const { return m_scrollOffset.width() + m_scrollOrigin.x(); }
     233    LayoutUnit scrollYOffset() const { return m_scrollOffset.height() + m_scrollOrigin.y(); }
     234    LayoutSize scrollOffset() const { return LayoutSize(scrollXOffset(), scrollYOffset()); }
    235235
    236236    enum ScrollOffsetClamping {
     
    238238        ScrollOffsetClamped
    239239    };
    240     void scrollToOffset(int x, int y, ScrollOffsetClamping = ScrollOffsetUnclamped);
    241     void scrollToXOffset(int x, ScrollOffsetClamping clamp = ScrollOffsetUnclamped) { scrollToOffset(x, scrollYOffset(), clamp); }
    242     void scrollToYOffset(int y, ScrollOffsetClamping clamp = ScrollOffsetUnclamped) { scrollToOffset(scrollXOffset(), y, clamp); }
    243 
    244     void scrollRectToVisible(const IntRect&, const ScrollAlignment& alignX = ScrollAlignment::alignCenterIfNeeded, const ScrollAlignment& alignY = ScrollAlignment::alignCenterIfNeeded);
    245 
    246     IntRect getRectToExpose(const IntRect& visibleRect, const IntRect& exposeRect, const ScrollAlignment& alignX, const ScrollAlignment& alignY);
     240    void scrollToOffset(LayoutUnit, LayoutUnit, ScrollOffsetClamping = ScrollOffsetUnclamped);
     241    void scrollToXOffset(LayoutUnit x, ScrollOffsetClamping clamp = ScrollOffsetUnclamped) { scrollToOffset(x, scrollYOffset(), clamp); }
     242    void scrollToYOffset(LayoutUnit y, ScrollOffsetClamping clamp = ScrollOffsetUnclamped) { scrollToOffset(scrollXOffset(), y, clamp); }
     243
     244    void scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX = ScrollAlignment::alignCenterIfNeeded, const ScrollAlignment& alignY = ScrollAlignment::alignCenterIfNeeded);
     245
     246    LayoutRect getRectToExpose(const LayoutRect& visibleRect, const LayoutRect& exposeRect, const ScrollAlignment& alignX, const ScrollAlignment& alignY);
    247247
    248248    bool scrollsOverflow() const;
     
    266266
    267267    bool hasOverflowControls() const;
    268     bool isPointInResizeControl(const IntPoint& absolutePoint) const;
    269     bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint);
     268    bool isPointInResizeControl(const LayoutPoint& absolutePoint) const;
     269    bool hitTestOverflowControls(HitTestResult&, const LayoutPoint& localPoint);
    270270    LayoutSize offsetFromResizeCorner(const LayoutPoint& absolutePoint) const;
    271271
     
    308308    };
    309309    typedef unsigned UpdateLayerPositionsFlags;
    310     void updateLayerPositions(UpdateLayerPositionsFlags = CheckForRepaint | IsCompositingUpdateRoot | UpdateCompositingLayers, IntPoint* cachedOffset = 0);
     310    void updateLayerPositions(UpdateLayerPositionsFlags = CheckForRepaint | IsCompositingUpdateRoot | UpdateCompositingLayers, LayoutPoint* cachedOffset = 0);
    311311
    312312    void updateTransform();
    313313
    314     void relativePositionOffset(int& relX, int& relY) const { relX += m_relativeOffset.width(); relY += m_relativeOffset.height(); }
    315     const IntSize& relativePositionOffset() const { return m_relativeOffset; }
     314    void relativePositionOffset(LayoutUnit& relX, LayoutUnit& relY) const { relX += m_relativeOffset.width(); relY += m_relativeOffset.height(); }
     315    const LayoutSize& relativePositionOffset() const { return m_relativeOffset; }
    316316
    317317    void clearClipRectsIncludingDescendants();
    318318    void clearClipRects();
    319319
    320     void addBlockSelectionGapsBounds(const IntRect&);
     320    void addBlockSelectionGapsBounds(const LayoutRect&);
    321321    void clearBlockSelectionGapsBounds();
    322322    void repaintBlockSelectionGaps();
     
    359359#endif
    360360
    361     void convertToLayerCoords(const RenderLayer* ancestorLayer, IntPoint& location) const;
    362     void convertToLayerCoords(const RenderLayer* ancestorLayer, IntRect& rect) const;
     361    void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutPoint& location) const;
     362    void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutRect&) const;
    363363
    364364    bool hasAutoZIndex() const { return renderer()->style()->hasAutoZIndex(); }
     
    369369    // front.  The hitTest method looks for mouse events by walking
    370370    // layers that intersect the point from front to back.
    371     void paint(GraphicsContext*, const IntRect& damageRect, PaintBehavior = PaintBehaviorNormal, RenderObject* paintingRoot = 0);
     371    void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = PaintBehaviorNormal, RenderObject* paintingRoot = 0);
    372372    bool hitTest(const HitTestRequest&, HitTestResult&);
    373     void paintOverlayScrollbars(GraphicsContext*, const IntRect& damageRect, PaintBehavior, RenderObject* paintingRoot);
     373    void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior, RenderObject* paintingRoot);
    374374
    375375    // This method figures out our layerBounds in coordinates relative to
     
    387387    ClipRects* clipRects() const { return m_clipRects; }
    388388
    389     IntRect childrenClipRect() const; // Returns the foreground clip rect of the layer in the document's coordinate space.
    390     IntRect selfClipRect() const; // Returns the background clip rect of the layer in the document's coordinate space.
    391 
    392     bool intersectsDamageRect(const IntRect& layerBounds, const IntRect& damageRect, const RenderLayer* rootLayer) const;
     389    LayoutRect childrenClipRect() const; // Returns the foreground clip rect of the layer in the document's coordinate space.
     390    LayoutRect selfClipRect() const; // Returns the background clip rect of the layer in the document's coordinate space.
     391
     392    bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& damageRect, const RenderLayer* rootLayer) const;
    393393
    394394    // Bounding box relative to some ancestor layer.
    395     IntRect boundingBox(const RenderLayer* rootLayer) const;
     395    LayoutRect boundingBox(const RenderLayer* rootLayer) const;
    396396    // Bounding box in the coordinates of this layer.
    397     IntRect localBoundingBox() const;
     397    LayoutRect localBoundingBox() const;
    398398    // Bounding box relative to the root.
    399     IntRect absoluteBoundingBox() const;
     399    LayoutRect absoluteBoundingBox() const;
    400400
    401401    void updateHoverActiveState(const HitTestRequest&, HitTestResult&);
    402402
    403403    // Return a cached repaint rect, computed relative to the layer renderer's containerForRepaint.
    404     IntRect repaintRect() const { return m_repaintRect; }
    405     IntRect repaintRectIncludingDescendants() const;
     404    LayoutRect repaintRect() const { return m_repaintRect; }
     405    LayoutRect repaintRectIncludingDescendants() const;
    406406    void computeRepaintRects();
    407407    void updateRepaintRectsAfterScroll(bool fixed = false);
     
    490490    typedef unsigned PaintLayerFlags;
    491491
    492     void paintLayer(RenderLayer* rootLayer, GraphicsContext*, const IntRect& paintDirtyRect,
     492    void paintLayer(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect& paintDirtyRect,
    493493                    PaintBehavior, RenderObject* paintingRoot, OverlapTestRequestMap* = 0,
    494494                    PaintLayerFlags = 0);
    495495    void paintList(Vector<RenderLayer*>*, RenderLayer* rootLayer, GraphicsContext* p,
    496                    const IntRect& paintDirtyRect, PaintBehavior,
     496                   const LayoutRect& paintDirtyRect, PaintBehavior,
    497497                   RenderObject* paintingRoot, OverlapTestRequestMap*,
    498498                   PaintLayerFlags);
    499499    void paintPaginatedChildLayer(RenderLayer* childLayer, RenderLayer* rootLayer, GraphicsContext*,
    500                                   const IntRect& paintDirtyRect, PaintBehavior,
     500                                  const LayoutRect& paintDirtyRect, PaintBehavior,
    501501                                  RenderObject* paintingRoot, OverlapTestRequestMap*,
    502502                                  PaintLayerFlags);
    503503    void paintChildLayerIntoColumns(RenderLayer* childLayer, RenderLayer* rootLayer, GraphicsContext*,
    504                                     const IntRect& paintDirtyRect, PaintBehavior,
     504                                    const LayoutRect& paintDirtyRect, PaintBehavior,
    505505                                    RenderObject* paintingRoot, OverlapTestRequestMap*,
    506506                                    PaintLayerFlags, const Vector<RenderLayer*>& columnLayers, size_t columnIndex);
     
    531531    bool shouldBeNormalFlowOnly() const;
    532532
    533     int scrollPosition(Scrollbar*) const;
     533    LayoutUnit scrollPosition(Scrollbar*) const;
    534534   
    535535    // ScrollableArea interface
    536     virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&);
    537     virtual void invalidateScrollCornerRect(const IntRect&);
     536    virtual void invalidateScrollbarRect(Scrollbar*, const LayoutRect&);
     537    virtual void invalidateScrollCornerRect(const LayoutRect&);
    538538    virtual bool isActive() const;
    539539    virtual bool isScrollCornerVisible() const;
    540     virtual IntRect scrollCornerRect() const;
    541     virtual IntRect convertFromScrollbarToContainingView(const Scrollbar*, const IntRect&) const;
    542     virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar*, const IntRect&) const;
    543     virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar*, const IntPoint&) const;
    544     virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, const IntPoint&) const;
    545     virtual int scrollSize(ScrollbarOrientation) const;
    546     virtual void setScrollOffset(const IntPoint&);
    547     virtual IntPoint scrollPosition() const;
    548     virtual IntPoint minimumScrollPosition() const;
    549     virtual IntPoint maximumScrollPosition() const;
    550     virtual IntRect visibleContentRect(bool includeScrollbars) const;
     540    virtual LayoutRect scrollCornerRect() const;
     541    virtual LayoutRect convertFromScrollbarToContainingView(const Scrollbar*, const LayoutRect&) const;
     542    virtual LayoutRect convertFromContainingViewToScrollbar(const Scrollbar*, const LayoutRect&) const;
     543    virtual LayoutPoint convertFromScrollbarToContainingView(const Scrollbar*, const LayoutPoint&) const;
     544    virtual LayoutPoint convertFromContainingViewToScrollbar(const Scrollbar*, const LayoutPoint&) const;
     545    virtual LayoutUnit scrollSize(ScrollbarOrientation) const;
     546    virtual void setScrollOffset(const LayoutPoint&);
     547    virtual LayoutPoint scrollPosition() const;
     548    virtual LayoutPoint minimumScrollPosition() const;
     549    virtual LayoutPoint maximumScrollPosition() const;
     550    virtual LayoutRect visibleContentRect(bool includeScrollbars) const;
    551551    virtual LayoutUnit visibleHeight() const;
    552552    virtual LayoutUnit visibleWidth() const;
    553     virtual IntSize contentsSize() const;
    554     virtual IntSize overhangAmount() const;
    555     virtual IntPoint currentMousePosition() const;
    556     virtual void didCompleteRubberBand(const IntSize&) const;
     553    virtual LayoutSize contentsSize() const;
     554    virtual LayoutSize overhangAmount() const;
     555    virtual LayoutPoint currentMousePosition() const;
     556    virtual void didCompleteRubberBand(const LayoutSize&) const;
    557557    virtual bool shouldSuspendScrollAnimations() const;
    558558    virtual bool isOnActivePage() const;
    559559
    560560    // Rectangle encompassing the scroll corner and resizer rect.
    561     IntRect scrollCornerAndResizerRect() const;
     561    LayoutRect scrollCornerAndResizerRect() const;
    562562
    563563    virtual void disconnectFromPage() { m_scrollableAreaPage = 0; }
    564564
    565565    // NOTE: This should only be called by the overriden setScrollOffset from ScrollableArea.
    566     void scrollTo(int x, int y);
    567 
    568     IntSize scrollbarOffset(const Scrollbar*) const;
     566    void scrollTo(LayoutUnit, LayoutUnit);
     567
     568    LayoutSize scrollbarOffset(const Scrollbar*) const;
    569569   
    570570    void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow);
     
    592592   
    593593    void parentClipRects(const RenderLayer* rootLayer, ClipRects&, bool temporaryClipRects = false, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize) const;
    594     IntRect backgroundClipRect(const RenderLayer* rootLayer, bool temporaryClipRects, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize) const;
     594    LayoutRect backgroundClipRect(const RenderLayer* rootLayer, bool temporaryClipRects, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize) const;
    595595
    596596    RenderLayer* enclosingTransformedAncestor() const;
    597597
    598598    // Convert a point in absolute coords into layer coords, taking transforms into account
    599     IntPoint absoluteToContents(const IntPoint&) const;
    600 
    601     void positionOverflowControls(const IntSize&);
     599    LayoutPoint absoluteToContents(const LayoutPoint&) const;
     600
     601    void positionOverflowControls(const LayoutSize&);
    602602    void updateScrollCornerStyle();
    603603    void updateResizerStyle();
     
    621621    void destroy(RenderArena*);
    622622
    623     int overflowTop() const;
    624     int overflowBottom() const;
    625     int overflowLeft() const;
    626     int overflowRight() const;
     623    LayoutUnit overflowTop() const;
     624    LayoutUnit overflowBottom() const;
     625    LayoutUnit overflowLeft() const;
     626    LayoutUnit overflowRight() const;
    627627
    628628protected:
     
    635635    RenderLayer* m_last;
    636636
    637     IntRect m_repaintRect; // Cached repaint rects. Used by layout.
    638     IntRect m_outlineBox;
     637    LayoutRect m_repaintRect; // Cached repaint rects. Used by layout.
     638    LayoutRect m_outlineBox;
    639639
    640640    // Our current relative position offset.
    641     IntSize m_relativeOffset;
     641    LayoutSize m_relativeOffset;
    642642
    643643    // Our (x,y) coordinates are in our parent layer's coordinate space.
     
    648648
    649649    // Our scroll offsets if the view is scrolled.
    650     IntSize m_scrollOffset;
    651 
    652     IntSize m_scrollOverflow;
     650    LayoutSize m_scrollOffset;
     651
     652    LayoutSize m_scrollOverflow;
    653653   
    654654    // The width/height of our scrolled area.
    655     IntSize m_scrollSize;
     655    LayoutSize m_scrollSize;
    656656
    657657    // For layers with overflow, we have a pair of scrollbars.
     
    710710    bool m_containsDirtyOverlayScrollbars : 1;
    711711
    712     IntPoint m_cachedOverlayScrollbarOffset;
     712    LayoutPoint m_cachedOverlayScrollbarOffset;
    713713
    714714    RenderMarquee* m_marquee; // Used by layers with overflow:marquee
     
    728728
    729729private:
    730     IntRect m_blockSelectionGapsBounds;
     730    LayoutRect m_blockSelectionGapsBounds;
    731731
    732732#if USE(ACCELERATED_COMPOSITING)
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r93040 r93429  
    6666static bool hasBoxDecorationsOrBackground(const RenderObject*);
    6767static bool hasBoxDecorationsOrBackgroundImage(const RenderStyle*);
    68 static IntRect clipBox(RenderBox* renderer);
     68static LayoutRect clipBox(RenderBox* renderer);
    6969
    7070static inline bool isAcceleratedCanvas(RenderObject* renderer)
     
    192192void RenderLayerBacking::updateCompositedBounds()
    193193{
    194     IntRect layerBounds = compositor()->calculateCompositedBounds(m_owningLayer, m_owningLayer);
     194    LayoutRect layerBounds = compositor()->calculateCompositedBounds(m_owningLayer, m_owningLayer);
    195195
    196196    // Clip to the size of the document or enclosing overflow-scroll layer.
     
    208208
    209209        // Start by clipping to the view's bounds.
    210         IntRect clippingBounds = view->layoutOverflowRect();
     210        LayoutRect clippingBounds = view->layoutOverflowRect();
    211211
    212212        if (m_owningLayer != rootLayer)
    213213            clippingBounds.intersect(m_owningLayer->backgroundClipRect(rootLayer, true));
    214214
    215         IntPoint delta;
     215        LayoutPoint delta;
    216216        m_owningLayer->convertToLayerCoords(rootLayer, delta);
    217217        clippingBounds.move(-delta.x(), -delta.y());
     
    334334}
    335335
    336 static IntRect clipBox(RenderBox* renderer)
    337 {
    338     IntRect result = PaintInfo::infiniteRect();
     336static LayoutRect clipBox(RenderBox* renderer)
     337{
     338    LayoutRect result = PaintInfo::infiniteRect();
    339339    if (renderer->hasOverflowClip())
    340         result = renderer->overflowClipRect(IntPoint());
     340        result = renderer->overflowClipRect(LayoutPoint());
    341341
    342342    if (renderer->hasClip())
    343         result.intersect(renderer->clipRect(IntPoint()));
     343        result.intersect(renderer->clipRect(LayoutPoint()));
    344344
    345345    return result;
     
    368368   
    369369    // We compute everything relative to the enclosing compositing layer.
    370     IntRect ancestorCompositingBounds;
     370    LayoutRect ancestorCompositingBounds;
    371371    if (compAncestor) {
    372372        ASSERT(compAncestor->backing());
     
    374374    }
    375375
    376     IntRect localCompositingBounds = compositedBounds();
    377 
    378     IntRect relativeCompositingBounds(localCompositingBounds);
    379     IntPoint delta;
     376    LayoutRect localCompositingBounds = compositedBounds();
     377
     378    LayoutRect relativeCompositingBounds(localCompositingBounds);
     379    LayoutPoint delta;
    380380    m_owningLayer->convertToLayerCoords(compAncestor, delta);
    381381    relativeCompositingBounds.moveBy(delta);
    382382
    383     IntPoint graphicsLayerParentLocation;
     383    LayoutPoint graphicsLayerParentLocation;
    384384    if (compAncestor && compAncestor->backing()->hasClippingLayer()) {
    385385        // If the compositing ancestor has a layer to clip children, we parent in that, and therefore
    386386        // position relative to it.
    387         IntRect clippingBox = clipBox(toRenderBox(compAncestor->renderer()));
     387        LayoutRect clippingBox = clipBox(toRenderBox(compAncestor->renderer()));
    388388        graphicsLayerParentLocation = clippingBox.location();
    389389    } else if (compAncestor)
     
    396396        // layer. Note that we call it with temporaryClipRects = true because normally when computing clip rects
    397397        // for a compositing layer, rootLayer is the layer itself.
    398         IntRect parentClipRect = m_owningLayer->backgroundClipRect(compAncestor, true);
     398        LayoutRect parentClipRect = m_owningLayer->backgroundClipRect(compAncestor, true);
    399399        ASSERT(parentClipRect != PaintInfo::infiniteRect());
    400400        m_ancestorClippingLayer->setPosition(FloatPoint() + (parentClipRect.location() - graphicsLayerParentLocation));
     
    410410    m_graphicsLayer->setPosition(FloatPoint() + (relativeCompositingBounds.location() - graphicsLayerParentLocation));
    411411   
    412     IntSize oldOffsetFromRenderer = m_graphicsLayer->offsetFromRenderer();
    413     m_graphicsLayer->setOffsetFromRenderer(localCompositingBounds.location() - IntPoint());
     412    LayoutSize oldOffsetFromRenderer = m_graphicsLayer->offsetFromRenderer();
     413    m_graphicsLayer->setOffsetFromRenderer(localCompositingBounds.location() - LayoutPoint());
    414414   
    415415    // If the compositing layer offset changes, we need to repaint.
     
    428428
    429429    // If we have a layer that clips children, position it.
    430     IntRect clippingBox;
     430    LayoutRect clippingBox;
    431431    if (m_clippingLayer) {
    432432        clippingBox = clipBox(toRenderBox(renderer()));
    433433        m_clippingLayer->setPosition(FloatPoint() + (clippingBox.location() - localCompositingBounds.location()));
    434434        m_clippingLayer->setSize(clippingBox.size());
    435         m_clippingLayer->setOffsetFromRenderer(clippingBox.location() - IntPoint());
     435        m_clippingLayer->setOffsetFromRenderer(clippingBox.location() - LayoutPoint());
    436436    }
    437437   
     
    446446   
    447447    if (m_owningLayer->hasTransform()) {
    448         const IntRect borderBox = toRenderBox(renderer())->borderBoxRect();
     448        const LayoutRect borderBox = toRenderBox(renderer())->borderBoxRect();
    449449
    450450        // Get layout bounds in the coords of compAncestor to match relativeCompositingBounds.
    451         IntRect layerBounds = IntRect(delta, borderBox.size());
     451        LayoutRect layerBounds = LayoutRect(delta, borderBox.size());
    452452
    453453        // Update properties that depend on layer dimensions
     
    482482        FloatPoint foregroundPosition;
    483483        FloatSize foregroundSize = newSize;
    484         IntSize foregroundOffset = m_graphicsLayer->offsetFromRenderer();
     484        LayoutSize foregroundOffset = m_graphicsLayer->offsetFromRenderer();
    485485        if (m_clippingLayer) {
    486486            // If we have a clipping layer (which clips descendants), then the foreground layer is a child of it,
    487487            // so that it gets correctly sorted with children. In that case, position relative to the clipping layer.
    488488            foregroundSize = FloatSize(clippingBox.size());
    489             foregroundOffset = clippingBox.location() - IntPoint();
     489            foregroundOffset = clippingBox.location() - LayoutPoint();
    490490        }
    491491
     
    986986}
    987987
    988 FloatPoint3D RenderLayerBacking::computeTransformOrigin(const IntRect& borderBox) const
     988FloatPoint3D RenderLayerBacking::computeTransformOrigin(const LayoutRect& borderBox) const
    989989{
    990990    RenderStyle* style = renderer()->style();
     
    998998}
    999999
    1000 FloatPoint RenderLayerBacking::computePerspectiveOrigin(const IntRect& borderBox) const
     1000FloatPoint RenderLayerBacking::computePerspectiveOrigin(const LayoutRect& borderBox) const
    10011001{
    10021002    RenderStyle* style = renderer()->style();
     
    10131013
    10141014// Return the offset from the top-left of this compositing layer at which the renderer's contents are painted.
    1015 IntSize RenderLayerBacking::contentOffsetInCompostingLayer() const
    1016 {
    1017     return IntSize(-m_compositedBounds.x(), -m_compositedBounds.y());
    1018 }
    1019 
    1020 IntRect RenderLayerBacking::contentsBox() const
     1015LayoutSize RenderLayerBacking::contentOffsetInCompostingLayer() const
     1016{
     1017    return LayoutSize(-m_compositedBounds.x(), -m_compositedBounds.y());
     1018}
     1019
     1020LayoutRect RenderLayerBacking::contentsBox() const
    10211021{
    10221022    if (!renderer()->isBox())
    1023         return IntRect();
    1024 
    1025     IntRect contentsRect;
     1023        return LayoutRect();
     1024
     1025    LayoutRect contentsRect;
    10261026#if ENABLE(VIDEO)
    10271027    if (renderer()->isVideo()) {
     
    10321032        contentsRect = toRenderBox(renderer())->contentBoxRect();
    10331033
    1034     IntSize contentOffset = contentOffsetInCompostingLayer();
     1034    LayoutSize contentOffset = contentOffsetInCompostingLayer();
    10351035    contentsRect.move(contentOffset);
    10361036    return contentsRect;
     
    10581058
    10591059// r is in the coordinate space of the layer's render object
    1060 void RenderLayerBacking::setContentsNeedDisplayInRect(const IntRect& r)
     1060void RenderLayerBacking::setContentsNeedDisplayInRect(const LayoutRect& r)
    10611061{
    10621062    if (m_graphicsLayer && m_graphicsLayer->drawsContent()) {
    1063         IntRect layerDirtyRect = r;
     1063        LayoutRect layerDirtyRect = r;
    10641064        layerDirtyRect.move(-m_graphicsLayer->offsetFromRenderer());
    10651065        m_graphicsLayer->setNeedsDisplayInRect(layerDirtyRect);
     
    10671067
    10681068    if (m_foregroundLayer && m_foregroundLayer->drawsContent()) {
    1069         IntRect layerDirtyRect = r;
     1069        LayoutRect layerDirtyRect = r;
    10701070        layerDirtyRect.move(-m_foregroundLayer->offsetFromRenderer());
    10711071        m_foregroundLayer->setNeedsDisplayInRect(layerDirtyRect);
     
    10731073
    10741074    if (m_maskLayer && m_maskLayer->drawsContent()) {
    1075         IntRect layerDirtyRect = r;
     1075        LayoutRect layerDirtyRect = r;
    10761076        layerDirtyRect.move(-m_maskLayer->offsetFromRenderer());
    10771077        m_maskLayer->setNeedsDisplayInRect(layerDirtyRect);
     
    10791079}
    10801080
    1081 static void setClip(GraphicsContext* p, const IntRect& paintDirtyRect, const IntRect& clipRect)
     1081static void setClip(GraphicsContext* p, const LayoutRect& paintDirtyRect, const LayoutRect& clipRect)
    10821082{
    10831083    if (paintDirtyRect == clipRect)
     
    10871087}
    10881088
    1089 static void restoreClip(GraphicsContext* p, const IntRect& paintDirtyRect, const IntRect& clipRect)
     1089static void restoreClip(GraphicsContext* p, const LayoutRect& paintDirtyRect, const LayoutRect& clipRect)
    10901090{
    10911091    if (paintDirtyRect == clipRect)
     
    10961096// Share this with RenderLayer::paintLayer, which would have to be educated about GraphicsLayerPaintingPhase?
    10971097void RenderLayerBacking::paintIntoLayer(RenderLayer* rootLayer, GraphicsContext* context,
    1098                     const IntRect& paintDirtyRect,      // in the coords of rootLayer
     1098                    const LayoutRect& paintDirtyRect, // In the coords of rootLayer.
    10991099                    PaintBehavior paintBehavior, GraphicsLayerPaintingPhase paintingPhase,
    11001100                    RenderObject* paintingRoot)
     
    11081108   
    11091109    // Calculate the clip rects we should use.
    1110     IntRect layerBounds, damageRect, clipRectToApply, outlineRect;
     1110    LayoutRect layerBounds, damageRect, clipRectToApply, outlineRect;
    11111111    m_owningLayer->calculateRects(rootLayer, paintDirtyRect, layerBounds, damageRect, clipRectToApply, outlineRect);
    11121112
    1113     IntPoint paintOffset = toPoint(layerBounds.location() - m_owningLayer->renderBoxLocation());
     1113    LayoutPoint paintOffset = toPoint(layerBounds.location() - m_owningLayer->renderBoxLocation());
    11141114
    11151115    // If this layer's renderer is a child of the paintingRoot, we render unconditionally, which
     
    11991199}
    12001200
    1201 static void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const IntRect& clip)
     1201static void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const LayoutRect& clip)
    12021202{
    12031203    if (!scrollbar)
     
    12051205
    12061206    context.save();
    1207     const IntRect& scrollbarRect = scrollbar->frameRect();
     1207    const LayoutRect& scrollbarRect = scrollbar->frameRect();
    12081208    context.translate(-scrollbarRect.x(), -scrollbarRect.y());
    1209     IntRect transformedClip = clip;
     1209    LayoutRect transformedClip = clip;
    12101210    transformedClip.moveBy(scrollbarRect.location());
    12111211    scrollbar->paint(&context, transformedClip);
     
    12141214
    12151215// Up-call from compositing layer drawing callback.
    1216 void RenderLayerBacking::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase paintingPhase, const IntRect& clip)
     1216void RenderLayerBacking::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase paintingPhase, const LayoutRect& clip)
    12171217{
    12181218    if (graphicsLayer == m_graphicsLayer.get() || graphicsLayer == m_foregroundLayer.get() || graphicsLayer == m_maskLayer.get()) {
    12191219        InspectorInstrumentationCookie cookie = InspectorInstrumentation::willPaint(m_owningLayer->renderer()->frame(), clip);
    12201220
    1221         IntSize offset = graphicsLayer->offsetFromRenderer();
     1221        LayoutSize offset = graphicsLayer->offsetFromRenderer();
    12221222        context.translate(-offset);
    12231223
    1224         IntRect clipRect(clip);
     1224        LayoutRect clipRect(clip);
    12251225        clipRect.move(offset);
    12261226
    12271227        // The dirtyRect is in the coords of the painting root.
    1228         IntRect dirtyRect = compositedBounds();
     1228        LayoutRect dirtyRect = compositedBounds();
    12291229        dirtyRect.intersect(clipRect);
    12301230
     
    12381238        paintScrollbar(m_owningLayer->verticalScrollbar(), context, clip);
    12391239    } else if (graphicsLayer == layerForScrollCorner()) {
    1240         const IntRect& scrollCornerAndResizer = m_owningLayer->scrollCornerAndResizerRect();
     1240        const LayoutRect& scrollCornerAndResizer = m_owningLayer->scrollCornerAndResizerRect();
    12411241        context.save();
    12421242        context.translate(-scrollCornerAndResizer.x(), -scrollCornerAndResizer.y());
    1243         IntRect transformedClip = clip;
     1243        LayoutRect transformedClip = clip;
    12441244        transformedClip.moveBy(scrollCornerAndResizer.location());
    1245         m_owningLayer->paintScrollCorner(&context, IntPoint(), transformedClip);
    1246         m_owningLayer->paintResizer(&context, IntPoint(), transformedClip);
     1245        m_owningLayer->paintScrollCorner(&context, LayoutPoint(), transformedClip);
     1246        m_owningLayer->paintResizer(&context, LayoutPoint(), transformedClip);
    12471247        context.restore();
    12481248    }
     
    13131313    }
    13141314
    1315     if (hasOpacity && m_graphicsLayer->addAnimation(opacityVector, IntSize(), anim, keyframes.animationName(), timeOffset)) {
     1315    if (hasOpacity && m_graphicsLayer->addAnimation(opacityVector, LayoutSize(), anim, keyframes.animationName(), timeOffset)) {
    13161316        didAnimateOpacity = true;
    13171317        compositor()->didStartAcceleratedAnimation(CSSPropertyOpacity);
     
    13441344            opacityVector.insert(new FloatAnimationValue(1, compositingOpacity(toStyle->opacity())));
    13451345            // The boxSize param is only used for transform animations (which can only run on RenderBoxes), so we pass an empty size here.
    1346             if (m_graphicsLayer->addAnimation(opacityVector, IntSize(), opacityAnim, GraphicsLayer::animationNameForTransition(AnimatedPropertyOpacity), timeOffset)) {
     1346            if (m_graphicsLayer->addAnimation(opacityVector, LayoutSize(), opacityAnim, GraphicsLayer::animationNameForTransition(AnimatedPropertyOpacity), timeOffset)) {
    13471347                // To ensure that the correct opacity is visible when the animation ends, also set the final opacity.
    13481348                updateLayerOpacity(toStyle);
     
    14111411}
    14121412
    1413 IntRect RenderLayerBacking::compositedBounds() const
     1413LayoutRect RenderLayerBacking::compositedBounds() const
    14141414{
    14151415    return m_compositedBounds;
    14161416}
    14171417
    1418 void RenderLayerBacking::setCompositedBounds(const IntRect& bounds)
     1418void RenderLayerBacking::setCompositedBounds(const LayoutRect& bounds)
    14191419{
    14201420    m_compositedBounds = bounds;
  • trunk/Source/WebCore/rendering/RenderLayerBacking.h

    r93040 r93429  
    100100    void setContentsNeedDisplay();
    101101    // r is in the coordinate space of the layer's render object
    102     void setContentsNeedDisplayInRect(const IntRect& r);
     102    void setContentsNeedDisplayInRect(const LayoutRect&);
    103103
    104104    // Notification from the renderer that its content changed.
     
    117117    void resumeAnimations();
    118118
    119     IntRect compositedBounds() const;
    120     void setCompositedBounds(const IntRect&);
     119    LayoutRect compositedBounds() const;
     120    void setCompositedBounds(const LayoutRect&);
    121121    void updateCompositedBounds();
    122122   
     
    127127    virtual void notifySyncRequired(const GraphicsLayer*);
    128128
    129     virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& clip);
     129    virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const LayoutRect& clip);
    130130
    131131    virtual float deviceScaleFactor() const;
     
    136136    virtual bool showRepaintCounter() const;
    137137
    138     IntRect contentsBox() const;
     138    LayoutRect contentsBox() const;
    139139   
    140140    // For informative purposes only.
     
    165165    GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const;
    166166   
    167     IntSize contentOffsetInCompostingLayer() const;
     167    LayoutSize contentOffsetInCompostingLayer() const;
    168168    // Result is transform origin in pixels.
    169     FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const;
     169    FloatPoint3D computeTransformOrigin(const LayoutRect& borderBox) const;
    170170    // Result is perspective origin in pixels.
    171     FloatPoint computePerspectiveOrigin(const IntRect& borderBox) const;
     171    FloatPoint computePerspectiveOrigin(const LayoutRect& borderBox) const;
    172172
    173173    void updateLayerOpacity(const RenderStyle*);
     
    191191    bool hasNonCompositingDescendants() const;
    192192   
    193     void paintIntoLayer(RenderLayer* rootLayer, GraphicsContext*, const IntRect& paintDirtyRect, PaintBehavior, GraphicsLayerPaintingPhase, RenderObject* paintingRoot);
     193    void paintIntoLayer(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect& paintDirtyRect, PaintBehavior, GraphicsLayerPaintingPhase, RenderObject* paintingRoot);
    194194
    195195    static int graphicsLayerToCSSProperty(AnimatedPropertyID);
     
    212212    OwnPtr<GraphicsLayer> m_layerForScrollCorner;
    213213
    214     IntRect m_compositedBounds;
     214    LayoutRect m_compositedBounds;
    215215
    216216    bool m_artificiallyInflatedBounds;      // bounds had to be made non-zero to make transform-origin work
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r93303 r93429  
    440440// The bounds of the GraphicsLayer created for a compositing layer is the union of the bounds of all the descendant
    441441// RenderLayers that are rendered by the composited RenderLayer.
    442 IntRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer* layer, const RenderLayer* ancestorLayer)
     442LayoutRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer* layer, const RenderLayer* ancestorLayer)
    443443{
    444444    if (!canBeComposited(layer))
    445         return IntRect();
    446 
    447     IntRect boundingBoxRect = layer->localBoundingBox();
     445        return LayoutRect();
     446
     447    LayoutRect boundingBoxRect = layer->localBoundingBox();
    448448    if (layer->renderer()->isRoot()) {
    449449        // If the root layer becomes composited (e.g. because some descendant with negative z-index is composited),
     
    459459    }
    460460   
    461     IntRect unionBounds = boundingBoxRect;
     461    LayoutRect unionBounds = boundingBoxRect;
    462462   
    463463    if (layer->renderer()->hasOverflowClip() || layer->renderer()->hasMask()) {
    464         IntPoint ancestorRelOffset;
     464        LayoutPoint ancestorRelOffset;
    465465        layer->convertToLayerCoords(ancestorLayer, ancestorRelOffset);
    466466        boundingBoxRect.moveBy(ancestorRelOffset);
     
    470470    if (RenderLayer* reflection = layer->reflectionLayer()) {
    471471        if (!reflection->isComposited()) {
    472             IntRect childUnionBounds = calculateCompositedBounds(reflection, layer);
     472            LayoutRect childUnionBounds = calculateCompositedBounds(reflection, layer);
    473473            unionBounds.unite(childUnionBounds);
    474474        }
     
    482482            RenderLayer* curLayer = negZOrderList->at(i);
    483483            if (!curLayer->isComposited()) {
    484                 IntRect childUnionBounds = calculateCompositedBounds(curLayer, layer);
     484                LayoutRect childUnionBounds = calculateCompositedBounds(curLayer, layer);
    485485                unionBounds.unite(childUnionBounds);
    486486            }
     
    493493            RenderLayer* curLayer = posZOrderList->at(i);
    494494            if (!curLayer->isComposited()) {
    495                 IntRect childUnionBounds = calculateCompositedBounds(curLayer, layer);
     495                LayoutRect childUnionBounds = calculateCompositedBounds(curLayer, layer);
    496496                unionBounds.unite(childUnionBounds);
    497497            }
     
    504504            RenderLayer* curLayer = normalFlowList->at(i);
    505505            if (!curLayer->isComposited()) {
    506                 IntRect curAbsBounds = calculateCompositedBounds(curLayer, layer);
     506                LayoutRect curAbsBounds = calculateCompositedBounds(curLayer, layer);
    507507                unionBounds.unite(curAbsBounds);
    508508            }
     
    516516    }
    517517
    518     IntPoint ancestorRelOffset;
     518    LayoutPoint ancestorRelOffset;
    519519    layer->convertToLayerCoords(ancestorLayer, ancestorRelOffset);
    520520    unionBounds.moveBy(ancestorRelOffset);
     
    538538    if (compLayer) {
    539539        ASSERT(compLayer->backing());
    540         IntRect compBounds = child->backing()->compositedBounds();
    541 
    542         IntPoint offset;
     540        LayoutRect compBounds = child->backing()->compositedBounds();
     541
     542        LayoutPoint offset;
    543543        child->convertToLayerCoords(compLayer, offset);
    544544        compBounds.moveBy(offset);
     
    566566}
    567567
    568 void RenderLayerCompositor::addToOverlapMap(OverlapMap& overlapMap, RenderLayer* layer, IntRect& layerBounds, bool& boundsComputed)
     568void RenderLayerCompositor::addToOverlapMap(OverlapMap& overlapMap, RenderLayer* layer, LayoutRect& layerBounds, bool& boundsComputed)
    569569{
    570570    if (layer->isRootLayer())
     
    575575        // Empty rects never intersect, but we need them to for the purposes of overlap testing.
    576576        if (layerBounds.isEmpty())
    577             layerBounds.setSize(IntSize(1, 1));
     577            layerBounds.setSize(LayoutSize(1, 1));
    578578        boundsComputed = true;
    579579    }
    580580
    581     IntRect clipRect = layer->backgroundClipRect(rootRenderLayer(), true);
     581    LayoutRect clipRect = layer->backgroundClipRect(rootRenderLayer(), true);
    582582    clipRect.intersect(layerBounds);
    583583    overlapMap.add(layer, clipRect);
     
    589589        return;
    590590
    591     IntRect bounds;
     591    LayoutRect bounds;
    592592    bool haveComputedBounds = false;
    593593    addToOverlapMap(overlapMap, layer, bounds, haveComputedBounds);
     
    623623}
    624624
    625 bool RenderLayerCompositor::overlapsCompositedLayers(OverlapMap& overlapMap, const IntRect& layerBounds)
     625bool RenderLayerCompositor::overlapsCompositedLayers(OverlapMap& overlapMap, const LayoutRect& layerBounds)
    626626{
    627627    RenderLayerCompositor::OverlapMap::const_iterator end = overlapMap.end();
    628628    for (RenderLayerCompositor::OverlapMap::const_iterator it = overlapMap.begin(); it != end; ++it) {
    629         const IntRect& bounds = it->second;
     629        const LayoutRect& bounds = it->second;
    630630        if (layerBounds.intersects(bounds))
    631631            return true;
     
    656656
    657657    bool haveComputedBounds = false;
    658     IntRect absBounds;
     658    LayoutRect absBounds;
    659659    if (overlapMap && !overlapMap->isEmpty()) {
    660660        // If we're testing for overlap, we only need to composite if we overlap something that is already composited.
     
    662662        // Empty rects never intersect, but we need them to for the purposes of overlap testing.
    663663        if (absBounds.isEmpty())
    664             absBounds.setSize(IntSize(1, 1));
     664            absBounds.setSize(LayoutSize(1, 1));
    665665        haveComputedBounds = true;
    666666        mustOverlapCompositedLayers = overlapsCompositedLayers(*overlapMap, absBounds);
     
    947947}
    948948
    949 void RenderLayerCompositor::frameViewDidChangeLocation(const IntPoint& contentsOffset)
     949void RenderLayerCompositor::frameViewDidChangeLocation(const LayoutPoint& contentsOffset)
    950950{
    951951    if (m_overflowControlsHostLayer)
     
    959959        m_clipLayer->setSize(frameView->visibleContentRect(false /* exclude scrollbars */).size());
    960960
    961         IntPoint scrollPosition = frameView->scrollPosition();
     961        LayoutPoint scrollPosition = frameView->scrollPosition();
    962962        m_scrollLayer->setPosition(FloatPoint(-scrollPosition.x(), -scrollPosition.y()));
    963963        updateOverflowControlsLayers();
     
    965965}
    966966
    967 void RenderLayerCompositor::frameViewDidScroll(const IntPoint& scrollPosition)
     967void RenderLayerCompositor::frameViewDidScroll(const LayoutPoint& scrollPosition)
    968968{
    969969    if (m_scrollLayer)
     
    11111111
    11121112
    1113 void RenderLayerCompositor::repaintCompositedLayersAbsoluteRect(const IntRect& absRect)
     1113void RenderLayerCompositor::repaintCompositedLayersAbsoluteRect(const LayoutRect& absRect)
    11141114{
    11151115    recursiveRepaintLayerRect(rootRenderLayer(), absRect);
    11161116}
    11171117
    1118 void RenderLayerCompositor::recursiveRepaintLayerRect(RenderLayer* layer, const IntRect& rect)
     1118void RenderLayerCompositor::recursiveRepaintLayerRect(RenderLayer* layer, const LayoutRect& rect)
    11191119{
    11201120    // FIXME: This method does not work correctly with transforms.
     
    11271127            for (size_t i = 0; i < listSize; ++i) {
    11281128                RenderLayer* curLayer = negZOrderList->at(i);
    1129                 IntRect childRect(rect);
     1129                LayoutRect childRect(rect);
    11301130                curLayer->convertToLayerCoords(layer, childRect);
    11311131                recursiveRepaintLayerRect(curLayer, childRect);
     
    11371137            for (size_t i = 0; i < listSize; ++i) {
    11381138                RenderLayer* curLayer = posZOrderList->at(i);
    1139                 IntRect childRect(rect);
     1139                LayoutRect childRect(rect);
    11401140                curLayer->convertToLayerCoords(layer, childRect);
    11411141                recursiveRepaintLayerRect(curLayer, childRect);
     
    11471147        for (size_t i = 0; i < listSize; ++i) {
    11481148            RenderLayer* curLayer = normalFlowList->at(i);
    1149             IntRect childRect(rect);
     1149            LayoutRect childRect(rect);
    11501150            curLayer->convertToLayerCoords(layer, childRect);
    11511151            recursiveRepaintLayerRect(curLayer, childRect);
     
    12031203{
    12041204    if (m_rootContentLayer) {
    1205         const IntRect& documentRect = m_renderView->documentRect();
     1205        const LayoutRect& documentRect = m_renderView->documentRect();
    12061206        m_rootContentLayer->setSize(documentRect.size());
    12071207        m_rootContentLayer->setPosition(documentRect.location());
     
    13471347        return false;
    13481348
    1349     IntRect backgroundRect = layer->backgroundClipRect(computeClipRoot, true);
     1349    LayoutRect backgroundRect = layer->backgroundClipRect(computeClipRoot, true);
    13501350    return backgroundRect != PaintInfo::infiniteRect();
    13511351}
     
    14381438
    14391439    // Don't go into compositing mode if height or width are zero, or size is 1x1.
    1440     IntRect contentBox = pluginRenderer->contentBoxRect();
     1440    LayoutRect contentBox = pluginRenderer->contentBoxRect();
    14411441    return contentBox.height() * contentBox.width() > 1;
    14421442}
     
    14631463   
    14641464    // Don't go into compositing mode if height or width are zero.
    1465     IntRect contentBox = frameRenderer->contentBoxRect();
     1465    LayoutRect contentBox = frameRenderer->contentBoxRect();
    14661466    return contentBox.height() * contentBox.width() > 0;
    14671467}
     
    15231523}
    15241524
    1525 static void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const IntRect& clip)
     1525static void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const LayoutRect& clip)
    15261526{
    15271527    if (!scrollbar)
     
    15291529
    15301530    context.save();
    1531     const IntRect& scrollbarRect = scrollbar->frameRect();
     1531    const LayoutRect& scrollbarRect = scrollbar->frameRect();
    15321532    context.translate(-scrollbarRect.x(), -scrollbarRect.y());
    1533     IntRect transformedClip = clip;
     1533    LayoutRect transformedClip = clip;
    15341534    transformedClip.moveBy(scrollbarRect.location());
    15351535    scrollbar->paint(&context, transformedClip);
     
    15371537}
    15381538
    1539 void RenderLayerCompositor::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase, const IntRect& clip)
     1539void RenderLayerCompositor::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase, const LayoutRect& clip)
    15401540{
    15411541    if (graphicsLayer == layerForHorizontalScrollbar())
     
    15441544        paintScrollbar(m_renderView->frameView()->verticalScrollbar(), context, clip);
    15451545    else if (graphicsLayer == layerForScrollCorner()) {
    1546         const IntRect& scrollCorner = m_renderView->frameView()->scrollCornerRect();
     1546        const LayoutRect& scrollCorner = m_renderView->frameView()->scrollCornerRect();
    15471547        context.save();
    15481548        context.translate(-scrollCorner.x(), -scrollCorner.y());
    1549         IntRect transformedClip = clip;
     1549        LayoutRect transformedClip = clip;
    15501550        transformedClip.moveBy(scrollCorner.location());
    15511551        m_renderView->frameView()->paintScrollCorner(&context, transformedClip);
     
    17381738        m_layerForHorizontalScrollbar = nullptr;
    17391739        if (Scrollbar* horizontalScrollbar = m_renderView->frameView()->verticalScrollbar())
    1740             m_renderView->frameView()->invalidateScrollbar(horizontalScrollbar, IntRect(IntPoint(0, 0), horizontalScrollbar->frameRect().size()));
     1740            m_renderView->frameView()->invalidateScrollbar(horizontalScrollbar, LayoutRect(LayoutPoint(0, 0), horizontalScrollbar->frameRect().size()));
    17411741    }
    17421742
     
    17451745        m_layerForVerticalScrollbar = nullptr;
    17461746        if (Scrollbar* verticalScrollbar = m_renderView->frameView()->verticalScrollbar())
    1747             m_renderView->frameView()->invalidateScrollbar(verticalScrollbar, IntRect(IntPoint(0, 0), verticalScrollbar->frameRect().size()));
     1747            m_renderView->frameView()->invalidateScrollbar(verticalScrollbar, LayoutRect(LayoutPoint(0, 0), verticalScrollbar->frameRect().size()));
    17481748    }
    17491749
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.h

    r93040 r93429  
    120120    // Return the bounding box required for compositing layer and its childern, relative to ancestorLayer.
    121121    // If layerBoundingBox is not 0, on return it contains the bounding box of this layer only.
    122     IntRect calculateCompositedBounds(const RenderLayer* layer, const RenderLayer* ancestorLayer);
     122    LayoutRect calculateCompositedBounds(const RenderLayer*, const RenderLayer* ancestorLayer);
    123123
    124124    // Repaint the appropriate layers when the given RenderLayer starts or stops being composited.
     
    133133
    134134    // Repaint parts of all composited layers that intersect the given absolute rectangle.
    135     void repaintCompositedLayersAbsoluteRect(const IntRect&);
     135    void repaintCompositedLayersAbsoluteRect(const LayoutRect&);
    136136
    137137    RenderLayer* rootRenderLayer() const;
     
    176176
    177177    // Update the geometry of the layers used for clipping and scrolling in frames.
    178     void frameViewDidChangeLocation(const IntPoint& contentsOffset);
     178    void frameViewDidChangeLocation(const LayoutPoint& contentsOffset);
    179179    void frameViewDidChangeSize();
    180     void frameViewDidScroll(const IntPoint& = IntPoint());
     180    void frameViewDidScroll(const LayoutPoint& = LayoutPoint());
    181181
    182182    String layerTreeAsText(bool showDebugInfo = false);
     
    203203    virtual void notifyAnimationStarted(const GraphicsLayer*, double) { }
    204204    virtual void notifySyncRequired(const GraphicsLayer*) { scheduleLayerFlush(); }
    205     virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect&);
     205    virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const LayoutRect&);
    206206
    207207    // These calls return false always. They are saying that the layers associated with this client
     
    223223
    224224    // Repaint the given rect (which is layer's coords), and regions of child layers that intersect that rect.
    225     void recursiveRepaintLayerRect(RenderLayer* layer, const IntRect& rect);
    226 
    227     typedef HashMap<RenderLayer*, IntRect> OverlapMap;
    228     void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool& boundsComputed);
     225    void recursiveRepaintLayerRect(RenderLayer*, const LayoutRect&);
     226
     227    typedef HashMap<RenderLayer*, LayoutRect> OverlapMap;
     228    void addToOverlapMap(OverlapMap&, RenderLayer*, LayoutRect& layerBounds, bool& boundsComputed);
    229229    void addToOverlapMapRecursive(OverlapMap&, RenderLayer*);
    230     static bool overlapsCompositedLayers(OverlapMap&, const IntRect& layerBounds);
     230    static bool overlapsCompositedLayers(OverlapMap&, const LayoutRect& layerBounds);
    231231
    232232    void updateCompositingLayersTimerFired(Timer<RenderLayerCompositor>*);
Note: See TracChangeset for help on using the changeset viewer.