Bug 1839315: part 4) Link from `SheetLoadData::mWasAlternate` to spec. r=emilio DONTBUILD
[gecko.git] / layout / generic / nsRubyTextFrame.h
blob92f48c83d7b5dd6461983a18e62f37ccc6f8c807
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 /* rendering object for CSS "display: ruby-text" */
9 #ifndef nsRubyTextFrame_h___
10 #define nsRubyTextFrame_h___
12 #include "nsRubyContentFrame.h"
14 namespace mozilla {
15 class PresShell;
16 } // namespace mozilla
18 /**
19 * Factory function.
20 * @return a newly allocated nsRubyTextFrame (infallible)
22 nsContainerFrame* NS_NewRubyTextFrame(mozilla::PresShell* aPresShell,
23 mozilla::ComputedStyle* aStyle);
25 class nsRubyTextFrame final : public nsRubyContentFrame {
26 public:
27 NS_DECL_FRAMEARENA_HELPERS(nsRubyTextFrame)
28 NS_DECL_QUERYFRAME
30 // nsIFrame overrides
31 virtual bool CanContinueTextRun() const override;
33 #ifdef DEBUG_FRAME_DUMP
34 virtual nsresult GetFrameName(nsAString& aResult) const override;
35 #endif
37 virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
38 const nsDisplayListSet& aLists) override;
40 virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
41 const ReflowInput& aReflowInput,
42 nsReflowStatus& aStatus) override;
44 bool IsCollapsed() const {
45 return HasAnyStateBits(NS_RUBY_TEXT_FRAME_COLLAPSED);
48 protected:
49 friend nsContainerFrame* NS_NewRubyTextFrame(mozilla::PresShell* aPresShell,
50 ComputedStyle* aStyle);
51 explicit nsRubyTextFrame(ComputedStyle* aStyle, nsPresContext* aPresContext)
52 : nsRubyContentFrame(aStyle, aPresContext, kClassID) {}
55 #endif /* nsRubyTextFrame_h___ */