| 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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 | 707 |
| 708 RenderLayer* nextSib = nextSibling(); | 708 RenderLayer* nextSib = nextSibling(); |
| 709 | 709 |
| 710 // Now walk our kids and reattach them to our parent. | 710 // Now walk our kids and reattach them to our parent. |
| 711 RenderLayer* current = m_first; | 711 RenderLayer* current = m_first; |
| 712 while (current) { | 712 while (current) { |
| 713 RenderLayer* next = current->nextSibling(); | 713 RenderLayer* next = current->nextSibling(); |
| 714 removeChild(current); | 714 removeChild(current); |
| 715 m_parent->addChild(current, nextSib); | 715 m_parent->addChild(current, nextSib); |
| 716 | 716 |
| 717 current->renderer()->setShouldDoFullPaintInvalidation(true); | |
| 718 // FIXME: We should call a specialized version of this function. | 717 // FIXME: We should call a specialized version of this function. |
| 719 current->updateLayerPositionsAfterLayout(); | 718 current->updateLayerPositionsAfterLayout(); |
| 720 current = next; | 719 current = next; |
| 721 } | 720 } |
| 722 | 721 |
| 723 // Remove us from the parent. | 722 // Remove us from the parent. |
| 724 m_parent->removeChild(this); | 723 m_parent->removeChild(this); |
| 725 m_renderer->destroyLayer(); | 724 m_renderer->destroyLayer(); |
| 726 } | 725 } |
| 727 | 726 |
| (...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1996 // If the filter fails to build, remove it from the layer. It will still att
empt to | 1995 // If the filter fails to build, remove it from the layer. It will still att
empt to |
| 1997 // go through regular processing (e.g. compositing), but never apply anythin
g. | 1996 // go through regular processing (e.g. compositing), but never apply anythin
g. |
| 1998 if (!filterInfo->renderer()->build(renderer(), computeFilterOperations(rende
rer()->style()))) | 1997 if (!filterInfo->renderer()->build(renderer(), computeFilterOperations(rende
rer()->style()))) |
| 1999 filterInfo->setRenderer(nullptr); | 1998 filterInfo->setRenderer(nullptr); |
| 2000 } | 1999 } |
| 2001 | 2000 |
| 2002 void RenderLayer::filterNeedsPaintInvalidation() | 2001 void RenderLayer::filterNeedsPaintInvalidation() |
| 2003 { | 2002 { |
| 2004 } | 2003 } |
| 2005 | 2004 |
| 2006 void RenderLayer::setShouldDoFullPaintInvalidationIncludingNonCompositingDescend
ants() | |
| 2007 { | |
| 2008 renderer()->setShouldDoFullPaintInvalidation(true); | |
| 2009 | |
| 2010 for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
{ | |
| 2011 child->setShouldDoFullPaintInvalidationIncludingNonCompositingDescendant
s(); | |
| 2012 } | |
| 2013 } | |
| 2014 | |
| 2015 } // namespace blink | 2005 } // namespace blink |
| 2016 | 2006 |
| 2017 #ifndef NDEBUG | 2007 #ifndef NDEBUG |
| 2018 void showLayerTree(const blink::RenderLayer* layer) | 2008 void showLayerTree(const blink::RenderLayer* layer) |
| 2019 { | 2009 { |
| 2020 if (!layer) | 2010 if (!layer) |
| 2021 return; | 2011 return; |
| 2022 | 2012 |
| 2023 if (blink::LocalFrame* frame = layer->renderer()->frame()) { | 2013 if (blink::LocalFrame* frame = layer->renderer()->frame()) { |
| 2024 WTF::String output = externalRepresentation(frame, blink::RenderAsTextSh
owAllLayers | blink::RenderAsTextShowLayerNesting | blink::RenderAsTextShowCompo
sitedLayers | blink::RenderAsTextShowAddresses | blink::RenderAsTextShowIDAndCla
ss | blink::RenderAsTextDontUpdateLayout | blink::RenderAsTextShowLayoutState); | 2014 WTF::String output = externalRepresentation(frame, blink::RenderAsTextSh
owAllLayers | blink::RenderAsTextShowLayerNesting | blink::RenderAsTextShowCompo
sitedLayers | blink::RenderAsTextShowAddresses | blink::RenderAsTextShowIDAndCla
ss | blink::RenderAsTextDontUpdateLayout | blink::RenderAsTextShowLayoutState); |
| 2025 fprintf(stderr, "%s\n", output.utf8().data()); | 2015 fprintf(stderr, "%s\n", output.utf8().data()); |
| 2026 } | 2016 } |
| 2027 } | 2017 } |
| 2028 | 2018 |
| 2029 void showLayerTree(const blink::RenderObject* renderer) | 2019 void showLayerTree(const blink::RenderObject* renderer) |
| 2030 { | 2020 { |
| 2031 if (!renderer) | 2021 if (!renderer) |
| 2032 return; | 2022 return; |
| 2033 showLayerTree(renderer->enclosingLayer()); | 2023 showLayerTree(renderer->enclosingLayer()); |
| 2034 } | 2024 } |
| 2035 #endif | 2025 #endif |
| OLD | NEW |