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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 bool clientBoxOffsetChanged = oldScrollingLayerOffset != m_scrollingLaye
r->offsetFromRenderer(); | 645 bool clientBoxOffsetChanged = oldScrollingLayerOffset != m_scrollingLaye
r->offsetFromRenderer(); |
646 | 646 |
647 IntSize scrollSize(m_owningLayer->scrollWidth(), m_owningLayer->scrollHe
ight()); | 647 IntSize scrollSize(m_owningLayer->scrollWidth(), m_owningLayer->scrollHe
ight()); |
648 if (scrollSize != m_scrollingContentsLayer->size() || clientBoxOffsetCha
nged) | 648 if (scrollSize != m_scrollingContentsLayer->size() || clientBoxOffsetCha
nged) |
649 m_scrollingContentsLayer->setNeedsDisplay(); | 649 m_scrollingContentsLayer->setNeedsDisplay(); |
650 | 650 |
651 IntSize scrollingContentsOffset = toIntSize(clientBox.location() - adjus
tedScrollOffset); | 651 IntSize scrollingContentsOffset = toIntSize(clientBox.location() - adjus
tedScrollOffset); |
652 if (scrollingContentsOffset != m_scrollingContentsLayer->offsetFromRende
rer() || scrollSize != m_scrollingContentsLayer->size()) { | 652 if (scrollingContentsOffset != m_scrollingContentsLayer->offsetFromRende
rer() || scrollSize != m_scrollingContentsLayer->size()) { |
653 bool scrollingCoordinatorHandlesOffset = compositor()->scrollingLaye
rDidChange(m_owningLayer); | 653 bool scrollingCoordinatorHandlesOffset = compositor()->scrollingLaye
rDidChange(m_owningLayer); |
654 | 654 |
655 #ifndef BLINK_SCROLLING_POSITION_NO_OFFSET | |
656 // FIXME: Remove when possible. | |
657 // Only required to stage multi-repo change. | |
658 scrollingCoordinatorHandlesOffset = false; | |
659 #endif | |
660 if (scrollingCoordinatorHandlesOffset) | 655 if (scrollingCoordinatorHandlesOffset) |
661 m_scrollingContentsLayer->setPosition(-m_owningLayer->scrollOrig
in()); | 656 m_scrollingContentsLayer->setPosition(-m_owningLayer->scrollOrig
in()); |
662 else | 657 else |
663 m_scrollingContentsLayer->setPosition(FloatPoint(-adjustedScroll
Offset)); | 658 m_scrollingContentsLayer->setPosition(FloatPoint(-adjustedScroll
Offset)); |
664 } | 659 } |
665 | 660 |
666 m_scrollingContentsLayer->setSize(scrollSize); | 661 m_scrollingContentsLayer->setSize(scrollSize); |
667 // FIXME: The paint offset and the scroll offset should really be separa
te concepts. | 662 // FIXME: The paint offset and the scroll offset should really be separa
te concepts. |
668 m_scrollingContentsLayer->setOffsetFromRenderer(scrollingContentsOffset,
GraphicsLayer::DontSetNeedsDisplay); | 663 m_scrollingContentsLayer->setOffsetFromRenderer(scrollingContentsOffset,
GraphicsLayer::DontSetNeedsDisplay); |
669 | 664 |
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1895 info.addMember(m_childContainmentLayer, "childContainmentLayer"); | 1890 info.addMember(m_childContainmentLayer, "childContainmentLayer"); |
1896 info.addMember(m_maskLayer, "maskLayer"); | 1891 info.addMember(m_maskLayer, "maskLayer"); |
1897 info.addMember(m_layerForHorizontalScrollbar, "layerForHorizontalScrollbar")
; | 1892 info.addMember(m_layerForHorizontalScrollbar, "layerForHorizontalScrollbar")
; |
1898 info.addMember(m_layerForVerticalScrollbar, "layerForVerticalScrollbar"); | 1893 info.addMember(m_layerForVerticalScrollbar, "layerForVerticalScrollbar"); |
1899 info.addMember(m_layerForScrollCorner, "layerForScrollCorner"); | 1894 info.addMember(m_layerForScrollCorner, "layerForScrollCorner"); |
1900 info.addMember(m_scrollingLayer, "scrollingLayer"); | 1895 info.addMember(m_scrollingLayer, "scrollingLayer"); |
1901 info.addMember(m_scrollingContentsLayer, "scrollingContentsLayer"); | 1896 info.addMember(m_scrollingContentsLayer, "scrollingContentsLayer"); |
1902 } | 1897 } |
1903 | 1898 |
1904 } // namespace WebCore | 1899 } // namespace WebCore |
OLD | NEW |