mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 591737 - Add DetailsFrame. r=bz
This commit is contained in:
parent
403f25deee
commit
7371372968
@ -1959,6 +1959,7 @@ GK_ATOM(columnSetFrame, "ColumnSetFrame")
|
||||
GK_ATOM(comboboxControlFrame, "ComboboxControlFrame")
|
||||
GK_ATOM(comboboxDisplayFrame, "ComboboxDisplayFrame")
|
||||
GK_ATOM(deckFrame, "DeckFrame")
|
||||
GK_ATOM(detailsFrame, "DetailsFrame")
|
||||
GK_ATOM(fieldSetFrame, "FieldSetFrame")
|
||||
GK_ATOM(flexContainerFrame, "FlexContainerFrame")
|
||||
GK_ATOM(formControlFrame, "FormControlFrame") // radio or checkbox
|
||||
|
43
layout/generic/DetailsFrame.cpp
Normal file
43
layout/generic/DetailsFrame.cpp
Normal file
@ -0,0 +1,43 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#include "DetailsFrame.h"
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/HTMLDetailsElement.h"
|
||||
#include "mozilla/dom/HTMLSummaryElement.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsPlaceholderFrame.h"
|
||||
#include "nsTextNode.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(DetailsFrame)
|
||||
|
||||
NS_QUERYFRAME_HEAD(DetailsFrame)
|
||||
NS_QUERYFRAME_ENTRY(DetailsFrame)
|
||||
NS_QUERYFRAME_TAIL_INHERITING(nsBlockFrame)
|
||||
|
||||
DetailsFrame*
|
||||
NS_NewDetailsFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
{
|
||||
return new (aPresShell) DetailsFrame(aContext);
|
||||
}
|
||||
|
||||
DetailsFrame::DetailsFrame(nsStyleContext* aContext)
|
||||
: nsBlockFrame(aContext)
|
||||
{
|
||||
}
|
||||
|
||||
DetailsFrame::~DetailsFrame()
|
||||
{
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
DetailsFrame::GetType() const
|
||||
{
|
||||
return nsGkAtoms::detailsFrame;
|
||||
}
|
41
layout/generic/DetailsFrame.h
Normal file
41
layout/generic/DetailsFrame.h
Normal file
@ -0,0 +1,41 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* 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/. */
|
||||
|
||||
#ifndef DetailsFrame_h
|
||||
#define DetailsFrame_h
|
||||
|
||||
#include "nsBlockFrame.h"
|
||||
|
||||
class nsContainerFrame;
|
||||
class nsStyleContext;
|
||||
|
||||
// DetailsFrame is generated by HTMLDetailsElement. See
|
||||
// nsCSSFrameConstructor::ConstructDetailsFrame for the structure of a
|
||||
// DetailsFrame.
|
||||
//
|
||||
class DetailsFrame final : public nsBlockFrame
|
||||
{
|
||||
public:
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
NS_DECL_QUERYFRAME_TARGET(DetailsFrame)
|
||||
NS_DECL_QUERYFRAME
|
||||
|
||||
explicit DetailsFrame(nsStyleContext* aContext);
|
||||
|
||||
virtual ~DetailsFrame();
|
||||
|
||||
nsIAtom* GetType() const override;
|
||||
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
nsresult GetFrameName(nsAString& aResult) const override
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("Details"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#endif // DetailsFrame_h
|
@ -112,6 +112,7 @@ EXPORTS.mozilla.layout += [
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'AsyncScrollBase.cpp',
|
||||
'DetailsFrame.cpp',
|
||||
'FrameChildList.cpp',
|
||||
'MathMLTextRunFactory.cpp',
|
||||
'nsAbsoluteContainingBlock.cpp',
|
||||
|
@ -3,6 +3,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
FRAME_ID(BRFrame)
|
||||
FRAME_ID(DetailsFrame)
|
||||
FRAME_ID(nsAutoRepeatBoxFrame)
|
||||
FRAME_ID(nsBCTableCellFrame)
|
||||
FRAME_ID(nsBackdropFrame)
|
||||
|
@ -175,6 +175,9 @@ nsIFrame*
|
||||
NS_NewRangeFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||
nsIFrame*
|
||||
NS_NewNumberControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||
class DetailsFrame;
|
||||
DetailsFrame*
|
||||
NS_NewDetailsFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||
|
||||
// Table frame factories
|
||||
class nsTableOuterFrame;
|
||||
|
Loading…
Reference in New Issue
Block a user