Bug 1890277: part 1) Add CSP parser tests for `require-trusted-types-for`. r=tschuster
[gecko.git] / layout / inspector / InspectorCSSParser.h
blobe11bc9a8984af14d517cfbd842da3ba71f9d07cb
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/. */
7 #ifndef InspectorCSSParser_h___
8 #define InspectorCSSParser_h___
10 #include "mozilla/dom/InspectorUtilsBinding.h"
11 #include "mozilla/dom/NonRefcountedDOMObject.h"
13 namespace mozilla {
15 class StyleParserState;
17 namespace dom {
19 class InspectorCSSParser final : public NonRefcountedDOMObject {
20 public:
21 explicit InspectorCSSParser(const nsACString&);
22 // The WebIDL constructor.
23 static UniquePtr<InspectorCSSParser> Constructor(const GlobalObject& aGlobal,
24 const nsACString& aText);
26 ~InspectorCSSParser();
28 bool WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto,
29 JS::MutableHandle<JSObject*> aReflector) {
30 return InspectorCSSParser_Binding::Wrap(aCx, this, aGivenProto, aReflector);
33 uint32_t LineNumber() const;
34 uint32_t ColumnNumber() const;
35 void NextToken(Nullable<InspectorCSSToken>& aResult);
37 private:
38 const nsCString mInput;
39 StyleParserState* mParserState;
40 uint32_t mLineNumber = 0;
41 uint32_t mColumnNumber = 0;
44 } // namespace dom
45 } // namespace mozilla
47 #endif /* InspectorCSSParser_h___ */