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/. */
5 #ifndef nsSelectsAreaFrame_h___
6 #define nsSelectsAreaFrame_h___
8 #include "mozilla/Attributes.h"
9 #include "nsBlockFrame.h"
11 class nsSelectsAreaFrame
: public nsBlockFrame
14 NS_DECL_FRAMEARENA_HELPERS
16 friend nsIFrame
* NS_NewSelectsAreaFrame(nsIPresShell
* aShell
, nsStyleContext
* aContext
, uint32_t aFlags
);
18 virtual void BuildDisplayList(nsDisplayListBuilder
* aBuilder
,
19 const nsRect
& aDirtyRect
,
20 const nsDisplayListSet
& aLists
) MOZ_OVERRIDE
;
22 void BuildDisplayListInternal(nsDisplayListBuilder
* aBuilder
,
23 const nsRect
& aDirtyRect
,
24 const nsDisplayListSet
& aLists
);
26 NS_IMETHOD
Reflow(nsPresContext
* aCX
,
27 nsHTMLReflowMetrics
& aDesiredSize
,
28 const nsHTMLReflowState
& aReflowState
,
29 nsReflowStatus
& aStatus
) MOZ_OVERRIDE
;
31 nscoord
HeightOfARow() const { return mHeightOfARow
; }
34 nsSelectsAreaFrame(nsStyleContext
* aContext
) :
35 nsBlockFrame(aContext
),
39 // We cache the height of a single row so that changes to the "size"
40 // attribute, padding, etc. can all be handled with only one reflow. We'll
41 // have to reflow twice if someone changes our font size or something like
42 // that, so that the heights of our options will change.
43 nscoord mHeightOfARow
;
46 #endif /* nsSelectsAreaFrame_h___ */