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