Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: Source/WebCore/rendering/RenderLayer.cpp

Issue 10392139: Merge 115471 - Infinite backgroundClipRect should not be scrolled. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderLayer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 3708 matching lines...) Expand 10 before | Expand all | Expand 10 after
3719 } 3719 }
3720 3720
3721 ClipRect RenderLayer::backgroundClipRect(const RenderLayer* rootLayer, RenderReg ion* region, bool temporaryClipRects, OverlayScrollbarSizeRelevancy relevancy) c onst 3721 ClipRect RenderLayer::backgroundClipRect(const RenderLayer* rootLayer, RenderReg ion* region, bool temporaryClipRects, OverlayScrollbarSizeRelevancy relevancy) c onst
3722 { 3722 {
3723 ASSERT(parent()); 3723 ASSERT(parent());
3724 ClipRects parentRects; 3724 ClipRects parentRects;
3725 parentClipRects(rootLayer, region, parentRects, temporaryClipRects, relevanc y); 3725 parentClipRects(rootLayer, region, parentRects, temporaryClipRects, relevanc y);
3726 ClipRect backgroundClipRect = backgroundClipRectForPosition(parentRects, ren derer()->style()->position()); 3726 ClipRect backgroundClipRect = backgroundClipRectForPosition(parentRects, ren derer()->style()->position());
3727 RenderView* view = renderer()->view(); 3727 RenderView* view = renderer()->view();
3728 ASSERT(view); 3728 ASSERT(view);
3729 if (parentRects.fixed() && rootLayer->renderer() == view) 3729
3730 // Note: infinite clipRects should not be scrolled here, otherwise they will accidentally no longer be considered infinite.
3731 if (parentRects.fixed() && rootLayer->renderer() == view && backgroundClipRe ct != PaintInfo::infiniteRect())
3730 backgroundClipRect.move(view->frameView()->scrollXForFixedPosition(), vi ew->frameView()->scrollYForFixedPosition()); 3732 backgroundClipRect.move(view->frameView()->scrollXForFixedPosition(), vi ew->frameView()->scrollYForFixedPosition());
3733
3731 return backgroundClipRect; 3734 return backgroundClipRect;
3732 } 3735 }
3733 3736
3734 void RenderLayer::calculateRects(const RenderLayer* rootLayer, RenderRegion* reg ion, const LayoutRect& paintDirtyRect, LayoutRect& layerBounds, 3737 void RenderLayer::calculateRects(const RenderLayer* rootLayer, RenderRegion* reg ion, const LayoutRect& paintDirtyRect, LayoutRect& layerBounds,
3735 ClipRect& backgroundRect, ClipRect& foregroundR ect, ClipRect& outlineRect, bool temporaryClipRects, 3738 ClipRect& backgroundRect, ClipRect& foregroundR ect, ClipRect& outlineRect, bool temporaryClipRects,
3736 OverlayScrollbarSizeRelevancy relevancy) const 3739 OverlayScrollbarSizeRelevancy relevancy) const
3737 { 3740 {
3738 if (rootLayer != this && parent()) { 3741 if (rootLayer != this && parent()) {
3739 backgroundRect = backgroundClipRect(rootLayer, region, temporaryClipRect s, relevancy); 3742 backgroundRect = backgroundClipRect(rootLayer, region, temporaryClipRect s, relevancy);
3740 backgroundRect.intersect(paintDirtyRect); 3743 backgroundRect.intersect(paintDirtyRect);
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
4560 } 4563 }
4561 } 4564 }
4562 4565
4563 void showLayerTree(const WebCore::RenderObject* renderer) 4566 void showLayerTree(const WebCore::RenderObject* renderer)
4564 { 4567 {
4565 if (!renderer) 4568 if (!renderer)
4566 return; 4569 return;
4567 showLayerTree(renderer->enclosingLayer()); 4570 showLayerTree(renderer->enclosingLayer());
4568 } 4571 }
4569 #endif 4572 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698