| 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 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2407 if (m_stackingNode->zOrderListsDirty()) | 2407 if (m_stackingNode->zOrderListsDirty()) |
| 2408 return false; | 2408 return false; |
| 2409 | 2409 |
| 2410 // FIXME: We currently only check the immediate layoutObject, | 2410 // FIXME: We currently only check the immediate layoutObject, |
| 2411 // which will miss many cases. | 2411 // which will miss many cases. |
| 2412 if (layoutObject()->backgroundIsKnownToBeOpaqueInRect(localRect)) | 2412 if (layoutObject()->backgroundIsKnownToBeOpaqueInRect(localRect)) |
| 2413 return true; | 2413 return true; |
| 2414 | 2414 |
| 2415 // We can't consult child layers if we clip, since they might cover | 2415 // We can't consult child layers if we clip, since they might cover |
| 2416 // parts of the rect that are clipped out. | 2416 // parts of the rect that are clipped out. |
| 2417 if (layoutObject()->hasOverflowClip() || layoutObject()->style()->containsPa
int()) | 2417 if (layoutObject()->hasClipRelatedProperty()) |
| 2418 return false; | 2418 return false; |
| 2419 | 2419 |
| 2420 return childBackgroundIsKnownToBeOpaqueInRect(localRect); | 2420 return childBackgroundIsKnownToBeOpaqueInRect(localRect); |
| 2421 } | 2421 } |
| 2422 | 2422 |
| 2423 bool PaintLayer::childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR
ect) const | 2423 bool PaintLayer::childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR
ect) const |
| 2424 { | 2424 { |
| 2425 PaintLayerStackingNodeReverseIterator revertseIterator(*m_stackingNode, Posi
tiveZOrderChildren | NormalFlowChildren | NegativeZOrderChildren); | 2425 PaintLayerStackingNodeReverseIterator revertseIterator(*m_stackingNode, Posi
tiveZOrderChildren | NormalFlowChildren | NegativeZOrderChildren); |
| 2426 while (PaintLayerStackingNode* child = revertseIterator.next()) { | 2426 while (PaintLayerStackingNode* child = revertseIterator.next()) { |
| 2427 const PaintLayer* childLayer = child->layer(); | 2427 const PaintLayer* childLayer = child->layer(); |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2924 | 2924 |
| 2925 void showLayerTree(const blink::LayoutObject* layoutObject) | 2925 void showLayerTree(const blink::LayoutObject* layoutObject) |
| 2926 { | 2926 { |
| 2927 if (!layoutObject) { | 2927 if (!layoutObject) { |
| 2928 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2928 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 2929 return; | 2929 return; |
| 2930 } | 2930 } |
| 2931 showLayerTree(layoutObject->enclosingLayer()); | 2931 showLayerTree(layoutObject->enclosingLayer()); |
| 2932 } | 2932 } |
| 2933 #endif | 2933 #endif |
| OLD | NEW |