Slotted nodes ignore transition
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Nov 2016 10:59:23 +0000 (10:59 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Nov 2016 10:59:23 +0000 (10:59 +0000)
commite33b1985e0e558497ad028e85847c37d2dcc0710
tree9e415f761ff1355f1eac8d97abb35743470ad910
parent613603f1339c5d9090c30a4809aa94827298ff06
Slotted nodes ignore transition
https://bugs.webkit.org/show_bug.cgi?id=160866
<rdar://problem/29231901>

Reviewed by Sam Weinig.

Source/WebCore:

The problem is that slot (display:contents) always triggers full render tree rebuild when something
changes in the slotted subtree. This causes animation to jump to end (may be another bug).

Test: fast/shadow-dom/shadow-host-transition.html

* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateElementRenderer):
(WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
* style/StyleChange.h:

    Rearrange so the strongest ('Detach') is the highest.

* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

    If style was display:contents and stays that way, use 'Inherit' StyleChange which doesn't force render tree rebuild.
    Refactor more of the functionality to createAnimatedElementUpdate.

* style/StyleTreeResolver.h:

LayoutTests:

* fast/shadow-dom/shadow-host-transition-expected.html: Added.
* fast/shadow-dom/shadow-host-transition.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/shadow-dom/shadow-host-transition-expected.html [new file with mode: 0644]
LayoutTests/fast/shadow-dom/shadow-host-transition.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/style/RenderTreeUpdater.cpp
Source/WebCore/style/StyleChange.h
Source/WebCore/style/StyleTreeResolver.cpp
Source/WebCore/style/StyleTreeResolver.h