Title: [124814] branches/safari-536.26-branch/Source

Diff

Modified: branches/safari-536.26-branch/Source/WebCore/ChangeLog (124813 => 124814)


--- branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-08-06 23:33:11 UTC (rev 124813)
+++ branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-08-06 23:35:21 UTC (rev 124814)
@@ -1,5 +1,24 @@
 2012-08-06  Lucas Forschler  <[email protected]>
 
+    Merge 123775
+
+    2012-07-25  Jer Noble  <[email protected]>
+
+            Add setting to enable and disable diagnostic logging.
+            https://bugs.webkit.org/show_bug.cgi?id=92337
+
+            Reviewed by Anders Carlsson.
+
+            Add a new entry in Settings, defaulting to false.
+
+            * page/Settings.cpp:
+            (WebCore::Settings::Settings): Default the new setting to false.
+            * page/Settings.h:
+            (WebCore::Settings::setDiagnosticLoggingEnabled): Simple accessor.
+            (WebCore::Settings::diagnosticLoggingEnabled): Ditto.
+
+2012-08-06  Lucas Forschler  <[email protected]>
+
     Merge 123747
 
     2012-07-26  Jer Noble  <[email protected]>

Modified: branches/safari-536.26-branch/Source/WebCore/page/Settings.cpp (124813 => 124814)


--- branches/safari-536.26-branch/Source/WebCore/page/Settings.cpp	2012-08-06 23:33:11 UTC (rev 124813)
+++ branches/safari-536.26-branch/Source/WebCore/page/Settings.cpp	2012-08-06 23:35:21 UTC (rev 124814)
@@ -267,6 +267,7 @@
     , m_shouldRespectImageOrientation(false)
     , m_wantsBalancedSetDefersLoadingBehavior(false)
     , m_needsDidFinishLoadOrderQuirk(false)
+    , m_diagnosticLoggingEnabled(false)
     , m_loadsImagesAutomaticallyTimer(this, &Settings::loadsImagesAutomaticallyTimerFired)
     , m_incrementalRenderingSuppressionTimeoutInSeconds(defaultIncrementalRenderingSuppressionTimeoutInSeconds)
 {

Modified: branches/safari-536.26-branch/Source/WebCore/page/Settings.h (124813 => 124814)


--- branches/safari-536.26-branch/Source/WebCore/page/Settings.h	2012-08-06 23:33:11 UTC (rev 124813)
+++ branches/safari-536.26-branch/Source/WebCore/page/Settings.h	2012-08-06 23:35:21 UTC (rev 124814)
@@ -571,6 +571,9 @@
         static bool shouldRespectPriorityInCSSAttributeSetters();
 #endif
 
+        void setDiagnosticLoggingEnabled(bool enabled) { m_diagnosticLoggingEnabled = enabled; }
+        bool diagnosticLoggingEnabled() const { return m_diagnosticLoggingEnabled; }
+
     private:
         Settings(Page*);
 
@@ -733,6 +736,8 @@
         bool m_wantsBalancedSetDefersLoadingBehavior : 1;
         bool m_needsDidFinishLoadOrderQuirk : 1;
 
+        bool m_diagnosticLoggingEnabled : 1;
+
         Timer<Settings> m_loadsImagesAutomaticallyTimer;
         void loadsImagesAutomaticallyTimerFired(Timer<Settings>*);
         

Modified: branches/safari-536.26-branch/Source/WebKit/mac/ChangeLog (124813 => 124814)


--- branches/safari-536.26-branch/Source/WebKit/mac/ChangeLog	2012-08-06 23:33:11 UTC (rev 124813)
+++ branches/safari-536.26-branch/Source/WebKit/mac/ChangeLog	2012-08-06 23:35:21 UTC (rev 124814)
@@ -1,3 +1,26 @@
+2012-08-06  Lucas Forschler  <[email protected]>
+
+    Merge 123775
+
+    2012-07-25  Jer Noble  <[email protected]>
+
+            Add setting to enable and disable diagnostic logging.
+            https://bugs.webkit.org/show_bug.cgi?id=92337
+
+            Reviewed by Anders Carlsson.
+
+            Add a WebKit WebPreferences API to set set the WebCore diagnosticLoggingEnabled setting.
+
+            * WebView/WebPreferenceKeysPrivate.h:
+            * WebView/WebPreferences.mm:
+            (+[WebPreferences initialize]): Register the default value to false.
+            (-[WebPreferences diagnosticLoggingEnabled]): Simple userDefaults accessor.
+            (-[WebPreferences setDiagnosticLoggingEnabled:]): Ditto.
+            * WebView/WebPreferencesPrivate.h:
+            * WebView/WebView.mm:
+            (-[WebView _preferencesChanged:]): Ensure this preference is propagated to Settings
+                whenever the preferences change.
+
 2012-07-30  Lucas Forschler  <[email protected]>
 
     Merge 121646

Modified: branches/safari-536.26-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (124813 => 124814)


--- branches/safari-536.26-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h	2012-08-06 23:33:11 UTC (rev 124813)
+++ branches/safari-536.26-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h	2012-08-06 23:35:21 UTC (rev 124814)
@@ -121,6 +121,7 @@
 #define WebKitSuppressesIncrementalRenderingKey @"WebKitSuppressesIncrementalRendering"
 #define WebKitRegionBasedColumnsEnabledKey @"WebKitRegionBasedColumnsEnabled"
 #define WebKitShouldRespectImageOrientationKey @"WebKitShouldRespectImageOrientation"
+#define WebKitDiagnosticLoggingEnabledKey @"WebKitDiagnosticLoggingEnabled"
 
 // These are private both because callers should be using the cover methods and because the
 // cover methods themselves are private.

Modified: branches/safari-536.26-branch/Source/WebKit/mac/WebView/WebPreferences.mm (124813 => 124814)


--- branches/safari-536.26-branch/Source/WebKit/mac/WebView/WebPreferences.mm	2012-08-06 23:33:11 UTC (rev 124813)
+++ branches/safari-536.26-branch/Source/WebKit/mac/WebView/WebPreferences.mm	2012-08-06 23:35:21 UTC (rev 124814)
@@ -398,6 +398,7 @@
         [NSNumber numberWithBool:YES],  WebKitNotificationsEnabledKey,
         [NSNumber numberWithBool:NO],   WebKitShouldRespectImageOrientationKey,
         [NSNumber numberWithBool:NO],   WebKitWantsBalancedSetDefersLoadingBehaviorKey,
+        [NSNumber numberWithBool:NO],   WebKitDiagnosticLoggingEnabledKey,
 
         [NSNumber numberWithLongLong:ApplicationCacheStorage::noQuota()], WebKitApplicationCacheTotalQuota,
         [NSNumber numberWithLongLong:ApplicationCacheStorage::noQuota()], WebKitApplicationCacheDefaultOriginQuota,
@@ -1697,6 +1698,16 @@
     return [self _floatValueForKey:WebKitIncrementalRenderingSuppressionTimeoutInSecondsKey];
 }
 
+- (BOOL)diagnosticLoggingEnabled
+{
+    return [self _boolValueForKey:WebKitDiagnosticLoggingEnabledKey];
+}
+
+- (void)setDiagnosticLoggingEnabled:(BOOL)enabled
+{
+    [self _setBoolValue:enabled forKey:WebKitDiagnosticLoggingEnabledKey];
+}
+
 @end
 
 @implementation WebPreferences (WebInternal)

Modified: branches/safari-536.26-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (124813 => 124814)


--- branches/safari-536.26-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h	2012-08-06 23:33:11 UTC (rev 124813)
+++ branches/safari-536.26-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h	2012-08-06 23:35:21 UTC (rev 124814)
@@ -301,4 +301,7 @@
 - (void)setIncrementalRenderingSuppressionTimeoutInSeconds:(NSTimeInterval)timeout;
 - (NSTimeInterval)incrementalRenderingSuppressionTimeoutInSeconds;
 
+- (BOOL)diagnosticLoggingEnabled;
+- (void)setDiagnosticLoggingEnabled:(BOOL)enabled;
+
 @end

Modified: branches/safari-536.26-branch/Source/WebKit/mac/WebView/WebView.mm (124813 => 124814)


--- branches/safari-536.26-branch/Source/WebKit/mac/WebView/WebView.mm	2012-08-06 23:33:11 UTC (rev 124813)
+++ branches/safari-536.26-branch/Source/WebKit/mac/WebView/WebView.mm	2012-08-06 23:35:21 UTC (rev 124814)
@@ -1540,6 +1540,7 @@
     settings->setShouldRespectImageOrientation([preferences shouldRespectImageOrientation]);
     settings->setNeedsIsLoadingInAPISenseQuirk([self _needsIsLoadingInAPISenseQuirk]);
     settings->setNeedsDidFinishLoadOrderQuirk(needsDidFinishLoadOrderQuirk());
+    settings->setDiagnosticLoggingEnabled([preferences diagnosticLoggingEnabled]);
     
     NSTimeInterval timeout = [preferences incrementalRenderingSuppressionTimeoutInSeconds];
     if (timeout > 0)

Modified: branches/safari-536.26-branch/Source/WebKit2/ChangeLog (124813 => 124814)


--- branches/safari-536.26-branch/Source/WebKit2/ChangeLog	2012-08-06 23:33:11 UTC (rev 124813)
+++ branches/safari-536.26-branch/Source/WebKit2/ChangeLog	2012-08-06 23:35:21 UTC (rev 124814)
@@ -1,3 +1,25 @@
+2012-08-06  Lucas Forschler  <[email protected]>
+
+    Merge 123775
+
+    2012-07-25  Jer Noble  <[email protected]>
+
+            Add setting to enable and disable diagnostic logging.
+            https://bugs.webkit.org/show_bug.cgi?id=92337
+
+            Reviewed by Anders Carlsson.
+
+            Add a WebKit2 WKPreferences API to set set the WebCore diagnosticLoggingEnabled setting.
+
+            * Shared/WebPreferencesStore.h:
+            * UIProcess/API/C/WKPreferences.cpp:
+            (WKPreferencesSetDiagnosticLoggingEnabled):
+            (WKPreferencesGetDiagnosticLoggingEnabled):
+            * UIProcess/API/C/WKPreferencesPrivate.h:
+            * WebProcess/WebPage/WebPage.cpp:
+            (WebKit::WebPage::updatePreferences): Ensure this preference is propagated to Settings
+                whenever the preferences change.
+
 2012-08-02  Lucas Forschler  <[email protected]>
 
     Merge 122676

Modified: branches/safari-536.26-branch/Source/WebKit2/Shared/WebPreferencesStore.h (124813 => 124814)


--- branches/safari-536.26-branch/Source/WebKit2/Shared/WebPreferencesStore.h	2012-08-06 23:33:11 UTC (rev 124813)
+++ branches/safari-536.26-branch/Source/WebKit2/Shared/WebPreferencesStore.h	2012-08-06 23:35:21 UTC (rev 124814)
@@ -111,6 +111,7 @@
     macro(NotificationsEnabled, notificationsEnabled, Bool, bool, true) \
     macro(ShouldRespectImageOrientation, shouldRespectImageOrientation, Bool, bool, false) \
     macro(WantsBalancedSetDefersLoadingBehavior, wantsBalancedSetDefersLoadingBehavior, Bool, bool, false) \
+    macro(DiagnosticLoggingEnabled, diagnosticLoggingEnabled, Bool, bool, false) \
     \
 
 #define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \

Modified: branches/safari-536.26-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (124813 => 124814)


--- branches/safari-536.26-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2012-08-06 23:33:11 UTC (rev 124813)
+++ branches/safari-536.26-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2012-08-06 23:35:21 UTC (rev 124814)
@@ -794,3 +794,13 @@
     // are usually always the same (in the UI process), they are not sent to web process, not triggering the reset.
     toImpl(preferencesRef)->forceUpdate();
 }
+
+void WKPreferencesSetDiagnosticLoggingEnabled(WKPreferencesRef preferencesRef, bool enabled)
+{
+    toImpl(preferencesRef)->setDiagnosticLoggingEnabled(enabled);
+}
+
+bool WKPreferencesGetDiagnosticLoggingEnabled(WKPreferencesRef preferencesRef)
+{
+    return toImpl(preferencesRef)->diagnosticLoggingEnabled();
+}

Modified: branches/safari-536.26-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h (124813 => 124814)


--- branches/safari-536.26-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h	2012-08-06 23:33:11 UTC (rev 124813)
+++ branches/safari-536.26-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h	2012-08-06 23:35:21 UTC (rev 124814)
@@ -179,6 +179,10 @@
 WK_EXPORT void WKPreferencesSetJavaEnabledForLocalFiles(WKPreferencesRef preferences, bool javaEnabled);
 WK_EXPORT bool WKPreferencesGetJavaEnabledForLocalFiles(WKPreferencesRef preferences);
 
+// Defaults to false
+WK_EXPORT void WKPreferencesSetDiagnosticLoggingEnabled(WKPreferencesRef preferencesRef, bool enabled);
+WK_EXPORT bool WKPreferencesGetDiagnosticLoggingEnabled(WKPreferencesRef preferencesRef);
+
 WK_EXPORT void WKPreferencesResetTestRunnerOverrides(WKPreferencesRef preferencesRef);
 
 #ifdef __cplusplus

Modified: branches/safari-536.26-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (124813 => 124814)


--- branches/safari-536.26-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-08-06 23:33:11 UTC (rev 124813)
+++ branches/safari-536.26-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-08-06 23:35:21 UTC (rev 124814)
@@ -2028,6 +2028,8 @@
 
     settings->setShouldRespectImageOrientation(store.getBoolValueForKey(WebPreferencesKey::shouldRespectImageOrientationKey()));
 
+    settings->setDiagnosticLoggingEnabled(store.getBoolValueForKey(WebPreferencesKey::diagnosticLoggingEnabledKey()));
+
     platformPreferencesDidChange(store);
 
     if (m_drawingArea)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to