Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/layout/style/DeclarationBlock.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/DeclarationBlock.h"
8
9
#include "mozilla/ServoBindings.h"
10
11
#include "nsCSSProps.h"
12
13
namespace mozilla {
14
15
/* static */ already_AddRefed<DeclarationBlock>
16
DeclarationBlock::FromCssText(const nsAString& aCssText,
17
                              URLExtraData* aExtraData,
18
                              nsCompatibility aMode,
19
                              css::Loader* aLoader)
20
0
{
21
0
  NS_ConvertUTF16toUTF8 value(aCssText);
22
0
  RefPtr<RawServoDeclarationBlock> raw =
23
0
      Servo_ParseStyleAttribute(&value, aExtraData, aMode, aLoader).Consume();
24
0
  RefPtr<DeclarationBlock> decl = new DeclarationBlock(raw.forget());
25
0
  return decl.forget();
26
0
}
27
28
} // namespace mozilla