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

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

Issue 2859483006: cc: Enable composited border-radius scrolling.
Patch Set: test-rebaseline Created 3 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
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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 if (context.ShouldRespectRootLayerClip()) { 493 if (context.ShouldRespectRootLayerClip()) {
494 const auto* ancestor_css_clip = ancestor_properties->CssClip(); 494 const auto* ancestor_css_clip = ancestor_properties->CssClip();
495 if (ancestor_css_clip) { 495 if (ancestor_css_clip) {
496 DCHECK_EQ(destination_property_tree_state.Clip(), 496 DCHECK_EQ(destination_property_tree_state.Clip(),
497 ancestor_css_clip); 497 ancestor_css_clip);
498 destination_property_tree_state.SetClip(ancestor_css_clip->Parent()); 498 destination_property_tree_state.SetClip(ancestor_css_clip->Parent());
499 } 499 }
500 } else { 500 } else {
501 const auto* ancestor_overflow_clip = ancestor_properties->OverflowClip(); 501 const auto* ancestor_overflow_clip = ancestor_properties->OverflowClip();
502 if (ancestor_overflow_clip) { 502 if (ancestor_overflow_clip) {
503 DCHECK_EQ(destination_property_tree_state.Clip(), 503 if (const auto* ancestor_rounded_clip =
chrishtr 2017/06/21 15:26:56 Put #ifdef DCHECK_IS_ON around these conditionals.
504 ancestor_overflow_clip->Parent()); 504 ancestor_properties->InnerBorderRadiusClip()) {
505 DCHECK_EQ(destination_property_tree_state.Clip(),
506 ancestor_rounded_clip->Parent());
507 DCHECK_EQ(ancestor_rounded_clip, ancestor_overflow_clip->Parent());
508 } else {
509 DCHECK_EQ(destination_property_tree_state.Clip(),
510 ancestor_overflow_clip->Parent());
511 }
505 destination_property_tree_state.SetClip(ancestor_overflow_clip); 512 destination_property_tree_state.SetClip(ancestor_overflow_clip);
506 } 513 }
507 } 514 }
508 } 515 }
509 516
510 LayoutRect PaintLayerClipper::LocalVisualRect() const { 517 LayoutRect PaintLayerClipper::LocalVisualRect() const {
511 const LayoutObject& layout_object = layer_.GetLayoutObject(); 518 const LayoutObject& layout_object = layer_.GetLayoutObject();
512 // The LayoutView is special since its overflow clipping rect may be larger 519 // The LayoutView is special since its overflow clipping rect may be larger
513 // than its box rect (crbug.com/492871). 520 // than its box rect (crbug.com/492871).
514 LayoutRect layer_bounds_with_visual_overflow = 521 LayoutRect layer_bounds_with_visual_overflow =
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 DCHECK(!use_geometry_mapper_); 595 DCHECK(!use_geometry_mapper_);
589 ClipRectsContext context(root_layer, kPaintingClipRects, 596 ClipRectsContext context(root_layer, kPaintingClipRects,
590 kIgnorePlatformOverlayScrollbarSize, 597 kIgnorePlatformOverlayScrollbarSize,
591 subpixel_accumulation); 598 subpixel_accumulation);
592 if (respect_overflow_clip == kIgnoreOverflowClip) 599 if (respect_overflow_clip == kIgnoreOverflowClip)
593 context.SetIgnoreOverflowClip(); 600 context.SetIgnoreOverflowClip();
594 return GetClipRects(context); 601 return GetClipRects(context);
595 } 602 }
596 603
597 } // namespace blink 604 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698