/work/obj-fuzz/dist/include/mozilla/DocumentStyleRootIterator.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 file, |
5 | | * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #ifndef DocumentStyleRootIterator_h |
8 | | #define DocumentStyleRootIterator_h |
9 | | |
10 | | #include "nsTArray.h" |
11 | | |
12 | | class nsIContent; |
13 | | class nsIDocument; |
14 | | class nsINode; |
15 | | |
16 | | namespace mozilla { |
17 | | |
18 | | namespace dom { |
19 | | class Element; |
20 | | } // namespace dom |
21 | | |
22 | | /** |
23 | | * DocumentStyleRootIterator traverses the roots of the document from the |
24 | | * perspective of the Servo-backed style system. In the general case, this |
25 | | * will first traverse the document root, followed by any document level |
26 | | * native anonymous content. |
27 | | * |
28 | | * If the caller passes an element to the constructor rather than the document, |
29 | | * that element (and nothing else) is returned from GetNextStyleRoot. |
30 | | */ |
31 | | class DocumentStyleRootIterator |
32 | | { |
33 | | public: |
34 | | explicit DocumentStyleRootIterator(nsINode* aStyleRoot); |
35 | 0 | ~DocumentStyleRootIterator() { MOZ_COUNT_DTOR(DocumentStyleRootIterator); } |
36 | | |
37 | | dom::Element* GetNextStyleRoot(); |
38 | | |
39 | | private: |
40 | | AutoTArray<nsIContent*, 8> mStyleRoots; |
41 | | uint32_t mPosition; |
42 | | }; |
43 | | |
44 | | } // namespace mozilla |
45 | | |
46 | | #endif // DocumentStyleRootIterator_h |