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/. */
7 #include "MiddleCroppingLabelFrame.h"
8 #include "MiddleCroppingBlockFrame.h"
9 #include "mozilla/dom/Element.h"
10 #include "mozilla/PresShell.h"
12 nsIFrame
* NS_NewMiddleCroppingLabelFrame(mozilla::PresShell
* aPresShell
,
13 mozilla::ComputedStyle
* aStyle
) {
14 return new (aPresShell
)
15 mozilla::MiddleCroppingLabelFrame(aStyle
, aPresShell
->GetPresContext());
20 void MiddleCroppingLabelFrame::GetUncroppedValue(nsAString
& aValue
) {
21 mContent
->AsElement()->GetAttr(nsGkAtoms::value
, aValue
);
24 nsresult
MiddleCroppingLabelFrame::AttributeChanged(int32_t aNameSpaceID
,
27 if (aNameSpaceID
== kNameSpaceID_None
&& aAttribute
== nsGkAtoms::value
) {
28 UpdateDisplayedValueToUncroppedValue(true);
33 NS_QUERYFRAME_HEAD(MiddleCroppingLabelFrame
)
34 NS_QUERYFRAME_ENTRY(MiddleCroppingLabelFrame
)
35 NS_QUERYFRAME_TAIL_INHERITING(MiddleCroppingBlockFrame
)
36 NS_IMPL_FRAMEARENA_HELPERS(MiddleCroppingLabelFrame
)
38 } // namespace mozilla