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

Side by Side Diff: sky/engine/core/css/CSSStyleSheet.cpp

Issue 706123005: Remove nop ScriptWrappable::init calls (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/css/CSSStyleDeclaration.h ('k') | sky/engine/core/css/DOMWindowCSS.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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 RefPtr<StyleSheetContents> sheet = StyleSheetContents::create(baseURL.string (), parserContext); 98 RefPtr<StyleSheetContents> sheet = StyleSheetContents::create(baseURL.string (), parserContext);
99 return adoptRef(new CSSStyleSheet(sheet.release(), ownerNode, true, startPos ition)); 99 return adoptRef(new CSSStyleSheet(sheet.release(), ownerNode, true, startPos ition));
100 } 100 }
101 101
102 CSSStyleSheet::CSSStyleSheet(PassRefPtr<StyleSheetContents> contents) 102 CSSStyleSheet::CSSStyleSheet(PassRefPtr<StyleSheetContents> contents)
103 : m_contents(contents) 103 : m_contents(contents)
104 , m_isInlineStylesheet(false) 104 , m_isInlineStylesheet(false)
105 , m_ownerNode(nullptr) 105 , m_ownerNode(nullptr)
106 , m_startPosition(TextPosition::minimumPosition()) 106 , m_startPosition(TextPosition::minimumPosition())
107 { 107 {
108 ScriptWrappable::init(this);
109 m_contents->registerClient(this); 108 m_contents->registerClient(this);
110 } 109 }
111 110
112 CSSStyleSheet::CSSStyleSheet(PassRefPtr<StyleSheetContents> contents, Node* owne rNode, bool isInlineStylesheet, const TextPosition& startPosition) 111 CSSStyleSheet::CSSStyleSheet(PassRefPtr<StyleSheetContents> contents, Node* owne rNode, bool isInlineStylesheet, const TextPosition& startPosition)
113 : m_contents(contents) 112 : m_contents(contents)
114 , m_isInlineStylesheet(isInlineStylesheet) 113 , m_isInlineStylesheet(isInlineStylesheet)
115 , m_ownerNode(ownerNode) 114 , m_ownerNode(ownerNode)
116 , m_startPosition(startPosition) 115 , m_startPosition(startPosition)
117 { 116 {
118 ScriptWrappable::init(this);
119 ASSERT(isAcceptableCSSStyleSheetParent(ownerNode)); 117 ASSERT(isAcceptableCSSStyleSheetParent(ownerNode));
120 m_contents->registerClient(this); 118 m_contents->registerClient(this);
121 } 119 }
122 120
123 CSSStyleSheet::~CSSStyleSheet() 121 CSSStyleSheet::~CSSStyleSheet()
124 { 122 {
125 // With oilpan the parent style sheet pointer is strong and the sheet and 123 // With oilpan the parent style sheet pointer is strong and the sheet and
126 // its RuleCSSOMWrappers die together and we don't need to clear them here. 124 // its RuleCSSOMWrappers die together and we don't need to clear them here.
127 // Also with oilpan the StyleSheetContents client pointers are weak and 125 // Also with oilpan the StyleSheetContents client pointers are weak and
128 // therefore do not need to be cleared here. 126 // therefore do not need to be cleared here.
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 visitor->trace(m_contents); 356 visitor->trace(m_contents);
359 visitor->trace(m_mediaQueries); 357 visitor->trace(m_mediaQueries);
360 visitor->trace(m_ownerNode); 358 visitor->trace(m_ownerNode);
361 visitor->trace(m_mediaCSSOMWrapper); 359 visitor->trace(m_mediaCSSOMWrapper);
362 visitor->trace(m_childRuleCSSOMWrappers); 360 visitor->trace(m_childRuleCSSOMWrappers);
363 visitor->trace(m_ruleListCSSOMWrapper); 361 visitor->trace(m_ruleListCSSOMWrapper);
364 StyleSheet::trace(visitor); 362 StyleSheet::trace(visitor);
365 } 363 }
366 364
367 } // namespace blink 365 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSStyleDeclaration.h ('k') | sky/engine/core/css/DOMWindowCSS.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698