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