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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSGradientValue.h

Issue 2755493004: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ (Closed)
Patch Set: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ Created 3 years, 9 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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 public: 61 public:
62 CSSGradientColorStop() : m_colorIsDerivedFromElement(false) {} 62 CSSGradientColorStop() : m_colorIsDerivedFromElement(false) {}
63 Member<CSSPrimitiveValue> m_position; // percentage or length 63 Member<CSSPrimitiveValue> m_position; // percentage or length
64 Member<CSSValue> m_color; 64 Member<CSSValue> m_color;
65 bool m_colorIsDerivedFromElement; 65 bool m_colorIsDerivedFromElement;
66 bool operator==(const CSSGradientColorStop& other) const { 66 bool operator==(const CSSGradientColorStop& other) const {
67 return dataEquivalent(m_color, other.m_color) && 67 return dataEquivalent(m_color, other.m_color) &&
68 dataEquivalent(m_position, other.m_position); 68 dataEquivalent(m_position, other.m_position);
69 } 69 }
70 bool isHint() const { 70 bool isHint() const {
71 ASSERT(m_color || m_position); 71 DCHECK(m_color || m_position);
72 return !m_color; 72 return !m_color;
73 } 73 }
74 74
75 DECLARE_TRACE(); 75 DECLARE_TRACE();
76 }; 76 };
77 77
78 } // namespace blink 78 } // namespace blink
79 79
80 // We have to declare the VectorTraits specialization before CSSGradientValue 80 // We have to declare the VectorTraits specialization before CSSGradientValue
81 // declares its inline capacity vector below. 81 // declares its inline capacity vector below.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 Member<CSSPrimitiveValue> m_endHorizontalSize; 235 Member<CSSPrimitiveValue> m_endHorizontalSize;
236 Member<CSSPrimitiveValue> m_endVerticalSize; 236 Member<CSSPrimitiveValue> m_endVerticalSize;
237 }; 237 };
238 238
239 DEFINE_CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue()); 239 DEFINE_CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue());
240 240
241 } // namespace blink 241 } // namespace blink
242 242
243 #endif // CSSGradientValue_h 243 #endif // CSSGradientValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698