| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 if (StyleSheetContents* sheet = m_importRules[i]->styleSheet()) | 50 if (StyleSheetContents* sheet = m_importRules[i]->styleSheet()) |
| 51 size += sheet->estimatedSizeInBytes(); | 51 size += sheet->estimatedSizeInBytes(); |
| 52 } | 52 } |
| 53 return size; | 53 return size; |
| 54 } | 54 } |
| 55 | 55 |
| 56 StyleSheetContents::StyleSheetContents(StyleRuleImport* ownerRule, const String&
originalURL, const CSSParserContext& context) | 56 StyleSheetContents::StyleSheetContents(StyleRuleImport* ownerRule, const String&
originalURL, const CSSParserContext& context) |
| 57 : m_ownerRule(ownerRule) | 57 : m_ownerRule(ownerRule) |
| 58 , m_originalURL(originalURL) | 58 , m_originalURL(originalURL) |
| 59 , m_loadCompleted(false) | 59 , m_loadCompleted(false) |
| 60 , m_isUserStyleSheet(ownerRule && ownerRule->parentStyleSheet() && ownerRule
->parentStyleSheet()->isUserStyleSheet()) | |
| 61 , m_hasSyntacticallyValidCSSHeader(true) | 60 , m_hasSyntacticallyValidCSSHeader(true) |
| 62 , m_didLoadErrorOccur(false) | 61 , m_didLoadErrorOccur(false) |
| 63 , m_usesRemUnits(false) | 62 , m_usesRemUnits(false) |
| 64 , m_isMutable(false) | 63 , m_isMutable(false) |
| 65 , m_isInMemoryCache(false) | 64 , m_isInMemoryCache(false) |
| 66 , m_parserContext(context) | 65 , m_parserContext(context) |
| 67 { | 66 { |
| 68 } | 67 } |
| 69 | 68 |
| 70 StyleSheetContents::StyleSheetContents(const StyleSheetContents& o) | 69 StyleSheetContents::StyleSheetContents(const StyleSheetContents& o) |
| 71 : RefCounted<StyleSheetContents>() | 70 : RefCounted<StyleSheetContents>() |
| 72 , m_ownerRule(0) | 71 , m_ownerRule(0) |
| 73 , m_originalURL(o.m_originalURL) | 72 , m_originalURL(o.m_originalURL) |
| 74 , m_encodingFromCharsetRule(o.m_encodingFromCharsetRule) | 73 , m_encodingFromCharsetRule(o.m_encodingFromCharsetRule) |
| 75 , m_importRules(o.m_importRules.size()) | 74 , m_importRules(o.m_importRules.size()) |
| 76 , m_childRules(o.m_childRules.size()) | 75 , m_childRules(o.m_childRules.size()) |
| 77 , m_namespaces(o.m_namespaces) | 76 , m_namespaces(o.m_namespaces) |
| 78 , m_loadCompleted(true) | 77 , m_loadCompleted(true) |
| 79 , m_isUserStyleSheet(o.m_isUserStyleSheet) | |
| 80 , m_hasSyntacticallyValidCSSHeader(o.m_hasSyntacticallyValidCSSHeader) | 78 , m_hasSyntacticallyValidCSSHeader(o.m_hasSyntacticallyValidCSSHeader) |
| 81 , m_didLoadErrorOccur(false) | 79 , m_didLoadErrorOccur(false) |
| 82 , m_usesRemUnits(o.m_usesRemUnits) | 80 , m_usesRemUnits(o.m_usesRemUnits) |
| 83 , m_isMutable(false) | 81 , m_isMutable(false) |
| 84 , m_isInMemoryCache(false) | 82 , m_isInMemoryCache(false) |
| 85 , m_parserContext(o.m_parserContext) | 83 , m_parserContext(o.m_parserContext) |
| 86 { | 84 { |
| 87 ASSERT(o.isCacheable()); | 85 ASSERT(o.isCacheable()); |
| 88 | 86 |
| 89 // FIXME: Copy import rules. | 87 // FIXME: Copy import rules. |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 m_isInMemoryCache = false; | 493 m_isInMemoryCache = false; |
| 496 } | 494 } |
| 497 | 495 |
| 498 void StyleSheetContents::shrinkToFit() | 496 void StyleSheetContents::shrinkToFit() |
| 499 { | 497 { |
| 500 m_importRules.shrinkToFit(); | 498 m_importRules.shrinkToFit(); |
| 501 m_childRules.shrinkToFit(); | 499 m_childRules.shrinkToFit(); |
| 502 } | 500 } |
| 503 | 501 |
| 504 } | 502 } |
| OLD | NEW |