提交 6ee8440f 编写于 作者: O Ojan Vafai

Walk render tree instead of render layers for paint.

This is the first step of getting rid of RenderLayer.
Instead of walking the RenderLayer tree, wall the RenderObject
tree and add any layers encountered to a vector to paint later.

This patch just consolidates and move the code from RenderLayer
to RenderBox and then changes the children painting to
iterate over the vector. Therefore we walk the RenderObject tree.
We still call out to RenderLayer in a bunch of places.
A followup patch will get rid of those.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/899753003
上级 c6425508
......@@ -683,7 +683,8 @@ void FrameView::paint(GraphicsContext* context, const IntRect& rect)
RenderObject::SetLayoutNeededForbiddenScope forbidSetNeedsLayout(*rootLayer->renderer());
#endif
rootLayer->paint(context, rect);
// TODO(ojan): Is this rect passed down correct or even needed?
renderView->paintLayer(context, rootLayer, pixelSnappedIntRect(renderView->viewRect()));
m_isPainting = false;
m_lastPaintTime = currentTime();
......
......@@ -33,7 +33,7 @@
namespace blink {
void EllipsisBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
void EllipsisBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, Vector<RenderBox*>& layers)
{
GraphicsContext* context = paintInfo.context;
RenderStyle* style = renderer().style(isFirstLineStyle());
......@@ -75,7 +75,7 @@ void EllipsisBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, La
if (hasShadow)
context->clearDrawLooper();
paintMarkupBox(paintInfo, paintOffset, lineTop, lineBottom, style);
paintMarkupBox(paintInfo, paintOffset, lineTop, lineBottom, style, layers);
}
InlineBox* EllipsisBox::markupBox() const
......@@ -97,7 +97,7 @@ InlineBox* EllipsisBox::markupBox() const
return anchorBox;
}
void EllipsisBox::paintMarkupBox(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, RenderStyle* style)
void EllipsisBox::paintMarkupBox(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, RenderStyle* style, Vector<RenderBox*>& layers)
{
InlineBox* markupBox = this->markupBox();
if (!markupBox)
......@@ -106,7 +106,7 @@ void EllipsisBox::paintMarkupBox(PaintInfo& paintInfo, const LayoutPoint& paintO
LayoutPoint adjustedPaintOffset = paintOffset;
adjustedPaintOffset.move(x() + m_logicalWidth - markupBox->x(),
y() + style->fontMetrics().ascent() - (markupBox->y() + markupBox->renderer().style(isFirstLineStyle())->fontMetrics().ascent()));
markupBox->paint(paintInfo, adjustedPaintOffset, lineTop, lineBottom);
markupBox->paint(paintInfo, adjustedPaintOffset, lineTop, lineBottom, layers);
}
IntRect EllipsisBox::selectionRect()
......
......@@ -40,14 +40,14 @@ public:
setHasVirtualLogicalHeight();
}
virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) override;
virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom, Vector<RenderBox*>& layers) override;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom) override;
void setSelectionState(RenderObject::SelectionState s) { m_selectionState = s; }
IntRect selectionRect();
virtual float virtualLogicalHeight() const override { return m_height; }
private:
void paintMarkupBox(PaintInfo&, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, RenderStyle*);
void paintMarkupBox(PaintInfo&, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, RenderStyle*, Vector<RenderBox*>& layers);
int height() const { return m_height; }
virtual RenderObject::SelectionState selectionState() override { return m_selectionState; }
void paintSelection(GraphicsContext*, const FloatPoint&, RenderStyle*, const Font&);
......
......@@ -191,9 +191,9 @@ void InlineBox::adjustPosition(float dx, float dy)
toRenderBox(renderer()).move(dx, dy);
}
void InlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/)
void InlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/, Vector<RenderBox*>& layers)
{
renderer().paint(paintInfo, paintOffset);
renderer().paint(paintInfo, paintOffset, layers);
}
bool InlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/)
......
......@@ -90,7 +90,7 @@ public:
adjustPosition(0, delta);
}
virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom, Vector<RenderBox*>& layers);
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom);
// InlineBoxes are allocated out of the rendering partition.
......
......@@ -989,7 +989,7 @@ bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
return false;
}
void InlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
void InlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, Vector<RenderBox*>& layers)
{
LayoutRect overflowRect(visualOverflowRect(lineTop, lineBottom));
overflowRect.moveBy(paintOffset);
......@@ -1001,7 +1001,7 @@ void InlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset,
for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPaintingLayer())
curr->paint(paintInfo, paintOffset, lineTop, lineBottom);
curr->paint(paintInfo, paintOffset, lineTop, lineBottom, layers);
}
}
......
......@@ -115,7 +115,7 @@ public:
IntRect roundedFrameRect() const;
virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) override;
virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom, Vector<RenderBox*>& layers) override;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom) override;
bool boxShadowCanBeAppliedToBackground(const FillLayer&) const;
......
......@@ -478,7 +478,7 @@ void paintTextWithEmphasisMark(
} // namespace
void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /*lineTop*/, LayoutUnit /*lineBottom*/)
void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /*lineTop*/, LayoutUnit /*lineBottom*/, Vector<RenderBox*>& layers)
{
if (isLineBreak() || m_truncation == cFullTruncation || !m_len)
return;
......
......@@ -114,7 +114,7 @@ public:
void selectionStartEnd(int& sPos, int& ePos);
protected:
virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) override;
virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom, Vector<RenderBox*>& layers) override;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom) override;
private:
......
......@@ -446,7 +446,7 @@ void RenderBlock::markPositionedObjectsForLayout()
}
}
void RenderBlock::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
void RenderBlock::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, Vector<RenderBox*>& layers)
{
LayoutPoint adjustedPaintOffset = paintOffset + location();
......@@ -468,16 +468,18 @@ void RenderBlock::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
contentsClipBehavior = SkipContentsClipIfPossible;
bool pushedClip = pushContentsClip(paintInfo, adjustedPaintOffset, contentsClipBehavior);
paintObject(paintInfo, adjustedPaintOffset);
paintObject(paintInfo, adjustedPaintOffset, layers);
if (pushedClip)
popContentsClip(paintInfo, adjustedPaintOffset);
}
void RenderBlock::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
void RenderBlock::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, Vector<RenderBox*>& layers)
{
for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
if (!child->hasSelfPaintingLayer())
child->paint(paintInfo, paintOffset);
if (child->hasSelfPaintingLayer())
layers.append(child);
else
child->paint(paintInfo, paintOffset, layers);
}
}
......@@ -510,12 +512,12 @@ void RenderBlock::paintCarets(PaintInfo& paintInfo, const LayoutPoint& paintOffs
}
}
void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset, Vector<RenderBox*>& layers)
{
if (hasBoxDecorationBackground())
paintBoxDecorationBackground(paintInfo, paintOffset);
paintChildren(paintInfo, paintOffset);
paintChildren(paintInfo, paintOffset, layers);
paintSelection(paintInfo, paintOffset); // Fill in gaps in selection on lines and between blocks.
if (style()->hasOutline() && !style()->outlineStyleIsAuto())
......
......@@ -210,9 +210,9 @@ protected:
int beforeMarginInLineDirection(LineDirectionMode) const;
virtual void paint(PaintInfo&, const LayoutPoint&) override;
virtual void paintObject(PaintInfo&, const LayoutPoint&) override;
virtual void paintChildren(PaintInfo&, const LayoutPoint&);
virtual void paint(PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layers) override;
void paintObject(PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layers);
virtual void paintChildren(PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layers);
virtual void adjustInlineDirectionLineBounds(unsigned /* expansionOpportunityCount */, float& /* logicalLeft */, float& /* logicalWidth */) const { }
......
......@@ -37,6 +37,7 @@
#include "sky/engine/core/html/HTMLElement.h"
#include "sky/engine/core/page/EventHandler.h"
#include "sky/engine/core/page/Page.h"
#include "sky/engine/core/rendering/FilterEffectRenderer.h"
#include "sky/engine/core/rendering/HitTestResult.h"
#include "sky/engine/core/rendering/PaintInfo.h"
#include "sky/engine/core/rendering/RenderFlexibleBox.h"
......@@ -388,11 +389,216 @@ bool RenderBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result
// --------------------- painting stuff -------------------------------
void RenderBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
static inline bool compareZIndex(RenderBox* first, RenderBox* second)
{
return first->style()->zIndex() < second->style()->zIndex();
}
void RenderBox::paintLayer(GraphicsContext* context, RenderLayer* rootLayer, const IntRect& rect)
{
// If this layer is totally invisible then there is nothing to paint.
// TODO(ojan): Return false from isSelfPainting and then ASSERT(!opacity()) here.
if (!opacity())
return;
LayerPaintingInfo paintingInfo(rootLayer, rect, LayoutSize());
if (!layer()->paintsWithTransform()) {
paintLayerContents(context, paintingInfo, rect);
return;
}
TransformationMatrix layerTransform = layer()->renderableTransform();
// If the transform can't be inverted, then don't paint anything.
if (!layerTransform.isInvertible())
return;
// If we have a transparency layer enclosing us and we are the root of a transform, then we need to establish the transparency
// layer from the parent now, assuming there is a parent
if (layer()->isTransparent()) {
// TODO(ojan): This should ASSERT(layer()->parent()) instead of branching since the
// RenderView can't be transformed in sky.
if (layer()->parent())
layer()->parent()->beginTransparencyLayers(context, paintingInfo.rootLayer, paintingInfo.paintDirtyRect, paintingInfo.subPixelAccumulation);
else
layer()->beginTransparencyLayers(context, paintingInfo.rootLayer, paintingInfo.paintDirtyRect, paintingInfo.subPixelAccumulation);
}
// Make sure the parent's clip rects have been calculated.
ClipRect clipRect;
// TODO(ojan): This should ASSERT(layer()->parent()) instead of branching since the
// RenderView can't be transformed in sky.
if (layer()->parent()) {
ClipRectsContext clipRectsContext(paintingInfo.rootLayer, PaintingClipRects);
clipRect = layer()->clipper().backgroundClipRect(clipRectsContext);
clipRect.intersect(paintingInfo.paintDirtyRect);
// Push the parent coordinate space's clip.
layer()->parent()->clipToRect(paintingInfo, context, clipRect);
}
// This involves subtracting out the position of the layer in our current coordinate space, but preserving
// the accumulated error for sub-pixel layout.
LayoutPoint delta;
layer()->convertToLayerCoords(paintingInfo.rootLayer, delta);
TransformationMatrix transform(layer()->renderableTransform());
IntPoint roundedDelta = roundedIntPoint(delta);
transform.translateRight(roundedDelta.x(), roundedDelta.y());
LayoutSize adjustedSubPixelAccumulation = paintingInfo.subPixelAccumulation + (delta - roundedDelta);
// Apply the transform.
GraphicsContextStateSaver stateSaver(*context, false);
if (!transform.isIdentity()) {
stateSaver.save();
context->concatCTM(transform.toAffineTransform());
}
// Now do a paint with the root layer shifted to be us.
LayerPaintingInfo transformedPaintingInfo(layer(), enclosingIntRect(transform.inverse().mapRect(paintingInfo.paintDirtyRect)),
adjustedSubPixelAccumulation);
paintLayerContents(context, transformedPaintingInfo, rect);
// Restore the clip.
// TODO(ojan): This should ASSERT(layer()->parent()) instead of branching since the
// RenderView can't be transformed in sky.
if (layer()->parent())
layer()->parent()->restoreClip(context, paintingInfo.paintDirtyRect, clipRect);
}
void RenderBox::paintLayerContents(GraphicsContext* context, const LayerPaintingInfo& paintingInfo, const IntRect& rect)
{
float deviceScaleFactor = blink::deviceScaleFactor(frame());
context->setDeviceScaleFactor(deviceScaleFactor);
GraphicsContext* transparencyLayerContext = context;
LayoutPoint offsetFromRoot;
layer()->convertToLayerCoords(paintingInfo.rootLayer, offsetFromRoot);
LayoutRect rootRelativeBounds;
bool rootRelativeBoundsComputed = false;
// Apply clip-path to context.
GraphicsContextStateSaver clipStateSaver(*context, false);
// Clip-path, like border radius, must not be applied to the contents of a composited-scrolling container.
// It must, however, still be applied to the mask layer, so that the compositor can properly mask the
// scrolling contents and scrollbars.
// TODO(ojan): This style null check doesn't make sense. We should always have a style.
if (hasClipPath() && style()) {
ASSERT(style()->clipPath());
if (style()->clipPath()->type() == ClipPathOperation::SHAPE) {
ShapeClipPathOperation* clipPath = toShapeClipPathOperation(style()->clipPath());
if (clipPath->isValid()) {
clipStateSaver.save();
if (!rootRelativeBoundsComputed) {
rootRelativeBounds = layer()->physicalBoundingBoxIncludingReflectionAndStackingChildren(paintingInfo.rootLayer, offsetFromRoot);
rootRelativeBoundsComputed = true;
}
context->clipPath(clipPath->path(rootRelativeBounds), clipPath->windRule());
}
}
}
LayerPaintingInfo localPaintingInfo(paintingInfo);
FilterEffectRendererHelper filterPainter(layer()->filterRenderer() && layer()->paintsWithFilters());
LayoutRect layerBounds;
// FIXME(sky): Remove foregroundRect. It's unused.
ClipRect contentRect, foregroundRect;
ClipRectsContext clipRectsContext(localPaintingInfo.rootLayer, PaintingClipRects, localPaintingInfo.subPixelAccumulation);
layer()->clipper().calculateRects(clipRectsContext, localPaintingInfo.paintDirtyRect,
layerBounds, contentRect, foregroundRect,
&offsetFromRoot);
bool shouldPaintContent = layer()->intersectsDamageRect(layerBounds, contentRect.rect(), localPaintingInfo.rootLayer, &offsetFromRoot);
bool haveTransparency = layer()->isTransparent();
if (filterPainter.haveFilterEffect()) {
ASSERT(layer()->filterInfo());
if (!rootRelativeBoundsComputed)
rootRelativeBounds = layer()->physicalBoundingBoxIncludingReflectionAndStackingChildren(paintingInfo.rootLayer, offsetFromRoot);
if (filterPainter.prepareFilterEffect(layer(), rootRelativeBounds, paintingInfo.paintDirtyRect)) {
// Rewire the old context to a memory buffer, so that we can capture the contents of the layer.
// NOTE: We saved the old context in the "transparencyLayerContext" local variable, to be able to start a transparency layer
// on the original context and avoid duplicating "beginFilterEffect" after each transparency layer call. Also, note that
// beginTransparencyLayers will only create a single lazy transparency layer, even though it is called twice in this method.
// With deferred filters, we don't need a separate context, but we do need to do transparency and clipping before starting
// filter processing.
// FIXME: when the legacy path is removed, remove the transparencyLayerContext as well.
if (haveTransparency) {
// If we have a filter and transparency, we have to eagerly start a transparency layer here, rather than risk a child layer lazily starts one after filter processing.
layer()->beginTransparencyLayers(context, localPaintingInfo.rootLayer, paintingInfo.paintDirtyRect, paintingInfo.subPixelAccumulation);
}
// We'll handle clipping to the dirty rect before filter rasterization.
// Filter processing will automatically expand the clip rect and the offscreen to accommodate any filter outsets.
// FIXME: It is incorrect to just clip to the damageRect here once multiple fragments are involved.
layer()->clipToRect(localPaintingInfo, context, contentRect);
// Subsequent code should not clip to the dirty rect, since we've already
// done it above, and doing it later will defeat the outsets.
localPaintingInfo.clipToDirtyRect = false;
context = filterPainter.beginFilterEffect(context);
}
}
LayoutPoint layerLocation = toPoint(layerBounds.location() - location() + localPaintingInfo.subPixelAccumulation);
if (shouldPaintContent) {
bool contentRectIsEmpty = contentRect.isEmpty();
// Begin transparency if we have something to paint.
if (haveTransparency && !contentRectIsEmpty)
layer()->beginTransparencyLayers(transparencyLayerContext, localPaintingInfo.rootLayer, paintingInfo.paintDirtyRect, localPaintingInfo.subPixelAccumulation);
// Optimize clipping for the single fragment case.
bool shouldClip = localPaintingInfo.clipToDirtyRect && !contentRectIsEmpty;
if (shouldClip)
layer()->clipToRect(localPaintingInfo, context, contentRect);
// TODO(ojan): We probably should have already set shouldPaintContent to false if the rect is empty.
if (!contentRectIsEmpty) {
Vector<RenderBox*> layers;
PaintInfo paintInfo(context, pixelSnappedIntRect(contentRect.rect()), localPaintingInfo.rootLayer->renderer());
paint(paintInfo, layerLocation, layers);
std::stable_sort(layers.begin(), layers.end(), compareZIndex);
for (auto& box : layers) {
box->paintLayer(context, paintingInfo.rootLayer, rect);
}
}
if (shouldClip)
layer()->restoreClip(context, localPaintingInfo.paintDirtyRect, contentRect);
}
if (filterPainter.hasStartedFilterEffect()) {
context = filterPainter.applyFilterEffect();
layer()->restoreClip(transparencyLayerContext, localPaintingInfo.paintDirtyRect, contentRect);
}
// Make sure that we now use the original transparency context.
ASSERT(transparencyLayerContext == context);
// End our transparency layer
if (haveTransparency && layer()->usedTransparency()) {
context->endLayer();
context->restore();
layer()->clearUsedTransparency();
}
}
void RenderBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, Vector<RenderBox*>& layers)
{
LayoutPoint adjustedPaintOffset = paintOffset + location();
for (RenderObject* child = slowFirstChild(); child; child = child->nextSibling())
child->paint(paintInfo, adjustedPaintOffset);
child->paint(paintInfo, adjustedPaintOffset, layers);
}
void RenderBox::paintRootBoxFillLayers(const PaintInfo& paintInfo)
......
......@@ -28,6 +28,7 @@
namespace blink {
struct LayerPaintingInfo;
struct PaintInfo;
class RenderBlockFlow;
......@@ -267,8 +268,10 @@ public:
virtual void absoluteQuads(Vector<FloatQuad>&) const override;
void paintLayer(GraphicsContext* context, RenderLayer* rootLayer, const IntRect& rect);
virtual void layout() override;
virtual void paint(PaintInfo&, const LayoutPoint&) override;
virtual void paint(PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layers) override;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override;
virtual LayoutUnit minPreferredLogicalWidth() const override;
......@@ -379,7 +382,6 @@ public:
bool pushContentsClip(PaintInfo&, const LayoutPoint& accumulatedOffset, ContentsClipBehavior);
void popContentsClip(PaintInfo&, const LayoutPoint& accumulatedOffset);
virtual void paintObject(PaintInfo&, const LayoutPoint&) { ASSERT_NOT_REACHED(); }
virtual void paintBoxDecorationBackground(PaintInfo&, const LayoutPoint&);
// Called when a positioned object moves but doesn't necessarily change size. A simplified layout is attempted
......@@ -465,6 +467,8 @@ protected:
void updateIntrinsicContentLogicalHeight(LayoutUnit intrinsicContentLogicalHeight) const { m_intrinsicContentLogicalHeight = intrinsicContentLogicalHeight; }
private:
void paintLayerContents(GraphicsContext* context, const LayerPaintingInfo& paintingInfo, const IntRect& rect);
void shrinkToFitWidth(const LayoutUnit availableSpace, const LayoutUnit logicalLeftValue, const LayoutUnit bordersPlusPadding, LogicalExtentComputedValues&) const;
bool skipContainingBlockForPercentHeightCalculation(const RenderBox* containingBlock) const;
......
......@@ -258,11 +258,13 @@ void RenderFlexibleBox::appendChildFrameRects(ChildFrameRects& childFrameRects)
}
}
void RenderFlexibleBox::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
void RenderFlexibleBox::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, Vector<RenderBox*>& layers)
{
for (RenderBox* child = m_orderIterator.first(); child; child = m_orderIterator.next()) {
if (!child->hasSelfPaintingLayer())
child->paint(paintInfo, paintOffset);
if (child->hasSelfPaintingLayer())
layers.append(child);
else
child->paint(paintInfo, paintOffset, layers);
}
}
......
......@@ -52,7 +52,7 @@ public:
virtual int firstLineBoxBaseline() const override;
virtual int inlineBlockBaseline(LineDirectionMode) const override;
virtual void paintChildren(PaintInfo&, const LayoutPoint&) override final;
virtual void paintChildren(PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layers) override final;
bool isHorizontalFlow() const;
......
......@@ -170,9 +170,9 @@ void RenderInline::addChild(RenderObject* newChild, RenderObject* beforeChild)
newChild->setNeedsLayoutAndPrefWidthsRecalc();
}
void RenderInline::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
void RenderInline::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, Vector<RenderBox*>& layers)
{
m_lineBoxes.paint(this, paintInfo, paintOffset);
m_lineBoxes.paint(this, paintInfo, paintOffset, layers);
}
template<typename GeneratorContext>
......
......@@ -114,7 +114,7 @@ private:
virtual void layout() override final { ASSERT_NOT_REACHED(); } // Do nothing for layout()
virtual void paint(PaintInfo&, const LayoutPoint&) override final;
virtual void paint(PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layers) override final;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override final;
......
......@@ -741,13 +741,6 @@ void RenderLayer::updateStackingNode()
m_stackingNode = nullptr;
}
void RenderLayer::paint(GraphicsContext* context, const LayoutRect& damageRect)
{
TRACE_EVENT0("blink", "RenderLayer::paint");
LayerPaintingInfo paintingInfo(this, enclosingIntRect(damageRect), LayoutSize());
paintLayer(context, paintingInfo, PaintContent);
}
static bool inContainingBlockChain(RenderLayer* startLayer, RenderLayer* endLayer)
{
if (startLayer == endLayer)
......@@ -795,231 +788,6 @@ void RenderLayer::restoreClip(GraphicsContext* context, const LayoutRect& paintD
context->restore();
}
void RenderLayer::paintLayer(GraphicsContext* context, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags)
{
// Non self-painting leaf layers don't need to be painted as their renderer() should properly paint itself.
if (!isSelfPaintingLayer() && !hasSelfPaintingLayerDescendant())
return;
// If this layer is totally invisible then there is nothing to paint.
if (!renderer()->opacity())
return;
if (paintsWithTransform()) {
TransformationMatrix layerTransform = renderableTransform();
// If the transform can't be inverted, then don't paint anything.
if (!layerTransform.isInvertible())
return;
// If we have a transparency layer enclosing us and we are the root of a transform, then we need to establish the transparency
// layer from the parent now, assuming there is a parent
if (isTransparent()) {
if (parent())
parent()->beginTransparencyLayers(context, paintingInfo.rootLayer, paintingInfo.paintDirtyRect, paintingInfo.subPixelAccumulation);
else
beginTransparencyLayers(context, paintingInfo.rootLayer, paintingInfo.paintDirtyRect, paintingInfo.subPixelAccumulation);
}
// Make sure the parent's clip rects have been calculated.
ClipRect clipRect = paintingInfo.paintDirtyRect;
if (parent()) {
ClipRectsContext clipRectsContext(paintingInfo.rootLayer, PaintingClipRects);
clipRect = clipper().backgroundClipRect(clipRectsContext);
clipRect.intersect(paintingInfo.paintDirtyRect);
// Push the parent coordinate space's clip.
parent()->clipToRect(paintingInfo, context, clipRect);
}
paintLayerByApplyingTransform(context, paintingInfo, paintFlags);
// Restore the clip.
if (parent())
parent()->restoreClip(context, paintingInfo.paintDirtyRect, clipRect);
return;
}
paintLayerContents(context, paintingInfo, paintFlags);
}
void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags)
{
ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant());
float deviceScaleFactor = blink::deviceScaleFactor(renderer()->frame());
context->setDeviceScaleFactor(deviceScaleFactor);
GraphicsContext* transparencyLayerContext = context;
m_stackingNode->updateLayerListsIfNeeded();
LayoutPoint offsetFromRoot;
convertToLayerCoords(paintingInfo.rootLayer, offsetFromRoot);
LayoutRect rootRelativeBounds;
bool rootRelativeBoundsComputed = false;
// Apply clip-path to context.
GraphicsContextStateSaver clipStateSaver(*context, false);
RenderStyle* style = renderer()->style();
// Clip-path, like border radius, must not be applied to the contents of a composited-scrolling container.
// It must, however, still be applied to the mask layer, so that the compositor can properly mask the
// scrolling contents and scrollbars.
if (renderer()->hasClipPath() && style) {
ASSERT(style->clipPath());
if (style->clipPath()->type() == ClipPathOperation::SHAPE) {
ShapeClipPathOperation* clipPath = toShapeClipPathOperation(style->clipPath());
if (clipPath->isValid()) {
clipStateSaver.save();
if (!rootRelativeBoundsComputed) {
rootRelativeBounds = physicalBoundingBoxIncludingReflectionAndStackingChildren(paintingInfo.rootLayer, offsetFromRoot);
rootRelativeBoundsComputed = true;
}
context->clipPath(clipPath->path(rootRelativeBounds), clipPath->windRule());
}
}
}
LayerPaintingInfo localPaintingInfo(paintingInfo);
FilterEffectRendererHelper filterPainter(filterRenderer() && paintsWithFilters());
LayoutRect layerBounds;
// FIXME(sky): Remove foregroundRect. It's unused.
ClipRect backgroundRect, foregroundRect;
ClipRectsContext clipRectsContext(localPaintingInfo.rootLayer, PaintingClipRects, localPaintingInfo.subPixelAccumulation);
clipper().calculateRects(clipRectsContext, localPaintingInfo.paintDirtyRect,
layerBounds, backgroundRect, foregroundRect,
&offsetFromRoot);
bool shouldPaintContent = isSelfPaintingLayer() && intersectsDamageRect(layerBounds, backgroundRect.rect(), localPaintingInfo.rootLayer, &offsetFromRoot);
bool haveTransparency = isTransparent();
if (filterPainter.haveFilterEffect()) {
ASSERT(this->filterInfo());
if (!rootRelativeBoundsComputed)
rootRelativeBounds = physicalBoundingBoxIncludingReflectionAndStackingChildren(paintingInfo.rootLayer, offsetFromRoot);
if (filterPainter.prepareFilterEffect(this, rootRelativeBounds, paintingInfo.paintDirtyRect)) {
// Rewire the old context to a memory buffer, so that we can capture the contents of the layer.
// NOTE: We saved the old context in the "transparencyLayerContext" local variable, to be able to start a transparency layer
// on the original context and avoid duplicating "beginFilterEffect" after each transparency layer call. Also, note that
// beginTransparencyLayers will only create a single lazy transparency layer, even though it is called twice in this method.
// With deferred filters, we don't need a separate context, but we do need to do transparency and clipping before starting
// filter processing.
// FIXME: when the legacy path is removed, remove the transparencyLayerContext as well.
if (haveTransparency) {
// If we have a filter and transparency, we have to eagerly start a transparency layer here, rather than risk a child layer lazily starts one after filter processing.
beginTransparencyLayers(context, localPaintingInfo.rootLayer, paintingInfo.paintDirtyRect, paintingInfo.subPixelAccumulation);
}
// We'll handle clipping to the dirty rect before filter rasterization.
// Filter processing will automatically expand the clip rect and the offscreen to accommodate any filter outsets.
// FIXME: It is incorrect to just clip to the damageRect here once multiple fragments are involved.
clipToRect(localPaintingInfo, context, backgroundRect);
// Subsequent code should not clip to the dirty rect, since we've already
// done it above, and doing it later will defeat the outsets.
localPaintingInfo.clipToDirtyRect = false;
context = filterPainter.beginFilterEffect(context);
}
}
LayoutPoint layerLocation = toPoint(layerBounds.location() - renderBoxLocation() + localPaintingInfo.subPixelAccumulation);
if (shouldPaintContent) {
paintForeground(context, transparencyLayerContext, paintingInfo.paintDirtyRect, haveTransparency,
localPaintingInfo, layerLocation, backgroundRect);
}
paintChildren(NormalFlowChildren | PositiveZOrderChildren, context, paintingInfo, paintFlags);
if (filterPainter.hasStartedFilterEffect()) {
context = filterPainter.applyFilterEffect();
restoreClip(transparencyLayerContext, localPaintingInfo.paintDirtyRect, backgroundRect);
}
// Make sure that we now use the original transparency context.
ASSERT(transparencyLayerContext == context);
// End our transparency layer
if (haveTransparency && m_usedTransparency) {
context->endLayer();
context->restore();
m_usedTransparency = false;
}
}
void RenderLayer::paintLayerByApplyingTransform(GraphicsContext* context, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags, const LayoutPoint& translationOffset)
{
// This involves subtracting out the position of the layer in our current coordinate space, but preserving
// the accumulated error for sub-pixel layout.
LayoutPoint delta;
convertToLayerCoords(paintingInfo.rootLayer, delta);
delta.moveBy(translationOffset);
TransformationMatrix transform(renderableTransform());
IntPoint roundedDelta = roundedIntPoint(delta);
transform.translateRight(roundedDelta.x(), roundedDelta.y());
LayoutSize adjustedSubPixelAccumulation = paintingInfo.subPixelAccumulation + (delta - roundedDelta);
// Apply the transform.
GraphicsContextStateSaver stateSaver(*context, false);
if (!transform.isIdentity()) {
stateSaver.save();
context->concatCTM(transform.toAffineTransform());
}
// Now do a paint with the root layer shifted to be us.
LayerPaintingInfo transformedPaintingInfo(this, enclosingIntRect(transform.inverse().mapRect(paintingInfo.paintDirtyRect)),
adjustedSubPixelAccumulation);
paintLayerContents(context, transformedPaintingInfo, paintFlags);
}
void RenderLayer::paintChildren(unsigned childrenToVisit, GraphicsContext* context, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags)
{
if (!hasSelfPaintingLayerDescendant())
return;
#if ENABLE(ASSERT)
LayerListMutationDetector mutationChecker(m_stackingNode.get());
#endif
RenderLayerStackingNodeIterator iterator(*m_stackingNode, childrenToVisit);
while (RenderLayerStackingNode* child = iterator.next()) {
child->layer()->paintLayer(context, paintingInfo, paintFlags);
}
}
void RenderLayer::paintForeground(GraphicsContext* context, GraphicsContext* transparencyLayerContext,
const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, const LayerPaintingInfo& localPaintingInfo,
LayoutPoint& layerLocation, ClipRect& layerForegroundRect)
{
bool foregroundRectIsEmpty = layerForegroundRect.isEmpty();
// Begin transparency if we have something to paint.
if (haveTransparency && !foregroundRectIsEmpty)
beginTransparencyLayers(transparencyLayerContext, localPaintingInfo.rootLayer, transparencyPaintDirtyRect, localPaintingInfo.subPixelAccumulation);
// Optimize clipping for the single fragment case.
bool shouldClip = localPaintingInfo.clipToDirtyRect && !foregroundRectIsEmpty;
if (shouldClip)
clipToRect(localPaintingInfo, context, layerForegroundRect);
// TODO(ojan): We probably should early return at the beginning of this function
// if the rect is empty.
if (!foregroundRectIsEmpty) {
PaintInfo paintInfo(context, pixelSnappedIntRect(layerForegroundRect.rect()), localPaintingInfo.rootLayer->renderer());
renderer()->paint(paintInfo, layerLocation);
}
if (shouldClip)
restoreClip(context, localPaintingInfo.paintDirtyRect, layerForegroundRect);
}
static inline LayoutRect frameVisibleRect(RenderObject* renderer)
{
FrameView* frameView = renderer->document().view();
......
......@@ -134,6 +134,7 @@ public:
bool hasNonEmptyChildRenderers() const;
bool usedTransparency() const { return m_usedTransparency; }
void clearUsedTransparency() { m_usedTransparency = false; }
// Gets the nearest enclosing positioned ancestor layer (also includes
// the <html> layer and the root layer).
......@@ -152,8 +153,6 @@ public:
// 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.
// paint() assumes that the caller will clip to the bounds of damageRect if necessary.
void paint(GraphicsContext*, const LayoutRect& damageRect);
bool hitTest(const HitTestRequest&, HitTestResult&);
bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&);
......@@ -244,6 +243,9 @@ public:
void updateOrRemoveFilterEffectRenderer();
void updateSelfPaintingLayer();
void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&, BorderRadiusClippingRule = IncludeSelfForBorderRadius);
void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const ClipRect&);
private:
// TODO(ojan): Get rid of this. These are basically layer-tree-only paint phases.
enum PaintLayerFlags {
......@@ -256,9 +258,6 @@ private:
void setAncestorChainHasSelfPaintingLayerDescendant();
void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&, BorderRadiusClippingRule = IncludeSelfForBorderRadius);
void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const ClipRect&);
void setNextSibling(RenderLayer* next) { m_next = next; }
void setPreviousSibling(RenderLayer* prev) { m_previous = prev; }
void setFirstChild(RenderLayer* first) { m_first = first; }
......@@ -276,20 +275,6 @@ private:
LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRenderBox(renderer())->location() : LayoutPoint(); }
// paintLayer() assumes that the caller will clip to the bounds of the painting dirty if necessary.
void paintLayer(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags);
// paintLayerContents() assumes that the caller will clip to the bounds of the painting dirty rect if necessary.
void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags);
void paintLayerByApplyingTransform(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags, const LayoutPoint& translationOffset = LayoutPoint());
void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags);
void paintForeground(GraphicsContext*, GraphicsContext* transparencyLayerContext,
const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, const LayerPaintingInfo&,
LayoutPoint& layerLocation, ClipRect& layerForegroundRect);
RenderLayer* hitTestLayer(RenderLayer* rootLayer, RenderLayer* containerLayer, const HitTestRequest& request, HitTestResult& result,
const LayoutRect& hitTestRect, const HitTestLocation&, bool appliedTransform,
const HitTestingTransformState* transformState = 0, double* zOffset = 0);
......
......@@ -185,7 +185,7 @@ bool RenderLineBoxList::lineIntersectsDirtyRect(RenderBoxModelObject* renderer,
return rangeIntersectsRect(renderer, logicalTop, logicalBottom, paintInfo.rect, offset);
}
void RenderLineBoxList::paint(RenderBoxModelObject* renderer, PaintInfo& paintInfo, const LayoutPoint& paintOffset) const
void RenderLineBoxList::paint(RenderBoxModelObject* renderer, PaintInfo& paintInfo, const LayoutPoint& paintOffset, Vector<RenderBox*>& layers) const
{
ASSERT(renderer->isRenderBlock() || (renderer->isRenderInline() && renderer->hasLayer())); // The only way an inline could paint like this is if it has a layer.
......@@ -204,7 +204,7 @@ void RenderLineBoxList::paint(RenderBoxModelObject* renderer, PaintInfo& paintIn
for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
if (lineIntersectsDirtyRect(renderer, curr, info, paintOffset)) {
RootInlineBox& root = curr->root();
curr->paint(info, paintOffset, root.lineTop(), root.lineBottom());
curr->paint(info, paintOffset, root.lineTop(), root.lineBottom(), layers);
}
}
}
......
......@@ -63,7 +63,7 @@ public:
void dirtyLineBoxes();
void dirtyLinesFromChangedChild(RenderObject* parent, RenderObject* child);
void paint(RenderBoxModelObject*, PaintInfo&, const LayoutPoint&) const;
void paint(RenderBoxModelObject*, PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layers) const;
bool hitTest(RenderBoxModelObject*, const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) const;
private:
......
......@@ -1024,7 +1024,7 @@ void RenderObject::addAbsoluteRectForLayer(LayoutRect& result)
current->addAbsoluteRectForLayer(result);
}
void RenderObject::paint(PaintInfo&, const LayoutPoint&)
void RenderObject::paint(PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layers)
{
}
......
......@@ -440,7 +440,7 @@ public:
void updateImage(StyleImage*, StyleImage*);
// paintOffset is the offset from the origin of the GraphicsContext at which to paint the current object.
virtual void paint(PaintInfo&, const LayoutPoint& paintOffset);
virtual void paint(PaintInfo&, const LayoutPoint& paintOffset, Vector<RenderBox*>& layers);
// Subclasses must reimplement this method to compute the size and position
// of this object and all its descendants.
......
......@@ -172,9 +172,9 @@ void RenderParagraph::simplifiedNormalFlowLayout()
}
}
void RenderParagraph::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
void RenderParagraph::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, Vector<RenderBox*>& layers)
{
m_lineBoxes.paint(this, paintInfo, paintOffset);
m_lineBoxes.paint(this, paintInfo, paintOffset, layers);
}
bool RenderParagraph::hitTestContents(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestAction)
......
......@@ -34,7 +34,7 @@ protected:
void simplifiedNormalFlowLayout() final;
void paintChildren(PaintInfo&, const LayoutPoint&) final;
void paintChildren(PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layers) final;
bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) final;
......
......@@ -86,7 +86,7 @@ void RenderReplaced::intrinsicSizeChanged()
setNeedsLayoutAndPrefWidthsRecalc();
}
void RenderReplaced::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
void RenderReplaced::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, Vector<RenderBox*>& layers)
{
if (!shouldPaint(paintInfo, paintOffset))
return;
......
......@@ -66,7 +66,7 @@ protected:
void setIntrinsicSize(const LayoutSize& intrinsicSize) { m_intrinsicSize = intrinsicSize; }
virtual void intrinsicSizeChanged();
virtual void paint(PaintInfo&, const LayoutPoint&) final;
virtual void paint(PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layers) final;
bool shouldPaint(PaintInfo&, const LayoutPoint&);
LayoutRect localSelectionRect(bool checkWhetherSelected = true) const; // This is in local coordinates, but it's a physical rect (so the top left corner is physical top left).
......
......@@ -154,7 +154,7 @@ private:
// callers with a RenderObject* can continue to use length().
virtual unsigned length() const override final { return textLength(); }
virtual void paint(PaintInfo&, const LayoutPoint&) override final { ASSERT_NOT_REACHED(); }
virtual void paint(PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layers) override final { ASSERT_NOT_REACHED(); }
virtual void layout() override final { ASSERT_NOT_REACHED(); }
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation&, const LayoutPoint&, HitTestAction) override final { ASSERT_NOT_REACHED(); return false; }
......
......@@ -191,7 +191,7 @@ void RenderView::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformStat
}
}
void RenderView::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
void RenderView::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, Vector<RenderBox*>& layers)
{
// If we ever require layout but receive a paint anyway, something has gone horribly wrong.
ASSERT(!needsLayout());
......@@ -202,7 +202,7 @@ void RenderView::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
if (m_frameView && style()->isOverflowPaged())
paintInfo.context->fillRect(paintInfo.rect, m_frameView->baseBackgroundColor());
paintObject(paintInfo, paintOffset);
paintObject(paintInfo, paintOffset, layers);
}
static inline bool rendererObscuresBackground(RenderBox* rootBox)
......
......@@ -68,7 +68,7 @@ public:
FrameView* frameView() const { return m_frameView; }
virtual void paint(PaintInfo&, const LayoutPoint&) override;
virtual void paint(PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layers) override;
virtual void paintBoxDecorationBackground(PaintInfo&, const LayoutPoint&) override;
void setSelection(RenderObject* start, int startPos, RenderObject*, int endPos);
......
......@@ -149,16 +149,16 @@ float RootInlineBox::placeEllipsisBox(bool ltr, float blockLeftEdge, float block
return result;
}
void RootInlineBox::paintEllipsisBox(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom) const
void RootInlineBox::paintEllipsisBox(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, Vector<RenderBox*>& layers) const
{
if (hasEllipsisBox())
ellipsisBox()->paint(paintInfo, paintOffset, lineTop, lineBottom);
ellipsisBox()->paint(paintInfo, paintOffset, lineTop, lineBottom, layers);
}
void RootInlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
void RootInlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, Vector<RenderBox*>& layers)
{
InlineFlowBox::paint(paintInfo, paintOffset, lineTop, lineBottom);
paintEllipsisBox(paintInfo, paintOffset, lineTop, lineBottom);
InlineFlowBox::paint(paintInfo, paintOffset, lineTop, lineBottom, layers);
paintEllipsisBox(paintInfo, paintOffset, lineTop, lineBottom, layers);
}
bool RootInlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
......
......@@ -102,14 +102,14 @@ public:
using InlineBox::hasEllipsisBox;
EllipsisBox* ellipsisBox() const;
void paintEllipsisBox(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) const;
void paintEllipsisBox(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom, Vector<RenderBox*>& layers) const;
virtual void clearTruncation() override final;
virtual int baselinePosition(FontBaseline baselineType) const override final;
virtual LayoutUnit lineHeight() const override final;
virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) override;
virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom, Vector<RenderBox*>& layers) override;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom) override final;
using InlineBox::hasSelectedChildren;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册