Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/xml/CDATASection.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
#include "mozilla/dom/CDATASection.h"
8
#include "mozilla/dom/CDATASectionBinding.h"
9
#include "mozilla/IntegerPrintfMacros.h"
10
11
namespace mozilla {
12
namespace dom {
13
14
CDATASection::~CDATASection()
15
0
{
16
0
}
17
18
JSObject*
19
CDATASection::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
20
0
{
21
0
  return CDATASection_Binding::Wrap(aCx, this, aGivenProto);
22
0
}
23
24
bool
25
CDATASection::IsNodeOfType(uint32_t aFlags) const
26
0
{
27
0
  return false;
28
0
}
29
30
already_AddRefed<CharacterData>
31
CDATASection::CloneDataNode(mozilla::dom::NodeInfo *aNodeInfo, bool aCloneText) const
32
0
{
33
0
  RefPtr<mozilla::dom::NodeInfo> ni = aNodeInfo;
34
0
  RefPtr<CDATASection> it = new CDATASection(ni.forget());
35
0
  if (aCloneText) {
36
0
    it->mText = mText;
37
0
  }
38
0
39
0
  return it.forget();
40
0
}
41
42
#ifdef DEBUG
43
void
44
CDATASection::List(FILE* out, int32_t aIndent) const
45
{
46
  int32_t index;
47
  for (index = aIndent; --index >= 0; ) fputs("  ", out);
48
49
  fprintf(out, "CDATASection refcount=%" PRIuPTR "<", mRefCnt.get());
50
51
  nsAutoString tmp;
52
  ToCString(tmp, 0, mText.GetLength());
53
  fputs(NS_LossyConvertUTF16toASCII(tmp).get(), out);
54
55
  fputs(">\n", out);
56
}
57
58
void
59
CDATASection::DumpContent(FILE* out, int32_t aIndent,
60
                               bool aDumpAll) const {
61
}
62
#endif
63
64
} // namespace dom
65
} // namespace mozilla