| 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 style->setBoxShadow(toAnimatableShadow(value)->shadowList()); |
| 294 return; |
| 291 case CSSPropertyClip: | 295 case CSSPropertyClip: |
| 292 style->setClip(animatableValueToLengthBox(value, state)); | 296 style->setClip(animatableValueToLengthBox(value, state)); |
| 293 style->setHasClip(true); | 297 style->setHasClip(true); |
| 294 return; | 298 return; |
| 295 case CSSPropertyColor: | 299 case CSSPropertyColor: |
| 296 style->setColor(toAnimatableColor(value)->color()); | 300 style->setColor(toAnimatableColor(value)->color()); |
| 297 style->setVisitedLinkColor(toAnimatableColor(value)->visitedLinkColor())
; | 301 style->setVisitedLinkColor(toAnimatableColor(value)->visitedLinkColor())
; |
| 298 return; | 302 return; |
| 299 case CSSPropertyFillOpacity: | 303 case CSSPropertyFillOpacity: |
| 300 style->setFillOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble
(), 0, 1)); | 304 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()); | 430 style->accessSVGStyle()->setStrokePaint(svgPaint->paintType(), svgPa
int->color(), svgPaint->uri()); |
| 427 } | 431 } |
| 428 return; | 432 return; |
| 429 case CSSPropertyTextDecorationColor: | 433 case CSSPropertyTextDecorationColor: |
| 430 style->setTextDecorationColor(toAnimatableColor(value)->color()); | 434 style->setTextDecorationColor(toAnimatableColor(value)->color()); |
| 431 style->setVisitedLinkTextDecorationColor(toAnimatableColor(value)->visit
edLinkColor()); | 435 style->setVisitedLinkTextDecorationColor(toAnimatableColor(value)->visit
edLinkColor()); |
| 432 return; | 436 return; |
| 433 case CSSPropertyTextIndent: | 437 case CSSPropertyTextIndent: |
| 434 style->setTextIndent(animatableValueToLength(value, state)); | 438 style->setTextIndent(animatableValueToLength(value, state)); |
| 435 return; | 439 return; |
| 440 case CSSPropertyTextShadow: |
| 441 style->setTextShadow(toAnimatableShadow(value)->shadowList()); |
| 442 return; |
| 436 case CSSPropertyTop: | 443 case CSSPropertyTop: |
| 437 style->setTop(animatableValueToLength(value, state)); | 444 style->setTop(animatableValueToLength(value, state)); |
| 438 return; | 445 return; |
| 439 case CSSPropertyWebkitBackgroundSize: | 446 case CSSPropertyWebkitBackgroundSize: |
| 440 setOnFillLayers<CSSPropertyWebkitBackgroundSize>(style->accessBackground
Layers(), value, state); | 447 setOnFillLayers<CSSPropertyWebkitBackgroundSize>(style->accessBackground
Layers(), value, state); |
| 441 return; | 448 return; |
| 442 case CSSPropertyWebkitBorderHorizontalSpacing: | 449 case CSSPropertyWebkitBorderHorizontalSpacing: |
| 443 style->setHorizontalBorderSpacing(animatableValueRoundClampTo<unsigned s
hort>(value)); | 450 style->setHorizontalBorderSpacing(animatableValueRoundClampTo<unsigned s
hort>(value)); |
| 444 return; | 451 return; |
| 445 case CSSPropertyWebkitBorderVerticalSpacing: | 452 case CSSPropertyWebkitBorderVerticalSpacing: |
| 446 style->setVerticalBorderSpacing(animatableValueRoundClampTo<unsigned sho
rt>(value)); | 453 style->setVerticalBorderSpacing(animatableValueRoundClampTo<unsigned sho
rt>(value)); |
| 447 return; | 454 return; |
| 455 case CSSPropertyWebkitBoxShadow: |
| 456 style->setBoxShadow(toAnimatableShadow(value)->shadowList()); |
| 457 return; |
| 448 case CSSPropertyWebkitClipPath: | 458 case CSSPropertyWebkitClipPath: |
| 449 style->setClipPath(toAnimatableClipPathOperation(value)->clipPathOperati
on()); | 459 style->setClipPath(toAnimatableClipPathOperation(value)->clipPathOperati
on()); |
| 450 return; | 460 return; |
| 451 case CSSPropertyWebkitColumnCount: | 461 case CSSPropertyWebkitColumnCount: |
| 452 style->setColumnCount(animatableValueRoundClampTo<unsigned short>(value,
1)); | 462 style->setColumnCount(animatableValueRoundClampTo<unsigned short>(value,
1)); |
| 453 return; | 463 return; |
| 454 case CSSPropertyWebkitColumnGap: | 464 case CSSPropertyWebkitColumnGap: |
| 455 style->setColumnGap(clampTo(toAnimatableDouble(value)->toDouble(), 0)); | 465 style->setColumnGap(clampTo(toAnimatableDouble(value)->toDouble(), 0)); |
| 456 return; | 466 return; |
| 457 case CSSPropertyWebkitColumnRuleColor: | 467 case CSSPropertyWebkitColumnRuleColor: |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 case CSSPropertyZoom: | 555 case CSSPropertyZoom: |
| 546 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble(), std
::numeric_limits<float>::denorm_min())); | 556 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble(), std
::numeric_limits<float>::denorm_min())); |
| 547 return; | 557 return; |
| 548 default: | 558 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()); | 559 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(); | 560 ASSERT_NOT_REACHED(); |
| 551 } | 561 } |
| 552 } | 562 } |
| 553 | 563 |
| 554 } // namespace WebCore | 564 } // namespace WebCore |
| OLD | NEW |