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/. */
6 #ifndef nsSelectsAreaFrame_h___
7 #define nsSelectsAreaFrame_h___
9 #include "mozilla/Attributes.h"
10 #include "nsBlockFrame.h"
14 } // namespace mozilla
16 class nsSelectsAreaFrame final
: public nsBlockFrame
{
18 NS_DECL_FRAMEARENA_HELPERS(nsSelectsAreaFrame
)
20 friend nsContainerFrame
* NS_NewSelectsAreaFrame(mozilla::PresShell
* aShell
,
21 ComputedStyle
* aStyle
,
24 virtual void BuildDisplayList(nsDisplayListBuilder
* aBuilder
,
25 const nsDisplayListSet
& aLists
) override
;
27 void BuildDisplayListInternal(nsDisplayListBuilder
* aBuilder
,
28 const nsDisplayListSet
& aLists
);
30 virtual void Reflow(nsPresContext
* aCX
, ReflowOutput
& aDesiredSize
,
31 const ReflowInput
& aReflowInput
,
32 nsReflowStatus
& aStatus
) override
;
34 nscoord
BSizeOfARow() const { return mBSizeOfARow
; }
37 explicit nsSelectsAreaFrame(ComputedStyle
* aStyle
,
38 nsPresContext
* aPresContext
)
39 : nsBlockFrame(aStyle
, aPresContext
, kClassID
),
40 // initialize to wacky value so first call of
41 // nsSelectsAreaFrame::Reflow will always invalidate
42 mBSizeOfARow(nscoord_MIN
) {}
44 // We cache the block size of a single row so that changes to the
45 // "size" attribute, padding, etc. can all be handled with only one
46 // reflow. We'll have to reflow twice if someone changes our font
47 // size or something like that, so that the block size of our options
52 #endif /* nsSelectsAreaFrame_h___ */