| 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 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1251 m_childClippingMaskLayer->setSize(m_scrollingLayer->size()); | 1251 m_childClippingMaskLayer->setSize(m_scrollingLayer->size()); |
| 1252 m_childClippingMaskLayer->setOffsetFromLayoutObject( | 1252 m_childClippingMaskLayer->setOffsetFromLayoutObject( |
| 1253 toIntSize(overflowClipRect.location())); | 1253 toIntSize(overflowClipRect.location())); |
| 1254 } | 1254 } |
| 1255 | 1255 |
| 1256 bool overflowClipRectOffsetChanged = | 1256 bool overflowClipRectOffsetChanged = |
| 1257 oldScrollingLayerOffset != m_scrollingLayer->offsetFromLayoutObject(); | 1257 oldScrollingLayerOffset != m_scrollingLayer->offsetFromLayoutObject(); |
| 1258 | 1258 |
| 1259 IntSize scrollSize(layoutBox->pixelSnappedScrollWidth(), | 1259 IntSize scrollSize(layoutBox->pixelSnappedScrollWidth(), |
| 1260 layoutBox->pixelSnappedScrollHeight()); | 1260 layoutBox->pixelSnappedScrollHeight()); |
| 1261 if (scrollSize != m_scrollingContentsLayer->size() || | 1261 if (overflowClipRectOffsetChanged) |
| 1262 overflowClipRectOffsetChanged) | |
| 1263 m_scrollingContentsLayer->setNeedsDisplay(); | 1262 m_scrollingContentsLayer->setNeedsDisplay(); |
| 1264 | 1263 |
| 1265 DoubleSize scrollingContentsOffset( | 1264 DoubleSize scrollingContentsOffset( |
| 1266 overflowClipRect.location().x() - scrollPosition.x(), | 1265 overflowClipRect.location().x() - scrollPosition.x(), |
| 1267 overflowClipRect.location().y() - scrollPosition.y()); | 1266 overflowClipRect.location().y() - scrollPosition.y()); |
| 1268 // The scroll offset change is compared using floating point so that | 1267 // The scroll offset change is compared using floating point so that |
| 1269 // fractional scroll offset change can be propagated to compositor. | 1268 // fractional scroll offset change can be propagated to compositor. |
| 1270 if (scrollingContentsOffset != m_scrollingContentsOffset || | 1269 if (scrollingContentsOffset != m_scrollingContentsOffset || |
| 1271 scrollSize != m_scrollingContentsLayer->size()) { | 1270 scrollSize != m_scrollingContentsLayer->size()) { |
| 1272 bool coordinatorHandlesOffset = | 1271 bool coordinatorHandlesOffset = |
| (...skipping 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3251 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 3250 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 3252 name = "Scrolling Contents Layer"; | 3251 name = "Scrolling Contents Layer"; |
| 3253 } else { | 3252 } else { |
| 3254 ASSERT_NOT_REACHED(); | 3253 ASSERT_NOT_REACHED(); |
| 3255 } | 3254 } |
| 3256 | 3255 |
| 3257 return name; | 3256 return name; |
| 3258 } | 3257 } |
| 3259 | 3258 |
| 3260 } // namespace blink | 3259 } // namespace blink |
| OLD | NEW |