Log Message
Revert "Cherry-pick r275277. rdar://problem/76375504"
This reverts commit r276080.
Modified Paths
- branches/safari-611-branch/LayoutTests/ChangeLog
- branches/safari-611-branch/Source/WebCore/ChangeLog
- branches/safari-611-branch/Source/WebCore/style/StyleTreeResolver.cpp
- branches/safari-611-branch/Source/WebCore/style/StyleTreeResolver.h
Removed Paths
Diff
Modified: branches/safari-611-branch/LayoutTests/ChangeLog (276122 => 276123)
--- branches/safari-611-branch/LayoutTests/ChangeLog 2021-04-16 07:48:52 UTC (rev 276122)
+++ branches/safari-611-branch/LayoutTests/ChangeLog 2021-04-16 08:31:44 UTC (rev 276123)
@@ -63,51 +63,6 @@
2021-04-15 Russell Epstein <[email protected]>
- Cherry-pick r275277. rdar://problem/76375504
-
- Animated pseudo element style resolved against wrong parent style
- https://bugs.webkit.org/show_bug.cgi?id=223990
- rdar://74997361
-
- Reviewed by Antoine Quint.
- Source/WebCore:
-
- In createAnimatedElementUpdate we get the parent and parent box styles from the parent stack.
- This is wrong for pseudo elements. Their parent style should the host style which is not pushed to the stack.
-
- This matters in style adjuster which may apply wrong adjustments as a result.
-
- Test: fast/animation/pseudo-element-style-adjuster.html
-
- * style/StyleTreeResolver.cpp:
- (WebCore::Style::TreeResolver::resolveElement):
- (WebCore::Style::TreeResolver::resolvePseudoStyle):
- (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
-
- Make static and provide the parent and parent box styles as parameters.
-
- * style/StyleTreeResolver.h:
-
- LayoutTests:
-
- * fast/animation/pseudo-element-style-adjuster-expected.html: Added.
- * fast/animation/pseudo-element-style-adjuster.html: Added.
-
- git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 2021-03-31 Antti Koivisto <[email protected]>
-
- Animated pseudo element style resolved against wrong parent style
- https://bugs.webkit.org/show_bug.cgi?id=223990
- rdar://74997361
-
- Reviewed by Antoine Quint.
-
- * fast/animation/pseudo-element-style-adjuster-expected.html: Added.
- * fast/animation/pseudo-element-style-adjuster.html: Added.
-
-2021-04-15 Russell Epstein <[email protected]>
-
Cherry-pick r272928. rdar://problem/76416505
EventHandler::updateSelectionForMouseDownDispatchingSelectStart should not use an orphaned selection
Deleted: branches/safari-611-branch/LayoutTests/fast/animation/pseudo-element-style-adjuster-expected.html (276122 => 276123)
--- branches/safari-611-branch/LayoutTests/fast/animation/pseudo-element-style-adjuster-expected.html 2021-04-16 07:48:52 UTC (rev 276122)
+++ branches/safari-611-branch/LayoutTests/fast/animation/pseudo-element-style-adjuster-expected.html 2021-04-16 08:31:44 UTC (rev 276123)
@@ -1,8 +0,0 @@
-<style>
-.flex { display:flex; }
-.host::before { display:inline-block; content:'On the same'; }
-.host::after { display:inline-block; content:'line'; color:green; }
-</style>
-<div class=flex>
-<div class=host> </div>
-</div>
Deleted: branches/safari-611-branch/LayoutTests/fast/animation/pseudo-element-style-adjuster.html (276122 => 276123)
--- branches/safari-611-branch/LayoutTests/fast/animation/pseudo-element-style-adjuster.html 2021-04-16 07:48:52 UTC (rev 276122)
+++ branches/safari-611-branch/LayoutTests/fast/animation/pseudo-element-style-adjuster.html 2021-04-16 08:31:44 UTC (rev 276123)
@@ -1,12 +0,0 @@
-<style>
-@keyframes anim {
- from { color:red; }
- to { color:green; }
-}
-.flex { display:flex; }
-.host::before { display:inline-block; content:'On the same'; }
-.host::after { display:inline-block; content:'line'; animation-duration:0s; animation-name:anim; animation-fill-mode:forwards; }
-</style>
-<div class=flex>
-<div class=host> </div>
-</div>
Modified: branches/safari-611-branch/Source/WebCore/ChangeLog (276122 => 276123)
--- branches/safari-611-branch/Source/WebCore/ChangeLog 2021-04-16 07:48:52 UTC (rev 276122)
+++ branches/safari-611-branch/Source/WebCore/ChangeLog 2021-04-16 08:31:44 UTC (rev 276123)
@@ -548,64 +548,6 @@
2021-04-15 Russell Epstein <[email protected]>
- Cherry-pick r275277. rdar://problem/76375504
-
- Animated pseudo element style resolved against wrong parent style
- https://bugs.webkit.org/show_bug.cgi?id=223990
- rdar://74997361
-
- Reviewed by Antoine Quint.
- Source/WebCore:
-
- In createAnimatedElementUpdate we get the parent and parent box styles from the parent stack.
- This is wrong for pseudo elements. Their parent style should the host style which is not pushed to the stack.
-
- This matters in style adjuster which may apply wrong adjustments as a result.
-
- Test: fast/animation/pseudo-element-style-adjuster.html
-
- * style/StyleTreeResolver.cpp:
- (WebCore::Style::TreeResolver::resolveElement):
- (WebCore::Style::TreeResolver::resolvePseudoStyle):
- (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
-
- Make static and provide the parent and parent box styles as parameters.
-
- * style/StyleTreeResolver.h:
-
- LayoutTests:
-
- * fast/animation/pseudo-element-style-adjuster-expected.html: Added.
- * fast/animation/pseudo-element-style-adjuster.html: Added.
-
- git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 2021-03-31 Antti Koivisto <[email protected]>
-
- Animated pseudo element style resolved against wrong parent style
- https://bugs.webkit.org/show_bug.cgi?id=223990
- rdar://74997361
-
- Reviewed by Antoine Quint.
-
- In createAnimatedElementUpdate we get the parent and parent box styles from the parent stack.
- This is wrong for pseudo elements. Their parent style should the host style which is not pushed to the stack.
-
- This matters in style adjuster which may apply wrong adjustments as a result.
-
- Test: fast/animation/pseudo-element-style-adjuster.html
-
- * style/StyleTreeResolver.cpp:
- (WebCore::Style::TreeResolver::resolveElement):
- (WebCore::Style::TreeResolver::resolvePseudoStyle):
- (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
-
- Make static and provide the parent and parent box styles as parameters.
-
- * style/StyleTreeResolver.h:
-
-2021-04-15 Russell Epstein <[email protected]>
-
Cherry-pick r275485. rdar://problem/76412930
Make sure we no longer show the previous page when running a JS prompt
Modified: branches/safari-611-branch/Source/WebCore/style/StyleTreeResolver.cpp (276122 => 276123)
--- branches/safari-611-branch/Source/WebCore/style/StyleTreeResolver.cpp 2021-04-16 07:48:52 UTC (rev 276122)
+++ branches/safari-611-branch/Source/WebCore/style/StyleTreeResolver.cpp 2021-04-16 08:31:44 UTC (rev 276123)
@@ -221,7 +221,7 @@
m_document.setHasNodesWithNonFinalStyle();
}
- auto update = createAnimatedElementUpdate(WTFMove(newStyle), styleable, parent().change, parent().style, parentBoxStyle());
+ auto update = createAnimatedElementUpdate(WTFMove(newStyle), styleable, parent().change);
auto descendantsToResolve = computeDescendantsToResolve(update.change, element.styleValidity(), parent().descendantsToResolve);
if (&element == m_document.documentElement()) {
@@ -277,11 +277,8 @@
return { };
if (!elementUpdate.style->hasPseudoStyle(pseudoId))
return { };
-
- auto& parentStyle = *elementUpdate.style;
- auto* parentBoxStyle = parentBoxStyleForPseudo(elementUpdate);
-
- auto pseudoStyle = scope().resolver.pseudoStyleForElement(element, { pseudoId }, parentStyle, parentBoxStyle, &scope().selectorFilter);
+
+ auto pseudoStyle = scope().resolver.pseudoStyleForElement(element, { pseudoId }, *elementUpdate.style, parentBoxStyleForPseudo(elementUpdate), &scope().selectorFilter);
if (!pseudoStyle)
return { };
@@ -289,7 +286,7 @@
if (!pseudoElementRendererIsNeeded(pseudoStyle.get()) && !hasAnimations)
return { };
- return createAnimatedElementUpdate(WTFMove(pseudoStyle), { element, pseudoId }, elementUpdate.change, parentStyle, parentBoxStyle);
+ return createAnimatedElementUpdate(WTFMove(pseudoStyle), { element, pseudoId }, elementUpdate.change);
}
const RenderStyle* TreeResolver::parentBoxStyle() const
@@ -318,10 +315,9 @@
}
}
-ElementUpdate TreeResolver::createAnimatedElementUpdate(std::unique_ptr<RenderStyle> newStyle, const Styleable& styleable, Change parentChange, const RenderStyle& parentStyle, const RenderStyle* parentBoxStyle)
+ElementUpdate TreeResolver::createAnimatedElementUpdate(std::unique_ptr<RenderStyle> newStyle, const Styleable& styleable, Change parentChange)
{
auto& element = styleable.element;
- auto& document = element.document();
auto* oldStyle = element.renderOrDisplayContentsStyle(styleable.pseudoId);
OptionSet<AnimationImpact> animationImpact;
@@ -329,9 +325,9 @@
// First, we need to make sure that any new CSS animation occuring on this element has a matching WebAnimation
// on the document timeline. Note that we get timeline() on the Document here because we need a timeline created
// in case no Web Animations have been created through the JS API.
- if (document.backForwardCacheState() == Document::NotInBackForwardCache && !document.renderView()->printing()) {
+ if (element.document().backForwardCacheState() == Document::NotInBackForwardCache && !element.document().renderView()->printing()) {
if (oldStyle && (oldStyle->hasTransitions() || newStyle->hasTransitions()))
- document.timeline().updateCSSTransitionsForStyleable(styleable, *oldStyle, *newStyle);
+ m_document.timeline().updateCSSTransitionsForStyleable(styleable, *oldStyle, *newStyle);
// The order in which CSS Transitions and CSS Animations are updated matters since CSS Transitions define the after-change style
// to use CSS Animations as defined in the previous style change event. As such, we update CSS Animations after CSS Transitions
@@ -340,7 +336,7 @@
// FIXME: Remove this hack and pass the parent style via updateCSSAnimationsForStyleable.
scope().resolver.setParentElementStyleForKeyframes(&parent().style);
- m_document.timeline().updateCSSAnimationsForStyleable(styleable, oldStyle, *newStyle, &parentStyle);
+ m_document.timeline().updateCSSAnimationsForStyleable(styleable, oldStyle, *newStyle);
scope().resolver.setParentElementStyleForKeyframes(nullptr);
}
@@ -354,10 +350,10 @@
styleable.setLastStyleChangeEventStyle(RenderStyle::clonePtr(*newStyle));
// Apply all keyframe effects to the new style.
auto animatedStyle = RenderStyle::clonePtr(*newStyle);
- animationImpact = styleable.applyKeyframeEffects(*animatedStyle, *previousLastStyleChangeEventStyle, &parentStyle);
+ animationImpact = styleable.applyKeyframeEffects(*animatedStyle, *previousLastStyleChangeEventStyle);
newStyle = WTFMove(animatedStyle);
- Adjuster adjuster(document, parentStyle, parentBoxStyle, styleable.pseudoId == PseudoId::None ? &element : nullptr);
+ Adjuster adjuster(m_document, parent().style, parentBoxStyle(), styleable.pseudoId == PseudoId::None ? &element : nullptr);
adjuster.adjustAnimatedStyle(*newStyle, animationImpact);
} else
styleable.setLastStyleChangeEventStyle(nullptr);
Modified: branches/safari-611-branch/Source/WebCore/style/StyleTreeResolver.h (276122 => 276123)
--- branches/safari-611-branch/Source/WebCore/style/StyleTreeResolver.h 2021-04-16 07:48:52 UTC (rev 276122)
+++ branches/safari-611-branch/Source/WebCore/style/StyleTreeResolver.h 2021-04-16 08:31:44 UTC (rev 276123)
@@ -61,7 +61,7 @@
ElementUpdates resolveElement(Element&);
- static ElementUpdate createAnimatedElementUpdate(std::unique_ptr<RenderStyle>, const Styleable&, Change, const RenderStyle& parentStyle, const RenderStyle* parentBoxStyle);
+ ElementUpdate createAnimatedElementUpdate(std::unique_ptr<RenderStyle>, const Styleable&, Change);
Optional<ElementUpdate> resolvePseudoStyle(Element&, const ElementUpdate&, PseudoId);
struct Scope : RefCounted<Scope> {
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
