Changeset 140153 in webkit
- Timestamp:
- Jan 18, 2013 8:27:12 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/gtk/ChangeLog
r140148 r140153 1 2013-01-18 Martin Robinson <mrobinson@igalia.com> 2 3 [GTK] Add property for IndexedDB database path to WebKitGTK+ 4 https://bugs.webkit.org/show_bug.cgi?id=106136 5 6 Reviewed by Gustavo Noronha Silva. 7 8 Make the web database directory affect both the legacy SQLite web 9 database API and the newer indexed database API. This will allow us 10 to run IDB tests in WebKit1. 11 12 * webkit/webkitglobals.cpp: 13 (webkitPageGroupName): Added this helper to get the default page 14 group name. 15 * webkit/webkitglobalsprivate.h: Added a declaration for the helper. 16 * webkit/webkitwebdatabase.cpp: 17 (webkit_get_web_database_directory_path): Just return the cached value. 18 This is always set by webkitInit. 19 (webkit_set_web_database_directory_path): Set both the IDB and legacy 20 database paths. 21 * webkit/webkitwebview.cpp: 22 (webkit_web_view_init): Use the new page group name helper. 23 1 24 2013-01-18 Seokju Kwon <seokju.kwon@gmail.com> 2 25 -
trunk/Source/WebKit/gtk/webkit/webkitglobals.cpp
r137486 r140153 571 571 atexit(webkitExit); 572 572 } 573 574 const char* webkitPageGroupName() 575 { 576 return "org.webkit.gtk.WebKitGTK"; 577 } -
trunk/Source/WebKit/gtk/webkit/webkitglobalsprivate.h
r111914 r140153 34 34 35 35 void webkitInit(); 36 const char* webkitPageGroupName(); 36 37 37 38 } -
trunk/Source/WebKit/gtk/webkit/webkitwebdatabase.cpp
r137520 r140153 23 23 #include "DatabaseDetails.h" 24 24 #include "DatabaseManager.h" 25 #include "FileSystem.h" 26 #include "GroupSettings.h" 27 #include "PageGroup.h" 25 28 #include "webkitglobalsprivate.h" 26 29 #include "webkitsecurityoriginprivate.h" … … 75 78 }; 76 79 77 static gchar* webkit_database_directory_path = NULL;80 static CString gWebKitWebDatabasePath; 78 81 static guint64 webkit_default_database_quota = 5 * 1024 * 1024; 79 82 … … 458 461 * 459 462 * Returns the current path to the directory WebKit will write Web 460 * Database databases. By default this path will be in the user data461 * directory.462 * 463 * Returns: the current database directory path 463 * Database and Indexed Database databases. By default this path will 464 * be in the user data directory. 465 * 466 * Returns: the current database directory path in the filesystem encoding 464 467 * 465 468 * Since: 1.1.14 … … 467 470 const gchar* webkit_get_web_database_directory_path() 468 471 { 469 #if ENABLE(SQL_DATABASE) 470 WTF::String path = WebCore::DatabaseManager::manager().databaseDirectoryPath(); 471 472 if (path.isEmpty()) 473 return ""; 474 475 g_free(webkit_database_directory_path); 476 webkit_database_directory_path = g_strdup(path.utf8().data()); 477 return webkit_database_directory_path; 478 #else 479 return ""; 480 #endif 472 return gWebKitWebDatabasePath.data(); 481 473 } 482 474 483 475 /** 484 476 * webkit_set_web_database_directory_path: 485 * @path: the new database directory path 477 * @path: the new database directory path in the filesystem encoding 486 478 * 487 479 * Sets the current path to the directory WebKit will write Web 488 * Database databases.480 * Database and Indexed Database databases. 489 481 * 490 482 * Since: 1.1.14 … … 492 484 void webkit_set_web_database_directory_path(const gchar* path) 493 485 { 494 #if ENABLE(SQL_DATABASE) 495 WTF::String corePath = WTF::String::fromUTF8(path); 496 WebCore::DatabaseManager::manager().setDatabaseDirectoryPath(corePath); 497 498 g_free(webkit_database_directory_path); 499 webkit_database_directory_path = g_strdup(corePath.utf8().data()); 500 #endif 486 gWebKitWebDatabasePath = path; 487 488 String pathString = WebCore::filenameToString(path); 489 #if ENABLE(SQL_DATABASE) 490 WebCore::DatabaseManager::manager().setDatabaseDirectoryPath(pathString); 491 #endif 492 493 #if ENABLE(INDEXED_DATABASE) 494 WebCore::PageGroup::pageGroup(webkitPageGroupName())->groupSettings()->setIndexedDBDatabasePath(pathString); 495 #endif 496 501 497 } 502 498 -
trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp
r137520 r140153 3660 3660 // To keep the default behavior simple (and because no PageGroup API exist in WebKitGTK at the 3661 3661 // time of writing this comment), we simply set all the pages to the same group. 3662 priv->corePage->setGroupName( "org.webkit.gtk.WebKitGTK");3662 priv->corePage->setGroupName(webkitPageGroupName()); 3663 3663 3664 3664 // We also add a simple wrapper class to provide the public -
trunk/Tools/ChangeLog
r140146 r140153 1 2013-01-18 Martin Robinson <mrobinson@igalia.com> 2 3 [GTK] Add property for IndexedDB database path to WebKitGTK+ 4 https://bugs.webkit.org/show_bug.cgi?id=106136 5 6 Reviewed by Gustavo Noronha Silva. 7 8 During testing, set the web database directory to DUMPRENDERTREE_TEMP 9 before falling back to the old default. This is necessary because 10 indexed database tests require that each DRT shard is using a different 11 IDB database location. 12 13 * DumpRenderTree/gtk/DumpRenderTree.cpp: 14 (temporaryDatabaseDirectory): Added this helper for getting the 15 database directory. 16 (setDefaultsToConsistentStateValuesForTesting): Use the new helper. 17 1 18 2013-01-18 Sudarsana Nagineni <sudarsana.nagineni@intel.com> 2 19 -
trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
r138983 r140153 651 651 } 652 652 653 static CString temporaryDatabaseDirectory() 654 { 655 const char* directoryFromEnvironment = g_getenv("DUMPRENDERTREE_TEMP"); 656 if (directoryFromEnvironment) 657 return directoryFromEnvironment; 658 GOwnPtr<char> fallback(g_build_filename(g_get_user_data_dir(), "gtkwebkitdrt", "databases", NULL)); 659 return fallback.get(); 660 } 661 653 662 static void setDefaultsToConsistentStateValuesForTesting() 654 663 { … … 659 668 #endif 660 669 661 gchar* databaseDirectory = g_build_filename(g_get_user_data_dir(), "gtkwebkitdrt", "databases", NULL); 662 webkit_set_web_database_directory_path(databaseDirectory); 663 g_free(databaseDirectory); 670 webkit_set_web_database_directory_path(temporaryDatabaseDirectory().data()); 664 671 665 672 #if defined(GTK_API_VERSION_2)
Note: See TracChangeset
for help on using the changeset viewer.