Skip to content
Permalink
Browse files
Optimize layer repaint rect computation and painting.
https://bugs.webkit.org/show_bug.cgi?id=157631

Reviewed by Zalan Bujtas.

This patch changes the computation of repaint rects to be for self-painting layers
only. In addition, hasBoxDecorations() has been changed to hasVisibleBoxDecorations(),
and it will no longer be set for transparent borders.

For scrolling layer position updating, visually empty layers have their repaint rects
cleared, and we don't compute repaint rects during the scroll. We would like to do this
all the time, but computeRepaintRects can be called at times when the visually empty
state is stale/unknown. For now we limit it to scrolling, since we know that the layer's
visually empty state is correct.

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintBoxDecorations):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::layoutRunsAndFloats):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::updateFromStyle):
(WebCore::RenderBox::paintBoxDecorations):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::willBeDestroyed):
(WebCore::RenderBoxModelObject::hasVisibleBoxDecorationStyle):
(WebCore::RenderBoxModelObject::updateFromStyle):
(WebCore::RenderBoxModelObject::hasBoxDecorationStyle): Deleted.
* rendering/RenderBoxModelObject.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::styleWillChange):
(WebCore::mustRepaintBackgroundOrBorder):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageChanged):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::styleDidChange):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::repaintRectIncludingNonCompositingDescendants):
(WebCore::RenderLayer::computeRepaintRects):
(WebCore::RenderLayer::clearRepaintRects):
(WebCore::RenderLayer::updateLayerPositionsAfterScroll):
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDrawsContent):
(WebCore::RenderLayerBacking::compositingOpacity):
(WebCore::hasVisibleBoxDecorations):
(WebCore::canCreateTiledImage):
(WebCore::hasVisibleBoxDecorationsOrBackgroundImage):
(WebCore::supportsDirectBoxDecorationsComposition):
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
(WebCore::RenderLayerBacking::containsPaintedContent):
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):
(WebCore::hasBoxDecorations): Deleted.
(WebCore::hasBoxDecorationsOrBackgroundImage): Deleted.
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::styleDidChange):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::setObjectStyleInRegion):
* rendering/RenderObject.h:
(WebCore::RenderObject::hasVisibleBoxDecorations):
(WebCore::RenderObject::setFloating):
(WebCore::RenderObject::setInline):
(WebCore::RenderObject::computeBackgroundIsKnownToBeObscured):
(WebCore::RenderObject::setSelectionStateIfNeeded):
(WebCore::RenderObject::setHasVisibleBoxDecorations):
(WebCore::RenderObject::invalidateBackgroundObscurationStatus):
(WebCore::RenderObject::hasBoxDecorations): Deleted.
(WebCore::RenderObject::setHasBoxDecorations): Deleted.
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintObject):
(WebCore::RenderTable::paintBoxDecorations):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::styleDidChange):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint):
* rendering/style/BorderData.h:
(WebCore::BorderData::hasBorder):
(WebCore::BorderData::hasVisibleBorder):
(WebCore::BorderData::hasFill):
(WebCore::BorderData::hasBorderRadius):
* rendering/style/RenderStyle.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):
(WebCore::RenderSVGRoot::styleDidChange):



Canonical link: https://commits.webkit.org/175931@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
David Hyatt committed May 17, 2016
1 parent 954e1e8 commit 789e7f5eeae52dad9585b3aac20728ae4d6fac5a
@@ -1,3 +1,97 @@
2016-05-17 Dave Hyatt <hyatt@apple.com>

Optimize layer repaint rect computation and painting.
https://bugs.webkit.org/show_bug.cgi?id=157631

Reviewed by Zalan Bujtas.

This patch changes the computation of repaint rects to be for self-painting layers
only. In addition, hasBoxDecorations() has been changed to hasVisibleBoxDecorations(),
and it will no longer be set for transparent borders.

For scrolling layer position updating, visually empty layers have their repaint rects
cleared, and we don't compute repaint rects during the scroll. We would like to do this
all the time, but computeRepaintRects can be called at times when the visually empty
state is stale/unknown. For now we limit it to scrolling, since we know that the layer's
visually empty state is correct.

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintBoxDecorations):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::layoutRunsAndFloats):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::updateFromStyle):
(WebCore::RenderBox::paintBoxDecorations):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::willBeDestroyed):
(WebCore::RenderBoxModelObject::hasVisibleBoxDecorationStyle):
(WebCore::RenderBoxModelObject::updateFromStyle):
(WebCore::RenderBoxModelObject::hasBoxDecorationStyle): Deleted.
* rendering/RenderBoxModelObject.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::styleWillChange):
(WebCore::mustRepaintBackgroundOrBorder):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageChanged):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::styleDidChange):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::repaintRectIncludingNonCompositingDescendants):
(WebCore::RenderLayer::computeRepaintRects):
(WebCore::RenderLayer::clearRepaintRects):
(WebCore::RenderLayer::updateLayerPositionsAfterScroll):
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDrawsContent):
(WebCore::RenderLayerBacking::compositingOpacity):
(WebCore::hasVisibleBoxDecorations):
(WebCore::canCreateTiledImage):
(WebCore::hasVisibleBoxDecorationsOrBackgroundImage):
(WebCore::supportsDirectBoxDecorationsComposition):
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
(WebCore::RenderLayerBacking::containsPaintedContent):
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):
(WebCore::hasBoxDecorations): Deleted.
(WebCore::hasBoxDecorationsOrBackgroundImage): Deleted.
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::styleDidChange):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::setObjectStyleInRegion):
* rendering/RenderObject.h:
(WebCore::RenderObject::hasVisibleBoxDecorations):
(WebCore::RenderObject::setFloating):
(WebCore::RenderObject::setInline):
(WebCore::RenderObject::computeBackgroundIsKnownToBeObscured):
(WebCore::RenderObject::setSelectionStateIfNeeded):
(WebCore::RenderObject::setHasVisibleBoxDecorations):
(WebCore::RenderObject::invalidateBackgroundObscurationStatus):
(WebCore::RenderObject::hasBoxDecorations): Deleted.
(WebCore::RenderObject::setHasBoxDecorations): Deleted.
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintObject):
(WebCore::RenderTable::paintBoxDecorations):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::styleDidChange):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint):
* rendering/style/BorderData.h:
(WebCore::BorderData::hasBorder):
(WebCore::BorderData::hasVisibleBorder):
(WebCore::BorderData::hasFill):
(WebCore::BorderData::hasBorderRadius):
* rendering/style/RenderStyle.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):
(WebCore::RenderSVGRoot::styleDidChange):

2016-05-17 Filip Pizlo <fpizlo@apple.com>

WTF should know about Language
@@ -1366,7 +1366,7 @@ void InlineFlowBox::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint&

// You can use p::first-line to specify a background. If so, the root line boxes for
// a line may actually have to paint a background.
if (parent() && !renderer().hasBoxDecorations())
if (parent() && !renderer().hasVisibleBoxDecorations())
return;
const RenderStyle& lineStyle = this->lineStyle();
if (!parent() && (!isFirstLine() || &lineStyle == &renderer().style()))
@@ -1385,7 +1385,7 @@ void InlineFlowBox::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint&

// :first-line cannot be used to put borders on a line. Always paint borders with our
// non-first-line style.
if (!parent() || !renderer().style().hasBorderDecoration())
if (!parent() || !renderer().style().hasVisibleBorderDecoration())
return;
const NinePieceImage& borderImage = renderer().style().borderImage();
StyleImage* borderImageSource = borderImage.image();
@@ -1539,7 +1539,7 @@ void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs

// 1. paint background, borders etc
if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && style().visibility() == VISIBLE) {
if (hasBoxDecorations()) {
if (hasVisibleBoxDecorations()) {
bool didClipToRegion = false;

RenderNamedFlowFragment* namedFlowFragment = currentRenderNamedFlowFragment();
@@ -1259,7 +1259,7 @@ void RenderBlockFlow::layoutRunsAndFloats(LineLayoutState& layoutState, bool has
// determineStartPosition first will break fast/repaint/line-flow-with-floats-9.html.
if (layoutState.isFullLayout() && hasInlineChild && !selfNeedsLayout()) {
setNeedsLayout(MarkOnlyThis); // Mark as needing a full layout to force us to repaint.
if (!view().doingFullRepaint() && hasLayer()) {
if (!view().doingFullRepaint() && hasSelfPaintingLayer() && layer()->hasComputedRepaintRect()) {
// Because we waited until we were already inside layout to discover
// that the block really needed a full layout, we missed our chance to repaint the layer
// before layout started. Luckily the layer has cached the repaint rect for its original
@@ -494,7 +494,7 @@ void RenderBox::updateFromStyle()

// The root and the RenderView always paint their backgrounds/borders.
if (isDocElementRenderer || isViewObject)
setHasBoxDecorations(true);
setHasVisibleBoxDecorations(true);

setFloating(!isOutOfFlowPositioned() && styleToUse.isFloating());

@@ -1369,7 +1369,7 @@ void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& pai
paintBoxShadow(paintInfo, paintRect, style(), Inset);

// The theme will tell us whether or not we should also paint the CSS border.
if (bleedAvoidance != BackgroundBleedBackgroundOverBorder && (!style().hasAppearance() || (borderOrBackgroundPaintingIsNeeded && theme().paintBorderOnly(*this, paintInfo, paintRect))) && style().hasBorderDecoration())
if (bleedAvoidance != BackgroundBleedBackgroundOverBorder && (!style().hasAppearance() || (borderOrBackgroundPaintingIsNeeded && theme().paintBorderOnly(*this, paintInfo, paintRect))) && style().hasVisibleBorderDecoration())
paintBorder(paintInfo, paintRect, style(), bleedAvoidance);

if (bleedAvoidance == BackgroundBleedUseTransparencyLayer)
@@ -193,9 +193,9 @@ void RenderBoxModelObject::willBeDestroyed()
RenderLayerModelObject::willBeDestroyed();
}

bool RenderBoxModelObject::hasBoxDecorationStyle() const
bool RenderBoxModelObject::hasVisibleBoxDecorationStyle() const
{
return hasBackground() || style().hasBorderDecoration() || style().hasAppearance() || style().boxShadow();
return hasBackground() || style().hasVisibleBorderDecoration() || style().hasAppearance() || style().boxShadow();
}

void RenderBoxModelObject::updateFromStyle()
@@ -205,7 +205,7 @@ void RenderBoxModelObject::updateFromStyle()
// Set the appropriate bits for a box model object. Since all bits are cleared in styleWillChange,
// we only check for bits that could possibly be set to true.
const RenderStyle& styleToUse = style();
setHasBoxDecorations(hasBoxDecorationStyle());
setHasVisibleBoxDecorations(hasVisibleBoxDecorationStyle());
setInline(styleToUse.isDisplayInlineType());
setPositionState(styleToUse.position());
setHorizontalWritingMode(styleToUse.isHorizontalWritingMode());
@@ -245,7 +245,7 @@ class RenderBoxModelObject : public RenderLayerModelObject {

LayoutPoint adjustedPositionRelativeToOffsetParent(const LayoutPoint&) const;

bool hasBoxDecorationStyle() const;
bool hasVisibleBoxDecorationStyle() const;
BackgroundImageGeometry calculateBackgroundImageGeometry(const RenderLayerModelObject* paintContainer, const FillLayer&, const LayoutPoint& paintOffset,
const LayoutRect& paintRect, RenderElement* = nullptr) const;
bool borderObscuresBackgroundEdge(const FloatSize& contextScale) const;
@@ -860,7 +860,7 @@ void RenderElement::styleWillChange(StyleDifference diff, const RenderStyle& new
clearPositionedState();
}
setHorizontalWritingMode(true);
setHasBoxDecorations(false);
setHasVisibleBoxDecorations(false);
setHasOverflowClip(false);
setHasTransformRelatedProperty(false);
setHasReflection(false);
@@ -1257,7 +1257,7 @@ static bool mustRepaintBackgroundOrBorder(const RenderElement& renderer)
return true;

// If we don't have a background/border/mask, then nothing to do.
if (!renderer.hasBoxDecorations())
if (!renderer.hasVisibleBoxDecorations())
return false;

if (mustRepaintFillLayers(renderer, renderer.style().backgroundLayers()))
@@ -225,7 +225,7 @@ void RenderImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect)
if (documentBeingDestroyed() || document().inPageCache())
return;

if (hasBoxDecorations() || hasMask() || hasShapeOutside())
if (hasVisibleBoxDecorations() || hasMask() || hasShapeOutside())
RenderReplaced::imageChanged(newImage, rect);

if (newImage != imageResource().imagePtr() || !newImage)
@@ -204,7 +204,7 @@ void RenderInline::styleDidChange(StyleDifference diff, const RenderStyle* oldSt
}

if (!alwaysCreateLineBoxes()) {
bool alwaysCreateLineBoxes = hasSelfPaintingLayer() || hasBoxDecorations() || newStyle.hasPadding() || newStyle.hasMargin() || hasOutline();
bool alwaysCreateLineBoxes = hasSelfPaintingLayer() || hasVisibleBoxDecorations() || newStyle.hasBorder() || newStyle.hasPadding() || newStyle.hasMargin() || hasOutline();
if (oldStyle && alwaysCreateLineBoxes) {
dirtyLineBoxes(false);
setNeedsLayout();
@@ -305,6 +305,7 @@ RenderLayer::RenderLayer(RenderLayerModelObject& rendererLayerModelObject)
, m_layerListMutationAllowed(true)
#endif
, m_hasFilterInfo(false)
, m_hasComputedRepaintRect(false)
#if ENABLE(CSS_COMPOSITING)
, m_blendMode(BlendModeNormal)
, m_hasNotIsolatedCompositedBlendingDescendants(false)
@@ -509,7 +510,7 @@ void RenderLayer::updateLayerPositions(RenderGeometryMap* geometryMap, UpdateLay

// FIXME: Should ASSERT that value calculated for m_outlineBox using the cached offset is the same
// as the value not using the cached offset, but we can't due to https://bugs.webkit.org/show_bug.cgi?id=37048
if (flags & CheckForRepaint) {
if ((flags & CheckForRepaint) && m_hasComputedRepaintRect) {
if (!renderer().view().printing()) {
bool didRepaint = false;
if (m_repaintStatus & NeedsFullRepaint) {
@@ -594,7 +595,7 @@ LayoutRect RenderLayer::repaintRectIncludingNonCompositingDescendants() const
if (child->isComposited())
continue;

repaintRect.unite(child->repaintRectIncludingNonCompositingDescendants());
repaintRect.uniteIfNonZero(child->repaintRectIncludingNonCompositingDescendants());
}
return repaintRect;
}
@@ -785,6 +786,12 @@ void RenderLayer::computeRepaintRects(const RenderLayerModelObject* repaintConta
{
ASSERT(!m_visibleContentStatusDirty);

if (!isSelfPaintingLayer()) {
clearRepaintRects();
return;
}

m_hasComputedRepaintRect = true;
m_repaintRect = renderer().clippedOverflowRectForRepaint(repaintContainer);
m_outlineBox = renderer().outlineBoundsForRepaint(repaintContainer, geometryMap);
}
@@ -803,9 +810,9 @@ void RenderLayer::computeRepaintRectsIncludingDescendants()

void RenderLayer::clearRepaintRects()
{
ASSERT(!m_hasVisibleContent);
ASSERT(!m_visibleContentStatusDirty);

m_hasComputedRepaintRect = false;
m_repaintRect = LayoutRect();
m_outlineBox = LayoutRect();
}
@@ -845,9 +852,6 @@ void RenderLayer::updateLayerPositionsAfterScroll(RenderGeometryMap* geometryMap
if (positionChanged)
flags |= HasChangedAncestor;

if (geometryMap)
geometryMap->pushMappingsToAncestor(this, parent());

if (flags & HasChangedAncestor || flags & HasSeenViewportConstrainedAncestor || flags & IsOverflowScroll)
clearClipRects();

@@ -856,15 +860,23 @@ void RenderLayer::updateLayerPositionsAfterScroll(RenderGeometryMap* geometryMap

if (renderer().hasOverflowClip())
flags |= HasSeenAncestorWithOverflowClip;

bool shouldComputeRepaintRects = (flags & HasSeenViewportConstrainedAncestor || (flags & IsOverflowScroll && flags & HasSeenAncestorWithOverflowClip)) && isSelfPaintingLayer();
bool isVisuallyEmpty = !isVisuallyNonEmpty();
bool shouldPushAndPopMappings = geometryMap && ((shouldComputeRepaintRects && !isVisuallyEmpty) || firstChild());
if (shouldPushAndPopMappings)
geometryMap->pushMappingsToAncestor(this, parent());

if (flags & HasSeenViewportConstrainedAncestor
|| (flags & IsOverflowScroll && flags & HasSeenAncestorWithOverflowClip)) {
// FIXME: We could track the repaint container as we walk down the tree.
computeRepaintRects(renderer().containerForRepaint(), geometryMap);
if (shouldComputeRepaintRects) {
// When scrolling, we don't compute repaint rects for visually non-empty layers.
if (isVisuallyEmpty)
clearRepaintRects();
else // FIXME: We could track the repaint container as we walk down the tree.
computeRepaintRects(renderer().containerForRepaint(), geometryMap);
} else {
// Check that our cached rects are correct.
ASSERT(m_repaintRect == renderer().clippedOverflowRectForRepaint(renderer().containerForRepaint()));
ASSERT(m_outlineBox == renderer().outlineBoundsForRepaint(renderer().containerForRepaint(), geometryMap));
ASSERT(!m_hasComputedRepaintRect || (m_repaintRect == renderer().clippedOverflowRectForRepaint(renderer().containerForRepaint())));
ASSERT(!m_hasComputedRepaintRect || m_outlineBox == renderer().outlineBoundsForRepaint(renderer().containerForRepaint()));
}

for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
@@ -881,7 +893,7 @@ void RenderLayer::updateLayerPositionsAfterScroll(RenderGeometryMap* geometryMap
m_updatingMarqueePosition = oldUpdatingMarqueePosition;
}

if (geometryMap)
if (shouldPushAndPopMappings)
geometryMap->popMappingsToAncestor(parent());

renderer().document().markers().invalidateRectsForAllMarkers();
@@ -2411,8 +2423,10 @@ void RenderLayer::scrollTo(const ScrollPosition& position)
RenderLayerModelObject* repaintContainer = renderer().containerForRepaint();
// The caret rect needs to be invalidated after scrolling
frame.selection().setCaretRectNeedsUpdate();

LayoutRect rectForRepaint = m_hasComputedRepaintRect ? m_repaintRect : renderer().clippedOverflowRectForRepaint(repaintContainer);

FloatQuad quadForFakeMouseMoveEvent = FloatQuad(m_repaintRect);
FloatQuad quadForFakeMouseMoveEvent = FloatQuad(rectForRepaint);
if (repaintContainer)
quadForFakeMouseMoveEvent = repaintContainer->localToAbsoluteQuad(quadForFakeMouseMoveEvent);
frame.eventHandler().dispatchFakeMouseMoveEventSoonInQuad(quadForFakeMouseMoveEvent);
@@ -2423,7 +2437,7 @@ void RenderLayer::scrollTo(const ScrollPosition& position)

// Just schedule a full repaint of our object.
if (requiresRepaint)
renderer().repaintUsingContainer(repaintContainer, m_repaintRect);
renderer().repaintUsingContainer(repaintContainer, rectForRepaint);

// Schedule the scroll and scroll-related DOM events.
if (Element* element = renderer().element()) {
@@ -6500,9 +6514,9 @@ void RenderLayer::updateSelfPaintingLayer()
parent()->dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
}

static bool hasBoxDecorationsOrBackground(const RenderElement& renderer)
static bool hasVisibleBoxDecorationsOrBackground(const RenderElement& renderer)
{
return renderer.hasBoxDecorations() || renderer.style().hasOutline();
return renderer.hasVisibleBoxDecorations() || renderer.style().hasOutline();
}

// Constrain the depth and breadth of the search for performance.
@@ -6533,7 +6547,7 @@ static bool hasPaintingNonLayerDescendants(const RenderElement& renderer, int de
if (is<RenderLayerModelObject>(renderElementChild) && downcast<RenderLayerModelObject>(renderElementChild).hasSelfPaintingLayer())
continue;

if (hasBoxDecorationsOrBackground(renderElementChild))
if (hasVisibleBoxDecorationsOrBackground(renderElementChild))
return true;

if (is<RenderReplaced>(renderElementChild))
@@ -6551,17 +6565,17 @@ bool RenderLayer::hasNonEmptyChildRenderers() const
return hasPaintingNonLayerDescendants(renderer(), 0);
}

bool RenderLayer::hasBoxDecorationsOrBackground() const
bool RenderLayer::hasVisibleBoxDecorationsOrBackground() const
{
return WebCore::hasBoxDecorationsOrBackground(renderer());
return WebCore::hasVisibleBoxDecorationsOrBackground(renderer());
}

bool RenderLayer::hasVisibleBoxDecorations() const
{
if (!hasVisibleContent())
return false;

return hasBoxDecorationsOrBackground() || hasOverflowControls();
return hasVisibleBoxDecorationsOrBackground() || hasOverflowControls();
}

bool RenderLayer::isVisuallyNonEmpty() const
@@ -6574,7 +6588,7 @@ bool RenderLayer::isVisuallyNonEmpty() const
if (renderer().isRenderReplaced() || hasOverflowControls())
return true;

if (hasBoxDecorationsOrBackground())
if (hasVisibleBoxDecorationsOrBackground())
return true;

if (hasNonEmptyChildRenderers())

0 comments on commit 789e7f5

Please sign in to comment.