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

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

Issue 189883003: Web Animations: Allow animations with delay to start on compositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Relax assert. Created 6 years, 9 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
« no previous file with comments | « Source/core/animation/CompositorAnimations.cpp ('k') | Source/core/rendering/RenderBox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 return; 338 return;
339 case CSSPropertyClip: 339 case CSSPropertyClip:
340 style->setClip(animatableValueToLengthBox(value, state)); 340 style->setClip(animatableValueToLengthBox(value, state));
341 style->setHasClip(true); 341 style->setHasClip(true);
342 return; 342 return;
343 case CSSPropertyColor: 343 case CSSPropertyColor:
344 style->setColor(toAnimatableColor(value)->color()); 344 style->setColor(toAnimatableColor(value)->color());
345 style->setVisitedLinkColor(toAnimatableColor(value)->visitedLinkColor()) ; 345 style->setVisitedLinkColor(toAnimatableColor(value)->visitedLinkColor()) ;
346 return; 346 return;
347 case CSSPropertyFillOpacity: 347 case CSSPropertyFillOpacity:
348 // Avoiding a value of 1 forces a layer to be created. 348 style->setFillOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble (), 0, 1));
349 style->setFillOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble (), 0, nextafterf(1, 0)));
350 return; 349 return;
351 case CSSPropertyFill: 350 case CSSPropertyFill:
352 { 351 {
353 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value); 352 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value);
354 style->accessSVGStyle()->setFillPaint(svgPaint->paintType(), svgPain t->color(), svgPaint->uri()); 353 style->accessSVGStyle()->setFillPaint(svgPaint->paintType(), svgPain t->color(), svgPaint->uri());
355 } 354 }
356 return; 355 return;
357 case CSSPropertyFlexGrow: 356 case CSSPropertyFlexGrow:
358 style->setFlexGrow(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0)); 357 style->setFlexGrow(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0));
359 return; 358 return;
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 return; 573 return;
575 case CSSPropertyShapeImageThreshold: 574 case CSSPropertyShapeImageThreshold:
576 style->setShapeImageThreshold(clampTo<float>(toAnimatableDouble(value)-> toDouble(), 0, 1)); 575 style->setShapeImageThreshold(clampTo<float>(toAnimatableDouble(value)-> toDouble(), 0, 1));
577 return; 576 return;
578 case CSSPropertyWebkitTextStrokeColor: 577 case CSSPropertyWebkitTextStrokeColor:
579 style->setTextStrokeColor(toAnimatableColor(value)->color()); 578 style->setTextStrokeColor(toAnimatableColor(value)->color());
580 style->setVisitedLinkTextStrokeColor(toAnimatableColor(value)->visitedLi nkColor()); 579 style->setVisitedLinkTextStrokeColor(toAnimatableColor(value)->visitedLi nkColor());
581 return; 580 return;
582 case CSSPropertyWebkitTransform: { 581 case CSSPropertyWebkitTransform: {
583 const TransformOperations& operations = toAnimatableTransform(value)->tr ansformOperations(); 582 const TransformOperations& operations = toAnimatableTransform(value)->tr ansformOperations();
584 // FIXME: Using identity matrix here when the transform list is empty 583 // FIXME: This normalization (handling of 'none') should be performed at input in AnimatableValueFactory.
585 // forces a layer to be created in the presence of a transform animation .
586 style->setTransform(operations.size() ? operations : TransformOperations (true)); 584 style->setTransform(operations.size() ? operations : TransformOperations (true));
587 return; 585 return;
588 } 586 }
589 case CSSPropertyWebkitTransformOriginX: 587 case CSSPropertyWebkitTransformOriginX:
590 style->setTransformOriginX(animatableValueToLength(value, state)); 588 style->setTransformOriginX(animatableValueToLength(value, state));
591 return; 589 return;
592 case CSSPropertyWebkitTransformOriginY: 590 case CSSPropertyWebkitTransformOriginY:
593 style->setTransformOriginY(animatableValueToLength(value, state)); 591 style->setTransformOriginY(animatableValueToLength(value, state));
594 return; 592 return;
595 case CSSPropertyWebkitTransformOriginZ: 593 case CSSPropertyWebkitTransformOriginZ:
(...skipping 16 matching lines...) Expand all
612 return; 610 return;
613 case CSSPropertyZoom: 611 case CSSPropertyZoom:
614 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble(), std ::numeric_limits<float>::denorm_min())); 612 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble(), std ::numeric_limits<float>::denorm_min()));
615 return; 613 return;
616 default: 614 default:
617 ASSERT_NOT_REACHED(); 615 ASSERT_NOT_REACHED();
618 } 616 }
619 } 617 }
620 618
621 } // namespace WebCore 619 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/animation/CompositorAnimations.cpp ('k') | Source/core/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698