Bug 1758813 [wpt PR 33142] - Implement RP sign out, a=testonly
[gecko.git] / layout / generic / ScrollGeneration.cpp
blob5f576187b3a71772257cfbb0ae6b929bd40596c9
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "ScrollGeneration.h"
7 #include <ostream>
9 namespace mozilla {
11 template <typename Tag>
12 ScrollGeneration<Tag>::ScrollGeneration() : mValue(0) {}
14 template <typename Tag>
15 ScrollGeneration<Tag>::ScrollGeneration(uint64_t aValue) : mValue(aValue) {}
17 template <typename Tag>
18 bool ScrollGeneration<Tag>::operator<(
19 const ScrollGeneration<Tag>& aOther) const {
20 return mValue < aOther.mValue;
23 template <typename Tag>
24 bool ScrollGeneration<Tag>::operator==(
25 const ScrollGeneration<Tag>& aOther) const {
26 return mValue == aOther.mValue;
29 template <typename Tag>
30 bool ScrollGeneration<Tag>::operator!=(
31 const ScrollGeneration<Tag>& aOther) const {
32 return !(*this == aOther);
35 template <typename Tag>
36 std::ostream& operator<<(std::ostream& aStream,
37 const ScrollGeneration<Tag>& aGen) {
38 return aStream << aGen.mValue;
41 template struct ScrollGeneration<APZTag>;
42 template struct ScrollGeneration<MainThreadTag>;
44 template std::ostream& operator<<(std::ostream&,
45 const ScrollGeneration<APZTag>&);
46 template std::ostream& operator<<(std::ostream&,
47 const ScrollGeneration<MainThreadTag>&);
49 } // namespace mozilla