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/. */ 6 7 /* rendering object for CSS "display: ruby-base" */ 8 9 #ifndef nsRubyBaseFrame_h___ 10 #define nsRubyBaseFrame_h___ 11 12 #include "nsRubyContentFrame.h" 13 14 /** 15 * Factory function. 16 * @return a newly allocated nsRubyBaseFrame (infallible) 17 */ 18 nsContainerFrame* NS_NewRubyBaseFrame(nsIPresShell* aPresShell, 19 nsStyleContext* aContext); 20 21 class nsRubyBaseFrame final : public nsRubyContentFrame 22 { 23 public: 24 NS_DECL_FRAMEARENA_HELPERS 25 NS_DECL_QUERYFRAME_TARGET(nsRubyBaseFrame) 26 NS_DECL_QUERYFRAME 27 28 // nsIFrame overrides 29 virtual nsIAtom* GetType() const override; 30 31 #ifdef DEBUG_FRAME_DUMP 32 virtual nsresult GetFrameName(nsAString& aResult) const override; 33 #endif 34 35 protected: 36 friend nsContainerFrame* NS_NewRubyBaseFrame(nsIPresShell* aPresShell, 37 nsStyleContext* aContext); 38 explicit nsRubyBaseFrame(nsStyleContext* aContext) 39 : nsRubyContentFrame(aContext) {} 40 }; 41 42 #endif /* nsRubyBaseFrame_h___ */ 43