Bug 1219833 - Respect composition underline color; r=masayuki

nsTextFrame didn't use the composition underline color if the
composition didn't have a foreground color defined. This patch makes it
use the underline color if foreground color is not defined.
This commit is contained in:
Jim Chen
2015-11-03 11:53:58 -05:00
parent 7f71cb5c1e
commit d4fa2af7fa

View File

@@ -5407,8 +5407,8 @@ nsTextFrame::DrawSelectionDecorations(gfxContext* aContext,
// If underline color is defined and that doesn't depend on the
// foreground color, we should use the color directly.
if (aRangeStyle.IsUnderlineColorDefined() &&
aRangeStyle.IsForegroundColorDefined() &&
aRangeStyle.mUnderlineColor != aRangeStyle.mForegroundColor) {
(!aRangeStyle.IsForegroundColorDefined() ||
aRangeStyle.mUnderlineColor != aRangeStyle.mForegroundColor)) {
color = aRangeStyle.mUnderlineColor;
}
// If foreground color or background color is defined, the both colors