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

Side by Side Diff: sky/engine/core/css/CSSBasicShapes.cpp

Issue 723253004: Remove tons of OILPAN. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/css/CSSBasicShapes.h ('k') | sky/engine/core/css/CSSBorderImageSliceValue.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 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 if (shape.type() != CSSBasicShapeCircleType) 129 if (shape.type() != CSSBasicShapeCircleType)
130 return false; 130 return false;
131 131
132 const CSSBasicShapeCircle& other = static_cast<const CSSBasicShapeCircle&>(s hape); 132 const CSSBasicShapeCircle& other = static_cast<const CSSBasicShapeCircle&>(s hape);
133 return compareCSSValuePtr(m_centerX, other.m_centerX) 133 return compareCSSValuePtr(m_centerX, other.m_centerX)
134 && compareCSSValuePtr(m_centerY, other.m_centerY) 134 && compareCSSValuePtr(m_centerY, other.m_centerY)
135 && compareCSSValuePtr(m_radius, other.m_radius) 135 && compareCSSValuePtr(m_radius, other.m_radius)
136 && compareCSSValuePtr(m_referenceBox, other.m_referenceBox); 136 && compareCSSValuePtr(m_referenceBox, other.m_referenceBox);
137 } 137 }
138 138
139 void CSSBasicShapeCircle::trace(Visitor* visitor)
140 {
141 visitor->trace(m_centerX);
142 visitor->trace(m_centerY);
143 visitor->trace(m_radius);
144 CSSBasicShape::trace(visitor);
145 }
146
147 static String buildEllipseString(const String& radiusX, const String& radiusY, c onst String& centerX, const String& centerY, const String& box) 139 static String buildEllipseString(const String& radiusX, const String& radiusY, c onst String& centerX, const String& centerY, const String& box)
148 { 140 {
149 char at[] = "at"; 141 char at[] = "at";
150 char separator[] = " "; 142 char separator[] = " ";
151 StringBuilder result; 143 StringBuilder result;
152 result.appendLiteral("ellipse("); 144 result.appendLiteral("ellipse(");
153 bool needsSeparator = false; 145 bool needsSeparator = false;
154 if (!radiusX.isNull()) { 146 if (!radiusX.isNull()) {
155 result.append(radiusX); 147 result.append(radiusX);
156 needsSeparator = true; 148 needsSeparator = true;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 return false; 203 return false;
212 204
213 const CSSBasicShapeEllipse& other = static_cast<const CSSBasicShapeEllipse&> (shape); 205 const CSSBasicShapeEllipse& other = static_cast<const CSSBasicShapeEllipse&> (shape);
214 return compareCSSValuePtr(m_centerX, other.m_centerX) 206 return compareCSSValuePtr(m_centerX, other.m_centerX)
215 && compareCSSValuePtr(m_centerY, other.m_centerY) 207 && compareCSSValuePtr(m_centerY, other.m_centerY)
216 && compareCSSValuePtr(m_radiusX, other.m_radiusX) 208 && compareCSSValuePtr(m_radiusX, other.m_radiusX)
217 && compareCSSValuePtr(m_radiusY, other.m_radiusY) 209 && compareCSSValuePtr(m_radiusY, other.m_radiusY)
218 && compareCSSValuePtr(m_referenceBox, other.m_referenceBox); 210 && compareCSSValuePtr(m_referenceBox, other.m_referenceBox);
219 } 211 }
220 212
221 void CSSBasicShapeEllipse::trace(Visitor* visitor)
222 {
223 visitor->trace(m_centerX);
224 visitor->trace(m_centerY);
225 visitor->trace(m_radiusX);
226 visitor->trace(m_radiusY);
227 CSSBasicShape::trace(visitor);
228 }
229
230 static String buildPolygonString(const WindRule& windRule, const Vector<String>& points, const String& box) 213 static String buildPolygonString(const WindRule& windRule, const Vector<String>& points, const String& box)
231 { 214 {
232 ASSERT(!(points.size() % 2)); 215 ASSERT(!(points.size() % 2));
233 216
234 StringBuilder result; 217 StringBuilder result;
235 const char evenOddOpening[] = "polygon(evenodd, "; 218 const char evenOddOpening[] = "polygon(evenodd, ";
236 const char nonZeroOpening[] = "polygon("; 219 const char nonZeroOpening[] = "polygon(";
237 const char commaSeparator[] = ", "; 220 const char commaSeparator[] = ", ";
238 COMPILE_ASSERT(sizeof(evenOddOpening) > sizeof(nonZeroOpening), polygon_stri ng_openings_have_same_length); 221 COMPILE_ASSERT(sizeof(evenOddOpening) > sizeof(nonZeroOpening), polygon_stri ng_openings_have_same_length);
239 222
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 return false; 272 return false;
290 273
291 const CSSBasicShapePolygon& rhs = static_cast<const CSSBasicShapePolygon&>(s hape); 274 const CSSBasicShapePolygon& rhs = static_cast<const CSSBasicShapePolygon&>(s hape);
292 275
293 if (!compareCSSValuePtr(m_referenceBox, rhs.m_referenceBox)) 276 if (!compareCSSValuePtr(m_referenceBox, rhs.m_referenceBox))
294 return false; 277 return false;
295 278
296 return compareCSSValueVector(m_values, rhs.m_values); 279 return compareCSSValueVector(m_values, rhs.m_values);
297 } 280 }
298 281
299 void CSSBasicShapePolygon::trace(Visitor* visitor)
300 {
301 visitor->trace(m_values);
302 CSSBasicShape::trace(visitor);
303 }
304
305 static bool buildInsetRadii(Vector<String> &radii, const String& topLeftRadius, const String& topRightRadius, const String& bottomRightRadius, const String& bot tomLeftRadius) 282 static bool buildInsetRadii(Vector<String> &radii, const String& topLeftRadius, const String& topRightRadius, const String& bottomRightRadius, const String& bot tomLeftRadius)
306 { 283 {
307 bool showBottomLeft = topRightRadius != bottomLeftRadius; 284 bool showBottomLeft = topRightRadius != bottomLeftRadius;
308 bool showBottomRight = showBottomLeft || (bottomRightRadius != topLeftRadius ); 285 bool showBottomRight = showBottomLeft || (bottomRightRadius != topLeftRadius );
309 bool showTopRight = showBottomRight || (topRightRadius != topLeftRadius); 286 bool showTopRight = showBottomRight || (topRightRadius != topLeftRadius);
310 287
311 radii.append(topLeftRadius); 288 radii.append(topLeftRadius);
312 if (showTopRight) 289 if (showTopRight)
313 radii.append(topRightRadius); 290 radii.append(topRightRadius);
314 if (showBottomRight) 291 if (showBottomRight)
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 return compareCSSValuePtr(m_top, other.m_top) 405 return compareCSSValuePtr(m_top, other.m_top)
429 && compareCSSValuePtr(m_right, other.m_right) 406 && compareCSSValuePtr(m_right, other.m_right)
430 && compareCSSValuePtr(m_bottom, other.m_bottom) 407 && compareCSSValuePtr(m_bottom, other.m_bottom)
431 && compareCSSValuePtr(m_left, other.m_left) 408 && compareCSSValuePtr(m_left, other.m_left)
432 && compareCSSValuePtr(m_topLeftRadius, other.m_topLeftRadius) 409 && compareCSSValuePtr(m_topLeftRadius, other.m_topLeftRadius)
433 && compareCSSValuePtr(m_topRightRadius, other.m_topRightRadius) 410 && compareCSSValuePtr(m_topRightRadius, other.m_topRightRadius)
434 && compareCSSValuePtr(m_bottomRightRadius, other.m_bottomRightRadius) 411 && compareCSSValuePtr(m_bottomRightRadius, other.m_bottomRightRadius)
435 && compareCSSValuePtr(m_bottomLeftRadius, other.m_bottomLeftRadius); 412 && compareCSSValuePtr(m_bottomLeftRadius, other.m_bottomLeftRadius);
436 } 413 }
437 414
438 void CSSBasicShapeInset::trace(Visitor* visitor)
439 {
440 visitor->trace(m_top);
441 visitor->trace(m_right);
442 visitor->trace(m_bottom);
443 visitor->trace(m_left);
444 visitor->trace(m_topLeftRadius);
445 visitor->trace(m_topRightRadius);
446 visitor->trace(m_bottomRightRadius);
447 visitor->trace(m_bottomLeftRadius);
448 CSSBasicShape::trace(visitor);
449 }
450
451 } // namespace blink 415 } // namespace blink
452 416
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSBasicShapes.h ('k') | sky/engine/core/css/CSSBorderImageSliceValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698