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 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 bool onlyNeededPositionedMovementLayout() const { return m_bitfields.onlyNee
dedPositionedMovementLayout(); } | 1003 bool onlyNeededPositionedMovementLayout() const { return m_bitfields.onlyNee
dedPositionedMovementLayout(); } |
1004 void setOnlyNeededPositionedMovementLayout(bool b) { m_bitfields.setOnlyNeed
edPositionedMovementLayout(b); } | 1004 void setOnlyNeededPositionedMovementLayout(bool b) { m_bitfields.setOnlyNeed
edPositionedMovementLayout(b); } |
1005 | 1005 |
1006 void clearRepaintState(); | 1006 void clearRepaintState(); |
1007 | 1007 |
1008 // layoutDidGetCalled indicates whether this render object was re-laid-out | 1008 // layoutDidGetCalled indicates whether this render object was re-laid-out |
1009 // since the last call to setLayoutDidGetCalled(false) on this object. | 1009 // since the last call to setLayoutDidGetCalled(false) on this object. |
1010 bool layoutDidGetCalled() { return m_bitfields.layoutDidGetCalled(); } | 1010 bool layoutDidGetCalled() { return m_bitfields.layoutDidGetCalled(); } |
1011 void setLayoutDidGetCalled(bool b) { m_bitfields.setLayoutDidGetCalled(b); } | 1011 void setLayoutDidGetCalled(bool b) { m_bitfields.setLayoutDidGetCalled(b); } |
1012 | 1012 |
| 1013 bool mayNeedInvalidation() { return m_bitfields.mayNeedInvalidation(); } |
| 1014 void setMayNeedInvalidation(bool b) |
| 1015 { |
| 1016 m_bitfields.setMayNeedInvalidation(b); |
| 1017 |
| 1018 // Make sure our parent is marked as needing invalidation. |
| 1019 if (b && parent() && !parent()->mayNeedInvalidation()) |
| 1020 parent()->setMayNeedInvalidation(b); |
| 1021 } |
| 1022 |
| 1023 bool shouldCheckForInvalidationAfterLayout() |
| 1024 { |
| 1025 return layoutDidGetCalled() || mayNeedInvalidation(); |
| 1026 } |
| 1027 |
1013 bool shouldDisableLayoutState() const { return hasColumns() || hasTransform(
) || hasReflection() || style()->isFlippedBlocksWritingMode(); } | 1028 bool shouldDisableLayoutState() const { return hasColumns() || hasTransform(
) || hasReflection() || style()->isFlippedBlocksWritingMode(); } |
1014 | 1029 |
1015 void setNeedsOverflowRecalcAfterStyleChange(); | 1030 void setNeedsOverflowRecalcAfterStyleChange(); |
1016 void markContainingBlocksForOverflowRecalc(); | 1031 void markContainingBlocksForOverflowRecalc(); |
1017 | 1032 |
1018 protected: | 1033 protected: |
1019 inline bool layerCreationAllowedForSubtree() const; | 1034 inline bool layerCreationAllowedForSubtree() const; |
1020 | 1035 |
1021 // Overrides should call the superclass at the end. m_style will be 0 the fi
rst time | 1036 // Overrides should call the superclass at the end. m_style will be 0 the fi
rst time |
1022 // this function will be called. | 1037 // this function will be called. |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 public: | 1133 public: |
1119 RenderObjectBitfields(Node* node) | 1134 RenderObjectBitfields(Node* node) |
1120 : m_selfNeedsLayout(false) | 1135 : m_selfNeedsLayout(false) |
1121 // FIXME: shouldDoFullRepaintAfterLayout is needed because we reset | 1136 // FIXME: shouldDoFullRepaintAfterLayout is needed because we reset |
1122 // the layout bits before repaint when doing repaintAfterLayout. | 1137 // the layout bits before repaint when doing repaintAfterLayout. |
1123 // Holding the layout bits until after repaint would remove the need | 1138 // Holding the layout bits until after repaint would remove the need |
1124 // for this flag. | 1139 // for this flag. |
1125 , m_shouldDoFullRepaintAfterLayout(false) | 1140 , m_shouldDoFullRepaintAfterLayout(false) |
1126 , m_shouldRepaintOverflow(false) | 1141 , m_shouldRepaintOverflow(false) |
1127 , m_shouldDoFullRepaintIfSelfPaintingLayer(false) | 1142 , m_shouldDoFullRepaintIfSelfPaintingLayer(false) |
| 1143 // FIXME: We should remove mayNeedInvalidation once we are able to |
| 1144 // use the other layout flags to detect the same cases. crbug.com/37
0118 |
| 1145 , m_mayNeedInvalidation(false) |
1128 , m_onlyNeededPositionedMovementLayout(false) | 1146 , m_onlyNeededPositionedMovementLayout(false) |
1129 , m_needsPositionedMovementLayout(false) | 1147 , m_needsPositionedMovementLayout(false) |
1130 , m_normalChildNeedsLayout(false) | 1148 , m_normalChildNeedsLayout(false) |
1131 , m_posChildNeedsLayout(false) | 1149 , m_posChildNeedsLayout(false) |
1132 , m_needsSimplifiedNormalFlowLayout(false) | 1150 , m_needsSimplifiedNormalFlowLayout(false) |
1133 , m_preferredLogicalWidthsDirty(false) | 1151 , m_preferredLogicalWidthsDirty(false) |
1134 , m_floating(false) | 1152 , m_floating(false) |
1135 , m_selfNeedsOverflowRecalcAfterStyleChange(false) | 1153 , m_selfNeedsOverflowRecalcAfterStyleChange(false) |
1136 , m_childNeedsOverflowRecalcAfterStyleChange(false) | 1154 , m_childNeedsOverflowRecalcAfterStyleChange(false) |
1137 , m_isAnonymous(!node) | 1155 , m_isAnonymous(!node) |
(...skipping 14 matching lines...) Expand all Loading... |
1152 , m_hasColumns(false) | 1170 , m_hasColumns(false) |
1153 , m_layoutDidGetCalled(false) | 1171 , m_layoutDidGetCalled(false) |
1154 , m_positionedState(IsStaticallyPositioned) | 1172 , m_positionedState(IsStaticallyPositioned) |
1155 , m_selectionState(SelectionNone) | 1173 , m_selectionState(SelectionNone) |
1156 , m_flowThreadState(NotInsideFlowThread) | 1174 , m_flowThreadState(NotInsideFlowThread) |
1157 , m_boxDecorationState(NoBoxDecorations) | 1175 , m_boxDecorationState(NoBoxDecorations) |
1158 , m_hasPendingResourceUpdate(false) | 1176 , m_hasPendingResourceUpdate(false) |
1159 { | 1177 { |
1160 } | 1178 } |
1161 | 1179 |
1162 // 32 bits have been used in the first word, and 5 in the second. | 1180 // 32 bits have been used in the first word, and 6 in the second. |
1163 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); | 1181 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); |
1164 ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintAfterLayout, ShouldDoFullRepaint
AfterLayout); | 1182 ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintAfterLayout, ShouldDoFullRepaint
AfterLayout); |
1165 ADD_BOOLEAN_BITFIELD(shouldRepaintOverflow, ShouldRepaintOverflow); | 1183 ADD_BOOLEAN_BITFIELD(shouldRepaintOverflow, ShouldRepaintOverflow); |
1166 ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintIfSelfPaintingLayer, ShouldDoFul
lRepaintIfSelfPaintingLayer); | 1184 ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintIfSelfPaintingLayer, ShouldDoFul
lRepaintIfSelfPaintingLayer); |
| 1185 ADD_BOOLEAN_BITFIELD(mayNeedInvalidation, MayNeedInvalidation); |
1167 ADD_BOOLEAN_BITFIELD(onlyNeededPositionedMovementLayout, OnlyNeededPosit
ionedMovementLayout); | 1186 ADD_BOOLEAN_BITFIELD(onlyNeededPositionedMovementLayout, OnlyNeededPosit
ionedMovementLayout); |
1168 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem
entLayout); | 1187 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem
entLayout); |
1169 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); | 1188 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); |
1170 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout); | 1189 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout); |
1171 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor
malFlowLayout); | 1190 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor
malFlowLayout); |
1172 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths
Dirty); | 1191 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths
Dirty); |
1173 ADD_BOOLEAN_BITFIELD(floating, Floating); | 1192 ADD_BOOLEAN_BITFIELD(floating, Floating); |
1174 ADD_BOOLEAN_BITFIELD(selfNeedsOverflowRecalcAfterStyleChange, SelfNeedsO
verflowRecalcAfterStyleChange); | 1193 ADD_BOOLEAN_BITFIELD(selfNeedsOverflowRecalcAfterStyleChange, SelfNeedsO
verflowRecalcAfterStyleChange); |
1175 ADD_BOOLEAN_BITFIELD(childNeedsOverflowRecalcAfterStyleChange, ChildNeed
sOverflowRecalcAfterStyleChange); | 1194 ADD_BOOLEAN_BITFIELD(childNeedsOverflowRecalcAfterStyleChange, ChildNeed
sOverflowRecalcAfterStyleChange); |
1176 | 1195 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1442 void showTree(const WebCore::RenderObject*); | 1461 void showTree(const WebCore::RenderObject*); |
1443 void showLineTree(const WebCore::RenderObject*); | 1462 void showLineTree(const WebCore::RenderObject*); |
1444 void showRenderTree(const WebCore::RenderObject* object1); | 1463 void showRenderTree(const WebCore::RenderObject* object1); |
1445 // We don't make object2 an optional parameter so that showRenderTree | 1464 // We don't make object2 an optional parameter so that showRenderTree |
1446 // can be called from gdb easily. | 1465 // can be called from gdb easily. |
1447 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); | 1466 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); |
1448 | 1467 |
1449 #endif | 1468 #endif |
1450 | 1469 |
1451 #endif // RenderObject_h | 1470 #endif // RenderObject_h |
OLD | NEW |