Changeset 73972 in webkit


Ignore:
Timestamp:
Dec 13, 2010 3:05:25 PM (13 years ago)
Author:
hyatt@apple.com
Message:

https://bugs.webkit.org/show_bug.cgi?id=50963

Reviewed by Sam Weinig.

REGRESSION: Scrolling nested iframes is messed up on platforms that use the cross-platform ScrollView.

The selfClipRect and childrenClipRect methods of RenderLayer were incorrectly relying on the bounding box
of the root layer. This bounding box was only coincidentally incorporating overflow as part of the
RenderLayer's bounds. Since I fixed the RenderLayer bounds to not include layout overflow any longer,
this check is now exposed as incorrect. Use the entire document size when computing layer clip
rects.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::childrenClipRect):
(WebCore::RenderLayer::selfClipRect):

  • rendering/RenderView.h:

(WebCore::RenderView::documentRect):

Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r73964 r73972  
     12010-12-13  David Hyatt  <hyatt@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=50963
     6
     7        REGRESSION: Scrolling nested iframes is messed up on platforms that use the cross-platform ScrollView.
     8       
     9        The selfClipRect and childrenClipRect methods of RenderLayer were incorrectly relying on the bounding box
     10        of the root layer.  This bounding box was only coincidentally incorporating overflow as part of the
     11        RenderLayer's bounds.  Since I fixed the RenderLayer bounds to not include layout overflow any longer,
     12        this check is now exposed as incorrect.  Use the entire document size  when computing layer clip
     13        rects.
     14
     15        * rendering/RenderLayer.cpp:
     16        (WebCore::RenderLayer::childrenClipRect):
     17        (WebCore::RenderLayer::selfClipRect):
     18        * rendering/RenderView.h:
     19        (WebCore::RenderView::documentRect):
     20
    1212010-12-13  Simon Fraser  <simon.fraser@apple.com>
    222
  • trunk/WebCore/rendering/RenderLayer.cpp

    r73941 r73972  
    33033303IntRect RenderLayer::childrenClipRect() const
    33043304{
    3305     RenderLayer* rootLayer = renderer()->view()->layer();
     3305    RenderView* renderView = renderer()->view();
    33063306    RenderLayer* clippingRootLayer = clippingRoot();
    33073307    IntRect layerBounds, backgroundRect, foregroundRect, outlineRect;
    3308     calculateRects(clippingRootLayer, rootLayer->boundingBox(rootLayer), layerBounds, backgroundRect, foregroundRect, outlineRect);
     3308    calculateRects(clippingRootLayer, renderView->documentRect(), layerBounds, backgroundRect, foregroundRect, outlineRect);
    33093309    return clippingRootLayer->renderer()->localToAbsoluteQuad(FloatQuad(foregroundRect)).enclosingBoundingBox();
    33103310}
     
    33123312IntRect RenderLayer::selfClipRect() const
    33133313{
    3314     RenderLayer* rootLayer = renderer()->view()->layer();
     3314    RenderView* renderView = renderer()->view();
    33153315    RenderLayer* clippingRootLayer = clippingRoot();
    33163316    IntRect layerBounds, backgroundRect, foregroundRect, outlineRect;
    3317     calculateRects(clippingRootLayer, rootLayer->boundingBox(rootLayer), layerBounds, backgroundRect, foregroundRect, outlineRect);
     3317    calculateRects(clippingRootLayer, renderView->documentRect(), layerBounds, backgroundRect, foregroundRect, outlineRect);
    33183318    return clippingRootLayer->renderer()->localToAbsoluteQuad(FloatQuad(backgroundRect)).enclosingBoundingBox();
    33193319}
  • trunk/WebCore/rendering/RenderView.h

    r73385 r73972  
    173173    int docRight() const;
    174174    int docWidth() const { return docRight() - docLeft(); }
     175    IntRect documentRect() const { return IntRect(docLeft(), docTop(), docWidth(), docHeight()); }
    175176
    176177protected:
Note: See TracChangeset for help on using the changeset viewer.