summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/PaintInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/PaintInfo.h')
-rw-r--r--Source/WebCore/rendering/PaintInfo.h32
1 files changed, 20 insertions, 12 deletions
diff --git a/Source/WebCore/rendering/PaintInfo.h b/Source/WebCore/rendering/PaintInfo.h
index 2781496e6..417859dd5 100644
--- a/Source/WebCore/rendering/PaintInfo.h
+++ b/Source/WebCore/rendering/PaintInfo.h
@@ -42,6 +42,7 @@ namespace WebCore {
class OverlapTestRequestClient;
class RenderInline;
+class RenderLayerModelObject;
class RenderObject;
class RenderRegion;
@@ -52,37 +53,43 @@ typedef HashMap<OverlapTestRequestClient*, IntRect> OverlapTestRequestMap;
* (tx|ty) is the calculated position of the parent
*/
struct PaintInfo {
- PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase newPhase, bool newForceBlackText,
- RenderObject* newPaintingRoot, RenderRegion* region, ListHashSet<RenderInline*>* newOutlineObjects,
- OverlapTestRequestMap* overlapTestRequests = 0)
+ PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase newPhase, PaintBehavior newPaintBehavior,
+ RenderObject* newSubtreePaintRoot = 0, RenderRegion* region = 0, ListHashSet<RenderInline*>* newOutlineObjects = 0,
+ OverlapTestRequestMap* overlapTestRequests = 0, const RenderLayerModelObject* newPaintContainer = 0)
: context(newContext)
, rect(newRect)
, phase(newPhase)
- , forceBlackText(newForceBlackText)
- , paintingRoot(newPaintingRoot)
+ , paintBehavior(newPaintBehavior)
+ , subtreePaintRoot(newSubtreePaintRoot)
, renderRegion(region)
, outlineObjects(newOutlineObjects)
, overlapTestRequests(overlapTestRequests)
+ , paintContainer(newPaintContainer)
{
}
- void updatePaintingRootForChildren(const RenderObject* renderer)
+ void updateSubtreePaintRootForChildren(const RenderObject* renderer)
{
- if (!paintingRoot)
+ if (!subtreePaintRoot)
return;
// If we're the painting root, kids draw normally, and see root of 0.
- if (paintingRoot == renderer) {
- paintingRoot = 0;
+ if (subtreePaintRoot == renderer) {
+ subtreePaintRoot = 0;
return;
}
}
bool shouldPaintWithinRoot(const RenderObject* renderer) const
{
- return !paintingRoot || paintingRoot == renderer;
+ return !subtreePaintRoot || subtreePaintRoot == renderer;
}
+ bool forceBlackText() const { return paintBehavior & PaintBehaviorForceBlackText; }
+
+ bool skipRootBackground() const { return paintBehavior & PaintBehaviorSkipRootBackground; }
+ bool paintRootBackgroundOnly() const { return paintBehavior & PaintBehaviorRootBackgroundOnly; }
+
#if ENABLE(SVG)
void applyTransform(const AffineTransform& localToAncestorTransform)
{
@@ -104,11 +111,12 @@ struct PaintInfo {
GraphicsContext* context;
IntRect rect;
PaintPhase phase;
- bool forceBlackText;
- RenderObject* paintingRoot; // used to draw just one element and its visual kids
+ PaintBehavior paintBehavior;
+ RenderObject* subtreePaintRoot; // used to draw just one element and its visual children
RenderRegion* renderRegion;
ListHashSet<RenderInline*>* outlineObjects; // used to list outlines that should be painted by a block with inline children
OverlapTestRequestMap* overlapTestRequests;
+ const RenderLayerModelObject* paintContainer; // the layer object that originates the current painting
};
} // namespace WebCore