Bug 1396025 - Write a comment to explain the difference between eBBoxIncludeFill/eBBoxIncludeStroke and eBBoxIncludeFillGeometry/eBBoxIncludeStrokeGeometry. draft
authorcku <cku@mozilla.com>
Sat, 02 Sep 2017 01:31:57 +0800
changeset 659435 197365ec53f900daac256de116bdbac9d38044d9
parent 659384 f64e2b4dcf5eec0b4ad456c149680a67b7c26dc4
child 729994 9d088d2f36cd38c7d84abdc9f9651f2034fd168e
push id78133
push userbmo:cku@mozilla.com
push dateWed, 06 Sep 2017 02:31:07 +0000
bugs1396025
milestone57.0a1
Bug 1396025 - Write a comment to explain the difference between eBBoxIncludeFill/eBBoxIncludeStroke and eBBoxIncludeFillGeometry/eBBoxIncludeStrokeGeometry. MozReview-Commit-ID: LD7uMh3D8vs
layout/svg/nsSVGUtils.h
--- a/layout/svg/nsSVGUtils.h
+++ b/layout/svg/nsSVGUtils.h
@@ -384,18 +384,22 @@ public:
    */
   static gfxMatrix AdjustMatrixForUnits(const gfxMatrix &aMatrix,
                                         nsSVGEnum *aUnits,
                                         nsIFrame *aFrame,
                                         uint32_t aFlags);
 
   enum BBoxFlags {
     eBBoxIncludeFill           = 1 << 0,
+    // Include the geometry of the fill even when the fill does not
+    // actually render (e.g. when fill="none" or fill-opacity="0")
     eBBoxIncludeFillGeometry   = 1 << 1,
     eBBoxIncludeStroke         = 1 << 2,
+    // Include the geometry of the stroke even when the stroke does not
+    // actually render (e.g. when stroke="none" or stroke-opacity="0")
     eBBoxIncludeStrokeGeometry = 1 << 3,
     eBBoxIncludeMarkers        = 1 << 4,
     eBBoxIncludeClipped        = 1 << 5,
     // Normally a getBBox call on outer-<svg> should only return the
     // bounds of the elements children. This flag will cause the
     // element's bounds to be returned instead.
     eUseFrameBoundsForOuterSVG = 1 << 6,
     // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect