зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1229739 - Use the color of shadow if available for drawing emphasis marks in shadow. r=jfkthame
--HG-- extra : source : 2e07c6f0480005fea6ea2c0343726baef39d1bc6
This commit is contained in:
Родитель
7b1c9931c6
Коммит
ba1aea5e03
|
@ -6218,6 +6218,7 @@ void
|
|||
nsTextFrame::DrawEmphasisMarks(gfxContext* aContext, WritingMode aWM,
|
||||
const gfxPoint& aTextBaselinePt,
|
||||
uint32_t aOffset, uint32_t aLength,
|
||||
const nscolor* aDecorationOverrideColor,
|
||||
PropertyProvider& aProvider)
|
||||
{
|
||||
auto info = static_cast<const EmphasisMarkInfo*>(
|
||||
|
@ -6227,8 +6228,8 @@ nsTextFrame::DrawEmphasisMarks(gfxContext* aContext, WritingMode aWM,
|
|||
return;
|
||||
}
|
||||
|
||||
nscolor color = nsLayoutUtils::
|
||||
GetColor(this, eCSSProperty_text_emphasis_color);
|
||||
nscolor color = aDecorationOverrideColor ? *aDecorationOverrideColor :
|
||||
nsLayoutUtils::GetColor(this, eCSSProperty_text_emphasis_color);
|
||||
aContext->SetColor(Color::FromABGR(color));
|
||||
gfxPoint pt(aTextBaselinePt);
|
||||
if (!aWM.IsVertical()) {
|
||||
|
@ -6747,7 +6748,8 @@ nsTextFrame::DrawTextRunAndDecorations(
|
|||
aAdvanceWidth, aDrawSoftHyphen, aContextPaint, aCallbacks);
|
||||
|
||||
// Emphasis marks
|
||||
DrawEmphasisMarks(aCtx, wm, aTextBaselinePt, aOffset, aLength, aProvider);
|
||||
DrawEmphasisMarks(aCtx, wm, aTextBaselinePt, aOffset, aLength,
|
||||
aDecorationOverrideColor, aProvider);
|
||||
|
||||
// Line-throughs
|
||||
for (uint32_t i = aDecorations.mStrikes.Length(); i-- > 0; ) {
|
||||
|
|
|
@ -446,6 +446,7 @@ public:
|
|||
mozilla::WritingMode aWM,
|
||||
const gfxPoint& aTextBaselinePt,
|
||||
uint32_t aOffset, uint32_t aLength,
|
||||
const nscolor* aDecorationOverrideColor,
|
||||
PropertyProvider& aProvider);
|
||||
|
||||
virtual nscolor GetCaretColorAt(int32_t aOffset) override;
|
||||
|
|
Загрузка…
Ссылка в новой задаче