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/. */
8 * This frame type is used for input type=date, time, month, week, and
11 * NOTE: some of the above-mentioned input types are still to-be-implemented.
12 * See nsCSSFrameConstructor::FindInputData, as well as bug 1286182 (date),
13 * bug 1306215 (month), bug 1306216 (week) and bug 1306217 (datetime-local).
16 #ifndef nsDateTimeControlFrame_h__
17 #define nsDateTimeControlFrame_h__
19 #include "mozilla/Attributes.h"
20 #include "nsContainerFrame.h"
21 #include "nsIAnonymousContentCreator.h"
29 } // namespace mozilla
31 class nsDateTimeControlFrame final
: public nsContainerFrame
{
32 typedef mozilla::dom::DateTimeValue DateTimeValue
;
34 explicit nsDateTimeControlFrame(ComputedStyle
* aStyle
,
35 nsPresContext
* aPresContext
);
38 friend nsIFrame
* NS_NewDateTimeControlFrame(mozilla::PresShell
* aPresShell
,
39 ComputedStyle
* aStyle
);
42 NS_DECL_FRAMEARENA_HELPERS(nsDateTimeControlFrame
)
44 #ifdef DEBUG_FRAME_DUMP
45 nsresult
GetFrameName(nsAString
& aResult
) const override
{
46 return MakeFrameName(u
"DateTimeControl"_ns
, aResult
);
51 nscoord
GetMinISize(gfxContext
* aRenderingContext
) override
;
53 nscoord
GetPrefISize(gfxContext
* aRenderingContext
) override
;
55 void Reflow(nsPresContext
* aPresContext
, ReflowOutput
& aDesiredSize
,
56 const ReflowInput
& aReflowInput
,
57 nsReflowStatus
& aStatus
) override
;
59 Maybe
<nscoord
> GetNaturalBaselineBOffset(
60 mozilla::WritingMode aWM
, BaselineSharingGroup aBaselineGroup
,
61 BaselineExportContext
) const override
;
63 nscoord mFirstBaseline
= NS_INTRINSIC_ISIZE_UNKNOWN
;
66 #endif // nsDateTimeControlFrame_h__