[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 11:45:58 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 190b39576e054b7fc38f4abbf33549a53b2c0ac6
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Aug 6 02:51:19 2010 +0000
2010-08-05 Patrick Gansterer <paroga at paroga.com>
Reviewed by Adam Roben.
Make SearchPopupMenuWin more portable
https://bugs.webkit.org/show_bug.cgi?id=43527
Add #if PLATFORM(CF) around CoreFoundation code.
* platform/win/SearchPopupMenuWin.cpp:
(WebCore::SearchPopupMenuWin::enabled):
(WebCore::SearchPopupMenuWin::saveRecentSearches):
(WebCore::SearchPopupMenuWin::loadRecentSearches):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64812 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 32a2186..1a70ad0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-05 Patrick Gansterer <paroga at paroga.com>
+
+ Reviewed by Adam Roben.
+
+ Make SearchPopupMenuWin more portable
+ https://bugs.webkit.org/show_bug.cgi?id=43527
+
+ Add #if PLATFORM(CF) around CoreFoundation code.
+
+ * platform/win/SearchPopupMenuWin.cpp:
+ (WebCore::SearchPopupMenuWin::enabled):
+ (WebCore::SearchPopupMenuWin::saveRecentSearches):
+ (WebCore::SearchPopupMenuWin::loadRecentSearches):
+
2010-08-05 Sheriff Bot <webkit.review.bot at gmail.com>
Unreviewed, rolling out r63653.
diff --git a/WebCore/platform/win/SearchPopupMenuWin.cpp b/WebCore/platform/win/SearchPopupMenuWin.cpp
index e1bbe68..6655b1b 100644
--- a/WebCore/platform/win/SearchPopupMenuWin.cpp
+++ b/WebCore/platform/win/SearchPopupMenuWin.cpp
@@ -22,7 +22,10 @@
#include "SearchPopupMenuWin.h"
#include "AtomicString.h"
+
+#if PLATFORM(CF)
#include <wtf/RetainPtr.h>
+#endif
namespace WebCore {
@@ -38,20 +41,27 @@ PopupMenu* SearchPopupMenuWin::popupMenu()
bool SearchPopupMenuWin::enabled()
{
+#if PLATFORM(CF)
return true;
+#else
+ return false;
+#endif
}
+#if PLATFORM(CF)
static RetainPtr<CFStringRef> autosaveKey(const String& name)
{
String key = "com.apple.WebKit.searchField:" + name;
return RetainPtr<CFStringRef>(AdoptCF, key.createCFString());
}
+#endif
void SearchPopupMenuWin::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems)
{
if (name.isEmpty())
return;
+#if PLATFORM(CF)
RetainPtr<CFMutableArrayRef> items;
size_t size = searchItems.size();
@@ -65,6 +75,7 @@ void SearchPopupMenuWin::saveRecentSearches(const AtomicString& name, const Vect
CFPreferencesSetAppValue(autosaveKey(name).get(), items.get(), kCFPreferencesCurrentApplication);
CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
+#endif
}
void SearchPopupMenuWin::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems)
@@ -72,6 +83,7 @@ void SearchPopupMenuWin::loadRecentSearches(const AtomicString& name, Vector<Str
if (name.isEmpty())
return;
+#if PLATFORM(CF)
searchItems.clear();
RetainPtr<CFArrayRef> items(AdoptCF, reinterpret_cast<CFArrayRef>(CFPreferencesCopyAppValue(autosaveKey(name).get(), kCFPreferencesCurrentApplication)));
@@ -84,6 +96,7 @@ void SearchPopupMenuWin::loadRecentSearches(const AtomicString& name, Vector<Str
if (CFGetTypeID(item) == CFStringGetTypeID())
searchItems.append(item);
}
+#endif
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list