| Index: sky/engine/core/rendering/RenderLayer.cpp
|
| diff --git a/sky/engine/core/rendering/RenderLayer.cpp b/sky/engine/core/rendering/RenderLayer.cpp
|
| index ced7318fc7bf7d9ee5ad0772e44193cc2240be8c..24291a45b4ae4e2b7c0ba142b4353db580c86372 100644
|
| --- a/sky/engine/core/rendering/RenderLayer.cpp
|
| +++ b/sky/engine/core/rendering/RenderLayer.cpp
|
| @@ -914,7 +914,7 @@ void RenderLayer::clipToRect(const LayerPaintingInfo& localPaintingInfo, Graphic
|
| // want to apply a border-radius clip to the layer contents itself, because that would require re-rastering
|
| // every frame to update the clip. We only want to make sure that the mask layer is properly clipped so
|
| // that it can in turn clip the scrolled contents in the compositor.
|
| - if (layer->needsCompositedScrolling() && !(paintFlags & PaintLayerPaintingChildClippingMaskPhase))
|
| + if (layer->needsCompositedScrolling())
|
| break;
|
|
|
| if (layer->renderer()->hasOverflowClip() && layer->renderer()->style()->hasBorderRadius() && inContainingBlockChain(this, layer)) {
|
| @@ -948,7 +948,7 @@ static inline bool shouldSuppressPaintingLayer(RenderLayer* layer)
|
|
|
| static ShouldRespectOverflowClip shouldRespectOverflowClip(PaintLayerFlags paintFlags, const RenderObject* renderer)
|
| {
|
| - return (paintFlags & PaintLayerPaintingOverflowContents || (paintFlags & PaintLayerPaintingChildClippingMaskPhase && renderer->hasClipPath())) ? IgnoreOverflowClip : RespectOverflowClip;
|
| + return (paintFlags & PaintLayerPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip;
|
| }
|
|
|
| void RenderLayer::paintLayer(GraphicsContext* context, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags)
|
| @@ -1062,7 +1062,7 @@ void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti
|
| // 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 && (!needsCompositedScrolling() || paintFlags & PaintLayerPaintingChildClippingMaskPhase)) {
|
| + if (renderer()->hasClipPath() && style && !needsCompositedScrolling()) {
|
| ASSERT(style->clipPath());
|
| if (style->clipPath()->type() == ClipPathOperation::SHAPE) {
|
| ShapeClipPathOperation* clipPath = toShapeClipPathOperation(style->clipPath());
|
| @@ -1156,7 +1156,6 @@ void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti
|
| bool shouldPaintNormalFlowAndPosZOrderLists = isPaintingCompositedForeground;
|
| bool shouldPaintOverlayScrollbars = isPaintingOverlayScrollbars;
|
| bool shouldPaintMask = (paintFlags & PaintLayerPaintingCompositingMaskPhase) && shouldPaintContent && renderer()->hasMask();
|
| - bool shouldPaintClippingMask = (paintFlags & PaintLayerPaintingChildClippingMaskPhase) && shouldPaintContent;
|
|
|
| // FIXME(sky): Get rid of PaintBehavior argument now that it's always Normal.
|
| PaintBehavior paintBehavior = PaintBehaviorNormal;
|
| @@ -1200,11 +1199,6 @@ void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti
|
| if (shouldPaintMask)
|
| paintMaskForFragments(layerFragments, context, localPaintingInfo, paintingRootForRenderer, paintFlags);
|
|
|
| - if (shouldPaintClippingMask) {
|
| - // Paint the border radius mask for the fragments.
|
| - paintChildClippingMaskForFragments(layerFragments, context, localPaintingInfo, paintingRootForRenderer, paintFlags);
|
| - }
|
| -
|
| // End our transparency layer
|
| if (haveTransparency && m_usedTransparency) {
|
| context->endLayer();
|
| @@ -1398,26 +1392,6 @@ void RenderLayer::paintMaskForFragments(const LayerFragments& layerFragments, Gr
|
| }
|
| }
|
|
|
| -void RenderLayer::paintChildClippingMaskForFragments(const LayerFragments& layerFragments, GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo,
|
| - RenderObject* paintingRootForRenderer, PaintLayerFlags paintFlags)
|
| -{
|
| - for (size_t i = 0; i < layerFragments.size(); ++i) {
|
| - const LayerFragment& fragment = layerFragments.at(i);
|
| - if (!fragment.shouldPaintContent)
|
| - continue;
|
| -
|
| - if (localPaintingInfo.clipToDirtyRect)
|
| - clipToRect(localPaintingInfo, context, fragment.foregroundRect, paintFlags, IncludeSelfForBorderRadius); // Child clipping mask painting will handle clipping to self.
|
| -
|
| - // Paint the the clipped mask.
|
| - PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect.rect()), PaintPhaseClippingMask, PaintBehaviorNormal, paintingRootForRenderer, 0, localPaintingInfo.rootLayer->renderer());
|
| - renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subPixelAccumulation));
|
| -
|
| - if (localPaintingInfo.clipToDirtyRect)
|
| - restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.foregroundRect);
|
| - }
|
| -}
|
| -
|
| void RenderLayer::paintOverflowControlsForFragments(const LayerFragments& layerFragments, GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo, PaintLayerFlags paintFlags)
|
| {
|
| for (size_t i = 0; i < layerFragments.size(); ++i) {
|
|
|