| 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 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1359 void CompositedLayerMapping::updateScrollingLayerGeometry( | 1359 void CompositedLayerMapping::updateScrollingLayerGeometry( |
| 1360 const IntRect& localCompositingBounds) { | 1360 const IntRect& localCompositingBounds) { |
| 1361 if (!m_scrollingLayer) | 1361 if (!m_scrollingLayer) |
| 1362 return; | 1362 return; |
| 1363 | 1363 |
| 1364 ASSERT(m_scrollingContentsLayer); | 1364 ASSERT(m_scrollingContentsLayer); |
| 1365 LayoutBox& layoutBox = toLayoutBox(layoutObject()); | 1365 LayoutBox& layoutBox = toLayoutBox(layoutObject()); |
| 1366 IntRect overflowClipRect = | 1366 IntRect overflowClipRect = |
| 1367 pixelSnappedIntRect(layoutBox.overflowClipRect(LayoutPoint())); | 1367 pixelSnappedIntRect(layoutBox.overflowClipRect(LayoutPoint())); |
| 1368 | 1368 |
| 1369 const TopDocumentRootScrollerController& globalRootScrollerController = | |
| 1370 layoutBox.document().page()->globalRootScrollerController(); | |
| 1371 | |
| 1372 if (&m_owningLayer == globalRootScrollerController.rootScrollerPaintLayer()) { | |
| 1373 LayoutRect clipRect = | |
| 1374 layoutBox.document().layoutView()->overflowClipRect(LayoutPoint()); | |
| 1375 DCHECK(clipRect.size() == LayoutSize(pixelSnappedIntRect(clipRect).size())); | |
| 1376 overflowClipRect.setSize(pixelSnappedIntRect(clipRect).size()); | |
| 1377 } | |
| 1378 | |
| 1379 // When a m_childTransformLayer exists, local content offsets for the | 1369 // When a m_childTransformLayer exists, local content offsets for the |
| 1380 // m_scrollingLayer have already been applied. Otherwise, we apply them here. | 1370 // m_scrollingLayer have already been applied. Otherwise, we apply them here. |
| 1381 IntSize localContentOffset(0, 0); | 1371 IntSize localContentOffset(0, 0); |
| 1382 if (!m_childTransformLayer) { | 1372 if (!m_childTransformLayer) { |
| 1383 localContentOffset = roundedIntPoint(m_owningLayer.subpixelAccumulation()) - | 1373 localContentOffset = roundedIntPoint(m_owningLayer.subpixelAccumulation()) - |
| 1384 localCompositingBounds.location(); | 1374 localCompositingBounds.location(); |
| 1385 } | 1375 } |
| 1386 m_scrollingLayer->setPosition( | 1376 m_scrollingLayer->setPosition( |
| 1387 FloatPoint(overflowClipRect.location() + localContentOffset)); | 1377 FloatPoint(overflowClipRect.location() + localContentOffset)); |
| 1388 m_scrollingLayer->setSize(FloatSize(overflowClipRect.size())); | 1378 m_scrollingLayer->setSize(FloatSize(overflowClipRect.size())); |
| (...skipping 2109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3498 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { | 3488 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { |
| 3499 name = "Decoration Layer"; | 3489 name = "Decoration Layer"; |
| 3500 } else { | 3490 } else { |
| 3501 ASSERT_NOT_REACHED(); | 3491 ASSERT_NOT_REACHED(); |
| 3502 } | 3492 } |
| 3503 | 3493 |
| 3504 return name; | 3494 return name; |
| 3505 } | 3495 } |
| 3506 | 3496 |
| 3507 } // namespace blink | 3497 } // namespace blink |
| OLD | NEW |