| 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 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1228 | 1228 |
| 1229 void CompositedLayerMapping::updateScrollingLayerGeometry( | 1229 void CompositedLayerMapping::updateScrollingLayerGeometry( |
| 1230 const IntRect& localCompositingBounds) { | 1230 const IntRect& localCompositingBounds) { |
| 1231 if (!m_scrollingLayer) | 1231 if (!m_scrollingLayer) |
| 1232 return; | 1232 return; |
| 1233 | 1233 |
| 1234 ASSERT(m_scrollingContentsLayer); | 1234 ASSERT(m_scrollingContentsLayer); |
| 1235 LayoutBox* layoutBox = toLayoutBox(layoutObject()); | 1235 LayoutBox* layoutBox = toLayoutBox(layoutObject()); |
| 1236 IntRect overflowClipRect = | 1236 IntRect overflowClipRect = |
| 1237 pixelSnappedIntRect(layoutBox->overflowClipRect(LayoutPoint())); | 1237 pixelSnappedIntRect(layoutBox->overflowClipRect(LayoutPoint())); |
| 1238 |
| 1239 if (m_owningLayer.isRootScroller()) { |
| 1240 overflowClipRect.setSize( |
| 1241 flooredIntSize(layoutBox->document() |
| 1242 .layoutView() |
| 1243 ->overflowClipRect(LayoutPoint()) |
| 1244 .size())); |
| 1245 } |
| 1246 |
| 1238 FloatPoint scrollPosition = | 1247 FloatPoint scrollPosition = |
| 1239 m_owningLayer.getScrollableArea()->scrollPosition(); | 1248 m_owningLayer.getScrollableArea()->scrollPosition(); |
| 1240 m_scrollingLayer->setPosition(FloatPoint( | 1249 m_scrollingLayer->setPosition(FloatPoint( |
| 1241 overflowClipRect.location() - localCompositingBounds.location() + | 1250 overflowClipRect.location() - localCompositingBounds.location() + |
| 1242 roundedIntSize(m_owningLayer.subpixelAccumulation()))); | 1251 roundedIntSize(m_owningLayer.subpixelAccumulation()))); |
| 1243 m_scrollingLayer->setSize(FloatSize(overflowClipRect.size())); | 1252 m_scrollingLayer->setSize(FloatSize(overflowClipRect.size())); |
| 1244 | 1253 |
| 1245 IntSize oldScrollingLayerOffset = m_scrollingLayer->offsetFromLayoutObject(); | 1254 IntSize oldScrollingLayerOffset = m_scrollingLayer->offsetFromLayoutObject(); |
| 1246 m_scrollingLayer->setOffsetFromLayoutObject( | 1255 m_scrollingLayer->setOffsetFromLayoutObject( |
| 1247 -toIntSize(overflowClipRect.location())); | 1256 -toIntSize(overflowClipRect.location())); |
| (...skipping 2003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3251 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 3260 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 3252 name = "Scrolling Contents Layer"; | 3261 name = "Scrolling Contents Layer"; |
| 3253 } else { | 3262 } else { |
| 3254 ASSERT_NOT_REACHED(); | 3263 ASSERT_NOT_REACHED(); |
| 3255 } | 3264 } |
| 3256 | 3265 |
| 3257 return name; | 3266 return name; |
| 3258 } | 3267 } |
| 3259 | 3268 |
| 3260 } // namespace blink | 3269 } // namespace blink |
| OLD | NEW |