Bug 1839315: part 4) Link from `SheetLoadData::mWasAlternate` to spec. r=emilio DONTBUILD
[gecko.git] / layout / generic / nsRubyContentFrame.cpp
blobb7b29c5a8afcb5266ff299accd8dd7fc040a35b1
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 // ======================================
22 /* virtual */
23 bool nsRubyContentFrame::IsFrameOfType(uint32_t aFlags) const {
24 if (aFlags & eBidiInlineContainer) {
25 return false;
27 return nsInlineFrame::IsFrameOfType(aFlags);
30 bool nsRubyContentFrame::IsIntraLevelWhitespace() const {
31 auto pseudoType = Style()->GetPseudoType();
32 if (pseudoType != PseudoStyleType::rubyBase &&
33 pseudoType != PseudoStyleType::rubyText) {
34 return false;
37 nsIFrame* child = mFrames.OnlyChild();
38 return child && child->GetContent()->TextIsOnlyWhitespace();