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"
15 class StyleParserState
;
19 class InspectorCSSParser final
: public NonRefcountedDOMObject
{
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
);
38 const nsCString mInput
;
39 StyleParserState
* mParserState
;
40 uint32_t mLineNumber
= 0;
41 uint32_t mColumnNumber
= 0;
45 } // namespace mozilla
47 #endif /* InspectorCSSParser_h___ */