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

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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 ASSERT_NOT_REACHED(); 287 ASSERT_NOT_REACHED();
288 } 288 }
289 289
290 layer->setMaskSourceType(type); 290 layer->setMaskSourceType(type);
291 } 291 }
292 292
293 double CSSToStyleMap::mapAnimationDelay(CSSValue* value) 293 double CSSToStyleMap::mapAnimationDelay(CSSValue* value)
294 { 294 {
295 if (value->isInitialValue()) 295 if (value->isInitialValue())
296 return CSSTimingData::initialDelay(); 296 return CSSTimingData::initialDelay();
297 return toCSSPrimitiveValue(value)->computeTime<double, CSSPrimitiveValue::Se conds>(); 297 return toCSSPrimitiveValue(value)->computeSeconds();
298 } 298 }
299 299
300 Timing::PlaybackDirection CSSToStyleMap::mapAnimationDirection(CSSValue* value) 300 Timing::PlaybackDirection CSSToStyleMap::mapAnimationDirection(CSSValue* value)
301 { 301 {
302 if (value->isInitialValue()) 302 if (value->isInitialValue())
303 return CSSAnimationData::initialDirection(); 303 return CSSAnimationData::initialDirection();
304 304
305 switch (toCSSPrimitiveValue(value)->getValueID()) { 305 switch (toCSSPrimitiveValue(value)->getValueID()) {
306 case CSSValueNormal: 306 case CSSValueNormal:
307 return Timing::PlaybackDirectionNormal; 307 return Timing::PlaybackDirectionNormal;
308 case CSSValueAlternate: 308 case CSSValueAlternate:
309 return Timing::PlaybackDirectionAlternate; 309 return Timing::PlaybackDirectionAlternate;
310 case CSSValueReverse: 310 case CSSValueReverse:
311 return Timing::PlaybackDirectionReverse; 311 return Timing::PlaybackDirectionReverse;
312 case CSSValueAlternateReverse: 312 case CSSValueAlternateReverse:
313 return Timing::PlaybackDirectionAlternateReverse; 313 return Timing::PlaybackDirectionAlternateReverse;
314 default: 314 default:
315 ASSERT_NOT_REACHED(); 315 ASSERT_NOT_REACHED();
316 return CSSAnimationData::initialDirection(); 316 return CSSAnimationData::initialDirection();
317 } 317 }
318 } 318 }
319 319
320 double CSSToStyleMap::mapAnimationDuration(CSSValue* value) 320 double CSSToStyleMap::mapAnimationDuration(CSSValue* value)
321 { 321 {
322 if (value->isInitialValue()) 322 if (value->isInitialValue())
323 return CSSTimingData::initialDuration(); 323 return CSSTimingData::initialDuration();
324 return toCSSPrimitiveValue(value)->computeTime<double, CSSPrimitiveValue::Se conds>(); 324 return toCSSPrimitiveValue(value)->computeSeconds();
325 } 325 }
326 326
327 Timing::FillMode CSSToStyleMap::mapAnimationFillMode(CSSValue* value) 327 Timing::FillMode CSSToStyleMap::mapAnimationFillMode(CSSValue* value)
328 { 328 {
329 if (value->isInitialValue()) 329 if (value->isInitialValue())
330 return CSSAnimationData::initialFillMode(); 330 return CSSAnimationData::initialFillMode();
331 331
332 switch (toCSSPrimitiveValue(value)->getValueID()) { 332 switch (toCSSPrimitiveValue(value)->getValueID()) {
333 case CSSValueNone: 333 case CSSValueNone:
334 return Timing::FillModeNone; 334 return Timing::FillModeNone;
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 verticalRule = SpaceImageRule; 597 verticalRule = SpaceImageRule;
598 break; 598 break;
599 default: // CSSValueRepeat 599 default: // CSSValueRepeat
600 verticalRule = RepeatImageRule; 600 verticalRule = RepeatImageRule;
601 break; 601 break;
602 } 602 }
603 image.setVerticalRule(verticalRule); 603 image.setVerticalRule(verticalRule);
604 } 604 }
605 605
606 }; 606 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698