| 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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 scrollOrigin.move(-layoutBox->borderLeft(), -layoutBox->borderTop()); | 796 scrollOrigin.move(-layoutBox->borderLeft(), -layoutBox->borderTop()); |
| 797 graphicsLayerParentLocation = -(scrollOrigin + scrollOffset); | 797 graphicsLayerParentLocation = -(scrollOrigin + scrollOffset); |
| 798 } | 798 } |
| 799 } | 799 } |
| 800 | 800 |
| 801 void CompositedLayerMapping::updateAncestorClippingLayerGeometry(const PaintLaye
r* compositingContainer, const IntPoint& snappedOffsetFromCompositedAncestor, In
tPoint& graphicsLayerParentLocation) | 801 void CompositedLayerMapping::updateAncestorClippingLayerGeometry(const PaintLaye
r* compositingContainer, const IntPoint& snappedOffsetFromCompositedAncestor, In
tPoint& graphicsLayerParentLocation) |
| 802 { | 802 { |
| 803 if (!compositingContainer || !m_ancestorClippingLayer) | 803 if (!compositingContainer || !m_ancestorClippingLayer) |
| 804 return; | 804 return; |
| 805 | 805 |
| 806 if (scrollParent()) | |
| 807 compositingContainer = scrollParent(); | |
| 808 | |
| 809 ClipRectsContext clipRectsContext(compositingContainer, PaintingClipRectsIgn
oringOverflowClip, IgnoreOverlayScrollbarSize); | 806 ClipRectsContext clipRectsContext(compositingContainer, PaintingClipRectsIgn
oringOverflowClip, IgnoreOverlayScrollbarSize); |
| 810 IntRect parentClipRect = pixelSnappedIntRect(m_owningLayer.clipper().backgro
undClipRect(clipRectsContext).rect()); | 807 IntRect parentClipRect = pixelSnappedIntRect(m_owningLayer.clipper().backgro
undClipRect(clipRectsContext).rect()); |
| 811 ASSERT(parentClipRect != LayoutRect::infiniteIntRect()); | 808 ASSERT(parentClipRect != LayoutRect::infiniteIntRect()); |
| 812 m_ancestorClippingLayer->setPosition(FloatPoint(parentClipRect.location() -
graphicsLayerParentLocation)); | 809 m_ancestorClippingLayer->setPosition(FloatPoint(parentClipRect.location() -
graphicsLayerParentLocation)); |
| 813 m_ancestorClippingLayer->setSize(FloatSize(parentClipRect.size())); | 810 m_ancestorClippingLayer->setSize(FloatSize(parentClipRect.size())); |
| 814 | 811 |
| 815 // backgroundRect is relative to compositingContainer, so subtract snappedOf
fsetFromCompositedAncestor.X/snappedOffsetFromCompositedAncestor.Y to get back t
o local coords. | 812 // backgroundRect is relative to compositingContainer, so subtract snappedOf
fsetFromCompositedAncestor.X/snappedOffsetFromCompositedAncestor.Y to get back t
o local coords. |
| 816 m_ancestorClippingLayer->setOffsetFromLayoutObject(parentClipRect.location()
- snappedOffsetFromCompositedAncestor); | 813 m_ancestorClippingLayer->setOffsetFromLayoutObject(parentClipRect.location()
- snappedOffsetFromCompositedAncestor); |
| 817 | 814 |
| 818 // The primary layer is then parented in, and positioned relative to this cl
ipping layer. | 815 // The primary layer is then parented in, and positioned relative to this cl
ipping layer. |
| (...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2575 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2572 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2576 name = "Scrolling Contents Layer"; | 2573 name = "Scrolling Contents Layer"; |
| 2577 } else { | 2574 } else { |
| 2578 ASSERT_NOT_REACHED(); | 2575 ASSERT_NOT_REACHED(); |
| 2579 } | 2576 } |
| 2580 | 2577 |
| 2581 return name; | 2578 return name; |
| 2582 } | 2579 } |
| 2583 | 2580 |
| 2584 } // namespace blink | 2581 } // namespace blink |
| OLD | NEW |