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 /* base class for ruby rendering objects that directly contain content */
9 #include "nsRubyContentFrame.h"
11 #include "mozilla/ComputedStyle.h"
12 #include "nsPresContext.h"
13 #include "nsCSSAnonBoxes.h"
15 using namespace mozilla
;
17 //----------------------------------------------------------------------
19 // nsRubyContentFrame Method Implementations
20 // ======================================
23 bool nsRubyContentFrame::IsFrameOfType(uint32_t aFlags
) const {
24 if (aFlags
& eBidiInlineContainer
) {
27 return nsInlineFrame::IsFrameOfType(aFlags
);
30 bool nsRubyContentFrame::IsIntraLevelWhitespace() const {
31 auto pseudoType
= Style()->GetPseudoType();
32 if (pseudoType
!= PseudoStyleType::rubyBase
&&
33 pseudoType
!= PseudoStyleType::rubyText
) {
37 nsIFrame
* child
= mFrames
.OnlyChild();
38 return child
&& child
->GetContent()->TextIsOnlyWhitespace();