Changeset 39090 in webkit


Ignore:
Timestamp:
Dec 7, 2008 10:58:57 PM (15 years ago)
Author:
Simon Fraser
Message:

2008-12-07 Simon Fraser <Simon Fraser>

Reviewed by Dan Bernstein

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

Fix issues which break reading inline style for -webkit-transition
and -webkit-transform-origin.

Test: fast/css/transform-inline-style.html

  • css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::getPropertyValue): Add cases for CSSPropertyWebkitTransformOrigin and CSSPropertyWebkitTransition so that these shorthand properties are returned correctly.
  • css/CSSParser.cpp: (WebCore::CSSParser::parseAnimationProperty): Create CSSPrimitiveValues with the correct CSSValueAll and CSSValueNone identifiers, not the RenderStyle-level cAnimateAll, cAnimateNone.
  • css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::mapAnimationProperty): Special-case CSSValueAll and CSSValueNone values to set cAnimateAll and cAnimateNone transition properties.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r39080 r39090  
     12008-12-07  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Reviewed by Dan Bernstein
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=22594
     6       
     7        Testcase for fetching inline style for -webkit-transform-origin
     8        and -webkit-transition.
     9
     10        * fast/css/transform-inline-style-expected.txt: Added.
     11        * fast/css/transform-inline-style.html: Added.
     12
    1132008-12-07  Dirk Schulze  <krit@webkit.org>
    214
  • trunk/WebCore/ChangeLog

    r39088 r39090  
     12008-12-07  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Reviewed by Dan Bernstein
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=22594
     6
     7        Fix issues which break reading inline style for -webkit-transition
     8        and -webkit-transform-origin.
     9       
     10        Test: fast/css/transform-inline-style.html
     11
     12        * css/CSSMutableStyleDeclaration.cpp:
     13        (WebCore::CSSMutableStyleDeclaration::getPropertyValue): Add cases
     14        for CSSPropertyWebkitTransformOrigin and CSSPropertyWebkitTransition
     15        so that these shorthand properties are returned correctly.
     16        * css/CSSParser.cpp:
     17        (WebCore::CSSParser::parseAnimationProperty): Create CSSPrimitiveValues
     18        with the correct CSSValueAll and CSSValueNone identifiers, not the
     19        RenderStyle-level cAnimateAll, cAnimateNone.
     20        * css/CSSStyleSelector.cpp:
     21        (WebCore::CSSStyleSelector::mapAnimationProperty): Special-case CSSValueAll
     22        and CSSValueNone values to set cAnimateAll and cAnimateNone transition properties.
     23
    1242008-12-07  Antti Koivisto  <antti@apple.com>
    225
  • trunk/WebCore/css/CSSMutableStyleDeclaration.cpp

    r39075 r39090  
    216216                                       CSSPropertyWebkitMaskOrigin };
    217217            return getLayeredShorthandValue(properties, 6);
     218        }
     219        case CSSPropertyWebkitTransformOrigin: {
     220            const int properties[2] = { CSSPropertyWebkitTransformOriginX,
     221                                        CSSPropertyWebkitTransformOriginY };
     222            return getShorthandValue(properties, 2);
     223        }
     224        case CSSPropertyWebkitTransition: {
     225            const int properties[4] = { CSSPropertyWebkitTransitionProperty, CSSPropertyWebkitTransitionDuration,
     226                                        CSSPropertyWebkitTransitionTimingFunction, CSSPropertyWebkitTransitionDelay };
     227            return getLayeredShorthandValue(properties, 4);
    218228        }
    219229#if ENABLE(SVG)
  • trunk/WebCore/css/CSSParser.cpp

    r39086 r39090  
    23592359        return CSSPrimitiveValue::createIdentifier(result);
    23602360    if (equalIgnoringCase(value->string, "all"))
    2361         return CSSPrimitiveValue::createIdentifier(cAnimateAll); // FIXME: Why not use CSSValueAll instead?
     2361        return CSSPrimitiveValue::createIdentifier(CSSValueAll);
    23622362    if (equalIgnoringCase(value->string, "none"))
    2363         return CSSPrimitiveValue::createIdentifier(cAnimateNone); // FIXME: Why not use CSSValueNone instead?
     2363        return CSSPrimitiveValue::createIdentifier(CSSValueNone);
    23642364    return 0;
    23652365}
  • trunk/WebCore/css/CSSStyleSelector.cpp

    r39075 r39090  
    53255325
    53265326    CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
    5327     animation->setProperty(static_cast<CSSPropertyID>(primitiveValue->getIdent()));
     5327    if (primitiveValue->getIdent() == CSSValueAll)
     5328        animation->setProperty(cAnimateAll);
     5329    else if (primitiveValue->getIdent() == CSSValueNone)
     5330        animation->setProperty(cAnimateNone);
     5331    else
     5332        animation->setProperty(static_cast<CSSPropertyID>(primitiveValue->getIdent()));
    53285333}
    53295334
Note: See TracChangeset for help on using the changeset viewer.