Source/WebCore: WebCore part of <rdar://problem/9155590> Broken animation in iAd...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 May 2011 00:09:17 +0000 (00:09 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 May 2011 00:09:17 +0000 (00:09 +0000)
Reviewed by Simon Fraser.

* WebCore.exp.in: Export wkExecutableWasLinkedOnOrBeforeSnowLeopard.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): Account for the binary-compatiblity
check in Core Animation.
* platform/mac/WebCoreSystemInterface.h: Added wkExecutableWasLinkedOnOrBeforeSnowLeopard.
* platform/mac/WebCoreSystemInterface.mm: Ditto.

Source/WebKit/mac: WebKit part of <rdar://problem/9155590> Broken animation in iAd producer

Reviewed by Simon Fraser.

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Initialize wkExecutableWasLinkedOnOrBeforeSnowLeopard.

Source/WebKit2: WebKit2 part of <rdar://problem/9155590> Broken animation in iAd producer

Reviewed by Simon Fraser.

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Initialize wkExecutableWasLinkedOnOrBeforeSnowLeopard.

WebKitLibraries: WebKitSystemInterface part of <rdar://problem/9155590> Broken animation in iAd producer

Reviewed by Simon Fraser.

* WebKitSystemInterface.h: Added WKExecutableWasLinkedOnOrBeforeSnowLeopard().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@85901 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/mac/WebCoreSystemInterface.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h

index a31941a..bf348b1 100644 (file)
@@ -1,3 +1,16 @@
+2011-05-05  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Simon Fraser.
+
+        WebCore part of <rdar://problem/9155590> Broken animation in iAd producer
+
+        * WebCore.exp.in: Export wkExecutableWasLinkedOnOrBeforeSnowLeopard.
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): Account for the binary-compatiblity
+        check in Core Animation.
+        * platform/mac/WebCoreSystemInterface.h: Added wkExecutableWasLinkedOnOrBeforeSnowLeopard.
+        * platform/mac/WebCoreSystemInterface.mm: Ditto.
+
 2011-05-05  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Anders Carlsson.
index 0e562b5..c54ffcd 100644 (file)
@@ -1419,6 +1419,7 @@ _wkContentAreaWillPaint
 _wkCreateCTTypesetterWithUniCharProviderAndOptions
 _wkDidBeginScrollGesture
 _wkDidEndScrollGesture
+_wkExecutableWasLinkedOnOrBeforeSnowLeopard
 _wkHorizontalScrollbarPainterForController
 _wkIOSurfaceContextCreate
 _wkIOSurfaceContextCreateImage
index 0545015..38848c2 100644 (file)
 #include <wtf/CurrentTime.h>
 #include <wtf/text/StringConcatenate.h>
 
+#if PLATFORM(MAC)
+#include "WebCoreSystemInterface.h"
+#endif
+
 using namespace std;
 
 #define HAVE_MODERN_QUARTZCORE (!defined(BUILDING_ON_LEOPARD))
@@ -1612,15 +1616,20 @@ bool GraphicsLayerCA::createTransformAnimationsFromKeyframes(const KeyframeValue
         TransformOperation::OperationType transformOp = isMatrixAnimation ? TransformOperation::MATRIX_3D : functionList[animationIndex];
         RefPtr<PlatformCAAnimation> caAnimation;
 
-#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD) || PLATFORM(WIN)
-        // CA applies animations in reverse order (<rdar://problem/7095638>) so we need the last one we add (per property)
-        // to be non-additive.
+        bool additive;
+#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) && !PLATFORM(WIN)
+        // Old vertsions of Core Animation apply animations in reverse order (<rdar://problem/7095638>) so we need the last one we add (per property)
+        // to be non-additive. For binary compatibility, the current version of Core Animation preserves this behaviors for applications linked
+        // on or before Snow Leopard.
         // FIXME: This fix has not been added to QuartzCore on Windows yet (<rdar://problem/9112233>) so we expect the
         // reversed animation behavior
-        bool additive = animationIndex < (numAnimations - 1);
-#else
-        bool additive = animationIndex > 0;
+        static bool executableWasLinkedOnOrBeforeSnowLeopard = wkExecutableWasLinkedOnOrBeforeSnowLeopard();
+        if (!executableWasLinkedOnOrBeforeSnowLeopard)
+            additive = animationIndex > 0;
+        else
 #endif
+            additive = animationIndex < (numAnimations - 1);
+
         if (isKeyframe) {
             caAnimation = createKeyframeAnimation(animation, valueList.property(), additive);
             validMatrices = setTransformAnimationKeyframes(valueList, animation, caAnimation.get(), animationIndex, transformOp, isMatrixAnimation, boxSize);
index f683580..798deee 100644 (file)
@@ -258,6 +258,8 @@ extern void (*wkDidBeginScrollGesture)(WKScrollbarPainterControllerRef);
 extern void (*wkDidEndScrollGesture)(WKScrollbarPainterControllerRef);
 
 extern bool (*wkScrollbarPainterUsesOverlayScrollers)(void);
+
+extern bool (*wkExecutableWasLinkedOnOrBeforeSnowLeopard)(void);
 #endif
 
 extern void (*wkUnregisterUniqueIdForElement)(id element);
index 9ef157a..6e625f5 100644 (file)
@@ -154,6 +154,8 @@ void (*wkDidBeginScrollGesture)(WKScrollbarPainterControllerRef);
 void (*wkDidEndScrollGesture)(WKScrollbarPainterControllerRef);
 
 bool (*wkScrollbarPainterUsesOverlayScrollers)(void);
+
+bool (*wkExecutableWasLinkedOnOrBeforeSnowLeopard)(void);
 #endif
 
 void (*wkUnregisterUniqueIdForElement)(id element);
index 1b213f2..0c3d2b0 100644 (file)
@@ -1,3 +1,12 @@
+2011-05-05  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Simon Fraser.
+
+        WebKit part of <rdar://problem/9155590> Broken animation in iAd producer
+
+        * WebCoreSupport/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface): Initialize wkExecutableWasLinkedOnOrBeforeSnowLeopard.
+
 2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
 
         Reviewed by Eric Seidel.
index f2c559d..e6afb92 100644 (file)
@@ -150,6 +150,7 @@ void InitWebCoreSystemInterface(void)
     INIT(DidBeginScrollGesture);
     INIT(DidEndScrollGesture);
     INIT(ScrollbarPainterUsesOverlayScrollers);
+    INIT(ExecutableWasLinkedOnOrBeforeSnowLeopard);
 #endif
 
     INIT(GetAXTextMarkerTypeID);
index 1293452..35ac060 100644 (file)
@@ -1,3 +1,12 @@
+2011-05-05  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Simon Fraser.
+
+        WebKit2 part of <rdar://problem/9155590> Broken animation in iAd producer
+
+        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface): Initialize wkExecutableWasLinkedOnOrBeforeSnowLeopard.
+
 2011-05-05  Keith Kyzivat  <keith.kyzivat@nokia.com>
 
         Reviewed by Laszlo Gombos.
index 06cf6c5..9a0f9fa 100644 (file)
@@ -144,6 +144,7 @@ void InitWebCoreSystemInterface(void)
         INIT(DidBeginScrollGesture);
         INIT(DidEndScrollGesture);
         INIT(ScrollbarPainterUsesOverlayScrollers);
+        INIT(ExecutableWasLinkedOnOrBeforeSnowLeopard);
 #else
         INIT(GetHyphenationLocationBeforeIndex);
         INIT(GetNSEventMomentumPhase);
index 7fd8370..d184b52 100644 (file)
@@ -1,3 +1,11 @@
+2011-05-05  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Simon Fraser.
+
+        WebKitSystemInterface part of <rdar://problem/9155590> Broken animation in iAd producer
+
+        * WebKitSystemInterface.h: Added WKExecutableWasLinkedOnOrBeforeSnowLeopard().
+
 2011-04-29  Jer Noble  <jer.noble@apple.com>
 
         Reviewed by Eric Seidel.
index 64c387a..a213c26 100644 (file)
@@ -448,6 +448,8 @@ void WKDidEndScrollGesture(WKScrollbarPainterControllerRef);
 
 bool WKScrollbarPainterUsesOverlayScrollers(void);
 
+bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void);
+
 NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
 void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
 void WKHideWordDefinitionWindow(void);