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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 const String CSSStyleSheetResource::sheetText( | 108 const String CSSStyleSheetResource::sheetText( |
109 MIMETypeCheck mimeTypeCheck) const { | 109 MIMETypeCheck mimeTypeCheck) const { |
110 if (!canUseSheet(mimeTypeCheck)) | 110 if (!canUseSheet(mimeTypeCheck)) |
111 return String(); | 111 return String(); |
112 | 112 |
113 // Use cached decoded sheet text when available | 113 // Use cached decoded sheet text when available |
114 if (!m_decodedSheetText.isNull()) { | 114 if (!m_decodedSheetText.isNull()) { |
115 // We should have the decoded sheet text cached when the resource is fully | 115 // We should have the decoded sheet text cached when the resource is fully |
116 // loaded. | 116 // loaded. |
117 DCHECK_EQ(getStatus(), Resource::Cached); | 117 DCHECK_EQ(getStatus(), ResourceStatus::Cached); |
118 | 118 |
119 return m_decodedSheetText; | 119 return m_decodedSheetText; |
120 } | 120 } |
121 | 121 |
122 if (!data() || data()->isEmpty()) | 122 if (!data() || data()->isEmpty()) |
123 return String(); | 123 return String(); |
124 | 124 |
125 return decodedText(); | 125 return decodedText(); |
126 } | 126 } |
127 | 127 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 } | 225 } |
226 | 226 |
227 void CSSStyleSheetResource::updateDecodedSize() { | 227 void CSSStyleSheetResource::updateDecodedSize() { |
228 size_t decodedSize = m_decodedSheetText.charactersSizeInBytes(); | 228 size_t decodedSize = m_decodedSheetText.charactersSizeInBytes(); |
229 if (m_parsedStyleSheetCache) | 229 if (m_parsedStyleSheetCache) |
230 decodedSize += m_parsedStyleSheetCache->estimatedSizeInBytes(); | 230 decodedSize += m_parsedStyleSheetCache->estimatedSizeInBytes(); |
231 setDecodedSize(decodedSize); | 231 setDecodedSize(decodedSize); |
232 } | 232 } |
233 | 233 |
234 } // namespace blink | 234 } // namespace blink |
OLD | NEW |