mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Issue #2499 - Part 2: Fix overflow shorthand serialization for mixed clip values
This commit is contained in:
parent
ad396c6c59
commit
205ea844f4
2 changed files with 14 additions and 23 deletions
|
|
@ -1086,6 +1086,16 @@ Declaration::GetPropertyValueInternal(
|
|||
if (*xValue == *yValue) {
|
||||
xValue->AppendToString(eCSSProperty_overflow_x, aValue, aSerialization);
|
||||
} else {
|
||||
// Check if either value is clip - if so, shorthand cannot be serialized
|
||||
if (xValue->GetUnit() == eCSSUnit_Enumerated && yValue->GetUnit() == eCSSUnit_Enumerated) {
|
||||
int32_t xVal = xValue->GetIntValue();
|
||||
int32_t yVal = yValue->GetIntValue();
|
||||
if (xVal == NS_STYLE_OVERFLOW_CLIP || yVal == NS_STYLE_OVERFLOW_CLIP) {
|
||||
// When clip is mixed with other values, shorthand cannot be serialized
|
||||
aValue.Truncate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
xValue->AppendToString(eCSSProperty_overflow_x, aValue, aSerialization);
|
||||
aValue.Append(char16_t(' '));
|
||||
yValue->AppendToString(eCSSProperty_overflow_y, aValue, aSerialization);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue