Changeset 172642 in webkit


Ignore:
Timestamp:
Aug 15, 2014 12:42:38 PM (10 years ago)
Author:
krit@webkit.org
Message:

Turn r/rx/ry to presentation attributes
https://bugs.webkit.org/show_bug.cgi?id=135978

Patch by Dirk Schulze <krit@webkit.org> on 2014-08-15
Reviewed by Dean Jackson.

This follows the patch for width and height presentation attributes and
Source/WebCore:

turns rx, ry and r to presentation attributes as well:

http://trac.webkit.org/changeset/171341

Extended existing tests.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::propertyValue):

  • css/CSSParser.cpp:

(WebCore::isSimpleLengthPropertyID):

  • css/DeprecatedStyleBuilder.cpp:

(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):

  • css/SVGCSSParser.cpp:

(WebCore::CSSParser::parseSVGValue):

  • css/SVGCSSPropertyNames.in:
  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • rendering/style/RenderStyle.h:
  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::setR):
(WebCore::SVGRenderStyle::setRx):
(WebCore::SVGRenderStyle::setRy):
(WebCore::SVGRenderStyle::r):
(WebCore::SVGRenderStyle::rx):
(WebCore::SVGRenderStyle::ry):

  • rendering/style/SVGRenderStyleDefs.cpp:

(WebCore::StyleLayoutData::StyleLayoutData):
(WebCore::StyleLayoutData::operator==):

  • rendering/style/SVGRenderStyleDefs.h:
  • rendering/svg/RenderSVGEllipse.cpp:

(WebCore::RenderSVGEllipse::calculateRadiiAndCenter):

  • rendering/svg/SVGPathData.cpp:

(WebCore::updatePathFromCircleElement):
(WebCore::updatePathFromEllipseElement):
(WebCore::updatePathFromRectElement):
(WebCore::updatePathFromLineElement): Deleted.

  • svg/SVGCircleElement.cpp:

(WebCore::SVGCircleElement::svgAttributeChanged):

  • svg/SVGElement.cpp:

(WebCore::populateAttributeNameToCSSPropertyIDMap):
(WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):

  • svg/SVGEllipseElement.cpp:

(WebCore::SVGEllipseElement::svgAttributeChanged):

  • svg/SVGRectElement.cpp:

(WebCore::SVGRectElement::svgAttributeChanged):

LayoutTests:

turns r, rx and ry to presentation attributes as well:

http://trac.webkit.org/changeset/171341

  • svg/css/parse-length.html:
  • transitions/svg-layout-transition-expected.txt:
  • transitions/svg-layout-transition.html:
Location:
trunk
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r172641 r172642  
     12014-08-15  Dirk Schulze  <krit@webkit.org>
     2
     3        Turn r/rx/ry to presentation attributes
     4        https://bugs.webkit.org/show_bug.cgi?id=135978
     5
     6        Reviewed by Dean Jackson.
     7
     8        This follows the patch for width and height presentation attributes and
     9        turns r, rx and ry to presentation attributes as well:
     10
     11        ​http://trac.webkit.org/changeset/171341
     12
     13        * svg/css/parse-length.html:
     14        * transitions/svg-layout-transition-expected.txt:
     15        * transitions/svg-layout-transition.html:
     16
    1172014-08-15  Dirk Schulze  <krit@webkit.org>
    218
  • trunk/LayoutTests/svg/css/parse-length.html

    r172641 r172642  
    5151testComputed("cy", "-200px", "-200px");
    5252
     53// Test 'r'.
     54testComputed("r", "  100", "100px");
     55testComputed("r", "100   ", "100px");
     56testComputed("r", "100px", "100px");
     57testComputed("r", "1em", "16px");
     58testComputed("r", "1ex", "12.800000190734863px");
     59testComputed("r", "20%", "20%");
     60testComputed("r", "-200px", "-200px");
     61
     62// Test 'rx'.
     63testComputed("rx", "  100", "100px");
     64testComputed("rx", "100   ", "100px");
     65testComputed("rx", "100px", "100px");
     66testComputed("rx", "1em", "16px");
     67testComputed("rx", "1ex", "12.800000190734863px");
     68testComputed("rx", "20%", "20%");
     69testComputed("rx", "-200px", "-200px");
     70
     71// Test 'ry'.
     72testComputed("ry", "  100", "100px");
     73testComputed("ry", "100   ", "100px");
     74testComputed("ry", "100px", "100px");
     75testComputed("ry", "1em", "16px");
     76testComputed("ry", "1ex", "12.800000190734863px");
     77testComputed("ry", "20%", "20%");
     78testComputed("ry", "-200px", "-200px");
     79
    5380// Test 'width'.
    5481testComputed("width", "auto", "auto");
     
    95122negativeTestZero("cy", "{ 100px }");
    96123
     124// Negative tests for 'r'.
     125negativeTestZero("r", "auto", "auto");
     126negativeTestZero("r", "100   px");
     127negativeTestZero("r", "100px;");
     128negativeTestZero("r", "100px !important");
     129negativeTestZero("r", "{ 100px }");
     130
     131// Negative tests for 'rx'.
     132negativeTestZero("rx", "auto", "auto");
     133negativeTestZero("rx", "100   px");
     134negativeTestZero("rx", "100px;");
     135negativeTestZero("rx", "100px !important");
     136negativeTestZero("rx", "{ 100px }");
     137
     138// Negative tests for 'ry'.
     139negativeTestZero("ry", "auto");
     140negativeTestZero("ry", "100   px");
     141negativeTestZero("ry", "100px;");
     142negativeTestZero("ry", "100px !important");
     143negativeTestZero("ry", "{ 100px }");
     144
    97145// Negative tests for 'width'.
    98146negativeTest("width", "100   px");
  • trunk/LayoutTests/transitions/svg-layout-transition-expected.txt

    r172641 r172642  
    11PASS - "cx" property for "cx" element at 0.5s saw something close to: 150
    22PASS - "cy" property for "cy" element at 0.5s saw something close to: 150
     3PASS - "r" property for "r" element at 0.5s saw something close to: 150
     4PASS - "rx" property for "rx" element at 0.5s saw something close to: 150
     5PASS - "ry" property for "ry" element at 0.5s saw something close to: 150
    36PASS - "x" property for "x" element at 0.5s saw something close to: 150
    47PASS - "y" property for "y" element at 0.5s saw something close to: 150
  • trunk/LayoutTests/transitions/svg-layout-transition.html

    r172641 r172642  
    2222      cy: 200px;
    2323    }
    24    
     24
     25    #r {
     26      -webkit-transition-property: r;
     27    }
     28    #r.final {
     29      r: 200px;
     30    }
     31
     32    #rx {
     33      -webkit-transition-property: rx;
     34    }
     35    #rx.final {
     36      rx: 200px;
     37    }
     38
     39    #ry {
     40      -webkit-transition-property: ry;
     41    }
     42    #ry.final {
     43      ry: 200px;
     44    }
     45
    2546    #x {
    2647      -webkit-transition-property: x;
     
    5980      [0.5, 'cx', 'cx', 150, 20],
    6081      [0.5, 'cy', 'cy', 150, 20],
     82      [0.5, 'r', 'r', 150, 20],
     83      [0.5, 'rx', 'rx', 150, 20],
     84      [0.5, 'ry', 'ry', 150, 20],
    6185      [0.5, 'x', 'x', 150, 20],
    6286      [0.5, 'y', 'y', 150, 20],
     
    6993      document.getElementById('cx').setAttribute('class', 'init final');
    7094      document.getElementById('cy').setAttribute('class', 'init final');
     95      document.getElementById('r').setAttribute('class', 'init final');
     96      document.getElementById('rx').setAttribute('class', 'init final');
     97      document.getElementById('ry').setAttribute('class', 'init final');
    7198      document.getElementById('x').setAttribute('class', 'init final');
    7299      document.getElementById('y').setAttribute('class', 'init final');
     
    82109    <circle cx="100" cy="100" r="100" class="init" id="cx"/>
    83110    <circle cx="100" cy="100" r="100" class="init" id="cy"/>
     111    <circle cx="100" cy="100" r="100" class="init" id="r"/>
     112    <ellipse cx="100" cy="100" rx="100" ry="100" class="init" id="rx"/>
     113    <ellipse cx="100" cy="100" rx="100" ry="100" class="init" id="ry"/>
    84114    <rect x="100" y="100" width="100" height="100" class="init" id="x"/>
    85115    <rect x="100" y="100" width="100" height="100" class="init" id="y"/>
  • trunk/Source/WebCore/ChangeLog

    r172641 r172642  
     12014-08-15  Dirk Schulze  <krit@webkit.org>
     2
     3        Turn r/rx/ry to presentation attributes
     4        https://bugs.webkit.org/show_bug.cgi?id=135978
     5
     6        Reviewed by Dean Jackson.
     7
     8        This follows the patch for width and height presentation attributes and
     9        turns rx, ry and r to presentation attributes as well:
     10
     11        ​http://trac.webkit.org/changeset/171341
     12
     13        Extended existing tests.
     14
     15        * css/CSSComputedStyleDeclaration.cpp:
     16        (WebCore::ComputedStyleExtractor::propertyValue):
     17        * css/CSSParser.cpp:
     18        (WebCore::isSimpleLengthPropertyID):
     19        * css/DeprecatedStyleBuilder.cpp:
     20        (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
     21        * css/SVGCSSParser.cpp:
     22        (WebCore::CSSParser::parseSVGValue):
     23        * css/SVGCSSPropertyNames.in:
     24        * page/animation/CSSPropertyAnimation.cpp:
     25        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
     26        * rendering/style/RenderStyle.h:
     27        * rendering/style/SVGRenderStyle.h:
     28        (WebCore::SVGRenderStyle::setR):
     29        (WebCore::SVGRenderStyle::setRx):
     30        (WebCore::SVGRenderStyle::setRy):
     31        (WebCore::SVGRenderStyle::r):
     32        (WebCore::SVGRenderStyle::rx):
     33        (WebCore::SVGRenderStyle::ry):
     34        * rendering/style/SVGRenderStyleDefs.cpp:
     35        (WebCore::StyleLayoutData::StyleLayoutData):
     36        (WebCore::StyleLayoutData::operator==):
     37        * rendering/style/SVGRenderStyleDefs.h:
     38        * rendering/svg/RenderSVGEllipse.cpp:
     39        (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
     40        * rendering/svg/SVGPathData.cpp:
     41        (WebCore::updatePathFromCircleElement):
     42        (WebCore::updatePathFromEllipseElement):
     43        (WebCore::updatePathFromRectElement):
     44        (WebCore::updatePathFromLineElement): Deleted.
     45        * svg/SVGCircleElement.cpp:
     46        (WebCore::SVGCircleElement::svgAttributeChanged):
     47        * svg/SVGElement.cpp:
     48        (WebCore::populateAttributeNameToCSSPropertyIDMap):
     49        (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
     50        * svg/SVGEllipseElement.cpp:
     51        (WebCore::SVGEllipseElement::svgAttributeChanged):
     52        * svg/SVGRectElement.cpp:
     53        (WebCore::SVGRectElement::svgAttributeChanged):
     54
    1552014-08-15  Dirk Schulze  <krit@webkit.org>
    256
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r172641 r172642  
    425425    CSSPropertyMaskType,
    426426    CSSPropertyPaintOrder,
     427    CSSPropertyR,
     428    CSSPropertyRx,
     429    CSSPropertyRy,
    427430    CSSPropertyShapeRendering,
    428431    CSSPropertyStroke,
     
    29732976        case CSSPropertyCy:
    29742977            return zoomAdjustedPixelValueForLength(style->svgStyle().cy(), style.get());
     2978        case CSSPropertyR:
     2979            return zoomAdjustedPixelValueForLength(style->svgStyle().r(), style.get());
     2980        case CSSPropertyRx:
     2981            return zoomAdjustedPixelValueForLength(style->svgStyle().rx(), style.get());
     2982        case CSSPropertyRy:
     2983            return zoomAdjustedPixelValueForLength(style->svgStyle().ry(), style.get());
    29752984        case CSSPropertyX:
    29762985            return zoomAdjustedPixelValueForLength(style->svgStyle().x(), style.get());
  • trunk/Source/WebCore/css/CSSParser.cpp

    r172641 r172642  
    570570    case CSSPropertyMarginRight:
    571571    case CSSPropertyMarginTop:
     572    case CSSPropertyR:
     573    case CSSPropertyRx:
     574    case CSSPropertyRy:
    572575    case CSSPropertyRight:
    573576    case CSSPropertyTop:
  • trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp

    r172641 r172642  
    25972597    setPropertyHandler(CSSPropertyCx, ApplyPropertyLength<&RenderStyle::cx, &RenderStyle::setCx, &RenderStyle::initialZeroLength>::createHandler());
    25982598    setPropertyHandler(CSSPropertyCy, ApplyPropertyLength<&RenderStyle::cy, &RenderStyle::setCy, &RenderStyle::initialZeroLength>::createHandler());
     2599    setPropertyHandler(CSSPropertyR, ApplyPropertyLength<&RenderStyle::r, &RenderStyle::setR, &RenderStyle::initialZeroLength>::createHandler());
     2600    setPropertyHandler(CSSPropertyRx, ApplyPropertyLength<&RenderStyle::rx, &RenderStyle::setRx, &RenderStyle::initialZeroLength>::createHandler());
     2601    setPropertyHandler(CSSPropertyRy, ApplyPropertyLength<&RenderStyle::ry, &RenderStyle::setRy, &RenderStyle::initialZeroLength>::createHandler());
    25992602    setPropertyHandler(CSSPropertyX, ApplyPropertyLength<&RenderStyle::x, &RenderStyle::setX, &RenderStyle::initialZeroLength>::createHandler());
    26002603    setPropertyHandler(CSSPropertyY, ApplyPropertyLength<&RenderStyle::y, &RenderStyle::setY, &RenderStyle::initialZeroLength>::createHandler());
  • trunk/Source/WebCore/css/SVGCSSParser.cpp

    r172641 r172642  
    302302    case CSSPropertyCx:
    303303    case CSSPropertyCy:
     304    case CSSPropertyR:
     305    case CSSPropertyRx:
     306    case CSSPropertyRy:
    304307    case CSSPropertyX:
    305308    case CSSPropertyY:
  • trunk/Source/WebCore/css/SVGCSSPropertyNames.in

    r172641 r172642  
    5555cx
    5656cy
     57r
     58rx
     59ry
    5760x
    5861y
  • trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp

    r172641 r172642  
    12591259        new LengthPropertyWrapper<Length>(CSSPropertyCx, &RenderStyle::cx, &RenderStyle::setCx),
    12601260        new LengthPropertyWrapper<Length>(CSSPropertyCy, &RenderStyle::cy, &RenderStyle::setCy),
     1261        new LengthPropertyWrapper<Length>(CSSPropertyR, &RenderStyle::r, &RenderStyle::setR),
     1262        new LengthPropertyWrapper<Length>(CSSPropertyRx, &RenderStyle::rx, &RenderStyle::setRx),
     1263        new LengthPropertyWrapper<Length>(CSSPropertyRy, &RenderStyle::ry, &RenderStyle::setRy),
    12611264        new LengthPropertyWrapper<Length>(CSSPropertyX, &RenderStyle::x, &RenderStyle::setX),
    12621265        new LengthPropertyWrapper<Length>(CSSPropertyY, &RenderStyle::y, &RenderStyle::setY),
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r172641 r172642  
    16701670    const Length& cy() const { return svgStyle().cy(); }
    16711671    void setCy(Length cy) { accessSVGStyle().setCy(cy); }
     1672    const Length& r() const { return svgStyle().r(); }
     1673    void setR(Length r) { accessSVGStyle().setR(r); }
     1674    const Length& rx() const { return svgStyle().rx(); }
     1675    void setRx(Length rx) { accessSVGStyle().setRx(rx); }
     1676    const Length& ry() const { return svgStyle().ry(); }
     1677    void setRy(Length ry) { accessSVGStyle().setRy(ry); }
    16721678    const Length& x() const { return svgStyle().x(); }
    16731679    void setX(Length x) { accessSVGStyle().setX(x); }
  • trunk/Source/WebCore/rendering/style/SVGRenderStyle.h

    r172641 r172642  
    157157            layout.access()->cy = obj;
    158158    }
     159    void setR(const Length& obj)
     160    {
     161        if (!(layout->r == obj))
     162            layout.access()->r = obj;
     163    }
     164    void setRx(const Length& obj)
     165    {
     166        if (!(layout->rx == obj))
     167            layout.access()->rx = obj;
     168    }
     169    void setRy(const Length& obj)
     170    {
     171        if (!(layout->ry == obj))
     172            layout.access()->ry = obj;
     173    }
    159174    void setX(const Length& obj)
    160175    {
     
    366381    const Length& cx() const { return layout->cx; }
    367382    const Length& cy() const { return layout->cy; }
     383    const Length& r() const { return layout->r; }
     384    const Length& rx() const { return layout->rx; }
     385    const Length& ry() const { return layout->ry; }
    368386    const Length& x() const { return layout->x; }
    369387    const Length& y() const { return layout->y; }
  • trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp

    r172641 r172642  
    281281    : cx(RenderStyle::initialZeroLength())
    282282    , cy(RenderStyle::initialZeroLength())
     283    , r(RenderStyle::initialZeroLength())
     284    , rx(RenderStyle::initialZeroLength())
     285    , ry(RenderStyle::initialZeroLength())
    283286    , x(RenderStyle::initialZeroLength())
    284287    , y(RenderStyle::initialZeroLength())
     
    290293    , cx(other.cx)
    291294    , cy(other.cy)
     295    , r(other.r)
     296    , rx(other.rx)
     297    , ry(other.ry)
    292298    , x(other.x)
    293299    , y(other.y)
     
    304310    return cx == other.cx
    305311        && cy == other.cy
     312        && r == other.r
     313        && rx == other.rx
     314        && ry == other.ry
    306315        && x == other.x
    307316        && y == other.y;
  • trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h

    r172641 r172642  
    305305        Length cx;
    306306        Length cy;
     307        Length r;
     308        Length rx;
     309        Length ry;
    307310        Length x;
    308311        Length y;
  • trunk/Source/WebCore/rendering/svg/RenderSVGEllipse.cpp

    r172641 r172642  
    8383        lengthContext.valueForLength(style().svgStyle().cy(), LengthModeHeight));
    8484    if (isSVGCircleElement(graphicsElement())) {
    85         SVGCircleElement& circle = toSVGCircleElement(graphicsElement());
    86         SVGLengthContext lengthContext(&circle);
    87         float radius = circle.r().value(lengthContext);
     85        float radius = lengthContext.valueForLength(style().svgStyle().r());
    8886        m_radii = FloatSize(radius, radius);
    8987        return;
     
    9189
    9290    ASSERT(isSVGEllipseElement(graphicsElement()));
    93     SVGEllipseElement& ellipse = toSVGEllipseElement(graphicsElement());
    94     m_radii = FloatSize(ellipse.rx().value(lengthContext), ellipse.ry().value(lengthContext));
     91    m_radii = FloatSize(lengthContext.valueForLength(style().svgStyle().rx()), lengthContext.valueForLength(style().svgStyle().ry()));
    9592}
    9693
  • trunk/Source/WebCore/rendering/svg/SVGPathData.cpp

    r172641 r172642  
    4141{
    4242    ASSERT(isSVGCircleElement(element));
    43     SVGCircleElement* circle = toSVGCircleElement(element);
    4443
    4544    SVGLengthContext lengthContext(element);
    46     float r = circle->r().value(lengthContext);
     45    RenderElement* renderer = element->renderer();
     46    if (!renderer)
     47        return;
     48    RenderStyle& style = renderer->style();
     49    float r = lengthContext.valueForLength(style.svgStyle().r());
    4750    if (r > 0) {
    48         RenderElement* renderer = circle->renderer();
    49         if (!renderer)
    50             return;
    51         RenderStyle& style = renderer->style();
    5251        float cx = lengthContext.valueForLength(style.svgStyle().cx(), LengthModeWidth);
    5352        float cy = lengthContext.valueForLength(style.svgStyle().cy(), LengthModeHeight);
     
    5857static void updatePathFromEllipseElement(SVGElement* element, Path& path)
    5958{
    60     SVGEllipseElement* ellipse = toSVGEllipseElement(element);
    61 
    62     SVGLengthContext lengthContext(element);
    63     float rx = ellipse->rx().value(lengthContext);
    64     if (rx <= 0)
    65         return;
    66     float ry = ellipse->ry().value(lengthContext);
    67     if (ry <= 0)
    68         return;
    69     RenderElement* renderer = ellipse->renderer();
     59    RenderElement* renderer = element->renderer();
    7060    if (!renderer)
    7161        return;
    7262    RenderStyle& style = renderer->style();
     63    SVGLengthContext lengthContext(element);
     64    float rx = lengthContext.valueForLength(style.svgStyle().rx(), LengthModeWidth);
     65    if (rx <= 0)
     66        return;
     67    float ry = lengthContext.valueForLength(style.svgStyle().ry(), LengthModeHeight);
     68    if (ry <= 0)
     69        return;
    7370    float cx = lengthContext.valueForLength(style.svgStyle().cx(), LengthModeWidth);
    7471    float cy = lengthContext.valueForLength(style.svgStyle().cy(), LengthModeHeight);
     
    120117static void updatePathFromRectElement(SVGElement* element, Path& path)
    121118{
    122     SVGRectElement* rect = toSVGRectElement(element);
    123     RenderElement* renderer = rect->renderer();
     119    RenderElement* renderer = element->renderer();
    124120    if (!renderer)
    125121        return;
     
    135131    float x = lengthContext.valueForLength(style.svgStyle().x(), LengthModeWidth);
    136132    float y = lengthContext.valueForLength(style.svgStyle().y(), LengthModeHeight);
    137     float rx = rect->rx().value(lengthContext);
    138     float ry = rect->ry().value(lengthContext);
     133    float rx = lengthContext.valueForLength(style.svgStyle().rx(), LengthModeWidth);
     134    float ry = lengthContext.valueForLength(style.svgStyle().ry(), LengthModeHeight);
    139135    bool hasRx = rx > 0;
    140136    bool hasRy = ry > 0;
  • trunk/Source/WebCore/svg/SVGCircleElement.cpp

    r172641 r172642  
    108108
    109109    if (attrName == SVGNames::cxAttr
    110         || attrName == SVGNames::cyAttr) {
     110        || attrName == SVGNames::cyAttr
     111        || attrName == SVGNames::rAttr) {
    111112        invalidateSVGPresentationAttributeStyle();
    112113        return;
    113114    }
    114115
    115     if (attrName == SVGNames::rAttr)
    116         updateRelativeLengthsInformation();
    117 
    118116    RenderSVGShape* renderer = toRenderSVGShape(this->renderer());
    119117    if (!renderer)
    120118        return;
    121 
    122     if (attrName == SVGNames::rAttr) {
    123         renderer->setNeedsShapeUpdate();
    124         RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
    125         return;
    126     }
    127119
    128120    if (SVGLangSpace::isKnownAttribute(attrName) || SVGExternalResourcesRequired::isKnownAttribute(attrName)) {
  • trunk/Source/WebCore/svg/SVGElement.cpp

    r172641 r172642  
    127127        &paint_orderAttr,
    128128        &pointer_eventsAttr,
     129        &rAttr,
     130        &rxAttr,
     131        &ryAttr,
    129132        &shape_renderingAttr,
    130133        &stop_colorAttr,
     
    249252        { cxAttr, AnimatedLength },
    250253        { cyAttr, AnimatedLength },
     254        { rAttr, AnimatedLength },
     255        { rxAttr, AnimatedLength },
     256        { ryAttr, AnimatedLength },
    251257        { SVGNames::heightAttr, AnimatedLength },
    252258        { SVGNames::widthAttr, AnimatedLength },
  • trunk/Source/WebCore/svg/SVGEllipseElement.cpp

    r172641 r172642  
    112112
    113113    if (attrName == SVGNames::cxAttr
    114         || attrName == SVGNames::cyAttr) {
     114        || attrName == SVGNames::cyAttr
     115        || attrName == SVGNames::rxAttr
     116        || attrName == SVGNames::ryAttr) {
    115117        invalidateSVGPresentationAttributeStyle();
    116118        return;
    117119    }
    118120
    119     bool isLengthAttribute = attrName == SVGNames::rxAttr
    120                           || attrName == SVGNames::ryAttr;
    121 
    122     if (isLengthAttribute)
    123         updateRelativeLengthsInformation();
    124 
    125121    RenderSVGShape* renderer = toRenderSVGShape(this->renderer());
    126122    if (!renderer)
    127123        return;
    128 
    129     if (isLengthAttribute) {
    130         renderer->setNeedsShapeUpdate();
    131         RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
    132         return;
    133     }
    134124
    135125    if (SVGLangSpace::isKnownAttribute(attrName) || SVGExternalResourcesRequired::isKnownAttribute(attrName)) {
  • trunk/Source/WebCore/svg/SVGRectElement.cpp

    r171591 r172642  
    126126        || attrName == SVGNames::yAttr
    127127        || attrName == SVGNames::widthAttr
    128         || attrName == SVGNames::heightAttr) {
     128        || attrName == SVGNames::heightAttr
     129        || attrName == SVGNames::rxAttr
     130        || attrName == SVGNames::ryAttr) {
    129131        invalidateSVGPresentationAttributeStyle();
    130132        return;
    131133    }
    132134
    133     bool isLengthAttribute = attrName == SVGNames::rxAttr
    134                           || attrName == SVGNames::ryAttr;
    135 
    136     if (isLengthAttribute)
    137         updateRelativeLengthsInformation();
    138 
    139135    RenderSVGShape* renderer = toRenderSVGShape(this->renderer());
    140136    if (!renderer)
    141137        return;
    142 
    143     if (isLengthAttribute) {
    144         renderer->setNeedsShapeUpdate();
    145         RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
    146         return;
    147     }
    148138
    149139    if (SVGLangSpace::isKnownAttribute(attrName) || SVGExternalResourcesRequired::isKnownAttribute(attrName)) {
Note: See TracChangeset for help on using the changeset viewer.