Bug 1758813 [wpt PR 33142] - Implement RP sign out, a=testonly
[gecko.git] / layout / forms / nsSelectsAreaFrame.h
blobe0e487bad7a9a9065d750cae2fdee8d63435bbee
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"
12 namespace mozilla {
13 class PresShell;
14 } // namespace mozilla
16 class nsSelectsAreaFrame final : public nsBlockFrame {
17 public:
18 NS_DECL_FRAMEARENA_HELPERS(nsSelectsAreaFrame)
20 friend nsContainerFrame* NS_NewSelectsAreaFrame(mozilla::PresShell* aShell,
21 ComputedStyle* aStyle,
22 nsFrameState aFlags);
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; }
36 protected:
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
48 // will change.
49 nscoord mBSizeOfARow;
52 #endif /* nsSelectsAreaFrame_h___ */