mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-02 22:08:40 +09:00
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...
This commit is contained in:
parent
21f707390d
commit
8e08d8bfd3
14 changed files with 72 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue