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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 bool RenderLayer::hasAncestorWithFilterOutsets() const | 1068 bool RenderLayer::hasAncestorWithFilterOutsets() const |
1069 { | 1069 { |
1070 for (const RenderLayer* curr = this; curr; curr = curr->parent()) { | 1070 for (const RenderLayer* curr = this; curr; curr = curr->parent()) { |
1071 RenderLayerModelObject* renderer = curr->renderer(); | 1071 RenderLayerModelObject* renderer = curr->renderer(); |
1072 if (renderer->style()->hasFilterOutsets()) | 1072 if (renderer->style()->hasFilterOutsets()) |
1073 return true; | 1073 return true; |
1074 } | 1074 } |
1075 return false; | 1075 return false; |
1076 } | 1076 } |
1077 | 1077 |
1078 RenderLayer* RenderLayer::transparentPaintingAncestor() | |
1079 { | |
1080 if (hasCompositedLayerMapping()) | |
1081 return 0; | |
1082 | |
1083 for (RenderLayer* curr = parent(); curr; curr = curr->parent()) { | |
1084 if (curr->hasCompositedLayerMapping()) | |
1085 return 0; | |
1086 if (curr->isTransparent()) | |
1087 return curr; | |
1088 } | |
1089 return 0; | |
1090 } | |
1091 | |
1092 static void expandClipRectForDescendantsAndReflection(LayoutRect& clipRect, cons
t RenderLayer* layer, const RenderLayer* rootLayer, | 1078 static void expandClipRectForDescendantsAndReflection(LayoutRect& clipRect, cons
t RenderLayer* layer, const RenderLayer* rootLayer, |
1093 RenderLayer::TransparencyClipBoxBehavior transparencyBehavior, const LayoutS
ize& subPixelAccumulation, PaintBehavior paintBehavior) | 1079 RenderLayer::TransparencyClipBoxBehavior transparencyBehavior, const LayoutS
ize& subPixelAccumulation, PaintBehavior paintBehavior) |
1094 { | 1080 { |
1095 // If we have a mask, then the clip is limited to the border box area (and t
here is | 1081 // If we have a mask, then the clip is limited to the border box area (and t
here is |
1096 // no need to examine child layers). | 1082 // no need to examine child layers). |
1097 if (!layer->renderer()->hasMask()) { | 1083 if (!layer->renderer()->hasMask()) { |
1098 // Note: we don't have to walk z-order lists since transparent elements
always establish | 1084 // Note: we don't have to walk z-order lists since transparent elements
always establish |
1099 // a stacking container. This means we can just walk the layer tree dire
ctly. | 1085 // a stacking container. This means we can just walk the layer tree dire
ctly. |
1100 for (RenderLayer* curr = layer->firstChild(); curr; curr = curr->nextSib
ling()) { | 1086 for (RenderLayer* curr = layer->firstChild(); curr; curr = curr->nextSib
ling()) { |
1101 if (!layer->reflectionInfo() || layer->reflectionInfo()->reflectionL
ayer() != curr) | 1087 if (!layer->reflectionInfo() || layer->reflectionInfo()->reflectionL
ayer() != curr) |
(...skipping 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2854 } | 2840 } |
2855 } | 2841 } |
2856 | 2842 |
2857 void showLayerTree(const blink::RenderObject* renderer) | 2843 void showLayerTree(const blink::RenderObject* renderer) |
2858 { | 2844 { |
2859 if (!renderer) | 2845 if (!renderer) |
2860 return; | 2846 return; |
2861 showLayerTree(renderer->enclosingLayer()); | 2847 showLayerTree(renderer->enclosingLayer()); |
2862 } | 2848 } |
2863 #endif | 2849 #endif |
OLD | NEW |