| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_hasSyntacticallyValidCSSHeader(true) | 60 , m_hasSyntacticallyValidCSSHeader(true) |
| 61 , m_didLoadErrorOccur(false) | 61 , m_didLoadErrorOccur(false) |
| 62 , m_usesRemUnits(false) | 62 , m_usesRemUnits(false) |
| 63 , m_isMutable(false) | 63 , m_isMutable(false) |
| 64 , m_isInMemoryCache(false) | 64 , m_isInMemoryCache(false) |
| 65 , m_hasFontFaceRule(false) |
| 65 , m_parserContext(context) | 66 , m_parserContext(context) |
| 66 { | 67 { |
| 67 } | 68 } |
| 68 | 69 |
| 69 StyleSheetContents::StyleSheetContents(const StyleSheetContents& o) | 70 StyleSheetContents::StyleSheetContents(const StyleSheetContents& o) |
| 70 : RefCounted<StyleSheetContents>() | 71 : RefCounted<StyleSheetContents>() |
| 71 , m_ownerRule(0) | 72 , m_ownerRule(0) |
| 72 , m_originalURL(o.m_originalURL) | 73 , m_originalURL(o.m_originalURL) |
| 73 , m_encodingFromCharsetRule(o.m_encodingFromCharsetRule) | 74 , m_encodingFromCharsetRule(o.m_encodingFromCharsetRule) |
| 74 , m_importRules(o.m_importRules.size()) | 75 , m_importRules(o.m_importRules.size()) |
| 75 , m_childRules(o.m_childRules.size()) | 76 , m_childRules(o.m_childRules.size()) |
| 76 , m_namespaces(o.m_namespaces) | 77 , m_namespaces(o.m_namespaces) |
| 77 , m_loadCompleted(true) | 78 , m_loadCompleted(true) |
| 78 , m_hasSyntacticallyValidCSSHeader(o.m_hasSyntacticallyValidCSSHeader) | 79 , m_hasSyntacticallyValidCSSHeader(o.m_hasSyntacticallyValidCSSHeader) |
| 79 , m_didLoadErrorOccur(false) | 80 , m_didLoadErrorOccur(false) |
| 80 , m_usesRemUnits(o.m_usesRemUnits) | 81 , m_usesRemUnits(o.m_usesRemUnits) |
| 81 , m_isMutable(false) | 82 , m_isMutable(false) |
| 82 , m_isInMemoryCache(false) | 83 , m_isInMemoryCache(false) |
| 84 , m_hasFontFaceRule(o.m_hasFontFaceRule) |
| 83 , m_parserContext(o.m_parserContext) | 85 , m_parserContext(o.m_parserContext) |
| 84 { | 86 { |
| 85 ASSERT(o.isCacheable()); | 87 ASSERT(o.isCacheable()); |
| 86 | 88 |
| 87 // FIXME: Copy import rules. | 89 // FIXME: Copy import rules. |
| 88 ASSERT(o.m_importRules.isEmpty()); | 90 ASSERT(o.m_importRules.isEmpty()); |
| 89 | 91 |
| 90 for (unsigned i = 0; i < m_childRules.size(); ++i) | 92 for (unsigned i = 0; i < m_childRules.size(); ++i) |
| 91 m_childRules[i] = o.m_childRules[i]->copy(); | 93 m_childRules[i] = o.m_childRules[i]->copy(); |
| 92 } | 94 } |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 m_isInMemoryCache = false; | 495 m_isInMemoryCache = false; |
| 494 } | 496 } |
| 495 | 497 |
| 496 void StyleSheetContents::shrinkToFit() | 498 void StyleSheetContents::shrinkToFit() |
| 497 { | 499 { |
| 498 m_importRules.shrinkToFit(); | 500 m_importRules.shrinkToFit(); |
| 499 m_childRules.shrinkToFit(); | 501 m_childRules.shrinkToFit(); |
| 500 } | 502 } |
| 501 | 503 |
| 502 } | 504 } |
| OLD | NEW |