Diff
Modified: branches/safari-603-branch/LayoutTests/ChangeLog (218475 => 218476)
--- branches/safari-603-branch/LayoutTests/ChangeLog 2017-06-19 05:36:53 UTC (rev 218475)
+++ branches/safari-603-branch/LayoutTests/ChangeLog 2017-06-19 05:39:01 UTC (rev 218476)
@@ -1,5 +1,9 @@
2017-06-18 Babak Shafiei <bshaf...@apple.com>
+ Roll out r211501.
+
+2017-06-18 Babak Shafiei <bshaf...@apple.com>
+
Roll out r216126.
2017-06-15 Matthew Hanson <matthew_han...@apple.com>
Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (218475 => 218476)
--- branches/safari-603-branch/Source/WebCore/ChangeLog 2017-06-19 05:36:53 UTC (rev 218475)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog 2017-06-19 05:39:01 UTC (rev 218476)
@@ -1,5 +1,9 @@
2017-06-18 Babak Shafiei <bshaf...@apple.com>
+ Roll out r211501.
+
+2017-06-18 Babak Shafiei <bshaf...@apple.com>
+
Roll out r212173.
2017-06-18 Babak Shafiei <bshaf...@apple.com>
Modified: branches/safari-603-branch/Source/WebCore/dom/Document.cpp (218475 => 218476)
--- branches/safari-603-branch/Source/WebCore/dom/Document.cpp 2017-06-19 05:36:53 UTC (rev 218475)
+++ branches/safari-603-branch/Source/WebCore/dom/Document.cpp 2017-06-19 05:39:01 UTC (rev 218476)
@@ -2284,8 +2284,6 @@
if (m_hasPreparedForDestruction)
return;
- m_frame->animation().detachFromDocument(this);
-
#if ENABLE(IOS_TOUCH_EVENTS)
clearTouchEventHandlersAndListeners();
#endif
Modified: branches/safari-603-branch/Source/WebCore/page/animation/AnimationController.cpp (218475 => 218476)
--- branches/safari-603-branch/Source/WebCore/page/animation/AnimationController.cpp 2017-06-19 05:36:53 UTC (rev 218475)
+++ branches/safari-603-branch/Source/WebCore/page/animation/AnimationController.cpp 2017-06-19 05:39:01 UTC (rev 218476)
@@ -91,9 +91,6 @@
renderer.setIsCSSAnimating(true);
}
- if (animationsAreSuspendedForDocument(&renderer.document()))
- result.iterator->value->suspendAnimations();
-
return *result.iterator->value;
}
@@ -319,23 +316,8 @@
m_isSuspended = false;
}
-bool AnimationControllerPrivate::animationsAreSuspendedForDocument(Document* document)
-{
- return isSuspended() || m_suspendedDocuments.contains(document);
-}
-
-void AnimationControllerPrivate::detachFromDocument(Document* document)
-{
- m_suspendedDocuments.remove(document);
-}
-
void AnimationControllerPrivate::suspendAnimationsForDocument(Document* document)
{
- if (animationsAreSuspendedForDocument(document))
- return;
-
- m_suspendedDocuments.add(document);
-
AnimationPrivateUpdateBlock updateBlock(*this);
for (auto& animation : m_compositeAnimations) {
@@ -348,11 +330,6 @@
void AnimationControllerPrivate::resumeAnimationsForDocument(Document* document)
{
- if (!animationsAreSuspendedForDocument(document))
- return;
-
- detachFromDocument(document);
-
AnimationPrivateUpdateBlock updateBlock(*this);
for (auto& animation : m_compositeAnimations) {
@@ -365,7 +342,7 @@
void AnimationControllerPrivate::startAnimationsIfNotSuspended(Document* document)
{
- if (!animationsAreSuspendedForDocument(document) || allowsNewAnimationsWhileSuspended())
+ if (!isSuspended() || allowsNewAnimationsWhileSuspended())
resumeAnimationsForDocument(document);
}
@@ -736,16 +713,6 @@
}
#endif
-bool AnimationController::animationsAreSuspendedForDocument(Document* document)
-{
- return m_data->animationsAreSuspendedForDocument(document);
-}
-
-void AnimationController::detachFromDocument(Document* document)
-{
- return m_data->detachFromDocument(document);
-}
-
void AnimationController::suspendAnimationsForDocument(Document* document)
{
LOG(Animations, "suspending animations for document %p", document);
Modified: branches/safari-603-branch/Source/WebCore/page/animation/AnimationController.h (218475 => 218476)
--- branches/safari-603-branch/Source/WebCore/page/animation/AnimationController.h 2017-06-19 05:36:53 UTC (rev 218475)
+++ branches/safari-603-branch/Source/WebCore/page/animation/AnimationController.h 2017-06-19 05:39:01 UTC (rev 218476)
@@ -74,10 +74,8 @@
void serviceAnimations();
#endif
- WEBCORE_EXPORT void suspendAnimationsForDocument(Document*);
- WEBCORE_EXPORT void resumeAnimationsForDocument(Document*);
- WEBCORE_EXPORT bool animationsAreSuspendedForDocument(Document*);
- void detachFromDocument(Document*);
+ void suspendAnimationsForDocument(Document*);
+ void resumeAnimationsForDocument(Document*);
void startAnimationsIfNotSuspended(Document*);
void beginAnimationUpdate();
Modified: branches/safari-603-branch/Source/WebCore/page/animation/AnimationControllerPrivate.h (218475 => 218476)
--- branches/safari-603-branch/Source/WebCore/page/animation/AnimationControllerPrivate.h 2017-06-19 05:36:53 UTC (rev 218475)
+++ branches/safari-603-branch/Source/WebCore/page/animation/AnimationControllerPrivate.h 2017-06-19 05:39:01 UTC (rev 218476)
@@ -83,9 +83,7 @@
void suspendAnimationsForDocument(Document*);
void resumeAnimationsForDocument(Document*);
- bool animationsAreSuspendedForDocument(Document*);
void startAnimationsIfNotSuspended(Document*);
- void detachFromDocument(Document*);
bool isRunningAnimationOnRenderer(RenderElement&, CSSPropertyID, AnimationBase::RunningState) const;
bool isRunningAcceleratedAnimationOnRenderer(RenderElement&, CSSPropertyID, AnimationBase::RunningState) const;
@@ -149,8 +147,7 @@
Vector<EventToDispatch> m_eventsToDispatch;
Vector<Ref<Element>> m_elementChangesToDispatch;
- HashSet<Document*> m_suspendedDocuments;
-
+
double m_beginAnimationUpdateTime;
typedef HashSet<RefPtr<AnimationBase>> AnimationsSet;
Modified: branches/safari-603-branch/Source/WebCore/testing/Internals.cpp (218475 => 218476)
--- branches/safari-603-branch/Source/WebCore/testing/Internals.cpp 2017-06-19 05:36:53 UTC (rev 218475)
+++ branches/safari-603-branch/Source/WebCore/testing/Internals.cpp 2017-06-19 05:39:01 UTC (rev 218476)
@@ -755,7 +755,7 @@
if (!document || !document->frame())
return Exception { INVALID_ACCESS_ERR };
- return document->frame()->animation().animationsAreSuspendedForDocument(document);
+ return document->frame()->animation().isSuspended();
}
ExceptionOr<void> Internals::suspendAnimations() const
@@ -764,13 +764,7 @@
if (!document || !document->frame())
return Exception { INVALID_ACCESS_ERR };
- document->frame()->animation().suspendAnimationsForDocument(document);
-
- for (Frame* frame = document->frame(); frame; frame = frame->tree().traverseNext()) {
- if (Document* document = frame->document())
- frame->animation().suspendAnimationsForDocument(document);
- }
-
+ document->frame()->animation().suspendAnimations();
return { };
}
@@ -780,13 +774,7 @@
if (!document || !document->frame())
return Exception { INVALID_ACCESS_ERR };
- document->frame()->animation().resumeAnimationsForDocument(document);
-
- for (Frame* frame = document->frame(); frame; frame = frame->tree().traverseNext()) {
- if (Document* document = frame->document())
- frame->animation().resumeAnimationsForDocument(document);
- }
-
+ document->frame()->animation().resumeAnimations();
return { };
}