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 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1393 | 1393 |
1394 if (child->isSelfPaintingLayer() || child->hasSelfPaintingLayerDescendant()) | 1394 if (child->isSelfPaintingLayer() || child->hasSelfPaintingLayerDescendant()) |
1395 setAncestorChainHasSelfPaintingLayerDescendant(); | 1395 setAncestorChainHasSelfPaintingLayerDescendant(); |
1396 | 1396 |
1397 if (child->blendInfo().hasBlendMode() || child->blendInfo().childLayerHasBle
ndMode()) | 1397 if (child->blendInfo().hasBlendMode() || child->blendInfo().childLayerHasBle
ndMode()) |
1398 m_blendInfo.setAncestorChainBlendedDescendant(); | 1398 m_blendInfo.setAncestorChainBlendedDescendant(); |
1399 } | 1399 } |
1400 | 1400 |
1401 RenderLayer* RenderLayer::removeChild(RenderLayer* oldChild) | 1401 RenderLayer* RenderLayer::removeChild(RenderLayer* oldChild) |
1402 { | 1402 { |
1403 if (!renderer()->documentBeingDestroyed()) | |
1404 compositor()->layerWillBeRemoved(this, oldChild); | |
1405 | |
1406 // remove the child | |
1407 if (oldChild->previousSibling()) | 1403 if (oldChild->previousSibling()) |
1408 oldChild->previousSibling()->setNextSibling(oldChild->nextSibling()); | 1404 oldChild->previousSibling()->setNextSibling(oldChild->nextSibling()); |
1409 if (oldChild->nextSibling()) | 1405 if (oldChild->nextSibling()) |
1410 oldChild->nextSibling()->setPreviousSibling(oldChild->previousSibling())
; | 1406 oldChild->nextSibling()->setPreviousSibling(oldChild->previousSibling())
; |
1411 | 1407 |
1412 if (m_first == oldChild) | 1408 if (m_first == oldChild) |
1413 m_first = oldChild->nextSibling(); | 1409 m_first = oldChild->nextSibling(); |
1414 if (m_last == oldChild) | 1410 if (m_last == oldChild) |
1415 m_last = oldChild->previousSibling(); | 1411 m_last = oldChild->previousSibling(); |
1416 | 1412 |
(...skipping 26 matching lines...) Expand all Loading... |
1443 dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); | 1439 dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); |
1444 | 1440 |
1445 return oldChild; | 1441 return oldChild; |
1446 } | 1442 } |
1447 | 1443 |
1448 void RenderLayer::removeOnlyThisLayer() | 1444 void RenderLayer::removeOnlyThisLayer() |
1449 { | 1445 { |
1450 if (!m_parent) | 1446 if (!m_parent) |
1451 return; | 1447 return; |
1452 | 1448 |
1453 compositor()->layerWillBeRemoved(m_parent, this); | |
1454 | |
1455 // Dirty the clip rects. | |
1456 m_clipper.clearClipRectsIncludingDescendants(); | 1449 m_clipper.clearClipRectsIncludingDescendants(); |
1457 | 1450 |
1458 RenderLayer* nextSib = nextSibling(); | 1451 RenderLayer* nextSib = nextSibling(); |
1459 | 1452 |
1460 // Remove the child reflection layer before moving other child layers. | 1453 // Remove the child reflection layer before moving other child layers. |
1461 // The reflection layer should not be moved to the parent. | 1454 // The reflection layer should not be moved to the parent. |
1462 if (m_reflectionInfo) | 1455 if (m_reflectionInfo) |
1463 removeChild(m_reflectionInfo->reflectionLayer()); | 1456 removeChild(m_reflectionInfo->reflectionLayer()); |
1464 | 1457 |
1465 // Now walk our kids and reattach them to our parent. | 1458 // Now walk our kids and reattach them to our parent. |
(...skipping 2408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3874 } | 3867 } |
3875 } | 3868 } |
3876 | 3869 |
3877 void showLayerTree(const WebCore::RenderObject* renderer) | 3870 void showLayerTree(const WebCore::RenderObject* renderer) |
3878 { | 3871 { |
3879 if (!renderer) | 3872 if (!renderer) |
3880 return; | 3873 return; |
3881 showLayerTree(renderer->enclosingLayer()); | 3874 showLayerTree(renderer->enclosingLayer()); |
3882 } | 3875 } |
3883 #endif | 3876 #endif |
OLD | NEW |