summaryrefslogtreecommitdiff
path: root/layout/style/nsStyleStruct.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-01-06 23:57:26 +0000
committerMoonchild <moonchild@palemoon.org>2021-01-06 23:57:26 +0000
commit65da2431f9ee9711e971002ae17043c1a3d36a3f (patch)
treec461f5694d915ce1dfa5151f2d655162afbf4c81 /layout/style/nsStyleStruct.cpp
parent0e6a9cc60aeb754e00e466ce20052d2fa9ccb7f9 (diff)
downloaduxp-65da2431f9ee9711e971002ae17043c1a3d36a3f.tar.gz
Issue #1705 - Part 4: Add scrollbar-width CSS keyword to CSS parser.
This should be all parts needed to add a brand new enum keyword including getting the computed style from it...
Diffstat (limited to 'layout/style/nsStyleStruct.cpp')
-rw-r--r--layout/style/nsStyleStruct.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp
index d2d89a57da..acf287ea8a 100644
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -4024,6 +4024,7 @@ nsStyleUserInterface::nsStyleUserInterface(StyleStructContext aContext)
, mPointerEvents(NS_STYLE_POINTER_EVENTS_AUTO)
, mCursor(NS_STYLE_CURSOR_AUTO)
, mCaretColor(StyleComplexColor::Auto())
+ , mScrollbarWidth(StyleScrollbarWidth::Auto)
{
MOZ_COUNT_CTOR(nsStyleUserInterface);
}
@@ -4036,6 +4037,7 @@ nsStyleUserInterface::nsStyleUserInterface(const nsStyleUserInterface& aSource)
, mCursor(aSource.mCursor)
, mCursorImages(aSource.mCursorImages)
, mCaretColor(aSource.mCaretColor)
+ , mScrollbarWidth(aSource.mScrollbarWidth)
{
MOZ_COUNT_CTOR(nsStyleUserInterface);
}
@@ -4087,6 +4089,13 @@ nsStyleUserInterface::CalcDifference(const nsStyleUserInterface& aNewData) const
if (mCaretColor != aNewData.mCaretColor) {
hint |= nsChangeHint_RepaintFrame;
}
+
+ if (mScrollbarWidth != aNewData.mScrollbarWidth) {
+ // For scrollbar-width change, we need some special handling similar
+ // to overflow properties. Specifically, we may need to reconstruct
+ // the scrollbar or force reflow of the viewport scrollbar.
+ hint |= nsChangeHint_ScrollbarChange;
+ }
return hint;
}