| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 return decodedText(); | 97 return decodedText(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void CSSStyleSheetResource::checkNotify() | 100 void CSSStyleSheetResource::checkNotify() |
| 101 { | 101 { |
| 102 // Decode the data to find out the encoding and keep the sheet text around d
uring checkNotify() | 102 // Decode the data to find out the encoding and keep the sheet text around d
uring checkNotify() |
| 103 if (data()) | 103 if (data()) |
| 104 m_decodedSheetText = decodedText(); | 104 m_decodedSheetText = decodedText(); |
| 105 | 105 |
| 106 ResourceClientWalker<StyleSheetResourceClient> w(clients()); | 106 ResourceClientWalker<StyleSheetResourceClient> w(clients()); |
| 107 while (StyleSheetResourceClient* c = w.next()) | 107 while (StyleSheetResourceClient* c = w.next()) { |
| 108 markClientFinished(c); |
| 108 c->setCSSStyleSheet(resourceRequest().url(), response().url(), encoding(
), this); | 109 c->setCSSStyleSheet(resourceRequest().url(), response().url(), encoding(
), this); |
| 110 } |
| 109 // Clear the decoded text as it is unlikely to be needed immediately again a
nd is cheap to regenerate. | 111 // Clear the decoded text as it is unlikely to be needed immediately again a
nd is cheap to regenerate. |
| 110 m_decodedSheetText = String(); | 112 m_decodedSheetText = String(); |
| 111 } | 113 } |
| 112 | 114 |
| 113 void CSSStyleSheetResource::destroyDecodedDataIfPossible() | 115 void CSSStyleSheetResource::destroyDecodedDataIfPossible() |
| 114 { | 116 { |
| 115 if (!m_parsedStyleSheetCache) | 117 if (!m_parsedStyleSheetCache) |
| 116 return; | 118 return; |
| 117 | 119 |
| 118 setParsedStyleSheetCache(nullptr); | 120 setParsedStyleSheetCache(nullptr); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 // This stylesheet resource did conflict with another resource and was | 168 // This stylesheet resource did conflict with another resource and was |
| 167 // not added to the cache. | 169 // not added to the cache. |
| 168 setParsedStyleSheetCache(nullptr); | 170 setParsedStyleSheetCache(nullptr); |
| 169 return; | 171 return; |
| 170 } | 172 } |
| 171 setParsedStyleSheetCache(sheet); | 173 setParsedStyleSheetCache(sheet); |
| 172 setDecodedSize(m_parsedStyleSheetCache->estimatedSizeInBytes()); | 174 setDecodedSize(m_parsedStyleSheetCache->estimatedSizeInBytes()); |
| 173 } | 175 } |
| 174 | 176 |
| 175 } // namespace blink | 177 } // namespace blink |
| OLD | NEW |