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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 CSSStyleSheet::CSSStyleSheet(PassRefPtrWillBeRawPtr<StyleSheetContents> contents
, CSSImportRule* ownerRule) | 117 CSSStyleSheet::CSSStyleSheet(PassRefPtrWillBeRawPtr<StyleSheetContents> contents
, CSSImportRule* ownerRule) |
118 : m_contents(contents) | 118 : m_contents(contents) |
119 , m_isInlineStylesheet(false) | 119 , m_isInlineStylesheet(false) |
120 , m_isDisabled(false) | 120 , m_isDisabled(false) |
121 , m_ownerNode(nullptr) | 121 , m_ownerNode(nullptr) |
122 , m_ownerRule(ownerRule) | 122 , m_ownerRule(ownerRule) |
123 , m_startPosition(TextPosition::minimumPosition()) | 123 , m_startPosition(TextPosition::minimumPosition()) |
124 , m_loadCompleted(false) | 124 , m_loadCompleted(false) |
125 { | 125 { |
| 126 ScriptWrappable::init(this); |
126 m_contents->registerClient(this); | 127 m_contents->registerClient(this); |
127 } | 128 } |
128 | 129 |
129 CSSStyleSheet::CSSStyleSheet(PassRefPtrWillBeRawPtr<StyleSheetContents> contents
, Node* ownerNode, bool isInlineStylesheet, const TextPosition& startPosition) | 130 CSSStyleSheet::CSSStyleSheet(PassRefPtrWillBeRawPtr<StyleSheetContents> contents
, Node* ownerNode, bool isInlineStylesheet, const TextPosition& startPosition) |
130 : m_contents(contents) | 131 : m_contents(contents) |
131 , m_isInlineStylesheet(isInlineStylesheet) | 132 , m_isInlineStylesheet(isInlineStylesheet) |
132 , m_isDisabled(false) | 133 , m_isDisabled(false) |
133 , m_ownerNode(ownerNode) | 134 , m_ownerNode(ownerNode) |
134 , m_ownerRule(nullptr) | 135 , m_ownerRule(nullptr) |
135 , m_startPosition(startPosition) | 136 , m_startPosition(startPosition) |
136 , m_loadCompleted(false) | 137 , m_loadCompleted(false) |
137 { | 138 { |
| 139 ScriptWrappable::init(this); |
138 ASSERT(isAcceptableCSSStyleSheetParent(ownerNode)); | 140 ASSERT(isAcceptableCSSStyleSheetParent(ownerNode)); |
139 m_contents->registerClient(this); | 141 m_contents->registerClient(this); |
140 } | 142 } |
141 | 143 |
142 CSSStyleSheet::~CSSStyleSheet() | 144 CSSStyleSheet::~CSSStyleSheet() |
143 { | 145 { |
144 // With oilpan the parent style sheet pointer is strong and the sheet and | 146 // With oilpan the parent style sheet pointer is strong and the sheet and |
145 // its RuleCSSOMWrappers die together and we don't need to clear them here. | 147 // its RuleCSSOMWrappers die together and we don't need to clear them here. |
146 // Also with oilpan the StyleSheetContents client pointers are weak and | 148 // Also with oilpan the StyleSheetContents client pointers are weak and |
147 // therefore do not need to be cleared here. | 149 // therefore do not need to be cleared here. |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 visitor->trace(m_mediaQueries); | 462 visitor->trace(m_mediaQueries); |
461 visitor->trace(m_ownerNode); | 463 visitor->trace(m_ownerNode); |
462 visitor->trace(m_ownerRule); | 464 visitor->trace(m_ownerRule); |
463 visitor->trace(m_mediaCSSOMWrapper); | 465 visitor->trace(m_mediaCSSOMWrapper); |
464 visitor->trace(m_childRuleCSSOMWrappers); | 466 visitor->trace(m_childRuleCSSOMWrappers); |
465 visitor->trace(m_ruleListCSSOMWrapper); | 467 visitor->trace(m_ruleListCSSOMWrapper); |
466 StyleSheet::trace(visitor); | 468 StyleSheet::trace(visitor); |
467 } | 469 } |
468 | 470 |
469 } | 471 } |
OLD | NEW |