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

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

Issue 2522043003: Replace ASSERT_NOT_REACHED -> NOTREACHED (Closed)
Patch Set: Created 4 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
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 case Keyframe: 81 case Keyframe:
82 toStyleRuleKeyframe(this)->traceAfterDispatch(visitor); 82 toStyleRuleKeyframe(this)->traceAfterDispatch(visitor);
83 return; 83 return;
84 case Namespace: 84 case Namespace:
85 toStyleRuleNamespace(this)->traceAfterDispatch(visitor); 85 toStyleRuleNamespace(this)->traceAfterDispatch(visitor);
86 return; 86 return;
87 case Viewport: 87 case Viewport:
88 toStyleRuleViewport(this)->traceAfterDispatch(visitor); 88 toStyleRuleViewport(this)->traceAfterDispatch(visitor);
89 return; 89 return;
90 } 90 }
91 ASSERT_NOT_REACHED(); 91 NOTREACHED();
92 } 92 }
93 93
94 void StyleRuleBase::finalizeGarbageCollectedObject() { 94 void StyleRuleBase::finalizeGarbageCollectedObject() {
95 switch (type()) { 95 switch (type()) {
96 case Charset: 96 case Charset:
97 toStyleRuleCharset(this)->~StyleRuleCharset(); 97 toStyleRuleCharset(this)->~StyleRuleCharset();
98 return; 98 return;
99 case Style: 99 case Style:
100 toStyleRule(this)->~StyleRule(); 100 toStyleRule(this)->~StyleRule();
101 return; 101 return;
(...skipping 18 matching lines...) Expand all
120 case Keyframe: 120 case Keyframe:
121 toStyleRuleKeyframe(this)->~StyleRuleKeyframe(); 121 toStyleRuleKeyframe(this)->~StyleRuleKeyframe();
122 return; 122 return;
123 case Namespace: 123 case Namespace:
124 toStyleRuleNamespace(this)->~StyleRuleNamespace(); 124 toStyleRuleNamespace(this)->~StyleRuleNamespace();
125 return; 125 return;
126 case Viewport: 126 case Viewport:
127 toStyleRuleViewport(this)->~StyleRuleViewport(); 127 toStyleRuleViewport(this)->~StyleRuleViewport();
128 return; 128 return;
129 } 129 }
130 ASSERT_NOT_REACHED(); 130 NOTREACHED();
131 } 131 }
132 132
133 StyleRuleBase* StyleRuleBase::copy() const { 133 StyleRuleBase* StyleRuleBase::copy() const {
134 switch (type()) { 134 switch (type()) {
135 case Style: 135 case Style:
136 return toStyleRule(this)->copy(); 136 return toStyleRule(this)->copy();
137 case Page: 137 case Page:
138 return toStyleRulePage(this)->copy(); 138 return toStyleRulePage(this)->copy();
139 case FontFace: 139 case FontFace:
140 return toStyleRuleFontFace(this)->copy(); 140 return toStyleRuleFontFace(this)->copy();
141 case Media: 141 case Media:
142 return toStyleRuleMedia(this)->copy(); 142 return toStyleRuleMedia(this)->copy();
143 case Supports: 143 case Supports:
144 return toStyleRuleSupports(this)->copy(); 144 return toStyleRuleSupports(this)->copy();
145 case Import: 145 case Import:
146 // FIXME: Copy import rules. 146 // FIXME: Copy import rules.
147 ASSERT_NOT_REACHED(); 147 NOTREACHED();
148 return nullptr; 148 return nullptr;
149 case Keyframes: 149 case Keyframes:
150 return toStyleRuleKeyframes(this)->copy(); 150 return toStyleRuleKeyframes(this)->copy();
151 case Viewport: 151 case Viewport:
152 return toStyleRuleViewport(this)->copy(); 152 return toStyleRuleViewport(this)->copy();
153 case Namespace: 153 case Namespace:
154 return toStyleRuleNamespace(this)->copy(); 154 return toStyleRuleNamespace(this)->copy();
155 case Charset: 155 case Charset:
156 case Keyframe: 156 case Keyframe:
157 ASSERT_NOT_REACHED(); 157 ASSERT_NOT_REACHED();
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 m_properties = m_properties->mutableCopy(); 392 m_properties = m_properties->mutableCopy();
393 return *toMutableStylePropertySet(m_properties); 393 return *toMutableStylePropertySet(m_properties);
394 } 394 }
395 395
396 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleViewport) { 396 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleViewport) {
397 visitor->trace(m_properties); 397 visitor->trace(m_properties);
398 StyleRuleBase::traceAfterDispatch(visitor); 398 StyleRuleBase::traceAfterDispatch(visitor);
399 } 399 }
400 400
401 } // namespace blink 401 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/FontFace.cpp ('k') | third_party/WebKit/Source/core/frame/BarProp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698