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