| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 #include "core/css/CSSParser.h" | 24 #include "core/css/CSSParser.h" |
| 25 #include "core/css/CSSStyleSheet.h" | 25 #include "core/css/CSSStyleSheet.h" |
| 26 #include "core/css/MediaList.h" | 26 #include "core/css/MediaList.h" |
| 27 #include "core/css/StylePropertySet.h" | 27 #include "core/css/StylePropertySet.h" |
| 28 #include "core/css/StyleRule.h" | 28 #include "core/css/StyleRule.h" |
| 29 #include "core/css/StyleRuleImport.h" | 29 #include "core/css/StyleRuleImport.h" |
| 30 #include "core/dom/Node.h" | 30 #include "core/dom/Node.h" |
| 31 #include "core/fetch/CSSStyleSheetResource.h" | 31 #include "core/fetch/CSSStyleSheetResource.h" |
| 32 #include "platform/TraceEvent.h" | 32 #include "platform/TraceEvent.h" |
| 33 #include "weborigin/SecurityOrigin.h" | 33 #include "platform/weborigin/SecurityOrigin.h" |
| 34 #include "wtf/Deque.h" | 34 #include "wtf/Deque.h" |
| 35 | 35 |
| 36 namespace WebCore { | 36 namespace WebCore { |
| 37 | 37 |
| 38 // Rough size estimate for the memory cache. | 38 // Rough size estimate for the memory cache. |
| 39 unsigned StyleSheetContents::estimatedSizeInBytes() const | 39 unsigned StyleSheetContents::estimatedSizeInBytes() const |
| 40 { | 40 { |
| 41 // Note that this does not take into account size of the strings hanging fro
m various objects. | 41 // Note that this does not take into account size of the strings hanging fro
m various objects. |
| 42 // The assumption is that nearly all of of them are atomic and would exist a
nyway. | 42 // The assumption is that nearly all of of them are atomic and would exist a
nyway. |
| 43 unsigned size = sizeof(*this); | 43 unsigned size = sizeof(*this); |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 m_isInMemoryCache = false; | 504 m_isInMemoryCache = false; |
| 505 } | 505 } |
| 506 | 506 |
| 507 void StyleSheetContents::shrinkToFit() | 507 void StyleSheetContents::shrinkToFit() |
| 508 { | 508 { |
| 509 m_importRules.shrinkToFit(); | 509 m_importRules.shrinkToFit(); |
| 510 m_childRules.shrinkToFit(); | 510 m_childRules.shrinkToFit(); |
| 511 } | 511 } |
| 512 | 512 |
| 513 } | 513 } |
| OLD | NEW |