<!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>[177960] trunk/Source</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/177960">177960</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2015-01-06 08:54:19 -0800 (Tue, 06 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add a DatabaseProvider subclass in WebKit2 and use it for IndexedDB
https://bugs.webkit.org/show_bug.cgi?id=140108

Reviewed by Darin Adler.

Source/WebCore:

* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::indexedDB):
Get the IDBFactoryBackendInterface from the database provider.

* page/DatabaseProvider.cpp:
(WebCore::DatabaseProvider::idbFactoryBackend):
Change this to return a pointer.

* page/Page.h:
(WebCore::Page::databaseProvider):
Add a getter.

Source/WebKit2:

* CMakeLists.txt:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Databases/WebDatabaseProvider.cpp: Added.
(WebKit::databaseProviders):
(WebKit::WebDatabaseProvider::getOrCreate):
(WebKit::WebDatabaseProvider::WebDatabaseProvider):
(WebKit::WebDatabaseProvider::~WebDatabaseProvider):
(WebKit::WebDatabaseProvider::createIDBFactoryBackend):
* WebProcess/Databases/WebDatabaseProvider.h: Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbDOMWindowIndexedDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorepageDatabaseProvidercpp">trunk/Source/WebCore/page/DatabaseProvider.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDatabaseProviderh">trunk/Source/WebCore/page/DatabaseProvider.h</a></li>
<li><a href="#trunkSourceWebCorepagePageh">trunk/Source/WebCore/page/Page.h</a></li>
<li><a href="#trunkSourceWebKit2CMakeListstxt">trunk/Source/WebKit2/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesWebDatabaseProvidercpp">trunk/Source/WebKit2/WebProcess/Databases/WebDatabaseProvider.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesWebDatabaseProviderh">trunk/Source/WebKit2/WebProcess/Databases/WebDatabaseProvider.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (177959 => 177960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-06 16:52:15 UTC (rev 177959)
+++ trunk/Source/WebCore/ChangeLog        2015-01-06 16:54:19 UTC (rev 177960)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2015-01-05  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Add a DatabaseProvider subclass in WebKit2 and use it for IndexedDB
+        https://bugs.webkit.org/show_bug.cgi?id=140108
+
+        Reviewed by Darin Adler.
+
+        * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
+        (WebCore::DOMWindowIndexedDatabase::indexedDB):
+        Get the IDBFactoryBackendInterface from the database provider.
+
+        * page/DatabaseProvider.cpp:
+        (WebCore::DatabaseProvider::idbFactoryBackend):
+        Change this to return a pointer.
+
+        * page/Page.h:
+        (WebCore::Page::databaseProvider):
+        Add a getter.
+
</ins><span class="cx"> 2015-01-06  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Another build fix attempt.
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbDOMWindowIndexedDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp (177959 => 177960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp        2015-01-06 16:52:15 UTC (rev 177959)
+++ trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp        2015-01-06 16:54:19 UTC (rev 177960)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DOMWindow.h&quot;
</span><ins>+#include &quot;DatabaseProvider.h&quot;
</ins><span class="cx"> #include &quot;Document.h&quot;
</span><span class="cx"> #include &quot;IDBFactory.h&quot;
</span><span class="cx"> #include &quot;Page.h&quot;
</span><span class="lines">@@ -111,8 +112,11 @@
</span><span class="cx">     if (!m_window-&gt;isCurrentlyDisplayedInFrame())
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    if (!m_idbFactory)
-        m_idbFactory = IDBFactory::create(PageGroupIndexedDatabase::from(page-&gt;group())-&gt;factoryBackend());
</del><ins>+    if (!m_idbFactory) {
+        if (DatabaseProvider* databaseProvider = page-&gt;databaseProvider())
+            m_idbFactory = IDBFactory::create(databaseProvider-&gt;idbFactoryBackend());
+    }
+
</ins><span class="cx">     return m_idbFactory.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (177959 => 177960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2015-01-06 16:52:15 UTC (rev 177959)
+++ trunk/Source/WebCore/WebCore.exp.in        2015-01-06 16:54:19 UTC (rev 177960)
</span><span class="lines">@@ -683,6 +683,7 @@
</span><span class="cx"> __ZN7WebCore16ApplicationCache20deleteCacheForOriginEPNS_14SecurityOriginE
</span><span class="cx"> __ZN7WebCore16CSSParserContextC1ERNS_8DocumentERKNS_3URLERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore16CalculationValue6createENSt3__110unique_ptrINS_18CalcExpressionNodeENS1_14default_deleteIS3_EEEENS_30CalculationPermittedValueRangeE
</span><ins>+__ZN7WebCore16DatabaseProviderD2Ev
</ins><span class="cx"> __ZN7WebCore16DatabaseStrategy17getDatabaseServerEv
</span><span class="cx"> __ZN7WebCore16DatabaseStrategy23createIDBFactoryBackendEv
</span><span class="cx"> __ZN7WebCore16DeviceMotionData12Acceleration6createEbdbdbd
</span><span class="lines">@@ -2119,6 +2120,7 @@
</span><span class="cx"> __ZTVN7WebCore14StaticNodeListE
</span><span class="cx"> __ZTVN7WebCore15PlatformCALayerE
</span><span class="cx"> __ZTVN7WebCore16BlobRegistryImplE
</span><ins>+__ZTVN7WebCore16DatabaseProviderE
</ins><span class="cx"> __ZTVN7WebCore16DatabaseStrategyE
</span><span class="cx"> __ZTVN7WebCore16IconDatabaseBaseE
</span><span class="cx"> __ZTVN7WebCore17FrameLoaderClientE
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (177959 => 177960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-01-06 16:52:15 UTC (rev 177959)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-01-06 16:54:19 UTC (rev 177960)
</span><span class="lines">@@ -849,7 +849,7 @@
</span><span class="cx">                 1AC900C31943C0FC008625B5 /* HTTPHeaderNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC900C01943C0A0008625B5 /* HTTPHeaderNames.cpp */; };
</span><span class="cx">                 1ACADD791880D91C00D8B71D /* ProgressTrackerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACADD781880D91C00D8B71D /* ProgressTrackerClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1ACB2B231A5733F400333392 /* DatabaseProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB2B211A5733F400333392 /* DatabaseProvider.cpp */; };
</span><del>-                1ACB2B241A5733F400333392 /* DatabaseProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACB2B221A5733F400333392 /* DatabaseProvider.h */; };
</del><ins>+                1ACB2B241A5733F400333392 /* DatabaseProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACB2B221A5733F400333392 /* DatabaseProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 1ACD1B630B029739007E5016 /* DOMCSSStyleDeclarationInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85E711440AC5D5340053270F /* DOMCSSStyleDeclarationInternal.h */; };
</span><span class="cx">                 1ACE53DF0A8D18810022947D /* JSDOMParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACE53DD0A8D18810022947D /* JSDOMParser.cpp */; };
</span><span class="cx">                 1ACE53E00A8D18810022947D /* JSDOMParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACE53DE0A8D18810022947D /* JSDOMParser.h */; };
</span></span></pre></div>
<a id="trunkSourceWebCorepageDatabaseProvidercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DatabaseProvider.cpp (177959 => 177960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DatabaseProvider.cpp        2015-01-06 16:52:15 UTC (rev 177959)
+++ trunk/Source/WebCore/page/DatabaseProvider.cpp        2015-01-06 16:54:19 UTC (rev 177960)
</span><span class="lines">@@ -35,14 +35,14 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><del>-RefPtr&lt;IDBFactoryBackendInterface&gt; DatabaseProvider::idbFactoryBackend()
</del><ins>+IDBFactoryBackendInterface* DatabaseProvider::idbFactoryBackend()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_didCreateIDBFactoryBackendInterface) {
</span><span class="cx">         m_backendInterface = createIDBFactoryBackend();
</span><span class="cx">         m_didCreateIDBFactoryBackendInterface = true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return m_backendInterface;
</del><ins>+    return m_backendInterface.get();
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageDatabaseProviderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DatabaseProvider.h (177959 => 177960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DatabaseProvider.h        2015-01-06 16:52:15 UTC (rev 177959)
+++ trunk/Source/WebCore/page/DatabaseProvider.h        2015-01-06 16:54:19 UTC (rev 177960)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">     virtual ~DatabaseProvider();
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><del>-    RefPtr&lt;IDBFactoryBackendInterface&gt; idbFactoryBackend();
</del><ins>+    IDBFactoryBackendInterface* idbFactoryBackend();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.h (177959 => 177960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.h        2015-01-06 16:52:15 UTC (rev 177959)
+++ trunk/Source/WebCore/page/Page.h        2015-01-06 16:54:19 UTC (rev 177960)
</span><span class="lines">@@ -403,6 +403,8 @@
</span><span class="cx">     void setLastSpatialNavigationCandidateCount(unsigned count) { m_lastSpatialNavigationCandidatesCount = count; }
</span><span class="cx">     unsigned lastSpatialNavigationCandidateCount() const { return m_lastSpatialNavigationCandidatesCount; }
</span><span class="cx"> 
</span><ins>+    DatabaseProvider* databaseProvider() { return m_databaseProvider.get(); }
+
</ins><span class="cx">     StorageNamespaceProvider&amp; storageNamespaceProvider() { return m_storageNamespaceProvider.get(); }
</span><span class="cx">     void setStorageNamespaceProvider(Ref&lt;StorageNamespaceProvider&gt;&amp;&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2CMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/CMakeLists.txt (177959 => 177960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/CMakeLists.txt        2015-01-06 16:52:15 UTC (rev 177959)
+++ trunk/Source/WebKit2/CMakeLists.txt        2015-01-06 16:54:19 UTC (rev 177960)
</span><span class="lines">@@ -452,6 +452,7 @@
</span><span class="cx"> 
</span><span class="cx">     WebProcess/Cookies/WebCookieManager.cpp
</span><span class="cx"> 
</span><ins>+    WebProcess/Databases/WebDatabaseProvider.cpp
</ins><span class="cx">     WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp
</span><span class="cx"> 
</span><span class="cx">     WebProcess/FileAPI/BlobRegistryProxy.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (177959 => 177960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-01-06 16:52:15 UTC (rev 177959)
+++ trunk/Source/WebKit2/ChangeLog        2015-01-06 16:54:19 UTC (rev 177960)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2015-01-05  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Add a DatabaseProvider subclass in WebKit2 and use it for IndexedDB
+        https://bugs.webkit.org/show_bug.cgi?id=140108
+
+        Reviewed by Darin Adler.
+
+        * CMakeLists.txt:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/Databases/WebDatabaseProvider.cpp: Added.
+        (WebKit::databaseProviders):
+        (WebKit::WebDatabaseProvider::getOrCreate):
+        (WebKit::WebDatabaseProvider::WebDatabaseProvider):
+        (WebKit::WebDatabaseProvider::~WebDatabaseProvider):
+        (WebKit::WebDatabaseProvider::createIDBFactoryBackend):
+        * WebProcess/Databases/WebDatabaseProvider.h: Added.
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+
</ins><span class="cx"> 2015-01-05  Matt Baker  &lt;mattbaker@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: inspector view top inset should not include height of web view banners
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (177959 => 177960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-01-06 16:52:15 UTC (rev 177959)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-01-06 16:54:19 UTC (rev 177960)
</span><span class="lines">@@ -343,6 +343,8 @@
</span><span class="cx">                 1AA576021496B97900A4EE06 /* EventDispatcherMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA575FF1496B7C000A4EE06 /* EventDispatcherMessageReceiver.cpp */; };
</span><span class="cx">                 1AA5889211EE70400061B882 /* NetscapePluginStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA5889011EE70400061B882 /* NetscapePluginStream.h */; };
</span><span class="cx">                 1AA5889311EE70400061B882 /* NetscapePluginStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA5889111EE70400061B882 /* NetscapePluginStream.cpp */; };
</span><ins>+                1AA83F6C1A5B63FF00026EC6 /* WebDatabaseProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA83F6A1A5B63FF00026EC6 /* WebDatabaseProvider.cpp */; };
+                1AA83F6D1A5B63FF00026EC6 /* WebDatabaseProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA83F6B1A5B63FF00026EC6 /* WebDatabaseProvider.h */; };
</ins><span class="cx">                 1AA9BAE1184FFAC7003B6BC6 /* WeakObjCPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA9BAE0184FFAC7003B6BC6 /* WeakObjCPtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1AAB0379185A7C6A00EDF501 /* MessageSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAB0377185A7C6A00EDF501 /* MessageSender.cpp */; };
</span><span class="cx">                 1AAB037A185A7C6A00EDF501 /* MessageSender.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAB0378185A7C6A00EDF501 /* MessageSender.h */; };
</span><span class="lines">@@ -2352,6 +2354,8 @@
</span><span class="cx">                 1AA576001496B7C000A4EE06 /* EventDispatcherMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventDispatcherMessages.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AA5889011EE70400061B882 /* NetscapePluginStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetscapePluginStream.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AA5889111EE70400061B882 /* NetscapePluginStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetscapePluginStream.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1AA83F6A1A5B63FF00026EC6 /* WebDatabaseProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebDatabaseProvider.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AA83F6B1A5B63FF00026EC6 /* WebDatabaseProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDatabaseProvider.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1AA9BAE0184FFAC7003B6BC6 /* WeakObjCPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakObjCPtr.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AAB0377185A7C6A00EDF501 /* MessageSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MessageSender.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AAB0378185A7C6A00EDF501 /* MessageSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageSender.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -5344,6 +5348,8 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 511F8EDA180881660047DA96 /* IndexedDB */,
</span><ins>+                                1AA83F6A1A5B63FF00026EC6 /* WebDatabaseProvider.cpp */,
+                                1AA83F6B1A5B63FF00026EC6 /* WebDatabaseProvider.h */,
</ins><span class="cx">                                 51032F16180F73BB00961BB7 /* WebToDatabaseProcessConnection.cpp */,
</span><span class="cx">                                 51032F17180F73BB00961BB7 /* WebToDatabaseProcessConnection.h */,
</span><span class="cx">                         );
</span><span class="lines">@@ -7840,6 +7846,7 @@
</span><span class="cx">                                 BCD0139B110FA420003B8A67 /* WKFrame.h in Headers */,
</span><span class="cx">                                 1A4D664C18A3030E00D82E21 /* WKFrameInfo.h in Headers */,
</span><span class="cx">                                 1A4D664E18A3031B00D82E21 /* WKFrameInfoInternal.h in Headers */,
</span><ins>+                                1AA83F6D1A5B63FF00026EC6 /* WebDatabaseProvider.h in Headers */,
</ins><span class="cx">                                 BCB9F6A51123DD0D00A137E0 /* WKFramePolicyListener.h in Headers */,
</span><span class="cx">                                 E1AEA22F14687BDB00804569 /* WKFullKeyboardAccessWatcher.h in Headers */,
</span><span class="cx">                                 CDCA85C9132ABA4E00E961DF /* WKFullScreenWindowController.h in Headers */,
</span><span class="lines">@@ -9619,6 +9626,7 @@
</span><span class="cx">                                 26F10BE919187E2E001D0E68 /* WKSyntheticClickTapGestureRecognizer.m in Sources */,
</span><span class="cx">                                 0FCB4E6918BBE3D9000FCFC9 /* WKTextInputWindowController.mm in Sources */,
</span><span class="cx">                                 BC407607124FF0270068F20A /* WKType.cpp in Sources */,
</span><ins>+                                1AA83F6C1A5B63FF00026EC6 /* WebDatabaseProvider.cpp in Sources */,
</ins><span class="cx">                                 7CD5EBBE1746B04C000C1C45 /* WKTypeRefWrapper.mm in Sources */,
</span><span class="cx">                                 BC407609124FF0270068F20A /* WKURL.cpp in Sources */,
</span><span class="cx">                                 BC40761B124FF0370068F20A /* WKURLCF.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesWebDatabaseProvidercppfromrev177959trunkSourceWebCorepageDatabaseProvidercpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/WebProcess/Databases/WebDatabaseProvider.cpp (from rev 177959, trunk/Source/WebCore/page/DatabaseProvider.cpp) (0 => 177960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/WebDatabaseProvider.cpp                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/Databases/WebDatabaseProvider.cpp        2015-01-06 16:54:19 UTC (rev 177960)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebDatabaseProvider.h&quot;
+
+#include &quot;WebIDBFactoryBackend.h&quot;
+#include &lt;wtf/HashMap.h&gt;
+#include &lt;wtf/NeverDestroyed.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+static HashMap&lt;uint64_t, WebDatabaseProvider*&gt;&amp; databaseProviders()
+{
+    static NeverDestroyed&lt;HashMap&lt;uint64_t, WebDatabaseProvider*&gt;&gt; databaseProviders;
+
+    return databaseProviders;
+}
+
+Ref&lt;WebDatabaseProvider&gt; WebDatabaseProvider::getOrCreate(uint64_t identifier)
+{
+    auto&amp; slot = databaseProviders().add(identifier, nullptr).iterator-&gt;value;
+    if (slot)
+        return *slot;
+
+    Ref&lt;WebDatabaseProvider&gt; databaseProvider = adoptRef(*new WebDatabaseProvider(identifier));
+    slot = databaseProvider.ptr();
+
+    return databaseProvider;
+}
+
+WebDatabaseProvider::WebDatabaseProvider(uint64_t identifier)
+    : m_identifier(identifier)
+{
+}
+
+WebDatabaseProvider::~WebDatabaseProvider()
+{
+    ASSERT(databaseProviders().contains(m_identifier));
+
+    databaseProviders().remove(m_identifier);
+}
+
+#if ENABLE(INDEXED_DATABASE)
+RefPtr&lt;WebCore::IDBFactoryBackendInterface&gt; WebDatabaseProvider::createIDBFactoryBackend()
+{
+#if ENABLE(DATABASE_PROCESS)
+    return WebIDBFactoryBackend::create();
+#else
+    return nullptr;
+#endif
+}
+#endif
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesWebDatabaseProviderhfromrev177959trunkSourceWebCorepageDatabaseProvidercpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/WebProcess/Databases/WebDatabaseProvider.h (from rev 177959, trunk/Source/WebCore/page/DatabaseProvider.cpp) (0 => 177960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/WebDatabaseProvider.h                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/Databases/WebDatabaseProvider.h        2015-01-06 16:54:19 UTC (rev 177960)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebDatabaseProvider_h
+#define WebDatabaseProvider_h
+
+#include &lt;WebCore/DatabaseProvider.h&gt;
+
+namespace WebKit {
+
+class WebDatabaseProvider final : public WebCore::DatabaseProvider {
+public:
+    static Ref&lt;WebDatabaseProvider&gt; getOrCreate(uint64_t identifier);
+    virtual ~WebDatabaseProvider();
+
+private:
+    explicit WebDatabaseProvider(uint64_t identifier);
+
+#if ENABLE(INDEXED_DATABASE)
+    virtual RefPtr&lt;WebCore::IDBFactoryBackendInterface&gt; createIDBFactoryBackend() override;
+#endif
+
+    const uint64_t m_identifier;
+};
+
+}
+
+#endif // WebDatabaseProvider_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (177959 => 177960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-01-06 16:52:15 UTC (rev 177959)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-01-06 16:54:19 UTC (rev 177960)
</span><span class="lines">@@ -64,6 +64,7 @@
</span><span class="cx"> #include &quot;WebContextMenu.h&quot;
</span><span class="cx"> #include &quot;WebContextMenuClient.h&quot;
</span><span class="cx"> #include &quot;WebCoreArgumentCoders.h&quot;
</span><ins>+#include &quot;WebDatabaseProvider.h&quot;
</ins><span class="cx"> #include &quot;WebDiagnosticLoggingClient.h&quot;
</span><span class="cx"> #include &quot;WebDocumentLoader.h&quot;
</span><span class="cx"> #include &quot;WebDragClient.h&quot;
</span><span class="lines">@@ -371,6 +372,7 @@
</span><span class="cx">     pageConfiguration.progressTrackerClient = new WebProgressTrackerClient(*this);
</span><span class="cx">     pageConfiguration.diagnosticLoggingClient = new WebDiagnosticLoggingClient(*this);
</span><span class="cx"> 
</span><ins>+    pageConfiguration.databaseProvider = WebDatabaseProvider::getOrCreate(m_pageGroup-&gt;pageGroupID());
</ins><span class="cx">     pageConfiguration.storageNamespaceProvider = WebStorageNamespaceProvider::getOrCreate(m_pageGroup-&gt;pageGroupID());
</span><span class="cx">     pageConfiguration.userContentController = m_userContentController ? &amp;m_userContentController-&gt;userContentController() : &amp;m_pageGroup-&gt;userContentController();
</span><span class="cx">     pageConfiguration.visitedLinkStore = VisitedLinkTableController::getOrCreate(parameters.visitedLinkTableID);
</span></span></pre>
</div>
</div>

</body>
</html>