Hook up request and show for typing candidates in WK1
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-12-07  Beth Dakin  <bdakin@apple.com>
2
3         Hook up request and show for typing candidates in WK1
4         https://bugs.webkit.org/show_bug.cgi?id=151831
5         -and corresponding-
6         <rdar://problem/23751214>
7
8         Reviewed by Enrica Casucci.
9
10         Empty client for now.
11         * WebProcess/WebCoreSupport/WebEditorClient.h:
12
13 2015-12-07  Philippe Normand  <pnormand@igalia.com>
14
15         [GTK][Mac] socketpair assertion failure
16         https://bugs.webkit.org/show_bug.cgi?id=151293
17
18         Reviewed by Carlos Garcia Campos.
19
20         * Platform/IPC/unix/ConnectionUnix.cpp: Don't use SEQPACKET sockets on Darwin.
21
22 2015-12-07  Gwang Yoon Hwang  <yoon@igalia.com>
23
24         [ThreadedCompositor] Add support for PlatformLayer.
25         https://bugs.webkit.org/show_bug.cgi?id=143299
26
27         Reviewed by Žan Doberšek.
28
29         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
30         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
31         Swap pending buffers of TextureMapperPlatformLayerProxies before painting contents.
32         (WebKit::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
33         In threaded compositor, CoordinatedGraphicsScence only cares about creation and deletion
34         of platform layers.
35
36         (WebKit::CoordinatedGraphicsScene::onNewBufferAvailable):
37         Whenever new buffer comes via TextureMapperPlatformLayerProxy, CoordinatedGraphicsScene will
38         update the scene if it is needed.
39
40 2015-12-07  Mario Sanchez Prada  <mario@endlessm.com>
41
42         [GTK] Allow applications to force Accelerated Compositing mode
43         https://bugs.webkit.org/show_bug.cgi?id=150558
44
45         Reviewed by Carlos Garcia Campos.
46
47         Enable forcing Accelerated Compositing mode to be always on if
48         a WEBKIT_FORCE_COMPOSITING_MODE environment variable is set.
49
50         This can be useful for controlled environments where we know that
51         AC always on works well enough, to get smoother animations.
52
53         * UIProcess/gtk/WebPreferencesGtk.cpp:
54         (WebKit::WebPreferences::platformInitializeStore): Set forceCompositingMode
55         setting to true if the environment variable is found.
56
57 2015-12-07  Jon Forsberg  <jon.orebro@gmail.com>
58
59         [GTK] Add webkit_uri_request_get_http_method
60         https://bugs.webkit.org/show_bug.cgi?id=151601
61
62         Reviewed by Martin Robinson.
63
64         Add a method to get the HTTP method of a WebKitURIRequest.
65
66         * UIProcess/API/gtk/WebKitURIRequest.cpp:
67         (webkit_uri_request_get_http_method):
68         * UIProcess/API/gtk/WebKitURIRequest.h:
69         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
70
71 2015-12-07  Carlos Garcia Campos  <cgarcia@igalia.com>
72
73         [GTK] Add WebKitWebPage::console-message-sent signal to Web Extensions API
74         https://bugs.webkit.org/show_bug.cgi?id=79918
75
76         Reviewed by Gustavo Noronha Silva.
77
78         Add WebKitConsoleMessage boxed type that is passed to the
79         WebKitWebPage::console-message-sent signal with all the details
80         about the message.
81
82         * PlatformGTK.cmake: Add new files to compilation.
83         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
84         * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Add webkit_console_message_get_type.
85         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section to the docs.
86         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
87         (API::InjectedBundle::PageUIClient::willAddMessageToConsole): Add
88         paramaters for all console message details.
89         * WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessage.cpp: Added.
90         (webkit_console_message_copy):
91         (webkit_console_message_free):
92         (webkit_console_message_get_source):
93         (webkit_console_message_get_level):
94         (webkit_console_message_get_text):
95         (webkit_console_message_get_line):
96         (webkit_console_message_get_source_id):
97         * WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessage.h: Added.
98         * WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessagePrivate.h: Added.
99         (_WebKitConsoleMessage::_WebKitConsoleMessage):
100         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
101         (webkitWebPageDidSendConsoleMessage): Emit the
102         WebKitWebPage::console-message-sent signal.
103         (didReceiveResponseForResource): Generate a console message in
104         case of HTTP failure >= 400 for consistency with the inspector.
105         (didFailLoadForResource): Generate a console message in case of
106         resource load failure for consistency with the inspector.
107         (webkit_web_page_class_init): Add WebKitWebPage::console-message-sent signal.
108         (webkitWebPageCreate): Set custom UI client.
109         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
110         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
111         (WebKit::InjectedBundlePageUIClient::willAddMessageToConsole):
112         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
113         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
114         (WebKit::WebChromeClient::addMessageToConsole): Pass all the
115         console message details to the ui client.
116
117 2015-12-07  Ryuan Choi  <ryuan.choi@navercorp.com>
118
119         [EFL] MiniBrowser doesn't exit when called ewk_view_try_close()
120         https://bugs.webkit.org/show_bug.cgi?id=151934
121
122         Reviewed by Csaba Osztrogonác.
123
124         * UIProcess/API/efl/ewk_view.cpp:
125         (ewk_view_try_close):
126         Called window_close callback immediately when WKPageTryClose returns true.
127         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
128         (TEST_F): Improved test cases for try_close to test when content does not contain
129         onbeforeunload callback.
130
131 2015-12-07  Jaehun Lim  <ljaehun.lim@samsung.com>
132
133         [EFL] Moving preference settings from EwkView to WebPreferencesEfl
134         https://bugs.webkit.org/show_bug.cgi?id=151928
135
136         Reviewed by Gyuyoung Kim.
137
138         It implements WebPreferences::platformInitializeStore() in WebPreferencesEfl.cpp.
139
140         * UIProcess/API/efl/EwkView.cpp:
141         (EwkView::EwkView):
142         * UIProcess/efl/WebPreferencesEfl.cpp:
143         (WebKit::WebPreferences::platformInitializeStore):
144
145 2015-12-04  Anders Carlsson  <andersca@apple.com>
146
147         Crash when secondary clicking on a link on yahoo.com
148         https://bugs.webkit.org/show_bug.cgi?id=151900
149         rdar://problem/23765149
150
151         Reviewed by Beth Dakin.
152
153         Don't use +[NSURL URLWithString:] since it doesn't handle invalid URLs as well as WebCore::URL.
154
155         * UIProcess/mac/WebContextMenuProxyMac.mm:
156         (WebKit::WebContextMenuProxyMac::createShareMenuItem):
157
158 2015-12-04  Beth Dakin  <bdakin@apple.com>
159
160         Crash in clients using userData in 
161         _immediateActionAnimationControllerForHitTestResult
162         https://bugs.webkit.org/show_bug.cgi?id=151887
163
164         Rubber-stamped by Anders Carlsson.
165
166         Follow-up fix to handle null userData.
167         * UIProcess/API/Cocoa/WKWebView.mm:
168         (-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
169
170 2015-12-04  Beth Dakin  <bdakin@apple.com>
171
172         Crash in clients using userData in 
173         _immediateActionAnimationControllerForHitTestResult
174         https://bugs.webkit.org/show_bug.cgi?id=151887
175
176         Reviewed by Sam Weinig.
177
178         Cast this correctly.
179         * UIProcess/API/Cocoa/WKWebView.mm:
180         (-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
181
182 2015-12-04  Gavin Barraclough  <barraclough@apple.com>
183
184         Background state not being tracked correctly for PDFs on iOS
185         https://bugs.webkit.org/show_bug.cgi?id=151886
186
187         Reviewed by Anders Carlson.
188
189         The problem here is that when viewing a PDF we don't have an ApplicationStateTracker.
190         (While we do have a content view - which normally holds the ApplicationStateTracker -
191         the content view is not in a window, and only has an ApplicationStateTracker while in a
192         window). For now, let's give the WKPDFView an ApplicationStateTracker of its very own.
193         In the future we may want to refactor ownership of the ApplicationStateTracker up to
194         the WKWebView.
195
196         * UIProcess/API/Cocoa/WKWebView.mm:
197         (-[WKWebView _isBackground]):
198             - Added, checks background state of content/PDF view.
199         * UIProcess/API/Cocoa/WKWebViewInternal.h:
200             - expose _isBackground to PageClientImplIOS.
201         * UIProcess/ApplicationStateTracker.h:
202         (WebKit::ApplicationStateTracker::isInBackground):
203         * UIProcess/ApplicationStateTracker.mm:
204         (WebKit::isBackgroundState):
205         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
206             - generalize WKContentView -> UIView, so this may now also be a WKPDFView.
207         * UIProcess/ios/PageClientImplIOS.mm:
208         (WebKit::PageClientImpl::isViewVisible):
209             - check background state via the WKWebView.
210         * UIProcess/ios/WKPDFView.h:
211         * UIProcess/ios/WKPDFView.mm:
212         (-[WKPDFView willMoveToWindow:]):
213         (-[WKPDFView didMoveToWindow]):
214         (-[WKPDFView isBackground]):
215         (-[WKPDFView _applicationDidEnterBackground]):
216         (-[WKPDFView _applicationWillEnterForeground]):
217             - added methods to initialize ApplicationStateTracker, access background state, & callbacks to the page proxy.
218
219 2015-12-04  Antti Koivisto  <antti@apple.com>
220
221         Rename WebResourceLoadScheduler to WebLoaderStrategy
222         https://bugs.webkit.org/show_bug.cgi?id=151854
223
224         Reviewed by Anders Carlsson.
225
226         It implements WebCore::LoaderStrategy and doesn't do any scheduling.
227
228         * CMakeLists.txt:
229         * WebKit2.xcodeproj/project.pbxproj:
230         * WebProcess/Network/NetworkProcessConnection.cpp:
231         (WebKit::NetworkProcessConnection::didReceiveMessage):
232         * WebProcess/Network/WebLoaderStrategy.cpp: Copied from Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp.
233         (WebKit::WebLoaderStrategy::WebLoaderStrategy):
234         (WebKit::WebLoaderStrategy::~WebLoaderStrategy):
235         (WebKit::WebLoaderStrategy::loadResource):
236         (WebKit::WebLoaderStrategy::schedulePluginStreamLoad):
237         (WebKit::maximumBufferingTime):
238         (WebKit::WebLoaderStrategy::scheduleLoad):
239         (WebKit::WebLoaderStrategy::scheduleInternallyFailedLoad):
240         (WebKit::WebLoaderStrategy::internallyFailedLoadTimerFired):
241         (WebKit::WebLoaderStrategy::startLocalLoad):
242         (WebKit::WebLoaderStrategy::remove):
243         (WebKit::WebLoaderStrategy::setDefersLoading):
244         (WebKit::WebLoaderStrategy::crossOriginRedirectReceived):
245         (WebKit::WebLoaderStrategy::servePendingRequests):
246         (WebKit::WebLoaderStrategy::suspendPendingRequests):
247         (WebKit::WebLoaderStrategy::resumePendingRequests):
248         (WebKit::WebLoaderStrategy::networkProcessCrashed):
249         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
250         (WebKit::WebLoaderStrategy::createPingHandle):
251         (WebKit::WebResourceLoadScheduler::WebResourceLoadScheduler): Deleted.
252         (WebKit::WebResourceLoadScheduler::~WebResourceLoadScheduler): Deleted.
253         (WebKit::WebResourceLoadScheduler::loadResource): Deleted.
254         (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad): Deleted.
255         (WebKit::WebResourceLoadScheduler::scheduleLoad): Deleted.
256         (WebKit::WebResourceLoadScheduler::scheduleInternallyFailedLoad): Deleted.
257         (WebKit::WebResourceLoadScheduler::internallyFailedLoadTimerFired): Deleted.
258         (WebKit::WebResourceLoadScheduler::startLocalLoad): Deleted.
259         (WebKit::WebResourceLoadScheduler::remove): Deleted.
260         (WebKit::WebResourceLoadScheduler::setDefersLoading): Deleted.
261         (WebKit::WebResourceLoadScheduler::crossOriginRedirectReceived): Deleted.
262         (WebKit::WebResourceLoadScheduler::servePendingRequests): Deleted.
263         (WebKit::WebResourceLoadScheduler::suspendPendingRequests): Deleted.
264         (WebKit::WebResourceLoadScheduler::resumePendingRequests): Deleted.
265         (WebKit::WebResourceLoadScheduler::networkProcessCrashed): Deleted.
266         (WebKit::WebResourceLoadScheduler::loadResourceSynchronously): Deleted.
267         (WebKit::WebResourceLoadScheduler::createPingHandle): Deleted.
268         * WebProcess/Network/WebLoaderStrategy.h: Copied from Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.h.
269         (WebKit::WebLoaderStrategy::webResourceLoaderForIdentifier):
270         (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier): Deleted.
271         * WebProcess/Network/WebResourceLoadScheduler.cpp: Removed.
272         * WebProcess/Network/WebResourceLoadScheduler.h: Removed.
273         * WebProcess/Plugins/PluginView.cpp:
274         (WebKit::PluginView::Stream::start):
275         (WebKit::PluginView::Stream::cancel):
276         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
277         (WebKit::WebPlatformStrategies::createLoaderStrategy):
278         (WebKit::WebPlatformStrategies::createPasteboardStrategy):
279         * WebProcess/WebProcess.cpp:
280         (WebKit::WebProcess::WebProcess):
281         (WebKit::WebProcess::initializeWebProcess):
282         (WebKit::WebProcess::networkProcessConnectionClosed):
283         (WebKit::WebProcess::webLoaderStrategy):
284         (WebKit::WebProcess::webResourceLoadScheduler): Deleted.
285         * WebProcess/WebProcess.h:
286
287 2015-12-03  Simon Fraser  <simon.fraser@apple.com>
288
289         Have layer memory use consult the backing store format
290         https://bugs.webkit.org/show_bug.cgi?id=151827
291         rdar://problem/23746497
292
293         Reviewed by Dean Jackson.
294
295         When computing the backing store memory size, take the pixel format into account,
296         rather than assuming 4 bytes per pixel.
297
298         * Shared/mac/RemoteLayerBackingStore.h:
299         * Shared/mac/RemoteLayerBackingStore.mm:
300         (WebKit::RemoteLayerBackingStore::bytesPerPixel):
301         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
302         (WebKit::PlatformCALayerRemote::backingStoreBytesPerPixel):
303         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
304
305 2015-12-03  Jer Noble  <jer.noble@apple.com>
306
307         Expose WebCore's InvisibleAutoplayNotPermitted setting to WebKit & WebKit2
308         https://bugs.webkit.org/show_bug.cgi?id=151830
309
310         Reviewed by Anders Carlsson.
311
312         Add a new, private WKWebViewConfiguration property _invisibleAutoplayNotPermitted.
313
314         * Shared/WebPreferencesDefinitions.h:
315         * UIProcess/API/Cocoa/WKWebView.mm:
316         (-[WKWebView initWithFrame:configuration:]):
317         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
318         (-[WKWebViewConfiguration init]):
319         (-[WKWebViewConfiguration copyWithZone:]):
320         (-[WKWebViewConfiguration _invisibleAutoplayNotPermitted]):
321         (-[WKWebViewConfiguration _setInvisibleAutoplayNotPermitted:]):
322         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
323         * WebProcess/WebPage/WebPage.cpp:
324         (WebKit::WebPage::updatePreferences):
325
326 2015-12-03  Sam Weinig  <sam@webkit.org>
327
328         It should be possible to use version 6 of the WKPageUIClient without adopting the new createNewPage
329         https://bugs.webkit.org/show_bug.cgi?id=151826
330
331         Reviewed by Anders Carlsson.
332
333         * UIProcess/API/C/WKPage.cpp:
334         (WKPageSetPageUIClient):
335         Pick which variant of createNewPage to use based on which function pointer is available,
336         not the version number.
337
338 2015-12-03  Anders Carlsson  <andersca@apple.com>
339
340         Remove Objective-C GC support
341         https://bugs.webkit.org/show_bug.cgi?id=151819
342         rdar://problem/23746991
343
344         Reviewed by Dan Bernstein.
345
346         * Configurations/Base.xcconfig:
347         * Configurations/BaseLegacyProcess.xcconfig:
348         * Configurations/BaseXPCService.xcconfig:
349         * Shared/Cocoa/APIObject.mm:
350         (API::Object::newObject): Deleted.
351
352 2015-12-03  Jer Noble  <jer.noble@apple.com>
353
354         Unreviewed build-fix; fix !HAVE(AVKIT) build after r193340.
355
356         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
357         (WebKit::WebVideoFullscreenManagerProxy::applicationDidBecomeActive):
358
359 2015-12-03  Sam Weinig  <sam@webkit.org>
360
361         Need completionHandler-based WebKit C SPI for alert, confirm, and prompt
362         <rdar://problem/23320863>
363         https://bugs.webkit.org/show_bug.cgi?id=151708
364
365         (Add missing function definitions)
366
367         * UIProcess/API/C/WKPage.cpp:
368         (WKPageRunJavaScriptAlertResultListenerGetTypeID):
369         (WKPageRunJavaScriptAlertResultListenerCall):
370         (WKPageRunJavaScriptConfirmResultListenerGetTypeID):
371         (WKPageRunJavaScriptConfirmResultListenerCall):
372         (WKPageRunJavaScriptPromptResultListenerGetTypeID):
373         (WKPageRunJavaScriptPromptResultListenerCall):
374
375 2015-12-03  Jer Noble  <jer.noble@apple.com>
376
377         [iOS] Fullscreen -> PiP should resume to Fullscreen, not inline
378         https://bugs.webkit.org/show_bug.cgi?id=150906
379
380         Reviewed by Simon Fraser.
381
382         Add methods to pass isVisible(), applicationDidBecomeActive(), and requestFullscreenMode()
383         to and from models and interfaces.
384
385         * UIProcess/ios/WebPageProxyIOS.mm:
386         (WebKit::WebPageProxy::applicationDidBecomeActive): Notify the fullscreen manager, if preset.
387
388         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
389         (WebKit::WebVideoFullscreenModelContext::requestFullscreenMode): Renamed from requestExitFullscreen(); takes a mode enum.
390         (WebKit::WebVideoFullscreenModelContext::isVisible): Added.
391         (WebKit::WebVideoFullscreenManagerProxy::applicationDidBecomeActive): Pass to all existing interfaces.
392         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Do not re-create the view if it already exists.
393         (WebKit::WebVideoFullscreenManagerProxy::requestFullscreenMode): Renamed from requestExitFullscreen(); takes a mode enum.
394         (WebKit::WebVideoFullscreenManagerProxy::isVisible): Added. Query Page::isVisible() and Page::isInWindow(), the latter because
395                 PiP will cause Page::isVisible() to be TRUE even when the containing tab is backgrounded.
396         (WebKit::WebVideoFullscreenModelContext::requestExitFullscreen): Deleted.
397         (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen): Deleted.
398         * WebProcess/ios/WebVideoFullscreenManager.mm:
399         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Only resize the view if we are not already in one of
400                 the fullscreen modes.
401         (WebKit::WebVideoFullscreenManager::requestFullscreenMode): Renamed from requestExitFullscreen().
402         (WebKit::WebVideoFullscreenManager::requestExitFullscreen): Deleted.
403
404 2015-12-02  Antti Koivisto  <antti@apple.com>
405
406         Move ResourceLoadScheduler to WebKit1
407         https://bugs.webkit.org/show_bug.cgi?id=151743
408
409         Reviewed by Alex Christensen.
410
411         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
412         (WebKit::NetworkProcessPlatformStrategies::createCookiesStrategy):
413         (WebKit::NetworkProcessPlatformStrategies::createLoaderStrategy):
414         (WebKit::NetworkProcessPlatformStrategies::createPasteboardStrategy):
415         (WebKit::NetworkProcessPlatformStrategies::createPluginStrategy):
416         (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
417         (WebKit::NetworkProcessPlatformStrategies::resourceLoadScheduler): Deleted.
418         (WebKit::NetworkProcessPlatformStrategies::loadResourceSynchronously): Deleted.
419         * NetworkProcess/NetworkProcessPlatformStrategies.h:
420         * WebProcess/InjectedBundle/InjectedBundle.cpp:
421         * WebProcess/Network/WebResourceLoadScheduler.cpp:
422         (WebKit::WebResourceLoadScheduler::~WebResourceLoadScheduler):
423         (WebKit::WebResourceLoadScheduler::loadResource):
424         (WebKit::WebResourceLoadScheduler::resumePendingRequests):
425         (WebKit::WebResourceLoadScheduler::networkProcessCrashed):
426         (WebKit::WebResourceLoadScheduler::loadResourceSynchronously):
427         (WebKit::WebResourceLoadScheduler::createPingHandle):
428         (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad): Deleted.
429         (WebKit::WebResourceLoadScheduler::setSerialLoadingEnabled): Deleted.
430         * WebProcess/Network/WebResourceLoadScheduler.h:
431         (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier):
432         * WebProcess/Plugins/PluginView.cpp:
433         (WebKit::PluginView::Stream::start):
434         (WebKit::PluginView::Stream::cancel):
435         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
436         (WebKit::WebPlatformStrategies::createLoaderStrategy):
437         (WebKit::WebPlatformStrategies::createPasteboardStrategy):
438         (WebKit::WebPlatformStrategies::createPluginStrategy):
439         (WebKit::WebPlatformStrategies::createBlobRegistry):
440         (WebKit::WebPlatformStrategies::cookiesForDOM):
441         (WebKit::WebPlatformStrategies::deleteCookie):
442         (WebKit::WebPlatformStrategies::refreshPlugins):
443         (WebKit::WebPlatformStrategies::resourceLoadScheduler): Deleted.
444         (WebKit::WebPlatformStrategies::loadResourceSynchronously): Deleted.
445         (WebKit::WebPlatformStrategies::createPingHandle): Deleted.
446         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
447
448 2015-12-02  Alex Christensen  <achristensen@webkit.org>
449
450         Fix authentication requests with NetworkSession and canHandleHTTPSServerTrustEvaluation true
451         https://bugs.webkit.org/show_bug.cgi?id=151775
452         rdar://problem/23586265
453
454         Reviewed by Chris Dumez.
455
456         In https://bugs.webkit.org/show_bug.cgi?id=150968 I copied functionality from 
457         NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync into NetworkLoad::didReceiveChallenge
458         but I overlooked the call to m_client.canAuthenticateAgainstProtectionSpaceAsync which is needed
459         if canHandleHTTPSServerTrustEvaluation is true.  This adds that call and moves what should happen
460         after that to NetworkLoad::continueCanAuthenticateAgainstProtectionSpace.
461
462         * NetworkProcess/NetworkLoad.cpp:
463         (WebKit::NetworkLoad::didReceiveChallenge):
464         (WebKit::NetworkLoad::didReceiveResponse):
465         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
466         * NetworkProcess/NetworkLoad.h:
467         * NetworkProcess/NetworkSession.h:
468         * Shared/Authentication/AuthenticationManager.h:
469
470 2015-12-01  Hunseop Jeong  <hs85.jeong@samsung.com>
471
472         Unreviewed, fix build after r192931.
473
474         * CMakeLists.txt: Remove the WKOriginDataManager in CMakeLists.txt.
475
476 2015-12-01  Yusuke Suzuki  <utatane.tea@gmail.com>
477
478         [ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature
479         https://bugs.webkit.org/show_bug.cgi?id=150792
480
481         Reviewed by Saam Barati.
482
483         * Configurations/FeatureDefines.xcconfig:
484
485 2015-12-01  Commit Queue  <commit-queue@webkit.org>
486
487         Unreviewed, rolling out r192914.
488         https://bugs.webkit.org/show_bug.cgi?id=151734
489
490         JSC tests for this change are failing on 32 and 64-bit bots
491         (Requested by ryanhaddad on #webkit).
492
493         Reverted changeset:
494
495         "[ES6] Implement LLInt/Baseline Support for ES6 Generators and
496         enable this feature"
497         https://bugs.webkit.org/show_bug.cgi?id=150792
498         http://trac.webkit.org/changeset/192914
499
500 2015-12-01  Anders Carlsson  <andersca@apple.com>
501
502         Remove WKOriginDataManager
503         https://bugs.webkit.org/show_bug.cgi?id=151723
504
505         Reviewed by Andy Estes.
506
507         * UIProcess/API/C/WKOriginDataManager.cpp: Removed.
508         (WKOriginDataManagerGetTypeID): Deleted.
509         (WKOriginDataManagerGetOrigins): Deleted.
510         (WKOriginDataManagerDeleteEntriesForOrigin): Deleted.
511         (WKOriginDataManagerDeleteEntriesModifiedBetweenDates): Deleted.
512         (WKOriginDataManagerDeleteAllEntries): Deleted.
513         * UIProcess/API/C/WKOriginDataManager.h: Removed.
514         * WebKit2.xcodeproj/project.pbxproj:
515
516 2015-12-01  Yusuke Suzuki  <utatane.tea@gmail.com>
517
518         [ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature
519         https://bugs.webkit.org/show_bug.cgi?id=150792
520
521         Reviewed by Saam Barati.
522
523         * Configurations/FeatureDefines.xcconfig:
524
525 2015-12-01  Sam Weinig  <sam@webkit.org>
526
527         Need completionHandler-based WebKit C SPI for alert, confirm, and prompt
528         <rdar://problem/23320863>
529         https://bugs.webkit.org/show_bug.cgi?id=151708
530
531         Reviewed by Anders Carlsson.
532
533         Add listener based versions of alert, confirm and prompt.
534
535         * Shared/API/APIObject.h:
536         * Shared/API/c/WKBase.h:
537         * UIProcess/API/C/WKPage.cpp:
538         (WebKit::RunJavaScriptAlertResultListener::create):
539         (WebKit::RunJavaScriptAlertResultListener::~RunJavaScriptAlertResultListener):
540         (WebKit::RunJavaScriptAlertResultListener::call):
541         (WebKit::RunJavaScriptAlertResultListener::RunJavaScriptAlertResultListener):
542         (WebKit::RunJavaScriptConfirmResultListener::create):
543         (WebKit::RunJavaScriptConfirmResultListener::~RunJavaScriptConfirmResultListener):
544         (WebKit::RunJavaScriptConfirmResultListener::call):
545         (WebKit::RunJavaScriptConfirmResultListener::RunJavaScriptConfirmResultListener):
546         (WebKit::RunJavaScriptPromptResultListener::create):
547         (WebKit::RunJavaScriptPromptResultListener::~RunJavaScriptPromptResultListener):
548         (WebKit::RunJavaScriptPromptResultListener::call):
549         (WebKit::RunJavaScriptPromptResultListener::RunJavaScriptPromptResultListener):
550         (WKPageSetPageUIClient):
551         * UIProcess/API/C/WKPageUIClient.h:
552
553 2015-12-01  Anders Carlsson  <andersca@apple.com>
554
555         Remove WebKit2.framework
556         https://bugs.webkit.org/show_bug.cgi?id=151715
557
558         Reviewed by Dan Bernstein.
559
560         * Configurations/WebKit2.xcconfig: Removed.
561         * UIProcess/API/Cocoa/WebKit2.h: Removed.
562         * WebKit2.xcodeproj/project.pbxproj:
563         * mac/Info-WebKit2.plist: Removed.
564         * mac/MigrateHeadersToWebKit2.make: Removed.
565         * mac/WebKit2.m: Removed.
566
567 2015-12-01  Alex Christensen  <achristensen@webkit.org>
568
569         Use Optional for matrix inverses
570         https://bugs.webkit.org/show_bug.cgi?id=151575
571
572         Reviewed by Myles C. Maxfield.
573
574         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
575         (WebKit::NetscapePlugin::convertFromRootView):
576         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
577         (WebKit::NetscapePlugin::convertPoint):
578         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
579         (WebKit::PDFPlugin::convertFromPDFViewToRootView):
580         (WebKit::PDFPlugin::convertFromPDFViewToScreen):
581         (WebKit::PDFPlugin::boundsOnScreen):
582         (WebKit::PDFPlugin::geometryDidChange):
583         * WebProcess/Plugins/PDF/PDFPlugin.mm:
584         (WebKit::PDFPlugin::geometryDidChange):
585
586 2015-12-01  Tim Horton  <timothy_horton@apple.com>
587
588         Remove swipe snapshot before main document load if scroll position is already restored
589         https://bugs.webkit.org/show_bug.cgi?id=151224
590
591         Reviewed by Darin Adler.
592
593         * UIProcess/Cocoa/WebViewImpl.h:
594         * UIProcess/Cocoa/WebViewImpl.mm:
595         (WebKit::WebViewImpl::didRestoreScrollPosition):
596         * UIProcess/PageClient.h:
597         * UIProcess/WebPageProxy.cpp:
598         (WebKit::WebPageProxy::didRestoreScrollPosition):
599         * UIProcess/WebPageProxy.h:
600         * UIProcess/WebPageProxy.messages.in:
601         * UIProcess/mac/PageClientImpl.h:
602         * UIProcess/mac/PageClientImpl.mm:
603         (WebKit::PageClientImpl::didRestoreScrollPosition):
604         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
605         (WebKit::WebFrameLoaderClient::didRestoreScrollPosition):
606         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
607         * WebProcess/WebPage/WebPage.cpp:
608         (WebKit::WebPage::didRestoreScrollPosition):
609         * WebProcess/WebPage/WebPage.h:
610         Plumb didRestoreScrollPosition through to ViewGestureController (yikes!).
611
612         * UIProcess/ViewGestureController.cpp:
613         (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
614         Cancel waiting for any more loads if we get to firstVisuallyNonEmptyLayout.
615
616         (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
617         Cancel waiting for scroll position restoration if we make it to main frame load,
618         because there is a chance we won't be able to restore the old scroll position, and
619         by main frame load time we've tried as hard as we're going to to restore it.
620
621         * UIProcess/mac/ViewGestureControllerMac.mm:
622         (WebKit::ViewGestureController::endSwipeGesture):
623         Make some legacy-style-only code clearer that it's legacy-style-only.
624         Wait for scroll position restoration.
625
626 2015-12-01  Carlos Garcia Campos  <cgarcia@igalia.com>
627
628         REGRESSION(r192834): [GTK] Test /webkit2/WebKitWebView/editor-state/typing-attributes times out after r192834
629         https://bugs.webkit.org/show_bug.cgi?id=151699
630
631         Reviewed by Tim Horton.
632
633         In r192834 the code to send EditorStateChanged message to the UI
634         process from WebPage::didChangeSelection was removed for non-mac
635         ports.
636
637         * WebProcess/WebPage/WebPage.cpp:
638         (WebKit::WebPage::didChangeSelection): Send EditorStateChanged
639         message to the UI process also for non-mac ports, as before r192834.
640
641 2015-12-01  Carlos Garcia Campos  <cgarcia@igalia.com>
642
643         Unreviewed. Fix timeouts in several HTTP layout tests in GTK+ after r192796.
644
645         In r192796, the initialization of m_ignoreTLSErrors in
646         WebProcessPool was removed by mistake, making all HTTP tests that use
647         HTTPS fail due to invalid certificate errors.
648
649         * UIProcess/WebProcessPool.h: Bring back m_ignoreTLSErrors initialization.
650
651 2015-12-01  Carlos Garcia Campos  <cgarcia@igalia.com>
652
653         REGRESSION(r192247): [GTK] ASSERTION FAILED: type == WebCore::ActionType || type == WebCore::CheckableActionType || type == WebCore::SeparatorType
654         https://bugs.webkit.org/show_bug.cgi?id=151513
655
656         Reviewed by Martin Robinson.
657
658         This happens because we are using our own WebContextMenuItemGtk
659         derived from WebContextMenuItemData, but using our own submenu
660         items handling. We are using the non-submenu
661         WebContextMenuItemData constructor to create our submenu items
662         too, because WebContextMenuItemData always expect the submenu
663         items to be passed to the constructor, but we have a set_submenu
664         method in the public API. So we consider that a
665         WebContextMenuItemGtk is SubmenuType if it has submenu items, but
666         we use the action type internally. When converting a
667         WebContextMenuItemGtk to a generic WebContextMenuItemData, we
668         correctly set the type and pass the submenu items to the
669         approriate constructor.
670
671         * Shared/gtk/WebContextMenuItemGtk.cpp:
672         (WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk): When
673         constructing from a WebContextMenuItemData, set the type as
674         ActionType when it's a submenu type.
675         * Shared/gtk/WebContextMenuItemGtk.h:
676         (WebKit::WebContextMenuItemGtk::type): Return SubmenuType if
677         submenu items vector is not empty, otherwise use the parent method.
678         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
679         (webkit_context_menu_item_new_with_submenu): Create the
680         WebContextMenuItemGtk as ActionType.
681
682 2015-12-01  Carlos Garcia Campos  <cgarcia@igalia.com>
683
684         Unreviewed. Add missing inspector files to the GTK+ build.
685
686         * PlatformGTK.cmake: Add also Debug css files.
687
688 2015-11-30  Alexey Proskuryakov  <ap@apple.com>
689
690         Build fix for some compiler versions.
691
692         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Disable deprecation warnings while
693         processing SOFT_LINK_CLASS too.
694
695 2015-11-30  Jiewen Tan  <jiewen_tan@apple.com>
696
697         Null dereference loading Blink layout test http/tests/misc/detach-during-notifyDone.html
698         https://bugs.webkit.org/show_bug.cgi?id=149309
699         <rdar://problem/22748363>
700
701         Reviewed by Brent Fulgham.
702
703         Callback of bundle clients could kill the documentloader. Therefore, make a copy
704         of the navigationID before invoking the callback.
705
706         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
707         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
708         (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
709         (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
710         (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
711         (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
712         (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
713         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
714
715 2015-11-30  Tim Horton  <timothy_horton@apple.com>
716
717         Get rid of the !USE(ASYNC_NSTEXTINPUTCLIENT) codepath
718         https://bugs.webkit.org/show_bug.cgi?id=151673
719
720         Reviewed by Anders Carlsson.
721
722         * UIProcess/API/Cocoa/WKWebView.mm:
723         * UIProcess/API/mac/WKView.mm:
724         * UIProcess/Cocoa/WebViewImpl.h:
725         * UIProcess/Cocoa/WebViewImpl.mm:
726         (WebKit::WebViewImpl::resignFirstResponder): Deleted.
727         (WebKit::WebViewImpl::interpretKeyEvent): Deleted.
728         (WebKit::WebViewImpl::executeSavedKeypressCommands): Deleted.
729         (WebKit::WebViewImpl::doCommandBySelector): Deleted.
730         (WebKit::WebViewImpl::insertText): Deleted.
731         (WebKit::WebViewImpl::inputContext): Deleted.
732         (WebKit::WebViewImpl::selectedRange): Deleted.
733         (WebKit::WebViewImpl::hasMarkedText): Deleted.
734         (WebKit::WebViewImpl::unmarkText): Deleted.
735         (WebKit::WebViewImpl::setMarkedText): Deleted.
736         (WebKit::WebViewImpl::markedRange): Deleted.
737         (WebKit::WebViewImpl::attributedSubstringForProposedRange): Deleted.
738         (WebKit::WebViewImpl::characterIndexForPoint): Deleted.
739         (WebKit::WebViewImpl::firstRectForCharacterRange): Deleted.
740         (WebKit::WebViewImpl::performKeyEquivalent): Deleted.
741         (WebKit::WebViewImpl::keyUp): Deleted.
742         (WebKit::WebViewImpl::keyDown): Deleted.
743         (WebKit::WebViewImpl::flagsChanged): Deleted.
744         * UIProcess/PageClient.h:
745         * UIProcess/WebPageProxy.cpp:
746         (WebKit::WebPageProxy::WebPageProxy): Deleted.
747         (WebKit::WebPageProxy::resetStateAfterProcessExited): Deleted.
748         * UIProcess/WebPageProxy.h:
749         * UIProcess/mac/PageClientImpl.h:
750         * UIProcess/mac/PageClientImpl.mm:
751         (WebKit::PageClientImpl::notifyApplicationAboutInputContextChange): Deleted.
752         * UIProcess/mac/WebPageProxyMac.mm:
753         (WebKit::WebPageProxy::setComposition): Deleted.
754         (WebKit::WebPageProxy::confirmComposition): Deleted.
755         (WebKit::WebPageProxy::insertText): Deleted.
756         (WebKit::WebPageProxy::insertDictatedText): Deleted.
757         (WebKit::WebPageProxy::getMarkedRange): Deleted.
758         (WebKit::WebPageProxy::getSelectedRange): Deleted.
759         (WebKit::WebPageProxy::getAttributedSubstringFromRange): Deleted.
760         (WebKit::WebPageProxy::characterIndexForPoint): Deleted.
761         (WebKit::WebPageProxy::firstRectForCharacterRange): Deleted.
762         (WebKit::WebPageProxy::executeKeypressCommands): Deleted.
763         (WebKit::WebPageProxy::cancelComposition): Deleted.
764         (WebKit::WebPageProxy::editorStateChanged): Deleted.
765         * WebProcess/WebPage/WebPage.cpp:
766         (WebKit::WebPage::didChangeSelection):
767         * WebProcess/WebPage/WebPage.h:
768         * WebProcess/WebPage/WebPage.messages.in:
769         * WebProcess/WebPage/mac/WebPageMac.mm:
770         (WebKit::WebPage::setComposition): Deleted.
771         (WebKit::WebPage::confirmComposition): Deleted.
772         (WebKit::WebPage::insertText): Deleted.
773         (WebKit::WebPage::insertDictatedText): Deleted.
774         (WebKit::WebPage::getMarkedRange): Deleted.
775         (WebKit::WebPage::getSelectedRange): Deleted.
776         (WebKit::WebPage::getAttributedSubstringFromRange): Deleted.
777         (WebKit::WebPage::characterIndexForPoint): Deleted.
778         (WebKit::WebPage::firstRectForCharacterRange): Deleted.
779         (WebKit::WebPage::executeKeypressCommands): Deleted.
780         (WebKit::WebPage::cancelComposition): Deleted.
781
782 2015-11-30  Tim Horton  <timothy_horton@apple.com>
783
784         Remove some unused synchronous drawing SPI
785         https://bugs.webkit.org/show_bug.cgi?id=151672
786
787         Reviewed by Anders Carlsson.
788
789         * UIProcess/API/Cocoa/WKViewPrivate.h:
790         * UIProcess/API/mac/WKView.mm:
791         (-[WKView forceAsyncDrawingAreaSizeUpdate:]): Deleted.
792         (-[WKView waitForAsyncDrawingAreaSizeUpdate]): Deleted.
793         * UIProcess/Cocoa/WebViewImpl.h:
794         * UIProcess/Cocoa/WebViewImpl.mm:
795         (WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate): Deleted.
796         (WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate): Deleted.
797
798 2015-11-30  Tim Horton  <timothy_horton@apple.com>
799
800         Get rid of the legacy swipe shadow style
801         https://bugs.webkit.org/show_bug.cgi?id=151671
802
803         Reviewed by Anders Carlsson.
804
805         * UIProcess/mac/ViewGestureControllerMac.mm:
806         (WebKit::ViewGestureController::beginSwipeGesture): Deleted.
807         (WebKit::ViewGestureController::handleSwipeGesture): Deleted.
808         (WebKit::ViewGestureController::removeSwipeSnapshot): Deleted.
809         It is no longer needed.
810
811 2015-11-30  Tim Horton  <timothy_horton@apple.com>
812
813         [iOS] Option-up and Option-down should scroll a little less than a full page
814         https://bugs.webkit.org/show_bug.cgi?id=151538
815         <rdar://problem/23642675>
816
817         Reviewed by Simon Fraser.
818
819         * UIProcess/ios/WKContentViewInteraction.mm:
820         (-[WKContentView _scrollOffsetForEvent:]):
821         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
822         Clean up the code a little, and adjust so that we *always* use pageStep
823         instead of just scrolling by the unobscured rect when scrolling by a page.
824         Previously, we did for the spacebar, but not for option-up and option-down.
825
826 2015-11-30  Brian Burg  <bburg@apple.com>
827
828         Web Inspector: using "Reload Web Inspector" when docked breaks dock-specific styles
829         https://bugs.webkit.org/show_bug.cgi?id=151642
830
831         Reviewed by Timothy Hatcher.
832
833         After a frontend loads, explicitly tell it about the current dock
834         state. This is necessary for force-reloading the inspector, since
835         the dock state isn't sent from UIProcess in this case.
836
837         * WebProcess/WebPage/WebInspectorUI.cpp:
838         (WebKit::WebInspectorUI::frontendLoaded):
839         (WebKit::WebInspectorUI::setDockingUnavailable):
840         * WebProcess/WebPage/WebInspectorUI.h:
841
842 2015-11-30  Alex Christensen  <achristensen@webkit.org>
843
844         Make ProcessModel always MultipleSecondaryProcesses
845         https://bugs.webkit.org/show_bug.cgi?id=151662
846
847         Reviewed by Antti Koivisto.
848
849         Single WebProcess behavior can still be achieved by setting the maximum number of WebProcesses to 1.
850
851         * Shared/API/c/WKDeprecatedFunctions.cpp:
852         (WKContextSetUsesNetworkProcess):
853         (WKContextSetProcessModel):
854         (WKContextGetProcessModel):
855         (WKGraphicsContextGetCGContext):
856         * UIProcess/API/APIProcessPoolConfiguration.cpp:
857         (API::ProcessPoolConfiguration::createWithLegacyOptions):
858         (API::ProcessPoolConfiguration::copy):
859         * UIProcess/API/APIProcessPoolConfiguration.h:
860         * UIProcess/API/C/WKAPICast.h:
861         (WebKit::toAPI):
862         (WebKit::toFontSmoothingLevel):
863         (WebKit::toProcessModel): Deleted.
864         * UIProcess/API/C/WKContext.cpp:
865         (WKContextGetCacheModel):
866         (WKContextSetMaximumNumberOfProcesses):
867         (WKContextSetProcessModel): Deleted.
868         (WKContextGetProcessModel): Deleted.
869         * UIProcess/API/C/WKContext.h:
870         * UIProcess/API/Cocoa/WKProcessGroup.mm:
871         (-[WKProcessGroup initWithInjectedBundleURL:]):
872         * UIProcess/API/Cocoa/WKProcessPool.mm:
873         * UIProcess/API/efl/ewk_context.cpp:
874         (EwkContext::cacheModel):
875         (EwkContext::setProcessModel):
876         (EwkContext::processModel):
877         (EwkContext::clearResourceCache):
878         (EwkContext::jsGlobalContext):
879         (ewk_context_message_from_extensions_callback_set):
880         (ewk_context_process_model_set):
881         (ewk_context_process_model_get):
882         (ewk_context_tls_error_policy_get):
883         (toWKProcessModel): Deleted.
884         (toEwkProcessModel): Deleted.
885         * UIProcess/API/gtk/WebKitWebContext.cpp:
886         * UIProcess/ProcessModel.h: Removed.
887         * UIProcess/WebCookieManagerProxy.cpp:
888         (WebKit::WebCookieManagerProxy::shouldTerminate):
889         (WebKit::WebCookieManagerProxy::refWebContextSupplement):
890         * UIProcess/WebInspectorProxy.cpp:
891         (WebKit::WebInspectorProxy::inspectorProcessPool):
892         * UIProcess/WebPageProxy.cpp:
893         (WebKit::WebPageProxy::reattachToWebProcess):
894         * UIProcess/WebProcessPool.cpp:
895         (WebKit::WebProcessPool::create):
896         (WebKit::WebProcessPool::setDownloadClient):
897         (WebKit::WebProcessPool::setMaximumNumberOfProcesses):
898         (WebKit::WebProcessPool::processDidCachePage):
899         (WebKit::WebProcessPool::createNewWebProcess):
900         (WebKit::WebProcessPool::disconnectProcess):
901         (WebKit::WebProcessPool::createWebPage):
902         (WebKit::WebProcessPool::postMessageToInjectedBundle):
903         (WebKit::WebProcessPool::requestWebContentStatistics):
904         (WebKit::WebProcessPool::requestNetworkingStatistics):
905         (WebKit::WebProcessPool::setProcessModel): Deleted.
906         (WebKit::WebProcessPool::ensureSharedWebProcess): Deleted.
907         * UIProcess/WebProcessPool.h:
908         (WebKit::WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary):
909         (WebKit::WebProcessPool::sendToOneProcess):
910         * WebKit2.xcodeproj/project.pbxproj:
911
912 2015-11-30  Chris Dumez  <cdumez@apple.com>
913
914         [WK2][Cache] We should not speculatively revalidate transient resources
915         https://bugs.webkit.org/show_bug.cgi?id=151402
916         <rdar://problem/23092196>
917
918         Reviewed by Antti Koivisto.
919
920         We should not speculatively revalidate transient resources. This patch
921         adds a simple and conservative algorithm to detect that a subresource is
922         transient and then ignores those when doing the speculative revalidation.
923
924         The algorithm is question marks as transient all subresources that are
925         not common to the 2 last loads of a main resource.
926
927         This is not perfect as I see the number of non-speculative revalidations
928         going up to 11-12 from 9 in the context of the warm PLT. However, it is
929         best to be conservative at first and we can improve this later.
930
931         * NetworkProcess/cache/NetworkCache.cpp:
932         (WebKit::NetworkCache::Cache::retrieve):
933         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
934         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::create):
935         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::~PendingFrameLoad):
936         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresource):
937         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::markLoadAsCompleted):
938         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::setExistingSubresourcesEntry):
939         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
940         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady):
941         (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
942         (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
943         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
944         (WebKit::NetworkCache::SpeculativeLoadManager::retrieve): Deleted.
945         (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry): Deleted.
946         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
947         * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
948         (WebKit::NetworkCache::SubresourcesEntry::encodeAsStorageRecord):
949         (WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord):
950         (WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
951         (WebKit::NetworkCache::SubresourcesEntry::updateSubresourceKeys):
952         * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
953         (WebKit::NetworkCache::SubresourcesEntry::SubresourceInfo::encode):
954         (WebKit::NetworkCache::SubresourcesEntry::SubresourceInfo::decode):
955         (WebKit::NetworkCache::SubresourcesEntry::SubresourceInfo::SubresourceInfo):
956         (WebKit::NetworkCache::SubresourcesEntry::subresources):
957
958 2015-11-30  Brent Fulgham  <bfulgham@apple.com>
959
960         [Mac] Add font service permission to the sandbox profile
961         https://bugs.webkit.org/show_bug.cgi?id=151509
962         <rdar://problem/23508753>
963
964         Reviewed by Anders Carlsson.
965
966         Update the sandbox profile for Mac WebKit to allow access to the
967         "com.apple.fonts" service.
968
969         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
970         * WebProcess/com.apple.WebProcess.sb.in:
971
972 2015-11-30  Alex Christensen  <achristensen@webkit.org>
973
974         Make usesNetworkProcess always true
975         https://bugs.webkit.org/show_bug.cgi?id=151580
976
977         Reviewed by Darin Adler.
978
979         * NetworkProcess/mac/RemoteNetworkingContext.mm:
980         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
981         * Shared/API/c/WKDeprecatedFunctions.cpp:
982         (WKInspectorToggleJavaScriptProfiling):
983         (WKContextSetUsesNetworkProcess):
984         (WKGraphicsContextGetCGContext):
985         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
986         (WebKit::CustomProtocolManager::initializeConnection):
987         (WebKit::CustomProtocolManager::initialize):
988         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
989         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
990         (WebKit::CustomProtocolManager::initialize):
991         * Shared/WebProcessCreationParameters.cpp:
992         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
993         (WebKit::WebProcessCreationParameters::encode):
994         (WebKit::WebProcessCreationParameters::decode):
995         * Shared/WebProcessCreationParameters.h:
996         * UIProcess/API/APIProcessPoolConfiguration.cpp:
997         (API::ProcessPoolConfiguration::createWithLegacyOptions):
998         (API::ProcessPoolConfiguration::copy):
999         * UIProcess/API/APIProcessPoolConfiguration.h:
1000         * UIProcess/API/C/WKContext.cpp:
1001         (WKContextSetJavaScriptGarbageCollectorTimerEnabled):
1002         (WKContextUseTestingNetworkSession):
1003         (WKContextSetUsesNetworkProcess): Deleted.
1004         * UIProcess/API/C/WKContextPrivate.h:
1005         * UIProcess/API/Cocoa/WKProcessGroup.mm:
1006         (-[WKProcessGroup initWithInjectedBundleURL:]):
1007         * UIProcess/API/efl/ewk_context.cpp:
1008         (EwkContext::setProcessModel):
1009         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1010         (WebKit::WebProcessPool::updateProcessSuppressionState):
1011         (WebKit::WebProcessPool::platformInitializeWebProcess):
1012         * UIProcess/Downloads/DownloadProxy.cpp:
1013         (WebKit::DownloadProxy::cancel):
1014         (WebKit::DownloadProxy::invalidate):
1015         * UIProcess/WebCookieManagerProxy.cpp:
1016         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
1017         (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
1018         * UIProcess/WebProcessPool.cpp:
1019         (WebKit::WebProcessPool::WebProcessPool):
1020         (WebKit::m_processSuppressionDisabledForPageCounter):
1021         (WebKit::WebProcessPool::networkingProcessConnection):
1022         (WebKit::WebProcessPool::languageChanged):
1023         (WebKit::WebProcessPool::textCheckerStateChanged):
1024         (WebKit::WebProcessPool::ensureNetworkProcess):
1025         (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
1026         (WebKit::WebProcessPool::createNewWebProcess):
1027         (WebKit::WebProcessPool::download):
1028         (WebKit::WebProcessPool::resumeDownload):
1029         (WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation):
1030         (WebKit::WebProcessPool::setCacheModel):
1031         (WebKit::WebProcessPool::createDownloadProxy):
1032         (WebKit::WebProcessPool::addMessageReceiver):
1033         (WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost):
1034         (WebKit::WebProcessPool::setHTTPPipeliningEnabled):
1035         (WebKit::WebProcessPool::requestNetworkingStatistics):
1036         (WebKit::WebProcessPool::setUsesNetworkProcess): Deleted.
1037         (WebKit::WebProcessPool::usesNetworkProcess): Deleted.
1038         * UIProcess/WebProcessPool.h:
1039         (WebKit::WebProcessPool::sendToNetworkingProcess):
1040         (WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary):
1041         * UIProcess/WebProcessProxy.cpp:
1042         (WebKit::WebProcessProxy::shutDown):
1043         (WebKit::WebProcessProxy::removeWebPage):
1044         (WebKit::WebProcessProxy::canTerminateChildProcess):
1045         (WebKit::WebProcessProxy::updateTextCheckerState):
1046         (WebKit::WebProcessProxy::didSaveToPageCache):
1047         (WebKit::WebProcessProxy::didSetAssertionState):
1048         (WebKit::WebProcessProxy::createDownloadProxy): Deleted.
1049         * UIProcess/WebProcessProxy.h:
1050         * UIProcess/efl/WebProcessPoolEfl.cpp:
1051         (WebKit::WebProcessPool::platformInitializeWebProcess):
1052         (WebKit::WebProcessPool::setIgnoreTLSErrors):
1053         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
1054         (WebKit::BlobRegistryProxy::registerFileBlobURL):
1055         (WebKit::BlobRegistryProxy::registerBlobURL):
1056         (WebKit::BlobRegistryProxy::unregisterBlobURL):
1057         (WebKit::BlobRegistryProxy::registerBlobURLForSlice):
1058         (WebKit::BlobRegistryProxy::blobSize):
1059         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1060         (WebKit::WebPlatformStrategies::cookiesForDOM):
1061         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
1062         (WebKit::WebPlatformStrategies::cookiesEnabled):
1063         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
1064         (WebKit::WebPlatformStrategies::getRawCookies):
1065         (WebKit::WebPlatformStrategies::deleteCookie):
1066         (WebKit::WebPlatformStrategies::resourceLoadScheduler):
1067         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
1068         (WebKit::WebPlatformStrategies::createPingHandle):
1069         (WebKit::WebPlatformStrategies::createBlobRegistry):
1070         * WebProcess/WebPage/WebFrame.cpp:
1071         (WebKit::WebFrame::startDownload):
1072         (WebKit::WebFrame::convertMainResourceLoadToDownload):
1073         (WebKit::WebFrame::source):
1074         * WebProcess/WebProcess.cpp:
1075         (WebKit::WebProcess::WebProcess):
1076         (WebKit::m_webSQLiteDatabaseTracker):
1077         (WebKit::WebProcess::initializeConnection):
1078         (WebKit::WebProcess::initializeWebProcess):
1079         (WebKit::WebProcess::ensureNetworkProcessConnection):
1080         (WebKit::WebProcess::destroyPrivateBrowsingSession):
1081         (WebKit::WebProcess::pluginProcessConnectionManager):
1082         (WebKit::WebProcess::shouldTerminate):
1083         (WebKit::WebProcess::setInjectedBundleParameters):
1084         (WebKit::WebProcess::networkConnection):
1085         (WebKit::WebProcess::setEnhancedAccessibility):
1086         (WebKit::WebProcess::prefetchDNS):
1087         (WebKit::WebProcess::didCreateDownload): Deleted.
1088         (WebKit::WebProcess::didDestroyDownload): Deleted.
1089         (WebKit::WebProcess::downloadProxyConnection): Deleted.
1090         (WebKit::WebProcess::downloadsAuthenticationManager): Deleted.
1091         (WebKit::WebProcess::downloadManager): Deleted.
1092         (WebKit::WebProcess::usesNetworkProcess): Deleted.
1093         (WebKit::WebProcess::downloadRequest): Deleted.
1094         (WebKit::WebProcess::resumeDownload): Deleted.
1095         (WebKit::WebProcess::cancelDownload): Deleted.
1096         * WebProcess/WebProcess.h:
1097         (WebKit::WebProcess::textCheckerState):
1098         (WebKit::WebProcess::eventDispatcher):
1099         * WebProcess/WebProcess.messages.in:
1100         * WebProcess/soup/WebProcessSoup.cpp:
1101         (WebKit::WebProcess::platformSetCacheModel):
1102         (WebKit::WebProcess::platformClearResourceCaches):
1103         (WebKit::WebProcess::platformInitializeWebProcess):
1104         (WebKit::WebProcess::platformTerminate):
1105         (WebKit::getCacheDiskFreeSize): Deleted.
1106         (WebKit::setSoupSessionAcceptLanguage): Deleted.
1107         (WebKit::languageChanged): Deleted.
1108         (WebKit::WebProcess::setIgnoreTLSErrors): Deleted.
1109         (WebKit::WebProcess::allowSpecificHTTPSCertificateForHost): Deleted.
1110
1111 2015-11-30  Carlos Garcia Campos  <cgarcia@igalia.com>
1112
1113         [GTK] UI process crash when the screensaver DBus proxy is being created while the web view is destroyed
1114         https://bugs.webkit.org/show_bug.cgi?id=151653
1115
1116         Reviewed by Martin Robinson.
1117
1118         We correctly cancel the proxy creation, but when the async ready
1119         callback is called, the view could be destroyed already. In that
1120         case g_dbus_proxy_new_for_bus_finish() will return nullptr and
1121         fail with cancelled error, but we are using the passed web view
1122         without checking first if the creation failed or not.
1123
1124         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1125         (screenSaverProxyCreatedCallback):
1126
1127 2015-11-28  Tim Horton  <timothy_horton@apple.com>
1128
1129         Stop unnecessarily copying WKWebViewConfiguration in a few places
1130         https://bugs.webkit.org/show_bug.cgi?id=151639
1131
1132         Reviewed by Dan Bernstein.
1133
1134         * UIProcess/API/Cocoa/WKWebView.mm:
1135         (-[WKWebView initWithFrame:configuration:]):
1136         (-[WKWebView dealloc]):
1137         (-[WKWebView _contentProviderRegistry]):
1138         (-[WKWebView _selectionGranularity]):
1139         (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
1140         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1141         * UIProcess/ios/PageClientImplIOS.mm:
1142         (WebKit::PageClientImpl::mimeTypesWithCustomContentProviders):
1143         * UIProcess/ios/WKContentViewInteraction.mm:
1144         (-[WKContentView setupInteraction]):
1145         (-[WKContentView _stopAssistingKeyboard]):
1146         Looking at allocation traces I noticed that we were making way more
1147         WKWebViewConfigurations than made sense; looking at backtraces I found
1148         a few internal callers of -[WKWebView configuration], which copies the
1149         configuration. There's no reason for these internal callers to make 
1150         such a copy, though.
1151
1152         I'm not exactly sure what the usual approach is here, but I added
1153         getters so WKContentViewInteraction and PageClientImplIOS can get to
1154         the values they're looking for without using the configuration property.
1155
1156 2015-11-27  Brady Eidson  <beidson@apple.com>
1157
1158         Modern IDB: Class-ify IDBGetResult making it impossible to get the data members wrong.
1159         https://bugs.webkit.org/show_bug.cgi?id=151627
1160
1161         Reviewed by Alexey Proskuryakov.
1162
1163         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1164         (WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
1165         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1166         
1167         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1168         
1169         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1170         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getIndexRecord):
1171         
1172         * Shared/WebCoreArgumentCoders.cpp:
1173         (IPC::ArgumentCoder<IDBGetResult>::encode):
1174         (IPC::ArgumentCoder<IDBGetResult>::decode):
1175         * Shared/WebCoreArgumentCoders.h:
1176         
1177         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
1178
1179 2015-11-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1180
1181         [GTK] Remove the remaining uses of GMainLoopSource
1182         https://bugs.webkit.org/show_bug.cgi?id=151632
1183
1184         Reviewed by Žan Doberšek.
1185
1186         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1187         (_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate):
1188         (_WebKitWebViewBasePrivate::clearRedirectedWindowSoonTimerFired):
1189         (webkitWebViewBaseClearRedirectedWindowSoon):
1190         (webkitWebViewBaseEnterAcceleratedCompositingMode):
1191
1192 2015-11-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1193
1194         [GTK] Use the network process unconditionally
1195         https://bugs.webkit.org/show_bug.cgi?id=151541
1196
1197         Reviewed by Alex Christensen.
1198
1199         Make the shared secondary process model become multiple secondary
1200         process model with a limit of 1 web process. Use the same options
1201         when creating a context with legacy configuration (unit tests and
1202         inspector proxy).
1203
1204         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
1205         * UIProcess/API/APIProcessPoolConfiguration.cpp:
1206         (API::ProcessPoolConfiguration::createWithLegacyOptions):
1207         * UIProcess/API/gtk/WebKitWebContext.cpp:
1208         (webkitWebContextConstructed):
1209         (webkit_web_context_set_process_model):
1210         (webkit_web_context_get_process_model):
1211         (webkit_web_context_set_web_process_count_limit):
1212         (webkit_web_context_get_web_process_count_limit):
1213         (toWebKitProcessModel): Deleted.
1214         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1215         * UIProcess/gtk/WebProcessPoolGtk.cpp:
1216         (WebKit::WebProcessPool::setIgnoreTLSErrors):
1217         (WebKit::WebProcessPool::platformInitializeWebProcess):
1218
1219 2015-11-23  Brian Burg  <bburg@apple.com>
1220
1221         Web Inspector: inspector settings should not be shared between different inspection levels
1222         https://bugs.webkit.org/show_bug.cgi?id=151151
1223
1224         Reviewed by Timothy Hatcher.
1225
1226         In WebKit2, we already track the inspection level of WebPages in order to give inspectors
1227         different page groups. Send the inspection level to WebInspectorUI WebProcess when
1228         establishing a connection from the UIProcess. Use this number in the FrontendClient.
1229
1230         * UIProcess/WebInspectorProxy.cpp:
1231         (WebKit::WebInspectorProxy::inspectionLevel): Renamed from inspectorLevel to be consistent.
1232         (WebKit::WebInspectorProxy::inspectorPageGroupIdentifier):
1233         (WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess):
1234         (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
1235         (WebKit::WebInspectorProxy::createInspectorPage):
1236         (WebKit::WebInspectorProxy::inspectorLevel): Deleted.
1237         * UIProcess/WebInspectorProxy.h:
1238         * UIProcess/mac/WebInspectorProxyMac.mm:
1239         (WebKit::WebInspectorProxy::updateInspectorWindowTitle):
1240         * WebProcess/WebPage/WebInspectorUI.cpp:
1241         (WebKit::WebInspectorUI::establishConnection):
1242         * WebProcess/WebPage/WebInspectorUI.h:
1243         * WebProcess/WebPage/WebInspectorUI.messages.in:
1244
1245 2015-11-23  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1246
1247         REGRESSION(r188206): [EFL] Missing to adjust scrollbar size to ewk_view_contents_size_get API test
1248         https://bugs.webkit.org/show_bug.cgi?id=148735
1249
1250         Reviewed by Csaba Osztrogonác.
1251
1252         r189256 missed to adjust scrollbar size to other tests in ewk_view_contents_size_get() API test.
1253         In this case we need to apply scrollbar size to both width and height unlike previous fix. Because
1254         horizontal scrollbar is also shown since device pixel ratio(= 2.0) is adjusted.
1255
1256         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1257         (TEST_F):
1258
1259 2015-11-23  Alex Christensen  <achristensen@webkit.org>
1260
1261         Fix crash in ~WebProcessPool when using Geolocation with useNetworkProcess=true
1262         https://bugs.webkit.org/show_bug.cgi?id=151532
1263
1264         Reviewed by Benjamin Poulain.
1265
1266         * UIProcess/WebGeolocationManagerProxy.cpp:
1267         (WebKit::WebGeolocationManagerProxy::processPoolDestroyed):
1268         (WebKit::WebGeolocationManagerProxy::processDidClose):
1269         When a WebProcessPool is destroyed, only call stopUpdating if m_updateRequesters.clear()
1270         stopped the updating, like we do in WebGeolocationManagerProxy::removeRequester.
1271         Otherwise, call setEnableHighAccuracy if needed, also like we do in WebGeolocationManagerProxy::removeRequester.
1272
1273 2015-11-23  Brian Burg  <bburg@apple.com>
1274
1275         Web Inspector: when inspecting the inspector, add the inspection level to the title bar
1276         https://bugs.webkit.org/show_bug.cgi?id=151555
1277
1278         Reviewed by Timothy Hatcher.
1279
1280         If the inspection level says we are inspecting an inspector, include the level
1281         in the title bar to easily disambiguate it from the base level inspector.
1282
1283         * UIProcess/mac/WebInspectorProxyMac.mm:
1284         (WebKit::WebInspectorProxy::updateInspectorWindowTitle):
1285
1286 2015-11-23  Csaba Osztrogonác  <ossy@webkit.org>
1287
1288         Unreviewed speculative buildfix after r192701.
1289
1290         * PlatformMac.cmake:
1291
1292 2015-11-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1293
1294         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.11.2 release.
1295
1296         * gtk/NEWS: Add release notes for 2.11.2.
1297
1298 2015-11-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1299
1300         Unreviewed. Add missing inspector file to GTK+ compilation.
1301
1302         * PlatformGTK.cmake:
1303
1304 == Rolled over to ChangeLog-2015-11-21 ==