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

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

Issue 255193002: [CSS Shapes] complex calc args for inset round vanish (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove unneeded one parameter LengthSize version Created 6 years, 7 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
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 106 }
107 case BasicShape::BasicShapeInsetType: { 107 case BasicShape::BasicShapeInsetType: {
108 const BasicShapeInset* inset = static_cast<const BasicShapeInset*>(basic Shape); 108 const BasicShapeInset* inset = static_cast<const BasicShapeInset*>(basic Shape);
109 RefPtrWillBeRawPtr<CSSBasicShapeInset> insetValue = CSSBasicShapeInset:: create(); 109 RefPtrWillBeRawPtr<CSSBasicShapeInset> insetValue = CSSBasicShapeInset:: create();
110 110
111 insetValue->setTop(pool.createValue(inset->top(), style)); 111 insetValue->setTop(pool.createValue(inset->top(), style));
112 insetValue->setRight(pool.createValue(inset->right(), style)); 112 insetValue->setRight(pool.createValue(inset->right(), style));
113 insetValue->setBottom(pool.createValue(inset->bottom(), style)); 113 insetValue->setBottom(pool.createValue(inset->bottom(), style));
114 insetValue->setLeft(pool.createValue(inset->left(), style)); 114 insetValue->setLeft(pool.createValue(inset->left(), style));
115 115
116 insetValue->setTopLeftRadius(CSSPrimitiveValue::create(inset->topLeftRad ius())); 116 insetValue->setTopLeftRadius(CSSPrimitiveValue::create(inset->topLeftRad ius(), style));
117 insetValue->setTopRightRadius(CSSPrimitiveValue::create(inset->topRightR adius())); 117 insetValue->setTopRightRadius(CSSPrimitiveValue::create(inset->topRightR adius(), style));
118 insetValue->setBottomRightRadius(CSSPrimitiveValue::create(inset->bottom RightRadius())); 118 insetValue->setBottomRightRadius(CSSPrimitiveValue::create(inset->bottom RightRadius(), style));
119 insetValue->setBottomLeftRadius(CSSPrimitiveValue::create(inset->bottomL eftRadius())); 119 insetValue->setBottomLeftRadius(CSSPrimitiveValue::create(inset->bottomL eftRadius(), style));
120 120
121 basicShapeValue = insetValue.release(); 121 basicShapeValue = insetValue.release();
122 break; 122 break;
123 } 123 }
124 default: 124 default:
125 break; 125 break;
126 } 126 }
127 127
128 return pool.createValue(basicShapeValue.release()); 128 return pool.createValue(basicShapeValue.release());
129 } 129 }
(...skipping 141 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 | « LayoutTests/fast/shapes/parsing/parsing-test-utils.js ('k') | Source/core/css/CSSPrimitiveValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698