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

Side by Side Diff: third_party/WebKit/Source/core/css/StyleRule.cpp

Issue 2230813003: Removed unused destroy() methods in CSSValue and StyleRule (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleRule.h ('k') | no next file » | 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 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2002, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2002, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 case Namespace: 125 case Namespace:
126 toStyleRuleNamespace(this)->~StyleRuleNamespace(); 126 toStyleRuleNamespace(this)->~StyleRuleNamespace();
127 return; 127 return;
128 case Viewport: 128 case Viewport:
129 toStyleRuleViewport(this)->~StyleRuleViewport(); 129 toStyleRuleViewport(this)->~StyleRuleViewport();
130 return; 130 return;
131 } 131 }
132 ASSERT_NOT_REACHED(); 132 ASSERT_NOT_REACHED();
133 } 133 }
134 134
135 void StyleRuleBase::destroy()
136 {
137 switch (type()) {
138 case Charset:
139 delete toStyleRuleCharset(this);
140 return;
141 case Style:
142 delete toStyleRule(this);
143 return;
144 case Page:
145 delete toStyleRulePage(this);
146 return;
147 case FontFace:
148 delete toStyleRuleFontFace(this);
149 return;
150 case Media:
151 delete toStyleRuleMedia(this);
152 return;
153 case Supports:
154 delete toStyleRuleSupports(this);
155 return;
156 case Import:
157 delete toStyleRuleImport(this);
158 return;
159 case Keyframes:
160 delete toStyleRuleKeyframes(this);
161 return;
162 case Keyframe:
163 delete toStyleRuleKeyframe(this);
164 return;
165 case Namespace:
166 delete toStyleRuleNamespace(this);
167 return;
168 case Viewport:
169 delete toStyleRuleViewport(this);
170 return;
171 }
172 ASSERT_NOT_REACHED();
173 }
174
175 StyleRuleBase* StyleRuleBase::copy() const 135 StyleRuleBase* StyleRuleBase::copy() const
176 { 136 {
177 switch (type()) { 137 switch (type()) {
178 case Style: 138 case Style:
179 return toStyleRule(this)->copy(); 139 return toStyleRule(this)->copy();
180 case Page: 140 case Page:
181 return toStyleRulePage(this)->copy(); 141 return toStyleRulePage(this)->copy();
182 case FontFace: 142 case FontFace:
183 return toStyleRuleFontFace(this)->copy(); 143 return toStyleRuleFontFace(this)->copy();
184 case Media: 144 case Media:
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 return *toMutableStylePropertySet(m_properties); 387 return *toMutableStylePropertySet(m_properties);
428 } 388 }
429 389
430 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleViewport) 390 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleViewport)
431 { 391 {
432 visitor->trace(m_properties); 392 visitor->trace(m_properties);
433 StyleRuleBase::traceAfterDispatch(visitor); 393 StyleRuleBase::traceAfterDispatch(visitor);
434 } 394 }
435 395
436 } // namespace blink 396 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleRule.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698