Backed out changeset 496886cb30a5 (bug 1867152) for bc failures on browser_user_input...
[gecko.git] / layout / generic / Visibility.h
bloba5fbbdbde728dd1be7bb4e56a601f3f94c949332
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 /**
8 * Declares visibility-related types. @Visibility is an enumeration of the
9 * possible visibility states of a frame. @OnNonvisible is an enumeration that
10 * allows callers to request a specific action when a frame transitions from
11 * visible to nonvisible.
14 #ifndef mozilla_layout_generic_Visibility_h
15 #define mozilla_layout_generic_Visibility_h
17 namespace mozilla {
19 // Visibility states for frames.
20 enum class Visibility : uint8_t {
21 // Indicates that we're not tracking visibility for this frame.
22 Untracked,
24 // Indicates that the frame is probably nonvisible. Visible frames *may* be
25 // ApproximatelyNonVisible because approximate visibility is not updated
26 // synchronously. Some truly nonvisible frames may be marked
27 // ApproximatelyVisible instead if our heuristics lead us to think they may
28 // be visible soon.
29 ApproximatelyNonVisible,
31 // Indicates that the frame is either visible now or is likely to be visible
32 // soon according to our heuristics. As with ApproximatelyNonVisible , it's
33 // important to note that approximately visibility is not updated
34 // synchronously, so this information may be out of date.
35 ApproximatelyVisible,
38 // Requested actions when frames transition to the nonvisible state.
39 enum class OnNonvisible : uint8_t {
40 DiscardImages // Discard images associated with the frame.
43 } // namespace mozilla
45 #endif // mozilla_layout_generic_Visibility_h