| 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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 | 661 |
| 662 void updateFillImages(const FillLayer*, const FillLayer*); | 662 void updateFillImages(const FillLayer*, const FillLayer*); |
| 663 void updateImage(StyleImage*, StyleImage*); | 663 void updateImage(StyleImage*, StyleImage*); |
| 664 void updateShapeImage(const ShapeValue*, const ShapeValue*); | 664 void updateShapeImage(const ShapeValue*, const ShapeValue*); |
| 665 | 665 |
| 666 virtual void paint(PaintInfo&, const LayoutPoint&); | 666 virtual void paint(PaintInfo&, const LayoutPoint&); |
| 667 | 667 |
| 668 // Subclasses must reimplement this method to compute the size and position | 668 // Subclasses must reimplement this method to compute the size and position |
| 669 // of this object and all its descendants. | 669 // of this object and all its descendants. |
| 670 virtual void layout() = 0; | 670 virtual void layout() = 0; |
| 671 virtual void didLayout(ResourceLoadPriorityOptimizer&); | 671 virtual bool updateImageLoadingPriorities() { return false; } |
| 672 virtual void didScroll(ResourceLoadPriorityOptimizer&); | 672 void setHasPendingResourceUpdate(bool hasPendingResourceUpdate) { m_bitfield
s.setHasPendingResourceUpdate(hasPendingResourceUpdate); } |
| 673 bool hasPendingResourceUpdate() const { return m_bitfields.hasPendingResourc
eUpdate(); } |
| 673 | 674 |
| 674 /* This function performs a layout only if one is needed. */ | 675 /* This function performs a layout only if one is needed. */ |
| 675 void layoutIfNeeded() { if (needsLayout()) layout(); } | 676 void layoutIfNeeded() { if (needsLayout()) layout(); } |
| 676 | 677 |
| 677 void forceLayout(); | 678 void forceLayout(); |
| 678 void forceChildLayout(); | 679 void forceChildLayout(); |
| 679 | 680 |
| 680 // True if we can abort layout, leaving a partially laid out tree. | 681 // True if we can abort layout, leaving a partially laid out tree. |
| 681 virtual bool supportsPartialLayout() const { return false; } | 682 virtual bool supportsPartialLayout() const { return false; } |
| 682 | 683 |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 , m_hasCounterNodeMap(false) | 1141 , m_hasCounterNodeMap(false) |
| 1141 , m_everHadLayout(false) | 1142 , m_everHadLayout(false) |
| 1142 , m_ancestorLineBoxDirty(false) | 1143 , m_ancestorLineBoxDirty(false) |
| 1143 , m_childrenInline(false) | 1144 , m_childrenInline(false) |
| 1144 , m_hasColumns(false) | 1145 , m_hasColumns(false) |
| 1145 , m_layoutDidGetCalled(false) | 1146 , m_layoutDidGetCalled(false) |
| 1146 , m_positionedState(IsStaticallyPositioned) | 1147 , m_positionedState(IsStaticallyPositioned) |
| 1147 , m_selectionState(SelectionNone) | 1148 , m_selectionState(SelectionNone) |
| 1148 , m_flowThreadState(NotInsideFlowThread) | 1149 , m_flowThreadState(NotInsideFlowThread) |
| 1149 , m_boxDecorationState(NoBoxDecorations) | 1150 , m_boxDecorationState(NoBoxDecorations) |
| 1151 , m_hasPendingResourceUpdate(false) |
| 1150 { | 1152 { |
| 1151 } | 1153 } |
| 1152 | 1154 |
| 1153 // 32 bits have been used in the first word, and 2 in the second. | 1155 // 32 bits have been used in the first word, and 3 in the second. |
| 1154 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); | 1156 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); |
| 1155 ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintAfterLayout, ShouldDoFullRepaint
AfterLayout); | 1157 ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintAfterLayout, ShouldDoFullRepaint
AfterLayout); |
| 1156 ADD_BOOLEAN_BITFIELD(shouldRepaintOverflowIfNeeded, ShouldRepaintOverflo
wIfNeeded); | 1158 ADD_BOOLEAN_BITFIELD(shouldRepaintOverflowIfNeeded, ShouldRepaintOverflo
wIfNeeded); |
| 1157 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem
entLayout); | 1159 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem
entLayout); |
| 1158 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); | 1160 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); |
| 1159 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout); | 1161 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout); |
| 1160 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor
malFlowLayout); | 1162 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor
malFlowLayout); |
| 1161 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths
Dirty); | 1163 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths
Dirty); |
| 1162 ADD_BOOLEAN_BITFIELD(floating, Floating); | 1164 ADD_BOOLEAN_BITFIELD(floating, Floating); |
| 1163 | 1165 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1184 | 1186 |
| 1185 ADD_BOOLEAN_BITFIELD(layoutDidGetCalled, LayoutDidGetCalled); | 1187 ADD_BOOLEAN_BITFIELD(layoutDidGetCalled, LayoutDidGetCalled); |
| 1186 | 1188 |
| 1187 private: | 1189 private: |
| 1188 unsigned m_positionedState : 2; // PositionedState | 1190 unsigned m_positionedState : 2; // PositionedState |
| 1189 unsigned m_selectionState : 3; // SelectionState | 1191 unsigned m_selectionState : 3; // SelectionState |
| 1190 unsigned m_flowThreadState : 2; // FlowThreadState | 1192 unsigned m_flowThreadState : 2; // FlowThreadState |
| 1191 unsigned m_boxDecorationState : 2; // BoxDecorationState | 1193 unsigned m_boxDecorationState : 2; // BoxDecorationState |
| 1192 | 1194 |
| 1193 public: | 1195 public: |
| 1196 |
| 1197 ADD_BOOLEAN_BITFIELD(hasPendingResourceUpdate, HasPendingResourceUpdate)
; |
| 1198 |
| 1194 bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOf
FlowPositioned; } | 1199 bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOf
FlowPositioned; } |
| 1195 bool isRelPositioned() const { return m_positionedState == IsRelativelyP
ositioned; } | 1200 bool isRelPositioned() const { return m_positionedState == IsRelativelyP
ositioned; } |
| 1196 bool isStickyPositioned() const { return m_positionedState == IsStickyPo
sitioned; } | 1201 bool isStickyPositioned() const { return m_positionedState == IsStickyPo
sitioned; } |
| 1197 bool isPositioned() const { return m_positionedState != IsStaticallyPosi
tioned; } | 1202 bool isPositioned() const { return m_positionedState != IsStaticallyPosi
tioned; } |
| 1198 | 1203 |
| 1199 void setPositionedState(int positionState) | 1204 void setPositionedState(int positionState) |
| 1200 { | 1205 { |
| 1201 // This mask maps FixedPosition and AbsolutePosition to IsOutOfFlowP
ositioned, saving one bit. | 1206 // This mask maps FixedPosition and AbsolutePosition to IsOutOfFlowP
ositioned, saving one bit. |
| 1202 m_positionedState = static_cast<PositionedState>(positionState & 0x3
); | 1207 m_positionedState = static_cast<PositionedState>(positionState & 0x3
); |
| 1203 } | 1208 } |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1427 void showTree(const WebCore::RenderObject*); | 1432 void showTree(const WebCore::RenderObject*); |
| 1428 void showLineTree(const WebCore::RenderObject*); | 1433 void showLineTree(const WebCore::RenderObject*); |
| 1429 void showRenderTree(const WebCore::RenderObject* object1); | 1434 void showRenderTree(const WebCore::RenderObject* object1); |
| 1430 // We don't make object2 an optional parameter so that showRenderTree | 1435 // We don't make object2 an optional parameter so that showRenderTree |
| 1431 // can be called from gdb easily. | 1436 // can be called from gdb easily. |
| 1432 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); | 1437 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); |
| 1433 | 1438 |
| 1434 #endif | 1439 #endif |
| 1435 | 1440 |
| 1436 #endif // RenderObject_h | 1441 #endif // RenderObject_h |
| OLD | NEW |