Backed out changeset 51cd668c0e87 (
bug 1459890) dev request a=backout CLOSED TREE
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2705,18 +2705,17 @@ ComputeClipForMaskItem(nsDisplayListBuil
Rect result = nsCSSClipPathInstance::GetBoundingRectForBasicShapeClip(
aMaskedFrame, svgReset->mClipPath);
combinedClip = Some(ThebesRect(result));
} else if (maskUsage.shouldApplyClipPath) {
gfxRect result = nsSVGUtils::GetBBox(aMaskedFrame,
nsSVGUtils::eBBoxIncludeClipped |
nsSVGUtils::eBBoxIncludeFill |
nsSVGUtils::eBBoxIncludeMarkers |
- nsSVGUtils::eBBoxIncludeStroke |
- nsSVGUtils::eDoNotClipToBBoxOfContentInsideClipPath);
+ nsSVGUtils::eBBoxIncludeStroke);
combinedClip = Some(cssToDevMatrix.TransformBounds(result));
} else {
// The code for this case is adapted from ComputeMaskGeometry().
nsRect borderArea(toReferenceFrame, aMaskedFrame->GetSize());
borderArea -= offsetToUserSpace;
// Use an infinite dirty rect to pass into nsCSSRendering::
deleted file mode 100644
--- a/layout/reftests/svg/blur-inside-clipPath-ref.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="786" viewBox="0,0,512,512">
- <defs>
- <filter id="filter-wVmTgUOU" filterUnits="objectBoundingBox" x="-30%" y="-30%" width="160%" height="170%" color-interpolation-filters="sRGB">
- <feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0" in="SourceGraphic"/>
- <feOffset dy="28"/>
- <feGaussianBlur stdDeviation="18.67" result="blur1"/>
- </filter>
- </defs>
- <g filter="url(#filter-wVmTgUOU)">
- <rect x="58.88" y="58.88" width="394.24" height="394.24" color="#07773e" fill="red"/>
- </g>
-</svg>
deleted file mode 100644
--- a/layout/reftests/svg/blur-inside-clipPath.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="786" viewBox="0,0,512,512">
- <defs>
- <clipPath id="clip-vXP8Ybe5">
- <path d="M0,512v-512h512v512z"/>
- </clipPath>
- <filter id="filter-wVmTgUOU" filterUnits="objectBoundingBox" x="-30%" y="-30%" width="160%" height="170%" color-interpolation-filters="sRGB">
- <feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0" in="SourceGraphic"/>
- <feOffset dy="28"/>
- <feGaussianBlur stdDeviation="18.67" result="blur1"/>
- </filter>
- </defs>
- <g clip-path="url(#clip-vXP8Ybe5)">
- <g filter="url(#filter-wVmTgUOU)">
- <rect x="58.88" y="58.88" width="394.24" height="394.24" color="#07773e" fill="red"/>
- </g>
- </g>
-</svg>
--- a/layout/reftests/svg/reftest.list
+++ b/layout/reftests/svg/reftest.list
@@ -50,18 +50,16 @@ skip-if(Android) pref(layout.css.mix-ble
skip-if(Android) pref(layout.css.mix-blend-mode.enabled,true) == blend-multiply.svg blend-multiply-ref.svg
pref(layout.css.mix-blend-mode.enabled,true) == blend-normal.svg blend-normal-ref.svg
#skip-if(Android) pref(layout.css.mix-blend-mode.enabled,true) == blend-overlay.svg blend-overlay-ref.svg
#skip-if(Android) pref(layout.css.mix-blend-mode.enabled,true) == blend-saturation.svg blend-saturation-ref.svg
#skip-if(Android) pref(layout.css.mix-blend-mode.enabled,true) == blend-screen.svg blend-screen-ref.svg
#skip-if(Android) pref(layout.css.mix-blend-mode.enabled,true) == blend-soft-light.svg blend-soft-light-ref.svg
skip-if(Android) pref(layout.css.mix-blend-mode.enabled,true) fails-if(webrender) == blend-difference-stacking.html blend-difference-stacking-ref.html
-fuzzy(11,6410) == blur-inside-clipPath.svg blur-inside-clipPath-ref.svg
-
== border-radius-01.html pass.svg
== clip-01.svg pass.svg
== clip-02a.svg clip-02-ref.svg
== clip-02b.svg clip-02-ref.svg
== clip-surface-clone-01.svg clip-surface-clone-01-ref.svg
== clip-use-element-01.svg pass.svg
== clip-use-element-02.svg pass.svg
--- a/layout/svg/nsSVGClipPathFrame.cpp
+++ b/layout/svg/nsSVGClipPathFrame.cpp
@@ -470,18 +470,17 @@ nsSVGClipPathFrame::GetClipPathTransform
: 0);
return nsSVGUtils::AdjustMatrixForUnits(tm, clipPathUnits,
aClippedFrame, flags);
}
SVGBBox
nsSVGClipPathFrame::GetBBoxForClipPathFrame(const SVGBBox &aBBox,
- const gfxMatrix &aMatrix,
- uint32_t aFlags)
+ const gfxMatrix &aMatrix)
{
nsIContent* node = GetContent()->GetFirstChild();
SVGBBox unionBBox, tmpBBox;
for (; node; node = node->GetNextSibling()) {
nsSVGElement* svgNode = static_cast<nsSVGElement*>(node);
nsIFrame* frame = svgNode->GetPrimaryFrame();
if (frame) {
nsSVGDisplayableFrame* svg = do_QueryFrame(frame);
@@ -490,34 +489,32 @@ nsSVGClipPathFrame::GetBBoxForClipPathFr
tmpBBox = svg->GetBBoxContribution(mozilla::gfx::ToMatrix(matrix),
nsSVGUtils::eBBoxIncludeFill);
SVGObserverUtils::EffectProperties effectProperties =
SVGObserverUtils::GetEffectProperties(frame);
if (effectProperties.HasNoOrValidClipPath()) {
nsSVGClipPathFrame *clipPathFrame =
effectProperties.GetClipPathFrame();
if (clipPathFrame) {
- tmpBBox = clipPathFrame->GetBBoxForClipPathFrame(tmpBBox, aMatrix, aFlags);
+ tmpBBox = clipPathFrame->GetBBoxForClipPathFrame(tmpBBox, aMatrix);
}
}
- if (!(aFlags & nsSVGUtils::eDoNotClipToBBoxOfContentInsideClipPath)) {
- tmpBBox.Intersect(aBBox);
- }
+ tmpBBox.Intersect(aBBox);
unionBBox.UnionEdges(tmpBBox);
}
}
}
SVGObserverUtils::EffectProperties props =
SVGObserverUtils::GetEffectProperties(this);
if (props.mClipPath) {
if (props.HasInvalidClipPath()) {
unionBBox = SVGBBox();
} else {
nsSVGClipPathFrame *clipPathFrame = props.GetClipPathFrame();
if (clipPathFrame) {
- tmpBBox = clipPathFrame->GetBBoxForClipPathFrame(aBBox, aMatrix, aFlags);
+ tmpBBox = clipPathFrame->GetBBoxForClipPathFrame(aBBox, aMatrix);
unionBBox.Intersect(tmpBBox);
}
}
}
return unionBBox;
}
--- a/layout/svg/nsSVGClipPathFrame.h
+++ b/layout/svg/nsSVGClipPathFrame.h
@@ -127,18 +127,17 @@ public:
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override
{
return MakeFrameName(NS_LITERAL_STRING("SVGClipPath"), aResult);
}
#endif
SVGBBox GetBBoxForClipPathFrame(const SVGBBox& aBBox,
- const gfxMatrix& aMatrix,
- uint32_t aFlags);
+ const gfxMatrix& aMatrix);
/**
* If the clipPath element transforms its children due to
* clipPathUnits="objectBoundingBox" being set on it and/or due to the
* 'transform' attribute being set on it, this function returns the resulting
* transform.
*/
gfxMatrix GetClipPathTransform(nsIFrame* aClippedFrame);
--- a/layout/svg/nsSVGUtils.cpp
+++ b/layout/svg/nsSVGUtils.cpp
@@ -1176,17 +1176,17 @@ nsSVGUtils::GetBBox(nsIFrame* aFrame, ui
if (clipContent->IsUnitsObjectBoundingBox()) {
matrix.PreTranslate(gfxPoint(x, y));
matrix.PreScale(width, height);
} else if (aFrame->IsSVGForeignObjectFrame()) {
matrix = gfxMatrix();
}
matrix = clipContent->PrependLocalTransformsTo(matrix, eUserSpaceToParent);
bbox =
- clipPathFrame->GetBBoxForClipPathFrame(bbox, matrix, aFlags).ToThebesRect();
+ clipPathFrame->GetBBoxForClipPathFrame(bbox, matrix).ToThebesRect();
}
if (hasClip) {
bbox = bbox.Intersect(clipRect);
}
if (bbox.IsEmpty()) {
bbox = gfxRect(0, 0, 0, 0);
--- a/layout/svg/nsSVGUtils.h
+++ b/layout/svg/nsSVGUtils.h
@@ -407,19 +407,16 @@ public:
// given frame, instead of all continuations of it, while computing bbox if
// this flag is set.
eIncludeOnlyCurrentFrameForNonSVGElement = 1 << 8,
// This flag is only has an effect when the target is a <use> element.
// getBBox returns the bounds of the elements children in user space if
// this flag is set; Otherwise, getBBox returns the union bounds in
// the coordinate system formed by the <use> element.
eUseUserSpaceOfUseElement = 1 << 9,
- // For a frame with a clip-path, if this flag is set then the result
- // will not be clipped to the bbox of the content inside the clip-path.
- eDoNotClipToBBoxOfContentInsideClipPath = 1 << 10,
};
/**
* This function in primarily for implementing the SVG DOM function getBBox()
* and the SVG attribute value 'objectBoundingBox'. However, it has been
* extended with various extra parameters in order to become more of a
* general purpose getter of all sorts of bounds that we might need to obtain
* for SVG elements, or even for other elements that have SVG effects applied
* to them.