New issue
Advanced search Search tips

Issue 640676 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Get rid of SVGAnimateElement::findElementInstances

Project Member Reported by f...@opera.com, Aug 24 2016

Issue description

This function has been a thorn in my eye for a while since it seems a bit backwards from a layering perspective. Instead we should define a simple interface on SVGElement to be able to achieve what this function does. This will also mean that the SMIL engine doesn't need to care about <use> and its consequences.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/451966ed6788fba2dd2526db15f859c7013b6c13

commit 451966ed6788fba2dd2526db15f859c7013b6c13
Author: fs <fs@opera.com>
Date: Thu Aug 25 09:05:08 2016

Refactor SMIL animation value updates

Push updating of the animation value into SVGElement. This resembles the
Web Animations code-path to some degree and maybe we can make them even
more similar eventually. This is the first CL in a series that will
remove knowledge of <use>/shadow trees from the SMIL animation code.

BUG= 640676 

Review-Url: https://codereview.chromium.org/2272033002
Cr-Commit-Position: refs/heads/master@{#414366}

[modify] https://crrev.com/451966ed6788fba2dd2526db15f859c7013b6c13/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp
[modify] https://crrev.com/451966ed6788fba2dd2526db15f859c7013b6c13/third_party/WebKit/Source/core/svg/SVGAnimateElement.h
[modify] https://crrev.com/451966ed6788fba2dd2526db15f859c7013b6c13/third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp
[modify] https://crrev.com/451966ed6788fba2dd2526db15f859c7013b6c13/third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.h
[modify] https://crrev.com/451966ed6788fba2dd2526db15f859c7013b6c13/third_party/WebKit/Source/core/svg/SVGAnimationElement.h
[modify] https://crrev.com/451966ed6788fba2dd2526db15f859c7013b6c13/third_party/WebKit/Source/core/svg/SVGElement.cpp
[modify] https://crrev.com/451966ed6788fba2dd2526db15f859c7013b6c13/third_party/WebKit/Source/core/svg/SVGElement.h

Project Member

Comment 3 by bugdroid1@chromium.org, Aug 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cfa5adc96879fea39db27d190261e82ae3b85624

commit cfa5adc96879fea39db27d190261e82ae3b85624
Author: fs <fs@opera.com>
Date: Fri Aug 26 21:20:39 2016

Fold SMIL animation value application helpers and simplify

Folds the following helper functions:

  applyCSSPropertyToTargetAndInstances
  removeCSSPropertyFromTargetAndInstances
  notifyTargetAndInstancesAboutAnimValChange

into their users, hoisting common predicates and simplifies
accordingly.

BUG= 640676 

Review-Url: https://codereview.chromium.org/2285473002
Cr-Commit-Position: refs/heads/master@{#414808}

[modify] https://crrev.com/cfa5adc96879fea39db27d190261e82ae3b85624/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/abf9460b9549540ba98ae846e12b2fa91133d62e

commit abf9460b9549540ba98ae846e12b2fa91133d62e
Author: fs <fs@opera.com>
Date: Fri Aug 26 22:52:25 2016

Reduce 'iterate self and instances' helper-count in SVGElement.cpp

Generalizing updateInstancesAnimatedAttribute{,NoInvalidate} to one
higher-level helper to get rid of the subtle differences brought on
by the differences in invalidation semantics.

BUG= 640676 

Review-Url: https://codereview.chromium.org/2280923002
Cr-Commit-Position: refs/heads/master@{#414845}

[modify] https://crrev.com/abf9460b9549540ba98ae846e12b2fa91133d62e/third_party/WebKit/Source/core/svg/SVGElement.cpp

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fe3a12df154f8aa3d439f5ed275f0eb85ab2fc9a

commit fe3a12df154f8aa3d439f5ed275f0eb85ab2fc9a
Author: fs <fs@opera.com>
Date: Tue Aug 30 09:20:45 2016

Tighten SVGAnimationElement::shouldApplyAnimation

Fold the targetIsUsable(...) helper from SVGAnimateElement into said
method, and then replace the uses of the former with the corresponding
'should apply' predicate.

BUG= 640676 

Review-Url: https://codereview.chromium.org/2287983002
Cr-Commit-Position: refs/heads/master@{#415253}

[modify] https://crrev.com/fe3a12df154f8aa3d439f5ed275f0eb85ab2fc9a/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp
[modify] https://crrev.com/fe3a12df154f8aa3d439f5ed275f0eb85ab2fc9a/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e7202542f73e6a411d0c1808e2112a150254e3b

commit 2e7202542f73e6a411d0c1808e2112a150254e3b
Author: fs <fs@opera.com>
Date: Tue Aug 30 11:30:49 2016

Simplify SVGAnimatedTypeAnimator interface

The two methods startAnimValAnimation and resetAnimValToBaseVal share
the same implementation, but are called in two different branches of the
same if-statement. Fold the two and add a new method
createAnimatedValue() to provide the animated value, to make this appear
as straight-forward as it is. Also fold the stopAnimValAnimation()
method since it's only used once, and because this makes the start/stop
action somewhat symmetric.
Rename the constructFromString(...) method to
createAnimatedValueFromString() to illustrate its relation to the newly
minted method and make it a bit more clear what it does.

BUG= 640676 

Review-Url: https://codereview.chromium.org/2284263002
Cr-Commit-Position: refs/heads/master@{#415271}

[modify] https://crrev.com/2e7202542f73e6a411d0c1808e2112a150254e3b/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp
[modify] https://crrev.com/2e7202542f73e6a411d0c1808e2112a150254e3b/third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp
[modify] https://crrev.com/2e7202542f73e6a411d0c1808e2112a150254e3b/third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.h

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c0d55affa1f3a57e3d8ec8c0911f56b2bbb54f27

commit c0d55affa1f3a57e3d8ec8c0911f56b2bbb54f27
Author: fs <fs@opera.com>
Date: Tue Aug 30 19:26:26 2016

Don't add redundant references to animated target element

SVGSMILElement adds a reference to its target, and any instances of the
target should never be mutated, so the registration of reference to the
extended target element set in SVGAnimateElement::resetAnimatedType does
not add any value.

BUG= 640676 

Review-Url: https://codereview.chromium.org/2292983002
Cr-Commit-Position: refs/heads/master@{#415393}

[modify] https://crrev.com/c0d55affa1f3a57e3d8ec8c0911f56b2bbb54f27/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp

Project Member

Comment 8 by bugdroid1@chromium.org, Sep 1 2016

Comment 9 by f...@opera.com, Sep 1 2016

Status: Fixed (was: Started)

Sign in to add a comment