Bug 1269971 - Part 4. Add text stroke into text mask. r=jfkthame, a=sylvestre
authorCJKu <cku@mozilla.com>
Fri, 20 May 2016 12:03:00 +0200
changeset 332999 1af0ed7b52bc1af6291370fa2f32e3c452a6a0cf
parent 332998 57da1748138048510b340880b24eb91b2060a642
child 333000 da5910798bf1ab9526fc41696c0b200679caa517
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame, sylvestre
bugs1269971
milestone48.0a2
Bug 1269971 - Part 4. Add text stroke into text mask. r=jfkthame, a=sylvestre
layout/generic/nsTextFrame.cpp
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -6608,17 +6608,19 @@ nsTextFrame::PaintText(const PaintTextPa
                             ? NS_RGBA(0, 0, 0, 255)
                             : textPaintStyle.GetTextColor();
   if (aOpacity != 1.0f) {
     gfx::Color gfxColor = gfx::Color::FromABGR(foregroundColor);
     gfxColor.a *= aOpacity;
     foregroundColor = gfxColor.ToABGR();
   }
 
-  nscolor textStrokeColor = textPaintStyle.GetWebkitTextStrokeColor();
+  nscolor textStrokeColor = aParams.generateTextMask
+                            ? NS_RGBA(0, 0, 0, 255)
+                            : textPaintStyle.GetWebkitTextStrokeColor();
   if (aOpacity != 1.0f) {
     gfx::Color gfxColor = gfx::Color::FromABGR(textStrokeColor);
     gfxColor.a *= aOpacity;
     textStrokeColor = gfxColor.ToABGR();
   }
 
   range = Range(startOffset, startOffset + maxLength);
   if (!aParams.callbacks) {