| 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 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 } | 842 } |
| 843 } | 843 } |
| 844 | 844 |
| 845 void CompositedLayerMapping::updateReflectionLayerGeometry() | 845 void CompositedLayerMapping::updateReflectionLayerGeometry() |
| 846 { | 846 { |
| 847 if (!m_owningLayer.reflectionInfo() || !m_owningLayer.reflectionInfo()->refl
ectionLayer()->hasCompositedLayerMapping()) | 847 if (!m_owningLayer.reflectionInfo() || !m_owningLayer.reflectionInfo()->refl
ectionLayer()->hasCompositedLayerMapping()) |
| 848 return; | 848 return; |
| 849 | 849 |
| 850 CompositedLayerMappingPtr reflectionCompositedLayerMapping = m_owningLayer.r
eflectionInfo()->reflectionLayer()->compositedLayerMapping(); | 850 CompositedLayerMappingPtr reflectionCompositedLayerMapping = m_owningLayer.r
eflectionInfo()->reflectionLayer()->compositedLayerMapping(); |
| 851 reflectionCompositedLayerMapping->updateGraphicsLayerGeometry(GraphicsLayerU
pdater::ForceUpdate, &m_owningLayer); | 851 reflectionCompositedLayerMapping->updateGraphicsLayerGeometry(GraphicsLayerU
pdater::ForceUpdate, &m_owningLayer); |
| 852 | |
| 853 // The reflection layer has the bounds of m_owningLayer.reflectionLayer(), | |
| 854 // but the reflected layer is the bounds of this layer, so we need to positi
on it appropriately. | |
| 855 FloatRect layerBounds = compositedBounds(); | |
| 856 FloatRect reflectionLayerBounds = reflectionCompositedLayerMapping->composit
edBounds(); | |
| 857 reflectionCompositedLayerMapping->mainGraphicsLayer()->setReplicatedLayerPos
ition(FloatPoint(layerBounds.location() - reflectionLayerBounds.location())); | |
| 858 } | 852 } |
| 859 | 853 |
| 860 void CompositedLayerMapping::updateScrollingLayerGeometry(const IntRect& localCo
mpositingBounds) | 854 void CompositedLayerMapping::updateScrollingLayerGeometry(const IntRect& localCo
mpositingBounds) |
| 861 { | 855 { |
| 862 if (!m_scrollingLayer) | 856 if (!m_scrollingLayer) |
| 863 return; | 857 return; |
| 864 | 858 |
| 865 ASSERT(m_scrollingContentsLayer); | 859 ASSERT(m_scrollingContentsLayer); |
| 866 RenderBox* renderBox = toRenderBox(renderer()); | 860 RenderBox* renderBox = toRenderBox(renderer()); |
| 867 IntRect clientBox = enclosingIntRect(renderBox->clientBoxRect()); | 861 IntRect clientBox = enclosingIntRect(renderBox->clientBoxRect()); |
| (...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2252 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2246 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2253 name = "Scrolling Contents Layer"; | 2247 name = "Scrolling Contents Layer"; |
| 2254 } else { | 2248 } else { |
| 2255 ASSERT_NOT_REACHED(); | 2249 ASSERT_NOT_REACHED(); |
| 2256 } | 2250 } |
| 2257 | 2251 |
| 2258 return name; | 2252 return name; |
| 2259 } | 2253 } |
| 2260 | 2254 |
| 2261 } // namespace WebCore | 2255 } // namespace WebCore |
| OLD | NEW |