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

Side by Side Diff: Source/core/css/WebKitCSSSVGDocumentValue.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
« no previous file with comments | « Source/core/css/StyleRuleImport.cpp ('k') | Source/core/css/WebKitCSSShaderValue.cpp » ('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 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 { 48 {
49 } 49 }
50 50
51 CachedSVGDocument* WebKitCSSSVGDocumentValue::load(CachedResourceLoader* loader) 51 CachedSVGDocument* WebKitCSSSVGDocumentValue::load(CachedResourceLoader* loader)
52 { 52 {
53 ASSERT(loader); 53 ASSERT(loader);
54 54
55 if (!m_loadRequested) { 55 if (!m_loadRequested) {
56 m_loadRequested = true; 56 m_loadRequested = true;
57 57
58 CachedResourceRequest request(ResourceRequest(loader->document()->comple teURL(m_url))); 58 CachedResourceRequest request(ResourceRequest(loader->document()->comple teURL(m_url)), cachedResourceRequestInitiators().css);
59 request.setInitiator(cachedResourceRequestInitiators().css);
60 m_document = loader->requestSVGDocument(request); 59 m_document = loader->requestSVGDocument(request);
61 } 60 }
62 61
63 return m_document.get(); 62 return m_document.get();
64 } 63 }
65 64
66 String WebKitCSSSVGDocumentValue::customCssText() const 65 String WebKitCSSSVGDocumentValue::customCssText() const
67 { 66 {
68 return quoteCSSStringIfNeeded(m_url); 67 return quoteCSSStringIfNeeded(m_url);
69 } 68 }
70 69
71 bool WebKitCSSSVGDocumentValue::equals(const WebKitCSSSVGDocumentValue& other) c onst 70 bool WebKitCSSSVGDocumentValue::equals(const WebKitCSSSVGDocumentValue& other) c onst
72 { 71 {
73 return m_url == other.m_url; 72 return m_url == other.m_url;
74 } 73 }
75 74
76 void WebKitCSSSVGDocumentValue::reportDescendantMemoryUsage(MemoryObjectInfo* me moryObjectInfo) const 75 void WebKitCSSSVGDocumentValue::reportDescendantMemoryUsage(MemoryObjectInfo* me moryObjectInfo) const
77 { 76 {
78 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); 77 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
79 info.addMember(m_url, "url"); 78 info.addMember(m_url, "url");
80 // FIXME: add m_document when cached resources are instrumented. 79 // FIXME: add m_document when cached resources are instrumented.
81 } 80 }
82 81
83 } // namespace WebCore 82 } // namespace WebCore
84 83
85 #endif // ENABLE(SVG) 84 #endif // ENABLE(SVG)
OLDNEW
« no previous file with comments | « Source/core/css/StyleRuleImport.cpp ('k') | Source/core/css/WebKitCSSShaderValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698