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 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 void CompositedLayerMapping::updateScrollingLayerGeometry( | 1401 void CompositedLayerMapping::updateScrollingLayerGeometry( |
1402 const IntRect& localCompositingBounds) { | 1402 const IntRect& localCompositingBounds) { |
1403 if (!m_scrollingLayer) | 1403 if (!m_scrollingLayer) |
1404 return; | 1404 return; |
1405 | 1405 |
1406 ASSERT(m_scrollingContentsLayer); | 1406 ASSERT(m_scrollingContentsLayer); |
1407 LayoutBox& layoutBox = toLayoutBox(layoutObject()); | 1407 LayoutBox& layoutBox = toLayoutBox(layoutObject()); |
1408 IntRect overflowClipRect = | 1408 IntRect overflowClipRect = |
1409 pixelSnappedIntRect(layoutBox.overflowClipRect(LayoutPoint())); | 1409 pixelSnappedIntRect(layoutBox.overflowClipRect(LayoutPoint())); |
1410 | 1410 |
1411 const TopDocumentRootScrollerController& globalRootScrollerController = | |
1412 layoutBox.document().page()->globalRootScrollerController(); | |
1413 | |
1414 if (&m_owningLayer == globalRootScrollerController.rootScrollerPaintLayer()) { | |
1415 LayoutRect clipRect = | |
1416 layoutBox.document().layoutView()->overflowClipRect(LayoutPoint()); | |
1417 DCHECK(clipRect.size() == LayoutSize(pixelSnappedIntRect(clipRect).size())); | |
1418 overflowClipRect.setSize(pixelSnappedIntRect(clipRect).size()); | |
1419 } | |
1420 | |
1421 // When a m_childTransformLayer exists, local content offsets for the | 1411 // When a m_childTransformLayer exists, local content offsets for the |
1422 // m_scrollingLayer have already been applied. Otherwise, we apply them here. | 1412 // m_scrollingLayer have already been applied. Otherwise, we apply them here. |
1423 IntSize localContentOffset(0, 0); | 1413 IntSize localContentOffset(0, 0); |
1424 if (!m_childTransformLayer) { | 1414 if (!m_childTransformLayer) { |
1425 localContentOffset = roundedIntPoint(m_owningLayer.subpixelAccumulation()) - | 1415 localContentOffset = roundedIntPoint(m_owningLayer.subpixelAccumulation()) - |
1426 localCompositingBounds.location(); | 1416 localCompositingBounds.location(); |
1427 } | 1417 } |
1428 m_scrollingLayer->setPosition( | 1418 m_scrollingLayer->setPosition( |
1429 FloatPoint(overflowClipRect.location() + localContentOffset)); | 1419 FloatPoint(overflowClipRect.location() + localContentOffset)); |
1430 m_scrollingLayer->setSize(FloatSize(overflowClipRect.size())); | 1420 m_scrollingLayer->setSize(FloatSize(overflowClipRect.size())); |
(...skipping 2109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3540 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { | 3530 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { |
3541 name = "Decoration Layer"; | 3531 name = "Decoration Layer"; |
3542 } else { | 3532 } else { |
3543 NOTREACHED(); | 3533 NOTREACHED(); |
3544 } | 3534 } |
3545 | 3535 |
3546 return name; | 3536 return name; |
3547 } | 3537 } |
3548 | 3538 |
3549 } // namespace blink | 3539 } // namespace blink |
OLD | NEW |