| OLD | NEW |
| 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 DCHECK(m_geometryMapper); | 450 DCHECK(m_geometryMapper); |
| 451 const auto* properties = m_layer.layoutObject().paintProperties(); | 451 const auto* properties = m_layer.layoutObject().paintProperties(); |
| 452 DCHECK(properties && properties->localBorderBoxProperties()); | 452 DCHECK(properties && properties->localBorderBoxProperties()); |
| 453 | 453 |
| 454 PropertyTreeState propertyTreeState = *properties->localBorderBoxProperties(); | 454 PropertyTreeState propertyTreeState = *properties->localBorderBoxProperties(); |
| 455 const auto* ancestorProperties = | 455 const auto* ancestorProperties = |
| 456 context.rootLayer->layoutObject().paintProperties(); | 456 context.rootLayer->layoutObject().paintProperties(); |
| 457 DCHECK(ancestorProperties && ancestorProperties->localBorderBoxProperties()); | 457 DCHECK(ancestorProperties && ancestorProperties->localBorderBoxProperties()); |
| 458 PropertyTreeState destinationPropertyTreeState = | 458 PropertyTreeState destinationPropertyTreeState = |
| 459 *ancestorProperties->localBorderBoxProperties(); | 459 *ancestorProperties->localBorderBoxProperties(); |
| 460 // CSS clip of the root is always applied. |
| 461 if (ancestorProperties->cssClip()) { |
| 462 DCHECK(destinationPropertyTreeState.clip() == |
| 463 ancestorProperties->cssClip()); |
| 464 destinationPropertyTreeState.setClip( |
| 465 ancestorProperties->cssClip()->parent()); |
| 466 } |
| 460 | 467 |
| 461 if (&m_layer == context.rootLayer) { | 468 if (&m_layer == context.rootLayer) { |
| 462 // Set the overflow clip for |propertyTreeState| so that it differs from | 469 // Set the overflow clip for |propertyTreeState| so that it differs from |
| 463 // |destinationPropertyTreeState| in its clip. | 470 // |destinationPropertyTreeState| in its clip. |
| 464 if (isForeground && context.respectOverflowClip == RespectOverflowClip && | 471 if (isForeground && context.respectOverflowClip == RespectOverflowClip && |
| 465 properties->overflowClip()) | 472 properties->overflowClip()) |
| 466 propertyTreeState.setClip(properties->overflowClip()); | 473 propertyTreeState.setClip(properties->overflowClip()); |
| 467 } else { | 474 } else { |
| 468 // Set the clip of |destinationPropertyTreeState| to be inside the | 475 // Set the clip of |destinationPropertyTreeState| to be inside the |
| 469 // ancestor's overflow clip, so that that clip is not applied. | 476 // ancestor's overflow clip, so that that clip is not applied. |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 DCHECK(!m_geometryMapper); | 596 DCHECK(!m_geometryMapper); |
| 590 ClipRectsContext context(rootLayer, PaintingClipRects, | 597 ClipRectsContext context(rootLayer, PaintingClipRects, |
| 591 IgnorePlatformOverlayScrollbarSize, | 598 IgnorePlatformOverlayScrollbarSize, |
| 592 subpixelAccumulation); | 599 subpixelAccumulation); |
| 593 if (respectOverflowClip == IgnoreOverflowClip) | 600 if (respectOverflowClip == IgnoreOverflowClip) |
| 594 context.setIgnoreOverflowClip(); | 601 context.setIgnoreOverflowClip(); |
| 595 return getClipRects(context); | 602 return getClipRects(context); |
| 596 } | 603 } |
| 597 | 604 |
| 598 } // namespace blink | 605 } // namespace blink |
| OLD | NEW |