OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 // is translated, but the layout box isn't, so we need to do this to get
the | 1097 // is translated, but the layout box isn't, so we need to do this to get
the |
1098 // right dirty rect. Since this is called from LayoutObject::setStyle, t
he relative position | 1098 // right dirty rect. Since this is called from LayoutObject::setStyle, t
he relative position |
1099 // flag on the LayoutObject has been cleared, so use the one on the styl
e(). | 1099 // flag on the LayoutObject has been cleared, so use the one on the styl
e(). |
1100 topLeft += layer()->offsetForInFlowPosition(); | 1100 topLeft += layer()->offsetForInFlowPosition(); |
1101 } | 1101 } |
1102 | 1102 |
1103 // FIXME: We ignore the lightweight clipping rect that controls use, since i
f |o| is in mid-layout, | 1103 // FIXME: We ignore the lightweight clipping rect that controls use, since i
f |o| is in mid-layout, |
1104 // its controlClipRect will be wrong. For overflow clip we use the values ca
ched by the layer. | 1104 // its controlClipRect will be wrong. For overflow clip we use the values ca
ched by the layer. |
1105 rect.setLocation(topLeft); | 1105 rect.setLocation(topLeft); |
1106 if (o->hasOverflowClip()) { | 1106 if (o->hasOverflowClip()) { |
1107 LayoutBox* containerBox = toLayoutBox(o); | 1107 toLayoutBox(o)->applyCachedClipAndScrollOffsetForPaintInvalidationIfNeed
ed(paintInvalidationContainer, rect); |
1108 if (o == paintInvalidationContainer) | |
1109 containerBox->applyCachedScrollOffsetForPaintInvalidation(rect); | |
1110 else | |
1111 containerBox->applyCachedClipAndScrollOffsetForPaintInvalidation(rec
t); | |
1112 if (rect.isEmpty()) | 1108 if (rect.isEmpty()) |
1113 return; | 1109 return; |
1114 } | 1110 } |
1115 | 1111 |
1116 if (containerSkipped) { | 1112 if (containerSkipped) { |
1117 // If the paintInvalidationContainer is below o, then we need to map the
rect into paintInvalidationContainer's coordinates. | 1113 // If the paintInvalidationContainer is below o, then we need to map the
rect into paintInvalidationContainer's coordinates. |
1118 LayoutSize containerOffset = paintInvalidationContainer->offsetFromAnces
torContainer(o); | 1114 LayoutSize containerOffset = paintInvalidationContainer->offsetFromAnces
torContainer(o); |
1119 rect.move(-containerOffset); | 1115 rect.move(-containerOffset); |
1120 return; | 1116 return; |
1121 } | 1117 } |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 { | 1425 { |
1430 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine
r, invalidationReason, paintInvalidationRect); | 1426 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine
r, invalidationReason, paintInvalidationRect); |
1431 | 1427 |
1432 // Use the paintInvalidationRect of LayoutInline for inline boxes, which sav
es the cost to calculate paint invalidation rect | 1428 // Use the paintInvalidationRect of LayoutInline for inline boxes, which sav
es the cost to calculate paint invalidation rect |
1433 // for every inline box. This won't cause more rasterization invalidations b
ecause the whole LayoutInline is being invalidated. | 1429 // for every inline box. This won't cause more rasterization invalidations b
ecause the whole LayoutInline is being invalidated. |
1434 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) | 1430 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) |
1435 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in
validationReason, paintInvalidationRect); | 1431 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in
validationReason, paintInvalidationRect); |
1436 } | 1432 } |
1437 | 1433 |
1438 } // namespace blink | 1434 } // namespace blink |
OLD | NEW |