Bug 1646700 [wpt PR 24235] - Update picture-in-picture idlharness test, a=testonly
[gecko.git] / layout / base / ScrollStyles.h
blob126aa1256f53fa56e8a260bb2ca7651adc316ae1
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_ScrollStyles_h
8 #define mozilla_ScrollStyles_h
10 #include <stdint.h>
11 #include "mozilla/dom/WindowBinding.h"
13 // Forward declarations
14 struct nsStyleDisplay;
16 namespace mozilla {
18 enum class StyleOverflow : uint8_t;
20 // NOTE: Only styles that are propagated from the <body> should end up in this
21 // class.
22 struct ScrollStyles {
23 // Always one of Scroll, Hidden, or Auto
24 StyleOverflow mHorizontal;
25 StyleOverflow mVertical;
27 ScrollStyles(StyleOverflow aH, StyleOverflow aV)
28 : mHorizontal(aH), mVertical(aV) {}
30 explicit ScrollStyles(const nsStyleDisplay&);
31 bool operator==(const ScrollStyles& aStyles) const {
32 return aStyles.mHorizontal == mHorizontal && aStyles.mVertical == mVertical;
34 bool operator!=(const ScrollStyles& aStyles) const {
35 return !(*this == aStyles);
37 bool IsHiddenInBothDirections() const;
40 } // namespace mozilla
42 #endif // mozilla_ScrollStyles_h