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

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

Issue 17155024: CSS clip property should not force additional clamping to border box (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed linux/win rebaselines Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/platform/chromium-win/fast/repaint/layer-outline-horizontal-expected.txt ('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, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
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 5011 matching lines...) Expand 10 before | Expand all | Expand 10 after
5022 // rect is intersected with our layer's bounds including our visual over flow, 5022 // rect is intersected with our layer's bounds including our visual over flow,
5023 // since any visual overflow like box-shadow or border-outset is not cli pped by overflow:auto/hidden. 5023 // since any visual overflow like box-shadow or border-outset is not cli pped by overflow:auto/hidden.
5024 if (renderBox()->hasVisualOverflow()) { 5024 if (renderBox()->hasVisualOverflow()) {
5025 // FIXME: Does not do the right thing with CSS regions yet, since we don't yet factor in the 5025 // FIXME: Does not do the right thing with CSS regions yet, since we don't yet factor in the
5026 // individual region boxes as overflow. 5026 // individual region boxes as overflow.
5027 LayoutRect layerBoundsWithVisualOverflow = renderBox()->visualOverfl owRect(); 5027 LayoutRect layerBoundsWithVisualOverflow = renderBox()->visualOverfl owRect();
5028 renderBox()->flipForWritingMode(layerBoundsWithVisualOverflow); // L ayers are in physical coordinates, so the overflow has to be flipped. 5028 renderBox()->flipForWritingMode(layerBoundsWithVisualOverflow); // L ayers are in physical coordinates, so the overflow has to be flipped.
5029 layerBoundsWithVisualOverflow.moveBy(offset); 5029 layerBoundsWithVisualOverflow.moveBy(offset);
5030 if (this != clipRectsContext.rootLayer || clipRectsContext.respectOv erflowClip == RespectOverflowClip) 5030 if (this != clipRectsContext.rootLayer || clipRectsContext.respectOv erflowClip == RespectOverflowClip)
5031 backgroundRect.intersect(layerBoundsWithVisualOverflow); 5031 backgroundRect.intersect(layerBoundsWithVisualOverflow);
5032 } else { 5032 } else if (renderer()->hasOverflowClip()) {
5033 // Shift the bounds to be for our region only. 5033 // Shift the bounds to be for our region only.
5034 LayoutRect bounds = renderBox()->borderBoxRectInRegion(clipRectsCont ext.region); 5034 LayoutRect bounds = renderBox()->borderBoxRectInRegion(clipRectsCont ext.region);
5035 bounds.moveBy(offset); 5035 bounds.moveBy(offset);
5036 if (this != clipRectsContext.rootLayer || clipRectsContext.respectOv erflowClip == RespectOverflowClip) 5036 if (this != clipRectsContext.rootLayer || clipRectsContext.respectOv erflowClip == RespectOverflowClip)
5037 backgroundRect.intersect(bounds); 5037 backgroundRect.intersect(bounds);
5038 } 5038 }
5039 } 5039 }
5040 } 5040 }
5041 5041
5042 LayoutRect RenderLayer::childrenClipRect() const 5042 LayoutRect RenderLayer::childrenClipRect() const
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after
6397 } 6397 }
6398 } 6398 }
6399 6399
6400 void showLayerTree(const WebCore::RenderObject* renderer) 6400 void showLayerTree(const WebCore::RenderObject* renderer)
6401 { 6401 {
6402 if (!renderer) 6402 if (!renderer)
6403 return; 6403 return;
6404 showLayerTree(renderer->enclosingLayer()); 6404 showLayerTree(renderer->enclosingLayer());
6405 } 6405 }
6406 #endif 6406 #endif
OLDNEW
« no previous file with comments | « LayoutTests/platform/chromium-win/fast/repaint/layer-outline-horizontal-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698