mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 791434 - Paint text shadows with the right alpha. r=roc
This commit is contained in:
parent
ab06fe89b0
commit
3da514a5cf
@ -5319,7 +5319,7 @@ nsTextFrame::PaintOneShadow(uint32_t aOffset, uint32_t aLength,
|
||||
}
|
||||
|
||||
aCtx->Save();
|
||||
aCtx->NewPath();
|
||||
aCtx->NewPath();
|
||||
aCtx->SetColor(gfxRGBA(shadowColor));
|
||||
|
||||
// Draw the text onto our alpha-only surface to capture the alpha values.
|
||||
@ -5330,8 +5330,10 @@ nsTextFrame::PaintOneShadow(uint32_t aOffset, uint32_t aLength,
|
||||
aDirtyRect.width, aDirtyRect.height);
|
||||
DrawText(shadowContext, dirtyRect, aFramePt + shadowOffset,
|
||||
aTextBaselinePt + shadowOffset, aOffset, aLength, *aProvider,
|
||||
nsTextPaintStyle(this), shadowColor, aClipEdges, advanceWidth,
|
||||
(GetStateBits() & TEXT_HYPHEN_BREAK) != 0, decorationOverrideColor);
|
||||
nsTextPaintStyle(this),
|
||||
aCtx == shadowContext ? shadowColor : NS_RGB(0, 0, 0), aClipEdges,
|
||||
advanceWidth, (GetStateBits() & TEXT_HYPHEN_BREAK) != 0,
|
||||
decorationOverrideColor);
|
||||
|
||||
contextBoxBlur.DoPaint();
|
||||
aCtx->Restore();
|
||||
|
2
layout/reftests/text-shadow/basic-opacity-ref.html
Normal file
2
layout/reftests/text-shadow/basic-opacity-ref.html
Normal file
@ -0,0 +1,2 @@
|
||||
<div style="position: absolute; top: 33px; left: 33px; color: rgba(0, 0, 255, 0.2); z-index: 0;">Hello</div>
|
||||
<div style="position: absolute; top: 30px; left: 30px; color: green; z-index: 1;">Hello</div>
|
1
layout/reftests/text-shadow/basic-opacity.html
Normal file
1
layout/reftests/text-shadow/basic-opacity.html
Normal file
@ -0,0 +1 @@
|
||||
<div style="position: absolute; top: 30px; left: 30px; color: green; text-shadow: rgba(0, 0, 255, 0.2) 3px 3px;">Hello</div>
|
7
layout/reftests/text-shadow/blur-opacity-ref.html
Normal file
7
layout/reftests/text-shadow/blur-opacity-ref.html
Normal file
@ -0,0 +1,7 @@
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: Ahem;
|
||||
src: url(../fonts/Ahem.ttf);
|
||||
}
|
||||
</style>
|
||||
<div style="font: 16px Ahem; color: transparent; text-shadow: blue 4px 4px 2px; opacity: 0.5">a</div>
|
7
layout/reftests/text-shadow/blur-opacity.html
Normal file
7
layout/reftests/text-shadow/blur-opacity.html
Normal file
@ -0,0 +1,7 @@
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: Ahem;
|
||||
src: url(../fonts/Ahem.ttf);
|
||||
}
|
||||
</style>
|
||||
<div style="font: 16px Ahem; color: transparent; text-shadow: rgba(0, 0, 255, 0.5) 4px 4px 2px">a</div>
|
@ -3,9 +3,11 @@ random-if(Android) == basic-negcoord.xul basic-negcoord-ref.xul
|
||||
!= blur.xul blur-notref.xul
|
||||
== color-inherit.xul color-inherit-ref.xul
|
||||
== multiple-noblur.xul multiple-noblur-ref.xul
|
||||
fuzzy(1,488) HTTP(..) == blur-opacity.html blur-opacity-ref.html
|
||||
|
||||
== basic.html basic-ref.html
|
||||
== basic-negcoord.html basic-negcoord-ref.html
|
||||
== basic-opacity.html basic-opacity-ref.html
|
||||
!= blur.html blur-notref.html
|
||||
== color-inherit.html color-inherit-ref.html
|
||||
== color-parserorder.html color-parserorder-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user