| OLD | NEW |
| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 260 |
| 261 result.append(')'); | 261 result.append(')'); |
| 262 return result.toString(); | 262 return result.toString(); |
| 263 } | 263 } |
| 264 | 264 |
| 265 String CSSBasicShapePolygonValue::customCSSText() const { | 265 String CSSBasicShapePolygonValue::customCSSText() const { |
| 266 Vector<String> points; | 266 Vector<String> points; |
| 267 points.reserveInitialCapacity(m_values.size()); | 267 points.reserveInitialCapacity(m_values.size()); |
| 268 | 268 |
| 269 for (size_t i = 0; i < m_values.size(); ++i) | 269 for (size_t i = 0; i < m_values.size(); ++i) |
| 270 points.append(m_values.at(i)->cssText()); | 270 points.push_back(m_values.at(i)->cssText()); |
| 271 | 271 |
| 272 return buildPolygonString(m_windRule, points); | 272 return buildPolygonString(m_windRule, points); |
| 273 } | 273 } |
| 274 | 274 |
| 275 bool CSSBasicShapePolygonValue::equals( | 275 bool CSSBasicShapePolygonValue::equals( |
| 276 const CSSBasicShapePolygonValue& other) const { | 276 const CSSBasicShapePolygonValue& other) const { |
| 277 return compareCSSValueVector(m_values, other.m_values); | 277 return compareCSSValueVector(m_values, other.m_values); |
| 278 } | 278 } |
| 279 | 279 |
| 280 DEFINE_TRACE_AFTER_DISPATCH(CSSBasicShapePolygonValue) { | 280 DEFINE_TRACE_AFTER_DISPATCH(CSSBasicShapePolygonValue) { |
| 281 visitor->trace(m_values); | 281 visitor->trace(m_values); |
| 282 CSSValue::traceAfterDispatch(visitor); | 282 CSSValue::traceAfterDispatch(visitor); |
| 283 } | 283 } |
| 284 | 284 |
| 285 static bool buildInsetRadii(Vector<String>& radii, | 285 static bool buildInsetRadii(Vector<String>& radii, |
| 286 const String& topLeftRadius, | 286 const String& topLeftRadius, |
| 287 const String& topRightRadius, | 287 const String& topRightRadius, |
| 288 const String& bottomRightRadius, | 288 const String& bottomRightRadius, |
| 289 const String& bottomLeftRadius) { | 289 const String& bottomLeftRadius) { |
| 290 bool showBottomLeft = topRightRadius != bottomLeftRadius; | 290 bool showBottomLeft = topRightRadius != bottomLeftRadius; |
| 291 bool showBottomRight = showBottomLeft || (bottomRightRadius != topLeftRadius); | 291 bool showBottomRight = showBottomLeft || (bottomRightRadius != topLeftRadius); |
| 292 bool showTopRight = showBottomRight || (topRightRadius != topLeftRadius); | 292 bool showTopRight = showBottomRight || (topRightRadius != topLeftRadius); |
| 293 | 293 |
| 294 radii.append(topLeftRadius); | 294 radii.push_back(topLeftRadius); |
| 295 if (showTopRight) | 295 if (showTopRight) |
| 296 radii.append(topRightRadius); | 296 radii.push_back(topRightRadius); |
| 297 if (showBottomRight) | 297 if (showBottomRight) |
| 298 radii.append(bottomRightRadius); | 298 radii.push_back(bottomRightRadius); |
| 299 if (showBottomLeft) | 299 if (showBottomLeft) |
| 300 radii.append(bottomLeftRadius); | 300 radii.push_back(bottomLeftRadius); |
| 301 | 301 |
| 302 return radii.size() == 1 && radii[0] == "0px"; | 302 return radii.size() == 1 && radii[0] == "0px"; |
| 303 } | 303 } |
| 304 | 304 |
| 305 static String buildInsetString(const String& top, | 305 static String buildInsetString(const String& top, |
| 306 const String& right, | 306 const String& right, |
| 307 const String& bottom, | 307 const String& bottom, |
| 308 const String& left, | 308 const String& left, |
| 309 const String& topLeftRadiusWidth, | 309 const String& topLeftRadiusWidth, |
| 310 const String& topLeftRadiusHeight, | 310 const String& topLeftRadiusHeight, |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 visitor->trace(m_bottom); | 429 visitor->trace(m_bottom); |
| 430 visitor->trace(m_left); | 430 visitor->trace(m_left); |
| 431 visitor->trace(m_topLeftRadius); | 431 visitor->trace(m_topLeftRadius); |
| 432 visitor->trace(m_topRightRadius); | 432 visitor->trace(m_topRightRadius); |
| 433 visitor->trace(m_bottomRightRadius); | 433 visitor->trace(m_bottomRightRadius); |
| 434 visitor->trace(m_bottomLeftRadius); | 434 visitor->trace(m_bottomLeftRadius); |
| 435 CSSValue::traceAfterDispatch(visitor); | 435 CSSValue::traceAfterDispatch(visitor); |
| 436 } | 436 } |
| 437 | 437 |
| 438 } // namespace blink | 438 } // namespace blink |
| OLD | NEW |