Bug 1094163 - Rename nsSVGUtils::GetOpacity's aOuterContextPaint argument to avoid confusion. r=longsonr
authorJonathan Watt <jwatt@jwatt.org>
Thu, 06 Nov 2014 22:07:36 +0000
changeset 214530 0d90295e6ed22a93026d9ca68d12d5fcaaa919c3
parent 214529 03be055662c82c8d1e97fdc55708b8647545ba5f
child 214531 661c58109d160915ac78b7f4f007d372d1a9089d
push id9836
push usercbook@mozilla.com
push dateFri, 07 Nov 2014 14:08:12 +0000
treeherderfx-team@ff5690722403 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslongsonr
bugs1094163
milestone36.0a1
Bug 1094163 - Rename nsSVGUtils::GetOpacity's aOuterContextPaint argument to avoid confusion. r=longsonr
layout/svg/nsSVGUtils.cpp
layout/svg/nsSVGUtils.h
--- a/layout/svg/nsSVGUtils.cpp
+++ b/layout/svg/nsSVGUtils.cpp
@@ -1354,35 +1354,35 @@ nsSVGUtils::MakeStrokePatternFor(nsIFram
                                                       &nsStyleSVG::mStroke)));
   color.a *= opacity;
   aOutPattern->InitColorPattern(ToDeviceColor(color));
 }
 
 /* static */ float
 nsSVGUtils::GetOpacity(nsStyleSVGOpacitySource aOpacityType,
                        const float& aOpacity,
-                       gfxTextContextPaint *aOuterContextPaint)
+                       gfxTextContextPaint *aContextPaint)
 {
   float opacity = 1.0f;
   switch (aOpacityType) {
   case eStyleSVGOpacitySource_Normal:
     opacity = aOpacity;
     break;
   case eStyleSVGOpacitySource_ContextFillOpacity:
-    if (aOuterContextPaint) {
-      opacity = aOuterContextPaint->GetFillOpacity();
+    if (aContextPaint) {
+      opacity = aContextPaint->GetFillOpacity();
     } else {
-      NS_WARNING("context-fill-opacity used outside of an SVG glyph");
+      NS_WARNING("Content used context-fill-opacity when not in a context element");
     }
     break;
   case eStyleSVGOpacitySource_ContextStrokeOpacity:
-    if (aOuterContextPaint) {
-      opacity = aOuterContextPaint->GetStrokeOpacity();
+    if (aContextPaint) {
+      opacity = aContextPaint->GetStrokeOpacity();
     } else {
-      NS_WARNING("context-stroke-opacity used outside of an SVG glyph");
+      NS_WARNING("Content used context-stroke-opacity when not in a context element");
     }
     break;
   default:
     NS_NOTREACHED("Unknown object opacity inheritance type for SVG glyph");
   }
   return opacity;
 }
 
--- a/layout/svg/nsSVGUtils.h
+++ b/layout/svg/nsSVGUtils.h
@@ -498,17 +498,17 @@ public:
   static void
   MakeStrokePatternFor(nsIFrame* aFrame,
                        gfxContext* aContext,
                        GeneralPattern* aOutPattern,
                        gfxTextContextPaint *aContextPaint = nullptr);
 
   static float GetOpacity(nsStyleSVGOpacitySource aOpacityType,
                           const float& aOpacity,
-                          gfxTextContextPaint *aOuterContextPaint);
+                          gfxTextContextPaint *aContextPaint);
 
   /*
    * @return false if there is no stroke
    */
   static bool HasStroke(nsIFrame* aFrame,
                         gfxTextContextPaint *aContextPaint = nullptr);
 
   static float GetStrokeWidth(nsIFrame* aFrame,