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

Side by Side Diff: Source/core/css/CSSValue.cpp

Issue 453203003: Introduce DEFINE_CUSTOM_FONT_DATA_TYPE_CASTS, and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 delete toCSSSVGDocumentValue(this); 401 delete toCSSSVGDocumentValue(this);
402 return; 402 return;
403 } 403 }
404 ASSERT_NOT_REACHED(); 404 ASSERT_NOT_REACHED();
405 } 405 }
406 406
407 void CSSValue::finalizeGarbageCollectedObject() 407 void CSSValue::finalizeGarbageCollectedObject()
408 { 408 {
409 if (m_isTextClone) { 409 if (m_isTextClone) {
410 ASSERT(isCSSOMSafe()); 410 ASSERT(isCSSOMSafe());
411 static_cast<TextCloneCSSValue*>(this)->~TextCloneCSSValue(); 411 toTextCloneCSSValue(this)->~TextCloneCSSValue();
412 return; 412 return;
413 } 413 }
414 ASSERT(!isCSSOMSafe() || isSubtypeExposedToCSSOM()); 414 ASSERT(!isCSSOMSafe() || isSubtypeExposedToCSSOM());
415 415
416 switch (classType()) { 416 switch (classType()) {
417 case AspectRatioClass: 417 case AspectRatioClass:
418 toCSSAspectRatioValue(this)->~CSSAspectRatioValue(); 418 toCSSAspectRatioValue(this)->~CSSAspectRatioValue();
419 return; 419 return;
420 case BorderImageSliceClass: 420 case BorderImageSliceClass:
421 toCSSBorderImageSliceValue(this)->~CSSBorderImageSliceValue(); 421 toCSSBorderImageSliceValue(this)->~CSSBorderImageSliceValue();
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 toCSSSVGDocumentValue(this)->~CSSSVGDocumentValue(); 505 toCSSSVGDocumentValue(this)->~CSSSVGDocumentValue();
506 return; 506 return;
507 } 507 }
508 ASSERT_NOT_REACHED(); 508 ASSERT_NOT_REACHED();
509 } 509 }
510 510
511 void CSSValue::trace(Visitor* visitor) 511 void CSSValue::trace(Visitor* visitor)
512 { 512 {
513 if (m_isTextClone) { 513 if (m_isTextClone) {
514 ASSERT(isCSSOMSafe()); 514 ASSERT(isCSSOMSafe());
515 static_cast<TextCloneCSSValue*>(this)->traceAfterDispatch(visitor); 515 toTextCloneCSSValue(this)->traceAfterDispatch(visitor);
516 return; 516 return;
517 } 517 }
518 ASSERT(!isCSSOMSafe() || isSubtypeExposedToCSSOM()); 518 ASSERT(!isCSSOMSafe() || isSubtypeExposedToCSSOM());
519 519
520 switch (classType()) { 520 switch (classType()) {
521 case AspectRatioClass: 521 case AspectRatioClass:
522 toCSSAspectRatioValue(this)->traceAfterDispatch(visitor); 522 toCSSAspectRatioValue(this)->traceAfterDispatch(visitor);
523 return; 523 return;
524 case BorderImageSliceClass: 524 case BorderImageSliceClass:
525 toCSSBorderImageSliceValue(this)->traceAfterDispatch(visitor); 525 toCSSBorderImageSliceValue(this)->traceAfterDispatch(visitor);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 return toCSSTransformValue(this)->cloneForCSSOM(); 630 return toCSSTransformValue(this)->cloneForCSSOM();
631 case ImageSetClass: 631 case ImageSetClass:
632 return toCSSImageSetValue(this)->cloneForCSSOM(); 632 return toCSSImageSetValue(this)->cloneForCSSOM();
633 default: 633 default:
634 ASSERT(!isSubtypeExposedToCSSOM()); 634 ASSERT(!isSubtypeExposedToCSSOM());
635 return TextCloneCSSValue::create(classType(), cssText()); 635 return TextCloneCSSValue::create(classType(), cssText());
636 } 636 }
637 } 637 }
638 638
639 } 639 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp » ('j') | Source/platform/fonts/CustomFontData.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698