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