| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 CSSParserContext parserContext(ownerNode.document(), nullptr, baseURL, | 104 CSSParserContext parserContext(ownerNode.document(), nullptr, baseURL, |
| 105 encoding); | 105 encoding); |
| 106 StyleSheetContents* sheet = | 106 StyleSheetContents* sheet = |
| 107 StyleSheetContents::create(baseURL.getString(), parserContext); | 107 StyleSheetContents::create(baseURL.getString(), parserContext); |
| 108 return new CSSStyleSheet(sheet, ownerNode, true, startPosition); | 108 return new CSSStyleSheet(sheet, ownerNode, true, startPosition); |
| 109 } | 109 } |
| 110 | 110 |
| 111 CSSStyleSheet::CSSStyleSheet(StyleSheetContents* contents, | 111 CSSStyleSheet::CSSStyleSheet(StyleSheetContents* contents, |
| 112 CSSImportRule* ownerRule) | 112 CSSImportRule* ownerRule) |
| 113 : m_contents(contents), | 113 : m_contents(contents), |
| 114 m_isInlineStylesheet(false), | |
| 115 m_isDisabled(false), | |
| 116 m_ownerNode(nullptr), | |
| 117 m_ownerRule(ownerRule), | 114 m_ownerRule(ownerRule), |
| 118 m_startPosition(TextPosition::minimumPosition()), | 115 m_startPosition(TextPosition::minimumPosition()) { |
| 119 m_loadCompleted(false) { | |
| 120 m_contents->registerClient(this); | 116 m_contents->registerClient(this); |
| 121 } | 117 } |
| 122 | 118 |
| 123 CSSStyleSheet::CSSStyleSheet(StyleSheetContents* contents, | 119 CSSStyleSheet::CSSStyleSheet(StyleSheetContents* contents, |
| 124 Node& ownerNode, | 120 Node& ownerNode, |
| 125 bool isInlineStylesheet, | 121 bool isInlineStylesheet, |
| 126 const TextPosition& startPosition) | 122 const TextPosition& startPosition) |
| 127 : m_contents(contents), | 123 : m_contents(contents), |
| 128 m_isInlineStylesheet(isInlineStylesheet), | 124 m_isInlineStylesheet(isInlineStylesheet), |
| 129 m_isDisabled(false), | |
| 130 m_ownerNode(&ownerNode), | 125 m_ownerNode(&ownerNode), |
| 131 m_ownerRule(nullptr), | 126 m_startPosition(startPosition) { |
| 132 m_startPosition(startPosition), | |
| 133 m_loadCompleted(false) { | |
| 134 #if DCHECK_IS_ON() | 127 #if DCHECK_IS_ON() |
| 135 DCHECK(isAcceptableCSSStyleSheetParent(ownerNode)); | 128 DCHECK(isAcceptableCSSStyleSheetParent(ownerNode)); |
| 136 #endif | 129 #endif |
| 137 m_contents->registerClient(this); | 130 m_contents->registerClient(this); |
| 138 } | 131 } |
| 139 | 132 |
| 140 CSSStyleSheet::~CSSStyleSheet() {} | 133 CSSStyleSheet::~CSSStyleSheet() {} |
| 141 | 134 |
| 142 void CSSStyleSheet::willMutateRules() { | 135 void CSSStyleSheet::willMutateRules() { |
| 143 // If we are the only client it is safe to mutate. | 136 // If we are the only client it is safe to mutate. |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 visitor->trace(m_mediaQueries); | 426 visitor->trace(m_mediaQueries); |
| 434 visitor->trace(m_ownerNode); | 427 visitor->trace(m_ownerNode); |
| 435 visitor->trace(m_ownerRule); | 428 visitor->trace(m_ownerRule); |
| 436 visitor->trace(m_mediaCSSOMWrapper); | 429 visitor->trace(m_mediaCSSOMWrapper); |
| 437 visitor->trace(m_childRuleCSSOMWrappers); | 430 visitor->trace(m_childRuleCSSOMWrappers); |
| 438 visitor->trace(m_ruleListCSSOMWrapper); | 431 visitor->trace(m_ruleListCSSOMWrapper); |
| 439 StyleSheet::trace(visitor); | 432 StyleSheet::trace(visitor); |
| 440 } | 433 } |
| 441 | 434 |
| 442 } // namespace blink | 435 } // namespace blink |
| OLD | NEW |