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 /* base class for ruby rendering objects that directly contain content */
9 #include "nsRubyContentFrame.h"
10 #include "nsPresContext.h"
11 #include "nsStyleContext.h"
12 #include "nsCSSAnonBoxes.h"
14 using namespace mozilla
;
16 //----------------------------------------------------------------------
18 // Frame class boilerplate
19 // =======================
21 NS_IMPL_FRAMEARENA_HELPERS(nsRubyContentFrame
)
23 //----------------------------------------------------------------------
25 // nsRubyContentFrame Method Implementations
26 // ======================================
29 nsRubyContentFrame::IsFrameOfType(uint32_t aFlags
) const
31 if (aFlags
& eBidiInlineContainer
) {
34 return nsRubyContentFrameSuper::IsFrameOfType(aFlags
);
38 nsRubyContentFrame::IsIntraLevelWhitespace() const
40 nsIAtom
* pseudoType
= StyleContext()->GetPseudo();
41 if (pseudoType
!= nsCSSAnonBoxes::rubyBase
&&
42 pseudoType
!= nsCSSAnonBoxes::rubyText
) {
46 nsIFrame
* child
= mFrames
.OnlyChild();
47 return child
&& child
->GetContent()->TextIsOnlyWhitespace();