| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 } | 74 } |
| 75 | 75 |
| 76 DEFINE_TRACE(CSSStyleSheetResource) | 76 DEFINE_TRACE(CSSStyleSheetResource) |
| 77 { | 77 { |
| 78 visitor->trace(m_parsedStyleSheetCache); | 78 visitor->trace(m_parsedStyleSheetCache); |
| 79 StyleSheetResource::trace(visitor); | 79 StyleSheetResource::trace(visitor); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void CSSStyleSheetResource::didAddClient(ResourceClient* c) | 82 void CSSStyleSheetResource::didAddClient(ResourceClient* c) |
| 83 { | 83 { |
| 84 ASSERT(c->resourceClientType() == StyleSheetResourceClient::expectedType()); | 84 ASSERT(c->getResourceClientType() == StyleSheetResourceClient::expectedType(
)); |
| 85 // Resource::didAddClient() must be before setCSSStyleSheet(), | 85 // Resource::didAddClient() must be before setCSSStyleSheet(), |
| 86 // because setCSSStyleSheet() may cause scripts to be executed, which could
destroy 'c' if it is an instance of HTMLLinkElement. | 86 // because setCSSStyleSheet() may cause scripts to be executed, which could
destroy 'c' if it is an instance of HTMLLinkElement. |
| 87 // see the comment of HTMLLinkElement::setCSSStyleSheet. | 87 // see the comment of HTMLLinkElement::setCSSStyleSheet. |
| 88 Resource::didAddClient(c); | 88 Resource::didAddClient(c); |
| 89 | 89 |
| 90 if (!isLoading()) | 90 if (!isLoading()) |
| 91 static_cast<StyleSheetResourceClient*>(c)->setCSSStyleSheet(m_resourceRe
quest.url(), m_response.url(), encoding(), this); | 91 static_cast<StyleSheetResourceClient*>(c)->setCSSStyleSheet(m_resourceRe
quest.url(), m_response.url(), encoding(), this); |
| 92 } | 92 } |
| 93 | 93 |
| 94 const String CSSStyleSheetResource::sheetText(MIMETypeCheck mimeTypeCheck) const | 94 const String CSSStyleSheetResource::sheetText(MIMETypeCheck mimeTypeCheck) const |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 if (m_parsedStyleSheetCache) | 185 if (m_parsedStyleSheetCache) |
| 186 m_parsedStyleSheetCache->removedFromMemoryCache(); | 186 m_parsedStyleSheetCache->removedFromMemoryCache(); |
| 187 m_parsedStyleSheetCache = sheet; | 187 m_parsedStyleSheetCache = sheet; |
| 188 m_parsedStyleSheetCache->addedToMemoryCache(); | 188 m_parsedStyleSheetCache->addedToMemoryCache(); |
| 189 | 189 |
| 190 setDecodedSize(m_parsedStyleSheetCache->estimatedSizeInBytes()); | 190 setDecodedSize(m_parsedStyleSheetCache->estimatedSizeInBytes()); |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace blink | 193 } // namespace blink |
| OLD | NEW |