Log Message
Change the terminology used by rendering code when painting a given node and its children from "paintingRoot" to "subtreePaintRoot" https://bugs.webkit.org/show_bug.cgi?id=116417
Reviewed by Sam Weinig. PaintInfo and RenderLayer code referred to a "paintingRoot". This is only set when FrameView::setNodeToDraw() has been called and is used to restrict painting to some part of the subtree, but it could easily be misinterpreted, and confused with the "rootLayer" used by RenderLayer (which is usually not the layer associated with the paintingRoot). Change the terminology from "paintingRoot" to "subtreePaintRoot" root to make the purpose of this variable more obvious. No behavior change. * page/FrameView.cpp: Add a comment for setNodeToDraw(); in future this should be called setSubtreePaintRoot() or something. Not done in this patch to avoid risk; this function is exported from WebCore. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paint): * rendering/PaintInfo.h: (WebCore::PaintInfo::PaintInfo): (WebCore::PaintInfo::updateSubtreePaintRootForChildren): (WebCore::PaintInfo::shouldPaintWithinRoot): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintContents): * rendering/RenderBox.cpp: (WebCore::RenderBox::paint): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paint): (WebCore::RenderLayer::paintOverlayScrollbars): (WebCore::RenderLayer::paintLayerContents): (WebCore::RenderLayer::paintLayerByApplyingTransform): (WebCore::RenderLayer::paintBackgroundForFragments): (WebCore::RenderLayer::paintForegroundForFragments): (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase): (WebCore::RenderLayer::paintOutlineForFragments): (WebCore::RenderLayer::paintMaskForFragments): * rendering/RenderLayer.h: (WebCore::RenderLayer::LayerPaintingInfo::LayerPaintingInfo): * rendering/RenderObject.cpp: Add a comment to recommend changing the name of paintingRootRect() to refer to a subtree paint. Not done in this patch to avoid risk; this function is exported from WebCore. * rendering/RenderSnapshottedPlugIn.cpp: (WebCore::RenderSnapshottedPlugIn::paint): * rendering/RenderTable.cpp: (WebCore::RenderTable::paintObject): * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::paint):
Modified Paths
- trunk/Source/WebCore/ChangeLog
- trunk/Source/WebCore/page/FrameView.cpp
- trunk/Source/WebCore/rendering/InlineFlowBox.cpp
- trunk/Source/WebCore/rendering/PaintInfo.h
- trunk/Source/WebCore/rendering/RenderBlock.cpp
- trunk/Source/WebCore/rendering/RenderBox.cpp
- trunk/Source/WebCore/rendering/RenderLayer.cpp
- trunk/Source/WebCore/rendering/RenderLayer.h
- trunk/Source/WebCore/rendering/RenderObject.cpp
- trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp
- trunk/Source/WebCore/rendering/RenderTable.cpp
- trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp
Diff
Modified: trunk/Source/WebCore/ChangeLog (150354 => 150355)
--- trunk/Source/WebCore/ChangeLog 2013-05-19 21:51:21 UTC (rev 150354)
+++ trunk/Source/WebCore/ChangeLog 2013-05-19 22:52:34 UTC (rev 150355)
@@ -1,3 +1,56 @@
+2013-05-19 Simon Fraser <[email protected]>
+
+ Change the terminology used by rendering code when painting a given node and its children from "paintingRoot" to "subtreePaintRoot"
+ https://bugs.webkit.org/show_bug.cgi?id=116417
+
+ Reviewed by Sam Weinig.
+
+ PaintInfo and RenderLayer code referred to a "paintingRoot". This is only set when
+ FrameView::setNodeToDraw() has been called and is used to restrict painting to
+ some part of the subtree, but it could easily be misinterpreted, and confused with
+ the "rootLayer" used by RenderLayer (which is usually not the layer associated with
+ the paintingRoot).
+
+ Change the terminology from "paintingRoot" to "subtreePaintRoot" root to make the
+ purpose of this variable more obvious.
+
+ No behavior change.
+
+ * page/FrameView.cpp: Add a comment for setNodeToDraw(); in future this should
+ be called setSubtreePaintRoot() or something. Not done in this patch to avoid
+ risk; this function is exported from WebCore.
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::paint):
+ * rendering/PaintInfo.h:
+ (WebCore::PaintInfo::PaintInfo):
+ (WebCore::PaintInfo::updateSubtreePaintRootForChildren):
+ (WebCore::PaintInfo::shouldPaintWithinRoot):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::paintContents):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::paint):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paint):
+ (WebCore::RenderLayer::paintOverlayScrollbars):
+ (WebCore::RenderLayer::paintLayerContents):
+ (WebCore::RenderLayer::paintLayerByApplyingTransform):
+ (WebCore::RenderLayer::paintBackgroundForFragments):
+ (WebCore::RenderLayer::paintForegroundForFragments):
+ (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
+ (WebCore::RenderLayer::paintOutlineForFragments):
+ (WebCore::RenderLayer::paintMaskForFragments):
+ * rendering/RenderLayer.h:
+ (WebCore::RenderLayer::LayerPaintingInfo::LayerPaintingInfo):
+ * rendering/RenderObject.cpp: Add a comment to recommend changing the name of
+ paintingRootRect() to refer to a subtree paint. Not done in this patch to avoid
+ risk; this function is exported from WebCore.
+ * rendering/RenderSnapshottedPlugIn.cpp:
+ (WebCore::RenderSnapshottedPlugIn::paint):
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::paintObject):
+ * rendering/svg/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::paint):
+
2013-05-19 Darin Adler <[email protected]>
Use Element instead of Node in DragState, also redo DragState struct
Modified: trunk/Source/WebCore/page/FrameView.cpp (150354 => 150355)
--- trunk/Source/WebCore/page/FrameView.cpp 2013-05-19 21:51:21 UTC (rev 150354)
+++ trunk/Source/WebCore/page/FrameView.cpp 2013-05-19 22:52:34 UTC (rev 150355)
@@ -3581,6 +3581,7 @@
return m_isPainting;
}
+// FIXME: change this to use the subtreePaint terminology.
void FrameView::setNodeToDraw(Node* node)
{
m_nodeToDraw = node;
Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (150354 => 150355)
--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp 2013-05-19 21:51:21 UTC (rev 150354)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp 2013-05-19 22:52:34 UTC (rev 150355)
@@ -1141,7 +1141,7 @@
PaintPhase paintPhase = paintInfo.phase == PaintPhaseChildOutlines ? PaintPhaseOutline : paintInfo.phase;
PaintInfo childInfo(paintInfo);
childInfo.phase = paintPhase;
- childInfo.updatePaintingRootForChildren(renderer());
+ childInfo.updateSubtreePaintRootForChildren(renderer());
// Paint our children.
if (paintPhase != PaintPhaseSelfOutline) {
Modified: trunk/Source/WebCore/rendering/PaintInfo.h (150354 => 150355)
--- trunk/Source/WebCore/rendering/PaintInfo.h 2013-05-19 21:51:21 UTC (rev 150354)
+++ trunk/Source/WebCore/rendering/PaintInfo.h 2013-05-19 22:52:34 UTC (rev 150355)
@@ -54,13 +54,13 @@
*/
struct PaintInfo {
PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase newPhase, PaintBehavior newPaintBehavior,
- RenderObject* newPaintingRoot = 0, RenderRegion* region = 0, ListHashSet<RenderInline*>* newOutlineObjects = 0,
+ RenderObject* newSubtreePaintRoot = 0, RenderRegion* region = 0, ListHashSet<RenderInline*>* newOutlineObjects = 0,
OverlapTestRequestMap* overlapTestRequests = 0, const RenderLayerModelObject* newPaintContainer = 0)
: context(newContext)
, rect(newRect)
, phase(newPhase)
, paintBehavior(newPaintBehavior)
- , paintingRoot(newPaintingRoot)
+ , subtreePaintRoot(newSubtreePaintRoot)
, renderRegion(region)
, outlineObjects(newOutlineObjects)
, overlapTestRequests(overlapTestRequests)
@@ -68,21 +68,21 @@
{
}
- 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; }
@@ -112,7 +112,7 @@
IntRect rect;
PaintPhase phase;
PaintBehavior paintBehavior;
- RenderObject* paintingRoot; // used to draw just one element and its visual kids
+ 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;
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (150354 => 150355)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2013-05-19 21:51:21 UTC (rev 150354)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2013-05-19 22:52:34 UTC (rev 150355)
@@ -3116,7 +3116,7 @@
// We don't paint our own background, but we do let the kids paint their backgrounds.
PaintInfo paintInfoForChild(paintInfo);
paintInfoForChild.phase = newPhase;
- paintInfoForChild.updatePaintingRootForChildren(this);
+ paintInfoForChild.updateSubtreePaintRootForChildren(this);
// FIXME: Paint-time pagination is obsolete and is now only used by embedded WebViews inside AppKit
// NSViews. Do not add any more code for this.
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (150354 => 150355)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2013-05-19 21:51:21 UTC (rev 150354)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2013-05-19 22:52:34 UTC (rev 150355)
@@ -1030,7 +1030,7 @@
LayoutPoint adjustedPaintOffset = paintOffset + location();
// default implementation. Just pass paint through to the children
PaintInfo childInfo(paintInfo);
- childInfo.updatePaintingRootForChildren(this);
+ childInfo.updateSubtreePaintRootForChildren(this);
for (RenderObject* child = firstChild(); child; child = child->nextSibling())
child->paint(childInfo, adjustedPaintOffset);
}
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (150354 => 150355)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-05-19 21:51:21 UTC (rev 150354)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-05-19 22:52:34 UTC (rev 150355)
@@ -3471,11 +3471,11 @@
return ScrollableArea::scroll(direction, granularity, multiplier);
}
-void RenderLayer::paint(GraphicsContext* context, const LayoutRect& damageRect, PaintBehavior paintBehavior, RenderObject* paintingRoot, RenderRegion* region, PaintLayerFlags paintFlags)
+void RenderLayer::paint(GraphicsContext* context, const LayoutRect& damageRect, PaintBehavior paintBehavior, RenderObject* subtreePaintRoot, RenderRegion* region, PaintLayerFlags paintFlags)
{
OverlapTestRequestMap overlapTestRequests;
- LayerPaintingInfo paintingInfo(this, enclosingIntRect(damageRect), paintBehavior, LayoutSize(), paintingRoot, region, &overlapTestRequests);
+ LayerPaintingInfo paintingInfo(this, enclosingIntRect(damageRect), paintBehavior, LayoutSize(), subtreePaintRoot, region, &overlapTestRequests);
paintLayer(context, paintingInfo, paintFlags);
OverlapTestRequestMap::iterator end = overlapTestRequests.end();
@@ -3483,12 +3483,12 @@
it->key->setOverlapTestResult(false);
}
-void RenderLayer::paintOverlayScrollbars(GraphicsContext* context, const LayoutRect& damageRect, PaintBehavior paintBehavior, RenderObject* paintingRoot)
+void RenderLayer::paintOverlayScrollbars(GraphicsContext* context, const LayoutRect& damageRect, PaintBehavior paintBehavior, RenderObject* subtreePaintRoot)
{
if (!m_containsDirtyOverlayScrollbars)
return;
- LayerPaintingInfo paintingInfo(this, enclosingIntRect(damageRect), paintBehavior, LayoutSize(), paintingRoot);
+ LayerPaintingInfo paintingInfo(this, enclosingIntRect(damageRect), paintBehavior, LayoutSize(), subtreePaintRoot);
paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars);
m_containsDirtyOverlayScrollbars = false;
@@ -3871,13 +3871,13 @@
}
#endif
- // If this layer's renderer is a child of the paintingRoot, we render unconditionally, which
- // is done by passing a nil paintingRoot down to our renderer (as if no paintingRoot was ever set).
- // Else, our renderer tree may or may not contain the painting root, so we pass that root along
+ // If this layer's renderer is a child of the subtreePaintRoot, we render unconditionally, which
+ // is done by passing a nil subtreePaintRoot down to our renderer (as if no subtreePaintRoot was ever set).
+ // Otherwise, our renderer tree may or may not contain the subtreePaintRoot root, so we pass that root along
// so it will be tested against as we descend through the renderers.
- RenderObject* paintingRootForRenderer = 0;
- if (localPaintingInfo.paintingRoot && !renderer()->isDescendantOf(localPaintingInfo.paintingRoot))
- paintingRootForRenderer = localPaintingInfo.paintingRoot;
+ RenderObject* subtreePaintRootForRenderer = 0;
+ if (localPaintingInfo.subtreePaintRoot && !renderer()->isDescendantOf(localPaintingInfo.subtreePaintRoot))
+ subtreePaintRootForRenderer = localPaintingInfo.subtreePaintRoot;
if (localPaintingInfo.overlapTestRequests && isSelfPaintingLayer)
performOverlapTests(*localPaintingInfo.overlapTestRequests, localPaintingInfo.rootLayer, this);
@@ -3905,7 +3905,7 @@
// Paint only the backgrounds for all of the fragments of the layer.
if (shouldPaintContent && !selectionOnly)
paintBackgroundForFragments(layerFragments, context, transparencyLayerContext, paintingInfo.paintDirtyRect, haveTransparency,
- localPaintingInfo, paintBehavior, paintingRootForRenderer);
+ localPaintingInfo, paintBehavior, subtreePaintRootForRenderer);
}
// Now walk the sorted list of children with negative z-indices.
@@ -3915,11 +3915,11 @@
if (isPaintingCompositedForeground) {
if (shouldPaintContent)
paintForegroundForFragments(layerFragments, context, transparencyLayerContext, paintingInfo.paintDirtyRect, haveTransparency,
- localPaintingInfo, paintBehavior, paintingRootForRenderer, selectionOnly, forceBlackText);
+ localPaintingInfo, paintBehavior, subtreePaintRootForRenderer, selectionOnly, forceBlackText);
}
if (shouldPaintOutline)
- paintOutlineForFragments(layerFragments, context, localPaintingInfo, paintBehavior, paintingRootForRenderer);
+ paintOutlineForFragments(layerFragments, context, localPaintingInfo, paintBehavior, subtreePaintRootForRenderer);
if (isPaintingCompositedForeground) {
// Paint any child layers that have overflow.
@@ -3944,7 +3944,7 @@
if ((localPaintFlags & PaintLayerPaintingCompositingMaskPhase) && shouldPaintContent && renderer()->hasMask() && !selectionOnly) {
// Paint the mask for the fragments.
- paintMaskForFragments(layerFragments, context, localPaintingInfo, paintingRootForRenderer);
+ paintMaskForFragments(layerFragments, context, localPaintingInfo, subtreePaintRootForRenderer);
}
// End our transparency layer
@@ -3980,7 +3980,7 @@
// Now do a paint with the root layer shifted to be us.
LayerPaintingInfo transformedPaintingInfo(this, enclosingIntRect(transform.inverse().mapRect(paintingInfo.paintDirtyRect)), paintingInfo.paintBehavior,
- adjustedSubPixelAccumulation, paintingInfo.paintingRoot, paintingInfo.region, paintingInfo.overlapTestRequests);
+ adjustedSubPixelAccumulation, paintingInfo.subtreePaintRoot, paintingInfo.region, paintingInfo.overlapTestRequests);
paintLayerContentsAndReflection(context, transformedPaintingInfo, paintFlags);
}
@@ -4126,7 +4126,7 @@
void RenderLayer::paintBackgroundForFragments(const LayerFragments& layerFragments, GraphicsContext* context, GraphicsContext* transparencyLayerContext,
const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, const LayerPaintingInfo& localPaintingInfo, PaintBehavior paintBehavior,
- RenderObject* paintingRootForRenderer)
+ RenderObject* subtreePaintRootForRenderer)
{
for (size_t i = 0; i < layerFragments.size(); ++i) {
const LayerFragment& fragment = layerFragments.at(i);
@@ -4145,7 +4145,7 @@
// Paint the background.
// FIXME: Eventually we will collect the region from the fragment itself instead of just from the paint info.
- PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect.rect()), PaintPhaseBlockBackground, paintBehavior, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
+ PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect.rect()), PaintPhaseBlockBackground, paintBehavior, subtreePaintRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subPixelAccumulation));
if (localPaintingInfo.clipToDirtyRect)
@@ -4155,7 +4155,7 @@
void RenderLayer::paintForegroundForFragments(const LayerFragments& layerFragments, GraphicsContext* context, GraphicsContext* transparencyLayerContext,
const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, const LayerPaintingInfo& localPaintingInfo, PaintBehavior paintBehavior,
- RenderObject* paintingRootForRenderer, bool selectionOnly, bool forceBlackText)
+ RenderObject* subtreePaintRootForRenderer, bool selectionOnly, bool forceBlackText)
{
// Begin transparency if we have something to paint.
if (haveTransparency) {
@@ -4178,12 +4178,12 @@
// We have to loop through every fragment multiple times, since we have to repaint in each specific phase in order for
// interleaving of the fragments to work properly.
paintForegroundForFragmentsWithPhase(selectionOnly ? PaintPhaseSelection : PaintPhaseChildBlockBackgrounds, layerFragments,
- context, localPaintingInfo, localPaintBehavior, paintingRootForRenderer);
+ context, localPaintingInfo, localPaintBehavior, subtreePaintRootForRenderer);
if (!selectionOnly) {
- paintForegroundForFragmentsWithPhase(PaintPhaseFloat, layerFragments, context, localPaintingInfo, localPaintBehavior, paintingRootForRenderer);
- paintForegroundForFragmentsWithPhase(PaintPhaseForeground, layerFragments, context, localPaintingInfo, localPaintBehavior, paintingRootForRenderer);
- paintForegroundForFragmentsWithPhase(PaintPhaseChildOutlines, layerFragments, context, localPaintingInfo, localPaintBehavior, paintingRootForRenderer);
+ paintForegroundForFragmentsWithPhase(PaintPhaseFloat, layerFragments, context, localPaintingInfo, localPaintBehavior, subtreePaintRootForRenderer);
+ paintForegroundForFragmentsWithPhase(PaintPhaseForeground, layerFragments, context, localPaintingInfo, localPaintBehavior, subtreePaintRootForRenderer);
+ paintForegroundForFragmentsWithPhase(PaintPhaseChildOutlines, layerFragments, context, localPaintingInfo, localPaintBehavior, subtreePaintRootForRenderer);
}
if (shouldClip)
@@ -4191,7 +4191,7 @@
}
void RenderLayer::paintForegroundForFragmentsWithPhase(PaintPhase phase, const LayerFragments& layerFragments, GraphicsContext* context,
- const LayerPaintingInfo& localPaintingInfo, PaintBehavior paintBehavior, RenderObject* paintingRootForRenderer)
+ const LayerPaintingInfo& localPaintingInfo, PaintBehavior paintBehavior, RenderObject* subtreePaintRootForRenderer)
{
bool shouldClip = localPaintingInfo.clipToDirtyRect && layerFragments.size() > 1;
@@ -4203,7 +4203,7 @@
if (shouldClip)
clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paintDirtyRect, fragment.foregroundRect);
- PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.foregroundRect.rect()), phase, paintBehavior, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
+ PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.foregroundRect.rect()), phase, paintBehavior, subtreePaintRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
if (phase == PaintPhaseForeground)
paintInfo.overlapTestRequests = localPaintingInfo.overlapTestRequests;
renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subPixelAccumulation));
@@ -4214,7 +4214,7 @@
}
void RenderLayer::paintOutlineForFragments(const LayerFragments& layerFragments, GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo,
- PaintBehavior paintBehavior, RenderObject* paintingRootForRenderer)
+ PaintBehavior paintBehavior, RenderObject* subtreePaintRootForRenderer)
{
for (size_t i = 0; i < layerFragments.size(); ++i) {
const LayerFragment& fragment = layerFragments.at(i);
@@ -4222,7 +4222,7 @@
continue;
// Paint our own outline
- PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.outlineRect.rect()), PaintPhaseSelfOutline, paintBehavior, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
+ PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.outlineRect.rect()), PaintPhaseSelfOutline, paintBehavior, subtreePaintRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paintDirtyRect, fragment.outlineRect, DoNotIncludeSelfForBorderRadius);
renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subPixelAccumulation));
restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.outlineRect);
@@ -4230,7 +4230,7 @@
}
void RenderLayer::paintMaskForFragments(const LayerFragments& layerFragments, GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo,
- RenderObject* paintingRootForRenderer)
+ RenderObject* subtreePaintRootForRenderer)
{
for (size_t i = 0; i < layerFragments.size(); ++i) {
const LayerFragment& fragment = layerFragments.at(i);
@@ -4242,7 +4242,7 @@
// Paint the mask.
// FIXME: Eventually we will collect the region from the fragment itself instead of just from the paint info.
- PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect.rect()), PaintPhaseMask, PaintBehaviorNormal, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
+ PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect.rect()), PaintPhaseMask, PaintBehaviorNormal, subtreePaintRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subPixelAccumulation));
if (localPaintingInfo.clipToDirtyRect)
Modified: trunk/Source/WebCore/rendering/RenderLayer.h (150354 => 150355)
--- trunk/Source/WebCore/rendering/RenderLayer.h 2013-05-19 21:51:21 UTC (rev 150354)
+++ trunk/Source/WebCore/rendering/RenderLayer.h 2013-05-19 22:52:34 UTC (rev 150355)
@@ -624,11 +624,11 @@
// paints the layers that intersect the damage rect from back to
// front. The hitTest method looks for mouse events by walking
// layers that intersect the point from front to back.
- void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = PaintBehaviorNormal, RenderObject* paintingRoot = 0,
+ void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = PaintBehaviorNormal, RenderObject* subtreePaintRoot = 0,
RenderRegion* = 0, PaintLayerFlags = 0);
bool hitTest(const HitTestRequest&, HitTestResult&);
bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&);
- void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior, RenderObject* paintingRoot = 0);
+ void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior, RenderObject* subtreePaintRoot = 0);
struct ClipRectsContext {
ClipRectsContext(const RenderLayer* inRootLayer, RenderRegion* inRegion, ClipRectsType inClipRectsType, OverlayScrollbarSizeRelevancy inOverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize, ShouldRespectOverflowClip inRespectOverflowClip = RespectOverflowClip)
@@ -916,9 +916,9 @@
void updateCompositingAndLayerListsIfNeeded();
struct LayerPaintingInfo {
- LayerPaintingInfo(RenderLayer* inRootLayer, const LayoutRect& inDirtyRect, PaintBehavior inPaintBehavior, const LayoutSize& inSubPixelAccumulation, RenderObject* inPaintingRoot = 0, RenderRegion*inRegion = 0, OverlapTestRequestMap* inOverlapTestRequests = 0)
+ LayerPaintingInfo(RenderLayer* inRootLayer, const LayoutRect& inDirtyRect, PaintBehavior inPaintBehavior, const LayoutSize& inSubPixelAccumulation, RenderObject* inSubtreePaintRoot = 0, RenderRegion*inRegion = 0, OverlapTestRequestMap* inOverlapTestRequests = 0)
: rootLayer(inRootLayer)
- , paintingRoot(inPaintingRoot)
+ , subtreePaintRoot(inSubtreePaintRoot)
, paintDirtyRect(inDirtyRect)
, subPixelAccumulation(inSubPixelAccumulation)
, region(inRegion)
@@ -927,7 +927,7 @@
, clipToDirtyRect(true)
{ }
RenderLayer* rootLayer;
- RenderObject* paintingRoot; // only paint descendants of this object
+ RenderObject* subtreePaintRoot; // only paint descendants of this object
LayoutRect paintDirtyRect; // relative to rootLayer;
LayoutSize subPixelAccumulation;
RenderRegion* region; // May be null.
Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (150354 => 150355)
--- trunk/Source/WebCore/rendering/RenderObject.cpp 2013-05-19 21:51:21 UTC (rev 150354)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp 2013-05-19 22:52:34 UTC (rev 150355)
@@ -1236,6 +1236,7 @@
current->addAbsoluteRectForLayer(result);
}
+// FIXME: change this to use the subtreePaint terminology
LayoutRect RenderObject::paintingRootRect(LayoutRect& topLevelRect)
{
LayoutRect result = absoluteBoundingBoxRectIgnoringTransforms();
Modified: trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp (150354 => 150355)
--- trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp 2013-05-19 21:51:21 UTC (rev 150354)
+++ trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp 2013-05-19 22:52:34 UTC (rev 150355)
@@ -101,7 +101,7 @@
PaintInfo paintInfoForChild(paintInfo);
paintInfoForChild.phase = newPhase;
- paintInfoForChild.updatePaintingRootForChildren(this);
+ paintInfoForChild.updateSubtreePaintRootForChildren(this);
for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
LayoutPoint childPoint = flipForWritingModeForChild(child, paintOffset);
Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (150354 => 150355)
--- trunk/Source/WebCore/rendering/RenderTable.cpp 2013-05-19 21:51:21 UTC (rev 150354)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp 2013-05-19 22:52:34 UTC (rev 150355)
@@ -653,7 +653,7 @@
PaintInfo info(paintInfo);
info.phase = paintPhase;
- info.updatePaintingRootForChildren(this);
+ info.updateSubtreePaintRootForChildren(this);
for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child->isTableCaption())) {
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp (150354 => 150355)
--- trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp 2013-05-19 21:51:21 UTC (rev 150354)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp 2013-05-19 22:52:34 UTC (rev 150355)
@@ -138,7 +138,7 @@
}
if (continueRendering) {
- childPaintInfo.updatePaintingRootForChildren(this);
+ childPaintInfo.updateSubtreePaintRootForChildren(this);
for (RenderObject* child = firstChild(); child; child = child->nextSibling())
child->paint(childPaintInfo, IntPoint());
}
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
