Chromium Code Reviews| 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 2445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2456 } | 2456 } |
| 2457 | 2457 |
| 2458 void PaintLayer::updateSelfPaintingLayer() | 2458 void PaintLayer::updateSelfPaintingLayer() |
| 2459 { | 2459 { |
| 2460 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer(); | 2460 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer(); |
| 2461 if (this->isSelfPaintingLayer() == isSelfPaintingLayer) | 2461 if (this->isSelfPaintingLayer() == isSelfPaintingLayer) |
| 2462 return; | 2462 return; |
| 2463 | 2463 |
| 2464 m_isSelfPaintingLayer = isSelfPaintingLayer; | 2464 m_isSelfPaintingLayer = isSelfPaintingLayer; |
| 2465 | 2465 |
| 2466 if (parent()) | 2466 if (PaintLayer* parent = this->parent()) { |
|
pdr.
2016/04/19 21:17:57
The tests in this patch seem to pass without this
Xianzhu
2016/04/19 23:35:47
Thanks for verifying the tests. Sorry for not veri
| |
| 2467 parent()->dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); | 2467 parent->dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); |
| 2468 | |
| 2469 if (PaintLayer* enclosingSelfPaintingLayer = parent->enclosingSelfPainti ngLayer()) { | |
| 2470 if (isSelfPaintingLayer) | |
| 2471 mergeNeedsPaintPhaseFlagsFrom(*enclosingSelfPaintingLayer); | |
| 2472 else | |
| 2473 enclosingSelfPaintingLayer->mergeNeedsPaintPhaseFlagsFrom(*this) ; | |
| 2474 } | |
| 2475 } | |
| 2468 } | 2476 } |
| 2469 | 2477 |
| 2470 PaintLayer* PaintLayer::enclosingSelfPaintingLayer() | 2478 PaintLayer* PaintLayer::enclosingSelfPaintingLayer() |
| 2471 { | 2479 { |
| 2472 PaintLayer* layer = this; | 2480 PaintLayer* layer = this; |
| 2473 while (layer && !layer->isSelfPaintingLayer()) | 2481 while (layer && !layer->isSelfPaintingLayer()) |
| 2474 layer = layer->parent(); | 2482 layer = layer->parent(); |
| 2475 return layer; | 2483 return layer; |
| 2476 } | 2484 } |
| 2477 | 2485 |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2933 | 2941 |
| 2934 void showLayerTree(const blink::LayoutObject* layoutObject) | 2942 void showLayerTree(const blink::LayoutObject* layoutObject) |
| 2935 { | 2943 { |
| 2936 if (!layoutObject) { | 2944 if (!layoutObject) { |
| 2937 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2945 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 2938 return; | 2946 return; |
| 2939 } | 2947 } |
| 2940 showLayerTree(layoutObject->enclosingLayer()); | 2948 showLayerTree(layoutObject->enclosingLayer()); |
| 2941 } | 2949 } |
| 2942 #endif | 2950 #endif |
| OLD | NEW |