Changeset 79856 in webkit
- Timestamp:
- Feb 28, 2011 6:03:06 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r79855 r79856 1 2011-02-28 Renata Hodovan <reni@webkit.org> 2 3 Reviewed by Andreas Kling. 4 5 FECompositeElement changes doesn't require relayout. 6 https://bugs.webkit.org/show_bug.cgi?id=55367 7 8 When the FECompositeElement receives an update message but the given value remains the same we don't need 9 to relayout the filter. 10 11 No new tests are needed because this modification is covered by the dynamic update tests of FEComposite. 12 13 * platform/graphics/filters/FEComposite.cpp: 14 (WebCore::FEComposite::setOperation): 15 (WebCore::FEComposite::setK1): 16 (WebCore::FEComposite::setK2): 17 (WebCore::FEComposite::setK3): 18 (WebCore::FEComposite::setK4): 19 * platform/graphics/filters/FEComposite.h: 20 * svg/SVGFECompositeElement.cpp: 21 (WebCore::SVGFECompositeElement::setFilterEffectAttribute): 22 (WebCore::SVGFECompositeElement::svgAttributeChanged): 23 * svg/SVGFECompositeElement.h: 24 1 25 2011-02-28 Andreas Kling <kling@webkit.org> 2 26 -
trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp
r75377 r79856 56 56 } 57 57 58 void FEComposite::setOperation(CompositeOperationType type) 59 { 58 bool FEComposite::setOperation(CompositeOperationType type) 59 { 60 if (m_type == type) 61 return false; 60 62 m_type = type; 63 return true; 61 64 } 62 65 … … 66 69 } 67 70 68 void FEComposite::setK1(float k1) 69 { 71 bool FEComposite::setK1(float k1) 72 { 73 if (m_k1 == k1) 74 return false; 70 75 m_k1 = k1; 76 return true; 71 77 } 72 78 … … 76 82 } 77 83 78 void FEComposite::setK2(float k2) 79 { 84 bool FEComposite::setK2(float k2) 85 { 86 if (m_k2 == k2) 87 return false; 80 88 m_k2 = k2; 89 return true; 81 90 } 82 91 … … 86 95 } 87 96 88 void FEComposite::setK3(float k3) 89 { 97 bool FEComposite::setK3(float k3) 98 { 99 if (m_k3 == k3) 100 return false; 90 101 m_k3 = k3; 102 return true; 91 103 } 92 104 … … 96 108 } 97 109 98 void FEComposite::setK4(float k4) 99 { 110 bool FEComposite::setK4(float k4) 111 { 112 if (m_k4 == k4) 113 return false; 100 114 m_k4 = k4; 115 return true; 101 116 } 102 117 -
trunk/Source/WebCore/platform/graphics/filters/FEComposite.h
r72474 r79856 46 46 47 47 CompositeOperationType operation() const; 48 voidsetOperation(CompositeOperationType);48 bool setOperation(CompositeOperationType); 49 49 50 50 float k1() const; 51 voidsetK1(float);51 bool setK1(float); 52 52 53 53 float k2() const; 54 voidsetK2(float);54 bool setK2(float); 55 55 56 56 float k3() const; 57 voidsetK3(float);57 bool setK3(float); 58 58 59 59 float k4() const; 60 voidsetK4(float);60 bool setK4(float); 61 61 62 62 virtual void apply(); -
trunk/Source/WebCore/svg/SVGFECompositeElement.cpp
r78345 r79856 83 83 } 84 84 85 bool SVGFECompositeElement::setFilterEffectAttribute(FilterEffect* effect, const QualifiedName& attrName) 86 { 87 FEComposite* composite = static_cast<FEComposite*>(effect); 88 if (attrName == SVGNames::operatorAttr) 89 return composite->setOperation(static_cast<CompositeOperationType>(_operator())); 90 if (attrName == SVGNames::k1Attr) 91 return composite->setK1(k1()); 92 if (attrName == SVGNames::k2Attr) 93 return composite->setK2(k2()); 94 if (attrName == SVGNames::k3Attr) 95 return composite->setK3(k3()); 96 if (attrName == SVGNames::k4Attr) 97 return composite->setK4(k4()); 98 99 ASSERT_NOT_REACHED(); 100 return false; 101 } 102 103 85 104 void SVGFECompositeElement::svgAttributeChanged(const QualifiedName& attrName) 86 105 { 87 106 SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName); 88 107 89 if (attrName == SVGNames::inAttr 90 || attrName == SVGNames::in2Attr 91 || attrName == SVGNames::operatorAttr 108 if (attrName == SVGNames::operatorAttr 92 109 || attrName == SVGNames::k1Attr 93 110 || attrName == SVGNames::k2Attr 94 111 || attrName == SVGNames::k3Attr 95 112 || attrName == SVGNames::k4Attr) 113 primitiveAttributeChanged(attrName); 114 115 if (attrName == SVGNames::inAttr 116 || attrName == SVGNames::in2Attr) 96 117 invalidate(); 97 118 } -
trunk/Source/WebCore/svg/SVGFECompositeElement.h
r78249 r79856 38 38 39 39 virtual void parseMappedAttribute(Attribute*); 40 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&); 40 41 virtual void svgAttributeChanged(const QualifiedName&); 41 42 virtual void synchronizeProperty(const QualifiedName&);
Note: See TracChangeset
for help on using the changeset viewer.