| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 { | 302 { |
| 303 ASSERT(isRenderInline()); | 303 ASSERT(isRenderInline()); |
| 304 m_bitfields.setAlwaysCreateLineBoxesForRenderInline(alwaysCreateLineBoxe
s); | 304 m_bitfields.setAlwaysCreateLineBoxesForRenderInline(alwaysCreateLineBoxe
s); |
| 305 } | 305 } |
| 306 | 306 |
| 307 bool ancestorLineBoxDirty() const { return m_bitfields.ancestorLineBoxDirty(
); } | 307 bool ancestorLineBoxDirty() const { return m_bitfields.ancestorLineBoxDirty(
); } |
| 308 void setAncestorLineBoxDirty(bool value = true) | 308 void setAncestorLineBoxDirty(bool value = true) |
| 309 { | 309 { |
| 310 m_bitfields.setAncestorLineBoxDirty(value); | 310 m_bitfields.setAncestorLineBoxDirty(value); |
| 311 if (value) | 311 if (value) |
| 312 setNeedsLayoutAndFullPaintInvalidation(); | 312 setNeedsLayout(); |
| 313 } | 313 } |
| 314 | 314 |
| 315 // Returns the smallest rectangle enclosing all of the painted content | 315 // Returns the smallest rectangle enclosing all of the painted content |
| 316 // respecting clipping, masking, filters, opacity, stroke-width and markers | 316 // respecting clipping, masking, filters, opacity, stroke-width and markers |
| 317 virtual FloatRect paintInvalidationRectInLocalCoordinates() const; | 317 virtual FloatRect paintInvalidationRectInLocalCoordinates() const; |
| 318 | 318 |
| 319 // SVG uses FloatPoint precise hit testing, and passes the point in parent | 319 // SVG uses FloatPoint precise hit testing, and passes the point in parent |
| 320 // coordinates instead of in paint invalidaiton container coordinates. Event
ually the | 320 // coordinates instead of in paint invalidaiton container coordinates. Event
ually the |
| 321 // rest of the rendering tree will move to a similar model. | 321 // rest of the rendering tree will move to a similar model. |
| 322 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F
loatPoint& pointInParent, HitTestAction); | 322 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F
loatPoint& pointInParent, HitTestAction); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 // is true if the renderer returned is an ancestor of paintInvalidationConta
iner. | 425 // is true if the renderer returned is an ancestor of paintInvalidationConta
iner. |
| 426 RenderObject* container(const RenderLayerModelObject* paintInvalidationConta
iner = 0, bool* paintInvalidationContainerSkipped = 0) const; | 426 RenderObject* container(const RenderLayerModelObject* paintInvalidationConta
iner = 0, bool* paintInvalidationContainerSkipped = 0) const; |
| 427 | 427 |
| 428 // TODO(esprehn): Remove this. | 428 // TODO(esprehn): Remove this. |
| 429 RenderObject* hoverAncestor() const { return parent(); } | 429 RenderObject* hoverAncestor() const { return parent(); } |
| 430 | 430 |
| 431 Element* offsetParent() const; | 431 Element* offsetParent() const; |
| 432 | 432 |
| 433 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec
t* newRoot = 0, SubtreeLayoutScope* = 0); | 433 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec
t* newRoot = 0, SubtreeLayoutScope* = 0); |
| 434 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou
tScope* = 0); | 434 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou
tScope* = 0); |
| 435 void setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior = MarkContaining
BlockChain, SubtreeLayoutScope* = 0); | |
| 436 void clearNeedsLayout(); | 435 void clearNeedsLayout(); |
| 437 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree
LayoutScope* = 0); | 436 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree
LayoutScope* = 0); |
| 438 void setNeedsPositionedMovementLayout(); | 437 void setNeedsPositionedMovementLayout(); |
| 439 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha
in); | 438 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha
in); |
| 440 void clearPreferredLogicalWidthsDirty(); | 439 void clearPreferredLogicalWidthsDirty(); |
| 441 void invalidateContainerPreferredLogicalWidths(); | 440 void invalidateContainerPreferredLogicalWidths(); |
| 442 | 441 |
| 443 void setNeedsLayoutAndPrefWidthsRecalc() | 442 void setNeedsLayoutAndPrefWidthsRecalc() |
| 444 { | 443 { |
| 445 setNeedsLayout(); | 444 setNeedsLayout(); |
| 446 setPreferredLogicalWidthsDirty(); | 445 setPreferredLogicalWidthsDirty(); |
| 447 } | 446 } |
| 448 void setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation() | |
| 449 { | |
| 450 setNeedsLayoutAndFullPaintInvalidation(); | |
| 451 setPreferredLogicalWidthsDirty(); | |
| 452 } | |
| 453 | 447 |
| 454 void setPositionState(EPosition position) | 448 void setPositionState(EPosition position) |
| 455 { | 449 { |
| 456 ASSERT(position != AbsolutePosition || isBox()); | 450 ASSERT(position != AbsolutePosition || isBox()); |
| 457 m_bitfields.setPositionedState(position); | 451 m_bitfields.setPositionedState(position); |
| 458 } | 452 } |
| 459 void clearPositionedState() { m_bitfields.clearPositionedState(); } | 453 void clearPositionedState() { m_bitfields.clearPositionedState(); } |
| 460 | 454 |
| 461 void setInline(bool isInline) { m_bitfields.setIsInline(isInline); } | 455 void setInline(bool isInline) { m_bitfields.setIsInline(isInline); } |
| 462 | 456 |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 | 906 |
| 913 // Allow equality comparisons of RenderObjects by reference or pointer, intercha
ngeably. | 907 // Allow equality comparisons of RenderObjects by reference or pointer, intercha
ngeably. |
| 914 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(RenderObject) | 908 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(RenderObject) |
| 915 | 909 |
| 916 inline bool RenderObject::documentBeingDestroyed() const | 910 inline bool RenderObject::documentBeingDestroyed() const |
| 917 { | 911 { |
| 918 return document().lifecycle().state() >= DocumentLifecycle::Stopping; | 912 return document().lifecycle().state() >= DocumentLifecycle::Stopping; |
| 919 } | 913 } |
| 920 | 914 |
| 921 // setNeedsLayout() won't cause full paint invalidations as | 915 // setNeedsLayout() won't cause full paint invalidations as |
| 922 // setNeedsLayoutAndFullPaintInvalidation() does. Otherwise the two methods are
identical. | 916 // setNeedsLayout() does. Otherwise the two methods are identical. |
| 923 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay
outScope* layouter) | 917 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay
outScope* layouter) |
| 924 { | 918 { |
| 925 ASSERT(!isSetNeedsLayoutForbidden()); | 919 ASSERT(!isSetNeedsLayoutForbidden()); |
| 926 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); | 920 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); |
| 927 setSelfNeedsLayout(true); | 921 setSelfNeedsLayout(true); |
| 928 if (!alreadyNeededLayout) { | 922 if (!alreadyNeededLayout) { |
| 929 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r
oot() != this)) | 923 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r
oot() != this)) |
| 930 markContainingBlocksForLayout(true, 0, layouter); | 924 markContainingBlocksForLayout(true, 0, layouter); |
| 931 } | 925 } |
| 932 } | 926 } |
| 933 | 927 |
| 934 // FIXME(sky): Remove this method. | |
| 935 inline void RenderObject::setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior
markParents, SubtreeLayoutScope* layouter) | |
| 936 { | |
| 937 setNeedsLayout(markParents, layouter); | |
| 938 } | |
| 939 | |
| 940 inline void RenderObject::clearNeedsLayout() | 928 inline void RenderObject::clearNeedsLayout() |
| 941 { | 929 { |
| 942 setOnlyNeededPositionedMovementLayout(needsPositionedMovementLayoutOnly()); | 930 setOnlyNeededPositionedMovementLayout(needsPositionedMovementLayoutOnly()); |
| 943 setNeededLayoutBecauseOfChildren(needsLayoutBecauseOfChildren()); | 931 setNeededLayoutBecauseOfChildren(needsLayoutBecauseOfChildren()); |
| 944 setSelfNeedsLayout(false); | 932 setSelfNeedsLayout(false); |
| 945 setEverHadLayout(true); | 933 setEverHadLayout(true); |
| 946 setPosChildNeedsLayout(false); | 934 setPosChildNeedsLayout(false); |
| 947 setNeedsSimplifiedNormalFlowLayout(false); | 935 setNeedsSimplifiedNormalFlowLayout(false); |
| 948 setNormalChildNeedsLayout(false); | 936 setNormalChildNeedsLayout(false); |
| 949 setNeedsPositionedMovementLayout(false); | 937 setNeedsPositionedMovementLayout(false); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1029 void showTree(const blink::RenderObject*); | 1017 void showTree(const blink::RenderObject*); |
| 1030 void showLineTree(const blink::RenderObject*); | 1018 void showLineTree(const blink::RenderObject*); |
| 1031 void showRenderTree(const blink::RenderObject* object1); | 1019 void showRenderTree(const blink::RenderObject* object1); |
| 1032 // We don't make object2 an optional parameter so that showRenderTree | 1020 // We don't make object2 an optional parameter so that showRenderTree |
| 1033 // can be called from gdb easily. | 1021 // can be called from gdb easily. |
| 1034 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); | 1022 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); |
| 1035 | 1023 |
| 1036 #endif | 1024 #endif |
| 1037 | 1025 |
| 1038 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_ | 1026 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_ |
| OLD | NEW |