зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1917715 - Don't use nsLayoutUtils::GetColor for SVG rects. r=dholbert
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:
Родитель
385383c90c
Коммит
4395828697
|
@ -764,11 +764,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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче