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

Side by Side Diff: Source/core/css/resolver/CSSToStyleMap.cpp

Issue 345903005: calc expressions should support time, angle and frequency values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated patch Created 6 years, 5 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 ASSERT_NOT_REACHED(); 284 ASSERT_NOT_REACHED();
285 } 285 }
286 286
287 layer->setMaskSourceType(type); 287 layer->setMaskSourceType(type);
288 } 288 }
289 289
290 double CSSToStyleMap::mapAnimationDelay(CSSValue* value) 290 double CSSToStyleMap::mapAnimationDelay(CSSValue* value)
291 { 291 {
292 if (value->isInitialValue()) 292 if (value->isInitialValue())
293 return CSSTimingData::initialDelay(); 293 return CSSTimingData::initialDelay();
294 return toCSSPrimitiveValue(value)->computeTime<double, CSSPrimitiveValue::Se conds>(); 294 return toCSSPrimitiveValue(value)->computeSeconds();
295 } 295 }
296 296
297 Timing::PlaybackDirection CSSToStyleMap::mapAnimationDirection(CSSValue* value) 297 Timing::PlaybackDirection CSSToStyleMap::mapAnimationDirection(CSSValue* value)
298 { 298 {
299 if (value->isInitialValue()) 299 if (value->isInitialValue())
300 return CSSAnimationData::initialDirection(); 300 return CSSAnimationData::initialDirection();
301 301
302 switch (toCSSPrimitiveValue(value)->getValueID()) { 302 switch (toCSSPrimitiveValue(value)->getValueID()) {
303 case CSSValueNormal: 303 case CSSValueNormal:
304 return Timing::PlaybackDirectionNormal; 304 return Timing::PlaybackDirectionNormal;
305 case CSSValueAlternate: 305 case CSSValueAlternate:
306 return Timing::PlaybackDirectionAlternate; 306 return Timing::PlaybackDirectionAlternate;
307 case CSSValueReverse: 307 case CSSValueReverse:
308 return Timing::PlaybackDirectionReverse; 308 return Timing::PlaybackDirectionReverse;
309 case CSSValueAlternateReverse: 309 case CSSValueAlternateReverse:
310 return Timing::PlaybackDirectionAlternateReverse; 310 return Timing::PlaybackDirectionAlternateReverse;
311 default: 311 default:
312 ASSERT_NOT_REACHED(); 312 ASSERT_NOT_REACHED();
313 return CSSAnimationData::initialDirection(); 313 return CSSAnimationData::initialDirection();
314 } 314 }
315 } 315 }
316 316
317 double CSSToStyleMap::mapAnimationDuration(CSSValue* value) 317 double CSSToStyleMap::mapAnimationDuration(CSSValue* value)
318 { 318 {
319 if (value->isInitialValue()) 319 if (value->isInitialValue())
320 return CSSTimingData::initialDuration(); 320 return CSSTimingData::initialDuration();
321 return toCSSPrimitiveValue(value)->computeTime<double, CSSPrimitiveValue::Se conds>(); 321 return toCSSPrimitiveValue(value)->computeSeconds();
322 } 322 }
323 323
324 Timing::FillMode CSSToStyleMap::mapAnimationFillMode(CSSValue* value) 324 Timing::FillMode CSSToStyleMap::mapAnimationFillMode(CSSValue* value)
325 { 325 {
326 if (value->isInitialValue()) 326 if (value->isInitialValue())
327 return CSSAnimationData::initialFillMode(); 327 return CSSAnimationData::initialFillMode();
328 328
329 switch (toCSSPrimitiveValue(value)->getValueID()) { 329 switch (toCSSPrimitiveValue(value)->getValueID()) {
330 case CSSValueNone: 330 case CSSValueNone:
331 return Timing::FillModeNone; 331 return Timing::FillModeNone;
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 verticalRule = SpaceImageRule; 594 verticalRule = SpaceImageRule;
595 break; 595 break;
596 default: // CSSValueRepeat 596 default: // CSSValueRepeat
597 verticalRule = RepeatImageRule; 597 verticalRule = RepeatImageRule;
598 break; 598 break;
599 } 599 }
600 image.setVerticalRule(verticalRule); 600 image.setVerticalRule(verticalRule);
601 } 601 }
602 602
603 }; 603 };
OLDNEW
« no previous file with comments | « Source/core/css/parser/CSSPropertyParser.cpp ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698