OLD | NEW |
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 Loading... |
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) |
OLD | NEW |