| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 BSRight, | 97 BSRight, |
| 98 BSBottom, | 98 BSBottom, |
| 99 BSLeft | 99 BSLeft |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 enum MarkingBehavior { | 102 enum MarkingBehavior { |
| 103 MarkOnlyThis, | 103 MarkOnlyThis, |
| 104 MarkContainingBlockChain, | 104 MarkContainingBlockChain, |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 enum RepaintLayerBehavior { |
| 108 RepaintLayer, |
| 109 DontRepaintLayer, |
| 110 }; |
| 111 |
| 107 enum MapCoordinatesMode { | 112 enum MapCoordinatesMode { |
| 108 IsFixed = 1 << 0, | 113 IsFixed = 1 << 0, |
| 109 UseTransforms = 1 << 1, | 114 UseTransforms = 1 << 1, |
| 110 ApplyContainerFlip = 1 << 2, | 115 ApplyContainerFlip = 1 << 2, |
| 111 TraverseDocumentBoundaries = 1 << 3, | 116 TraverseDocumentBoundaries = 1 << 3, |
| 112 }; | 117 }; |
| 113 typedef unsigned MapCoordinatesFlags; | 118 typedef unsigned MapCoordinatesFlags; |
| 114 | 119 |
| 115 const int caretWidth = 1; | 120 const int caretWidth = 1; |
| 116 | 121 |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 // Returns the object containing this one. Can be different from parent for
positioned elements. | 609 // Returns the object containing this one. Can be different from parent for
positioned elements. |
| 605 // If repaintContainer and repaintContainerSkipped are not null, on return *
repaintContainerSkipped | 610 // If repaintContainer and repaintContainerSkipped are not null, on return *
repaintContainerSkipped |
| 606 // is true if the renderer returned is an ancestor of repaintContainer. | 611 // is true if the renderer returned is an ancestor of repaintContainer. |
| 607 RenderObject* container(const RenderLayerModelObject* repaintContainer = 0,
bool* repaintContainerSkipped = 0) const; | 612 RenderObject* container(const RenderLayerModelObject* repaintContainer = 0,
bool* repaintContainerSkipped = 0) const; |
| 608 | 613 |
| 609 virtual RenderObject* hoverAncestor() const { return parent(); } | 614 virtual RenderObject* hoverAncestor() const { return parent(); } |
| 610 | 615 |
| 611 Element* offsetParent() const; | 616 Element* offsetParent() const; |
| 612 | 617 |
| 613 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec
t* newRoot = 0, SubtreeLayoutScope* = 0); | 618 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec
t* newRoot = 0, SubtreeLayoutScope* = 0); |
| 614 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou
tScope* = 0); | 619 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou
tScope* = 0, RepaintLayerBehavior = RepaintLayer); |
| 615 void clearNeedsLayout(); | 620 void clearNeedsLayout(); |
| 616 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree
LayoutScope* = 0); | 621 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree
LayoutScope* = 0); |
| 617 void setNeedsPositionedMovementLayout(); | 622 void setNeedsPositionedMovementLayout(); |
| 618 void setNeedsSimplifiedNormalFlowLayout(); | 623 void setNeedsSimplifiedNormalFlowLayout(); |
| 619 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha
in); | 624 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha
in); |
| 620 void clearPreferredLogicalWidthsDirty(); | 625 void clearPreferredLogicalWidthsDirty(); |
| 621 void invalidateContainerPreferredLogicalWidths(); | 626 void invalidateContainerPreferredLogicalWidths(); |
| 622 | 627 |
| 623 void setNeedsLayoutAndPrefWidthsRecalc() | 628 void setNeedsLayoutAndPrefWidthsRecalc() |
| 624 { | 629 { |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1254 if (isText() && !isBR()) | 1259 if (isText() && !isBR()) |
| 1255 return false; | 1260 return false; |
| 1256 return true; | 1261 return true; |
| 1257 } | 1262 } |
| 1258 | 1263 |
| 1259 inline bool RenderObject::isBeforeOrAfterContent() const | 1264 inline bool RenderObject::isBeforeOrAfterContent() const |
| 1260 { | 1265 { |
| 1261 return isBeforeContent() || isAfterContent(); | 1266 return isBeforeContent() || isAfterContent(); |
| 1262 } | 1267 } |
| 1263 | 1268 |
| 1264 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay
outScope* layouter) | 1269 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay
outScope* layouter, RepaintLayerBehavior repaintLayer) |
| 1265 { | 1270 { |
| 1266 ASSERT(!isSetNeedsLayoutForbidden()); | 1271 ASSERT(!isSetNeedsLayoutForbidden()); |
| 1267 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); | 1272 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); |
| 1268 setSelfNeedsLayout(true); | 1273 setSelfNeedsLayout(true); |
| 1269 if (!alreadyNeededLayout) { | 1274 if (!alreadyNeededLayout) { |
| 1270 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r
oot() != this)) | 1275 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r
oot() != this)) |
| 1271 markContainingBlocksForLayout(true, 0, layouter); | 1276 markContainingBlocksForLayout(true, 0, layouter); |
| 1272 if (hasLayer()) | 1277 // StyleDifferenceLayout is used for different cases currently, one of w
hich is |
| 1278 // that our content changed which mandates an invalidation. |
| 1279 // FIXME: We should be able to skip this automatic invalidation (see crb
ug.com/325569). |
| 1280 if (repaintLayer == RepaintLayer && hasLayer()) |
| 1273 setLayerNeedsFullRepaint(); | 1281 setLayerNeedsFullRepaint(); |
| 1274 } | 1282 } |
| 1275 } | 1283 } |
| 1276 | 1284 |
| 1277 inline void RenderObject::clearNeedsLayout() | 1285 inline void RenderObject::clearNeedsLayout() |
| 1278 { | 1286 { |
| 1279 setSelfNeedsLayout(false); | 1287 setSelfNeedsLayout(false); |
| 1280 setEverHadLayout(true); | 1288 setEverHadLayout(true); |
| 1281 setPosChildNeedsLayout(false); | 1289 setPosChildNeedsLayout(false); |
| 1282 setNeedsSimplifiedNormalFlowLayout(false); | 1290 setNeedsSimplifiedNormalFlowLayout(false); |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1418 void showTree(const WebCore::RenderObject*); | 1426 void showTree(const WebCore::RenderObject*); |
| 1419 void showLineTree(const WebCore::RenderObject*); | 1427 void showLineTree(const WebCore::RenderObject*); |
| 1420 void showRenderTree(const WebCore::RenderObject* object1); | 1428 void showRenderTree(const WebCore::RenderObject* object1); |
| 1421 // We don't make object2 an optional parameter so that showRenderTree | 1429 // We don't make object2 an optional parameter so that showRenderTree |
| 1422 // can be called from gdb easily. | 1430 // can be called from gdb easily. |
| 1423 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); | 1431 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); |
| 1424 | 1432 |
| 1425 #endif | 1433 #endif |
| 1426 | 1434 |
| 1427 #endif // RenderObject_h | 1435 #endif // RenderObject_h |
| OLD | NEW |