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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 // but the reflected layer is the bounds of this layer, so we need to po
sition it appropriately. | 791 // but the reflected layer is the bounds of this layer, so we need to po
sition it appropriately. |
792 FloatRect layerBounds = compositedBounds(); | 792 FloatRect layerBounds = compositedBounds(); |
793 FloatRect reflectionLayerBounds = reflectionCompositedLayerMapping->comp
ositedBounds(); | 793 FloatRect reflectionLayerBounds = reflectionCompositedLayerMapping->comp
ositedBounds(); |
794 reflectionCompositedLayerMapping->mainGraphicsLayer()->setReplicatedLaye
rPosition(FloatPoint(layerBounds.location() - reflectionLayerBounds.location()))
; | 794 reflectionCompositedLayerMapping->mainGraphicsLayer()->setReplicatedLaye
rPosition(FloatPoint(layerBounds.location() - reflectionLayerBounds.location()))
; |
795 } | 795 } |
796 | 796 |
797 if (m_scrollingLayer) { | 797 if (m_scrollingLayer) { |
798 ASSERT(m_scrollingContentsLayer); | 798 ASSERT(m_scrollingContentsLayer); |
799 RenderBox* renderBox = toRenderBox(renderer()); | 799 RenderBox* renderBox = toRenderBox(renderer()); |
800 IntRect clientBox = enclosingIntRect(renderBox->clientBoxRect()); | 800 IntRect clientBox = enclosingIntRect(renderBox->clientBoxRect()); |
801 // FIXME: We should make RenderBox::clientBoxRect consider scrollbar pla
cement. | |
802 if (style->shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) | |
803 clientBox.move(renderBox->verticalScrollbarWidth(), 0); | |
804 | 801 |
805 IntSize adjustedScrollOffset = m_owningLayer->scrollableArea()->adjusted
ScrollOffset(); | 802 IntSize adjustedScrollOffset = m_owningLayer->scrollableArea()->adjusted
ScrollOffset(); |
806 m_scrollingLayer->setPosition(FloatPoint(clientBox.location() - localCom
positingBounds.location() + roundedIntSize(m_subpixelAccumulation))); | 803 m_scrollingLayer->setPosition(FloatPoint(clientBox.location() - localCom
positingBounds.location() + roundedIntSize(m_subpixelAccumulation))); |
807 m_scrollingLayer->setSize(clientBox.size()); | 804 m_scrollingLayer->setSize(clientBox.size()); |
808 | 805 |
809 IntSize oldScrollingLayerOffset = m_scrollingLayer->offsetFromRenderer()
; | 806 IntSize oldScrollingLayerOffset = m_scrollingLayer->offsetFromRenderer()
; |
810 m_scrollingLayer->setOffsetFromRenderer(-toIntSize(clientBox.location())
); | 807 m_scrollingLayer->setOffsetFromRenderer(-toIntSize(clientBox.location())
); |
811 | 808 |
812 if (m_childClippingMaskLayer) { | 809 if (m_childClippingMaskLayer) { |
813 m_childClippingMaskLayer->setPosition(m_scrollingLayer->position()); | 810 m_childClippingMaskLayer->setPosition(m_scrollingLayer->position()); |
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2177 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2174 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2178 name = "Scrolling Contents Layer"; | 2175 name = "Scrolling Contents Layer"; |
2179 } else { | 2176 } else { |
2180 ASSERT_NOT_REACHED(); | 2177 ASSERT_NOT_REACHED(); |
2181 } | 2178 } |
2182 | 2179 |
2183 return name; | 2180 return name; |
2184 } | 2181 } |
2185 | 2182 |
2186 } // namespace WebCore | 2183 } // namespace WebCore |
OLD | NEW |