OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * | 4 * |
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
6 * | 6 * |
7 * Other contributors: | 7 * Other contributors: |
8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
(...skipping 2641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2652 return 0; | 2652 return 0; |
2653 case PaintsIntoGroupedBacking: | 2653 case PaintsIntoGroupedBacking: |
2654 return groupedMapping()->squashingLayer(); | 2654 return groupedMapping()->squashingLayer(); |
2655 default: | 2655 default: |
2656 return compositedLayerMapping()->scrollingContentsLayer() | 2656 return compositedLayerMapping()->scrollingContentsLayer() |
2657 ? compositedLayerMapping()->scrollingContentsLayer() | 2657 ? compositedLayerMapping()->scrollingContentsLayer() |
2658 : compositedLayerMapping()->mainGraphicsLayer(); | 2658 : compositedLayerMapping()->mainGraphicsLayer(); |
2659 } | 2659 } |
2660 } | 2660 } |
2661 | 2661 |
2662 bool PaintLayer::canPaintBackgroundOntoScrollingContentsLayer() const { | 2662 BackgroundPaintLocation PaintLayer::backgroundPaintLocation() const { |
2663 if (isRootLayer() || !scrollsOverflow() || | 2663 BackgroundPaintLocation location = |
2664 !layoutObject()->hasLocalEquivalentBackground()) | 2664 isRootLayer() || !scrollsOverflow() |
2665 return false; | 2665 ? BackgroundPaintInGraphicsLayer |
2666 | 2666 : layoutObject()->backgroundPaintLocation(); |
2667 m_stackingNode->updateLayerListsIfNeeded(); | 2667 m_stackingNode->updateLayerListsIfNeeded(); |
2668 return !m_stackingNode->hasNegativeZOrderList(); | 2668 if (m_stackingNode->hasNegativeZOrderList()) |
| 2669 location = BackgroundPaintInGraphicsLayer; |
| 2670 return location; |
2669 } | 2671 } |
2670 | 2672 |
2671 void PaintLayer::ensureCompositedLayerMapping() { | 2673 void PaintLayer::ensureCompositedLayerMapping() { |
2672 if (m_rareData && m_rareData->compositedLayerMapping) | 2674 if (m_rareData && m_rareData->compositedLayerMapping) |
2673 return; | 2675 return; |
2674 | 2676 |
2675 ensureRareData().compositedLayerMapping = | 2677 ensureRareData().compositedLayerMapping = |
2676 wrapUnique(new CompositedLayerMapping(*this)); | 2678 wrapUnique(new CompositedLayerMapping(*this)); |
2677 m_rareData->compositedLayerMapping->setNeedsGraphicsLayerUpdate( | 2679 m_rareData->compositedLayerMapping->setNeedsGraphicsLayerUpdate( |
2678 GraphicsLayerUpdateSubtree); | 2680 GraphicsLayerUpdateSubtree); |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3269 } | 3271 } |
3270 | 3272 |
3271 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3273 void showLayerTree(const blink::LayoutObject* layoutObject) { |
3272 if (!layoutObject) { | 3274 if (!layoutObject) { |
3273 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; | 3275 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; |
3274 return; | 3276 return; |
3275 } | 3277 } |
3276 showLayerTree(layoutObject->enclosingLayer()); | 3278 showLayerTree(layoutObject->enclosingLayer()); |
3277 } | 3279 } |
3278 #endif | 3280 #endif |
OLD | NEW |