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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 // Returns the object containing this one. Can be different from parent for
positioned elements. | 621 // Returns the object containing this one. Can be different from parent for
positioned elements. |
622 // If repaintContainer and repaintContainerSkipped are not null, on return *
repaintContainerSkipped | 622 // If repaintContainer and repaintContainerSkipped are not null, on return *
repaintContainerSkipped |
623 // is true if the renderer returned is an ancestor of repaintContainer. | 623 // is true if the renderer returned is an ancestor of repaintContainer. |
624 RenderObject* container(const RenderLayerModelObject* repaintContainer = 0,
bool* repaintContainerSkipped = 0) const; | 624 RenderObject* container(const RenderLayerModelObject* repaintContainer = 0,
bool* repaintContainerSkipped = 0) const; |
625 | 625 |
626 virtual RenderObject* hoverAncestor() const { return parent(); } | 626 virtual RenderObject* hoverAncestor() const { return parent(); } |
627 | 627 |
628 Element* offsetParent() const; | 628 Element* offsetParent() const; |
629 | 629 |
630 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec
t* newRoot = 0, SubtreeLayoutScope* = 0); | 630 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec
t* newRoot = 0, SubtreeLayoutScope* = 0); |
| 631 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou
tScope* = 0); |
631 void setNeedsLayoutAndFullRepaint(MarkingBehavior = MarkContainingBlockChain
, SubtreeLayoutScope* = 0); | 632 void setNeedsLayoutAndFullRepaint(MarkingBehavior = MarkContainingBlockChain
, SubtreeLayoutScope* = 0); |
632 void clearNeedsLayout(); | 633 void clearNeedsLayout(); |
633 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree
LayoutScope* = 0); | 634 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree
LayoutScope* = 0); |
634 void setNeedsPositionedMovementLayout(); | 635 void setNeedsPositionedMovementLayout(); |
635 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha
in); | 636 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha
in); |
636 void clearPreferredLogicalWidthsDirty(); | 637 void clearPreferredLogicalWidthsDirty(); |
637 void invalidateContainerPreferredLogicalWidths(); | 638 void invalidateContainerPreferredLogicalWidths(); |
638 | 639 |
| 640 void setNeedsLayoutAndPrefWidthsRecalc() |
| 641 { |
| 642 setNeedsLayout(); |
| 643 setPreferredLogicalWidthsDirty(); |
| 644 } |
639 void setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint() | 645 void setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint() |
640 { | 646 { |
641 setNeedsLayoutAndFullRepaint(); | 647 setNeedsLayoutAndFullRepaint(); |
642 setPreferredLogicalWidthsDirty(); | 648 setPreferredLogicalWidthsDirty(); |
643 } | 649 } |
644 | 650 |
645 void setPositionState(EPosition position) | 651 void setPositionState(EPosition position) |
646 { | 652 { |
647 ASSERT((position != AbsolutePosition && position != FixedPosition) || is
Box()); | 653 ASSERT((position != AbsolutePosition && position != FixedPosition) || is
Box()); |
648 m_bitfields.setPositionedState(position); | 654 m_bitfields.setPositionedState(position); |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 if (isText() && !isBR()) | 1324 if (isText() && !isBR()) |
1319 return false; | 1325 return false; |
1320 return true; | 1326 return true; |
1321 } | 1327 } |
1322 | 1328 |
1323 inline bool RenderObject::isBeforeOrAfterContent() const | 1329 inline bool RenderObject::isBeforeOrAfterContent() const |
1324 { | 1330 { |
1325 return isBeforeContent() || isAfterContent(); | 1331 return isBeforeContent() || isAfterContent(); |
1326 } | 1332 } |
1327 | 1333 |
1328 inline void RenderObject::setNeedsLayoutAndFullRepaint(MarkingBehavior markParen
ts, SubtreeLayoutScope* layouter) | 1334 // If repaintAfterLayout is enabled, setNeedsLayout() won't cause full repaint a
s |
| 1335 // setNeedsLayoutAndFullRepaint() does. Otherwise the two methods are identical. |
| 1336 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay
outScope* layouter) |
1329 { | 1337 { |
1330 ASSERT(!isSetNeedsLayoutForbidden()); | 1338 ASSERT(!isSetNeedsLayoutForbidden()); |
1331 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); | 1339 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); |
1332 setSelfNeedsLayout(true); | 1340 setSelfNeedsLayout(true); |
1333 if (!alreadyNeededLayout) { | 1341 if (!alreadyNeededLayout) { |
1334 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r
oot() != this)) | 1342 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r
oot() != this)) |
1335 markContainingBlocksForLayout(true, 0, layouter); | 1343 markContainingBlocksForLayout(true, 0, layouter); |
1336 } | 1344 } |
1337 } | 1345 } |
1338 | 1346 |
| 1347 inline void RenderObject::setNeedsLayoutAndFullRepaint(MarkingBehavior markParen
ts, SubtreeLayoutScope* layouter) |
| 1348 { |
| 1349 setNeedsLayout(markParents, layouter); |
| 1350 setShouldDoFullRepaintAfterLayout(true); |
| 1351 } |
| 1352 |
1339 inline void RenderObject::clearNeedsLayout() | 1353 inline void RenderObject::clearNeedsLayout() |
1340 { | 1354 { |
1341 if (!shouldDoFullRepaintAfterLayout()) | |
1342 setShouldDoFullRepaintAfterLayout(selfNeedsLayout()); | |
1343 if (needsPositionedMovementLayoutOnly()) | 1355 if (needsPositionedMovementLayoutOnly()) |
1344 setOnlyNeededPositionedMovementLayout(true); | 1356 setOnlyNeededPositionedMovementLayout(true); |
1345 setLayoutDidGetCalled(true); | 1357 setLayoutDidGetCalled(true); |
1346 setSelfNeedsLayout(false); | 1358 setSelfNeedsLayout(false); |
1347 setEverHadLayout(true); | 1359 setEverHadLayout(true); |
1348 setPosChildNeedsLayout(false); | 1360 setPosChildNeedsLayout(false); |
1349 setNeedsSimplifiedNormalFlowLayout(false); | 1361 setNeedsSimplifiedNormalFlowLayout(false); |
1350 setNormalChildNeedsLayout(false); | 1362 setNormalChildNeedsLayout(false); |
1351 setNeedsPositionedMovementLayout(false); | 1363 setNeedsPositionedMovementLayout(false); |
1352 setAncestorLineBoxDirty(false); | 1364 setAncestorLineBoxDirty(false); |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 void showTree(const WebCore::RenderObject*); | 1485 void showTree(const WebCore::RenderObject*); |
1474 void showLineTree(const WebCore::RenderObject*); | 1486 void showLineTree(const WebCore::RenderObject*); |
1475 void showRenderTree(const WebCore::RenderObject* object1); | 1487 void showRenderTree(const WebCore::RenderObject* object1); |
1476 // We don't make object2 an optional parameter so that showRenderTree | 1488 // We don't make object2 an optional parameter so that showRenderTree |
1477 // can be called from gdb easily. | 1489 // can be called from gdb easily. |
1478 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); | 1490 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); |
1479 | 1491 |
1480 #endif | 1492 #endif |
1481 | 1493 |
1482 #endif // RenderObject_h | 1494 #endif // RenderObject_h |
OLD | NEW |