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

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

Issue 854563005: Remove some unused paint invalidation members from RenderObject. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: add a bit more 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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter (); } 661 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter (); }
662 662
663 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& /* addit ionalOffset */, const RenderLayerModelObject* /* paintContainer */ = 0) const { }; 663 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& /* addit ionalOffset */, const RenderLayerModelObject* /* paintContainer */ = 0) const { };
664 664
665 RespectImageOrientationEnum shouldRespectImageOrientation() const; 665 RespectImageOrientationEnum shouldRespectImageOrientation() const;
666 666
667 bool isRelayoutBoundaryForInspector() const; 667 bool isRelayoutBoundaryForInspector() const;
668 668
669 void scheduleVisualUpdate(); 669 void scheduleVisualUpdate();
670 670
671 const LayoutRect& previousPaintInvalidationRect() const { return m_previousP aintInvalidationRect; }
672 void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPa intInvalidationRect = rect; }
673
674 const LayoutPoint& previousPositionFromPaintInvalidationContainer() const { return m_previousPositionFromPaintInvalidationContainer; }
675 void setPreviousPositionFromPaintInvalidationContainer(const LayoutPoint& lo cation) { m_previousPositionFromPaintInvalidationContainer = location; }
676
677 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv alidateOverflowForPaint(); }
678
679 bool onlyNeededPositionedMovementLayout() const { return m_bitfields.onlyNee dedPositionedMovementLayout(); } 671 bool onlyNeededPositionedMovementLayout() const { return m_bitfields.onlyNee dedPositionedMovementLayout(); }
680 void setOnlyNeededPositionedMovementLayout(bool b) { m_bitfields.setOnlyNeed edPositionedMovementLayout(b); } 672 void setOnlyNeededPositionedMovementLayout(bool b) { m_bitfields.setOnlyNeed edPositionedMovementLayout(b); }
681 673
682 bool neededLayoutBecauseOfChildren() const { return m_bitfields.neededLayout BecauseOfChildren(); } 674 bool neededLayoutBecauseOfChildren() const { return m_bitfields.neededLayout BecauseOfChildren(); }
683 void setNeededLayoutBecauseOfChildren(bool b) { m_bitfields.setNeededLayoutB ecauseOfChildren(b); } 675 void setNeededLayoutBecauseOfChildren(bool b) { m_bitfields.setNeededLayoutB ecauseOfChildren(b); }
684 676
685 void setNeedsOverflowRecalcAfterStyleChange(); 677 void setNeedsOverflowRecalcAfterStyleChange();
686 void markContainingBlocksForOverflowRecalc(); 678 void markContainingBlocksForOverflowRecalc();
687 679
688 protected: 680 protected:
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 // FIXME(sky): Remove this enum and just use EPosition directly. 761 // FIXME(sky): Remove this enum and just use EPosition directly.
770 enum PositionedState { 762 enum PositionedState {
771 IsStaticallyPositioned = 0, 763 IsStaticallyPositioned = 0,
772 IsRelativelyPositioned = 1, 764 IsRelativelyPositioned = 1,
773 IsOutOfFlowPositioned = 2, 765 IsOutOfFlowPositioned = 2,
774 }; 766 };
775 767
776 public: 768 public:
777 RenderObjectBitfields(Node* node) 769 RenderObjectBitfields(Node* node)
778 : m_selfNeedsLayout(false) 770 : m_selfNeedsLayout(false)
779 , m_shouldInvalidateOverflowForPaint(false)
780 , m_onlyNeededPositionedMovementLayout(false) 771 , m_onlyNeededPositionedMovementLayout(false)
781 , m_neededLayoutBecauseOfChildren(false) 772 , m_neededLayoutBecauseOfChildren(false)
782 , m_needsPositionedMovementLayout(false) 773 , m_needsPositionedMovementLayout(false)
783 , m_normalChildNeedsLayout(false) 774 , m_normalChildNeedsLayout(false)
784 , m_posChildNeedsLayout(false) 775 , m_posChildNeedsLayout(false)
785 , m_needsSimplifiedNormalFlowLayout(false) 776 , m_needsSimplifiedNormalFlowLayout(false)
786 , m_preferredLogicalWidthsDirty(false) 777 , m_preferredLogicalWidthsDirty(false)
787 , m_selfNeedsOverflowRecalcAfterStyleChange(false) 778 , m_selfNeedsOverflowRecalcAfterStyleChange(false)
788 , m_childNeedsOverflowRecalcAfterStyleChange(false) 779 , m_childNeedsOverflowRecalcAfterStyleChange(false)
789 , m_isAnonymous(!node) 780 , m_isAnonymous(!node)
790 , m_isText(false) 781 , m_isText(false)
791 , m_isBox(false) 782 , m_isBox(false)
792 , m_isInline(true) 783 , m_isInline(true)
793 , m_isReplaced(false) 784 , m_isReplaced(false)
794 , m_isDragging(false) 785 , m_isDragging(false)
795 , m_hasLayer(false) 786 , m_hasLayer(false)
796 , m_hasOverflowClip(false) 787 , m_hasOverflowClip(false)
797 , m_hasTransform(false) 788 , m_hasTransform(false)
798 , m_everHadLayout(false) 789 , m_everHadLayout(false)
799 , m_ancestorLineBoxDirty(false) 790 , m_ancestorLineBoxDirty(false)
800 , m_alwaysCreateLineBoxesForRenderInline(false) 791 , m_alwaysCreateLineBoxesForRenderInline(false)
801 , m_positionedState(IsStaticallyPositioned) 792 , m_positionedState(IsStaticallyPositioned)
802 , m_selectionState(SelectionNone) 793 , m_selectionState(SelectionNone)
803 , m_boxDecorationBackgroundState(NoBoxDecorationBackground) 794 , m_boxDecorationBackgroundState(NoBoxDecorationBackground)
804 { 795 {
805 } 796 }
806 797
807 // 32 bits have been used in the first word, and 11 in the second. 798 // 32 bits have been used in the first word, and 11 in the second.
808 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); 799 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout);
809 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO verflowForPaint);
810 ADD_BOOLEAN_BITFIELD(onlyNeededPositionedMovementLayout, OnlyNeededPosit ionedMovementLayout); 800 ADD_BOOLEAN_BITFIELD(onlyNeededPositionedMovementLayout, OnlyNeededPosit ionedMovementLayout);
811 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren); 801 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren);
812 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout); 802 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout);
813 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); 803 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout);
814 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout); 804 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout);
815 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout); 805 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout);
816 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty); 806 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty);
817 ADD_BOOLEAN_BITFIELD(selfNeedsOverflowRecalcAfterStyleChange, SelfNeedsO verflowRecalcAfterStyleChange); 807 ADD_BOOLEAN_BITFIELD(selfNeedsOverflowRecalcAfterStyleChange, SelfNeedsO verflowRecalcAfterStyleChange);
818 ADD_BOOLEAN_BITFIELD(childNeedsOverflowRecalcAfterStyleChange, ChildNeed sOverflowRecalcAfterStyleChange); 808 ADD_BOOLEAN_BITFIELD(childNeedsOverflowRecalcAfterStyleChange, ChildNeed sOverflowRecalcAfterStyleChange);
819 809
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 851
862 RenderObjectBitfields m_bitfields; 852 RenderObjectBitfields m_bitfields;
863 853
864 void setSelfNeedsLayout(bool b) { m_bitfields.setSelfNeedsLayout(b); } 854 void setSelfNeedsLayout(bool b) { m_bitfields.setSelfNeedsLayout(b); }
865 void setNeedsPositionedMovementLayout(bool b) { m_bitfields.setNeedsPosition edMovementLayout(b); } 855 void setNeedsPositionedMovementLayout(bool b) { m_bitfields.setNeedsPosition edMovementLayout(b); }
866 void setNormalChildNeedsLayout(bool b) { m_bitfields.setNormalChildNeedsLayo ut(b); } 856 void setNormalChildNeedsLayout(bool b) { m_bitfields.setNormalChildNeedsLayo ut(b); }
867 void setPosChildNeedsLayout(bool b) { m_bitfields.setPosChildNeedsLayout(b); } 857 void setPosChildNeedsLayout(bool b) { m_bitfields.setPosChildNeedsLayout(b); }
868 void setNeedsSimplifiedNormalFlowLayout(bool b) { m_bitfields.setNeedsSimpli fiedNormalFlowLayout(b); } 858 void setNeedsSimplifiedNormalFlowLayout(bool b) { m_bitfields.setNeedsSimpli fiedNormalFlowLayout(b); }
869 void setIsDragging(bool b) { m_bitfields.setIsDragging(b); } 859 void setIsDragging(bool b) { m_bitfields.setIsDragging(b); }
870 void setEverHadLayout(bool b) { m_bitfields.setEverHadLayout(b); } 860 void setEverHadLayout(bool b) { m_bitfields.setEverHadLayout(b); }
871 void setShouldInvalidateOverflowForPaint(bool b) { m_bitfields.setShouldInva lidateOverflowForPaint(b); }
872 void setSelfNeedsOverflowRecalcAfterStyleChange(bool b) { m_bitfields.setSel fNeedsOverflowRecalcAfterStyleChange(b); } 861 void setSelfNeedsOverflowRecalcAfterStyleChange(bool b) { m_bitfields.setSel fNeedsOverflowRecalcAfterStyleChange(b); }
873 void setChildNeedsOverflowRecalcAfterStyleChange(bool b) { m_bitfields.setCh ildNeedsOverflowRecalcAfterStyleChange(b); } 862 void setChildNeedsOverflowRecalcAfterStyleChange(bool b) { m_bitfields.setCh ildNeedsOverflowRecalcAfterStyleChange(b); }
874 863
875 private: 864 private:
876 // Store state between styleWillChange and styleDidChange 865 // Store state between styleWillChange and styleDidChange
877 static bool s_affectsParentBlock; 866 static bool s_affectsParentBlock;
878 867
879 // This stores the paint invalidation rect from the previous layout.
880 LayoutRect m_previousPaintInvalidationRect;
881
882 // This stores the position in the paint invalidation container's coordinate .
883 // It is used to detect renderer shifts that forces a full invalidation.
884 LayoutPoint m_previousPositionFromPaintInvalidationContainer;
885
886 static unsigned s_instanceCount; 868 static unsigned s_instanceCount;
887 }; 869 };
888 870
889 // Allow equality comparisons of RenderObjects by reference or pointer, intercha ngeably. 871 // Allow equality comparisons of RenderObjects by reference or pointer, intercha ngeably.
890 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(RenderObject) 872 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(RenderObject)
891 873
892 inline bool RenderObject::documentBeingDestroyed() const 874 inline bool RenderObject::documentBeingDestroyed() const
893 { 875 {
894 return document().lifecycle().state() >= DocumentLifecycle::Stopping; 876 return document().lifecycle().state() >= DocumentLifecycle::Stopping;
895 } 877 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 void showTree(const blink::RenderObject*); 981 void showTree(const blink::RenderObject*);
1000 void showLineTree(const blink::RenderObject*); 982 void showLineTree(const blink::RenderObject*);
1001 void showRenderTree(const blink::RenderObject* object1); 983 void showRenderTree(const blink::RenderObject* object1);
1002 // We don't make object2 an optional parameter so that showRenderTree 984 // We don't make object2 an optional parameter so that showRenderTree
1003 // can be called from gdb easily. 985 // can be called from gdb easily.
1004 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 986 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
1005 987
1006 #endif 988 #endif
1007 989
1008 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_ 990 #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