Bug 1460682 - nsSelectionStyle::mUnderlineStyle should be compared against NS_STYLE_TEXT_DECORATION_STYLE_NONE r=dbaron
authorKristen Wright <kwright@mozilla.com>
Thu, 10 May 2018 10:55:47 -0700
changeset 418166 a5e82df2064191211edf514520e8f9aa37fe9d3d
parent 418165 5c258f15c012873c5aacedd06d04ef650038a584
child 418167 cc0781a786348335c8eba7e2e979239ffb9ac577
child 418220 a382f8feaba41f1cb1cee718f8815cd672c10f3c
push id103250
push usererahm@mozilla.com
push dateMon, 14 May 2018 18:23:12 +0000
treeherdermozilla-inbound@a5e82df20641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1460682
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1460682 - nsSelectionStyle::mUnderlineStyle should be compared against NS_STYLE_TEXT_DECORATION_STYLE_NONE r=dbaron Removed comparison to NS_STYLE_BORDER_STYLE_NONE and replaced with NS_STYLE_TEXT_DECORATION_STYLE_NONE
layout/generic/nsTextFrame.cpp
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -3983,17 +3983,17 @@ nsTextPaintStyle::GetSelectionUnderlineF
                                                 float*   aRelativeSize,
                                                 uint8_t* aStyle)
 {
   NS_ASSERTION(aLineColor, "aLineColor is null");
   NS_ASSERTION(aRelativeSize, "aRelativeSize is null");
   NS_ASSERTION(aIndex >= 0 && aIndex < 5, "Index out of range");
 
   nsSelectionStyle* selectionStyle = GetSelectionStyle(aIndex);
-  if (selectionStyle->mUnderlineStyle == NS_STYLE_BORDER_STYLE_NONE ||
+  if (selectionStyle->mUnderlineStyle == NS_STYLE_TEXT_DECORATION_STYLE_NONE ||
       selectionStyle->mUnderlineColor == NS_TRANSPARENT ||
       selectionStyle->mUnderlineRelativeSize <= 0.0f)
     return false;
 
   *aLineColor = selectionStyle->mUnderlineColor;
   *aRelativeSize = selectionStyle->mUnderlineRelativeSize;
   *aStyle = selectionStyle->mUnderlineStyle;
   return true;