mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibWeb/CSS: Stop invalidating style when setting an animation's effect
This reverts 6d25bf3aac
Invalidating the style here means that transitions can cause an element
to leave style computation with its "needs style update" flag set to
true. This then causes a VERIFY to fail in the TreeBuilder.
This invalidation does not otherwise seem to have any effect. The
original commit suggests this was to fix a bug, but it's not clear what
bug that was. If it reappears, we can try to solve the issue in a
different way.
This commit is contained in:
parent
63d9ed9d8c
commit
81596b4145
Notes:
github-actions[bot]
2024-10-15 12:44:23 +00:00
Author: https://github.com/AtkinsSJ
Commit: 81596b4145
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1813
4 changed files with 19 additions and 4 deletions
|
@ -0,0 +1 @@
|
|||
PASS (didn't crash)
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<style>
|
||||
.foo {
|
||||
opacity: 0;
|
||||
transition: opacity 200ms;
|
||||
}
|
||||
</style>
|
||||
<ul>
|
||||
<li class="foo"></li>
|
||||
<li></li>
|
||||
</ul>
|
||||
<video src=""></video>
|
||||
<script>
|
||||
test(() => {
|
||||
println("PASS (didn't crash)");
|
||||
});
|
||||
</script>
|
|
@ -11,7 +11,6 @@
|
|||
#include <LibWeb/Bindings/AnimationEffectPrototype.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
namespace Web::Animations {
|
||||
|
@ -205,8 +204,6 @@ WebIDL::ExceptionOr<void> AnimationEffect::update_timing(OptionalEffectTiming ti
|
|||
void AnimationEffect::set_associated_animation(JS::GCPtr<Animation> value)
|
||||
{
|
||||
m_associated_animation = value;
|
||||
if (auto* target = this->target())
|
||||
target->invalidate_style(DOM::StyleInvalidationReason::AnimationEffectSetAssociatedAnimation);
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#animation-direction
|
||||
|
|
|
@ -54,7 +54,6 @@ enum class FragmentSerializationMode {
|
|||
|
||||
#define ENUMERATE_STYLE_INVALIDATION_REASONS(X) \
|
||||
X(AdoptedStyleSheetsList) \
|
||||
X(AnimationEffectSetAssociatedAnimation) \
|
||||
X(CSSFontLoaded) \
|
||||
X(CSSImportRule) \
|
||||
X(DidLoseFocus) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue