| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 const PaintLayer* compositing_ancestor = | 576 const PaintLayer* compositing_ancestor = |
| 577 owning_layer_.EnclosingLayerWithCompositedLayerMapping(kExcludeSelf); | 577 owning_layer_.EnclosingLayerWithCompositedLayerMapping(kExcludeSelf); |
| 578 if (!compositing_ancestor) | 578 if (!compositing_ancestor) |
| 579 return; | 579 return; |
| 580 | 580 |
| 581 const LayoutBoxModelObject* clipping_container = | 581 const LayoutBoxModelObject* clipping_container = |
| 582 owning_layer_.ClippingContainer(); | 582 owning_layer_.ClippingContainer(); |
| 583 if (!clipping_container) | 583 if (!clipping_container) |
| 584 return; | 584 return; |
| 585 | 585 |
| 586 if (clipping_container->EnclosingLayer() == scroll_parent) | |
| 587 return; | |
| 588 | |
| 589 if (compositing_ancestor->GetLayoutObject().IsDescendantOf( | 586 if (compositing_ancestor->GetLayoutObject().IsDescendantOf( |
| 590 clipping_container)) | 587 clipping_container)) |
| 591 return; | 588 return; |
| 592 | 589 |
| 593 // We ignore overflow clip here; we want composited overflow content to | 590 // We ignore overflow clip here; we want composited overflow content to |
| 594 // behave as if it lives in an unclipped universe so it can prepaint, etc. | 591 // behave as if it lives in an unclipped universe so it can prepaint, etc. |
| 595 // This means that we need to check if we are actually clipped before | 592 // This means that we need to check if we are actually clipped before |
| 596 // setting up m_ancestorClippingLayer otherwise | 593 // setting up m_ancestorClippingLayer otherwise |
| 597 // updateAncestorClippingLayerGeometry will fail as the clip rect will be | 594 // updateAncestorClippingLayerGeometry will fail as the clip rect will be |
| 598 // infinite. | 595 // infinite. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 609 owning_layer_is_clipped = parent_clip_rect != LayoutRect::InfiniteIntRect(); | 606 owning_layer_is_clipped = parent_clip_rect != LayoutRect::InfiniteIntRect(); |
| 610 | 607 |
| 611 // TODO(schenney): CSS clips are not applied to composited children, and | 608 // TODO(schenney): CSS clips are not applied to composited children, and |
| 612 // should be via mask or by compositing the parent too. | 609 // should be via mask or by compositing the parent too. |
| 613 // https://bugs.chromium.org/p/chromium/issues/detail?id=615870 | 610 // https://bugs.chromium.org/p/chromium/issues/detail?id=615870 |
| 614 DCHECK(clipping_container->Style()); | 611 DCHECK(clipping_container->Style()); |
| 615 owning_layer_is_masked = | 612 owning_layer_is_masked = |
| 616 owning_layer_is_clipped && | 613 owning_layer_is_clipped && |
| 617 clipping_container->Style()->HasBorderRadius() && | 614 clipping_container->Style()->HasBorderRadius() && |
| 618 !AncestorRoundedCornersWontClip(GetLayoutObject(), *clipping_container); | 615 !AncestorRoundedCornersWontClip(GetLayoutObject(), *clipping_container); |
| 616 |
| 617 if (clipping_container->EnclosingLayer() == scroll_parent) |
| 618 owning_layer_is_clipped = owning_layer_is_masked; |
| 619 } | 619 } |
| 620 | 620 |
| 621 const PaintLayer* CompositedLayerMapping::ScrollParent() { | 621 const PaintLayer* CompositedLayerMapping::ScrollParent() { |
| 622 const PaintLayer* scroll_parent = owning_layer_.ScrollParent(); | 622 const PaintLayer* scroll_parent = owning_layer_.ScrollParent(); |
| 623 if (scroll_parent && !scroll_parent->NeedsCompositedScrolling()) | 623 if (scroll_parent && !scroll_parent->NeedsCompositedScrolling()) |
| 624 return nullptr; | 624 return nullptr; |
| 625 return scroll_parent; | 625 return scroll_parent; |
| 626 } | 626 } |
| 627 | 627 |
| 628 bool CompositedLayerMapping::UpdateGraphicsLayerConfiguration() { | 628 bool CompositedLayerMapping::UpdateGraphicsLayerConfiguration() { |
| (...skipping 2996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3625 } else if (graphics_layer == decoration_outline_layer_.get()) { | 3625 } else if (graphics_layer == decoration_outline_layer_.get()) { |
| 3626 name = "Decoration Layer"; | 3626 name = "Decoration Layer"; |
| 3627 } else { | 3627 } else { |
| 3628 NOTREACHED(); | 3628 NOTREACHED(); |
| 3629 } | 3629 } |
| 3630 | 3630 |
| 3631 return name; | 3631 return name; |
| 3632 } | 3632 } |
| 3633 | 3633 |
| 3634 } // namespace blink | 3634 } // namespace blink |
| OLD | NEW |