| 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 2434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2445 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer(); | 2445 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer(); |
| 2446 if (this->isSelfPaintingLayer() == isSelfPaintingLayer) | 2446 if (this->isSelfPaintingLayer() == isSelfPaintingLayer) |
| 2447 return; | 2447 return; |
| 2448 | 2448 |
| 2449 m_isSelfPaintingLayer = isSelfPaintingLayer; | 2449 m_isSelfPaintingLayer = isSelfPaintingLayer; |
| 2450 | 2450 |
| 2451 if (parent()) | 2451 if (parent()) |
| 2452 parent()->dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); | 2452 parent()->dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); |
| 2453 } | 2453 } |
| 2454 | 2454 |
| 2455 PaintLayer* PaintLayer::enclosingSelfPaintingLayer() |
| 2456 { |
| 2457 PaintLayer* layer = this; |
| 2458 while (layer && !layer->isSelfPaintingLayer()) |
| 2459 layer = layer->parent(); |
| 2460 return layer; |
| 2461 } |
| 2462 |
| 2455 bool PaintLayer::hasNonEmptyChildLayoutObjects() const | 2463 bool PaintLayer::hasNonEmptyChildLayoutObjects() const |
| 2456 { | 2464 { |
| 2457 // Some HTML can cause whitespace text nodes to have layoutObjects, like: | 2465 // Some HTML can cause whitespace text nodes to have layoutObjects, like: |
| 2458 // <div> | 2466 // <div> |
| 2459 // <img src=...> | 2467 // <img src=...> |
| 2460 // </div> | 2468 // </div> |
| 2461 // so test for 0x0 LayoutTexts here | 2469 // so test for 0x0 LayoutTexts here |
| 2462 for (LayoutObject* child = layoutObject()->slowFirstChild(); child; child =
child->nextSibling()) { | 2470 for (LayoutObject* child = layoutObject()->slowFirstChild(); child; child =
child->nextSibling()) { |
| 2463 if (!child->hasLayer()) { | 2471 if (!child->hasLayer()) { |
| 2464 if (child->isLayoutInline() || !child->isBox()) | 2472 if (child->isLayoutInline() || !child->isBox()) |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2828 | 2836 |
| 2829 void showLayerTree(const blink::LayoutObject* layoutObject) | 2837 void showLayerTree(const blink::LayoutObject* layoutObject) |
| 2830 { | 2838 { |
| 2831 if (!layoutObject) { | 2839 if (!layoutObject) { |
| 2832 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2840 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 2833 return; | 2841 return; |
| 2834 } | 2842 } |
| 2835 showLayerTree(layoutObject->enclosingLayer()); | 2843 showLayerTree(layoutObject->enclosingLayer()); |
| 2836 } | 2844 } |
| 2837 #endif | 2845 #endif |
| OLD | NEW |