Changeset 171591 in webkit
- Timestamp:
- Jul 25, 2014 2:52:25 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 1 deleted
- 29 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r171588 r171591 1 2014-07-24 Dirk Schulze <krit@webkit.org> 2 3 Turn x/y to presentation attributes 4 https://bugs.webkit.org/show_bug.cgi?id=135215 5 6 Test parsing of x and y attributes. Rendering and SVG animation 7 covered by existing tests. 8 CSS Transition test, test transition from specified attribute value 9 to new property value. 10 11 Reviewed by Dean Jackson. 12 13 * svg/css/parse-length-expected.txt: Added. 14 * svg/css/parse-length.html: Renamed from LayoutTests/svg/css/parse-width.html. 15 * svg/css/parse-width-expected.txt: Removed. 16 * transitions/svg-layout-transition-expected.txt: Added. 17 * transitions/svg-layout-transition.html: Added. 18 1 19 2014-07-24 Yusuke Suzuki <utatane.tea@gmail.com> 2 20 -
trunk/LayoutTests/svg/css/parse-length.html
r171588 r171591 10 10 <script src="../../resources/js-test-pre.js"></script> 11 11 <script> 12 description("Test that 'wi th' presentation attribute is parsed with CSS presentation rules.");12 description("Test that 'width' presentation attribute is parsed with CSS presentation rules."); 13 13 14 14 function computedStyle(property, value) { … … 29 29 } 30 30 31 // test mask-image 31 function negativeTestZero(property, value) { 32 testComputed(property, value, "0px"); 33 } 34 35 // Test 'width'. 32 36 testComputed("width", "auto", "auto"); 33 37 testComputed("width", " 100", "100px"); … … 41 45 // testComputed("width", "1vw", "14.029999732971191px"); 42 46 43 // negative tests 47 // Test 'x'. 48 testComputed("x", " 100", "100px"); 49 testComputed("x", "100 ", "100px"); 50 testComputed("x", "100px", "100px"); 51 testComputed("x", "1em", "16px"); 52 testComputed("x", "1ex", "12.800000190734863px"); 53 testComputed("x", "20%", "20%"); 54 testComputed("x", "-200px", "-200px"); 55 56 // Test 'y'. 57 testComputed("y", " 100", "100px"); 58 testComputed("y", "100 ", "100px"); 59 testComputed("y", "100px", "100px"); 60 testComputed("y", "1em", "16px"); 61 testComputed("y", "1ex", "12.800000190734863px"); 62 testComputed("y", "20%", "20%"); 63 testComputed("y", "-200px", "-200px"); 64 65 // Negative tests for 'width'. 44 66 negativeTest("width", "100 px"); 45 67 negativeTest("width", "100px;"); … … 48 70 negativeTest("width", "-100px"); 49 71 72 // Negative tests for 'x'. 73 negativeTestZero("x", "auto", "auto"); 74 negativeTestZero("x", "100 px"); 75 negativeTestZero("x", "100px;"); 76 negativeTestZero("x", "100px !important"); 77 negativeTestZero("x", "{ 100px }"); 78 79 // Negative tests for 'y'. 80 negativeTestZero("y", "auto"); 81 negativeTestZero("y", "100 px"); 82 negativeTestZero("y", "100px;"); 83 negativeTestZero("y", "100px !important"); 84 negativeTestZero("y", "{ 100px }"); 50 85 </script> 51 86 <script src="../../resources/js-test-post.js"></script> -
trunk/Source/WebCore/ChangeLog
r171588 r171591 1 2014-07-24 Dirk Schulze <krit@webkit.org> 2 3 Turn x/y to presentation attributes 4 https://bugs.webkit.org/show_bug.cgi?id=135215 5 6 Reviewed by Dean Jackson. 7 8 This follows the patch for width and height presentation attributes and 9 turns x and y to presentation attributes as well: 10 11 http://trac.webkit.org/changeset/171341 12 13 Tests: svg/css/parse-length.html 14 transitions/svg-layout-transition.html 15 16 Added copyright where I forgot it in previous patch. 17 18 * css/CSSComputedStyleDeclaration.cpp: Computed style of x and y. 19 (WebCore::ComputedStyleExtractor::propertyValue): 20 * css/CSSParser.cpp: 21 (WebCore::isSimpleLengthPropertyID): Add x and y to list. 22 * css/DeprecatedStyleBuilder.cpp: 23 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Resolve x and y. 24 * css/SVGCSSParser.cpp: 25 (WebCore::CSSParser::parseSVGValue): Parse x and y property. 26 * css/SVGCSSPropertyNames.in: Add x and y to list of names. 27 * css/StyleResolver.h: 28 * page/animation/CSSPropertyAnimation.cpp: Animate x and y as Length. 29 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): 30 * rendering/style/RenderStyle.h: Add x and y setters and getters. 31 * rendering/style/SVGRenderStyle.cpp: Add x and y setters for StyleLayoutData. 32 (WebCore::SVGRenderStyle::SVGRenderStyle): 33 (WebCore::SVGRenderStyle::operator==): 34 (WebCore::SVGRenderStyle::copyNonInheritedFrom): 35 (WebCore::SVGRenderStyle::diff): 36 * rendering/style/SVGRenderStyle.h: 37 (WebCore::SVGRenderStyle::setX): 38 (WebCore::SVGRenderStyle::setY): 39 (WebCore::SVGRenderStyle::x): 40 (WebCore::SVGRenderStyle::y): 41 * rendering/style/SVGRenderStyleDefs.cpp: Add StyleLayoutData for style storing. 42 (WebCore::StyleLayoutData::StyleLayoutData): 43 (WebCore::StyleLayoutData::copy): 44 (WebCore::StyleLayoutData::operator==): 45 * rendering/style/SVGRenderStyleDefs.h: 46 (WebCore::StyleLayoutData::create): 47 (WebCore::StyleLayoutData::operator!=): 48 * rendering/svg/RenderSVGRect.cpp: 49 (WebCore::RenderSVGRect::updateShapeFromElement): 50 * rendering/svg/SVGPathData.cpp: Use RenderStyle values rather than attribute values. 51 (WebCore::updatePathFromRectElement): 52 * svg/SVGAnimationElement.cpp: 53 (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty): Fix text detection. 54 * svg/SVGElement.cpp: Add x and y to the relevant property lists. 55 (WebCore::populateAttributeNameToCSSPropertyIDMap): 56 (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): 57 * svg/SVGFilterElement.cpp: Style update on change of x and y. 58 (WebCore::SVGFilterElement::svgAttributeChanged): 59 * svg/SVGMaskElement.cpp: Ditto. 60 (WebCore::SVGMaskElement::svgAttributeChanged): 61 * svg/SVGPatternElement.cpp: Ditto. 62 (WebCore::SVGPatternElement::svgAttributeChanged): 63 * svg/SVGRectElement.cpp: Ditto. 64 (WebCore::SVGRectElement::svgAttributeChanged): 65 * svg/SVGTextPositioningElement.cpp: Exclude x and y of text elements since they 66 are lists instead of individual values. Solution about to be discussed 67 in the WG. Keep current behavior for now. 68 (WebCore::SVGTextPositioningElement::collectStyleForPresentationAttribute): 69 (WebCore::SVGTextPositioningElement::isPresentationAttribute): 70 * svg/SVGTextPositioningElement.h: 71 1 72 2014-07-24 Yusuke Suzuki <utatane.tea@gmail.com> 2 73 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r171341 r171591 429 429 CSSPropertyGlyphOrientationVertical, 430 430 CSSPropertyWebkitSvgShadow, 431 CSSPropertyVectorEffect 431 CSSPropertyVectorEffect, 432 CSSPropertyX, 433 CSSPropertyY 432 434 }; 433 435 … … 2898 2900 break; 2899 2901 2902 // New positioning properties for SVG. 2903 case CSSPropertyX: 2904 return zoomAdjustedPixelValueForLength(style->svgStyle().x(), style.get()); 2905 case CSSPropertyY: 2906 return zoomAdjustedPixelValueForLength(style->svgStyle().y(), style.get()); 2907 2900 2908 /* Unimplemented CSS 3 properties (including CSS3 shorthand properties) */ 2901 2909 case CSSPropertyWebkitTextEmphasis: -
trunk/Source/WebCore/css/CSSParser.cpp
r171010 r171591 570 570 case CSSPropertyWebkitMarginEnd: 571 571 case CSSPropertyWebkitMarginStart: 572 case CSSPropertyX: 573 case CSSPropertyY: 572 574 acceptsNegativeNumbers = true; 573 575 return true; -
trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp
r171341 r171591 2594 2594 // UAs must treat 'word-wrap' as an alternate name for the 'overflow-wrap' property. So using the same handlers. 2595 2595 setPropertyHandler(CSSPropertyWordWrap, ApplyPropertyDefault<EOverflowWrap, &RenderStyle::overflowWrap, EOverflowWrap, &RenderStyle::setOverflowWrap, EOverflowWrap, &RenderStyle::initialOverflowWrap>::createHandler()); 2596 2597 setPropertyHandler(CSSPropertyX, ApplyPropertyLength<&RenderStyle::x, &RenderStyle::setX, &RenderStyle::initialZeroLength>::createHandler()); 2598 setPropertyHandler(CSSPropertyY, ApplyPropertyLength<&RenderStyle::y, &RenderStyle::setY, &RenderStyle::initialZeroLength>::createHandler()); 2599 2596 2600 setPropertyHandler(CSSPropertyZIndex, ApplyPropertyAuto<int, &RenderStyle::zIndex, &RenderStyle::setZIndex, &RenderStyle::hasAutoZIndex, &RenderStyle::setHasAutoZIndex>::createHandler()); 2597 2601 setPropertyHandler(CSSPropertyZoom, ApplyPropertyZoom::createHandler()); -
trunk/Source/WebCore/css/SVGCSSParser.cpp
r165676 r171591 300 300 return true; 301 301 } 302 case CSSPropertyX: 303 case CSSPropertyY: 304 valid_primitive = (!id && validUnit(value, FLength | FPercent)); 305 break; 302 306 default: 303 307 // If you crash here, it's because you added a css property and are not handling it -
trunk/Source/WebCore/css/SVGCSSPropertyNames.in
r163440 r171591 52 52 53 53 -webkit-svg-shadow 54 55 x 56 y 57 -
trunk/Source/WebCore/css/StyleResolver.h
r171341 r171591 89 89 class StyleSheetList; 90 90 class StyledElement; 91 class SVGSVGElement; 91 92 class ViewportStyleResolver; 92 93 class WebKitCSSFilterValue; -
trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp
r170774 r171591 1257 1257 new PropertyWrapper<float>(CSSPropertyStrokeMiterlimit, &RenderStyle::strokeMiterLimit, &RenderStyle::setStrokeMiterLimit), 1258 1258 1259 new LengthPropertyWrapper<Length>(CSSPropertyX, &RenderStyle::x, &RenderStyle::setX), 1260 new LengthPropertyWrapper<Length>(CSSPropertyY, &RenderStyle::y, &RenderStyle::setY), 1261 1259 1262 new PropertyWrapper<float>(CSSPropertyFloodOpacity, &RenderStyle::floodOpacity, &RenderStyle::setFloodOpacity), 1260 1263 new PropertyWrapperMaybeInvalidColor(CSSPropertyFloodColor, &RenderStyle::floodColor, &RenderStyle::setFloodColor), -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r171588 r171591 1633 1633 void setStrokeMiterLimit(float f) { accessSVGStyle().setStrokeMiterLimit(f); } 1634 1634 1635 const Length& x() const { return svgStyle().x(); } 1636 void setX(Length x) { accessSVGStyle().setX(x); } 1637 const Length& y() const { return svgStyle().y(); } 1638 void setY(Length y) { accessSVGStyle().setY(y); } 1639 1635 1640 float floodOpacity() const { return svgStyle().floodOpacity(); } 1636 1641 void setFloodOpacity(float f) { accessSVGStyle().setFloodOpacity(f); } … … 1788 1793 static Length initialPadding() { return Length(Fixed); } 1789 1794 static Length initialTextIndent() { return Length(Fixed); } 1795 static Length initialZeroLength() { return Length(Fixed); } 1790 1796 #if ENABLE(CSS3_TEXT) 1791 1797 static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; } -
trunk/Source/WebCore/rendering/style/SVGRenderStyle.cpp
r165676 r171591 57 57 , misc(defaultSVGStyle().misc) 58 58 , shadowSVG(defaultSVGStyle().shadowSVG) 59 , layout(defaultSVGStyle().layout) 59 60 , resources(defaultSVGStyle().resources) 60 61 { … … 70 71 , misc(StyleMiscData::create()) 71 72 , shadowSVG(StyleShadowSVGData::create()) 73 , layout(StyleLayoutData::create()) 72 74 , resources(StyleResourceData::create()) 73 75 { … … 86 88 , misc(other.misc) 87 89 , shadowSVG(other.shadowSVG) 90 , layout(other.layout) 88 91 , resources(other.resources) 89 92 { … … 107 110 && misc == other.misc 108 111 && shadowSVG == other.shadowSVG 112 && layout == other.layout 109 113 && inheritedResources == other.inheritedResources 110 114 && resources == other.resources … … 141 145 misc = other->misc; 142 146 shadowSVG = other->shadowSVG; 147 layout = other->layout; 143 148 resources = other->resources; 144 149 } … … 223 228 if (shadowSVG != other->shadowSVG) 224 229 return StyleDifferenceLayout; 230 231 // The x or y properties require relayout. 232 if (layout != other->layout) 233 return StyleDifferenceLayout; 225 234 226 235 // Some stroke properties, requires relayouts, as the cached stroke boundaries need to be recalculated. -
trunk/Source/WebCore/rendering/style/SVGRenderStyle.h
r170774 r171591 4 4 Copyright (C) 2005, 2006 Apple Inc. 5 5 Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. 6 7 7 8 This library is free software; you can redistribute it and/or … … 146 147 void setMaskType(EMaskType val) { svg_noninherited_flags.f.maskType = val; } 147 148 void setPaintOrder(PaintOrder val) { svg_inherited_flags.paintOrder = val; } 149 void setX(const Length& obj) 150 { 151 if (!(layout->x == obj)) 152 layout.access()->x = obj; 153 } 154 void setY(const Length& obj) 155 { 156 if (!(layout->y == obj)) 157 layout.access()->y = obj; 158 } 148 159 149 160 void setFillOpacity(float obj) … … 343 354 SVGLength baselineShiftValue() const { return misc->baselineShiftValue; } 344 355 ShadowData* shadow() const { return shadowSVG->shadow.get(); } 356 const Length& x() const { return layout->x; } 357 const Length& y() const { return layout->y; } 345 358 String clipperResource() const { return resources->clipper; } 346 359 String filterResource() const { return resources->filter; } … … 441 454 DataRef<StyleMiscData> misc; 442 455 DataRef<StyleShadowSVGData> shadowSVG; 456 DataRef<StyleLayoutData> layout; 443 457 DataRef<StyleResourceData> resources; 444 458 -
trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp
r165676 r171591 3 3 2004, 2005, 2007 Rob Buis <buis@kde.org> 4 4 Copyright (C) Research In Motion Limited 2010. All rights reserved. 5 Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. 5 6 6 7 Based on khtml code by: … … 277 278 } 278 279 279 } 280 StyleLayoutData::StyleLayoutData() 281 : x(RenderStyle::initialZeroLength()) 282 , y(RenderStyle::initialZeroLength()) 283 { 284 } 285 286 inline StyleLayoutData::StyleLayoutData(const StyleLayoutData& other) 287 : RefCounted<StyleLayoutData>() 288 , x(other.x) 289 , y(other.y) 290 { 291 } 292 293 PassRef<StyleLayoutData> StyleLayoutData::copy() const 294 { 295 return adoptRef(*new StyleLayoutData(*this)); 296 } 297 298 bool StyleLayoutData::operator==(const StyleLayoutData& other) const 299 { 300 return x == other.x 301 && y == other.y; 302 } 303 304 } -
trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h
r165676 r171591 3 3 2004, 2005 Rob Buis <buis@kde.org> 4 4 Copyright (C) Research In Motion Limited 2010. All rights reserved. 5 Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. 5 6 6 7 Based on khtml code by: … … 29 30 #define SVGRenderStyleDefs_h 30 31 32 #include "Length.h" 31 33 #include "SVGLength.h" 32 34 #include "SVGPaint.h" … … 289 291 }; 290 292 293 // Positioning and sizing properties. 294 class StyleLayoutData : public RefCounted<StyleLayoutData> { 295 public: 296 static PassRef<StyleLayoutData> create() { return adoptRef(*new StyleLayoutData); } 297 PassRef<StyleLayoutData> copy() const; 298 299 bool operator==(const StyleLayoutData&) const; 300 bool operator!=(const StyleLayoutData& other) const 301 { 302 return !(*this == other); 303 } 304 305 Length x; 306 Length y; 307 308 private: 309 StyleLayoutData(); 310 StyleLayoutData(const StyleLayoutData&); 311 }; 312 291 313 } // namespace WebCore 292 314 -
trunk/Source/WebCore/rendering/svg/RenderSVGRect.cpp
r171341 r171591 74 74 } 75 75 76 m_fillBoundingBox = FloatRect(FloatPoint(rectElement().x().value(lengthContext), rectElement().y().value(lengthContext)), boundingBoxSize); 76 m_fillBoundingBox = FloatRect(FloatPoint(lengthContext.valueForLength(style().svgStyle().x(), LengthModeWidth), 77 lengthContext.valueForLength(style().svgStyle().y(), LengthModeHeight)), 78 boundingBoxSize); 77 79 78 80 // To decide if the stroke contains a point we create two rects which represent the inner and -
trunk/Source/WebCore/rendering/svg/SVGPathData.cpp
r171341 r171591 120 120 if (height <= 0) 121 121 return; 122 float x = rect->x().value(lengthContext);123 float y = rect->y().value(lengthContext);122 float x = lengthContext.valueForLength(style.svgStyle().x(), LengthModeWidth); 123 float y = lengthContext.valueForLength(style.svgStyle().y(), LengthModeHeight); 124 124 float rx = rect->rx().value(lengthContext); 125 125 float ry = rect->ry().value(lengthContext); -
trunk/Source/WebCore/svg/SVGAnimateElement.cpp
r171341 r171591 4 4 * Copyright (C) 2008 Apple Inc. All rights reserved. 5 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 6 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. 6 7 * 7 8 * This library is free software; you can redistribute it and/or -
trunk/Source/WebCore/svg/SVGAnimationElement.cpp
r171341 r171591 6 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 7 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 8 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. 8 9 * 9 10 * This library is free software; you can redistribute it and/or … … 356 357 bool SVGAnimationElement::isTargetAttributeCSSProperty(SVGElement* element, const QualifiedName& attributeName) 357 358 { 358 // FIXME: Must be isSVGTextPositioningElement(element) instead. 359 if (isSVGTextElement(element) 359 if (element->isTextContent() 360 360 && (attributeName == SVGNames::xAttr || attributeName == SVGNames::yAttr)) 361 361 return false; -
trunk/Source/WebCore/svg/SVGElement.cpp
r171341 r171591 145 145 &word_spacingAttr, 146 146 &writing_modeAttr, 147 &xAttr, 148 &yAttr, 147 149 }; 148 150 … … 245 247 { SVGNames::heightAttr, AnimatedLength }, 246 248 { SVGNames::widthAttr, AnimatedLength }, 249 { xAttr, AnimatedLength }, 250 { yAttr, AnimatedLength }, 247 251 }; 248 252 -
trunk/Source/WebCore/svg/SVGFilterElement.cpp
r171341 r171591 5 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 6 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. 7 8 * 8 9 * This library is free software; you can redistribute it and/or … … 169 170 SVGElementInstance::InvalidationGuard invalidationGuard(this); 170 171 171 if (attrName == SVGNames::widthAttr 172 if (attrName == SVGNames::xAttr 173 || attrName == SVGNames::yAttr 174 || attrName == SVGNames::widthAttr 172 175 || attrName == SVGNames::heightAttr) { 173 176 invalidateSVGPresentationAttributeStyle(); 174 177 return; 175 178 } 176 177 if (attrName == SVGNames::xAttr178 || attrName == SVGNames::yAttr)179 updateRelativeLengthsInformation();180 179 181 180 if (RenderObject* object = renderer()) -
trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp
r171341 r171591 2 2 * Copyright (C) 2006 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> 4 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. 4 5 * 5 6 * This library is free software; you can redistribute it and/or -
trunk/Source/WebCore/svg/SVGImageElement.cpp
r171341 r171591 3 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Rob Buis <buis@kde.org> 4 4 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> 5 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. 5 6 * 6 7 * This library is free software; you can redistribute it and/or -
trunk/Source/WebCore/svg/SVGLengthContext.cpp
r171341 r171591 4 4 * Copyright (C) 2007 Apple Inc. All rights reserved. 5 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 6 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. 6 7 * 7 8 * This library is free software; you can redistribute it and/or -
trunk/Source/WebCore/svg/SVGMaskElement.cpp
r171341 r171591 5 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 6 6 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 7 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. 7 8 * 8 9 * This library is free software; you can redistribute it and/or … … 136 137 SVGElementInstance::InvalidationGuard invalidationGuard(this); 137 138 138 if (attrName == SVGNames::widthAttr 139 if (attrName == SVGNames::xAttr 140 || attrName == SVGNames::yAttr 141 || attrName == SVGNames::widthAttr 139 142 || attrName == SVGNames::heightAttr) { 140 143 invalidateSVGPresentationAttributeStyle(); 141 144 return; 142 145 } 143 144 if (attrName == SVGNames::xAttr145 || attrName == SVGNames::yAttr)146 updateRelativeLengthsInformation();147 146 148 147 if (RenderObject* object = renderer()) -
trunk/Source/WebCore/svg/SVGPatternElement.cpp
r171341 r171591 3 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 4 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 5 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. 5 6 * 6 7 * This library is free software; you can redistribute it and/or … … 161 162 SVGElementInstance::InvalidationGuard invalidationGuard(this); 162 163 163 if (attrName == SVGNames::widthAttr 164 if (attrName == SVGNames::xAttr 165 || attrName == SVGNames::yAttr 166 || attrName == SVGNames::widthAttr 164 167 || attrName == SVGNames::heightAttr) { 165 168 invalidateSVGPresentationAttributeStyle(); 166 169 return; 167 170 } 168 169 if (attrName == SVGNames::xAttr170 || attrName == SVGNames::yAttr)171 updateRelativeLengthsInformation();172 171 173 172 if (RenderObject* object = renderer()) -
trunk/Source/WebCore/svg/SVGRectElement.cpp
r171341 r171591 2 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> 3 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 4 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. 4 5 * 5 6 * This library is free software; you can redistribute it and/or … … 122 123 SVGElementInstance::InvalidationGuard invalidationGuard(this); 123 124 124 if (attrName == SVGNames::widthAttr 125 if (attrName == SVGNames::xAttr 126 || attrName == SVGNames::yAttr 127 || attrName == SVGNames::widthAttr 125 128 || attrName == SVGNames::heightAttr) { 126 129 invalidateSVGPresentationAttributeStyle(); … … 128 131 } 129 132 130 bool isLengthAttribute = attrName == SVGNames::xAttr 131 || attrName == SVGNames::yAttr 132 || attrName == SVGNames::rxAttr 133 bool isLengthAttribute = attrName == SVGNames::rxAttr 133 134 || attrName == SVGNames::ryAttr; 134 135 -
trunk/Source/WebCore/svg/SVGSVGElement.cpp
r171341 r171591 3 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> 4 4 * Copyright (C) 2007 Apple Inc. All rights reserved. 5 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. 5 6 * 6 7 * This library is free software; you can redistribute it and/or -
trunk/Source/WebCore/svg/SVGTextPositioningElement.cpp
r168469 r171591 2 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 3 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> 4 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. 4 5 * 5 6 * This library is free software; you can redistribute it and/or … … 118 119 } 119 120 121 void SVGTextPositioningElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStyleProperties& style) 122 { 123 if (name == SVGNames::xAttr || name == SVGNames::yAttr) 124 return; 125 SVGTextContentElement::collectStyleForPresentationAttribute(name, value, style); 126 } 127 128 bool SVGTextPositioningElement::isPresentationAttribute(const QualifiedName& name) const 129 { 130 if (name == SVGNames::xAttr || name == SVGNames::yAttr) 131 return false; 132 return SVGTextContentElement::isPresentationAttribute(name); 133 } 134 120 135 void SVGTextPositioningElement::svgAttributeChanged(const QualifiedName& attrName) 121 136 { -
trunk/Source/WebCore/svg/SVGTextPositioningElement.h
r163440 r171591 35 35 SVGTextPositioningElement(const QualifiedName&, Document&); 36 36 37 virtual bool isPresentationAttribute(const QualifiedName&) const override final; 38 virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) override final; 37 39 bool isSupportedAttribute(const QualifiedName&); 38 40 virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
Note: See TracChangeset
for help on using the changeset viewer.