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

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

Issue 844023003: Delete InvalidationReason. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « sky/engine/core/rendering/RenderBox.cpp ('k') | sky/engine/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 enum MapCoordinatesMode { 100 enum MapCoordinatesMode {
101 UseTransforms = 1 << 0, 101 UseTransforms = 1 << 0,
102 // FIXME(sky): What is this for? Do we need it? 102 // FIXME(sky): What is this for? Do we need it?
103 ApplyContainerFlip = 1 << 1, 103 ApplyContainerFlip = 1 << 1,
104 // FIXME(sky): Remove 104 // FIXME(sky): Remove
105 TraverseDocumentBoundaries = 1 << 2, 105 TraverseDocumentBoundaries = 1 << 2,
106 }; 106 };
107 typedef unsigned MapCoordinatesFlags; 107 typedef unsigned MapCoordinatesFlags;
108 108
109 enum InvalidationReason {
110 InvalidationNone,
111 InvalidationIncremental,
112 InvalidationFull,
113 InvalidationBorderBoxChange,
114 InvalidationBoundsChange,
115 InvalidationLocationChange,
116 InvalidationScroll,
117 InvalidationSelection,
118 InvalidationLayer,
119 InvalidationPaint,
120 InvalidationPaintRectangle
121 };
122
123 const int caretWidth = 1; 109 const int caretWidth = 1;
124 110
125 struct AnnotatedRegionValue { 111 struct AnnotatedRegionValue {
126 bool operator==(const AnnotatedRegionValue& o) const 112 bool operator==(const AnnotatedRegionValue& o) const
127 { 113 {
128 return draggable == o.draggable && bounds == o.bounds; 114 return draggable == o.draggable && bounds == o.bounds;
129 } 115 }
130 116
131 LayoutRect bounds; 117 LayoutRect bounds;
132 bool draggable; 118 bool draggable;
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 613
628 // Returns the rect bounds needed to invalidate the paint of this object, in the coordinate space of the rendering backing of |paintInvalidationContainer| 614 // Returns the rect bounds needed to invalidate the paint of this object, in the coordinate space of the rendering backing of |paintInvalidationContainer|
629 LayoutRect boundsRectForPaintInvalidation(const RenderLayerModelObject* pain tInvalidationContainer, const PaintInvalidationState* = 0) const; 615 LayoutRect boundsRectForPaintInvalidation(const RenderLayerModelObject* pain tInvalidationContainer, const PaintInvalidationState* = 0) const;
630 616
631 // Invalidate the paint of a specific subrectangle within a given object. Th e rect |r| is in the object's coordinate space. 617 // Invalidate the paint of a specific subrectangle within a given object. Th e rect |r| is in the object's coordinate space.
632 void invalidatePaintRectangle(const LayoutRect&) const; 618 void invalidatePaintRectangle(const LayoutRect&) const;
633 619
634 // 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. 620 // 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.
635 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&); 621 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&);
636 622
637 virtual void invalidatePaintForOverflow();
638 void invalidatePaintForOverflowIfNeeded();
639
640 bool checkForPaintInvalidation() const; 623 bool checkForPaintInvalidation() const;
641 624
642 // Returns the rect that should have paint invalidated whenever this object changes. The rect is in the view's 625 // Returns the rect that should have paint invalidated whenever this object changes. The rect is in the view's
643 // coordinate space. This method deals with outlines and overflow. 626 // coordinate space. This method deals with outlines and overflow.
644 LayoutRect absoluteClippedOverflowRect() const; 627 LayoutRect absoluteClippedOverflowRect() const;
645 IntRect pixelSnappedAbsoluteClippedOverflowRect() const; 628 IntRect pixelSnappedAbsoluteClippedOverflowRect() const;
646 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons t; 629 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons t;
647 virtual LayoutRect rectWithOutlineForPaintInvalidation(const RenderLayerMode lObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalid ationState* = 0) const; 630 virtual LayoutRect rectWithOutlineForPaintInvalidation(const RenderLayerMode lObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalid ationState* = 0) const;
648 631
649 // Given a rect in the object's coordinate space, compute a rect suitable fo r invalidating paints of 632 // Given a rect in the object's coordinate space, compute a rect suitable fo r invalidating paints of
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 806
824 void clearLayoutRootIfNeeded() const; 807 void clearLayoutRootIfNeeded() const;
825 virtual void willBeDestroyed(); 808 virtual void willBeDestroyed();
826 void postDestroy(); 809 void postDestroy();
827 810
828 void insertedIntoTree(); 811 void insertedIntoTree();
829 void willBeRemovedFromTree(); 812 void willBeRemovedFromTree();
830 813
831 void setDocumentForAnonymous(Document* document) { ASSERT(isAnonymous()); m_ node = document; } 814 void setDocumentForAnonymous(Document* document) { ASSERT(isAnonymous()); m_ node = document; }
832 815
833 virtual InvalidationReason getPaintInvalidationReason(const RenderLayerModel Object& paintInvalidationContainer,
834 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva lidationContainer,
835 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInva lidationContainer);
836
837 #if ENABLE(ASSERT) 816 #if ENABLE(ASSERT)
838 virtual bool paintInvalidationStateIsDirty() const 817 virtual bool paintInvalidationStateIsDirty() const
839 { 818 {
840 return layoutDidGetCalled() || shouldDoFullPaintInvalidation() 819 return layoutDidGetCalled() || shouldDoFullPaintInvalidation()
841 || onlyNeededPositionedMovementLayout() || neededLayoutBecauseOfChil dren() || mayNeedPaintInvalidation(); 820 || onlyNeededPositionedMovementLayout() || neededLayoutBecauseOfChil dren() || mayNeedPaintInvalidation();
842 } 821 }
843 #endif 822 #endif
844 823
845 private: 824 private:
846 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const; 825 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const;
847 826
848 StyleDifference adjustStyleDifference(StyleDifference) const; 827 StyleDifference adjustStyleDifference(StyleDifference) const;
849 828
850 Color selectionColor(int colorProperty) const; 829 Color selectionColor(int colorProperty) const;
851 830
852 #if ENABLE(ASSERT) 831 #if ENABLE(ASSERT)
853 void checkBlockPositionedObjectsNeedLayout(); 832 void checkBlockPositionedObjectsNeedLayout();
854 #endif 833 #endif
855 const char* invalidationReasonToString(InvalidationReason) const;
856 834
857 // FIXME(sky): This method is just to avoid copy-paste. 835 // FIXME(sky): This method is just to avoid copy-paste.
858 // Merge container into containingBlock and then get rid of this method. 836 // Merge container into containingBlock and then get rid of this method.
859 bool canContainAbsolutePositionObjects() const 837 bool canContainAbsolutePositionObjects() const
860 { 838 {
861 return isRenderView() || (hasTransform() && isRenderBlock()); 839 return isRenderView() || (hasTransform() && isRenderBlock());
862 } 840 }
863 841
864 static bool isAllowedToModifyRenderTreeStructure(Document&); 842 static bool isAllowedToModifyRenderTreeStructure(Document&);
865 843
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 void showTree(const blink::RenderObject*); 1115 void showTree(const blink::RenderObject*);
1138 void showLineTree(const blink::RenderObject*); 1116 void showLineTree(const blink::RenderObject*);
1139 void showRenderTree(const blink::RenderObject* object1); 1117 void showRenderTree(const blink::RenderObject* object1);
1140 // We don't make object2 an optional parameter so that showRenderTree 1118 // We don't make object2 an optional parameter so that showRenderTree
1141 // can be called from gdb easily. 1119 // can be called from gdb easily.
1142 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 1120 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
1143 1121
1144 #endif 1122 #endif
1145 1123
1146 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_ 1124 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBox.cpp ('k') | sky/engine/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698