Bumping manifests a=b2g-bump
[gecko.git] / layout / generic / nsRubyContentFrame.cpp
blob12f9bc9c7777888e9e01302c84de84ef77ced8d9
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 // ======================================
28 /* virtual */ bool
29 nsRubyContentFrame::IsFrameOfType(uint32_t aFlags) const
31 if (aFlags & eBidiInlineContainer) {
32 return false;
34 return nsRubyContentFrameSuper::IsFrameOfType(aFlags);
37 bool
38 nsRubyContentFrame::IsIntraLevelWhitespace() const
40 nsIAtom* pseudoType = StyleContext()->GetPseudo();
41 if (pseudoType != nsCSSAnonBoxes::rubyBase &&
42 pseudoType != nsCSSAnonBoxes::rubyText) {
43 return false;
46 nsIFrame* child = mFrames.OnlyChild();
47 return child && child->GetContent()->TextIsOnlyWhitespace();