| 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 // Compute the anchor point, which is in the center of the renderer box
unless transform-origin is set. | 746 // Compute the anchor point, which is in the center of the renderer box
unless transform-origin is set. |
| 747 FloatPoint3D anchor( | 747 FloatPoint3D anchor( |
| 748 relativeCompositingBounds.width() ? (layerBounds.x() - relativeCompo
sitingBounds.x() + transformOrigin.x()) / relativeCompositingBounds.width() : 0
.5f, | 748 relativeCompositingBounds.width() ? (layerBounds.x() - relativeCompo
sitingBounds.x() + transformOrigin.x()) / relativeCompositingBounds.width() : 0
.5f, |
| 749 relativeCompositingBounds.height() ? (layerBounds.y() - relativeComp
ositingBounds.y() + transformOrigin.y()) / relativeCompositingBounds.height() :
0.5f, | 749 relativeCompositingBounds.height() ? (layerBounds.y() - relativeComp
ositingBounds.y() + transformOrigin.y()) / relativeCompositingBounds.height() :
0.5f, |
| 750 transformOrigin.z()); | 750 transformOrigin.z()); |
| 751 m_graphicsLayer->setAnchorPoint(anchor); | 751 m_graphicsLayer->setAnchorPoint(anchor); |
| 752 } else { | 752 } else { |
| 753 m_graphicsLayer->setAnchorPoint(FloatPoint3D(0.5f, 0.5f, 0)); | 753 m_graphicsLayer->setAnchorPoint(FloatPoint3D(0.5f, 0.5f, 0)); |
| 754 } | 754 } |
| 755 | 755 |
| 756 if (GraphicsLayer* childrenTransformLayer = layerForChildrenTransform()) |
| 757 childrenTransformLayer->setAnchorPoint(m_graphicsLayer->anchorPoint()); |
| 758 |
| 756 if (m_foregroundLayer) { | 759 if (m_foregroundLayer) { |
| 757 FloatSize foregroundSize = contentsSize; | 760 FloatSize foregroundSize = contentsSize; |
| 758 IntSize foregroundOffset = m_graphicsLayer->offsetFromRenderer(); | 761 IntSize foregroundOffset = m_graphicsLayer->offsetFromRenderer(); |
| 759 if (hasClippingLayer()) { | 762 if (hasClippingLayer()) { |
| 760 // If we have a clipping layer (which clips descendants), then the f
oreground layer is a child of it, | 763 // If we have a clipping layer (which clips descendants), then the f
oreground layer is a child of it, |
| 761 // so that it gets correctly sorted with children. In that case, pos
ition relative to the clipping layer. | 764 // so that it gets correctly sorted with children. In that case, pos
ition relative to the clipping layer. |
| 762 foregroundSize = FloatSize(clippingBox.size()); | 765 foregroundSize = FloatSize(clippingBox.size()); |
| 763 foregroundOffset = toIntSize(clippingBox.location()); | 766 foregroundOffset = toIntSize(clippingBox.location()); |
| 764 } | 767 } |
| 765 | 768 |
| (...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2115 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2118 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2116 name = "Scrolling Contents Layer"; | 2119 name = "Scrolling Contents Layer"; |
| 2117 } else { | 2120 } else { |
| 2118 ASSERT_NOT_REACHED(); | 2121 ASSERT_NOT_REACHED(); |
| 2119 } | 2122 } |
| 2120 | 2123 |
| 2121 return name; | 2124 return name; |
| 2122 } | 2125 } |
| 2123 | 2126 |
| 2124 } // namespace WebCore | 2127 } // namespace WebCore |
| OLD | NEW |