Issue #2765 - Part 1: Scrollbar width should be treated as a non-inherited property

Note: non-inherited properties are stored in "reset" style structs.

Previous implementation treats it as an inherited property, which
doesn't match the spec.

This also fixes the incorrect behavior when using the `unset` value
for this property by specifying SETVAL_UNSET_INITIAL in the mask.
This commit is contained in:
Francis Dominic Fajardo 2025-06-25 15:42:59 +08:00 committed by roytam1
commit 8236eec152
7 changed files with 24 additions and 24 deletions

View file

@ -3302,7 +3302,7 @@ nsComputedDOMStyle::DoGetScrollbarWidth()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(
nsCSSProps::ValueToKeywordEnum(StyleUserInterface()->mScrollbarWidth,
nsCSSProps::ValueToKeywordEnum(StyleUIReset()->mScrollbarWidth,
nsCSSProps::kScrollbarWidthKTable));
return val.forget();
}