summaryrefslogtreecommitdiffstats
path: root/layout/style/nsRuleNode.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-01-13 00:25:23 +0000
committerMoonchild <moonchild@palemoon.org>2021-01-13 00:25:23 +0000
commit51581427794bb41142285bc837e9cf461d8abe7a (patch)
tree0be420e6bbd39dbdc889d341fa9a70300b3613c6 /layout/style/nsRuleNode.cpp
parent7023db88ca13046fda9204b018d8f48f10e44ec4 (diff)
parent0939fde1a45d757debf36394c5a76bfb0951b8d7 (diff)
downloadUXP-51581427794bb41142285bc837e9cf461d8abe7a.tar
UXP-51581427794bb41142285bc837e9cf461d8abe7a.tar.gz
UXP-51581427794bb41142285bc837e9cf461d8abe7a.tar.lz
UXP-51581427794bb41142285bc837e9cf461d8abe7a.tar.xz
UXP-51581427794bb41142285bc837e9cf461d8abe7a.zip
Merge pull request 'Add scrollbar-width CSS spec' (#1707) from 1705 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1707
Diffstat (limited to 'layout/style/nsRuleNode.cpp')
-rw-r--r--layout/style/nsRuleNode.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp
index 9721b4bed..04715aa99 100644
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -424,7 +424,7 @@ static nsSize CalcViewportUnitsScale(nsPresContext* aPresContext)
nsIScrollableFrame* scrollFrame =
aPresContext->PresShell()->GetRootScrollFrameAsScrollable();
if (scrollFrame) {
- ScrollbarStyles styles(scrollFrame->GetScrollbarStyles());
+ ScrollStyles styles(scrollFrame->GetScrollStyles());
if (styles.mHorizontal == NS_STYLE_OVERFLOW_SCROLL ||
styles.mVertical == NS_STYLE_OVERFLOW_SCROLL) {
@@ -1394,6 +1394,7 @@ struct SetEnumValueHelper
DEFINE_ENUM_CLASS_SETTER(StyleFillRule, Nonzero, Evenodd)
DEFINE_ENUM_CLASS_SETTER(StyleFloat, None, InlineEnd)
DEFINE_ENUM_CLASS_SETTER(StyleFloatEdge, ContentBox, MarginBox)
+ DEFINE_ENUM_CLASS_SETTER(StyleScrollbarWidth, Auto, None)
DEFINE_ENUM_CLASS_SETTER(StyleTextJustify, None, InterCharacter)
DEFINE_ENUM_CLASS_SETTER(StyleUserFocus, None, SelectMenu)
DEFINE_ENUM_CLASS_SETTER(StyleUserSelect, None, MozText)
@@ -5235,6 +5236,14 @@ nsRuleNode::ComputeUserInterfaceData(void* aStartStruct,
// caret-color: auto, color, inherit
setComplexColor(aRuleData->ValueForCaretColor(),
&nsStyleUserInterface::mCaretColor);
+
+ // scrollbar-width: auto, thin, none
+ SetValue(*aRuleData->ValueForScrollbarWidth(),
+ ui->mScrollbarWidth,
+ conditions,
+ SETVAL_ENUMERATED,
+ parentUI->mScrollbarWidth,
+ StyleScrollbarWidth::Auto);
COMPUTE_END_INHERITED(UserInterface, ui)
}