Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/svg/nsSVGFeatures.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
/**
8
 * This file contains code to help implement the Conditional Processing
9
 * section of the SVG specification (i.e. the <switch> element and the
10
 * requiredFeatures, requiredExtensions and systemLanguage attributes).
11
 *
12
 *   http://www.w3.org/TR/SVG11/struct.html#ConditionalProcessing
13
 */
14
15
#include "nsSVGFeatures.h"
16
#include "nsIContent.h"
17
#include "nsIDocument.h"
18
#include "nsNameSpaceManager.h"
19
#include "mozilla/Preferences.h"
20
21
using namespace mozilla;
22
23
/*static*/ bool
24
nsSVGFeatures::HasExtension(const nsAString& aExtension, const bool aIsInChrome)
25
0
{
26
0
#define SVG_SUPPORTED_EXTENSION(str) if (aExtension.EqualsLiteral(str)) return true;
27
0
  SVG_SUPPORTED_EXTENSION("http://www.w3.org/1999/xhtml")
28
0
  nsNameSpaceManager* nameSpaceManager = nsNameSpaceManager::GetInstance();
29
0
  if (aIsInChrome || !nameSpaceManager->mMathMLDisabled) {
30
0
    SVG_SUPPORTED_EXTENSION("http://www.w3.org/1998/Math/MathML")
31
0
  }
32
0
#undef SVG_SUPPORTED_EXTENSION
33
0
34
0
  return false;
35
0
}