Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Side by Side Diff: sky/engine/core/rendering/RenderObject.h

Issue 791023006: Delete invalidateTreeIfNeeded. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Remove unneeded call Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 showRenderTreeForThis(); 209 showRenderTreeForThis();
210 #endif 210 #endif
211 ASSERT_WITH_SECURITY_IMPLICATION(!needsLayout()); 211 ASSERT_WITH_SECURITY_IMPLICATION(!needsLayout());
212 } 212 }
213 213
214 void assertSubtreeIsLaidOut() const 214 void assertSubtreeIsLaidOut() const
215 { 215 {
216 for (const RenderObject* renderer = this; renderer; renderer = renderer- >nextInPreOrder()) 216 for (const RenderObject* renderer = this; renderer; renderer = renderer- >nextInPreOrder())
217 renderer->assertRendererLaidOut(); 217 renderer->assertRendererLaidOut();
218 } 218 }
219
220 void assertRendererClearedPaintInvalidationState() const
221 {
222 #ifndef NDEBUG
223 if (paintInvalidationStateIsDirty()) {
224 showRenderTreeForThis();
225 ASSERT_NOT_REACHED();
226 }
227 #endif
228 }
229
230 void assertSubtreeClearedPaintInvalidationState() const
231 {
232 for (const RenderObject* renderer = this; renderer; renderer = renderer- >nextInPreOrder())
233 renderer->assertRendererClearedPaintInvalidationState();
234 }
235
236 #endif 219 #endif
237 220
238 bool skipInvalidationWhenLaidOutChildren() const; 221 bool skipInvalidationWhenLaidOutChildren() const;
239 222
240 // FIXME: This could be used when changing the size of a renderer without ch ildren to skip some invalidations. 223 // FIXME: This could be used when changing the size of a renderer without ch ildren to skip some invalidations.
241 bool rendererHasNoBoxEffect() const 224 bool rendererHasNoBoxEffect() const
242 { 225 {
243 return !style()->hasVisualOverflowingEffect() && !style()->hasBorder() & & !style()->hasBackground(); 226 return !style()->hasVisualOverflowingEffect() && !style()->hasBorder() & & !style()->hasBackground();
244 } 227 }
245 228
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 }; 579 };
597 580
598 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu irksMode = false, bool firstlineStyle = false); 581 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu irksMode = false, bool firstlineStyle = false);
599 582
600 // Return the RenderLayerModelObject in the container chain which is respons ible for painting this object, or 0 583 // Return the RenderLayerModelObject in the container chain which is respons ible for painting this object, or 0
601 // if painting is root-relative. This is the container that should be passed to the 'forPaintInvalidation' 584 // if painting is root-relative. This is the container that should be passed to the 'forPaintInvalidation'
602 // methods. 585 // methods.
603 const RenderLayerModelObject* containerForPaintInvalidation() const; 586 const RenderLayerModelObject* containerForPaintInvalidation() const;
604 const RenderLayerModelObject* adjustCompositedContainerForSpecialAncestors(c onst RenderLayerModelObject* paintInvalidationContainer) const; 587 const RenderLayerModelObject* adjustCompositedContainerForSpecialAncestors(c onst RenderLayerModelObject* paintInvalidationContainer) const;
605 588
606 // Walk the tree after layout issuing paint invalidations for renderers that have changed or moved, updating bounds that have changed, and clearing paint in validation state.
607 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&);
608
609 // Given a rect in the object's coordinate space, compute a rect suitable fo r invalidating paints of 589 // Given a rect in the object's coordinate space, compute a rect suitable fo r invalidating paints of
610 // that rect in the coordinate space of paintInvalidationContainer. 590 // that rect in the coordinate space of paintInvalidationContainer.
611 virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const; 591 virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const;
612 592
613 virtual unsigned length() const { return 1; } 593 virtual unsigned length() const { return 1; }
614 594
615 // FIXME(sky): Remove 595 // FIXME(sky): Remove
616 bool isFloatingOrOutOfFlowPositioned() const { return isOutOfFlowPositioned( ); } 596 bool isFloatingOrOutOfFlowPositioned() const { return isOutOfFlowPositioned( ); }
617 597
618 bool isTransparent() const { return style()->hasOpacity(); } 598 bool isTransparent() const { return style()->hasOpacity(); }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 virtual bool isFlexibleBox() const { return false; } 648 virtual bool isFlexibleBox() const { return false; }
669 649
670 virtual int caretMinOffset() const; 650 virtual int caretMinOffset() const;
671 virtual int caretMaxOffset() const; 651 virtual int caretMaxOffset() const;
672 652
673 virtual int previousOffset(int current) const; 653 virtual int previousOffset(int current) const;
674 virtual int previousOffsetForBackwardDeletion(int current) const; 654 virtual int previousOffsetForBackwardDeletion(int current) const;
675 virtual int nextOffset(int current) const; 655 virtual int nextOffset(int current) const;
676 656
677 virtual void imageChanged(ImageResource*, const IntRect* = 0) override final ; 657 virtual void imageChanged(ImageResource*, const IntRect* = 0) override final ;
678 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) { } 658 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
679 virtual bool willRenderImage(ImageResource*) override final; 659 virtual bool willRenderImage(ImageResource*) override final;
680 660
681 void selectionStartEnd(int& spos, int& epos) const; 661 void selectionStartEnd(int& spos, int& epos) const;
682 662
683 void remove() { if (parent()) parent()->removeChild(this); } 663 void remove() { if (parent()) parent()->removeChild(this); }
684 664
685 bool supportsTouchAction() const; 665 bool supportsTouchAction() const;
686 666
687 bool visibleToHitTestRequest(const HitTestRequest& request) const { return ( request.ignorePointerEventsNone() || style()->pointerEvents() != PE_NONE); } 667 bool visibleToHitTestRequest(const HitTestRequest& request) const { return ( request.ignorePointerEventsNone() || style()->pointerEvents() != PE_NONE); }
688 668
(...skipping 12 matching lines...) Expand all
701 void getTransformFromContainer(const RenderObject* container, const LayoutSi ze& offsetInContainer, TransformationMatrix&) const; 681 void getTransformFromContainer(const RenderObject* container, const LayoutSi ze& offsetInContainer, TransformationMatrix&) const;
702 682
703 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter (); } 683 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter (); }
704 684
705 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& /* addit ionalOffset */, const RenderLayerModelObject* /* paintContainer */ = 0) const { }; 685 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& /* addit ionalOffset */, const RenderLayerModelObject* /* paintContainer */ = 0) const { };
706 686
707 RespectImageOrientationEnum shouldRespectImageOrientation() const; 687 RespectImageOrientationEnum shouldRespectImageOrientation() const;
708 688
709 bool isRelayoutBoundaryForInspector() const; 689 bool isRelayoutBoundaryForInspector() const;
710 690
691 void scheduleVisualUpdate();
692
711 const LayoutRect& previousPaintInvalidationRect() const { return m_previousP aintInvalidationRect; } 693 const LayoutRect& previousPaintInvalidationRect() const { return m_previousP aintInvalidationRect; }
712 void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPa intInvalidationRect = rect; } 694 void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPa intInvalidationRect = rect; }
713 695
714 const LayoutPoint& previousPositionFromPaintInvalidationContainer() const { return m_previousPositionFromPaintInvalidationContainer; } 696 const LayoutPoint& previousPositionFromPaintInvalidationContainer() const { return m_previousPositionFromPaintInvalidationContainer; }
715 void setPreviousPositionFromPaintInvalidationContainer(const LayoutPoint& lo cation) { m_previousPositionFromPaintInvalidationContainer = location; } 697 void setPreviousPositionFromPaintInvalidationContainer(const LayoutPoint& lo cation) { m_previousPositionFromPaintInvalidationContainer = location; }
716 698
717 bool shouldDoFullPaintInvalidation() const { return m_bitfields.shouldDoFull PaintInvalidation(); }
718 void setShouldDoFullPaintInvalidation(bool, MarkingBehavior = MarkContaining BlockChain);
719
720 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv alidateOverflowForPaint(); } 699 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv alidateOverflowForPaint(); }
721 700
722 bool onlyNeededPositionedMovementLayout() const { return m_bitfields.onlyNee dedPositionedMovementLayout(); } 701 bool onlyNeededPositionedMovementLayout() const { return m_bitfields.onlyNee dedPositionedMovementLayout(); }
723 void setOnlyNeededPositionedMovementLayout(bool b) { m_bitfields.setOnlyNeed edPositionedMovementLayout(b); } 702 void setOnlyNeededPositionedMovementLayout(bool b) { m_bitfields.setOnlyNeed edPositionedMovementLayout(b); }
724 703
725 void clearPaintInvalidationState(const PaintInvalidationState&);
726
727 // layoutDidGetCalled indicates whether this render object was re-laid-out
728 // since the last call to setLayoutDidGetCalled(false) on this object.
729 bool layoutDidGetCalled() const { return m_bitfields.layoutDidGetCalled(); }
730 void setLayoutDidGetCalled(bool b)
731 {
732 // FIXME(sky): Get rid of this once we get rid of all paint invalidation .
733 m_bitfields.setLayoutDidGetCalled(b);
734 }
735
736 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval idation(); }
737
738 bool neededLayoutBecauseOfChildren() const { return m_bitfields.neededLayout BecauseOfChildren(); } 704 bool neededLayoutBecauseOfChildren() const { return m_bitfields.neededLayout BecauseOfChildren(); }
739 void setNeededLayoutBecauseOfChildren(bool b) { m_bitfields.setNeededLayoutB ecauseOfChildren(b); } 705 void setNeededLayoutBecauseOfChildren(bool b) { m_bitfields.setNeededLayoutB ecauseOfChildren(b); }
740 706
741 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva lidationState)
742 {
743 return paintInvalidationState.forceCheckForPaintInvalidation() ||
744 layoutDidGetCalled() || mayNeedPaintInvalidation() || shouldDoFullPa intInvalidation();
745 }
746
747 bool supportsPaintInvalidationStateCachedOffsets() const { return !hasTransf orm(); } 707 bool supportsPaintInvalidationStateCachedOffsets() const { return !hasTransf orm(); }
748 708
749 void setNeedsOverflowRecalcAfterStyleChange(); 709 void setNeedsOverflowRecalcAfterStyleChange();
750 void markContainingBlocksForOverflowRecalc(); 710 void markContainingBlocksForOverflowRecalc();
751 711
752 protected: 712 protected:
753 // Overrides should call the superclass at the end. m_style will be 0 the fi rst time 713 // Overrides should call the superclass at the end. m_style will be 0 the fi rst time
754 // this function will be called. 714 // this function will be called.
755 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle); 715 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle);
756 // Overrides should call the superclass at the start. |oldStyle| will be 0 t he first 716 // Overrides should call the superclass at the start. |oldStyle| will be 0 t he first
(...skipping 21 matching lines...) Expand all
778 738
779 void clearLayoutRootIfNeeded() const; 739 void clearLayoutRootIfNeeded() const;
780 virtual void willBeDestroyed(); 740 virtual void willBeDestroyed();
781 void postDestroy(); 741 void postDestroy();
782 742
783 void insertedIntoTree(); 743 void insertedIntoTree();
784 void willBeRemovedFromTree(); 744 void willBeRemovedFromTree();
785 745
786 void setDocumentForAnonymous(Document* document) { ASSERT(isAnonymous()); m_ node = document; } 746 void setDocumentForAnonymous(Document* document) { ASSERT(isAnonymous()); m_ node = document; }
787 747
788 #if ENABLE(ASSERT)
789 bool paintInvalidationStateIsDirty() const
790 {
791 return layoutDidGetCalled() || shouldDoFullPaintInvalidation()
792 || onlyNeededPositionedMovementLayout() || neededLayoutBecauseOfChil dren() || mayNeedPaintInvalidation();
793 }
794 #endif
795
796 private: 748 private:
797 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const; 749 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const;
798 750
799 StyleDifference adjustStyleDifference(StyleDifference) const; 751 StyleDifference adjustStyleDifference(StyleDifference) const;
800 752
801 Color selectionColor(int colorProperty) const; 753 Color selectionColor(int colorProperty) const;
802 754
803 #if ENABLE(ASSERT) 755 #if ENABLE(ASSERT)
804 void checkBlockPositionedObjectsNeedLayout(); 756 void checkBlockPositionedObjectsNeedLayout();
805 #endif 757 #endif
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 // FIXME(sky): Remove this enum and just use EPosition directly. 793 // FIXME(sky): Remove this enum and just use EPosition directly.
842 enum PositionedState { 794 enum PositionedState {
843 IsStaticallyPositioned = 0, 795 IsStaticallyPositioned = 0,
844 IsRelativelyPositioned = 1, 796 IsRelativelyPositioned = 1,
845 IsOutOfFlowPositioned = 2, 797 IsOutOfFlowPositioned = 2,
846 }; 798 };
847 799
848 public: 800 public:
849 RenderObjectBitfields(Node* node) 801 RenderObjectBitfields(Node* node)
850 : m_selfNeedsLayout(false) 802 : m_selfNeedsLayout(false)
851 , m_shouldDoFullPaintInvalidation(false)
852 , m_shouldInvalidateOverflowForPaint(false) 803 , m_shouldInvalidateOverflowForPaint(false)
853 // FIXME: We should remove mayNeedPaintInvalidation once we are able to
854 // use the other layout flags to detect the same cases. crbug.com/37 0118
855 , m_mayNeedPaintInvalidation(false)
856 , m_onlyNeededPositionedMovementLayout(false) 804 , m_onlyNeededPositionedMovementLayout(false)
857 , m_neededLayoutBecauseOfChildren(false) 805 , m_neededLayoutBecauseOfChildren(false)
858 , m_needsPositionedMovementLayout(false) 806 , m_needsPositionedMovementLayout(false)
859 , m_normalChildNeedsLayout(false) 807 , m_normalChildNeedsLayout(false)
860 , m_posChildNeedsLayout(false) 808 , m_posChildNeedsLayout(false)
861 , m_needsSimplifiedNormalFlowLayout(false) 809 , m_needsSimplifiedNormalFlowLayout(false)
862 , m_preferredLogicalWidthsDirty(false) 810 , m_preferredLogicalWidthsDirty(false)
863 , m_selfNeedsOverflowRecalcAfterStyleChange(false) 811 , m_selfNeedsOverflowRecalcAfterStyleChange(false)
864 , m_childNeedsOverflowRecalcAfterStyleChange(false) 812 , m_childNeedsOverflowRecalcAfterStyleChange(false)
865 , m_isAnonymous(!node) 813 , m_isAnonymous(!node)
866 , m_isText(false) 814 , m_isText(false)
867 , m_isBox(false) 815 , m_isBox(false)
868 , m_isInline(true) 816 , m_isInline(true)
869 , m_isReplaced(false) 817 , m_isReplaced(false)
870 , m_isDragging(false) 818 , m_isDragging(false)
871 , m_hasLayer(false) 819 , m_hasLayer(false)
872 , m_hasOverflowClip(false) 820 , m_hasOverflowClip(false)
873 , m_hasTransform(false) 821 , m_hasTransform(false)
874 , m_everHadLayout(false) 822 , m_everHadLayout(false)
875 , m_ancestorLineBoxDirty(false) 823 , m_ancestorLineBoxDirty(false)
876 , m_layoutDidGetCalled(false)
877 , m_alwaysCreateLineBoxesForRenderInline(false) 824 , m_alwaysCreateLineBoxesForRenderInline(false)
878 , m_positionedState(IsStaticallyPositioned) 825 , m_positionedState(IsStaticallyPositioned)
879 , m_selectionState(SelectionNone) 826 , m_selectionState(SelectionNone)
880 , m_boxDecorationBackgroundState(NoBoxDecorationBackground) 827 , m_boxDecorationBackgroundState(NoBoxDecorationBackground)
881 { 828 {
882 } 829 }
883 830
884 // 32 bits have been used in the first word, and 11 in the second. 831 // 32 bits have been used in the first word, and 11 in the second.
885 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); 832 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout);
886 ADD_BOOLEAN_BITFIELD(shouldDoFullPaintInvalidation, ShouldDoFullPaintInv alidation);
887 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO verflowForPaint); 833 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO verflowForPaint);
888 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation) ;
889 ADD_BOOLEAN_BITFIELD(onlyNeededPositionedMovementLayout, OnlyNeededPosit ionedMovementLayout); 834 ADD_BOOLEAN_BITFIELD(onlyNeededPositionedMovementLayout, OnlyNeededPosit ionedMovementLayout);
890 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren); 835 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren);
891 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout); 836 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout);
892 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); 837 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout);
893 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout); 838 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout);
894 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout); 839 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout);
895 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty); 840 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty);
896 ADD_BOOLEAN_BITFIELD(selfNeedsOverflowRecalcAfterStyleChange, SelfNeedsO verflowRecalcAfterStyleChange); 841 ADD_BOOLEAN_BITFIELD(selfNeedsOverflowRecalcAfterStyleChange, SelfNeedsO verflowRecalcAfterStyleChange);
897 ADD_BOOLEAN_BITFIELD(childNeedsOverflowRecalcAfterStyleChange, ChildNeed sOverflowRecalcAfterStyleChange); 842 ADD_BOOLEAN_BITFIELD(childNeedsOverflowRecalcAfterStyleChange, ChildNeed sOverflowRecalcAfterStyleChange);
898 843
899 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous); 844 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous);
900 ADD_BOOLEAN_BITFIELD(isText, IsText); 845 ADD_BOOLEAN_BITFIELD(isText, IsText);
901 ADD_BOOLEAN_BITFIELD(isBox, IsBox); 846 ADD_BOOLEAN_BITFIELD(isBox, IsBox);
902 ADD_BOOLEAN_BITFIELD(isInline, IsInline); 847 ADD_BOOLEAN_BITFIELD(isInline, IsInline);
903 ADD_BOOLEAN_BITFIELD(isReplaced, IsReplaced); 848 ADD_BOOLEAN_BITFIELD(isReplaced, IsReplaced);
904 ADD_BOOLEAN_BITFIELD(isDragging, IsDragging); 849 ADD_BOOLEAN_BITFIELD(isDragging, IsDragging);
905 850
906 ADD_BOOLEAN_BITFIELD(hasLayer, HasLayer); 851 ADD_BOOLEAN_BITFIELD(hasLayer, HasLayer);
907 ADD_BOOLEAN_BITFIELD(hasOverflowClip, HasOverflowClip); // Set in the ca se of overflow:auto/scroll/hidden 852 ADD_BOOLEAN_BITFIELD(hasOverflowClip, HasOverflowClip); // Set in the ca se of overflow:auto/scroll/hidden
908 ADD_BOOLEAN_BITFIELD(hasTransform, HasTransform); 853 ADD_BOOLEAN_BITFIELD(hasTransform, HasTransform);
909 854
910 ADD_BOOLEAN_BITFIELD(everHadLayout, EverHadLayout); 855 ADD_BOOLEAN_BITFIELD(everHadLayout, EverHadLayout);
911 ADD_BOOLEAN_BITFIELD(ancestorLineBoxDirty, AncestorLineBoxDirty); 856 ADD_BOOLEAN_BITFIELD(ancestorLineBoxDirty, AncestorLineBoxDirty);
912 857
913 ADD_BOOLEAN_BITFIELD(layoutDidGetCalled, LayoutDidGetCalled);
914
915 // from RenderInline 858 // from RenderInline
916 ADD_BOOLEAN_BITFIELD(alwaysCreateLineBoxesForRenderInline, AlwaysCreateL ineBoxesForRenderInline); 859 ADD_BOOLEAN_BITFIELD(alwaysCreateLineBoxesForRenderInline, AlwaysCreateL ineBoxesForRenderInline);
917 860
918 private: 861 private:
919 unsigned m_positionedState : 2; // PositionedState 862 unsigned m_positionedState : 2; // PositionedState
920 unsigned m_selectionState : 3; // SelectionState 863 unsigned m_selectionState : 3; // SelectionState
921 unsigned m_boxDecorationBackgroundState : 2; // BoxDecorationBackgroundS tate 864 unsigned m_boxDecorationBackgroundState : 2; // BoxDecorationBackgroundS tate
922 865
923 public: 866 public:
924 bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOf FlowPositioned; } 867 bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOf FlowPositioned; }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 { 924 {
982 ASSERT(!isSetNeedsLayoutForbidden()); 925 ASSERT(!isSetNeedsLayoutForbidden());
983 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); 926 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout();
984 setSelfNeedsLayout(true); 927 setSelfNeedsLayout(true);
985 if (!alreadyNeededLayout) { 928 if (!alreadyNeededLayout) {
986 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r oot() != this)) 929 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r oot() != this))
987 markContainingBlocksForLayout(true, 0, layouter); 930 markContainingBlocksForLayout(true, 0, layouter);
988 } 931 }
989 } 932 }
990 933
934 // FIXME(sky): Remove this method.
991 inline void RenderObject::setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior markParents, SubtreeLayoutScope* layouter) 935 inline void RenderObject::setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior markParents, SubtreeLayoutScope* layouter)
992 { 936 {
993 setNeedsLayout(markParents, layouter); 937 setNeedsLayout(markParents, layouter);
994 setShouldDoFullPaintInvalidation(true);
995 } 938 }
996 939
997 inline void RenderObject::clearNeedsLayout() 940 inline void RenderObject::clearNeedsLayout()
998 { 941 {
999 setOnlyNeededPositionedMovementLayout(needsPositionedMovementLayoutOnly()); 942 setOnlyNeededPositionedMovementLayout(needsPositionedMovementLayoutOnly());
1000 setNeededLayoutBecauseOfChildren(needsLayoutBecauseOfChildren()); 943 setNeededLayoutBecauseOfChildren(needsLayoutBecauseOfChildren());
1001 setLayoutDidGetCalled(true);
1002 setSelfNeedsLayout(false); 944 setSelfNeedsLayout(false);
1003 setEverHadLayout(true); 945 setEverHadLayout(true);
1004 setPosChildNeedsLayout(false); 946 setPosChildNeedsLayout(false);
1005 setNeedsSimplifiedNormalFlowLayout(false); 947 setNeedsSimplifiedNormalFlowLayout(false);
1006 setNormalChildNeedsLayout(false); 948 setNormalChildNeedsLayout(false);
1007 setNeedsPositionedMovementLayout(false); 949 setNeedsPositionedMovementLayout(false);
1008 setAncestorLineBoxDirty(false); 950 setAncestorLineBoxDirty(false);
1009 #if ENABLE(ASSERT) 951 #if ENABLE(ASSERT)
1010 checkBlockPositionedObjectsNeedLayout(); 952 checkBlockPositionedObjectsNeedLayout();
1011 #endif 953 #endif
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 void showTree(const blink::RenderObject*); 1029 void showTree(const blink::RenderObject*);
1088 void showLineTree(const blink::RenderObject*); 1030 void showLineTree(const blink::RenderObject*);
1089 void showRenderTree(const blink::RenderObject* object1); 1031 void showRenderTree(const blink::RenderObject* object1);
1090 // We don't make object2 an optional parameter so that showRenderTree 1032 // We don't make object2 an optional parameter so that showRenderTree
1091 // can be called from gdb easily. 1033 // can be called from gdb easily.
1092 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 1034 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
1093 1035
1094 #endif 1036 #endif
1095 1037
1096 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_ 1038 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayerScrollableArea.cpp ('k') | sky/engine/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698