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

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

Issue 809823002: replace COMPILE_ASSERT with static assert in core/css/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 | « Source/core/css/CSSSelector.cpp ('k') | Source/core/css/RuleSet.h » ('j') | 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 * 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #include "core/css/CSSUnsetValue.h" 57 #include "core/css/CSSUnsetValue.h"
58 #include "core/css/CSSValueList.h" 58 #include "core/css/CSSValueList.h"
59 59
60 namespace blink { 60 namespace blink {
61 61
62 struct SameSizeAsCSSValue : public RefCountedWillBeGarbageCollectedFinalized<Sam eSizeAsCSSValue> 62 struct SameSizeAsCSSValue : public RefCountedWillBeGarbageCollectedFinalized<Sam eSizeAsCSSValue>
63 { 63 {
64 uint32_t bitfields; 64 uint32_t bitfields;
65 }; 65 };
66 66
67 COMPILE_ASSERT(sizeof(CSSValue) <= sizeof(SameSizeAsCSSValue), CSS_value_should_ stay_small); 67 static_assert(sizeof(CSSValue) <= sizeof(SameSizeAsCSSValue), "CSSValue should s tay small");
68 68
69 bool CSSValue::isImplicitInitialValue() const 69 bool CSSValue::isImplicitInitialValue() const
70 { 70 {
71 return m_classType == InitialClass && toCSSInitialValue(this)->isImplicit(); 71 return m_classType == InitialClass && toCSSInitialValue(this)->isImplicit();
72 } 72 }
73 73
74 bool CSSValue::hasFailedOrCanceledSubresources() const 74 bool CSSValue::hasFailedOrCanceledSubresources() const
75 { 75 {
76 if (isValueList()) 76 if (isValueList())
77 return toCSSValueList(this)->hasFailedOrCanceledSubresources(); 77 return toCSSValueList(this)->hasFailedOrCanceledSubresources();
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 toCSSSVGDocumentValue(this)->traceAfterDispatch(visitor); 534 toCSSSVGDocumentValue(this)->traceAfterDispatch(visitor);
535 return; 535 return;
536 case CSSContentDistributionClass: 536 case CSSContentDistributionClass:
537 toCSSContentDistributionValue(this)->traceAfterDispatch(visitor); 537 toCSSContentDistributionValue(this)->traceAfterDispatch(visitor);
538 return; 538 return;
539 } 539 }
540 ASSERT_NOT_REACHED(); 540 ASSERT_NOT_REACHED();
541 } 541 }
542 542
543 } 543 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSSelector.cpp ('k') | Source/core/css/RuleSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698