chromium/third_party/blink/renderer/core/css/parser/css_lazy_parsing_state.h

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_CSS_PARSER_CSS_LAZY_PARSING_STATE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_CSS_PARSER_CSS_LAZY_PARSING_STATE_H_

#include "third_party/blink/renderer/core/css/css_selector_list.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_mode.h"
#include "third_party/blink/renderer/core/css/style_sheet_contents.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"

namespace blink {

// This class helps lazy parsing by retaining necessary state. It should not
// outlive the StyleSheetContents that initiated the parse, as it retains a raw
// reference to the UseCounter associated with the style sheet.
//
// Note: This class holds an extra reference to the underlying stylesheet
// text, and will extend its lifetime until this class is garbage collected.
// Currently, the only strong references to this class are from individual lazy
// properties, so after an entire lazy sheet is parsed, the extra memory should
// be released.
class CSSLazyParsingState final : public GarbageCollected<CSSLazyParsingState> {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_CSS_PARSER_CSS_LAZY_PARSING_STATE_H_