Changeset 205809 in webkit
- Timestamp:
- Sep 12, 2016 8:50:17 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r205807 r205809 1 2016-09-12 Simon Fraser <simon.fraser@apple.com> 2 3 Make -webkit-transition-* and -webkit-animation-* properties be pure aliases of the unprefixed ones 4 https://bugs.webkit.org/show_bug.cgi?id=160478 5 6 Reviewed by Dean Jackson. 7 8 Updated results, and a new test to ensure that longhand properties override 9 shorthand ones, with various combinations of prefixing. 10 11 * fast/css/getComputedStyle/computed-style-expected.txt: 12 * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: 13 * fast/css/longhand-overrides-shorthand-prefixing-expected.txt: Added. 14 * fast/css/longhand-overrides-shorthand-prefixing.html: Added. 15 * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: 16 * fast/css/prefixed-unprefixed-variant-style-declaration.html: 17 * transitions/svg-transitions-expected.txt: 18 * transitions/transitions-parsing-expected.txt: 19 * transitions/transitions-parsing.html: 20 1 21 2016-09-12 Javier Fernandez <jfernandez@igalia.com> 2 22 -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
r201498 r205809 108 108 z-index: auto; 109 109 zoom: 1; 110 -webkit-animation-delay: 0s;111 -webkit-animation-direction: normal;112 -webkit-animation-duration: 0s;113 -webkit-animation-fill-mode: none;114 -webkit-animation-iteration-count: 1;115 -webkit-animation-name: none;116 -webkit-animation-play-state: running;117 -webkit-animation-timing-function: ease;118 110 -webkit-appearance: none; 119 111 -webkit-backface-visibility: visible; … … 223 215 -webkit-text-stroke-width: 0px; 224 216 -webkit-transform-style: flat; 225 -webkit-transition-delay: 0s;226 -webkit-transition-duration: 0s;227 -webkit-transition-property: all;228 -webkit-transition-timing-function: ease;229 217 -webkit-user-drag: auto; 230 218 -webkit-user-modify: read-only; -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
r201498 r205809 107 107 z-index: auto 108 108 zoom: 1 109 -webkit-animation-delay: 0s110 -webkit-animation-direction: normal111 -webkit-animation-duration: 0s112 -webkit-animation-fill-mode: none113 -webkit-animation-iteration-count: 1114 -webkit-animation-name: none115 -webkit-animation-play-state: running116 -webkit-animation-timing-function: ease117 109 -webkit-appearance: none 118 110 -webkit-backface-visibility: visible … … 222 214 -webkit-text-stroke-width: 0px 223 215 -webkit-transform-style: flat 224 -webkit-transition-delay: 0s225 -webkit-transition-duration: 0s226 -webkit-transition-property: all227 -webkit-transition-timing-function: ease228 216 -webkit-user-drag: auto 229 217 -webkit-user-modify: read-only -
trunk/LayoutTests/fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt
r204052 r205809 364 364 PASS element.style.cssText 365 365 366 Setting "transform" to "matrix(1, 0, 0, 1, 1, 1)" 367 PASS element.style.transform 368 PASS element.style.webkitTransform 369 PASS element.style.getPropertyValue("transform") 370 PASS element.style.getPropertyValue("-webkit-transform") 371 PASS element.style.getPropertyCSSValue("transform") 372 PASS element.style.getPropertyCSSValue("-webkit-transform") 373 PASS getComputedStyle(element).transform 374 PASS getComputedStyle(element).webkitTransform 375 PASS getComputedStyle(element).getPropertyValue("transform") 376 PASS getComputedStyle(element).getPropertyValue("-webkit-transform") 377 PASS getComputedStyle(element).getPropertyCSSValue("transform") 378 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transform") 379 PASS element.style.cssText 380 381 Setting "-webkit-transform" to "matrix(1, 0, 0, 1, 1, 1)" 382 PASS element.style.transform 383 PASS element.style.webkitTransform 384 PASS element.style.getPropertyValue("transform") 385 PASS element.style.getPropertyValue("-webkit-transform") 386 PASS element.style.getPropertyCSSValue("transform") 387 PASS element.style.getPropertyCSSValue("-webkit-transform") 388 PASS getComputedStyle(element).transform 389 PASS getComputedStyle(element).webkitTransform 390 PASS getComputedStyle(element).getPropertyValue("transform") 391 PASS getComputedStyle(element).getPropertyValue("-webkit-transform") 392 PASS getComputedStyle(element).getPropertyCSSValue("transform") 393 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transform") 394 PASS element.style.cssText 395 366 396 PASS successfullyParsed is true 367 397 -
trunk/LayoutTests/fast/css/prefixed-unprefixed-variant-style-declaration.html
r200769 r205809 57 57 test(`getComputedStyle(element).getPropertyCSSValue("${prefixedProperty}")`, computedStyle.getPropertyCSSValue(prefixedProperty).cssText); 58 58 59 test(`element.style.cssText`, element.style.cssText, `${ propertyToSet}: ${value};`);59 test(`element.style.cssText`, element.style.cssText, `${unprefixedProperty}: ${value};`); 60 60 61 61 element.remove(); … … 78 78 testPropertyVariants("animation-fill-mode", "forwards"); 79 79 80 testPropertyVariants("transform", "matrix(1, 0, 0, 1, 1, 1)"); 81 80 82 successfullyParsed = true; 81 83 -
trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
r203716 r205809 213 213 rect: style.getPropertyValue(zoom) : 1 214 214 rect: style.getPropertyCSSValue(zoom) : [object CSSPrimitiveValue] 215 rect: style.getPropertyValue(-webkit-animation-delay) : 0s216 rect: style.getPropertyCSSValue(-webkit-animation-delay) : [object CSSValueList]217 rect: style.getPropertyValue(-webkit-animation-direction) : normal218 rect: style.getPropertyCSSValue(-webkit-animation-direction) : [object CSSValueList]219 rect: style.getPropertyValue(-webkit-animation-duration) : 0s220 rect: style.getPropertyCSSValue(-webkit-animation-duration) : [object CSSValueList]221 rect: style.getPropertyValue(-webkit-animation-fill-mode) : none222 rect: style.getPropertyCSSValue(-webkit-animation-fill-mode) : [object CSSValueList]223 rect: style.getPropertyValue(-webkit-animation-iteration-count) : 1224 rect: style.getPropertyCSSValue(-webkit-animation-iteration-count) : [object CSSValueList]225 rect: style.getPropertyValue(-webkit-animation-name) : none226 rect: style.getPropertyCSSValue(-webkit-animation-name) : [object CSSValueList]227 rect: style.getPropertyValue(-webkit-animation-play-state) : running228 rect: style.getPropertyCSSValue(-webkit-animation-play-state) : [object CSSValueList]229 rect: style.getPropertyValue(-webkit-animation-timing-function) : ease230 rect: style.getPropertyCSSValue(-webkit-animation-timing-function) : [object CSSValueList]231 215 rect: style.getPropertyValue(-webkit-appearance) : none 232 216 rect: style.getPropertyCSSValue(-webkit-appearance) : [object CSSPrimitiveValue] … … 443 427 rect: style.getPropertyValue(-webkit-transform-style) : flat 444 428 rect: style.getPropertyCSSValue(-webkit-transform-style) : [object CSSPrimitiveValue] 445 rect: style.getPropertyValue(-webkit-transition-delay) : 0s446 rect: style.getPropertyCSSValue(-webkit-transition-delay) : [object CSSValueList]447 rect: style.getPropertyValue(-webkit-transition-duration) : 0s448 rect: style.getPropertyCSSValue(-webkit-transition-duration) : [object CSSValueList]449 rect: style.getPropertyValue(-webkit-transition-property) : all450 rect: style.getPropertyCSSValue(-webkit-transition-property) : [object CSSValueList]451 rect: style.getPropertyValue(-webkit-transition-timing-function) : ease452 rect: style.getPropertyCSSValue(-webkit-transition-timing-function) : [object CSSValueList]453 429 rect: style.getPropertyValue(-webkit-user-drag) : auto 454 430 rect: style.getPropertyCSSValue(-webkit-user-drag) : [object CSSPrimitiveValue] … … 747 723 g: style.getPropertyValue(zoom) : 1 748 724 g: style.getPropertyCSSValue(zoom) : [object CSSPrimitiveValue] 749 g: style.getPropertyValue(-webkit-animation-delay) : 0s750 g: style.getPropertyCSSValue(-webkit-animation-delay) : [object CSSValueList]751 g: style.getPropertyValue(-webkit-animation-direction) : normal752 g: style.getPropertyCSSValue(-webkit-animation-direction) : [object CSSValueList]753 g: style.getPropertyValue(-webkit-animation-duration) : 0s754 g: style.getPropertyCSSValue(-webkit-animation-duration) : [object CSSValueList]755 g: style.getPropertyValue(-webkit-animation-fill-mode) : none756 g: style.getPropertyCSSValue(-webkit-animation-fill-mode) : [object CSSValueList]757 g: style.getPropertyValue(-webkit-animation-iteration-count) : 1758 g: style.getPropertyCSSValue(-webkit-animation-iteration-count) : [object CSSValueList]759 g: style.getPropertyValue(-webkit-animation-name) : none760 g: style.getPropertyCSSValue(-webkit-animation-name) : [object CSSValueList]761 g: style.getPropertyValue(-webkit-animation-play-state) : running762 g: style.getPropertyCSSValue(-webkit-animation-play-state) : [object CSSValueList]763 g: style.getPropertyValue(-webkit-animation-timing-function) : ease764 g: style.getPropertyCSSValue(-webkit-animation-timing-function) : [object CSSValueList]765 725 g: style.getPropertyValue(-webkit-appearance) : none 766 726 g: style.getPropertyCSSValue(-webkit-appearance) : [object CSSPrimitiveValue] … … 977 937 g: style.getPropertyValue(-webkit-transform-style) : flat 978 938 g: style.getPropertyCSSValue(-webkit-transform-style) : [object CSSPrimitiveValue] 979 g: style.getPropertyValue(-webkit-transition-delay) : 0s980 g: style.getPropertyCSSValue(-webkit-transition-delay) : [object CSSValueList]981 g: style.getPropertyValue(-webkit-transition-duration) : 0s982 g: style.getPropertyCSSValue(-webkit-transition-duration) : [object CSSValueList]983 g: style.getPropertyValue(-webkit-transition-property) : all984 g: style.getPropertyCSSValue(-webkit-transition-property) : [object CSSValueList]985 g: style.getPropertyValue(-webkit-transition-timing-function) : ease986 g: style.getPropertyCSSValue(-webkit-transition-timing-function) : [object CSSValueList]987 939 g: style.getPropertyValue(-webkit-user-drag) : auto 988 940 g: style.getPropertyCSSValue(-webkit-user-drag) : [object CSSPrimitiveValue] -
trunk/LayoutTests/transitions/transitions-parsing-expected.txt
r144644 r205809 8 8 PASS computedStyle.webkitTransitionProperty is 'all' 9 9 PASS Object.keys(style).indexOf('transitionProperty') is not -1 10 PASS Object.keys(style).indexOf('webkitTransitionProperty') is not-110 PASS Object.keys(style).indexOf('webkitTransitionProperty') is -1 11 11 PASS style.transitionProperty is 'none' 12 12 PASS computedStyle.transitionProperty is 'none' … … 102 102 PASS computedStyle.webkitTransitionDuration is '0s' 103 103 PASS Object.keys(style).indexOf('transitionDuration') is not -1 104 PASS Object.keys(style).indexOf('webkitTransitionDuration') is not-1104 PASS Object.keys(style).indexOf('webkitTransitionDuration') is -1 105 105 PASS style.transitionDuration is '0s' 106 106 PASS computedStyle.transitionDuration is '0s' … … 152 152 PASS computedStyle.webkitTransitionTimingFunction is 'ease' 153 153 PASS Object.keys(style).indexOf('transitionTimingFunction') is not -1 154 PASS Object.keys(style).indexOf('webkitTransitionTimingFunction') is not-1154 PASS Object.keys(style).indexOf('webkitTransitionTimingFunction') is -1 155 155 PASS style.transitionTimingFunction is 'linear' 156 156 PASS computedStyle.transitionTimingFunction is 'linear' … … 298 298 PASS computedStyle.webkitTransitionDelay is '0s' 299 299 PASS Object.keys(style).indexOf('transitionDelay') is not -1 300 PASS Object.keys(style).indexOf('webkitTransitionDelay') is not-1300 PASS Object.keys(style).indexOf('webkitTransitionDelay') is -1 301 301 PASS style.transitionDelay is '0s' 302 302 PASS computedStyle.transitionDelay is '0s' … … 348 348 PASS computedStyle.webkitTransition is 'all 0s ease 0s' 349 349 PASS Object.keys(style).indexOf('transition') is not -1 350 PASS Object.keys(style).indexOf('webkitTransition') is not-1350 PASS Object.keys(style).indexOf('webkitTransition') is -1 351 351 PASS style.transition is 'none' 352 352 PASS computedStyle.transition is 'none 0s ease 0s' -
trunk/LayoutTests/transitions/transitions-parsing.html
r155285 r205809 32 32 style.transitionProperty = "none"; 33 33 shouldNotBe("Object.keys(style).indexOf('transitionProperty')", "-1"); 34 should NotBe("Object.keys(style).indexOf('webkitTransitionProperty')", "-1");34 shouldBe("Object.keys(style).indexOf('webkitTransitionProperty')", "-1"); 35 35 shouldBe("style.transitionProperty", "'none'"); 36 36 shouldBe("computedStyle.transitionProperty", "'none'"); … … 176 176 style.transitionDuration = "0s"; 177 177 shouldNotBe("Object.keys(style).indexOf('transitionDuration')", "-1"); 178 should NotBe("Object.keys(style).indexOf('webkitTransitionDuration')", "-1");178 shouldBe("Object.keys(style).indexOf('webkitTransitionDuration')", "-1"); 179 179 shouldBe("style.transitionDuration", "'0s'"); 180 180 shouldBe("computedStyle.transitionDuration", "'0s'"); … … 256 256 style.transitionTimingFunction = "linear"; 257 257 shouldNotBe("Object.keys(style).indexOf('transitionTimingFunction')", "-1"); 258 should NotBe("Object.keys(style).indexOf('webkitTransitionTimingFunction')", "-1");258 shouldBe("Object.keys(style).indexOf('webkitTransitionTimingFunction')", "-1"); 259 259 shouldBe("style.transitionTimingFunction", "'linear'"); 260 260 shouldBe("computedStyle.transitionTimingFunction", "'linear'"); … … 479 479 style.transitionDelay = "0s"; 480 480 shouldNotBe("Object.keys(style).indexOf('transitionDelay')", "-1"); 481 should NotBe("Object.keys(style).indexOf('webkitTransitionDelay')", "-1");481 shouldBe("Object.keys(style).indexOf('webkitTransitionDelay')", "-1"); 482 482 shouldBe("style.transitionDelay", "'0s'"); 483 483 shouldBe("computedStyle.transitionDelay", "'0s'"); … … 559 559 style.transition = "none"; 560 560 shouldNotBe("Object.keys(style).indexOf('transition')", "-1"); 561 should NotBe("Object.keys(style).indexOf('webkitTransition')", "-1");561 shouldBe("Object.keys(style).indexOf('webkitTransition')", "-1"); 562 562 shouldBe("style.transition", "'none'"); 563 563 shouldBe("computedStyle.transition", "'none 0s ease 0s'"); -
trunk/Source/WebCore/ChangeLog
r205808 r205809 1 2016-09-12 Simon Fraser <simon.fraser@apple.com> 2 3 Make -webkit-transition-* and -webkit-animation-* properties be pure aliases of the unprefixed ones 4 https://bugs.webkit.org/show_bug.cgi?id=160478 5 6 Reviewed by Dean Jackson. 7 8 Remove the custom -webkit prefixed transition and animation properties, and just make 9 them aliases of the unprefixed ones, as we do for transforms. 10 11 -webkit-animation-trigger remains as the only prefixed-only animation property. 12 13 This is mostly code deletion. 14 15 Test: fast/css/longhand-overrides-shorthand-prefixing.html 16 17 * css/CSSComputedStyleDeclaration.cpp: 18 (WebCore::ComputedStyleExtractor::propertyValue): 19 * css/CSSProperty.h: 20 (WebCore::prefixingVariantForPropertyId): Deleted. 21 * css/CSSPropertyNames.in: 22 * css/CSSToStyleMap.cpp: 23 (WebCore::CSSToStyleMap::mapAnimationDelay): 24 (WebCore::CSSToStyleMap::mapAnimationDirection): 25 (WebCore::CSSToStyleMap::mapAnimationDuration): 26 (WebCore::CSSToStyleMap::mapAnimationFillMode): 27 (WebCore::CSSToStyleMap::mapAnimationIterationCount): 28 (WebCore::CSSToStyleMap::mapAnimationName): 29 (WebCore::CSSToStyleMap::mapAnimationPlayState): 30 (WebCore::CSSToStyleMap::mapAnimationProperty): 31 (WebCore::CSSToStyleMap::mapAnimationTimingFunction): 32 * css/PropertySetCSSStyleDeclaration.cpp: 33 (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): 34 (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): 35 * css/StyleProperties.cpp: 36 (WebCore::StyleProperties::getPropertyValue): 37 (WebCore::MutableStyleProperties::removeShorthandProperty): 38 (WebCore::StyleProperties::asText): 39 * css/StylePropertyShorthand.cpp: 40 (WebCore::animationShorthandForParsing): 41 * css/StylePropertyShorthand.h: 42 * css/StyleResolver.cpp: 43 (WebCore::StyleResolver::styleForKeyframe): 44 * css/parser/CSSParser.cpp: 45 (WebCore::CSSParser::parseValue): 46 (WebCore::CSSParser::parseAnimationShorthand): 47 (WebCore::CSSParser::parseTransitionShorthand): 48 (WebCore::CSSParser::parseAnimationProperty): 49 (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. 50 * css/parser/CSSParser.h: 51 * html/shadow/MediaControlElements.cpp: 52 (WebCore::MediaControlPanelElement::makeOpaque): 53 (WebCore::MediaControlPanelElement::makeTransparent): 54 1 55 2016-09-12 Per Arne Vollan <pvollan@apple.com> 2 56 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r205323 r205809 245 245 CSSPropertyZIndex, 246 246 CSSPropertyZoom, 247 CSSPropertyWebkitAnimationDelay,248 CSSPropertyWebkitAnimationDirection,249 CSSPropertyWebkitAnimationDuration,250 CSSPropertyWebkitAnimationFillMode,251 CSSPropertyWebkitAnimationIterationCount,252 CSSPropertyWebkitAnimationName,253 CSSPropertyWebkitAnimationPlayState,254 CSSPropertyWebkitAnimationTimingFunction,255 247 #if ENABLE(CSS_ANIMATIONS_LEVEL_2) 256 248 CSSPropertyWebkitAnimationTrigger, … … 408 400 CSSPropertyWebkitTextZoom, 409 401 CSSPropertyWebkitTransformStyle, 410 CSSPropertyWebkitTransitionDelay,411 CSSPropertyWebkitTransitionDuration,412 CSSPropertyWebkitTransitionProperty,413 CSSPropertyWebkitTransitionTimingFunction,414 402 CSSPropertyWebkitUserDrag, 415 403 CSSPropertyWebkitUserModify, … … 3350 3338 #endif 3351 3339 case CSSPropertyAnimationDelay: 3352 case CSSPropertyWebkitAnimationDelay:3353 3340 return getDelayValue(style->animations()); 3354 case CSSPropertyAnimationDirection: 3355 case CSSPropertyWebkitAnimationDirection: { 3341 case CSSPropertyAnimationDirection: { 3356 3342 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); 3357 3343 const AnimationList* t = style->animations(); … … 3378 3364 } 3379 3365 case CSSPropertyAnimationDuration: 3380 case CSSPropertyWebkitAnimationDuration:3381 3366 return getDurationValue(style->animations()); 3382 case CSSPropertyAnimationFillMode: 3383 case CSSPropertyWebkitAnimationFillMode: { 3367 case CSSPropertyAnimationFillMode: { 3384 3368 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); 3385 3369 const AnimationList* t = style->animations(); … … 3405 3389 return list; 3406 3390 } 3407 case CSSPropertyAnimationIterationCount: 3408 case CSSPropertyWebkitAnimationIterationCount: { 3391 case CSSPropertyAnimationIterationCount: { 3409 3392 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); 3410 3393 const AnimationList* t = style->animations(); … … 3421 3404 return list; 3422 3405 } 3423 case CSSPropertyAnimationName: 3424 case CSSPropertyWebkitAnimationName: { 3406 case CSSPropertyAnimationName: { 3425 3407 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); 3426 3408 const AnimationList* t = style->animations(); … … 3432 3414 return list; 3433 3415 } 3434 case CSSPropertyAnimationPlayState: 3435 case CSSPropertyWebkitAnimationPlayState: { 3416 case CSSPropertyAnimationPlayState: { 3436 3417 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); 3437 3418 const AnimationList* t = style->animations(); … … 3449 3430 } 3450 3431 case CSSPropertyAnimationTimingFunction: 3451 case CSSPropertyWebkitAnimationTimingFunction:3452 3432 return getTimingFunctionValue(style->animations()); 3453 3433 #if ENABLE(CSS_ANIMATIONS_LEVEL_2) … … 3593 3573 return cssValuePool.createIdentifierValue((style->transformStyle3D() == TransformStyle3DPreserve3D) ? CSSValuePreserve3d : CSSValueFlat); 3594 3574 case CSSPropertyTransitionDelay: 3595 case CSSPropertyWebkitTransitionDelay:3596 3575 return getDelayValue(style->transitions()); 3597 3576 case CSSPropertyTransitionDuration: 3598 case CSSPropertyWebkitTransitionDuration:3599 3577 return getDurationValue(style->transitions()); 3600 3578 case CSSPropertyTransitionProperty: 3601 case CSSPropertyWebkitTransitionProperty:3602 3579 return getTransitionPropertyValue(style->transitions()); 3603 3580 case CSSPropertyTransitionTimingFunction: 3604 case CSSPropertyWebkitTransitionTimingFunction:3605 3581 return getTimingFunctionValue(style->transitions()); 3606 case CSSPropertyTransition: 3607 case CSSPropertyWebkitTransition: { 3582 case CSSPropertyTransition: { 3608 3583 const AnimationList* animList = style->transitions(); 3609 3584 if (animList) { … … 3874 3849 3875 3850 /* Unimplemented -webkit- properties */ 3876 case CSSPropertyWebkitAnimation:3877 3851 case CSSPropertyWebkitBorderRadius: 3878 3852 case CSSPropertyWebkitMarginCollapse: -
trunk/Source/WebCore/css/CSSProperty.h
r201113 r205809 104 104 typedef Vector<CSSProperty, 256> ParsedPropertyVector; 105 105 106 inline CSSPropertyID prefixingVariantForPropertyId(CSSPropertyID propertyID)107 {108 ASSERT(propertyID != CSSPropertyInvalid);109 110 switch (propertyID) {111 case CSSPropertyAnimation:112 return CSSPropertyWebkitAnimation;113 case CSSPropertyAnimationDelay:114 return CSSPropertyWebkitAnimationDelay;115 case CSSPropertyAnimationDirection:116 return CSSPropertyWebkitAnimationDirection;117 case CSSPropertyAnimationDuration:118 return CSSPropertyWebkitAnimationDuration;119 case CSSPropertyAnimationFillMode:120 return CSSPropertyWebkitAnimationFillMode;121 case CSSPropertyAnimationName:122 return CSSPropertyWebkitAnimationName;123 case CSSPropertyAnimationPlayState:124 return CSSPropertyWebkitAnimationPlayState;125 case CSSPropertyAnimationIterationCount:126 return CSSPropertyWebkitAnimationIterationCount;127 case CSSPropertyAnimationTimingFunction:128 return CSSPropertyWebkitAnimationTimingFunction;129 case CSSPropertyWebkitAnimation:130 return CSSPropertyAnimation;131 case CSSPropertyWebkitAnimationDelay:132 return CSSPropertyAnimationDelay;133 case CSSPropertyWebkitAnimationDirection:134 return CSSPropertyAnimationDirection;135 case CSSPropertyWebkitAnimationDuration:136 return CSSPropertyAnimationDuration;137 case CSSPropertyWebkitAnimationFillMode:138 return CSSPropertyAnimationFillMode;139 case CSSPropertyWebkitAnimationName:140 return CSSPropertyAnimationName;141 case CSSPropertyWebkitAnimationPlayState:142 return CSSPropertyAnimationPlayState;143 case CSSPropertyWebkitAnimationIterationCount:144 return CSSPropertyAnimationIterationCount;145 case CSSPropertyWebkitAnimationTimingFunction:146 return CSSPropertyAnimationTimingFunction;147 case CSSPropertyTransitionDelay:148 return CSSPropertyWebkitTransitionDelay;149 case CSSPropertyTransitionDuration:150 return CSSPropertyWebkitTransitionDuration;151 case CSSPropertyTransitionProperty:152 return CSSPropertyWebkitTransitionProperty;153 case CSSPropertyTransitionTimingFunction:154 return CSSPropertyWebkitTransitionTimingFunction;155 case CSSPropertyTransition:156 return CSSPropertyWebkitTransition;157 case CSSPropertyWebkitTransitionDelay:158 return CSSPropertyTransitionDelay;159 case CSSPropertyWebkitTransitionDuration:160 return CSSPropertyTransitionDuration;161 case CSSPropertyWebkitTransitionProperty:162 return CSSPropertyTransitionProperty;163 case CSSPropertyWebkitTransitionTimingFunction:164 return CSSPropertyTransitionTimingFunction;165 case CSSPropertyWebkitTransition:166 return CSSPropertyTransition;167 default:168 return propertyID;169 }170 }171 172 106 } // namespace WebCore 173 107 -
trunk/Source/WebCore/css/CSSPropertyNames.in
r205292 r205809 353 353 transition-property [AnimationProperty, NameForMethods=Property] 354 354 transition-timing-function [AnimationProperty, NameForMethods=TimingFunction] 355 356 355 unicode-bidi 357 356 unicode-range [SkipBuilder] … … 373 372 alt [NameForMethods=ContentAltText, Custom=Value] 374 373 -webkit-alt = alt 375 -webkit-animation [Longhands=-webkit-animation-name|-webkit-animation-duration|-webkit-animation-timing-function|-webkit-animation-delay|-webkit-animation-iteration-count|-webkit-animation-direction|-webkit-animation-fill-mode|-webkit-animation-play-state]376 -webkit-animation-delay [AnimationProperty, NameForMethods=Delay]377 -webkit-animation-direction [AnimationProperty, NameForMethods=Direction]378 -webkit-animation-duration [AnimationProperty, NameForMethods=Duration]379 -webkit-animation-fill-mode [AnimationProperty, NameForMethods=FillMode]380 -webkit-animation-iteration-count [AnimationProperty, NameForMethods=IterationCount]381 -webkit-animation-name [AnimationProperty, NameForMethods=Name]382 -webkit-animation-play-state [AnimationProperty, NameForMethods=PlayState]383 -webkit-animation-timing-function [AnimationProperty, NameForMethods=TimingFunction]374 -webkit-animation = animation 375 -webkit-animation-delay = animation-delay 376 -webkit-animation-direction = animation-direction 377 -webkit-animation-duration = animation-duration 378 -webkit-animation-fill-mode = animation-fill-mode 379 -webkit-animation-iteration-count = animation-iteration-count 380 -webkit-animation-name = animation-name 381 -webkit-animation-play-state = animation-play-state 382 -webkit-animation-timing-function = animation-timing-function 384 383 #if defined(ENABLE_CSS_ANIMATIONS_LEVEL_2) && ENABLE_CSS_ANIMATIONS_LEVEL_2 385 384 -webkit-animation-trigger [AnimationProperty, NameForMethods=Trigger] … … 623 622 -webkit-text-stroke-color [Inherited, VisitedLinkColorSupport, Initial=invalidColor] 624 623 -webkit-text-stroke-width [Inherited, Converter=TextStrokeWidth] 624 625 625 transform [Converter=Transform] 626 626 -webkit-transform = transform … … 636 636 // Keeping -webkit-transform-style around is how we'll detect legacy content. At that point we'll have to add a custom builder and a new ETransformStyle3D type. 637 637 -webkit-transform-style [NameForMethods=TransformStyle3D] 638 -webkit-transition [Longhands=-webkit-transition-property|-webkit-transition-duration|-webkit-transition-timing-function|-webkit-transition-delay]639 -webkit-transition-delay [AnimationProperty, NameForMethods=Delay]640 -webkit-transition-duration [AnimationProperty, NameForMethods=Duration]641 -webkit-transition-property [AnimationProperty, NameForMethods=Property]642 -webkit-transition-timing-function [AnimationProperty, NameForMethods=TimingFunction]638 -webkit-transition = transition 639 -webkit-transition-delay = transition-delay 640 -webkit-transition-duration = transition-duration 641 -webkit-transition-property = transition-property 642 -webkit-transition-timing-function = transition-timing-function 643 643 -webkit-user-drag 644 644 -webkit-user-modify [Inherited] -
trunk/Source/WebCore/css/CSSToStyleMap.cpp
r205421 r205809 317 317 void CSSToStyleMap::mapAnimationDelay(Animation& animation, const CSSValue& value) 318 318 { 319 if (value.treatAsInitialValue(CSSProperty WebkitAnimationDelay)) {319 if (value.treatAsInitialValue(CSSPropertyAnimationDelay)) { 320 320 animation.setDelay(Animation::initialDelay()); 321 321 return; … … 330 330 void CSSToStyleMap::mapAnimationDirection(Animation& layer, const CSSValue& value) 331 331 { 332 if (value.treatAsInitialValue(CSSProperty WebkitAnimationDirection)) {332 if (value.treatAsInitialValue(CSSPropertyAnimationDirection)) { 333 333 layer.setDirection(Animation::initialDirection()); 334 334 return; … … 358 358 void CSSToStyleMap::mapAnimationDuration(Animation& animation, const CSSValue& value) 359 359 { 360 if (value.treatAsInitialValue(CSSProperty WebkitAnimationDuration)) {360 if (value.treatAsInitialValue(CSSPropertyAnimationDuration)) { 361 361 animation.setDuration(Animation::initialDuration()); 362 362 return; … … 371 371 void CSSToStyleMap::mapAnimationFillMode(Animation& layer, const CSSValue& value) 372 372 { 373 if (value.treatAsInitialValue(CSSProperty WebkitAnimationFillMode)) {373 if (value.treatAsInitialValue(CSSPropertyAnimationFillMode)) { 374 374 layer.setFillMode(Animation::initialFillMode()); 375 375 return; … … 399 399 void CSSToStyleMap::mapAnimationIterationCount(Animation& animation, const CSSValue& value) 400 400 { 401 if (value.treatAsInitialValue(CSSProperty WebkitAnimationIterationCount)) {401 if (value.treatAsInitialValue(CSSPropertyAnimationIterationCount)) { 402 402 animation.setIterationCount(Animation::initialIterationCount()); 403 403 return; … … 416 416 void CSSToStyleMap::mapAnimationName(Animation& layer, const CSSValue& value) 417 417 { 418 if (value.treatAsInitialValue(CSSProperty WebkitAnimationName)) {418 if (value.treatAsInitialValue(CSSPropertyAnimationName)) { 419 419 layer.setName(Animation::initialName()); 420 420 return; … … 433 433 void CSSToStyleMap::mapAnimationPlayState(Animation& layer, const CSSValue& value) 434 434 { 435 if (value.treatAsInitialValue(CSSProperty WebkitAnimationPlayState)) {435 if (value.treatAsInitialValue(CSSPropertyAnimationPlayState)) { 436 436 layer.setPlayState(Animation::initialPlayState()); 437 437 return; … … 447 447 void CSSToStyleMap::mapAnimationProperty(Animation& animation, const CSSValue& value) 448 448 { 449 if (value.treatAsInitialValue(CSSProperty WebkitAnimation)) {449 if (value.treatAsInitialValue(CSSPropertyAnimation)) { 450 450 animation.setAnimationMode(Animation::AnimateAll); 451 451 animation.setProperty(CSSPropertyInvalid); … … 471 471 void CSSToStyleMap::mapAnimationTimingFunction(Animation& animation, const CSSValue& value) 472 472 { 473 if (value.treatAsInitialValue(CSSProperty WebkitAnimationTimingFunction)) {473 if (value.treatAsInitialValue(CSSPropertyAnimationTimingFunction)) { 474 474 animation.setTimingFunction(Animation::initialTimingFunction()); 475 475 return; -
trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp
r204052 r205809 272 272 return value; 273 273 274 CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propertyID);275 if (prefixingVariant != propertyID)276 return m_propertySet->getPropertyCSSValue(prefixingVariant);277 278 274 return nullptr; 279 275 } … … 284 280 if (!value.isEmpty()) 285 281 return value; 286 287 CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propertyID);288 if (prefixingVariant != propertyID)289 return m_propertySet->getPropertyValue(prefixingVariant);290 282 291 283 return String(); -
trunk/Source/WebCore/css/StyleProperties.cpp
r205660 r205809 209 209 case CSSPropertyTransformOrigin: 210 210 return getShorthandValue(transformOriginShorthand()); 211 case CSSPropertyWebkitTransition:212 return getLayeredShorthandValue(webkitTransitionShorthand());213 case CSSPropertyWebkitAnimation:214 return getLayeredShorthandValue(webkitAnimationShorthand());215 211 case CSSPropertyMarker: { 216 212 RefPtr<CSSValue> value = getPropertyCSSValueInternal(CSSPropertyMarkerStart); … … 641 637 return false; 642 638 643 bool propertiesWereRemoved = removePropertiesInSet(shorthand.properties(), shorthand.length()); 644 645 CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propertyID); 646 if (prefixingVariant == propertyID) 647 return propertiesWereRemoved; 648 649 StylePropertyShorthand shorthandPrefixingVariant = shorthandForProperty(prefixingVariant); 650 bool prefixedVariantPropertiesWereRemoved = removePropertiesInSet(shorthandPrefixingVariant.properties(), shorthandPrefixingVariant.length()); 651 return propertiesWereRemoved || prefixedVariantPropertiesWereRemoved; 639 return removePropertiesInSet(shorthand.properties(), shorthand.length()); 652 640 } 653 641 … … 977 965 shorthandPropertyID = CSSPropertyTransition; 978 966 break; 979 case CSSPropertyWebkitAnimationName:980 case CSSPropertyWebkitAnimationDuration:981 case CSSPropertyWebkitAnimationTimingFunction:982 case CSSPropertyWebkitAnimationDelay:983 case CSSPropertyWebkitAnimationIterationCount:984 case CSSPropertyWebkitAnimationDirection:985 case CSSPropertyWebkitAnimationFillMode:986 case CSSPropertyWebkitAnimationPlayState:987 shorthandPropertyID = CSSPropertyWebkitAnimation;988 break;989 967 case CSSPropertyFlexDirection: 990 968 case CSSPropertyFlexWrap: … … 1015 993 case CSSPropertyTransformOriginZ: 1016 994 shorthandPropertyID = CSSPropertyTransformOrigin; 1017 break;1018 case CSSPropertyWebkitTransitionProperty:1019 case CSSPropertyWebkitTransitionDuration:1020 case CSSPropertyWebkitTransitionTimingFunction:1021 case CSSPropertyWebkitTransitionDelay:1022 shorthandPropertyID = CSSPropertyWebkitTransition;1023 995 break; 1024 996 default: -
trunk/Source/WebCore/css/StylePropertyShorthand.cpp
r201559 r205809 33 33 } 34 34 35 StylePropertyShorthand animationShorthandForParsing( CSSPropertyID propId)35 StylePropertyShorthand animationShorthandForParsing() 36 36 { 37 37 // Animation-name must come last, so that keywords for other properties in the shorthand … … 48 48 }; 49 49 50 static const CSSPropertyID prefixedAnimationPropertiesForParsing[] = { 51 CSSPropertyWebkitAnimationDuration, 52 CSSPropertyWebkitAnimationTimingFunction, 53 CSSPropertyWebkitAnimationDelay, 54 CSSPropertyWebkitAnimationIterationCount, 55 CSSPropertyWebkitAnimationDirection, 56 CSSPropertyWebkitAnimationFillMode, 57 CSSPropertyWebkitAnimationPlayState, 58 CSSPropertyWebkitAnimationName 59 }; 60 61 if (propId == CSSPropertyAnimation) 62 return StylePropertyShorthand(CSSPropertyAnimation, animationPropertiesForParsing); 63 return StylePropertyShorthand(CSSPropertyWebkitAnimation, prefixedAnimationPropertiesForParsing); 50 return StylePropertyShorthand(CSSPropertyAnimation, animationPropertiesForParsing); 64 51 } 65 52 -
trunk/Source/WebCore/css/StylePropertyShorthand.h
r201559 r205809 53 53 54 54 // Custom StylePropertyShorthand functions. 55 StylePropertyShorthand animationShorthandForParsing( CSSPropertyID);55 StylePropertyShorthand animationShorthandForParsing(); 56 56 StylePropertyShorthand borderAbridgedShorthand(); 57 57 -
trunk/Source/WebCore/css/StyleResolver.cpp
r205701 r205809 494 494 // Timing-function within keyframes is special, because it is not animated; it just 495 495 // describes the timing function between this keyframe and the next. 496 if (property != CSSProperty WebkitAnimationTimingFunction && property != CSSPropertyAnimationTimingFunction)496 if (property != CSSPropertyAnimationTimingFunction) 497 497 keyframeValue.addProperty(property); 498 498 } -
trunk/Source/WebCore/css/parser/CSSParser.cpp
r205807 r205809 2722 2722 case CSSPropertyAnimationIterationCount: 2723 2723 case CSSPropertyAnimationTimingFunction: 2724 case CSSPropertyWebkitAnimationDelay:2725 case CSSPropertyWebkitAnimationDirection:2726 case CSSPropertyWebkitAnimationDuration:2727 case CSSPropertyWebkitAnimationFillMode:2728 case CSSPropertyWebkitAnimationName:2729 case CSSPropertyWebkitAnimationPlayState:2730 case CSSPropertyWebkitAnimationIterationCount:2731 case CSSPropertyWebkitAnimationTimingFunction:2732 2724 #if ENABLE(CSS_ANIMATIONS_LEVEL_2) 2733 2725 case CSSPropertyWebkitAnimationTrigger: … … 2736 2728 case CSSPropertyTransitionDuration: 2737 2729 case CSSPropertyTransitionTimingFunction: 2738 case CSSPropertyTransitionProperty: 2739 case CSSPropertyWebkitTransitionDelay: 2740 case CSSPropertyWebkitTransitionDuration: 2741 case CSSPropertyWebkitTransitionTimingFunction: 2742 case CSSPropertyWebkitTransitionProperty: { 2730 case CSSPropertyTransitionProperty: { 2743 2731 RefPtr<CSSValue> val; 2744 2732 AnimationParseContext context; … … 3071 3059 return parseShorthand(propId, webkitTextStrokeShorthand(), important); 3072 3060 case CSSPropertyAnimation: 3073 case CSSPropertyWebkitAnimation:3074 3061 return parseAnimationShorthand(propId, important); 3075 3062 case CSSPropertyTransition: 3076 case CSSPropertyWebkitTransition:3077 3063 return parseTransitionShorthand(propId, important); 3078 3064 case CSSPropertyInvalid: … … 3791 3777 bool CSSParser::parseAnimationShorthand(CSSPropertyID propId, bool important) 3792 3778 { 3793 ASSERT(propId == CSSPropertyAnimation || propId == CSSPropertyWebkitAnimation);3779 ASSERT(propId == CSSPropertyAnimation); 3794 3780 3795 3781 const unsigned numProperties = 8; 3796 const StylePropertyShorthand& shorthand = animationShorthandForParsing( propId);3782 const StylePropertyShorthand& shorthand = animationShorthandForParsing(); 3797 3783 3798 3784 // The list of properties in the shorthand should be the same … … 3801 3787 ASSERT(numProperties == shorthand.length()); 3802 3788 ASSERT(numProperties == animationShorthand().length()); 3803 ASSERT(numProperties == webkitAnimationShorthand().length());3804 3789 3805 3790 ShorthandScope scope(this, propId); … … 3859 3844 // unprefixed values. 3860 3845 for (i = 0; i < numProperties; ++i) 3861 addProperty WithPrefixingVariant(shorthand.properties()[i], WTFMove(values[i]), important);3846 addProperty(shorthand.properties()[i], WTFMove(values[i]), important); 3862 3847 3863 3848 return true; 3864 3849 } 3865 3866 void CSSParser::addPropertyWithPrefixingVariant(CSSPropertyID propId, RefPtr<CSSValue>&& value, bool important, bool implicit)3867 {3868 addProperty(propId, value.copyRef(), important, implicit);3869 3870 CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propId);3871 if (prefixingVariant == propId)3872 return;3873 3874 if (m_currentShorthand) {3875 // We can't use ShorthandScope here as we can already be inside one (e.g we are parsing CSSTransition).3876 m_currentShorthand = prefixingVariantForPropertyId(m_currentShorthand);3877 addProperty(prefixingVariant, WTFMove(value), important, implicit);3878 m_currentShorthand = prefixingVariantForPropertyId(m_currentShorthand);3879 } else3880 addProperty(prefixingVariant, WTFMove(value), important, implicit);3881 }3882 3883 3850 3884 3851 RefPtr<CSSPrimitiveValue> CSSParser::parseColumnWidth() … … 4013 3980 // unprefixed values. 4014 3981 for (i = 0; i < numProperties; ++i) 4015 addProperty WithPrefixingVariant(shorthand.properties()[i], WTFMove(values[i]), important);3982 addProperty(shorthand.properties()[i], WTFMove(values[i]), important); 4016 3983 4017 3984 return true; … … 5382 5349 switch (propId) { 5383 5350 case CSSPropertyAnimationDelay: 5384 case CSSPropertyWebkitAnimationDelay:5385 5351 case CSSPropertyTransitionDelay: 5386 case CSSPropertyWebkitTransitionDelay:5387 5352 currValue = parseAnimationDelay(); 5388 5353 if (currValue) … … 5390 5355 break; 5391 5356 case CSSPropertyAnimationDirection: 5392 case CSSPropertyWebkitAnimationDirection:5393 5357 currValue = parseAnimationDirection(); 5394 5358 if (currValue) … … 5396 5360 break; 5397 5361 case CSSPropertyAnimationDuration: 5398 case CSSPropertyWebkitAnimationDuration:5399 5362 case CSSPropertyTransitionDuration: 5400 case CSSPropertyWebkitTransitionDuration:5401 5363 currValue = parseAnimationDuration(); 5402 5364 if (currValue) … … 5404 5366 break; 5405 5367 case CSSPropertyAnimationFillMode: 5406 case CSSPropertyWebkitAnimationFillMode:5407 5368 currValue = parseAnimationFillMode(); 5408 5369 if (currValue) … … 5410 5371 break; 5411 5372 case CSSPropertyAnimationIterationCount: 5412 case CSSPropertyWebkitAnimationIterationCount:5413 5373 currValue = parseAnimationIterationCount(); 5414 5374 if (currValue) … … 5416 5376 break; 5417 5377 case CSSPropertyAnimationName: 5418 case CSSPropertyWebkitAnimationName:5419 5378 currValue = parseAnimationName(); 5420 5379 if (currValue) … … 5422 5381 break; 5423 5382 case CSSPropertyAnimationPlayState: 5424 case CSSPropertyWebkitAnimationPlayState:5425 5383 currValue = parseAnimationPlayState(); 5426 5384 if (currValue) … … 5428 5386 break; 5429 5387 case CSSPropertyTransitionProperty: 5430 case CSSPropertyWebkitTransitionProperty:5431 5388 currValue = parseAnimationProperty(context); 5432 5389 if (value && !context.animationPropertyKeywordAllowed()) … … 5436 5393 break; 5437 5394 case CSSPropertyAnimationTimingFunction: 5438 case CSSPropertyWebkitAnimationTimingFunction:5439 5395 case CSSPropertyTransitionTimingFunction: 5440 case CSSPropertyWebkitTransitionTimingFunction:5441 5396 currValue = parseAnimationTimingFunction(); 5442 5397 if (currValue) -
trunk/Source/WebCore/css/parser/CSSParser.h
r205660 r205809 146 146 std::unique_ptr<MediaQuery> parseMediaQuery(const String&); 147 147 148 void addPropertyWithPrefixingVariant(CSSPropertyID, RefPtr<CSSValue>&&, bool important, bool implicit = false);149 148 void addProperty(CSSPropertyID, RefPtr<CSSValue>&&, bool important, bool implicit = false); 150 149 void rollbackLastProperties(int num); -
trunk/Source/WebCore/html/shadow/MediaControlElements.cpp
r205249 r205809 191 191 double duration = document().page() ? document().page()->theme().mediaControlsFadeInDuration() : 0; 192 192 193 setInlineStyleProperty(CSSProperty WebkitTransitionProperty, CSSPropertyOpacity);194 setInlineStyleProperty(CSSProperty WebkitTransitionDuration, duration, CSSPrimitiveValue::CSS_S);193 setInlineStyleProperty(CSSPropertyTransitionProperty, CSSPropertyOpacity); 194 setInlineStyleProperty(CSSPropertyTransitionDuration, duration, CSSPrimitiveValue::CSS_S); 195 195 setInlineStyleProperty(CSSPropertyOpacity, 1.0, CSSPrimitiveValue::CSS_NUMBER); 196 196 … … 208 208 double duration = document().page() ? document().page()->theme().mediaControlsFadeOutDuration() : 0; 209 209 210 setInlineStyleProperty(CSSProperty WebkitTransitionProperty, CSSPropertyOpacity);211 setInlineStyleProperty(CSSProperty WebkitTransitionDuration, duration, CSSPrimitiveValue::CSS_S);210 setInlineStyleProperty(CSSPropertyTransitionProperty, CSSPropertyOpacity); 211 setInlineStyleProperty(CSSPropertyTransitionDuration, duration, CSSPrimitiveValue::CSS_S); 212 212 setInlineStyleProperty(CSSPropertyOpacity, 0.0, CSSPrimitiveValue::CSS_NUMBER); 213 213
Note: See TracChangeset
for help on using the changeset viewer.