зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1387594
- Set the font smoothing background color based on the -moz-font-smoothing-background-color property. r=mattwoodrow
MozReview-Commit-ID: B3PVIvMswf8
This commit is contained in:
Родитель
b5fdbfc62c
Коммит
ae927d3f44
|
@ -7280,7 +7280,10 @@ nsTextFrame::PaintText(const PaintTextParams& aParams,
|
|||
params.drawSoftHyphen = (GetStateBits() & TEXT_HYPHEN_BREAK) != 0;
|
||||
params.contextPaint = aParams.contextPaint;
|
||||
params.callbacks = aParams.callbacks;
|
||||
aParams.context->SetFontSmoothingBackgroundColor(
|
||||
Color::FromABGR(StyleUserInterface()->mFontSmoothingBackgroundColor));
|
||||
DrawText(range, textBaselinePt, params);
|
||||
aParams.context->SetFontSmoothingBackgroundColor(Color());
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -526,6 +526,8 @@ nsTextBoxFrame::DrawText(gfxContext& aRenderingContext,
|
|||
nscolor c = aOverrideColor ? *aOverrideColor : StyleColor()->mColor;
|
||||
ColorPattern color(ToDeviceColor(c));
|
||||
aRenderingContext.SetColor(Color::FromABGR(c));
|
||||
aRenderingContext.SetFontSmoothingBackgroundColor(
|
||||
Color::FromABGR(StyleUserInterface()->mFontSmoothingBackgroundColor));
|
||||
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
|
@ -597,6 +599,8 @@ nsTextBoxFrame::DrawText(gfxContext& aRenderingContext,
|
|||
params.style = strikeStyle;
|
||||
nsCSSRendering::PaintDecorationLine(this, *drawTarget, params);
|
||||
}
|
||||
|
||||
aRenderingContext.SetFontSmoothingBackgroundColor(Color());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -3059,6 +3059,8 @@ nsTreeBodyFrame::PaintRow(int32_t aRowIndex,
|
|||
|
||||
// Save the current font smoothing background color in case we change it.
|
||||
Color originalColor(aRenderingContext.GetFontSmoothingBackgroundColor());
|
||||
aRenderingContext.SetFontSmoothingBackgroundColor(
|
||||
ToDeviceColor(rowContext->StyleUserInterface()->mFontSmoothingBackgroundColor));
|
||||
if (theme && theme->ThemeSupportsWidget(aPresContext, nullptr, appearance)) {
|
||||
nsRect dirty;
|
||||
dirty.IntersectRect(rowRect, aDirtyRect);
|
||||
|
|
Загрузка…
Ссылка в новой задаче