Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: Source/core/css/CSSStyleSheet.cpp

Issue 412183003: bindings: Makes more DOM classes inherit from ScriptWrappable (part 3). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reverted RGBColor and Rect. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSRuleList.cpp ('k') | Source/core/css/Counter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSRuleList.cpp ('k') | Source/core/css/Counter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698