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

Side by Side Diff: third_party/WebKit/Source/core/style/ClipPathOperation.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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 class ShapeClipPathOperation final : public ClipPathOperation { 97 class ShapeClipPathOperation final : public ClipPathOperation {
98 public: 98 public:
99 static PassRefPtr<ShapeClipPathOperation> create( 99 static PassRefPtr<ShapeClipPathOperation> create(
100 PassRefPtr<BasicShape> shape) { 100 PassRefPtr<BasicShape> shape) {
101 return adoptRef(new ShapeClipPathOperation(std::move(shape))); 101 return adoptRef(new ShapeClipPathOperation(std::move(shape)));
102 } 102 }
103 103
104 const BasicShape* basicShape() const { return m_shape.get(); } 104 const BasicShape* basicShape() const { return m_shape.get(); }
105 bool isValid() const { return m_shape.get(); } 105 bool isValid() const { return m_shape.get(); }
106 const Path& path(const FloatRect& boundingRect) { 106 const Path& path(const FloatRect& boundingRect) {
107 ASSERT(m_shape); 107 DCHECK(m_shape);
108 m_path.reset(); 108 m_path.reset();
109 m_path = WTF::wrapUnique(new Path); 109 m_path = WTF::wrapUnique(new Path);
110 m_shape->path(*m_path, boundingRect); 110 m_shape->path(*m_path, boundingRect);
111 m_path->setWindRule(m_shape->getWindRule()); 111 m_path->setWindRule(m_shape->getWindRule());
112 return *m_path; 112 return *m_path;
113 } 113 }
114 114
115 private: 115 private:
116 bool operator==(const ClipPathOperation&) const override; 116 bool operator==(const ClipPathOperation&) const override;
117 OperationType type() const override { return SHAPE; } 117 OperationType type() const override { return SHAPE; }
(...skipping 16 matching lines...) Expand all
134 return false; 134 return false;
135 BasicShape* otherShape = toShapeClipPathOperation(o).m_shape.get(); 135 BasicShape* otherShape = toShapeClipPathOperation(o).m_shape.get();
136 if (!m_shape.get() || !otherShape) 136 if (!m_shape.get() || !otherShape)
137 return static_cast<bool>(m_shape.get()) == static_cast<bool>(otherShape); 137 return static_cast<bool>(m_shape.get()) == static_cast<bool>(otherShape);
138 return *m_shape == *otherShape; 138 return *m_shape == *otherShape;
139 } 139 }
140 140
141 } // namespace blink 141 } // namespace blink
142 142
143 #endif // ClipPathOperation_h 143 #endif // ClipPathOperation_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/BorderImageLength.h ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698