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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
586 updatePaintingPhases(); | 586 updatePaintingPhases(); |
587 | 587 |
588 updateElementIdAndCompositorMutableProperties(); | 588 updateElementIdAndCompositorMutableProperties(); |
589 | 589 |
590 m_graphicsLayer->setHasWillChangeTransformHint(style.hasWillChangeTransformH int()); | 590 m_graphicsLayer->setHasWillChangeTransformHint(style.hasWillChangeTransformH int()); |
591 | 591 |
592 m_owningLayer.update3DTransformedDescendantStatus(); | 592 m_owningLayer.update3DTransformedDescendantStatus(); |
593 if (style.preserves3D() && style.hasOpacity() && m_owningLayer.has3DTransfor medDescendant()) | 593 if (style.preserves3D() && style.hasOpacity() && m_owningLayer.has3DTransfor medDescendant()) |
594 UseCounter::count(layoutObject->document(), UseCounter::OpacityWithPrese rve3DQuirk); | 594 UseCounter::count(layoutObject->document(), UseCounter::OpacityWithPrese rve3DQuirk); |
595 | 595 |
596 setClippingOnRootScrollerAncestors(); | |
597 | |
596 return layerConfigChanged; | 598 return layerConfigChanged; |
597 } | 599 } |
598 | 600 |
601 void CompositedLayerMapping::setClippingOnRootScrollerAncestors() | |
602 { | |
603 bool shouldClip = !m_owningLayer.hasRootScrollerAsDescendant(); | |
604 if (m_scrollingLayer) | |
chrishtr
2016/09/01 23:42:56
Could you try moving these to the sites where we c
bokan
2016/09/09 00:19:02
Moved the m_scrollingLayer->setMasksBounds to happ
| |
605 m_scrollingLayer->setMasksToBounds(shouldClip); | |
606 if (m_ancestorClippingLayer) | |
chrishtr
2016/09/01 23:42:56
Why have the m_ancestorClippingLayer layer at all
bokan
2016/09/09 00:19:02
Good point, I've moved these to the arguments that
| |
607 m_ancestorClippingLayer->setMasksToBounds(shouldClip); | |
608 if (m_childContainmentLayer) | |
chrishtr
2016/09/01 23:42:56
ditto
bokan
2016/09/09 00:19:02
Done.
| |
609 m_childContainmentLayer->setMasksToBounds(shouldClip); | |
610 } | |
611 | |
599 static IntRect clipBox(LayoutBox* layoutObject) | 612 static IntRect clipBox(LayoutBox* layoutObject) |
600 { | 613 { |
601 // TODO(chrishtr): pixel snapping is most likely incorrect here. | 614 // TODO(chrishtr): pixel snapping is most likely incorrect here. |
602 return pixelSnappedIntRect(layoutObject->clippingRect()); | 615 return pixelSnappedIntRect(layoutObject->clippingRect()); |
603 } | 616 } |
604 | 617 |
605 static LayoutPoint computeOffsetFromCompositedAncestor(const PaintLayer* layer, const PaintLayer* compositedAncestor) | 618 static LayoutPoint computeOffsetFromCompositedAncestor(const PaintLayer* layer, const PaintLayer* compositedAncestor) |
606 { | 619 { |
607 LayoutPoint offset = layer->visualOffsetFromAncestor(compositedAncestor); | 620 LayoutPoint offset = layer->visualOffsetFromAncestor(compositedAncestor); |
608 if (compositedAncestor) | 621 if (compositedAncestor) |
(...skipping 2094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2703 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2716 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2704 name = "Scrolling Contents Layer"; | 2717 name = "Scrolling Contents Layer"; |
2705 } else { | 2718 } else { |
2706 ASSERT_NOT_REACHED(); | 2719 ASSERT_NOT_REACHED(); |
2707 } | 2720 } |
2708 | 2721 |
2709 return name; | 2722 return name; |
2710 } | 2723 } |
2711 | 2724 |
2712 } // namespace blink | 2725 } // namespace blink |
OLD | NEW |