diff options
Diffstat (limited to 'Source/WebCore/css/StyleSheetContents.h')
-rw-r--r-- | Source/WebCore/css/StyleSheetContents.h | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/Source/WebCore/css/StyleSheetContents.h b/Source/WebCore/css/StyleSheetContents.h index af0b294d5..c1ed0d51a 100644 --- a/Source/WebCore/css/StyleSheetContents.h +++ b/Source/WebCore/css/StyleSheetContents.h @@ -44,15 +44,11 @@ class StyleSheetContents : public RefCounted<StyleSheetContents> { public: static PassRefPtr<StyleSheetContents> create(const CSSParserContext& context = CSSParserContext(CSSStrictMode)) { - return adoptRef(new StyleSheetContents(0, String(), context)); + return adoptRef(new StyleSheetContents(String(), context)); } static PassRefPtr<StyleSheetContents> create(const String& originalURL, const CSSParserContext& context) { - return adoptRef(new StyleSheetContents(0, originalURL, context)); - } - static PassRefPtr<StyleSheetContents> create(StyleRuleImport* ownerRule, const String& originalURL, const CSSParserContext& context) - { - return adoptRef(new StyleSheetContents(ownerRule, originalURL, context)); + return adoptRef(new StyleSheetContents(originalURL, context)); } ~StyleSheetContents(); @@ -61,7 +57,7 @@ public: const AtomicString& determineNamespace(const AtomicString& prefix); - void parseAuthorStyleSheet(const CachedCSSStyleSheet*, const SecurityOrigin*); + void parseAuthorStyleSheet(const CachedCSSStyleSheet*, CSSStyleSheet* rootSheet); bool parseString(const String&); bool parseStringAtLine(const String&, int startLineNumber); @@ -69,12 +65,7 @@ public: bool isLoading() const; - void checkLoaded(); - void startLoadingDynamicSheet(); - - StyleSheetContents* rootStyleSheet() const; - Node* singleOwnerNode() const; - Document* singleOwnerDocument() const; + void checkLoadCompleted(); const String& charset() const { return m_parserContext.charset; } @@ -102,12 +93,8 @@ public: const Vector<RefPtr<StyleRuleBase> >& childRules() const { return m_childRules; } const Vector<RefPtr<StyleRuleImport> >& importRules() const { return m_importRules; } - void notifyLoadedSheet(const CachedCSSStyleSheet*); - - StyleSheetContents* parentStyleSheet() const; - StyleRuleImport* ownerRule() const { return m_ownerRule; } - void clearOwnerRule() { m_ownerRule = 0; } - + bool hasImportCycle(const StyleRuleImport* importRule, const KURL& importURL, const KURL& documentBaseURL) const; + // Note that href is the URL that started the redirect chain that led to // this style sheet. This property probably isn't useful for much except // the JavaScript binding (which needs to use this value for security). @@ -124,6 +111,8 @@ public: bool wrapperInsertRule(PassRefPtr<StyleRuleBase>, unsigned index); void wrapperDeleteRule(unsigned index); + void requestImportedStyleSheets(CSSStyleSheet* rootSheet); + PassRefPtr<StyleSheetContents> copy() const { return adoptRef(new StyleSheetContents(*this)); } void registerClient(CSSStyleSheet*); @@ -140,12 +129,13 @@ public: void reportMemoryUsage(MemoryObjectInfo*) const; private: - StyleSheetContents(StyleRuleImport* ownerRule, const String& originalURL, const CSSParserContext&); + StyleSheetContents(const String& originalURL, const CSSParserContext&); StyleSheetContents(const StyleSheetContents&); void clearCharsetRule(); - StyleRuleImport* m_ownerRule; + bool checkImportedSheetLoadCompleted(); + bool getAncestors(const StyleRuleImport*, Vector<const StyleSheetContents*>& result) const; String m_originalURL; |