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

Side by Side Diff: third_party/WebKit/Source/core/loader/LinkPreloadResourceClients.h

Issue 2290983003: CSSStyleSheetResource should cache decoded text instead of raw bytes (Closed)
Patch Set: Created 4 years, 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LinkPreloadResourceClients_h 5 #ifndef LinkPreloadResourceClients_h
6 #define LinkPreloadResourceClients_h 6 #define LinkPreloadResourceClients_h
7 7
8 #include "core/fetch/CSSStyleSheetResource.h" 8 #include "core/fetch/CSSStyleSheetResource.h"
9 #include "core/fetch/FontResource.h" 9 #include "core/fetch/FontResource.h"
10 #include "core/fetch/ImageResource.h" 10 #include "core/fetch/ImageResource.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 static LinkPreloadStyleResourceClient* create(LinkLoader* loader, CSSStyleSh eetResource* resource) 80 static LinkPreloadStyleResourceClient* create(LinkLoader* loader, CSSStyleSh eetResource* resource)
81 { 81 {
82 return new LinkPreloadStyleResourceClient(loader, resource); 82 return new LinkPreloadStyleResourceClient(loader, resource);
83 } 83 }
84 84
85 virtual String debugName() const { return "LinkPreloadStyle"; } 85 virtual String debugName() const { return "LinkPreloadStyle"; }
86 virtual ~LinkPreloadStyleResourceClient() { } 86 virtual ~LinkPreloadStyleResourceClient() { }
87 87
88 void clear() override { clearResource(); } 88 void clear() override { clearResource(); }
89 89
90 void setCSSStyleSheet(const String&, const KURL&, const String&, const CSSSt yleSheetResource* resource) override 90 void setCSSStyleSheet(const String&, const KURL&, const String&, CSSStyleShe etResource* resource) override
91 { 91 {
92 ASSERT(this->resource() == resource); 92 ASSERT(this->resource() == resource);
93 triggerEvents(static_cast<const Resource*>(resource)); 93 triggerEvents(static_cast<const Resource*>(resource));
94 } 94 }
95 95
96 DEFINE_INLINE_VIRTUAL_TRACE() 96 DEFINE_INLINE_VIRTUAL_TRACE()
97 { 97 {
98 LinkPreloadResourceClient::trace(visitor); 98 LinkPreloadResourceClient::trace(visitor);
99 ResourceOwner<CSSStyleSheetResource, StyleSheetResourceClient>::trace(vi sitor); 99 ResourceOwner<CSSStyleSheetResource, StyleSheetResourceClient>::trace(vi sitor);
100 } 100 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 LinkPreloadRawResourceClient(LinkLoader* loader, RawResource* resource) 202 LinkPreloadRawResourceClient(LinkLoader* loader, RawResource* resource)
203 : LinkPreloadResourceClient(loader) 203 : LinkPreloadResourceClient(loader)
204 { 204 {
205 setResource(resource); 205 setResource(resource);
206 } 206 }
207 }; 207 };
208 208
209 } // namespace blink 209 } // namespace blink
210 210
211 #endif // LinkPreloadResourceClients_h 211 #endif // LinkPreloadResourceClients_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698