One more iOS build fix.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-07-23  Enrica Casucci  <enrica@apple.com>
2
3         One more iOS build fix.
4
5         Unreviewed.
6
7         * Platform/spi/ios/UIKitSPI.h:
8         * UIProcess/ios/WKContentViewInteraction.h:
9
10 2015-07-23  Matthew Daiter  <mdaiter@apple.com>
11
12         Bridged passing lists of devices between the UIProcess and the WebProcess
13         https://bugs.webkit.org/show_bug.cgi?id=147056
14         <rdar://problem/21883094>
15
16         Reviewed by Brent Fulgham.
17
18         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: Modified file
19         to reflect changes made to the header in the .messages.in file
20         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Ditto
21         (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision):
22         * UIProcess/UserMediaPermissionRequestManagerProxy.h: Ditto
23         * UIProcess/UserMediaPermissionRequestProxy.cpp: Ditto
24         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
25         * UIProcess/UserMediaPermissionRequestProxy.h:
26         (WebKit::UserMediaPermissionRequestProxy::create):
27         (WebKit::UserMediaPermissionRequestProxy::deviceUIDsVideo):
28         (WebKit::UserMediaPermissionRequestProxy::deviceUIDsAudio):
29         * UIProcess/WebPageProxy.cpp:
30         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
31         * UIProcess/WebPageProxy.h:
32         * UIProcess/WebPageProxy.messages.in: Changed heading
33         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
34         (WebKit::UserMediaPermissionRequestManager::startRequest):
35         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision):
36         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
37         * WebProcess/WebPage/WebPage.cpp:
38         (WebKit::WebPage::didReceiveUserMediaPermissionDecision):
39         * WebProcess/WebPage/WebPage.h:
40         * WebProcess/WebPage/WebPage.messages.in: Changed heading
41
42 2015-07-23  Yongjun Zhang  <yongjun_zhang@apple.com>
43
44         Adopt the new _previewItemControllerDidCancelPreview delegate method.
45         https://bugs.webkit.org/show_bug.cgi?id=147238
46
47         Don't allow hightlight long press to trigger tap if the link preview is cancelled because
48         the link is not preview-able.
49
50         Reviewed by Beth Dakin.
51
52         * UIProcess/ios/WKContentViewInteraction.mm:
53         (-[WKContentView _previewItemControllerDidCancelPreview:]): 
54
55 2015-07-23  Enrica Casucci  <enrica@apple.com>
56
57         iOS build fix after http://trac.webkit.org/changeset/187238.
58
59         Unreviewed.
60
61         * Platform/spi/ios/UIKitSPI.h:
62
63 2015-07-23  Jer Noble  <jer.noble@apple.com>
64
65         [WK2] Add a WKWebView property for whether the view is displaying a media document
66         https://bugs.webkit.org/show_bug.cgi?id=147233
67
68         Reviewed by Beth Dakin.
69
70         Add a _isDisplayingStandaloneMediaDocument property, which queries the frame for whether
71         the current MIME type is one which our media engines support.
72
73         * UIProcess/API/Cocoa/WKWebView.mm:
74         (-[WKWebView _isDisplayingStandaloneMediaDocument]):
75         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
76         * UIProcess/WebFrameProxy.cpp:
77         (WebKit::WebFrameProxy::isDisplayingStandaloneMediaDocument):
78         * UIProcess/WebFrameProxy.h:
79
80 2015-07-21  Jer Noble  <jer.noble@apple.com>
81
82         [iOS] Add an explicit API to allow media documents to (temporarily) play inline
83         https://bugs.webkit.org/show_bug.cgi?id=147181
84
85         Reviewed by Beth Dakin.
86
87         Add a WKWebView(Private) API which allows MediaDocuments loaded by the view to play their contents inline, regardless
88         of whether inline playback is restricted on the current device.
89
90         * UIProcess/API/Cocoa/WKWebView.mm:
91         (-[WKWebView _setRequiresUserActionForMediaPlayback:]): Added. Pass through to WebPageProxy.
92         (-[WKWebView _allowsMediaDocumentInlinePlayback]): Ditto.
93         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
94         * UIProcess/WebPageProxy.cpp:
95         (WebKit::WebPageProxy::allowsMediaDocumentInlinePlayback): Simple getter.
96         (WebKit::WebPageProxy::setAllowsMediaDocumentInlinePlayback): Set, and conditionally pass the new value to WebPage.
97         * UIProcess/WebPageProxy.h:
98         * WebProcess/WebPage/WebPage.cpp:
99         (WebKit::WebPage::setAllowsMediaDocumentInlinePlayback): Set, and conditionally notify WebCore page of the change.
100         * WebProcess/WebPage/WebPage.h:
101         (WebKit::WebPage::allowsMediaDocumentInlinePlayback): Simple getter.
102         * WebProcess/WebPage/WebPage.messages.in: Add new messages.
103
104 2015-07-23  Beth Dakin  <bdakin@apple.com>
105
106         Should not allow previews of 1x1 images
107         https://bugs.webkit.org/show_bug.cgi?id=147237
108         -and corresponding-
109         rdar://problem/21968460
110
111         Reviewed by Tim Horton.
112
113         1x1 images are used on some sites to cover actual images, which leads to a 
114         misleading preview experience. There is not any reason why you would really 
115         want to preview an image this small nor any reason to believe that the 
116         preview would result in anything useful.
117         * WebProcess/WebPage/ios/WebPageIOS.mm:
118         (WebKit::WebPage::getPositionInformation):
119
120 2015-07-23  Brady Eidson  <beidson@apple.com>
121
122         Crash in WebPlatformStrategies::createPingHandle - Deref a null NetworkingContext.
123         <rdar://problem/21949735> and https://bugs.webkit.org/show_bug.cgi?id=147227
124
125         Reviewed by Alexey Proskuryakov.
126
127         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
128         (WebKit::WebPlatformStrategies::createPingHandle): Skip it if there's a null NetworkingContext.
129
130 2015-07-23  Tim Horton  <timothy_horton@apple.com>
131
132         Remove some files that should have been removed with WebKit2 Windows
133         https://bugs.webkit.org/show_bug.cgi?id=147223
134
135         Reviewed by Csaba Osztrogonác.
136
137         * Shared/API/c/cf/WKURLRequestCF.cpp: Removed.
138         * Shared/API/c/cf/WKURLRequestCF.h: Removed.
139         * Shared/API/c/cf/WKURLResponseCF.cpp: Removed.
140         * Shared/API/c/cf/WKURLResponseCF.h: Removed.
141
142 2015-07-23  Timothy Horton  <timothy_horton@apple.com>
143
144         Fix the build
145
146         * Platform/spi/ios/UIKitSPI.h:
147
148 2015-07-23  Tim Horton  <timothy_horton@apple.com>
149
150         Remove files that were meant to be removed in r173929
151
152         * WebProcess/WebPage/mac/WebInspectorMac.mm: Removed.
153
154 2015-07-23  Tim Horton  <timothy_horton@apple.com>
155
156         Remove files that were meant to be removed in r168213
157
158         * UIProcess/API/Cocoa/WKErrorRecoveryAttempting.h: Removed.
159
160 2015-07-23  Tim Horton  <timothy_horton@apple.com>
161
162         Remove files that were meant to be removed in r168229
163
164         * UIProcess/API/Cocoa/WKSession.h: Removed.
165         * UIProcess/API/Cocoa/WKSession.mm: Removed.
166         * UIProcess/API/Cocoa/WKSessionInternal.h: Removed.
167
168 2015-07-23  Tim Horton  <timothy_horton@apple.com>
169
170         Remove files that were meant to be removed in r165014
171
172         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h: Removed.
173         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: Removed.
174
175 2015-07-23  Carlos Garcia Campos  <cgarcia@igalia.com>
176
177         [GTK] Add API to allow executing editing commands that require an argument
178         https://bugs.webkit.org/show_bug.cgi?id=146781
179
180         Reviewed by Gustavo Noronha Silva.
181
182         Commands like InsertImage or CreateLink receive an argument, but
183         we only have webkit_web_view_execute_editing_command() that
184         doesn't receive any argument. This patch adds
185         webkit_web_view_execute_editing_command_with_argument() for those
186         commands. It also adds WEBKIT_EDITING_COMMAND_INSERT_IMAGE and
187         WEBKIT_EDITING_COMMAND_CREATE_LINK to the predefined editing commands.
188
189         * UIProcess/API/gtk/WebKitEditingCommands.h: Add
190         WEBKIT_EDITING_COMMAND_INSERT_IMAGE and WEBKIT_EDITING_COMMAND_CREATE_LINK.
191         * UIProcess/API/gtk/WebKitWebView.cpp:
192         (webkit_web_view_execute_editing_command_with_argument):
193         * UIProcess/API/gtk/WebKitWebView.h:
194         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
195         * UIProcess/WebPageProxy.cpp:
196         (WebKit::WebPageProxy::executeEditCommand): Pass also the argument
197         to the message.
198         * UIProcess/WebPageProxy.h:
199         * WebProcess/WebPage/WebPage.cpp:
200         (WebKit::WebPage::executeEditCommand): Add the argument parameter
201         to the message handler.
202         * WebProcess/WebPage/WebPage.h:
203         * WebProcess/WebPage/WebPage.messages.in: Add argument parameter
204         to ExecuteEditCommand message.
205
206 2015-07-22  Sukolsak Sakshuwong  <sukolsak@gmail.com>
207
208         Add ENABLE_WEBASSEMBLY feature flag for WebAssembly
209         https://bugs.webkit.org/show_bug.cgi?id=147212
210
211         Reviewed by Filip Pizlo.
212
213         * Configurations/FeatureDefines.xcconfig:
214
215 2015-07-22  James Savage  <james.savage@apple.com>
216
217         Use updated CoreAnimation snapshot SPI.
218         https://bugs.webkit.org/show_bug.cgi?id=147197
219         <rdar://problem/21032083>
220
221         Reviewed by Tim Horton.
222         Patch by James Savage.
223
224         * Platform/spi/ios/UIKitSPI.h:
225         * UIProcess/API/Cocoa/WKWebView.mm:
226         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
227
228 2015-07-22  Timothy Horton  <timothy_horton@apple.com>
229
230         Fix the build
231
232         * UIProcess/ios/WKContentViewInteraction.mm:
233         (-[WKContentView setupInteraction]):
234         (-[WKContentView cleanupInteraction]):
235
236 2015-07-22  Commit Queue  <commit-queue@webkit.org>
237
238         Unreviewed, rolling out r187196.
239         https://bugs.webkit.org/show_bug.cgi?id=147213
240
241         broke all the iOS builds (Requested by thorton on #webkit).
242
243         Reverted changeset:
244
245         "Use updated CoreAnimation snapshot SPI."
246         https://bugs.webkit.org/show_bug.cgi?id=147197
247         http://trac.webkit.org/changeset/187196
248
249 2015-07-22  Tim Horton  <timothy_horton@apple.com>
250
251         Fix the build
252
253         * UIProcess/ios/WKContentViewInteraction.h:
254
255 2015-07-22  Tim Horton  <timothy_horton@apple.com>
256
257         [iOS] Adjust the preview architecture
258         https://bugs.webkit.org/show_bug.cgi?id=147203
259         <rdar://problem/21945775>
260
261         Reviewed by Simon Fraser.
262
263         * UIProcess/ios/WKContentViewInteraction.mm:
264         (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
265         Link previews should win over image previews if both are possible.
266
267 2015-07-22  James Savage  <james.savage@apple.com>
268
269         Use updated CoreAnimation snapshot SPI.
270         https://bugs.webkit.org/show_bug.cgi?id=147197
271
272         Reviewed by Tim Horton.
273
274         * Platform/spi/ios/UIKitSPI.h:
275         * UIProcess/API/Cocoa/WKWebView.mm:
276         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
277
278 2015-07-22  Tim Horton  <timothy_horton@apple.com>
279
280         [iOS] Adjust the preview architecture
281         https://bugs.webkit.org/show_bug.cgi?id=147203
282         <rdar://problem/21945775>
283
284         Reviewed by Beth Dakin.
285
286         * Platform/spi/ios/UIKitSPI.h:
287         * UIProcess/API/Cocoa/WKWebView.mm:
288         (-[WKWebView _setAllowsLinkPreview:]): Deleted.
289         * UIProcess/ios/WKContentView.mm:
290         (-[WKContentView willMoveToWindow:]): Deleted.
291         * UIProcess/ios/WKContentViewInteraction.h:
292         * UIProcess/ios/WKContentViewInteraction.mm:
293         (-[WKContentView setupInteraction]):
294         (-[WKContentView cleanupInteraction]):
295         (-[WKContentView _registerPreview]):
296         (-[WKContentView _unregisterPreview]):
297         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
298         (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
299         (-[WKContentView _presentationRectForPreviewItemController:]):
300         (-[WKContentView _presentedViewControllerForPreviewItemController:]):
301         (-[WKContentView _previewItemController:commitPreview:]):
302         (-[WKContentView _previewItemController:willPresentPreview:forPosition:inSourceView:]):
303         (-[WKContentView _previewItemController:didDismissPreview:committing:]):
304         (-[WKContentView _presentationSnapshotForPreviewItemController:]):
305         (-[WKContentView _presentationRectsForPreviewItemController:]):
306         (-[WKContentView gestureRecognizerShouldBegin:]): Deleted.
307         (-[WKContentView _registerPreviewInWindow:]): Deleted.
308         (-[WKContentView _unregisterPreviewInWindow:]): Deleted.
309         (-[WKContentView previewViewControllerForPosition:inSourceView:]): Deleted.
310         (-[WKContentView commitPreviewViewController:]): Deleted.
311         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]): Deleted.
312         (-[WKContentView didDismissPreviewViewController:committing:]): Deleted.
313         Register and unregister in setup/cleanupInteraction instead of when moving between windows.
314         Implement 'shouldBegin' instead of interacting directly with the recognizer.
315         Make use of system enums instead of our own.
316         Let UIPreviewItemController handle shrink-wrapping and the indicator view.
317
318 2015-07-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
319
320         [EFL] Support indexeddb for WK2
321         https://bugs.webkit.org/show_bug.cgi?id=145867
322
323         Reviewed by Csaba Osztrogonác.
324
325         Add stub implementation for indexeddb. Move KeyedDecoder and KeyedEncoder from gtk to glib
326         in order to share it between GTK and EFL ports.
327
328         * DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp:
329         * DatabaseProcess/efl/DatabaseProcessMainEfl.cpp: Copied from Source/WebKit2/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp.
330         (WebKit::DatabaseProcessMainUnix):
331         * PlatformEfl.cmake:
332         * PlatformGTK.cmake:
333         * Shared/glib/KeyedDecoder.cpp: Renamed from Source/WebKit2/Shared/gtk/KeyedDecoder.cpp.
334         (WebKit::KeyedDecoder::KeyedDecoder):
335         (WebKit::KeyedDecoder::~KeyedDecoder):
336         (WebKit::KeyedDecoder::dictionaryFromGVariant):
337         (WebKit::KeyedDecoder::decodeBytes):
338         (WebKit::KeyedDecoder::decodeSimpleValue):
339         (WebKit::KeyedDecoder::decodeBool):
340         (WebKit::KeyedDecoder::decodeUInt32):
341         (WebKit::KeyedDecoder::decodeInt32):
342         (WebKit::KeyedDecoder::decodeInt64):
343         (WebKit::KeyedDecoder::decodeFloat):
344         (WebKit::KeyedDecoder::decodeDouble):
345         (WebKit::KeyedDecoder::decodeString):
346         (WebKit::KeyedDecoder::beginObject):
347         (WebKit::KeyedDecoder::endObject):
348         (WebKit::KeyedDecoder::beginArray):
349         (WebKit::KeyedDecoder::beginArrayElement):
350         (WebKit::KeyedDecoder::endArrayElement):
351         (WebKit::KeyedDecoder::endArray):
352         * Shared/glib/KeyedDecoder.h: Renamed from Source/WebKit2/Shared/gtk/KeyedDecoder.h.
353         * Shared/glib/KeyedEncoder.cpp: Renamed from Source/WebKit2/Shared/gtk/KeyedEncoder.cpp.
354         (WebKit::KeyedEncoder::KeyedEncoder):
355         (WebKit::KeyedEncoder::~KeyedEncoder):
356         (WebKit::KeyedEncoder::encodeBytes):
357         (WebKit::KeyedEncoder::encodeBool):
358         (WebKit::KeyedEncoder::encodeUInt32):
359         (WebKit::KeyedEncoder::encodeInt32):
360         (WebKit::KeyedEncoder::encodeInt64):
361         (WebKit::KeyedEncoder::encodeFloat):
362         (WebKit::KeyedEncoder::encodeDouble):
363         (WebKit::KeyedEncoder::encodeString):
364         (WebKit::KeyedEncoder::beginObject):
365         (WebKit::KeyedEncoder::endObject):
366         (WebKit::KeyedEncoder::beginArray):
367         (WebKit::KeyedEncoder::beginArrayElement):
368         (WebKit::KeyedEncoder::endArrayElement):
369         (WebKit::KeyedEncoder::endArray):
370         (WebKit::KeyedEncoder::finishEncoding):
371         * Shared/glib/KeyedEncoder.h: Renamed from Source/WebKit2/Shared/gtk/KeyedEncoder.h.
372         * UIProcess/Databases/efl/DatabaseProcessProxyEfl.cpp: Copied from Source/WebKit2/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp.
373         (WebKit::DatabaseProcessProxy::platformGetLaunchOptions):
374
375 2015-07-22  Michael Catanzaro  <mcatanzaro@igalia.com>
376
377         [Seccomp] Canonicalize filesystem path when whitelisting it
378         https://bugs.webkit.org/show_bug.cgi?id=142986
379
380         Reviewed by Žan Doberšek.
381
382         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
383         (WebKit::canonicalizeFileName):
384         (WebKit::SyscallPolicy::addFilePermission):
385         (WebKit::SyscallPolicy::addDirectoryPermission):
386
387 2015-07-21  Simon Fraser  <simon.fraser@apple.com>
388
389         Add logging for TiledCoreAnimationDrawingArea resizing
390         https://bugs.webkit.org/show_bug.cgi?id=147180
391
392         Reviewed by Tim Horton.
393
394         Add a "Resize" log channel for WebKit2, and use it to log data in scaleViewToFitDocumentIfNeeded().
395
396         * Platform/Logging.h:
397         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
398         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
399
400 2015-07-22  Sam Weinig  <sam@webkit.org>
401
402         Encode/Decode underlying errors when serializing NSErrors
403         <rdar://problem/21818117>
404         https://bugs.webkit.org/show_bug.cgi?id=147199
405
406         Reviewed by Anders Carlsson.
407
408         * Shared/mac/WebCoreArgumentCodersMac.mm:
409         (IPC::ArgumentCoder<CertificateInfo>::decode):
410         (IPC::encodeNSError):
411         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
412         (IPC::decodeNSError):
413         (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
414         Break out encoding/decoding of the NSErrors into a helpers so they can be called
415         for the underlying error.
416
417 2015-07-22  Beth Dakin  <bdakin@apple.com>
418
419         Animated images should animate in previews
420         https://bugs.webkit.org/show_bug.cgi?id=147173
421         -and corresponding-
422         rdar://problem/21637698
423
424         Reviewed by Dan Bernstein.
425
426         InteractionInformationAtPosition needs to know if it’s an animated image.
427         * Shared/InteractionInformationAtPosition.cpp:
428         (WebKit::InteractionInformationAtPosition::encode):
429         (WebKit::InteractionInformationAtPosition::decode):
430         * Shared/InteractionInformationAtPosition.h:
431
432         New delegate method to create a link preview view controller for animated 
433         images.
434         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
435
436         Treat animated images more like link previews.
437         * UIProcess/ios/WKContentViewInteraction.mm:
438         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
439
440         Set info.isAnimatedImage
441         * WebProcess/WebPage/ios/WebPageIOS.mm:
442         (WebKit::WebPage::getPositionInformation):
443
444 2015-07-22  Michael Catanzaro  <mcatanzaro@igalia.com>
445
446         [Seccomp Filters] Add helpers to get XDG base directory locations
447         https://bugs.webkit.org/show_bug.cgi?id=142982
448
449         Reviewed by Zan Dobersek.
450
451         * PlatformEfl.cmake:
452         * PlatformGTK.cmake:
453         * Shared/linux/SeccompFilters/XDGBaseDirectory.h: Added.
454         * Shared/linux/SeccompFilters/XDGBaseDirectoryGLib.cpp: Added.
455         (WebKit::userHomeDirectory):
456         (WebKit::userCacheDirectory):
457         (WebKit::userConfigDirectory):
458         (WebKit::userDataDirectory):
459         (WebKit::userRuntimeDirectory):
460
461 2015-07-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
462
463         [EFL][WK2] EWK2ContextTestMultipleProcesses.ewk_context_network_process_model fails to pass
464         https://bugs.webkit.org/show_bug.cgi?id=142967
465
466         Reviewed by Csaba Osztrogonác.
467
468         Though processIdentifier() can return 0 when a page is not closed, ewk_context_network_process_model has
469         not been considered process id can be 0. This patch adds a protection logic which doesn't test when process
470         id is 0 at the moment.
471
472         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
473         (TEST_F):
474
475 2015-07-22  Carlos Garcia Campos  <cgarcia@igalia.com>
476
477         Unreviewed. Fix some warnings when generating GTK+ HTML API docs.
478
479         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
480         WebKitWebsiteDataManager and WebKitWebEditor.
481
482 2015-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>
483
484         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.4 release.
485
486         * gtk/NEWS: Add release notes for 2.9.4.
487
488 2015-07-21  Joseph Pecoraro  <pecoraro@apple.com>
489
490         Web Inspector: [Mac] "Open Image In New Window" context menu item does nothing on an image
491         https://bugs.webkit.org/show_bug.cgi?id=147175
492
493         Reviewed by Timothy Hatcher.
494
495         * UIProcess/mac/WebInspectorProxyMac.mm:
496         (WebKit::getContextMenuFromProposedMenu):
497         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
498         Remove default context menus that won't work in the inspector page.
499
500 2015-07-21  Benjamin Poulain  <benjamin@webkit.org>
501
502         [Content Extensions] Use a jump table when consecutive transitions have different targets
503         https://bugs.webkit.org/show_bug.cgi?id=147099
504
505         Reviewed by Alex Christensen.
506
507         * UIProcess/API/APIUserContentExtensionStore.h:
508
509 2015-07-21  Daniel Bates  <dabates@apple.com>
510
511         Fix the build following <https://trac.webkit.org/changeset/187129>
512         (https://bugs.webkit.org/show_bug.cgi?id=147112)
513
514         * UIProcess/WebProcessProxy.cpp:
515         (WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState): Guard implementation with PLATFORM(IOS)
516         since this logic is specific to the iOS port.
517
518 2015-07-21  Simon Fraser  <simon.fraser@apple.com>
519
520         Rename the 'View' log channel to 'Printing'
521         https://bugs.webkit.org/show_bug.cgi?id=147172
522
523         Reviewed by Zalan Bujtas.
524
525         "View" was a terrible name for a log channel that was all about printing.
526         Sort the log channels.
527
528         * Platform/Logging.h:
529         * UIProcess/API/mac/WKView.mm:
530         (-[WKView drawRect:]):
531         (-[WKView printOperationWithPrintInfo:forFrame:]):
532         * UIProcess/mac/WKPrintingView.mm:
533         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
534         (pageDidComputePageRects):
535         (-[WKPrintingView knowsPageRange:]):
536         (-[WKPrintingView drawRect:]):
537         (-[WKPrintingView rectForPage:]):
538         (-[WKPrintingView beginDocument]):
539         (-[WKPrintingView endDocument]):
540
541 2015-07-21  Zalan Bujtas  <zalan@apple.com>
542
543         [iOS] Menu drop down such as on nike.com does not stay
544         https://bugs.webkit.org/show_bug.cgi?id=147047
545         rdar://problem/21046961
546
547         Reviewed by Benjamin Poulain.
548
549         This is a workaround for unintended scrolling while scaling.
550         (Based on Benjamin Poulain's WIP patch for webkit.org/b/136904)
551
552         In certain cases when scaling would result in moving the scrollview (which would trigger
553         a scroll event on WebCore side), zoomRect is called instead of setZoomScale to ensure
554         that the scroll position stays intact.
555
556         * UIProcess/API/Cocoa/WKWebView.mm:
557         (-[WKWebView _didCommitLayerTree:]):
558
559 2015-07-21  Daniel Bates  <dabates@apple.com>
560
561         WTFCrash() in WebKit::WebProcess::networkConnection()
562         https://bugs.webkit.org/show_bug.cgi?id=147112
563         <rdar://problem/18477459>
564
565         Reviewed by Gavin Barraclough.
566
567         Fixes an issue where a newly launched network process may be jetsam'd because it has not
568         taken a process assertion between the time it was launched and the time when a web process
569         makes use of it.
570
571         Initially a network process does not have a process assertion. A process assertion is taken
572         (if one has not been taken) for the network process when a process assertion is taken for at
573         least one web process. When the network process crashes a WebProcess may ultimately launch a
574         new network process in WebProcess::networkConnection(). The new network process may be jetsam'd
575         immediately when the system is under some measure pressure because it has a low jetsam priority,
576         0 (since it does not have a process assertion and higher priority implies that a process is less
577         likely to be jetsam'd). And the logic in WebProcess::networkConnection() explicitly calls
578         CRASH() if the newly launched network process crashes immediately. Towards preventing the newly
579         launched network process from being jetsam'd we should obtain a process assertion for it.
580
581         * UIProcess/WebProcessPool.cpp:
582         (WebKit::WebProcessPool::WebProcessPool): Initialize m_didNetworkProcessCrash to false.
583         (WebKit::WebProcessPool::ensureNetworkProcess): If the network process crashed (m_didNetworkProcessCrash == true)
584         then tell each process in the pool to reinstate their network activity token for the new network process.
585         (WebKit::WebProcessPool::networkProcessCrashed): Set m_didNetworkProcessCrash to true when the
586         network process crashed.
587         * UIProcess/WebProcessPool.h:
588         * UIProcess/WebProcessProxy.cpp:
589         (WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState): Added.
590         (WebKit::WebProcessProxy::didSetAssertionState): Add assert to ensure we never have both
591         a background- and foreground- activity token for the network process.
592         * UIProcess/WebProcessProxy.h:
593
594 2015-07-21  Daniel Bates  <dabates@apple.com>
595
596         ASSERT(m_suspendMessageCount >= 0) fails in ProcessThrottler::didCancelProcessSuspension()
597         when WebContent process crashes; Network process may never voluntarily suspend
598         https://bugs.webkit.org/show_bug.cgi?id=147122
599         <rdar://problem/21906759>
600
601         Reviewed by Chris Dumez.
602
603         Fixes an issue where the network process may never voluntarily release its process assertion.
604
605         Currently the network process always sends both a ProcessReadyToSuspend and CancelPrepareToSuspend
606         message in response to receiving a PrepareToSuspend message and CancelPrepareToSuspend message,
607         respectively. The process throttler expects to receive either a ProcessReadyToSuspend message
608         or a CancelPrepareToSuspend message (and not both) in response to sending the message sequence
609         PrepareToSuspend, CancelPrepareToSuspend. When a process throttler receives both messages in
610         response to this sequence then its internal message count becomes imbalanced and it will
611         never release the process assertion it manages. One user interaction that can cause such an
612         imbalance, in the process throttler held by NetworkProcessProxy, is switching tabs.
613
614         * NetworkProcess/NetworkProcess.cpp:
615         (WebKit::NetworkProcess::cancelPrepareToSuspend): Do not send message NetworkProcessProxy::DidCancelProcessSuspension. 
616         * UIProcess/Network/NetworkProcessProxy.cpp:
617         (WebKit::NetworkProcessProxy::didCancelProcessSuspension): Deleted.
618         * UIProcess/Network/NetworkProcessProxy.h:
619         * UIProcess/Network/NetworkProcessProxy.messages.in: Remove message NetworkProcessProxy::DidCancelProcessSuspension.
620
621 2015-07-21  Matthew Daiter  <mdaiter@apple.com>
622
623         Make sure to invalidate requests for user media after webpage reset
624         https://bugs.webkit.org/show_bug.cgi?id=147155
625         <rdar://problem/21924174>
626
627         Reviewed by Brent Fulgham.
628
629         * UIProcess/WebPageProxy.cpp:
630         (WebKit::WebPageProxy::resetState): Added user media reset
631
632 2015-07-21  Tim Horton  <timothy_horton@apple.com>
633
634         [iOS] Avoid using a TextIndicator if there are non-text things to indicate
635         https://bugs.webkit.org/show_bug.cgi?id=147152
636         <rdar://problem/21921061>
637
638         Reviewed by Beth Dakin.
639
640         * UIProcess/ios/WKContentViewInteraction.mm:
641         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
642         * WebProcess/WebPage/ios/WebPageIOS.mm:
643         (WebKit::shouldUseTextIndicatorForLink):
644         (WebKit::WebPage::getPositionInformation):
645         Fall back to a rectangular area instead of a TextIndicator if there are any
646         non-inline elements inside the link.
647
648 2015-07-21  Andreas Kling  <akling@apple.com>
649
650         API::Session should clean up its storage in the network process when destroyed.
651         <https://webkit.org/b/147139>
652         <rdar://problem/21838764>
653
654         Reviewed by Anders Carlsson.
655
656         Have ~Session() send a DestroyPrivateBrowsingSession message to all networking processes
657         for ephemeral sessions. This plugs a NetworkStorageSession leak that could retain a large
658         CFNetwork object graph.
659
660         * UIProcess/API/APISession.cpp:
661         (API::Session::~Session):
662
663 2015-07-21  Sungmann Cho  <sungmann.cho@navercorp.com>
664
665         Make PluginProxy::handleMouseEvent() asynchronous.
666         https://bugs.webkit.org/show_bug.cgi?id=146142
667
668         Reviewed by Anders Carlsson.
669
670         PluginProxy::handleMouseEvent() forwards the generated mouse event to PluginControllerProxy
671         using a synchronous message, but the recipient always reply immediately with the same value("true")
672         even before handling the received message. So I think PluginProxy::handleMouseEvent() is perfectly
673         OK to process its messages asynchronously.
674
675         * PluginProcess/PluginControllerProxy.cpp:
676         (WebKit::PluginControllerProxy::handleMouseEvent):
677         * PluginProcess/PluginControllerProxy.h:
678         * PluginProcess/PluginControllerProxy.messages.in:
679         * WebProcess/Plugins/PluginProxy.cpp:
680         (WebKit::PluginProxy::handleMouseEvent):
681
682 2015-07-20  Carlos Garcia Campos  <cgarcia@igalia.com>
683
684         [GTK] Add API to be notified about editor state changes
685         https://bugs.webkit.org/show_bug.cgi?id=145875
686
687         Reviewed by Gustavo Noronha Silva.
688
689         Add WebKitEditorState object, that is created on demand by the
690         WebKitWebView and can be used to get the typing attributes of the
691         editor at the current position or selection.
692
693         * PlatformGTK.cmake:
694         * Shared/EditorState.cpp: Use part of the PostLayoutData struct
695         for the GTK port too.
696         (WebKit::EditorState::encode): Encode PostLayoutData for GTK and
697         remove our custom cursorRect.
698         (WebKit::EditorState::decode): Decode PostLayoutData for GTK and
699         remove our custom cursorRect.
700         (WebKit::EditorState::PostLayoutData::encode): Reorder it to
701         reduce the amonut of ifdefs.
702         (WebKit::EditorState::PostLayoutData::decode): Ditto.
703         * Shared/EditorState.h: Add AttributeStrikeThrough to
704         TypingAttributes enum.
705         * UIProcess/API/gtk/PageClientImpl.cpp:
706         (WebKit::PageClientImpl::selectionDidChange): Rename
707         updateTextInputState() to selectionDidChange() and also notify the
708         WebKitWebView.
709         * UIProcess/API/gtk/PageClientImpl.h:
710         * UIProcess/API/gtk/WebKitEditorState.cpp: Added.
711         (webkitEditorStateGetProperty):
712         (webkit_editor_state_class_init):
713         (webkitEditorStateSetTypingAttributes):
714         (webkitEditorStateCreate):
715         (webkitEditorStateChanged):
716         (webkit_editor_state_get_typing_attributes):
717         * UIProcess/API/gtk/WebKitEditorState.h: Added.
718         * UIProcess/API/gtk/WebKitEditorStatePrivate.h: Added.
719         * UIProcess/API/gtk/WebKitWebView.cpp:
720         (webkitWebViewSelectionDidChange): Notify the WebKitEditorState if
721         it has already been created.
722         (webkit_web_view_get_editor_state): Ensure a WebKitEditorState and
723         return it.
724         * UIProcess/API/gtk/WebKitWebView.h:
725         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
726         (webkitWebViewBaseUpdateTextInputState): Get the caret cursor rect
727         from PostLayoutData.
728         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
729         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
730         * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Add webkit_editor_state_get_type.
731         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitEditorState.
732         * UIProcess/API/gtk/webkit2.h: Include WebKitEditorState.h.
733         * UIProcess/PageClient.h:
734         * UIProcess/gtk/WebPageProxyGtk.cpp:
735         (WebKit::WebPageProxy::editorStateChanged): Call PageClientImpl::selectionDidChange().
736         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
737         (WebKit::WebPage::platformEditorState): Add typing attributes to EditorState.
738
739 2015-07-20  Simon Fraser  <simon.fraser@apple.com>
740
741         Fix the iOS build.
742
743         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
744
745 2015-07-20  Simon Fraser  <simon.fraser@apple.com>
746
747         Facebook in tiled fullscreen is slow
748         https://bugs.webkit.org/show_bug.cgi?id=147134
749         rdar://problem/21823349
750
751         Reviewed by Tim Horton.
752         
753         TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded() could cause a page to toggle
754         between two fixed layout sizes differing by a pixel, because of rounding. This would cause
755         lots of extra layouts and painting.
756         
757         This happened because the the fixed layout size was computed using ceil(m_webPage.size().width() / viewScale)
758
759         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
760         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
761
762 2015-07-20  Wenson Hsieh  <wenson_hsieh@apple.com>
763
764         Fix crash due to RemoteLayerTreeDisplayRefreshMonitor outliving RemoteLayerTreeDrawingArea
765         https://bugs.webkit.org/show_bug.cgi?id=147124
766         <rdar://problem/21582858>
767
768         Reviewed by Simon Fraser.
769
770         Refactors RemoteLayerTreeDisplayRefreshMonitor to use a weak pointer rather than a reference
771         to its RemoteLayerTreeDrawingArea, since the drawing area may be deallocated before the monitor
772         in some rare cases. This rarely caused pages using requestAnimationFrame to crash on iOS. However,
773         this should not be the case: logically, a RemoteLayerTreeDrawingArea should always outlive its
774         refresh monitors. Refer to https://bugs.webkit.org/show_bug.cgi?id=147128 for more details.
775
776         * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h:
777         * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.mm:
778         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::RemoteLayerTreeDisplayRefreshMonitor):
779         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::~RemoteLayerTreeDisplayRefreshMonitor): On destruction, checks
780             first to see whether or not the drawing area has been deallocated before telling it to update its monitors.
781         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::requestRefreshCallback):
782         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
783         (WebKit::RemoteLayerTreeDrawingArea::createWeakPtr): Creates and returns a new weak pointer to itself.
784         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
785         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
786
787 2015-07-20  Alex Christensen  <achristensen@webkit.org>
788
789         [Content Extensions] Cache actions with domains that match everything
790         https://bugs.webkit.org/show_bug.cgi?id=147050
791
792         Reviewed by Benjamin Poulain.
793
794         * UIProcess/API/APIUserContentExtensionStore.h:
795
796 2015-07-20  Gordon Sheridan  <gordon_sheridan@apple.com>
797
798         Support blocking a plug-in for non-security reasons
799         https://bugs.webkit.org/show_bug.cgi?id=145009
800
801         Reviewed by Anders Carlsson.
802
803         * Shared/Plugins/PluginModuleInfo.h:
804         Replace PluginModuleBlocked with separate enum values for blocking for security and compatibility.
805
806         * UIProcess/API/C/WKAPICast.h:
807         (WebKit::toWKPluginLoadPolicy):
808         Modify to handle change to PluginModuleBlocked enum.
809
810         (WebKit::toPluginModuleLoadPolicy):
811         Ditto.
812
813         * UIProcess/API/C/WKPluginLoadPolicy.h:
814         Added enum value for blocking a plugin for compatibility reasons.
815
816         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
817         (WebKit::shouldBlockPlugin):
818         Check load policy for both reasons a plugin may be blocked.
819
820         (WebKit::WKPlugInModuleLoadPolicyToPluginModuleLoadPolicy):
821         Added function to convert between load policy enum types.
822
823         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
824         Modified to call WKLoadPolicyForPluginVersion() which can distinguish between blocked for security or compatibility.
825
826         * UIProcess/WebPageProxy.cpp:
827         (WebKit::WebPageProxy::findPlugin):
828         Updated to recognize both PluginModuleBlocked enum values that indicate a plugin is blocked.
829
830         * WebProcess/WebPage/WebPage.cpp:
831         (WebKit::WebPage::createPlugin):
832         Ditto.
833
834         (WebKit::WebPage::canPluginHandleResponse):
835         Ditto.
836
837 2015-07-20  Antti Koivisto  <antti@apple.com>
838
839         NSURLCache fallback does not work on iOS due to sandboxing
840         https://bugs.webkit.org/show_bug.cgi?id=146314
841         <rdar://problem/21433691>
842
843         Reviewed by Anders Carlsson.
844
845         This broke with earlier cache path computation changes.
846
847         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
848         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
849
850             NSURLCache path is relative to the container cache path so "." is sufficient.
851             This puts the cache files under
852             <container>/Library/Caches/com.apple.WebKit.Networking/
853
854 2015-07-20  Jeremy Jones  <jeremyj@apple.com>
855
856         Adopt AVPlayerLayerView
857         https://bugs.webkit.org/show_bug.cgi?id=146862
858
859         Reviewed by Simon Fraser.
860
861         The CALayerHost is replaced with WebLayerHostView to be compatible with UIView animations.
862         videoLayerFrame and videoLayerGravity no longer need to be stored because they are stored
863         where they are used in the interface. Some animation is improved in the conversion.
864
865         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
866         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
867         (+[WebLayerHostView layerClass]): Add class WebLayerHostView.
868         (-[WebLayerHostView contextID]):
869         (-[WebLayerHostView setContextID:]):
870         (-[WebLayerHostView layerHost]):
871         (WebKit::WebVideoFullscreenManagerProxy::invalidate): layer -> view
872         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
873         Apply the hostingDeviceScaleFactor transform to -sublayerTransform instead of to
874         -transform. This more directly inverts the tranform WebProcess and allows -transform
875         to be used for animation in the UIProcess. This is important because UIView's actions
876         animate -transform, but not -sublayerTrasform.
877
878         (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): layer -> view
879         (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame): Deleted.
880         (WebKit::WebVideoFullscreenModelContext::videoLayerFrame): Deleted.
881         (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity): Deleted.
882         (WebKit::WebVideoFullscreenModelContext::videoLayerGravity): Deleted.
883         * WebProcess/ios/WebVideoFullscreenManager.mm:
884         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
885         Set initial video layer frame to fix start point of animation.
886
887         (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
888         dispatch_async allows the CATransaction to complete before continuing with the animation.
889         This prevents a flash during animation.
890
891 2015-07-20  Tim Horton  <timothy_horton@apple.com>
892
893         REGRESSION (r174287): Flash of black when opening a new web view or navigating to a new page
894         https://bugs.webkit.org/show_bug.cgi?id=147127
895         <rdar://problem/21474317>
896
897         Reviewed by Simon Fraser.
898
899         * WebProcess/WebPage/WebPage.cpp:
900         (WebKit::WebPage::snapshotAtSize):
901         Avoid using an invalid documentBackgroundColor, fall back to baseBackgroundColor
902         like we did before r174287.
903
904 2015-07-20  Michael Catanzaro  <mcatanzaro@igalia.com>
905
906         [Seccomp] Should be easier to debug blocked syscalls
907         https://bugs.webkit.org/show_bug.cgi?id=142980
908
909         These should be printed even when not running in debug mode. There is no
910         value in hiding errors from release build users.
911
912         Reviewed by Žan Doberšek.
913
914         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
915         (WebKit::SeccompBroker::runLoop): Don't close stderr et. al. in release builds.
916         * Shared/linux/SeccompFilters/Syscall.cpp:
917         (WebKit::write_uint): Added.
918         (WebKit::reportUnexpectedSyscall): Added.
919         (WebKit::Syscall::createFromContext): Call reportUnexpectedSyscall. Also, no need to crash
920         here in release builds.
921         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
922         (WebKit::SyscallPolicy::hasPermissionForPath): Print a warning when access is denied.
923         (WebKit::SyscallPolicy::permissionToString): Added.
924         * Shared/linux/SeccompFilters/SyscallPolicy.h: Add permissionToString.
925
926 2015-07-20  Csaba Osztrogonác  <ossy@webkit.org>
927
928         Fix the !ENABLE(VIDEO) build after r186396
929         https://bugs.webkit.org/show_bug.cgi?id=147116
930
931         Reviewed by Brent Fulgham.
932
933         * WebProcess/WebProcess.cpp:
934         (WebKit::WebProcess::didClose):
935
936 2015-07-20  Tomas Popela  <tpopela@redhat.com>
937
938         [GTK] Add selection-changed signal to the WebKit2 API
939         https://bugs.webkit.org/show_bug.cgi?id=137116
940
941         Reviewed by Carlos Garcia Campos.
942
943         Add a new object WebKitWebEditor where the editing capabilities of a
944         WebPage will be grouped and exposed. Add the selection-changed signal
945         there (we used the same name as in WK1 API).
946
947         * PlatformGTK.cmake:
948         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
949         * WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp: Added.
950         (didChangeSelection):
951         (webkitWebEditorCreate):
952         (webkit_web_editor_get_page):
953         * WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.h: Added.
954         * WebProcess/InjectedBundle/API/gtk/WebKitWebEditorPrivate.h: Added.
955         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
956         (webkitWebPageGetPage):
957         (webkit_web_page_get_editor):
958         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h:
959         * WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h:
960         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
961
962 2015-07-16  Anders Carlsson  <andersca@apple.com>
963
964         WebsiteDataStore operations need to grab background assertions
965         https://bugs.webkit.org/show_bug.cgi?id=147015
966         rdar://problem/21799011
967
968         Reviewed by Sam Weinig.
969
970         * UIProcess/Network/NetworkProcessProxy.cpp:
971         (WebKit::NetworkProcessProxy::fetchWebsiteData):
972         (WebKit::NetworkProcessProxy::deleteWebsiteData):
973         (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
974         * UIProcess/WebProcessProxy.cpp:
975         (WebKit::WebProcessProxy::fetchWebsiteData):
976         (WebKit::WebProcessProxy::deleteWebsiteData):
977         (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
978
979 2015-07-19  Michael Catanzaro  <mcatanzaro@igalia.com>
980
981         Unreviewed, placate -Wmismatched-tags after r187011
982
983         It's basically bug #146990 again. Oops.
984
985         * WebProcess/gtk/SeccompFiltersWebProcessGtk.h:
986
987 2015-07-19  Michael Catanzaro  <mcatanzaro@igalia.com>
988
989         [GTK] Add seccomp filters support
990         https://bugs.webkit.org/show_bug.cgi?id=110014
991
992         Reviewed by Žan Doberšek.
993
994         Allow building with ENABLE_SECCOMP_FILTERS=ON. Based on work by Thiago Marcos P. Santos.
995
996         * PlatformGTK.cmake: Support ENABLE_SECCOMP_FILTERS build option.
997         * WebProcess/gtk/SeccompFiltersWebProcessGtk.cpp: Added.
998         (WebKit::SeccompFiltersWebProcessGtk::SeccompFiltersWebProcessGtk):
999         (WebKit::SeccompFiltersWebProcessGtk::platformInitialize):
1000         * WebProcess/gtk/SeccompFiltersWebProcessGtk.h: Added.
1001         * WebProcess/soup/WebProcessSoup.cpp:
1002         (WebKit::WebProcess::platformInitializeWebProcess): Initialize default
1003         GTK+ web process seccomp filters.
1004
1005 2015-07-18  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1006
1007         Reduce PassRefPtr in WebKit2 - 3
1008         https://bugs.webkit.org/show_bug.cgi?id=146995
1009
1010         Reviewed by Daniel Bates.
1011
1012         To remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
1013         Because some uses depend on WebCore, WebCore, WK1 ports are modified as well.
1014
1015         * DatabaseProcess/DatabaseProcess.cpp:
1016         (WebKit::DatabaseProcess::getOrCreateUniqueIDBDatabase):
1017         * DatabaseProcess/DatabaseProcess.h:
1018         * PluginProcess/PluginControllerProxy.cpp:
1019         (WebKit::PluginControllerProxy::takeInitializationReply):
1020         * PluginProcess/PluginControllerProxy.h:
1021         * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
1022         (WebKit::CoordinatedBackingStore::texture):
1023         * Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
1024         (WebKit::CoordinatedBackingStore::create):
1025         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
1026         (WebKit::WebCoordinatedSurface::create):
1027         (WebKit::WebCoordinatedSurface::createWithSurface):
1028         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
1029         * UIProcess/API/APILoaderClient.h:
1030         (API::LoaderClient::webCryptoMasterKey):
1031         * UIProcess/API/APINavigationClient.h:
1032         (API::NavigationClient::webCryptoMasterKey):
1033         * UIProcess/API/C/WKPage.cpp:
1034         (WKPageSetPageLoaderClient):
1035         (WKPageSetPageNavigationClient):
1036         * UIProcess/API/gtk/PageClientImpl.cpp:
1037         (WebKit::PageClientImpl::createPopupMenuProxy):
1038         (WebKit::PageClientImpl::createContextMenuProxy):
1039         (WebKit::PageClientImpl::createColorPicker):
1040         * UIProcess/API/gtk/PageClientImpl.h:
1041         * UIProcess/Authentication/WebCredential.h:
1042         * UIProcess/Authentication/WebProtectionSpace.h:
1043         * UIProcess/AutoCorrectionCallback.h:
1044         * UIProcess/Cocoa/NavigationState.h:
1045         * UIProcess/Cocoa/NavigationState.mm:
1046         (WebKit::NavigationState::NavigationClient::webCryptoMasterKey):
1047         * UIProcess/CoordinatedGraphics/WebView.cpp:
1048         (WebKit::WebView::createPopupMenuProxy):
1049         (WebKit::WebView::createContextMenuProxy):
1050         (WebKit::WebView::createColorPicker):
1051         * UIProcess/CoordinatedGraphics/WebView.h:
1052         * UIProcess/PageClient.h:
1053         * UIProcess/WebPageProxy.h:
1054         * UIProcess/efl/WebViewEfl.cpp:
1055         (WebKit::WebViewEfl::createPopupMenuProxy):
1056         (WebKit::WebViewEfl::createContextMenuProxy):
1057         (WebKit::WebViewEfl::createColorPicker):
1058         * UIProcess/efl/WebViewEfl.h:
1059         * UIProcess/ios/PageClientImplIOS.h:
1060         * UIProcess/ios/PageClientImplIOS.mm:
1061         (WebKit::PageClientImpl::createPopupMenuProxy):
1062         (WebKit::PageClientImpl::createContextMenuProxy):
1063         * UIProcess/ios/WebPageProxyIOS.mm:
1064         (WebKit::WebPageProxy::dataSelectionForPasteboard):
1065         * UIProcess/mac/PageClientImpl.h:
1066         * UIProcess/mac/PageClientImpl.mm:
1067         (WebKit::PageClientImpl::createPopupMenuProxy):
1068         (WebKit::PageClientImpl::createContextMenuProxy):
1069         (WebKit::PageClientImpl::createColorPicker):
1070         * UIProcess/mac/WebPageProxyMac.mm:
1071         (WebKit::WebPageProxy::dataSelectionForPasteboard):
1072         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1073         (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad):
1074         (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad):
1075         * WebProcess/Network/WebResourceLoadScheduler.h:
1076         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1077         (WebKit::NetscapePlugin::fromNPP):
1078         (WebKit::NetscapePlugin::snapshot):
1079         (WebKit::NetscapePlugin::liveResourceData):
1080         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1081         * WebProcess/Plugins/Plugin.h:
1082         * WebProcess/Plugins/PluginProxy.cpp:
1083         (WebKit::PluginProxy::snapshot):
1084         (WebKit::PluginProxy::liveResourceData):
1085         * WebProcess/Plugins/PluginProxy.h:
1086         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1087         (WebKit::StorageNamespaceImpl::storageArea):
1088         (WebKit::StorageNamespaceImpl::copy):
1089         * WebProcess/Storage/StorageNamespaceImpl.h:
1090         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
1091         (WebKit::toHistoryItem):
1092         * WebProcess/WebCoreSupport/SessionStateConversion.h:
1093         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1094         (WebKit::WebChromeClient::createPopupMenu):
1095         (WebKit::WebChromeClient::createSearchPopupMenu):
1096         * WebProcess/WebCoreSupport/WebChromeClient.h:
1097         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1098         (WebKit::WebFrameLoaderClient::createDocumentLoader):
1099         (WebKit::WebFrameLoaderClient::createFrame):
1100         (WebKit::WebFrameLoaderClient::createPlugin):
1101         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1102         * WebProcess/WebPage/WebPage.cpp:
1103         (WebKit::WebPage::create):
1104         (WebKit::WebPage::createDocumentLoader):
1105         * WebProcess/WebPage/WebPage.h:
1106         * WebProcess/WebPage/mac/WebPageMac.mm:
1107         (WebKit::WebPage::lookupTextAtLocation):
1108
1109 2015-07-18  Simon Fraser  <simon.fraser@apple.com>
1110
1111         Scroll position jumps when scrolling scaling pages down in split view
1112         https://bugs.webkit.org/show_bug.cgi?id=147072
1113         rdar://problem/21769577
1114
1115         Reviewed by Sam Weinig.
1116         
1117         When apple.com/music is in Split View at a reduced scale, scrolling the page
1118         can cause unwanted scroll jumps. This happened because we'd enter
1119         TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded() with a pending
1120         layout, so run the autosizing logic. When scrolled near the bottom, the unconstrained
1121         layout resulted in a shorter document, which truncated the scroll position. The
1122         scaled layout then restored the longer document, but it also restored that
1123         truncated scroll position.
1124         
1125         Forcing a layout is sufficient to fix the bug for this page, and doing a single
1126         layout (which will happen anyway) is preferable to running the autosize logic
1127         if layout happens to be dirty.
1128
1129         I was not able to make a test to reproduce the problem. Entering
1130         scaleViewToFitDocumentIfNeeded() with pending layout was triggerable
1131         using a transform transition, but I was not able to reproduce incorrect
1132         scroll position restoration.
1133
1134         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1135         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
1136
1137 2015-07-17  Andy Estes  <aestes@apple.com>
1138
1139         [iOS] Further tighten the sandbox around pages fetched with Content-Disposition: attachment
1140         https://bugs.webkit.org/show_bug.cgi?id=147044
1141         rdar://problem/21567820
1142
1143         Reviewed by Brady Eidson.
1144
1145         * WebProcess/WebPage/WebPage.cpp:
1146         (WebKit::WebPage::WebPage): Enabled Content-Disposition: attachment sandbox on iOS.
1147
1148 2015-07-17  Tim Horton  <timothy_horton@apple.com>
1149
1150         [iOS] TextIndicator has a large forehead when line-height > 1
1151         https://bugs.webkit.org/show_bug.cgi?id=147058
1152         <rdar://problem/21643094>
1153
1154         Reviewed by Dean Jackson.
1155
1156         * WebProcess/WebPage/ios/WebPageIOS.mm:
1157         (WebKit::WebPage::getPositionInformation):
1158         Apply a review comment that I left myself and then forgot about.
1159
1160 2015-07-17  Enrica Casucci  <enrica@apple.com>
1161
1162         [iOS] Implement selectionInteractionAssistant accessor.
1163         https://bugs.webkit.org/show_bug.cgi?id=147054
1164         rdar://problem/20864286
1165
1166         Reviewed by Tim Horton.
1167
1168         One more change to adopt the new selection interaction
1169         model on iOS.
1170
1171         * UIProcess/ios/WKContentViewInteraction.mm:
1172         (-[WKContentView selectionInteractionAssistant]):
1173
1174 2015-07-17  Dan Bernstein  <mitz@apple.com>
1175
1176         REGRESSION (r186964): Crash in WebKit2.CloseFromWithinCreatePage
1177         https://bugs.webkit.org/show_bug.cgi?id=147055
1178
1179         Reviewed by Alex Christensen.
1180
1181         * UIProcess/WebPageProxy.cpp:
1182         (WebKit::WebPageProxy::createNewPage): Grab the main frame’s URL before calling out to the
1183         client, who may destroy the frame.
1184
1185 2015-07-17  Dan Bernstein  <mitz@apple.com>
1186
1187         WebKit2 part of <rdar://problem/21803781> The external URL policy is not reported correctly in navigation actions that create new windows
1188         https://bugs.webkit.org/show_bug.cgi?id=147040
1189
1190         Reviewed by Dean Jackson.
1191
1192         * UIProcess/Cocoa/UIDelegate.mm:
1193         (WebKit::UIDelegate::UIClient::createNewPage): Disallow App Links if the new page is for the
1194         same protocol, host and port as the main frame of this page.
1195
1196         * UIProcess/WebPageProxy.cpp:
1197         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Disallow App Links if
1198         m_shouldSuppressAppLinksInNextNavigationPolicyDecision is set, and reset it. See below for
1199         when we set it.
1200         (WebKit::WebPageProxy::decidePolicyForNewWindowAction): Disallow App Links if the new window
1201         is for the same protocol, host and port as the main frame of this page.
1202         (WebKit::WebPageProxy::createNewPage): Make the new page disallow App Links in the first
1203         policy decision if it is for the same protocol, host and port as the main frame of this
1204         page.
1205         * UIProcess/WebPageProxy.h: Added m_shouldSuppressAppLinksInNextNavigationPolicyDecision
1206         member variable.
1207
1208         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1209         (WebKit::WebChromeClient::createWindow): Pass the shouldOpenExternalURLsPolicy.
1210
1211         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1212         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.
1213
1214 2015-07-17  Tim Horton  <timothy_horton@apple.com>
1215
1216         iOS TextIndicators include text that is not supposed to be indicated
1217         https://bugs.webkit.org/show_bug.cgi?id=147028
1218         <rdar://problem/21643094>
1219
1220         Reviewed by Sam Weinig.
1221
1222         * WebProcess/Plugins/PluginView.cpp:
1223         (WebKit::PluginView::shouldCreateTransientPaintingSnapshot):
1224
1225 2015-07-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1226
1227         [GTK] Cleanup PasteboardHelper
1228         https://bugs.webkit.org/show_bug.cgi?id=147035
1229
1230         Reviewed by Žan Doberšek.
1231
1232         Use PasteboardHelper::singleton() instead of
1233         PasteboardHelper::defaultPasteboardHelper().
1234
1235         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1236         (webkitWebViewBaseConstructed):
1237         * UIProcess/gtk/DragAndDropHandler.cpp:
1238         (WebKit::DragAndDropHandler::startDrag):
1239         (WebKit::DragAndDropHandler::fillDragData):
1240         (WebKit::DragAndDropHandler::dataObjectForDropData):
1241         (WebKit::DragAndDropHandler::requestDragData):
1242
1243 2015-07-16  Matt Baker  <mattbaker@apple.com>
1244
1245         [Mac] Web Inspector toolbar can be covered by the Safari tab bar when docked to the right
1246         https://bugs.webkit.org/show_bug.cgi?id=146994
1247
1248         Reviewed by Timothy Hatcher.
1249
1250         WebInspectorProxy contained logic which ignored the next frame change notification from the inspected view,
1251         whenever it updated the frames of both the Inspector view and inspected view. This patch removes that logic,
1252         as it prevented the Inspector's frame from being adjusted after changes to the browser's top content inset.
1253
1254         * UIProcess/mac/WebInspectorProxyMac.mm:
1255         (-[WKWebInspectorProxyObjCAdapter ignoreNextInspectedViewFrameDidChange]): Deleted.
1256         (-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]): Deleted.
1257         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Deleted.
1258
1259 2015-07-16  Joseph Pecoraro  <pecoraro@apple.com>
1260
1261         Web Inspector: [Mac] Save dialog not working when inspector is docked
1262         https://bugs.webkit.org/show_bug.cgi?id=146991
1263
1264         Reviewed by Sam Weinig.
1265
1266         * UIProcess/mac/WebInspectorProxyMac.mm:
1267         (WebKit::runOpenPanel):
1268         (WebKit::WebInspectorProxy::platformSave):
1269         When the window is nil (docked) use a non-window version of running the dialog.
1270
1271 2015-07-16  Tim Horton  <timothy_horton@apple.com>
1272
1273         Add shrink-wrapped link highlights
1274         https://bugs.webkit.org/show_bug.cgi?id=147021
1275         <rdar://problem/21643094>
1276
1277         Reviewed by Enrica Casucci.
1278
1279         * Shared/InteractionInformationAtPosition.cpp:
1280         (WebKit::InteractionInformationAtPosition::encode):
1281         (WebKit::InteractionInformationAtPosition::decode):
1282         * Shared/InteractionInformationAtPosition.h:
1283         Add a TextIndicator to InteractionInformationAtPosition.
1284         Make use of some new C++ features.
1285
1286         * UIProcess/ios/WKContentViewInteraction.h:
1287         * UIProcess/ios/WKContentViewInteraction.mm:
1288         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
1289         (-[WKContentView didDismissPreviewViewController:committing:]):
1290         Make use of the TextIndicator (if we have one) to show a shrink-wrapped
1291         snapshot of the link.
1292
1293         * WebProcess/WebPage/ios/WebPageIOS.mm:
1294         (WebKit::WebPage::getPositionInformation):
1295         Build a TextIndicator for the link if possible.
1296
1297 2015-07-16  Matt Rajca  <mrajca@apple.com>
1298
1299         Media Session: remove plumbing for delivering start/end-of-interruption events
1300         https://bugs.webkit.org/show_bug.cgi?id=147005
1301
1302         Reviewed by Eric Carlson.
1303
1304         Instead of receiving interruptions through WebKit, we will provide platform-specific implementations in WebCore
1305         so the same behavior is available to all clients.
1306
1307         * UIProcess/API/C/WKPage.cpp:
1308         * UIProcess/API/C/WKPagePrivate.h:
1309         * UIProcess/WebPageProxy.cpp:
1310         * UIProcess/WebPageProxy.h:
1311         * WebProcess/WebPage/WebPage.cpp:
1312         * WebProcess/WebPage/WebPage.h:
1313         * WebProcess/WebPage/WebPage.messages.in:
1314
1315 2015-07-16  Michael Catanzaro  <mcatanzaro@igalia.com>
1316
1317         REGRESSION(r186464): [SOUP] ASSERTION FAILED: !m_messageReceiverMapCount when closing any tab
1318         https://bugs.webkit.org/show_bug.cgi?id=147006
1319
1320         Reviewed by Anders Carlsson.
1321
1322         Remove the message receiver before it is deallocated.
1323
1324         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
1325         (WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
1326
1327 2015-07-16  Brady Eidson  <beidson@apple.com>
1328
1329         Review feedback followup for:
1330         REGRESSION(r186088): Crash under WebKit::WebPageProxy::didFailLoadForFrame
1331         <rdar://problem/21692212> and https://bugs.webkit.org/show_bug.cgi?id=146988
1332
1333         * UIProcess/mac/PageClientImpl.mm:
1334         (WebKit::PageClientImpl::refView): CFRetain instead of Obj-C retain.
1335         (WebKit::PageClientImpl::derefView): CFRelease instead of Obj-C release.
1336
1337
1338 2015-07-16  Michael Catanzaro  <mcatanzaro@igalia.com>
1339
1340         [Linux] Seccomp: fix -Wmismatched-tags
1341         https://bugs.webkit.org/show_bug.cgi?id=146990
1342
1343         Reviewed by Žan Doberšek.
1344
1345         WebProcessCreationParameters is a struct nowadays, not a class, so declare it appropriately.
1346
1347         * Shared/linux/SeccompFilters/SyscallPolicy.h:
1348
1349 2015-07-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1350
1351         REGRESSION(r185415): [GTK] Browsers crash when an input method is enabled
1352         https://bugs.webkit.org/show_bug.cgi?id=146639
1353
1354         Reviewed by Žan Doberšek.
1355
1356         In r185415 I assumed that preedit signals were always emitted
1357         after a keypress was handled by the WebView. However, some input
1358         methods handle the keyboard events before the WebView, and preedit
1359         signals are emitted but no key event has been handled by the
1360         WebView. So, instead of asserting when filter key event completion
1361         handler is nullptr, we should check whether the current event was
1362         generated for a WebView filter request or not. In case the
1363         completion handler is nullptr, we send the event directly to the
1364         page, instead of going through the WebView, since there won't be
1365         editing commands for those events anyway.
1366
1367         * UIProcess/gtk/InputMethodFilter.cpp:
1368         (WebKit::InputMethodFilter::handleKeyboardEvent):
1369         (WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults):
1370
1371 2015-07-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1372
1373         Unreviewed. Follow up to r186887 for GTK+.
1374
1375         Add GTK+ implementation of PageClientImpl::refView/derefView.
1376
1377         * UIProcess/API/gtk/PageClientImpl.cpp:
1378         (WebKit::PageClientImpl::refView):
1379         (WebKit::PageClientImpl::derefView):
1380         * UIProcess/API/gtk/PageClientImpl.h:
1381
1382 2015-07-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1383
1384         [GTK] Input method filter is always enabled when the view is focused
1385         https://bugs.webkit.org/show_bug.cgi?id=146965
1386
1387         Reviewed by Martin Robinson.
1388
1389         It should only be enabled when the view is focused and there's an
1390         editable element focused. In r138544, when input methods were
1391         implemented, the message SetInputMethodState was added, but it was
1392         never used. Instead, the notifyFocusIn method of the IM filter
1393         enables the input method unconditionally. We should actually use
1394         the SetInputMethodState message to enable/disable input methods
1395         when editable elements are focused/unfocused.
1396
1397         * UIProcess/gtk/InputMethodFilter.cpp:
1398         (WebKit::InputMethodFilter::setEnabled): Call notifyFocusedIn/Out
1399         when inputs methods are enabled/disabled instead of notifying the
1400         IM context directly.
1401         (WebKit::InputMethodFilter::setCursorRect): Do not update the
1402         cursor position if input methods are didabled.
1403         (WebKit::InputMethodFilter::notifyFocusedIn): Do nothing when
1404         input methods are disabled. Do not enable input methods
1405         uncontionally here.
1406         (WebKit::InputMethodFilter::notifyFocusedOut): Do not disable
1407         input methods uncontionally here.
1408         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1409         (WebKit::WebEditorClient::setInputMethodState): Call
1410         WebPage::setInputMethodState() for GTK platform.
1411         * WebProcess/WebPage/WebPage.h: Add setInputMethodState() for GTK platform.
1412         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1413         (WebKit::WebPage::setInputMethodState): Update input method state
1414         and send SetInputMethodState message to the UI process if state changed.
1415
1416 2015-07-15  Brady Eidson  <beidson@apple.com>
1417
1418         REGRESSION(r186088): Crash under WebKit::WebPageProxy::didFailLoadForFrame
1419         <rdar://problem/21692212> and https://bugs.webkit.org/show_bug.cgi?id=146988
1420
1421         Reviewed by Sam Weinig.
1422
1423         When a loader delegate callback results in the WKView getting deallocated, then the PageClient
1424         is also destroyed.
1425
1426         WebPageProxy then (often) turns around and uses the PageClient anyways.
1427
1428         Tried to write a TestWebKitAPI test for this, but only didFailLoadForFrame appears to obviously 
1429         be vulnerable, and there seems to be no way to reproduce that failure case under TestWebKitAPI.
1430
1431         * UIProcess/PageClient.h: Add ref/derefView.
1432
1433         * UIProcess/API/gtk/PageClientImpl.h: Stub them out.
1434         * UIProcess/efl/WebViewEfl.h: Stub them out.
1435
1436         * UIProcess/mac/PageClientImpl.h:
1437         * UIProcess/mac/PageClientImpl.mm:
1438         (WebKit::PageClientImpl::refView): [m_wkView retain]
1439         (WebKit::PageClientImpl::derefView): [m_wkView release]
1440
1441         * UIProcess/ios/PageClientImplIOS.h:
1442         * UIProcess/ios/PageClientImplIOS.mm:
1443         (WebKit::PageClientImpl::refView): Retain all 3 views.
1444         (WebKit::PageClientImpl::derefView): Release all 3 views.
1445
1446         * UIProcess/WebPageProxy.cpp:
1447         (WebKit::PageClientProtector::PageClientProtector): Calls refView() on the PageClient.
1448         (WebKit::PageClientProtector::~PageClientProtector): Calls derefView() on the PageClient.
1449         (WebKit::WebPageProxy::didChangeBackForwardList): All methods that make m_loaderClient or
1450           m_pageClient callouts get a protector at their head.
1451         (WebKit::WebPageProxy::willGoToBackForwardListItem):
1452         (WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
1453         (WebKit::WebPageProxy::findPlugin):
1454         (WebKit::WebPageProxy::didCreateMainFrame):
1455         (WebKit::WebPageProxy::didCreateSubframe):
1456         (WebKit::WebPageProxy::didStartProgress):
1457         (WebKit::WebPageProxy::didChangeProgress):
1458         (WebKit::WebPageProxy::didFinishProgress):
1459         (WebKit::WebPageProxy::didDestroyNavigation):
1460         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
1461         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
1462         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
1463         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
1464         (WebKit::WebPageProxy::didCommitLoadForFrame):
1465         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
1466         (WebKit::WebPageProxy::didFinishLoadForFrame):
1467         (WebKit::WebPageProxy::didFailLoadForFrame):
1468         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
1469         (WebKit::WebPageProxy::didReceiveTitleForFrame):
1470         (WebKit::WebPageProxy::didFirstLayoutForFrame):
1471         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
1472         (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
1473         (WebKit::WebPageProxy::didLayout):
1474         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
1475         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
1476         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
1477         (WebKit::WebPageProxy::didDetectXSSForFrame):
1478         (WebKit::WebPageProxy::frameDidBecomeFrameSet):
1479         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1480         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1481         (WebKit::WebPageProxy::decidePolicyForResponse):
1482         (WebKit::WebPageProxy::decidePolicyForResponseSync):
1483         (WebKit::WebPageProxy::unableToImplementPolicy):
1484         (WebKit::WebPageProxy::didNavigateWithNavigationData):
1485         (WebKit::WebPageProxy::didPerformClientRedirect):
1486         (WebKit::WebPageProxy::didPerformServerRedirect):
1487         (WebKit::WebPageProxy::didUpdateHistoryTitle):
1488         (WebKit::WebPageProxy::wrapCryptoKey):
1489         (WebKit::WebPageProxy::unwrapCryptoKey):
1490         (WebKit::WebPageProxy::navigationGestureDidBegin):
1491         (WebKit::WebPageProxy::navigationGestureWillEnd):
1492         (WebKit::WebPageProxy::navigationGestureDidEnd):
1493         (WebKit::WebPageProxy::willRecordNavigationSnapshot):
1494
1495 2015-07-15  Sam Weinig  <sam@webkit.org>
1496
1497         Color match plug-ins
1498         <rdar://problem/21758722>
1499         https://bugs.webkit.org/show_bug.cgi?id=146987
1500
1501         Reviewed by Dean Jackson.
1502
1503         * Platform/mac/LayerHostingContext.h:
1504         * Platform/mac/LayerHostingContext.mm:
1505         (WebKit::LayerHostingContext::setColorMatchUntaggedContent):
1506         (WebKit::LayerHostingContext::colorMatchUntaggedContent):
1507         Add setter/getter for color matching untagged content.
1508
1509         * PluginProcess/mac/PluginControllerProxyMac.mm:
1510         (WebKit::PluginControllerProxy::updateLayerHostingContext):
1511         Have plug-ins CAContext's color match untagged colors into sRGB.
1512
1513 2015-07-15  Michael Catanzaro  <mcatanzaro@igalia.com>
1514
1515         [GTK] Rename PACKAGE_LOCALE_DIR to LOCALEDIR
1516         https://bugs.webkit.org/show_bug.cgi?id=146975
1517
1518         Reviewed by Martin Robinson.
1519
1520         * PlatformGTK.cmake:
1521         * UIProcess/API/gtk/WebKitWebContext.cpp:
1522         (webkit_web_context_class_init):
1523         * WebProcess/gtk/WebProcessMainGtk.cpp:
1524
1525 2015-07-15  Michael Catanzaro  <mcatanzaro@igalia.com>
1526
1527         [GTK] Rename LIBEXECDIR to PKGLIBEXECDIR
1528         https://bugs.webkit.org/show_bug.cgi?id=140070
1529
1530         Reviewed by Martin Robinson.
1531
1532         The path that's currently stored in LIBEXECDIR is one level lower than
1533         the real LIBEXECDIR, which we are going to need. Introduce PKGLIBEXECDIR
1534         so that we can use LIBEXECDIR for the real LIBEXECDIR in the future.
1535
1536         * PlatformGTK.cmake:
1537         * Shared/gtk/ProcessExecutablePathGtk.cpp:
1538         (WebKit::findWebKitProcess):
1539
1540 2015-07-15  Daniel Bates  <dabates@apple.com>
1541
1542         [Mac][WK2] Videos should only have access to cookies when -[NSURLRequest HTTPShouldHandleCookies] is YES
1543         https://bugs.webkit.org/show_bug.cgi?id=146763
1544         <rdar://problem/21736994>
1545
1546         Reviewed by Darin Adler.
1547
1548         We should only fetch cookies from the Network process when -[NSURLRequest HTTPShouldHandleCookies] is YES.
1549         This makes us more closely match the behavior of the CFNetwork implementation of
1550         -[__NSURLSessionLocal {_copyCookiesForRequestUsingAllAppropriateStorageSemantics, _getCookieHeadersForTask:completionHandler}].
1551
1552         * Shared/mac/CookieStorageShim.mm:
1553         (-[WKNSURLSessionLocal _copyCookiesForRequestUsingAllAppropriateStorageSemantics:]):
1554         (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
1555
1556 2015-07-14  Enrica Casucci  <enrica@apple.com>
1557
1558         [iOS] Add support for updateSelectionWithExtentPoint:withBoundary.
1559         https://bugs.webkit.org/show_bug.cgi?id=146951
1560         rdar://problem/20864286
1561
1562         Reviewed by Tim Horton.
1563
1564         Add implementation for new method used by text selection
1565         engine on iOS. The new function modifies the selection near the given point
1566         and snaps it at the boundary of the specified granularity.
1567
1568         * UIProcess/WebPageProxy.h:
1569         * UIProcess/ios/WKContentViewInteraction.mm:
1570         (-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
1571         (-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]):
1572         (-[WKContentView _characterBeforeCaretSelection]):
1573         * UIProcess/ios/WebPageProxyIOS.mm:
1574         (WebKit::WebPageProxy::updateSelectionWithExtentPoint):
1575         (WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
1576         (WebKit::WebPageProxy::requestDictationContext):
1577         * WebProcess/WebPage/WebPage.h:
1578         * WebProcess/WebPage/WebPage.messages.in:
1579         * WebProcess/WebPage/ios/WebPageIOS.mm:
1580         (WebKit::WebPage::rangeForGranularityAtPoint):
1581         (WebKit::WebPage::selectTextWithGranularityAtPoint):
1582         (WebKit::WebPage::updateSelectionWithExtentPointAndBoundary):
1583
1584 2015-07-15  Michael Catanzaro  <mcatanzaro@igalia.com>
1585
1586         [Linux] SeccompBrokerClient should cache arbitrary file descriptors
1587         https://bugs.webkit.org/show_bug.cgi?id=140068
1588
1589         Reviewed by Žan Doberšek.
1590
1591         If malloc() attempts to open /proc/sys/vm/overcommit_memory in a SIGSYS
1592         signal handler, the SeccompBroker will attempt to recursively broker the
1593         open() syscall. Generalize the existing code that already handles the
1594         similar case where malloc() opens /sys/devices/system/cpu/online to
1595         handle this situation as well.
1596
1597         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
1598         (WebKit::SIGSYSHandler):
1599         (WebKit::SeccompBrokerClient::SeccompBrokerClient):
1600         (WebKit::SeccompBrokerClient::~SeccompBrokerClient):
1601         (WebKit::SeccompBrokerClient::handleIfOpeningCachedFile):
1602         (WebKit::SeccompBrokerClient::cacheFile):
1603         (WebKit::SeccompBrokerClient::handleIfOpeningOnlineCPUCount): Deleted.
1604
1605 2015-07-15  ChangSeok Oh  <changseok.oh@collabora.com>
1606
1607         [GTK] Accelerated compositing is enabled by MiniBrowser in Wayland
1608         https://bugs.webkit.org/show_bug.cgi?id=146827
1609
1610         Reviewed by Žan Doberšek.
1611
1612         WebKit2Gtk+ does not currently support accelerated compositing. For the reason,
1613         we forcedly disable it in webkitWebViewBaseCreateWebPage. However, when we launch
1614         MiniBrowser in wayland, the unsupported feature is re-enabled since the existing
1615         setting is overwritten by a newly created one. Here the default value for
1616         accelerated compositing is true. We can fix this by moving the code disabling
1617         accelerated composition to WebPreferences::platformInitializeStore() so that
1618         we make sure the accelerated compositing is always disabled for wayland.
1619
1620         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1621         (webkitWebViewBaseCreateWebPage): Deleted.
1622         * UIProcess/gtk/WebPreferencesGtk.cpp:
1623         (WebKit::WebPreferences::platformInitializeStore):
1624
1625 2015-07-15  Dan Bernstein  <mitz@apple.com>
1626
1627         Fixed build fix.
1628
1629         * Platform/spi/ios/SafariServicesSPI.h:
1630
1631 2015-07-14  Ryuan Choi  <ryuan.choi@navercorp.com>
1632
1633         [CoordinatedGraphics] Possible wrong rendering with scrolling
1634         https://bugs.webkit.org/show_bug.cgi?id=146958
1635
1636         Reviewed by Gyuyoung Kim.
1637
1638         While r174261 fixing build break, there is some mistake that flushes contents layer
1639         instead of overlay layer.
1640
1641         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1642         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
1643
1644 2015-07-14  Dan Bernstein  <mitz@apple.com>
1645
1646         Attempted build fixes.
1647
1648         * Platform/spi/ios/SafariServicesSPI.h:
1649
1650 2015-07-14  Dan Bernstein  <mitz@apple.com>
1651
1652         Attempted build fixes.
1653
1654         * Platform/spi/ios/SafariServicesSPI.h:
1655
1656 2015-07-14  Anders Carlsson  <andersca@apple.com>
1657
1658         Remove wkPopupMenu from WebCoreSystemInterface; it's not called from WebCore
1659         https://bugs.webkit.org/show_bug.cgi?id=146945
1660
1661         Reviewed by Tim Horton.
1662
1663         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1664         (InitWebCoreSystemInterface): Deleted.
1665
1666 2015-07-14  Anders Carlsson  <andersca@apple.com>
1667
1668         Release assert under StyleResolver::loadPendingImages() caused by MemoryPressureHandler
1669         https://bugs.webkit.org/show_bug.cgi?id=146940
1670         rdar://problem/21605505
1671
1672         Reviewed by Sam Weinig.
1673
1674         * WebProcess/WebProcess.cpp:
1675         (WebKit::WebProcess::processWillSuspendImminently):
1676
1677 2015-07-14  Sam Weinig  <sam@webkit.org>
1678
1679         WebKit needs to serialize numeric values in NSError userInfo
1680         <rdar://problem/21818117>
1681         https://bugs.webkit.org/show_bug.cgi?id=146936
1682
1683         Reviewed by Anders Carlsson.
1684
1685         * Shared/mac/WebCoreArgumentCodersMac.mm:
1686         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
1687         Encode userInfo values that are NSNumbers in addition to NSStrings and NSURLs. Decoding 
1688         is already handled.
1689
1690 2015-07-14  Michael Catanzaro  <mcatanzaro@igalia.com>
1691
1692         [Linux] SeccompFilters: whitelist all NPAPI plugin directories
1693         https://bugs.webkit.org/show_bug.cgi?id=140067
1694
1695         Reviewed by Žan Doberšek.
1696
1697         * PlatformEfl.cmake: Build PluginSearchPath.cpp
1698         * PlatformGTK.cmake: Build PluginSearchPath.cpp
1699         * Shared/Plugins/unix/PluginSearchPath.cpp: Added.
1700         (WebKit::pluginsDirectories): Moved from PluginInfoStoreUnix.cpp.
1701         * Shared/Plugins/unix/PluginSearchPath.h: Added.
1702         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
1703         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy): Add the entire
1704         plugin search path to the whitelist.
1705         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
1706         (WebKit::PluginInfoStore::pluginsDirectories): Now gets plugins
1707         directories from PluginSearchPath.cpp
1708
1709 2015-07-14  Yongjun Zhang  <yongjun_zhang@apple.com>
1710
1711         https://bugs.webkit.org/show_bug.cgi?id=146917
1712         iOS WebKit doesn't build.
1713         rdar://problem/21801544
1714
1715         Fix the build - don't use deprecated methods.
1716
1717         Reviewed by Dan Bernstein.
1718
1719         * UIProcess/ios/WKContentViewInteraction.h:
1720         * UIProcess/ios/WKContentViewInteraction.mm:
1721         (-[WKContentView _registerPreviewInWindow:]):
1722         (-[WKContentView _unregisterPreviewInWindow:]):
1723
1724 2015-07-14  Yongjun Zhang  <yongjun_zhang@apple.com>
1725
1726         https://bugs.webkit.org/show_bug.cgi?id=146909
1727         Add actions for default link preview that uses SFSafariViewController.
1728
1729         Use the new private properties to prepare actions for the default link preview controller.
1730
1731         Reviewed by Dan Bernstein.
1732
1733         * UIProcess/ios/WKContentViewInteraction.mm:
1734         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
1735
1736 2015-07-14  Michael Catanzaro  <mcatanzaro@igalia.com>
1737
1738         [Linux] SeccompFilters: whitelist source directory on all ports
1739         https://bugs.webkit.org/show_bug.cgi?id=140066
1740
1741         Reviewed by Žan Doberšek.
1742
1743         Move this from EFL to port-independent code.
1744
1745         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
1746         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
1747         * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp:
1748         (WebKit::SeccompFiltersWebProcessEfl::platformInitialize):
1749
1750 2015-07-14  Zan Dobersek  <zdobersek@igalia.com>
1751
1752         [GTK] Add a runtime check for X11 display in webkitWebViewBaseExitAcceleratedCompositingMode()
1753         https://bugs.webkit.org/show_bug.cgi?id=146711
1754
1755         Reviewed by Carlos Garcia Campos.
1756
1757         webkitWebViewBaseExitAcceleratedCompositingMode() is already guarded with
1758         X11 build guards, but it should also do a runtime check that the program
1759         is running under an X11 display before proceeding.
1760
1761         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1762         (webkitWebViewBaseDidRelaunchWebProcess):
1763
1764 2015-07-13  Matt Rajca  <mrajca@apple.com>
1765
1766         Media Session: add plumbing for delivering start/end-of-interruption events
1767         https://bugs.webkit.org/show_bug.cgi?id=146837
1768
1769         Reviewed by Tim Horton.
1770
1771         * UIProcess/API/C/WKPage.cpp:
1772         (WKPageHandleMediaSessionInterruptionEvent):
1773         * UIProcess/API/C/WKPagePrivate.h:
1774         * UIProcess/WebPageProxy.cpp:
1775         (WebKit::WebPageProxy::handleMediaSessionInterruptionEvent):
1776         * UIProcess/WebPageProxy.h:
1777         * WebProcess/WebPage/WebPage.cpp:
1778         (WebKit::WebPage::handleMediaSessionInterruptionEvent):
1779         * WebProcess/WebPage/WebPage.h:
1780         * WebProcess/WebPage/WebPage.messages.in:
1781
1782 2015-07-13  Simon Fraser  <simon.fraser@apple.com>
1783
1784         [iOS WK2] When choosing an initial viewport scale, take overflow on the <body> into account
1785         https://bugs.webkit.org/show_bug.cgi?id=146918
1786         rdar://problem/9222837
1787
1788         Reviewed by Tim Horton.
1789
1790         Use as input to the viewport scaling algorithm a contents size from the FrameView
1791         that takes overflow on the viewport renderer into account. This prevents unexpected
1792         viewports scaling on pages that have content that overflows their expressed contents size,
1793         but apply overflow to the <body>.
1794
1795         * WebProcess/WebPage/WebPage.cpp:
1796         (WebKit::WebPage::mainFrameDidLayout): Use contentsSizeRespectingOverflow(),
1797         rather than raw contentsSize(), to determine scaling.
1798
1799 2015-07-13  Dan Bernstein  <mitz@apple.com>
1800
1801         Fixed the build.
1802
1803         * UIProcess/ios/WKContentViewInteraction.mm:
1804         (-[WKContentView _registerPreviewInWindow:]):
1805         (-[WKContentView _unregisterPreviewInWindow:]):
1806
1807 2015-07-13  Dan Bernstein  <mitz@apple.com>
1808
1809         Removed now-unused SPI -[WKWebView _loadRequest:withOptions:].
1810
1811         Rubber-stamped by Anders Carlsson.
1812
1813         * UIProcess/API/Cocoa/WKWebView.mm:
1814         (-[WKWebView _loadRequest:withOptions:]): Deleted.
1815         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1816
1817 2015-07-13  Anders Carlsson  <andersca@apple.com>
1818
1819         Apps linked with a deployment target of iOS 7.x or earlier crash when using modern WebKit API
1820         https://bugs.webkit.org/show_bug.cgi?id=146913
1821         rdar://problem/21789252
1822
1823         Reviewed by Dan Bernstein.
1824
1825         Make a top-level symlink from /System/Library/PrivateFrameworks/WebKit.framework to
1826         /System/Library/Frameworks/WebKit.framework.
1827
1828         * WebKit2.xcodeproj/project.pbxproj:
1829
1830 2015-07-13  Anders Carlsson  <andersca@apple.com>
1831
1832         Silverlight causes tabs to hang
1833         https://bugs.webkit.org/show_bug.cgi?id=146912
1834         rdar://problem/21686508
1835
1836         Reviewed by Sam Weinig.
1837
1838         Make sure to link production builds of the legacy plug-in process against the shim on 10.11 and newer.
1839
1840         * Configurations/PluginProcess.xcconfig:
1841
1842 2015-07-13  Michael Catanzaro  <mcatanzaro@igalia.com>
1843
1844         [Linux] SeccompFilters: handle alternate install prefixes
1845         https://bugs.webkit.org/show_bug.cgi?id=140065
1846
1847         Reviewed by Žan Doberšek.
1848
1849         If the install prefix is something other than /usr, e.g. /usr/local or
1850         ~/jhbuild/install, then we want to make sure to allow libraries and data
1851         from that prefix.
1852
1853         * PlatformEfl.cmake:
1854         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
1855         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
1856
1857 2015-07-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1858
1859         [GTK] Contents not correctly laid out when the web view is not realized
1860         https://bugs.webkit.org/show_bug.cgi?id=142532
1861
1862         Reviewed by Darin Adler.
1863
1864         The problem is that we are not reporting any size until the web
1865         view is realized, so any web view loaded in a separate tab in the
1866         browser, will report 0x0 as the window.innerWidth,
1867         window.innerHeight until the view is realized. Websites that use
1868         the window.innerWidth/innerHeight during the page load to decide
1869         how to lay out the contents will be rendered wrongly.
1870         I haven't been able to reproduce this with unit tests, as this
1871         requires the particular case of same window but different web
1872         views using tabs for example.
1873
1874         * UIProcess/API/gtk/PageClientImpl.cpp:
1875         (WebKit::PageClientImpl::viewSize): Always report the drawing area
1876         size to make usre it's in sync with the WebProcess page size.
1877         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1878         (webkitWebViewBaseSizeAllocate): Remove the optimization of only
1879         report the size when it has changed, since both the redirected
1880         window and the drawing area already do that check. Also remove the
1881         optimization of waiting until the view is mapped to report its
1882         size, since that's often too late for websites using the window
1883         size during load.
1884         (webkitWebViewBaseMap): Never report size on map, it should have
1885         already been reported by size-allocate.
1886
1887 2015-07-11  Nikita Vasilyev  <nvasilyev@apple.com>
1888
1889         Web Inspector: Inspector should be able to be docked to the bottom of a narrow window
1890         https://bugs.webkit.org/show_bug.cgi?id=146871
1891
1892         Reviewed by Timothy Hatcher.
1893
1894         * UIProcess/WebInspectorProxy.cpp:
1895         * UIProcess/mac/WebInspectorProxyMac.mm:
1896         (WebKit::WebInspectorProxy::platformCanAttach):
1897         * WebProcess/WebPage/WebInspector.cpp:
1898
1899 2015-07-11  Joseph Pecoraro  <pecoraro@apple.com>
1900
1901         Allow clients to opt-out of default app link link actions
1902         https://bugs.webkit.org/show_bug.cgi?id=146883
1903         <rdar://problem/21221902>
1904
1905         Reviewed by Dan Bernstein.
1906
1907         * UIProcess/API/APIUIClient.h:
1908         (API::UIClient::shouldIncludeAppLinkActionsForElement):
1909         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1910         * UIProcess/Cocoa/UIDelegate.h:
1911         * UIProcess/Cocoa/UIDelegate.mm:
1912         (WebKit::UIDelegate::setDelegate):
1913         (WebKit::UIDelegate::UIClient::shouldIncludeAppLinkActionsForElement):
1914         Plumbing for a new delegate message to ask the client if they
1915         would like app link actions or not. Default is yes.
1916
1917         * UIProcess/ios/WKActionSheetAssistant.h:
1918         * UIProcess/ios/WKActionSheetAssistant.mm:
1919         (-[WKActionSheetAssistant showImageSheet]):
1920         (-[WKActionSheetAssistant showLinkSheet]):
1921         (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
1922         (-[WKActionSheetAssistant defaultActionsForImageSheet:]):
1923         Pass elementInfo into methods generating default actions.
1924         
1925         (-[WKActionSheetAssistant _appendOpenActionsForURL:actions:elementInfo:]):
1926         When generating open actions, if the process has AppLink capabilities
1927         ask the client if they want to include AppLink actions or fall back
1928         to the basic Open action.
1929
1930         * UIProcess/ios/WKContentViewInteraction.mm:
1931         (-[WKContentView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
1932         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
1933         * UIProcess/ios/WKPDFView.mm:
1934         (-[WKPDFView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
1935         Assistant delegate implementations forward to the UIDelegate.
1936
1937 2015-07-11  Joseph Pecoraro  <pecoraro@apple.com>
1938
1939         Update default link action sheets for app links
1940         https://bugs.webkit.org/show_bug.cgi?id=146658
1941         <rdar://problem/21221902>
1942
1943         Reviewed by Dan Bernstein.
1944
1945         * Shared/mac/SandboxUtilities.h:
1946         * Shared/mac/SandboxUtilities.mm: Renamed from Source/WebKit2/Shared/mac/SandboxUtilities.cpp.
1947         (WebKit::processHasEntitlement):
1948         * UIProcess/ApplicationStateTracker.mm:
1949         (WebKit::applicationType):
1950         (WebKit::hasEntitlement): Deleted.
1951         * WebKit2.xcodeproj/project.pbxproj:
1952         Share a helper for checking if the current process has an entitlement.
1953
1954         * UIProcess/API/Cocoa/_WKElementAction.h:
1955         * UIProcess/API/Cocoa/_WKElementAction.mm:
1956         (+[_WKElementAction _elementActionWithType:title:actionHandler:]):
1957         (+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
1958         * UIProcess/API/Cocoa/_WKElementActionInternal.h:
1959         Add an internal way to make an element action with a standard type and regular handler.
1960         We use this for the new standard types that don't have a default implementation.
1961
1962         * UIProcess/ios/WKActionSheetAssistant.mm:
1963         (applicationHasAppLinkEntitlements):
1964         (appLinkForURL):
1965         Helpers checking access to app links and fetching app links.
1966
1967         (-[WKActionSheetAssistant _appendOpenActionsForURL:actions:]):
1968         (-[WKActionSheetAssistant defaultActionsForLinkSheet]):
1969         (-[WKActionSheetAssistant defaultActionsForImageSheet]):
1970         Create "Open in Safari" and "Open in 'App'" default actions for AppLinks,
1971         otherwise add the normal default "Open" action.
1972
1973 2015-07-11  Enrica Casucci  <enrica@apple.com>
1974
1975         Remove incorrect overriding of inputAssistantItem in WKContentView.
1976         https://bugs.webkit.org/show_bug.cgi?id=146863
1977         rdar://problem/21507154
1978
1979         Reviewed by Sam Weinig.
1980
1981         Correction to the patch in r186713.
1982         We need to provide the inputAssistantItem from the responder.
1983
1984         * UIProcess/ios/WKContentViewInteraction.mm:
1985         (-[WKContentView inputAccessoryView]):
1986
1987 2015-07-11  Commit Queue  <commit-queue@webkit.org>
1988
1989         Unreviewed, rolling out r186689 and r186710.
1990         https://bugs.webkit.org/show_bug.cgi?id=146880
1991
1992         May have caused a PLT regression and broken a layout test
1993         (Requested by cdumez on #webkit).
1994
1995         Reverted changesets:
1996
1997         "[WK2] Increase the QoS of some of our WorkQueues to match the
1998         one of our processes"
1999         https://bugs.webkit.org/show_bug.cgi?id=146855
2000         http://trac.webkit.org/changeset/186689
2001
2002         "REGRESSION (r186689?): fast/frames/frame-limit.html timeout
2003         on Mavericks {Release,Debug} WK2 bots"
2004         https://bugs.webkit.org/show_bug.cgi?id=146876
2005         http://trac.webkit.org/changeset/186710
2006
2007 2015-07-10  Enrica Casucci  <enrica@apple.com>
2008
2009         Remove incorrect overriding of inputAssistantItem in WKContentView.
2010         https://bugs.webkit.org/show_bug.cgi?id=146863
2011         rdar://problem/21507154
2012
2013         Reviewed by Dan Bernstein.
2014
2015         Removing implementation of inputAssistantItem and moving initialization
2016         of formAccessoryView to inputAccessoryView to avoid interfering with
2017         the keyboard handling of the assistant bar.
2018
2019         * UIProcess/ios/WKContentViewInteraction.mm:
2020         (-[WKContentView inputAccessoryView]):
2021         (-[WKContentView inputAssistantItem]): Deleted.
2022         (-[WKContentView _inputAssistantItem]): Deleted.
2023
2024 2015-07-10  Simon Fraser  <simon.fraser@apple.com>
2025
2026         [iOS WK2] Scrolling issues on horizontally scrollable RTL pages
2027         https://bugs.webkit.org/show_bug.cgi?id=146872
2028         rdar://problem/7569416
2029
2030         Reviewed by Sam Weinig.
2031
2032         Horizontally scrollable RTL pages in WebKit2 had a variety of issues: they had
2033         a gap down the right edge, and unreachable content on the left side, focussing
2034         form fields scrolled to the wrong location, and programmatic scrolls scrolled
2035         to the wrong place.
2036         
2037         Fix by plumbing the WebCore notion of scrollOrigin through to the UI process,
2038         and using it in various places. There are three main aspects to the patch:
2039         
2040         1. scroll origin is included in RemoteLayerTreeTransaction, and plumbed through
2041            to -[WKWebView _scrollToContentOffset:] for correct programmatic scrolling,
2042            including zooming to focused form elements. The WKContentView's boundsOrigin
2043            is set to the scroll origin so that the view coordinates match document coordinates.
2044         2. WebPageProxy::computeCustomFixedPositionRect() uses the actual documentRect()
2045            rather than just conjuring up a rect with a zero origin, which makes position:fixed
2046            work correctly.
2047         3. _interactionViewsContainerView (which hosts tap highlights) is positioned to 
2048            coincide with the origin of the documentRect (i.e. at the scroll origin, which
2049            may not be top-left). This allows tap highlights to show in the correct location.
2050         4. ScrollView::unobscuredContentRect() is fixed to take scroll origin into account;
2051            if the returned rect is wrong, RenderLayer::hitTest() incorrectly clips the hit
2052            testing area.
2053
2054         * Shared/mac/RemoteLayerTreeTransaction.h:
2055         (WebKit::RemoteLayerTreeTransaction::scrollOrigin):
2056         (WebKit::RemoteLayerTreeTransaction::setScrollOrigin):
2057         * Shared/mac/RemoteLayerTreeTransaction.mm:
2058         (WebKit::RemoteLayerTreeTransaction::encode):
2059         (WebKit::RemoteLayerTreeTransaction::decode):
2060         (WebKit::RemoteLayerTreeTransaction::description): Dump some more info.
2061         * UIProcess/API/Cocoa/WKWebView.mm:
2062         (-[WKWebView _scrollToContentOffset:scrollOrigin:]):
2063         (-[WKWebView _scrollToContentOffset:]): Deleted.
2064         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2065         * UIProcess/API/gtk/PageClientImpl.cpp:
2066         (WebKit::PageClientImpl::requestScroll):
2067         * UIProcess/API/gtk/PageClientImpl.h:
2068         * UIProcess/CoordinatedGraphics/WebView.cpp:
2069         (WebKit::WebView::requestScroll):
2070         * UIProcess/CoordinatedGraphics/WebView.h:
2071         * UIProcess/PageClient.h:
2072         * UIProcess/WebPageProxy.cpp:
2073         (WebKit::WebPageProxy::requestScroll):
2074         * UIProcess/WebPageProxy.h:
2075         * UIProcess/ios/PageClientImplIOS.h:
2076         * UIProcess/ios/PageClientImplIOS.mm:
2077         (WebKit::PageClientImpl::requestScroll):
2078         (WebKit::PageClientImpl::documentRect):
2079         (WebKit::PageClientImpl::contentsSize): Deleted.
2080         * UIProcess/ios/WKContentView.mm:
2081         (-[WKContentView _didCommitLayerTree:]):
2082         * UIProcess/ios/WebPageProxyIOS.mm:
2083         (WebKit::WebPageProxy::computeCustomFixedPositionRect):
2084         * UIProcess/mac/PageClientImpl.h:
2085         * UIProcess/mac/PageClientImpl.mm:
2086         (WebKit::PageClientImpl::requestScroll):
2087         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2088         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2089         * WebProcess/WebPage/WebPage.cpp:
2090         (WebKit::WebPage::willCommitLayerTree):
2091
2092 2015-07-10  Chris Dumez  <cdumez@apple.com>
2093
2094         [WK2] Diagnostic logging messages are causing too much IPC
2095         https://bugs.webkit.org/show_bug.cgi?id=146873
2096         <rdar://problem/21779205>
2097
2098         Reviewed by Ryosuke Niwa.
2099
2100         Diagnostic logging messages are causing too much IPC. To address the
2101         problem, we now do the sampling of the senders' side (WebContent
2102         process and Networking process) instead of the receiver's side
2103         (UIProcess).
2104
2105         * NetworkProcess/NetworkProcess.cpp:
2106         (WebKit::NetworkProcess::logDiagnosticMessage):
2107         (WebKit::NetworkProcess::logDiagnosticMessageWithResult):
2108         (WebKit::NetworkProcess::logDiagnosticMessageWithValue):
2109         * UIProcess/Network/NetworkProcessProxy.cpp:
2110         (WebKit::NetworkProcessProxy::logSampledDiagnosticMessage):
2111         (WebKit::NetworkProcessProxy::logSampledDiagnosticMessageWithResult):
2112         (WebKit::NetworkProcessProxy::logSampledDiagnosticMessageWithValue):
2113         * UIProcess/Network/NetworkProcessProxy.h:
2114         * UIProcess/Network/NetworkProcessProxy.messages.in:
2115         * UIProcess/WebPageProxy.cpp:
2116         (WebKit::WebPageProxy::logDiagnosticMessage):
2117         (WebKit::WebPageProxy::logDiagnosticMessageWithResult):
2118         (WebKit::WebPageProxy::logDiagnosticMessageWithValue):
2119         (WebKit::WebPageProxy::logSampledDiagnosticMessage):
2120         (WebKit::WebPageProxy::logSampledDiagnosticMessageWithResult):
2121         (WebKit::WebPageProxy::logSampledDiagnosticMessageWithValue):
2122         * UIProcess/WebPageProxy.h:
2123         * UIProcess/WebPageProxy.messages.in:
2124         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
2125         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
2126         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
2127         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
2128
2129 2015-07-10  Dean Jackson  <dino@apple.com>
2130
2131         Airplay button and placeholder are missing in inline controls
2132         https://bugs.webkit.org/show_bug.cgi?id=146869
2133         <rdar://problem/21555051>
2134
2135         Reviewed by Simon Fraser.
2136
2137         Fix a typo in the ENABLE that was causing the Airplay
2138         setting (allowsAirPlayForMediaPlayback, which becomes
2139         webkitWirelessVideoPlaybackDisabled) to default to false.
2140
2141         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2142         (-[WKWebViewConfiguration init]): Change WIRELESS_TARGET_PLAYBACK
2143         to WIRELESS_PLAYBACK_TARGET.
2144
2145 2015-07-10  Tim Horton  <timothy_horton@apple.com>
2146
2147         Use CoreAnimation fences instead of synchronous IPC to synchronize resize
2148         https://bugs.webkit.org/show_bug.cgi?id=146294
2149         <rdar://problem/21090193>
2150
2151         Reviewed by Anders Carlsson.
2152
2153         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2154         (WebKit::TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate):
2155         Tiny followup; don't touch Connection if the connection isn't valid.
2156
2157 2015-07-10  Chris Dumez  <cdumez@apple.com>
2158
2159         [WK2] Increase the QoS of some of our WorkQueues to match the one of our processes
2160         https://bugs.webkit.org/show_bug.cgi?id=146855
2161
2162         Reviewed by Anders Carlsson.
2163
2164         Increase the QoS of some of our WorkQueues to match the one of our processes. For
2165         e.g., even though the WebContent and the Networking processes have USER_UNITIATED
2166         QoS, the IPC between them is using a WorkQueue with DEFAULT QoS. Similarly, the
2167         WorkQueue used for network cache reads has DEFAULT QoS.
2168
2169         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2170         (WebKit::NetworkCache::Storage::Storage):
2171         * Platform/IPC/Connection.cpp:
2172         (IPC::Connection::Connection):
2173
2174 2015-07-10  Zalan Bujtas  <zalan@apple.com>
2175
2176         Crash at WebCore::WebPage::innerFrameQuad.
2177         https://bugs.webkit.org/show_bug.cgi?id=146843
2178         rdar://problem/21501819
2179
2180         Reviewed by Andreas Kling.
2181
2182         We may end up with a null rootEditableElement() after calling Document::updateLayout().
2183
2184         Speculative fix. Not reproducible.
2185
2186         * WebProcess/WebPage/WebPage.h: Some const cleanup.
2187         * WebProcess/WebPage/ios/WebPageIOS.mm:
2188         (WebKit::innerFrameQuad): null check assistedNode.rootEditableElement()
2189         (WebKit::constrainPoint):
2190         (WebKit::WebPage::selectWithGesture):
2191         (WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
2192         (WebKit::WebPage::selectPositionAtPoint):
2193         (WebKit::WebPage::selectPositionAtBoundaryWithDirection):
2194         (WebKit::WebPage::selectTextWithGranularityAtPoint):
2195         (WebKit::WebPage::updateSelectionWithExtentPoint):
2196         (WebKit::WebPage::getPositionInformation):
2197
2198 2015-07-09  Jon Honeycutt  <jhoneycutt@apple.com>
2199
2200         [iOS] Document picker has overlapping icons on iPad
2201         https://bugs.webkit.org/show_bug.cgi?id=146808
2202         <rdar://problem/21251875>
2203
2204         Reviewed by Sam Weinig.
2205
2206         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2207         (-[WKFileUploadPanel documentMenu:didPickDocumentPicker:]):
2208         Don't show this UI as a popover on iPad; the default is a full screen
2209         form sheet.
2210
2211 2015-07-09  Dan Bernstein  <mitz@apple.com>
2212
2213         WebKit2 part of Track and expose policies for external URL schemes and App Links separately
2214         https://bugs.webkit.org/show_bug.cgi?id=146822
2215
2216         Reviewed by Anders Carlsson.
2217
2218         * Shared/NavigationActionData.cpp:
2219         (WebKit::NavigationActionData::encode):
2220         (WebKit::NavigationActionData::decode):
2221         * Shared/NavigationActionData.h:
2222           Replaced the shouldOpenExternalURLsPolicy boolean member with a
2223           shouldOpenExternalURLsPolicy member whose type is ShouldOpenExternalURLsPolicy, and
2224           updated encoding and decoding:
2225
2226         * UIProcess/API/APINavigationAction.h:
2227           Added shouldOpenAppLinks boolean to NavigationAction::create and the constructor. It
2228           augments the policy in the NavigationActionData with a valude decided in the UI process.
2229           Replaced shouldOpenExternalURLs() with shouldOpenExternalSchemes() and
2230           shouldOpenAppLinks() which check the policy and the new m_shouldOpenAppLinks boolean.
2231
2232         * UIProcess/API/Cocoa/WKNavigationAction.mm:
2233         (-[WKNavigationAction _shouldOpenExternalSchemes]): Getter for new property, calls through
2234           to the NavigationAction.
2235         (-[WKNavigationAction _shouldOpenAppLinks]): Ditto.
2236         (-[WKNavigationAction _shouldOpenExternalURLs]): Now deprecated and returns the
2237           _shouldOpenExternalSchemes value.
2238         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h: Declared new properties for the two
2239           policies and deprecated old property.
2240
2241         * UIProcess/Cocoa/NavigationState.mm:
2242         (WebKit::tryAppLink): Changed to use NavigationAction::shouldOpenAppLinks, which
2243           encapsulates logic that used to be here.
2244
2245         * UIProcess/Cocoa/UIDelegate.mm:
2246         (WebKit::UIDelegate::UIClient::createNewPage): Allow App Links (if already allowed by policy).
2247
2248         * UIProcess/WebPageProxy.cpp:
2249         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Moved logic from tryAppLink in
2250           NavigationState.mm here and pass the result to NavigationAction::create.
2251         (WebKit::WebPageProxy::decidePolicyForNewWindowAction): Allow App Links (if already allowed
2252           by policy).
2253         * UIProcess/WebPageProxy.h:
2254         (WebKit::WebPageProxy::loadRequest): Changed the default policy to not allow App Links (but
2255           still allow external schemes).
2256
2257         * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
2258         (WKBundleNavigationActionGetShouldTryAppLinks): Added this getter.
2259         * WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h:
2260
2261         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
2262         (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
2263         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
2264           Added m_shouldTryAppLinks boolean member, initialized from the policy. Updated the
2265           initialization of m_shouldOpenExternalURLs to account for the new policy.
2266
2267         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2268         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Pass the policy
2269           in the navigation data.
2270
2271 2015-07-09  Tim Horton  <timothy_horton@apple.com>
2272
2273         Use CoreAnimation fences instead of synchronous IPC to synchronize resize
2274         https://bugs.webkit.org/show_bug.cgi?id=146294
2275         <rdar://problem/21090193>
2276
2277         Reviewed by Anders Carlsson.
2278
2279         Because of changes in underlying frameworks, we can no longer depend on
2280         blocking the UI process main thread to be sufficient to synchronize
2281         UI process CA commits with commits coming from the Web process.
2282
2283         Instead, we have to use CoreAnimation fences to perform this synchronization.
2284         Instead of blocking inside waitForAndDispatchImmediately, we'll end up
2285         blocking during the CA commit.
2286
2287         * Platform/mac/LayerHostingContext.mm:
2288         Use HAVE(COREANIMATION_FENCES).
2289
2290         * Platform/IPC/Connection.cpp:
2291         (IPC::Connection::Connection):
2292         (IPC::Connection::processIncomingMessage):
2293         (IPC::Connection::installIncomingSyncMessageCallback):
2294         (IPC::Connection::uninstallIncomingSyncMessageCallback):
2295         Keep track of a set of incoming sync message callbacks, and fire them
2296         (on another queue) when a sync message arrives.
2297
2298         (IPC::Connection::hasIncomingSyncMessage):
2299         * Platform/IPC/Connection.h:
2300         Add a way to check if there are any sync messages in the queue.
2301
2302         * UIProcess/API/mac/WKView.mm:
2303         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
2304         (-[WKView waitForAsyncDrawingAreaSizeUpdate]):
2305         These are no longer used; do nothing on 10.10+.
2306
2307         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2308         (WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
2309         * WebProcess/WebPage/DrawingArea.h:
2310         (WebKit::DrawingArea::updateGeometry):
2311         * WebProcess/WebPage/DrawingArea.messages.in:
2312         * WebProcess/WebPage/WebPage.cpp:
2313         (WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
2314         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2315         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2316         (WebKit::RemoteLayerTreeDrawingArea::updateGeometry):
2317         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2318         Add a MachSendRight parameter to UpdateGeometry, so that we can send along
2319         a fence port with the geometry update if needed.
2320
2321         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2322         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
2323         Apply the incoming fence so that geometry changes will be synchronized between processes.
2324
2325         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2326         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
2327         Don't wait for DidUpdateGeometry to come in if we're using fences to achieve the same thing.
2328
2329         (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
2330         Create and block us on a fence and send it along with the geometry update.
2331         If a sync message is in the incoming message queue, don't create the fence;
2332         if a sync message comes in at any point after we've installed the fence (but
2333         before the relevant commit completes), invalidate the fence, so that we won't
2334         end up temorarily deadlocked waiting for the fence timeout.
2335
2336 2015-07-09  Michael Catanzaro  <mcatanzaro@igalia.com>
2337
2338         [GTK] Crash when spell checker returns no guesses
2339         https://bugs.webkit.org/show_bug.cgi?id=146805
2340
2341         Reviewed by Martin Robinson.
2342
2343         Properly handle ContextMenuItemTagNoGuessesFound in the switch statement.
2344
2345         * UIProcess/API/gtk/WebKitContextMenuActions.cpp:
2346         (webkitContextMenuActionGetForContextMenuItem):
2347
2348 2015-07-09  Alex Christensen  <achristensen@webkit.org>
2349
2350         [Content Extensions] Add 3 byte jump size.
2351         https://bugs.webkit.org/show_bug.cgi?id=146425
2352
2353         Reviewed by Darin Adler.
2354
2355         * UIProcess/API/APIUserContentExtensionStore.h:
2356         Increment CurrentContentExtensionFileVersion because of change in the bytecode.
2357
2358 2015-07-09  Anders Carlsson  <andersca@apple.com>
2359
2360         SafariViewController loads partial webpage or entirely blank webpage
2361         https://bugs.webkit.org/show_bug.cgi?id=146815
2362         rdar://problem/21734757
2363
2364         Reviewed by Dan Bernstein.
2365
2366         * Platform/spi/ios/UIKitSPI.h:
2367         Add _hostProcessIdentifier getter.
2368
2369         * UIProcess/ApplicationStateTracker.h:
2370         Change ApplicationStateTracker to hold on to a WKContentView instead of a UIView.
2371
2372         * UIProcess/ApplicationStateTracker.mm:
2373         (WebKit::applicationType):
2374         Add a helper function that returns the type of application the web view is hosted by (regular
2375         application, view service or extension).
2376
2377         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
2378         Register notifications and update m_isInBackground. For regular applications, just listen for UIApplication notifications.
2379         For view services, walk the view controller hierarchy and find the service view controller and listen for notifications and use
2380         BKS to find the background state of the host application. For extensions, just use BKSApplicationStateMonitor directly.
2381
2382         (WebKit::isViewService): Deleted.
2383
2384         * UIProcess/ios/WKContentView.mm:
2385         (-[WKContentView willMoveToWindow:]):
2386         If we're moving out of a window, null out the state tracker.
2387
2388         (-[WKContentView didMoveToWindow]):
2389         If we moved to a window, create a new state tracker.
2390
2391         (-[WKContentView isBackground]):
2392         Handle a null application state.
2393
2394         (-[WKContentView _commonInitializationWithProcessPool:configuration:]): Deleted.
2395         Don't create the application state here.
2396
2397 2015-07-09  Dan Bernstein  <mitz@apple.com>
2398
2399         [Cocoa] Report the first paint after committing a load as a rendering progress event
2400         https://bugs.webkit.org/show_bug.cgi?id=146765
2401
2402         Reviewed by Tim Horton.
2403
2404         * Shared/API/Cocoa/_WKRenderingProgressEvents.h: Added _WKRenderingProgressEventFirstPaint.
2405
2406         * UIProcess/API/Cocoa/WKWebView.mm:
2407         (-[WKWebView _didCommitLayerTree:]): If this is the first layer tree commit since the load
2408         was committed, and the delegate is observing _WKRenderingProgressEventFirstPaint, call
2409         NavigationState::didFirstPaint.
2410
2411         * UIProcess/Cocoa/NavigationState.h:
2412         * UIProcess/Cocoa/NavigationState.mm:
2413         (WebKit::NavigationState::didFirstPaint): Added. Calls -_webView:renderingProgressDidChange:
2414         with _WKRenderingProgressEventFirstPaint.
2415
2416 2015-07-08  Jinwoo Song  <jinwoo7.song@samsung.com>
2417
2418         [EFL] When closing inspector window, EwkView is not released properly.
2419         https://bugs.webkit.org/show_bug.cgi?id=146716
2420
2421         Reviewed by Gyuyoung Kim.
2422
2423         It's because inspector window could not be deleted by remaining reference
2424         from inspector view(evas object). This patch deletes the inspector window
2425         after finishing the evas object smart call.
2426
2427         * UIProcess/efl/WebInspectorProxyEfl.cpp:
2428         (WebKit::destroyInspectorWindow):
2429         (WebKit::WebInspectorProxy::platformDidClose):
2430
2431 2015-07-08  Hyungwook Lee  <hyungwook.lee@navercorp.com>
2432
2433         Fix ASSERTION FAILED: !m_pendingNavigationID in WebPage::reload().
2434         https://bugs.webkit.org/show_bug.cgi?id=146546
2435
2436         Reviewed by Darin Adler.
2437
2438         We did't reset pendingNavigationID value when request url is empty.
2439         Hence we need to ignore ASSERT check in this case.
2440
2441         * WebProcess/WebPage/WebPage.cpp:
2442         (WebKit::WebPage::reload):
2443
2444 2015-07-08  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2445
2446         Use Ref/RefPtr instead of PassRefPtr in WebKit2 - 2
2447         https://bugs.webkit.org/show_bug.cgi?id=146591
2448
2449         Reviewed by Darin Adler.
2450
2451         Following patch in order to reduce use of PassRefPtr.
2452
2453         * Shared/BlobDataFileReferenceWithSandboxExtension.h:
2454         * Shared/Cocoa/CompletionHandlerCallChecker.h:
2455         * Shared/Cocoa/CompletionHandlerCallChecker.mm:
2456         (WebKit::CompletionHandlerCallChecker::create):
2457         * Shared/Downloads/DownloadAuthenticationClient.h:
2458         (WebKit::DownloadAuthenticationClient::create):
2459         * Shared/SandboxExtension.h:
2460         * Shared/ShareableResource.cpp:
2461         (WebKit::ShareableResource::create):
2462         * Shared/ShareableResource.h:
2463         * Shared/mac/ObjCObjectGraph.h:
2464         (WebKit::ObjCObjectGraph::create):
2465         * Shared/mac/SandboxExtensionMac.mm:
2466         (WebKit::SandboxExtension::create):
2467         * UIProcess/API/Cocoa/WKProcessGroup.mm:
2468         (getInjectedBundleInitializationUserData):
2469         * UIProcess/WebPreferences.cpp:
2470         (WebKit::WebPreferences::create):
2471         * UIProcess/WebPreferences.h:
2472         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
2473         (WKBundlePageOverlayCreate):
2474         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
2475         (WKBundlePageBannerCreateBannerWithCALayer):
2476         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
2477         (WebKit::InjectedBundleDOMWindowExtension::create):
2478         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h:
2479         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2480         (WebKit::InjectedBundleHitTestResult::create):
2481         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
2482         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
2483         (WebKit::InjectedBundleNavigationAction::create):
2484         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
2485         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
2486         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
2487         (WebKit::InjectedBundlePageContextMenuClient::prepareForImmediateAction):
2488         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
2489         (WebKit::InjectedBundleScriptWorld::create):
2490         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
2491         * WebProcess/Network/NetworkProcessConnection.h:
2492         (WebKit::NetworkProcessConnection::create):
2493         * WebProcess/Network/WebResourceLoader.cpp:
2494         (WebKit::WebResourceLoader::create):
2495         * WebProcess/Network/WebResourceLoader.h:
2496         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
2497         (WebKit::NotificationPermissionRequestManager::create):
2498         * WebProcess/Notifications/NotificationPermissionRequestManager.h:
2499         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2500         (WebKit::NetscapePlugin::create):
2501         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2502         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
2503         (WebKit::NetscapePluginStream::create):
2504         * WebProcess/Plugins/PDF/PDFPlugin.h:
2505         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2506         (WebKit::PDFPlugin::create):
2507         * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
2508         (WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::create):
2509         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
2510         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
2511         (WebKit::PDFPluginChoiceAnnotation::create):
2512         * WebProcess/Plugins/PDF/PDFPluginPasswordField.h:
2513         * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
2514         (WebKit::PDFPluginPasswordField::create):
2515         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
2516         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
2517         (WebKit::PDFPluginTextAnnotation::create):
2518         * WebProcess/Plugins/PluginProcessConnection.h:
2519         (WebKit::PluginProcessConnection::create):
2520         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2521         (WebKit::PluginProcessConnectionManager::create):
2522         * WebProcess/Plugins/PluginProcessConnectionManager.h:
2523         * WebProcess/Plugins/PluginProxy.cpp:
2524         (WebKit::PluginProxy::create):
2525         * WebProcess/Plugins/PluginProxy.h:
2526         * WebProcess/Plugins/PluginView.cpp:
2527         (WebKit::PluginView::URLRequest::create):
2528         (WebKit::PluginView::Stream::create):
2529         (WebKit::PluginView::create):
2530         * WebProcess/Plugins/PluginView.h:
2531         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
2532         (WebKit::RemoteScrollingCoordinator::create):
2533         * WebProcess/Storage/StorageAreaImpl.cpp:
2534         (WebKit::StorageAreaImpl::create):
2535         * WebProcess/Storage/StorageAreaImpl.h:
2536         * WebProcess/Storage/StorageAreaMap.cpp:
2537         (WebKit::StorageAreaMap::create):
2538         * WebProcess/Storage/StorageAreaMap.h:
2539         * WebProcess/WebConnectionToUIProcess.cpp:
2540         (WebKit::WebConnectionToUIProcess::create):
2541         * WebProcess/WebConnectionToUIProcess.h:
2542         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
2543         (WebKit::WebPopupMenu::create):
2544         * WebProcess/WebCoreSupport/WebPopupMenu.h:
2545         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
2546         (WebKit::WebSearchPopupMenu::create):
2547         * WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
2548         * WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h:
2549         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
2550         (WebKit::WebFrameNetworkingContext::create):
2551         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
2552         (WebKit::WebFrameNetworkingContext::create):
2553         * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h:
2554         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::create):
2555         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2556         (WebKit::CoordinatedLayerTreeHost::create):
2557         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
2558         (WebKit::ThreadedCoordinatedLayerTreeHost::create):
2559         * WebProcess/WebPage/EventDispatcher.cpp:
2560         (WebKit::EventDispatcher::create):
2561         * WebProcess/WebPage/EventDispatcher.h:
2562         * WebProcess/WebPage/PageBanner.h:
2563         * WebProcess/WebPage/WebBackForwardListProxy.h:
2564         (WebKit::WebBackForwardListProxy::create):
2565         * WebProcess/WebPage/WebContextMenu.h:
2566         (WebKit::WebContextMenu::create):
2567         * WebProcess/WebPage/WebDocumentLoader.h:
2568         (WebKit::WebDocumentLoader::create):
2569         * WebProcess/WebPage/WebInspector.cpp:
2570         (WebKit::WebInspector::create):
2571         * WebProcess/WebPage/WebInspector.h:
2572         * WebProcess/WebPage/WebInspectorUI.cpp:
2573         (WebKit::WebInspectorUI::create):
2574         * WebProcess/WebPage/WebInspectorUI.h:
2575         * WebProcess/WebPage/WebOpenPanelResultListener.cpp:
2576         (WebKit::WebOpenPanelResultListener::create):
2577         * WebProcess/WebPage/WebOpenPanelResultListener.h:
2578         * WebProcess/WebPage/WebPageOverlay.cpp:
2579         (WebKit::WebPageOverlay::create):
2580         * WebProcess/WebPage/WebPageOverlay.h:
2581         * WebProcess/WebPage/WebUndoStep.cpp:
2582         (WebKit::WebUndoStep::create):
2583         * WebProcess/WebPage/WebUndoStep.h:
2584         * WebProcess/WebPage/mac/PageBannerMac.mm:
2585         (WebKit::PageBanner::create):
2586         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
2587         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
2588         (WebKit::PlatformCAAnimationRemote::create):
2589         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2590         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2591         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
2592         * WebProcess/ios/WebVideoFullscreenManager.h:
2593         * WebProcess/ios/WebVideoFullscreenManager.mm:
2594         (WebKit::WebVideoFullscreenManager::create):
2595
2596 2015-07-08  Anders Carlsson  <andersca@apple.com>
2597
2598         WKSecurityOrigin.h has wrong availability info
2599         https://bugs.webkit.org/show_bug.cgi?id=146761
2600         rdar://problem/21735802
2601
2602         Reviewed by Dan Bernstein.
2603
2604         * UIProcess/API/Cocoa/WKSecurityOrigin.h:
2605
2606 2015-07-08  Andreas Kling  <akling@apple.com>
2607
2608         [iOS] Scrolling is laggy when the keyboard is up and a form element is focused.
2609         <https://webkit.org/b/146735>
2610         <rdar://problem/21151033>
2611
2612         Reviewed by Enrica Casucci.
2613
2614         Every touch on the page causes us to call elementDidFocus(), since we may need to bring
2615         up a keyboard if the node had previously been programmatically focused. This was causing
2616         little lag spikes during scrolling every time you'd put your finger to the screen.
2617
2618         Have WebPage::elementDidFocus() return early if the node already has focus, and we've
2619         started an input session in response to non-programmatic focus already.
2620
2621         * WebProcess/WebPage/WebPage.h:
2622         * WebProcess/WebPage/ios/WebPageIOS.mm:
2623         (WebKit::WebPage::elementDidFocus):
2624         (WebKit::WebPage::elementDidBlur):
2625
2626 2015-07-08  Matt Rajca  <mrajca@apple.com>
2627
2628         Media Session: indicate to clients whether a media session has active media elements
2629         https://bugs.webkit.org/show_bug.cgi?id=146742
2630
2631         Reviewed by Tim Horton.
2632
2633         * UIProcess/API/C/WKPage.cpp:
2634         (WKPageHasMediaSessionWithActiveMediaElements):
2635         * UIProcess/API/C/WKPagePrivate.h:
2636         * UIProcess/WebPageProxy.cpp:
2637         (WebKit::WebPageProxy::hasMediaSessionWithActiveMediaElementsDidChange):
2638         * UIProcess/WebPageProxy.h:
2639         (WebKit::WebPageProxy::hasMediaSessionWithActiveMediaElementsDidChange):
2640         * UIProcess/WebPageProxy.messages.in:
2641         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2642         (WebKit::WebChromeClient::hasMediaSessionWithActiveMediaElementsDidChange):
2643         * WebProcess/WebCoreSupport/WebChromeClient.h:
2644
2645 2015-07-07  Matt Rajca  <mrajca@apple.com>
2646
2647         Media Session: propagate artwork URL with metadata to UI clients
2648         https://bugs.webkit.org/show_bug.cgi?id=146698
2649
2650         Reviewed by Tim Horton.
2651
2652         * Shared/WebMediaSessionMetadata.h:
2653         (WebKit::WebMediaSessionMetadata::artworkURL):
2654         * UIProcess/API/C/WKMediaSessionMetadata.cpp:
2655         (WKMediaSessionMetadataCopyArtworkURL):
2656         * UIProcess/API/C/WKMediaSessionMetadata.h:
2657
2658 2015-07-08  Yongjun Zhang  <yongjun_zhang@apple.com>
2659
2660         Don't allow page scroll when previewing a link or image.
2661         https://bugs.webkit.org/show_bug.cgi?id=146741
2662         rdar://problem/21733053
2663
2664         Reviewed by Beth Dakin.
2665
2666         Don't let preview gesture and scroll panning gesture or zooming gesture recognize at the same time.
2667
2668         * UIProcess/ios/WKContentViewInteraction.mm:
2669         (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
2670
2671 2015-07-08  Tim Horton  <timothy_horton@apple.com>
2672
2673         Snapshots can be misplaced when custom swipe views are offset from the window origin
2674         https://bugs.webkit.org/show_bug.cgi?id=146744
2675         <rdar://problem/20942120>
2676
2677         Reviewed by Dean Jackson.
2678
2679         * UIProcess/mac/ViewGestureControllerMac.mm:
2680         (WebKit::ViewGestureController::beginSwipeGesture):
2681         Keep swipeArea in window coordinates; it was already in window coordinates
2682         when using custom swipe views, but not in the non-custom case.
2683
2684         Convert from window coordinates to parent-of-m_swipeLayer coordinates when
2685         determining m_swipeLayer's frame.
2686
2687 2015-07-07  Andy Estes  <aestes@apple.com>
2688
2689         [iOS][WK2] Ignore synthetic clicks in subframes initiated on a previous page
2690         https://bugs.webkit.org/show_bug.cgi?id=146712
2691
2692         Reviewed by Benjamin Poulain.
2693
2694         r178980 fixed an issue where, if a main frame navigation occurs in response to a touch event, a synthetic click
2695         event could fire on the navigated-to page. This change extends this fix to apply to subframes.
2696
2697         * WebProcess/WebPage/WebFrame.cpp:
2698         (WebKit::WebFrame::WebFrame):
2699         * WebProcess/WebPage/WebFrame.h:
2700         (WebKit::WebFrame::firstLayerTreeTransactionIDAfterDidCommitLoad):
2701         (WebKit::WebFrame::setFirstLayerTreeTransactionIDAfterDidCommitLoad):
2702         * WebProcess/WebPage/WebPage.cpp:
2703         (WebKit::WebPage::didCommitLoad): Stored the next layer tree transaction ID, and called cancelPotentialTapInFrame(), for the committed frame.
2704         * WebProcess/WebPage/WebPage.h:
2705         * WebProcess/WebPage/ios/WebPageIOS.mm:
2706         (WebKit::WebPage::handleTap): Determined the first post-commit layer tree transaction ID from the tap target node's frame.
2707         (WebKit::WebPage::commitPotentialTap): Ditto.
2708         (WebKit::WebPage::cancelPotentialTap): Called cancelPotentialTapInFrame(), passing m_mainFrame.
2709         (WebKit::WebPage::cancelPotentialTapInFrame): Taught to only cancel a potential tap whose target node is a descendant of the given frame.
2710         (WebKit::WebPage::updateVisibleContentRects): Updated to use the main frame's first post-commit layer tree transaction ID.
2711
2712 2015-07-08  Brady Eidson  <beidson@apple.com>
2713
2714         Move PingLoaders to the NetworkingProcess.
2715         <rdar://problem/18860263> and https://bugs.webkit.org/show_bug.cgi?id=146710
2716
2717         Reviewed by Tim Horton.
2718
2719         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2720         (WebKit::NetworkConnectionToWebProcess::loadPing): Create a PingHandle and then return.
2721         * NetworkProcess/NetworkConnectionToWebProcess.h:
2722         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2723         
2724         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2725         (WebKit::WebPlatformStrategies::createPingHandle): If the Network process is enabled,
2726           compile the appropriate load parameters and then message to it.
2727           Otherwise, use the default in-process PingHandle.
2728         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2729
2730 2015-07-08  Beth Dakin  <bdakin@apple.com>
2731
2732         Only support image previews for clients that implement commitPreviewedImageWithURL 
2733         delegate
2734         https://bugs.webkit.org/show_bug.cgi?id=146739
2735         -and corresponding-
2736         rdar://problem/21692929
2737
2738         Reviewed by Tim Horton.
2739
2740         We should only support image previews for clients that implement 
2741         commitPreviewedImageWithURL delegate since there is no default commit action.
2742         * UIProcess/ios/WKContentViewInteraction.mm:
2743         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
2744
2745 2015-07-08  Anders Carlsson  <andersca@apple.com>
2746
2747         Make ApplicationStateTracker be per view instead of being a singleton
2748         https://bugs.webkit.org/show_bug.cgi?id=146737
2749
2750         Reviewed by Andreas Kling.
2751
2752         * UIProcess/ApplicationStateTracker.h:
2753         Update to be per view instead of a singleton.
2754
2755         * UIProcess/ApplicationStateTracker.mm:
2756         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
2757         Change to take a view + selectors.
2758
2759         (WebKit::ApplicationStateTracker::~ApplicationStateTracker):
2760         Invalidate the state monitor and remove the listeners.
2761
2762         (WebKit::ApplicationStateTracker::applicationDidEnterBackground):
2763         Just call the single background method.
2764
2765         (WebKit::ApplicationStateTracker::applicationWillEnterForeground):
2766         Just call the single foreground method.
2767
2768         (WebKit::ApplicationStateTracker::singleton): Deleted.
2769         (WebKit::ApplicationStateTracker::addListener): Deleted.
2770         (WebKit::ApplicationStateTracker::invokeListeners): Deleted.
2771         (WebKit::ApplicationStateTracker::pruneListeners): Deleted.
2772
2773         * UIProcess/ios/WKContentView.mm:
2774         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
2775         Create the ApplicationStateTracker here.
2776
2777         (-[WKContentView isBackground]):
2778         Get the ivar instead of the singleton.
2779
2780 2015-07-08  Beth Dakin  <bdakin@apple.com>
2781
2782         InteractionInformationAtPosition bounds seem wrong on many sites, affects 
2783         apple.com
2784         https://bugs.webkit.org/show_bug.cgi?id=146736
2785         -and corresponding-
2786         rdar://problem/21655549
2787
2788         Reviewed by Tim Horton.
2789
2790         http://trac.webkit.org/changeset/186132/ changed the bounds for 
2791         InteractionInformationAtPosition. The image-related changes are good, but the 
2792         link-related changes feel wrong on many sites. We should revert the change for now 
2793         and just use the absoluteBoundingBoxRect() for non-images.
2794         * WebProcess/WebPage/ios/WebPageIOS.mm:
2795         (WebKit::WebPage::getPositionInformation):
2796
2797 2015-07-08  Beth Dakin  <bdakin@apple.com>
2798
2799         Add actions to image previews
2800         https://bugs.webkit.org/show_bug.cgi?id=146702
2801         -and corresponding-
2802         <rdar://problem/21642654>
2803
2804         Reviewed by Sam Weinig.
2805
2806         Add an array of actions and _WKActivatedElementInfo in order to properly invoke 
2807         the actions.
2808         * UIProcess/WKImagePreviewViewController.h:
2809         * UIProcess/WKImagePreviewViewController.mm:
2810         (-[WKImagePreviewViewController loadView]):
2811         (-[WKImagePreviewViewController initWithCGImage:defaultActions:elementInfo:]):
2812         (_scaleSizeWithinSize):
2813         (-[WKImagePreviewViewController initWithCGImage:]): Deleted.
2814
2815         Re-factor defaultActionsForImageSheet into a stand-alone function so that it can 
2816         be invoked for previews as well as for the action sheet.
2817         * UIProcess/ios/WKActionSheetAssistant.h:
2818         * UIProcess/ios/WKActionSheetAssistant.mm:
2819         (-[WKActionSheetAssistant showImageSheet]):
2820         (-[WKActionSheetAssistant defaultActionsForLinkSheet]):
2821         (-[WKActionSheetAssistant defaultActionsForImageSheet]):
2822         (-[WKActionSheetAssistant showLinkSheet]):
2823
2824         WKImagePreviewViewController initializer now takes the default actions and 
2825         _WKActivatedElementInfo.
2826         * UIProcess/ios/WKContentViewInteraction.mm:
2827         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
2828
2829 2015-07-08  Dan Bernstein  <mitz@apple.com>
2830
2831         <rdar://problem/21669397> [iOS] Keyboard shortcuts that take focus away from the web view end up typing a letter into the newly focused field
2832         https://bugs.webkit.org/show_bug.cgi?id=146732
2833
2834         Reviewed by Sam Weinig.
2835
2836         * UIProcess/ios/WKContentViewInteraction.mm:
2837         (-[WKContentView _interpretKeyEvent:isCharEvent:]): Bail out if we are no longer the first
2838         responder.
2839
2840 2015-07-07  Anders Carlsson  <andersca@apple.com>
2841
2842         Always begin a background task when needed, not just when we go into the background
2843         https://bugs.webkit.org/show_bug.cgi?id=146704
2844
2845         Reviewed by Gavin Barraclough.
2846
2847         The system let background code run for the same amount of time regardless of whether the assertion was grabbed
2848         when the app is in the foreground or being backgrounded, so remove the background/foreground tracking code.
2849
2850         * UIProcess/ios/ProcessAssertionIOS.mm:
2851         (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
2852         (-[WKProcessAssertionBackgroundTaskManager init]): Deleted.
2853         (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground]): Deleted.
2854         (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground]): Deleted.
2855
2856 2015-07-08  Antti Koivisto  <antti@apple.com>
2857
2858         Network Cache: Don't open files in main thread
2859         https://bugs.webkit.org/show_bug.cgi?id=146722
2860
2861         Follow-up.
2862
2863         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2864         (WebKit::NetworkCache::Storage::dispatchReadOperation):
2865
2866             Accessing m_bodyFilter is technically not thread safe so keep it in main thread.
2867
2868 2015-07-08  Antti Koivisto  <antti@apple.com>
2869
2870         Network Cache: Don't open files in main thread
2871         https://bugs.webkit.org/show_bug.cgi?id=146722
2872
2873         Reviewed by Chris Dumez.
2874
2875         While we use open() with O_NONBLOCK profiling indicates that we still may block up to 5ms under the syscall in some case.
2876
2877         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2878         (WebKit::NetworkCache::Storage::dispatchReadOperation):
2879
2880             Dispatch read operation to a concurrent queue.
2881             With this we can also eliminate the separate dispatch() for body blob read.
2882
2883 2015-07-08  Sungmann Cho  <sungmann.cho@navercorp.com>
2884
2885         [Unix] Remove unused local variable from Connection::sendOutgoingMessage().
2886         https://bugs.webkit.org/show_bug.cgi?id=146713
2887
2888         Reviewed by Csaba Osztrogonác.
2889
2890         * Platform/IPC/unix/ConnectionUnix.cpp:
2891         (IPC::Connection::sendOutgoingMessage):
2892
2893 2015-07-07  Tim Horton  <timothy_horton@apple.com>
2894
2895         Occasional null deref in the CA callback in flushLayers()
2896         https://bugs.webkit.org/show_bug.cgi?id=146700
2897         <rdar://problem/21668754>
2898
2899         Reviewed by Simon Fraser.
2900
2901         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2902         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2903         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2904         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2905         Make sure we keep the WebPage alive, and null-check the potentially null
2906         WebCore objects (Page and Frame).
2907
2908 2015-07-06  Matt Rajca  <mrajca@apple.com>
2909
2910         Media Session: propagate metadata changes to UI clients
2911         https://bugs.webkit.org/show_bug.cgi?id=146660
2912
2913         Reviewed by Tim Horton.
2914
2915         * CMakeLists.txt: Added WebMediaSessionMetadata and WKMediaSessionMetadata.
2916         * Shared/API/APIObject.h: Added a media session metadata type.
2917         * Shared/API/c/WKBase.h:
2918         * Shared/WebMediaSessionMetadata.cpp: Added API adapter for WebCore::MediaSessionMetadata.
2919         (WebKit::WebMediaSessionMetadata::create):
2920         (WebKit::WebMediaSessionMetadata::WebMediaSessionMetadata):
2921         (WebKit::WebMediaSessionMetadata::~WebMediaSessionMetadata):
2922         * Shared/WebMediaSessionMetadata.h: Added API adapter for WebCore::MediaSessionMetadata.
2923         (WebKit::WebMediaSessionMetadata::title):
2924         (WebKit::WebMediaSessionMetadata::artist):
2925         (WebKit::WebMediaSessionMetadata::album):
2926         * UIProcess/API/APIUIClient.h: Added 'mediaSessionMetadataDidChange' interface.
2927         (API::UIClient::mediaSessionMetadataDidChange):
2928         * UIProcess/API/C/WKAPICast.h:
2929         * UIProcess/API/C/WKMediaSessionMetadata.cpp: Added C wrapper for WebMediaSessionMetadata.
2930         (WKMediaSessionMetadataGetTypeID):
2931         (WKMediaSessionMetadataCopyTitle):
2932         (WKMediaSessionMetadataCopyArtist):
2933         (WKMediaSessionMetadataCopyAlbum):
2934         * UIProcess/API/C/WKMediaSessionMetadata.h: Added C wrapper for WebMediaSessionMetadata.
2935         * UIProcess/API/C/WKPage.cpp: Forward 'mediaSessionMetadataDidChange' to client.
2936         (WKPageSetPageUIClient):
2937         * UIProcess/API/C/WKPageUIClient.h: Added 'mediaSessionMetadataDidChange' callback.
2938         * UIProcess/WebPageProxy.cpp: Forward 'mediaSessionMetadataDidChange' to UI client.
2939         (WebKit::WebPageProxy::mediaSessionMetadataDidChange):
2940         * WebKit2.xcodeproj/project.pbxproj: Added WebMediaSessionMetadata and WKMediaSessionMetadata.
2941
2942 2015-07-07  Brady Eidson  <beidson@apple.com>
2943
2944         HTTP Auth cached after disabling private browsing/reset.
2945         <rdar://problem/8293055> and https://bugs.webkit.org/show_bug.cgi?id=146654
2946
2947         Reviewed by Tim Horton.
2948
2949         * WebProcess/Plugins/PluginView.cpp:
2950         (WebKit::PluginView::getAuthenticationInfo):
2951
2952 2015-07-07  Anders Carlsson  <andersca@apple.com>
2953
2954         Make sure to remove the download message receiver before freeing it
2955         https://bugs.webkit.org/show_bug.cgi?id=146687
2956
2957         Reviewed by Simon Fraser.
2958
2959         * UIProcess/Downloads/DownloadProxyMap.cpp:
2960         (WebKit::DownloadProxyMap::downloadFinished):
2961
2962 2015-07-07  Chris Dumez  <cdumez@apple.com>
2963
2964         Unreviewed, Fix non-Mac build after r186464.
2965
2966         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
2967         (WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
2968
2969 2015-07-06  Anders Carlsson  <andersca@apple.com>
2970
2971         Make sure to remove message receivers before they are deallocated
2972         https://bugs.webkit.org/show_bug.cgi?id=146666
2973         rdar://problem/21331118
2974
2975         Reviewed by Tim Horton.
2976
2977         Add code so we can assert that there are no message receiver maps pointing to a message receiver
2978         when it's being destroyed. Fix all the assertions by calling removeMessageReceiver in the right places.
2979
2980         * Platform/IPC/MessageReceiver.h:
2981         (IPC::MessageReceiver::~MessageReceiver):
2982         (IPC::MessageReceiver::willBeAddedToMessageReceiverMap):
2983         (IPC::MessageReceiver::willBeRemovedFromMessageReceiverMap):
2984         * Platform/IPC/MessageReceiverMap.cpp:
2985         (IPC::MessageReceiverMap::addMessageReceiver):
2986         (IPC::MessageReceiverMap::removeMessageReceiver):
2987         (IPC::MessageReceiverMap::invalidate):
2988         * Shared/ChildProcess.cpp:
2989         (WebKit::ChildProcess::removeMessageReceiver):
2990         * Shared/ChildProcess.h:
2991         * Shared/ChildProcessProxy.cpp:
2992         (WebKit::ChildProcessProxy::removeMessageReceiver):
2993         * Shared/ChildProcessProxy.h:
2994         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2995         (-[WKBrowsingContextController dealloc]):
2996         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
2997         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
2998         (WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
2999         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
3000         (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
3001         * UIProcess/WebConnectionToWebProcess.cpp:
3002         (WebKit::WebConnectionToWebProcess::invalidate):
3003         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3004         (-[WKWebProcessPlugInBrowserContextController dealloc]):
3005         * WebProcess/WebConnectionToUIProcess.cpp:
3006         (WebKit::WebConnectionToUIProcess::invalidate):
3007
3008 2015-07-06  Brent Fulgham  <bfulgham@apple.com>
3009
3010         Ensure media playback is stopped during page close
3011         https://bugs.webkit.org/show_bug.cgi?id=146554
3012         <rdar://problem/18033944>
3013
3014         Reviewed by Brady Eidson.
3015
3016         * WebProcess/WebProcess.cpp:
3017         (WebKit::WebProcess::didClose): Make sure to clean up any running media sessions when
3018         the process is being shut down.
3019
3020 2015-07-06  Commit Queue  <commit-queue@webkit.org>
3021
3022         Unreviewed, rolling out r186385.
3023         https://bugs.webkit.org/show_bug.cgi?id=146668
3024
3025         crashes 3 webaudio tests in debug builds (Requested by
3026         alexchristensen on #webkit).
3027
3028         Reverted changeset:
3029
3030         "Ensure media playback is stopped during page close"
3031         https://bugs.webkit.org/show_bug.cgi?id=146554
3032         http://trac.webkit.org/changeset/186385
3033
3034 2015-07-06  Brent Fulgham  <bfulgham@apple.com>
3035
3036         Ensure media playback is stopped during page close
3037         https://bugs.webkit.org/show_bug.cgi?id=146554
3038         <rdar://problem/18033944>
3039
3040         Reviewed by Brady Eidson.
3041
3042         * WebProcess/WebProcess.cpp:
3043         (WebKit::WebProcess::didClose): Make sure to clean up any running media sessions when
3044         the process is being shut down.
3045
3046 2015-07-06  Yongjun Zhang  <yongjun_zhang@apple.com>
3047
3048         Allow UIDelegate to customize link actions in preview.
3049         https://bugs.webkit.org/show_bug.cgi?id=146567
3050
3051         Add a new UIDelegate method to pass the defaultActions and elementInfo to client to allow
3052         the client customize the actions based on the element. Also add a new SPI runActionWithElementInfo:
3053         to _WKElementAction and make it aware of the WKActionSheetAssistant that creates it, so that
3054         the client can run the action without knowing WKActionSheetAssistant.
3055
3056         Reviewed by Beth Dakin.
3057
3058         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add delegate method _webView:previewViewControllerForURL:defaultActions:elementInfo:.
3059         * UIProcess/API/Cocoa/_WKElementAction.h: Add a SPI runActionWithElementInfo:.
3060         * UIProcess/API/Cocoa/_WKElementAction.mm:
3061         (-[_WKElementAction _initWithTitle:actionHandler:type:assistant:]): Modified initializer, also initialize _defaultActionSheetAssistant
3062             iVar if the caller provides that.
3063         (+[_WKElementAction elementActionWithTitle:actionHandler:]): Use the new initializer.
3064         (+[_WKElementAction _elementActionWithType:customTitle:assistant:]): A new helper method to create _WKElementAction with assistant.
3065         (+[_WKElementAction _elementActionWithType:assistant:]):
3066         (+[_WKElementAction elementActionWithType:customTitle:]):
3067         (-[_WKElementAction runActionWithElementInfo:]):
3068         * UIProcess/API/Cocoa/_WKElementActionInternal.h:
3069         * UIProcess/ios/WKActionSheetAssistant.h: Add a method defaultActionsForLinkSheet.
3070         * UIProcess/ios/WKActionSheetAssistant.mm:
3071         (-[WKActionSheetAssistant defaultActionsForLinkSheet]): Get default actions for current link that is activated.
3072         (-[WKActionSheetAssistant showLinkSheet]): Use defaultActionsForLinkSheet.
3073         * UIProcess/ios/WKContentViewInteraction.mm:
3074         (-[WKContentView previewViewControllerForPosition:inSourceView:]): Pass defaultActions and elementInfo to UIDelegate when querying
3075             for preview view controller.
3076         (-[WKContentView didDismissPreviewViewController:committing:]):
3077
3078 2015-07-06  Brady Eidson  <beidson@apple.com>
3079
3080         ShouldOpenExternalURLsPolicy should default to "Allow" for WK2 API loads.
3081         <rdar://problem/21640050> and https://bugs.webkit.org/show_bug.cgi?id=146563
3082
3083         Reviewed by Geoff Garen.
3084
3085         * UIProcess/API/Cocoa/WKWebView.mm:
3086         (-[WKWebView loadRequest:]): Move _loadRequest:withOptions: logic back here, just without options.
3087         (-[WKWebView _loadRequest:withOptions:]): This SPI is now unneeded, but must remain inactive.
3088         * UIProcess/WebPageProxy.h:
3089
3090 2015-07-06  Csaba Osztrogonác  <ossy@webkit.org>
3091
3092         URTBF after r186357 to fix non Cocoa platforms.
3093
3094         * NetworkProcess/NetworkProcess.cpp:
3095         (WebKit::NetworkProcess::deleteWebsiteData):
3096
3097 2015-07-06  Antti Koivisto  <antti@apple.com>
3098
3099         With multipart/replaced (e.g. motion JPEG), m_bufferedDataForCache grows unbounded in Networking process
3100         https://bugs.webkit.org/show_bug.cgi?id=146630
3101         <rdar://problem/21677340>
3102
3103         Follow-up.
3104
3105         * NetworkProcess/NetworkResourceLoader.cpp:
3106         (WebKit::NetworkResourceLoader::didReceiveBuffer):
3107
3108             Typo 1014 -> 1024
3109
3110 2015-07-06  Commit Queue  <commit-queue@webkit.org>
3111
3112         Unreviewed, rolling out r185896.
3113         https://bugs.webkit.org/show_bug.cgi?id=146647
3114
3115         Caused by a refcounting error in GTK+; it's actually legal for
3116         the event to be null, just the gi annotations were wrong.
3117         (Requested by mcatanzaro on #webkit).
3118
3119         Reverted changeset:
3120
3121         "[GTK] Crash performing drag-and-drop"
3122         https://bugs.webkit.org/show_bug.cgi?id=146267
3123         http://trac.webkit.org/changeset/185896
3124
3125 2015-07-06  Anders Carlsson  <andersca@apple.com>
3126
3127         Provide API to clear the HSTS cache
3128         https://bugs.webkit.org/show_bug.cgi?id=146565
3129         rdar://problem/20023805
3130
3131         Reviewed by Tim Horton.
3132
3133         * NetworkProcess/NetworkProcess.cpp:
3134         (WebKit::NetworkProcess::deleteWebsiteData):
3135         * NetworkProcess/NetworkProcess.h:
3136         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3137         (WebKit::NetworkProcess::clearHSTSCache):
3138         * Shared/WebsiteData/WebsiteDataTypes.h:
3139         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
3140         (dataTypesToString):
3141         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
3142         (WebKit::toWebsiteDataTypes):
3143         (WebKit::toWKWebsiteDataTypes):
3144         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
3145         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3146         (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
3147
3148 2015-07-06  Antti Koivisto  <antti@apple.com>
3149
3150         With multipart/replaced (e.g. motion JPEG), m_bufferedDataForCache grows unbounded in Networking process
3151         https://bugs.webkit.org/show_bug.cgi?id=146630
3152         <rdar://problem/21677340>
3153
3154         Reviewed by Chris Dumez.
3155
3156         * NetworkProcess/NetworkResourceLoader.cpp:
3157         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
3158
3159             Don't buffer multipart/x-mixed-replace. We never want to cache these.
3160
3161         (WebKit::NetworkResourceLoader::didReceiveBuffer):
3162
3163             Limit the maximum size of the cache buffer to 10MB. This prevents unbounded memory growth if the resource
3164             keeps streaming. It also prevents giant entries from pushing other data out of the cache.
3165
3166         (WebKit::NetworkResourceLoader::didFinishLoading):
3167
3168 2015-07-06  Zan Dobersek  <zdobersek@igalia.com>
3169
3170         [GTK] Guard X11-specific code in webkitWebViewBaseDidRelaunchWebProcess()
3171         https://bugs.webkit.org/show_bug.cgi?id=146627
3172
3173         Reviewed by Carlos Garcia Campos.
3174
3175         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3176         (webkitWebViewBaseDidRelaunchWebProcess):
3177         Guard calls to DrawingAreaImpl::setNativeSurfaceHandleForCompositing()
3178         that pass in an X11 Window ID with the PLATFORM(X11) build guards.
3179
3180 2015-07-05  Chris Dumez  <cdumez@apple.com>
3181
3182         [WK2] Current page's scroll position is lost when transferring sessionState from one view to another
3183         https://bugs.webkit.org/show_bug.cgi?id=146625
3184         <rdar://problem/21585268>
3185
3186         Reviewed by Gavin Barraclough.
3187
3188         The current page's scroll position was lost when transferring the
3189         sessionState from one view to another. This is because we only update
3190         the current WebBackForwardListItem after navigating away.
3191         However, when the client swaps WebViews for navigating, we don't detect
3192         this as navigating away and the current WebBackForwardListItem is not
3193         updated with the current page's state (including the scroll position).
3194         This means that the information is not transferred via the sessionState
3195         and the scroll position (among other things) ends up being lost when
3196         navigating back in the new WebView.
3197
3198         Retrieving the session state is a synchronous API and we want to avoid
3199         doing a synchronous IPC between the UIProcess and the WebProcess to
3200         retrieve the current page's state. Therefore, the approach chosen in
3201         this patch is to detect when the user is done scrolling the main frame
3202         (using a HystererisActivity) and then update the scroll position on the
3203         current HistoryItem. This way, the current WebBackForwardListItem
3204         normally has an up-to-date scroll position for the main frame when the
3205         sessionState is queried by the client.
3206
3207         The solution is not perfect as we don't keep the whole page state
3208         up-to-date for the current WebBackForwardListItem, only the main frame
3209         state. However, the proposed solution is cheap, avoid synchronous IPC
3210         and provides a much better user experience in most cases.
3211
3212         * WebProcess/WebPage/WebPage.cpp:
3213         (WebKit::WebPage::WebPage):
3214         (WebKit::WebPage::pageDidScroll):
3215         (WebKit::WebPage::pageStoppedScrolling):
3216         * WebProcess/WebPage/WebPage.h:
3217
3218 2015-07-05  Timothy Hatcher  <timothy@apple.com>
3219
3220         Crash when closing the web inspector
3221         https://bugs.webkit.org/show_bug.cgi?id=146620
3222
3223         Reviewed by Darin Adler.
3224
3225         * WebProcess/WebPage/WebInspectorUI.cpp:
3226         (WebKit::WebInspectorUI::closeWindow): Null check the connection, like it is
3227         in other places where it is used.
3228
3229 2015-07-04  Chris Dumez  <cdumez@apple.com>
3230
3231         Drop RefPtr::clear() method
3232         https://bugs.webkit.org/show_bug.cgi?id=146556
3233
3234         Reviewed by Brady Eidson.
3235
3236         Drop RefPtr::clear() method in favor of "= nullptr;" pattern.        
3237
3238 2015-07-03  Dan Bernstein  <mitz@apple.com>
3239
3240         [Xcode] Update some build settings as recommended by Xcode 7
3241         https://bugs.webkit.org/show_bug.cgi?id=146597
3242
3243         Reviewed by Sam Weinig.
3244
3245         * Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE and
3246         GCC_NO_COMMON_BLOCKS. Removed GCC_MODEL_TUNING.
3247
3248         * WebKit2.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.
3249
3250 2015-07-03  Carlos Garcia Campos  <cgarcia@igalia.com>
3251
3252         REGRESSION(r186025): [SOUP] NetworkCache gets blocked in traverse since r186025
3253         https://bugs.webkit.org/show_bug.cgi?id=146545
3254
3255         Reviewed by Sergio Villar Senin.
3256
3257         In r186025 the readSync method used when traversing the cache
3258         files was removed in favor of using parallel async reads to speed
3259         up the traverse. The approach used doesn't work for soup, because
3260         the IO operations are async, but run their callbacks in the
3261         current thread. The network cache now runs up to 5 async reads in
3262         the io work queue thread, and waits for them to finish, and those
3263         asycn reads never finish for the soup backend because the thread
3264         is blocked waiting for them. We need to use a different thread to
3265         run those reads.
3266
3267         * NetworkProcess/cache/NetworkCacheIOChannel.h: Add
3268         readSyncInThread private method.
3269         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
3270         (WebKit::NetworkCache::IOChannel::read): When not called in the
3271         main thread, call readSyncInThread() instead.
3272         (WebKit::NetworkCache::IOChannel::readSyncInThread): Run the read
3273         operation synchronously in a different thread, since the current
3274         thread might be blocked waiting for us.
3275
3276 2015-07-02  Przemek Piorkowski  <piorkowskiprzemyslaw@gmail.com>
3277
3278         [EFL] test_ewk2_application_cache_manager has been failed since r185527
3279         https://bugs.webkit.org/show_bug.cgi?id=146016
3280
3281         Reviewed by Gyuyoung Kim.
3282
3283         In order to handle properly WebApplicationCacheManagerProxy implementation which use
3284         WebsiteDataRecord it is necessary to enable PUBLIC_SUFFIX_LIST for EFL.
3285         Implementation of PUBLIC_SUFFIX_LIST already exists for soup so EFL can use it as well.
3286
3287         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
3288         (TEST_F): enable ewk_application_cache_manager as it is passing now.
3289
3290 2015-07-02  Commit Queue  <commit-queue@webkit.org>
3291
3292         Unreviewed, rolling out r186247 and r186250.
3293         https://bugs.webkit.org/show_bug.cgi?id=146572
3294
3295         Broke the build on Mavericks bots (Requested by cdumez on
3296         #webkit).
3297
3298         Reverted changesets:
3299
3300         "Provide API to clear the HSTS cache"
3301         https://bugs.webkit.org/show_bug.cgi?id=146565
3302         http://trac.webkit.org/changeset/186247
3303
3304         "Unreviewed build fix for non-COCOA ports after r186247."
3305         http://trac.webkit.org/changeset/186250
3306
3307 2015-07-02  Jinwoo Song  <jinwoo7.song@samsung.com>
3308
3309         Unreviewed build fix for non-COCOA ports after r186247.
3310
3311         * NetworkProcess/NetworkProcess.cpp:
3312         (WebKit::NetworkProcess::deleteWebsiteData): Add PLATFORM(COCOA) guard.
3313
3314 2015-07-02  Anders Carlsson  <andersca@apple.com>
3315
3316         Provide API to clear the HSTS cache
3317         https://bugs.webkit.org/show_bug.cgi?id=146565
3318         rdar://problem/20023805
3319
3320         Reviewed by Tim Horton.
3321
3322         * NetworkProcess/NetworkProcess.cpp:
3323         (WebKit::NetworkProcess::deleteWebsiteData):
3324         * NetworkProcess/NetworkProcess.h:
3325         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3326         (WebKit::NetworkProcess::clearHSTSCache):
3327         * Shared/WebsiteData/WebsiteDataTypes.h:
3328         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
3329         (dataTypesToString):
3330         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
3331         (WebKit::toWebsiteDataTypes):
3332         (WebKit::toWKWebsiteDataTypes):
3333         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
3334         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3335         (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
3336
3337 2015-07-02  Mark Lam  <mark.lam@apple.com>
3338
3339         Gardening: fix broken 32-bit build..
3340         https://bugs.webkit.org/show_bug.cgi?id=146416
3341
3342         Not reviewed.
3343
3344         * UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:
3345         (API::SerializedScriptValue::deserialize):
3346
3347 2015-07-02  Brent Fulgham  <bfulgham@apple.com>
3348
3349         Correct *another* typo in r186238.
3350
3351         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Fix parameter name scrolView -> scrollView.
3352
3353 2015-07-02  Brent Fulgham  <bfulgham@apple.com>
3354
3355         Correct typo in r186238.
3356
3357         * UIProcess/API/Cocoa/WKWebView.mm:
3358         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
3359
3360 2015-07-02  Brent Fulgham  <bfulgham@apple.com>
3361
3362         Provide delegate SPI for clients to notify WebKit about content inset changes
3363         https://bugs.webkit.org/show_bug.cgi?id=146482
3364         <rdar://problem/21602741>
3365
3366         Reviewed by Darin Adler.
3367
3368         Provide a new SPI for WebKit client applications to use to inform WebKit of planned
3369         adjustments to the edge insets of the view.
3370
3371         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add new optional delegate method.
3372         * UIProcess/API/Cocoa/WKWebView.mm:
3373         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): If the new delegate
3374         method exists, use the specified content insets, rather than the current state of the view.
3375
3376 2015-07-02  Beth Dakin  <bdakin@apple.com>
3377
3378         Allow the UIDelegate to customize an image preview
3379         https://bugs.webkit.org/show_bug.cgi?id=146557
3380         -and corresponding-
3381         rdar://problem/21657424
3382
3383         Reviewed by Tim Horton.
3384
3385         Add imageURL to InteractionInformationAtPosition.
3386         * Shared/InteractionInformationAtPosition.cpp:
3387         (WebKit::InteractionInformationAtPosition::encode):
3388         (WebKit::InteractionInformationAtPosition::decode):
3389         * Shared/InteractionInformationAtPosition.h:
3390
3391         Two new delegate methods.
3392         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3393
3394         Call the delegate methods at the appropriate time.
3395         * UIProcess/ios/WKContentViewInteraction.mm:
3396         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
3397         (-[WKContentView commitPreviewViewController:]):
3398
3399         Include the imageURL in InteractionInformationAtPosition.
3400         * WebProcess/WebPage/ios/WebPageIOS.mm:
3401         (WebKit::WebPage::getPositionInformation):
3402
3403 2015-07-02  Anders Carlsson  <andersca@apple.com>
3404
3405         Instead of requiring ToT UIKIt, check that UI_WEB_TOUCH_EVENT_HAS_IS_POTENTIAL_TAP is defined to 1
3406         https://bugs.webkit.org/show_bug.cgi?id=146558
3407
3408         Reviewed by Beth Dakin.
3409
3410         * Shared/ios/NativeWebTouchEventIOS.mm:
3411         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
3412
3413 2015-07-02  Brady Eidson  <beidson@apple.com>
3414
3415         Remove change I accidentally committed in r186232
3416
3417         * UIProcess/WebsiteData/WebsiteDataStore.h:
3418
3419 2015-07-02  Alex Christensen  <achristensen@webkit.org>
3420
3421         Fix EWS build after r186182.
3422
3423         * WebProcess/WebPage/WebPage.h:
3424         (WebKit::WebPage::userMediaPermissionRequestManager):
3425         Don't export a function defined in a header, or it will generate a weak external symbol.
3426
3427 2015-07-02  Brady Eidson  <beidson@apple.com>
3428
3429         Add preference to disable all http-equiv.
3430         <rdar://problem/9091261> and https://bugs.webkit.org/show_bug.cgi?id=146553
3431
3432         Reviewed by Sam Weinig.
3433
3434         * Shared/WebPreferencesDefinitions.h:
3435         
3436         * UIProcess/API/C/WKPreferences.cpp:
3437         (WKPreferencesSetMetaRefreshEnabled): Still expose this SPI, but have it affect
3438           the "httpEquivEnabled" setting.
3439         (WKPreferencesGetMetaRefreshEnabled): Ditto
3440         (WKPreferencesSetHTTPEquivEnabled):
3441         (WKPreferencesGetHTTPEquivEnabled):
3442         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3443         
3444         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3445         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3446         
3447         * WebProcess/WebPage/WebPage.cpp:
3448         (WebKit::WebPage::updatePreferences):
3449
3450 2015-07-02  Mark Lam  <mark.lam@apple.com>
3451
3452         WKWebView evaluateJavaScript:completionHandler: should reuse its JSContext instance.
3453         https://bugs.webkit.org/show_bug.cgi?id=146416
3454
3455         Reviewed by Anders Carlsson.
3456
3457         The core issue here is that we need to be able to deserialized an
3458         API::SerializedScriptValue instance into an ObjC object graph.  We'll solve this
3459         by introducing a API::SerializedScriptValue::deserialize() functions that does
3460         the job.  The deserialize() function will will use a SharedJSContext to provide
3461         the needed JSContext for doing this work.
3462
3463         Also updated ScriptMessageHandlerDelegate::didPostMessage() to use this new
3464         deserialize() function.
3465
3466         * Shared/API/APISerializedScriptValue.h:
3467         (API::SerializedScriptValue::deserialize):
3468         (API::SerializedScriptValue::internalRepresentation):
3469         - Changed to return a WebCore::SerializedScriptValue*.  This makes it friendlier
3470           to use in the 2 places that need it.
3471
3472         * UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm: Added.