mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Issue #2489: Add color-mix serialization support
This commit is contained in:
parent
7800eb0126
commit
b42cca5fa5
1 changed files with 22 additions and 0 deletions
|
|
@ -1731,6 +1731,28 @@ nsCSSValue::AppendToString(nsCSSPropertyID aProperty, nsAString& aResult,
|
|||
}
|
||||
serializable.AppendToString(aProperty, aResult, aSerialization);
|
||||
}
|
||||
else if (eCSSUnit_ColorMix == unit) {
|
||||
const ColorMixValue* colorMix = GetColorMixValue();
|
||||
aResult.AppendLiteral("color-mix(in ");
|
||||
|
||||
// append color space
|
||||
switch (colorMix->mColorSpace) {
|
||||
case eColorMixColorSpace_sRGB:
|
||||
aResult.AppendLiteral("srgb");
|
||||
break;
|
||||
case eColorMixColorSpace_HSL:
|
||||
aResult.AppendLiteral("hsl");
|
||||
break;
|
||||
}
|
||||
|
||||
// append color1 and color2
|
||||
aResult.AppendLiteral(", ");
|
||||
colorMix->mColor1.AppendToString(aProperty, aResult, aSerialization);
|
||||
aResult.AppendLiteral(", ");
|
||||
colorMix->mColor2.AppendToString(aProperty, aResult, aSerialization);
|
||||
|
||||
aResult.Append(')');
|
||||
}
|
||||
else if (eCSSUnit_URL == unit || eCSSUnit_Image == unit) {
|
||||
aResult.AppendLiteral("url(");
|
||||
nsStyleUtil::AppendEscapedCSSString(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue