layout/forms/nsFieldSetFrame.h

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef nsFieldSetFrame_h___
michael@0 7 #define nsFieldSetFrame_h___
michael@0 8
michael@0 9 #include "mozilla/Attributes.h"
michael@0 10 #include "nsContainerFrame.h"
michael@0 11
michael@0 12 class nsFieldSetFrame MOZ_FINAL : public nsContainerFrame
michael@0 13 {
michael@0 14 public:
michael@0 15 NS_DECL_FRAMEARENA_HELPERS
michael@0 16
michael@0 17 nsFieldSetFrame(nsStyleContext* aContext);
michael@0 18
michael@0 19 NS_HIDDEN_(nscoord)
michael@0 20 GetIntrinsicWidth(nsRenderingContext* aRenderingContext,
michael@0 21 nsLayoutUtils::IntrinsicWidthType);
michael@0 22 virtual nscoord GetMinWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
michael@0 23 virtual nscoord GetPrefWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
michael@0 24 virtual nsSize ComputeSize(nsRenderingContext *aRenderingContext,
michael@0 25 nsSize aCBSize, nscoord aAvailableWidth,
michael@0 26 nsSize aMargin, nsSize aBorder, nsSize aPadding,
michael@0 27 uint32_t aFlags) MOZ_OVERRIDE;
michael@0 28 virtual nscoord GetBaseline() const MOZ_OVERRIDE;
michael@0 29
michael@0 30 /**
michael@0 31 * The area to paint box-shadows around. It's the border rect except
michael@0 32 * when there's a <legend> we offset the y-position to the center of it.
michael@0 33 */
michael@0 34 virtual nsRect VisualBorderRectRelativeToSelf() const MOZ_OVERRIDE;
michael@0 35
michael@0 36 virtual nsresult Reflow(nsPresContext* aPresContext,
michael@0 37 nsHTMLReflowMetrics& aDesiredSize,
michael@0 38 const nsHTMLReflowState& aReflowState,
michael@0 39 nsReflowStatus& aStatus) MOZ_OVERRIDE;
michael@0 40
michael@0 41 virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
michael@0 42 const nsRect& aDirtyRect,
michael@0 43 const nsDisplayListSet& aLists) MOZ_OVERRIDE;
michael@0 44
michael@0 45 void PaintBorderBackground(nsRenderingContext& aRenderingContext,
michael@0 46 nsPoint aPt, const nsRect& aDirtyRect, uint32_t aBGFlags);
michael@0 47
michael@0 48 virtual nsresult AppendFrames(ChildListID aListID,
michael@0 49 nsFrameList& aFrameList) MOZ_OVERRIDE;
michael@0 50 virtual nsresult InsertFrames(ChildListID aListID,
michael@0 51 nsIFrame* aPrevFrame,
michael@0 52 nsFrameList& aFrameList) MOZ_OVERRIDE;
michael@0 53 virtual nsresult RemoveFrame(ChildListID aListID,
michael@0 54 nsIFrame* aOldFrame) MOZ_OVERRIDE;
michael@0 55
michael@0 56 virtual nsIAtom* GetType() const MOZ_OVERRIDE;
michael@0 57 virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE
michael@0 58 {
michael@0 59 return nsContainerFrame::IsFrameOfType(aFlags &
michael@0 60 ~nsIFrame::eCanContainOverflowContainers);
michael@0 61 }
michael@0 62 virtual nsIScrollableFrame* GetScrollTargetFrame() MOZ_OVERRIDE
michael@0 63 {
michael@0 64 return do_QueryFrame(GetInner());
michael@0 65 }
michael@0 66
michael@0 67 #ifdef ACCESSIBILITY
michael@0 68 virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
michael@0 69 #endif
michael@0 70
michael@0 71 #ifdef DEBUG
michael@0 72 virtual nsresult SetInitialChildList(ChildListID aListID,
michael@0 73 nsFrameList& aChildList) MOZ_OVERRIDE;
michael@0 74 #endif
michael@0 75
michael@0 76 #ifdef DEBUG_FRAME_DUMP
michael@0 77 virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
michael@0 78 return MakeFrameName(NS_LITERAL_STRING("FieldSet"), aResult);
michael@0 79 }
michael@0 80 #endif
michael@0 81
michael@0 82 /**
michael@0 83 * Return the anonymous frame that contains all descendants except
michael@0 84 * the legend frame. This is currently always a block frame with
michael@0 85 * pseudo nsCSSAnonBoxes::fieldsetContent -- this may change in the
michael@0 86 * future when we add support for CSS overflow for <fieldset>.
michael@0 87 */
michael@0 88 nsIFrame* GetInner() const;
michael@0 89
michael@0 90 /**
michael@0 91 * Return the frame that represents the legend if any. This may be
michael@0 92 * a nsLegendFrame or a nsHTMLScrollFrame with the nsLegendFrame as the
michael@0 93 * scrolled frame (aka content insertion frame).
michael@0 94 */
michael@0 95 nsIFrame* GetLegend() const;
michael@0 96
michael@0 97 protected:
michael@0 98 nsRect mLegendRect;
michael@0 99 nscoord mLegendSpace;
michael@0 100 };
michael@0 101
michael@0 102 #endif // nsFieldSetFrame_h___

mercurial