Changeset 47462 in webkit


Ignore:
Timestamp:
Aug 18, 2009 4:36:27 PM (15 years ago)
Author:
Beth Dakin
Message:

WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=27575 [CSS3
Backgrounds and Borders] Drop the prefix from background-size

Reviewed by Dan Bernstein.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

  • css/CSSParser.cpp:

(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFillProperty):
(WebCore::cssPropertyID):

  • css/CSSPropertyNames.in:
  • css/CSSStyleSelector.cpp:

(WebCore::CSSStyleSelector::applyProperty):

  • page/animation/AnimationBase.cpp:

(WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
(WebCore::ensurePropertyMap):

LayoutTests: Test result changes for https://bugs.webkit.org/show_bug.cgi?id=27575
[CSS3 Backgrounds and Borders] Drop the prefix from background-size

Reviewed by Dan Bernstein.

  • platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • svg/css/getComputedStyle-basic-expected.txt:
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r47460 r47462  
     12009-08-18  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Test result changes for https://bugs.webkit.org/show_bug.cgi?id=27575
     6        [CSS3 Backgrounds and Borders] Drop the prefix from background-size
     7
     8        * platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
     9        * platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
     10        * svg/css/getComputedStyle-basic-expected.txt:
     11
    1122009-08-18  Drew Wilson  <atwilson@google.com>
    213
  • trunk/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-expected.txt

    r46547 r47462  
    88background-position: 0% 0%;
    99background-repeat: repeat;
     10background-size: auto auto;
    1011border-bottom-color: rgb(0, 0, 0);
    1112border-bottom-left-radius: 0px;
     
    105106-webkit-background-composite: source-over;
    106107-webkit-background-origin: padding-box;
    107 -webkit-background-size: auto auto;
    108108-webkit-border-fit: border;
    109109-webkit-border-horizontal-spacing: 0px;
  • trunk/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt

    r46547 r47462  
    77    background-position: 0% 0%
    88    background-repeat: repeat
     9    background-size: auto auto
    910    border-bottom-color: rgb(0, 0, 0)
    1011    border-bottom-left-radius: 0px
     
    104105    -webkit-background-composite: source-over
    105106    -webkit-background-origin: padding-box
    106     -webkit-background-size: auto auto
    107107    -webkit-border-fit: border
    108108    -webkit-border-horizontal-spacing: 0px
  • trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt

    r46547 r47462  
    1313rect: style.getPropertyValue(background-repeat) : repeat
    1414rect: style.getPropertyCSSValue(background-repeat) : [object CSSPrimitiveValue]
     15rect: style.getPropertyValue(background-size) : auto auto
     16rect: style.getPropertyCSSValue(background-size) : [object CSSValueList]
    1517rect: style.getPropertyValue(border-bottom-color) : rgb(0, 0, 0)
    1618rect: style.getPropertyCSSValue(border-bottom-color) : [object CSSPrimitiveValue]
     
    207209rect: style.getPropertyValue(-webkit-background-origin) : padding-box
    208210rect: style.getPropertyCSSValue(-webkit-background-origin) : [object CSSPrimitiveValue]
    209 rect: style.getPropertyValue(-webkit-background-size) : auto auto
    210 rect: style.getPropertyCSSValue(-webkit-background-size) : [object CSSValueList]
    211211rect: style.getPropertyValue(-webkit-border-fit) : border
    212212rect: style.getPropertyCSSValue(-webkit-border-fit) : [object CSSPrimitiveValue]
     
    419419g: style.getPropertyValue(background-repeat) : repeat
    420420g: style.getPropertyCSSValue(background-repeat) : [object CSSPrimitiveValue]
     421g: style.getPropertyValue(background-size) : auto auto
     422g: style.getPropertyCSSValue(background-size) : [object CSSValueList]
    421423g: style.getPropertyValue(border-bottom-color) : rgb(0, 0, 0)
    422424g: style.getPropertyCSSValue(border-bottom-color) : [object CSSPrimitiveValue]
     
    613615g: style.getPropertyValue(-webkit-background-origin) : padding-box
    614616g: style.getPropertyCSSValue(-webkit-background-origin) : [object CSSPrimitiveValue]
    615 g: style.getPropertyValue(-webkit-background-size) : auto auto
    616 g: style.getPropertyCSSValue(-webkit-background-size) : [object CSSValueList]
    617617g: style.getPropertyValue(-webkit-border-fit) : border
    618618g: style.getPropertyCSSValue(-webkit-border-fit) : [object CSSPrimitiveValue]
  • trunk/WebCore/ChangeLog

    r47460 r47462  
     12009-08-18  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Fix for https://bugs.webkit.org/show_bug.cgi?id=27575 [CSS3
     6        Backgrounds and Borders] Drop the prefix from background-size
     7
     8        * css/CSSComputedStyleDeclaration.cpp:
     9        (WebCore::):
     10        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
     11        * css/CSSParser.cpp:
     12        (WebCore::CSSParser::parseValue):
     13        (WebCore::CSSParser::parseFillProperty):
     14        (WebCore::cssPropertyID):
     15        * css/CSSPropertyNames.in:
     16        * css/CSSStyleSelector.cpp:
     17        (WebCore::CSSStyleSelector::applyProperty):
     18        * page/animation/AnimationBase.cpp:
     19        (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
     20        (WebCore::ensurePropertyMap):
     21
    1222009-08-18  Drew Wilson  <atwilson@google.com>
    223
  • trunk/WebCore/css/CSSComputedStyleDeclaration.cpp

    r46914 r47462  
    5959    CSSPropertyBackgroundPosition, // more-specific background-position-x/y are non-standard
    6060    CSSPropertyBackgroundRepeat,
     61    CSSPropertyBackgroundSize,
    6162    CSSPropertyBorderBottomColor,
    6263    CSSPropertyBorderBottomLeftRadius,
     
    157158    CSSPropertyWebkitBackgroundComposite,
    158159    CSSPropertyWebkitBackgroundOrigin,
    159     CSSPropertyWebkitBackgroundSize,
    160160    CSSPropertyWebkitBorderFit,
    161161    CSSPropertyWebkitBorderHorizontalSpacing,
     
    650650                return style->backgroundImage()->cssValue();
    651651            return CSSPrimitiveValue::createIdentifier(CSSValueNone);
    652         case CSSPropertyWebkitBackgroundSize: {
     652        case CSSPropertyBackgroundSize: {
    653653            RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
    654654            list->append(CSSPrimitiveValue::create(style->backgroundSize().width()));
  • trunk/WebCore/css/CSSParser.cpp

    r47176 r47462  
    874874    case CSSPropertyBackgroundPositionX:
    875875    case CSSPropertyBackgroundPositionY:
    876     case CSSPropertyWebkitBackgroundSize:
     876    case CSSPropertyBackgroundSize:
    877877    case CSSPropertyBackgroundRepeat:
    878878    case CSSPropertyWebkitMaskAttachment:
     
    15301530        // Position must come before color in this array because a plain old "0" is a legal color
    15311531        // in quirks mode but it's usually the X coordinate of a position.
    1532         // FIXME: Add CSSPropertyWebkitBackgroundSize to the shorthand.
     1532        // FIXME: Add CSSPropertyBackgroundSize to the shorthand.
    15331533        const int properties[] = { CSSPropertyBackgroundImage, CSSPropertyBackgroundRepeat,
    15341534                                   CSSPropertyBackgroundAttachment, CSSPropertyBackgroundPosition, CSSPropertyBackgroundOrigin,
     
    23752375                    }
    23762376                    break;
    2377                 case CSSPropertyWebkitBackgroundSize:
     2377                case CSSPropertyBackgroundSize:
    23782378                case CSSPropertyWebkitMaskSize:
    23792379                    currValue = parseFillSize();
     
    50935093                name = boxShadow;
    50945094                length = strlen(boxShadow);
     5095            } else if (strcmp(buffer, "-webkit-background-size") == 0) {
     5096                // CSS Backgrounds/Borders.  -webkit-background-size worked in Safari 4 and earlier.
     5097                const char* const backgroundSize = "background-size";
     5098                name = backgroundSize;
     5099                length = strlen(backgroundSize);
    50955100            } else if (hasPrefix(buffer + 7, length - 7, "-border-")) {
    50965101                // -webkit-border-*-*-radius worked in Safari 4 and earlier. -webkit-border-radius syntax
  • trunk/WebCore/css/CSSPropertyNames.in

    r46547 r47462  
    1919background-position-y
    2020background-repeat
     21background-size
    2122border
    2223border-bottom
     
    158159-webkit-background-composite
    159160-webkit-background-origin
    160 -webkit-background-size
    161161-webkit-binding
    162162-webkit-border-fit
  • trunk/WebCore/css/CSSStyleSelector.cpp

    r47444 r47462  
    29372937        HANDLE_BACKGROUND_VALUE(repeat, Repeat, value)
    29382938        return;
    2939     case CSSPropertyWebkitBackgroundSize:
     2939    case CSSPropertyBackgroundSize:
    29402940        HANDLE_BACKGROUND_VALUE(size, Size, value)
    29412941        return;
  • trunk/WebCore/page/animation/AnimationBase.cpp

    r47332 r47462  
    460460                m_fillLayerPropertyWrapper = new FillLayerPropertyWrapper<Length>(&FillLayer::yPosition, &FillLayer::setYPosition);
    461461                break;
    462             case CSSPropertyWebkitBackgroundSize:
     462            case CSSPropertyBackgroundSize:
    463463            case CSSPropertyWebkitMaskSize:
    464464                m_fillLayerPropertyWrapper = new FillLayerPropertyWrapper<LengthSize>(&FillLayer::size, &FillLayer::setSize);
     
    584584        gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyBackgroundPositionX, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers));
    585585        gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyBackgroundPositionY, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers));
    586         gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitBackgroundSize, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers));
     586        gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyBackgroundSize, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers));
    587587
    588588        gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitMaskPositionX, &RenderStyle::maskLayers, &RenderStyle::accessMaskLayers));
Note: See TracChangeset for help on using the changeset viewer.