OLD | NEW |
---|---|
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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
367 case CSSPropertyBottom: | 367 case CSSPropertyBottom: |
368 style->setBottom(animatableValueToLength(value, state)); | 368 style->setBottom(animatableValueToLength(value, state)); |
369 return; | 369 return; |
370 case CSSPropertyBoxShadow: | 370 case CSSPropertyBoxShadow: |
371 style->setBoxShadow(toAnimatableShadow(value)->shadowList()); | 371 style->setBoxShadow(toAnimatableShadow(value)->shadowList()); |
372 return; | 372 return; |
373 case CSSPropertyClip: | 373 case CSSPropertyClip: |
374 style->setClip(animatableValueToLengthBox(value, state)); | 374 style->setClip(animatableValueToLengthBox(value, state)); |
375 return; | 375 return; |
376 case CSSPropertyColor: | 376 case CSSPropertyColor: |
377 style->setColor(toAnimatableColor(value)->color()); | 377 { |
378 style->setVisitedLinkColor(toAnimatableColor(value)->visitedLinkColor()) ; | 378 style->setColor(toAnimatableColor(value)->color()); |
379 style->setVisitedLinkColor(toAnimatableColor(value)->visitedLinkColo r()); | |
380 if (state.element()->isSVGElement()) { | |
fs
2015/11/20 16:27:14
I think it might be a better idea to just resolve
hyunjunekim2
2015/11/24 08:07:36
fs, Hi, I have a question and want a advice. I tri
| |
381 SVGComputedStyle& svgStyle = style->accessSVGStyle(); | |
382 if (svgStyle.isFillColorCurrentColor()) { | |
383 svgStyle.setFillPaint(svgStyle.fillPaintType(), toAnimatable Color(value)->color(), svgStyle.fillPaintUri(), true, false); | |
384 svgStyle.setFillPaint(svgStyle.visitedLinkFillPaintType(), t oAnimatableColor(value)->visitedLinkColor(), svgStyle.visitedLinkFillPaintUri(), false, true); | |
385 } else if (svgStyle.isStrokeColorCurrentColor()) { | |
386 svgStyle.setStrokePaint(svgStyle.strokePaintType(), toAnimat ableColor(value)->color(), svgStyle.strokePaintUri(), true, false); | |
387 svgStyle.setStrokePaint(svgStyle.visitedLinkStrokePaintType( ), toAnimatableColor(value)->visitedLinkColor(), svgStyle.visitedLinkStrokePaint Uri(), false, true); | |
388 } | |
389 } | |
390 } | |
379 return; | 391 return; |
380 case CSSPropertyFillOpacity: | 392 case CSSPropertyFillOpacity: |
381 style->setFillOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble (), 0, 1)); | 393 style->setFillOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble (), 0, 1)); |
382 return; | 394 return; |
383 case CSSPropertyFill: | 395 case CSSPropertyFill: |
384 { | 396 { |
385 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value); | 397 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value); |
386 style->accessSVGStyle().setFillPaint(svgPaint->paintType(), svgPaint ->color(), svgPaint->uri(), true, false); | 398 style->accessSVGStyle().setFillPaint(svgPaint->paintType(), svgPaint ->color(), svgPaint->uri(), true, false); |
387 style->accessSVGStyle().setFillPaint(svgPaint->visitedLinkPaintType( ), svgPaint->visitedLinkColor(), svgPaint->visitedLinkURI(), false, true); | 399 style->accessSVGStyle().setFillPaint(svgPaint->visitedLinkPaintType( ), svgPaint->visitedLinkColor(), svgPaint->visitedLinkURI(), false, true); |
388 } | 400 } |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
701 case CSSPropertyRy: | 713 case CSSPropertyRy: |
702 style->setRy(animatableValueToLength(value, state, ValueRangeNonNegative )); | 714 style->setRy(animatableValueToLength(value, state, ValueRangeNonNegative )); |
703 return; | 715 return; |
704 | 716 |
705 default: | 717 default: |
706 ASSERT_NOT_REACHED(); | 718 ASSERT_NOT_REACHED(); |
707 } | 719 } |
708 } | 720 } |
709 | 721 |
710 } // namespace blink | 722 } // namespace blink |
OLD | NEW |