Index: Source/core/rendering/PaintInfo.h |
diff --git a/Source/core/rendering/PaintInfo.h b/Source/core/rendering/PaintInfo.h |
index 28338ada6619eb83d528f276b9879db1c6e6f401..33eecf8e1d81761817f2620e3a3d5f2a996acd3b 100644 |
--- a/Source/core/rendering/PaintInfo.h |
+++ b/Source/core/rendering/PaintInfo.h |
@@ -49,7 +49,8 @@ typedef HashMap<OverlapTestRequestClient*, IntRect> OverlapTestRequestMap; |
* Paint the object and its children, clipped by (x|y|w|h). |
* (tx|ty) is the calculated position of the parent |
*/ |
-struct PaintInfo { |
+class PaintInfo { |
+public: |
PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase newPhase, PaintBehavior newPaintBehavior, |
RenderObject* newPaintingRoot = 0, RenderRegion* region = 0, ListHashSet<RenderInline*>* newOutlineObjects = 0, |
OverlapTestRequestMap* overlapTestRequests = 0, const RenderLayerModelObject* newPaintContainer = 0) |
@@ -102,7 +103,25 @@ struct PaintInfo { |
static IntRect infiniteRect() { return IntRect(LayoutRect::infiniteRect()); } |
- // FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout rendering/. |
+ GraphicsContext* getContext() { return context; } |
do-not-use
2013/08/01 18:50:14
We usually don't use 'get' prefix for getters, so
|
+ void setContext(GraphicsContext *acontext) { context = acontext; } |
do-not-use
2013/08/01 18:50:14
* on wrong side.
do-not-use
2013/08/01 18:50:14
acontext -> context once you rename the member to
Savago-old
2013/08/02 14:56:56
Ouch! You are right, I guess the check-style scrip
|
+ |
+ IntRect& getRect() { return rect; } |
+ void setRect(const IntRect &arect) { rect = arect; } |
do-not-use
2013/08/01 18:50:14
Space should be after the &, not before.
Savago-old
2013/08/02 14:56:56
Same case.
|
+ |
+ const PaintPhase& getPhase() const { return phase; } |
+ void setPhase(const PaintPhase& param) { phase = param; } |
+ |
+ RenderRegion* getRenderRegion() { return renderRegion; } |
+ OverlapTestRequestMap* getOverlapTestRequests() { return overlapTestRequests; } |
+ void setOverlapTestRequests(OverlapTestRequestMap* map) { overlapTestRequests = map; } |
+ |
+ ListHashSet<RenderInline*>* getOutlineObjects() { return outlineObjects; } |
+ void setOutlineObjects(ListHashSet<RenderInline*>* objects) { outlineObjects = objects; } |
+ |
+ const RenderLayerModelObject* getPaintContainer() { return paintContainer; } |
do-not-use
2013/08/01 18:50:14
Getter can be const since you return a const point
|
+ |
+private: |
GraphicsContext* context; |
do-not-use
2013/08/01 18:50:14
now that those are private, we should really use m
Savago-old
2013/08/02 14:56:56
Nice suggestion, I will update the patch.
|
IntRect rect; |
PaintPhase phase; |