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 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 if (paintInvalidationContainer == this) | 1094 if (paintInvalidationContainer == this) |
1095 return; | 1095 return; |
1096 | 1096 |
1097 bool containerSkipped; | 1097 bool containerSkipped; |
1098 LayoutObject* o = container(paintInvalidationContainer, &containerSkipped); | 1098 LayoutObject* o = container(paintInvalidationContainer, &containerSkipped); |
1099 if (!o) | 1099 if (!o) |
1100 return; | 1100 return; |
1101 | 1101 |
1102 LayoutPoint topLeft = rect.location(); | 1102 LayoutPoint topLeft = rect.location(); |
1103 | 1103 |
1104 if (o->isLayoutBlockFlow() && !style()->hasOutOfFlowPosition()) { | |
1105 LayoutBlock* cb = toLayoutBlock(o); | |
1106 if (cb->hasColumns()) { | |
1107 LayoutRect paintInvalidationRect(topLeft, rect.size()); | |
1108 cb->adjustRectForColumns(paintInvalidationRect); | |
1109 topLeft = paintInvalidationRect.location(); | |
1110 rect = paintInvalidationRect; | |
1111 } | |
1112 } | |
1113 | |
1114 if (style()->hasInFlowPosition() && layer()) { | 1104 if (style()->hasInFlowPosition() && layer()) { |
1115 // Apply the in-flow position offset when invalidating a rectangle. The
layer | 1105 // Apply the in-flow position offset when invalidating a rectangle. The
layer |
1116 // is translated, but the layout box isn't, so we need to do this to get
the | 1106 // is translated, but the layout box isn't, so we need to do this to get
the |
1117 // right dirty rect. Since this is called from LayoutObject::setStyle, t
he relative position | 1107 // right dirty rect. Since this is called from LayoutObject::setStyle, t
he relative position |
1118 // flag on the LayoutObject has been cleared, so use the one on the styl
e(). | 1108 // flag on the LayoutObject has been cleared, so use the one on the styl
e(). |
1119 topLeft += layer()->offsetForInFlowPosition(); | 1109 topLeft += layer()->offsetForInFlowPosition(); |
1120 } | 1110 } |
1121 | 1111 |
1122 // FIXME: We ignore the lightweight clipping rect that controls use, since i
f |o| is in mid-layout, | 1112 // FIXME: We ignore the lightweight clipping rect that controls use, since i
f |o| is in mid-layout, |
1123 // its controlClipRect will be wrong. For overflow clip we use the values ca
ched by the layer. | 1113 // its controlClipRect will be wrong. For overflow clip we use the values ca
ched by the layer. |
(...skipping 21 matching lines...) Expand all Loading... |
1145 | 1135 |
1146 LayoutSize offset; | 1136 LayoutSize offset; |
1147 if (isRelPositioned()) | 1137 if (isRelPositioned()) |
1148 offset += offsetForInFlowPosition(); | 1138 offset += offsetForInFlowPosition(); |
1149 | 1139 |
1150 offset += container->columnOffset(point); | 1140 offset += container->columnOffset(point); |
1151 | 1141 |
1152 if (container->hasOverflowClip()) | 1142 if (container->hasOverflowClip()) |
1153 offset -= toLayoutBox(container)->scrolledContentOffset(); | 1143 offset -= toLayoutBox(container)->scrolledContentOffset(); |
1154 | 1144 |
1155 if (offsetDependsOnPoint) { | 1145 if (offsetDependsOnPoint) |
1156 *offsetDependsOnPoint = container->hasColumns() | 1146 *offsetDependsOnPoint = (container->isBox() && container->style()->isFli
ppedBlocksWritingMode()) || container->isLayoutFlowThread(); |
1157 || (container->isBox() && container->style()->isFlippedBlocksWriting
Mode()) | |
1158 || container->isLayoutFlowThread(); | |
1159 } | |
1160 | 1147 |
1161 return offset; | 1148 return offset; |
1162 } | 1149 } |
1163 | 1150 |
1164 void LayoutInline::mapLocalToContainer(const LayoutBoxModelObject* paintInvalida
tionContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* w
asFixed, const PaintInvalidationState* paintInvalidationState) const | 1151 void LayoutInline::mapLocalToContainer(const LayoutBoxModelObject* paintInvalida
tionContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* w
asFixed, const PaintInvalidationState* paintInvalidationState) const |
1165 { | 1152 { |
1166 if (paintInvalidationContainer == this) | 1153 if (paintInvalidationContainer == this) |
1167 return; | 1154 return; |
1168 | 1155 |
1169 if (paintInvalidationState && paintInvalidationState->canMapToContainer(pain
tInvalidationContainer)) { | 1156 if (paintInvalidationState && paintInvalidationState->canMapToContainer(pain
tInvalidationContainer)) { |
1170 LayoutSize offset = paintInvalidationState->paintOffset(); | 1157 LayoutSize offset = paintInvalidationState->paintOffset(); |
1171 if (style()->hasInFlowPosition() && layer()) | 1158 if (style()->hasInFlowPosition() && layer()) |
1172 offset += layer()->offsetForInFlowPosition(); | 1159 offset += layer()->offsetForInFlowPosition(); |
1173 transformState.move(offset); | 1160 transformState.move(offset); |
1174 return; | 1161 return; |
1175 } | 1162 } |
1176 | 1163 |
1177 bool containerSkipped; | 1164 bool containerSkipped; |
1178 LayoutObject* o = container(paintInvalidationContainer, &containerSkipped); | 1165 LayoutObject* o = container(paintInvalidationContainer, &containerSkipped); |
1179 if (!o) | 1166 if (!o) |
1180 return; | 1167 return; |
1181 | 1168 |
1182 if (mode & ApplyContainerFlip && o->isBox()) { | 1169 if (mode & ApplyContainerFlip && o->isBox()) { |
1183 if (o->style()->isFlippedBlocksWritingMode()) { | 1170 if (o->style()->isFlippedBlocksWritingMode()) { |
1184 IntPoint centerPoint = roundedIntPoint(transformState.mappedPoint())
; | 1171 IntPoint centerPoint = roundedIntPoint(transformState.mappedPoint())
; |
1185 transformState.move(toLayoutBox(o)->flipForWritingModeIncludingColum
ns(centerPoint) - centerPoint); | 1172 transformState.move(toLayoutBox(o)->flipForWritingMode(LayoutPoint(c
enterPoint)) - centerPoint); |
1186 } | 1173 } |
1187 mode &= ~ApplyContainerFlip; | 1174 mode &= ~ApplyContainerFlip; |
1188 } | 1175 } |
1189 | 1176 |
1190 LayoutSize containerOffset = offsetFromContainer(o, roundedLayoutPoint(trans
formState.mappedPoint())); | 1177 LayoutSize containerOffset = offsetFromContainer(o, roundedLayoutPoint(trans
formState.mappedPoint())); |
1191 | 1178 |
1192 bool preserve3D = mode & UseTransforms && (o->style()->preserves3D() || styl
e()->preserves3D()); | 1179 bool preserve3D = mode & UseTransforms && (o->style()->preserves3D() || styl
e()->preserves3D()); |
1193 if (mode & UseTransforms && shouldUseTransformFromContainer(o)) { | 1180 if (mode & UseTransforms && shouldUseTransformFromContainer(o)) { |
1194 TransformationMatrix t; | 1181 TransformationMatrix t; |
1195 getTransformFromContainer(o, containerOffset, t); | 1182 getTransformFromContainer(o, containerOffset, t); |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1444 } | 1431 } |
1445 | 1432 |
1446 void LayoutInline::invalidateDisplayItemClients(const LayoutBoxModelObject& pain
tInvalidationContainer) const | 1433 void LayoutInline::invalidateDisplayItemClients(const LayoutBoxModelObject& pain
tInvalidationContainer) const |
1447 { | 1434 { |
1448 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine
r); | 1435 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine
r); |
1449 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) | 1436 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) |
1450 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box); | 1437 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box); |
1451 } | 1438 } |
1452 | 1439 |
1453 } // namespace blink | 1440 } // namespace blink |
OLD | NEW |