Issue #2792 -Implements parsing, computed style, and writing mode mapping for overflow-block and overflow-inline properties

This commit is contained in:
MeladJM 2025-07-17 05:01:34 +08:00 committed by roytam1
commit 0903dacaa7
5 changed files with 103 additions and 0 deletions

View file

@ -6405,6 +6405,27 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct,
SETVAL_ENUMERATED | SETVAL_UNSET_INITIAL,
parentDisplay->mOverflowY,
NS_STYLE_OVERFLOW_VISIBLE);
// overflow-inline: enum, inherit, initial
// For simplicity, map overflow-inline to overflow-x for now (horizontal writing mode assumption)
const nsCSSValue* overflowInlineValue = aRuleData->ValueForOverflowInline();
if (overflowInlineValue->GetUnit() != eCSSUnit_Null) {
SetValue(*overflowInlineValue,
display->mOverflowX, conditions,
SETVAL_ENUMERATED | SETVAL_UNSET_INITIAL,
parentDisplay->mOverflowX,
NS_STYLE_OVERFLOW_VISIBLE);
}
// overflow-block: enum, inherit, initial
// For simplicity, map overflow-block to overflow-y for now (horizontal writing mode assumption)
const nsCSSValue* overflowBlockValue = aRuleData->ValueForOverflowBlock();
if (overflowBlockValue->GetUnit() != eCSSUnit_Null) {
SetValue(*overflowBlockValue,
display->mOverflowY, conditions,
SETVAL_ENUMERATED | SETVAL_UNSET_INITIAL,
parentDisplay->mOverflowY,
NS_STYLE_OVERFLOW_VISIBLE);
}
// The visible/clip values of overflow compute to auto/hidden (respectively)
// if one of overflow-x or overflow-y is neither visible nor clip.