michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: #ifndef nsSelectsAreaFrame_h___ michael@0: #define nsSelectsAreaFrame_h___ michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: #include "nsBlockFrame.h" michael@0: michael@0: class nsSelectsAreaFrame : public nsBlockFrame michael@0: { michael@0: public: michael@0: NS_DECL_FRAMEARENA_HELPERS michael@0: michael@0: friend nsIFrame* NS_NewSelectsAreaFrame(nsIPresShell* aShell, nsStyleContext* aContext, nsFrameState aFlags); michael@0: michael@0: virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, michael@0: const nsRect& aDirtyRect, michael@0: const nsDisplayListSet& aLists) MOZ_OVERRIDE; michael@0: michael@0: void BuildDisplayListInternal(nsDisplayListBuilder* aBuilder, michael@0: const nsRect& aDirtyRect, michael@0: const nsDisplayListSet& aLists); michael@0: michael@0: virtual nsresult Reflow(nsPresContext* aCX, michael@0: nsHTMLReflowMetrics& aDesiredSize, michael@0: const nsHTMLReflowState& aReflowState, michael@0: nsReflowStatus& aStatus) MOZ_OVERRIDE; michael@0: michael@0: nscoord HeightOfARow() const { return mHeightOfARow; } michael@0: michael@0: protected: michael@0: nsSelectsAreaFrame(nsStyleContext* aContext) : michael@0: nsBlockFrame(aContext), michael@0: mHeightOfARow(0) michael@0: {} michael@0: michael@0: // We cache the height of a single row so that changes to the "size" michael@0: // attribute, padding, etc. can all be handled with only one reflow. We'll michael@0: // have to reflow twice if someone changes our font size or something like michael@0: // that, so that the heights of our options will change. michael@0: nscoord mHeightOfARow; michael@0: }; michael@0: michael@0: #endif /* nsSelectsAreaFrame_h___ */