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

Side by Side Diff: Source/core/animation/css/CSSAnimations.cpp

Issue 22799020: Web Animations CSS: Support Animation of StyleImage and LengthBox (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments. Update tests to use assert functionality. Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 ASSERT(timedItem->specified().startDelay > 0 || isFirstSample); 261 ASSERT(timedItem->specified().startDelay > 0 || isFirstSample);
262 // The spec states that the elapsed time should be 262 // The spec states that the elapsed time should be
263 // 'delay < 0 ? -delay : 0', but we always use 0 to match the existing 263 // 'delay < 0 ? -delay : 0', but we always use 0 to match the existing
264 // implementation. See crbug.com/279611 264 // implementation. See crbug.com/279611
265 maybeDispatch(Document::ANIMATIONSTART_LISTENER, eventNames().animations tartEvent, 0); 265 maybeDispatch(Document::ANIMATIONSTART_LISTENER, eventNames().animations tartEvent, 0);
266 } 266 }
267 if ((isFirstSample || isEarlierPhase(previousPhase, TimedItem::PhaseAfter)) && currentPhase == TimedItem::PhaseAfter) 267 if ((isFirstSample || isEarlierPhase(previousPhase, TimedItem::PhaseAfter)) && currentPhase == TimedItem::PhaseAfter)
268 maybeDispatch(Document::ANIMATIONEND_LISTENER, eventNames().animationend Event, timedItem->activeDuration()); 268 maybeDispatch(Document::ANIMATIONEND_LISTENER, eventNames().animationend Event, timedItem->activeDuration());
269 } 269 }
270 270
271 bool CSSAnimations::isAnimatableProperty(CSSPropertyID property)
272 {
273 switch (property) {
274 case CSSPropertyBackgroundColor:
275 case CSSPropertyBackgroundImage:
276 case CSSPropertyBackgroundPositionX:
277 case CSSPropertyBackgroundPositionY:
278 case CSSPropertyBackgroundSize:
279 case CSSPropertyBaselineShift:
280 case CSSPropertyBorderBottomColor:
281 case CSSPropertyBorderBottomLeftRadius:
282 case CSSPropertyBorderBottomRightRadius:
283 case CSSPropertyBorderBottomWidth:
284 case CSSPropertyBorderImageOutset:
285 case CSSPropertyBorderImageSlice:
286 case CSSPropertyBorderImageSource:
287 case CSSPropertyBorderImageWidth:
288 case CSSPropertyBorderLeftColor:
289 case CSSPropertyBorderLeftWidth:
290 case CSSPropertyBorderRightColor:
291 case CSSPropertyBorderRightWidth:
292 case CSSPropertyBorderTopColor:
293 case CSSPropertyBorderTopLeftRadius:
294 case CSSPropertyBorderTopRightRadius:
295 case CSSPropertyBorderTopWidth:
296 case CSSPropertyBottom:
297 case CSSPropertyBoxShadow:
298 case CSSPropertyClip:
299 case CSSPropertyColor:
300 case CSSPropertyFill:
301 case CSSPropertyFillOpacity:
302 case CSSPropertyFlex:
303 case CSSPropertyFloodColor:
304 case CSSPropertyFloodOpacity:
305 case CSSPropertyFontSize:
306 case CSSPropertyHeight:
307 case CSSPropertyKerning:
308 case CSSPropertyLeft:
309 case CSSPropertyLetterSpacing:
310 case CSSPropertyLightingColor:
311 case CSSPropertyLineHeight:
312 case CSSPropertyListStyleImage:
313 case CSSPropertyMarginBottom:
314 case CSSPropertyMarginLeft:
315 case CSSPropertyMarginRight:
316 case CSSPropertyMarginTop:
317 case CSSPropertyMaxHeight:
318 case CSSPropertyMaxWidth:
319 case CSSPropertyMinHeight:
320 case CSSPropertyMinWidth:
321 case CSSPropertyOpacity:
322 case CSSPropertyOrphans:
323 case CSSPropertyOutlineColor:
324 case CSSPropertyOutlineOffset:
325 case CSSPropertyOutlineWidth:
326 case CSSPropertyPaddingBottom:
327 case CSSPropertyPaddingLeft:
328 case CSSPropertyPaddingRight:
329 case CSSPropertyPaddingTop:
330 case CSSPropertyRight:
331 case CSSPropertyStopColor:
332 case CSSPropertyStopOpacity:
333 case CSSPropertyStroke:
334 case CSSPropertyStrokeDasharray:
335 case CSSPropertyStrokeDashoffset:
336 case CSSPropertyStrokeMiterlimit:
337 case CSSPropertyStrokeOpacity:
338 case CSSPropertyStrokeWidth:
339 case CSSPropertyTextIndent:
340 case CSSPropertyTextShadow:
341 case CSSPropertyTop:
342 case CSSPropertyVisibility:
343 case CSSPropertyWebkitBackgroundSize:
344 case CSSPropertyWebkitBorderHorizontalSpacing:
345 case CSSPropertyWebkitBorderVerticalSpacing:
346 case CSSPropertyWebkitBoxShadow:
347 case CSSPropertyWebkitClipPath:
348 case CSSPropertyWebkitColumnCount:
349 case CSSPropertyWebkitColumnGap:
350 case CSSPropertyWebkitColumnRuleColor:
351 case CSSPropertyWebkitColumnRuleWidth:
352 case CSSPropertyWebkitColumnWidth:
353 case CSSPropertyWebkitFilter:
354 case CSSPropertyWebkitMaskBoxImage:
355 case CSSPropertyWebkitMaskBoxImageSource:
356 case CSSPropertyWebkitMaskImage:
357 case CSSPropertyWebkitMaskPositionX:
358 case CSSPropertyWebkitMaskPositionY:
359 case CSSPropertyWebkitMaskSize:
360 case CSSPropertyWebkitPerspective:
361 case CSSPropertyWebkitPerspectiveOriginX:
362 case CSSPropertyWebkitPerspectiveOriginY:
363 case CSSPropertyWebkitShapeInside:
364 case CSSPropertyWebkitTextFillColor:
365 case CSSPropertyWebkitTextStrokeColor:
366 case CSSPropertyWebkitTransform:
367 case CSSPropertyWebkitTransformOriginX:
368 case CSSPropertyWebkitTransformOriginY:
369 case CSSPropertyWebkitTransformOriginZ:
370 case CSSPropertyWidows:
371 case CSSPropertyWidth:
372 case CSSPropertyWordSpacing:
373 case CSSPropertyZIndex:
374 case CSSPropertyZoom:
375 return true;
376 default:
377 return false;
378 }
379 }
380
271 } // namespace WebCore 381 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698