Title: [212589] branches/safari-603-branch

Diff

Modified: branches/safari-603-branch/LayoutTests/ChangeLog (212588 => 212589)


--- branches/safari-603-branch/LayoutTests/ChangeLog	2017-02-17 23:39:32 UTC (rev 212588)
+++ branches/safari-603-branch/LayoutTests/ChangeLog	2017-02-17 23:39:36 UTC (rev 212589)
@@ -1,5 +1,9 @@
 2017-02-17  Matthew Hanson  <matthew_han...@apple.com>
 
+        Rollout r212488. rdar://problem/29904368
+
+2017-02-17  Matthew Hanson  <matthew_han...@apple.com>
+
         Rollout r212498. rdar://problem/29904368
 
 2017-02-17  Ryan Haddad  <ryanhad...@apple.com>

Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (212588 => 212589)


--- branches/safari-603-branch/Source/WebCore/ChangeLog	2017-02-17 23:39:32 UTC (rev 212588)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog	2017-02-17 23:39:36 UTC (rev 212589)
@@ -1,5 +1,9 @@
 2017-02-17  Matthew Hanson  <matthew_han...@apple.com>
 
+        Rollout r212488. rdar://problem/29904368
+
+2017-02-17  Matthew Hanson  <matthew_han...@apple.com>
+
         Rollout r212500. rdar://problem/29904368
 
 2017-02-17  Matthew Hanson  <matthew_han...@apple.com>

Modified: branches/safari-603-branch/Source/WebCore/dom/Document.cpp (212588 => 212589)


--- branches/safari-603-branch/Source/WebCore/dom/Document.cpp	2017-02-17 23:39:32 UTC (rev 212588)
+++ branches/safari-603-branch/Source/WebCore/dom/Document.cpp	2017-02-17 23:39:36 UTC (rev 212589)
@@ -2285,8 +2285,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 (212588 => 212589)


--- branches/safari-603-branch/Source/WebCore/page/animation/AnimationController.cpp	2017-02-17 23:39:32 UTC (rev 212588)
+++ branches/safari-603-branch/Source/WebCore/page/animation/AnimationController.cpp	2017-02-17 23:39:36 UTC (rev 212589)
@@ -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);
 }
 
@@ -735,16 +712,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 (212588 => 212589)


--- branches/safari-603-branch/Source/WebCore/page/animation/AnimationController.h	2017-02-17 23:39:32 UTC (rev 212588)
+++ branches/safari-603-branch/Source/WebCore/page/animation/AnimationController.h	2017-02-17 23:39:36 UTC (rev 212589)
@@ -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 (212588 => 212589)


--- branches/safari-603-branch/Source/WebCore/page/animation/AnimationControllerPrivate.h	2017-02-17 23:39:32 UTC (rev 212588)
+++ branches/safari-603-branch/Source/WebCore/page/animation/AnimationControllerPrivate.h	2017-02-17 23:39:36 UTC (rev 212589)
@@ -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 (212588 => 212589)


--- branches/safari-603-branch/Source/WebCore/testing/Internals.cpp	2017-02-17 23:39:32 UTC (rev 212588)
+++ branches/safari-603-branch/Source/WebCore/testing/Internals.cpp	2017-02-17 23:39:36 UTC (rev 212589)
@@ -744,7 +744,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
@@ -753,13 +753,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 { };
 }
 
@@ -769,13 +763,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 { };
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to