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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp

Issue 2194273002: Fix border radius on composited children. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch to using the layer's offsetFromLayoutObject Created 4 years 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, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 338
339 LayoutPoint offset; 339 LayoutPoint offset;
340 if (offsetFromRoot) 340 if (offsetFromRoot)
341 offset = *offsetFromRoot; 341 offset = *offsetFromRoot;
342 else 342 else
343 m_layer.convertToLayerCoords(context.rootLayer, offset); 343 m_layer.convertToLayerCoords(context.rootLayer, offset);
344 layerBounds = LayoutRect(offset, LayoutSize(m_layer.size())); 344 layerBounds = LayoutRect(offset, LayoutSize(m_layer.size()));
345 345
346 // Update the clip rects that will be passed to child layers. 346 // Update the clip rects that will be passed to child layers.
347 if (shouldClipOverflow(context)) { 347 if (shouldClipOverflow(context)) {
348 foregroundRect.intersect( 348 LayoutRect offsetOverflowClipRect =
349 toLayoutBox(layoutObject) 349 toLayoutBox(layoutObject)
350 .overflowClipRect(offset, context.overlayScrollbarClipBehavior)); 350 .overflowClipRect(offset, context.overlayScrollbarClipBehavior);
351 foregroundRect.intersect(offsetOverflowClipRect);
chrishtr 2016/12/02 19:21:47 Is this just increasing clarity?
Stephen Chennney 2016/12/07 21:39:38 It was for debugging output. I've reverted it.
351 if (layoutObject.styleRef().hasBorderRadius()) 352 if (layoutObject.styleRef().hasBorderRadius())
352 foregroundRect.setHasRadius(true); 353 foregroundRect.setHasRadius(true);
353 354
354 // FIXME: Does not do the right thing with columns yet, since we don't yet 355 // FIXME: Does not do the right thing with columns yet, since we don't yet
355 // factor in the individual column boxes as overflow. 356 // factor in the individual column boxes as overflow.
356 357
357 // The LayoutView is special since its overflow clipping rect may be larger 358 // The LayoutView is special since its overflow clipping rect may be larger
358 // than its box rect (crbug.com/492871). 359 // than its box rect (crbug.com/492871).
359 LayoutRect layerBoundsWithVisualOverflow = 360 LayoutRect layerBoundsWithVisualOverflow =
360 layoutObject.isLayoutView() 361 layoutObject.isLayoutView()
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 const LayoutSize& subpixelAccumulation) const { 553 const LayoutSize& subpixelAccumulation) const {
553 DCHECK(!m_geometryMapper); 554 DCHECK(!m_geometryMapper);
554 ClipRectsContext context(rootLayer, PaintingClipRects, 555 ClipRectsContext context(rootLayer, PaintingClipRects,
555 IgnoreOverlayScrollbarSize, subpixelAccumulation); 556 IgnoreOverlayScrollbarSize, subpixelAccumulation);
556 if (respectOverflowClip == IgnoreOverflowClip) 557 if (respectOverflowClip == IgnoreOverflowClip)
557 context.setIgnoreOverflowClip(); 558 context.setIgnoreOverflowClip();
558 return getClipRects(context); 559 return getClipRects(context);
559 } 560 }
560 561
561 } // namespace blink 562 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698