зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1357754 - Add ScrollDirection IPC serialization code. r=botond
In the next patch we'll need to send ScrollDirection over IPDL so we need to add serialization code for it. MozReview-Commit-ID: HK8ibuhhnkS
This commit is contained in:
Родитель
c8318bae76
Коммит
1459e240f4
|
@ -295,6 +295,14 @@ struct ParamTraits<mozilla::layers::DiagnosticTypes>
|
|||
mozilla::layers::DiagnosticTypes::ALL_BITS>
|
||||
{};
|
||||
|
||||
template <>
|
||||
struct ParamTraits<mozilla::layers::ScrollDirection>
|
||||
: public ContiguousEnumSerializer<
|
||||
mozilla::layers::ScrollDirection,
|
||||
mozilla::layers::ScrollDirection::NONE,
|
||||
mozilla::layers::ScrollDirection::SENTINEL>
|
||||
{};
|
||||
|
||||
/*
|
||||
template <>
|
||||
struct ParamTraits<mozilla::PixelFormat>
|
||||
|
|
|
@ -302,7 +302,8 @@ private:
|
|||
enum class ScrollDirection : uint32_t {
|
||||
NONE,
|
||||
VERTICAL,
|
||||
HORIZONTAL
|
||||
HORIZONTAL,
|
||||
SENTINEL /* for IPC serialization */
|
||||
};
|
||||
|
||||
} // namespace layers
|
||||
|
|
|
@ -268,6 +268,9 @@ public:
|
|||
case ScrollDirection::VERTICAL:
|
||||
EXPECT_EQ(PANNING_LOCKED_Y, mState);
|
||||
break;
|
||||
case ScrollDirection::SENTINEL:
|
||||
MOZ_ASSERT(false, "Invalid value");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче