| 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 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 { | 1212 { |
| 1213 if (!m_parent) | 1213 if (!m_parent) |
| 1214 return; | 1214 return; |
| 1215 | 1215 |
| 1216 { | 1216 { |
| 1217 DisableCompositingQueryAsserts disabler; // We need the current composit
ing status. | 1217 DisableCompositingQueryAsserts disabler; // We need the current composit
ing status. |
| 1218 if (isPaintInvalidationContainer()) { | 1218 if (isPaintInvalidationContainer()) { |
| 1219 // Our children will be reparented and contained by a new paint inva
lidation container, | 1219 // Our children will be reparented and contained by a new paint inva
lidation container, |
| 1220 // so need paint invalidation. CompositingUpdate can't see this laye
r (which has been | 1220 // so need paint invalidation. CompositingUpdate can't see this laye
r (which has been |
| 1221 // removed) so won't do this for us. | 1221 // removed) so won't do this for us. |
| 1222 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants()
; | 1222 layoutObject()->setShouldDoFullPaintInvalidationIncludingNonComposit
ingDescendants(); |
| 1223 } | 1223 } |
| 1224 } | 1224 } |
| 1225 | 1225 |
| 1226 m_clipper.clearClipRectsIncludingDescendants(); | 1226 m_clipper.clearClipRectsIncludingDescendants(); |
| 1227 | 1227 |
| 1228 DeprecatedPaintLayer* nextSib = nextSibling(); | 1228 DeprecatedPaintLayer* nextSib = nextSibling(); |
| 1229 | 1229 |
| 1230 // Remove the child reflection layer before moving other child layers. | 1230 // Remove the child reflection layer before moving other child layers. |
| 1231 // The reflection layer should not be moved to the parent. | 1231 // The reflection layer should not be moved to the parent. |
| 1232 if (m_reflectionInfo) | 1232 if (m_reflectionInfo) |
| (...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2734 iter->value.append(physicalBoundingBox(parentLayer)); | 2734 iter->value.append(physicalBoundingBox(parentLayer)); |
| 2735 } | 2735 } |
| 2736 } | 2736 } |
| 2737 } else { | 2737 } else { |
| 2738 rect.append(logicalBoundingBox()); | 2738 rect.append(logicalBoundingBox()); |
| 2739 rects.set(this, rect); | 2739 rects.set(this, rect); |
| 2740 } | 2740 } |
| 2741 } | 2741 } |
| 2742 } | 2742 } |
| 2743 | 2743 |
| 2744 void DeprecatedPaintLayer::setShouldDoFullPaintInvalidationIncludingNonCompositi
ngDescendants() | |
| 2745 { | |
| 2746 layoutObject()->setShouldDoFullPaintInvalidation(); | |
| 2747 | |
| 2748 // Disable for reading compositingState() in isPaintInvalidationContainer()
below. | |
| 2749 DisableCompositingQueryAsserts disabler; | |
| 2750 | |
| 2751 for (DeprecatedPaintLayer* child = firstChild(); child; child = child->nextS
ibling()) { | |
| 2752 if (!child->isPaintInvalidationContainer()) | |
| 2753 child->setShouldDoFullPaintInvalidationIncludingNonCompositingDescen
dants(); | |
| 2754 } | |
| 2755 } | |
| 2756 | |
| 2757 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts() | 2744 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts() |
| 2758 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { } | 2745 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { } |
| 2759 | 2746 |
| 2760 } // namespace blink | 2747 } // namespace blink |
| 2761 | 2748 |
| 2762 #ifndef NDEBUG | 2749 #ifndef NDEBUG |
| 2763 // FIXME: Rename? | 2750 // FIXME: Rename? |
| 2764 void showLayerTree(const blink::DeprecatedPaintLayer* layer) | 2751 void showLayerTree(const blink::DeprecatedPaintLayer* layer) |
| 2765 { | 2752 { |
| 2766 if (!layer) { | 2753 if (!layer) { |
| 2767 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2754 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 2768 return; | 2755 return; |
| 2769 } | 2756 } |
| 2770 | 2757 |
| 2771 if (blink::LocalFrame* frame = layer->layoutObject()->frame()) { | 2758 if (blink::LocalFrame* frame = layer->layoutObject()->frame()) { |
| 2772 WTF::String output = externalRepresentation(frame, blink::LayoutAsTextSh
owAllLayers | blink::LayoutAsTextShowLayerNesting | blink::LayoutAsTextShowCompo
sitedLayers | blink::LayoutAsTextShowAddresses | blink::LayoutAsTextShowIDAndCla
ss | blink::LayoutAsTextDontUpdateLayout | blink::LayoutAsTextShowLayoutState); | 2759 WTF::String output = externalRepresentation(frame, blink::LayoutAsTextSh
owAllLayers | blink::LayoutAsTextShowLayerNesting | blink::LayoutAsTextShowCompo
sitedLayers | blink::LayoutAsTextShowAddresses | blink::LayoutAsTextShowIDAndCla
ss | blink::LayoutAsTextDontUpdateLayout | blink::LayoutAsTextShowLayoutState); |
| 2773 fprintf(stderr, "%s\n", output.utf8().data()); | 2760 fprintf(stderr, "%s\n", output.utf8().data()); |
| 2774 } | 2761 } |
| 2775 } | 2762 } |
| 2776 | 2763 |
| 2777 void showLayerTree(const blink::LayoutObject* layoutObject) | 2764 void showLayerTree(const blink::LayoutObject* layoutObject) |
| 2778 { | 2765 { |
| 2779 if (!layoutObject) { | 2766 if (!layoutObject) { |
| 2780 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2767 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 2781 return; | 2768 return; |
| 2782 } | 2769 } |
| 2783 showLayerTree(layoutObject->enclosingLayer()); | 2770 showLayerTree(layoutObject->enclosingLayer()); |
| 2784 } | 2771 } |
| 2785 #endif | 2772 #endif |
| OLD | NEW |