/src/mozilla-central/layout/forms/nsSelectsAreaFrame.h
Line | Count | Source (jump to first uncovered line) |
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___ |
8 | | |
9 | | #include "mozilla/Attributes.h" |
10 | | #include "nsBlockFrame.h" |
11 | | |
12 | | class nsSelectsAreaFrame final : public nsBlockFrame |
13 | | { |
14 | | public: |
15 | | NS_DECL_FRAMEARENA_HELPERS(nsSelectsAreaFrame) |
16 | | |
17 | | friend nsContainerFrame* NS_NewSelectsAreaFrame(nsIPresShell* aShell, |
18 | | ComputedStyle* aStyle, |
19 | | nsFrameState aFlags); |
20 | | |
21 | | virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, |
22 | | const nsDisplayListSet& aLists) override; |
23 | | |
24 | | void BuildDisplayListInternal(nsDisplayListBuilder* aBuilder, |
25 | | const nsDisplayListSet& aLists); |
26 | | |
27 | | virtual void Reflow(nsPresContext* aCX, |
28 | | ReflowOutput& aDesiredSize, |
29 | | const ReflowInput& aReflowInput, |
30 | | nsReflowStatus& aStatus) override; |
31 | | |
32 | 0 | nscoord BSizeOfARow() const { return mBSizeOfARow; } |
33 | | |
34 | | protected: |
35 | | explicit nsSelectsAreaFrame(ComputedStyle* aStyle) : |
36 | | nsBlockFrame(aStyle, kClassID), |
37 | | // initialize to wacky value so first call of |
38 | | // nsSelectsAreaFrame::Reflow will always invalidate |
39 | | mBSizeOfARow(nscoord_MIN) |
40 | 0 | {} |
41 | | |
42 | | // We cache the block size of a single row so that changes to the |
43 | | // "size" attribute, padding, etc. can all be handled with only one |
44 | | // reflow. We'll have to reflow twice if someone changes our font |
45 | | // size or something like that, so that the block size of our options |
46 | | // will change. |
47 | | nscoord mBSizeOfARow; |
48 | | }; |
49 | | |
50 | | #endif /* nsSelectsAreaFrame_h___ */ |