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/. */
7 #ifndef DocumentStyleRootIterator_h
8 #define DocumentStyleRootIterator_h
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.
28 * If the caller passes an element to the constructor rather than the document,
29 * that element (and nothing else) is returned from GetNextStyleRoot.
31 class DocumentStyleRootIterator
{
33 explicit DocumentStyleRootIterator(nsINode
* aStyleRoot
);
34 MOZ_COUNTED_DTOR(DocumentStyleRootIterator
)
36 dom::Element
* GetNextStyleRoot();
39 AutoTArray
<nsIContent
*, 8> mStyleRoots
;
43 } // namespace mozilla
45 #endif // DocumentStyleRootIterator_h