| 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 2408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2419 | 2419 |
| 2420 bool CompositedLayerMapping::needsRepaint(const GraphicsLayer& graphicsLayer) co
nst | 2420 bool CompositedLayerMapping::needsRepaint(const GraphicsLayer& graphicsLayer) co
nst |
| 2421 { | 2421 { |
| 2422 return isScrollableAreaLayer(&graphicsLayer) ? true : m_owningLayer.needsRep
aint(); | 2422 return isScrollableAreaLayer(&graphicsLayer) ? true : m_owningLayer.needsRep
aint(); |
| 2423 } | 2423 } |
| 2424 | 2424 |
| 2425 void CompositedLayerMapping::adjustForCompositedScrolling(const GraphicsLayer* g
raphicsLayer, IntSize& offset) const | 2425 void CompositedLayerMapping::adjustForCompositedScrolling(const GraphicsLayer* g
raphicsLayer, IntSize& offset) const |
| 2426 { | 2426 { |
| 2427 if (graphicsLayer == m_scrollingContentsLayer.get() || graphicsLayer == m_fo
regroundLayer.get()) { | 2427 if (graphicsLayer == m_scrollingContentsLayer.get() || graphicsLayer == m_fo
regroundLayer.get()) { |
| 2428 if (PaintLayerScrollableArea* scrollableArea = m_owningLayer.getScrollab
leArea()) { | 2428 if (PaintLayerScrollableArea* scrollableArea = m_owningLayer.getScrollab
leArea()) { |
| 2429 // Note: this is just the scroll offset, *not* the "adjusted scroll
offset". Scroll offset | 2429 if (scrollableArea->usesCompositedScrolling()) { |
| 2430 // does not include the origin adjustment. That is instead baked alr
eady into offsetFromLayoutObject. | 2430 // Note: this is just the scroll offset, *not* the "adjusted scr
oll offset". Scroll offset |
| 2431 DoubleSize scrollOffset = scrollableArea->scrollOffset(); | 2431 // does not include the origin adjustment. That is instead baked
already into offsetFromLayoutObject. |
| 2432 offset.expand(-scrollOffset.width(), -scrollOffset.height()); | 2432 DoubleSize scrollOffset = scrollableArea->scrollOffset(); |
| 2433 offset.expand(-scrollOffset.width(), -scrollOffset.height()); |
| 2434 } |
| 2433 } | 2435 } |
| 2434 } | 2436 } |
| 2435 } | 2437 } |
| 2436 | 2438 |
| 2437 void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G
raphicsContext& context, | 2439 void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G
raphicsContext& context, |
| 2438 GraphicsLayerPaintingPhase graphicsLayerPaintingPhase, const IntRect& intere
stRect) const | 2440 GraphicsLayerPaintingPhase graphicsLayerPaintingPhase, const IntRect& intere
stRect) const |
| 2439 { | 2441 { |
| 2440 // https://code.google.com/p/chromium/issues/detail?id=343772 | 2442 // https://code.google.com/p/chromium/issues/detail?id=343772 |
| 2441 DisableCompositingQueryAsserts disabler; | 2443 DisableCompositingQueryAsserts disabler; |
| 2442 // Allow throttling to make sure no painting paths (e.g., | 2444 // Allow throttling to make sure no painting paths (e.g., |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2711 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2713 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2712 name = "Scrolling Contents Layer"; | 2714 name = "Scrolling Contents Layer"; |
| 2713 } else { | 2715 } else { |
| 2714 ASSERT_NOT_REACHED(); | 2716 ASSERT_NOT_REACHED(); |
| 2715 } | 2717 } |
| 2716 | 2718 |
| 2717 return name; | 2719 return name; |
| 2718 } | 2720 } |
| 2719 | 2721 |
| 2720 } // namespace blink | 2722 } // namespace blink |
| OLD | NEW |