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