bug 1249664 - Save dropped-down state in nsPresState r?dbaron draft
authorChris H-C <chutten@mozilla.com>
Thu, 10 Mar 2016 14:02:13 -0500
changeset 339215 be172faf1080d913a536b65961ae2b515cd1a681
parent 339214 deea620b7975b0fbb7b858aca1e194c1e5913f9b
child 339216 60a301442ce4950b8b1711754f63190f6e134828
child 339971 bb6e7d0e2f881cdb173cac7583351c451d0a6797
push id12666
push userbmo:chutten@mozilla.com
push dateThu, 10 Mar 2016 19:31:56 +0000
reviewersdbaron
bugs1249664
milestone47.0a1
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
layout/base/nsPresState.h
--- 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_ */