2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1999-09-03 14:25:15 +00:00
|
|
|
#ifndef nsSelectsAreaFrame_h___
|
|
|
|
#define nsSelectsAreaFrame_h___
|
|
|
|
|
2012-09-14 16:10:08 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2008-12-29 15:07:38 +00:00
|
|
|
#include "nsBlockFrame.h"
|
1999-09-03 14:25:15 +00:00
|
|
|
|
2008-12-29 15:07:38 +00:00
|
|
|
class nsSelectsAreaFrame : public nsBlockFrame
|
1999-09-03 14:25:15 +00:00
|
|
|
{
|
|
|
|
public:
|
2009-09-12 16:49:24 +00:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
|
|
|
|
2014-05-24 22:20:40 +00:00
|
|
|
friend nsContainerFrame* NS_NewSelectsAreaFrame(nsIPresShell* aShell,
|
|
|
|
nsStyleContext* aContext,
|
|
|
|
nsFrameState aFlags);
|
1999-09-03 14:25:15 +00:00
|
|
|
|
2013-02-14 11:12:27 +00:00
|
|
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|
|
|
const nsRect& aDirtyRect,
|
2015-03-21 16:28:04 +00:00
|
|
|
const nsDisplayListSet& aLists) override;
|
1999-09-03 14:25:15 +00:00
|
|
|
|
2013-02-14 11:12:27 +00:00
|
|
|
void BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
|
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
const nsDisplayListSet& aLists);
|
1999-09-03 14:25:15 +00:00
|
|
|
|
2014-05-13 00:47:52 +00:00
|
|
|
virtual void Reflow(nsPresContext* aCX,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsReflowStatus& aStatus) override;
|
Bug 300030: Move intrinsic width computation out of nsIFrame::Reflow and into its own methods on nsIFrame. Replace reflow reasons, types, and commands with dirty bits/notifications. Thanks to bzbarsky for almost all of the HTML form controls (mozilla/layout/forms) changes, and many others for help testing and patching. For detailed commit logs, see REFLOW_YYYYMMDD_BRANCH, where YYYYMMDD is one of 20061031, 20060830, 20060603, 20060302, 20060119, 20051011, 20050804, 20050429, 20050315, 20050111, and 20041213.
2006-12-08 05:38:33 +00:00
|
|
|
|
|
|
|
nscoord HeightOfARow() const { return mHeightOfARow; }
|
|
|
|
|
2006-03-26 21:30:36 +00:00
|
|
|
protected:
|
2014-09-01 03:36:37 +00:00
|
|
|
explicit nsSelectsAreaFrame(nsStyleContext* aContext) :
|
2008-12-29 15:07:38 +00:00
|
|
|
nsBlockFrame(aContext),
|
Bug 300030: Move intrinsic width computation out of nsIFrame::Reflow and into its own methods on nsIFrame. Replace reflow reasons, types, and commands with dirty bits/notifications. Thanks to bzbarsky for almost all of the HTML form controls (mozilla/layout/forms) changes, and many others for help testing and patching. For detailed commit logs, see REFLOW_YYYYMMDD_BRANCH, where YYYYMMDD is one of 20061031, 20060830, 20060603, 20060302, 20060119, 20051011, 20050804, 20050429, 20050315, 20050111, and 20041213.
2006-12-08 05:38:33 +00:00
|
|
|
mHeightOfARow(0)
|
|
|
|
{}
|
|
|
|
|
|
|
|
// We cache the height of a single row so that changes to the "size"
|
|
|
|
// attribute, padding, etc. can all be handled with only one reflow. We'll
|
|
|
|
// have to reflow twice if someone changes our font size or something like
|
|
|
|
// that, so that the heights of our options will change.
|
|
|
|
nscoord mHeightOfARow;
|
1999-09-03 14:25:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsSelectsAreaFrame_h___ */
|