| 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 25 matching lines...) Expand all Loading... |
| 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/AnimatableLengthBoxAndBool.h" | 40 #include "core/animation/AnimatableLengthBoxAndBool.h" |
| 41 #include "core/animation/AnimatableLengthPoint.h" | 41 #include "core/animation/AnimatableLengthPoint.h" |
| 42 #include "core/animation/AnimatableLengthSize.h" | 42 #include "core/animation/AnimatableLengthSize.h" |
| 43 #include "core/animation/AnimatableRepeatable.h" | 43 #include "core/animation/AnimatableRepeatable.h" |
| 44 #include "core/animation/AnimatableSVGLength.h" | 44 #include "core/animation/AnimatableSVGLength.h" |
| 45 #include "core/animation/AnimatableSVGPaint.h" | 45 #include "core/animation/AnimatableSVGPaint.h" |
| 46 #include "core/animation/AnimatableShadow.h" |
| 46 #include "core/animation/AnimatableShapeValue.h" | 47 #include "core/animation/AnimatableShapeValue.h" |
| 47 #include "core/animation/AnimatableStrokeDasharrayList.h" | 48 #include "core/animation/AnimatableStrokeDasharrayList.h" |
| 48 #include "core/animation/AnimatableTransform.h" | 49 #include "core/animation/AnimatableTransform.h" |
| 49 #include "core/animation/AnimatableUnknown.h" | 50 #include "core/animation/AnimatableUnknown.h" |
| 50 #include "core/animation/AnimatableValue.h" | 51 #include "core/animation/AnimatableValue.h" |
| 51 #include "core/animation/AnimatableVisibility.h" | 52 #include "core/animation/AnimatableVisibility.h" |
| 52 #include "core/animation/css/CSSAnimations.h" | 53 #include "core/animation/css/CSSAnimations.h" |
| 53 #include "core/css/CSSPrimitiveValueMappings.h" | 54 #include "core/css/CSSPrimitiveValueMappings.h" |
| 54 #include "core/css/resolver/StyleBuilder.h" | 55 #include "core/css/resolver/StyleBuilder.h" |
| 55 #include "core/css/resolver/StyleResolverState.h" | 56 #include "core/css/resolver/StyleResolverState.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 return; | 282 return; |
| 282 case CSSPropertyBorderTopRightRadius: | 283 case CSSPropertyBorderTopRightRadius: |
| 283 style->setBorderTopRightRadius(animatableValueToLengthSize(value, state,
NonNegativeValues)); | 284 style->setBorderTopRightRadius(animatableValueToLengthSize(value, state,
NonNegativeValues)); |
| 284 return; | 285 return; |
| 285 case CSSPropertyBorderTopWidth: | 286 case CSSPropertyBorderTopWidth: |
| 286 style->setBorderTopWidth(animatableValueRoundClampTo<unsigned>(value)); | 287 style->setBorderTopWidth(animatableValueRoundClampTo<unsigned>(value)); |
| 287 return; | 288 return; |
| 288 case CSSPropertyBottom: | 289 case CSSPropertyBottom: |
| 289 style->setBottom(animatableValueToLength(value, state)); | 290 style->setBottom(animatableValueToLength(value, state)); |
| 290 return; | 291 return; |
| 292 case CSSPropertyBoxShadow: |
| 293 case CSSPropertyWebkitBoxShadow: |
| 294 style->setBoxShadow(toAnimatableShadow(value)->shadowList()); |
| 295 return; |
| 291 case CSSPropertyClip: | 296 case CSSPropertyClip: |
| 292 style->setClip(animatableValueToLengthBox(value, state)); | 297 style->setClip(animatableValueToLengthBox(value, state)); |
| 293 style->setHasClip(true); | 298 style->setHasClip(true); |
| 294 return; | 299 return; |
| 295 case CSSPropertyColor: | 300 case CSSPropertyColor: |
| 296 style->setColor(toAnimatableColor(value)->color()); | 301 style->setColor(toAnimatableColor(value)->color()); |
| 297 style->setVisitedLinkColor(toAnimatableColor(value)->visitedLinkColor())
; | 302 style->setVisitedLinkColor(toAnimatableColor(value)->visitedLinkColor())
; |
| 298 return; | 303 return; |
| 299 case CSSPropertyFillOpacity: | 304 case CSSPropertyFillOpacity: |
| 300 style->setFillOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble
(), 0, 1)); | 305 style->setFillOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble
(), 0, 1)); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 style->accessSVGStyle()->setStrokePaint(svgPaint->paintType(), svgPa
int->color(), svgPaint->uri()); | 431 style->accessSVGStyle()->setStrokePaint(svgPaint->paintType(), svgPa
int->color(), svgPaint->uri()); |
| 427 } | 432 } |
| 428 return; | 433 return; |
| 429 case CSSPropertyTextDecorationColor: | 434 case CSSPropertyTextDecorationColor: |
| 430 style->setTextDecorationColor(toAnimatableColor(value)->color()); | 435 style->setTextDecorationColor(toAnimatableColor(value)->color()); |
| 431 style->setVisitedLinkTextDecorationColor(toAnimatableColor(value)->visit
edLinkColor()); | 436 style->setVisitedLinkTextDecorationColor(toAnimatableColor(value)->visit
edLinkColor()); |
| 432 return; | 437 return; |
| 433 case CSSPropertyTextIndent: | 438 case CSSPropertyTextIndent: |
| 434 style->setTextIndent(animatableValueToLength(value, state)); | 439 style->setTextIndent(animatableValueToLength(value, state)); |
| 435 return; | 440 return; |
| 441 case CSSPropertyTextShadow: |
| 442 style->setTextShadow(toAnimatableShadow(value)->shadowList()); |
| 443 return; |
| 436 case CSSPropertyTop: | 444 case CSSPropertyTop: |
| 437 style->setTop(animatableValueToLength(value, state)); | 445 style->setTop(animatableValueToLength(value, state)); |
| 438 return; | 446 return; |
| 439 case CSSPropertyWebkitBackgroundSize: | 447 case CSSPropertyWebkitBackgroundSize: |
| 440 setOnFillLayers<CSSPropertyWebkitBackgroundSize>(style->accessBackground
Layers(), value, state); | 448 setOnFillLayers<CSSPropertyWebkitBackgroundSize>(style->accessBackground
Layers(), value, state); |
| 441 return; | 449 return; |
| 442 case CSSPropertyWebkitBorderHorizontalSpacing: | 450 case CSSPropertyWebkitBorderHorizontalSpacing: |
| 443 style->setHorizontalBorderSpacing(animatableValueRoundClampTo<unsigned s
hort>(value)); | 451 style->setHorizontalBorderSpacing(animatableValueRoundClampTo<unsigned s
hort>(value)); |
| 444 return; | 452 return; |
| 445 case CSSPropertyWebkitBorderVerticalSpacing: | 453 case CSSPropertyWebkitBorderVerticalSpacing: |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 case CSSPropertyZoom: | 553 case CSSPropertyZoom: |
| 546 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble(), std
::numeric_limits<float>::denorm_min())); | 554 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble(), std
::numeric_limits<float>::denorm_min())); |
| 547 return; | 555 return; |
| 548 default: | 556 default: |
| 549 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()); | 557 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()); |
| 550 ASSERT_NOT_REACHED(); | 558 ASSERT_NOT_REACHED(); |
| 551 } | 559 } |
| 552 } | 560 } |
| 553 | 561 |
| 554 } // namespace WebCore | 562 } // namespace WebCore |
| OLD | NEW |