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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
651 compositingContainerOffsetFromTransformedAncestor = compositingContainer ->computeOffsetFromTransformedAncestor(); | 651 compositingContainerOffsetFromTransformedAncestor = compositingContainer ->computeOffsetFromTransformedAncestor(); |
652 | 652 |
653 LayoutRect totalSquashBounds; | 653 LayoutRect totalSquashBounds; |
654 for (size_t i = 0; i < layers.size(); ++i) { | 654 for (size_t i = 0; i < layers.size(); ++i) { |
655 LayoutRect squashedBounds = layers[i].paintLayer->boundingBoxForComposit ing(); | 655 LayoutRect squashedBounds = layers[i].paintLayer->boundingBoxForComposit ing(); |
656 | 656 |
657 // Store the local bounds of the Layer subtree before applying the offse t. | 657 // Store the local bounds of the Layer subtree before applying the offse t. |
658 layers[i].compositedBounds = squashedBounds; | 658 layers[i].compositedBounds = squashedBounds; |
659 | 659 |
660 #if DCHECK_IS_ON() | 660 #if DCHECK_IS_ON() |
661 DCHECK(layers[i].paintLayer->transformAncestor() == commonTransformAnces tor); | 661 // DCHECK(layers[i].paintLayer->transformAncestor() == commonTransformAnc estor); |
Greg Levin
2016/08/31 16:52:06
I don't intend to change this code. I'm just maki
| |
662 #endif | 662 #endif |
663 LayoutPoint squashedLayerOffsetFromTransformedAncestor = layers[i].paint Layer->computeOffsetFromTransformedAncestor(); | 663 LayoutPoint squashedLayerOffsetFromTransformedAncestor = layers[i].paint Layer->computeOffsetFromTransformedAncestor(); |
664 LayoutSize squashedLayerOffsetFromCompositingContainer = squashedLayerOf fsetFromTransformedAncestor - compositingContainerOffsetFromTransformedAncestor; | 664 LayoutSize squashedLayerOffsetFromCompositingContainer = squashedLayerOf fsetFromTransformedAncestor - compositingContainerOffsetFromTransformedAncestor; |
665 | 665 |
666 squashedBounds.move(squashedLayerOffsetFromCompositingContainer); | 666 squashedBounds.move(squashedLayerOffsetFromCompositingContainer); |
667 totalSquashBounds.unite(squashedBounds); | 667 totalSquashBounds.unite(squashedBounds); |
668 } | 668 } |
669 | 669 |
670 // The totalSquashBounds is positioned with respect to compositingContainer. | 670 // The totalSquashBounds is positioned with respect to compositingContainer. |
671 // But the squashingLayer needs to be positioned with respect to the graphic sLayerParent. | 671 // But the squashingLayer needs to be positioned with respect to the graphic sLayerParent. |
(...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2703 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2703 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2704 name = "Scrolling Contents Layer"; | 2704 name = "Scrolling Contents Layer"; |
2705 } else { | 2705 } else { |
2706 ASSERT_NOT_REACHED(); | 2706 ASSERT_NOT_REACHED(); |
2707 } | 2707 } |
2708 | 2708 |
2709 return name; | 2709 return name; |
2710 } | 2710 } |
2711 | 2711 |
2712 } // namespace blink | 2712 } // namespace blink |
OLD | NEW |