| Index: Source/core/rendering/RenderLayer.cpp
|
| diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
|
| index ea83bc9e465458e5b59d3e73b430a8b72a3eb3e3..27829f675fb52784dd1a9f8e318207fefaba9427 100644
|
| --- a/Source/core/rendering/RenderLayer.cpp
|
| +++ b/Source/core/rendering/RenderLayer.cpp
|
| @@ -3549,6 +3549,20 @@ void RenderLayer::updateFilters(const RenderStyle* oldStyle, const RenderStyle*
|
| updateOrRemoveFilterEffectRenderer();
|
| }
|
|
|
| +void RenderLayer::updateClipPathInfo(const RenderStyle* oldStyle, const RenderStyle* newStyle)
|
| +{
|
| + if (!newStyle->clipPath() && (!oldStyle || !oldStyle->clipPath()))
|
| + return;
|
| +
|
| + if (renderer()->hasClipPath() && renderer()->style()->clipPath()->type() == ClipPathOperation::REFERENCE) {
|
| + if (!m_clipPathInfo)
|
| + m_clipPathInfo = adoptPtr(new RenderLayerClipPathInfo(this));
|
| + m_clipPathInfo->updateReferenceClipPathClients(renderer()->style()->clipPath());
|
| + } else if (m_clipPathInfo) {
|
| + m_clipPathInfo = nullptr;
|
| + }
|
| +}
|
| +
|
| bool RenderLayer::attemptDirectCompositingUpdate(StyleDifference diff, const RenderStyle* oldStyle)
|
| {
|
| CompositingReasons oldPotentialCompositingReasonsFromStyle = m_potentialCompositingReasonsFromStyle;
|
| @@ -3571,12 +3585,12 @@ bool RenderLayer::attemptDirectCompositingUpdate(StyleDifference diff, const Ren
|
| // the reflection layers.
|
| if (renderer()->hasReflection())
|
| return false;
|
| - // If we're unwinding a scheduleSVGFilterLayerUpdateHack(), then we can't
|
| + // If we're unwinding a scheduleSVGEffectsLayerUpdateHack(), then we can't
|
| // perform a direct compositing update because the filters code is going
|
| // to produce different output this time around. We can remove this code
|
| // once we fix the chicken/egg bugs in the filters code and delete the
|
| - // scheduleSVGFilterLayerUpdateHack().
|
| - if (renderer()->node() && renderer()->node()->svgFilterNeedsLayerUpdate())
|
| + // scheduleSVGEffectsLayerUpdateHack().
|
| + if (renderer()->node() && renderer()->node()->svgEffectsNeedsLayerUpdate())
|
| return false;
|
| if (!m_compositedLayerMapping)
|
| return false;
|
| @@ -3627,6 +3641,8 @@ void RenderLayer::styleChanged(StyleDifference diff, const RenderStyle* oldStyle
|
| updateReflectionInfo(oldStyle);
|
| }
|
|
|
| + updateClipPathInfo(oldStyle, renderer()->style());
|
| +
|
| if (RuntimeEnabledFeatures::cssCompositingEnabled())
|
| m_blendInfo.updateBlendMode();
|
|
|
| @@ -3714,15 +3730,15 @@ void RenderLayer::updateOrRemoveFilterEffectRenderer()
|
| filterInfo->setRenderer(nullptr);
|
| }
|
|
|
| -void RenderLayer::filterNeedsPaintInvalidation()
|
| +void RenderLayer::SVGEffectsNeedsPaintInvalidation()
|
| {
|
| {
|
| DeprecatedScheduleStyleRecalcDuringLayout marker(renderer()->document().lifecycle());
|
| - // It's possible for scheduleSVGFilterLayerUpdateHack to schedule a style recalc, which
|
| + // It's possible for scheduleSVGEffectsLayerUpdateHack to schedule a style recalc, which
|
| // is a problem because this function can be called while performing layout.
|
| // Presumably this represents an illegal data flow of layout or compositing
|
| // information into the style system.
|
| - toElement(renderer()->node())->scheduleSVGFilterLayerUpdateHack();
|
| + toElement(renderer()->node())->scheduleSVGEffectsLayerUpdateHack();
|
| }
|
|
|
| if (renderer()->view()) {
|
|
|