Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(534)

Side by Side Diff: Source/core/css/StyleRuleImport.h

Issue 170283019: Change various helper classes to transition types to get CSSValue entirely onto the gc heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and revert member to persistent in StorageEvent Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2002, 2006, 2008, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2002, 2006, 2008, 2012 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 18 matching lines...) Expand all
29 29
30 namespace WebCore { 30 namespace WebCore {
31 31
32 class CSSStyleSheetResource; 32 class CSSStyleSheetResource;
33 class MediaQuerySet; 33 class MediaQuerySet;
34 class StyleSheetContents; 34 class StyleSheetContents;
35 35
36 class StyleRuleImport : public StyleRuleBase { 36 class StyleRuleImport : public StyleRuleBase {
37 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; 37 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
38 public: 38 public:
39 static PassRefPtrWillBeRawPtr<StyleRuleImport> create(const String& href, Pa ssRefPtr<MediaQuerySet>); 39 static PassRefPtrWillBeRawPtr<StyleRuleImport> create(const String& href, Pa ssRefPtrWillBeRawPtr<MediaQuerySet>);
40 40
41 ~StyleRuleImport(); 41 ~StyleRuleImport();
42 42
43 StyleSheetContents* parentStyleSheet() const { return m_parentStyleSheet; } 43 StyleSheetContents* parentStyleSheet() const { return m_parentStyleSheet; }
44 void setParentStyleSheet(StyleSheetContents* sheet) { ASSERT(sheet); m_paren tStyleSheet = sheet; } 44 void setParentStyleSheet(StyleSheetContents* sheet) { ASSERT(sheet); m_paren tStyleSheet = sheet; }
45 void clearParentStyleSheet() { m_parentStyleSheet = nullptr; } 45 void clearParentStyleSheet() { m_parentStyleSheet = nullptr; }
46 46
47 String href() const { return m_strHref; } 47 String href() const { return m_strHref; }
48 StyleSheetContents* styleSheet() const { return m_styleSheet.get(); } 48 StyleSheetContents* styleSheet() const { return m_styleSheet.get(); }
49 49
(...skipping 16 matching lines...) Expand all
66 { 66 {
67 m_ownerRule->setCSSStyleSheet(href, baseURL, charset, sheet); 67 m_ownerRule->setCSSStyleSheet(href, baseURL, charset, sheet);
68 } 68 }
69 private: 69 private:
70 StyleRuleImport* m_ownerRule; 70 StyleRuleImport* m_ownerRule;
71 }; 71 };
72 72
73 void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CSSStyleSheetResource*); 73 void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CSSStyleSheetResource*);
74 friend class ImportedStyleSheetClient; 74 friend class ImportedStyleSheetClient;
75 75
76 StyleRuleImport(const String& href, PassRefPtr<MediaQuerySet>); 76 StyleRuleImport(const String& href, PassRefPtrWillBeRawPtr<MediaQuerySet>);
77 77
78 RawPtrWillBeMember<StyleSheetContents> m_parentStyleSheet; 78 RawPtrWillBeMember<StyleSheetContents> m_parentStyleSheet;
79 79
80 ImportedStyleSheetClient m_styleSheetClient; 80 ImportedStyleSheetClient m_styleSheetClient;
81 String m_strHref; 81 String m_strHref;
82 RefPtr<MediaQuerySet> m_mediaQueries; 82 RefPtrWillBeMember<MediaQuerySet> m_mediaQueries;
83 RefPtrWillBeMember<StyleSheetContents> m_styleSheet; 83 RefPtrWillBeMember<StyleSheetContents> m_styleSheet;
84 ResourcePtr<CSSStyleSheetResource> m_resource; 84 ResourcePtr<CSSStyleSheetResource> m_resource;
85 bool m_loading; 85 bool m_loading;
86 }; 86 };
87 87
88 DEFINE_STYLE_RULE_TYPE_CASTS(Import); 88 DEFINE_STYLE_RULE_TYPE_CASTS(Import);
89 89
90 } // namespace WebCore 90 } // namespace WebCore
91 91
92 #endif 92 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698