Skip to content
Permalink
Browse files
2010-03-05 Dean Jackson <dino@apple.com>
        Reviewed by NOBODY (OOPS!).

        https://bugs.webkit.org/show_bug.cgi?id=35815
        Animation Fill Modes fail on Windows

        * css/CSSComputedStyleDeclaration.cpp:
        * css/CSSStyleSelector.cpp:
        * platform/graphics/mac/GraphicsLayerCA.mm:
            - use new enum value
        * platform/animation/Animation.h:
            - change bitfield type
        * rendering/style/RenderStyleConstants.h:
            - add new enum for fill mode

Canonical link: https://commits.webkit.org/46898@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@55601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
grorg committed Mar 6, 2010
1 parent b13f4ff commit bdbb39d13d430f617d4de132e10f4cc1f265f4ab
Showing 11 changed files with 62 additions and 35 deletions.
@@ -1,3 +1,22 @@
2010-03-05 Dean Jackson <dino@apple.com>

Reviewed by Simon Fraser

https://bugs.webkit.org/show_bug.cgi?id=35815
Animation fill mode tests break on Windows

* animations/fill-mode-transform-expected.txt:
* animations/fill-mode-transform.html:
- use the real expected values, rather than
try to get the test to pass on Snow Leopard.
* platform/mac-leopard/Skipped:
- remove the skip entry for the test above
* platform/mac-snowleopard/Skipped:
- skip this test on Snow Leopard while
hardware acceleration gives the wrong
value for computed style.
See bug 35714.

2010-03-05 Simon Fraser <simon.fraser@apple.com>

Reviewed by Darin Adler.
@@ -4,11 +4,9 @@ Backwards
Forwards
Both
Both Iterate
Note that due to Bug 35714 the expected values for the start of the animation on elements "a" and "c" are intentionally incorrect. The expected values should be 100, not 200. If this test fails, then it's likely that bug has been fixed and the expected values here should be updated.

PASS - start of animation - id: a expected: 200 actual: 200
PASS - start of animation - id: a expected: 100 actual: 100
PASS - start of animation - id: b expected: 200 actual: 200
PASS - start of animation - id: c expected: 200 actual: 200
PASS - start of animation - id: c expected: 100 actual: 100
PASS - start of animation - id: d expected: 200 actual: 200
PASS - start of animation - id: e expected: 200 actual: 200
PASS - end of animation - id: a expected: 100 actual: 100
@@ -50,9 +50,9 @@
var animsFinished = 0;
const allowance = 5;
const expectedValues = [
{id: "a", start: 200, end: 100},
{id: "a", start: 100, end: 100},
{id: "b", start: 200, end: 100},
{id: "c", start: 200, end: 300},
{id: "c", start: 100, end: 300},
{id: "d", start: 200, end: 300},
{id: "e", start: 200, end: 200}
];
@@ -127,13 +127,6 @@
<div id="e" class="box">
Both Iterate
</div>
<p>
Note that due to <a href="https://bugs.webkit.org/show_bug.cgi?id=35714">Bug 35714</a>
the expected values for the start of the animation on elements "a" and "c" are
intentionally incorrect. The expected values should be 100, not 200. If this
test fails, then it's likely that bug has been fixed and the expected values here
should be updated.
</p>
<div id="result">
</div>
</body>
@@ -48,8 +48,3 @@ fast/canvas/webgl/texImage2DImageDataTest.html
# Fails on Mac
# https://bugs.webkit.org/show_bug.cgi?id=34331
http/tests/media/video-referer.html

# Thanks to https://bugs.webkit.org/show_bug.cgi?id=35714
# computed style on HW transforms are wrong in SL, but
# correct in Leopard.
animations/fill-mode-transform.html
@@ -103,3 +103,8 @@ media/video-display-aspect-ratio.html
# Flakey on Snow Leopard Debug builds, skip it until it can be made non-flakey:
# https://bugs.webkit.org/show_bug.cgi?id=33543
fast/forms/search-event-delay.html

# Thanks to https://bugs.webkit.org/show_bug.cgi?id=35714
# computed style on HW transforms are wrong in SL, but
# correct on other platforms.
animations/fill-mode-transform.html
@@ -1,3 +1,19 @@
2010-03-05 Dean Jackson <dino@apple.com>

Reviewed by Simon Fraser

https://bugs.webkit.org/show_bug.cgi?id=35815
Animation Fill Modes fail on Windows

* css/CSSComputedStyleDeclaration.cpp:
* css/CSSStyleSelector.cpp:
* platform/graphics/mac/GraphicsLayerCA.mm:
- use new enum value
* platform/animation/Animation.h:
- change bitfield type
* rendering/style/RenderStyleConstants.h:
- add new enum for fill mode

2010-03-05 Csaba Osztrogonác <ossy@webkit.org>

Unreviewed buildfix after r55593. (To fix Qt --minimal build.)
@@ -1205,16 +1205,16 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
if (t) {
for (size_t i = 0; i < t->size(); ++i) {
switch (t->animation(i)->fillMode()) {
case Animation::AnimationFillModeNone:
case AnimationFillModeNone:
list->append(CSSPrimitiveValue::createIdentifier(CSSValueNone));
break;
case Animation::AnimationFillModeForwards:
case AnimationFillModeForwards:
list->append(CSSPrimitiveValue::createIdentifier(CSSValueForwards));
break;
case Animation::AnimationFillModeBackwards:
case AnimationFillModeBackwards:
list->append(CSSPrimitiveValue::createIdentifier(CSSValueBackwards));
break;
case Animation::AnimationFillModeBoth:
case AnimationFillModeBoth:
list->append(CSSPrimitiveValue::createIdentifier(CSSValueBoth));
break;
}
@@ -5663,16 +5663,16 @@ void CSSStyleSelector::mapAnimationFillMode(Animation* layer, CSSValue* value)
CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
switch (primitiveValue->getIdent()) {
case CSSValueNone:
layer->setFillMode(Animation::AnimationFillModeNone);
layer->setFillMode(AnimationFillModeNone);
break;
case CSSValueForwards:
layer->setFillMode(Animation::AnimationFillModeForwards);
layer->setFillMode(AnimationFillModeForwards);
break;
case CSSValueBackwards:
layer->setFillMode(Animation::AnimationFillModeBackwards);
layer->setFillMode(AnimationFillModeBackwards);
break;
case CSSValueBoth:
layer->setFillMode(Animation::AnimationFillModeBoth);
layer->setFillMode(AnimationFillModeBoth);
break;
}
}
@@ -84,8 +84,7 @@ class Animation : public RefCounted<Animation> {
enum AnimationDirection { AnimationDirectionNormal, AnimationDirectionAlternate };
AnimationDirection direction() const { return m_direction; }

enum AnimationFillMode { AnimationFillModeNone, AnimationFillModeForwards, AnimationFillModeBackwards, AnimationFillModeBoth };
AnimationFillMode fillMode() const { return m_fillMode; }
unsigned fillMode() const { return m_fillMode; }

double duration() const { return m_duration; }

@@ -99,7 +98,7 @@ class Animation : public RefCounted<Animation> {
void setDelay(double c) { m_delay = c; m_delaySet = true; }
void setDirection(AnimationDirection d) { m_direction = d; m_directionSet = true; }
void setDuration(double d) { ASSERT(d >= 0); m_duration = d; m_durationSet = true; }
void setFillMode(AnimationFillMode f) { m_fillMode = f; m_fillModeSet = true; }
void setFillMode(unsigned f) { m_fillMode = f; m_fillModeSet = true; }
void setIterationCount(int c) { m_iterationCount = c; m_iterationCountSet = true; }
void setName(const String& n) { m_name = n; m_nameSet = true; }
void setPlayState(unsigned d) { m_playState = d; m_playStateSet = true; }
@@ -131,7 +130,7 @@ class Animation : public RefCounted<Animation> {
double m_duration;
TimingFunction m_timingFunction;
AnimationDirection m_direction : 1;
AnimationFillMode m_fillMode : 2;
unsigned m_fillMode : 2;

unsigned m_playState : 2;

@@ -151,7 +150,7 @@ class Animation : public RefCounted<Animation> {
static float initialAnimationDelay() { return 0; }
static AnimationDirection initialAnimationDirection() { return AnimationDirectionNormal; }
static double initialAnimationDuration() { return 0; }
static AnimationFillMode initialAnimationFillMode() { return AnimationFillModeNone; }
static unsigned initialAnimationFillMode() { return AnimationFillModeNone; }
static int initialAnimationIterationCount() { return 1; }
static String initialAnimationName() { return String("none"); }
static unsigned initialAnimationPlayState() { return AnimPlayStatePlaying; }
@@ -1861,16 +1861,16 @@ static void copyAnimationProperties(CAPropertyAnimation* from, CAPropertyAnimati

NSString* fillMode = 0;
switch (anim->fillMode()) {
case Animation::AnimationFillModeNone:
case AnimationFillModeNone:
fillMode = kCAFillModeRemoved;
break;
case Animation::AnimationFillModeBackwards:
case AnimationFillModeBackwards:
fillMode = kCAFillModeBackwards;
break;
case Animation::AnimationFillModeForwards:
case AnimationFillModeForwards:
fillMode = kCAFillModeForwards;
break;
case Animation::AnimationFillModeBoth:
case AnimationFillModeBoth:
fillMode = kCAFillModeBoth;
break;
}
@@ -293,6 +293,8 @@ enum StyleContentType {

enum EBorderFit { BorderFitBorder, BorderFitLines };

enum EAnimationFillMode { AnimationFillModeNone, AnimationFillModeForwards, AnimationFillModeBackwards, AnimationFillModeBoth };

enum EAnimPlayState {
AnimPlayStatePlaying = 0x0,
AnimPlayStatePaused = 0x1

0 comments on commit bdbb39d

Please sign in to comment.