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

Side by Side Diff: Source/core/rendering/style/BasicShapes.h

Issue 108653006: Assert that convertToLength succeeds instead of returning Length(Undefined) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 7 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/resolver/TransformBuilder.cpp ('k') | no next file » | 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) 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 Length height() const { return m_height; } 74 Length height() const { return m_height; }
75 Length cornerRadiusX() const { return m_cornerRadiusX; } 75 Length cornerRadiusX() const { return m_cornerRadiusX; }
76 Length cornerRadiusY() const { return m_cornerRadiusY; } 76 Length cornerRadiusY() const { return m_cornerRadiusY; }
77 77
78 void setX(Length x) { m_x = x; } 78 void setX(Length x) { m_x = x; }
79 void setY(Length y) { m_y = y; } 79 void setY(Length y) { m_y = y; }
80 void setWidth(Length width) { m_width = width; } 80 void setWidth(Length width) { m_width = width; }
81 void setHeight(Length height) { m_height = height; } 81 void setHeight(Length height) { m_height = height; }
82 void setCornerRadiusX(Length radiusX) 82 void setCornerRadiusX(Length radiusX)
83 { 83 {
84 ASSERT(!radiusX.isUndefined());
85 m_cornerRadiusX = radiusX; 84 m_cornerRadiusX = radiusX;
86 } 85 }
87 void setCornerRadiusY(Length radiusY) 86 void setCornerRadiusY(Length radiusY)
88 { 87 {
89 ASSERT(!radiusY.isUndefined());
90 m_cornerRadiusY = radiusY; 88 m_cornerRadiusY = radiusY;
91 } 89 }
92 90
93 virtual void path(Path&, const FloatRect&) OVERRIDE; 91 virtual void path(Path&, const FloatRect&) OVERRIDE;
94 virtual PassRefPtr<BasicShape> blend(const BasicShape*, double) const OVERRI DE; 92 virtual PassRefPtr<BasicShape> blend(const BasicShape*, double) const OVERRI DE;
95 93
96 virtual Type type() const { return BasicShapeRectangleType; } 94 virtual Type type() const { return BasicShapeRectangleType; }
97 private: 95 private:
98 BasicShapeRectangle() { } 96 BasicShapeRectangle() { }
99 97
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 Length left() const { return m_left; } 190 Length left() const { return m_left; }
193 Length cornerRadiusX() const { return m_cornerRadiusX; } 191 Length cornerRadiusX() const { return m_cornerRadiusX; }
194 Length cornerRadiusY() const { return m_cornerRadiusY; } 192 Length cornerRadiusY() const { return m_cornerRadiusY; }
195 193
196 void setTop(Length top) { m_top = top; } 194 void setTop(Length top) { m_top = top; }
197 void setRight(Length right) { m_right = right; } 195 void setRight(Length right) { m_right = right; }
198 void setBottom(Length bottom) { m_bottom = bottom; } 196 void setBottom(Length bottom) { m_bottom = bottom; }
199 void setLeft(Length left) { m_left = left; } 197 void setLeft(Length left) { m_left = left; }
200 void setCornerRadiusX(Length radiusX) 198 void setCornerRadiusX(Length radiusX)
201 { 199 {
202 ASSERT(!radiusX.isUndefined());
203 m_cornerRadiusX = radiusX; 200 m_cornerRadiusX = radiusX;
204 } 201 }
205 void setCornerRadiusY(Length radiusY) 202 void setCornerRadiusY(Length radiusY)
206 { 203 {
207 ASSERT(!radiusY.isUndefined());
208 m_cornerRadiusY = radiusY; 204 m_cornerRadiusY = radiusY;
209 } 205 }
210 206
211 virtual void path(Path&, const FloatRect&) OVERRIDE; 207 virtual void path(Path&, const FloatRect&) OVERRIDE;
212 virtual PassRefPtr<BasicShape> blend(const BasicShape*, double) const OVERRI DE; 208 virtual PassRefPtr<BasicShape> blend(const BasicShape*, double) const OVERRI DE;
213 209
214 virtual Type type() const { return BasicShapeInsetRectangleType; } 210 virtual Type type() const { return BasicShapeInsetRectangleType; }
215 private: 211 private:
216 BasicShapeInsetRectangle() { } 212 BasicShapeInsetRectangle() { }
217 213
218 Length m_right; 214 Length m_right;
219 Length m_top; 215 Length m_top;
220 Length m_bottom; 216 Length m_bottom;
221 Length m_left; 217 Length m_left;
222 Length m_cornerRadiusX; 218 Length m_cornerRadiusX;
223 Length m_cornerRadiusY; 219 Length m_cornerRadiusY;
224 }; 220 };
225 } 221 }
226 #endif 222 #endif
OLDNEW
« no previous file with comments | « Source/core/css/resolver/TransformBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698