1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code is subject to the terms of the Mozilla Public License
4 * version 2.0 (the "License"). You can obtain a copy of the License at
5 * http://mozilla.org/MPL/2.0/. */
7 /* rendering object for CSS "display: ruby-base-container" */
9 #ifndef nsRubyBaseContainerFrame_h___
10 #define nsRubyBaseContainerFrame_h___
12 #include "nsContainerFrame.h"
13 #include "nsRubyTextContainerFrame.h"
14 #include "nsRubyBaseFrame.h"
15 #include "nsRubyTextFrame.h"
19 * @return a newly allocated nsRubyBaseContainerFrame (infallible)
21 nsContainerFrame
* NS_NewRubyBaseContainerFrame(nsIPresShell
* aPresShell
,
22 nsStyleContext
* aContext
);
24 class nsRubyBaseContainerFrame MOZ_FINAL
: public nsContainerFrame
27 NS_DECL_FRAMEARENA_HELPERS
28 NS_DECL_QUERYFRAME_TARGET(nsRubyBaseContainerFrame
)
32 virtual nsIAtom
* GetType() const MOZ_OVERRIDE
;
33 virtual bool IsFrameOfType(uint32_t aFlags
) const MOZ_OVERRIDE
;
34 virtual bool CanContinueTextRun() const MOZ_OVERRIDE
;
35 virtual void Reflow(nsPresContext
* aPresContext
,
36 nsHTMLReflowMetrics
& aDesiredSize
,
37 const nsHTMLReflowState
& aReflowState
,
38 nsReflowStatus
& aStatus
) MOZ_OVERRIDE
;
40 #ifdef DEBUG_FRAME_DUMP
41 virtual nsresult
GetFrameName(nsAString
& aResult
) const MOZ_OVERRIDE
;
44 void AppendTextContainer(nsIFrame
* aFrame
);
45 void ClearTextContainers();
48 friend nsContainerFrame
*
49 NS_NewRubyBaseContainerFrame(nsIPresShell
* aPresShell
,
50 nsStyleContext
* aContext
);
51 explicit nsRubyBaseContainerFrame(nsStyleContext
* aContext
) : nsContainerFrame(aContext
) {}
53 * The ruby text containers that belong to the ruby segment defined by
54 * this ruby base container. These text containers are located at the start
55 * of reflow for the ruby frame (parent) and cleared at the end of that
58 nsTArray
<nsRubyTextContainerFrame
*> mTextContainers
;
61 #endif /* nsRubyBaseContainerFrame_h___ */