OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 | 1011 |
1012 PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfi
elds.fullPaintInvalidationReason(); } | 1012 PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfi
elds.fullPaintInvalidationReason(); } |
1013 bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInv
alidationReason() != PaintInvalidationNone; } | 1013 bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInv
alidationReason() != PaintInvalidationNone; } |
1014 void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalid
ationFull); | 1014 void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalid
ationFull); |
1015 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida
tionReason(PaintInvalidationNone); } | 1015 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida
tionReason(PaintInvalidationNone); } |
1016 | 1016 |
1017 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv
alidateOverflowForPaint(); } | 1017 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv
alidateOverflowForPaint(); } |
1018 | 1018 |
1019 virtual void clearPaintInvalidationState(const PaintInvalidationState&); | 1019 virtual void clearPaintInvalidationState(const PaintInvalidationState&); |
1020 | 1020 |
1021 // Indicates whether this layout object was re-laid-out since the last frame
. | |
1022 // The flag will be cleared during invalidateTreeIfNeeded. | |
1023 bool layoutDidGetCalledSinceLastFrame() const { return m_bitfields.layoutDid
GetCalledSinceLastFrame(); } | |
1024 | |
1025 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval
idation(); } | 1021 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval
idation(); } |
1026 void setMayNeedPaintInvalidation(); | 1022 void setMayNeedPaintInvalidation(); |
1027 | 1023 |
1028 bool shouldInvalidateSelection() const { return m_bitfields.shouldInvalidate
Selection(); } | 1024 bool shouldInvalidateSelection() const { return m_bitfields.shouldInvalidate
Selection(); } |
1029 void setShouldInvalidateSelection(); | 1025 void setShouldInvalidateSelection(); |
1030 void clearShouldInvalidateSelection() { m_bitfields.setShouldInvalidateSelec
tion(false); } | |
1031 | |
1032 bool neededLayoutBecauseOfChildren() const { return m_bitfields.neededLayout
BecauseOfChildren(); } | |
1033 void setNeededLayoutBecauseOfChildren(bool b) { m_bitfields.setNeededLayoutB
ecauseOfChildren(b); } | |
1034 | 1026 |
1035 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva
lidationState) const | 1027 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva
lidationState) const |
1036 { | 1028 { |
1037 // Should check for paint invalidation if some ancestor changed location
, because this object | 1029 // Should check for paint invalidation if some ancestor changed location
, because this object |
1038 // may also change paint offset or location in paint invalidation contai
ner, even if there is | 1030 // may also change paint offset or location in paint invalidation contai
ner, even if there is |
1039 // no paint invalidation flag set. | 1031 // no paint invalidation flag set. |
1040 return paintInvalidationState.ancestorHadPaintInvalidationForLocationCha
nge() || shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState(); | 1032 return paintInvalidationState.ancestorHadPaintInvalidationForLocationCha
nge() || shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState(); |
1041 } | 1033 } |
1042 | 1034 |
1043 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con
st | 1035 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con
st |
1044 { | 1036 { |
1045 return layoutDidGetCalledSinceLastFrame() || mayNeedPaintInvalidation()
|| shouldDoFullPaintInvalidation() || shouldInvalidateSelection(); | 1037 return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() ||
shouldInvalidateSelection() || m_bitfields.childShouldCheckForPaintInvalidation(
); |
1046 } | 1038 } |
1047 | 1039 |
1048 virtual bool supportsPaintInvalidationStateCachedOffsets() const { return !h
asTransformRelatedProperty() && !hasReflection() && !style()->isFlippedBlocksWri
tingMode(); } | 1040 virtual bool supportsPaintInvalidationStateCachedOffsets() const { return !h
asTransformRelatedProperty() && !hasReflection() && !style()->isFlippedBlocksWri
tingMode(); } |
1049 | 1041 |
1050 virtual LayoutRect viewRect() const; | 1042 virtual LayoutRect viewRect() const; |
1051 | 1043 |
1052 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi
s); } | 1044 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi
s); } |
1053 | 1045 |
1054 void invalidateDisplayItemClient(const DisplayItemClientWrapper&) const; | 1046 void invalidateDisplayItemClient(const DisplayItemClientWrapper&) const; |
1055 void invalidateDisplayItemClientForNonCompositingDescendants() const { inval
idateDisplayItemClientForNonCompositingDescendantsOf(*this); } | 1047 void invalidateDisplayItemClientForNonCompositingDescendants() const { inval
idateDisplayItemClientForNonCompositingDescendantsOf(*this); } |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1137 // Overrides should call the superclass at the end. m_style will be 0 the fi
rst time | 1129 // Overrides should call the superclass at the end. m_style will be 0 the fi
rst time |
1138 // this function will be called. | 1130 // this function will be called. |
1139 virtual void styleWillChange(StyleDifference, const ComputedStyle& newStyle)
; | 1131 virtual void styleWillChange(StyleDifference, const ComputedStyle& newStyle)
; |
1140 // Overrides should call the superclass at the start. |oldStyle| will be 0 t
he first | 1132 // Overrides should call the superclass at the start. |oldStyle| will be 0 t
he first |
1141 // time this function is called. | 1133 // time this function is called. |
1142 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle); | 1134 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle); |
1143 void propagateStyleToAnonymousChildren(bool blockChildrenOnly = false); | 1135 void propagateStyleToAnonymousChildren(bool blockChildrenOnly = false); |
1144 virtual void updateAnonymousChildStyle(const LayoutObject& child, ComputedSt
yle& style) const { } | 1136 virtual void updateAnonymousChildStyle(const LayoutObject& child, ComputedSt
yle& style) const { } |
1145 | 1137 |
1146 protected: | 1138 protected: |
1147 void setSelfMayNeedPaintInvalidation(); | |
1148 | |
1149 virtual void willBeDestroyed(); | 1139 virtual void willBeDestroyed(); |
1150 | 1140 |
1151 virtual void insertedIntoTree(); | 1141 virtual void insertedIntoTree(); |
1152 virtual void willBeRemovedFromTree(); | 1142 virtual void willBeRemovedFromTree(); |
1153 | 1143 |
1154 void setDocumentForAnonymous(Document* document) { ASSERT(isAnonymous()); m_
node = document; } | 1144 void setDocumentForAnonymous(Document* document) { ASSERT(isAnonymous()); m_
node = document; } |
1155 | 1145 |
1156 // Add hit-test rects for the layout tree rooted at this node to the provide
d collection on a | 1146 // Add hit-test rects for the layout tree rooted at this node to the provide
d collection on a |
1157 // per-Layer basis. | 1147 // per-Layer basis. |
1158 // currentLayer must be the enclosing layer, and layerOffset is the current
offset within | 1148 // currentLayer must be the enclosing layer, and layerOffset is the current
offset within |
(...skipping 12 matching lines...) Expand all Loading... |
1171 const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositi
onFromPaintInvalidationBacking, | 1161 const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositi
onFromPaintInvalidationBacking, |
1172 const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositi
onFromPaintInvalidationBacking) const; | 1162 const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositi
onFromPaintInvalidationBacking) const; |
1173 virtual void incrementallyInvalidatePaint(const LayoutBoxModelObject& paintI
nvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds,
const LayoutPoint& positionFromPaintInvalidationBacking); | 1163 virtual void incrementallyInvalidatePaint(const LayoutBoxModelObject& paintI
nvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds,
const LayoutPoint& positionFromPaintInvalidationBacking); |
1174 void fullyInvalidatePaint(const LayoutBoxModelObject& paintInvalidationConta
iner, PaintInvalidationReason, const LayoutRect& oldBounds, const LayoutRect& ne
wBounds); | 1164 void fullyInvalidatePaint(const LayoutBoxModelObject& paintInvalidationConta
iner, PaintInvalidationReason, const LayoutRect& oldBounds, const LayoutRect& ne
wBounds); |
1175 | 1165 |
1176 virtual bool hasNonCompositedScrollbars() const { return false; } | 1166 virtual bool hasNonCompositedScrollbars() const { return false; } |
1177 | 1167 |
1178 #if ENABLE(ASSERT) | 1168 #if ENABLE(ASSERT) |
1179 virtual bool paintInvalidationStateIsDirty() const | 1169 virtual bool paintInvalidationStateIsDirty() const |
1180 { | 1170 { |
1181 return neededLayoutBecauseOfChildren() || shouldCheckForPaintInvalidatio
nRegardlessOfPaintInvalidationState(); | 1171 return m_bitfields.neededLayoutBecauseOfChildren() || shouldCheckForPain
tInvalidationRegardlessOfPaintInvalidationState(); |
1182 } | 1172 } |
1183 #endif | 1173 #endif |
1184 | 1174 |
1185 virtual void invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState& child
PaintInvalidationState); | 1175 virtual void invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState& child
PaintInvalidationState); |
1186 virtual PaintInvalidationReason invalidatePaintIfNeeded(PaintInvalidationSta
te&, const LayoutBoxModelObject& paintInvalidationContainer); | 1176 virtual PaintInvalidationReason invalidatePaintIfNeeded(PaintInvalidationSta
te&, const LayoutBoxModelObject& paintInvalidationContainer); |
1187 | 1177 |
1188 // When this object is invalidated for paint, this method is called to inval
idate any DisplayItemClients | 1178 // When this object is invalidated for paint, this method is called to inval
idate any DisplayItemClients |
1189 // owned by this object, including the object itself, LayoutText/LayoutInlin
e line boxes, etc., | 1179 // owned by this object, including the object itself, LayoutText/LayoutInlin
e line boxes, etc., |
1190 // not including children which will be invalidated normally during invalida
teTreeIfNeeded() and | 1180 // not including children which will be invalidated normally during invalida
teTreeIfNeeded() and |
1191 // parts which are invalidated separately (e.g. scrollbars). | 1181 // parts which are invalidated separately (e.g. scrollbars). |
(...skipping 25 matching lines...) Expand all Loading... |
1217 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make
LayoutBox | 1207 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make
LayoutBox |
1218 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700. | 1208 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700. |
1219 inline void markContainingBlocksForOverflowRecalc(); | 1209 inline void markContainingBlocksForOverflowRecalc(); |
1220 | 1210 |
1221 inline void markContainerChainForPaintInvalidation(); | 1211 inline void markContainerChainForPaintInvalidation(); |
1222 | 1212 |
1223 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject&, PaintIn
validationReason); | 1213 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject&, PaintIn
validationReason); |
1224 | 1214 |
1225 inline void invalidateContainerPreferredLogicalWidths(); | 1215 inline void invalidateContainerPreferredLogicalWidths(); |
1226 | 1216 |
1227 void clearMayNeedPaintInvalidation(); | |
1228 | |
1229 void setLayoutDidGetCalledSinceLastFrame(); | |
1230 void clearLayoutDidGetCalledSinceLastFrame() { m_bitfields.setLayoutDidGetCa
lledSinceLastFrame(false); } | |
1231 | |
1232 void invalidatePaintIncludingNonCompositingDescendantsInternal(const LayoutB
oxModelObject& repaintContainer); | 1217 void invalidatePaintIncludingNonCompositingDescendantsInternal(const LayoutB
oxModelObject& repaintContainer); |
1233 | 1218 |
1234 LayoutRect previousSelectionRectForPaintInvalidation() const; | 1219 LayoutRect previousSelectionRectForPaintInvalidation() const; |
1235 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&); | 1220 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&); |
1236 | 1221 |
1237 const LayoutBoxModelObject* enclosingCompositedContainer() const; | 1222 const LayoutBoxModelObject* enclosingCompositedContainer() const; |
1238 | 1223 |
1239 LayoutFlowThread* locateFlowThreadContainingBlock() const; | 1224 LayoutFlowThread* locateFlowThreadContainingBlock() const; |
1240 void removeFromLayoutFlowThread(); | 1225 void removeFromLayoutFlowThread(); |
1241 void removeFromLayoutFlowThreadRecursive(LayoutFlowThread*); | 1226 void removeFromLayoutFlowThreadRecursive(LayoutFlowThread*); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 IsStaticallyPositioned = 0, | 1269 IsStaticallyPositioned = 0, |
1285 IsRelativelyPositioned = 1, | 1270 IsRelativelyPositioned = 1, |
1286 IsOutOfFlowPositioned = 2, | 1271 IsOutOfFlowPositioned = 2, |
1287 IsStickyPositioned = 3, | 1272 IsStickyPositioned = 3, |
1288 }; | 1273 }; |
1289 | 1274 |
1290 public: | 1275 public: |
1291 LayoutObjectBitfields(Node* node) | 1276 LayoutObjectBitfields(Node* node) |
1292 : m_selfNeedsLayout(false) | 1277 : m_selfNeedsLayout(false) |
1293 , m_shouldInvalidateOverflowForPaint(false) | 1278 , m_shouldInvalidateOverflowForPaint(false) |
1294 // FIXME: We should remove mayNeedPaintInvalidation once we are able
to | 1279 , m_childShouldCheckForPaintInvalidation(false) |
1295 // use the other layout flags to detect the same cases. crbug.com/37
0118 | |
1296 , m_mayNeedPaintInvalidation(false) | 1280 , m_mayNeedPaintInvalidation(false) |
1297 , m_shouldInvalidateSelection(false) | 1281 , m_shouldInvalidateSelection(false) |
1298 , m_neededLayoutBecauseOfChildren(false) | 1282 , m_neededLayoutBecauseOfChildren(false) |
1299 , m_needsPositionedMovementLayout(false) | 1283 , m_needsPositionedMovementLayout(false) |
1300 , m_normalChildNeedsLayout(false) | 1284 , m_normalChildNeedsLayout(false) |
1301 , m_posChildNeedsLayout(false) | 1285 , m_posChildNeedsLayout(false) |
1302 , m_needsSimplifiedNormalFlowLayout(false) | 1286 , m_needsSimplifiedNormalFlowLayout(false) |
1303 , m_preferredLogicalWidthsDirty(false) | 1287 , m_preferredLogicalWidthsDirty(false) |
1304 , m_floating(false) | 1288 , m_floating(false) |
1305 , m_selfNeedsOverflowRecalcAfterStyleChange(false) | 1289 , m_selfNeedsOverflowRecalcAfterStyleChange(false) |
1306 , m_childNeedsOverflowRecalcAfterStyleChange(false) | 1290 , m_childNeedsOverflowRecalcAfterStyleChange(false) |
1307 , m_isAnonymous(!node) | 1291 , m_isAnonymous(!node) |
1308 , m_isText(false) | 1292 , m_isText(false) |
1309 , m_isBox(false) | 1293 , m_isBox(false) |
1310 , m_isInline(true) | 1294 , m_isInline(true) |
1311 , m_isReplaced(false) | 1295 , m_isReplaced(false) |
1312 , m_horizontalWritingMode(true) | 1296 , m_horizontalWritingMode(true) |
1313 , m_isDragging(false) | 1297 , m_isDragging(false) |
1314 , m_hasLayer(false) | 1298 , m_hasLayer(false) |
1315 , m_hasOverflowClip(false) | 1299 , m_hasOverflowClip(false) |
1316 , m_hasTransformRelatedProperty(false) | 1300 , m_hasTransformRelatedProperty(false) |
1317 , m_hasReflection(false) | 1301 , m_hasReflection(false) |
1318 , m_hasCounterNodeMap(false) | 1302 , m_hasCounterNodeMap(false) |
1319 , m_everHadLayout(false) | 1303 , m_everHadLayout(false) |
1320 , m_ancestorLineBoxDirty(false) | 1304 , m_ancestorLineBoxDirty(false) |
1321 , m_layoutDidGetCalledSinceLastFrame(false) | |
1322 , m_hasPendingResourceUpdate(false) | 1305 , m_hasPendingResourceUpdate(false) |
1323 , m_isInsideFlowThread(false) | 1306 , m_isInsideFlowThread(false) |
1324 , m_subtreeChangeListenerRegistered(false) | 1307 , m_subtreeChangeListenerRegistered(false) |
1325 , m_notifiedOfSubtreeChange(false) | 1308 , m_notifiedOfSubtreeChange(false) |
1326 , m_consumesSubtreeChangeNotification(false) | 1309 , m_consumesSubtreeChangeNotification(false) |
1327 , m_childrenInline(false) | 1310 , m_childrenInline(false) |
1328 , m_alwaysCreateLineBoxesForLayoutInline(false) | 1311 , m_alwaysCreateLineBoxesForLayoutInline(false) |
1329 , m_lastBoxDecorationBackgroundObscured(false) | 1312 , m_lastBoxDecorationBackgroundObscured(false) |
1330 , m_isSlowRepaintObject(false) | 1313 , m_isSlowRepaintObject(false) |
1331 , m_positionedState(IsStaticallyPositioned) | 1314 , m_positionedState(IsStaticallyPositioned) |
1332 , m_selectionState(SelectionNone) | 1315 , m_selectionState(SelectionNone) |
1333 , m_boxDecorationBackgroundState(NoBoxDecorationBackground) | 1316 , m_boxDecorationBackgroundState(NoBoxDecorationBackground) |
1334 , m_fullPaintInvalidationReason(PaintInvalidationNone) | 1317 , m_fullPaintInvalidationReason(PaintInvalidationNone) |
1335 { | 1318 { |
1336 } | 1319 } |
1337 | 1320 |
1338 // 32 bits have been used in the first word, and 16 in the second. | 1321 // 32 bits have been used in the first word, and 16 in the second. |
1339 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); | 1322 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); |
1340 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO
verflowForPaint); | 1323 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO
verflowForPaint); // TODO(wangxianzhu): Remove for slimming paint v2. |
| 1324 ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation, ChildShouldCh
eckForPaintInvalidation); |
1341 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation)
; | 1325 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation)
; |
1342 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio
n); | 1326 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio
n); // TODO(wangxianzhu): Remove for slimming paint v2. |
1343 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO
fChildren); | 1327 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO
fChildren); // TODO(wangxianzhu): Remove for slimming paint v2. |
1344 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem
entLayout); | 1328 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem
entLayout); |
1345 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); | 1329 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); |
1346 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout); | 1330 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout); |
1347 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor
malFlowLayout); | 1331 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor
malFlowLayout); |
1348 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths
Dirty); | 1332 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths
Dirty); |
1349 ADD_BOOLEAN_BITFIELD(floating, Floating); | 1333 ADD_BOOLEAN_BITFIELD(floating, Floating); |
1350 ADD_BOOLEAN_BITFIELD(selfNeedsOverflowRecalcAfterStyleChange, SelfNeedsO
verflowRecalcAfterStyleChange); | 1334 ADD_BOOLEAN_BITFIELD(selfNeedsOverflowRecalcAfterStyleChange, SelfNeedsO
verflowRecalcAfterStyleChange); |
1351 ADD_BOOLEAN_BITFIELD(childNeedsOverflowRecalcAfterStyleChange, ChildNeed
sOverflowRecalcAfterStyleChange); | 1335 ADD_BOOLEAN_BITFIELD(childNeedsOverflowRecalcAfterStyleChange, ChildNeed
sOverflowRecalcAfterStyleChange); |
1352 | 1336 |
1353 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous); | 1337 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous); |
1354 ADD_BOOLEAN_BITFIELD(isText, IsText); | 1338 ADD_BOOLEAN_BITFIELD(isText, IsText); |
1355 ADD_BOOLEAN_BITFIELD(isBox, IsBox); | 1339 ADD_BOOLEAN_BITFIELD(isBox, IsBox); |
1356 ADD_BOOLEAN_BITFIELD(isInline, IsInline); | 1340 ADD_BOOLEAN_BITFIELD(isInline, IsInline); |
1357 ADD_BOOLEAN_BITFIELD(isReplaced, IsReplaced); | 1341 ADD_BOOLEAN_BITFIELD(isReplaced, IsReplaced); |
1358 ADD_BOOLEAN_BITFIELD(horizontalWritingMode, HorizontalWritingMode); | 1342 ADD_BOOLEAN_BITFIELD(horizontalWritingMode, HorizontalWritingMode); |
1359 ADD_BOOLEAN_BITFIELD(isDragging, IsDragging); | 1343 ADD_BOOLEAN_BITFIELD(isDragging, IsDragging); |
1360 | 1344 |
1361 ADD_BOOLEAN_BITFIELD(hasLayer, HasLayer); | 1345 ADD_BOOLEAN_BITFIELD(hasLayer, HasLayer); |
1362 ADD_BOOLEAN_BITFIELD(hasOverflowClip, HasOverflowClip); // Set in the ca
se of overflow:auto/scroll/hidden | 1346 ADD_BOOLEAN_BITFIELD(hasOverflowClip, HasOverflowClip); // Set in the ca
se of overflow:auto/scroll/hidden |
1363 ADD_BOOLEAN_BITFIELD(hasTransformRelatedProperty, HasTransformRelatedPro
perty); | 1347 ADD_BOOLEAN_BITFIELD(hasTransformRelatedProperty, HasTransformRelatedPro
perty); |
1364 ADD_BOOLEAN_BITFIELD(hasReflection, HasReflection); | 1348 ADD_BOOLEAN_BITFIELD(hasReflection, HasReflection); |
1365 | 1349 |
1366 ADD_BOOLEAN_BITFIELD(hasCounterNodeMap, HasCounterNodeMap); | 1350 ADD_BOOLEAN_BITFIELD(hasCounterNodeMap, HasCounterNodeMap); |
1367 ADD_BOOLEAN_BITFIELD(everHadLayout, EverHadLayout); | 1351 ADD_BOOLEAN_BITFIELD(everHadLayout, EverHadLayout); |
1368 ADD_BOOLEAN_BITFIELD(ancestorLineBoxDirty, AncestorLineBoxDirty); | 1352 ADD_BOOLEAN_BITFIELD(ancestorLineBoxDirty, AncestorLineBoxDirty); |
1369 | 1353 |
1370 ADD_BOOLEAN_BITFIELD(layoutDidGetCalledSinceLastFrame, LayoutDidGetCalle
dSinceLastFrame); | |
1371 | |
1372 ADD_BOOLEAN_BITFIELD(hasPendingResourceUpdate, HasPendingResourceUpdate)
; | 1354 ADD_BOOLEAN_BITFIELD(hasPendingResourceUpdate, HasPendingResourceUpdate)
; |
1373 | 1355 |
1374 ADD_BOOLEAN_BITFIELD(isInsideFlowThread, IsInsideFlowThread); | 1356 ADD_BOOLEAN_BITFIELD(isInsideFlowThread, IsInsideFlowThread); |
1375 | 1357 |
1376 ADD_BOOLEAN_BITFIELD(subtreeChangeListenerRegistered, SubtreeChangeListe
nerRegistered); | 1358 ADD_BOOLEAN_BITFIELD(subtreeChangeListenerRegistered, SubtreeChangeListe
nerRegistered); |
1377 ADD_BOOLEAN_BITFIELD(notifiedOfSubtreeChange, NotifiedOfSubtreeChange); | 1359 ADD_BOOLEAN_BITFIELD(notifiedOfSubtreeChange, NotifiedOfSubtreeChange); |
1378 ADD_BOOLEAN_BITFIELD(consumesSubtreeChangeNotification, ConsumesSubtreeC
hangeNotification); | 1360 ADD_BOOLEAN_BITFIELD(consumesSubtreeChangeNotification, ConsumesSubtreeC
hangeNotification); |
1379 | 1361 |
1380 // from LayoutBlock | 1362 // from LayoutBlock |
1381 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline); | 1363 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1522 } | 1504 } |
1523 | 1505 |
1524 inline void LayoutObject::setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidat
ionReasonForTracing reason, MarkingBehavior markParents, SubtreeLayoutScope* lay
outer) | 1506 inline void LayoutObject::setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidat
ionReasonForTracing reason, MarkingBehavior markParents, SubtreeLayoutScope* lay
outer) |
1525 { | 1507 { |
1526 setNeedsLayout(reason, markParents, layouter); | 1508 setNeedsLayout(reason, markParents, layouter); |
1527 setShouldDoFullPaintInvalidation(); | 1509 setShouldDoFullPaintInvalidation(); |
1528 } | 1510 } |
1529 | 1511 |
1530 inline void LayoutObject::clearNeedsLayout() | 1512 inline void LayoutObject::clearNeedsLayout() |
1531 { | 1513 { |
1532 setNeededLayoutBecauseOfChildren(needsLayoutBecauseOfChildren()); | 1514 // Set flags for later stages/cycles. |
1533 setLayoutDidGetCalledSinceLastFrame(); | 1515 setEverHadLayout(true); |
| 1516 setMayNeedPaintInvalidation(); |
| 1517 m_bitfields.setNeededLayoutBecauseOfChildren(needsLayoutBecauseOfChildren())
; |
| 1518 |
| 1519 // Clear needsLayout flags. |
1534 setSelfNeedsLayout(false); | 1520 setSelfNeedsLayout(false); |
1535 setEverHadLayout(true); | |
1536 setPosChildNeedsLayout(false); | 1521 setPosChildNeedsLayout(false); |
1537 setNeedsSimplifiedNormalFlowLayout(false); | 1522 setNeedsSimplifiedNormalFlowLayout(false); |
1538 setNormalChildNeedsLayout(false); | 1523 setNormalChildNeedsLayout(false); |
1539 setNeedsPositionedMovementLayout(false); | 1524 setNeedsPositionedMovementLayout(false); |
1540 setAncestorLineBoxDirty(false); | 1525 setAncestorLineBoxDirty(false); |
| 1526 |
1541 #if ENABLE(ASSERT) | 1527 #if ENABLE(ASSERT) |
1542 checkBlockPositionedObjectsNeedLayout(); | 1528 checkBlockPositionedObjectsNeedLayout(); |
1543 #endif | 1529 #endif |
1544 } | 1530 } |
1545 | 1531 |
1546 inline void LayoutObject::setChildNeedsLayout(MarkingBehavior markParents, Subtr
eeLayoutScope* layouter) | 1532 inline void LayoutObject::setChildNeedsLayout(MarkingBehavior markParents, Subtr
eeLayoutScope* layouter) |
1547 { | 1533 { |
1548 ASSERT(!isSetNeedsLayoutForbidden()); | 1534 ASSERT(!isSetNeedsLayoutForbidden()); |
1549 bool alreadyNeededLayout = normalChildNeedsLayout(); | 1535 bool alreadyNeededLayout = normalChildNeedsLayout(); |
1550 setNormalChildNeedsLayout(true); | 1536 setNormalChildNeedsLayout(true); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1670 void showTree(const blink::LayoutObject*); | 1656 void showTree(const blink::LayoutObject*); |
1671 void showLineTree(const blink::LayoutObject*); | 1657 void showLineTree(const blink::LayoutObject*); |
1672 void showLayoutTree(const blink::LayoutObject* object1); | 1658 void showLayoutTree(const blink::LayoutObject* object1); |
1673 // We don't make object2 an optional parameter so that showLayoutTree | 1659 // We don't make object2 an optional parameter so that showLayoutTree |
1674 // can be called from gdb easily. | 1660 // can be called from gdb easily. |
1675 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); | 1661 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); |
1676 | 1662 |
1677 #endif | 1663 #endif |
1678 | 1664 |
1679 #endif // LayoutObject_h | 1665 #endif // LayoutObject_h |
OLD | NEW |