Backed out changeset 496886cb30a5 (bug 1867152) for bc failures on browser_user_input...
[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 */