bug 1249664 - Save dropped-down state in nsPresState r?dbaron
nsComboboxControlFrame will need some place to store its dropped-down state.
Instead of using nsISupportsPRBool and SetStateProperty, just add a bool.
MozReview-Commit-ID: CEnshCbqEV1
--- a/layout/base/nsPresState.h
+++ b/layout/base/nsPresState.h
@@ -20,16 +20,17 @@ class nsPresState
public:
nsPresState()
: mContentData(nullptr)
, mScrollState(0, 0)
, mResolution(1.0)
, mScaleToResolution(false)
, mDisabledSet(false)
, mDisabled(false)
+ , mDroppedDown(false)
{}
void SetScrollState(const nsPoint& aState)
{
mScrollState = aState;
}
nsPoint GetScrollState() const
@@ -84,19 +85,30 @@ public:
return mContentData;
}
void SetStateProperty(nsISupports *aProperty)
{
mContentData = aProperty;
}
+ void SetDroppedDown(bool aDroppedDown)
+ {
+ mDroppedDown = aDroppedDown;
+ }
+
+ bool GetDroppedDown() const
+ {
+ return mDroppedDown;
+ }
+
// MEMBER VARIABLES
protected:
nsCOMPtr<nsISupports> mContentData;
nsPoint mScrollState;
float mResolution;
bool mScaleToResolution;
bool mDisabledSet;
bool mDisabled;
+ bool mDroppedDown;
};
#endif /* nsPresState_h_ */