From f31546de18c7fd158b5d1029162ef8bb62873bdd Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Sat, 17 Dec 2016 21:59:10 -0500 Subject: [PATCH] Backed out 2 changesets (bug 1318266) for breaking tab drawing when a LWT is applied. Backed out changeset 00bb4e2f5a3c (bug 1318266) Backed out changeset 55790893cab4 (bug 1318266) --- layout/painting/FrameLayerBuilder.cpp | 7 ------- layout/painting/nsDisplayList.cpp | 5 +++-- layout/svg/nsSVGClipPathFrame.cpp | 2 ++ layout/svg/nsSVGIntegrationUtils.cpp | 3 +-- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/layout/painting/FrameLayerBuilder.cpp b/layout/painting/FrameLayerBuilder.cpp index b5ac9a4ae0c9..44c8464c8b08 100644 --- a/layout/painting/FrameLayerBuilder.cpp +++ b/layout/painting/FrameLayerBuilder.cpp @@ -4340,13 +4340,6 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList) } else if (item->GetType() == nsDisplayItem::TYPE_MASK) { nsDisplayMask* maskItem = static_cast(item); SetupMaskLayerForCSSMask(ownLayer, maskItem); - - nsDisplayItem* next = aList->GetBottom(); - if (next && next->GetType() == nsDisplayItem::TYPE_SCROLL_INFO_LAYER) { - // Since we do build a layer for mask, there is no need for this - // scroll info layer anymore. - aList->RemoveBottom(); - } } // Convert the visible rect to a region and give the item diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp index df8cd87ad157..74a8ded802f4 100644 --- a/layout/painting/nsDisplayList.cpp +++ b/layout/painting/nsDisplayList.cpp @@ -7353,12 +7353,13 @@ bool nsDisplayMask::ShouldPaintOnMaskLayer(LayerManager* aManager) nsSVGUtils::MaskUsage maskUsage; nsSVGUtils::DetermineMaskUsage(mFrame, mHandleOpacity, maskUsage); - if (!maskUsage.shouldGenerateMaskLayer && !maskUsage.shouldApplyClipPath && + if (!maskUsage.shouldGenerateMaskLayer && !maskUsage.shouldGenerateClipMaskLayer) { return false; } - if (maskUsage.opacity != 1.0 || maskUsage.shouldApplyBasicShape) { + if (maskUsage.opacity != 1.0 || maskUsage.shouldApplyClipPath || + maskUsage.shouldApplyBasicShape) { return false; } diff --git a/layout/svg/nsSVGClipPathFrame.cpp b/layout/svg/nsSVGClipPathFrame.cpp index 5ec1fca34139..d07c90ae8082 100644 --- a/layout/svg/nsSVGClipPathFrame.cpp +++ b/layout/svg/nsSVGClipPathFrame.cpp @@ -272,6 +272,8 @@ nsSVGClipPathFrame::GetClipMask(gfxContext& aReferenceContext, SourceSurface* aExtraMask, const Matrix& aExtraMasksTransform) { + MOZ_ASSERT(!IsTrivial(), "Caller needs to use ApplyClipPath"); + IntPoint offset; RefPtr maskDT = CreateClipMask(aReferenceContext, offset); if (!maskDT) { diff --git a/layout/svg/nsSVGIntegrationUtils.cpp b/layout/svg/nsSVGIntegrationUtils.cpp index 29c79557cc89..7d6f1f517cc8 100644 --- a/layout/svg/nsSVGIntegrationUtils.cpp +++ b/layout/svg/nsSVGIntegrationUtils.cpp @@ -756,7 +756,6 @@ nsSVGIntegrationUtils::PaintMask(const PaintFramesParams& aParams) nsSVGUtils::DetermineMaskUsage(aParams.frame, aParams.handleOpacity, maskUsage); MOZ_ASSERT(maskUsage.shouldGenerateMaskLayer || - maskUsage.shouldApplyClipPath || maskUsage.shouldGenerateClipMaskLayer); nsIFrame* frame = aParams.frame; @@ -798,7 +797,7 @@ nsSVGIntegrationUtils::PaintMask(const PaintFramesParams& aParams) } // Paint clip-path onto ctx. - if (maskUsage.shouldGenerateClipMaskLayer || maskUsage.shouldApplyClipPath) { + if (maskUsage.shouldGenerateClipMaskLayer) { matSR.Restore(); matSR.SetContext(&ctx);