Bumping manifests a=b2g-bump
[gecko.git] / layout / generic / nsRubyBaseContainerFrame.h
blob7be4a07ae08a4a4bc2ea923d25ae6776a2f62db2
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"
17 /**
18 * Factory function.
19 * @return a newly allocated nsRubyBaseContainerFrame (infallible)
21 nsContainerFrame* NS_NewRubyBaseContainerFrame(nsIPresShell* aPresShell,
22 nsStyleContext* aContext);
24 class nsRubyBaseContainerFrame MOZ_FINAL : public nsContainerFrame
26 public:
27 NS_DECL_FRAMEARENA_HELPERS
28 NS_DECL_QUERYFRAME_TARGET(nsRubyBaseContainerFrame)
29 NS_DECL_QUERYFRAME
31 // nsIFrame overrides
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;
42 #endif
44 void AppendTextContainer(nsIFrame* aFrame);
45 void ClearTextContainers();
47 protected:
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
56 * reflow.
58 nsTArray<nsRubyTextContainerFrame*> mTextContainers;
61 #endif /* nsRubyBaseContainerFrame_h___ */