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

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: Revised method based on PaintLayer switching 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);
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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 const LayoutSize& subpixelAccumulation) const { 555 const LayoutSize& subpixelAccumulation) const {
555 DCHECK(!m_geometryMapper); 556 DCHECK(!m_geometryMapper);
556 ClipRectsContext context(rootLayer, PaintingClipRects, 557 ClipRectsContext context(rootLayer, PaintingClipRects,
557 IgnoreOverlayScrollbarSize, subpixelAccumulation); 558 IgnoreOverlayScrollbarSize, subpixelAccumulation);
558 if (respectOverflowClip == IgnoreOverflowClip) 559 if (respectOverflowClip == IgnoreOverflowClip)
559 context.setIgnoreOverflowClip(); 560 context.setIgnoreOverflowClip();
560 return getClipRects(context); 561 return getClipRects(context);
561 } 562 }
562 563
563 } // namespace blink 564 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698