mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 951793 - Add overscroll-behavior attributes to ScrollbarStyles. r=mstange
MozReview-Commit-ID: 7fksMZdDSrG
This commit is contained in:
parent
978ae3283a
commit
4554e0cd08
@ -13,6 +13,8 @@ namespace mozilla {
|
||||
const nsStyleDisplay* aDisplay)
|
||||
: mHorizontal(aH), mVertical(aV),
|
||||
mScrollBehavior(aDisplay->mScrollBehavior),
|
||||
mOverscrollBehaviorX(aDisplay->mOverscrollBehaviorX),
|
||||
mOverscrollBehaviorY(aDisplay->mOverscrollBehaviorY),
|
||||
mScrollSnapTypeX(aDisplay->mScrollSnapTypeX),
|
||||
mScrollSnapTypeY(aDisplay->mScrollSnapTypeY),
|
||||
mScrollSnapPointsX(aDisplay->mScrollSnapPointsX),
|
||||
@ -23,6 +25,8 @@ namespace mozilla {
|
||||
ScrollbarStyles::ScrollbarStyles(const nsStyleDisplay* aDisplay)
|
||||
: mHorizontal(aDisplay->mOverflowX), mVertical(aDisplay->mOverflowY),
|
||||
mScrollBehavior(aDisplay->mScrollBehavior),
|
||||
mOverscrollBehaviorX(aDisplay->mOverscrollBehaviorX),
|
||||
mOverscrollBehaviorY(aDisplay->mOverscrollBehaviorY),
|
||||
mScrollSnapTypeX(aDisplay->mScrollSnapTypeX),
|
||||
mScrollSnapTypeY(aDisplay->mScrollSnapTypeY),
|
||||
mScrollSnapPointsX(aDisplay->mScrollSnapPointsX),
|
||||
|
@ -26,6 +26,8 @@ struct ScrollbarStyles
|
||||
// Always one of NS_STYLE_SCROLL_BEHAVIOR_AUTO or
|
||||
// NS_STYLE_SCROLL_BEHAVIOR_SMOOTH
|
||||
uint8_t mScrollBehavior;
|
||||
mozilla::StyleOverscrollBehavior mOverscrollBehaviorX;
|
||||
mozilla::StyleOverscrollBehavior mOverscrollBehaviorY;
|
||||
// Always one of NS_STYLE_SCROLL_SNAP_NONE, NS_STYLE_SCROLL_SNAP_MANDATORY,
|
||||
// or NS_STYLE_SCROLL_SNAP_PROXIMITY.
|
||||
uint8_t mScrollSnapTypeX;
|
||||
@ -38,6 +40,8 @@ struct ScrollbarStyles
|
||||
ScrollbarStyles(uint8_t aH, uint8_t aV)
|
||||
: mHorizontal(aH), mVertical(aV),
|
||||
mScrollBehavior(NS_STYLE_SCROLL_BEHAVIOR_AUTO),
|
||||
mOverscrollBehaviorX(StyleOverscrollBehavior::Auto),
|
||||
mOverscrollBehaviorY(StyleOverscrollBehavior::Auto),
|
||||
mScrollSnapTypeX(NS_STYLE_SCROLL_SNAP_TYPE_NONE),
|
||||
mScrollSnapTypeY(NS_STYLE_SCROLL_SNAP_TYPE_NONE),
|
||||
mScrollSnapPointsX(nsStyleCoord(eStyleUnit_None)),
|
||||
@ -56,6 +60,8 @@ struct ScrollbarStyles
|
||||
bool operator==(const ScrollbarStyles& aStyles) const {
|
||||
return aStyles.mHorizontal == mHorizontal && aStyles.mVertical == mVertical &&
|
||||
aStyles.mScrollBehavior == mScrollBehavior &&
|
||||
aStyles.mOverscrollBehaviorX == mOverscrollBehaviorX &&
|
||||
aStyles.mOverscrollBehaviorY == mOverscrollBehaviorY &&
|
||||
aStyles.mScrollSnapTypeX == mScrollSnapTypeX &&
|
||||
aStyles.mScrollSnapTypeY == mScrollSnapTypeY &&
|
||||
aStyles.mScrollSnapPointsX == mScrollSnapPointsX &&
|
||||
|
Loading…
Reference in New Issue
Block a user