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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 bool isolate = m_owningLayer.shouldIsolateCompositedDescendants(); | 292 bool isolate = m_owningLayer.shouldIsolateCompositedDescendants(); |
293 | 293 |
294 // non stacking context layers should never isolate | 294 // non stacking context layers should never isolate |
295 ASSERT(m_owningLayer.stackingNode()->isStackingContext() || !isolate); | 295 ASSERT(m_owningLayer.stackingNode()->isStackingContext() || !isolate); |
296 | 296 |
297 m_graphicsLayer->setIsRootForIsolatedGroup(isolate); | 297 m_graphicsLayer->setIsRootForIsolatedGroup(isolate); |
298 } | 298 } |
299 | 299 |
300 void CompositedLayerMapping::updateBackgroundPaintsOntoScrollingContentsLayer() | 300 void CompositedLayerMapping::updateBackgroundPaintsOntoScrollingContentsLayer() |
301 { | 301 { |
302 bool shouldPaintOntoScrollingContentsLayer = m_owningLayer.shouldPaintBackgr
oundOntoScrollingContentsLayer(); | 302 // We can only paint the background onto the scrolling contents layer if |
| 303 // it would be visually correct and we are using composited scrolling meanin
g we |
| 304 // have a scrolling contents layer to paint it into. |
| 305 bool shouldPaintOntoScrollingContentsLayer = |
| 306 m_owningLayer.canPaintBackgroundOntoScrollingContentsLayer() |
| 307 && m_owningLayer.getScrollableArea()->usesCompositedScrolling(); |
303 if (shouldPaintOntoScrollingContentsLayer != backgroundPaintsOntoScrollingCo
ntentsLayer()) { | 308 if (shouldPaintOntoScrollingContentsLayer != backgroundPaintsOntoScrollingCo
ntentsLayer()) { |
304 m_backgroundPaintsOntoScrollingContentsLayer = shouldPaintOntoScrollingC
ontentsLayer; | 309 m_backgroundPaintsOntoScrollingContentsLayer = shouldPaintOntoScrollingC
ontentsLayer; |
305 // If the background is no longer painted onto the scrolling contents | 310 // If the background is no longer painted onto the scrolling contents |
306 // layer the scrolling contents layer needs to be updated. If it is | 311 // layer the scrolling contents layer needs to be updated. If it is |
307 // going to be painted onto the scrolling contents layer this update | 312 // going to be painted onto the scrolling contents layer this update |
308 // will be triggered by LayoutBoxModelObject::setBackingNeedsPaintInvali
dationInRect | 313 // will be triggered by LayoutBoxModelObject::setBackingNeedsPaintInvali
dationInRect |
309 if (hasScrollingLayer() && !shouldPaintOntoScrollingContentsLayer) | 314 if (hasScrollingLayer() && !shouldPaintOntoScrollingContentsLayer) |
310 m_scrollingContentsLayer->setNeedsDisplay(); | 315 m_scrollingContentsLayer->setNeedsDisplay(); |
311 } | 316 } |
312 } | 317 } |
(...skipping 2393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2706 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2711 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2707 name = "Scrolling Contents Layer"; | 2712 name = "Scrolling Contents Layer"; |
2708 } else { | 2713 } else { |
2709 ASSERT_NOT_REACHED(); | 2714 ASSERT_NOT_REACHED(); |
2710 } | 2715 } |
2711 | 2716 |
2712 return name; | 2717 return name; |
2713 } | 2718 } |
2714 | 2719 |
2715 } // namespace blink | 2720 } // namespace blink |
OLD | NEW |