/work/obj-fuzz/dist/include/mozilla/StyleSheetInlines.h
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 | | #ifndef mozilla_StyleSheetInlines_h |
8 | | #define mozilla_StyleSheetInlines_h |
9 | | |
10 | | #include "mozilla/StyleSheet.h" |
11 | | #include "nsINode.h" |
12 | | |
13 | | namespace mozilla { |
14 | | |
15 | | void |
16 | | StyleSheet::SetURIs(nsIURI* aSheetURI, |
17 | | nsIURI* aOriginalSheetURI, |
18 | | nsIURI* aBaseURI) |
19 | 0 | { |
20 | 0 | MOZ_ASSERT(aSheetURI && aBaseURI, "null ptr"); |
21 | 0 | MOZ_ASSERT(!HasRules() && !IsComplete(), |
22 | 0 | "Can't call SetURIs on sheets that are complete or have rules"); |
23 | 0 | StyleSheetInfo& info = Inner(); |
24 | 0 | info.mSheetURI = aSheetURI; |
25 | 0 | info.mOriginalSheetURI = aOriginalSheetURI; |
26 | 0 | info.mBaseURI = aBaseURI; |
27 | 0 | } |
28 | | |
29 | | dom::ParentObject |
30 | | StyleSheet::GetParentObject() const |
31 | 0 | { |
32 | 0 | if (mOwningNode) { |
33 | 0 | return dom::ParentObject(mOwningNode); |
34 | 0 | } |
35 | 0 | return dom::ParentObject(mParent); |
36 | 0 | } |
37 | | |
38 | | } |
39 | | |
40 | | #endif // mozilla_StyleSheetInlines_h |