Changeset 134433 in webkit


Ignore:
Timestamp:
Nov 13, 2012 9:53:31 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[CSS Exclusions] Update wrap-margin/padding to shape-margin/padding
https://bugs.webkit.org/show_bug.cgi?id=97736

Patch by Bem Jones-Bey <Bem Jones-Bey> on 2012-11-13
Reviewed by Andreas Kling.

Rename properties to match updated spec.

Source/WebCore:

Tests: fast/exclusions/shape-margin-parsing.html

fast/exclusions/shape-padding-parsing.html

  • css/CSSComputedStyleDeclaration.cpp:

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

  • css/CSSParser.cpp:

(WebCore::isSimpleLengthPropertyID):
(WebCore::CSSParser::parseValue):

  • css/CSSProperty.cpp:

(WebCore::CSSProperty::isInheritedProperty):

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

(WebCore::StyleBuilder::StyleBuilder):

  • css/StylePropertySet.cpp:

(WebCore::StylePropertySet::asText):

  • css/StylePropertyShorthand.cpp:

(WebCore::webkitWrapShorthand):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::applyProperty):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::diff):

  • rendering/style/RenderStyle.h:
  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):

  • rendering/style/StyleRareNonInheritedData.h:

(StyleRareNonInheritedData):

LayoutTests:

  • fast/exclusions/css-exclusions-disabled-expected.txt:
  • fast/exclusions/css-exclusions-disabled.html:
  • fast/exclusions/script-tests/shape-margin-parsing.js: Added.

(test):
(testComputedStyle):
(testNotInherited):

  • fast/exclusions/script-tests/shape-padding-parsing.js: Added.

(test):
(testComputedStyle):
(testNotInherited):

  • fast/exclusions/script-tests/wrap-margin-parsing.js: Removed.
  • fast/exclusions/script-tests/wrap-padding-parsing.js: Removed.
  • fast/exclusions/script-tests/wrap-parsing.js:

(testComputedStyle):

  • fast/exclusions/shape-margin-parsing-expected.txt: Added.
  • fast/exclusions/shape-margin-parsing.html: Renamed from LayoutTests/fast/exclusions/wrap-padding-parsing.html.
  • fast/exclusions/shape-padding-parsing-expected.txt: Added.
  • fast/exclusions/shape-padding-parsing.html: Renamed from LayoutTests/fast/exclusions/wrap-margin-parsing.html.
  • fast/exclusions/wrap-margin-parsing-expected.txt: Removed.
  • fast/exclusions/wrap-padding-parsing-expected.txt: Removed.
Location:
trunk
Files:
4 added
4 deleted
17 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r134432 r134433  
     12012-11-13  Bem Jones-Bey  <bjonesbe@adobe.com>
     2
     3        [CSS Exclusions] Update wrap-margin/padding to shape-margin/padding
     4        https://bugs.webkit.org/show_bug.cgi?id=97736
     5
     6        Reviewed by Andreas Kling.
     7
     8        Rename properties to match updated spec.
     9
     10        * fast/exclusions/css-exclusions-disabled-expected.txt:
     11        * fast/exclusions/css-exclusions-disabled.html:
     12        * fast/exclusions/script-tests/shape-margin-parsing.js: Added.
     13        (test):
     14        (testComputedStyle):
     15        (testNotInherited):
     16        * fast/exclusions/script-tests/shape-padding-parsing.js: Added.
     17        (test):
     18        (testComputedStyle):
     19        (testNotInherited):
     20        * fast/exclusions/script-tests/wrap-margin-parsing.js: Removed.
     21        * fast/exclusions/script-tests/wrap-padding-parsing.js: Removed.
     22        * fast/exclusions/script-tests/wrap-parsing.js:
     23        (testComputedStyle):
     24        * fast/exclusions/shape-margin-parsing-expected.txt: Added.
     25        * fast/exclusions/shape-margin-parsing.html: Renamed from LayoutTests/fast/exclusions/wrap-padding-parsing.html.
     26        * fast/exclusions/shape-padding-parsing-expected.txt: Added.
     27        * fast/exclusions/shape-padding-parsing.html: Renamed from LayoutTests/fast/exclusions/wrap-margin-parsing.html.
     28        * fast/exclusions/wrap-margin-parsing-expected.txt: Removed.
     29        * fast/exclusions/wrap-padding-parsing-expected.txt: Removed.
     30
    1312012-11-13  Dimitri Glazkov  <dglazkov@chromium.org>
    232
  • trunk/LayoutTests/fast/exclusions/css-exclusions-disabled-expected.txt

    r114020 r134433  
    66PASS testInlineStyle("-webkit-wrap-flow", "both") is null
    77PASS testComputedStyle("-webkit-wrap-flow", "both") is "auto"
    8 PASS testInlineStyle("-webkit-wrap-margin", "10px") is null
    9 PASS testComputedStyle("-webkit-wrap-margin", "10px") is "0px"
    10 PASS testInlineStyle("-webkit-wrap-padding", "10px") is null
    11 PASS testComputedStyle("-webkit-wrap-padding", "10px") is "0px"
     8PASS testInlineStyle("-webkit-shape-margin", "10px") is null
     9PASS testComputedStyle("-webkit-shape-margin", "10px") is "0px"
     10PASS testInlineStyle("-webkit-shape-padding", "10px") is null
     11PASS testComputedStyle("-webkit-shape-padding", "10px") is "0px"
    1212PASS testInlineStyle("-webkit-wrap-through", "none") is null
    1313PASS testComputedStyle("-webkit-wrap-through", "none") is "wrap"
  • trunk/LayoutTests/fast/exclusions/css-exclusions-disabled.html

    r127241 r134433  
    3232testStyle("-webkit-wrap-flow", "both", "auto");
    3333
    34 testStyle("-webkit-wrap-margin", "10px", "0px");
    35 testStyle("-webkit-wrap-padding", "10px", "0px");
     34testStyle("-webkit-shape-margin", "10px", "0px");
     35testStyle("-webkit-shape-padding", "10px", "0px");
    3636
    3737testStyle("-webkit-wrap-through", "none", "wrap");
  • trunk/LayoutTests/fast/exclusions/script-tests/wrap-parsing.js

    r127241 r134433  
    1515    div.style.setProperty("-webkit-wrap", value);
    1616    var webkitWrapFlowComputedValue = getComputedStyle(div).getPropertyValue("-webkit-wrap-flow");
    17     var webkitWrapMarginComputedValue = getComputedStyle(div).getPropertyValue("-webkit-wrap-margin");
    18     var webkitWrapPaddingComputedValue = getComputedStyle(div).getPropertyValue("-webkit-wrap-padding");
     17    var webkitShapeMarginComputedValue = getComputedStyle(div).getPropertyValue("-webkit-shape-margin");
     18    var webkitShapePaddingComputedValue = getComputedStyle(div).getPropertyValue("-webkit-shape-padding");
    1919    document.body.removeChild(div);
    20     return webkitWrapFlowComputedValue + " " + webkitWrapMarginComputedValue + " " + webkitWrapPaddingComputedValue;
     20    return webkitWrapFlowComputedValue + " " + webkitShapeMarginComputedValue + " " + webkitShapePaddingComputedValue;
    2121}
    2222
  • trunk/LayoutTests/fast/exclusions/shape-margin-parsing.html

    r134432 r134433  
    55</head>
    66<body>
    7 <script src="script-tests/wrap-margin-parsing.js"></script>
     7<script src="script-tests/shape-margin-parsing.js"></script>
    88<script src="../../fast/js/resources/js-test-post.js"></script>
    99</body>
  • trunk/LayoutTests/fast/exclusions/shape-padding-parsing.html

    r134432 r134433  
    55</head>
    66<body>
    7 <script src="script-tests/wrap-padding-parsing.js"></script>
     7<script src="script-tests/shape-padding-parsing.js"></script>
    88<script src="../../fast/js/resources/js-test-post.js"></script>
    99</body>
  • trunk/Source/WebCore/ChangeLog

    r134432 r134433  
     12012-11-13  Bem Jones-Bey  <bjonesbe@adobe.com>
     2
     3        [CSS Exclusions] Update wrap-margin/padding to shape-margin/padding
     4        https://bugs.webkit.org/show_bug.cgi?id=97736
     5
     6        Reviewed by Andreas Kling.
     7
     8        Rename properties to match updated spec.
     9
     10        Tests: fast/exclusions/shape-margin-parsing.html
     11               fast/exclusions/shape-padding-parsing.html
     12
     13        * css/CSSComputedStyleDeclaration.cpp:
     14        (WebCore):
     15        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
     16        * css/CSSParser.cpp:
     17        (WebCore::isSimpleLengthPropertyID):
     18        (WebCore::CSSParser::parseValue):
     19        * css/CSSProperty.cpp:
     20        (WebCore::CSSProperty::isInheritedProperty):
     21        * css/CSSPropertyNames.in:
     22        * css/StyleBuilder.cpp:
     23        (WebCore::StyleBuilder::StyleBuilder):
     24        * css/StylePropertySet.cpp:
     25        (WebCore::StylePropertySet::asText):
     26        * css/StylePropertyShorthand.cpp:
     27        (WebCore::webkitWrapShorthand):
     28        * css/StyleResolver.cpp:
     29        (WebCore::StyleResolver::applyProperty):
     30        * rendering/style/RenderStyle.cpp:
     31        (WebCore::RenderStyle::diff):
     32        * rendering/style/RenderStyle.h:
     33        * rendering/style/StyleRareNonInheritedData.cpp:
     34        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
     35        (WebCore::StyleRareNonInheritedData::operator==):
     36        * rendering/style/StyleRareNonInheritedData.h:
     37        (StyleRareNonInheritedData):
     38
    1392012-11-13  Dimitri Glazkov  <dglazkov@chromium.org>
    240
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r134190 r134433  
    357357#if ENABLE(CSS_EXCLUSIONS)
    358358    CSSPropertyWebkitWrapFlow,
    359     CSSPropertyWebkitWrapMargin,
    360     CSSPropertyWebkitWrapPadding,
     359    CSSPropertyWebkitShapeMargin,
     360    CSSPropertyWebkitShapePadding,
    361361    CSSPropertyWebkitWrapThrough,
    362362#endif
     
    24992499        case CSSPropertyWebkitWrapFlow:
    25002500            return cssValuePool().createValue(style->wrapFlow());
    2501         case CSSPropertyWebkitWrapMargin:
    2502             return cssValuePool().createValue(style->wrapMargin());
    2503         case CSSPropertyWebkitWrapPadding:
    2504             return cssValuePool().createValue(style->wrapPadding());
     2501        case CSSPropertyWebkitShapeMargin:
     2502            return cssValuePool().createValue(style->shapeMargin());
     2503        case CSSPropertyWebkitShapePadding:
     2504            return cssValuePool().createValue(style->shapePadding());
    25052505        case CSSPropertyWebkitShapeInside:
    25062506            if (!style->shapeInside())
  • trunk/Source/WebCore/css/CSSParser.cpp

    r134190 r134433  
    506506        return true;
    507507#if ENABLE(CSS_EXCLUSIONS)
    508     case CSSPropertyWebkitWrapMargin:
    509     case CSSPropertyWebkitWrapPadding:
     508    case CSSPropertyWebkitShapeMargin:
     509    case CSSPropertyWebkitShapePadding:
    510510        acceptsNegativeNumbers = false;
    511511        return RuntimeEnabledFeatures::cssExclusionsEnabled();
     
    27412741            return parseBasicShape(propId, important);
    27422742        break;
    2743     case CSSPropertyWebkitWrapMargin:
    2744     case CSSPropertyWebkitWrapPadding:
     2743    case CSSPropertyWebkitShapeMargin:
     2744    case CSSPropertyWebkitShapePadding:
    27452745        validPrimitive = (RuntimeEnabledFeatures::cssExclusionsEnabled() && !id && validUnit(value, FLength | FNonNeg));
    27462746        break;
  • trunk/Source/WebCore/css/CSSProperty.cpp

    r134190 r134433  
    653653    case CSSPropertyWebkitWrap:
    654654    case CSSPropertyWebkitWrapFlow:
    655     case CSSPropertyWebkitWrapMargin:
    656     case CSSPropertyWebkitWrapPadding:
     655    case CSSPropertyWebkitShapeMargin:
     656    case CSSPropertyWebkitShapePadding:
    657657    case CSSPropertyWebkitShapeInside:
    658658    case CSSPropertyWebkitShapeOutside:
  • trunk/Source/WebCore/css/CSSPropertyNames.in

    r134190 r134433  
    398398-webkit-shape-inside
    399399-webkit-shape-outside
    400 -webkit-wrap-margin
    401 -webkit-wrap-padding
     400-webkit-shape-margin
     401-webkit-shape-padding
    402402-webkit-wrap-flow
    403403-webkit-wrap-through
  • trunk/Source/WebCore/css/StyleBuilder.cpp

    r134190 r134433  
    20682068
    20692069#if ENABLE(CSS_EXCLUSIONS)
    2070     setPropertyHandler(CSSPropertyWebkitWrap, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitWrapFlow, CSSPropertyWebkitWrapMargin, CSSPropertyWebkitWrapPadding>::createHandler());
     2070    setPropertyHandler(CSSPropertyWebkitWrap, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitWrapFlow, CSSPropertyWebkitShapeMargin, CSSPropertyWebkitShapePadding>::createHandler());
    20712071    setPropertyHandler(CSSPropertyWebkitWrapFlow, ApplyPropertyDefault<WrapFlow, &RenderStyle::wrapFlow, WrapFlow, &RenderStyle::setWrapFlow, WrapFlow, &RenderStyle::initialWrapFlow>::createHandler());
    2072     setPropertyHandler(CSSPropertyWebkitWrapMargin, ApplyPropertyLength<&RenderStyle::wrapMargin, &RenderStyle::setWrapMargin, &RenderStyle::initialWrapMargin>::createHandler());
    2073     setPropertyHandler(CSSPropertyWebkitWrapPadding, ApplyPropertyLength<&RenderStyle::wrapPadding, &RenderStyle::setWrapPadding, &RenderStyle::initialWrapPadding>::createHandler());
     2072    setPropertyHandler(CSSPropertyWebkitShapeMargin, ApplyPropertyLength<&RenderStyle::shapeMargin, &RenderStyle::setShapeMargin, &RenderStyle::initialShapeMargin>::createHandler());
     2073    setPropertyHandler(CSSPropertyWebkitShapePadding, ApplyPropertyLength<&RenderStyle::shapePadding, &RenderStyle::setShapePadding, &RenderStyle::initialShapePadding>::createHandler());
    20742074    setPropertyHandler(CSSPropertyWebkitWrapThrough, ApplyPropertyDefault<WrapThrough, &RenderStyle::wrapThrough, WrapThrough, &RenderStyle::setWrapThrough, WrapThrough, &RenderStyle::initialWrapThrough>::createHandler());
    20752075    setPropertyHandler(CSSPropertyWebkitShapeInside, ApplyPropertyExclusionShape<&RenderStyle::shapeInside, &RenderStyle::setShapeInside, &RenderStyle::initialShapeInside>::createHandler());
  • trunk/Source/WebCore/css/StylePropertySet.cpp

    r134190 r134433  
    814814#if ENABLE(CSS_EXCLUSIONS)
    815815        case CSSPropertyWebkitWrapFlow:
    816         case CSSPropertyWebkitWrapMargin:
    817         case CSSPropertyWebkitWrapPadding:
     816        case CSSPropertyWebkitShapeMargin:
     817        case CSSPropertyWebkitShapePadding:
    818818            shorthandPropertyID = CSSPropertyWebkitWrap;
    819819            break;
  • trunk/Source/WebCore/css/StylePropertyShorthand.cpp

    r127318 r134433  
    442442    static const CSSPropertyID webkitWrapProperties[] = {
    443443        CSSPropertyWebkitWrapFlow,
    444         CSSPropertyWebkitWrapMargin,
    445         CSSPropertyWebkitWrapPadding
     444        CSSPropertyWebkitShapeMargin,
     445        CSSPropertyWebkitShapePadding
    446446    };
    447447    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitWrapLonghands, (webkitWrapProperties, WTF_ARRAY_LENGTH(webkitWrapProperties)));
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r134425 r134433  
    38783878    case CSSPropertyWebkitWrap:
    38793879    case CSSPropertyWebkitWrapFlow:
    3880     case CSSPropertyWebkitWrapMargin:
    3881     case CSSPropertyWebkitWrapPadding:
     3880    case CSSPropertyWebkitShapeMargin:
     3881    case CSSPropertyWebkitShapePadding:
    38823882    case CSSPropertyWebkitWrapThrough:
    38833883    case CSSPropertyWebkitShapeInside:
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r134242 r134433  
    398398        if (rareNonInheritedData->m_wrapFlow != other->rareNonInheritedData->m_wrapFlow
    399399            || rareNonInheritedData->m_wrapThrough != other->rareNonInheritedData->m_wrapThrough
    400             || rareNonInheritedData->m_wrapMargin != other->rareNonInheritedData->m_wrapMargin
    401             || rareNonInheritedData->m_wrapPadding != other->rareNonInheritedData->m_wrapPadding)
     400            || rareNonInheritedData->m_shapeMargin != other->rareNonInheritedData->m_shapeMargin
     401            || rareNonInheritedData->m_shapePadding != other->rareNonInheritedData->m_shapePadding)
    402402            return StyleDifferenceLayout;
    403403
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r134242 r134433  
    14821482    static ClipPathOperation* initialClipPath() { return 0; }
    14831483
    1484     Length wrapPadding() const { return rareNonInheritedData->m_wrapPadding; }
    1485     void setWrapPadding(Length wrapPadding) { SET_VAR(rareNonInheritedData, m_wrapPadding, wrapPadding); }
    1486     static Length initialWrapPadding() { return Length(0, Fixed); }
    1487 
    1488     Length wrapMargin() const { return rareNonInheritedData->m_wrapMargin; }
    1489     void setWrapMargin(Length wrapMargin) { SET_VAR(rareNonInheritedData, m_wrapMargin, wrapMargin); }
    1490     static Length initialWrapMargin() { return Length(0, Fixed); }
     1484    Length shapePadding() const { return rareNonInheritedData->m_shapePadding; }
     1485    void setShapePadding(Length shapePadding) { SET_VAR(rareNonInheritedData, m_shapePadding, shapePadding); }
     1486    static Length initialShapePadding() { return Length(0, Fixed); }
     1487
     1488    Length shapeMargin() const { return rareNonInheritedData->m_shapeMargin; }
     1489    void setShapeMargin(Length shapeMargin) { SET_VAR(rareNonInheritedData, m_shapeMargin, shapeMargin); }
     1490    static Length initialShapeMargin() { return Length(0, Fixed); }
    14911491
    14921492    bool hasContent() const { return contentData(); }
  • trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp

    r134242 r134433  
    5252    , m_shapeInside(RenderStyle::initialShapeInside())
    5353    , m_shapeOutside(RenderStyle::initialShapeOutside())
    54     , m_wrapMargin(RenderStyle::initialWrapMargin())
    55     , m_wrapPadding(RenderStyle::initialWrapPadding())
     54    , m_shapeMargin(RenderStyle::initialShapeMargin())
     55    , m_shapePadding(RenderStyle::initialShapePadding())
    5656    , m_clipPath(RenderStyle::initialClipPath())
    5757    , m_visitedLinkBackgroundColor(RenderStyle::initialBackgroundColor())
     
    126126    , m_shapeInside(o.m_shapeInside)
    127127    , m_shapeOutside(o.m_shapeOutside)
    128     , m_wrapMargin(o.m_wrapMargin)
    129     , m_wrapPadding(o.m_wrapPadding)
     128    , m_shapeMargin(o.m_shapeMargin)
     129    , m_shapePadding(o.m_shapePadding)
    130130    , m_clipPath(o.m_clipPath)
    131131    , m_visitedLinkBackgroundColor(o.m_visitedLinkBackgroundColor)
     
    211211        && m_shapeInside == o.m_shapeInside
    212212        && m_shapeOutside == o.m_shapeOutside
    213         && m_wrapMargin == o.m_wrapMargin
    214         && m_wrapPadding == o.m_wrapPadding
     213        && m_shapeMargin == o.m_shapeMargin
     214        && m_shapePadding == o.m_shapePadding
    215215        && m_clipPath == o.m_clipPath
    216216        && m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor
  • trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h

    r134242 r134433  
    140140    RefPtr<BasicShape> m_shapeInside;
    141141    RefPtr<BasicShape> m_shapeOutside;
    142     Length m_wrapMargin;
    143     Length m_wrapPadding;
     142    Length m_shapeMargin;
     143    Length m_shapePadding;
    144144
    145145    RefPtr<ClipPathOperation> m_clipPath;
Note: See TracChangeset for help on using the changeset viewer.