| 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 { | 434 { |
| 435 ASSERT(isLayoutInline()); | 435 ASSERT(isLayoutInline()); |
| 436 m_bitfields.setAlwaysCreateLineBoxesForLayoutInline(alwaysCreateLineBoxe
s); | 436 m_bitfields.setAlwaysCreateLineBoxesForLayoutInline(alwaysCreateLineBoxe
s); |
| 437 } | 437 } |
| 438 | 438 |
| 439 bool ancestorLineBoxDirty() const { return m_bitfields.ancestorLineBoxDirty(
); } | 439 bool ancestorLineBoxDirty() const { return m_bitfields.ancestorLineBoxDirty(
); } |
| 440 void setAncestorLineBoxDirty(bool value = true) | 440 void setAncestorLineBoxDirty(bool value = true) |
| 441 { | 441 { |
| 442 m_bitfields.setAncestorLineBoxDirty(value); | 442 m_bitfields.setAncestorLineBoxDirty(value); |
| 443 if (value) | 443 if (value) |
| 444 setNeedsLayoutAndFullPaintInvalidation(); | 444 setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::Lin
eBoxesChanged); |
| 445 } | 445 } |
| 446 | 446 |
| 447 enum FlowThreadState { | 447 enum FlowThreadState { |
| 448 NotInsideFlowThread = 0, | 448 NotInsideFlowThread = 0, |
| 449 InsideOutOfFlowThread = 1, | 449 InsideOutOfFlowThread = 1, |
| 450 InsideInFlowThread = 2, | 450 InsideInFlowThread = 2, |
| 451 }; | 451 }; |
| 452 | 452 |
| 453 void setFlowThreadStateIncludingDescendants(FlowThreadState); | 453 void setFlowThreadStateIncludingDescendants(FlowThreadState); |
| 454 | 454 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n
ot null, on return *paintInvalidationContainerSkipped | 653 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n
ot null, on return *paintInvalidationContainerSkipped |
| 654 // is true if the renderer returned is an ancestor of paintInvalidationConta
iner. | 654 // is true if the renderer returned is an ancestor of paintInvalidationConta
iner. |
| 655 LayoutObject* container(const LayoutBoxModelObject* paintInvalidationContain
er = 0, bool* paintInvalidationContainerSkipped = 0) const; | 655 LayoutObject* container(const LayoutBoxModelObject* paintInvalidationContain
er = 0, bool* paintInvalidationContainerSkipped = 0) const; |
| 656 LayoutBlock* containerForFixedPosition(const LayoutBoxModelObject* paintInva
lidationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const; | 656 LayoutBlock* containerForFixedPosition(const LayoutBoxModelObject* paintInva
lidationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const; |
| 657 | 657 |
| 658 virtual LayoutObject* hoverAncestor() const { return parent(); } | 658 virtual LayoutObject* hoverAncestor() const { return parent(); } |
| 659 | 659 |
| 660 Element* offsetParent() const; | 660 Element* offsetParent() const; |
| 661 | 661 |
| 662 void markContainerChainForLayout(bool scheduleRelayout = true, LayoutObject*
newRoot = 0, SubtreeLayoutScope* = 0); | 662 void markContainerChainForLayout(bool scheduleRelayout = true, LayoutObject*
newRoot = 0, SubtreeLayoutScope* = 0); |
| 663 void setNeedsLayout(MarkingBehavior = MarkContainerChain, SubtreeLayoutScope
* = 0); | 663 void setNeedsLayout(LayoutInvalidationReasonForTracing, MarkingBehavior = Ma
rkContainerChain, SubtreeLayoutScope* = 0); |
| 664 void setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior = MarkContainerC
hain, SubtreeLayoutScope* = 0); | 664 void setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReasonForTraci
ng, MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = 0); |
| 665 void clearNeedsLayout(); | 665 void clearNeedsLayout(); |
| 666 void setChildNeedsLayout(MarkingBehavior = MarkContainerChain, SubtreeLayout
Scope* = 0); | 666 void setChildNeedsLayout(MarkingBehavior = MarkContainerChain, SubtreeLayout
Scope* = 0); |
| 667 void setNeedsPositionedMovementLayout(); | 667 void setNeedsPositionedMovementLayout(); |
| 668 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainerChain); | 668 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainerChain); |
| 669 void clearPreferredLogicalWidthsDirty(); | 669 void clearPreferredLogicalWidthsDirty(); |
| 670 void invalidateContainerPreferredLogicalWidths(); | 670 void invalidateContainerPreferredLogicalWidths(); |
| 671 | 671 |
| 672 void setNeedsLayoutAndPrefWidthsRecalc() | 672 void setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReasonForTracing re
ason) |
| 673 { | 673 { |
| 674 setNeedsLayout(); | 674 setNeedsLayout(reason); |
| 675 setPreferredLogicalWidthsDirty(); | 675 setPreferredLogicalWidthsDirty(); |
| 676 } | 676 } |
| 677 void setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation() | 677 void setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalid
ationReasonForTracing reason) |
| 678 { | 678 { |
| 679 setNeedsLayoutAndFullPaintInvalidation(); | 679 setNeedsLayoutAndFullPaintInvalidation(reason); |
| 680 setPreferredLogicalWidthsDirty(); | 680 setPreferredLogicalWidthsDirty(); |
| 681 } | 681 } |
| 682 | 682 |
| 683 void setPositionState(EPosition position) | 683 void setPositionState(EPosition position) |
| 684 { | 684 { |
| 685 ASSERT((position != AbsolutePosition && position != FixedPosition) || is
Box()); | 685 ASSERT((position != AbsolutePosition && position != FixedPosition) || is
Box()); |
| 686 m_bitfields.setPositionedState(position); | 686 m_bitfields.setPositionedState(position); |
| 687 } | 687 } |
| 688 void clearPositionedState() { m_bitfields.clearPositionedState(); } | 688 void clearPositionedState() { m_bitfields.clearPositionedState(); } |
| 689 | 689 |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1489 return true; | 1489 return true; |
| 1490 } | 1490 } |
| 1491 | 1491 |
| 1492 inline bool LayoutObject::isBeforeOrAfterContent() const | 1492 inline bool LayoutObject::isBeforeOrAfterContent() const |
| 1493 { | 1493 { |
| 1494 return isBeforeContent() || isAfterContent(); | 1494 return isBeforeContent() || isAfterContent(); |
| 1495 } | 1495 } |
| 1496 | 1496 |
| 1497 // setNeedsLayout() won't cause full paint invalidations as | 1497 // setNeedsLayout() won't cause full paint invalidations as |
| 1498 // setNeedsLayoutAndFullPaintInvalidation() does. Otherwise the two methods are
identical. | 1498 // setNeedsLayoutAndFullPaintInvalidation() does. Otherwise the two methods are
identical. |
| 1499 inline void LayoutObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay
outScope* layouter) | 1499 inline void LayoutObject::setNeedsLayout(LayoutInvalidationReasonForTracing reas
on, MarkingBehavior markParents, SubtreeLayoutScope* layouter) |
| 1500 { | 1500 { |
| 1501 TRACE_EVENT_INSTANT1( | 1501 TRACE_EVENT_INSTANT1( |
| 1502 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), | 1502 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), |
| 1503 "LayoutInvalidationTracking", | 1503 "LayoutInvalidationTracking", |
| 1504 "data", | 1504 "data", |
| 1505 InspectorLayoutInvalidationTrackingEvent::data(this)); | 1505 InspectorLayoutInvalidationTrackingEvent::data(this, reason)); |
| 1506 ASSERT(!isSetNeedsLayoutForbidden()); | 1506 ASSERT(!isSetNeedsLayoutForbidden()); |
| 1507 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); | 1507 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); |
| 1508 setSelfNeedsLayout(true); | 1508 setSelfNeedsLayout(true); |
| 1509 if (!alreadyNeededLayout) { | 1509 if (!alreadyNeededLayout) { |
| 1510 if (markParents == MarkContainerChain && (!layouter || layouter->root()
!= this)) | 1510 if (markParents == MarkContainerChain && (!layouter || layouter->root()
!= this)) |
| 1511 markContainerChainForLayout(true, 0, layouter); | 1511 markContainerChainForLayout(true, 0, layouter); |
| 1512 } | 1512 } |
| 1513 } | 1513 } |
| 1514 | 1514 |
| 1515 inline void LayoutObject::setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior
markParents, SubtreeLayoutScope* layouter) | 1515 inline void LayoutObject::setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidat
ionReasonForTracing reason, MarkingBehavior markParents, SubtreeLayoutScope* lay
outer) |
| 1516 { | 1516 { |
| 1517 setNeedsLayout(markParents, layouter); | 1517 setNeedsLayout(reason, markParents, layouter); |
| 1518 setShouldDoFullPaintInvalidation(); | 1518 setShouldDoFullPaintInvalidation(); |
| 1519 } | 1519 } |
| 1520 | 1520 |
| 1521 inline void LayoutObject::clearNeedsLayout() | 1521 inline void LayoutObject::clearNeedsLayout() |
| 1522 { | 1522 { |
| 1523 setNeededLayoutBecauseOfChildren(needsLayoutBecauseOfChildren()); | 1523 setNeededLayoutBecauseOfChildren(needsLayoutBecauseOfChildren()); |
| 1524 setLayoutDidGetCalledSinceLastFrame(); | 1524 setLayoutDidGetCalledSinceLastFrame(); |
| 1525 setSelfNeedsLayout(false); | 1525 setSelfNeedsLayout(false); |
| 1526 setEverHadLayout(true); | 1526 setEverHadLayout(true); |
| 1527 setPosChildNeedsLayout(false); | 1527 setPosChildNeedsLayout(false); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1661 void showTree(const blink::LayoutObject*); | 1661 void showTree(const blink::LayoutObject*); |
| 1662 void showLineTree(const blink::LayoutObject*); | 1662 void showLineTree(const blink::LayoutObject*); |
| 1663 void showLayoutTree(const blink::LayoutObject* object1); | 1663 void showLayoutTree(const blink::LayoutObject* object1); |
| 1664 // We don't make object2 an optional parameter so that showLayoutTree | 1664 // We don't make object2 an optional parameter so that showLayoutTree |
| 1665 // can be called from gdb easily. | 1665 // can be called from gdb easily. |
| 1666 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); | 1666 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); |
| 1667 | 1667 |
| 1668 #endif | 1668 #endif |
| 1669 | 1669 |
| 1670 #endif // LayoutObject_h | 1670 #endif // LayoutObject_h |
| OLD | NEW |