Bug 1354772 - Part 3. Correct the comment in Layer::CalcDifference.
MozReview-Commit-ID: 34p6qqGO5R0
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -3010,27 +3010,28 @@ nsStyleImageLayers::Layer::operator==(co
nsChangeHint
nsStyleImageLayers::Layer::CalcDifference(const nsStyleImageLayers::Layer& aNewLayer) const
{
nsChangeHint hint = nsChangeHint(0);
if (!DefinitelyEqualURIs(mImage.GetURLValue(),
aNewLayer.mImage.GetURLValue())) {
hint |= nsChangeHint_RepaintFrame | nsChangeHint_UpdateEffects;
- // If Layer::mSourceURI links to a SVG mask, it has a fragment. Not vice
- // versa. Here are examples of URI contains a fragment, two of them link
- // to a SVG mask:
+ // If mImage links to an SVG mask, the URL in mImage must have a fragment.
+ // Not vice versa.
+ // Here are examples of URI contains a fragment, two of them link to an
+ // SVG mask:
// mask:url(a.svg#maskID); // The fragment of this URI is an ID of a mask
// // element in a.svg.
// mask:url(#localMaskID); // The fragment of this URI is an ID of a mask
// // element in local document.
// mask:url(b.svg#viewBoxID); // The fragment of this URI is an ID of a
// // viewbox defined in b.svg.
- // That is, if mSourceURI has a fragment, it may link to a SVG mask; If
- // not, it "must" not link to a SVG mask.
+ // That is, if the URL in mImage has a fragment, it may link to an SVG
+ // mask; If not, it "must" not link to an SVG mask.
bool maybeSVGMask = false;
if (mImage.GetURLValue()) {
maybeSVGMask = mImage.GetURLValue()->MightHaveRef();
}
if (!maybeSVGMask && aNewLayer.mImage.GetURLValue()) {
maybeSVGMask = aNewLayer.mImage.GetURLValue()->MightHaveRef();
}