WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
patch + testcases
shorthand.patch (text/plain), 9.77 KB, created by
Dean Jackson
on 2009-01-07 13:17:38 PST
(
hide
)
Description:
patch + testcases
Filename:
MIME Type:
Creator:
Dean Jackson
Created:
2009-01-07 13:17:38 PST
Size:
9.77 KB
patch
obsolete
>diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 51befa8..b32fda3 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,15 @@ >+2009-01-07 Dean Jackson <dino@apple.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Added layout test for removing shorthand properties for >+ animation, transition and transform origin. >+ >+ https://bugs.webkit.org/show_bug.cgi?id=22605 >+ >+ * fast/css/transform-inline-style-remove-expected.txt: Added. >+ * fast/css/transform-inline-style-remove.html: Added. >+ > 2009-01-06 Pierre-Olivier Latour <pol@apple.com> > > Reviewed by Darin Adler. >diff --git a/LayoutTests/fast/css/transform-inline-style-remove-expected.txt b/LayoutTests/fast/css/transform-inline-style-remove-expected.txt >new file mode 100644 >index 0000000..d03338d >--- /dev/null >+++ b/LayoutTests/fast/css/transform-inline-style-remove-expected.txt >@@ -0,0 +1,35 @@ >+Tests Removing inline style for transition, animation and transform origin >+https://bugs.webkit.org/show_bug.cgi?id=22605 >+ >+All "after" results should be null/empty >+ >+transition (before): all 1s ease, none 2s ease-in, left 3s cubic-bezier(0.2, 0.3, 0.6, 0.8) 2s >+transition property (before): all, none, left >+transition duration (before): 1s, 2s, 3s >+transition timing function (before): ease, ease-in, cubic-bezier(0.2, 0.3, 0.6, 0.8) >+transition (after): >+transition property (after): >+transition duration (after): >+transition timing function (after): >+ >+transform origin (before): 0% 30% >+transform origin X (before): 0% >+transform origin Y (before): 30% >+transform origin (after): >+transform origin X (after): >+transform origin Y (after): >+ >+animation (before): test 5s ease-in-out infinite alternate >+animation name (before): test >+animation duration (before): 5s >+animation timing function (before): ease-in-out >+animation direction (before): alternate >+animation iteration count (before): infinite >+animation (after): >+animation name (after): >+animation duration (after): >+animation timing function (after): >+animation direction (after): >+animation iteration count (after): >+ >+ >diff --git a/LayoutTests/fast/css/transform-inline-style-remove.html b/LayoutTests/fast/css/transform-inline-style-remove.html >new file mode 100644 >index 0000000..1060f65 >--- /dev/null >+++ b/LayoutTests/fast/css/transform-inline-style-remove.html >@@ -0,0 +1,75 @@ >+<html> >+<head> >+ <title>Removing inline style for transition, animation and transform origin</title> >+ <style type="text/css" media="screen"> >+ #box { >+ height: 100px; >+ width: 100px; >+ background-color: blue; >+ } >+ >+ @-webkit-keyframes test { >+ from { background-color: blue; } >+ to { background-color: gray; } >+ } >+ >+ </style> >+ <script type="text/javascript" charset="utf-8"> >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(); >+ >+ function doTest() >+ { >+ var console = document.getElementById('console'); >+ var box = document.getElementById('box'); >+ >+ console.innerHTML += 'transition (before): ' + box.style.webkitTransition + '<br>'; >+ console.innerHTML += 'transition property (before): ' + box.style.webkitTransitionProperty + '<br>'; >+ console.innerHTML += 'transition duration (before): ' + box.style.webkitTransitionDuration + '<br>'; >+ console.innerHTML += 'transition timing function (before): ' + box.style.webkitTransitionTimingFunction + '<br>'; >+ box.style.webkitTransition = ""; >+ console.innerHTML += 'transition (after): ' + box.style.webkitTransition + '<br>'; >+ console.innerHTML += 'transition property (after): ' + box.style.webkitTransitionProperty + '<br>'; >+ console.innerHTML += 'transition duration (after): ' + box.style.webkitTransitionDuration + '<br>'; >+ console.innerHTML += 'transition timing function (after): ' + box.style.webkitTransitionTimingFunction + '<br>'; >+ console.innerHTML += "<br>"; >+ >+ console.innerHTML += 'transform origin (before): ' + box.style.webkitTransformOrigin + '<br>'; >+ console.innerHTML += 'transform origin X (before): ' + box.style.webkitTransformOriginX + '<br>'; >+ console.innerHTML += 'transform origin Y (before): ' + box.style.webkitTransformOriginY + '<br>'; >+ box.style.webkitTransformOrigin = ""; >+ console.innerHTML += 'transform origin (after): ' + box.style.webkitTransformOrigin + '<br>'; >+ console.innerHTML += 'transform origin X (after): ' + box.style.webkitTransformOriginX + '<br>'; >+ console.innerHTML += 'transform origin Y (after): ' + box.style.webkitTransformOriginY + '<br>'; >+ console.innerHTML += "<br>"; >+ >+ console.innerHTML += 'animation (before): ' + box.style.webkitAnimation + '<br>'; >+ console.innerHTML += 'animation name (before): ' + box.style.webkitAnimationName + '<br>'; >+ console.innerHTML += 'animation duration (before): ' + box.style.webkitAnimationDuration + '<br>'; >+ console.innerHTML += 'animation timing function (before): ' + box.style.webkitAnimationTimingFunction + '<br>'; >+ console.innerHTML += 'animation direction (before): ' + box.style.webkitAnimationDirection + '<br>'; >+ console.innerHTML += 'animation iteration count (before): ' + box.style.webkitAnimationIterationCount + '<br>'; >+ box.style.webkitAnimation = ""; >+ console.innerHTML += 'animation (after): ' + box.style.webkitAnimation + '<br>'; >+ console.innerHTML += 'animation name (after): ' + box.style.webkitAnimationName + '<br>'; >+ console.innerHTML += 'animation duration (after): ' + box.style.webkitAnimationDuration + '<br>'; >+ console.innerHTML += 'animation timing function (after): ' + box.style.webkitAnimationTimingFunction + '<br>'; >+ console.innerHTML += 'animation direction (after): ' + box.style.webkitAnimationDirection + '<br>'; >+ console.innerHTML += 'animation iteration count (after): ' + box.style.webkitAnimationIterationCount + '<br>'; >+ console.innerHTML += "<br>"; >+ } >+ </script> >+</head> >+<body onload="doTest()"> >+ <p>Tests Removing inline style for transition, animation and transform origin<br> >+ <a href="https://bugs.webkit.org/show_bug.cgi?id=22605">https://bugs.webkit.org/show_bug.cgi?id=22605</a> >+ </p> >+ <p>All "after" results should be null/empty</p> >+ <div id="box" style="border: 1px black; >+ -webkit-transition: all 1s ease, none 2s ease-in, left 3s cubic-bezier(0.2, 0.3, 0.6, 0.8) 2s; >+ -webkit-transform-origin: left 30%; >+ -webkit-animation: test 5s ease-in-out alternate infinite;"> >+ </div> >+ <div id="console"></div> >+</body> >+</html> >diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog >index 79d54f8..728f563 100644 >--- a/WebCore/ChangeLog >+++ b/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2009-01-07 Dean Jackson <dino@apple.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Allow removal of inline shorthand properties for >+ animation, transition and transform origin. Also >+ add getter for shorthand animation property. >+ >+ https://bugs.webkit.org/show_bug.cgi?id=22605 >+ >+ Test: fast/css/transform-inline-style-remove.html >+ >+ * css/CSSMutableStyleDeclaration.cpp: >+ (WebCore::CSSMutableStyleDeclaration::getPropertyValue): >+ Getter for animation property shorthand >+ (WebCore::initShorthandMap): >+ Adds initialisation for transform-origin, animation and transition >+ > 2009-01-06 Pierre-Olivier Latour <pol@apple.com> > > Reviewed by Darin Adler. >diff --git a/WebCore/css/CSSMutableStyleDeclaration.cpp b/WebCore/css/CSSMutableStyleDeclaration.cpp >index c4e3872..6b12ced 100644 >--- a/WebCore/css/CSSMutableStyleDeclaration.cpp >+++ b/WebCore/css/CSSMutableStyleDeclaration.cpp >@@ -226,6 +226,12 @@ String CSSMutableStyleDeclaration::getPropertyValue(int propertyID) const > CSSPropertyWebkitTransitionTimingFunction, CSSPropertyWebkitTransitionDelay }; > return getLayeredShorthandValue(properties, 4); > } >+ case CSSPropertyWebkitAnimation: { >+ const int properties[6] = { CSSPropertyWebkitAnimationName, CSSPropertyWebkitAnimationDuration, >+ CSSPropertyWebkitAnimationTimingFunction, CSSPropertyWebkitAnimationDelay, >+ CSSPropertyWebkitAnimationIterationCount, CSSPropertyWebkitAnimationDirection }; >+ return getLayeredShorthandValue(properties, 6); >+ } > #if ENABLE(SVG) > case CSSPropertyMarker: { > RefPtr<CSSValue> value = getPropertyCSSValue(CSSPropertyMarkerStart); >@@ -523,6 +529,30 @@ static void initShorthandMap(ShorthandMap& shorthandMap) > CSSPropertyWebkitMaskRepeat, > }; > SET_SHORTHAND_MAP_ENTRY(shorthandMap, CSSPropertyWebkitMask, maskProperties); >+ >+ static const int animationProperties[] = { >+ CSSPropertyWebkitAnimationName, >+ CSSPropertyWebkitAnimationDuration, >+ CSSPropertyWebkitAnimationTimingFunction, >+ CSSPropertyWebkitAnimationDelay, >+ CSSPropertyWebkitAnimationIterationCount, >+ CSSPropertyWebkitAnimationDirection >+ }; >+ SET_SHORTHAND_MAP_ENTRY(shorthandMap, CSSPropertyWebkitAnimation, animationProperties); >+ >+ static const int transitionProperties[] = { >+ CSSPropertyWebkitTransitionProperty, >+ CSSPropertyWebkitTransitionDuration, >+ CSSPropertyWebkitTransitionTimingFunction, >+ CSSPropertyWebkitTransitionDelay >+ }; >+ SET_SHORTHAND_MAP_ENTRY(shorthandMap, CSSPropertyWebkitTransition, transitionProperties); >+ >+ static const int transformOriginProperties[] = { >+ CSSPropertyWebkitTransformOriginX, >+ CSSPropertyWebkitTransformOriginY >+ }; >+ SET_SHORTHAND_MAP_ENTRY(shorthandMap, CSSPropertyWebkitTransformOrigin, transformOriginProperties); > > #undef SET_SHORTHAND_MAP_ENTRY > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mitz:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 22605
: 26505