layout/xul/nsLeafBoxFrame.h

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

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 #ifndef nsLeafBoxFrame_h___
michael@0 6 #define nsLeafBoxFrame_h___
michael@0 7
michael@0 8 #include "mozilla/Attributes.h"
michael@0 9 #include "nsLeafFrame.h"
michael@0 10 #include "nsBox.h"
michael@0 11
michael@0 12 class nsAccessKeyInfo;
michael@0 13
michael@0 14 class nsLeafBoxFrame : public nsLeafFrame
michael@0 15 {
michael@0 16 public:
michael@0 17 NS_DECL_FRAMEARENA_HELPERS
michael@0 18
michael@0 19 friend nsIFrame* NS_NewLeafBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
michael@0 20
michael@0 21 virtual nsSize GetPrefSize(nsBoxLayoutState& aState) MOZ_OVERRIDE;
michael@0 22 virtual nsSize GetMinSize(nsBoxLayoutState& aState) MOZ_OVERRIDE;
michael@0 23 virtual nsSize GetMaxSize(nsBoxLayoutState& aState) MOZ_OVERRIDE;
michael@0 24 virtual nscoord GetFlex(nsBoxLayoutState& aState) MOZ_OVERRIDE;
michael@0 25 virtual nscoord GetBoxAscent(nsBoxLayoutState& aState) MOZ_OVERRIDE;
michael@0 26
michael@0 27 virtual nsIAtom* GetType() const MOZ_OVERRIDE;
michael@0 28 virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE
michael@0 29 {
michael@0 30 // This is bogus, but it's what we've always done.
michael@0 31 // Note that nsLeafFrame is also eReplacedContainsBlock.
michael@0 32 return nsLeafFrame::IsFrameOfType(aFlags &
michael@0 33 ~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock | nsIFrame::eXULBox));
michael@0 34 }
michael@0 35
michael@0 36 #ifdef DEBUG_FRAME_DUMP
michael@0 37 virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
michael@0 38 #endif
michael@0 39
michael@0 40 // nsIHTMLReflow overrides
michael@0 41
michael@0 42 virtual void MarkIntrinsicWidthsDirty() MOZ_OVERRIDE;
michael@0 43 virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
michael@0 44 virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
michael@0 45
michael@0 46 // Our auto size is that provided by nsFrame, not nsLeafFrame
michael@0 47 virtual nsSize ComputeAutoSize(nsRenderingContext *aRenderingContext,
michael@0 48 nsSize aCBSize, nscoord aAvailableWidth,
michael@0 49 nsSize aMargin, nsSize aBorder,
michael@0 50 nsSize aPadding, bool aShrinkWrap) MOZ_OVERRIDE;
michael@0 51
michael@0 52 virtual nsresult Reflow(nsPresContext* aPresContext,
michael@0 53 nsHTMLReflowMetrics& aDesiredSize,
michael@0 54 const nsHTMLReflowState& aReflowState,
michael@0 55 nsReflowStatus& aStatus) MOZ_OVERRIDE;
michael@0 56
michael@0 57 virtual nsresult CharacterDataChanged(CharacterDataChangeInfo* aInfo) MOZ_OVERRIDE;
michael@0 58
michael@0 59 virtual void Init(nsIContent* aContent,
michael@0 60 nsIFrame* aParent,
michael@0 61 nsIFrame* asPrevInFlow) MOZ_OVERRIDE;
michael@0 62
michael@0 63 virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
michael@0 64 const nsRect& aDirtyRect,
michael@0 65 const nsDisplayListSet& aLists) MOZ_OVERRIDE;
michael@0 66
michael@0 67 virtual nsresult AttributeChanged(int32_t aNameSpaceID,
michael@0 68 nsIAtom* aAttribute,
michael@0 69 int32_t aModType) MOZ_OVERRIDE;
michael@0 70
michael@0 71 virtual bool ComputesOwnOverflowArea() MOZ_OVERRIDE { return false; }
michael@0 72
michael@0 73 protected:
michael@0 74
michael@0 75 NS_IMETHOD DoLayout(nsBoxLayoutState& aState) MOZ_OVERRIDE;
michael@0 76
michael@0 77 #ifdef DEBUG_LAYOUT
michael@0 78 virtual void GetBoxName(nsAutoString& aName) MOZ_OVERRIDE;
michael@0 79 #endif
michael@0 80
michael@0 81 virtual nscoord GetIntrinsicWidth() MOZ_OVERRIDE;
michael@0 82
michael@0 83 nsLeafBoxFrame(nsIPresShell* aShell, nsStyleContext* aContext);
michael@0 84
michael@0 85 private:
michael@0 86
michael@0 87 void UpdateMouseThrough();
michael@0 88
michael@0 89
michael@0 90 }; // class nsLeafBoxFrame
michael@0 91
michael@0 92 #endif /* nsLeafBoxFrame_h___ */

mercurial