[EFL] Fix a crash on MiniBrowser when running on debug mode
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-06-09  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2
3         [EFL] Fix a crash on MiniBrowser when running on debug mode
4         https://bugs.webkit.org/show_bug.cgi?id=145793
5
6         Reviewed by Carlos Garcia Campos.
7
8         r185314 missed to initialize parameters.diskCacheDirectory with configuration's one.
9
10         * UIProcess/efl/WebProcessPoolEfl.cpp:
11         (WebKit::WebProcessPool::platformInitializeWebProcess):
12
13 2015-06-09  Csaba Osztrogonác  <ossy@webkit.org>
14
15         [cmake] Fix the style issues in cmake project files
16         https://bugs.webkit.org/show_bug.cgi?id=145755
17
18         Reviewed by Darin Adler.
19
20         * CMakeLists.txt:
21         * PlatformGTK.cmake:
22         * PlatformMac.cmake:
23
24 2015-06-02  Jon Honeycutt  <jhoneycutt@apple.com>
25
26         [iOS] UI process memory spike, hang when uploading a very large JPEG
27
28         <https://bugs.webkit.org/show_bug.cgi?id=145567>
29         <rdar://problem/21206699>
30
31         When uploading an image, we generate a thumbnail to use for an icon
32         that sits next to the control. To do this, we load the image and draw
33         it into a thumbnail-sized canvas. This can be very expensive for large
34         images.
35
36         To fix this, we'll use CGImageSource API, which will allow us to get
37         any existing thumbnail that exists in the source file.
38
39         Reviewed by Darin Adler.
40
41         * UIProcess/ios/forms/WKFileUploadPanel.mm:
42         (squareCropRectForSize):
43         Use std::round, based on Darin's review feedback that a) rintf is
44         incorrect in 64-bit systems where CGFloat is a double, b) rintf uses a
45         variable rounding mode, which is undesirable.
46         (squareImage):
47         Changed to take a CGImageRef.
48         Use RetainPtr and +[UIImage imageWithCGImage:] to match other code in
49         this file.
50         (thumbnailSizedImageForImage):
51         Changed to take a CGImageRef and to use iconSideLength.
52         (iconForImageFile):
53         Create an image source for the file, then use CGImageSource API to
54         generate a thumbnail.
55         (-[_WKImageFileUploadItem initWithFileURL:originalImage:]): Deleted.
56         (-[_WKImageFileUploadItem displayImage]):
57         Use iconForImageFile() rather than trying to generate an icon from the
58         UIImage.
59         (-[WKFileUploadPanel _uploadItemForImageData:imageName:successBlock:failureBlock:]):
60         Removed originalImage parameter; _WKImageFileUploadItem no longer uses
61         it.
62         (-[WKFileUploadPanel _uploadItemForJPEGRepresentationOfImage:successBlock:failureBlock:]):
63         (-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]):
64
65 2015-06-08  Dan Bernstein  <mitz@apple.com>
66
67         [Cocoa] Use generics in framework headers
68         https://bugs.webkit.org/show_bug.cgi?id=145781
69
70         Reviewed by Sam Weinig.
71
72         * mac/postprocess-framework-headers.sh: Use the parameter to WK_ARRAY and WK_SET.
73
74 2015-06-08  Chris Dumez  <cdumez@apple.com>
75
76         Access GCController instance via GCController::singleton() instead of a free function
77         https://bugs.webkit.org/show_bug.cgi?id=145776
78
79         Reviewed by Darin Adler.
80
81         Access GCController instance via GCController::singleton() instead of a
82         free function as per coding style and for consistency with other
83         singleton classes in the codebase.
84
85         * WebProcess/InjectedBundle/InjectedBundle.cpp:
86         (WebKit::InjectedBundle::garbageCollectJavaScriptObjects):
87         (WebKit::InjectedBundle::garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging):
88         * WebProcess/WebProcess.cpp:
89         (WebKit::WebProcess::terminate):
90         (WebKit::WebProcess::didClose):
91         (WebKit::WebProcess::garbageCollectJavaScriptObjects):
92         (WebKit::WebProcess::setJavaScriptGarbageCollectorTimerEnabled):
93
94 2015-06-08  Anders Carlsson  <andersca@apple.com>
95
96         Include IndexedDB databases in -[WKWebsiteDataStore allWebsiteDataTypes]
97         https://bugs.webkit.org/show_bug.cgi?id=145775
98
99         Reviewed by Simon Fraser.
100
101         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
102         (+[WKWebsiteDataStore allWebsiteDataTypes]):
103
104 2015-06-08  Anders Carlsson  <andersca@apple.com>
105
106         Move the snapshot layer contents SPI to the web view
107         https://bugs.webkit.org/show_bug.cgi?id=145771
108
109         Reviewed by Geoffrey Garen.
110
111         We need to potentially ask the web page to take a snapshot of the current item,
112         so move the SPI to WKWebView and name it appropriately.
113
114         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
115         (-[WKBackForwardListItem _snapshotLayerContents]): Deleted.
116         * UIProcess/API/Cocoa/WKBackForwardListItemPrivate.h: Removed.
117         * UIProcess/API/Cocoa/WKWebView.mm:
118         (-[WKWebView _snapshotLayerContentsForBackForwardListItem:]):
119         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
120         * WebKit2.xcodeproj/project.pbxproj:
121
122 2015-06-08  Brady Eidson  <beidson@apple.com>
123
124         Completely remove all IDB properties/constructors when it is disabled at runtime.
125         rdar://problem/18429374 and https://bugs.webkit.org/show_bug.cgi?id=137034
126
127         Reviewed by Geoffrey Garen.
128
129         * WebProcess/WebProcess.cpp:
130         (WebKit::WebProcess::WebProcess): Enable IDB at runtime if it's enabled at compile time.
131
132 2015-06-08  Michael Catanzaro  <mcatanzaro@igalia.com>
133
134         [SOUP] Performs DNS prefetch when a proxy is configured (information leak)
135         https://bugs.webkit.org/show_bug.cgi?id=145542
136
137         Reviewed by Alexey Proskuryakov.
138
139         Add documentation to webkit_web_context_prefetch_dns to indicate that the function does
140         nothing if the system configuration indicates we should use a proxy to resolve the host.
141
142         * UIProcess/API/gtk/WebKitWebContext.cpp:
143
144 2015-06-08  Carlos Garcia Campos  <cgarcia@igalia.com>
145
146         REGRESSION(r185251): [GTK] webkit_web_context_set_disk_cache_directory() doesn't work when using shared secondary process model after r185251
147         https://bugs.webkit.org/show_bug.cgi?id=145751
148
149         Reviewed by Darin Adler.
150
151         In r185251 the CFNetwork cache was disabled in the web process,
152         but it also removed the disk cache directory web process
153         initialization parameter. While we support networking in the web
154         process when shared secondary process model is used, the network
155         cache should still work. We can remove this if we eventually
156         switch to use the network process unconditionally.
157
158         * Shared/WebProcessCreationParameters.cpp:
159         (WebKit::WebProcessCreationParameters::encode): Encode disk cache directory.
160         (WebKit::WebProcessCreationParameters::decode): Decode disk cache directory.
161         * Shared/WebProcessCreationParameters.h: Bring back disk cache directory only for soup.
162         * UIProcess/gtk/WebProcessPoolGtk.cpp:
163         (WebKit::WebProcessPool::platformInitializeWebProcess): Initialize disk cache directory parameter.
164         * WebProcess/soup/WebProcessSoup.cpp:
165         (WebKit::WebProcess::platformInitializeWebProcess): Use the disck cache directory parameter again.
166
167 2015-06-08  Csaba Osztrogonác  <ossy@webkit.org>
168
169         [GTK] Remove the unused scroll function from WebPageGtk.cpp
170         https://bugs.webkit.org/show_bug.cgi?id=145756
171
172         Reviewed by Carlos Garcia Campos.
173
174         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
175         (WebKit::scroll): Deleted.
176
177 2015-06-08  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
178
179         REGRESSION(r185262): [EFL] Modify legacyPlatformDefaultNetworkCacheDirectory() according to network cache
180         https://bugs.webkit.org/show_bug.cgi?id=145752
181
182         Reviewed by Carlos Garcia Campos.
183
184         EFL port needs to add different prefix for network cache directory since r185262.
185         Modify it basedon GTK port fix.
186
187         * UIProcess/efl/WebProcessPoolEfl.cpp:
188         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
189
190 2015-06-07  Carlos Garcia Campos  <cgarcia@igalia.com>
191
192         REGRESSION(r185262): [GTK] webkit_web_context_set_disk_cache_directory() doesn't work after r185262
193         https://bugs.webkit.org/show_bug.cgi?id=145735
194
195         Reviewed by Darin Adler.
196
197         * NetworkProcess/soup/NetworkProcessSoup.cpp:
198         (WebKit::NetworkProcess::platformInitializeNetworkProcess): Use
199         the directory name to clear the old cache, since the disk cache
200         subdirectory is now added in the UI process.
201         * UIProcess/API/gtk/WebKitWebContext.cpp:
202         (webkit_web_context_set_disk_cache_directory): Update the
203         WebProcessPool configuration to override the disk cache directory.
204         * UIProcess/WebProcessPool.cpp:
205         (WebKit::WebProcessPool::ensureNetworkProcess): Use the
206         configuration to get the disk cache directory.
207         (WebKit::WebProcessPool::WebProcessPool): Remove
208         m_diskCacheDirectory member initialization.
209         * UIProcess/WebProcessPool.h: Remove m_diskCacheDirectory member.
210         * UIProcess/gtk/WebProcessPoolGtk.cpp:
211         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
212         Append the disk cache subdirectory.
213
214 2015-06-07  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
215
216         [EFL][GTK] Fix build  break since r185262
217         https://bugs.webkit.org/show_bug.cgi?id=145724
218
219         Unreviewed, fix build break for EFL and GTK ports.
220
221         * UIProcess/API/APIWebsiteDataStore.cpp:
222         (API::WebsiteDataStore::defaultLocalStorageDirectory):
223         (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
224         (API::WebsiteDataStore::defaultNetworkCacheDirectory):
225         (API::WebsiteDataStore::defaultApplicationCacheDirectory):
226         (API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
227         (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
228         * UIProcess/efl/WebProcessPoolEfl.cpp:
229         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
230         (WebKit::WebProcessPool::platformDefaultDiskCacheDirectory): Deleted.
231         * WebProcess/soup/WebProcessSoup.cpp:
232         (WebKit::WebProcess::platformInitializeWebProcess):
233
234 2015-06-06  Dan Bernstein  <mitz@apple.com>
235
236         Don’t enable manual sandboxing in the iOS Simulator. This should fix all the tests timing out.
237
238         * Configurations/DebugRelease.xcconfig:
239
240 2015-06-06  Dan Bernstein  <mitz@apple.com>
241
242         [iOS] Can’t debug with Development XPC services due to automatic sandboxing
243         https://bugs.webkit.org/show_bug.cgi?id=145731
244
245         Rubber-stamped by Darin Adler.
246
247         In iOS, the XPC services are automatically sandboxed based on their entitlements. The
248         sandbox doesn’t allow them to re-exec, which is necessary for linking against engineering
249         builds of the WebKit frameworks placed in a non-system location.
250
251         The solution is to opt Engineering builds into manual sandboxing.
252
253         * Configurations/BaseTarget.xcconfig:
254         - Add ENABLE_MANUAL_SANDBOXING to
255           GCC_PREPROCESSOR_DEFINITIONS when WK_MANUAL_SANDBOXING_ENABLED is YES.
256         - Set WK_MANUAL_SANDBOXING_ENABLED to YES for OS X, because we always use manual
257           sandboxing on that platform.
258
259         * Configurations/DebugRelease.xcconfig: Removed unused definition of DEBUG_OR_RELEASE. Set
260           WK_MANUAL_SANDBOXING_ENABLED to YES for all engineering builds.
261
262         * Configurations/BaseXPCService.xcconfig: Define CODE_SIGN_ENTITLEMENTS for iOS to be empty
263           if the service is not installed; to use the base entitlements file from Configurations if
264           manual sandboxing is not enabled; and to use a derived entitlements file, which doesn’t
265           specify a sandbox profile, if manual sandboxing is enabled.
266
267         * Configurations/DatabaseService.Development.xcconfig: Define
268           WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE and let BaseXPCService.xcconfig define
269           CODE_SIGN_ENTITLEMENTS for iOS.
270
271         * Configurations/DatabaseService.xcconfig: Ditto.
272         * Configurations/NetworkService.Development.xcconfig: Ditto.
273         * Configurations/NetworkService.xcconfig: Ditto.
274         * Configurations/WebContentService.Development.xcconfig: Ditto.
275         * Configurations/WebContentService.xcconfig: Ditto.
276
277         * WebKit2.xcodeproj/project.pbxproj:
278         - In the Derived Sources target, added a Derive Entitlements for Manual Sandboxing script
279           build phase. When building for iOS with manual sandboxing enabled, it creates copies of
280           the iOS entitlements files with a -no-sandbox suffix and the seatbelt-profiles key
281           removed.
282         - In the WebKit target, added a Copy iOS Sandbox Profiles for Manual Sandboxing script build
283           phase. When building for iOS with manual sandboxing enabled, it copies the iOS sandbox
284           profiles into the framework, so that the services can apply them to themselves at runtime.
285
286         * Shared/ios/ChildProcessIOS.mm:
287         (WebKit::ChildProcess::initializeSandbox): Use ENABLE(MANUAL_SANDBOXING) and don’t define it
288         here.
289
290         * WebProcess/cocoa/WebProcessCocoa.mm:
291         (WebKit::WebProcess::initializeSandbox): Use ENABLE(MANUAL_SANDBOXING) instead of defining
292         and using ENABLE_MANUAL_WEBPROCESS_SANDBOXING here.
293
294 2015-06-06  Anders Carlsson  <andersca@apple.com>
295
296         Remove support from getting plug-in information from Carbon resources
297         https://bugs.webkit.org/show_bug.cgi?id=145730
298
299         Reviewed by Dan Bernstein.
300
301         No current plug-in versions use this feature, and both Chrome and Mozilla for
302         Mac stopped looking at Carbon resources years ago.
303
304         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
305         (WebKit::NetscapePluginModule::getPluginInfo):
306         (WebKit::ResourceMap::ResourceMap): Deleted.
307         (WebKit::ResourceMap::~ResourceMap): Deleted.
308         (WebKit::ResourceMap::isValid): Deleted.
309         (WebKit::getStringListResource): Deleted.
310         (WebKit::getPluginInfoFromCarbonResources): Deleted.
311
312 2015-06-05  Anders Carlsson  <andersca@apple.com>
313
314         Only allow plug-ins to create custom MIME property lists on older versions of OS X
315         https://bugs.webkit.org/show_bug.cgi?id=145716
316
317         Reviewed by Dan Bernstein.
318
319         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
320         * Shared/Plugins/Netscape/NetscapePluginModule.h:
321         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
322         (WebKit::getMIMETypesFromPluginBundle):
323         * UIProcess/Plugins/PluginProcessProxy.h:
324         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
325
326 2015-06-05  Chris Dumez  <cdumez@apple.com>
327
328         [WK2][iOS] Limit the number of vnodes used by the WebContent processes
329         https://bugs.webkit.org/show_bug.cgi?id=145672
330         <rdar://problem/21126637>
331
332         Reviewed by Antti Koivisto.
333
334         Have the WebContent process register a vnode pressure handler on iOS,
335         which calls the memory pressure handler.
336
337         On non-critical pressure, it will prune dead resources from the memory
338         cache, which should free up some vnodes. On critical pressure, the
339         handler will clear the PageCache and do a JS GC, which should free even
340         more vnodes.
341
342         * WebProcess/cocoa/WebProcessCocoa.mm:
343         (WebKit::WebProcess::platformInitializeWebProcess):
344
345 2015-06-05  Anders Carlsson  <andersca@apple.com>
346
347         Fix refacto, don't put IndexedDB databases in the cache directory
348         https://bugs.webkit.org/show_bug.cgi?id=145714
349
350         Reviewed by Antti Koivisto.
351
352         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
353         (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
354
355 2015-06-05  Anders Carlsson  <andersca@apple.com>
356
357         Make the network cache directory part of WKContextConfigurationRef
358         https://bugs.webkit.org/show_bug.cgi?id=145711
359
360         Reviewed by Antti Koivisto.
361
362         Also, make the UI process be in control of where we place the new network cache.
363         When using the Modern WebKit API, put the cache in ~/Library/Caches/<Bundle ID>/WebKit/NetworkCache,
364         and put the cache in ~/Library/Caches/<Bundle ID>/WebKitCache otherwise (this is just for Safari).
365
366         * NetworkProcess/cache/NetworkCacheStorage.cpp:
367         (WebKit::NetworkCache::Storage::open):
368         * UIProcess/API/APIProcessPoolConfiguration.cpp:
369         (API::ProcessPoolConfiguration::createWithLegacyOptions):
370         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
371         (API::ProcessPoolConfiguration::copy):
372         * UIProcess/API/APIProcessPoolConfiguration.h:
373         * UIProcess/API/C/WKContext.cpp:
374         (WKContextSetDiskCacheDirectory): Deleted.
375         * UIProcess/API/C/WKContextConfigurationRef.cpp:
376         (WKContextConfigurationCopyDiskCacheDirectory):
377         (WKContextConfigurationSetDiskCacheDirectory):
378         * UIProcess/API/C/WKContextConfigurationRef.h:
379         * UIProcess/API/C/WKContextPrivate.h:
380         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
381         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
382         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
383         (WebKit::WebProcessPool::isNetworkCacheEnabled):
384         (WebKit::WebProcessPool::platformDefaultDiskCacheDirectory): Deleted.
385         * UIProcess/WebProcessPool.cpp:
386         (WebKit::legacyWebsiteDataStoreConfiguration):
387         (WebKit::WebProcessPool::WebProcessPool):
388         (WebKit::WebProcessPool::ensureNetworkProcess):
389         (WebKit::WebProcessPool::diskCacheDirectory): Deleted.
390         * UIProcess/WebProcessPool.h:
391
392 2015-06-05  Anders Carlsson  <andersca@apple.com>
393
394         Make the application cache directory part of WKContextConfigurationRef
395         https://bugs.webkit.org/show_bug.cgi?id=145704
396
397         Reviewed by Geoffrey Garen.
398
399         * UIProcess/API/APIProcessPoolConfiguration.cpp:
400         (API::ProcessPoolConfiguration::createWithLegacyOptions):
401         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
402         (API::ProcessPoolConfiguration::copy):
403         * UIProcess/API/APIProcessPoolConfiguration.h:
404         * UIProcess/API/C/WKContext.cpp:
405         (WKContextSetApplicationCacheDirectory): Deleted.
406         * UIProcess/API/C/WKContextConfigurationRef.cpp:
407         (WKContextConfigurationCopyApplicationCacheDirectory):
408         (WKContextConfigurationSetApplicationCacheDirectory):
409         * UIProcess/API/C/WKContextConfigurationRef.h:
410         * UIProcess/API/C/WKContextPrivate.h:
411         * UIProcess/WebProcessPool.cpp:
412         (WebKit::WebProcessPool::WebProcessPool):
413         (WebKit::WebProcessPool::createNewWebProcess):
414         (WebKit::WebProcessPool::applicationCacheDirectory): Deleted.
415         * UIProcess/WebProcessPool.h:
416
417 2015-06-05  Mark Lam  <mark.lam@apple.com>
418
419         finally blocks should not set the exception stack trace when re-throwing the exception.
420         https://bugs.webkit.org/show_bug.cgi?id=145525
421
422         Reviewed by Geoffrey Garen.
423
424         * WebProcess/InjectedBundle/InjectedBundle.cpp:
425         (WebKit::InjectedBundle::reportException):
426         - Changed to use the new Exception object.
427
428 2015-06-05  Anders Carlsson  <andersca@apple.com>
429
430         Disable the CFNetwork cache in the web process
431         https://bugs.webkit.org/show_bug.cgi?id=145700
432         rdar://problem/20243343
433
434         Reviewed by Geoffrey Garen.
435
436         * NetworkProcess/cache/NetworkCacheStorage.cpp:
437         (WebKit::NetworkCache::Storage::open):
438         * Shared/WebProcessCreationParameters.cpp:
439         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
440         (WebKit::WebProcessCreationParameters::encode): Deleted.
441         (WebKit::WebProcessCreationParameters::decode): Deleted.
442         * Shared/WebProcessCreationParameters.h:
443         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
444         (WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
445         * UIProcess/WebProcessPool.cpp:
446         (WebKit::WebProcessPool::createNewWebProcess): Deleted.
447         * WebProcess/WebProcess.cpp:
448         (WebKit::WebProcess::WebProcess): Deleted.
449         (WebKit::WebProcess::initializeWebProcess): Deleted.
450         * WebProcess/WebProcess.h:
451         * WebProcess/cocoa/WebProcessCocoa.mm:
452         (WebKit::WebProcess::platformClearResourceCaches):
453         (WebKit::WebProcess::platformInitializeWebProcess):
454         (WebKit::WebProcess::platformSetCacheModel): Deleted.
455         (WebKit::WebProcess::platformTerminate): Deleted.
456
457 2015-06-05  Anders Carlsson  <andersca@apple.com>
458
459         Consolidate default website data directory computations
460         https://bugs.webkit.org/show_bug.cgi?id=145698
461
462         Reviewed by Andreas Kling.
463
464         * UIProcess/API/APIProcessPoolConfiguration.cpp:
465         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
466         * UIProcess/API/APIWebsiteDataStore.h:
467         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
468         (API::WebsiteDataStore::defaultApplicationCacheDirectory):
469         (API::WebsiteDataStore::defaultNetworkCacheDirectory):
470         (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
471         (API::WebsiteDataStore::defaultLocalStorageDirectory):
472         (API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
473         (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
474         (API::WebsiteDataStore::defaultDataStoreConfiguration):
475         (API::applicationCacheDirectory): Deleted.
476
477 2015-06-01  Jon Honeycutt  <jhoneycutt@apple.com>
478
479         [iOS] Uploading an animated GIF from the photo library uploads a JPEG
480
481         <https://bugs.webkit.org/show_bug.cgi?id=145539>
482         <rdar://problem/19760877
483
484         Selecting a photo from the photo library using UIImagePickerController
485         results in an NSDictionary with image info and a UIImage with the
486         image. It's not possible to get the original image data from the
487         UIImage, only a PNG or JPEG representation, so we were getting a JPEG
488         representation and uploading that to the server. For animated GIFs,
489         this meant a JPEG representation of the first frame.
490
491         To fix this, we'll get the asset URL, if available, and use the Photos
492         API to query for the original image data.
493
494         Reviewed by Andy Estes and Joe Pecoraro.
495
496         * UIProcess/ios/forms/WKFileUploadPanel.mm:
497         Soft link the Photos framework.
498
499         (-[WKFileUploadPanel _uploadItemForImageData:originalImage:imageName:successBlock:failureBlock:]):
500         Save the image's data to a temporary location, and create a
501         _WKImageFileUploadItem. Code moved from
502         -_uploadItemFromMediaInfo:successBlock:failureBlock:.
503
504         (-[WKFileUploadPanel _uploadItemForJPEGRepresentationOfImage:successBlock:failureBlock:]):
505         Get a JPEG representation of the UIImage, and create an upload item
506         from that data.
507
508         (uploadImageNameFromUTI):
509         Return a filename for the uploaded image based on the UTI.
510
511         (-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]):
512         Fetch the photo asset with the given asset URL. Create an image manager
513         object, and request the image data for the photo asset. Create an
514         upload item from that data. If we fail, fall back to a JPEG
515         representation.
516
517         (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
518         Return early if the media item is not an image type. If it is, and we
519         have an asset URL, try to create an upload item for the native image.
520         If we don't have an asset URL, use a JPEG representation of the image.
521
522 2015-06-04  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
523
524         REGRESSION(r185091): Crash happens on indexdb tests
525         https://bugs.webkit.org/show_bug.cgi?id=145549
526
527         Reviewed by Darin Adler.
528
529         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp: Remove leakRef() use.
530         (WebKit::WebIDBServerConnection::didCreateObjectStore):
531         (WebKit::WebIDBServerConnection::didCreateIndex):
532         (WebKit::WebIDBServerConnection::didDeleteIndex):
533         (WebKit::WebIDBServerConnection::didPutRecord):
534         (WebKit::WebIDBServerConnection::didGetRecord):
535         (WebKit::WebIDBServerConnection::didOpenCursor):
536         (WebKit::WebIDBServerConnection::didAdvanceCursor):
537         (WebKit::WebIDBServerConnection::didIterateCursor):
538         (WebKit::WebIDBServerConnection::didCount):
539         (WebKit::WebIDBServerConnection::didDeleteRange):
540         (WebKit::WebIDBServerConnection::didClearObjectStore):
541         (WebKit::WebIDBServerConnection::didDeleteObjectStore):
542         (WebKit::WebIDBServerConnection::didChangeDatabaseVersion):
543
544 2015-06-04  Joseph Pecoraro  <pecoraro@apple.com>
545
546         Web Inspector: REGRESSION: dragged node in the DOM Tree isn't positioned correctly
547         https://bugs.webkit.org/show_bug.cgi?id=143912
548
549         Reviewed by Simon Fraser.
550
551         * UIProcess/mac/PageClientImpl.mm:
552         (WebKit::PageClientImpl::setDragImage):
553         When using the WKWebView, convert the position from the WKView's
554         coordinate system to the WKWebView's.
555
556         * UIProcess/API/Cocoa/WKWebView.mm:
557         (-[WKWebView draggingUpdated:]):
558         * UIProcess/API/mac/WKView.mm:
559         (-[WKView _dragImageForView:withImage:at:linkDrag:]):
560         Whitespace cleanup in original drag code.
561
562 2015-06-04  Dan Bernstein  <mitz@apple.com>
563
564         Fixed the build.
565
566         * UIProcess/API/Cocoa/WKErrorPrivate.h:
567
568 2015-06-04  Dan Bernstein  <mitz@apple.com>
569
570         Renamed the WebKit2SandboxProfiles target to Sandbox Profiles.
571
572         Rubber-stamped by Anders Carlsson.
573
574         * WebKit2.xcodeproj/project.pbxproj: Renamed the target. For now, added an aggregate
575         target with the old name that depends on the renamed target. We can remove it once the build
576         system doesn’t reference to old name.
577
578 2015-06-03  Dan Bernstein  <mitz@apple.com>
579
580         [Cocoa] Expose interruptedForPolicyChangeError
581         https://bugs.webkit.org/show_bug.cgi?id=145627
582
583         Reviewed by Anders Carlsson.
584
585         * UIProcess/API/Cocoa/WKErrorPrivate.h: Added WKErrorCodeFrameLoadInterruptedByPolicyChange with the same value as
586         kWKErrorCodeFrameLoadInterruptedByPolicyChange.
587
588 2015-06-04  Chris Dumez  <cdumez@apple.com>
589
590         [WK2] Prune more resources from the MemoryCache before process suspension
591         https://bugs.webkit.org/show_bug.cgi?id=145633
592
593         Reviewed by Andreas Kling.
594
595         * NetworkProcess/NetworkProcess.cpp:
596         (WebKit::NetworkProcess::lowMemoryHandler):
597         (WebKit::NetworkProcess::initializeNetworkProcess):
598         (WebKit::NetworkProcess::processWillSuspendImminently):
599         (WebKit::NetworkProcess::prepareToSuspend):
600         * NetworkProcess/NetworkProcess.h:
601         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
602         (WebKit::NetworkProcess::platformLowMemoryHandler):
603         * PluginProcess/PluginProcess.cpp:
604         (WebKit::PluginProcess::initializeProcess):
605
606         Update low memory handler prototype to match WebCore changes.
607
608         * WebProcess/WebProcess.cpp:
609         (WebKit::WebProcess::actualPrepareToSuspend):
610
611         Pass Synchronous::Yes argument to MemoryPressureHandler::releaseMemory()
612         to request that the memory is free up synchronously (e.g. synchronous
613         JS garbage collection) as the process is about to be suspended.
614         Previously, the memory pressure handler was trying to detect this case
615         by checking if the system was really under memory pressure but this was
616         a bit hackish and it wouldn't work if the process happened to get
617         suspended while the system was under memory pressure.
618
619 2015-06-03  Carlos Alberto Lopez Perez  <clopez@igalia.com>
620
621         [GTK] [Wayland] Build is broken on trunk
622         https://bugs.webkit.org/show_bug.cgi?id=142879
623
624         Reviewed by Carlos Garcia Campos.
625
626         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
627         (WebKit::LayerTreeHostGtk::makeContextCurrent): When Wayland target
628         is enabled GLNativeWindowType is not an u_int64 type.
629         Cast contextID to avoid a build failure.
630
631 2015-06-03  Dan Bernstein  <mitz@apple.com>
632
633         Made WKBackForwardListItemPrivate.h a private header after it was added as internal in r185183.
634
635         * WebKit2.xcodeproj/project.pbxproj:
636
637 2015-06-03  Hyungwook Lee  <hyungwook.lee@navercorp.com>
638
639         [EFL] Implement window_object_cleared callback in EwkPageClient.
640         https://bugs.webkit.org/show_bug.cgi?id=145603
641
642         Reviewed by Gyuyoung Kim.
643
644         We need to provide right timing for custom JS API that may need to work at the beginning of the page.
645
646         * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
647         * WebProcess/InjectedBundle/API/efl/ewk_page.cpp:
648         (EwkPage::EwkPage):
649         (EwkPage::didStartProvisionalLoadForFrame):
650         (EwkPage::didClearWindowObjectForFrame):
651         (EwkPage::didFinishDocumentLoadForFrame):
652         * WebProcess/InjectedBundle/API/efl/ewk_page.h:
653         * WebProcess/InjectedBundle/API/efl/ewk_page_private.h:
654
655 2015-06-03  Anders Carlsson  <andersca@apple.com>
656
657         Add SPI that returns the snapshot layer contents for a given back/forward list item
658         https://bugs.webkit.org/show_bug.cgi?id=145621
659
660         Reviewed by Dan Bernstein.
661
662         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
663         (-[WKBackForwardListItem _snapshotLayerContents]):
664         * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
665         * UIProcess/API/Cocoa/WKBackForwardListItemPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItemInternal.h.
666         * WebKit2.xcodeproj/project.pbxproj:
667
668 2015-06-02  Hyungwook Lee  <hyungwook.lee@navercorp.com>
669
670         [EFL] Implement load_started callback in EwkPageClient.
671         https://bugs.webkit.org/show_bug.cgi?id=145545
672
673         Reviewed by Gyuyoung Kim.
674
675         We need to provide load_started callback to web extension module.
676
677         * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
678         * WebProcess/InjectedBundle/API/efl/ewk_page.cpp:
679         (EwkPage::EwkPage):
680         (EwkPage::remove):
681         (EwkPage::didStartProvisionalLoadForFrame):
682         (EwkPage::didFinishDocumentLoadForFrame):
683         * WebProcess/InjectedBundle/API/efl/ewk_page.h:
684         * WebProcess/InjectedBundle/API/efl/ewk_page_private.h:
685
686 2015-06-02  Gavin Barraclough  <barraclough@apple.com>
687
688         PDFs always think they're visible on iOS.
689         https://bugs.webkit.org/show_bug.cgi?id=145493
690         <rdar://problem/19668879>
691
692         Reviewed by Andreas Kling & Sam Weinig.
693
694         The problem here is that WKContentView is currently responsible for notifying the WebPageProxy
695         that the visibility may have changed, but when a PDF isn't showing the WKContentView isn't in
696         the view hierarchy and doesn't receive the didMoveToWindow notifications – and the WKPDFView
697         (which is in the view hierarchy) does not listen for these events.
698
699         Visibility of the page should really just track the visibility of the WKWebView (and when
700         actually assessing the visibility it largely does - the page client checks the web view's
701         visibility, bar a FIXME, and the foreground/background check, which needs to change).
702         So notifications should really just come from the WKWebView.
703
704         The WKWebView already listens for the didMoveToWindow notification, it just was only updating
705         the IsInWindow flag. Instead just update all flags, and the call to viewStateDidChange from
706         WKContentView can just be removed.
707
708         There is one problem with this in that it would reverse the order of the calls to
709         viewStateDidChange & _updateForScreen:, which would mean the the view would become visible before
710         updating the screen pixel density. To fix this, moving the call to _updateForScreen:
711         to willMoveToWindow:, to ensure it occurs before the page becomes visible.
712
713         This will also change behavior on Mac for WKWebView clients, in coalescing all view state changes
714         within the didMoveToWindow call. This is the direction we intended to go in anyway (the plan is
715         to remove the mayHaveChanged argument from viewStateDidChange - we're currently adding unnecessary
716         IPC traffic).
717
718         * UIProcess/API/Cocoa/WKWebView.mm:
719         (-[WKWebView didMoveToWindow]):
720             - should update all view state flags.
721         * UIProcess/API/ios/WKViewIOS.mm:
722         (-[WKView didMoveToWindow]):
723             - added to match WKWebView.mm, for WebKitTestRunner.
724         * UIProcess/ios/WKContentView.mm:
725         (-[WKContentView willMoveToWindow:]):
726             - should _updateForScreen:
727         (-[WKContentView didMoveToWindow]): Deleted.
728             - functionality moved to -[WKWebView didMoveToWindow], -[WKContentView didMoveToWindow].
729
730 2015-06-02  Chris Dumez  <cdumez@apple.com>
731
732         [iOS][WK2] Always mark layers as volatile for background pages
733         https://bugs.webkit.org/show_bug.cgi?id=145547
734         <rdar://problem/20663184>
735
736         Reviewed by Simon Fraser.
737
738         We previously marked layers as volatile when the WebProcess was about
739         to be suspended. Most of the time the WebProcess gets suspended when a
740         page goes into the background. However, it is not always true (see
741         radar), in which case the layers won't be marked as volatile and use
742         memory even though they are not visible.
743
744         We now mark layers as volatile as soon as the page goes into the
745         background, instead of relying on the WebProcess suspension mechanism
746         to do so.
747
748         A new ApplicationDidEnterBackground IPC message from the UIProcess to
749         the WebProcess is added (in addition to the pre-existing
750         ApplicationWillEnterForeground one). When the WebProcess receives this
751         message, it will freeze the layer tree state and mark the layers as
752         volatile (with a timer to keep retrying if needed), similarly to what
753         is already done in WebProcess::actualPrepareToSuspend().
754         When the ApplicationWillEnterForeground is received, we unfreeze the
755         layer tree state. The layers' volatile state will be automatically
756         updated when they are displayed (see setBufferVolatility() call in
757         RemoteLayerBackingStore::display()).
758
759         * UIProcess/WebPageProxy.h:
760         * UIProcess/ios/WKContentView.mm:
761         (-[WKContentView _applicationDidEnterBackground:]):
762         * UIProcess/ios/WebPageProxyIOS.mm:
763         (WebKit::WebPageProxy::applicationDidEnterBackground):
764         * WebProcess/WebPage/WebPage.cpp:
765         (WebKit::WebPage::WebPage):
766         (WebKit::WebPage::setLayerTreeStateIsFrozen):
767         (WebKit::WebPage::markLayersVolatileImmediatelyIfPossible):
768         * WebProcess/WebPage/WebPage.h:
769         * WebProcess/WebPage/WebPage.messages.in:
770         * WebProcess/WebPage/ios/WebPageIOS.mm:
771         (WebKit::WebPage::volatilityTimerFired):
772         (WebKit::WebPage::applicationDidEnterBackground):
773         (WebKit::WebPage::applicationWillEnterForeground):
774         * WebProcess/WebProcess.cpp:
775         (WebKit::WebProcess::markAllLayersVolatileIfPossible):
776         (WebKit::WebProcess::setAllLayerTreeStatesFrozen):
777
778 2015-06-02  Brady Eidson  <beidson@apple.com>
779
780         WebKit policy delegate should suggest if a navigation should be allowed to open URLs externally.
781         rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145280
782         
783         Reviewed by Alex Christensen.
784
785         * WebProcess/Plugins/PDF/PDFPlugin.mm:
786         (WebKit::PDFPlugin::clickedLink):
787         
788         * WebProcess/Plugins/PluginView.cpp:
789         (WebKit::PluginView::performFrameLoadURLRequest):
790         (WebKit::PluginView::loadURL):
791         
792         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
793         (WebKit::WebContextMenuClient::searchWithGoogle):
794         
795         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
796         (WebKit::WebFrameLoaderClient::dispatchCreatePage):
797         
798         * WebProcess/WebPage/WebInspector.cpp:
799         (WebKit::WebInspector::openInNewTab):
800         
801         * WebProcess/WebPage/WebPage.cpp:
802         (WebKit::WebPage::loadURLInFrame):
803         (WebKit::WebPage::loadRequest):
804         (WebKit::WebPage::loadDataImpl):
805         (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
806
807 2015-06-02  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
808
809         REGRESSION(r185091): Crash happens on indexdb tests
810         https://bugs.webkit.org/show_bug.cgi?id=145549
811
812         Reviewed by Csaba Osztrogonác.
813
814         r185091 caused crash on some indexeddb tests. The crash happens because IDBDatabaseError::create() doesn't
815         dereference count by using ptr(). It makes a crash when dereferencing on ~Ref() destructor. To fix this issue,
816         this patch uses leakRef() instead of ptr().
817
818         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
819         (WebKit::WebIDBServerConnection::didCreateObjectStore):
820         (WebKit::WebIDBServerConnection::didCreateIndex):
821         (WebKit::WebIDBServerConnection::didDeleteIndex):
822         (WebKit::WebIDBServerConnection::didPutRecord):
823         (WebKit::WebIDBServerConnection::didGetRecord):
824         (WebKit::WebIDBServerConnection::didOpenCursor):
825         (WebKit::WebIDBServerConnection::didAdvanceCursor):
826         (WebKit::WebIDBServerConnection::didIterateCursor):
827         (WebKit::WebIDBServerConnection::didCount):
828         (WebKit::WebIDBServerConnection::didDeleteRange):
829         (WebKit::WebIDBServerConnection::didClearObjectStore):
830         (WebKit::WebIDBServerConnection::didDeleteObjectStore):
831         (WebKit::WebIDBServerConnection::didChangeDatabaseVersion):
832
833 2015-06-01  Enrica Casucci  <enrica@apple.com>
834
835         [iOS] Hardware Keyboard: All combinations for arrow keys with Shift do not extend the selection.
836         https://bugs.webkit.org/show_bug.cgi?id=145538
837         rdar://problem/18504199
838
839         Reviewed by Darin Adler.
840
841         The extend parameter was ignored in all the functions below.
842
843         * UIProcess/ios/WKContentViewInteraction.mm:
844         (-[WKContentView _moveUp:withHistory:]):
845         (-[WKContentView _moveDown:withHistory:]):
846         (-[WKContentView _moveLeft:withHistory:]):
847         (-[WKContentView _moveRight:withHistory:]):
848         (-[WKContentView _moveToStartOfWord:withHistory:]):
849         (-[WKContentView _moveToStartOfParagraph:withHistory:]):
850         (-[WKContentView _moveToStartOfLine:withHistory:]):
851         (-[WKContentView _moveToStartOfDocument:withHistory:]):
852         (-[WKContentView _moveToEndOfWord:withHistory:]):
853         (-[WKContentView _moveToEndOfParagraph:withHistory:]):
854         (-[WKContentView _moveToEndOfLine:withHistory:]):
855         (-[WKContentView _moveToEndOfDocument:withHistory:]):
856
857 2015-06-01  Anders Carlsson  <andersca@apple.com>
858
859         Use xpc_connection_set_oneshot_instance where possible
860         https://bugs.webkit.org/show_bug.cgi?id=145535
861         rdar://problem/21109994
862
863         Reviewed by Sam Weinig.
864
865         Use xpc_connection_set_oneshot_instance where possible; this will make sure that the 
866         web process instances go away when the web process exits.
867
868         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
869         (WebKit::connectToService):
870         (WebKit::connectToReExecService):
871
872 2015-06-01  Enrica Casucci  <enrica@apple.com>
873
874         [iOS] Hardware Keyboard: Command + left arrow does not work.
875         https://bugs.webkit.org/show_bug.cgi?id=145531
876         rdar://problem/18576402
877
878         Reviewed by Anders Carlsson.
879
880         We were calling a non existent command (moveToStartOfLine) instead of
881         moveToBeginningOfLine.
882
883         * UIProcess/ios/WKContentViewInteraction.mm:
884         (-[WKContentView _moveToStartOfLine:withHistory:]):
885
886 2015-06-01  Brady Eidson  <beidson@apple.com>
887
888         Add WKTR support for "should open external URLs".
889         https://bugs.webkit.org/show_bug.cgi?id=145505
890
891         Reviewed by Darin Adler.
892
893         Expose C-spi to allow WKTR to set this bit on new loads:
894         * UIProcess/API/C/WKPage.cpp:
895         (WKPageLoadURLWithShouldOpenExternalURLsPolicy):
896         * UIProcess/API/C/WKPagePrivate.h:
897         
898         Expose the bit on NavigationAction for the policy delegate:        
899         * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
900         (WKBundleNavigationActionGetShouldOpenExternalURLs):
901         * WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h: Copied from Tools/WebKitTestRunner/WorkQueueManager.h.
902
903         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
904         (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
905         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
906         (WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs):
907     
908         * WebKit2.xcodeproj/project.pbxproj:
909
910 2015-06-01  Gavin Barraclough  <barraclough@apple.com>
911
912         PDFs always think they're visible on iOS.
913         https://bugs.webkit.org/show_bug.cgi?id=145493
914         <rdar://problem/19668879>
915
916         Unreviewed roll-out.
917
918         Temporarily reverting this change – will need a workaround for test harness craziness.
919
920         * UIProcess/API/Cocoa/WKWebView.mm:
921         (-[WKWebView didMoveToWindow]):
922         (-[WKWebView setOpaque:]):
923         * UIProcess/ios/WKContentView.mm:
924         (-[WKContentView willMoveToWindow:]):
925         (-[WKContentView didMoveToWindow]):
926         (-[WKContentView browsingContextController]):
927
928 2015-06-01  Csaba Osztrogonác  <ossy@webkit.org>
929
930         [EFL] Remove unused const variable from EwkView.cpp
931         https://bugs.webkit.org/show_bug.cgi?id=145512
932
933         Reviewed by Gyuyoung Kim.
934
935         * UIProcess/API/efl/EwkView.cpp:
936
937 2015-06-01  Csaba Osztrogonác  <ossy@webkit.org>
938
939         [cmake] Suppress unused parameter warnings in WebKit2 and TestNetscapePlugIn
940         https://bugs.webkit.org/show_bug.cgi?id=145264
941
942         Reviewed by Carlos Garcia Campos.
943
944         * CMakeLists.txt: Use COMPILE_FLAGS instead of CMAKE_<C|CXX>_FLAGS to put -Wno-unused-parameter after -Wextra.
945
946 2015-05-31  Gavin Barraclough  <barraclough@apple.com>
947
948         PDFs always think they're visible on iOS.
949         https://bugs.webkit.org/show_bug.cgi?id=145493
950         <rdar://problem/19668879>
951
952         Reviewed by Andreas Kling.
953
954         The problem here is that WKContentView is currently responsible for notifying the WebPageProxy
955         that the visibility may have changed, but when a PDF isn't showing the WKContentView isn't in
956         the view hierarchy and doesn't receive the didMoveToWindow notifications – and the WKPDFView
957         (which is in the view hierarchy) does not listen for these events.
958
959         Visibility of the page should really just track the visibility of the WKWebView (and when
960         actually assessing the visibility it largely does - the page client checks the web view's
961         visibility, bar a FIXME, and the foreground/background check, which needs to change).
962         So notifications should really just come from the WKWebView.
963
964         The WKWebView already listens for the didMoveToWindow notification, it just was only updating
965         the IsInWindow flag. Instead just update all flags, and the call to viewStateDidChange from
966         WKContentView can just be removed.
967
968         There is one problem with this in that it would reverse the order of the calls to
969         viewStateDidChange & _updateForScreen:, which would mean the the view would become visible before
970         updating the screen pixel density. To fix this, move the call to _updateForScreen: to
971         willMoveToWindow:, to ensure it occurs before the page becomes visible.
972
973         This will also change behavior on Mac for WKWebView clients, in coalescing all view state changes
974         within the didMoveToWindow call. This is the direction we intended to go in anyway (the plan is
975         to remove the mayHaveChanged argument from viewStateDidChange - we're currently adding unnecessary
976         IPC traffic).
977
978         * UIProcess/API/Cocoa/WKWebView.mm:
979         (-[WKWebView didMoveToWindow]):
980             - should update all view state flags.
981         * UIProcess/ios/WKContentView.mm:
982         (-[WKContentView willMoveToWindow:]):
983             - should _updateForScreen:
984         (-[WKContentView didMoveToWindow]): Deleted.
985             - functionality moved to -[WKWebView didMoveToWindow], -[WKContentView didMoveToWindow].
986
987 2015-05-30  Brady Eidson  <beidson@apple.com>
988
989         Make FrameLoader methods that take PassRefPtr<Event> take raw pointers instead.
990         https://bugs.webkit.org/show_bug.cgi?id=145495
991
992         Reviewed by Alexey Proskuryakov.
993
994         * WebProcess/WebPage/WebPage.cpp:
995         (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
996
997 2015-05-29  Joseph Pecoraro  <pecoraro@apple.com>
998
999         Web Inspector: Crash closing a related tab with Web Inspector open while page is refreshing
1000         https://bugs.webkit.org/show_bug.cgi?id=145488
1001
1002         Reviewed by Alexey Proskuryakov.
1003
1004         * WebProcess/WebPage/WebInspector.h:
1005         * WebProcess/WebPage/WebInspector.cpp:
1006         (WebKit::WebInspector::~WebInspector):
1007         Ensure, no matter how we close, that we have invalidated the
1008         frontend connection of which we are the client.
1009
1010         (WebKit::WebInspector::createInspectorPage):
1011         This member variable will never be null.
1012
1013 2015-05-29  Andreas Kling  <akling@apple.com>
1014
1015         [iOS] When bouncing back from max pinch zoom scale, scaleChangeRate should be 0.
1016         <https://webkit.org/b/145487>
1017         <rdar://problem/20989389>
1018
1019         Reviewed by Benjamin Poulain.
1020
1021         Make sure we don't send WebCore some velocity data with non-zero scaleChangeRate
1022         when we bounce back from being pinch-zoomed past the maximum scale.
1023
1024         This fixes an issue where the bounce-back animation would cause a burst of
1025         unnecessary tile generation.
1026
1027         * WebProcess/WebPage/ios/WebPageIOS.mm:
1028         (WebKit::adjustVelocityDataForBoundedScale):
1029         (WebKit::WebPage::updateVisibleContentRects):
1030
1031 2015-05-29  Jon Lee  <jonlee@apple.com>
1032
1033         Fix preferences for wireless playback
1034         https://bugs.webkit.org/show_bug.cgi?id=145477
1035         rdar://problem/21166767
1036
1037         Reviewed by Anders Carlsson.
1038
1039         * UIProcess/API/C/WKPreferences.cpp: Add missing preference calls in C API.
1040         * UIProcess/API/C/WKPreferencesRef.h:
1041
1042 2015-05-29  Enrica Casucci  <enrica@apple.com>
1043
1044         [iOS] Cursor hidden in text area once it scrolls.
1045         https://bugs.webkit.org/show_bug.cgi?id=145451
1046         rdar://problem/20356413
1047
1048         Reviewed by Simon Fraser.
1049
1050         This patch fixes both the touch scrolling inside the
1051         overflow area as well as the programmatic scroll that
1052         occurs when inserting a new line. The first issue is fixed by
1053         implementing the chrome client methods didLayout,
1054         didStartOverflowScroll and didEndOverflowScroll. The second
1055         required changing the implementation of notifyRevealedSelectionByScrollingFrame.
1056         We not only need to notify the client to redraw the selection,
1057         but we also need to recompute the editorState, because scrolling
1058         might have occurred.
1059         I've removed the NotifyRevealedSelection message that was not needed
1060         any longer, since EditorStateChanged will do exactly what we want.
1061
1062         * UIProcess/WebPageProxy.h:
1063         * UIProcess/WebPageProxy.messages.in:
1064         * UIProcess/ios/WebPageProxyIOS.mm:
1065         (WebKit::WebPageProxy::editorStateChanged):
1066         (WebKit::WebPageProxy::notifyRevealedSelection): Deleted.
1067         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
1068         (WebKit::WebChromeClient::notifyRevealedSelectionByScrollingFrame):
1069         (WebKit::WebChromeClient::didLayout):
1070         (WebKit::WebChromeClient::didStartOverflowScroll):
1071         (WebKit::WebChromeClient::didEndOverflowScroll):
1072
1073 2015-05-29  Chris Dumez  <cdumez@apple.com>
1074
1075         [iOS] Update WebContent process sandbox profile for AWD logging
1076         https://bugs.webkit.org/show_bug.cgi?id=145473
1077         <rdar://problem/20543269>
1078
1079         Reviewed by Darin Adler.
1080
1081         Update WebContent process sandbox profile for AWD logging.
1082
1083         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1084
1085 2015-05-29  Anders Carlsson  <andersca@apple.com>
1086
1087         WebKit.framework installs or references Mac-only headers on iOS
1088         https://bugs.webkit.org/show_bug.cgi?id=145471
1089         rdar://problem/21161459
1090
1091         Reviewed by Dan Bernstein.
1092
1093         * UIProcess/API/C/mac/WKInspectorPrivateMac.h:
1094         Add an #if !TARGET_OS_IPHONE guard around the entire header.
1095
1096 2015-05-29  Anders Carlsson  <andersca@apple.com>
1097
1098         WKScriptMessageInternal.h should be a project header, not a private header
1099         https://bugs.webkit.org/show_bug.cgi?id=145464
1100         rdar://problem/21161639
1101
1102         Reviewed by Dan Bernstein.
1103
1104         * WebKit2.xcodeproj/project.pbxproj:
1105
1106 2015-05-28  Alexey Proskuryakov  <ap@apple.com>
1107
1108         Clean up VisitedLinkProvider teardown
1109         https://bugs.webkit.org/show_bug.cgi?id=145450
1110         rdar://problem/20244726
1111
1112         Reviewed by Brady Eidson.
1113
1114         * UIProcess/VisitedLinkProvider.cpp:
1115         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
1116
1117 2015-05-28  Brady Eidson  <beidson@apple.com>
1118
1119         Change method of signaling "should open external urls" to WebKit.
1120         https://bugs.webkit.org/show_bug.cgi?id=145454
1121
1122         Reviewed by Dan Bernstein.
1123
1124         Making this a property on the request was never a good idea.
1125
1126         Adding a new extensible load SPI seems much better.
1127
1128         * Shared/API/Cocoa/_WKNSURLRequestExtras.h: Removed.
1129         * Shared/API/Cocoa/_WKNSURLRequestExtras.mm: Removed.
1130
1131         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1132         (-[WKBrowsingContextController loadRequest:userData:]): Since this API is deprecated,
1133           it always gets the default restrictive behavior.
1134
1135         * UIProcess/API/Cocoa/WKWebView.mm:
1136         (-[WKWebView loadRequest:]):
1137         (-[WKWebView loadRequest:withOptions:]): Take an options dictionary that, for now, 
1138           only supports one option.
1139         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1140
1141         * WebKit2.xcodeproj/project.pbxproj:
1142
1143 2015-05-28  Anders Carlsson  <andersca@apple.com>
1144
1145         Make sure that we create the private WebKit.framework symlinks last
1146         https://bugs.webkit.org/show_bug.cgi?id=145442
1147         <rdar://problem/21142213>
1148
1149         Reviewed by Dan Bernstein.
1150
1151         Move the "Add Symlinks in /System/Library/PrivateFrameworks/WebKit.framework" build phase to
1152         the "All" aggregate target. Also update the script now that INSTALL_PATH is different.
1153
1154         * WebKit2.xcodeproj/project.pbxproj:
1155
1156 2015-05-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
1157
1158         Code clean up for extracting information from the mix of WritingMode and TextDirection
1159         https://bugs.webkit.org/show_bug.cgi?id=143399
1160
1161         Reviewed by Darin Adler.
1162
1163         * Shared/WebPopupItem.h:
1164         * UIProcess/API/C/efl/WKAPICastEfl.h:
1165         * UIProcess/WebPopupMenuProxy.h:
1166         enum TextDirection is moved from TextFlags.h to WritingMode.h. So include
1167         WritingMode.h instead of including TextFlags.h.
1168
1169 2015-05-28  Antti Koivisto  <antti@apple.com>
1170
1171         Disable network cache for old clients
1172         https://bugs.webkit.org/show_bug.cgi?id=145418
1173
1174         Reviewed by Andreas Kling.
1175
1176         Follow-up: Don't do linked-on-or-after checks for iOS Safari.
1177
1178         * UIProcess/Cocoa/VersionChecks.mm:
1179         (WebKit::linkTimeVersion):
1180         (WebKit::linkedOnOrAfter):
1181
1182 2015-05-28  Matt Rajca  <mrajca@apple.com>
1183
1184         Add ENABLE_MEDIA_SESSION feature flag (which is off by default).
1185         https://bugs.webkit.org/show_bug.cgi?id=145415
1186
1187         Reviewed by Eric Carlson.
1188
1189         * Configurations/FeatureDefines.xcconfig:
1190
1191 2015-05-28  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1192
1193         Unreviewed, Fix build break since r184930.
1194
1195         * UIProcess/Storage/StorageManager.cpp:
1196         (WebKit::StorageManager::createTransientLocalStorageMap): Pass a pointer of SecurityOrigin
1197         in isSameSchemeHostPort().
1198
1199 2015-05-28  Zan Dobersek  <zdobersek@igalia.com>
1200
1201         Unreviewed. Fixing the build after r184950.
1202
1203         * UIProcess/Storage/StorageManager.cpp:
1204         (WebKit::StorageManager::createSessionStorageMap): getOrCreateStorageArea()
1205         now expects a Ref<WebCore::SecurityOrigin> object.
1206
1207 2015-05-28  Zan Dobersek  <zdobersek@igalia.com>
1208
1209         [WK2] Handle WebCore::SecurityOrigin objects through Ref<> where possible
1210         https://bugs.webkit.org/show_bug.cgi?id=145373
1211
1212         Reviewed by Andreas Kling.
1213
1214         WebCore::SecurityOrigin creation functions in most cases return a
1215         Ref<WebCore::SecurityOrigin> object. In the WebKit2 layer, those objects
1216         were still largely converted to RefPtr<>s.
1217
1218         This patch switches to using Ref<> where possible. The remaining uses of
1219         RefPtr<WebCore::SecurityOrigin> are present due to HashTables, to-be-copied
1220         Vectors, WebCore::DatabaseManager::origins() API and code where non-null
1221         WebCore::SecurityOrigin can't be guaranteed.
1222
1223         * DatabaseProcess/DatabaseProcess.cpp:
1224         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
1225         * NetworkProcess/NetworkProcess.cpp:
1226         (WebKit::cfURLCacheOrigins):
1227         * UIProcess/Storage/LocalStorageDatabase.cpp:
1228         (WebKit::LocalStorageDatabase::create):
1229         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
1230         (WebKit::LocalStorageDatabase::openDatabase):
1231         (WebKit::LocalStorageDatabase::close):
1232         * UIProcess/Storage/LocalStorageDatabase.h:
1233         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1234         (WebKit::LocalStorageDatabaseTracker::origins):
1235         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
1236         * UIProcess/Storage/StorageManager.cpp:
1237         (WebKit::StorageManager::StorageArea::securityOrigin):
1238         (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
1239         (WebKit::StorageManager::TransientLocalStorageNamespace::origins):
1240         (WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
1241         (WebKit::StorageManager::StorageArea::create):
1242         (WebKit::StorageManager::StorageArea::StorageArea):
1243         (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
1244         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
1245         (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea):
1246         (WebKit::StorageManager::SessionStorageNamespace::origins):
1247         (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
1248         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
1249         * UIProcess/WebPageProxy.cpp:
1250         (WebKit::WebPageProxy::reachedApplicationCacheOriginQuota):
1251         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
1252         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
1253         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1254         (WebKit::InjectedBundle::setApplicationCacheOriginQuota):
1255         (WebKit::InjectedBundle::resetApplicationCacheOriginQuota):
1256         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
1257         (WebKit::WebResourceCacheManager::returnCacheOrigins):
1258         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
1259         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1260         (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
1261         (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
1262         (WebKit::WebDatabaseManager::setQuotaForOrigin):
1263
1264 2015-05-19  Jon Honeycutt  <jhoneycutt@apple.com>
1265
1266         [iOS] When viewing an MJPEG stream as the main resource, only the first
1267         frame paints
1268
1269         <https://bugs.webkit.org/show_bug.cgi?id=145185>
1270         <rdar://problem/20124694>
1271
1272         Reviewed by Darin Adler.
1273
1274         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1275         (WebKit::WebFrameLoaderClient::willReplaceMultipartContent):
1276         Tell the WebPage that we will replace multipart content.
1277
1278         (WebKit::WebFrameLoaderClient::didReplaceMultipartContent):
1279         Tell the WebPage that we did replace multipart content.
1280
1281         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1282         * WebProcess/WebPage/DrawingArea.h:
1283
1284         * WebProcess/WebPage/WebPage.cpp:
1285         (WebKit::WebPage::willReplaceMultipartContent):
1286         Save the exposed content rect.
1287         (WebKit::WebPage::didReplaceMultipartContent):
1288         Restore the exposed content rect that was saved before this load. This
1289         fixes the issue for WK2.
1290
1291         * WebProcess/WebPage/WebPage.h:
1292
1293         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1294         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1295         (WebKit::RemoteLayerTreeDrawingArea::exposedContentRect):
1296
1297 2015-05-22  Jon Lee  <jonlee@apple.com>
1298
1299         Fix macros for wireless playback
1300         https://bugs.webkit.org/show_bug.cgi?id=145239
1301         rdar://problem/21049541
1302
1303         Reviewed by Anders Carlsson.
1304
1305         Encompass the logic within ENABLE(WIRELESS_TARGET_PLAYBACK). Update property name.
1306
1307         * UIProcess/API/Cocoa/WKWebView.mm:
1308         (-[WKWebView initWithFrame:configuration:]):
1309         * UIProcess/API/Cocoa/WKWebViewConfiguration.h: Update names. Add a WKDeprecated
1310         category section.
1311         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1312         (-[WKWebViewConfiguration init]): Update name of variables to reflect new property names.
1313         (-[WKWebViewConfiguration copyWithZone:]): Ditto.
1314         (-[WKWebViewConfiguration mediaPlaybackAllowsAirPlay]): Get and set off of the new
1315         variable.
1316         (-[WKWebViewConfiguration setMediaPlaybackAllowsAirPlay:]): Ditto.
1317         (-[WKWebViewConfiguration mediaPlaybackRequiresUserAction]): Ditto.
1318         (-[WKWebViewConfiguration setMediaPlaybackRequiresUserAction:]): Ditto.
1319
1320 2015-05-27  Brady Eidson  <beidson@apple.com>
1321
1322         Add a "should open urls externally" flag to DocumentLoader.
1323         rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145417
1324
1325         Reviewed by Geoff Garen.
1326
1327         Rename "user initiated" to "should open external URLs":
1328         * Shared/API/Cocoa/_WKNSURLRequestExtras.h:
1329         * Shared/API/Cocoa/_WKNSURLRequestExtras.mm:
1330         (-[NSURLRequest _web_shouldOpenExternalURLs]):
1331         (-[NSMutableURLRequest _web_setShouldOpenExternalURLs:]):
1332         (-[NSURLRequest _web_isUserInitiated]): Deleted.
1333         (-[NSMutableURLRequest _web_setIsUserInitiated:]): Deleted.
1334         
1335         Hold the new flag as a bool, and encode/decode it across IPC:
1336         * Shared/NavigationActionData.cpp:
1337         (WebKit::NavigationActionData::encode):
1338         (WebKit::NavigationActionData::decode):
1339         (WebKit::NavigationActionData::NavigationActionData): Deleted.
1340         * Shared/NavigationActionData.h:
1341
1342         * UIProcess/API/APINavigationAction.h: Add accessor for the bool flag.
1343
1344         * UIProcess/API/C/WKPage.cpp:
1345         (WKPageLoadURLWithUserData): Use "ShouldNotAllow" in the legacy C API for now.
1346         (WKPageLoadURLRequestWithUserData): Ditto.
1347
1348         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1349         (-[WKBrowsingContextController loadRequest:userData:]): Set the value of the flag
1350           based on whether or not the initiating NSURLRequest was user initiated.
1351
1352         * UIProcess/API/Cocoa/WKNavigationAction.mm:
1353         (-[WKNavigationAction _shouldOpenExternalURLs]): Add accessor for the bool flag.
1354         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
1355
1356         * UIProcess/API/Cocoa/WKWebView.mm:
1357         (-[WKWebView loadRequest:]): Set the value of the flag based on whether or not the
1358           initiating NSURLRequest was user initiated.
1359
1360         * UIProcess/WebPageProxy.cpp:
1361         (WebKit::WebPageProxy::loadRequest): Pass the value down to the WebProcess to load.
1362         (WebKit::WebPageProxy::loadFile): Ditto, but always with "ShouldNotAllow".
1363         * UIProcess/WebPageProxy.h:
1364
1365         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1366         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Translate 
1367           the NavigationAction flag to a bool in the NavigationActionData object.
1368
1369         * WebProcess/WebPage/WebPage.cpp:
1370         (WebKit::WebPage::loadRequest): Set the value of the flag in the FrameLoadRequest that
1371           will be loaded.
1372         * WebProcess/WebPage/WebPage.h:
1373         * WebProcess/WebPage/WebPage.messages.in:
1374
1375 2015-05-27  Anders Carlsson  <andersca@apple.com>
1376
1377         Can't load local files in WKWebView from containerized app
1378         https://bugs.webkit.org/show_bug.cgi?id=145424
1379         rdar://problem/20831176
1380
1381         Reviewed by Dan Bernstein.
1382
1383         Allow the network process to load local files from its bundle as long as it has
1384         the sandbox extensions to do so.
1385
1386         This was originally added to only allow SSO to read the Info.plist inside its own application
1387         bundle, but being able to read the application bundle from within the network process should be OK.
1388
1389         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1390
1391 2015-05-27  Andreas Kling  <akling@apple.com>
1392
1393         [WK2] Local storage areas should get torn down when they have no remaining references.
1394         <https://webkit.org/b/143339>
1395         <rdar://problem/20156436>
1396
1397         Reviewed by Darin Adler.
1398
1399         Let StorageNamespaceImpl own its StorageAreaMaps weakly instead of through RefPtr.
1400         Ownership is flipped so that StorageAreaMap refs the StorageNamespaceImpl instead.
1401         This allows the StorageAreaMaps to get destroyed once all of its clients are gone.
1402
1403         Practically speaking, this means that the garbage collector now decides when local
1404         storage databases can be closed, instead of us keeping them open for the lifetime
1405         of the web process.
1406
1407         For session storage, it works a bit differently. In the web process, they get torn
1408         down when their last client disappears, but they stay alive in the UI process.
1409         If/when the web process asks the UI process to open session storage for an origin,
1410         the UI process checks if one already exists, and if so, just updates the ID of the
1411         old storage with the new one provided by the web process.
1412
1413         * UIProcess/Storage/StorageManager.cpp:
1414         (WebKit::StorageManager::StorageArea::isSessionStorage):
1415         (WebKit::StorageManager::createTransientLocalStorageMap):
1416         (WebKit::StorageManager::createSessionStorageMap):
1417         (WebKit::StorageManager::destroyStorageMap):
1418         * WebProcess/Storage/StorageAreaImpl.cpp:
1419         (WebKit::StorageAreaImpl::securityOrigin):
1420         * WebProcess/Storage/StorageAreaImpl.h:
1421         * WebProcess/Storage/StorageAreaMap.cpp:
1422         (WebKit::StorageAreaMap::StorageAreaMap):
1423         (WebKit::StorageAreaMap::~StorageAreaMap):
1424         * WebProcess/Storage/StorageAreaMap.h:
1425         (WebKit::StorageAreaMap::securityOrigin):
1426         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1427         (WebKit::StorageNamespaceImpl::didDestroyStorageAreaMap):
1428         (WebKit::StorageNamespaceImpl::storageArea):
1429         * WebProcess/Storage/StorageNamespaceImpl.h:
1430
1431 2015-05-27  Antti Koivisto  <antti@apple.com>
1432
1433         Disable network cache for old clients
1434         https://bugs.webkit.org/show_bug.cgi?id=145418
1435         rdar://problem/21126587
1436
1437         Reviewed by Andy Estes.
1438
1439         Old clients might use NSURLCache API to clear the cache. New cache requires use of new APIs.
1440
1441         * UIProcess/Cocoa/VersionChecks.h: Added.
1442         * UIProcess/Cocoa/VersionChecks.mm: Added.
1443
1444             Add linked-on-or-after check mechanism similar to WebKit1.
1445
1446         (WebKit::linkTimeVersion):
1447         (WebKit::linkedOnOrAfter):
1448         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1449         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1450
1451             Use it when deciding whether to enable the cache.
1452
1453         * WebKit2.xcodeproj/project.pbxproj:
1454
1455 2015-05-27  Dean Jackson  <dino@apple.com>
1456
1457         img.currentSrc problem in strict mode with old picturefill
1458         https://bugs.webkit.org/show_bug.cgi?id=144095
1459         <rdar://problem/21087013>
1460
1461         Reviewed by Simon Fraser.
1462
1463         Add a PICTURE_SIZES flag.
1464
1465         * Configurations/FeatureDefines.xcconfig:
1466
1467 2015-05-27  Chris Dumez  <cdumez@apple.com>
1468
1469         Assertion hit in WebPage::didChangeSelection()
1470         https://bugs.webkit.org/show_bug.cgi?id=145413
1471         <rdar://problem/21001129>
1472
1473         Reviewed by Ryosuke Niwa.
1474
1475         We sometimes hit the "ASSERT(layoutCount == view->layoutCount())"
1476         assertion in WebPage::didChangeSelection(). We manage to prevent
1477         synchronous layouts in most cases when calling editorState(). However,
1478         it seems it can still happen in some cases. Crashing in this case seems
1479         overkill and can be annoying to other developers, especially
1480         considering the implications are only on performance.
1481
1482         This patch drops the assertion.
1483
1484         * WebProcess/WebPage/WebPage.cpp:
1485         (WebKit::WebPage::didChangeSelection): Deleted.
1486
1487 2015-05-27  Anders Carlsson  <andersca@apple.com>
1488
1489         Address a follow-up review comment from Darin.
1490
1491         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1492         (WebKit::WebsiteDataStore::removeMediaKeys):
1493
1494 2015-05-26  Anders Carlsson  <andersca@apple.com>
1495
1496         WKWebsiteDataStore should handle media keys
1497         https://bugs.webkit.org/show_bug.cgi?id=145394
1498         rdar://problem/20617794.
1499
1500         Reviewed by Darin Adler.
1501
1502         * Shared/WebsiteData/WebsiteDataTypes.h:
1503         Add WebsiteDataTypeMediaKeys enum.
1504
1505         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
1506         (API::WebsiteDataStore::defaultDataStoreConfiguration):
1507         Set up mediaKeysStorageDirectory.
1508
1509         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
1510         (dataTypesToString):
1511         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
1512         (WebKit::toWebsiteDataTypes):
1513         (WebKit::toWKWebsiteDataTypes):
1514         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h: Added.
1515         Add _WKWebsiteDataTypeMediaKeys.
1516
1517         * UIProcess/WebProcessPool.cpp:
1518         (WebKit::legacyWebsiteDataStoreConfiguration):
1519         Set up mediaKeysStorageDirectory.
1520
1521         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1522         (WebKit::WebsiteDataStore::WebsiteDataStore):
1523         Set m_mediaKeysStorageDirectory.
1524
1525         (WebKit::WebsiteDataStore::fetchData):
1526         Make CallbackAggregator ThreadSafeRefCounted.
1527         Handle WebsiteDataTypeMediaKeys by calling mediaKeyOrigins on our background queue.
1528
1529         (WebKit::WebsiteDataStore::removeData):
1530         Make CallbackAggregator ThreadSafeRefCounted.
1531         Handle WebsiteDataTypeMediaKeys by calling removeMediaKeys on our background queue.
1532
1533         (WebKit::WebsiteDataStore::mediaKeyOrigins):
1534         Compute the origins.
1535
1536         (WebKit::computeMediaKeyFile):
1537         Add helper function that returns the media key given a containing directory.
1538
1539         (WebKit::WebsiteDataStore::removeMediaKeys):
1540         Remove media key files.
1541
1542         * UIProcess/WebsiteData/WebsiteDataStore.h:
1543         Add new members.
1544
1545         * WebKit2.xcodeproj/project.pbxproj:
1546         Add new files.
1547
1548 2015-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1549
1550         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.2 release.
1551
1552         * gtk/NEWS: Add release notes for 2.9.2.
1553
1554 2015-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1555
1556         [SOUP] Network Cache: Handle the case when we fail to create the IO stream
1557         https://bugs.webkit.org/show_bug.cgi?id=145406
1558
1559         Reviewed by Sergio Villar Senin.
1560
1561         We were asserting in that case, but it can happen that we
1562         fail to create the stream. It happened to me after r184690, that
1563         changed the NetworkCache::Key hash. Since this was not expected to
1564         happen, the async operation never finished and the completion
1565         handler never called, leaving resources loading forever. We
1566         should make sure we call the completion handler with an error
1567         code, so that the load finishes and the entry is silently removed
1568         from the cache.
1569
1570         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1571         (WebKit::NetworkCache::IOChannel::read):
1572         (WebKit::NetworkCache::IOChannel::readSync):
1573         (WebKit::NetworkCache::IOChannel::write):
1574
1575 2015-05-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1576
1577         Network Cache: Add cache capacity to the totals of JSON file
1578         https://bugs.webkit.org/show_bug.cgi?id=145246
1579
1580         Reviewed by Antti Koivisto.
1581
1582         * NetworkProcess/cache/NetworkCache.cpp:
1583         (WebKit::NetworkCache::Cache::dumpContentsToFile):
1584         * NetworkProcess/cache/NetworkCacheStorage.h:
1585         (WebKit::NetworkCache::Storage::capacity):
1586
1587 2015-05-26  Anders Carlsson  <andersca@apple.com>
1588
1589         Add a symlink for every file inside /S/L/F/WebKit.framework to the PrivateFrameworks mirror.
1590
1591         rdar://problem/21111232.
1592
1593         Reviewed by Dan Bernstein.
1594
1595         * WebKit2.xcodeproj/project.pbxproj:
1596
1597 2015-05-26  Hunseop Jeong  <hs85.jeong@samsung.com>
1598
1599         [EFL] webview should be updated from (0,0) when using the evasGL.
1600         https://bugs.webkit.org/show_bug.cgi?id=137948
1601
1602         Reviewed by Gyuyoung Kim.
1603
1604         Changed the point of the start position to update the evasObject
1605         correctly when using the evasGL for graphics backend.
1606
1607         * UIProcess/API/efl/EwkView.cpp:
1608         (EwkView::displayTimerFired):
1609
1610 2015-05-26  Dan Bernstein  <mitz@apple.com>
1611
1612         <rdar://problem/21104551> Update build settings
1613
1614         Reviewed by Anders Carlsson.
1615
1616         * Configurations/DebugRelease.xcconfig:
1617         * Configurations/FeatureDefines.xcconfig:
1618         * Configurations/Version.xcconfig:
1619         * Configurations/WebContentService.Development.xcconfig:
1620         * Configurations/WebContentService.xcconfig:
1621
1622 2015-05-26  Milan Crha  <mcrha@redhat.com>
1623
1624         [GTK] Expand wildcards inside generate-inspector-gresource-manifest.py
1625         https://bugs.webkit.org/show_bug.cgi?id=138134
1626
1627         Reviewed by Žan Doberšek.
1628
1629         * PlatformGTK.cmake: Command line with expanded resources exceeds 32KB, which
1630         is a limit on Windows. It's better to expand wildcards inside the python script.
1631
1632 2015-05-25  Dan Bernstein  <mitz@apple.com>
1633
1634         ASSERT_MAIN_THREAD and DOM_ASSERT_MAIN_THREAD are unnecessary no-ops
1635         https://bugs.webkit.org/show_bug.cgi?id=145372
1636
1637         Reviewed by Sam Weinig.
1638
1639         * Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES.
1640
1641 2015-05-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1642
1643         [GTK] Add construct property to WebKitWebContext to set the IndexedDB database directory
1644         https://bugs.webkit.org/show_bug.cgi?id=140882
1645
1646         Reviewed by Gustavo Noronha Silva.
1647
1648         Add WebKitWebContext:indexed-db-database-directory construct only property.
1649
1650         * UIProcess/API/gtk/WebKitWebContext.cpp:
1651         (webkitWebContextGetProperty):
1652         (webkitWebContextSetProperty):
1653         (webkitWebContextConstructed):
1654         (webkit_web_context_class_init):
1655
1656 2015-05-24  Sam Weinig  <sam@webkit.org>
1657
1658         Crash when using a removed ScriptMessageHandler
1659         <rdar://problem/20888499>
1660         https://bugs.webkit.org/show_bug.cgi?id=145359
1661
1662         Reviewed by Dan Bernstein.
1663
1664         * WebProcess/UserContent/WebUserContentController.cpp:
1665         (WebKit::WebUserMessageHandlerDescriptorProxy::~WebUserMessageHandlerDescriptorProxy):
1666         Invalidate the descriptor when the message handler client (as implemented by WebUserMessageHandlerDescriptorProxy)
1667         goes away. This will happen if a script message handler is removed at the API level or the WebUserContentController
1668         is destroyed (which will happen if all the pages get destroyed).
1669
1670 2015-05-23  Dan Bernstein  <mitz@apple.com>
1671
1672         <rdar://problem/21090327> /S/L/PrivateFrameworks/WebKit.framework is missing Headers and PrivateHeaders symlinks
1673         https://bugs.webkit.org/show_bug.cgi?id=145354
1674
1675         Reviewed by David Kilzer.
1676
1677         * WebKit2.xcodeproj/project.pbxproj: Create Headers and PrivateHeaders symlinks alongside
1678         the dylib symlink.
1679
1680 2015-05-23  Sungmann Cho  <sungmann.cho@navercorp.com>
1681
1682         Rename ShareableResource::create(Handle&) to map(Handle&) to match SharedMemory.
1683         https://bugs.webkit.org/show_bug.cgi?id=145288
1684
1685         Reviewed by Sam Weinig.
1686
1687         * Shared/ShareableResource.cpp:
1688         (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
1689         (WebKit::ShareableResource::map):
1690         (WebKit::ShareableResource::create): Deleted.
1691         * Shared/ShareableResource.h:
1692
1693 2015-05-22  Jon Lee  <jonlee@apple.com>
1694
1695         Rename MediaPlaybackAllowsInline
1696         https://bugs.webkit.org/show_bug.cgi?id=145315
1697
1698         Reviewed by Eric Carlson.
1699
1700         Our API uses allowsInlineMediaPlayback. Our symbols should reflect the same.
1701
1702         * Shared/WebPreferencesDefinitions.h:
1703         * UIProcess/API/C/WKPreferences.cpp:
1704         (WKPreferencesSetMediaPlaybackAllowsInline): Update the call to preferences.
1705         The C API will not change in a future patch.
1706         (WKPreferencesGetMediaPlaybackAllowsInline): Ditto.
1707         * UIProcess/API/Cocoa/WKWebView.mm:
1708         (-[WKWebView initWithFrame:configuration:]): Update the name of the key.
1709         * WebProcess/WebPage/WebPage.cpp:
1710         (WebKit::WebPage::updatePreferences): Ditto.
1711
1712         * UIProcess/API/gtk/WebKitSettings.cpp: Update the call.
1713         (webkit_settings_get_media_playback_allows_inline):
1714         (webkit_settings_set_media_playback_allows_inline):
1715
1716 2015-05-22  Jon Lee  <jonlee@apple.com>
1717
1718         Rename MediaPlaybackAllowsAirPlay
1719         https://bugs.webkit.org/show_bug.cgi?id=145316
1720
1721         Reviewed by Eric Carlson.
1722
1723         In preparation for an API rename, update internal symbols from mediaPlaybackAllowsAirPlay
1724         to allowsAirPlayForMediaPlayback.
1725
1726         * Shared/WebPreferencesDefinitions.h: Update the name.
1727         * UIProcess/API/Cocoa/WKWebView.mm:
1728         (-[WKWebView initWithFrame:configuration:]): Ditto.
1729         * WebProcess/WebPage/WebPage.cpp:
1730         (WebKit::WebPage::updatePreferences): Update the call to settings.
1731
1732 2015-05-22  Jon Lee  <jonlee@apple.com>
1733
1734         Unreviewed GTK fix after r184802.
1735
1736         * UIProcess/API/gtk/WebKitSettings.cpp:
1737         (webkit_settings_get_media_playback_requires_user_gesture):
1738         (webkit_settings_set_media_playback_requires_user_gesture):
1739
1740 2015-05-22  Jon Lee  <jonlee@apple.com>
1741
1742         Rename MediaPlaybackRequiresUserGesture
1743         https://bugs.webkit.org/show_bug.cgi?id=145314
1744
1745         Reviewed by Anders Carlsson.
1746
1747         In preparation for an API rename, update internal symbols from mediaPlaybackRequiresUserGesture
1748         to requiresUserGestureForMediaPlayback.
1749
1750         No changes are being made to the API in this patch.
1751
1752         * Shared/WebPreferencesDefinitions.h: Update the name of the macro and the setting.
1753         * UIProcess/API/C/WKPreferences.cpp: The C API will not change in a future patch.
1754         (WKPreferencesSetMediaPlaybackRequiresUserGesture): Update the call to preferences.
1755         (WKPreferencesGetMediaPlaybackRequiresUserGesture): Ditto.
1756         * UIProcess/API/Cocoa/WKWebView.mm:
1757         (-[WKWebView initWithFrame:configuration:]): Update the name of the key.
1758         * WebProcess/WebPage/WebPage.cpp:
1759         (WebKit::WebPage::updatePreferences): Ditto.
1760
1761 2015-05-22  Commit Queue  <commit-queue@webkit.org>
1762
1763         Unreviewed, rolling out r183647.
1764         https://bugs.webkit.org/show_bug.cgi?id=145326
1765
1766         broke some toolbar blurring behavior (Requested by thorton on
1767         #webkit).
1768
1769         Reverted changeset:
1770
1771         "Asynchronous (or timed-out synchronous) resize flashes white
1772         instead of page background color"
1773         https://bugs.webkit.org/show_bug.cgi?id=144468
1774         http://trac.webkit.org/changeset/183647
1775
1776 2015-05-22  Yongjun Zhang  <yongjun_zhang@apple.com>
1777
1778         Image link doesn't create a preview view controller.
1779         https://bugs.webkit.org/show_bug.cgi?id=145320
1780
1781         Also try to create the preview view controller if the hit-tested node
1782         is a image link.
1783
1784         Reviewed by Beth Dakin.
1785
1786         * UIProcess/ios/WKContentViewInteraction.mm:
1787         (-[WKContentView gestureRecognizerShouldBegin:]):
1788         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
1789
1790 2015-05-22  Tim Horton  <timothy_horton@apple.com>
1791
1792         Avoid doing an extra layout in some cases while doing scale-to-fit
1793         https://bugs.webkit.org/show_bug.cgi?id=145321
1794         <rdar://problem/21051165>
1795
1796         Reviewed by Beth Dakin.
1797
1798         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1799         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1800         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
1801         If we make it to scaleViewToFitDocumentIfNeeded with valid layout,
1802         the view width is still less than the last-known minimum document size,
1803         and the document size hasn't changed, update the view scale without
1804         doing an extra layout, keeping the fixed layout size at the previously
1805         computed minimum document size.
1806
1807 2015-05-22  Beth Dakin  <bdakin@apple.com>
1808
1809         Yellow highlight and DD popover don't go away when scrolling an iframe
1810         https://bugs.webkit.org/show_bug.cgi?id=145312
1811         -and corresponding-
1812         rdar://problem/19692334
1813
1814         Reviewed by Tim Horton.
1815
1816         Match what Lookup already does for their popover and dismiss our popovers on 
1817         scroll.
1818         * UIProcess/API/mac/WKView.mm:
1819         (-[WKView scrollWheel:]):
1820
1821         This should not be needed anymore.
1822         * UIProcess/WebPageProxy.cpp:
1823         (WebKit::WebPageProxy::pageDidScroll):
1824
1825 2015-05-22  Tim Horton  <timothy_horton@apple.com>
1826
1827         Remove action menu support
1828         https://bugs.webkit.org/show_bug.cgi?id=145305
1829         <rdar://problem/21070771>
1830
1831         Reviewed by Anders Carlsson.
1832
1833         * Configurations/WebKit.xcconfig:
1834         * Shared/API/c/WKActionMenuItemTypes.h:
1835         * Shared/API/c/WKActionMenuTypes.h:
1836         * UIProcess/API/Cocoa/WKViewPrivate.h:
1837         * UIProcess/API/mac/WKView.mm:
1838         (-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
1839         (-[WKView dealloc]): Deleted.
1840         (-[WKView mouseDown:]): Deleted.
1841         (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
1842         (-[WKView prepareForMenu:withEvent:]): Deleted.
1843         (-[WKView willOpenMenu:withEvent:]): Deleted.
1844         (-[WKView didCloseMenu:withEvent:]): Deleted.
1845         (-[WKView _didPerformActionMenuHitTest:forImmediateAction:contentPreventsDefault:userData:]): Deleted.
1846         (-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:]): Deleted.
1847         (-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:userData:]): Deleted.
1848         * UIProcess/API/mac/WKViewInternal.h:
1849         * UIProcess/PageClient.h:
1850         * UIProcess/WebPageProxy.cpp:
1851         (WebKit::WebPageProxy::performImmediateActionHitTestAtLocation):
1852         (WebKit::WebPageProxy::didPerformImmediateActionHitTest):
1853         (WebKit::WebPageProxy::performActionMenuHitTestAtLocation): Deleted.
1854         (WebKit::WebPageProxy::selectLastActionMenuRange): Deleted.
1855         (WebKit::WebPageProxy::focusAndSelectLastActionMenuHitTestResult): Deleted.
1856         (WebKit::WebPageProxy::didPerformActionMenuHitTest): Deleted.
1857         * UIProcess/WebPageProxy.h:
1858         * UIProcess/WebPageProxy.messages.in:
1859         * UIProcess/mac/PageClientImpl.h:
1860         * UIProcess/mac/PageClientImpl.mm:
1861         (WebKit::PageClientImpl::didPerformImmediateActionHitTest):
1862         (WebKit::PageClientImpl::didPerformActionMenuHitTest): Deleted.
1863         * UIProcess/mac/WKActionMenuController.h: Removed.
1864         * UIProcess/mac/WKActionMenuController.mm: Removed.
1865         * UIProcess/mac/WKImmediateActionController.h:
1866         * UIProcess/mac/WKImmediateActionController.mm:
1867         (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
1868         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
1869         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
1870         (-[WKImmediateActionController didPerformActionMenuHitTest:contentPreventsDefault:userData:]): Deleted.
1871         * WebKit2.xcodeproj/project.pbxproj:
1872         * WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h:
1873         (API::InjectedBundle::PageContextMenuClient::prepareForImmediateAction):
1874         (API::InjectedBundle::PageContextMenuClient::prepareForActionMenu): Deleted.
1875         * WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
1876         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
1877         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
1878         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
1879         (WebKit::InjectedBundlePageContextMenuClient::prepareForImmediateAction):
1880         (WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu): Deleted.
1881         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
1882         * WebProcess/WebPage/WebPage.h:
1883         * WebProcess/WebPage/WebPage.messages.in:
1884         * WebProcess/WebPage/WebPageOverlay.cpp:
1885         (WebKit::WebPageOverlay::actionContextForResultAtPoint):
1886         * WebProcess/WebPage/WebPageOverlay.h:
1887         (WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
1888         * WebProcess/WebPage/mac/WebPageMac.mm:
1889         (WebKit::textIndicatorTransitionForImmediateAction):
1890         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
1891         (WebKit::textIndicatorTransitionForActionMenu): Deleted.
1892         (WebKit::WebPage::performActionMenuHitTestAtLocation): Deleted.
1893         (WebKit::WebPage::selectLastActionMenuRange): Deleted.
1894         (WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult): Deleted.
1895         Remove everything, except some enums that clients still refer to.
1896         Also, leave SPI that used to be shared between immediate actions and
1897         action menus intact, even if it had "action menu" in the name. We can
1898         deprecate and rename in another patch... except for the very recently-added
1899         support from r184106, which we'll revert entirely, removing WKBundlePageOverlayV2, 
1900         which was not adopted by any clients.
1901
1902 2015-05-22  Brady Eidson  <beidson@apple.com>
1903
1904         Rework how the ResourceRequest user initiated property key is used.
1905         Followup to https://bugs.webkit.org/show_bug.cgi?id=145281
1906
1907         Reviewed by Dan Bernstein.
1908
1909         * Shared/API/Cocoa/_WKNSURLRequestExtras.mm:
1910         (-[NSURLRequest _web_isUserInitiated]):
1911         (-[NSMutableURLRequest _web_setIsUserInitiated:]):
1912
1913         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1914         (WKResourceRequestIsUserInitiatedKey): Deleted.
1915         (InitWebCoreSystemInterface): Deleted.
1916
1917 2015-05-21  Gavin Barraclough  <barraclough@apple.com>
1918
1919         Networking process sometimes suspended while WebContent runnable
1920         https://bugs.webkit.org/show_bug.cgi?id=145291
1921         <rdar://problem/21033029>
1922
1923         Reviewed by Andreas Kling.
1924
1925         There is an asymmetry in how the Networking process suspension is managed.
1926         We drop the assertion (& suspend the process) whenever the WebProcess says
1927         it is ready to suspend, but we only take the assertion (& resume execution)
1928         when the WebContent process is actually resumed. This leaves a race – where
1929         the WebContent process was willing to be suspended, but the UI app changed
1930         its mind suspending it. Since the WebContent process never actually suspended
1931         (we only prepared it to), we never send a resume, and since we never resume,
1932         we never wake the Networking process.
1933
1934         The fix is pretty clean. A web process should take a token on the networking
1935         process precisely whenever it holds an assertion on the web content process.
1936         This also enables a nice refinement, that when holding a BG assertion on the
1937         WebContent process we only need to hold a BG assertion on the networking
1938         process.
1939
1940         * UIProcess/Network/NetworkProcessProxy.cpp:
1941         (WebKit::NetworkProcessProxy::didSetAssertionState):
1942             - no-op
1943         * UIProcess/Network/NetworkProcessProxy.h:
1944             - added didSetAssertionState.
1945         * UIProcess/ProcessThrottler.cpp:
1946         (WebKit::ProcessThrottler::updateAssertionNow):
1947         (WebKit::ProcessThrottler::updateAssertion):
1948         (WebKit::ProcessThrottler::didConnectToProcess):
1949             - whenever taking/updating the assertion, inform the client via didSetAssertionState.
1950         * UIProcess/ProcessThrottlerClient.h:
1951             - added didSetAssertionState.
1952         * UIProcess/WebProcessProxy.cpp:
1953         (WebKit::WebProcessProxy::didFinishLaunching):
1954             removed initializeNetworkProcessActivityToken - this is taken via ProcessThrottler::didConnectToProcess.
1955         (WebKit::WebProcessProxy::sendProcessDidResume):
1956             - removed call to initializeNetworkProcessActivityToken - updated via didSetAssertionState.
1957         (WebKit::WebProcessProxy::processReadyToSuspend):
1958             - removed update of m_tokenForNetworkProcess - updated via didSetAssertionState.
1959         (WebKit::WebProcessProxy::didSetAssertionState):
1960             - update m_backgroundTokenForNetworkProcess/m_foregroundTokenForNetworkProcess.
1961         (WebKit::WebProcessProxy::initializeNetworkProcessActivityToken): Deleted.
1962             - updated via didSetAssertionState.
1963         * UIProcess/WebProcessProxy.h:
1964             - added didSetAssertionState, added separate FG/BG activity tokens for Networking process.
1965
1966 2015-05-22  Dan Bernstein  <mitz@apple.com>
1967
1968         Fixed the fix for <rdar://problem/20830673> Symlink the WebKit dylib instead of just the framework directory
1969         https://bugs.webkit.org/show_bug.cgi?id=145287
1970
1971         Reviewed by Anders Carlsson.
1972
1973         * WebKit2.xcodeproj/project.pbxproj: Give the symlink the correct destination.
1974
1975 2015-05-21  Brady Eidson  <beidson@apple.com>
1976
1977         Add an "initiated by user gesture" flag to ResourceRequest.
1978         https://bugs.webkit.org/show_bug.cgi?id=145281
1979
1980         Reviewed by Alex Christensen.
1981
1982         Expose a new category on NSURLRequest to allow SPI clients to easily set/get the flag:
1983         * Shared/API/Cocoa/_WKNSURLRequestExtras.h: Added.
1984         * Shared/API/Cocoa/_WKNSURLRequestExtras.mm: Added.
1985         (-[NSURLRequest _web_isUserInitiated]):
1986         (-[NSMutableURLRequest _web_setIsUserInitiated:]):
1987
1988         * WebKit2.xcodeproj/project.pbxproj:
1989
1990         Expose the new property key to WebCore:
1991         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1992         (WKResourceRequestIsUserInitiatedKey):
1993         (InitWebCoreSystemInterface):
1994
1995 2015-05-21  Daniel Bates  <dabates@apple.com>
1996
1997         Rollout <http://trac.webkit.org/changeset/183909>
1998         (https://bugs.webkit.org/show_bug.cgi?id=144657)
1999
2000         Revert <http://trac.webkit.org/changeset/183909> since pausing the database
2001         thread prevents in-progress transactions from completing. We need to think
2002         about this change some more.
2003
2004         * UIProcess/WebPageProxy.h:
2005         * UIProcess/ios/WKContentView.mm:
2006         (-[WKContentView _applicationDidEnterBackground:]): Deleted.
2007         * UIProcess/ios/WebPageProxyIOS.mm:
2008         (WebKit::WebPageProxy::applicationDidEnterBackground): Deleted.
2009         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
2010         (WebKit::WebDatabaseManager::setPauseAllDatabases): Deleted.
2011         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
2012         * WebProcess/WebPage/WebPage.h:
2013         * WebProcess/WebPage/WebPage.messages.in:
2014         * WebProcess/WebPage/ios/WebPageIOS.mm:
2015         (WebKit::WebPage::applicationWillEnterForeground): Deleted.
2016         (WebKit::WebPage::applicationDidEnterBackground): Deleted.
2017
2018 2015-05-21  Enrica Casucci  <enrica@apple.com>
2019
2020         [iOS] Crash when taking a snapshot of a large PDF.
2021         https://bugs.webkit.org/show_bug.cgi?id=145286
2022         rdar://problem/20892362
2023
2024         Reviewed by Tim Horton.
2025
2026         The code for the PDF case was incorrectly computing the snapshot rect.
2027         On top of that drawViewHierarchyInRect was ignoring the rect and
2028         always creating an image using the view bounds causing the crash.
2029         We are now always using the IOSurface if we are parented or
2030         an image context when we are not.
2031
2032         * UIProcess/API/Cocoa/WKWebView.mm:
2033         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2034
2035 2015-05-21  Anders Carlsson  <andersca@apple.com>
2036
2037         Symlink the WebKit dylib instead of just the framework directory
2038         https://bugs.webkit.org/show_bug.cgi?id=145287
2039         rdar://problem/20830673
2040
2041         Reviewed by Dan Bernstein.
2042
2043         * WebKit2.xcodeproj/project.pbxproj:
2044
2045 2015-05-21  Anders Carlsson  <andersca@apple.com>
2046
2047         WKWebsiteDataStore doesn't track and remove iOS Safari's offline application cache entries
2048         https://bugs.webkit.org/show_bug.cgi?id=145279
2049         rdar://problem/20657912
2050
2051         Reviewed by Dan Bernstein.
2052
2053         Special-case iOS Safari and WebApp when computing the default application cache directory.
2054
2055         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
2056         (API::applicationCacheDirectory):
2057         (API::WebsiteDataStore::defaultDataStoreConfiguration):
2058
2059 2015-05-21  Brian Weinstein  <bweinstein@apple.com>
2060
2061         Add a _WKWebKitContentExtensionStore initializer that takes a path.
2062         https://bugs.webkit.org/show_bug.cgi?id=145269 and work towards <rdar://problem/21031414>
2063
2064         Reviewed by Anders Carlsson.
2065
2066         * UIProcess/API/APIUserContentExtensionStore.cpp:
2067         (API::UserContentExtensionStore::storeWithPath):
2068         * UIProcess/API/APIUserContentExtensionStore.h:
2069         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
2070         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
2071         (+[_WKUserContentExtensionStore storeWithURL:]):
2072
2073 2015-05-21  Alexey Proskuryakov  <ap@apple.com>
2074
2075         Build fix. Silence some deprecation warnings.
2076
2077         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2078         (-[WKFileUploadPanel _presentPopoverWithContentViewController:animated:]):
2079         * UIProcess/ios/forms/WKFormInputControl.mm:
2080         (-[WKDateTimePopover initWithView:datePickerMode:]):
2081         * UIProcess/ios/forms/WKFormPopover.h:
2082         * UIProcess/ios/forms/WKFormPopover.mm:
2083         * UIProcess/ios/forms/WKFormSelectPopover.mm:
2084         (-[WKSelectPopover initWithView:hasGroups:]):
2085
2086 2015-05-21  Csaba Osztrogonác  <ossy@webkit.org>
2087
2088         [EFL] Remove an unused private field from EwkPopupMenuItem class
2089         https://bugs.webkit.org/show_bug.cgi?id=145249
2090
2091         Reviewed by Gyuyoung Kim.
2092
2093         * UIProcess/API/efl/ewk_popup_menu.cpp:
2094         (EwkPopupMenu::EwkPopupMenu):
2095         * UIProcess/API/efl/ewk_popup_menu_private.h:
2096
2097 2015-05-21  Csaba Osztrogonác  <ossy@webkit.org>
2098
2099         [EFL] Fix mismatched-tags warnings in UIProcess/API/efl
2100         https://bugs.webkit.org/show_bug.cgi?id=145129
2101
2102         Reviewed by Gyuyoung Kim.
2103
2104         * UIProcess/API/efl/EwkViewCallbacks.h:
2105         * UIProcess/API/efl/ewk_application_cache_manager.h:
2106         * UIProcess/API/efl/ewk_auth_request.h:
2107         * UIProcess/API/efl/ewk_back_forward_list.h:
2108         * UIProcess/API/efl/ewk_back_forward_list_item.h:
2109         * UIProcess/API/efl/ewk_color_picker.h:
2110         * UIProcess/API/efl/ewk_context.h:
2111         * UIProcess/API/efl/ewk_context_menu_item.h:
2112         * UIProcess/API/efl/ewk_cookie_manager.h:
2113         * UIProcess/API/efl/ewk_database_manager.h:
2114         * UIProcess/API/efl/ewk_download_job.h:
2115         * UIProcess/API/efl/ewk_error.h:
2116         * UIProcess/API/efl/ewk_favicon_database.h:
2117         * UIProcess/API/efl/ewk_file_chooser_request.h:
2118         * UIProcess/API/efl/ewk_form_submission_request.h:
2119         * UIProcess/API/efl/ewk_navigation_data.h:
2120         * UIProcess/API/efl/ewk_navigation_policy_decision.h:
2121         * UIProcess/API/efl/ewk_object.h:
2122         * UIProcess/API/efl/ewk_page_group.h:
2123         * UIProcess/API/efl/ewk_popup_menu.h:
2124         * UIProcess/API/efl/ewk_popup_menu_item.h:
2125         * UIProcess/API/efl/ewk_security_origin.h:
2126         * UIProcess/API/efl/ewk_settings.h:
2127         * UIProcess/API/efl/ewk_storage_manager.h:
2128         * UIProcess/API/efl/ewk_url_request.h:
2129         * UIProcess/API/efl/ewk_url_response.h:
2130         * UIProcess/API/efl/ewk_url_scheme_request.h:
2131         * UIProcess/API/efl/ewk_view.h:
2132         * UIProcess/API/efl/ewk_window_features.h:
2133         * WebProcess/InjectedBundle/API/efl/ewk_extension.h:
2134         * WebProcess/InjectedBundle/API/efl/ewk_page.h:
2135
2136 2015-05-21  Csaba Osztrogonác  <ossy@webkit.org>
2137
2138         Fix mismatched-tags warnings related to CoordinatedGraphics
2139         https://bugs.webkit.org/show_bug.cgi?id=145130
2140
2141         Reviewed by Darin Adler.
2142
2143         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
2144         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
2145         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
2146
2147 2015-05-20  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2148
2149         Unreviewed GTK build fix since r184686.
2150
2151         * UIProcess/gtk/WebProcessPoolGtk.cpp:
2152         (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Add *legacy* prefix.
2153         (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory): Deleted.
2154
2155 2015-05-20  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2156
2157         Unreviewed EFL build fix since r184686.
2158
2159         * UIProcess/efl/WebProcessPoolEfl.cpp:
2160         (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Add *legacy* prefix.
2161         (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory): Deleted.
2162
2163 2015-05-20  Chris Dumez  <cdumez@apple.com>
2164
2165         [WK2][iOS] Update WebContent process sandbox profile for AWD logging
2166         https://bugs.webkit.org/show_bug.cgi?id=145229
2167         <rdar://problem/20543269>
2168
2169         Reviewed by Alexey Proskuryakov.
2170
2171         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2172
2173 2015-05-20  Gavin Barraclough  <barraclough@apple.com>
2174
2175         dispatchViewStateChange should not wait for sync reply if the page isn't visible
2176         https://bugs.webkit.org/show_bug.cgi?id=145242
2177         <rdar://problem/20967937>
2178
2179         Reviewed by Ben Poulain.
2180
2181         This is particularly problematic on iOS, since if the page isn't visible the process is likely suspended.
2182
2183
2184         * UIProcess/WebPageProxy.cpp:
2185         (WebKit::WebPageProxy::dispatchViewStateChange):
2186         (WebKit::WebPageProxy::waitForDidUpdateViewState):
2187
2188 2015-05-20  Marcos Chavarría Teijeiro  <mchavarria@igalia.com>
2189
2190         Enable disk cache for range requests
2191         https://bugs.webkit.org/show_bug.cgi?id=144682
2192
2193         Reviewed by Antti Koivisto.
2194
2195         Add Range header value to the network cache key constructor so we take
2196         into account this value. The 206 response code is also marked to be cached.
2197
2198         * NetworkProcess/cache/NetworkCache.cpp:
2199         (WebKit::NetworkCache::makeCacheKey):
2200         (WebKit::NetworkCache::isStatusCodeCacheableByDefault):
2201         * NetworkProcess/cache/NetworkCacheKey.cpp:
2202         (WebKit::NetworkCache::Key::Key):
2203         (WebKit::NetworkCache::Key::operator=):
2204         (WebKit::NetworkCache::Key::computeHash):
2205         (WebKit::NetworkCache::Key::operator==):
2206         (WebKit::NetworkCache::Key::encode):
2207         (WebKit::NetworkCache::Key::decode):
2208         (WebKit::NetworkCache::Key::stringToHash): Deleted.
2209         * NetworkProcess/cache/NetworkCacheKey.h:
2210
2211 2015-05-20  Anders Carlsson  <andersca@apple.com>
2212
2213         WKWebsiteDataStore API doesn't report webkit.org as using Databases or App Cache after visiting http://www.webkit.org/demos/sticky-notes/
2214         https://bugs.webkit.org/show_bug.cgi?id=145238
2215         rdar://problem/20581175
2216
2217         Reviewed by Tim Horton.
2218
2219         Make sure to set the application cache and WebSQL directories when using the legacy data store.
2220
2221         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2222         (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
2223         (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory):
2224         Rename this and move it to the right place.
2225
2226         * UIProcess/WebProcessPool.cpp:
2227         (WebKit::legacyWebsiteDataStoreConfiguration):
2228         Rename this and add the application cache and WebSQL directories.
2229
2230         (WebKit::WebProcessPool::WebProcessPool):
2231         Call legacyWebsiteDataStoreConfiguration.
2232
2233         (WebKit::WebProcessPool::applicationCacheDirectory):
2234         Call legacyPlatformDefaultApplicationCacheDirectory.
2235
2236         * UIProcess/WebProcessPool.h:
2237
2238 2015-05-20  Enrica Casucci  <enrica@apple.com>
2239
2240         [iOS] Using CSS viewport units causes incorrect layout.
2241         https://bugs.webkit.org/show_bug.cgi?id=145225
2242         rdar://problem/20924495
2243
2244         Reviewed by Benjamin Poulain.
2245
2246         * WebProcess/WebPage/ios/WebPageIOS.mm:
2247         (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
2248
2249 2015-05-20  Tim Horton  <timothy_horton@apple.com>
2250
2251         Allow overriding the waitForDidUpdateViewState timeout
2252         https://bugs.webkit.org/show_bug.cgi?id=145230
2253         <rdar://problem/20990162>
2254
2255         Reviewed by Darin Adler.
2256
2257         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2258         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
2259         Use the value from NSUserDefaults, if it exists.
2260         We'll only check once, so changing the default requires a restart of the UI process.
2261
2262 2015-05-20  Anders Carlsson  <andersca@apple.com>
2263
2264         Make sure we always have a process pool to perform data store operations with
2265         https://bugs.webkit.org/show_bug.cgi?id=145231
2266         rdar://problem/20618248
2267
2268         Reviewed by Tim Horton.
2269
2270         Make sure that we always return a process pool. If we're a legacy C SPI per-context data store,
2271         find the process pool we're a part of and use that. Otherwise, create a new one.
2272     
2273         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2274         (WebKit::WebsiteDataStore::processPools):
2275
2276 2015-05-19  Jer Noble  <jer.noble@apple.com>
2277
2278         Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild.
2279         https://bugs.webkit.org/show_bug.cgi?id=145193
2280
2281         Reviewed by Eric Carlson.
2282
2283         Use HTMLMediaElementEnums instead of HTMLMediaElement.
2284
2285         * UIProcess/API/Cocoa/WKWebView.mm:
2286         (-[WKWebView _isShowingVideoOptimized]): HTMLMediaElement -> HTMLMediaElementEnums.
2287         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2288         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2289         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2290         (WebKit::WebVideoFullscreenManagerProxy::hasMode): Ditto.
2291         (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged): Ditto.
2292         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.
2293         (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged): Ditto.
2294         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2295         (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Ditto.
2296         * WebProcess/WebCoreSupport/WebChromeClient.h:
2297         * WebProcess/ios/WebVideoFullscreenManager.h:
2298         (WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode): Ditto.
2299         (WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode): Ditto.
2300         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
2301         * WebProcess/ios/WebVideoFullscreenManager.mm:
2302         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
2303         (WebKit::WebVideoFullscreenManager::fullscreenModeChanged): Ditto.
2304         (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.
2305
2306 2015-05-20  Anders Carlsson  <andersca@apple.com>
2307
2308         Refactor process pool enumeration code in WebsiteDataStore
2309         https://bugs.webkit.org/show_bug.cgi?id=145218
2310
2311         Reviewed by Tim Horton.
2312
2313         Also make sure to keep the WebProcessPool objects alive for the duration of the various data store
2314         operations. This is the first step towards having the data store create a single process pool lazily if
2315         there are no web views associated with the data store.
2316
2317         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2318         (WebKit::WebsiteDataStore::fetchData):
2319         (WebKit::WebsiteDataStore::removeData):
2320         (WebKit::WebsiteDataStore::processPools):
2321         * UIProcess/WebsiteData/WebsiteDataStore.h:
2322
2323 2015-05-20  Alex Christensen  <achristensen@webkit.org>
2324
2325         [Content Extensions] Relax restrictions on triggers that match everything.
2326         https://bugs.webkit.org/show_bug.cgi?id=145069
2327
2328         Reviewed by Benjamin Poulain.
2329
2330         * UIProcess/API/APIUserContentExtensionStore.h:
2331         Increment version number to reflect changes in DFABytecode.
2332
2333 2015-05-20  Sungmann Cho  <sungmann.cho@navercorp.com>
2334
2335         Minor cleanups to PluginProcessProxy.
2336         https://bugs.webkit.org/show_bug.cgi?id=145199
2337
2338         Reviewed by Anders Carlsson.
2339
2340         1. Remove unnecessary forward declaration.
2341         2. Remove unnecessary #include.
2342
2343         * UIProcess/Plugins/PluginProcessProxy.cpp:
2344         * UIProcess/Plugins/PluginProcessProxy.h:
2345
2346 2015-05-20  Marcos Chavarría Teijeiro  <mchavarria@igalia.com>
2347
2348         [GTK] Add some documentation to WebKitWebExtension
2349         https://bugs.webkit.org/show_bug.cgi?id=142786
2350
2351         Reviewed by Carlos Garcia Campos.
2352
2353         WebKitWebExtension API documentation lacks of some details and the information
2354         available is in some contributors blog posts. I add the section
2355         documentation with a small guide about how to use WebExtensions.
2356
2357         The code examples were taken from Carlos García and Adrián Pérez blog
2358         posts.
2359
2360         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
2361
2362 2015-05-20  Sungmann Cho  <sungmann.cho@navercorp.com>
2363
2364         Rename WebsiteDataStore::isNonPersistent() to WebsiteDataStore::isPersistent().
2365         https://bugs.webkit.org/show_bug.cgi?id=145111
2366
2367         Reviewed by Darin Adler.
2368
2369         This is a follow up to https://bugs.webkit.org/show_bug.cgi?id=144158.
2370
2371         * UIProcess/API/APIWebsiteDataStore.cpp:
2372         (API::WebsiteDataStore::isPersistent):
2373         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2374         (WebKit::WebsiteDataStore::fetchData):
2375         (WebKit::WebsiteDataStore::removeData):
2376         * UIProcess/WebsiteData/WebsiteDataStore.h:
2377         (WebKit::WebsiteDataStore::isPersistent):
2378         (WebKit::WebsiteDataStore::isNonPersistent): Deleted.
2379
2380 2015-05-20  Hyungwook Lee  <hyungwook.lee@navercorp.com>
2381
2382         [EFL] Fix build failure, linker does not find libXext.
2383         https://bugs.webkit.org/show_bug.cgi?id=144100
2384
2385         Reviewed by Gyuyoung Kim.
2386
2387         Move Xext library from WebProcess_LIBRARIES to WebKit2_LIBRARIES.
2388
2389         * PlatformEfl.cmake:
2390
2391 2015-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2392
2393         [SOUP] Network Cache: Implement ShareableResource for Soup and enable it for GTK platform
2394         https://bugs.webkit.org/show_bug.cgi?id=144380
2395
2396         Reviewed by Antti Koivisto.
2397
2398         It improves the network cache performance, by mmaping big
2399         resources and sending only the file descriptor to the web process
2400         instead of the actual file data. It needs some changes in
2401         cross-platform code, because we can't use the same approach as
2402         mac (it uses a platform specific implementation not available in
2403         other platforms).
2404
2405         * NetworkProcess/cache/NetworkCache.cpp:
2406         (WebKit::NetworkCache::Cache::store): Use
2407         Data::tryCreateSharedMemory() to create the shared memory used by
2408         the ShareableResource. Also add an ASSERT instead of checking the
2409         shareable resource created is not nullptr, because the
2410         ShareableResource::create() that receives a shared memory should
2411         never return nullptr.
2412         * NetworkProcess/cache/NetworkCacheData.h:
2413         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
2414         (WebKit::NetworkCache::Data::tryCreateSharedMemory):
2415         * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
2416         (WebKit::NetworkCache::Data::tryCreateSharedMemory): Create a
2417         SharedMemory object to wrap the mapped file, but keeping the ownership.
2418         * NetworkProcess/cache/NetworkCacheEntry.cpp:
2419         (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
2420         Use Data::tryCreateSharedMemory() to create the shared memory used
2421         bythe ShareableResource. Also add an ASSERT instead of checking
2422         the shareable resource created is not nullptr, because the
2423         ShareableResource::create() that receives a shared memory should
2424         never return nullptr.
2425         * Platform/SharedMemory.h:
2426         * Platform/unix/SharedMemoryUnix.cpp:
2427         (WebKit::SharedMemory::map): Use wrapMap() and initialize
2428         m_isWrappingMap to false.
2429         (WebKit::SharedMemory::wrapMap): Create a SharedMemory object for
2430         the given map, without taking its ownership.
2431         (WebKit::SharedMemory::~SharedMemory): Do not unmap and close the
2432         file descriptor if m_isWrappingMap is true.
2433         * Shared/ShareableResource.cpp:
2434         (WebKit::createShareableResourceDeallocator):
2435         (WebKit::ShareableResource::wrapInSharedBuffer): Create a SharedBuffer
2436         wrapping the ShareableResource data.
2437         (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer): Create
2438         a ShareableResource for the handle and create a SharedBuffer
2439         wrapping it.
2440         * Shared/ShareableResource.h:
2441         * WebKit2Prefix.h: Enable ENABLE_SHAREABLE_RESOURCE for GTK.
2442         * WebProcess/Network/WebResourceLoader.cpp:
2443         (WebKit::WebResourceLoader::didReceiveResource): Get the CFData
2444         from the SharedBuffer for QuickLook instead of wrapping the handle again.
2445
2446 2015-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2447
2448         [SOUP] Network Cache: Disable network cache efficacy logging
2449         https://bugs.webkit.org/show_bug.cgi?id=145172
2450
2451         Reviewed by Martin Robinson.
2452
2453         Disable network cache efficacy logging by default, since we are
2454         not currently using the collected data.
2455
2456         * UIProcess/soup/WebProcessPoolSoup.cpp:
2457         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2458
2459 2015-05-19  Michael Saboff  <msaboff@apple.com>
2460
2461         REGRESSION(183787): JIT is enabled for all builds
2462         https://bugs.webkit.org/show_bug.cgi?id=145179
2463
2464         Reviewed by Geoffrey Garen.
2465
2466         Eliminated the setting of ENABLE_JIT, as wtf/Platform.h has appropriate logic to
2467         set it depending on OS and CPU type.
2468
2469         * Configurations/FeatureDefines.xcconfig:
2470
2471 2015-05-19  Brady Eidson  <beidson@apple.com>
2472
2473         X-Frame-Options headers not respected when loading from application cache.
2474         <rdar://problem/14877623> and https://bugs.webkit.org/show_bug.cgi?id=131800
2475
2476         Reviewed by Alexey Proskuryakov.
2477
2478         * WebProcess/WebPage/WebPage.cpp:
2479         (WebKit::WebPage::loadDataImpl):
2480
2481 2015-05-19  Sungmann Cho  <sungmann.cho@navercorp.com>
2482
2483         Add PLUGIN_ARCHITECTURE(MAC) around WKNVCALayerRenderServerPort in NetscapeBrowserFunc.h.
2484         https://bugs.webkit.org/show_bug.cgi?id=145173
2485
2486         Reviewed by Anders Carlsson.
2487
2488         WKNVCALayerRenderServerPort in NetscapeBrowserFunc.h is meaningful only for Mac.
2489         So we need to add PLUGIN_ARCHITECTURE(MAC) around it.
2490
2491         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h:
2492
2493 2015-05-19  Brent Fulgham  <bfulgham@apple.com>
2494
2495         REGRESSION(142590): Part 2: Scroll-snap points are improperly snapping to earlier index values (Scrolling Thread) 
2496         https://bugs.webkit.org/show_bug.cgi?id=145175
2497         <rdar://problem/21023785>
2498
2499         Reviewed by Beth Dakin.
2500
2501         Add a stub implementation of isScrollSnapInProgress to match ScrollingCoordinator signature.
2502
2503         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
2504         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
2505         (WebKit::RemoteScrollingCoordinator::isScrollSnapInProgress): Added stub.
2506
2507 2015-05-19  Jeremy Jones  <jeremyj@apple.com>
2508
2509         WebVideoFullscreenManagerProxy has incorrect OS_VERSION_MIN_REQUIRED conditionals.
2510         https://bugs.webkit.org/show_bug.cgi?id=145158
2511
2512         Reviewed by Eric Carlson.
2513
2514         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2515         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
2516
2517 2015-05-19  Ting-Wei Lan  <lantw44@gmail.com>
2518
2519         [SOUP] Use st_birthtime to get creation time of files on systems support it
2520         https://bugs.webkit.org/show_bug.cgi?id=144989
2521
2522         Reviewed by Carlos Garcia Campos.
2523
2524         FreeBSD and NetBSD have either st_birthtime field or compatiblity macro
2525         with the same name in stat. It is better to use it instead of manually
2526         setting xattr, which is unreliable because both operating systems and
2527         file systems support are required.
2528
2529         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
2530         (WebKit::NetworkCache::fileTimes):
2531         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
2532         (WebKit::NetworkCache::IOChannel::IOChannel):
2533
2534 2015-05-19  Chris Dumez  <cdumez@apple.com>
2535
2536         Mark static variables as const when possible
2537         https://bugs.webkit.org/show_bug.cgi?id=145161
2538
2539         Reviewed by Andreas Kling.
2540
2541         * Platform/IPC/MessageEncoder.cpp:
2542         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2543         (WebKit::networkProcessLatencyQOS):
2544         (WebKit::networkProcessThroughputQOS):
2545         (WebKit::webProcessLatencyQOS):
2546         (WebKit::webProcessThroughputQOS):
2547         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2548         (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap):
2549         (WebKit::pluginProcessLatencyQOS):
2550         (WebKit::pluginProcessThroughputQOS):
2551         * WebProcess/WebPage/WebPage.cpp:
2552
2553 2015-05-18  Michael Catanzaro  <mcatanzaro@igalia.com>
2554
2555         [CMake] Ignore warnings in system headers
2556         https://bugs.webkit.org/show_bug.cgi?id=144747
2557
2558         Reviewed by Darin Adler.
2559
2560         Separate include directories into WebKit project includes and system includes. Suppress all
2561         warnings from headers in system include directories using the SYSTEM argument to
2562         the include_directories command.
2563
2564         * CMakeLists.txt:
2565         * PlatformEfl.cmake:
2566         * PlatformGTK.cmake:
2567
2568 2015-05-18  Csaba Osztrogonác  <ossy@webkit.org>
2569
2570         Fix return-type warnings in test_ewk2_color_picker.cpp
2571         https://bugs.webkit.org/show_bug.cgi?id=145122
2572
2573         Reviewed by Gyuyoung Kim.
2574
2575         * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
2576         (EWK2ColorPickerTest::hideColorPicker):
2577         (EWK2ColorPickerTest::hideColorPickerByRemovingElement):
2578
2579 2015-05-18  Skachkov Alexandr  <gskachkov@gmail.com>
2580
2581         [ES6] Arrow function syntax. Feature flag for arrow function
2582         https://bugs.webkit.org/show_bug.cgi?id=145108
2583
2584         Reviewed by Ryosuke Niwa.
2585
2586         Added feature flag ENABLE_ES6_ARROWFUNCTION_SYNTAX for arrow function
2587
2588         * Configurations/FeatureDefines.xcconfig:
2589
2590 2015-05-18  Anders Carlsson  <andersca@apple.com>
2591
2592         WKWebsiteDataStore should fully support session storage
2593         https://bugs.webkit.org/show_bug.cgi?id=145145
2594         rdar://problem/10690447
2595
2596         Reviewed by Sam Weinig.
2597
2598         Add a session store data type and handle it when clearing and fetching data.
2599
2600         * Shared/WebsiteData/WebsiteDataTypes.h:
2601         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
2602         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
2603         (dataTypesToString):
2604         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
2605         (WebKit::toWebsiteDataTypes):
2606         (WebKit::toWKWebsiteDataTypes):
2607         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2608         (+[WKWebsiteDataStore allWebsiteDataTypes]):
2609         * UIProcess/Storage/StorageManager.cpp:
2610         (WebKit::StorageManager::SessionStorageNamespace::origins):
2611         (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
2612         (WebKit::StorageManager::SessionStorageNamespace::clearAllStorageAreas):
2613         (WebKit::StorageManager::getSessionStorageOrigins):
2614         (WebKit::StorageManager::deleteSessionStorageOrigins):
2615         (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
2616         * UIProcess/Storage/StorageManager.h:
2617         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2618         (WebKit::WebsiteDataStore::fetchData):
2619         (WebKit::WebsiteDataStore::removeData):
2620
2621 2015-05-18  Brady Eidson  <beidson@apple.com>
2622
2623         Followup to: Networking process on iOS can be suspended and never exit
2624         https://bugs.webkit.org/show_bug.cgi?id=144971.
2625
2626         Unreviewed. Fixing API tests that revealed the unintentional change in behavior.
2627
2628         * Shared/ChildProcessProxy.cpp:
2629         (WebKit::ChildProcessProxy::shutDownProcess): The on WebProcessProxy code path that this
2630           was adopted from had an m_connection null check, and that null check needs to remain.
2631
2632 2015-05-18  Csaba Osztrogonác  <ossy@webkit.org>
2633
2634         [GTK] URTBF after r184503.
2635
2636         * PlatformGTK.cmake:
2637
2638 2015-05-18  Brady Eidson  <beidson@apple.com>
2639
2640         Networking process on iOS can be suspended and never exit.
2641         <rdar://problem/20368630> and https://bugs.webkit.org/show_bug.cgi?id=144971
2642
2643         Reviewed by Darin Adler.
2644
2645         There's a few issues here.
2646         
2647         1 - When the NetworkProcessProxy goes away, it takes its process assertion with it. This causes
2648             the Network process to suspend indefinitely, unable to ever respond to IPC::Connection callbacks.
2649             We already solved this with WebProcess with a watchdog timer keeping both the process assertion
2650             and xpc_connection alive while the process shuts down. This patch expands that to the network
2651             process, and it will be easy to expand that to database and plugin processes doing forward.
2652         
2653         2 - All of our child processes either decide to self-terminate or listen for their connection to
2654             close at which point they terminate. This leads to various races. We should
2655             move to a model where the UI process explicitly tells them to shutdown, and this patch starts us 
2656             down that path.
2657         
2658         * CMakeLists.txt:
2659         * DerivedSources.make:
2660         * WebKit2.xcodeproj/project.pbxproj:
2661         
2662         * NetworkProcess/NetworkProcess.cpp:
2663         (WebKit::NetworkProcess::didReceiveMessage): Send ChildProcess messages to ChildProcess.
2664         
2665         * Shared/ChildProcess.cpp:
2666         (WebKit::ChildProcess::shutDown): For now, just terminate the process. In the future have the
2667           process do cleanup work before it is terminated.
2668         * Shared/ChildProcess.h:
2669         * Shared/ChildProcess.messages.in: Added.
2670         
2671         * Shared/ChildProcessProxy.cpp:
2672         (WebKit::ChildProcessProxy::shutDownProcess): Set a watchdog and - if possible - explicitly message 
2673           the process to ShutDown.
2674         (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded): Deleted.
2675         * Shared/ChildProcessProxy.h:
2676         
2677         * UIProcess/WebProcessPool.cpp:
2678         (WebKit::WebProcessPool::~WebProcessPool): Explicitly tell the network process to shut down.
2679         
2680         * UIProcess/WebProcessProxy.cpp:
2681         (WebKit::WebProcessProxy::removeWebPage): Move abortProcessLaunchIfNeeded() and the watchdog timer
2682           code to ChildProcessProxy::shutDownProcess.
2683         
2684         * WebProcess/WebProcess.cpp:
2685         (WebKit::WebProcess::didReceiveMessage): Send ChildProcess messages to ChildProcess::didReceiveMessage.
2686
2687 2015-05-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2688
2689         Network Cache: Make Data::adoptMap take the ownership of the file descriptor
2690         https://bugs.webkit.org/show_bug.cgi?id=144950
2691
2692         Reviewed by Antti Koivisto.
2693
2694         It will be required to implement ShareableResource for soup
2695         network backend. Also move the common code of Data to a common
2696         file and add mapToFile(). The mapFile version that receives a file
2697         descriptor has been renamed to adoptAndMapFile().
2698
2699         * CMakeLists.txt: Add new file to compilation.
2700         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
2701         (WebKit::NetworkCache::BlobStorage::add): Use mapToFile().
2702         * NetworkProcess/cache/NetworkCacheData.cpp: Added.
2703         (WebKit::NetworkCache::Data::mapToFile): Write the data to the
2704         given file and map it.
2705         (WebKit::NetworkCache::mapFile):
2706         (WebKit::NetworkCache::adoptAndMapFile):
2707         (WebKit::NetworkCache::computeSHA1):
2708         (WebKit::NetworkCache::bytesEqual):
2709         * NetworkProcess/cache/NetworkCacheData.h:
2710         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
2711         (WebKit::NetworkCache::Data::adoptMap): Close the file descriptor.
2712         * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
2713         (WebKit::NetworkCache::Data::Data): Use a constructor that
2714         receives a file descriptor instead of the one receiving
2715         Backing. If the file descriptor is not -1 then the Data is a map.
2716         (WebKit::NetworkCache::MapWrapper::~MapWrapper): Also close the
2717         file descriptor.
2718         (WebKit::NetworkCache::Data::adoptMap): Pass the file descriptor
2719         to the MapWrapper and create the Data passing the file descriptor.
2720         * UIProcess/API/APIUserContentExtensionStore.cpp:
2721         (API::openAndMapContentExtension): Use mapFile that receives a
2722         file path.
2723         (API::compiledToFile): Use adoptAndMapFile() and don't close the
2724         descriptor.
2725
2726 2015-05-16  Andy Estes  <aestes@apple.com>
2727
2728         [iOS] WKPDFView should not follow javascript: links
2729         https://bugs.webkit.org/show_bug.cgi?id=145101
2730
2731         Reviewed by Dan Bernstein.
2732
2733         * UIProcess/WebPageProxy.cpp:
2734         (WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick): Returned early if url's protocol is javascript:.
2735         (WebKit::WebPageProxy::navigateToURLWithSimulatedClick): Renamed to navigateToPDFLinkWithSimulatedClick to
2736         reflect that this function is exclusively for following PDF links.
2737         * UIProcess/WebPageProxy.h:
2738         * UIProcess/ios/WKPDFView.mm:
2739         (-[WKPDFView annotation:wasTouchedAtPoint:controller:]):
2740         (-[WKPDFView actionSheetAssistant:openElementAtLocation:]):
2741         * WebProcess/WebPage/WebPage.cpp:
2742         (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick): Renamed from navigateToURLWithSimulatedClick.
2743         (WebKit::WebPage::navigateToURLWithSimulatedClick): Renamed to navigateToPDFLinkWithSimulatedClick.
2744         * WebProcess/WebPage/WebPage.h:
2745         * WebProcess/WebPage/WebPage.messages.in:
2746
2747 2015-05-16  Brent Fulgham  <bfulgham@apple.com>
2748
2749         [iOS] Remote scrolling tree needs to coordinate scroll snap state during resize/rotations
2750         https://bugs.webkit.org/show_bug.cgi?id=145059
2751         <rdar://problem/20975978>
2752
2753         Reviewed by Simon Fraser.
2754
2755         The web view needs to update its scroll snap point offsets to take into account any
2756         adjustments to the view size caused by content insets. We also need to update the
2757         offstes after device rotation.
2758
2759         * UIProcess/API/Cocoa/WKWebView.mm:
2760         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Retrieve the proper
2761         computed content inset for the view and incorporate into any scroll snap point adjustments.
2762         (-[WKWebView _updateVisibleContentRects]): If we have active scroll snap points, 
2763         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2764         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2765         (WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Update to account
2766         for content inset.
2767         (WebKit::RemoteScrollingCoordinatorProxy::shouldSnapForMainFrameScrolling): Also validate that the
2768         active index is valid.
2769         (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Update to track
2770         current active snap offset index.
2771         (WebKit::RemoteScrollingCoordinatorProxy::hasActiveSnapPoint): Added.
2772         (WebKit::RemoteScrollingCoordinatorProxy::nearestActiveSnapPoint): Added. It calculates the proper
2773         scroll position incorporating any snap point and content insets.
2774
2775 2015-05-15  Yongjun Zhang  <yongjun_zhang@apple.com>
2776
2777         Don't reset the preview recognizer in [WKContentViewInteraction cleanupInteraction]
2778         https://bugs.webkit.org/show_bug.cgi?id=145081
2779
2780         We shouldn't reset the recognizer in [WKContentViewInteraction cleanupInteraction] since we don't re-add it
2781         back to WKContentView when the process relaunched. Since we already add/remove it when the view is move into/
2782         removed from the window, we don't need reset it in cleanupInteraction.
2783
2784         Reviewed by Dan Bernstein.
2785
2786         * UIProcess/ios/WKContentViewInteraction.mm:
2787         (-[WKContentView cleanupInteraction]):
2788
2789 2015-05-15  James Savage  <james.savage@apple.com>
2790
2791         REGRESSION (r181910): WKWebView incorrectly scales snapshot
2792         https://bugs.webkit.org/show_bug.cgi?id=145076
2793
2794         Reviewed by Tim Horton.
2795
2796         We added a fast path to snapshotting using IOSurfaces with
2797         http://trac.webkit.org/changeset/181910 which incorrectly determined
2798         scale and transform and resulted in bad snapshots in some situations.
2799
2800         * UIProcess/API/Cocoa/WKWebView.mm:
2801         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2802         When snapshotting an IOSurface we need to compute our scale based off of
2803         the rect in the WKWebView coordinates, we also failed to account for
2804         non-zero origins in the snapshot rect. Remove an unused varible while
2805         we're here.
2806
2807 2015-05-15  Alex Christensen  <achristensen@webkit.org>
2808
2809         [Content Extensions] Fail to load old content extension files
2810         https://bugs.webkit.org/show_bug.cgi?id=145027
2811
2812         Reviewed by Eric Carlson.
2813
2814         * UIProcess/API/APIUserContentExtensionStore.cpp:
2815         (API::openAndMapContentExtension):
2816         * UIProcess/API/APIUserContentExtensionStore.h:
2817
2818 2015-05-15  Jeremy Jones  <jeremyj@apple.com>
2819
2820         Limit alternate fullscreen with linked on or after.
2821         https://bugs.webkit.org/show_bug.cgi?id=144894
2822
2823         Reviewed by Dean Jackson.
2824
2825         * UIProcess/API/Cocoa/WKWebView.mm:
2826         (shouldAllowAlternateFullscreen): Added.
2827         (-[WKWebView initWithFrame:configuration:]):
2828
2829 2015-05-15  Chris Dumez  <cdumez@apple.com>
2830
2831         [WK2][Cocoa] Back swipe tab snapshot takes a long time to be removed on bing.com
2832         https://bugs.webkit.org/show_bug.cgi?id=145061
2833         <rdar://problem/20939743>
2834
2835         Reviewed by Tim Horton.
2836
2837         When swiping back from a video search result to the list of video
2838         search results on bing.com, the back swipe gesture tab snapshot takes
2839         ~3 seconds to be removed, even though the page gets loaded almost
2840         instantly from PageCache. The tab snapshot should be removed as soon as
2841         the load is done.
2842
2843         The issue is that we only cleared the back swipe gesture tab snapshot
2844         after PageClient::didFinishLoadForMainFrame() has been called. However,
2845         PageClient::didFinishLoadForMainFrame() was only being called by
2846         WebPageProxy if the main frame loaded *without* error. In case the main
2847         frame loaded with an error, only WebPageProxy::didFailLoadForFrame() is
2848         called, not WebPageProxy::didFinishLoadForFrame() and we would fail to
2849         remove the gesture snapshot until the 3 seconds timeout.
2850
2851         This patch calls PageClient::didFinishLoadForMainFrame() from
2852         WebPageProxy::didFailLoadForFrame() so we remove the snapshot in the
2853         error case as well.
2854
2855         The reason didFailLoadForFrame() is being called on bing.com video
2856         search results is because a "ping" load is aborted when the page is
2857         entering PageCache. Aborting any kind of resource load sets a
2858         "cancellation" error on the main document.
2859
2860         * UIProcess/WebPageProxy.cpp:
2861         (WebKit::WebPageProxy::didFailLoadForFrame):
2862
2863 2015-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2864
2865         REGRESSION(r183861): [SOUP] Downloads are broken when using the Network Process
2866         https://bugs.webkit.org/show_bug.cgi?id=144738
2867
2868         Reviewed by Alexey Proskuryakov.
2869
2870         When converting the main resource handle to a download, the
2871         NetworkResourceLoader is aborted, and the ResourceHandle is
2872         cleaned up aborting the download operation. We need to use a
2873         different ResourceHandle for the download operation.
2874
2875         * Shared/Downloads/soup/DownloadSoup.cpp:
2876         (WebKit::Download::startWithHandle): Use ResourceHandle::releaseForDownload()
2877         instead of reusing the given handle.
2878
2879 2015-05-14  Brady Eidson  <beidson@apple.com>
2880
2881         Rename connectionDidClose and related methods to be more clear.
2882         https://bugs.webkit.org/show_bug.cgi?id=145030
2883
2884         Reviewed by Darin Adler.
2885
2886         These methods were easy to confuse with "Connection::Client::didClose()", yet they
2887         were about something much more explicit: A child process being shut down by the UI Process.
2888
2889         Let's call them as such.
2890
2891         * Shared/ChildProcessProxy.cpp:
2892         (WebKit::ChildProcessProxy::shutDownProcess):
2893         (WebKit::ChildProcessProxy::clearConnection): Deleted.
2894         (WebKit::ChildProcessProxy::connectionDidClose): Deleted.
2895         * Shared/ChildProcessProxy.h:
2896
2897         * UIProcess/Databases/DatabaseProcessProxy.cpp:
2898         (WebKit::DatabaseProcessProxy::processWillShutDown):
2899         * UIProcess/Databases/DatabaseProcessProxy.h:
2900
2901         * UIProcess/Network/NetworkProcessProxy.cpp:
2902         (WebKit::NetworkProcessProxy::processWillShutDown):
2903         * UIProcess/Network/NetworkProcessProxy.h:
2904
2905         * UIProcess/Plugins/PluginProcessProxy.cpp:
2906         (WebKit::PluginProcessProxy::processWillShutDown):
2907         * UIProcess/Plugins/PluginProcessProxy.h:
2908
2909         * UIProcess/WebFrameProxy.cpp:
2910         (WebKit::WebFrameProxy::webProcessWillShutDown):
2911         (WebKit::WebFrameProxy::disconnect): Deleted.
2912         * UIProcess/WebFrameProxy.h:
2913
2914         * UIProcess/WebPageProxy.cpp:
2915         (WebKit::WebPageProxy::webProcessWillShutDown):
2916         (WebKit::WebPageProxy::connectionDidClose): Deleted.
2917         * UIProcess/WebPageProxy.h:
2918
2919         * UIProcess/WebProcessLifetimeTracker.cpp:
2920         (WebKit::WebProcessLifetimeTracker::webProcessWillShutDown):
2921         (WebKit::WebProcessLifetimeTracker::connectionDidClose): Deleted.
2922         * UIProcess/WebProcessLifetimeTracker.h:
2923
2924         * UIProcess/WebProcessProxy.cpp:
2925         (WebKit::WebProcessProxy::processWillShutDown):
2926         (WebKit::WebProcessProxy::shutDown):
2927         (WebKit::WebProcessProxy::removeWebPage):
2928         (WebKit::WebProcessProxy::didClose):
2929         (WebKit::WebProcessProxy::disconnectFramesFromPage):
2930         (WebKit::WebProcessProxy::shouldTerminate):
2931         (WebKit::WebProcessProxy::requestTermination):
2932         (WebKit::WebProcessProxy::connectionDidClose): Deleted.
2933         (WebKit::WebProcessProxy::disconnect): Deleted.
2934         * UIProcess/WebProcessProxy.h:
2935
2936 2015-05-14  Zhuo Li  <zachli@apple.com>
2937
2938         Some CFNetwork SPI to reset HSTS hosts added since a date should not be used on Yosemite.
2939         https://bugs.webkit.org/show_bug.cgi?id=145025.
2940         and
2941         rdar://problem/20646308.
2942
2943         Reviewed by Alexey Proskuryakov.
2944
2945         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2946         (WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate):
2947
2948 2015-05-14  Timothy Horton  <timothy_horton@apple.com>
2949
2950         Add a layout mode that scales down the view to try to fit the document
2951         https://bugs.webkit.org/show_bug.cgi?id=145022
2952         <rdar://problem/19790341>
2953
2954         Reviewed by Dean Jackson.
2955
2956         * Shared/WebPageCreationParameters.cpp:
2957         (WebKit::WebPageCreationParameters::encode):
2958         (WebKit::WebPageCreationParameters::decode):
2959         * Shared/WebPageCreationParameters.h:
2960         * UIProcess/WebPageProxy.cpp:
2961         (WebKit::WebPageProxy::creationParameters):
2962         (WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
2963         * UIProcess/WebPageProxy.h:
2964         * WebProcess/WebPage/DrawingArea.h:
2965         (WebKit::DrawingArea::setShouldScaleViewToFitDocument):
2966         * WebProcess/WebPage/WebPage.cpp:
2967         (WebKit::WebPage::WebPage):
2968         (WebKit::WebPage::setShouldScaleViewToFitDocument):
2969         * WebProcess/WebPage/WebPage.h:
2970         * WebProcess/WebPage/WebPage.messages.in:
2971         Plumb shouldScaleViewToFitDocument through to the DrawingArea.
2972
2973         * UIProcess/mac/WKViewLayoutStrategy.mm:
2974         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
2975         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]):
2976         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy updateLayout]):
2977         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy willChangeLayoutStrategy]):
2978         * UIProcess/API/C/WKLayoutMode.h:
2979         * UIProcess/API/Cocoa/_WKLayoutMode.h:
2980         Add a new layout mode, which just turns on shouldScaleViewToFitDocument,
2981         and otherwise behaves as normal.
2982
2983         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2984         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2985         (WebKit::TiledCoreAnimationDrawingArea::setShouldScaleViewToFitDocument):
2986         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
2987         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2988         On every flush where either the document size or view size has changed,
2989         or layout is outstanding, do a layout with fixed layout off to determine
2990         whether the document fits inside the view. If it doesn't, scale it down
2991         to fit. This will require an extra layout for every resize while in the
2992         scaled-down state, but there is potential for future optimization.
2993
2994 2015-05-14  Anders Carlsson  <andersca@apple.com>
2995
2996         Local storage origins should include origins with transient local storage
2997         https://bugs.webkit.org/show_bug.cgi?id=145017
2998         rdar://problem/10690447
2999
3000         Reviewed by Sam Weinig.
3001
3002         The transient local storage namespaces are used for third party data blocking and will stay
3003         around until the UI process exits so we need to be able to include website data from transient storage
3004         in the website data store APIs.
3005
3006         * UIProcess/Storage/StorageManager.cpp:
3007         (WebKit::StorageManager::TransientLocalStorageNamespace::origins):
3008         (WebKit::StorageManager::getLocalStorageOrigins):
3009         * UIProcess/Storage/StorageManager.h:
3010         * UIProcess/WebKeyValueStorageManager.cpp:
3011         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
3012         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3013         (WebKit::WebsiteDataStore::fetchData):
3014
3015 2015-05-14  Beth Dakin  <bdakin@apple.com>
3016
3017         Change range of possible forces for mouseforcechanged DOM event
3018         https://bugs.webkit.org/show_bug.cgi?id=144987
3019         -and corresponding-
3020         rdar://problem/20472802
3021
3022         Reviewed by Tim Horton.
3023
3024         Change to a 0-3 range.
3025         * Shared/mac/WebEventFactory.mm:
3026         (WebKit::WebEventFactory::createWebMouseEvent):
3027
3028 2015-05-14  Zan Dobersek  <zdobersek@igalia.com>
3029
3030         [GTK] Add missing ENABLE(NETSCAPE_PLUGIN_API) build guards
3031         https://bugs.webkit.org/show_bug.cgi?id=144994
3032
3033         Reviewed by Carlos Garcia Campos.
3034
3035         This fixes the build when configured with Netscape plugin API
3036         support disabled.
3037
3038         * UIProcess/API/gtk/WebKitWebContext.cpp:
3039         (webkit_web_context_set_additional_plugins_directory):
3040         (webkitWebContextGetPluginThread):
3041         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
3042         (WebKit::ProcessLauncher::launchProcess):
3043
3044 2015-05-13  Carlos Garcia Campos  <cgarcia@igalia.com>
3045
3046         [SOUP] Network Cache: NetworkProcess segfault when file system doesn't support xattrs
3047         https://bugs.webkit.org/show_bug.cgi?id=144953
3048
3049         Reviewed by Martin Robinson.
3050
3051         Return early if we fail to get the birthtime xattr.
3052
3053         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
3054         (WebKit::NetworkCache::fileTimes):
3055
3056 2015-05-13  Daniel Bates  <dabates@apple.com>
3057
3058         Rename ProcessThrottlerClient::{send, cancel}ProcessWillSuspend() to {send, cancel}PrepareToSuspend()
3059         https://bugs.webkit.org/show_bug.cgi?id=144619
3060         <rdar://problem/20812779>
3061
3062         Reviewed by Andy Estes.
3063
3064         The names of the functions ProcessThrottlerClient::{send, cancel}ProcessWillSuspend() are misnomers. These
3065         functions are called when the ProcessThrottler wants to prepare the process that it manages for suspension
3066         and changes its mind, respectively. That is, these functions do not actually correspond to the OS decision
3067         to suspend a process or cancel the suspension of a process, respectively. So, rename these functions and
3068         associated {Network, Web}ProcessProxy message names to better describe their purpose.
3069
3070         * NetworkProcess/NetworkProcess.cpp:
3071         (WebKit::NetworkProcess::prepareToSuspend):
3072         (WebKit::NetworkProcess::cancelPrepareToSuspend):
3073         (WebKit::NetworkProcess::processWillSuspend): Deleted.
3074         (WebKit::NetworkProcess::cancelProcessWillSuspend): Deleted.
3075         * NetworkProcess/NetworkProcess.h:
3076         * NetworkProcess/NetworkProcess.messages.in:
3077         * UIProcess/Network/NetworkProcessProxy.cpp:
3078         (WebKit::NetworkProcessProxy::sendPrepareToSuspend):
3079         (WebKit::NetworkProcessProxy::sendCancelPrepareToSuspend):
3080         (WebKit::NetworkProcessProxy::sendProcessWillSuspend): Deleted.
3081         (WebKit::NetworkProcessProxy::sendCancelProcessWillSuspend): Deleted.
3082         * UIProcess/Network/NetworkProcessProxy.h:
3083         * UIProcess/ProcessThrottler.cpp:
3084         (WebKit::ProcessThrottler::updateAssertion):
3085         * UIProcess/ProcessThrottlerClient.h:
3086         * UIProcess/WebProcessProxy.cpp:
3087         (WebKit::WebProcess::actualPrepareToSuspend): Formerly named prepareToSuspend.
3088         (WebKit::WebProcessProxy::sendPrepareToSuspend):
3089         (WebKit::WebProcessProxy::sendCancelPrepareToSuspend):
3090         (WebKit::WebProcessProxy::sendProcessWillSuspend): Deleted.
3091         (WebKit::WebProcessProxy::sendCancelProcessWillSuspend): Deleted.
3092         * UIProcess/WebProcessProxy.h:
3093         * WebProcess/WebProcess.cpp:
3094         (WebKit::WebProcess::prepareToSuspend):
3095         (WebKit::WebProcess::cancelPrepareToSuspend):
3096         (WebKit::WebProcess::processWillSuspend): Deleted.
3097         (WebKit::WebProcess::cancelProcessWillSuspend): Deleted.
3098         * WebProcess/WebProcess.h:
3099         * WebProcess/WebProcess.messages.in:
3100
3101 2015-05-13  Anders Carlsson  <andersca@apple.com>
3102
3103         Don't create a per-pool data store when using the modern API
3104         https://bugs.webkit.org/show_bug.cgi?id=144963
3105         rdar://problem/20331756
3106
3107         Reviewed by Tim Horton.
3108
3109         * UIProcess/API/APIProcessPoolConfiguration.cpp:
3110         (API::ProcessPoolConfiguration::createWithLegacyOptions):
3111         (API::ProcessPoolConfiguration::copy):
3112         * UIProcess/API/APIProcessPoolConfiguration.h:
3113         Keep track of whether the process pool should have a data store.
3114
3115         * UIProcess/API/C/WKContext.cpp:
3116         (WKContextGetWebsiteDataStore):
3117         * UIProcess/WebKeyValueStorageManager.cpp:
3118         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
3119         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
3120         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
3121         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
3122         Update now that WebProcessPool::dataStore() no longer returns a reference.
3123
3124         * UIProcess/WebProcessPool.cpp:
3125         (WebKit::WebProcessPool::WebProcessPool):
3126         Only create a data store if the configuration states that we should.
3127
3128         * UIProcess/WebProcessPool.h:
3129         Change dataStore() to return a pointer instead of a reference.
3130
3131 2015-05-13  Alexey Proskuryakov  <ap@apple.com>
3132
3133         [Mac] Sandbox violation reading SubmitDiagInfo.domains
3134         https://bugs.webkit.org/show_bug.cgi?id=144962
3135         rdar://problem/20719330
3136
3137         Reviewed by Darin Adler.
3138
3139         * WebProcess/com.apple.WebProcess.sb.in:
3140
3141 2015-05-13  Beth Dakin  <bdakin@apple.com>
3142
3143         Speculative build fix.
3144
3145         * UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h:
3146
3147 2015-05-13  Michael Catanzaro  <mcatanzaro@igalia.com>
3148
3149         [GTK][CMake] Extra include directory when libnotify is present but disabled
3150         https://bugs.webkit.org/show_bug.cgi?id=144941
3151
3152         Reviewed by Martin Robinson.
3153
3154         Add LIBNOTIFY_INCLUDE_DIRS to WebKit2_INCLUDE_DIRECTORIES only if USE_LIBNOTIFY is true,
3155         rather than checking LIBNOTIFY_FOUND.
3156
3157         * PlatformGTK.cmake:
3158
3159 2015-05-13  Beth Dakin  <bdakin@apple.com>
3160
3161         Need SPI to set the overlay scroll bar style
3162         https://bugs.webkit.org/show_bug.cgi?id=144928
3163         -and corresponding-
3164         rdar://problem/20143614
3165
3166         Reviewed by Anders Carlsson.
3167
3168         Make scrollbarOverlayStyle a part of the creation parameters. 
3169         * Shared/WebPageCreationParameters.cpp:
3170         (WebKit::WebPageCreationParameters::encode):
3171         (WebKit::WebPageCreationParameters::decode):
3172         * Shared/WebPageCreationParameters.h:
3173
3174         New SPI.
3175         * UIProcess/API/Cocoa/WKViewPrivate.h:
3176         * UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h: Added.
3177         * UIProcess/API/mac/WKView.mm:
3178         (-[WKView _setOverlayScrollbarStyle:]):
3179         (-[WKView _overlayScrollbarStyle]):
3180
3181         Store m_scrollbarOverlayStyle on WebPageProxy, and set it to the WebProcess.
3182         * UIProcess/WebPageProxy.cpp:
3183         (WebKit::WebPageProxy::WebPageProxy):
3184         (WebKit::WebPageProxy::creationParameters):
3185         (WebKit::WebPageProxy::setOverlayScrollbarStyle):
3186         * UIProcess/WebPageProxy.h:
3187         (WebKit::WebPageProxy::overlayScrollbarStyle):
3188         * WebKit2.xcodeproj/project.pbxproj:
3189
3190         Return WebPage’s scrollbarOverlayStyle().
3191         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3192         (WebKit::WebChromeClient::preferredScrollbarOverlayStyle):
3193         * WebProcess/WebCoreSupport/WebChromeClient.h:
3194
3195         Cache the scrollbarOverlayStyle() here for the WebProcess. 
3196         * WebProcess/WebPage/WebPage.cpp:
3197         (WebKit::WebPage::WebPage):
3198         (WebKit::WebPage::setScrollbarOverlayStyle):
3199         * WebProcess/WebPage/WebPage.h:
3200         (WebKit::WebPage::scrollbarOverlayStyle):
3201         * WebProcess/WebPage/WebPage.messages.in:
3202
3203 2015-05-13  Anders Carlsson  <andersca@apple.com>
3204
3205         Rename some StorageManager functions to indicate that they work on local storage entries
3206         https://bugs.webkit.org/show_bug.cgi?id=144958
3207         First part of rdar://problem/10690447.
3208
3209         Reviewed by Beth Dakin.
3210
3211         * UIProcess/Storage/StorageManager.cpp:
3212         (WebKit::StorageManager::getLocalStorageOrigins):
3213         (WebKit::StorageManager::getLocalStorageDetailsByOrigin):
3214         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
3215         (WebKit::StorageManager::deleteAllLocalStorageEntries):
3216         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
3217         (WebKit::StorageManager::getOrigins): Deleted.
3218         (WebKit::StorageManager::getStorageDetailsByOrigin): Deleted.
3219         (WebKit::StorageManager::deleteEntriesForOrigin): Deleted.
3220         (WebKit::StorageManager::deleteAllEntries): Deleted.
3221         (WebKit::StorageManager::deleteEntriesForOrigins): Deleted.
3222         * UIProcess/Storage/StorageManager.h:
3223         * UIProcess/WebKeyValueStorageManager.cpp:
3224         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
3225         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
3226         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
3227         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
3228         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3229         (WebKit::WebsiteDataStore::fetchData):
3230         (WebKit::WebsiteDataStore::removeData):
3231
3232 2015-05-13  Joseph Pecoraro  <pecoraro@apple.com>
3233
3234         Crash under WebKit::WebInspectorProxy::attachAvailabilityChanged sometimes opening new page
3235         https://bugs.webkit.org/show_bug.cgi?id=144957
3236
3237         Reviewed by Simon Fraser.
3238
3239         * UIProcess/WebInspectorProxy.cpp:
3240         (WebKit::WebInspectorProxy::attachAvailabilityChanged):
3241
3242 2015-05-13  Joseph Pecoraro  <pecoraro@apple.com>
3243
3244         Pass String as reference in more places
3245         https://bugs.webkit.org/show_bug.cgi?id=144769
3246
3247         Reviewed by Daniel Bates.
3248
3249         * WebProcess/WebPage/WebInspectorUI.cpp:
3250         (WebKit::WebInspectorUI::showMainResourceForFrame):
3251         * WebProcess/WebPage/WebInspectorUI.h:
3252
3253 2015-05-13  Timothy Horton  <timothy_horton@apple.com>
3254
3255         View scale changes are temporarily lost after restoring a page from the page cache
3256         https://bugs.webkit.org/show_bug.cgi?id=144934
3257
3258         Reviewed by Brady Eidson.
3259
3260         * WebProcess/WebPage/WebPage.cpp:
3261         (WebKit::WebPage::WebPage):
3262         (WebKit::WebPage::scalePage):
3263         (WebKit::WebPage::scalePageInViewCoordinates):
3264         (WebKit::WebPage::pageScaleFactor):
3265         (WebKit::WebPage::viewScaleFactor):
3266         (WebKit::WebPage::scaleView):
3267         * WebProcess/WebPage/WebPage.h:
3268         (WebKit::WebPage::viewScaleFactor): Deleted.
3269         Get rid of m_viewScaleFactor, instead using Page::viewScaleFactor.
3270
3271 2015-05-13  Sungmann Cho  <sungmann.cho@navercorp.com>
3272
3273         Minor cleanups to PluginProxy.cpp.
3274         https://bugs.webkit.org/show_bug.cgi?id=144948
3275
3276         Reviewed by Gyuyoung Kim.
3277
3278         1. Remove unnecessary #include.
3279         2. Remove unnecessary return statement from PluginProxy::paint().
3280
3281         No new tests, no behavior change.
3282
3283         * WebProcess/Plugins/PluginProxy.cpp:
3284         (WebKit::PluginProxy::paint):
3285
3286 2015-05-13  Daegyu Lee  <daegyu.lee@navercorp.com>
3287
3288         REGRESSION(r176631): [EFL] Fullscreen feature doesn't work correctly on MiniBrowser
3289         https://bugs.webkit.org/show_bug.cgi?id=144906
3290
3291         Reviewed by Gyuyoung Kim.
3292
3293         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
3294         (WebKit::PageViewportController::updateMinimumScaleToFit): Recover the r176631 condition to
3295         call applyScaleAfterRenderingContents function to apply correct scale.
3296
3297 2015-05-12  Dan Bernstein  <mitz@apple.com>
3298
3299         In Safari, Debug > Get Bytecode Profile crashes the Web Content process
3300         https://bugs.webkit.org/show_bug.cgi?id=144944
3301
3302         Reviewed by Darin Adler.
3303
3304         * WebProcess/WebPage/WebPage.cpp:
3305         (WebKit::WebPage::getBytecodeProfile): Don’t assert that m_perBytecodeProfiler isn’t null,
3306         because it is when the profiler is disabled, which is the default. In that case, return
3307         after sending back the empty string, rather than continuing to dereference a null pointer.
3308
3309 2015-05-12  Jon Honeycutt  <jhoneycutt@apple.com>
3310
3311         Crash when using <input type=file>
3312
3313         <https://bugs.webkit.org/show_bug.cgi?id=144939>
3314         <rdar://problem/20172315>
3315
3316         Reviewed by Andy Estes.
3317
3318         * UIProcess/ios/forms/WKFileUploadPanel.mm:
3319         Use a RefPtr to hold the WebOpenPanelResultListenerProxy, because the
3320         WKFileUploadPanel can outlive it.
3321
3322 2015-05-12  Simon Fraser  <simon.fraser@apple.com>
3323
3324         Turn antialiased font dilation off by default
3325         https://bugs.webkit.org/show_bug.cgi?id=144940
3326         rdar://problem/20923031
3327
3328         Reviewed by Sam Weinig.
3329
3330         Turn antialised font dilation off by default.
3331
3332         * Shared/WebPreferencesDefinitions.h:
3333         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3334
3335 2015-05-12  Daniel Bates  <dabates@apple.com>
3336
3337         Make {Network, Web}ProcessProxy inherit from ProcessThrottleClient privately
3338         https://bugs.webkit.org/show_bug.cgi?id=144886
3339
3340         Reviewed by Darin Adler.
3341
3342         {Network, Web}ProcessProxy are implemented in terms of ProcessThrottleClient, an
3343         interface that defines the callbacks that ProcessThrottler makes to a client. We
3344         do not want to allow arbitrary callers to make use of the interface ProcessThrottleClient.
3345         So, we should use private inheritance to represent the relationship between
3346         {Network, Web}ProcessProxy and ProcessThrottleClient instead of public inheritance.
3347
3348         Additionally make ProcessThrottler a instance variable of {Network, Web}ProcessProxy instead
3349         of holding a smart pointer to a ProcessThrottler instance because we always want to
3350         have a ProcessThrottler for each instance of {Network, Web}ProcessProxy.
3351
3352         * UIProcess/Network/NetworkProcessProxy.cpp:
3353         (WebKit::NetworkProcessProxy::NetworkProcessProxy): Update code to work now that m_throttler
3354         is an instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
3355         (WebKit::NetworkProcessProxy::didFinishLaunching): Update code to access functions of
3356         m_throttler by reference instead of by pointer.
3357         (WebKit::NetworkProcessProxy::didCancelProcessSuspension): Ditto.
3358         (WebKit::NetworkProcessProxy::processReadyToSuspend): Ditto.
3359         (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles): Ditto.
3360         * UIProcess/Network/NetworkProcessProxy.h: Inherit from ProcessThrottleClient privately.
3361         (WebKit::NetworkProcessProxy::throttler): Update code to work now that m_throttler is an
3362         instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
3363         * UIProcess/ProcessThrottler.cpp:
3364         (WebKit::ProcessThrottler::ProcessThrottler): Update code to work now that m_process is
3365         a lvalue reference instead of a pointer.
3366         (WebKit::ProcessThrottler::updateAssertion): Ditto.
3367         (WebKit::ProcessThrottler::assertionWillExpireImminently): Ditto.
3368         * UIProcess/ProcessThrottler.h: Ditto.
3369         * UIProcess/WebProcessProxy.cpp:
3370         (WebKit::WebProcessProxy::WebProcessProxy): Update code to work now that m_throttler is an
3371         instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance. 
3372         (WebKit::WebProcessProxy::didFinishLaunching): Update code to access functions of
3373         m_throttler by reference instead of by pointer.
3374         (WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
3375         (WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.
3376         (WebKit::WebProcessProxy::setIsHoldingLockedFiles): Ditto.
3377         * UIProcess/WebProcessProxy.h: Inherit from ProcessThrottleClient privately.
3378         (WebKit::WebProcessProxy::throttler): Update code to work now that m_throttler is an
3379         instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
3380
3381 2015-05-12  Anders Carlsson  <andersca@apple.com>
3382
3383         Production builds should link against the shims directly
3384         https://bugs.webkit.org/show_bug.cgi?id=144922
3385         rdar://problem/19708579
3386
3387         Reviewed by Dan Bernstein.
3388
3389         * Configurations/NetworkService.xcconfig:
3390         Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
3391         Link directly against SecItemShim.dylib where possible.
3392
3393         * Configurations/PluginProcessShim.xcconfig:
3394         Set the install name and install path.
3395
3396         * Configurations/PluginService.32.xcconfig:
3397         Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
3398         Link directly against PluginProcessShim.dylib where possible.
3399
3400         * Configurations/PluginService.64.xcconfig:
3401         Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
3402         Link directly against PluginProcessShim.dylib where possible.
3403
3404         * Configurations/SecItemShim.xcconfig:
3405         Set the install name and install path.
3406
3407         * Configurations/WebContentService.xcconfig:
3408         Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
3409         Link directly against WebProcessShim.dylib where possible.
3410
3411         * Configurations/WebProcessShim.xcconfig:
3412         Set the install name and install path.
3413
3414         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist.
3415         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
3416         Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.
3417
3418         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Copied from Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist.
3419         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
3420         Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.
3421
3422         * WebKit2.xcodeproj/project.pbxproj:
3423         Add new files.
3424
3425         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist.
3426         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
3427         Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.
3428
3429 2015-05-12  Alexey Proskuryakov  <ap@apple.com>
3430
3431         Undo a mistaken part of r184211.
3432
3433         * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::cookieStorageDirectory):
3434         * UIProcess/WebProcessPool.h:
3435         cookieStorageDirectory() is used on iOS, so bring it back.
3436
3437 2015-05-08  Alexey Proskuryakov  <ap@apple.com>
3438
3439         [Mac] Share cookie storage between UI process and secondary processes
3440         https://bugs.webkit.org/show_bug.cgi?id=144820
3441         rdar://problem/20572830
3442
3443         Reviewed by Darin Adler.
3444
3445         Pass a cookie storage descriptor that includes file path as well as other data that
3446         CFNetwork needs to use the same cookies storage as in another process (session cookies
3447         are still separate).
3448
3449         While at it, started to clean up code that passes cookie storage path. It was mostly
3450         dead and unimplemented, only used in child processes when USE(SECCOMP_FILTERS) was enabled.
3451
3452         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3453         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
3454         * Shared/Network/NetworkProcessCreationParameters.cpp:
3455         (WebKit::NetworkProcessCreationParameters::encode):
3456         (WebKit::NetworkProcessCreationParameters::decode):
3457         * Shared/Network/NetworkProcessCreationParameters.h:
3458         * Shared/WebProcessCreationParameters.cpp:
3459         (WebKit::WebProcessCreationParameters::encode):
3460         (WebKit::WebProcessCreationParameters::decode):
3461         * Shared/WebProcessCreationParameters.h:
3462         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3463         (WebKit::WebProcessPool::platformInitializeWebProcess):
3464         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3465         (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
3466         * UIProcess/WebProcessPool.cpp:
3467         (WebKit::WebProcessPool::ensureNetworkProcess):
3468         (WebKit::WebProcessPool::createNewWebProcess):
3469         (WebKit::WebProcessPool::cookieStorageDirectory):
3470         * UIProcess/WebProcessPool.h:
3471         * UIProcess/efl/WebProcessPoolEfl.cpp:
3472         (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
3473         * UIProcess/gtk/WebProcessPoolGtk.cpp: