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

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

Issue 962763003: Use Length for the stroke-dashoffset property in SVGLayoutStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make font-size explicit. Created 5 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/css/LayoutStyleCSSValueMapping.cpp ('k') | Source/core/layout/style/LayoutStyle.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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 case CSSPropertyStopColor: 482 case CSSPropertyStopColor:
483 style->setStopColor(toAnimatableColor(value)->color()); 483 style->setStopColor(toAnimatableColor(value)->color());
484 return; 484 return;
485 case CSSPropertyStopOpacity: 485 case CSSPropertyStopOpacity:
486 style->setStopOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble (), 0, 1)); 486 style->setStopOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble (), 0, 1));
487 return; 487 return;
488 case CSSPropertyStrokeDasharray: 488 case CSSPropertyStrokeDasharray:
489 style->setStrokeDashArray(toAnimatableStrokeDasharrayList(value)->toSVGL engthList()); 489 style->setStrokeDashArray(toAnimatableStrokeDasharrayList(value)->toSVGL engthList());
490 return; 490 return;
491 case CSSPropertyStrokeDashoffset: 491 case CSSPropertyStrokeDashoffset:
492 style->setStrokeDashOffset(toAnimatableSVGLength(value)->toSVGLength()); 492 style->setStrokeDashOffset(animatableValueToLength(value, state));
493 return; 493 return;
494 case CSSPropertyStrokeMiterlimit: 494 case CSSPropertyStrokeMiterlimit:
495 style->setStrokeMiterLimit(clampTo<float>(toAnimatableDouble(value)->toD ouble(), 1)); 495 style->setStrokeMiterLimit(clampTo<float>(toAnimatableDouble(value)->toD ouble(), 1));
496 return; 496 return;
497 case CSSPropertyStrokeOpacity: 497 case CSSPropertyStrokeOpacity:
498 style->setStrokeOpacity(clampTo<float>(toAnimatableDouble(value)->toDoub le(), 0, 1)); 498 style->setStrokeOpacity(clampTo<float>(toAnimatableDouble(value)->toDoub le(), 0, 1));
499 return; 499 return;
500 case CSSPropertyStroke: 500 case CSSPropertyStroke:
501 { 501 {
502 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value); 502 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value);
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 case CSSPropertyRy: 638 case CSSPropertyRy:
639 style->setRy(animatableValueToLength(value, state)); 639 style->setRy(animatableValueToLength(value, state));
640 return; 640 return;
641 641
642 default: 642 default:
643 ASSERT_NOT_REACHED(); 643 ASSERT_NOT_REACHED();
644 } 644 }
645 } 645 }
646 646
647 } // namespace blink 647 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/LayoutStyleCSSValueMapping.cpp ('k') | Source/core/layout/style/LayoutStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698