WebKit Bugzilla
Attachment 373365 Details for
Bug 197372
: Assertion fires when animating the 'class' attribute of an SVG element
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197372-20190702153749.patch (text/plain), 22.62 KB, created by
Said Abou-Hallawa
on 2019-07-02 15:37:50 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Said Abou-Hallawa
Created:
2019-07-02 15:37:50 PDT
Size:
22.62 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 247072) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,52 @@ >+2019-07-02 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ Assertion fires when animating the 'class' attribute of an SVG element >+ https://bugs.webkit.org/show_bug.cgi?id=197372 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ All instances of SVG animated properties have to share a single animVal >+ such that once its value is progressed, all the instances will see the >+ change. This was not happening for SVGAnimatedPrimitiveProperty. To do >+ that we need to: >+ >+ -- Introduce the new template class SVGPrimitiveProperty which is derived >+ from SVGProperty. This class will manage a single primitive value. >+ -- Change the type of SVGAnimatedPrimitiveProperty::m_animVal to >+ RefPtr<SVGPrimitiveProperty<PropertyType>>. The master property will >+ create it and all the instances will hold references to the same pointer. >+ -- Change the type of Ref<SVGPrimitiveProperty<PropertyType>> to >+ Ref<SVGPrimitiveProperty<PropertyType>> for simplicity and get rid of >+ SVGAnimatedPrimitiveProperty::m_state. >+ -- Override the virtual methods instanceStartAnimation() and >+ instanceStopAnimation() of SVGAnimatedPrimitiveProperty. >+ -- SVGAnimatedStringAnimator should invalidate the style of the target >+ element if attribute name is 'class' and when its animVal changes. >+ >+ * WebCore.xcodeproj/project.pbxproj: >+ * svg/properties/SVGAnimatedPrimitiveProperty.h: >+ (WebCore::SVGAnimatedPrimitiveProperty::setBaseVal): >+ (WebCore::SVGAnimatedPrimitiveProperty::setBaseValInternal): >+ (WebCore::SVGAnimatedPrimitiveProperty::baseVal const): >+ (WebCore::SVGAnimatedPrimitiveProperty::setAnimVal): >+ (WebCore::SVGAnimatedPrimitiveProperty::animVal const): >+ (WebCore::SVGAnimatedPrimitiveProperty::animVal): >+ (WebCore::SVGAnimatedPrimitiveProperty::currentValue const): >+ (WebCore::SVGAnimatedPrimitiveProperty::SVGAnimatedPrimitiveProperty): >+ (WebCore::SVGAnimatedPrimitiveProperty::ensureAnimVal): >+ * svg/properties/SVGAnimatedPropertyAnimatorImpl.h: >+ * svg/properties/SVGAttributeAnimator.cpp: >+ (WebCore::SVGAttributeAnimator::invalidateStyle): >+ (WebCore::SVGAttributeAnimator::applyAnimatedStylePropertyChange): >+ (WebCore::SVGAttributeAnimator::removeAnimatedStyleProperty): >+ * svg/properties/SVGAttributeAnimator.h: >+ * svg/properties/SVGPrimitiveProperty.h: Added. >+ (WebCore::SVGPrimitiveProperty::create): >+ (WebCore::SVGPrimitiveProperty::value const): >+ (WebCore::SVGPrimitiveProperty::value): >+ (WebCore::SVGPrimitiveProperty::setValue): >+ (WebCore::SVGPrimitiveProperty::SVGPrimitiveProperty): >+ > 2019-07-02 Andres Gonzalez <andresg_22@apple.com> > > Enhance support of aria-haspopup per ARIA 1.1 specification. >Index: Source/WebCore/WebCore.xcodeproj/project.pbxproj >=================================================================== >--- Source/WebCore/WebCore.xcodeproj/project.pbxproj (revision 247009) >+++ Source/WebCore/WebCore.xcodeproj/project.pbxproj (working copy) >@@ -857,7 +857,7 @@ > 2E4346510F546A8200B0F1BA /* WorkerObjectProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E43463F0F546A8200B0F1BA /* WorkerObjectProxy.h */; }; > 2E4346530F546A8200B0F1BA /* WorkerRunLoop.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E4346410F546A8200B0F1BA /* WorkerRunLoop.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 2E4346550F546A8200B0F1BA /* WorkerThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E4346430F546A8200B0F1BA /* WorkerThread.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- 2E75841E12779ADA0062628B /* FileReaderLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E75841B12779ADA0062628B /* FileReaderLoader.h */; settings = {ATTRIBUTES = (Private, ); };}; >+ 2E75841E12779ADA0062628B /* FileReaderLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E75841B12779ADA0062628B /* FileReaderLoader.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 2E75841F12779ADA0062628B /* FileReaderLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E75841C12779ADA0062628B /* FileReaderLoaderClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 2E94F43C119207DA00B7F75D /* JSFileReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E94F43A119207DA00B7F75D /* JSFileReader.h */; }; > 2E9B5D8F1B66A94E008C6A24 /* WheelEventDeltaFilterMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E9B5D8E1B66A94E008C6A24 /* WheelEventDeltaFilterMac.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -8538,6 +8538,7 @@ > 53ED3FDD167A88E7006762E6 /* JSInternalSettingsGenerated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInternalSettingsGenerated.h; sourceTree = "<group>"; }; > 550A0BC7085F6039007353D6 /* QualifiedName.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QualifiedName.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; > 550A0BC8085F6039007353D6 /* QualifiedName.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QualifiedName.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; >+ 550F664522CA89BD000A3417 /* SVGPrimitiveProperty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGPrimitiveProperty.h; sourceTree = "<group>"; }; > 55137B2C20379E550001004B /* SVGMarkerTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMarkerTypes.h; sourceTree = "<group>"; }; > 554675771FD1FC1A003B10B0 /* ImageSource.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ImageSource.cpp; sourceTree = "<group>"; }; > 554675781FD1FC1A003B10B0 /* ImageSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ImageSource.h; sourceTree = "<group>"; }; >@@ -16109,6 +16110,7 @@ > 55EE5354223B29E900FBA944 /* SVGMemberAccessor.h */, > 55BE025A223B29C20032F08A /* SVGPointerMemberAccessor.h */, > 55DCC5252240749E00C26E32 /* SVGPrimitiveList.h */, >+ 550F664522CA89BD000A3417 /* SVGPrimitiveProperty.h */, > 7266F0152241C09800833975 /* SVGPrimitivePropertyAnimator.h */, > 7266F0142241BFB200833975 /* SVGPrimitivePropertyAnimatorImpl.h */, > 55EE5363223B2A2400FBA944 /* SVGProperty.h */, >Index: Source/WebCore/svg/properties/SVGAnimatedPrimitiveProperty.h >=================================================================== >--- Source/WebCore/svg/properties/SVGAnimatedPrimitiveProperty.h (revision 247009) >+++ Source/WebCore/svg/properties/SVGAnimatedPrimitiveProperty.h (working copy) >@@ -26,7 +26,7 @@ > #pragma once > > #include "SVGAnimatedProperty.h" >-#include "SVGProperty.h" >+#include "SVGPrimitiveProperty.h" > > namespace WebCore { > >@@ -48,95 +48,112 @@ public: > // Used by the DOM. > ExceptionOr<void> setBaseVal(const PropertyType& baseVal) > { >- m_baseVal = baseVal; >+ m_baseVal->setValue(baseVal); > commitPropertyChange(nullptr); > return { }; > } > > // Used by SVGElement::parseAttribute(). >- void setBaseValInternal(const PropertyType& baseVal) { m_baseVal = baseVal; } >- const PropertyType& baseVal() const { return m_baseVal; } >+ void setBaseValInternal(const PropertyType& baseVal) { m_baseVal->setValue(baseVal); } >+ const PropertyType& baseVal() const { return m_baseVal->value(); } > > // Used by SVGAttributeAnimator::progress. > void setAnimVal(const PropertyType& animVal) > { >- ASSERT(isAnimating()); >- m_animVal = animVal; >+ ASSERT(isAnimating() && m_animVal); >+ m_animVal->setValue(animVal); > } > > const PropertyType& animVal() const > { > ASSERT_IMPLIES(isAnimating(), m_animVal); >- return isAnimating() ? *m_animVal : m_baseVal; >+ return isAnimating() ? m_animVal->value() : m_baseVal->value(); > } > > PropertyType& animVal() > { > ASSERT_IMPLIES(isAnimating(), m_animVal); >- return isAnimating() ? *m_animVal : m_baseVal; >+ return isAnimating() ? m_animVal->value() : m_baseVal->value(); > } > > // Used when committing a change from the SVGAnimatedProperty to the attribute. >- String baseValAsString() const override { return SVGPropertyTraits<PropertyType>::toString(m_baseVal); } >+ String baseValAsString() const override { return m_baseVal->valueAsString(); } > > // Used to apply the SVGAttributeAnimator change to the target element. > String animValAsString() const override > { >- ASSERT(isAnimating() && !!m_animVal); >- return SVGPropertyTraits<PropertyType>::toString(*m_animVal); >+ ASSERT(isAnimating() && m_animVal); >+ return m_animVal->valueAsString(); > } > > // Managing the relationship with the owner. >- void setDirty() override { m_state = SVGPropertyState::Dirty; } >- bool isDirty() const override { return m_state == SVGPropertyState::Dirty; } >- Optional<String> synchronize() override >- { >- if (m_state == SVGPropertyState::Clean) >- return WTF::nullopt; >- m_state = SVGPropertyState::Clean; >- return baseValAsString(); >- } >+ void setDirty() override { m_baseVal->setDirty(); } >+ bool isDirty() const override { return m_baseVal->isDirty(); } >+ Optional<String> synchronize() override { return m_baseVal->synchronize(); } > > // Used by RenderSVGElements and DumpRenderTree. > const PropertyType& currentValue() const > { > ASSERT_IMPLIES(isAnimating(), m_animVal); >- return isAnimating() ? *m_animVal : m_baseVal; >+ return isAnimating() ? m_animVal->value() : m_baseVal->value(); > } > > // Controlling the animation. > void startAnimation() override > { >- if (isAnimating()) >- return; >- m_animVal = m_baseVal; >+ if (m_animVal) >+ m_animVal->setValue(m_baseVal->value()); >+ else >+ ensureAnimVal(); > SVGAnimatedProperty::startAnimation(); > } > > void stopAnimation() override > { >+ if (m_animVal) >+ m_animVal->setValue(m_baseVal->value()); >+ SVGAnimatedProperty::stopAnimation(); >+ } >+ >+ // Controlling the instance animation. >+ void instanceStartAnimation(SVGAnimatedProperty& animated) override >+ { >+ if (isAnimating()) >+ return; >+ m_animVal = static_cast<SVGAnimatedPrimitiveProperty&>(animated).m_animVal; >+ SVGAnimatedProperty::instanceStartAnimation(animated); >+ } >+ >+ void instanceStopAnimation() override >+ { > if (!isAnimating()) > return; >- m_animVal = WTF::nullopt; >- SVGAnimatedProperty::stopAnimation(); >+ m_animVal = nullptr; >+ SVGAnimatedProperty::instanceStopAnimation(); > } > > protected: > SVGAnimatedPrimitiveProperty(SVGElement* contextElement) > : SVGAnimatedProperty(contextElement) >- , m_baseVal(SVGPropertyTraits<PropertyType>::initialValue()) >+ , m_baseVal(SVGPrimitiveProperty<PropertyType>::create()) > { > } > > SVGAnimatedPrimitiveProperty(SVGElement* contextElement, const PropertyType& value) > : SVGAnimatedProperty(contextElement) >- , m_baseVal(value) >+ , m_baseVal(SVGPrimitiveProperty<PropertyType>::create(value)) >+ { >+ } >+ >+ RefPtr<SVGPrimitiveProperty<PropertyType>>& ensureAnimVal() > { >+ if (!m_animVal) >+ m_animVal = SVGPrimitiveProperty<PropertyType>::create(m_baseVal->value()); >+ return m_animVal; > } > >- PropertyType m_baseVal; >- mutable Optional<PropertyType> m_animVal; >- SVGPropertyState m_state { SVGPropertyState::Clean }; >+ Ref<SVGPrimitiveProperty<PropertyType>> m_baseVal; >+ mutable RefPtr<SVGPrimitiveProperty<PropertyType>> m_animVal; > }; > > } >Index: Source/WebCore/svg/properties/SVGAnimatedPropertyAnimatorImpl.h >=================================================================== >--- Source/WebCore/svg/properties/SVGAnimatedPropertyAnimatorImpl.h (revision 247009) >+++ Source/WebCore/svg/properties/SVGAnimatedPropertyAnimatorImpl.h (working copy) >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "HTMLNames.h" > #include "SVGAnimatedPropertyAnimator.h" > #include "SVGAnimatedPropertyImpl.h" > #include "SVGAnimationAdditiveListFunctionImpl.h" >@@ -301,11 +302,33 @@ public: > } > > private: >+ bool isAnimatedStyleClassAniamtor() const >+ { >+ return m_attributeName.matches(HTMLNames::classAttr); >+ } >+ > void animate(SVGElement* targetElement, float progress, unsigned repeatCount) final > { > String& animated = m_animated->animVal(); > m_function.animate(targetElement, progress, repeatCount, animated); > } >+ >+ void apply(SVGElement* targetElement) final >+ { >+ Base::apply(targetElement); >+ if (isAnimatedStyleClassAniamtor()) >+ invalidateStyle(targetElement); >+ } >+ >+ void stop(SVGElement* targetElement) final >+ { >+ if (!m_animated->isAnimating()) >+ return; >+ >+ Base::stop(targetElement); >+ if (isAnimatedStyleClassAniamtor()) >+ invalidateStyle(targetElement); >+ } > }; > > class SVGAnimatedTransformListAnimator final : public SVGAnimatedPropertyAnimator<SVGAnimatedTransformList, SVGAnimationTransformListFunction> { >Index: Source/WebCore/svg/properties/SVGAttributeAnimator.cpp >=================================================================== >--- Source/WebCore/svg/properties/SVGAttributeAnimator.cpp (revision 247009) >+++ Source/WebCore/svg/properties/SVGAttributeAnimator.cpp (working copy) >@@ -37,10 +37,17 @@ bool SVGAttributeAnimator::isAnimatedSty > return targetElement->isAnimatedStyleAttribute(m_attributeName); > } > >+void SVGAttributeAnimator::invalidateStyle(SVGElement* targetElement) >+{ >+ SVGElement::InstanceInvalidationGuard guard(*targetElement); >+ targetElement->invalidateSVGPresentationAttributeStyle(); >+} >+ > void SVGAttributeAnimator::applyAnimatedStylePropertyChange(SVGElement* element, CSSPropertyID id, const String& value) > { > ASSERT(element); > ASSERT(!element->m_deletionHasBegun); >+ ASSERT(id != CSSPropertyInvalid); > > if (!element->ensureAnimatedSMILStyleProperties().setProperty(id, value, false)) > return; >@@ -70,6 +77,7 @@ void SVGAttributeAnimator::removeAnimate > { > ASSERT(element); > ASSERT(!element->m_deletionHasBegun); >+ ASSERT(id != CSSPropertyInvalid); > > element->ensureAnimatedSMILStyleProperties().removeProperty(id); > element->invalidateStyle(); >Index: Source/WebCore/svg/properties/SVGAttributeAnimator.h >=================================================================== >--- Source/WebCore/svg/properties/SVGAttributeAnimator.h (revision 247009) >+++ Source/WebCore/svg/properties/SVGAttributeAnimator.h (working copy) >@@ -76,6 +76,7 @@ public: > protected: > bool isAnimatedStylePropertyAniamtor(const SVGElement*) const; > >+ static void invalidateStyle(SVGElement*); > static void applyAnimatedStylePropertyChange(SVGElement*, CSSPropertyID, const String& value); > static void removeAnimatedStyleProperty(SVGElement*, CSSPropertyID); > static void applyAnimatedPropertyChange(SVGElement*, const QualifiedName&); >Index: Source/WebCore/svg/properties/SVGPrimitiveProperty.h >=================================================================== >--- Source/WebCore/svg/properties/SVGPrimitiveProperty.h (nonexistent) >+++ Source/WebCore/svg/properties/SVGPrimitiveProperty.h (working copy) >@@ -0,0 +1,61 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "SVGProperty.h" >+ >+namespace WebCore { >+ >+template<typename PropertyType> >+class SVGPrimitiveProperty : public SVGProperty { >+public: >+ using ValueType = PropertyType; >+ >+ static Ref<SVGPrimitiveProperty> create(const PropertyType& value = SVGPropertyTraits<PropertyType>::initialValue()) >+ { >+ return adoptRef(*new SVGPrimitiveProperty(value)); >+ } >+ >+ // Getter/Setter for the value. >+ const PropertyType& value() const { return m_value; } >+ PropertyType& value() { return m_value; } >+ void setValue(const PropertyType& value) { m_value = value; } >+ >+ String valueAsString() const override >+ { >+ return SVGPropertyTraits<PropertyType>::toString(m_value); >+ } >+ >+private: >+ SVGPrimitiveProperty(const PropertyType& value) >+ : m_value(value) >+ { >+ } >+ >+ PropertyType m_value; >+}; >+ >+} >Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 247009) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,17 @@ >+2019-07-02 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ Assertion fires when animating the 'class' attribute of an SVG element >+ https://bugs.webkit.org/show_bug.cgi?id=197372 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * svg/animations/animated-bool-externalResourcesRequired-instances-expected.svg: Added. >+ * svg/animations/animated-bool-externalResourcesRequired-instances.svg: Added. >+ * svg/animations/animated-string-class-instances-expected.svg: Added. >+ * svg/animations/animated-string-class-instances.svg: Added. >+ * svg/animations/animated-string-href-expected.svg: Added. >+ * svg/animations/animated-string-href.svg: Added. >+ > 2019-06-30 Fujii Hironori <Hironori.Fujii@sony.com> > > Unreviewed, rolling out r246959. >Index: LayoutTests/svg/animations/animated-bool-externalResourcesRequired-instances-expected.svg >=================================================================== >--- LayoutTests/svg/animations/animated-bool-externalResourcesRequired-instances-expected.svg (nonexistent) >+++ LayoutTests/svg/animations/animated-bool-externalResourcesRequired-instances-expected.svg (working copy) >@@ -0,0 +1,3 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+ <rect width="100" height="100" fill="green"/> >+</svg> >Index: LayoutTests/svg/animations/animated-bool-externalResourcesRequired-instances.svg >=================================================================== >--- LayoutTests/svg/animations/animated-bool-externalResourcesRequired-instances.svg (nonexistent) >+++ LayoutTests/svg/animations/animated-bool-externalResourcesRequired-instances.svg (working copy) >@@ -0,0 +1,9 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+ <desc>Test that the instance of the 'externalResourcesRequired' attribute is animated correctly.</desc> >+ <def> >+ <rect id="rect" width="100" height="100" fill="green"> >+ <set attributeName="externalResourcesRequired" to="true"/> >+ </rect> >+ </def> >+ <use href="#rect"/> >+</svg> >Index: LayoutTests/svg/animations/animated-string-class-instances-expected.svg >=================================================================== >--- LayoutTests/svg/animations/animated-string-class-instances-expected.svg (nonexistent) >+++ LayoutTests/svg/animations/animated-string-class-instances-expected.svg (working copy) >@@ -0,0 +1,3 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+ <rect width="100" height="100" fill="green"/> >+</svg> >\ No newline at end of file >Index: LayoutTests/svg/animations/animated-string-class-instances.svg >=================================================================== >--- LayoutTests/svg/animations/animated-string-class-instances.svg (nonexistent) >+++ LayoutTests/svg/animations/animated-string-class-instances.svg (working copy) >@@ -0,0 +1,17 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+ <desc>Test that the instance of the 'class' attribute is animated and its renderer is invalidated correctly.</desc> >+ <style> >+ .red-fill { >+ fill: red; >+ } >+ .green-fill { >+ fill: green; >+ } >+ </style> >+ <def> >+ <rect id="rect" width="100" height="100" class="red-fill"> >+ <set id="green" attributeName="class" to="green-fill" fill="freeze"/> >+ </rect> >+ </def> >+ <use href="#rect"/> >+</svg> >Index: LayoutTests/svg/animations/animated-string-href-expected.svg >=================================================================== >--- LayoutTests/svg/animations/animated-string-href-expected.svg (nonexistent) >+++ LayoutTests/svg/animations/animated-string-href-expected.svg (working copy) >@@ -0,0 +1,3 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+ <rect width="100" height="100" fill="green"/> >+</svg> >Index: LayoutTests/svg/animations/animated-string-href.svg >=================================================================== >--- LayoutTests/svg/animations/animated-string-href.svg (nonexistent) >+++ LayoutTests/svg/animations/animated-string-href.svg (working copy) >@@ -0,0 +1,17 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+ <desc>Test that the 'href' attribute is animated correctly.</desc> >+ <defs> >+ <linearGradient id="red-fill"> >+ <stop offset="0%" stop-color="red" /> >+ <stop offset="100%" stop-color="red" /> >+ </linearGradient> >+ <linearGradient id="green-fill"> >+ <stop offset="0%" stop-color="green" /> >+ <stop offset="100%" stop-color="green" /> >+ </linearGradient> >+ <linearGradient id="gradient" href="#red-fill"> >+ <set attributeName="href" to="#green-fill" fill="freeze"/> >+ </linearGradient> >+ </defs> >+ <rect id="rect" width="100" height="100" fill="url('#gradient')"/> >+</svg> >\ No newline at end of file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197372
:
368462
|
368463
|
371199
|
373269
|
373365
|
373371
|
373373