REGRESSION (r233140): v2: Windows build failure due to incomplete DocumentAnimationSc...
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jun 2018 19:23:28 +0000 (19:23 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jun 2018 19:23:28 +0000 (19:23 +0000)
<https://webkit.org/b/186997>

* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
(WebCore::Document::windowScreenDidChange):
* dom/Document.h:
- DocumentAnimationScheduler is behind the
  USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) macro, which
  is disabled on Windows.
- This also reverts my fix in r233144 since it didn't work.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233163 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h

index fb9eeaf..c6dfa23 100644 (file)
@@ -1,3 +1,17 @@
+2018-06-25  David Kilzer  <ddkilzer@apple.com>
+
+        REGRESSION (r233140): v2: Windows build failure due to incomplete DocumentAnimationScheduler type
+        <https://webkit.org/b/186997>
+
+        * dom/Document.cpp:
+        (WebCore::Document::prepareForDestruction):
+        (WebCore::Document::windowScreenDidChange):
+        * dom/Document.h:
+        - DocumentAnimationScheduler is behind the
+          USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) macro, which
+          is disabled on Windows.
+        - This also reverts my fix in r233144 since it didn't work.
+
 2018-06-25  Youenn Fablet  <youenn@apple.com>
 
         Add API to control mock media devices
index 1bdd461..22d495b 100644 (file)
@@ -56,6 +56,7 @@
 #include "DOMWindow.h"
 #include "DateComponents.h"
 #include "DebugPageOverlays.h"
+#include "DocumentAnimationScheduler.h"
 #include "DocumentLoader.h"
 #include "DocumentMarkerController.h"
 #include "DocumentSharedObjectPool.h"
@@ -2443,10 +2444,12 @@ void Document::prepareForDestruction()
         m_timeline = nullptr;
     }
 
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
     if (m_animationScheduler) {
         m_animationScheduler->detachFromDocument();
         m_animationScheduler = nullptr;
     }
+#endif
 
     m_hasPreparedForDestruction = true;
 
@@ -5924,8 +5927,10 @@ void Document::resumeScriptedAnimationControllerCallbacks()
 
 void Document::windowScreenDidChange(PlatformDisplayID displayID)
 {
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
     if (m_animationScheduler)
         m_animationScheduler->windowScreenDidChange(displayID);
+#endif
 
     if (RenderView* view = renderView()) {
         if (view->usesCompositing())
@@ -7716,6 +7721,7 @@ void Document::setConsoleMessageListener(RefPtr<StringCallback>&& listener)
     m_consoleMessageListener = listener;
 }
 
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
 DocumentAnimationScheduler& Document::animationScheduler()
 {
     if (!m_animationScheduler)
@@ -7723,6 +7729,7 @@ DocumentAnimationScheduler& Document::animationScheduler()
 
     return *m_animationScheduler;
 }
+#endif
 
 DocumentTimeline& Document::timeline()
 {
index 35e8bbd..e944535 100644 (file)
@@ -30,7 +30,6 @@
 #include "Color.h"
 #include "ContainerNode.h"
 #include "DisabledAdaptations.h"
-#include "DocumentAnimationScheduler.h"
 #include "DocumentEventQueue.h"
 #include "DocumentIdentifier.h"
 #include "DocumentTiming.h"
@@ -81,7 +80,6 @@ class InputCursor;
 
 namespace WebCore {
 
-class DocumentAnimationScheduler;
 class ApplicationStateChangeListener;
 class AXObjectCache;
 class Attr;
@@ -105,6 +103,7 @@ class DOMWrapperWorld;
 class Database;
 class DatabaseThread;
 class DeferredPromise;
+class DocumentAnimationScheduler;
 class DocumentFragment;
 class DocumentLoader;
 class DocumentMarkerController;
@@ -1408,7 +1407,9 @@ public:
 
     WEBCORE_EXPORT void setConsoleMessageListener(RefPtr<StringCallback>&&); // For testing.
 
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
     DocumentAnimationScheduler& animationScheduler();
+#endif
 
     WEBCORE_EXPORT DocumentTimeline& timeline();
     DocumentTimeline* existingTimeline() const { return m_timeline.get(); }
@@ -1924,7 +1925,9 @@ private:
     bool m_hasFrameSpecificStorageAccess { false };
     bool m_grantStorageAccessOverride { false };
 
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
     RefPtr<DocumentAnimationScheduler> m_animationScheduler;
+#endif
     RefPtr<DocumentTimeline> m_timeline;
     DocumentIdentifier m_identifier;