<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[38234] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/38234">38234</a></dd>
<dt>Author</dt> <dd>mitz@apple.com</dd>
<dt>Date</dt> <dd>2008-11-08 11:12:23 -0800 (Sat, 08 Nov 2008)</dd>
</dl>

<h3>Log Message</h3>
<pre>WebCore:

        Reviewed by Darin Adler.

        - WebCore part of adding WebPreferences for controlling databases and local storage

        * WebCore.base.exp: Exported Settings::setDatabasesEnabled() and
        Settings::setLocalStorageEnabled().
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::localStorage): Changed to return 0 if local storage
        is disabled in settings.
        (WebCore::DOMWindow::openDatabase): Changed to return 0 if databases
        are disabled in settings.
        * page/Settings.cpp:
        (WebCore::Settings::Settings): Initialize m_databasesEnabled and
        m_localStorageEnabled.
        (WebCore::Settings::setDatabasesEnabled): Added.
        (WebCore::Settings::setLocalStorageEnabled): Added.
        * page/Settings.h:
        (WebCore::Settings::databasesEnabled): Added.
        (WebCore::Settings::localStorageEnabled): Added.

WebKit/mac:

        Reviewed by Darin Adler.

        - WebKit/mac part of adding WebPreferences for controlling databases and local storage

        * WebView/WebPreferenceKeysPrivate.h: Added
        WebKitDatabasesEnabledPreferenceKey and
        WebKitLocalStorageEnabledPreferenceKey.
        * WebView/WebPreferences.mm:
        (+[WebPreferences initialize]): Made databases and local storage enabled
        by default.
        (-[WebPreferences databasesEnabled]): Added.
        (-[WebPreferences setDatabasesEnabled:]): Added.
        (-[WebPreferences localStorageEnabled]): Added.
        (-[WebPreferences setLocalStorageEnabled:]): Added.
        * WebView/WebPreferencesPrivate.h:
        * WebView/WebView.mm:
        (-[WebView _preferencesChangedNotification:]): Transfer the databases
        and local storage preferences to WebCore settings.

WebKit/win:

        Reviewed by Darin Adler.

        - WebKit/win part of adding WebPreferences for controlling databases and local storage

        * Interfaces/IWebPreferencesPrivate.idl: Declared setDatabasesEnabled,
        databasesEnabled, setLocalStorageEnabled and localStorageEnabled.
        * WebPreferenceKeysPrivate.h: Added WebKitDatabasesEnabledPreferenceKey
        and WebKitLocalStorageEnabledPreferenceKey.
        * WebPreferences.cpp:
        (WebPreferences::initializeDefaultSettings): Made databases and local
        storage enabled by default.
        (WebPreferences::setDatabasesEnabled): Added.
        (WebPreferences::databasesEnabled): Added.
        (WebPreferences::setLocalStorageEnabled): Added.
        (WebPreferences::localStorageEnabled): Added.
        * WebPreferences.h:
        * WebView.cpp:
        (WebView::notifyPreferencesChanged): Transfer the databases and local
        storage preferences to WebCore settings.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoreWebCorebaseexp">trunk/WebCore/WebCore.base.exp</a></li>
<li><a href="#trunkWebCorepageDOMWindowcpp">trunk/WebCore/page/DOMWindow.cpp</a></li>
<li><a href="#trunkWebCorepageSettingscpp">trunk/WebCore/page/Settings.cpp</a></li>
<li><a href="#trunkWebCorepageSettingsh">trunk/WebCore/page/Settings.h</a></li>
<li><a href="#trunkWebKitmacChangeLog">trunk/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkWebKitmacWebViewWebPreferenceKeysPrivateh">trunk/WebKit/mac/WebView/WebPreferenceKeysPrivate.h</a></li>
<li><a href="#trunkWebKitmacWebViewWebPreferencesmm">trunk/WebKit/mac/WebView/WebPreferences.mm</a></li>
<li><a href="#trunkWebKitmacWebViewWebPreferencesPrivateh">trunk/WebKit/mac/WebView/WebPreferencesPrivate.h</a></li>
<li><a href="#trunkWebKitmacWebViewWebViewmm">trunk/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkWebKitwinChangeLog">trunk/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkWebKitwinInterfacesIWebPreferencesPrivateidl">trunk/WebKit/win/Interfaces/IWebPreferencesPrivate.idl</a></li>
<li><a href="#trunkWebKitwinWebPreferenceKeysPrivateh">trunk/WebKit/win/WebPreferenceKeysPrivate.h</a></li>
<li><a href="#trunkWebKitwinWebPreferencescpp">trunk/WebKit/win/WebPreferences.cpp</a></li>
<li><a href="#trunkWebKitwinWebPreferencesh">trunk/WebKit/win/WebPreferences.h</a></li>
<li><a href="#trunkWebKitwinWebViewcpp">trunk/WebKit/win/WebView.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebCore/ChangeLog        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2008-11-08  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        Reviewed by Darin Adler.
+
+        - WebCore part of adding WebPreferences for controlling databases and local storage
+
+        * WebCore.base.exp: Exported Settings::setDatabasesEnabled() and
+        Settings::setLocalStorageEnabled().
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::localStorage): Changed to return 0 if local storage
+        is disabled in settings.
+        (WebCore::DOMWindow::openDatabase): Changed to return 0 if databases
+        are disabled in settings.
+        * page/Settings.cpp:
+        (WebCore::Settings::Settings): Initialize m_databasesEnabled and
+        m_localStorageEnabled.
+        (WebCore::Settings::setDatabasesEnabled): Added.
+        (WebCore::Settings::setLocalStorageEnabled): Added.
+        * page/Settings.h:
+        (WebCore::Settings::databasesEnabled): Added.
+        (WebCore::Settings::localStorageEnabled): Added.
+
</ins><span class="cx"> 2008-11-07  Alp Toker  &lt;alp@nuanti.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix build with bleeding edge GTK+ versions. GTK+ and other libraries
</span></span></pre></div>
<a id="trunkWebCoreWebCorebaseexp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.base.exp (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.base.exp        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebCore/WebCore.base.exp        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -567,7 +567,6 @@
</span><span class="cx"> __ZN7WebCore8DragDataC1EP11objc_objectRKNS_8IntPointES5_NS_13DragOperationEPNS_16PasteboardHelperE
</span><span class="cx"> __ZN7WebCore8FormDataD1Ev
</span><span class="cx"> __ZN7WebCore8IntPointC1ERK8_NSPoint
</span><del>-__ZNK7WebCore10FloatPointcv8_NSPointEv
</del><span class="cx"> __ZN7WebCore8Settings14setJavaEnabledEb
</span><span class="cx"> __ZN7WebCore8Settings16setUsesPageCacheEb
</span><span class="cx"> __ZN7WebCore8Settings16setZoomsTextOnlyEb
</span><span class="lines">@@ -577,10 +576,12 @@
</span><span class="cx"> __ZN7WebCore8Settings18setFixedFontFamilyERKNS_12AtomicStringE
</span><span class="cx"> __ZN7WebCore8Settings18setMinimumFontSizeEi
</span><span class="cx"> __ZN7WebCore8Settings18setSerifFontFamilyERKNS_12AtomicStringE
</span><ins>+__ZN7WebCore8Settings19setDatabasesEnabledEb
</ins><span class="cx"> __ZN7WebCore8Settings20setCursiveFontFamilyERKNS_12AtomicStringE
</span><span class="cx"> __ZN7WebCore8Settings20setFantasyFontFamilyERKNS_12AtomicStringE
</span><span class="cx"> __ZN7WebCore8Settings20setJavaScriptEnabledEb
</span><span class="cx"> __ZN7WebCore8Settings21setStandardFontFamilyERKNS_12AtomicStringE
</span><ins>+__ZN7WebCore8Settings22setLocalStorageEnabledEb
</ins><span class="cx"> __ZN7WebCore8Settings22setSansSerifFontFamilyERKNS_12AtomicStringE
</span><span class="cx"> __ZN7WebCore8Settings22setShowsURLsInToolTipsEb
</span><span class="cx"> __ZN7WebCore8Settings23setDefaultFixedFontSizeEi
</span><span class="lines">@@ -677,6 +678,7 @@
</span><span class="cx"> __ZN7WebCoreeqERKNS_19ResourceRequestBaseES2_
</span><span class="cx"> __ZN7WebCoreplERKNS_6StringES2_
</span><span class="cx"> __ZNK3JSC8Bindings10RootObject12globalObjectEv
</span><ins>+__ZNK7WebCore10FloatPointcv8_NSPointEv
</ins><span class="cx"> __ZNK7WebCore10PluginData16supportsMimeTypeERKNS_6StringE
</span><span class="cx"> __ZNK7WebCore10ScrollView12documentViewEv
</span><span class="cx"> __ZNK7WebCore10ScrollView14scrollbarModesERNS_13ScrollbarModeES2_
</span></span></pre></div>
<a id="trunkWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/page/DOMWindow.cpp (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/page/DOMWindow.cpp        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebCore/page/DOMWindow.cpp        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -55,6 +55,7 @@
</span><span class="cx"> #include &quot;PlatformString.h&quot;
</span><span class="cx"> #include &quot;Screen.h&quot;
</span><span class="cx"> #include &quot;SecurityOrigin.h&quot;
</span><ins>+#include &quot;Settings.h&quot;
</ins><span class="cx"> #include &lt;algorithm&gt;
</span><span class="cx"> #include &lt;wtf/MathExtras.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -339,7 +340,11 @@
</span><span class="cx">     Page* page = document-&gt;page();
</span><span class="cx">     if (!page)
</span><span class="cx">         return 0;
</span><del>-    
</del><ins>+
+    Settings* settings = document-&gt;settings();
+    if (!settings || !settings-&gt;localStorageEnabled())
+        return 0;
+
</ins><span class="cx">     LocalStorage* localStorage = page-&gt;group().localStorage();
</span><span class="cx">     RefPtr&lt;StorageArea&gt; storageArea = localStorage ? localStorage-&gt;storageArea(m_frame, document-&gt;securityOrigin()) : 0; 
</span><span class="cx">     if (storageArea)
</span><span class="lines">@@ -801,6 +806,10 @@
</span><span class="cx">     if (!doc)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><ins>+    Settings* settings = m_frame-&gt;settings();
+    if (!settings || !settings-&gt;databasesEnabled())
+        return 0;
+
</ins><span class="cx">     return Database::openDatabase(doc, name, version, displayName, estimatedSize, ec);
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkWebCorepageSettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/page/Settings.cpp (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/page/Settings.cpp        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebCore/page/Settings.cpp        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -33,10 +33,6 @@
</span><span class="cx"> #include &quot;PageCache.h&quot;
</span><span class="cx"> #include &lt;limits&gt;
</span><span class="cx"> 
</span><del>-#if ENABLE(DATABASE)
-#include &quot;DatabaseTracker.h&quot;
-#endif
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static void setNeedsReapplyStylesInAllFrames(Page* page)
</span><span class="lines">@@ -60,6 +56,8 @@
</span><span class="cx">     , m_loadsImagesAutomatically(false)
</span><span class="cx">     , m_privateBrowsingEnabled(false)
</span><span class="cx">     , m_arePluginsEnabled(false)
</span><ins>+    , m_databasesEnabled(false)
+    , m_localStorageEnabled(false)
</ins><span class="cx">     , m_isJavaScriptEnabled(false)
</span><span class="cx">     , m_javaScriptCanOpenWindowsAutomatically(false)
</span><span class="cx">     , m_shouldPrintBackgrounds(false)
</span><span class="lines">@@ -202,6 +200,16 @@
</span><span class="cx">     m_arePluginsEnabled = arePluginsEnabled;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Settings::setDatabasesEnabled(bool databasesEnabled)
+{
+    m_databasesEnabled = databasesEnabled;
+}
+
+void Settings::setLocalStorageEnabled(bool localStorageEnabled)
+{
+    m_localStorageEnabled = localStorageEnabled;
+}
+
</ins><span class="cx"> void Settings::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
</span><span class="cx"> {
</span><span class="cx">     m_privateBrowsingEnabled = privateBrowsingEnabled;
</span></span></pre></div>
<a id="trunkWebCorepageSettingsh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/page/Settings.h (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/page/Settings.h        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebCore/page/Settings.h        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -92,6 +92,12 @@
</span><span class="cx">         void setPluginsEnabled(bool);
</span><span class="cx">         bool arePluginsEnabled() const { return m_arePluginsEnabled; }
</span><span class="cx"> 
</span><ins>+        void setDatabasesEnabled(bool);
+        bool databasesEnabled() const { return m_databasesEnabled; }
+
+        void setLocalStorageEnabled(bool);
+        bool localStorageEnabled() const { return m_localStorageEnabled; }
+
</ins><span class="cx">         void setPrivateBrowsingEnabled(bool);
</span><span class="cx">         bool privateBrowsingEnabled() const { return m_privateBrowsingEnabled; }
</span><span class="cx">         
</span><span class="lines">@@ -206,6 +212,8 @@
</span><span class="cx">         bool m_loadsImagesAutomatically : 1;
</span><span class="cx">         bool m_privateBrowsingEnabled : 1;
</span><span class="cx">         bool m_arePluginsEnabled : 1;
</span><ins>+        bool m_databasesEnabled : 1;
+        bool m_localStorageEnabled : 1;
</ins><span class="cx">         bool m_isJavaScriptEnabled : 1;
</span><span class="cx">         bool m_javaScriptCanOpenWindowsAutomatically : 1;
</span><span class="cx">         bool m_shouldPrintBackgrounds : 1;
</span></span></pre></div>
<a id="trunkWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/ChangeLog (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/ChangeLog        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebKit/mac/ChangeLog        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2008-11-08  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        Reviewed by Darin Adler.
+
+        - WebKit/mac part of adding WebPreferences for controlling databases and local storage
+
+        * WebView/WebPreferenceKeysPrivate.h: Added
+        WebKitDatabasesEnabledPreferenceKey and
+        WebKitLocalStorageEnabledPreferenceKey.
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]): Made databases and local storage enabled
+        by default.
+        (-[WebPreferences databasesEnabled]): Added.
+        (-[WebPreferences setDatabasesEnabled:]): Added.
+        (-[WebPreferences localStorageEnabled]): Added.
+        (-[WebPreferences setLocalStorageEnabled:]): Added.
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChangedNotification:]): Transfer the databases
+        and local storage preferences to WebCore settings.
+
</ins><span class="cx"> 2008-11-06  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Kevin Decker.
</span></span></pre></div>
<a id="trunkWebKitmacWebViewWebPreferenceKeysPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -50,6 +50,8 @@
</span><span class="cx"> #define WebKitJavaScriptEnabledPreferenceKey @&quot;WebKitJavaScriptEnabled&quot;
</span><span class="cx"> #define WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey @&quot;WebKitJavaScriptCanOpenWindowsAutomatically&quot;
</span><span class="cx"> #define WebKitPluginsEnabledPreferenceKey @&quot;WebKitPluginsEnabled&quot;
</span><ins>+#define WebKitDatabasesEnabledPreferenceKey @&quot;WebKitDatabasesEnabledPreferenceKey&quot;
+#define WebKitLocalStorageEnabledPreferenceKey @&quot;WebKitLocalStorageEnabledPreferenceKey&quot;
</ins><span class="cx"> #define WebKitAllowAnimatedImagesPreferenceKey @&quot;WebKitAllowAnimatedImagesPreferenceKey&quot;
</span><span class="cx"> #define WebKitAllowAnimatedImageLoopingPreferenceKey @&quot;WebKitAllowAnimatedImageLoopingPreferenceKey&quot;
</span><span class="cx"> #define WebKitDisplayImagesKey @&quot;WebKitDisplayImagesKey&quot;
</span></span></pre></div>
<a id="trunkWebKitmacWebViewWebPreferencesmm"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/WebView/WebPreferences.mm (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/WebView/WebPreferences.mm        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebKit/mac/WebView/WebPreferences.mm        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -315,6 +315,8 @@
</span><span class="cx">         [NSNumber numberWithBool:YES],  WebKitJavaScriptEnabledPreferenceKey,
</span><span class="cx">         [NSNumber numberWithBool:YES],  WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey,
</span><span class="cx">         [NSNumber numberWithBool:YES],  WebKitPluginsEnabledPreferenceKey,
</span><ins>+        [NSNumber numberWithBool:YES],  WebKitDatabasesEnabledPreferenceKey,
+        [NSNumber numberWithBool:YES],  WebKitLocalStorageEnabledPreferenceKey,
</ins><span class="cx">         [NSNumber numberWithBool:YES],  WebKitAllowAnimatedImagesPreferenceKey,
</span><span class="cx">         [NSNumber numberWithBool:YES],  WebKitAllowAnimatedImageLoopingPreferenceKey,
</span><span class="cx">         [NSNumber numberWithBool:YES],  WebKitDisplayImagesKey,
</span><span class="lines">@@ -915,6 +917,26 @@
</span><span class="cx">     [self _setBoolValue:newValue forKey:WebKitUseSiteSpecificSpoofingPreferenceKey];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (BOOL)databasesEnabled
+{
+    return [self _boolValueForKey:WebKitDatabasesEnabledPreferenceKey];
+}
+
+- (void)setDatabasesEnabled:(BOOL)databasesEnabled
+{
+    [self _setBoolValue:databasesEnabled forKey:WebKitDatabasesEnabledPreferenceKey];
+}
+
+- (BOOL)localStorageEnabled
+{
+    return [self _boolValueForKey:WebKitLocalStorageEnabledPreferenceKey];
+}
+
+- (void)setLocalStorageEnabled:(BOOL)localStorageEnabled
+{
+    [self _setBoolValue:localStorageEnabled forKey:WebKitLocalStorageEnabledPreferenceKey];
+}
+
</ins><span class="cx"> + (WebPreferences *)_getInstanceForIdentifier:(NSString *)ident
</span><span class="cx"> {
</span><span class="cx">     LOG(Encoding, &quot;requesting for %@\n&quot;, ident);
</span></span></pre></div>
<a id="trunkWebKitmacWebViewWebPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/WebView/WebPreferencesPrivate.h (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/WebView/WebPreferencesPrivate.h        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebKit/mac/WebView/WebPreferencesPrivate.h        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -77,6 +77,12 @@
</span><span class="cx"> - (BOOL)offlineWebApplicationCacheEnabled;
</span><span class="cx"> - (void)setOfflineWebApplicationCacheEnabled:(BOOL)offlineWebApplicationCacheEnabled;
</span><span class="cx"> 
</span><ins>+- (BOOL)databasesEnabled;
+- (void)setDatabasesEnabled:(BOOL)databasesEnabled;
+
+- (BOOL)localStorageEnabled;
+- (void)setLocalStorageEnabled:(BOOL)localStorageEnabled;
+
</ins><span class="cx"> - (BOOL)zoomsTextOnly;
</span><span class="cx"> - (void)setZoomsTextOnly:(BOOL)zoomsTextOnly;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/WebView/WebView.mm (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/WebView/WebView.mm        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebKit/mac/WebView/WebView.mm        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -1283,6 +1283,8 @@
</span><span class="cx">     settings-&gt;setMinimumFontSize([preferences minimumFontSize]);
</span><span class="cx">     settings-&gt;setMinimumLogicalFontSize([preferences minimumLogicalFontSize]);
</span><span class="cx">     settings-&gt;setPluginsEnabled([preferences arePlugInsEnabled]);
</span><ins>+    settings-&gt;setDatabasesEnabled([preferences databasesEnabled]);
+    settings-&gt;setLocalStorageEnabled([preferences localStorageEnabled]);
</ins><span class="cx">     settings-&gt;setPrivateBrowsingEnabled([preferences privateBrowsingEnabled]);
</span><span class="cx">     settings-&gt;setSansSerifFontFamily([preferences sansSerifFontFamily]);
</span><span class="cx">     settings-&gt;setSerifFontFamily([preferences serifFontFamily]);
</span></span></pre></div>
<a id="trunkWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/win/ChangeLog (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/win/ChangeLog        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebKit/win/ChangeLog        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2008-11-08  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        Reviewed by Darin Adler.
+
+        - WebKit/win part of adding WebPreferences for controlling databases and local storage
+
+        * Interfaces/IWebPreferencesPrivate.idl: Declared setDatabasesEnabled,
+        databasesEnabled, setLocalStorageEnabled and localStorageEnabled.
+        * WebPreferenceKeysPrivate.h: Added WebKitDatabasesEnabledPreferenceKey
+        and WebKitLocalStorageEnabledPreferenceKey.
+        * WebPreferences.cpp:
+        (WebPreferences::initializeDefaultSettings): Made databases and local
+        storage enabled by default.
+        (WebPreferences::setDatabasesEnabled): Added.
+        (WebPreferences::databasesEnabled): Added.
+        (WebPreferences::setLocalStorageEnabled): Added.
+        (WebPreferences::localStorageEnabled): Added.
+        * WebPreferences.h:
+        * WebView.cpp:
+        (WebView::notifyPreferencesChanged): Transfer the databases and local
+        storage preferences to WebCore settings.
+
</ins><span class="cx"> 2008-11-06  John Sullivan  &lt;sullivan@apple.com&gt;
</span><span class="cx">     
</span><span class="cx">         Eliminated one of the two booleans tracking whether zoom was text-only, to avoid future problems.
</span></span></pre></div>
<a id="trunkWebKitwinInterfacesIWebPreferencesPrivateidl"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/win/Interfaces/IWebPreferencesPrivate.idl (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/win/Interfaces/IWebPreferencesPrivate.idl        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebKit/win/Interfaces/IWebPreferencesPrivate.idl        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -60,4 +60,10 @@
</span><span class="cx"> 
</span><span class="cx">     HRESULT setShouldPaintNativeControls([in] BOOL shouldPaint);
</span><span class="cx">     HRESULT shouldPaintNativeControls([out, retval] BOOL* enabled);
</span><ins>+
+    HRESULT setDatabasesEnabled([in] BOOL enabled);
+    HRESULT databasesEnabled([out, retval] BOOL *enabled);
+
+    HRESULT setLocalStorageEnabled([in] BOOL enabled);
+    HRESULT localStorageEnabled([out, retval] BOOL *enabled);
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkWebKitwinWebPreferenceKeysPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/win/WebPreferenceKeysPrivate.h (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/win/WebPreferenceKeysPrivate.h        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebKit/win/WebPreferenceKeysPrivate.h        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -49,6 +49,8 @@
</span><span class="cx"> #define WebKitJavaScriptEnabledPreferenceKey &quot;WebKitJavaScriptEnabled&quot;
</span><span class="cx"> #define WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey &quot;WebKitJavaScriptCanOpenWindowsAutomatically&quot;
</span><span class="cx"> #define WebKitPluginsEnabledPreferenceKey &quot;WebKitPluginsEnabled&quot;
</span><ins>+#define WebKitDatabasesEnabledPreferenceKey &quot;WebKitDatabasesEnabled&quot;
+#define WebKitLocalStorageEnabledPreferenceKey &quot;WebKitLocalStorageEnabled&quot;
</ins><span class="cx"> #define WebKitAllowAnimatedImagesPreferenceKey &quot;WebKitAllowAnimatedImagesPreferenceKey&quot;
</span><span class="cx"> #define WebKitAllowAnimatedImageLoopingPreferenceKey &quot;WebKitAllowAnimatedImageLoopingPreferenceKey&quot;
</span><span class="cx"> #define WebKitDisplayImagesKey &quot;WebKitDisplayImagesKey&quot;
</span></span></pre></div>
<a id="trunkWebKitwinWebPreferencescpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/win/WebPreferences.cpp (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/win/WebPreferences.cpp        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebKit/win/WebPreferences.cpp        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -202,6 +202,8 @@
</span><span class="cx">     CFDictionaryAddValue(defaults, CFSTR(WebKitJavaScriptEnabledPreferenceKey), kCFBooleanTrue);
</span><span class="cx">     CFDictionaryAddValue(defaults, CFSTR(WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey), kCFBooleanTrue);
</span><span class="cx">     CFDictionaryAddValue(defaults, CFSTR(WebKitPluginsEnabledPreferenceKey), kCFBooleanTrue);
</span><ins>+    CFDictionaryAddValue(defaults, CFSTR(WebKitDatabasesEnabledPreferenceKey), kCFBooleanTrue);
+    CFDictionaryAddValue(defaults, CFSTR(WebKitLocalStorageEnabledPreferenceKey), kCFBooleanTrue);
</ins><span class="cx">     CFDictionaryAddValue(defaults, CFSTR(WebKitAllowAnimatedImagesPreferenceKey), kCFBooleanTrue);
</span><span class="cx">     CFDictionaryAddValue(defaults, CFSTR(WebKitAllowAnimatedImageLoopingPreferenceKey), kCFBooleanTrue);
</span><span class="cx">     CFDictionaryAddValue(defaults, CFSTR(WebKitDisplayImagesKey), kCFBooleanTrue);
</span><span class="lines">@@ -1173,6 +1175,30 @@
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+HRESULT STDMETHODCALLTYPE WebPreferences::setDatabasesEnabled(BOOL enabled)
+{
+    setBoolValue(CFSTR(WebKitDatabasesEnabledPreferenceKey), enabled);
+    return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE WebPreferences::databasesEnabled(BOOL* enabled)
+{
+    *enabled = boolValueForKey(CFSTR(WebKitDatabasesEnabledPreferenceKey));
+    return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE WebPreferences::setLocalStorageEnabled(BOOL enabled)
+{
+    setBoolValue(CFSTR(WebKitLocalStorageEnabledPreferenceKey), enabled);
+    return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE WebPreferences::localStorageEnabled(BOOL* enabled)
+{
+    *enabled = boolValueForKey(CFSTR(WebKitLocalStorageEnabledPreferenceKey));
+    return S_OK;
+}
+
</ins><span class="cx"> HRESULT STDMETHODCALLTYPE WebPreferences::localStorageDatabasePath(BSTR* location)
</span><span class="cx"> {
</span><span class="cx">     *location = stringValueForKey(CFSTR(WebKitLocalStorageDatabasePathPreferenceKey));
</span></span></pre></div>
<a id="trunkWebKitwinWebPreferencesh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/win/WebPreferences.h (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/win/WebPreferences.h        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebKit/win/WebPreferences.h        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -308,6 +308,18 @@
</span><span class="cx">     virtual HRESULT STDMETHODCALLTYPE offlineWebApplicationCacheEnabled( 
</span><span class="cx">         /* [retval][out] */ BOOL *enabled);
</span><span class="cx"> 
</span><ins>+    virtual HRESULT STDMETHODCALLTYPE setDatabasesEnabled( 
+        /* [in] */ BOOL enabled);
+        
+    virtual HRESULT STDMETHODCALLTYPE databasesEnabled( 
+        /* [retval][out] */ BOOL *enabled);
+
+    virtual HRESULT STDMETHODCALLTYPE setLocalStorageEnabled( 
+        /* [in] */ BOOL enabled);
+        
+    virtual HRESULT STDMETHODCALLTYPE localStorageEnabled( 
+        /* [retval][out] */ BOOL *enabled);
+
</ins><span class="cx">     virtual HRESULT STDMETHODCALLTYPE localStorageDatabasePath(
</span><span class="cx">         /* [out, retval] */ BSTR* location);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/win/WebView.cpp (38233 => 38234)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/win/WebView.cpp        2008-11-08 13:57:54 UTC (rev 38233)
+++ trunk/WebKit/win/WebView.cpp        2008-11-08 19:12:23 UTC (rev 38234)
</span><span class="lines">@@ -4155,6 +4155,16 @@
</span><span class="cx">         return hr;
</span><span class="cx">     settings-&gt;setOfflineWebApplicationCacheEnabled(enabled);
</span><span class="cx"> 
</span><ins>+    hr = prefsPrivate-&gt;databasesEnabled(&amp;enabled);
+    if (FAILED(hr))
+        return hr;
+    settings-&gt;setDatabasesEnabled(enabled);
+
+    hr = prefsPrivate-&gt;localStorageEnabled(&amp;enabled);
+    if (FAILED(hr))
+        return hr;
+    settings-&gt;setLocalStorageEnabled(enabled);
+
</ins><span class="cx"> #if USE(SAFARI_THEME)
</span><span class="cx">     hr = prefsPrivate-&gt;shouldPaintNativeControls(&amp;enabled);
</span><span class="cx">     if (FAILED(hr))
</span></span></pre>
</div>
</div>

</body>
</html>