Changeset 150670 in webkit
- Timestamp:
- May 24, 2013 5:19:40 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r150665 r150670 1 2013-05-24 Brent Fulgham <bfulgham@apple.com> 2 3 [Windows] Expose database storage and cache locations via preferences. 4 https://bugs.webkit.org/show_bug.cgi?id=116729 5 6 Reviewed by Tim Horton. 7 8 * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Export 9 three symbols needed to implement the feature. 10 1 11 2013-05-24 Anders Carlsson <andersca@apple.com> 2 12 -
trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in
r150172 r150670 179 179 ?create@Range@WebCore@@SA?AV?$PassRefPtr@VRange@WebCore@@@WTF@@V?$PassRefPtr@VDocument@WebCore@@@4@V?$PassRefPtr@VNode@WebCore@@@4@H1H@Z 180 180 ?create@SerializedScriptValue@WebCore@@SA?AV?$PassRefPtr@VSerializedScriptValue@WebCore@@@WTF@@ABVString@4@@Z 181 #if USE(CF) 182 ?createCFString@String@WTF@@QBE?AV?$RetainPtr@PBU__CFString@@@2@XZ 183 #endif 181 184 ?createShadowRoot@Element@WebCore@@QAE?AV?$PassRefPtr@VShadowRoot@WebCore@@@WTF@@AAH@Z 182 185 ?createWrapper@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVNode@1@@Z … … 223 226 ?windowObjectCleared@InspectorFrontendClientLocal@WebCore@@UAEXXZ 224 227 ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z 228 ?pathByAppendingComponent@WebCore@@YA?AVString@WTF@@ABV23@0@Z 225 229 ?profilerEnabled@InspectorController@WebCore@@QAE_NXZ 226 230 ?setProfilerEnabled@InspectorController@WebCore@@QAEX_N@Z … … 238 242 ?lastChild@ComposedShadowTreeWalker@WebCore@@QAEXXZ 239 243 ?length@StaticNodeList@WebCore@@UBEIXZ 244 ?localUserSpecificStorageDirectory@WebCore@@YA?AVString@WTF@@XZ 240 245 ?namedItem@StaticNodeList@WebCore@@UBEPAVNode@2@ABVAtomicString@WTF@@@Z 241 246 ?next@ComposedShadowTreeWalker@WebCore@@QAEXXZ -
trunk/Source/WebKit/win/ChangeLog
r150663 r150670 1 2013-05-24 Brent Fulgham <bfulgham@apple.com> 2 3 [Windows] Expose database storage and cache locations via preferences. 4 https://bugs.webkit.org/show_bug.cgi?id=116729 5 6 Reviewed by Tim Horton. 7 8 * WebDatabaseManager.cpp: Update to check preferences for the 9 desired location of the database store. 10 (databasesDirectory): Added. 11 (WebKitInitializeWebDatabasesIfNecessary): Use new databasesDirectory 12 method to determine what system path to use for file storage. 13 * WebKit.vcproj/WebKitExports.def.in: Export three symbols 14 needed to implement the feature. 15 * WebView.cpp: Update to check preferences for the desired location 16 of the various caches used by WebKit. 17 (WebView::setCacheModel): Update to check preferences for URL cache 18 storage. 19 (WebKitSetApplicationCachePathIfNecessary): Update to check 20 preferences for ccache storage. 21 1 22 2013-05-24 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 23 -
trunk/Source/WebKit/win/WebDatabaseManager.cpp
r150115 r150670 48 48 using namespace WebCore; 49 49 50 static CFStringRef WebDatabaseDirectoryDefaultsKey = CFSTR("WebDatabaseDirectory"); 51 50 52 static inline bool isEqual(LPCWSTR s1, LPCWSTR s2) 51 53 { … … 406 408 } 407 409 410 static WTF::String databasesDirectory() 411 { 412 #if USE(CF) 413 RetainPtr<CFPropertyListRef> directoryPref = adoptCF(CFPreferencesCopyAppValue(WebDatabaseDirectoryDefaultsKey, kCFPreferencesCurrentApplication)); 414 if (directoryPref && (CFStringGetTypeID() == CFGetTypeID(directoryPref.get()))) 415 return static_cast<CFStringRef>(directoryPref.get()); 416 #endif 417 418 return WebCore::pathByAppendingComponent(WebCore::localUserSpecificStorageDirectory(), "Databases"); 419 } 420 408 421 void WebKitInitializeWebDatabasesIfNecessary() 409 422 { … … 412 425 return; 413 426 414 WTF::String databasesDirectory = WebCore::pathByAppendingComponent(WebCore::localUserSpecificStorageDirectory(), "Databases"); 415 WebCore::DatabaseManager::manager().initialize(databasesDirectory); 427 WebCore::DatabaseManager::manager().initialize(databasesDirectory()); 416 428 417 429 initialized = true; -
trunk/Source/WebKit/win/WebKit.vcproj/WebKitExports.def.in
r150172 r150670 179 179 ?create@Range@WebCore@@SA?AV?$PassRefPtr@VRange@WebCore@@@WTF@@V?$PassRefPtr@VDocument@WebCore@@@4@V?$PassRefPtr@VNode@WebCore@@@4@H1H@Z 180 180 ?create@SerializedScriptValue@WebCore@@SA?AV?$PassRefPtr@VSerializedScriptValue@WebCore@@@WTF@@ABVString@4@@Z 181 #if USE(CF) 182 ?createCFString@String@WTF@@QBE?AV?$RetainPtr@PBU__CFString@@@2@XZ 183 #endif 181 184 ?createShadowRoot@Element@WebCore@@QAE?AV?$PassRefPtr@VShadowRoot@WebCore@@@WTF@@AAH@Z 182 185 ?createWrapper@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVNode@1@@Z … … 223 226 ?windowObjectCleared@InspectorFrontendClientLocal@WebCore@@UAEXXZ 224 227 ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z 228 ?pathByAppendingComponent@WebCore@@YA?AVString@WTF@@ABV23@0@Z 225 229 ?profilerEnabled@InspectorController@WebCore@@QAE_NXZ 226 230 ?setProfilerEnabled@InspectorController@WebCore@@QAEX_N@Z … … 238 242 ?lastChild@ComposedShadowTreeWalker@WebCore@@QAEXXZ 239 243 ?length@StaticNodeList@WebCore@@UBEIXZ 244 ?localUserSpecificStorageDirectory@WebCore@@YA?AVString@WTF@@XZ 240 245 ?namedItem@StaticNodeList@WebCore@@UBEPAVNode@2@ABVAtomicString@WTF@@@Z 241 246 ?next@ComposedShadowTreeWalker@WebCore@@QAEXXZ -
trunk/Source/WebKit/win/WebView.cpp
r150663 r150670 196 196 static HashSet<WebView*> pendingDeleteBackingStoreSet; 197 197 198 static CFStringRef WebKitLocalCacheDefaultsKey = CFSTR("WebKitLocalCache"); 199 198 200 static String webKitVersionString(); 199 201 … … 479 481 RetainPtr<CFURLCacheRef> cfurlCache = adoptCF(CFURLCacheCopySharedURLCache()); 480 482 RetainPtr<CFStringRef> cfurlCacheDirectory = adoptCF(wkCopyFoundationCacheDirectory(0)); 481 if (!cfurlCacheDirectory) 482 cfurlCacheDirectory = WebCore::localUserSpecificStorageDirectory().createCFString(); 483 if (!cfurlCacheDirectory) { 484 RetainPtr<CFPropertyListRef> preference = adoptCF(CFPreferencesCopyAppValue(WebKitLocalCacheDefaultsKey, kCFPreferencesCurrentApplication)); 485 if (preference && (CFStringGetTypeID() == CFGetTypeID(preference.get()))) 486 cfurlCacheDirectory = adoptCF(static_cast<CFStringRef>(preference.leakRef())); 487 else 488 cfurlCacheDirectory = WebCore::localUserSpecificStorageDirectory().createCFString(); 489 } 483 490 484 491 // As a fudge factor, use 1000 instead of 1024, in case the reported byte … … 2598 2605 2599 2606 String path = localUserSpecificStorageDirectory(); 2607 2608 #if USE(CF) 2609 RetainPtr<CFPropertyListRef> cacheDirectoryPreference = adoptCF(CFPreferencesCopyAppValue(WebKitLocalCacheDefaultsKey, kCFPreferencesCurrentApplication)); 2610 if (cacheDirectoryPreference && (CFStringGetTypeID() == CFGetTypeID(cacheDirectoryPreference.get()))) 2611 path = static_cast<CFStringRef>(cacheDirectoryPreference.get()); 2612 #endif 2613 2600 2614 if (!path.isNull()) 2601 2615 cacheStorage().setCacheDirectory(path); -
trunk/Tools/ChangeLog
r150663 r150670 1 2013-05-24 Brent Fulgham <bfulgham@apple.com> 2 3 [Windows] Expose database storage and cache locations via preferences. 4 https://bugs.webkit.org/show_bug.cgi?id=116729 5 6 Reviewed by Tim Horton. 7 8 Update DumpRenderTree to use CFPreferences to control where WebKit 9 stores its local databases, URL caches, etc. 10 11 * DumpRenderTree/win/DumpRenderTree.cpp: 12 (libraryPathForDumpRenderTree): Added. 13 (dllLauncherEntryPoint): Set up DRT-specific cache locations. 14 * Scripts/webkitpy/port/base.py: 15 (Port._driver_tempdir): Added (to allow port-specific overload). 16 (Port._driver_tempdir_for_environment): Ditto 17 * Scripts/webkitpy/port/driver.py: 18 (Driver._setup_environ_for_driver): Use new overload to set 19 environment variable. 20 (Driver._start): Use new overload for temp directory location. 21 * Scripts/webkitpy/port/win.py: 22 (WinPort._driver_tempdir_for_environment): New overload to supply 23 Windows path to DumpRenderTree environment (while still using 24 cygwin paths for internal operations. 25 1 26 2013-05-24 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 27 -
trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp
r149855 r150670 55 55 #include <windows.h> 56 56 #include <CoreFoundation/CoreFoundation.h> 57 #include <WebCore/FileSystem.h> 57 58 #include <WebKit/WebKit.h> 58 59 #include <WebKit/WebKitCOMAPI.h> 59 60 60 61 #if USE(CFNETWORK) 62 #include <CFNetwork/CFHTTPCookiesPriv.h> 61 63 #include <CFNetwork/CFURLCachePriv.h> 62 #endif63 64 #if USE(CFNETWORK)65 #include <CFNetwork/CFHTTPCookiesPriv.h>66 64 #endif 67 65 … … 75 73 76 74 static LPCWSTR fontsEnvironmentVariable = L"WEBKIT_TESTFONTS"; 75 static LPCWSTR dumpRenderTreeTemp = L"DUMPRENDERTREE_TEMP"; 77 76 #define USE_MAC_FONTS 77 78 static CFStringRef WebDatabaseDirectoryDefaultsKey = CFSTR("WebDatabaseDirectory"); 79 static CFStringRef WebKitLocalCacheDefaultsKey = CFSTR("WebKitLocalCache"); 80 static CFStringRef WebStorageDirectoryDefaultsKey = CFSTR("WebKitLocalStorageDatabasePathPreferenceKey"); 78 81 79 82 const LPCWSTR kDumpRenderTreeClassName = L"DumpRenderTreeWindow"; … … 191 194 return string(utf8Vector.data(), utf8Vector.size() - 1); 192 195 } 196 197 #if USE(CF) 198 static String libraryPathForDumpRenderTree() 199 { 200 DWORD size = ::GetEnvironmentVariable(dumpRenderTreeTemp, 0, 0); 201 Vector<TCHAR> buffer(size); 202 if (::GetEnvironmentVariable(dumpRenderTreeTemp, buffer.data(), buffer.size())) { 203 wstring path = buffer.data(); 204 if (!path.empty() && (path[path.length() - 1] != L'\\')) 205 path.append(L"\\"); 206 return String (path.data(), path.length()); 207 } 208 209 return WebCore::localUserSpecificStorageDirectory(); 210 } 211 #endif 193 212 194 213 string toUTF8(BSTR bstr) … … 1276 1295 } 1277 1296 1297 #if USE(CF) 1298 // Set up these values before creating the WebView so that the various initializations will see these preferred values. 1299 String path = libraryPathForDumpRenderTree(); 1300 CFPreferencesSetAppValue(WebDatabaseDirectoryDefaultsKey, WebCore::pathByAppendingComponent(path, "Databases").createCFString().get(), kCFPreferencesCurrentApplication); 1301 CFPreferencesSetAppValue(WebStorageDirectoryDefaultsKey, WebCore::pathByAppendingComponent(path, "LocalStorage").createCFString().get(), kCFPreferencesCurrentApplication); 1302 CFPreferencesSetAppValue(WebKitLocalCacheDefaultsKey, WebCore::pathByAppendingComponent(path, "LocalCache").createCFString().get(), kCFPreferencesCurrentApplication); 1303 #endif 1304 1278 1305 COMPtr<IWebView> webView(AdoptCOM, createWebViewAndOffscreenWindow(&webViewWindow)); 1279 1306 if (!webView) -
trunk/Tools/Scripts/webkitpy/port/base.py
r150128 r150670 1266 1266 return self._build_path(self.driver_name()) 1267 1267 1268 def _driver_tempdir(self): 1269 return self._filesystem.mkdtemp(prefix='%s-' % self.driver_name()) 1270 1271 def _driver_tempdir_for_environment(self): 1272 return self._driver_tempdir() 1273 1268 1274 def _path_to_webcore_library(self): 1269 1275 """Returns the full path to a built copy of WebCore.""" -
trunk/Tools/Scripts/webkitpy/port/driver.py
r150416 r150670 285 285 environment['DYLD_FRAMEWORK_PATH'] = self._port._build_path() 286 286 # FIXME: We're assuming that WebKitTestRunner checks this DumpRenderTree-named environment variable. 287 environment['DUMPRENDERTREE_TEMP'] = str(self._ driver_tempdir)287 environment['DUMPRENDERTREE_TEMP'] = str(self._port._driver_tempdir_for_environment()) 288 288 environment['LOCAL_RESOURCE_ROOT'] = self._port.layout_tests_dir() 289 289 if 'WEBKITOUTPUTDIR' in os.environ: … … 295 295 def _start(self, pixel_tests, per_test_args): 296 296 self.stop() 297 self._driver_tempdir = self._port._ filesystem.mkdtemp(prefix='%s-' % self._port.driver_name())297 self._driver_tempdir = self._port._driver_tempdir() 298 298 server_name = self._port.driver_name() 299 299 environment = self._port.setup_environ_for_server(server_name) -
trunk/Tools/Scripts/webkitpy/port/win.py
r150619 r150670 33 33 from webkitpy.common.system.systemhost import SystemHost 34 34 from webkitpy.common.system.executive import ScriptError, Executive 35 from webkitpy.common.system.path import abspath_to_uri 35 from webkitpy.common.system.path import abspath_to_uri, cygpath 36 36 from webkitpy.port.apple import ApplePort 37 37 … … 116 116 def default_child_processes(self): 117 117 return 1 118 119 def _driver_tempdir_for_environment(self): 120 return cygpath(self._driver_tempdir())
Note: See TracChangeset
for help on using the changeset viewer.