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 /* values to identify particular subtrees of native anonymous content */
9 #ifndef mozilla_AnonymousContentKey_h
10 #define mozilla_AnonymousContentKey_h
12 #include "mozilla/TypedEnumBits.h"
14 #include "X11UndefineNone.h"
20 // We currently use cached anonymous content styles only for scrollbar parts,
21 // and we can fit the type of scrollbar part element along with its different
22 // options (such as orientation, and other attribute values that can affect
23 // styling) into a uint8_t.
25 // The lower three bits hold a Type_* value identifying the type of
26 // element, and the remaining bits store Flag_* values.
28 // A value of 0 is used to represent an anonymous content subtree that we don't
30 enum class AnonymousContentKey
: uint8_t {
34 Type_ScrollCorner
= 0x01,
35 Type_Scrollbar
= 0x02,
36 Type_ScrollbarButton
= 0x03,
39 // scrollbar, scrollbarbutton, slider
43 Flag_ScrollbarButton_Down
= 0x10,
44 Flag_ScrollbarButton_Bottom
= 0x20,
45 Flag_ScrollbarButton_Decrement
= 0x40,
50 MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(AnonymousContentKey
)
52 } // namespace mozilla
54 #endif // mozilla_AnonymousContentKey_h