This website requires JavaScript.
Explore
Help
Sign In
nephele
/
haikuwebkit
Watch
1
Star
0
Fork
You've already forked haikuwebkit
0
Code
Issues
Releases
Activity
haiku
haikuwebkit
/
LayoutTests
/
webanimations
/
no-css-animation-on-noscrip...
4 lines
66 B
Plaintext
Raw
Permalink
Normal View
History
Unescape
Escape
[Web Animations] Stop creating CSS Animations for <noscript> elements https://bugs.webkit.org/show_bug.cgi?id=205925 <rdar://problem/58158479> Reviewed by Antti Koivisto. Source/WebCore: Test: webanimations/no-css-animation-on-noscript.html It makes no sense to create CSS Animations for a <noscript> element and it has the side effect of potential crashes. Indeed, AnimationTimeline::updateCSSAnimationsForElement() may be called without a currentStyle and so we never have a list of previously-applied animations to compare to the list of animations in afterChangeStyle. So on each call we end up creating a new CSSAnimation and the previous animation for the same name is never explicitly removed from the effect stack and is eventually destroyed and the WeakPtr for it in the stack ends up being null, which would cause a crash under KeyframeEffectStack::ensureEffectsAreSorted(). We now prevent elements such as <noscript> from being considered for CSS Animations in TreeResolver::resolveElement(). * dom/Element.cpp: (WebCore::Element::rendererIsNeeded): * dom/Element.h: (WebCore::Element::rendererIsEverNeeded): * html/HTMLElement.cpp: (WebCore::HTMLElement::rendererIsEverNeeded): (WebCore::HTMLElement::rendererIsNeeded): Deleted. * html/HTMLElement.h: * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::resolveElement): LayoutTests: Add a new test that checks that setting the `animation` property on a <noscript> element does not yield the creation of a CSSAnimation object. * webanimations/no-css-animation-on-noscript-expected.txt: Added. * webanimations/no-css-animation-on-noscript.html: Added. Canonical link: https://commits.webkit.org/219060@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-08 16:30:39 +00:00
Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) https://bugs.webkit.org/show_bug.cgi?id=217016 Reviewed by Zalan Bujtas. Done with this command: find LayoutTests -name '*-expected.txt' | grep -v imported | xargs awk '/^CONSOLE MESSAGE:/ { next }; /^<\?xml/ { nextfile }; { print FILENAME; nextfile }' | xargs perl -i -pe 's/ +$//g' This affects many files, and it's not helpful to clog the change log with a list of them. Canonical link: https://commits.webkit.org/229803@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-27 02:15:19 +00:00
PASS A CSS Animation cannot be created on a <noscript> element.
[Web Animations] Stop creating CSS Animations for <noscript> elements https://bugs.webkit.org/show_bug.cgi?id=205925 <rdar://problem/58158479> Reviewed by Antti Koivisto. Source/WebCore: Test: webanimations/no-css-animation-on-noscript.html It makes no sense to create CSS Animations for a <noscript> element and it has the side effect of potential crashes. Indeed, AnimationTimeline::updateCSSAnimationsForElement() may be called without a currentStyle and so we never have a list of previously-applied animations to compare to the list of animations in afterChangeStyle. So on each call we end up creating a new CSSAnimation and the previous animation for the same name is never explicitly removed from the effect stack and is eventually destroyed and the WeakPtr for it in the stack ends up being null, which would cause a crash under KeyframeEffectStack::ensureEffectsAreSorted(). We now prevent elements such as <noscript> from being considered for CSS Animations in TreeResolver::resolveElement(). * dom/Element.cpp: (WebCore::Element::rendererIsNeeded): * dom/Element.h: (WebCore::Element::rendererIsEverNeeded): * html/HTMLElement.cpp: (WebCore::HTMLElement::rendererIsEverNeeded): (WebCore::HTMLElement::rendererIsNeeded): Deleted. * html/HTMLElement.h: * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::resolveElement): LayoutTests: Add a new test that checks that setting the `animation` property on a <noscript> element does not yield the creation of a CSSAnimation object. * webanimations/no-css-animation-on-noscript-expected.txt: Added. * webanimations/no-css-animation-on-noscript.html: Added. Canonical link: https://commits.webkit.org/219060@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-08 16:30:39 +00:00