[GTK] UIProcess crashes when using Japanese IM
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2016-10-07  Tomas Popela  <tpopela@redhat.com>
2
3         [GTK] UIProcess crashes when using Japanese IM
4         https://bugs.webkit.org/show_bug.cgi?id=163011
5
6         We have to reference the current GdkEventKey before we try process it
7         as later when the lambda body is reached the event could be already
8         freed.
9
10         Reviewed by Carlos Garcia Campos.
11
12         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
13         (webkitWebViewBaseKeyPressEvent):
14         (webkitWebViewBaseKeyReleaseEvent):
15         * UIProcess/gtk/InputMethodFilter.h:
16         Use non-copyable Function so we can use WTFMove to pass the event to
17         lambda.
18
19 2016-10-06  Michael Catanzaro  <mcatanzaro@igalia.com>
20
21         [GTK] Expose WebKitDOMHTMLInputElement APIs for form autofill
22         https://bugs.webkit.org/show_bug.cgi?id=163082
23
24         Reviewed by Darin Adler.
25
26         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
27         (webkit_dom_html_input_element_get_auto_filled): Added.
28         (webkit_dom_html_input_element_set_auto_filled): Added.
29         (webkit_dom_html_input_element_set_editing_value): Added.
30         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h:
31         * WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt:
32
33 2016-10-06  John Wilander  <wilander@apple.com>
34
35         Update Resource Load Statistics
36         https://bugs.webkit.org/show_bug.cgi?id=162811
37
38         Reviewed by Alex Christensen.
39
40         * UIProcess/WebResourceLoadStatisticsStore.cpp:
41         (WebKit::WebResourceLoadStatisticsStore::hasPrevalentResourceCharacteristics):
42             Switched to vector-based classification.
43         (WebKit::WebResourceLoadStatisticsStore::classifyResource):
44             Simplified logic and moved the split between has and has
45             no user interaction into ResourceLoadStatisticsStore.
46         (WebKit::WebResourceLoadStatisticsStore::clearDataRecords):
47             Added.
48         (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
49             Updated to make use of the new functions.
50         (WebKit::WebResourceLoadStatisticsStore::persistentStoragePath):
51             Removed stray whitespace.
52         (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
53             Removed stray whitespace.
54         (WebKit::WebResourceLoadStatisticsStore::createDecoderFromDisk):
55             Removed stray whitespace.
56         (WebKit::hasPrevalentResourceCharacteristics): Deleted.
57         (WebKit::classifyPrevalentResources): Deleted.
58         * UIProcess/WebResourceLoadStatisticsStore.h:
59             Added member variables for clearing of data records.
60
61 2016-10-06  Youenn Fablet  <youenn@apple.com>
62
63         [WK2] 304 revalidation on the network process does not update the validated response
64         https://bugs.webkit.org/show_bug.cgi?id=162973
65
66         Reviewed by Darin Adler.
67
68         * NetworkProcess/NetworkResourceLoader.cpp: Updating cache entry with the revalidated one.
69
70 2016-10-05  Wenson Hsieh  <wenson_hsieh@apple.com>
71
72         Introduce InputEvent bindings in preparation for the input events spec
73         https://bugs.webkit.org/show_bug.cgi?id=162954
74
75         Reviewed by Ryosuke Niwa.
76
77         Adds a new runtime switch for enabling InputEvents.
78
79         * Shared/WebPreferencesDefinitions.h:
80         * WebProcess/WebPage/WebPage.cpp:
81         (WebKit::WebPage::updatePreferences):
82
83 2016-10-05  Myles C. Maxfield  <mmaxfield@apple.com>
84
85         Put variation fonts work behind a compile-time flag
86         https://bugs.webkit.org/show_bug.cgi?id=162949
87
88         Reviewed by Simon Fraser.
89
90         * Configurations/FeatureDefines.xcconfig:
91
92 2016-10-05  Tim Horton  <timothy_horton@apple.com>
93
94         Fix the build.
95
96         * UIProcess/Cocoa/WebViewImpl.mm:
97
98 2016-10-05  Tim Horton  <timothy_horton@apple.com>
99
100         Avoid automatically re-taking snapshots for back-forward items that were never loaded into the view
101         https://bugs.webkit.org/show_bug.cgi?id=162955
102         <rdar://problem/27659173>
103
104         Reviewed by Simon Fraser.
105
106         Make it possible for clients to control the snapshot for back-forward
107         items that are restored from session state without navigating to them,
108         by ensuring that we won't stomp on the snapshot that they explicitly take,
109         until a load occurs.
110
111         * UIProcess/WebBackForwardList.cpp:
112         (WebKit::WebBackForwardList::addItem):
113         (WebKit::WebBackForwardList::goToItem):
114         * UIProcess/ios/ViewGestureControllerIOS.mm:
115         (WebKit::ViewGestureController::beginSwipeGesture):
116         * UIProcess/mac/ViewGestureControllerMac.mm:
117         (WebKit::ViewGestureController::trackSwipeGesture):
118         Disambiguate explicit API-driven snapshot recording from automatic,
119         navigation-driven snapshot recording.
120
121         * UIProcess/Cocoa/WebViewImpl.mm:
122         (WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
123         Get rid of the version of recordNavigationSnapshot() that doesn't take a
124         back-forward list item, and grab the current item at the one remaining caller.
125         
126         * UIProcess/WebPageProxy.cpp:
127         (WebKit::WebPageProxy::recordAutomaticNavigationSnapshot):
128         (WebKit::WebPageProxy::recordNavigationSnapshot):
129         (WebKit::WebPageProxy::restoreFromSessionState):
130         (WebKit::WebPageProxy::didCommitLoadForFrame):
131         * UIProcess/WebPageProxy.h:
132         Rename m_suppressNavigationSnapshotting to m_suppressAutomaticNavigationSnapshotting,
133         and make it be only about automatic (navigation-driven) snapshots; it won't have
134         any impact on explicit snapshots forced by clients.
135         
136         Set m_suppressAutomaticNavigationSnapshotting unconditionally when restoring
137         from session state, so that we won't start automatically snapshotting until
138         something has loaded in the view.
139
140 2016-10-05  Tim Horton  <timothy_horton@apple.com>
141
142         Make it possible to test ViewSnapshotStore behaviors
143         https://bugs.webkit.org/show_bug.cgi?id=162983
144
145         Reviewed by Simon Fraser.
146
147         Add two pieces of SPI to make it easier to test ViewSnapshotStore:
148
149         - [WKWebView _disableBackForwardSnapshotVolatilityForTesting]
150             This makes it so that we don't make snapshots volatile after we
151             take them, so that they won't get purged while the test is running
152             and cause the test to be flaky.
153
154         - [WKBackForwardListItem _copySnapshotForTesting]
155             This returns a CGImage with the content of the given back-forward
156             item's current snapshot, if there is one.
157
158         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
159         (-[WKBackForwardListItem _copySnapshotForTesting]):
160         * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
161         * UIProcess/API/Cocoa/WKBackForwardListItemPrivate.h: Added.
162         Add WKBackForwardListItem SPI to retrieve the snapshot for a given back-forward list item.
163
164         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
165         * UIProcess/API/Cocoa/WKWebView.mm:
166         (-[WKWebView _disableBackForwardSnapshotVolatilityForTesting]):
167         Add WKWebView SPI to disable volatility of snapshots, for testing purposes.
168         
169         * UIProcess/Cocoa/WebViewImpl.h:
170         * UIProcess/Cocoa/WebViewImpl.mm:
171         (WebKit::WebViewImpl::takeViewSnapshot):
172         Adopt ViewSnapshot::setVolatile instead of reaching into the surface.
173
174         * UIProcess/mac/ViewGestureControllerMac.mm:
175         (WebKit::ViewGestureController::removeSwipeSnapshot):
176         Adopt ViewSnapshot::setVolatile instead of reaching into the surface.
177
178         * UIProcess/mac/ViewSnapshotStore.h:
179         (WebKit::ViewSnapshotStore::setDisableSnapshotVolatilityForTesting):
180         (WebKit::ViewSnapshotStore::disableSnapshotVolatilityForTesting):
181         * UIProcess/mac/ViewSnapshotStore.mm:
182         (WebKit::ViewSnapshotStore::ViewSnapshotStore):
183         (WebKit::ViewSnapshot::setVolatile):
184         (WebKit::ViewSnapshot::asLayerContents):
185         Move all touching of snapshot volatility into the new setVolatile,
186         and short-circuit if the testing-only m_disableSnapshotVolatility bit is set
187
188         (WebKit::ViewSnapshot::asImageForTesting):
189         Make a CGImageRef for the aforementioned WKBackForwardListItem SPI.
190         This is currently not implemented for the iOS Simulator, because we
191         don't have access to the bits of the image in that case.
192
193 2016-10-05  Chris Dumez  <cdumez@apple.com>
194
195         KeyboardEvent.getModifierState() should support "CapsLock" modifier
196         https://bugs.webkit.org/show_bug.cgi?id=162861
197
198         Reviewed by Darin Adler.
199
200         Add support for CapsLock modifier on events.
201
202         * Shared/API/c/WKEvent.h:
203         * Shared/API/c/WKSharedAPICast.h:
204         (WebKit::toAPI):
205         * Shared/WebEventConversion.cpp:
206         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
207         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
208         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
209         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
210         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
211         * Shared/efl/WebEventFactory.cpp:
212         (WebKit::toWebEventModifiers):
213         * Shared/ios/WebIOSEventFactory.mm:
214         (modifiersForEvent):
215         * Shared/mac/WebEventFactory.mm:
216         (WebKit::modifiersForEvent):
217         * UIProcess/API/Cocoa/WKNavigationAction.mm:
218         (toNSEventModifierFlags):
219         * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
220         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
221
222 2016-10-05  Zan Dobersek  <zdobersek@igalia.com>
223
224         Rename ENABLE_ENCRYPTED_MEDIA_V2 to ENABLE_LEGACY_ENCRYPTED_MEDIA
225         https://bugs.webkit.org/show_bug.cgi?id=162903
226
227         Reviewed by Alex Christensen.
228
229         Rename build guards for the remaining implementation of the legacy EME API
230         to ENABLE_LEGACY_ENCRYPTED_MEDIA. This will allow for the future implementation
231         of the near-finished API to be guarded with the simple ENABLE_ENCRYPTED_MEDIA guards.
232
233         * Configurations/FeatureDefines.xcconfig:
234         * WebProcess/WebPage/WebPage.cpp:
235         (WebKit::m_userInterfaceLayoutDirection):
236         * WebProcess/WebProcess.cpp:
237         (WebKit::m_resourceLoadStatisticsStorage):
238
239 2016-10-05  Daniel Bates  <dabates@apple.com>
240
241         [WK2][NetworkSession] Ping requests should follow redirects if applicable
242         https://bugs.webkit.org/show_bug.cgi?id=162580
243         <rdar://problem/28631274>
244
245         Reviewed by Alex Christensen.
246
247         Implement support for following redirects, if applicable, of a ping request when using the
248         Network Session (ENABLE(NETWORK_SESSION)) code path in WebKit2. For ping requests that are
249         in response to hyperlink auditing (e.g. <a ping>) we should follow redirect responses.
250         For Content Security Policy and XSS Auditor violation reports we should not follow redirect
251         responses.
252
253         Currently we always ignore redirects for ping requests that are sent using the Network Session
254         code path in WebKit2. This behavior disagrees with the behavior described in section
255         "Hyperlink auditing" of the HTML standard, <https://html.spec.whatwg.org/multipage/semantics.html#hyperlink-auditing> (27 September 2016),
256         as well as the behavior in Legacy WebKit and WebKit2 with Network Session disabled. We should
257         follow redirects for ping requests initiated as part of hyperlink auditing to more closely
258         conform to the HTML standard and match the behavior in Legacy WebKit and WebKit2 with Network
259         Session disabled.
260
261         * NetworkProcess/PingLoad.h:
262
263 2016-10-05  Daniel Bates  <dabates@apple.com>
264
265         Do not follow redirects when sending violation report
266         https://bugs.webkit.org/show_bug.cgi?id=162520
267         <rdar://problem/27957639>
268
269         Reviewed by Alex Christensen.
270
271         Update the non-Network Session WebKit2 implementation to follow redirect responses for a ping
272         request, if applicable. I did not update the Network Session implementation at this time. I
273         will fix it in <https://bugs.webkit.org/show_bug.cgi?id=162580>.
274
275         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
276         (WebKit::NetworkConnectionToWebProcess::loadPing): Tell PingHandle whether to follow redirects.
277         * NetworkProcess/NetworkLoadParameters.h:
278         * NetworkProcess/NetworkResourceLoadParameters.cpp:
279         (WebKit::NetworkResourceLoadParameters::encode): Encode NetworkResourceLoadParameters::shouldFollowRedirects.
280         (WebKit::NetworkResourceLoadParameters::decode): Decode NetworkResourceLoadParameters::shouldFollowRedirects.
281         * NetworkProcess/PingLoad.h: Added FIXME comment to implement support for following redirects,
282         if applicable (for hyperlink auditing). See <https://bugs.webkit.org/show_bug.cgi?id=162580>
283         for more details.
284         * WebProcess/Network/WebLoaderStrategy.cpp:
285         (WebKit::WebLoaderStrategy::createPingHandle): Modified to take a boolean whether to follow
286         redirects responses and set NetworkResourceLoadParameters::shouldFollowRedirects as appropriate.
287         * WebProcess/Network/WebLoaderStrategy.h:
288
289 2016-10-05  Carlos Garcia Campos  <cgarcia@igalia.com>
290
291         [SOUP] Move global TLS errors handling from ResourceHandle to SoupNetworkSession
292         https://bugs.webkit.org/show_bug.cgi?id=162910
293
294         Reviewed by Alex Christensen.
295
296         Use SoupNetworkSession instead of ResourceHandle.
297
298         * NetworkProcess/soup/NetworkProcessSoup.cpp:
299         (WebKit::NetworkProcess::setIgnoreTLSErrors):
300         (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
301
302 2016-10-05  Carlos Garcia Campos  <cgarcia@igalia.com>
303
304         Unreviewed. Fix GTK+ build with USE_REDIRECTED_XCOMPOSITE_WINDOW disabled.
305
306         * UIProcess/AcceleratedDrawingAreaProxy.cpp:
307         (WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing):
308
309 2016-10-04  Chris Dumez  <cdumez@apple.com>
310
311         Implement KeyboardEvent.code from the UI Event spec
312         https://bugs.webkit.org/show_bug.cgi?id=149584
313
314         Reviewed by Darin Adler.
315
316         Add support for Keyboard.code attribute:
317         - https://w3c.github.io/uievents/#dom-keyboardevent-code
318         - https://w3c.github.io/uievents-code/
319
320         * Shared/WebEvent.h:
321         (WebKit::WebKeyboardEvent::code):
322         * Shared/WebEventConversion.cpp:
323         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
324         * Shared/WebKeyboardEvent.cpp:
325         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
326         (WebKit::WebKeyboardEvent::encode):
327         (WebKit::WebKeyboardEvent::decode):
328         * Shared/mac/WebEventFactory.mm:
329         (WebKit::WebEventFactory::createWebKeyboardEvent):
330
331 2016-10-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
332
333         The dragged image should be the current frame only of the animated image
334         https://bugs.webkit.org/show_bug.cgi?id=162109
335
336         Reviewed by Tim Horton.
337
338         * UIProcess/Cocoa/WebViewImpl.mm:
339         (WebKit::WebViewImpl::provideDataForPasteboard): Call the Image function with its new name.
340
341 2016-10-04  Ryosuke Niwa  <rniwa@webkit.org>
342
343         Revert a change erroneously committed in r206795.
344
345         * WebProcess/WebPage/WebPage.cpp:
346         (WebKit::WebPage::updatePreferences):
347
348 2016-10-04  Anders Carlsson  <andersca@apple.com>
349
350         Properly kill web processes in the launching state
351         https://bugs.webkit.org/show_bug.cgi?id=162938
352
353         Reviewed by Tim Horton.
354
355         * UIProcess/Launcher/ProcessLauncher.h:
356         Add m_xpcConnection member.
357
358         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
359         (WebKit::ProcessLauncher::launchProcess):
360         Store the XPC connection in the m_xpcConnection member variable.
361         In the reply handler, handle m_xpcConnection being null.
362
363         (WebKit::ProcessLauncher::platformInvalidate):
364         Cancel and kill the connection.
365
366         * UIProcess/WebPageProxy.cpp:
367         (WebKit::WebPageProxy::terminateProcess):
368         Get rid of an assertion.
369
370         * UIProcess/WebProcessProxy.cpp:
371         (WebKit::WebProcessProxy::requestTermination):
372         Handle the launching state.
373
374 2016-10-04  Tim Horton  <timothy_horton@apple.com>
375
376         Fix the build.
377
378         * Shared/WebBackForwardListItem.cpp:
379         (WebKit::WebBackForwardListItem::WebBackForwardListItem):
380         (WebKit::WebBackForwardListItem::highestUsedItemID):
381
382 2016-10-04  Tim Horton  <timothy_horton@apple.com>
383
384         Fix a typo in WebBackForwardListItem (highed->highest)
385         https://bugs.webkit.org/show_bug.cgi?id=162935
386
387         Reviewed by Anders Carlsson.
388
389         * Shared/WebBackForwardListItem.cpp:
390         (WebKit::WebBackForwardListItem::highestUsedItemID):
391         (WebKit::WebBackForwardListItem::highedUsedItemID): Deleted.
392         * Shared/WebBackForwardListItem.h:
393         * UIProcess/WebPageProxy.cpp:
394         (WebKit::WebPageProxy::creationParameters):
395
396 2016-10-04  Yusuke Suzuki  <utatane.tea@gmail.com>
397
398         [DOMJIT] Introduce DOMJIT::GetterSetter to tell JIT information
399         https://bugs.webkit.org/show_bug.cgi?id=162916
400
401         Reviewed by Filip Pizlo.
402
403         * CMakeLists.txt:
404
405 2016-10-04  Carlos Garcia Campos  <cgarcia@igalia.com>
406
407         [SOUP] Remove SSLPolicyFlags from SoupNetworkSession
408         https://bugs.webkit.org/show_bug.cgi?id=162906
409
410         Reviewed by Michael Catanzaro.
411
412         * NetworkProcess/soup/NetworkProcessMainSoup.cpp:
413         (WebKit::NetworkProcessMainUnix):
414
415 2016-10-04  Wenson Hsieh  <wenson_hsieh@apple.com>
416
417         Media controls are displayed in the incorrect state momentarily after switching between tabs playing media
418         https://bugs.webkit.org/show_bug.cgi?id=162766
419         <rdar://problem/28533523>
420
421         Reviewed by Jer Noble.
422
423         Plumbs some more Now Playing information from the web process to the UI process for testing purposes. See
424         WebCore ChangeLog for more details.
425
426         * UIProcess/API/Cocoa/WKWebView.mm:
427         (-[WKWebView _handleActiveNowPlayingSessionInfoResponse:title:duration:elapsedTime:]):
428         (-[WKWebView _handleActiveNowPlayingSessionInfoResponse:]): Deleted.
429         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
430         * UIProcess/PageClient.h:
431         * UIProcess/WebPageProxy.cpp:
432         (WebKit::WebPageProxy::handleActiveNowPlayingSessionInfoResponse):
433         * UIProcess/WebPageProxy.h:
434         * UIProcess/WebPageProxy.messages.in:
435         * UIProcess/mac/PageClientImpl.h:
436         * UIProcess/mac/PageClientImpl.mm:
437         (WebKit::PageClientImpl::handleActiveNowPlayingSessionInfoResponse):
438         * WebProcess/WebPage/mac/WebPageMac.mm:
439         (WebKit::WebPage::requestActiveNowPlayingSessionInfo):
440
441 2016-10-04  Zan Dobersek  <zdobersek@igalia.com>
442
443         Unreviewed GTK+ build fix.
444
445         * UIProcess/API/C/WKPage.cpp:
446         (WKPageSetPageNavigationClient): Guard the call to getDefaultWebCryptoMasterKey()
447         with ENABLE(SUBTLE_CRYPTO), since the same guard is used for the definition. Fixes
448         GTK+ production builds where the feature is disabled.
449
450 2016-10-03  Keith Rollin  <krollin@apple.com>
451
452         More logging to diagnose "WebKit encountered an internal error" messages
453         https://bugs.webkit.org/show_bug.cgi?id=162754
454
455         Reviewed by Antti Koivisto.
456
457         Add more logging around calls to internalError, as well as some
458         low-level logging around SharedMemory, and mach_vm_map in particular.
459
460         * NetworkProcess/NetworkResourceLoader.cpp:
461         (WebKit::NetworkResourceLoader::startNetworkLoad):
462         * Platform/Logging.h:
463         * Platform/mac/SharedMemoryMac.cpp:
464         (WebKit::SharedMemory::allocate):
465         (WebKit::makeMemoryEntry):
466         (WebKit::SharedMemory::map):
467         (WebKit::SharedMemory::~SharedMemory):
468         * WebProcess/Network/WebLoaderStrategy.cpp:
469         (WebKit::WebLoaderStrategy::networkProcessCrashed):
470         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
471         * WebProcess/Network/WebResourceLoader.cpp:
472         (WebKit::WebResourceLoader::didReceiveResource):
473
474 2016-10-03  Ryan Haddad  <ryanhaddad@apple.com>
475
476         Unreviewed, rolling out r206754.
477
478         This change broke the El Capitan and Yosemite debug builds.
479
480         Reverted changeset:
481
482         "More logging to diagnose "WebKit encountered an internal
483         error" messages"
484         https://bugs.webkit.org/show_bug.cgi?id=162754
485         http://trac.webkit.org/changeset/206754
486
487 2016-10-03  Keith Rollin  <krollin@apple.com>
488
489         More logging to diagnose "WebKit encountered an internal error" messages
490         https://bugs.webkit.org/show_bug.cgi?id=162754
491
492         Reviewed by Antti Koivisto.
493
494         Add more logging around calls to internalError, as well as some
495         low-level logging around SharedMemory, and mach_vm_map in particular.
496
497         * NetworkProcess/NetworkResourceLoader.cpp:
498         (WebKit::NetworkResourceLoader::startNetworkLoad):
499         * Platform/Logging.h:
500         * Platform/mac/SharedMemoryMac.cpp:
501         (WebKit::SharedMemory::allocate):
502         (WebKit::makeMemoryEntry):
503         (WebKit::SharedMemory::map):
504         (WebKit::SharedMemory::~SharedMemory):
505         * WebProcess/Network/WebLoaderStrategy.cpp:
506         (WebKit::WebLoaderStrategy::networkProcessCrashed):
507         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
508         * WebProcess/Network/WebResourceLoader.cpp:
509         (WebKit::WebResourceLoader::didReceiveResource):
510
511 2016-10-03  Chris Dumez  <cdumez@apple.com>
512
513         Add support for KeyboardEvent.key attribute
514         https://bugs.webkit.org/show_bug.cgi?id=36267
515
516         Reviewed by Darin Adler.
517
518         Add support for KeyboardEvent.key attribute.
519
520         * Shared/WebEvent.h:
521         (WebKit::WebKeyboardEvent::key):
522         (WebKit::WebKeyboardEvent::unmodifiedText): Deleted.
523         * Shared/WebEventConversion.cpp:
524         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
525         * Shared/WebKeyboardEvent.cpp:
526         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
527         (WebKit::WebKeyboardEvent::encode):
528         (WebKit::WebKeyboardEvent::decode):
529         * Shared/mac/WebEventFactory.mm:
530         (WebKit::WebEventFactory::createWebKeyboardEvent):
531
532 2016-10-03  Chris Dumez  <cdumez@apple.com>
533
534         Add support for KeyboardEvent.key attribute
535         https://bugs.webkit.org/show_bug.cgi?id=36267
536
537         Reviewed by Darin Adler.
538
539         Add support for KeyboardEvent.key attribute.
540
541         * Shared/WebEvent.h:
542         (WebKit::WebKeyboardEvent::key):
543         (WebKit::WebKeyboardEvent::unmodifiedText): Deleted.
544         * Shared/WebEventConversion.cpp:
545         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
546         * Shared/WebKeyboardEvent.cpp:
547         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
548         (WebKit::WebKeyboardEvent::encode):
549         (WebKit::WebKeyboardEvent::decode):
550         * Shared/mac/WebEventFactory.mm:
551         (WebKit::WebEventFactory::createWebKeyboardEvent):
552
553 2016-10-03  Carlos Garcia Campos  <cgarcia@igalia.com>
554
555         [SOUP] Cleanup persistent credential storage code
556         https://bugs.webkit.org/show_bug.cgi?id=162777
557
558         Reviewed by Alex Christensen.
559
560         Use USE(LIBSECRET) instead of ENABLE(CREDENTIAL_STORAGE).
561
562         * UIProcess/API/gtk/WebKitAuthenticationRequest.cpp:
563         (webkit_authentication_request_can_save_credentials):
564
565 2016-10-02  Ryan Haddad  <ryanhaddad@apple.com>
566
567         Unreviewed, rolling out r206683.
568
569         This change caused API test WebKit2.FindMatches to fail on
570         Mac.
571
572         Reverted changeset:
573
574         "The dragged image should be the current frame only of the
575         animated image"
576         https://bugs.webkit.org/show_bug.cgi?id=162109
577         http://trac.webkit.org/changeset/206683
578
579 2016-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
580
581         Follow-up patch after r206701
582         https://bugs.webkit.org/show_bug.cgi?id=162818
583
584         Unreviewed.
585
586         I missed one place required to enable an experimental feature by default.
587
588         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
589         (WebKit::registerUserDefaultsIfNeeded):
590
591 2016-09-30  Dan Bernstein  <mitz@apple.com>
592
593         [iOS] Editing menu omits the Share command if the selected text is longer than 200 characters
594         https://bugs.webkit.org/show_bug.cgi?id=162821
595         <rdar://problem/28409828>
596
597         Reviewed by Tim Horton.
598
599         * UIProcess/ios/WKContentViewInteraction.mm:
600         (-[WKContentView canPerformAction:withSender:]): Changed to return YES for the _share:
601           action even if the selection is longer than 200 characters. While Define should not have
602           been available for longer selections, Share does not have such a limitation.
603
604 2016-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
605
606         Turn variation fonts on by default
607         https://bugs.webkit.org/show_bug.cgi?id=162818
608
609         Reviewed by Simon Fraser.
610
611         * Shared/WebPreferencesDefinitions.h:
612
613 2016-09-30  Brady Eidson  <beidson@apple.com>
614
615         REGRESSION (Safari 10 combined with WK changes): Unable to store WebCrypto keys in IndexedDB database.
616         <rdar://problem/28334440> and https://bugs.webkit.org/show_bug.cgi?id=162554
617
618         Reviewed by Alexey Proskuryakov.
619
620         Safari 10 has a WKPageNavigation client but does not implement the "copyWebCryptoMasterKey" callback.
621
622         WebKit just fails in this case, instead of falling back to "getDefaultWebCryptoMasterKey".
623         It should fall back.
624
625         Additionally there's a WKContextClient callback to get the crypto key, also, but it is completely unused.
626         So it should be pulled.
627
628         * UIProcess/API/APILoaderClient.h:
629         (API::LoaderClient::webCryptoMasterKey): Deleted.
630         * UIProcess/API/C/WKContext.h:
631
632         * UIProcess/API/C/WKPage.cpp:
633         (WKPageSetPageLoaderClient):
634         (WKPageSetPageNavigationClient): If the client doesn't implement this method, fallback to getDefaultWebCryptoMasterKey.
635
636         * UIProcess/Cocoa/NavigationState.mm:
637         (WebKit::NavigationState::NavigationClient::webCryptoMasterKey): If the client doesn't implement this method,
638           fallback to getDefaultWebCryptoMasterKey.
639
640         * UIProcess/WebContextClient.cpp:
641         (WebKit::WebContextClient::copyWebCryptoMasterKey): Deleted.
642         * UIProcess/WebContextClient.h:
643
644         * UIProcess/WebPageProxy.cpp:
645         (WebKit::WebPageProxy::wrapCryptoKey): Only ask the NavigationClient before falling back. Don't ask the loader client.
646         (WebKit::WebPageProxy::unwrapCryptoKey): Ditto.
647
648 2016-09-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
649
650         The dragged image should be the current frame only of the animated image
651         https://bugs.webkit.org/show_bug.cgi?id=162109
652
653         Reviewed by Tim Horton.
654
655         * UIProcess/Cocoa/WebViewImpl.mm:
656         (WebKit::WebViewImpl::provideDataForPasteboard): Call the Image function with its new name.
657
658 2016-09-30  Anders Carlsson  <andersca@apple.com>
659
660         Second time going into fullscreen using silverlight, will hide the menu bar and dock for Safari
661         https://bugs.webkit.org/show_bug.cgi?id=162805
662         rdar://problem/28208495
663
664         Reviewed by Dan Bernstein.
665
666         Turns out that the WindowRef wrappers for full screen NSWindows can end up in the m_windows HashSet,
667         and never go away. 
668         
669         Fix this by storing the canonical CGWindowIDs in the hash map instead.
670
671         * PluginProcess/mac/PluginProcessMac.mm:
672         (WebKit::cgWindowID):
673         (WebKit::windowCoversAnyScreen):
674         (WebKit::FullscreenWindowTracker::windowShown):
675         (WebKit::FullscreenWindowTracker::windowHidden):
676
677 2016-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
678
679         Create runtime flag for variation font work
680         https://bugs.webkit.org/show_bug.cgi?id=162780
681
682         Reviewed by Alex Christensen.
683
684         * Shared/WebPreferencesDefinitions.h:
685         * WebProcess/WebPage/WebPage.cpp:
686         (WebKit::WebPage::updatePreferences):
687
688 2016-09-30  Chris Dumez  <cdumez@apple.com>
689
690         [WK2][iOS] Add radiusX / radiusY / rotationAngle to WebPlatformTouchPoint
691         https://bugs.webkit.org/show_bug.cgi?id=162787
692         <rdar://problem/28554292>
693
694         Reviewed by Benjamin Poulain.
695
696         Add radiusX / radiusY / rotationAngle to WebPlatformTouchPoint.
697
698         * Platform/spi/ios/UIKitSPI.h:
699         * Shared/WebEvent.h:
700         (WebKit::WebPlatformTouchPoint::setRadiusX):
701         (WebKit::WebPlatformTouchPoint::radiusX):
702         (WebKit::WebPlatformTouchPoint::setRadiusY):
703         (WebKit::WebPlatformTouchPoint::radiusY):
704         (WebKit::WebPlatformTouchPoint::setRotationAngle):
705         (WebKit::WebPlatformTouchPoint::rotationAngle):
706         * Shared/WebEventConversion.cpp:
707         (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
708         * Shared/ios/NativeWebTouchEventIOS.mm:
709         (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
710         * Shared/ios/WebPlatformTouchPointIOS.cpp:
711         (WebKit::WebPlatformTouchPoint::encode):
712         (WebKit::WebPlatformTouchPoint::decode):
713
714 2016-09-30  Megan Gardner  <megan_gardner@apple.com>
715
716         Make it possible to test web-related user-interface features
717         https://bugs.webkit.org/show_bug.cgi?id=162657
718
719         Reviewed by Simon Fraser.
720
721         Added the ability to pull the strings from an Action Sheet and pass them to
722         test scripts to make sure we are giving the correct available actions for
723         the item we are interacting with.
724         Added a test for long press on an image, and used the sheet scraping functionality
725         to make sure that the correct actions were being displayed.
726         Test for previous patch, Changeset 205915; Bug 161761
727
728         * UIProcess/API/Cocoa/WKWebView.mm:
729         (-[WKWebView _contentsOfUserInterfaceItem:]):
730         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
731         * UIProcess/ios/WKActionSheetAssistant.h:
732         * UIProcess/ios/WKActionSheetAssistant.mm:
733         (-[WKActionSheetAssistant currentAvailableActionStrings]):
734         * UIProcess/ios/WKContentViewInteraction.h:
735         * UIProcess/ios/WKContentViewInteraction.mm:
736         (-[WKContentView _contentsOfUserInterfaceItem:]):
737
738 2016-09-27  Anders Carlsson  <andersca@apple.com>
739
740         Remove a couple of unused members from PlatformKeyboardEvent
741         https://bugs.webkit.org/show_bug.cgi?id=162641
742
743         Reviewed by Tim Horton.
744
745         * Shared/WebEventConversion.cpp:
746         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
747
748 2016-09-29  Nan Wang  <n_wang@apple.com>
749
750         AX: iOS: Tapping <input> in Safari zooms in a bit when page has max scale = 1
751         https://bugs.webkit.org/show_bug.cgi?id=162471
752
753         Reviewed by Simon Fraser.
754
755         * Shared/AssistedNodeInformation.cpp:
756         (WebKit::AssistedNodeInformation::encode):
757         (WebKit::AssistedNodeInformation::decode):
758         * Shared/AssistedNodeInformation.h:
759         * UIProcess/ios/WKContentViewInteraction.mm:
760         (-[WKContentView _displayFormNodeInputView]):
761         * WebProcess/WebPage/WebPage.h:
762         * WebProcess/WebPage/ios/WebPageIOS.mm:
763         (WebKit::WebPage::maximumPageScaleFactorIgnoringAlwaysScalable):
764         (WebKit::WebPage::getAssistedNodeInformation):
765
766 2016-09-29  Daniel Bates  <dabates@apple.com>
767
768         Mark NetworkLoad as final
769         https://bugs.webkit.org/show_bug.cgi?id=162681
770
771         Reviewed by Alex Christensen.
772
773         Mark class NetworkLoad as final as we do not have any derived classes at the moment and it
774         is unclear if it would make sense to subclass it. We can always unmark the class if it turns
775         out that it makes sense to subclass it.
776
777         * NetworkProcess/NetworkLoad.h:
778
779 2016-09-29  Sam Weinig  <sam@webkit.org>
780
781         Allow overriding some NSURLSessionConfiguration properties on a per-NetworkProcess basis
782         <rdar://problem/27648683>
783         https://bugs.webkit.org/show_bug.cgi?id=162735
784
785         Reviewed by Dan Bernstein.
786
787         Add SPI for overriding the following NSURLSessionConfigurations properties:
788             - _sourceApplicationBundleIdentifier
789             - _sourceApplicationSecondaryIdentifier
790             - _CTDataConnectionServiceType
791
792         * NetworkProcess/NetworkProcess.cpp:
793         (WebKit::NetworkProcess::initializeNetworkProcess):
794         * NetworkProcess/NetworkProcessCreationParameters.cpp:
795         (WebKit::NetworkProcessCreationParameters::encode):
796         (WebKit::NetworkProcessCreationParameters::decode):
797         * NetworkProcess/NetworkProcessCreationParameters.h:
798         * NetworkProcess/NetworkSession.h:
799         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
800         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
801         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
802         (WebKit::globalSourceApplicationBundleIdentifier):
803         (WebKit::globalSourceApplicationSecondaryIdentifier):
804         (WebKit::globalCTDataConnectionServiceType):
805         (WebKit::NetworkSession::setCustomProtocolManager):
806         (WebKit::NetworkSession::setSourceApplicationAuditTokenData):
807         (WebKit::NetworkSession::setSourceApplicationBundleIdentifier):
808         (WebKit::NetworkSession::setSourceApplicationSecondaryIdentifier):
809         (WebKit::NetworkSession::setCTDataConnectionServiceType):
810         (WebKit::NetworkSession::NetworkSession):
811         * UIProcess/API/APIProcessPoolConfiguration.cpp:
812         (API::ProcessPoolConfiguration::copy):
813         * UIProcess/API/APIProcessPoolConfiguration.h:
814         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
815         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
816         (-[_WKProcessPoolConfiguration sourceApplicationBundleIdentifier]):
817         (-[_WKProcessPoolConfiguration setSourceApplicationBundleIdentifier:]):
818         (-[_WKProcessPoolConfiguration sourceApplicationSecondaryIdentifier]):
819         (-[_WKProcessPoolConfiguration setSourceApplicationSecondaryIdentifier:]):
820         (-[_WKProcessPoolConfiguration CTDataConnectionServiceType]):
821         (-[_WKProcessPoolConfiguration setCTDataConnectionServiceType:]):
822         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
823         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
824         * WebProcess/WebProcess.cpp:
825         (WebKit::WebProcess::initializeWebProcess):
826         * WebProcess/cocoa/WebProcessCocoa.mm:
827         (WebKit::WebProcess::platformInitializeWebProcess):
828
829 2016-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>
830
831         NetworkSession: HTTP authentication doesn't work if PROTECTION_SPACE_AUTH_CALLBACK is not enabled
832         https://bugs.webkit.org/show_bug.cgi?id=162724
833
834         Reviewed by Alex Christensen.
835
836         NetworkLoad always expects continueCanAuthenticateAgainstProtectionSpace() to be called to complete the
837         authentication challenge, which is only defined when PROTECTION_SPACE_AUTH_CALLBACK is enabled.
838         I've added missing #ifdefs for PROTECTION_SPACE_AUTH_CALLBACK.
839
840         * NetworkProcess/Downloads/DownloadManager.cpp:
841         (WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
842         * NetworkProcess/Downloads/DownloadManager.h:
843         * NetworkProcess/Downloads/PendingDownload.cpp:
844         (WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace):
845         * NetworkProcess/Downloads/PendingDownload.h:
846         * NetworkProcess/NetworkLoad.cpp:
847         (WebKit::NetworkLoad::~NetworkLoad):
848         (WebKit::NetworkLoad::didReceiveChallenge): Call completeAuthenticationChallenge() instead of
849         canAuthenticateAgainstProtectionSpaceAsync() when PROTECTION_SPACE_AUTH_CALLBACK is not enabled.
850         (WebKit::NetworkLoad::completeAuthenticationChallenge): Moved common code to complete the authentication
851         challenge from continueCanAuthenticateAgainstProtectionSpace().
852         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace): Call completeAuthenticationChallenge().
853         (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
854         * NetworkProcess/NetworkLoad.h:
855         * NetworkProcess/NetworkLoadClient.h:
856         * NetworkProcess/NetworkProcess.cpp:
857         (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpaceDownload):
858         * NetworkProcess/NetworkProcess.h:
859         * NetworkProcess/NetworkProcess.messages.in:
860         * NetworkProcess/NetworkResourceLoader.cpp:
861         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
862         (WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
863         * NetworkProcess/NetworkResourceLoader.h:
864         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
865         * Shared/Authentication/AuthenticationManager.h:
866         * UIProcess/Downloads/DownloadProxy.cpp:
867         (WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace):
868         * UIProcess/Downloads/DownloadProxy.h:
869         * UIProcess/Downloads/DownloadProxy.messages.in:
870
871 2016-09-28  Joseph Pecoraro  <pecoraro@apple.com>
872
873         WKSharedAPICast should not warn about acceptable custom context menu tag values
874         https://bugs.webkit.org/show_bug.cgi?id=162597
875         <rdar://problem/28487627>
876
877         Reviewed by Tim Horton.
878
879         * Shared/API/c/WKSharedAPICast.h:
880         (WebKit::toAPI):
881         (WebKit::toImpl):
882         Don't log an error when casting ContextMenu types if it is within
883         the Custom ContextMenu tag range.
884
885 2016-09-27  Wenson Hsieh  <wenson_hsieh@apple.com>
886
887         Adopt MediaRemote SPI to achieve desired Now Playing behavior
888         https://bugs.webkit.org/show_bug.cgi?id=162658
889         <rdar://problem/28499358>
890
891         Reviewed by Jer Noble.
892
893         Plumbs Now Playing session information (for now, this is just a flag indicating whether or not there is an
894         active session) across from the web process to the UI process for testing in the form of asynchronous request/
895         handle-response messages on the WebPage and its proxy in the UI process.
896
897         * UIProcess/API/Cocoa/WKWebView.mm:
898         (-[WKWebView _requestActiveNowPlayingSessionInfo]):
899         (-[WKWebView _handleActiveNowPlayingSessionInfoResponse:]):
900         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
901         * UIProcess/PageClient.h:
902         * UIProcess/WebPageProxy.cpp:
903         (WebKit::WebPageProxy::requestActiveNowPlayingSessionInfo):
904         (WebKit::WebPageProxy::handleActiveNowPlayingSessionInfoResponse):
905         * UIProcess/WebPageProxy.h:
906         * UIProcess/WebPageProxy.messages.in:
907         * UIProcess/mac/PageClientImpl.h:
908         * UIProcess/mac/PageClientImpl.mm:
909         (WebKit::PageClientImpl::handleActiveNowPlayingSessionInfoResponse):
910         * WebProcess/WebPage/WebPage.h:
911         * WebProcess/WebPage/WebPage.messages.in:
912         * WebProcess/WebPage/mac/WebPageMac.mm:
913         (WebKit::WebPage::requestActiveNowPlayingSessionInfo):
914
915 2016-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>
916
917         [GTK] Switch to use GMenu internally in the context menu implementation
918         https://bugs.webkit.org/show_bug.cgi?id=162603
919
920         Reviewed by Michael Catanzaro.
921
922         Switch to use GAction instead of GtkAction internally, but still keeping a GtkAction associated to the GAction,
923         because our API depends on GtkAction.
924
925         * Shared/gtk/WebContextMenuItemGtk.cpp:
926         (WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk):
927         (WebKit::WebContextMenuItemGtk::createActionIfNeeded): Create the GAction and the associated GtkAction. Ensure a
928         unique name for the GAction, since the name now matters.
929         * Shared/gtk/WebContextMenuItemGtk.h:
930         (WebKit::WebContextMenuItemGtk::gtkAction):
931         (WebKit::WebContextMenuItemGtk::gAction):
932         (WebKit::WebContextMenuItemGtk::submenuItems): Deleted.
933         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
934         (WebKit::contextMenuItemActivatedCallback): Use the GAction.
935         (WebKit::WebContextMenuProxyGtk::append): Create a new GMenuItem for the GAction.
936         (WebKit::WebContextMenuProxyGtk::buildMenu): Build a GMenu for the given items.
937         (WebKit::WebContextMenuProxyGtk::populate): Create a GMenu and bind it ot the GtkMenu.
938         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): Create the GActionGroup for the menu.
939         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): Remove the action group from the GtkMenu.
940         * UIProcess/gtk/WebContextMenuProxyGtk.h:
941
942 2016-09-27  Daniel Bates  <dabates@apple.com>
943
944         NetworkLoad and PingLoad should use private inheritance
945         https://bugs.webkit.org/show_bug.cgi?id=162649
946
947         Reviewed by Alex Christensen.
948
949         Make NetworkLoad privately inherit from NetworkDataTaskClient and ResourceHandleClient,
950         and make the client callbacks from these interfaces private as this class implements
951         these interfaces.
952
953         Similarly, make PingLoad privately inherit from ResourceHandleClient.
954
955         * NetworkProcess/NetworkLoad.h:
956         * NetworkProcess/PingLoad.h:
957
958 2016-09-20  Anders Carlsson  <andersca@apple.com>
959
960         PlatformEvent::m_modifiers should be an OptionSet
961         https://bugs.webkit.org/show_bug.cgi?id=162326
962
963         Reviewed by Daniel Bates.
964
965         * Shared/WebEventConversion.cpp:
966         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
967         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
968         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
969         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
970
971 2016-09-27  Dan Bernstein  <mitz@apple.com>
972
973         [iOS] REGRESSION (r182126): Selection highlight and handles aren’t visible with WKSelectionGranularityCharacter
974         https://bugs.webkit.org/show_bug.cgi?id=162577
975         <rdar://problem/28481984>
976
977         Reviewed by Simon Fraser.
978
979         * UIProcess/API/Cocoa/WKWebView.mm:
980         (-[WKWebView _uiTextSelectionRectViews]): Added this method in the WKTesting category, which
981           uses UIKit internals to get the views used for the selection highlight.
982         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
983
984         * UIProcess/ios/WKContentViewInteraction.mm:
985         (-[WKContentView _selectionClipRect]): When selection is not confined to a form control or
986           content-editable element, return the null rect to indicate no clipping, rather than
987           clipping to the empty rect at the origin.
988
989 2016-09-27  Jer Noble  <jer.noble@apple.com>
990
991         Remove deprecated ENCRYPTED_MEDIA implementation.
992         https://bugs.webkit.org/show_bug.cgi?id=161010
993
994         Reviewed by Eric Carlson.
995
996         Remove ENABLE_ENCRYPTED_MEDIA.
997
998         * Configurations/FeatureDefines.xcconfig:
999
1000 2016-09-27  Chris Dumez  <cdumez@apple.com>
1001
1002         [WK2] Navigating to a Blob URL does not trigger a download
1003         https://bugs.webkit.org/show_bug.cgi?id=162574
1004
1005         Reviewed by Darin Adler.
1006
1007         Add support for converting Blob URL loads into downloads.
1008
1009         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
1010         (WebKit::BlobDownloadClient::didReceiveResponseAsync):
1011         Make sure we return a valid suggested filename because the client side (Safari)
1012         does not deal with empty suggested filenames. Use "unknown" by default to
1013         match the default suggested filename of non-Blob downloads.
1014
1015         * NetworkProcess/Downloads/Download.cpp:
1016         (WebKit::Download::startWithHandle):
1017         * NetworkProcess/Downloads/Download.h:
1018         * NetworkProcess/Downloads/DownloadManager.cpp:
1019         (WebKit::DownloadManager::convertHandleToDownload):
1020         * NetworkProcess/Downloads/DownloadManager.h:
1021         * NetworkProcess/Downloads/ios/DownloadIOS.mm:
1022         (WebKit::Download::startNetworkLoadWithHandle):
1023         * NetworkProcess/Downloads/mac/DownloadMac.mm:
1024         (WebKit::Download::startNetworkLoadWithHandle):
1025         * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
1026         (WebKit::Download::startNetworkLoadWithHandle):
1027         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1028         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
1029         * NetworkProcess/NetworkLoad.h:
1030         (WebKit::NetworkLoad::handle):
1031
1032 2016-09-27  Michael Catanzaro  <mcatanzaro@igalia.com>
1033
1034         [GTK] Unreviewed typo fix
1035
1036         * UIProcess/API/gtk/WebKitWebInspector.cpp:
1037         (webkit_web_inspector_class_init):
1038
1039 2016-09-27  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
1040
1041         [GTK] Should check whether GDK can use GL before asking it to
1042         https://bugs.webkit.org/show_bug.cgi?id=162598
1043
1044         Reviewed by Michael Catanzaro.
1045
1046         gdk_cairo_draw_from_gl can fail even when WebKit itself has been able to use GL (its
1047         context creation code might be buggy, GL may have been disabled using GDK_GL=disable, …).
1048         Unfortunately it does not have any error reporting other than a warning printed to
1049         stderr, so we cannot fallback from it. We have to first check if GL can be used by GDK
1050         by trying to create a context.
1051
1052         See https://bugzilla.redhat.com/show_bug.cgi?id=1378987
1053
1054         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
1055         (WebKit::AcceleratedBackingStoreWayland::canGdkUseGL): decide whether GDK can use GL by
1056         trying to create a context for a GdkWindow.
1057         (WebKit::AcceleratedBackingStoreWayland::paint): fallback to glReadPixels if GDK cannot
1058         use GL.
1059         * UIProcess/gtk/AcceleratedBackingStoreWayland.h:
1060
1061 2016-09-26  Tim Horton  <timothy_horton@apple.com>
1062
1063         Delete some unused code from r202695
1064         https://bugs.webkit.org/show_bug.cgi?id=162595
1065         <rdar://problem/28343784>
1066
1067         Reviewed by Dan Bernstein.
1068
1069         * UIProcess/API/Cocoa/WKWebView.mm:
1070         (-[WKWebView _initializeWithConfiguration:]):
1071         (-[WKWebView _setIsBlankBeforeFirstNonEmptyLayout:]): Deleted.
1072         (-[WKWebView _didFirstVisuallyNonEmptyLayoutForMainFrame]): Deleted.
1073         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1074         * UIProcess/ios/PageClientImplIOS.mm:
1075         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
1076         We didn't end up needing this mechanism.
1077
1078 2016-09-26  Dan Bernstein  <mitz@apple.com>
1079
1080         -_webViewWebProcessDidBecomeUnresponsive: gets called when the Web process is stopped in the debugger
1081         https://bugs.webkit.org/show_bug.cgi?id=162234
1082
1083         Reviewed by Sam Weinig.
1084
1085         * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
1086         (WebKit::WebProcessProxy::platformIsBeingDebugged): Use the KERN_PROC sysctl to get the
1087           process flags and check for P_TRACED.
1088
1089         * UIProcess/ResponsivenessTimer.cpp:
1090         (WebKit::ResponsivenessTimer::timerFired): Call the new client function
1091           mayBecomeUnresponsive. If it returns false, restart the timer and bail out without
1092           changing the responsiveness state.
1093
1094         * UIProcess/ResponsivenessTimer.h: Declared new client function mayBecomeUnresponsive.
1095
1096         * UIProcess/WebProcessProxy.cpp:
1097         (WebKit::WebProcessProxy::platformIsBeingDebugged): A generic implementation that always
1098           returns false.
1099         (WebKit::WebProcessProxy::mayBecomeUnresponsive): Implement this new
1100           ResponsivenessTimer::Client function to return true unless the process is being debugged.
1101         * UIProcess/WebProcessProxy.h:
1102
1103 2016-09-26  Chris Dumez  <cdumez@apple.com>
1104
1105         [WK2] BlobDownloadClient should use asynchronous IPC to decide destination path
1106         https://bugs.webkit.org/show_bug.cgi?id=162568
1107
1108         Reviewed by Alex Christensen.
1109
1110         Use DecideDestinationWithSuggestedFilenameAsync IPC to decide the destination
1111         path in the case of Blob downloads, instead of the synchronous alternative.
1112         To achieve this, BlobResourceHandle was updated in WebCore to properly support
1113         asynchronous callback and BlobDownloadClient was updated to use asynchronous
1114         callbacks. When BlobDownloadClient::didReceiveResponseAsync() is called, we
1115         now ask the WebContent process asynchronously to decide what the destination
1116         path should be. Then, when we later get the destination path back from the
1117         WebContent process, we create the file on disk and call
1118         continueDidReceiveResponse() on the BlobResourceHandle so we start getting the
1119         blob data to write.
1120
1121         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
1122         (WebKit::BlobDownloadClient::didReceiveResponseAsync):
1123         (WebKit::BlobDownloadClient::didDecideDownloadDestination):
1124         * NetworkProcess/Downloads/BlobDownloadClient.h:
1125         * NetworkProcess/Downloads/Download.cpp:
1126         (WebKit::Download::decideDestinationWithSuggestedFilenameAsync):
1127         (WebKit::Download::didDecideDownloadDestination):
1128         (WebKit::Download::continueDidReceiveResponse):
1129         (WebKit::Download::decideDestinationWithSuggestedFilename): Deleted.
1130         * NetworkProcess/Downloads/Download.h:
1131         * NetworkProcess/Downloads/DownloadManager.cpp:
1132         (WebKit::DownloadManager::willDecidePendingDownloadDestination):
1133         (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
1134         (WebKit::DownloadManager::convertHandleToDownload): Deleted.
1135         * NetworkProcess/Downloads/DownloadManager.h:
1136         * NetworkProcess/NetworkLoad.cpp:
1137         (WebKit::NetworkLoad::continueDidReceiveResponse):
1138         * NetworkProcess/NetworkProcess.cpp:
1139         (WebKit::NetworkProcess::continueDecidePendingDownloadDestination):
1140         * NetworkProcess/NetworkProcess.h:
1141         * NetworkProcess/NetworkProcess.messages.in:
1142         * UIProcess/Downloads/DownloadProxy.cpp:
1143         (WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync): Deleted.
1144         * UIProcess/Downloads/DownloadProxy.h:
1145         * UIProcess/Downloads/DownloadProxy.messages.in:
1146
1147 2016-09-26  Daniel Bates  <dabates@apple.com>
1148
1149         Mark Ping{Handle, Load} as final
1150         https://bugs.webkit.org/show_bug.cgi?id=162576
1151
1152         Reviewed by Alex Christensen.
1153
1154         We should not support subclassing of a ping handle or overriding its NetworkDataTaskClient
1155         callbacks because there are security/privacy implications with a ping request. We should
1156         not encourage subclassing without careful consideration.
1157
1158         * NetworkProcess/PingLoad.h:
1159
1160 2016-09-26  Daniel Bates  <dabates@apple.com>
1161
1162         Rename IOS_TEXT_AUTOSIZING to TEXT_AUTOSIZING
1163         https://bugs.webkit.org/show_bug.cgi?id=162365
1164
1165         Reviewed by Simon Fraser.
1166
1167         * Configurations/FeatureDefines.xcconfig:
1168         * WebProcess/WebPage/WebPage.cpp:
1169         (WebKit::WebPage::updatePreferences):
1170
1171 2016-09-26  Michael Catanzaro  <mcatanzaro@igalia.com>
1172
1173         Fix -Wformat warnings in WebLoaderStrategy
1174         https://bugs.webkit.org/show_bug.cgi?id=162553
1175
1176         Reviewed by Alex Christensen.
1177
1178         Consistently use PRIu64 to print uint64_t
1179
1180         * NetworkProcess/Downloads/Download.cpp:
1181         (WebKit::Download::didReceiveResponse):
1182         (WebKit::Download::didReceiveData):
1183         (WebKit::Download::didFinish):
1184         (WebKit::Download::didFail):
1185         (WebKit::Download::didCancel):
1186         * NetworkProcess/NetworkResourceLoader.cpp:
1187         (WebKit::NetworkResourceLoader::start):
1188         (WebKit::NetworkResourceLoader::startNetworkLoad):
1189         (WebKit::NetworkResourceLoader::setDefersLoading):
1190         (WebKit::NetworkResourceLoader::abort):
1191         (WebKit::NetworkResourceLoader::didReceiveBuffer):
1192         (WebKit::NetworkResourceLoader::didFinishLoading):
1193         (WebKit::NetworkResourceLoader::didFailLoading):
1194         (WebKit::NetworkResourceLoader::continueWillSendRequest):
1195         * WebProcess/Network/WebLoaderStrategy.cpp:
1196         (WebKit::WebLoaderStrategy::scheduleLoad):
1197         * WebProcess/Network/WebResourceLoader.cpp:
1198         (WebKit::WebResourceLoader::willSendRequest):
1199         (WebKit::WebResourceLoader::didReceiveResponse):
1200         (WebKit::WebResourceLoader::didReceiveData):
1201         (WebKit::WebResourceLoader::didFinishResourceLoad):
1202         (WebKit::WebResourceLoader::didFailResourceLoad):
1203         (WebKit::WebResourceLoader::didReceiveResource):
1204
1205 == Rolled over to ChangeLog-2016-09-26 ==