Chromium Code Reviews| Index: Source/core/fetch/CSSStyleSheetResource.h |
| diff --git a/Source/core/fetch/CSSStyleSheetResource.h b/Source/core/fetch/CSSStyleSheetResource.h |
| index 83aabcd22871e5064279dcdfd8a4ec5411234099..cda03c443e588d56c2afcdf15a86518153c83666 100644 |
| --- a/Source/core/fetch/CSSStyleSheetResource.h |
| +++ b/Source/core/fetch/CSSStyleSheetResource.h |
| @@ -28,6 +28,10 @@ |
| #include "core/fetch/ResourcePtr.h" |
| #include "core/fetch/StyleSheetResource.h" |
| +#include "core/html/parser/BackgroundHTMLInputStream.h" |
| +#include "core/html/parser/CSSPreloadScanner.h" |
| +#include "core/html/parser/HTMLParserOptions.h" |
| +#include "core/html/parser/HTMLTokenizer.h" |
|
abarth-chromium
2014/02/15 18:48:48
Woah there. Fetch shouldn't need to know about an
|
| namespace WebCore { |
| @@ -38,7 +42,7 @@ class TextResourceDecoder; |
| class CSSStyleSheetResource FINAL : public StyleSheetResource { |
| public: |
| - CSSStyleSheetResource(const ResourceRequest&, const String& charset); |
| + CSSStyleSheetResource(const ResourceRequest&, const String& charset, Document*); |
|
abarth-chromium
2014/02/15 18:48:48
Resources shouldn't be specific to documents.
|
| virtual ~CSSStyleSheetResource(); |
| const String sheetText(bool enforceMIMEType = true, bool* hasValidMIMEType = 0) const; |
| @@ -54,11 +58,20 @@ public: |
| private: |
| bool canUseSheet(bool enforceMIMEType, bool* hasValidMIMEType) const; |
| virtual void checkNotify() OVERRIDE; |
| + virtual void appendData(const char*, int); |
| + void prescan(const char* data); |
| OwnPtr<TextResourceDecoder> m_decoder; |
| String m_decodedSheetText; |
| RefPtr<StyleSheetContents> m_parsedStyleSheetCache; |
| + HTMLParserOptions m_options; |
| + OwnPtr<HTMLTokenizer> m_tokenizer; |
|
eseidel
2014/02/14 12:15:41
This seems wrong. Do other resources own a Tokeni
eseidel
2014/02/14 12:16:57
Why would each resource want its own tokenizer/sca
|
| + OwnPtr<CSSPreloadScanner> m_preloadScanner; |
| + OwnPtr<BackgroundHTMLInputStream> m_input; |
| + OwnPtr<HTMLToken> m_token; |
| + OwnPtr<HTMLResourcePreloader> m_preloader; |
| + bool m_prescan; |
| }; |
| DEFINE_RESOURCE_TYPE_CASTS(CSSStyleSheet); |