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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSValue.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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Andreas Kling (kling@webkit.org) 2 * Copyright (C) 2011 Andreas Kling (kling@webkit.org)
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 return toCSSVariableReferenceValue(this)->customCSSText(); 274 return toCSSVariableReferenceValue(this)->customCSSText();
275 case CustomPropertyDeclarationClass: 275 case CustomPropertyDeclarationClass:
276 return toCSSCustomPropertyDeclaration(this)->customCSSText(); 276 return toCSSCustomPropertyDeclaration(this)->customCSSText();
277 case PendingSubstitutionValueClass: 277 case PendingSubstitutionValueClass:
278 return toCSSPendingSubstitutionValue(this)->customCSSText(); 278 return toCSSPendingSubstitutionValue(this)->customCSSText();
279 } 279 }
280 ASSERT_NOT_REACHED(); 280 ASSERT_NOT_REACHED();
281 return String(); 281 return String();
282 } 282 }
283 283
284 void CSSValue::destroy()
285 {
286 switch (getClassType()) {
287 case BasicShapeCircleClass:
288 delete toCSSBasicShapeCircleValue(this);
289 return;
290 case BasicShapeEllipseClass:
291 delete toCSSBasicShapeEllipseValue(this);
292 return;
293 case BasicShapePolygonClass:
294 delete toCSSBasicShapePolygonValue(this);
295 return;
296 case BasicShapeInsetClass:
297 delete toCSSBasicShapeInsetValue(this);
298 return;
299 case BorderImageSliceClass:
300 delete toCSSBorderImageSliceValue(this);
301 return;
302 case ColorClass:
303 delete toCSSColorValue(this);
304 return;
305 case CounterClass:
306 delete toCSSCounterValue(this);
307 return;
308 case CursorImageClass:
309 delete toCSSCursorImageValue(this);
310 return;
311 case FontFaceSrcClass:
312 delete toCSSFontFaceSrcValue(this);
313 return;
314 case FontFamilyClass:
315 delete toCSSFontFamilyValue(this);
316 return;
317 case FontFeatureClass:
318 delete toCSSFontFeatureValue(this);
319 return;
320 case FunctionClass:
321 delete toCSSFunctionValue(this);
322 return;
323 case LinearGradientClass:
324 delete toCSSLinearGradientValue(this);
325 return;
326 case RadialGradientClass:
327 delete toCSSRadialGradientValue(this);
328 return;
329 case CrossfadeClass:
330 delete toCSSCrossfadeValue(this);
331 return;
332 case PaintClass:
333 delete toCSSPaintValue(this);
334 return;
335 case CustomIdentClass:
336 delete toCSSCustomIdentValue(this);
337 return;
338 case ImageClass:
339 delete toCSSImageValue(this);
340 return;
341 case InheritedClass:
342 delete toCSSInheritedValue(this);
343 return;
344 case InitialClass:
345 delete toCSSInitialValue(this);
346 return;
347 case UnsetClass:
348 delete toCSSUnsetValue(this);
349 return;
350 case GridAutoRepeatClass:
351 delete toCSSGridAutoRepeatValue(this);
352 return;
353 case GridLineNamesClass:
354 delete toCSSGridLineNamesValue(this);
355 return;
356 case GridTemplateAreasClass:
357 delete toCSSGridTemplateAreasValue(this);
358 return;
359 case PathClass:
360 delete toCSSPathValue(this);
361 return;
362 case PrimitiveClass:
363 delete toCSSPrimitiveValue(this);
364 return;
365 case QuadClass:
366 delete toCSSQuadValue(this);
367 return;
368 case ReflectClass:
369 delete toCSSReflectValue(this);
370 return;
371 case ShadowClass:
372 delete toCSSShadowValue(this);
373 return;
374 case StringClass:
375 delete toCSSStringValue(this);
376 return;
377 case CubicBezierTimingFunctionClass:
378 delete toCSSCubicBezierTimingFunctionValue(this);
379 return;
380 case StepsTimingFunctionClass:
381 delete toCSSStepsTimingFunctionValue(this);
382 return;
383 case UnicodeRangeClass:
384 delete toCSSUnicodeRangeValue(this);
385 return;
386 case URIClass:
387 delete toCSSURIValue(this);
388 return;
389 case ValuePairClass:
390 delete toCSSValuePair(this);
391 return;
392 case ValueListClass:
393 delete toCSSValueList(this);
394 return;
395 case ImageSetClass:
396 delete toCSSImageSetValue(this);
397 return;
398 case CSSContentDistributionClass:
399 delete toCSSContentDistributionValue(this);
400 return;
401 case VariableReferenceClass:
402 delete toCSSVariableReferenceValue(this);
403 return;
404 case CustomPropertyDeclarationClass:
405 delete toCSSCustomPropertyDeclaration(this);
406 return;
407 case PendingSubstitutionValueClass:
408 delete toCSSPendingSubstitutionValue(this);
409 return;
410 }
411 ASSERT_NOT_REACHED();
412 }
413
414 void CSSValue::finalizeGarbageCollectedObject() 284 void CSSValue::finalizeGarbageCollectedObject()
415 { 285 {
416 switch (getClassType()) { 286 switch (getClassType()) {
417 case BasicShapeCircleClass: 287 case BasicShapeCircleClass:
418 toCSSBasicShapeCircleValue(this)->~CSSBasicShapeCircleValue(); 288 toCSSBasicShapeCircleValue(this)->~CSSBasicShapeCircleValue();
419 return; 289 return;
420 case BasicShapeEllipseClass: 290 case BasicShapeEllipseClass:
421 toCSSBasicShapeEllipseValue(this)->~CSSBasicShapeEllipseValue(); 291 toCSSBasicShapeEllipseValue(this)->~CSSBasicShapeEllipseValue();
422 return; 292 return;
423 case BasicShapePolygonClass: 293 case BasicShapePolygonClass:
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 toCSSCustomPropertyDeclaration(this)->traceAfterDispatch(visitor); 535 toCSSCustomPropertyDeclaration(this)->traceAfterDispatch(visitor);
666 return; 536 return;
667 case PendingSubstitutionValueClass: 537 case PendingSubstitutionValueClass:
668 toCSSPendingSubstitutionValue(this)->traceAfterDispatch(visitor); 538 toCSSPendingSubstitutionValue(this)->traceAfterDispatch(visitor);
669 return; 539 return;
670 } 540 }
671 ASSERT_NOT_REACHED(); 541 ASSERT_NOT_REACHED();
672 } 542 }
673 543
674 } // namespace blink 544 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSValue.h ('k') | third_party/WebKit/Source/core/css/StyleRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698