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

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

Issue 64293008: Wrap CSS length conversion arguments in an object (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: don't make it noncopyable ; clang doesn't do the RVO stuffs? 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/core.gypi ('k') | Source/core/css/CSSCalculationValue.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) 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 break; 109 break;
110 } 110 }
111 default: 111 default:
112 break; 112 break;
113 } 113 }
114 return pool.createValue(basicShapeValue.release()); 114 return pool.createValue(basicShapeValue.release());
115 } 115 }
116 116
117 static Length convertToLength(const StyleResolverState& state, CSSPrimitiveValue * value) 117 static Length convertToLength(const StyleResolverState& state, CSSPrimitiveValue * value)
118 { 118 {
119 return value->convertToLength<FixedConversion | PercentConversion>(state.sty le(), state.rootElementStyle(), state.style()->effectiveZoom()); 119 return value->convertToLength<FixedConversion | PercentConversion>(state.css ToLengthConversionData());
120 } 120 }
121 121
122 PassRefPtr<BasicShape> basicShapeForValue(const StyleResolverState& state, const CSSBasicShape* basicShapeValue) 122 PassRefPtr<BasicShape> basicShapeForValue(const StyleResolverState& state, const CSSBasicShape* basicShapeValue)
123 { 123 {
124 RefPtr<BasicShape> basicShape; 124 RefPtr<BasicShape> basicShape;
125 125
126 switch (basicShapeValue->type()) { 126 switch (basicShapeValue->type()) {
127 case CSSBasicShape::CSSBasicShapeRectangleType: { 127 case CSSBasicShape::CSSBasicShapeRectangleType: {
128 const CSSBasicShapeRectangle* rectValue = static_cast<const CSSBasicShap eRectangle *>(basicShapeValue); 128 const CSSBasicShapeRectangle* rectValue = static_cast<const CSSBasicShap eRectangle *>(basicShapeValue);
129 RefPtr<BasicShapeRectangle> rect = BasicShapeRectangle::create(); 129 RefPtr<BasicShapeRectangle> rect = BasicShapeRectangle::create();
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } 202 }
203 basicShape = rect.release(); 203 basicShape = rect.release();
204 break; 204 break;
205 } 205 }
206 default: 206 default:
207 break; 207 break;
208 } 208 }
209 return basicShape.release(); 209 return basicShape.release();
210 } 210 }
211 } 211 }
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/css/CSSCalculationValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698