Reviewed by Brady
authorsullivan@apple.com <sullivan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Dec 2007 17:07:55 +0000 (17:07 +0000)
committersullivan@apple.com <sullivan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Dec 2007 17:07:55 +0000 (17:07 +0000)
        - fixed <rdar://problem/5652380> Initial prompt shows "" for databases with no user-visible name

        * storage/DatabaseTracker.cpp:
        (WebCore::DatabaseTracker::canEstablishDatabase):
        pass "name" instead of "displayName" if there's no displayName

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28829 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/storage/DatabaseTracker.cpp

index 05adf3713dafa26434d7fcd54e83e4818d4c3151..36eb3907a409c3b9c49c6f99ba0b9ca714cdfdfe 100644 (file)
@@ -1,3 +1,13 @@
+2007-12-18  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Brady
+        
+        - fixed <rdar://problem/5652380> Initial prompt shows "" for databases with no user-visible name
+
+        * storage/DatabaseTracker.cpp:
+        (WebCore::DatabaseTracker::canEstablishDatabase):
+        pass "name" instead of "displayName" if there's no displayName
+
 2007-12-17  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Maciej Stachowiak.
 2007-12-17  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Maciej Stachowiak.
index 6af1dfc475c0494f53ad5be6f0264f0ffcb65903..399c7832071bad04c4cdbbb81b25d1cdf88fd330 100644 (file)
@@ -145,7 +145,8 @@ bool DatabaseTracker::canEstablishDatabase(Document* document, const String& nam
     if (!(page = document->page()))
         return false;
     
     if (!(page = document->page()))
         return false;
     
-    unsigned long long newQuota = page->chrome()->requestQuotaIncreaseForNewDatabase(document->frame(), originData, displayName, estimatedSize);
+    // If no displayName was specified, pass the standard (required) name instead
+    unsigned long long newQuota = page->chrome()->requestQuotaIncreaseForNewDatabase(document->frame(), originData, displayName.length() > 0 ? displayName : name, estimatedSize);
     setQuota(originData, newQuota);
     
     return usage + estimatedSize <= newQuota;
     setQuota(originData, newQuota);
     
     return usage + estimatedSize <= newQuota;