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

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

Issue 149363002: Web Animations API: Implement step-middle and steps(x, middle) timing functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add comment to timing-functions test re. invalidity of step-middle in CSS Created 6 years, 10 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) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 } 1019 }
1020 return cssValuePool().createIdentifierValue(valueId); 1020 return cssValuePool().createIdentifierValue(valueId);
1021 } 1021 }
1022 return CSSCubicBezierTimingFunctionValue::create(bezierTimingFunctio n->x1(), bezierTimingFunction->y1(), bezierTimingFunction->x2(), bezierTimingFun ction->y2()); 1022 return CSSCubicBezierTimingFunctionValue::create(bezierTimingFunctio n->x1(), bezierTimingFunction->y1(), bezierTimingFunction->x2(), bezierTimingFun ction->y2());
1023 } 1023 }
1024 1024
1025 case TimingFunction::StepsFunction: 1025 case TimingFunction::StepsFunction:
1026 { 1026 {
1027 const StepsTimingFunction* stepsTimingFunction = toStepsTimingFuncti on(timingFunction); 1027 const StepsTimingFunction* stepsTimingFunction = toStepsTimingFuncti on(timingFunction);
1028 if (stepsTimingFunction->subType() == StepsTimingFunction::Custom) 1028 if (stepsTimingFunction->subType() == StepsTimingFunction::Custom)
1029 return CSSStepsTimingFunctionValue::create(stepsTimingFunction-> numberOfSteps(), stepsTimingFunction->stepAtStart()); 1029 return CSSStepsTimingFunctionValue::create(stepsTimingFunction-> numberOfSteps(), stepsTimingFunction->stepAtPosition());
1030 CSSValueID valueId; 1030 CSSValueID valueId;
1031 switch (stepsTimingFunction->subType()) { 1031 switch (stepsTimingFunction->subType()) {
1032 case StepsTimingFunction::Start: 1032 case StepsTimingFunction::Start:
1033 valueId = CSSValueStepStart; 1033 valueId = CSSValueStepStart;
1034 break; 1034 break;
1035 case StepsTimingFunction::End: 1035 case StepsTimingFunction::End:
1036 valueId = CSSValueStepEnd; 1036 valueId = CSSValueStepEnd;
1037 break; 1037 break;
1038 default: 1038 default:
1039 ASSERT_NOT_REACHED(); 1039 ASSERT_NOT_REACHED();
(...skipping 2106 matching lines...) Expand 10 before | Expand all | Expand 10 after
3146 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3146 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3147 CSSPropertyB ackgroundClip }; 3147 CSSPropertyB ackgroundClip };
3148 3148
3149 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 3149 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
3150 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); 3150 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator))));
3151 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator)))); 3151 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator))));
3152 return list.release(); 3152 return list.release();
3153 } 3153 }
3154 3154
3155 } // namespace WebCore 3155 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698