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

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

Issue 2031973002: Move StyleSheetResourceClient to Oilpan heap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/StyleSheetResourceClient.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 void requestStyleSheet(); 52 void requestStyleSheet();
53 53
54 DECLARE_TRACE_AFTER_DISPATCH(); 54 DECLARE_TRACE_AFTER_DISPATCH();
55 55
56 private: 56 private:
57 // FIXME: inherit from StyleSheetResourceClient directly to eliminate back p ointer, as there are no space savings in this. 57 // FIXME: inherit from StyleSheetResourceClient directly to eliminate back p ointer, as there are no space savings in this.
58 // NOTE: We put the StyleSheetResourceClient in a member instead of inheriti ng from it 58 // NOTE: We put the StyleSheetResourceClient in a member instead of inheriti ng from it
59 // to avoid adding a vptr to StyleRuleImport. 59 // to avoid adding a vptr to StyleRuleImport.
60 class ImportedStyleSheetClient final : public GarbageCollectedFinalized<Impo rtedStyleSheetClient>, public StyleSheetResourceClient { 60 class ImportedStyleSheetClient final : public GarbageCollectedFinalized<Impo rtedStyleSheetClient>, public StyleSheetResourceClient {
61 USING_GARBAGE_COLLECTED_MIXIN(ImportedStyleSheetClient);
61 public: 62 public:
62 ImportedStyleSheetClient(StyleRuleImport* ownerRule) : m_ownerRule(owner Rule) { } 63 ImportedStyleSheetClient(StyleRuleImport* ownerRule) : m_ownerRule(owner Rule) { }
63 ~ImportedStyleSheetClient() override { } 64 ~ImportedStyleSheetClient() override { }
64 void setCSSStyleSheet(const String& href, const KURL& baseURL, const Str ing& charset, const CSSStyleSheetResource* sheet) override 65 void setCSSStyleSheet(const String& href, const KURL& baseURL, const Str ing& charset, const CSSStyleSheetResource* sheet) override
65 { 66 {
66 m_ownerRule->setCSSStyleSheet(href, baseURL, charset, sheet); 67 m_ownerRule->setCSSStyleSheet(href, baseURL, charset, sheet);
67 } 68 }
68 String debugName() const override { return "ImportedStyleSheetClient"; } 69 String debugName() const override { return "ImportedStyleSheetClient"; }
69 70
70 DEFINE_INLINE_TRACE() 71 DEFINE_INLINE_TRACE()
71 { 72 {
72 visitor->trace(m_ownerRule); 73 visitor->trace(m_ownerRule);
74 StyleSheetResourceClient::trace(visitor);
73 } 75 }
74 76
75 private: 77 private:
76 Member<StyleRuleImport> m_ownerRule; 78 Member<StyleRuleImport> m_ownerRule;
77 }; 79 };
78 80
79 void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CSSStyleSheetResource*); 81 void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CSSStyleSheetResource*);
80 82
81 StyleRuleImport(const String& href, MediaQuerySet*); 83 StyleRuleImport(const String& href, MediaQuerySet*);
82 84
83 void dispose(); 85 void dispose();
84 86
85 Member<StyleSheetContents> m_parentStyleSheet; 87 Member<StyleSheetContents> m_parentStyleSheet;
86 88
87 Member<ImportedStyleSheetClient> m_styleSheetClient; 89 Member<ImportedStyleSheetClient> m_styleSheetClient;
88 String m_strHref; 90 String m_strHref;
89 Member<MediaQuerySet> m_mediaQueries; 91 Member<MediaQuerySet> m_mediaQueries;
90 Member<StyleSheetContents> m_styleSheet; 92 Member<StyleSheetContents> m_styleSheet;
91 Member<CSSStyleSheetResource> m_resource; 93 Member<CSSStyleSheetResource> m_resource;
92 bool m_loading; 94 bool m_loading;
93 }; 95 };
94 96
95 DEFINE_STYLE_RULE_TYPE_CASTS(Import); 97 DEFINE_STYLE_RULE_TYPE_CASTS(Import);
96 98
97 } // namespace blink 99 } // namespace blink
98 100
99 #endif 101 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/StyleSheetResourceClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698