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

Side by Side Diff: Source/core/css/BasicShapeFunctions.cpp

Issue 209433004: Do not zero-initialize RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compilation on gcc and msvc Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/css/CSSAnimations.cpp ('k') | Source/core/css/CSSBasicShapes.cpp » ('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) 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 63
64 ASSERT_NOT_REACHED(); 64 ASSERT_NOT_REACHED();
65 return nullptr; 65 return nullptr;
66 } 66 }
67 67
68 PassRefPtrWillBeRawPtr<CSSValue> valueForBasicShape(const RenderStyle& style, co nst BasicShape* basicShape) 68 PassRefPtrWillBeRawPtr<CSSValue> valueForBasicShape(const RenderStyle& style, co nst BasicShape* basicShape)
69 { 69 {
70 CSSValuePool& pool = cssValuePool(); 70 CSSValuePool& pool = cssValuePool();
71 71
72 RefPtrWillBeRawPtr<CSSBasicShape> basicShapeValue; 72 RefPtrWillBeRawPtr<CSSBasicShape> basicShapeValue = nullptr;
73 switch (basicShape->type()) { 73 switch (basicShape->type()) {
74 case BasicShape::BasicShapeCircleType: { 74 case BasicShape::BasicShapeCircleType: {
75 const BasicShapeCircle* circle = static_cast<const BasicShapeCircle*>(ba sicShape); 75 const BasicShapeCircle* circle = static_cast<const BasicShapeCircle*>(ba sicShape);
76 RefPtrWillBeRawPtr<CSSBasicShapeCircle> circleValue = CSSBasicShapeCircl e::create(); 76 RefPtrWillBeRawPtr<CSSBasicShapeCircle> circleValue = CSSBasicShapeCircl e::create();
77 77
78 circleValue->setCenterX(valueForCenterCoordinate(pool, style, circle->ce nterX(), HORIZONTAL)); 78 circleValue->setCenterX(valueForCenterCoordinate(pool, style, circle->ce nterX(), HORIZONTAL));
79 circleValue->setCenterY(valueForCenterCoordinate(pool, style, circle->ce nterY(), VERTICAL)); 79 circleValue->setCenterY(valueForCenterCoordinate(pool, style, circle->ce nterY(), VERTICAL));
80 circleValue->setRadius(basicShapeRadiusToCSSValue(pool, style, circle->r adius())); 80 circleValue->setRadius(basicShapeRadiusToCSSValue(pool, style, circle->r adius()));
81 basicShapeValue = circleValue.release(); 81 basicShapeValue = circleValue.release();
82 break; 82 break;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 { 271 {
272 FloatPoint p; 272 FloatPoint p;
273 float offset = floatValueForLength(centerX.length(), boxSize.width()); 273 float offset = floatValueForLength(centerX.length(), boxSize.width());
274 p.setX(centerX.direction() == BasicShapeCenterCoordinate::TopLeft ? offset : boxSize.width() - offset); 274 p.setX(centerX.direction() == BasicShapeCenterCoordinate::TopLeft ? offset : boxSize.width() - offset);
275 offset = floatValueForLength(centerY.length(), boxSize.height()); 275 offset = floatValueForLength(centerY.length(), boxSize.height());
276 p.setY(centerY.direction() == BasicShapeCenterCoordinate::TopLeft ? offset : boxSize.height() - offset); 276 p.setY(centerY.direction() == BasicShapeCenterCoordinate::TopLeft ? offset : boxSize.height() - offset);
277 return p; 277 return p;
278 } 278 }
279 279
280 } 280 }
OLDNEW
« no previous file with comments | « Source/core/animation/css/CSSAnimations.cpp ('k') | Source/core/css/CSSBasicShapes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698