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