Bug 1351783 part 13 - Add a function for determing if a ScrollSnapInfo has scroll snap points. r=botond

MozReview-Commit-ID: 7Dj0RGfQFNC

--HG--
extra : rebase_source : e25f6657f379b286c9393af19b3771c6296db468
extra : histedit_source : e9206c7c276fb9653df142617e08ec3bb7c6f1ad
This commit is contained in:
Ryan Hunt 2017-06-15 03:52:34 -04:00
parent c1312e5abc
commit 5e36e136d3

View File

@ -690,6 +690,12 @@ struct ScrollSnapInfo {
mScrollSnapCoordinates == aOther.mScrollSnapCoordinates;
}
bool HasScrollSnapping() const
{
return mScrollSnapTypeY != NS_STYLE_SCROLL_SNAP_TYPE_NONE ||
mScrollSnapTypeX != NS_STYLE_SCROLL_SNAP_TYPE_NONE;
}
// The scroll frame's scroll-snap-type.
// One of NS_STYLE_SCROLL_SNAP_{NONE, MANDATORY, PROXIMITY}.
uint8_t mScrollSnapTypeX;