| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
| 9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 2326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2337 switch (compositingState()) { | 2337 switch (compositingState()) { |
| 2338 case NotComposited: | 2338 case NotComposited: |
| 2339 return 0; | 2339 return 0; |
| 2340 case PaintsIntoGroupedBacking: | 2340 case PaintsIntoGroupedBacking: |
| 2341 return groupedMapping()->squashingLayer(); | 2341 return groupedMapping()->squashingLayer(); |
| 2342 default: | 2342 default: |
| 2343 return compositedLayerMapping()->scrollingContentsLayer() ? compositedLa
yerMapping()->scrollingContentsLayer() : compositedLayerMapping()->mainGraphicsL
ayer(); | 2343 return compositedLayerMapping()->scrollingContentsLayer() ? compositedLa
yerMapping()->scrollingContentsLayer() : compositedLayerMapping()->mainGraphicsL
ayer(); |
| 2344 } | 2344 } |
| 2345 } | 2345 } |
| 2346 | 2346 |
| 2347 bool PaintLayer::shouldPaintBackgroundOntoScrollingContentsLayer() const |
| 2348 { |
| 2349 return !isRootLayer() |
| 2350 && scrollsOverflow() |
| 2351 && layoutObject()->style()->hasEntirelyLocalBackground() |
| 2352 && !stackingNode()->hasNegativeZOrderList(); |
| 2353 } |
| 2354 |
| 2347 void PaintLayer::ensureCompositedLayerMapping() | 2355 void PaintLayer::ensureCompositedLayerMapping() |
| 2348 { | 2356 { |
| 2349 if (m_rareData && m_rareData->compositedLayerMapping) | 2357 if (m_rareData && m_rareData->compositedLayerMapping) |
| 2350 return; | 2358 return; |
| 2351 | 2359 |
| 2352 ensureRareData().compositedLayerMapping = wrapUnique(new CompositedLayerMapp
ing(*this)); | 2360 ensureRareData().compositedLayerMapping = wrapUnique(new CompositedLayerMapp
ing(*this)); |
| 2353 m_rareData->compositedLayerMapping->setNeedsGraphicsLayerUpdate(GraphicsLaye
rUpdateSubtree); | 2361 m_rareData->compositedLayerMapping->setNeedsGraphicsLayerUpdate(GraphicsLaye
rUpdateSubtree); |
| 2354 | 2362 |
| 2355 updateOrRemoveFilterEffectBuilder(); | 2363 updateOrRemoveFilterEffectBuilder(); |
| 2356 } | 2364 } |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2444 // cover the given rect, but a unioning method would require children to com
pute and report | 2452 // cover the given rect, but a unioning method would require children to com
pute and report |
| 2445 // their rects. | 2453 // their rects. |
| 2446 return childBackgroundIsKnownToBeOpaqueInRect(localRect); | 2454 return childBackgroundIsKnownToBeOpaqueInRect(localRect); |
| 2447 } | 2455 } |
| 2448 | 2456 |
| 2449 bool PaintLayer::childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR
ect) const | 2457 bool PaintLayer::childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR
ect) const |
| 2450 { | 2458 { |
| 2451 PaintLayerStackingNodeReverseIterator reverseIterator(*m_stackingNode, Posit
iveZOrderChildren | NormalFlowChildren | NegativeZOrderChildren); | 2459 PaintLayerStackingNodeReverseIterator reverseIterator(*m_stackingNode, Posit
iveZOrderChildren | NormalFlowChildren | NegativeZOrderChildren); |
| 2452 while (PaintLayerStackingNode* child = reverseIterator.next()) { | 2460 while (PaintLayerStackingNode* child = reverseIterator.next()) { |
| 2453 const PaintLayer* childLayer = child->layer(); | 2461 const PaintLayer* childLayer = child->layer(); |
| 2454 // Stop at composited paint boundaries. | 2462 // Stop at composited paint boundaries and non-self-painting layers. |
| 2455 if (childLayer->isPaintInvalidationContainer()) | 2463 if (childLayer->isPaintInvalidationContainer()) |
| 2456 continue; | 2464 continue; |
| 2457 | 2465 |
| 2458 if (!childLayer->canUseConvertToLayerCoords()) | 2466 if (!childLayer->canUseConvertToLayerCoords()) |
| 2459 continue; | 2467 continue; |
| 2460 | 2468 |
| 2461 LayoutPoint childOffset; | 2469 LayoutPoint childOffset; |
| 2462 LayoutRect childLocalRect(localRect); | 2470 LayoutRect childLocalRect(localRect); |
| 2463 childLayer->convertToLayerCoords(this, childOffset); | 2471 childLayer->convertToLayerCoords(this, childOffset); |
| 2464 childLocalRect.moveBy(-childOffset); | 2472 childLocalRect.moveBy(-childOffset); |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2960 | 2968 |
| 2961 void showLayerTree(const blink::LayoutObject* layoutObject) | 2969 void showLayerTree(const blink::LayoutObject* layoutObject) |
| 2962 { | 2970 { |
| 2963 if (!layoutObject) { | 2971 if (!layoutObject) { |
| 2964 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2972 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 2965 return; | 2973 return; |
| 2966 } | 2974 } |
| 2967 showLayerTree(layoutObject->enclosingLayer()); | 2975 showLayerTree(layoutObject->enclosingLayer()); |
| 2968 } | 2976 } |
| 2969 #endif | 2977 #endif |
| OLD | NEW |