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