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

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

Issue 26292004: Web Animations CSS: Support animation of stroke-dasharray property (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 2 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 24 matching lines...) Expand all
35 #include "core/animation/AnimatableColor.h" 35 #include "core/animation/AnimatableColor.h"
36 #include "core/animation/AnimatableDouble.h" 36 #include "core/animation/AnimatableDouble.h"
37 #include "core/animation/AnimatableImage.h" 37 #include "core/animation/AnimatableImage.h"
38 #include "core/animation/AnimatableLength.h" 38 #include "core/animation/AnimatableLength.h"
39 #include "core/animation/AnimatableLengthBox.h" 39 #include "core/animation/AnimatableLengthBox.h"
40 #include "core/animation/AnimatableLengthSize.h" 40 #include "core/animation/AnimatableLengthSize.h"
41 #include "core/animation/AnimatableRepeatable.h" 41 #include "core/animation/AnimatableRepeatable.h"
42 #include "core/animation/AnimatableSVGLength.h" 42 #include "core/animation/AnimatableSVGLength.h"
43 #include "core/animation/AnimatableSVGPaint.h" 43 #include "core/animation/AnimatableSVGPaint.h"
44 #include "core/animation/AnimatableShapeValue.h" 44 #include "core/animation/AnimatableShapeValue.h"
45 #include "core/animation/AnimatableStrokeDasharrayList.h"
45 #include "core/animation/AnimatableTransform.h" 46 #include "core/animation/AnimatableTransform.h"
46 #include "core/animation/AnimatableUnknown.h" 47 #include "core/animation/AnimatableUnknown.h"
47 #include "core/animation/AnimatableValue.h" 48 #include "core/animation/AnimatableValue.h"
48 #include "core/animation/AnimatableVisibility.h" 49 #include "core/animation/AnimatableVisibility.h"
49 #include "core/animation/css/CSSAnimations.h" 50 #include "core/animation/css/CSSAnimations.h"
50 #include "core/css/CSSPrimitiveValueMappings.h" 51 #include "core/css/CSSPrimitiveValueMappings.h"
51 #include "core/css/resolver/StyleBuilder.h" 52 #include "core/css/resolver/StyleBuilder.h"
52 #include "core/css/resolver/StyleResolverState.h" 53 #include "core/css/resolver/StyleResolverState.h"
53 #include "core/rendering/style/RenderStyle.h" 54 #include "core/rendering/style/RenderStyle.h"
54 #include "wtf/MathExtras.h" 55 #include "wtf/MathExtras.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 return; 322 return;
322 case CSSPropertyRight: 323 case CSSPropertyRight:
323 style->setRight(animatableValueToLength(value, state)); 324 style->setRight(animatableValueToLength(value, state));
324 return; 325 return;
325 case CSSPropertyStrokeWidth: 326 case CSSPropertyStrokeWidth:
326 style->setStrokeWidth(animatableValueToNonNegativeSVGLength(value)); 327 style->setStrokeWidth(animatableValueToNonNegativeSVGLength(value));
327 return; 328 return;
328 case CSSPropertyStopOpacity: 329 case CSSPropertyStopOpacity:
329 style->setStopOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble (), 0, 1)); 330 style->setStopOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble (), 0, 1));
330 return; 331 return;
332 case CSSPropertyStrokeDasharray:
333 style->setStrokeDashArray(toAnimatableStrokeDasharrayList(value)->toSVGL engthVector());
334 return;
331 case CSSPropertyStrokeDashoffset: 335 case CSSPropertyStrokeDashoffset:
332 style->setStrokeDashOffset(toAnimatableSVGLength(value)->toSVGLength()); 336 style->setStrokeDashOffset(toAnimatableSVGLength(value)->toSVGLength());
333 return; 337 return;
334 case CSSPropertyStrokeMiterlimit: 338 case CSSPropertyStrokeMiterlimit:
335 style->setStrokeMiterLimit(clampTo<float>(toAnimatableDouble(value)->toD ouble(), 1)); 339 style->setStrokeMiterLimit(clampTo<float>(toAnimatableDouble(value)->toD ouble(), 1));
336 return; 340 return;
337 case CSSPropertyStrokeOpacity: 341 case CSSPropertyStrokeOpacity:
338 style->setStrokeOpacity(clampTo<float>(toAnimatableDouble(value)->toDoub le(), 0, 1)); 342 style->setStrokeOpacity(clampTo<float>(toAnimatableDouble(value)->toDoub le(), 0, 1));
339 return; 343 return;
340 case CSSPropertyStroke: 344 case CSSPropertyStroke:
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 case CSSPropertyZoom: 439 case CSSPropertyZoom:
436 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble())); 440 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble()));
437 return; 441 return;
438 default: 442 default:
439 RELEASE_ASSERT_WITH_MESSAGE(!CSSAnimations::isAnimatableProperty(propert y), "Web Animations not yet implemented: Unable to apply AnimatableValue to Rend erStyle: %s", getPropertyNameString(property).utf8().data()); 443 RELEASE_ASSERT_WITH_MESSAGE(!CSSAnimations::isAnimatableProperty(propert y), "Web Animations not yet implemented: Unable to apply AnimatableValue to Rend erStyle: %s", getPropertyNameString(property).utf8().data());
440 ASSERT_NOT_REACHED(); 444 ASSERT_NOT_REACHED();
441 } 445 }
442 } 446 }
443 447
444 } // namespace WebCore 448 } // namespace WebCore
OLDNEW
« Source/core/animation/AnimatableStrokeDasharrayList.cpp ('K') | « Source/core/core.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698