Commit 572b6eb2 authored by dino@apple.com's avatar dino@apple.com

2008-12-12 Dean Jackson <dino@apple.com>

        Reviewed by Darin Adler.

        Expose WebKitAnimationEvent, WebKitTransitionEvent,
        WebKitCSSTransformValue, WebKitCSSKeyframeRule and
        WebKitCSSKeyframesRule to Window object.
        This required generating constructors for the event
        interfaces.

        https://bugs.webkit.org/show_bug.cgi?id=20560

        WebCore:
            * dom/WebKitAnimationEvent.idl:
            * dom/WebKitTransitionEvent.idl:
            * page/DOMWindow.idl:

        LayoutTests:
            * animations/keyframes-rule-expected.txt:
            * animations/keyframes-rule.html:
            * fast/dom/Window/window-properties-expected.txt:
            * fast/events/event-instanceof-expected.txt:
            * fast/events/resources/event-instanceof.js:
            * fast/js/global-constructors-expected.txt:
            * transforms/transform-value-types-expected.txt:
            * transforms/transform-value-types.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2ad1d872
2008-12-12 Dean Jackson <dino@apple.com>
Reviewed by Darin Adler.
Expose WebKitAnimationEvent, WebKitTransitionEvent,
WebKitCSSTransformValue, WebKitCSSKeyframeRule and
WebKitCSSKeyframesRule to Window object.
https://bugs.webkit.org/show_bug.cgi?id=20560
* animations/keyframes-rule-expected.txt:
* animations/keyframes-rule.html:
* fast/dom/Window/window-properties-expected.txt:
* fast/events/event-instanceof-expected.txt:
* fast/events/resources/event-instanceof.js:
* fast/js/global-constructors-expected.txt:
* transforms/transform-value-types-expected.txt:
* transforms/transform-value-types.html:
2008-12-12 Cameron Zwarich <zwarich@apple.com>
Reviewed by Oliver Hunt.
......
......@@ -3,8 +3,10 @@ This tests the WebKitCSSKeyframeRule and WebKitCSSKeyframesRule interfaces.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS WEBKIT_KEYFRAME_RULE exists on Window object
PASS WEBKIT_KEYFRAMES_RULE exists on Window object
PASS WebKitCSSKeyframeRule exists on Window object
PASS WebKitCSSKeyframesRule exists on Window object
PASS WEBKIT_KEYFRAME_RULE exists on Window.CSSRule object
PASS WEBKIT_KEYFRAMES_RULE exists on Window.CSSRule object
PASS keyframes1.type is window.CSSRule.WEBKIT_KEYFRAMES_RULE
PASS keyframes1.name is 'test1'
......
......@@ -21,15 +21,25 @@
description("This tests the WebKitCSSKeyframeRule and WebKitCSSKeyframesRule interfaces.");
if (window.WebKitCSSKeyframeRule)
testPassed("WebKitCSSKeyframeRule exists on Window object");
else
testFailed("WebKitCSSKeyframeRule does not exist on Window object");
if (window.WebKitCSSKeyframesRule)
testPassed("WebKitCSSKeyframesRule exists on Window object");
else
testFailed("WebKitCSSKeyframesRule does not exist on Window object");
if (window.CSSRule.WEBKIT_KEYFRAME_RULE)
testPassed("WEBKIT_KEYFRAME_RULE exists on Window object");
testPassed("WEBKIT_KEYFRAME_RULE exists on Window.CSSRule object");
else
testFailed("WEBKIT_KEYFRAME_RULE does not exist on Window object");
testFailed("WEBKIT_KEYFRAME_RULE does not exist on Window.CSSRule object");
if (window.CSSRule.WEBKIT_KEYFRAMES_RULE)
testPassed("WEBKIT_KEYFRAMES_RULE exists on Window object");
testPassed("WEBKIT_KEYFRAMES_RULE exists on Window.CSSRule object");
else
testFailed("WEBKIT_KEYFRAMES_RULE does not exist on Window object");
testFailed("WEBKIT_KEYFRAMES_RULE does not exist on Window.CSSRule object");
debug("");
......
......@@ -1324,6 +1324,27 @@ window.TypeError [function]
window.UIEvent [object UIEventConstructor]
window.UIEvent.prototype [printed above as window.Event.prototype]
window.URIError [function]
window.WebKitAnimationEvent [object WebKitAnimationEventConstructor]
window.WebKitAnimationEvent.prototype [printed above as window.Event.prototype]
window.WebKitCSSKeyframeRule [object WebKitCSSKeyframeRuleConstructor]
window.WebKitCSSKeyframeRule.prototype [printed above as window.CSSRule.prototype]
window.WebKitCSSKeyframesRule [object WebKitCSSKeyframesRuleConstructor]
window.WebKitCSSKeyframesRule.prototype [printed above as window.CSSRule.prototype]
window.WebKitCSSTransformValue [object WebKitCSSTransformValueConstructor]
window.WebKitCSSTransformValue.CSS_MATRIX [number]
window.WebKitCSSTransformValue.CSS_ROTATE [number]
window.WebKitCSSTransformValue.CSS_SCALE [number]
window.WebKitCSSTransformValue.CSS_SCALEX [number]
window.WebKitCSSTransformValue.CSS_SCALEY [number]
window.WebKitCSSTransformValue.CSS_SKEW [number]
window.WebKitCSSTransformValue.CSS_SKEWX [number]
window.WebKitCSSTransformValue.CSS_SKEWY [number]
window.WebKitCSSTransformValue.CSS_TRANSLATE [number]
window.WebKitCSSTransformValue.CSS_TRANSLATEX [number]
window.WebKitCSSTransformValue.CSS_TRANSLATEY [number]
window.WebKitCSSTransformValue.prototype [printed above as window.CSSValue.prototype]
window.WebKitTransitionEvent [object WebKitTransitionEventConstructor]
window.WebKitTransitionEvent.prototype [printed above as window.Event.prototype]
window.WheelEvent [object WheelEventConstructor]
window.WheelEvent.prototype [printed above as window.Event.prototype]
window.Worker [object WorkerConstructor]
......
......@@ -35,6 +35,12 @@ PASS textEvent.constructor === window.TextEvent is true
PASS messageEvent instanceof window.MessageEvent is true
PASS messageEvent instanceof window.Event is true
PASS messageEvent.constructor === window.MessageEvent is true
PASS animationEvent instanceof window.WebKitAnimationEvent is true
PASS animationEvent instanceof window.Event is true
PASS animationEvent.constructor === window.WebKitAnimationEvent is true
PASS transitionEvent instanceof window.WebKitTransitionEvent is true
PASS transitionEvent instanceof window.Event is true
PASS transitionEvent.constructor === window.WebKitTransitionEvent is true
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -52,4 +52,14 @@ shouldBeTrue("messageEvent instanceof window.MessageEvent");
shouldBeTrue("messageEvent instanceof window.Event");
shouldBeTrue("messageEvent.constructor === window.MessageEvent");
var animationEvent = document.createEvent("WebKitAnimationEvent");
shouldBeTrue("animationEvent instanceof window.WebKitAnimationEvent");
shouldBeTrue("animationEvent instanceof window.Event");
shouldBeTrue("animationEvent.constructor === window.WebKitAnimationEvent");
var transitionEvent = document.createEvent("WebKitTransitionEvent");
shouldBeTrue("transitionEvent instanceof window.WebKitTransitionEvent");
shouldBeTrue("transitionEvent instanceof window.Event");
shouldBeTrue("transitionEvent.constructor === window.WebKitTransitionEvent");
var successfullyParsed = true;
......@@ -146,6 +146,11 @@ PASS Text.toString() is '[object TextConstructor]'
PASS TextEvent.toString() is '[object TextEventConstructor]'
PASS TextMetrics.toString() is '[object TextMetricsConstructor]'
PASS UIEvent.toString() is '[object UIEventConstructor]'
PASS WebKitAnimationEvent.toString() is '[object WebKitAnimationEventConstructor]'
PASS WebKitCSSKeyframeRule.toString() is '[object WebKitCSSKeyframeRuleConstructor]'
PASS WebKitCSSKeyframesRule.toString() is '[object WebKitCSSKeyframesRuleConstructor]'
PASS WebKitCSSTransformValue.toString() is '[object WebKitCSSTransformValueConstructor]'
PASS WebKitTransitionEvent.toString() is '[object WebKitTransitionEventConstructor]'
PASS WheelEvent.toString() is '[object WheelEventConstructor]'
PASS Worker.toString() is '[object WorkerConstructor]'
PASS XMLDocument.toString() is '[object DocumentConstructor]'
......
......@@ -4,33 +4,33 @@ PASS jsWrapperClass(transformRule.constructor) is 'CSSValueListConstructor'
PASS jsWrapperClass(transformRule[0]) is 'WebKitCSSTransformValue'
PASS jsWrapperClass(transformRule[0].__proto__) is 'WebKitCSSTransformValuePrototype'
PASS jsWrapperClass(transformRule[0].constructor) is 'WebKitCSSTransformValueConstructor'
PASS transformRule[0].operationType is 1
PASS transformRule[0].operationType is WebKitCSSTransformValue.CSS_TRANSLATE
PASS transformRule[0].cssText is 'translate(10px)'
PASS transformRule[1].operationType is 2
PASS transformRule[1].operationType is WebKitCSSTransformValue.CSS_TRANSLATEX
PASS transformRule[1].cssText is 'translateX(10px)'
PASS transformRule[2].operationType is 3
PASS transformRule[2].operationType is WebKitCSSTransformValue.CSS_TRANSLATEY
PASS transformRule[2].cssText is 'translateY(10px)'
PASS transformRule[3].operationType is 4
PASS transformRule[3].operationType is WebKitCSSTransformValue.CSS_ROTATE
PASS transformRule[3].cssText is 'rotate(10deg)'
PASS transformRule[4].operationType is 4
PASS transformRule[4].operationType is WebKitCSSTransformValue.CSS_ROTATE
PASS transformRule[4].cssText is 'rotate(11rad)'
PASS transformRule[5].operationType is 4
PASS transformRule[5].operationType is WebKitCSSTransformValue.CSS_ROTATE
PASS transformRule[5].cssText is 'rotate(12grad)'
PASS transformRule[6].operationType is 4
PASS transformRule[6].operationType is WebKitCSSTransformValue.CSS_ROTATE
PASS transformRule[6].cssText is 'rotate(13turn)'
PASS transformRule[7].operationType is 5
PASS transformRule[7].operationType is WebKitCSSTransformValue.CSS_SCALE
PASS transformRule[7].cssText is 'scale(2)'
PASS transformRule[8].operationType is 6
PASS transformRule[8].operationType is WebKitCSSTransformValue.CSS_SCALEX
PASS transformRule[8].cssText is 'scaleX(1.2)'
PASS transformRule[9].operationType is 7
PASS transformRule[9].operationType is WebKitCSSTransformValue.CSS_SCALEY
PASS transformRule[9].cssText is 'scaleY(1.2)'
PASS transformRule[10].operationType is 8
PASS transformRule[10].operationType is WebKitCSSTransformValue.CSS_SKEW
PASS transformRule[10].cssText is 'skew(10deg, 10rad)'
PASS transformRule[11].operationType is 9
PASS transformRule[11].operationType is WebKitCSSTransformValue.CSS_SKEWX
PASS transformRule[11].cssText is 'skewX(10deg)'
PASS transformRule[12].operationType is 10
PASS transformRule[12].operationType is WebKitCSSTransformValue.CSS_SKEWY
PASS transformRule[12].cssText is 'skewY(11grad)'
PASS transformRule[13].operationType is 11
PASS transformRule[13].operationType is WebKitCSSTransformValue.CSS_MATRIX
PASS transformRule[13].cssText is 'matrix(1, 0, 0, 1, 0, 0)'
PASS successfullyParsed is true
......
......@@ -54,46 +54,46 @@
test("transformRule[0]", "WebKitCSSTransformValue");
shouldBe("transformRule[0].operationType", "1"); // CSS_TRANSLATE
shouldBe("transformRule[0].operationType", "WebKitCSSTransformValue.CSS_TRANSLATE");
shouldBe("transformRule[0].cssText", "'translate(10px)'");
shouldBe("transformRule[1].operationType", "2"); // CSS_TRANSLATEX
shouldBe("transformRule[1].operationType", "WebKitCSSTransformValue.CSS_TRANSLATEX");
shouldBe("transformRule[1].cssText", "'translateX(10px)'");
shouldBe("transformRule[2].operationType", "3"); // CSS_TRANSLATEY
shouldBe("transformRule[2].operationType", "WebKitCSSTransformValue.CSS_TRANSLATEY");
shouldBe("transformRule[2].cssText", "'translateY(10px)'");
shouldBe("transformRule[3].operationType", "4"); // CSS_ROTATE
shouldBe("transformRule[3].operationType", "WebKitCSSTransformValue.CSS_ROTATE");
shouldBe("transformRule[3].cssText", "'rotate(10deg)'");
shouldBe("transformRule[4].operationType", "4"); // CSS_ROTATE
shouldBe("transformRule[4].operationType", "WebKitCSSTransformValue.CSS_ROTATE");
shouldBe("transformRule[4].cssText", "'rotate(11rad)'");
shouldBe("transformRule[5].operationType", "4"); // CSS_ROTATE
shouldBe("transformRule[5].operationType", "WebKitCSSTransformValue.CSS_ROTATE");
shouldBe("transformRule[5].cssText", "'rotate(12grad)'");
shouldBe("transformRule[6].operationType", "4"); // CSS_ROTATE
shouldBe("transformRule[6].operationType", "WebKitCSSTransformValue.CSS_ROTATE");
shouldBe("transformRule[6].cssText", "'rotate(13turn)'");
shouldBe("transformRule[7].operationType", "5"); // CSS_SCALE
shouldBe("transformRule[7].operationType", "WebKitCSSTransformValue.CSS_SCALE");
shouldBe("transformRule[7].cssText", "'scale(2)'");
shouldBe("transformRule[8].operationType", "6"); // CSS_SCALEX
shouldBe("transformRule[8].operationType", "WebKitCSSTransformValue.CSS_SCALEX");
shouldBe("transformRule[8].cssText", "'scaleX(1.2)'");
shouldBe("transformRule[9].operationType", "7"); // CSS_SCALEY
shouldBe("transformRule[9].operationType", "WebKitCSSTransformValue.CSS_SCALEY");
shouldBe("transformRule[9].cssText", "'scaleY(1.2)'");
shouldBe("transformRule[10].operationType", "8"); // CSS_SKEW
shouldBe("transformRule[10].operationType", "WebKitCSSTransformValue.CSS_SKEW");
shouldBe("transformRule[10].cssText", "'skew(10deg, 10rad)'");
shouldBe("transformRule[11].operationType", "9"); // CSS_SKEWX
shouldBe("transformRule[11].operationType", "WebKitCSSTransformValue.CSS_SKEWX");
shouldBe("transformRule[11].cssText", "'skewX(10deg)'");
shouldBe("transformRule[12].operationType", "10"); // CSS_SKEWY
shouldBe("transformRule[12].operationType", "WebKitCSSTransformValue.CSS_SKEWY");
shouldBe("transformRule[12].cssText", "'skewY(11grad)'");
shouldBe("transformRule[13].operationType", "11"); // CSS_MATRIX
shouldBe("transformRule[13].operationType", "WebKitCSSTransformValue.CSS_MATRIX");
shouldBe("transformRule[13].cssText", "'matrix(1, 0, 0, 1, 0, 0)'");
var successfullyParsed = true;
......
2008-12-12 Dean Jackson <dino@apple.com>
Reviewed by Darin Adler.
Expose WebKitAnimationEvent, WebKitTransitionEvent,
WebKitCSSTransformValue, WebKitCSSKeyframeRule and
WebKitCSSKeyframesRule to Window object.
This required generating constructors for the event
interfaces.
https://bugs.webkit.org/show_bug.cgi?id=20560
* dom/WebKitAnimationEvent.idl:
* dom/WebKitTransitionEvent.idl:
* page/DOMWindow.idl:
2008-12-12 Dave Moore <davemoore@google.com>
Reviewed by Eric Seidel.
......@@ -25,7 +25,9 @@
module events {
interface WebKitAnimationEvent : Event {
interface [
GenerateConstructor
] WebKitAnimationEvent : Event {
readonly attribute DOMString animationName;
readonly attribute double elapsedTime;
void initWebKitAnimationEvent(in DOMString typeArg,
......
......@@ -25,7 +25,9 @@
module events {
interface WebKitTransitionEvent : Event {
interface [
GenerateConstructor
] WebKitTransitionEvent : Event {
readonly attribute DOMString propertyName;
readonly attribute double elapsedTime;
void initWebKitTransitionEvent(in DOMString typeArg,
......
......@@ -217,6 +217,7 @@ module window {
attribute CSSValueConstructor CSSValue;
attribute CSSPrimitiveValueConstructor CSSPrimitiveValue;
attribute CSSValueListConstructor CSSValueList;
attribute WebKitCSSTransformValueConstructor WebKitCSSTransformValue;
attribute CSSRuleConstructor CSSRule;
attribute CSSCharsetRuleConstructor CSSCharsetRule;
......@@ -339,10 +340,15 @@ module window {
attribute ProgressEventConstructor ProgressEvent;
attribute TextEventConstructor TextEvent;
attribute UIEventConstructor UIEvent;
attribute WebKitAnimationEventConstructor WebKitAnimationEvent;
attribute WebKitTransitionEventConstructor WebKitTransitionEvent;
attribute WheelEventConstructor WheelEvent;
attribute MessageEventConstructor MessageEvent;
attribute EventExceptionConstructor EventException;
attribute WebKitCSSKeyframeRuleConstructor WebKitCSSKeyframeRule;
attribute WebKitCSSKeyframesRuleConstructor WebKitCSSKeyframesRule;
#if ENABLE_CHANNEL_MESSAGING
attribute MessagePortConstructor MessagePort;
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment