forked from mirrors/gecko-dev
Bug 1917715 - Don't use nsLayoutUtils::GetColor for SVG rects. r=dholbert a=RyanVM
It's intended for text colors only (and it applies auto-darkening in printing), see nsLayoutUtils::DarkenColorIfNeeded. Differential Revision: https://phabricator.services.mozilla.com/D221556
This commit is contained in:
parent
c04809b521
commit
21cd293b93
1 changed files with 3 additions and 5 deletions
|
|
@ -783,11 +783,9 @@ bool SVGGeometryFrame::CreateWebRenderCommands(
|
|||
float fillOpacity = SVGUtils::GetOpacity(style->mFillOpacity, contextPaint);
|
||||
float opacity = elemOpacity * fillOpacity;
|
||||
|
||||
auto c = nsLayoutUtils::GetColor(this, &nsStyleSVG::mFill);
|
||||
wr::ColorF color{
|
||||
((float)NS_GET_R(c)) / 255.0f, ((float)NS_GET_G(c)) / 255.0f,
|
||||
((float)NS_GET_B(c)) / 255.0f, ((float)NS_GET_A(c)) / 255.0f * opacity};
|
||||
|
||||
auto color = wr::ToColorF(
|
||||
ToDeviceColor(StyleSVG()->mFill.kind.AsColor().CalcColor(this)));
|
||||
color.a *= opacity;
|
||||
aBuilder.PushRect(wrRect, wrRect, !aItem->BackfaceIsHidden(), true, false,
|
||||
color);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue