[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
aroben at apple.com
aroben at apple.com
Tue Jan 5 23:57:22 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 0fc671b817c79452707a0449b601e44d3335127e
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Dec 21 14:36:27 2009 +0000
Add IWebPreferencesPrivate::[set]AcceleratedCompositingEnabled
Fixes <http://webkit.org/b/32745>.
Reviewed by Ada Chan.
* Interfaces/IWebPreferencesPrivate.idl: Added
[set]AcceleratedCompositingEnabled.
* Interfaces/WebKit.idl: Touched to force a build.
* WebPreferenceKeysPrivate.h: Added
WebKitAcceleratedCompositingEnabledPreferenceKey.
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings): Make accelerated
compositing be on by default.
(WebPreferences::setAcceleratedCompositingEnabled): Store the new
value.
(WebPreferences::acceleratedCompositingEnabled): If accelerated
compositing isn't available, return false. Otherwise, return the value
stored in preferences.
* WebPreferences.h: Added [set]AcceleratedCompositingAvailable.
* WebView.cpp:
(WebView::notifyPreferencesChanged): Just pass the value from
WebPreferences on down.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 11464fb..72b34f0 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,34 @@
+2009-12-18 Adam Roben <aroben at apple.com>
+
+ Add IWebPreferencesPrivate::[set]AcceleratedCompositingEnabled
+
+ Fixes <http://webkit.org/b/32745>.
+
+ Reviewed by Ada Chan.
+
+ * Interfaces/IWebPreferencesPrivate.idl: Added
+ [set]AcceleratedCompositingEnabled.
+
+ * Interfaces/WebKit.idl: Touched to force a build.
+
+ * WebPreferenceKeysPrivate.h: Added
+ WebKitAcceleratedCompositingEnabledPreferenceKey.
+
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings): Make accelerated
+ compositing be on by default.
+ (WebPreferences::setAcceleratedCompositingEnabled): Store the new
+ value.
+ (WebPreferences::acceleratedCompositingEnabled): If accelerated
+ compositing isn't available, return false. Otherwise, return the value
+ stored in preferences.
+
+ * WebPreferences.h: Added [set]AcceleratedCompositingAvailable.
+
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged): Just pass the value from
+ WebPreferences on down.
+
2009-12-17 Jon Honeycutt <jhoneycutt at apple.com>
MSAA: Accessibility role of list items is wrong
diff --git a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
index bec70e2..cfd8e83 100644
--- a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
+++ b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
@@ -91,4 +91,7 @@ interface IWebPreferencesPrivate : IUnknown
HRESULT setPluginAllowedRunTime([in] UINT allowedRunTime);
HRESULT pluginAllowedRunTime([out, retval] UINT* allowedRunTime);
+
+ HRESULT setAcceleratedCompositingEnabled([in] BOOL);
+ HRESULT acceleratedCompositingEnabled([out, retval] BOOL*);
}
diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl
index 7b308db..058b6fc 100644
--- a/WebKit/win/Interfaces/WebKit.idl
+++ b/WebKit/win/Interfaces/WebKit.idl
@@ -285,3 +285,4 @@ library WebKit
[default] interface IWebSerializedJSValue;
}
}
+
diff --git a/WebKit/win/WebPreferenceKeysPrivate.h b/WebKit/win/WebPreferenceKeysPrivate.h
index 09aeaff..fd70ed2 100644
--- a/WebKit/win/WebPreferenceKeysPrivate.h
+++ b/WebKit/win/WebPreferenceKeysPrivate.h
@@ -129,3 +129,5 @@
#define WebKitUseHighResolutionTimersPreferenceKey "WebKitUseHighResolutionTimers"
#define WebKitPluginAllowedRunTimePreferenceKey "WebKitPluginAllowedRunTime"
+
+#define WebKitAcceleratedCompositingEnabledPreferenceKey "WebKitAcceleratedCompositingEnabled"
diff --git a/WebKit/win/WebPreferences.cpp b/WebKit/win/WebPreferences.cpp
index 652e619..55320d7 100644
--- a/WebKit/win/WebPreferences.cpp
+++ b/WebKit/win/WebPreferences.cpp
@@ -32,14 +32,13 @@
#include "WebNotificationCenter.h"
#include "WebPreferenceKeysPrivate.h"
-#pragma warning( push, 0 )
#include <WebCore/CString.h>
#include <WebCore/FileSystem.h>
#include <WebCore/Font.h>
#include <WebCore/PlatformString.h>
#include <WebCore/StringHash.h>
+#include <WebCore/WKCACFLayerRenderer.h>
#include "WebLocalizableStrings.h"
-#pragma warning( pop )
#include <CoreFoundation/CoreFoundation.h>
#include <limits>
@@ -255,6 +254,8 @@ void WebPreferences::initializeDefaultSettings()
RetainPtr<CFStringRef> pluginAllowedRunTime(AdoptCF, CFStringCreateWithFormat(0, 0, CFSTR("%u"), numeric_limits<unsigned>::max()));
CFDictionaryAddValue(defaults, CFSTR(WebKitPluginAllowedRunTimePreferenceKey), pluginAllowedRunTime.get());
+ CFDictionaryAddValue(defaults, CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey), kCFBooleanTrue);
+
defaultSettings = defaults;
}
@@ -1356,6 +1357,18 @@ HRESULT WebPreferences::setPreferenceForTest(BSTR key, BSTR value)
return S_OK;
}
+HRESULT WebPreferences::setAcceleratedCompositingEnabled(BOOL enabled)
+{
+ setBoolValue(CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey), enabled);
+ return S_OK;
+}
+
+HRESULT WebPreferences::acceleratedCompositingEnabled(BOOL* enabled)
+{
+ *enabled = WKCACFLayerRenderer::acceleratedCompositingAvailable() && boolValueForKey(CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey));
+ return S_OK;
+}
+
void WebPreferences::willAddToWebView()
{
++m_numWebViews;
diff --git a/WebKit/win/WebPreferences.h b/WebKit/win/WebPreferences.h
index 2a89269..8d15a06 100644
--- a/WebKit/win/WebPreferences.h
+++ b/WebKit/win/WebPreferences.h
@@ -384,6 +384,8 @@ public:
/* [in] */ BSTR key,
/* [in] */ BSTR value);
+ virtual HRESULT STDMETHODCALLTYPE setAcceleratedCompositingEnabled(BOOL);
+ virtual HRESULT STDMETHODCALLTYPE acceleratedCompositingEnabled(BOOL*);
// WebPreferences
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index edbe1a8..9225150 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -4505,7 +4505,10 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
settings->setPluginAllowedRunTime(runTime);
#if USE(ACCELERATED_COMPOSITING)
- settings->setAcceleratedCompositingEnabled(WKCACFLayerRenderer::acceleratedCompositingAvailable());
+ hr = prefsPrivate->acceleratedCompositingEnabled(&enabled);
+ if (FAILED(hr))
+ return hr;
+ settings->setAcceleratedCompositingEnabled(enabled);
#endif
#if ENABLE(3D_CANVAS)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list