1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 * a piece of state that is stored in session history when the document
11 #ifndef nsPresState_h_
12 #define nsPresState_h_
16 #include "nsAutoPtr.h"
22 : mContentData(nullptr)
24 , mResolution(1.0, 1.0)
29 void SetScrollState(const nsPoint
& aState
)
31 mScrollState
= aState
;
34 nsPoint
GetScrollState() const
39 void SetResolution(const gfxSize
& aSize
)
44 gfxSize
GetResolution() const
49 void ClearNonScrollState()
51 mContentData
= nullptr;
55 bool GetDisabled() const
60 void SetDisabled(bool aDisabled
)
62 mDisabled
= aDisabled
;
66 bool IsDisabledSet() const
71 nsISupports
* GetStateProperty() const
76 void SetStateProperty(nsISupports
*aProperty
)
78 mContentData
= aProperty
;
83 nsCOMPtr
<nsISupports
> mContentData
;
90 #endif /* nsPresState_h_ */