Changeset 200347 in webkit


Ignore:
Timestamp:
May 2, 2016 4:47:33 PM (8 years ago)
Author:
Antti Koivisto
Message:

REGRESSION(r199964): Animation on pseudo elements doesn't trigger if first frame matches the current style
https://bugs.webkit.org/show_bug.cgi?id=157284

Reviewed by Simon Fraser.

Source/WebCore:

r199964 accidentally changed the logic for computing style change for animations.

Test: fast/css/animation-pseudo-style-change.html

  • style/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):

If there is an animated style determine the style change using it rather than the originally resolved style.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveElement):

Here too.

LayoutTests:

  • fast/css/animation-pseudo-style-change-expected.html: Added.
  • fast/css/animation-pseudo-style-change.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r200346 r200347  
     12016-05-02  Antti Koivisto  <antti@apple.com>
     2
     3        REGRESSION(r199964): Animation on pseudo elements doesn't trigger if first frame matches the current style
     4        https://bugs.webkit.org/show_bug.cgi?id=157284
     5
     6        Reviewed by Simon Fraser.
     7
     8        * fast/css/animation-pseudo-style-change-expected.html: Added.
     9        * fast/css/animation-pseudo-style-change.html: Added.
     10
    1112016-05-02  Brady Eidson  <beidson@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r200346 r200347  
     12016-05-02  Antti Koivisto  <antti@apple.com>
     2
     3        REGRESSION(r199964): Animation on pseudo elements doesn't trigger if first frame matches the current style
     4        https://bugs.webkit.org/show_bug.cgi?id=157284
     5
     6        Reviewed by Simon Fraser.
     7
     8        r199964 accidentally changed the logic for computing style change for animations.
     9
     10        Test: fast/css/animation-pseudo-style-change.html
     11
     12        * style/RenderTreeUpdater.cpp:
     13        (WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
     14
     15            If there is an animated style determine the style change using it rather than the originally resolved style.
     16
     17        * style/StyleTreeResolver.cpp:
     18        (WebCore::Style::TreeResolver::resolveElement):
     19
     20            Here too.
     21
    1222016-05-02  Brady Eidson  <beidson@apple.com>
    223
  • trunk/Source/WebCore/style/RenderTreeUpdater.cpp

    r200041 r200347  
    489489        elementUpdate.isSynthetic = true;
    490490
    491     elementUpdate.change = renderer ? Style::determineChange(renderer->style(), *newStyle) : Style::Detach;
    492491    elementUpdate.style = animatedStyle ? WTFMove(animatedStyle) : WTFMove(newStyle);
     492    elementUpdate.change = renderer ? Style::determineChange(renderer->style(), *elementUpdate.style) : Style::Detach;
    493493
    494494    if (elementUpdate.change == Style::NoChange)
  • trunk/Source/WebCore/style/StyleTreeResolver.cpp

    r200301 r200347  
    199199        update.isSynthetic = true;
    200200
    201     update.change = needsNewRenderer ? Detach : determineChange(renderer->style(), *newStyle);
    202201    update.style = animatedStyle ? WTFMove(animatedStyle) : WTFMove(newStyle);
     202    update.change = needsNewRenderer ? Detach : determineChange(renderer->style(), *update.style);
    203203
    204204    if (element.styleChangeType() == SyntheticStyleChange)
Note: See TracChangeset for help on using the changeset viewer.