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 2870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2881 return; | 2881 return; |
2882 } | 2882 } |
2883 | 2883 |
2884 PaintLayer* container = layer->compositingContainer(); | 2884 PaintLayer* container = layer->compositingContainer(); |
2885 if (!container) { | 2885 if (!container) { |
2886 LayoutObject* owner = layer->layoutObject()->frame()->ownerLayoutObj
ect(); | 2886 LayoutObject* owner = layer->layoutObject()->frame()->ownerLayoutObj
ect(); |
2887 if (!owner) | 2887 if (!owner) |
2888 break; | 2888 break; |
2889 container = owner->enclosingLayer(); | 2889 container = owner->enclosingLayer(); |
2890 } | 2890 } |
| 2891 |
2891 if (container->m_needsRepaint) | 2892 if (container->m_needsRepaint) |
2892 break; | 2893 break; |
| 2894 |
2893 container->setNeedsRepaintInternal(); | 2895 container->setNeedsRepaintInternal(); |
2894 layer = container; | 2896 layer = container; |
2895 } | 2897 } |
2896 } | 2898 } |
2897 | 2899 |
2898 void PaintLayer::clearNeedsRepaintRecursively() | 2900 void PaintLayer::clearNeedsRepaintRecursively() |
2899 { | 2901 { |
2900 for (PaintLayer* child = firstChild(); child; child = child->nextSibling()) | 2902 for (PaintLayer* child = firstChild(); child; child = child->nextSibling()) |
2901 child->clearNeedsRepaintRecursively(); | 2903 child->clearNeedsRepaintRecursively(); |
2902 m_needsRepaint = false; | 2904 m_needsRepaint = false; |
2903 } | 2905 } |
2904 | 2906 |
2905 PaintTiming* PaintLayer::paintTiming() | 2907 PaintTiming* PaintLayer::paintTiming() |
2906 { | 2908 { |
2907 if (Node* node = layoutObject()->node()) | 2909 if (Node* node = layoutObject()->node()) |
2908 return &PaintTiming::from(node->document()); | 2910 return &PaintTiming::from(node->document()); |
2909 return nullptr; | 2911 return nullptr; |
2910 } | 2912 } |
2911 | 2913 |
| 2914 void PaintLayer::endShouldKeepAliveAllClientsRecursive() |
| 2915 { |
| 2916 for (PaintLayer* child = firstChild(); child; child = child->nextSibling()) |
| 2917 child->endShouldKeepAliveAllClientsRecursive(); |
| 2918 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
| 2919 DisplayItemClient::endShouldKeepAliveAllClients(this); |
| 2920 #endif |
| 2921 } |
| 2922 |
2912 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts() | 2923 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts() |
2913 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { } | 2924 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { } |
2914 | 2925 |
2915 } // namespace blink | 2926 } // namespace blink |
2916 | 2927 |
2917 #ifndef NDEBUG | 2928 #ifndef NDEBUG |
2918 // FIXME: Rename? | 2929 // FIXME: Rename? |
2919 void showLayerTree(const blink::PaintLayer* layer) | 2930 void showLayerTree(const blink::PaintLayer* layer) |
2920 { | 2931 { |
2921 if (!layer) { | 2932 if (!layer) { |
2922 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2933 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
2923 return; | 2934 return; |
2924 } | 2935 } |
2925 | 2936 |
2926 if (blink::LocalFrame* frame = layer->layoutObject()->frame()) { | 2937 if (blink::LocalFrame* frame = layer->layoutObject()->frame()) { |
2927 WTF::String output = externalRepresentation(frame, blink::LayoutAsTextSh
owAllLayers | blink::LayoutAsTextShowLayerNesting | blink::LayoutAsTextShowCompo
sitedLayers | blink::LayoutAsTextShowAddresses | blink::LayoutAsTextShowIDAndCla
ss | blink::LayoutAsTextDontUpdateLayout | blink::LayoutAsTextShowLayoutState, l
ayer); | 2938 WTF::String output = externalRepresentation(frame, blink::LayoutAsTextSh
owAllLayers | blink::LayoutAsTextShowLayerNesting | blink::LayoutAsTextShowCompo
sitedLayers | blink::LayoutAsTextShowAddresses | blink::LayoutAsTextShowIDAndCla
ss | blink::LayoutAsTextDontUpdateLayout | blink::LayoutAsTextShowLayoutState, l
ayer); |
2928 fprintf(stderr, "%s\n", output.utf8().data()); | 2939 fprintf(stderr, "%s\n", output.utf8().data()); |
2929 } | 2940 } |
2930 } | 2941 } |
2931 | 2942 |
2932 void showLayerTree(const blink::LayoutObject* layoutObject) | 2943 void showLayerTree(const blink::LayoutObject* layoutObject) |
2933 { | 2944 { |
2934 if (!layoutObject) { | 2945 if (!layoutObject) { |
2935 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2946 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
2936 return; | 2947 return; |
2937 } | 2948 } |
2938 showLayerTree(layoutObject->enclosingLayer()); | 2949 showLayerTree(layoutObject->enclosingLayer()); |
2939 } | 2950 } |
2940 #endif | 2951 #endif |
OLD | NEW |