Line data Source code
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 :
15 : namespace mozilla {
16 :
17 : namespace dom {
18 : class Element;
19 : } // namespace dom
20 :
21 : /**
22 : * DocumentStyleRootIterator traverses the roots of the document from the
23 : * perspective of the Servo-backed style system. This will first traverse
24 : * the document root, followed by any document level native anonymous content.
25 : */
26 : class DocumentStyleRootIterator
27 : {
28 : public:
29 : explicit DocumentStyleRootIterator(nsIDocument* aDocument);
30 0 : ~DocumentStyleRootIterator() { MOZ_COUNT_DTOR(DocumentStyleRootIterator); }
31 :
32 : dom::Element* GetNextStyleRoot();
33 :
34 : private:
35 : AutoTArray<nsIContent*, 8> mStyleRoots;
36 : uint32_t mPosition;
37 : };
38 :
39 : } // namespace mozilla
40 :
41 : #endif // DocumentStyleRootIterator_h
|