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 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1121 break; | 1121 break; |
1122 } | 1122 } |
1123 } | 1123 } |
1124 | 1124 |
1125 return resultLayer; | 1125 return resultLayer; |
1126 } | 1126 } |
1127 | 1127 |
1128 bool RenderLayer::intersectsDamageRect(const LayoutRect& layerBounds, const Layo
utRect& damageRect, const RenderLayer* rootLayer, const LayoutPoint* offsetFromR
oot) const | 1128 bool RenderLayer::intersectsDamageRect(const LayoutRect& layerBounds, const Layo
utRect& damageRect, const RenderLayer* rootLayer, const LayoutPoint* offsetFromR
oot) const |
1129 { | 1129 { |
1130 // Always examine the canvas and the root. | 1130 // Always examine the canvas and the root. |
1131 // FIXME: Could eliminate the isDocumentElement() check if we fix background
painting so that the RenderView | 1131 if (isRootLayer()) |
1132 // paints the root's background. | |
1133 if (isRootLayer() || renderer()->isDocumentElement()) | |
1134 return true; | 1132 return true; |
1135 | 1133 |
1136 // If we aren't an inline flow, and our layer bounds do intersect the damage
rect, then we | 1134 // If we aren't an inline flow, and our layer bounds do intersect the damage
rect, then we |
1137 // can go ahead and return true. | 1135 // can go ahead and return true. |
1138 RenderView* view = renderer()->view(); | 1136 RenderView* view = renderer()->view(); |
1139 ASSERT(view); | 1137 ASSERT(view); |
1140 if (view && !renderer()->isRenderInline()) { | 1138 if (view && !renderer()->isRenderInline()) { |
1141 if (layerBounds.intersects(damageRect)) | 1139 if (layerBounds.intersects(damageRect)) |
1142 return true; | 1140 return true; |
1143 } | 1141 } |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1407 } | 1405 } |
1408 } | 1406 } |
1409 | 1407 |
1410 void showLayerTree(const blink::RenderObject* renderer) | 1408 void showLayerTree(const blink::RenderObject* renderer) |
1411 { | 1409 { |
1412 if (!renderer) | 1410 if (!renderer) |
1413 return; | 1411 return; |
1414 showLayerTree(renderer->enclosingLayer()); | 1412 showLayerTree(renderer->enclosingLayer()); |
1415 } | 1413 } |
1416 #endif | 1414 #endif |
OLD | NEW |