<!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>[171160] 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/171160">171160</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2014-07-16 17:20:21 -0700 (Wed, 16 Jul 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add WebSecurityOrigin &quot;webSecurityOriginFromDatabaseIdentifier&quot; SPI and change _websiteDataURLForContainerWithURL: SPI

Source/WebCore:
https://bugs.webkit.org/show_bug.cgi?id=134984

Reviewed by Dan Bernstein.

* WebCore.exp.in:
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::maybeCreateFromDatabaseIdentifier): Add a form of createFromDatabaseIdentifier
    that can fail and return a nullptr.
(WebCore::SecurityOrigin::createFromDatabaseIdentifier): Use maybeCreateFromDatabaseIdentifier before creating
    the empty origin.
* page/SecurityOrigin.h:

Source/WebKit/mac:
&lt;rdar://problem/17454712&gt; and https://bugs.webkit.org/show_bug.cgi?id=134984

Reviewed by Dan Bernstein.

* WebCoreSupport/WebSecurityOrigin.mm:
(+[WebSecurityOrigin webSecurityOriginFromDatabaseIdentifier:]): Added.
(-[WebSecurityOrigin initWithURL:]): Update using RefPtr API to avoid a ref().
* WebCoreSupport/WebSecurityOriginPrivate.h:

Source/WebKit2:
&lt;rdar://problem/17454712&gt; and https://bugs.webkit.org/show_bug.cgi?id=134984

Reviewed by Dan Bernstein.

Change _websiteDataURLForContainerWithURL: SPI to include an optional bundle identifier argument:
* UIProcess/API/Cocoa/WKProcessPool.mm:
(+[WKProcessPool _websiteDataURLForContainerWithURL:bundleIdentifierIfNotInContainer:]):
(+[WKProcessPool _websiteDataURLForContainerWithURL:]): Deleted.
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

Add a big shiny comment in a few key places:
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::initializeDatabaseProcess):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
(WebKit::WebContext::ensureDatabaseProcess):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCorepageSecurityOrigincpp">trunk/Source/WebCore/page/SecurityOrigin.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSecurityOriginh">trunk/Source/WebCore/page/SecurityOrigin.h</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebSecurityOriginmm">trunk/Source/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebSecurityOriginPrivateh">trunk/Source/WebKit/mac/WebCoreSupport/WebSecurityOriginPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessDatabaseProcesscpp">trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabasecpp">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolPrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextcpp">trunk/Source/WebKit2/UIProcess/WebContext.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (171159 => 171160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-07-17 00:00:34 UTC (rev 171159)
+++ trunk/Source/WebCore/ChangeLog        2014-07-17 00:20:21 UTC (rev 171160)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2014-07-16  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Add WebSecurityOrigin &quot;webSecurityOriginFromDatabaseIdentifier&quot; SPI and change _websiteDataURLForContainerWithURL: SPI
+        &lt;rdar://problem/17454712&gt; and https://bugs.webkit.org/show_bug.cgi?id=134984
+
+        Reviewed by Dan Bernstein.
+
+        Change _websiteDataURLForContainerWithURL: SPI to include an optional bundle identifier argument:
+        * UIProcess/API/Cocoa/WKProcessPool.mm:
+        (+[WKProcessPool _websiteDataURLForContainerWithURL:bundleIdentifierIfNotInContainer:]):
+        (+[WKProcessPool _websiteDataURLForContainerWithURL:]): Deleted.
+        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
+
+        Add a big shiny comment in a few key places:
+        * DatabaseProcess/DatabaseProcess.cpp:
+        (WebKit::DatabaseProcess::initializeDatabaseProcess):
+        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
+        (WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
+        (WebKit::WebContext::ensureDatabaseProcess):
+
</ins><span class="cx"> 2014-07-16  Roger Fong  &lt;roger_fong@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Captions container should not clip content.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (171159 => 171160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-07-17 00:00:34 UTC (rev 171159)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-07-17 00:20:21 UTC (rev 171160)
</span><span class="lines">@@ -434,6 +434,7 @@
</span><span class="cx"> __ZN7WebCore14ScrollbarTheme5themeEv
</span><span class="cx"> __ZN7WebCore14SecurityOrigin16createFromStringERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore14SecurityOrigin28createFromDatabaseIdentifierERKN3WTF6StringE
</span><ins>+__ZN7WebCore14SecurityOrigin33maybeCreateFromDatabaseIdentifierERKN3WTF6StringE
</ins><span class="cx"> __ZN7WebCore14SecurityOrigin6createERKN3WTF6StringES4_i
</span><span class="cx"> __ZN7WebCore14SecurityOrigin6createERKNS_3URLE
</span><span class="cx"> __ZN7WebCore14SecurityPolicy18setLocalLoadPolicyENS0_15LocalLoadPolicyE
</span></span></pre></div>
<a id="trunkSourceWebCorepageSecurityOrigincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/SecurityOrigin.cpp (171159 => 171160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/SecurityOrigin.cpp        2014-07-17 00:00:34 UTC (rev 171159)
+++ trunk/Source/WebCore/page/SecurityOrigin.cpp        2014-07-17 00:20:21 UTC (rev 171160)
</span><span class="lines">@@ -495,33 +495,33 @@
</span><span class="cx"> 
</span><span class="cx"> static const char separatorCharacter = '_';
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;SecurityOrigin&gt; SecurityOrigin::createFromDatabaseIdentifier(const String&amp; databaseIdentifier)
</del><ins>+PassRefPtr&lt;SecurityOrigin&gt; SecurityOrigin::maybeCreateFromDatabaseIdentifier(const String&amp; databaseIdentifier)
</ins><span class="cx"> { 
</span><span class="cx">     // Make sure there's a first separator
</span><span class="cx">     size_t separator1 = databaseIdentifier.find(separatorCharacter);
</span><span class="cx">     if (separator1 == notFound)
</span><del>-        return create(URL());
</del><ins>+        return nullptr;
</ins><span class="cx">         
</span><span class="cx">     // Make sure there's a second separator
</span><span class="cx">     size_t separator2 = databaseIdentifier.reverseFind(separatorCharacter);
</span><span class="cx">     if (separator2 == notFound)
</span><del>-        return create(URL());
-        
</del><ins>+        return nullptr;
+
</ins><span class="cx">     // Ensure there were at least 2 separator characters. Some hostnames on intranets have
</span><span class="cx">     // underscores in them, so we'll assume that any additional underscores are part of the host.
</span><span class="cx">     if (separator1 == separator2)
</span><del>-        return create(URL());
-        
</del><ins>+        return nullptr;
+
</ins><span class="cx">     // Make sure the port section is a valid port number or doesn't exist
</span><span class="cx">     bool portOkay;
</span><span class="cx">     int port = databaseIdentifier.right(databaseIdentifier.length() - separator2 - 1).toInt(&amp;portOkay);
</span><span class="cx">     bool portAbsent = (separator2 == databaseIdentifier.length() - 1);
</span><span class="cx">     if (!(portOkay || portAbsent))
</span><del>-        return create(URL());
-    
</del><ins>+        return nullptr;
+
</ins><span class="cx">     if (port &lt; 0 || port &gt; MaxAllowedPort)
</span><del>-        return create(URL());
-        
</del><ins>+        return nullptr;
+
</ins><span class="cx">     // Split out the 3 sections of data
</span><span class="cx">     String protocol = databaseIdentifier.substring(0, separator1);
</span><span class="cx">     String host = databaseIdentifier.substring(separator1 + 1, separator2 - separator1 - 1);
</span><span class="lines">@@ -530,6 +530,14 @@
</span><span class="cx">     return create(URL(URL(), protocol + &quot;://&quot; + host + &quot;:&quot; + String::number(port) + &quot;/&quot;));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+PassRefPtr&lt;SecurityOrigin&gt; SecurityOrigin::createFromDatabaseIdentifier(const String&amp; databaseIdentifier)
+{
+    RefPtr&lt;SecurityOrigin&gt; origin = maybeCreateFromDatabaseIdentifier(databaseIdentifier);
+    if (origin)
+        return origin.release();
+    return create(URL());
+}
+
</ins><span class="cx"> PassRefPtr&lt;SecurityOrigin&gt; SecurityOrigin::create(const String&amp; protocol, const String&amp; host, int port)
</span><span class="cx"> {
</span><span class="cx">     if (port &lt; 0 || port &gt; MaxAllowedPort)
</span></span></pre></div>
<a id="trunkSourceWebCorepageSecurityOriginh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/SecurityOrigin.h (171159 => 171160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/SecurityOrigin.h        2014-07-17 00:00:34 UTC (rev 171159)
+++ trunk/Source/WebCore/page/SecurityOrigin.h        2014-07-17 00:20:21 UTC (rev 171160)
</span><span class="lines">@@ -54,6 +54,11 @@
</span><span class="cx">     static PassRefPtr&lt;SecurityOrigin&gt; createUnique();
</span><span class="cx"> 
</span><span class="cx">     static PassRefPtr&lt;SecurityOrigin&gt; createFromDatabaseIdentifier(const String&amp;);
</span><ins>+    // Alternate form of createFromDatabaseIdentifier that returns a nullptr on failure, instead of an empty origin.
+    // FIXME: Many users of createFromDatabaseIdentifier seem to expect maybeCreateFromDatabaseIdentifier behavior,
+    // but they aren't getting it so they might be buggy.
+    static PassRefPtr&lt;SecurityOrigin&gt; maybeCreateFromDatabaseIdentifier(const String&amp;);
+
</ins><span class="cx">     static PassRefPtr&lt;SecurityOrigin&gt; createFromString(const String&amp;);
</span><span class="cx">     static PassRefPtr&lt;SecurityOrigin&gt; create(const String&amp; protocol, const String&amp; host, int port);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (171159 => 171160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-07-17 00:00:34 UTC (rev 171159)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-07-17 00:20:21 UTC (rev 171160)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2014-07-16  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Add WebSecurityOrigin &quot;webSecurityOriginFromDatabaseIdentifier&quot; SPI and change _websiteDataURLForContainerWithURL: SPI
+        &lt;rdar://problem/17454712&gt; and https://bugs.webkit.org/show_bug.cgi?id=134984
+
+        Reviewed by Dan Bernstein.
+
+        * WebCoreSupport/WebSecurityOrigin.mm:
+        (+[WebSecurityOrigin webSecurityOriginFromDatabaseIdentifier:]): Added.
+        (-[WebSecurityOrigin initWithURL:]): Update using RefPtr API to avoid a ref().
+
</ins><span class="cx"> 2014-07-15  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [OSX] [WK1] Crash when exiting fullscreen
</span><span class="lines">@@ -14,6 +25,8 @@
</span><span class="cx">         * WebView/WebFullScreenController.mm:
</span><span class="cx">         (-[WebFullScreenController enterFullScreen:]):
</span><span class="cx"> 
</span><ins>+        * WebCoreSupport/WebSecurityOriginPrivate.h:
+
</ins><span class="cx"> 2014-07-14  Bear Travis  &lt;betravis@adobe.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Feature Queries] Enable Feature Queries on Mac
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebSecurityOriginmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm (171159 => 171160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm        2014-07-17 00:00:34 UTC (rev 171159)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm        2014-07-17 00:20:21 UTC (rev 171160)
</span><span class="lines">@@ -38,6 +38,16 @@
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><span class="cx"> @implementation WebSecurityOrigin
</span><ins>+
++ (id)webSecurityOriginFromDatabaseIdentifier:(NSString *)databaseIdentifier
+{
+    RefPtr&lt;SecurityOrigin&gt; origin = SecurityOrigin::maybeCreateFromDatabaseIdentifier(databaseIdentifier);
+    if (!origin)
+        return nil;
+
+    return [[[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:origin.get()] autorelease];
+}
+
</ins><span class="cx"> - (id)initWithURL:(NSURL *)url
</span><span class="cx"> {
</span><span class="cx">     self = [super init];
</span><span class="lines">@@ -45,8 +55,8 @@
</span><span class="cx">         return nil;
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;SecurityOrigin&gt; origin = SecurityOrigin::create(URL([url absoluteURL]));
</span><del>-    origin-&gt;ref();
-    _private = reinterpret_cast&lt;WebSecurityOriginPrivate *&gt;(origin.get());
</del><ins>+    SecurityOrigin* rawOrigin = origin.release().leakRef();
+    _private = reinterpret_cast&lt;WebSecurityOriginPrivate *&gt;(rawOrigin);
</ins><span class="cx"> 
</span><span class="cx">     return self;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebSecurityOriginPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebSecurityOriginPrivate.h (171159 => 171160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebSecurityOriginPrivate.h        2014-07-17 00:00:34 UTC (rev 171159)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebSecurityOriginPrivate.h        2014-07-17 00:20:21 UTC (rev 171160)
</span><span class="lines">@@ -35,6 +35,8 @@
</span><span class="cx">     id&lt;WebQuotaManager&gt; _databaseQuotaManager;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>++ (id)webSecurityOriginFromDatabaseIdentifier:(NSString *)databaseIdentifier;
+
</ins><span class="cx"> - (id)initWithURL:(NSURL *)url;
</span><span class="cx"> 
</span><span class="cx"> - (NSString *)protocol;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (171159 => 171160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-07-17 00:00:34 UTC (rev 171159)
+++ trunk/Source/WebKit2/ChangeLog        2014-07-17 00:20:21 UTC (rev 171160)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2014-07-16  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Add WebSecurityOrigin &quot;webSecurityOriginFromDatabaseIdentifier&quot; SPI and change _websiteDataURLForContainerWithURL: SPI
+        &lt;rdar://problem/17454712&gt; and https://bugs.webkit.org/show_bug.cgi?id=134984
+
+        Reviewed by Dan Bernstein.
+
+        Change _websiteDataURLForContainerWithURL: SPI to include an optional bundle identifier argument:
+        * UIProcess/API/Cocoa/WKProcessPool.mm:
+        (+[WKProcessPool _websiteDataURLForContainerWithURL:bundleIdentifierIfNotInContainer:]):
+        (+[WKProcessPool _websiteDataURLForContainerWithURL:]): Deleted.
+        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
+
+        Add a big shiny comment in a few key places:
+        * DatabaseProcess/DatabaseProcess.cpp:
+        (WebKit::DatabaseProcess::initializeDatabaseProcess):
+        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
+        (WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
+        (WebKit::WebContext::ensureDatabaseProcess):
+
</ins><span class="cx"> 2014-07-16  Enrica Casucci  &lt;enrica@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (iOS WebKit2): Cannot scroll while dragging a selection.
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessDatabaseProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp (171159 => 171160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp        2014-07-17 00:00:34 UTC (rev 171159)
+++ trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp        2014-07-17 00:20:21 UTC (rev 171160)
</span><span class="lines">@@ -97,6 +97,10 @@
</span><span class="cx"> 
</span><span class="cx"> void DatabaseProcess::initializeDatabaseProcess(const DatabaseProcessCreationParameters&amp; parameters)
</span><span class="cx"> {
</span><ins>+    // *********
+    // IMPORTANT: Do not change the directory structure for indexed databases on disk without first consulting a reviewer from Apple (&lt;rdar://problem/17454712&gt;)
+    // *********
+
</ins><span class="cx">     m_indexedDatabaseDirectory = parameters.indexedDatabaseDirectory;
</span><span class="cx">     SandboxExtension::consumePermanently(parameters.indexedDatabaseDirectoryExtensionHandle);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp (171159 => 171160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp        2014-07-17 00:00:34 UTC (rev 171159)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp        2014-07-17 00:20:21 UTC (rev 171160)
</span><span class="lines">@@ -62,6 +62,10 @@
</span><span class="cx">     if (m_inMemory)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    // *********
+    // IMPORTANT: Do not change the directory structure for indexed databases on disk without first consulting a reviewer from Apple (&lt;rdar://problem/17454712&gt;)
+    // *********
+
</ins><span class="cx">     // Each unique Indexed Database exists in a directory named for the database, which exists in a directory representing its opening origin.
</span><span class="cx">     m_databaseRelativeDirectory = pathByAppendingComponent(databaseFilenameIdentifier(identifier.openingOrigin()), filenameForDatabaseName());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm (171159 => 171160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm        2014-07-17 00:00:34 UTC (rev 171159)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm        2014-07-17 00:20:21 UTC (rev 171160)
</span><span class="lines">@@ -105,10 +105,14 @@
</span><span class="cx"> 
</span><span class="cx"> @implementation WKProcessPool (WKPrivate)
</span><span class="cx"> 
</span><del>-+ (NSURL *)_websiteDataURLForContainerWithURL:(NSURL *)containerURL
</del><ins>++ (NSURL *)_websiteDataURLForContainerWithURL:(NSURL *)containerURL bundleIdentifierIfNotInContainer:(NSString *)bundleIdentifier
</ins><span class="cx"> {
</span><span class="cx">     NSURL *url = [containerURL URLByAppendingPathComponent:@&quot;Library&quot; isDirectory:YES];
</span><span class="cx">     url = [url URLByAppendingPathComponent:@&quot;WebKit&quot; isDirectory:YES];
</span><ins>+
+    if (!WebKit::processHasContainer() &amp;&amp; bundleIdentifier)
+        url = [url URLByAppendingPathComponent:bundleIdentifier isDirectory:YES];
+
</ins><span class="cx">     return [url URLByAppendingPathComponent:@&quot;WebsiteData&quot; isDirectory:YES];
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h (171159 => 171160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h        2014-07-17 00:00:34 UTC (rev 171159)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h        2014-07-17 00:20:21 UTC (rev 171160)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> 
</span><span class="cx"> @property (nonatomic, weak, setter=_setDownloadDelegate:) id &lt;_WKDownloadDelegate&gt; _downloadDelegate;
</span><span class="cx"> 
</span><del>-+ (NSURL *)_websiteDataURLForContainerWithURL:(NSURL *)containerURL;
</del><ins>++ (NSURL *)_websiteDataURLForContainerWithURL:(NSURL *)containerURL bundleIdentifierIfNotInContainer:(NSString *)bundleIdentifier;
</ins><span class="cx"> 
</span><span class="cx"> @end
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (171159 => 171160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-07-17 00:00:34 UTC (rev 171159)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-07-17 00:20:21 UTC (rev 171160)
</span><span class="lines">@@ -129,6 +129,9 @@
</span><span class="cx">     if (!configuration.webSQLDatabaseDirectory)
</span><span class="cx">         configuration.webSQLDatabaseDirectory = platformDefaultWebSQLDatabaseDirectory();
</span><span class="cx"> 
</span><ins>+    // *********
+    // IMPORTANT: Do not change the directory structure for indexed databases on disk without first consulting a reviewer from Apple (&lt;rdar://problem/17454712&gt;)
+    // *********
</ins><span class="cx">     if (!configuration.indexedDBDatabaseDirectory)
</span><span class="cx">         configuration.indexedDBDatabaseDirectory = platformDefaultIndexedDBDatabaseDirectory();
</span><span class="cx"> }
</span><span class="lines">@@ -466,6 +469,9 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!m_indexedDBDatabaseDirectory.isEmpty());
</span><span class="cx"> 
</span><ins>+    // *********
+    // IMPORTANT: Do not change the directory structure for indexed databases on disk without first consulting a reviewer from Apple (&lt;rdar://problem/17454712&gt;)
+    // *********
</ins><span class="cx">     DatabaseProcessCreationParameters parameters;
</span><span class="cx">     parameters.indexedDatabaseDirectory = m_indexedDBDatabaseDirectory;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>