/src/mozilla-central/layout/generic/nsRubyContentFrame.cpp
Line | Count | Source (jump to first uncovered line) |
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 | | /* base class for ruby rendering objects that directly contain content */ |
8 | | |
9 | | #include "nsRubyContentFrame.h" |
10 | | |
11 | | #include "mozilla/ComputedStyle.h" |
12 | | #include "nsPresContext.h" |
13 | | #include "nsCSSAnonBoxes.h" |
14 | | |
15 | | using namespace mozilla; |
16 | | |
17 | | //---------------------------------------------------------------------- |
18 | | |
19 | | // nsRubyContentFrame Method Implementations |
20 | | // ====================================== |
21 | | |
22 | | /* virtual */ bool |
23 | | nsRubyContentFrame::IsFrameOfType(uint32_t aFlags) const |
24 | 0 | { |
25 | 0 | if (aFlags & eBidiInlineContainer) { |
26 | 0 | return false; |
27 | 0 | } |
28 | 0 | return nsInlineFrame::IsFrameOfType(aFlags); |
29 | 0 | } |
30 | | |
31 | | bool |
32 | | nsRubyContentFrame::IsIntraLevelWhitespace() const |
33 | 0 | { |
34 | 0 | nsAtom* pseudoType = Style()->GetPseudo(); |
35 | 0 | if (pseudoType != nsCSSAnonBoxes::rubyBase() && |
36 | 0 | pseudoType != nsCSSAnonBoxes::rubyText()) { |
37 | 0 | return false; |
38 | 0 | } |
39 | 0 | |
40 | 0 | nsIFrame* child = mFrames.OnlyChild(); |
41 | 0 | return child && child->GetContent()->TextIsOnlyWhitespace(); |
42 | 0 | } |