Diff
Modified: trunk/Source/WebCore/ChangeLog (218661 => 218662)
--- trunk/Source/WebCore/ChangeLog 2017-06-21 22:55:34 UTC (rev 218661)
+++ trunk/Source/WebCore/ChangeLog 2017-06-21 23:55:15 UTC (rev 218662)
@@ -1,3 +1,24 @@
+2017-06-21 Antoine Quint <[email protected]>
+
+ Ensure DRT always logs rAF suspension debugging code
+ https://bugs.webkit.org/show_bug.cgi?id=173681
+
+ Reviewed by Tim "Mr. T" Horton.
+
+ Instead of using a setting to check whether we should log information related to rAF
+ callbacks being suspended with WK1, we now check whether we're using in DRT to avoid
+ any potential issue with settings being in the incorrect state when a test is run.
+
+ * dom/ScriptedAnimationController.cpp:
+ (WebCore::ScriptedAnimationController::logSuspendCount):
+ * page/Page.cpp:
+ (WebCore::Page::suspendScriptedAnimations):
+ (WebCore::Page::resumeScriptedAnimations):
+ * page/Settings.in:
+ * platform/RuntimeApplicationChecks.h:
+ * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
+ (WebCore::MacApplication::isDumpRenderTree):
+
2017-06-21 Chris Dumez <[email protected]>
Allow constructing a WTF:Function from a function pointer
Modified: trunk/Source/WebCore/dom/ScriptedAnimationController.cpp (218661 => 218662)
--- trunk/Source/WebCore/dom/ScriptedAnimationController.cpp 2017-06-21 22:55:34 UTC (rev 218661)
+++ trunk/Source/WebCore/dom/ScriptedAnimationController.cpp 2017-06-21 23:55:15 UTC (rev 218662)
@@ -39,6 +39,7 @@
#include "MainFrame.h"
#include "Page.h"
#include "RequestAnimationFrameCallback.h"
+#include "RuntimeApplicationChecks.h"
#include "Settings.h"
#include <algorithm>
#include <wtf/CurrentTime.h>
@@ -93,7 +94,7 @@
void ScriptedAnimationController::logSuspendCount()
{
- if (!m_document || !m_document->frame() || !m_document->frame()->settings().shouldLogScriptedAnimationControllerSuspensionChange())
+ if (!m_document || !m_document->frame() || MacApplication::isDumpRenderTree())
return;
WTFLogAlways("\nScriptedAnimationController::m_suspendCount = %d", m_suspendCount);
Modified: trunk/Source/WebCore/page/Page.cpp (218661 => 218662)
--- trunk/Source/WebCore/page/Page.cpp 2017-06-21 22:55:34 UTC (rev 218661)
+++ trunk/Source/WebCore/page/Page.cpp 2017-06-21 23:55:15 UTC (rev 218662)
@@ -85,6 +85,7 @@
#include "RenderView.h"
#include "RenderWidget.h"
#include "ResourceUsageOverlay.h"
+#include "RuntimeApplicationChecks.h"
#include "RuntimeEnabledFeatures.h"
#include "SVGDocumentExtensions.h"
#include "SchemeRegistry.h"
@@ -1145,7 +1146,7 @@
void Page::suspendScriptedAnimations()
{
- if (settings().shouldLogScriptedAnimationControllerSuspensionChange()) {
+ if (MacApplication::isDumpRenderTree()) {
WTFLogAlways("\nPage::suspendScriptedAnimations()");
WTFReportBacktrace();
}
@@ -1159,7 +1160,7 @@
void Page::resumeScriptedAnimations()
{
- if (settings().shouldLogScriptedAnimationControllerSuspensionChange()) {
+ if (MacApplication::isDumpRenderTree()) {
WTFLogAlways("\nPage::resumeScriptedAnimations()");
WTFReportBacktrace();
}
Modified: trunk/Source/WebCore/page/Settings.in (218661 => 218662)
--- trunk/Source/WebCore/page/Settings.in 2017-06-21 22:55:34 UTC (rev 218661)
+++ trunk/Source/WebCore/page/Settings.in 2017-06-21 23:55:15 UTC (rev 218662)
@@ -299,5 +299,3 @@
constantPropertiesEnabled initial=false
viewportFitEnabled initial=false
-
-shouldLogScriptedAnimationControllerSuspensionChange initial=false
Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.h (218661 => 218662)
--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.h 2017-06-21 22:55:34 UTC (rev 218661)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.h 2017-06-21 23:55:15 UTC (rev 218662)
@@ -45,6 +45,7 @@
WEBCORE_EXPORT bool isAdobeInstaller();
WEBCORE_EXPORT bool isAperture();
WEBCORE_EXPORT bool isAppleMail();
+bool isDumpRenderTree();
WEBCORE_EXPORT bool isIBooks();
WEBCORE_EXPORT bool isITunes();
WEBCORE_EXPORT bool isMicrosoftMessenger();
Modified: trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm (218661 => 218662)
--- trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm 2017-06-21 22:55:34 UTC (rev 218661)
+++ trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm 2017-06-21 23:55:15 UTC (rev 218662)
@@ -162,6 +162,11 @@
return isSolidStateNetworksDownloader;
}
+bool MacApplication::isDumpRenderTree()
+{
+ return [[[NSProcessInfo processInfo] processName] isEqualToString:@"DumpRenderTree"];
+}
+
#endif // PLATFORM(MAC)
#if PLATFORM(IOS)
Modified: trunk/Source/WebKit/mac/ChangeLog (218661 => 218662)
--- trunk/Source/WebKit/mac/ChangeLog 2017-06-21 22:55:34 UTC (rev 218661)
+++ trunk/Source/WebKit/mac/ChangeLog 2017-06-21 23:55:15 UTC (rev 218662)
@@ -1,3 +1,19 @@
+2017-06-21 Antoine Quint <[email protected]>
+
+ Ensure DRT always logs rAF suspension debugging code
+ https://bugs.webkit.org/show_bug.cgi?id=173681
+
+ Reviewed by Tim "Mr. T" Horton.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences shouldLogScriptedAnimationControllerSuspensionChange]): Deleted.
+ (-[WebPreferences setShouldLogScriptedAnimationControllerSuspensionChange:]): Deleted.
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
2017-06-21 Daniel Bates <[email protected]>
Cleanup FrameLoadRequest
Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (218661 => 218662)
--- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2017-06-21 22:55:34 UTC (rev 218661)
+++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2017-06-21 23:55:15 UTC (rev 218662)
@@ -241,4 +241,3 @@
#define WebKitUserTimingEnabledPreferenceKey @"WebKitUserTimingEnabled"
#define WebKitResourceTimingEnabledPreferenceKey @"WebKitResourceTimingEnabled"
#define WebKitMediaContentTypesRequiringHardwareSupportPreferenceKey @"WebKitMediaContentTypesRequiringHardwareSupport"
-#define WebKitShouldLogScriptedAnimationControllerSuspensionChangePreferenceKey @"WebKitShouldLogScriptedAnimationControllerSuspensionChange"
Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (218661 => 218662)
--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2017-06-21 22:55:34 UTC (rev 218661)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2017-06-21 23:55:15 UTC (rev 218662)
@@ -671,7 +671,6 @@
@NO, WebKitMediaUserGestureInheritsFromDocument,
@NO, WebKitIsSecureContextAttributeEnabledPreferenceKey,
(NSString *)Settings::defaultMediaContentTypesRequiringHardwareSupport(), WebKitMediaContentTypesRequiringHardwareSupportPreferenceKey,
- @NO, WebKitShouldLogScriptedAnimationControllerSuspensionChangePreferenceKey,
nil];
#if !PLATFORM(IOS)
@@ -3138,16 +3137,6 @@
[self _setBoolValue:flag forKey:WebKitIsSecureContextAttributeEnabledPreferenceKey];
}
-- (BOOL)shouldLogScriptedAnimationControllerSuspensionChange
-{
- return [self _boolValueForKey:WebKitShouldLogScriptedAnimationControllerSuspensionChangePreferenceKey];
-}
-
-- (void)setShouldLogScriptedAnimationControllerSuspensionChange:(BOOL)flag
-{
- [self _setBoolValue:flag forKey:WebKitShouldLogScriptedAnimationControllerSuspensionChangePreferenceKey];
-}
-
@end
@implementation WebPreferences (WebInternal)
Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (218661 => 218662)
--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2017-06-21 22:55:34 UTC (rev 218661)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2017-06-21 23:55:15 UTC (rev 218662)
@@ -584,7 +584,4 @@
@property (nonatomic) NSString *mediaContentTypesRequiringHardwareSupport;
-- (void)setShouldLogScriptedAnimationControllerSuspensionChange:(BOOL)flag;
-- (BOOL)shouldLogScriptedAnimationControllerSuspensionChange;
-
@end
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (218661 => 218662)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2017-06-21 22:55:34 UTC (rev 218661)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2017-06-21 23:55:15 UTC (rev 218662)
@@ -2846,7 +2846,6 @@
settings.setVisualViewportEnabled([preferences visualViewportEnabled]);
settings.setMediaContentTypesRequiringHardwareSupport([preferences mediaContentTypesRequiringHardwareSupport]);
- settings.setShouldLogScriptedAnimationControllerSuspensionChange([preferences shouldLogScriptedAnimationControllerSuspensionChange]);
switch ([preferences storageBlockingPolicy]) {
case WebAllowAllStorage:
Modified: trunk/Tools/ChangeLog (218661 => 218662)
--- trunk/Tools/ChangeLog 2017-06-21 22:55:34 UTC (rev 218661)
+++ trunk/Tools/ChangeLog 2017-06-21 23:55:15 UTC (rev 218662)
@@ -1,3 +1,13 @@
+2017-06-21 Antoine Quint <[email protected]>
+
+ Ensure DRT always logs rAF suspension debugging code
+ https://bugs.webkit.org/show_bug.cgi?id=173681
+
+ Reviewed by Tim "Mr. T" Horton.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebPreferencesToConsistentValues):
+
2017-06-21 Chris Dumez <[email protected]>
Allow constructing a WTF:Function from a function pointer
Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (218661 => 218662)
--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2017-06-21 22:55:34 UTC (rev 218661)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2017-06-21 23:55:15 UTC (rev 218662)
@@ -966,8 +966,6 @@
[preferences setResourceTimingEnabled:YES];
[preferences setUserTimingEnabled:YES];
- [preferences setShouldLogScriptedAnimationControllerSuspensionChange:YES];
-
[WebPreferences _clearNetworkLoaderSession];
[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain];
}