⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 246170 in webkit


Ignore:
Timestamp:
Jun 6, 2019, 2:56:55 PM (7 years ago)
Author:
Said Abou-Hallawa
Message:

REGRESSION (r243121): Load event should not be fired while animating the 'externalResourcesRequired' attribute
https://bugs.webkit.org/show_bug.cgi?id=198576

Reviewed by Simon Fraser.

Source/WebCore:

Firing the load event should only happen when dynamic update changes the
attribute 'externalResourcesRequired'. Animating this attribute should
not fire the load event.

When stopping the animations, applyAnimatedPropertyChange() should be
called first then stopAnimation() is called second. The target element
should know that its svgAttributeChanged() is called because of animating
the attribute. So it can differentiate this case from the dynamic update.

Test: svg/animations/animate-externalResourcesRequired-no-load-event.html

  • svg/SVGExternalResourcesRequired.cpp:

(WebCore::SVGExternalResourcesRequired::svgAttributeChanged):

  • svg/properties/SVGAnimatedPropertyAnimator.h:

LayoutTests:

  • svg/animations/animate-externalResourcesRequired-no-load-event-expected.txt: Added.
  • svg/animations/animate-externalResourcesRequired-no-load-event.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r246165 r246170  
     12019-06-05  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        REGRESSION (r243121): Load event should not be fired while animating the 'externalResourcesRequired' attribute
     4        https://bugs.webkit.org/show_bug.cgi?id=198576
     5
     6        Reviewed by Simon Fraser.
     7
     8        * svg/animations/animate-externalResourcesRequired-no-load-event-expected.txt: Added.
     9        * svg/animations/animate-externalResourcesRequired-no-load-event.html: Added.
     10
     112019-06-04  Takashi Komori  <Takashi.Komori@sony.com>
    1122019-06-06  Antoine Quint  <graouts@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r246158 r246170  
     12019-06-05  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        REGRESSION (r243121): Load event should not be fired while animating the 'externalResourcesRequired' attribute
     4        https://bugs.webkit.org/show_bug.cgi?id=198576
     5
     6        Reviewed by Simon Fraser.
     7
     8        Firing the load event should only happen when dynamic update changes the
     9        attribute 'externalResourcesRequired'. Animating this attribute should
     10        not fire the load event.
     11
     12        When stopping the animations, applyAnimatedPropertyChange() should be
     13        called first then stopAnimation() is called second. The target element
     14        should know that its svgAttributeChanged() is called because of animating
     15        the attribute. So it can differentiate this case from the dynamic update.
     16
     17        Test: svg/animations/animate-externalResourcesRequired-no-load-event.html
     18
     19        * svg/SVGExternalResourcesRequired.cpp:
     20        (WebCore::SVGExternalResourcesRequired::svgAttributeChanged):
     21        * svg/properties/SVGAnimatedPropertyAnimator.h:
     22
     232019-06-05  Saam Barati  <sbarati@apple.com>
    1242019-06-06  Zalan Bujtas  <zalan@apple.com>
    225
  • trunk/Source/WebCore/svg/SVGExternalResourcesRequired.cpp

    r243333 r246170  
    5656    // causes an immediate dispatch of the SVGLoad event. If the attribute value was 'false' before inserting the script element
    5757    // in the document, the SVGLoad event has already been dispatched.
    58     if (!externalResourcesRequired() && !haveFiredLoadEvent() && !isParserInserted()) {
     58    if (!externalResourcesRequiredAnimated().isAnimating() && !externalResourcesRequired() && !haveFiredLoadEvent() && !isParserInserted()) {
    5959        setHaveFiredLoadEvent(true);
    6060
  • trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAnimator.h

    r243830 r246170  
    8686            return;
    8787
     88        applyAnimatedPropertyChange(targetElement);
     89        if (isAnimatedStylePropertyAniamtor(targetElement))
     90            removeAnimatedStyleProperty(targetElement);
     91
    8892        m_animated->stopAnimation();
    8993        for (auto& instance : m_animatedInstances)
    9094            instance->instanceStopAnimation();
    91 
    92         applyAnimatedPropertyChange(targetElement);
    93         if (isAnimatedStylePropertyAniamtor(targetElement))
    94             removeAnimatedStyleProperty(targetElement);
    9595    }
    9696
Note: See TracChangeset for help on using the changeset viewer.