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

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

Issue 9599025: Merge 109060 - RenderLayer ClipRect not accounting for transforms (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 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
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 3619 matching lines...) Expand 10 before | Expand all | Expand 10 after
3630 clipRects.setFixed(true); 3630 clipRects.setFixed(true);
3631 } 3631 }
3632 else if (renderer()->style()->position() == RelativePosition) 3632 else if (renderer()->style()->position() == RelativePosition)
3633 clipRects.setPosClipRect(clipRects.overflowClipRect()); 3633 clipRects.setPosClipRect(clipRects.overflowClipRect());
3634 else if (renderer()->style()->position() == AbsolutePosition) 3634 else if (renderer()->style()->position() == AbsolutePosition)
3635 clipRects.setOverflowClipRect(clipRects.posClipRect()); 3635 clipRects.setOverflowClipRect(clipRects.posClipRect());
3636 3636
3637 // Update the clip rects that will be passed to child layers. 3637 // Update the clip rects that will be passed to child layers.
3638 if (renderer()->hasOverflowClip() || renderer()->hasClip()) { 3638 if (renderer()->hasOverflowClip() || renderer()->hasClip()) {
3639 // This layer establishes a clip of some kind. 3639 // This layer establishes a clip of some kind.
3640
3641 // This offset cannot use convertToLayerCoords, because sometimes our ro otLayer may be across
3642 // some transformed layer boundary, for example, in the RenderLayerCompo sitor overlapMap, where
3643 // clipRects are needed in view space.
3640 LayoutPoint offset; 3644 LayoutPoint offset;
3641 convertToLayerCoords(rootLayer, offset); 3645 offset = roundedIntPoint(renderer()->localToContainerPoint(FloatPoint(), rootLayer->renderer()));
3642 RenderView* view = renderer()->view(); 3646 RenderView* view = renderer()->view();
3643 ASSERT(view); 3647 ASSERT(view);
3644 if (view && clipRects.fixed() && rootLayer->renderer() == view) { 3648 if (view && clipRects.fixed() && rootLayer->renderer() == view) {
3645 offset -= view->frameView()->scrollOffsetForFixedPosition(); 3649 offset -= view->frameView()->scrollOffsetForFixedPosition();
3646 } 3650 }
3647 3651
3648 if (renderer()->hasOverflowClip()) { 3652 if (renderer()->hasOverflowClip()) {
3649 ClipRect newOverflowClip = toRenderBox(renderer())->overflowClipRect (offset, region, relevancy); 3653 ClipRect newOverflowClip = toRenderBox(renderer())->overflowClipRect (offset, region, relevancy);
3650 if (renderer()->style()->hasBorderRadius()) 3654 if (renderer()->style()->hasBorderRadius())
3651 newOverflowClip.setHasRadius(true); 3655 newOverflowClip.setHasRadius(true);
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
4500 } 4504 }
4501 } 4505 }
4502 4506
4503 void showLayerTree(const WebCore::RenderObject* renderer) 4507 void showLayerTree(const WebCore::RenderObject* renderer)
4504 { 4508 {
4505 if (!renderer) 4509 if (!renderer)
4506 return; 4510 return;
4507 showLayerTree(renderer->enclosingLayer()); 4511 showLayerTree(renderer->enclosingLayer());
4508 } 4512 }
4509 #endif 4513 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698