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

Side by Side Diff: Source/core/css/WebKitCSSShaderValue.cpp

Issue 14672042: Prepare to add more initiator info to CachedResource(Request) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 7 years, 7 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 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return loader->document()->completeURL(m_url); 59 return loader->document()->completeURL(m_url);
60 } 60 }
61 61
62 StyleCachedShader* WebKitCSSShaderValue::cachedShader(CachedResourceLoader* load er) 62 StyleCachedShader* WebKitCSSShaderValue::cachedShader(CachedResourceLoader* load er)
63 { 63 {
64 ASSERT(loader); 64 ASSERT(loader);
65 65
66 if (!m_accessedShader) { 66 if (!m_accessedShader) {
67 m_accessedShader = true; 67 m_accessedShader = true;
68 68
69 CachedResourceRequest request(ResourceRequest(completeURL(loader))); 69 CachedResourceRequest request(ResourceRequest(completeURL(loader)), cach edResourceRequestInitiators().css);
70 request.setInitiator(cachedResourceRequestInitiators().css);
71 if (CachedResourceHandle<CachedShader> cachedShader = loader->requestSha der(request)) 70 if (CachedResourceHandle<CachedShader> cachedShader = loader->requestSha der(request))
72 m_shader = StyleCachedShader::create(cachedShader.get()); 71 m_shader = StyleCachedShader::create(cachedShader.get());
73 } 72 }
74 73
75 return (m_shader && m_shader->isCachedShader()) ? static_cast<StyleCachedSha der*>(m_shader.get()) : 0; 74 return (m_shader && m_shader->isCachedShader()) ? static_cast<StyleCachedSha der*>(m_shader.get()) : 0;
76 } 75 }
77 76
78 StyleShader* WebKitCSSShaderValue::cachedOrPendingShader() 77 StyleShader* WebKitCSSShaderValue::cachedOrPendingShader()
79 { 78 {
80 if (!m_shader) 79 if (!m_shader)
(...skipping 23 matching lines...) Expand all
104 103
105 void WebKitCSSShaderValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryO bjectInfo) const 104 void WebKitCSSShaderValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryO bjectInfo) const
106 { 105 {
107 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); 106 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
108 info.addMember(m_url, "url"); 107 info.addMember(m_url, "url");
109 info.addMember(m_format, "format"); 108 info.addMember(m_format, "format");
110 } 109 }
111 110
112 } // namespace WebCore 111 } // namespace WebCore
113 112
OLDNEW
« no previous file with comments | « Source/core/css/WebKitCSSSVGDocumentValue.cpp ('k') | Source/core/dom/ProcessingInstruction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698