| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
| 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. | 6 Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 #include "core/loader/cache/CachedCSSStyleSheet.h" | 28 #include "core/loader/cache/CachedCSSStyleSheet.h" |
| 29 | 29 |
| 30 #include "core/css/StyleSheetContents.h" | 30 #include "core/css/StyleSheetContents.h" |
| 31 #include "core/dom/WebCoreMemoryInstrumentation.h" | 31 #include "core/dom/WebCoreMemoryInstrumentation.h" |
| 32 #include "core/loader/TextResourceDecoder.h" | 32 #include "core/loader/TextResourceDecoder.h" |
| 33 #include "core/loader/cache/CachedResourceClientWalker.h" | 33 #include "core/loader/cache/CachedResourceClientWalker.h" |
| 34 #include "core/loader/cache/CachedStyleSheetClient.h" | 34 #include "core/loader/cache/CachedStyleSheetClient.h" |
| 35 #include "core/loader/cache/MemoryCache.h" | |
| 36 #include "core/platform/SharedBuffer.h" | 35 #include "core/platform/SharedBuffer.h" |
| 37 #include "core/platform/network/HTTPParsers.h" | 36 #include "core/platform/network/HTTPParsers.h" |
| 38 #include <wtf/CurrentTime.h> | 37 #include "wtf/CurrentTime.h" |
| 39 #include <wtf/Vector.h> | 38 #include "wtf/Vector.h" |
| 40 | 39 |
| 41 namespace WebCore { | 40 namespace WebCore { |
| 42 | 41 |
| 43 CachedCSSStyleSheet::CachedCSSStyleSheet(const ResourceRequest& resourceRequest,
const String& charset) | 42 CachedCSSStyleSheet::CachedCSSStyleSheet(const ResourceRequest& resourceRequest,
const String& charset) |
| 44 : CachedResource(resourceRequest, CSSStyleSheet) | 43 : CachedResource(resourceRequest, CSSStyleSheet) |
| 45 , m_decoder(TextResourceDecoder::create("text/css", charset)) | 44 , m_decoder(TextResourceDecoder::create("text/css", charset)) |
| 46 { | 45 { |
| 47 DEFINE_STATIC_LOCAL(const AtomicString, acceptCSS, ("text/css,*/*;q=0.1", At
omicString::ConstructFromLiteral)); | 46 DEFINE_STATIC_LOCAL(const AtomicString, acceptCSS, ("text/css,*/*;q=0.1", At
omicString::ConstructFromLiteral)); |
| 48 | 47 |
| 49 // Prefer text/css but accept any type (dell.com serves a stylesheet | 48 // Prefer text/css but accept any type (dell.com serves a stylesheet |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 void CachedCSSStyleSheet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo)
const | 184 void CachedCSSStyleSheet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo)
const |
| 186 { | 185 { |
| 187 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResou
rceCSS); | 186 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResou
rceCSS); |
| 188 CachedResource::reportMemoryUsage(memoryObjectInfo); | 187 CachedResource::reportMemoryUsage(memoryObjectInfo); |
| 189 info.addMember(m_decoder, "decoder"); | 188 info.addMember(m_decoder, "decoder"); |
| 190 info.addMember(m_parsedStyleSheetCache, "parsedStyleSheetCache"); | 189 info.addMember(m_parsedStyleSheetCache, "parsedStyleSheetCache"); |
| 191 info.addMember(m_decodedSheetText, "decodedSheetText"); | 190 info.addMember(m_decodedSheetText, "decodedSheetText"); |
| 192 } | 191 } |
| 193 | 192 |
| 194 } | 193 } |
| OLD | NEW |