mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Issue #2499 - Part 3: Add CSS clip overflow support with serialization fixes
This commit is contained in:
parent
205ea844f4
commit
5e8e1208e7
40 changed files with 144 additions and 97 deletions
|
|
@ -1087,10 +1087,17 @@ Declaration::GetPropertyValueInternal(
|
|||
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) {
|
||||
if (xValue->GetUnit() == eCSSUnit_Enumerated) {
|
||||
int32_t xVal = xValue->GetIntValue();
|
||||
if (xVal == NS_STYLE_OVERFLOW_CLIP) {
|
||||
// When clip is mixed with other values, shorthand cannot be serialized
|
||||
aValue.Truncate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (yValue->GetUnit() == eCSSUnit_Enumerated) {
|
||||
int32_t yVal = yValue->GetIntValue();
|
||||
if (xVal == NS_STYLE_OVERFLOW_CLIP || yVal == NS_STYLE_OVERFLOW_CLIP) {
|
||||
if (yVal == NS_STYLE_OVERFLOW_CLIP) {
|
||||
// When clip is mixed with other values, shorthand cannot be serialized
|
||||
aValue.Truncate();
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue