Bug 1354772 - Part 3. Correct the comment in Layer::CalcDifference. draft
authorcku <cku@mozilla.com>
Tue, 11 Apr 2017 15:38:07 +0800
changeset 560487 25128973bb0b53a0ac468ce8f15c5961afd47a03
parent 560486 6bb071f15a708d3063438e4426a7f2badc6d4165
child 623711 924fa150c21a82e65494963eeffe780938098be1
push id53430
push userbmo:cku@mozilla.com
push dateTue, 11 Apr 2017 13:47:32 +0000
bugs1354772
milestone55.0a1
Bug 1354772 - Part 3. Correct the comment in Layer::CalcDifference. MozReview-Commit-ID: 34p6qqGO5R0
layout/style/nsStyleStruct.cpp
--- 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();
     }