/src/mozilla-central/layout/xul/nsLeafBoxFrame.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 nsLeafBoxFrame_h___ |
7 | | #define nsLeafBoxFrame_h___ |
8 | | |
9 | | #include "mozilla/Attributes.h" |
10 | | #include "nsLeafFrame.h" |
11 | | #include "nsBox.h" |
12 | | |
13 | | class nsLeafBoxFrame : public nsLeafFrame |
14 | | { |
15 | | public: |
16 | | NS_DECL_FRAMEARENA_HELPERS(nsLeafBoxFrame) |
17 | | |
18 | | friend nsIFrame* NS_NewLeafBoxFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle); |
19 | | |
20 | | virtual nsSize GetXULPrefSize(nsBoxLayoutState& aState) override; |
21 | | virtual nsSize GetXULMinSize(nsBoxLayoutState& aState) override; |
22 | | virtual nsSize GetXULMaxSize(nsBoxLayoutState& aState) override; |
23 | | virtual nscoord GetXULFlex() override; |
24 | | virtual nscoord GetXULBoxAscent(nsBoxLayoutState& aState) override; |
25 | | |
26 | | virtual bool IsFrameOfType(uint32_t aFlags) const override |
27 | 0 | { |
28 | 0 | // This is bogus, but it's what we've always done. |
29 | 0 | // Note that nsLeafFrame is also eReplacedContainsBlock. |
30 | 0 | return nsLeafFrame::IsFrameOfType(aFlags & |
31 | 0 | ~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock | nsIFrame::eXULBox)); |
32 | 0 | } |
33 | | |
34 | | #ifdef DEBUG_FRAME_DUMP |
35 | | virtual nsresult GetFrameName(nsAString& aResult) const override; |
36 | | #endif |
37 | | |
38 | | // nsIHTMLReflow overrides |
39 | | |
40 | | virtual void MarkIntrinsicISizesDirty() override; |
41 | | virtual nscoord GetMinISize(gfxContext *aRenderingContext) override; |
42 | | virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override; |
43 | | |
44 | | // Our auto size is that provided by nsFrame, not nsLeafFrame |
45 | | virtual mozilla::LogicalSize |
46 | | ComputeAutoSize(gfxContext* aRenderingContext, |
47 | | mozilla::WritingMode aWM, |
48 | | const mozilla::LogicalSize& aCBSize, |
49 | | nscoord aAvailableISize, |
50 | | const mozilla::LogicalSize& aMargin, |
51 | | const mozilla::LogicalSize& aBorder, |
52 | | const mozilla::LogicalSize& aPadding, |
53 | | ComputeSizeFlags aFlags) override; |
54 | | |
55 | | virtual void Reflow(nsPresContext* aPresContext, |
56 | | ReflowOutput& aDesiredSize, |
57 | | const ReflowInput& aReflowInput, |
58 | | nsReflowStatus& aStatus) override; |
59 | | |
60 | | virtual nsresult CharacterDataChanged(const CharacterDataChangeInfo&) override; |
61 | | |
62 | | virtual void Init(nsIContent* aContent, |
63 | | nsContainerFrame* aParent, |
64 | | nsIFrame* asPrevInFlow) override; |
65 | | |
66 | | virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, |
67 | | const nsDisplayListSet& aLists) override; |
68 | | |
69 | | virtual nsresult AttributeChanged(int32_t aNameSpaceID, |
70 | | nsAtom* aAttribute, |
71 | | int32_t aModType) override; |
72 | | |
73 | 0 | virtual bool ComputesOwnOverflowArea() override { return false; } |
74 | | |
75 | | protected: |
76 | | |
77 | | NS_IMETHOD DoXULLayout(nsBoxLayoutState& aState) override; |
78 | | |
79 | | virtual nscoord GetIntrinsicISize() override; |
80 | | |
81 | | explicit nsLeafBoxFrame(ComputedStyle* aStyle, ClassID aID = kClassID) |
82 | | : nsLeafFrame(aStyle, aID) |
83 | 0 | {} |
84 | | |
85 | | private: |
86 | | |
87 | | void UpdateMouseThrough(); |
88 | | |
89 | | |
90 | | }; // class nsLeafBoxFrame |
91 | | |
92 | | #endif /* nsLeafBoxFrame_h___ */ |