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

Side by Side Diff: third_party/WebKit/Source/core/style/ShapeValue.h

Issue 2751653003: Replace ASSERT and ASSERT_NOT_REACHED in core/style/ (Closed)
Patch Set: Replace ASSERT and ASSERT_NOT_REACHED in core/style/ 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) 2012 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2012 Adobe Systems Incorporated. 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 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 StyleImage* image() const { return m_image.get(); } 67 StyleImage* image() const { return m_image.get(); }
68 bool isImageValid() const { 68 bool isImageValid() const {
69 if (!image()) 69 if (!image())
70 return false; 70 return false;
71 if (image()->isImageResource() || image()->isImageResourceSet()) 71 if (image()->isImageResource() || image()->isImageResourceSet())
72 return image()->cachedImage() && image()->cachedImage()->hasImage(); 72 return image()->cachedImage() && image()->cachedImage()->hasImage();
73 return image()->isGeneratedImage(); 73 return image()->isGeneratedImage();
74 } 74 }
75 void setImage(StyleImage* image) { 75 void setImage(StyleImage* image) {
76 ASSERT(type() == Image); 76 DCHECK_EQ(type(), Image);
77 if (m_image != image) 77 if (m_image != image)
78 m_image = image; 78 m_image = image;
79 } 79 }
80 CSSBoxType cssBox() const { return m_cssBox; } 80 CSSBoxType cssBox() const { return m_cssBox; }
81 81
82 bool operator==(const ShapeValue& other) const; 82 bool operator==(const ShapeValue& other) const;
83 83
84 DEFINE_INLINE_VIRTUAL_TRACE() { visitor->trace(m_image); } 84 DEFINE_INLINE_VIRTUAL_TRACE() { visitor->trace(m_image); }
85 85
86 private: 86 private:
(...skipping 24 matching lines...) Expand all
111 return dataEquivalent(image(), other.image()); 111 return dataEquivalent(image(), other.image());
112 } 112 }
113 113
114 NOTREACHED(); 114 NOTREACHED();
115 return false; 115 return false;
116 } 116 }
117 117
118 } // namespace blink 118 } // namespace blink
119 119
120 #endif 120 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ShadowList.h ('k') | third_party/WebKit/Source/core/style/StyleDifference.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698