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/. */ 6 7 /* rendering object for CSS "display: ruby-base" */ 8 9 #include "nsRubyBaseFrame.h" 10 11 #include "mozilla/ComputedStyle.h" 12 #include "mozilla/PresShell.h" 13 #include "mozilla/WritingModes.h" 14 #include "nsLineLayout.h" 15 #include "nsPresContext.h" 16 17 using namespace mozilla; 18 19 //---------------------------------------------------------------------- 20 21 // Frame class boilerplate 22 // ======================= 23 24 NS_QUERYFRAME_HEAD(nsRubyBaseFrame) NS_QUERYFRAME_ENTRY(nsRubyBaseFrame)25 NS_QUERYFRAME_ENTRY(nsRubyBaseFrame) 26 NS_QUERYFRAME_TAIL_INHERITING(nsRubyContentFrame) 27 28 NS_IMPL_FRAMEARENA_HELPERS(nsRubyBaseFrame) 29 30 nsContainerFrame* NS_NewRubyBaseFrame(mozilla::PresShell* aPresShell, 31 ComputedStyle* aStyle) { 32 return new (aPresShell) nsRubyBaseFrame(aStyle, aPresShell->GetPresContext()); 33 } 34 35 //---------------------------------------------------------------------- 36 37 // nsRubyBaseFrame Method Implementations 38 // ====================================== 39 40 #ifdef DEBUG_FRAME_DUMP GetFrameName(nsAString & aResult) const41nsresult nsRubyBaseFrame::GetFrameName(nsAString& aResult) const { 42 return MakeFrameName(NS_LITERAL_STRING("RubyBase"), aResult); 43 } 44 #endif 45