Ensure we only log changes to the ScriptedAnimationController suspended state in...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Jun 2017 20:08:07 +0000 (20:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Jun 2017 20:08:07 +0000 (20:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173423

Patch by Antoine Quint <graouts@apple.com> on 2017-06-15
Reviewed by Tim Horton.

We added logging for when the suspended state of the scripted animation controller would change in
webkit.org/b/173326. It was meant to only be enabled in debug builds and we actually did the wrong
thing and enabled it in non-debug builds.

We also added a setting that wasn't used and that we are removing here.

* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::logSuspendCount):
* page/Settings.in:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::resetToConsistentState):
(WebCore::InternalSettings::shouldLogScritedAnimationControllerSuspensionChange): Deleted.
(WebCore::InternalSettings::setShouldLogScritedAnimationControllerSuspensionChange): Deleted.
* testing/InternalSettings.h:
* testing/InternalSettings.idl:

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

Source/WebCore/ChangeLog
Source/WebCore/dom/ScriptedAnimationController.cpp
Source/WebCore/page/Settings.in
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl

index d12912e..9f84288 100644 (file)
@@ -1,3 +1,26 @@
+2017-06-15  Antoine Quint  <graouts@apple.com>
+
+        Ensure we only log changes to the ScriptedAnimationController suspended state in debug builds
+        https://bugs.webkit.org/show_bug.cgi?id=173423
+
+        Reviewed by Tim Horton.
+
+        We added logging for when the suspended state of the scripted animation controller would change in
+        webkit.org/b/173326. It was meant to only be enabled in debug builds and we actually did the wrong
+        thing and enabled it in non-debug builds.
+
+        We also added a setting that wasn't used and that we are removing here.
+
+        * dom/ScriptedAnimationController.cpp:
+        (WebCore::ScriptedAnimationController::logSuspendCount):
+        * page/Settings.in:
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::resetToConsistentState):
+        (WebCore::InternalSettings::shouldLogScritedAnimationControllerSuspensionChange): Deleted.
+        (WebCore::InternalSettings::setShouldLogScritedAnimationControllerSuspensionChange): Deleted.
+        * testing/InternalSettings.h:
+        * testing/InternalSettings.idl:
+
 2017-06-15  David Kilzer  <ddkilzer@apple.com>
 
         Build fix: [iOS] Generate a simulated crash when the WebThread starts in MobileSafari
index 6305e93..819cf2e 100644 (file)
@@ -91,10 +91,7 @@ void ScriptedAnimationController::resume()
 
 void ScriptedAnimationController::logSuspendCount()
 {
-#if defined NDEBUG
-    if (!m_document || !m_document->frame() || !m_document->frame()->settings().shouldLogScritedAnimationControllerSuspensionChange())
-        return;
-
+#if !defined(NDEBUG)
     WTFLogAlways("ScriptedAnimationController::m_suspendCount = %d", m_suspendCount);
     WTFReportBacktrace();
 #endif
index f4190a5..01b3417 100644 (file)
@@ -277,8 +277,6 @@ visualViewportEnabled initial=false, setNeedsStyleRecalcInAllFrames=1
 
 inputEventsEnabled initial=true
 
-shouldLogScritedAnimationControllerSuspensionChange initial=true
-
 quickTimePluginReplacementEnabled initial=defaultQuickTimePluginReplacementEnabled
 youTubeFlashPluginReplacementEnabled initial=defaultYouTubeFlashPluginReplacementEnabled
 
index a8d7c02..74b2713 100644 (file)
@@ -265,8 +265,6 @@ void InternalSettings::resetToConsistentState()
     m_page->mainFrame().setPageAndTextZoomFactors(1, 1);
     m_page->setCanStartMedia(true);
 
-    settings().setShouldLogScritedAnimationControllerSuspensionChange(true);
-
     settings().setForcePendingWebGLPolicy(false);
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
     settings().setAllowsAirPlayForMediaPlayback(false);
@@ -732,16 +730,6 @@ void InternalSettings::setWebGPUEnabled(bool enabled)
 #endif
 }
 
-bool InternalSettings::shouldLogScritedAnimationControllerSuspensionChange()
-{
-    return settings().shouldLogScritedAnimationControllerSuspensionChange();
-}
-
-void InternalSettings::setShouldLogScritedAnimationControllerSuspensionChange(bool shouldLogScritedAnimationControllerSuspensionChange)
-{
-    settings().setShouldLogScritedAnimationControllerSuspensionChange(shouldLogScritedAnimationControllerSuspensionChange);
-}
-
 ExceptionOr<String> InternalSettings::userInterfaceDirectionPolicy()
 {
     if (!m_page)
index 36e4f11..b9947b7 100644 (file)
@@ -111,9 +111,6 @@ public:
     ForcedAccessibilityValue forcedPrefersReducedMotionAccessibilityValue() const;
     void setForcedPrefersReducedMotionAccessibilityValue(ForcedAccessibilityValue);
 
-    bool shouldLogScritedAnimationControllerSuspensionChange();
-    void setShouldLogScritedAnimationControllerSuspensionChange(bool);
-
     // RuntimeEnabledFeatures.
     static void setIndexedDBWorkersEnabled(bool);
     static void setCSSGridLayoutEnabled(bool);
index dfb6953..77dd2cc 100644 (file)
@@ -96,9 +96,6 @@ enum ForcedAccessibilityValue { "system", "on", "off" };
     [MayThrowException] boolean deferredCSSParserEnabled();
     [MayThrowException] void setDeferredCSSParserEnabled(boolean enabled);
 
-    boolean shouldLogScritedAnimationControllerSuspensionChange();
-    void setShouldLogScritedAnimationControllerSuspensionChange(boolean shouldLogScritedAnimationControllerSuspensionChange);
-
     [MayThrowException] void setShouldMockBoldSystemFontForAccessibility(boolean shouldMock);
 
     attribute ForcedAccessibilityValue forcedColorsAreInvertedAccessibilityValue;