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

Side by Side Diff: Source/WebCore/css/StyleRule.cpp

Issue 13839016: Remove CSS_SHADERS compile-time flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 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
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 #if ENABLE(SHADOW_DOM) 91 #if ENABLE(SHADOW_DOM)
92 case HostInternal: 92 case HostInternal:
93 static_cast<const StyleRuleHost*>(this)->reportDescendantMemoryUsage(mem oryObjectInfo); 93 static_cast<const StyleRuleHost*>(this)->reportDescendantMemoryUsage(mem oryObjectInfo);
94 return; 94 return;
95 #endif 95 #endif
96 #if ENABLE(CSS_DEVICE_ADAPTATION) 96 #if ENABLE(CSS_DEVICE_ADAPTATION)
97 case Viewport: 97 case Viewport:
98 static_cast<const StyleRuleViewport*>(this)->reportDescendantMemoryUsage (memoryObjectInfo); 98 static_cast<const StyleRuleViewport*>(this)->reportDescendantMemoryUsage (memoryObjectInfo);
99 return; 99 return;
100 #endif 100 #endif
101 #if ENABLE(CSS_SHADERS)
102 case Filter: 101 case Filter:
103 static_cast<const StyleRuleFilter*>(this)->reportDescendantMemoryUsage(m emoryObjectInfo); 102 static_cast<const StyleRuleFilter*>(this)->reportDescendantMemoryUsage(m emoryObjectInfo);
104 return; 103 return;
105 #endif
106 case Unknown: 104 case Unknown:
107 case Charset: 105 case Charset:
108 case Keyframe: 106 case Keyframe:
109 #if !ENABLE(CSS_REGIONS) 107 #if !ENABLE(CSS_REGIONS)
110 case Region: 108 case Region:
111 #endif 109 #endif
112 ASSERT_NOT_REACHED(); 110 ASSERT_NOT_REACHED();
113 return; 111 return;
114 } 112 }
115 ASSERT_NOT_REACHED(); 113 ASSERT_NOT_REACHED();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 #if ENABLE(SHADOW_DOM) 147 #if ENABLE(SHADOW_DOM)
150 case HostInternal: 148 case HostInternal:
151 delete static_cast<StyleRuleHost*>(this); 149 delete static_cast<StyleRuleHost*>(this);
152 return; 150 return;
153 #endif 151 #endif
154 #if ENABLE(CSS_DEVICE_ADAPTATION) 152 #if ENABLE(CSS_DEVICE_ADAPTATION)
155 case Viewport: 153 case Viewport:
156 delete static_cast<StyleRuleViewport*>(this); 154 delete static_cast<StyleRuleViewport*>(this);
157 return; 155 return;
158 #endif 156 #endif
159 #if ENABLE(CSS_SHADERS)
160 case Filter: 157 case Filter:
161 delete static_cast<StyleRuleFilter*>(this); 158 delete static_cast<StyleRuleFilter*>(this);
162 return; 159 return;
163 #endif
164 case Unknown: 160 case Unknown:
165 case Charset: 161 case Charset:
166 case Keyframe: 162 case Keyframe:
167 #if !ENABLE(CSS_REGIONS) 163 #if !ENABLE(CSS_REGIONS)
168 case Region: 164 case Region:
169 #endif 165 #endif
170 ASSERT_NOT_REACHED(); 166 ASSERT_NOT_REACHED();
171 return; 167 return;
172 } 168 }
173 ASSERT_NOT_REACHED(); 169 ASSERT_NOT_REACHED();
(...skipping 25 matching lines...) Expand all
199 case Keyframes: 195 case Keyframes:
200 return static_cast<const StyleRuleKeyframes*>(this)->copy(); 196 return static_cast<const StyleRuleKeyframes*>(this)->copy();
201 #if ENABLE(SHADOW_DOM) 197 #if ENABLE(SHADOW_DOM)
202 case HostInternal: 198 case HostInternal:
203 return static_cast<const StyleRuleHost*>(this)->copy(); 199 return static_cast<const StyleRuleHost*>(this)->copy();
204 #endif 200 #endif
205 #if ENABLE(CSS_DEVICE_ADAPTATION) 201 #if ENABLE(CSS_DEVICE_ADAPTATION)
206 case Viewport: 202 case Viewport:
207 return static_cast<const StyleRuleViewport*>(this)->copy(); 203 return static_cast<const StyleRuleViewport*>(this)->copy();
208 #endif 204 #endif
209 #if ENABLE(CSS_SHADERS)
210 case Filter: 205 case Filter:
211 return static_cast<const StyleRuleFilter*>(this)->copy(); 206 return static_cast<const StyleRuleFilter*>(this)->copy();
212 #endif
213 case Unknown: 207 case Unknown:
214 case Charset: 208 case Charset:
215 case Keyframe: 209 case Keyframe:
216 #if !ENABLE(CSS_REGIONS) 210 #if !ENABLE(CSS_REGIONS)
217 case Region: 211 case Region:
218 #endif 212 #endif
219 ASSERT_NOT_REACHED(); 213 ASSERT_NOT_REACHED();
220 return 0; 214 return 0;
221 } 215 }
222 ASSERT_NOT_REACHED(); 216 ASSERT_NOT_REACHED();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 #if ENABLE(CSS_DEVICE_ADAPTATION) 253 #if ENABLE(CSS_DEVICE_ADAPTATION)
260 case Viewport: 254 case Viewport:
261 rule = WebKitCSSViewportRule::create(static_cast<StyleRuleViewport*>(sel f), parentSheet); 255 rule = WebKitCSSViewportRule::create(static_cast<StyleRuleViewport*>(sel f), parentSheet);
262 break; 256 break;
263 #endif 257 #endif
264 #if ENABLE(SHADOW_DOM) 258 #if ENABLE(SHADOW_DOM)
265 case HostInternal: 259 case HostInternal:
266 rule = CSSHostRule::create(static_cast<StyleRuleHost*>(self), parentShee t); 260 rule = CSSHostRule::create(static_cast<StyleRuleHost*>(self), parentShee t);
267 break; 261 break;
268 #endif 262 #endif
269 #if ENABLE(CSS_SHADERS)
270 case Filter: 263 case Filter:
271 rule = WebKitCSSFilterRule::create(static_cast<StyleRuleFilter*>(self), parentSheet); 264 rule = WebKitCSSFilterRule::create(static_cast<StyleRuleFilter*>(self), parentSheet);
272 break; 265 break;
273 #endif
274 case Unknown: 266 case Unknown:
275 case Charset: 267 case Charset:
276 case Keyframe: 268 case Keyframe:
277 #if !ENABLE(CSS_REGIONS) 269 #if !ENABLE(CSS_REGIONS)
278 case Region: 270 case Region:
279 #endif 271 #endif
280 ASSERT_NOT_REACHED(); 272 ASSERT_NOT_REACHED();
281 return 0; 273 return 0;
282 } 274 }
283 if (parentRule) 275 if (parentRule)
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 m_properties = properties; 498 m_properties = properties;
507 } 499 }
508 500
509 void StyleRuleViewport::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObje ctInfo) const 501 void StyleRuleViewport::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObje ctInfo) const
510 { 502 {
511 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); 503 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
512 info.addMember(m_properties, "properties"); 504 info.addMember(m_properties, "properties");
513 } 505 }
514 #endif // ENABLE(CSS_DEVICE_ADAPTATION) 506 #endif // ENABLE(CSS_DEVICE_ADAPTATION)
515 507
516 #if ENABLE(CSS_SHADERS)
517 StyleRuleFilter::StyleRuleFilter(const String& filterName) 508 StyleRuleFilter::StyleRuleFilter(const String& filterName)
518 : StyleRuleBase(Filter, 0) 509 : StyleRuleBase(Filter, 0)
519 , m_filterName(filterName) 510 , m_filterName(filterName)
520 { 511 {
521 } 512 }
522 513
523 StyleRuleFilter::StyleRuleFilter(const StyleRuleFilter& o) 514 StyleRuleFilter::StyleRuleFilter(const StyleRuleFilter& o)
524 : StyleRuleBase(o) 515 : StyleRuleBase(o)
525 , m_filterName(o.m_filterName) 516 , m_filterName(o.m_filterName)
526 , m_properties(o.m_properties->copy()) 517 , m_properties(o.m_properties->copy())
(...skipping 15 matching lines...) Expand all
542 { 533 {
543 m_properties = properties; 534 m_properties = properties;
544 } 535 }
545 536
546 void StyleRuleFilter::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObject Info) const 537 void StyleRuleFilter::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObject Info) const
547 { 538 {
548 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); 539 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
549 info.addMember(m_filterName); 540 info.addMember(m_filterName);
550 info.addMember(m_properties); 541 info.addMember(m_properties);
551 } 542 }
552 #endif // ENABLE(CSS_SHADERS)
553 543
554 } // namespace WebCore 544 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698