Bumping manifests a=b2g-bump
[gecko.git] / layout / generic / nsRubyFrame.h
blobf84a2d96eb31f835f067676c41c8958b26fdc261
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" */
9 #ifndef nsRubyFrame_h___
10 #define nsRubyFrame_h___
12 #include "nsContainerFrame.h"
14 /**
15 * Factory function.
16 * @return a newly allocated nsRubyFrame (infallible)
18 nsContainerFrame* NS_NewRubyFrame(nsIPresShell* aPresShell,
19 nsStyleContext* aContext);
21 class nsRubyFrame MOZ_FINAL : public nsContainerFrame
23 public:
24 NS_DECL_FRAMEARENA_HELPERS
25 NS_DECL_QUERYFRAME_TARGET(nsRubyFrame)
26 NS_DECL_QUERYFRAME
28 // nsIFrame overrides
29 virtual nsIAtom* GetType() const MOZ_OVERRIDE;
30 virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE;
31 virtual void AddInlineMinISize(nsRenderingContext *aRenderingContext,
32 InlineMinISizeData *aData) MOZ_OVERRIDE;
33 virtual void AddInlinePrefISize(nsRenderingContext *aRenderingContext,
34 InlinePrefISizeData *aData) MOZ_OVERRIDE;
35 virtual void Reflow(nsPresContext* aPresContext,
36 nsHTMLReflowMetrics& aDesiredSize,
37 const nsHTMLReflowState& aReflowState,
38 nsReflowStatus& aStatus) MOZ_OVERRIDE;
39 virtual nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode)
40 const MOZ_OVERRIDE;
41 virtual bool CanContinueTextRun() const MOZ_OVERRIDE;
43 #ifdef DEBUG_FRAME_DUMP
44 virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
45 #endif
47 protected:
48 friend nsContainerFrame* NS_NewRubyFrame(nsIPresShell* aPresShell,
49 nsStyleContext* aContext);
50 explicit nsRubyFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
51 void CalculateColSizes(nsRenderingContext* aRenderingContext,
52 nsTArray<nscoord>& aColSizes);
53 nscoord mBaseline;
56 #endif /* nsRubyFrame_h___ */