Bug 1800044 [wpt PR 36907] - Fix same URL navigation test, a=testonly
[gecko.git] / layout / generic / nsIStatefulFrame.h
blob33a24e5e05d0884c2d14b2c57bc2864ea7bfd6b6
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 * interface for rendering objects whose state is saved in
9 * session-history (back-forward navigation)
12 #ifndef _nsIStatefulFrame_h
13 #define _nsIStatefulFrame_h
15 #include "nsContentUtils.h"
16 #include "nsQueryFrame.h"
18 namespace mozilla {
19 class PresState;
20 } // namespace mozilla
22 class nsIStatefulFrame {
23 public:
24 NS_DECL_QUERYFRAME_TARGET(nsIStatefulFrame)
26 // Save the state for this frame.
27 virtual mozilla::UniquePtr<mozilla::PresState> SaveState() = 0;
29 // Restore the state for this frame from aState
30 NS_IMETHOD RestoreState(mozilla::PresState* aState) = 0;
32 // Generate a key for this stateful frame
33 virtual void GenerateStateKey(nsIContent* aContent,
34 mozilla::dom::Document* aDocument,
35 nsACString& aKey) {
36 nsContentUtils::GenerateStateKey(aContent, aDocument, aKey);
40 #endif /* _nsIStatefulFrame_h */