mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-03 07:36:16 +00:00
Add CPCSSAnimationFeature to CPCompatibility constants
This commit is contained in:
@@ -81,7 +81,7 @@ CPFileAPIFeature = 31;
|
||||
|
||||
CPAltEnterTextAreaFeature = 32;
|
||||
|
||||
|
||||
CPCSSAnimationFeature = 33;
|
||||
|
||||
/*
|
||||
When an absolutely positioned div (CPView) with an absolutely positioned canvas in it (CPView with drawRect:) moves things on top of the canvas (subviews) don't redraw correctly. E.g. if you have a bunch of text fields in a CPBox in a sheet which animates in, some of the text fields might not be visible because the CPBox has a canvas at the bottom and the box moved form offscreen to onscreen. This bug is probably very related: https://bugs.webkit.org/show_bug.cgi?id=67203
|
||||
|
||||
@@ -80,7 +80,7 @@ var DEFAULT_CSS_PROPERTIES = nil,
|
||||
var animation = [_target animationForKey:aKeyPath],
|
||||
context = [CPAnimationContext currentContext];
|
||||
|
||||
if (!animation || ![animation isKindOfClass:[CAAnimation class]] || (![context duration] && ![animation duration]) || ![_CPObjectAnimator supportsCSSAnimations])
|
||||
if (!animation || ![animation isKindOfClass:[CAAnimation class]] || (![context duration] && ![animation duration]) || !CPFeatureIsCompatible(CPCSSAnimationFeature))
|
||||
{
|
||||
if (fallback)
|
||||
fallback();
|
||||
|
||||
@@ -20,12 +20,13 @@ var _supportsCSSAnimations = null;
|
||||
id <CPAnimatablePropertyContainer> _target;
|
||||
}
|
||||
|
||||
+ (BOOL)supportsCSSAnimations
|
||||
+ (BOOL)initialize
|
||||
{
|
||||
if (_supportsCSSAnimations === null)
|
||||
_supportsCSSAnimations = CPBrowserCSSProperty("animation");
|
||||
if ([self class] !== [_CPObjectAnimator class])
|
||||
return;
|
||||
|
||||
return _supportsCSSAnimations;
|
||||
var compat = (CPBrowserCSSProperty("animation") !== nil);
|
||||
CPSetPlatformFeature(CPCSSAnimationFeature, compat);
|
||||
}
|
||||
|
||||
- (id)initWithTarget:(id)aTarget
|
||||
@@ -77,7 +78,7 @@ var _supportsCSSAnimations = null;
|
||||
var animation = [_target animationForKey:aKeyPath],
|
||||
context = [CPAnimationContext currentContext];
|
||||
|
||||
if (!animation || ![animation isKindOfClass:[CAAnimation class]] || (![context duration] && ![animation duration]) || ![_CPObjectAnimator supportsCSSAnimations])
|
||||
if (!animation || ![animation isKindOfClass:[CAAnimation class]] || (![context duration] && ![animation duration]) || !CPFeatureIsCompatible(CPCSSAnimationFeature))
|
||||
[_target setValue:aTargetValue forKey:aKeyPath];
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user