[Cocoa] Migrate WKSetPatternPhaseInUserSpace() and WKGetUserToBaseCTM() from WKSI
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-10-22  Myles C. Maxfield  <mmaxfield@apple.com>
2
3         [Cocoa] Migrate WKSetPatternPhaseInUserSpace() and WKGetUserToBaseCTM() from WKSI
4         https://bugs.webkit.org/show_bug.cgi?id=150460
5
6         Reviewed by Tim Horton.
7
8         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
9         (InitWebCoreSystemInterface): Deleted.
10
11 2015-10-22  Alex Christensen  <achristensen@webkit.org>
12
13         Initial NSURLSession WebResourceLoader implementation
14         https://bugs.webkit.org/show_bug.cgi?id=150355
15
16         Reviewed by Antti Koivisto.
17
18         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
19         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
20         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
21         * NetworkProcess/NetworkResourceLoader.cpp:
22         (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
23         (WebKit::NetworkResourceLoader::startNetworkLoad):
24         (WebKit::NetworkResourceLoader::setDefersLoading):
25         (WebKit::NetworkResourceLoader::cleanup):
26         (WebKit::NetworkResourceLoader::didConvertHandleToDownload):
27         (WebKit::NetworkResourceLoader::abort):
28         (WebKit::NetworkResourceLoader::willPerformHTTPRedirection):
29         (WebKit::NetworkResourceLoader::didReceiveChallenge):
30         (WebKit::NetworkResourceLoader::didReceiveResponse):
31         (WebKit::NetworkResourceLoader::didReceiveData):
32         (WebKit::NetworkResourceLoader::didCompleteWithError):
33         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
34         (WebKit::NetworkResourceLoader::willSendRequestAsync):
35         (WebKit::NetworkResourceLoader::continueWillSendRequest):
36         (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
37         (WebKit::NetworkResourceLoader::didSendData):
38         (WebKit::NetworkResourceLoader::receivedCancellation):
39         (WebKit::NetworkResourceLoader::startBufferingTimerIfNeeded):
40         (WebKit::NetworkResourceLoader::bufferingTimerFired):
41         (WebKit::NetworkResourceLoader::validateCacheEntry):
42         (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
43         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
44         (WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
45         (WebKit::NetworkResourceLoader::supportsDataArray):
46         * NetworkProcess/NetworkResourceLoader.h:
47         (WebKit::NetworkResourceLoader::create):
48         (WebKit::NetworkResourceLoader::currentRequest):
49         (WebKit::NetworkResourceLoader::handle):
50         * NetworkProcess/NetworkSession.h: Added.
51         (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
52         (WebKit::NetworkingDataTask::client):
53         (WebKit::NetworkingDataTask::clearClient):
54         (WebKit::NetworkSession::~NetworkSession):
55         * NetworkProcess/cocoa/NetworkSessionCocoa.mm: Added.
56         (toNSURLSessionResponseDisposition):
57         (toNSURLSessionAuthChallengeDisposition):
58         (-[NetworkSessionDelegate initWithNetworkSession:]):
59         (-[NetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
60         (-[NetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
61         (-[NetworkSessionDelegate URLSession:task:didCompleteWithError:]):
62         (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
63         (-[NetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
64         (WebKit::NetworkSession::create):
65         (WebKit::NetworkSession::singleton):
66         (WebKit::configurationForType):
67         (WebKit::NetworkSession::NetworkSession):
68         (WebKit::NetworkSession::createDataTaskWithRequest):
69         (WebKit::NetworkSession::dataTaskForIdentifier):
70         (WebKit::NetworkingDataTask::NetworkingDataTask):
71         (WebKit::NetworkingDataTask::~NetworkingDataTask):
72         (WebKit::NetworkingDataTask::suspend):
73         (WebKit::NetworkingDataTask::resume):
74         (WebKit::NetworkingDataTask::taskIdentifier):
75         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
76         (WebKit::NetworkResourceLoader::willCacheResponseAsync):
77         * WebKit2.xcodeproj/project.pbxproj:
78         * config.h:
79
80 2015-10-22  Philippe Normand  <pnormand@igalia.com>
81
82         Unreviewed, GTK build fix for disabled redirected XComposite window support.
83
84         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Add USE(REDIRECTED_XCOMPOSITE_WINDOW) guards.
85         * UIProcess/DrawingAreaProxyImpl.h: Mark virtual methods as override to avoid compilation warnings.
86
87 2015-10-22  Wenson Hsieh  <wenson_hsieh@apple.com>
88
89         Implement touch-action: manipulation; for iOS
90         https://bugs.webkit.org/show_bug.cgi?id=149854
91         <rdar://problem/23017145>
92
93         Reviewed by Benjamin Poulain.
94
95         Implements the manipulation value for the CSS property touch-action. Performs hit-testing upon receiving a potential
96         tap to determine whether to disable double-tap gesture recognition over the duration of the tap. If so, sends a message
97         from the web process to the UI process indicating that double-tapping should be disabled, allowing single taps to
98         avoid the delay.
99
100         * WebProcess/WebPage/ios/WebPageIOS.mm:
101         (WebKit::WebPage::potentialTapAtPosition):
102
103 2015-10-22  Ryosuke Niwa  <rniwa@webkit.org>
104
105         REGRESSION (r181972): Scroll position changes to top of youtube page when switching tabs
106         https://bugs.webkit.org/show_bug.cgi?id=150428
107
108         Reviewed by Antti Koivisto.
109
110         Call updateFocusAppearance with RevealMode::DoNotReveal to avoid revealing the focused element.
111
112         * WebProcess/WebPage/WebPage.cpp:
113         (WebKit::WebPage::restoreSelectionInFocusedEditableElement):
114
115 2015-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
116
117         Unreviewed. Fix a crash in GTk+ after r191402.
118
119         Since r191402 WebContextMenuProxy is no longer refcounted, and
120         std::unique_ptr is used instead. This means that when we show the
121         context menu for the second time in a web view, a new
122         WebContextMenuProxy is created and the previous one is
123         destroyed. We were setting the active context menu of the WebView
124         in the constructor of WebContextMenuProxy, and unsetting it in the
125         destructor. Now the constructor of the new WebContextMenuProxy
126         happens before the destructor of the current one that unsets the
127         WebView active context menu. This patch simply makes the web view
128         unset its active context menu when it's unmapped and a new one
129         hasn't been set.
130
131         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
132         (activeContextMenuUnmapped):
133         (webkitWebViewBaseSetActiveContextMenuProxy):
134         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
135         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
136
137 2015-10-22  Hunseop Jeong  <hs85.jeong@samsung.com>
138
139         [GTK] Try to fix the build after r191402.
140         https://bugs.webkit.org/show_bug.cgi?id=150435
141
142         Reviewed by Carlos Garcia Campos.
143
144         * UIProcess/API/gtk/PageClientImpl.cpp:
145         (WebKit::PageClientImpl::createPopupMenuProxy):
146         (WebKit::PageClientImpl::createContextMenuProxy):
147         (WebKit::PageClientImpl::createColorPicker):
148         * UIProcess/API/gtk/PageClientImpl.h:
149         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
150         (WebKit::WebContextMenuProxyGtk::populate):
151         (WebKit::WebContextMenuProxyGtk::show):
152         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
153         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
154         (WebKit::WebContextMenuProxyGtk::menuPositionFunction):
155         (WebKit::WebContextMenuProxyGtk::showContextMenu): Deleted.
156         (WebKit::WebContextMenuProxyGtk::hideContextMenu): Deleted.
157         (WebKit::WebContextMenuProxyGtk::cancelTracking): Deleted.
158         * UIProcess/gtk/WebContextMenuProxyGtk.h:
159         (WebKit::WebContextMenuProxyGtk::gtkMenu):
160         (WebKit::WebContextMenuProxyGtk::create): Deleted.
161
162 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
163
164        Unreviewed EFL build fix. Remove customizeMenu implementation.
165
166         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
167         (WebKit::WebContextMenuClient::customizeMenu): Deleted.
168
169 2015-10-21  Alex Christensen  <achristensen@webkit.org>
170
171         Speculative EFL build fix.
172
173         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
174         Remove another customizeMenu call.
175
176 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
177
178         [EFL][GTK][WK2] Fix build break since r191402, r191401
179         https://bugs.webkit.org/show_bug.cgi?id=150432
180
181         Unreviewed EFL and GTK build fix.
182
183         * CMakeLists.txt:
184         * UIProcess/CoordinatedGraphics/WebView.cpp:
185         (WebKit::WebView::createContextMenuProxy):
186         * UIProcess/CoordinatedGraphics/WebView.h:
187         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
188         (WebKit::WebContextMenuProxyEfl::show):
189         * UIProcess/efl/WebContextMenuProxyEfl.h:
190         (WebKit::WebContextMenuProxyEfl::create): Deleted.
191         * UIProcess/efl/WebViewEfl.cpp:
192         (WebKit::WebViewEfl::createContextMenuProxy):
193         * UIProcess/efl/WebViewEfl.h:
194         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
195         (WebKit::WebContextMenuClient::customizeMenu):
196         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
197
198 2015-10-21  Anders Carlsson  <andersca@apple.com>
199
200         Get rid of WebContextMenuClient::customizeMenu, it's no longer used
201         https://bugs.webkit.org/show_bug.cgi?id=150427
202
203         Reviewed by Tim Horton.
204
205         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
206         (WebKit::WebContextMenuClient::customizeMenu): Deleted.
207         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
208
209 2015-10-21  Tim Horton  <timothy_horton@apple.com>
210
211         API-ify the FindMatches client
212         https://bugs.webkit.org/show_bug.cgi?id=150422
213
214         Reviewed by Anders Carlsson.
215
216         * UIProcess/API/APIFindMatchesClient.h: Renamed from Source/WebKit2/UIProcess/WebFindClient.h.
217         (API::FindMatchesClient::~FindMatchesClient):
218         (API::FindMatchesClient::didFindStringMatches):
219         (API::FindMatchesClient::didGetImageForMatchResult):
220         * UIProcess/API/C/WKPage.cpp:
221         (WKPageSetPageFindMatchesClient):
222         * UIProcess/WebFindClient.cpp: Removed.
223         * UIProcess/WebPageProxy.cpp:
224         (WebKit::WebPageProxy::WebPageProxy):
225         (WebKit::WebPageProxy::setFindMatchesClient):
226         (WebKit::WebPageProxy::close):
227         (WebKit::WebPageProxy::didGetImageForFindMatch):
228         (WebKit::WebPageProxy::didFindStringMatches):
229         (WebKit::WebPageProxy::initializeFindMatchesClient): Deleted.
230         * UIProcess/WebPageProxy.h:
231         (WebKit::WebPageProxy::findMatchesClient):
232         * WebKit2.xcodeproj/project.pbxproj:
233
234 2015-10-21  Enrica Casucci  <enrica@apple.com>
235
236         WebProcess crashes when accessibility bundle is not found.
237         https://bugs.webkit.org/show_bug.cgi?id=150414
238
239         Reviewed by Dan Bernstein.
240
241         The uninitialized pointer to NSError causes the print function to crash.
242
243         * WebProcess/cocoa/WebProcessCocoa.mm:
244         (WebKit::registerWithAccessibility):
245
246 2015-10-21  Anders Carlsson  <andersca@apple.com>
247
248         Move services menu handling out into a separate function
249         https://bugs.webkit.org/show_bug.cgi?id=150420
250
251         Reviewed by Tim Horton.
252
253         * UIProcess/mac/WebContextMenuProxyMac.h:
254         * UIProcess/mac/WebContextMenuProxyMac.mm:
255         (WebKit::WebContextMenuProxyMac::showServicesMenu):
256         (WebKit::WebContextMenuProxyMac::show):
257         (WebKit::WebContextMenuProxyMac::showContextMenu):
258         (WebKit::WebContextMenuProxyMac::populate): Deleted.
259
260 2015-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>
261
262         Single tapping clickable elements in unscalable pages should show a tap highlight
263         https://bugs.webkit.org/show_bug.cgi?id=150382
264
265         Reviewed by Simon Fraser.
266
267         When the double tap gesture recognizer is disabled ahead of time (as in the case of unscalable pages) the tap is
268         committed before the geometries come in. To fix this, we introduce a flag that allows the single tap to be
269         committed before the tap highlight arrives. This allows the tap highlight to be immediately animated when receiving
270         the tap highlight geometries only in the case where double tapping is disabled when recognizing the single tap.
271
272         * UIProcess/ios/WKContentViewInteraction.h:
273         * UIProcess/ios/WKContentViewInteraction.mm:
274         (-[WKContentView setupInteraction]):
275         (-[WKContentView cleanupInteraction]):
276         (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
277         (-[WKContentView _singleTapRecognized:]):
278         (-[WKContentView _singleTapCommited:]):
279
280 2015-10-21  Anders Carlsson  <andersca@apple.com>
281
282         Get rid of useBinaryEncoding from WKPageGetContentsAsMHTMLData
283         https://bugs.webkit.org/show_bug.cgi?id=150417
284
285         Reviewed by Tim Horton.
286
287         The useBinaryEncoding parameter is always false, so just get rid of it.
288
289         * UIProcess/API/C/WKPage.cpp:
290         (WKPageGetContentsAsMHTMLData):
291         * UIProcess/API/C/WKPage.h:
292         * UIProcess/API/efl/ewk_view.cpp:
293         (ewk_view_page_contents_get):
294         * UIProcess/API/gtk/WebKitWebView.cpp:
295         (webkit_web_view_save):
296         (webkit_web_view_save_to_file):
297         * UIProcess/WebPageProxy.cpp:
298         (WebKit::WebPageProxy::getContentsAsMHTMLData):
299         * UIProcess/WebPageProxy.h:
300         * WebProcess/WebPage/WebPage.cpp:
301         (WebKit::WebPage::getContentsAsMHTMLData):
302         * WebProcess/WebPage/WebPage.h:
303         * WebProcess/WebPage/WebPage.messages.in:
304
305 2015-10-21  Anders Carlsson  <andersca@apple.com>
306
307         WebContextMenuProxyMac::setupServicesMenu doesn't need to take a context parameter
308         https://bugs.webkit.org/show_bug.cgi?id=150418
309
310         Reviewed by Tim Horton.
311
312         * UIProcess/mac/WebContextMenuProxyMac.h:
313         * UIProcess/mac/WebContextMenuProxyMac.mm:
314         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
315         (WebKit::WebContextMenuProxyMac::populate):
316
317 2015-10-21  Anders Carlsson  <andersca@apple.com>
318
319         WebContextMenuProxy doesn't have to be ref-counted
320         https://bugs.webkit.org/show_bug.cgi?id=150415
321
322         Reviewed by Tim Horton.
323
324         Change WebContextMenuProxy to not inherit from RefCounted. Instead of using RefPtr, use std::unique_ptr.
325         Get rid of cancelTracking and hideContextMenu and dismiss the menu whenever the menu proxy is destroyed.
326         Also, rename showContextMenu to show.
327
328         * UIProcess/PageClient.h:
329         * UIProcess/WebContextMenuProxy.h:
330         (WebKit::WebContextMenuProxy::cancelTracking): Deleted.
331         * UIProcess/WebPageProxy.cpp:
332         (WebKit::WebPageProxy::close):
333         (WebKit::WebPageProxy::internalShowContextMenu):
334         * UIProcess/WebPageProxy.h:
335         * UIProcess/ios/PageClientImplIOS.h:
336         * UIProcess/ios/PageClientImplIOS.mm:
337         (WebKit::PageClientImpl::createContextMenuProxy):
338         * UIProcess/mac/PageClientImpl.h:
339         * UIProcess/mac/PageClientImpl.mm:
340         (WebKit::PageClientImpl::createContextMenuProxy):
341         * UIProcess/mac/WebContextMenuProxyMac.h:
342         (WebKit::WebContextMenuProxyMac::create): Deleted.
343         * UIProcess/mac/WebContextMenuProxyMac.mm:
344         (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
345         (WebKit::WebContextMenuProxyMac::show):
346         (WebKit::WebContextMenuProxyMac::showContextMenu): Deleted.
347         (WebKit::WebContextMenuProxyMac::hideContextMenu): Deleted.
348         (WebKit::WebContextMenuProxyMac::cancelTracking): Deleted.
349
350 2015-10-21  Anders Carlsson  <andersca@apple.com>
351
352         Stop using a popup menu button cell(!) for context menus
353         https://bugs.webkit.org/show_bug.cgi?id=150413
354
355         Reviewed by Tim Horton.
356
357         Just use a regular NSMenu. Also, have the service menu code path store the service menu
358         in the same member variable.
359
360         * UIProcess/mac/WebContextMenuProxyMac.h:
361         * UIProcess/mac/WebContextMenuProxyMac.mm:
362         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
363         (WebKit::WebContextMenuProxyMac::clearServicesMenu):
364         (WebKit::WebContextMenuProxyMac::populate):
365         (WebKit::WebContextMenuProxyMac::showContextMenu):
366         (WebKit::WebContextMenuProxyMac::hideContextMenu):
367         (WebKit::WebContextMenuProxyMac::cancelTracking):
368         (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac): Deleted.
369
370 2015-10-21  Chris Dumez  <cdumez@apple.com>
371
372         Add assertions to NetworkCache::Entry constructor to make sure a key's type is "resource"
373         https://bugs.webkit.org/show_bug.cgi?id=150369
374
375         Reviewed by Antti Koivisto.
376
377         Add assertions to NetworkCache::Entry constructor to make sure a key's
378         type is "resource" now that the NetworkCache storage supports other
379         types of entries.
380
381         * NetworkProcess/cache/NetworkCacheEntry.cpp:
382         (WebKit::NetworkCache::Entry::Entry):
383
384 2015-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
385
386         NetworkProcess: DNS prefetch happens in the Web Process
387         https://bugs.webkit.org/show_bug.cgi?id=147824
388
389         Reviewed by Chris Dumez.
390
391         DNS prefetch requests started in the WebProcess should be sent to
392         the network process when it's enabled.
393
394         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
395         (WebKit::NetworkConnectionToWebProcess::prefetchDNS): Use NetworkProcess::prefetchDNS().
396         * NetworkProcess/NetworkConnectionToWebProcess.h:
397         * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Add
398         PrefetchDNS message.
399         * NetworkProcess/NetworkProcess.cpp:
400         (WebKit::NetworkProcess::prefetchDNS): Do the actual DNS prefetch.
401         * NetworkProcess/NetworkProcess.h:
402         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
403         (webkitWebExtensionDidReceiveMessage): Use WebProcess::prefetchDNS().
404         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
405         (WebKit::WebFrameLoaderClient::prefetchDNS): Use WebProcess::prefetchDNS().
406         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
407         * WebProcess/WebPage/ios/WebPageIOS.mm:
408         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Use
409         FrameLoaderClient to do the DNS prefetch.
410         * WebProcess/WebProcess.cpp:
411         (WebKit::WebProcess::WebProcess): Initialize the DNS prefetched
412         hosts cleanup hysteresis activity. Clear the cache of DNS
413         prefetched when hysteresis activity stopped.
414         (WebKit::WebProcess::prefetchDNS): Send the request to the network
415         process if it's enabled, otherwise do the actual DNS prefetch.
416         * WebProcess/WebProcess.h:
417
418 2015-10-20  Chris Dumez  <cdumez@apple.com>
419
420         [WK2] Generalize NetworkCacheStorage API so it can store different types of metadata
421         https://bugs.webkit.org/show_bug.cgi?id=150221
422         <rdar://problem/23149771>
423
424         Reviewed by Darin Adler and Antti Koivisto.
425
426         Generalize NetworkCacheStorage API so it can store different types of
427         metadata alongside the network resources. This is a pre-requirement to
428         making our NetworkCache smarter by storing information about the
429         resources.
430
431         To keep the code simple, the entry type is now part of the entry key and
432         we store records of a specific type in a 'type' subfolder. The cache
433         structure looks like so:
434         - WebKitCache/Version 5/[Partition]/[Type]/[Hash]
435         - WebKitCache/Version 5/[Partition]/[Type]/[Hash]-blob (Optional)
436
437         Existing cache entries now that the 'resource' type as these are network
438         resources.
439
440         * NetworkProcess/cache/NetworkCache.cpp:
441         * NetworkProcess/cache/NetworkCacheKey.cpp:
442         * NetworkProcess/cache/NetworkCacheKey.h:
443         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
444         * NetworkProcess/cache/NetworkCacheStorage.cpp:
445         * NetworkProcess/cache/NetworkCacheStorage.h:
446
447 2015-10-20  Hunseop Jeong  <hs85.jeong@samsung.com>
448
449         [EFL] ContextMenu doesn't work correctly on MiniBrowser after r191194.
450         https://bugs.webkit.org/show_bug.cgi?id=150311
451
452         Reviewed by Gyuyoung Kim.
453
454         Restore the test_ewk2_context_menu API test to check the context menu whether it works correctly.
455
456         * PlatformEfl.cmake:
457
458 2015-10-13  Conrad Shultz  <conrad_shultz@apple.com>
459
460         _WKThumbnailView should support a snapshot-only mode
461         https://bugs.webkit.org/show_bug.cgi?id=150106
462
463         Reviewed by Tim Horton.
464
465         Add a new property to _WKThumbnailView, exclusivelyUsesSnapshot, which causes _WKThumbnailView
466         to bypass both layer tree reparenting and event suppression on the associated WKView.
467
468         Add a new method, -requestSnapshot, which clients can use to force _WKThumbnailView to refresh
469         on demand.
470
471         * UIProcess/API/Cocoa/_WKThumbnailView.h:
472         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
473         (-[_WKThumbnailView requestSnapshot]):
474         Extracted from -_requestSnapshotIfNeeded:.
475         (-[_WKThumbnailView _viewWasUnparented]):
476         (-[_WKThumbnailView _viewWasParented]):
477         (-[_WKThumbnailView _requestSnapshotIfNeeded]):
478
479 2015-10-20  Alexey Proskuryakov  <ap@apple.com>
480
481         Build fix.
482
483         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
484         * UIProcess/ios/forms/WKFileUploadPanel.mm:
485
486 2015-10-20  Joseph Pecoraro  <pecoraro@apple.com>
487
488         ASSERT when right clicking on SVG Image generating Share menu - can break Web Inspector
489         https://bugs.webkit.org/show_bug.cgi?id=150374
490
491         Reviewed by Brian Burg.
492
493         When there is no absolute URL or downloadable media URL no system share
494         menu is created, but we were still appending the null context menu to
495         the list of context menu items.
496
497         * UIProcess/mac/WebContextMenuProxyMac.mm:
498         (WebKit::WebContextMenuProxyMac::shareMenuItem):
499         Bail early if the context menu is null.
500
501         (WebKit::WebContextMenuProxyMac::showContextMenu):
502         Only append the share context menu item if it is non-null.
503         This matches ContextMenuController.cpp in WebCore.
504
505 2015-10-20  Commit Queue  <commit-queue@webkit.org>
506
507         Unreviewed, rolling out r191306.
508         https://bugs.webkit.org/show_bug.cgi?id=150371
509
510         "May have caused a significant warm PLT regression" (Requested
511         by cdumez_ on #webkit).
512
513         Reverted changeset:
514
515         "[WK2] Generalize NetworkCacheStorage API so it can store
516         different types of metadata"
517         https://bugs.webkit.org/show_bug.cgi?id=150221
518         http://trac.webkit.org/changeset/191306
519
520 2015-10-20  Tim Horton  <timothy_horton@apple.com>
521
522         Try to fix the build by disabling MAC_GESTURE_EVENTS on 10.9 and 10.10
523
524         * Configurations/FeatureDefines.xcconfig:
525
526 2015-10-20  Commit Queue  <commit-queue@webkit.org>
527
528         Unreviewed, rolling out r191333.
529         https://bugs.webkit.org/show_bug.cgi?id=150362
530
531         Caused assertions on regression tests (Requested by ap on
532         #webkit).
533
534         Reverted changeset:
535
536         "ERROR: Unhandled web process message
537         'StorageAreaMap:DispatchStorageEvent'"
538         https://bugs.webkit.org/show_bug.cgi?id=150315
539         http://trac.webkit.org/changeset/191333
540
541 2015-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
542
543         [UNIX] ASSERTION FAILED: m_shouldWaitForSyncReplies in Connection::connectionDidClose()
544         https://bugs.webkit.org/show_bug.cgi?id=150361
545
546         Reviewed by Martin Robinson.
547
548         It doesn't always happen because it depends on how sockets are
549         closed, and the state of the threads. The problem is that we are
550         not handling the case when the read fails because we closed the
551         connection. In that case we log the error and call
552         Connection::connectionDidClose(). But it was connectionDidClose()
553         the one closing the socket. So, in this particular case it's not an
554         error but a normal termination, and we shouldn't try to close the
555         connection again. Something similar can happen while sending a
556         message, and we get a broken pipe error, but in that case we are
557         only printing the error, so it's harmless.
558
559         * Platform/IPC/unix/ConnectionUnix.cpp:
560         (IPC::Connection::readyReadHandler): Only print error and call
561         connectionDidClose() if we are still connected when read fails.
562         (IPC::Connection::sendOutgoingMessage): Only print error if we are
563         still connected when send fails.
564
565 2015-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
566
567         [GTK] Graphics corruption when entering/leaving AC mode quickly
568         https://bugs.webkit.org/show_bug.cgi?id=150323
569
570         Reviewed by Mario Sanchez Prada.
571
572         The UI process is notified when entering accelerated compositing
573         mode after the layers have been flushed and rendered to avoid
574         flickering. However, this is producing flickering in the GTK+
575         port, because we use an offscreen redirected window that is
576         resized to a minimium size to save memory when not in AC mode. The
577         web process always uses the current size of the redirected window,
578         so when entering AC mode, contents are rendered into the 1x1
579         window, then the UI process is notified, the redirected window is
580         resized to its actual size, and we force a resize to ask the web
581         process to render again, now at the correct size. Rendering at 1x1
582         and then resizing the window is what produces the flickering when
583         entering AC mode, but it's also inefficient, since we need to
584         render again after the redirected window is resized. So, this
585         patch adds a WillEnterAcceleratedCompositing message that is sent
586         to the UI process when the layer tree host is created but before
587         the contents have been composited and rendered. This is
588         implemented by the GTK+ port to prepare for entering AC mode, by
589         resizing the redirected window. When we actually enter AC mode,
590         the contents have already been rendered in the web process at the
591         correct size, so we can just use the redirected window surface
592         instead of the drawing area one, and paint in the web view without
593         any flickering. We no longer need the forceResize either.
594         When leaving accelerated compositing mode, we now clear the redirected
595         window resources after a short delay. This ensures that we have
596         already rendered the update sent in the ExitAcceleratedCompositingMode
597         message, but also that entering/leaving AC mode quickly doesn't
598         produce any redirected window resize.
599
600         * UIProcess/API/gtk/PageClientImpl.cpp:
601         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
602         * UIProcess/API/gtk/PageClientImpl.h:
603         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
604         (webkitWebViewBaseClearRedirectedWindowSoon):
605         (webkitWebViewBaseWillEnterAcceleratedCompositingMode):
606         (webkitWebViewBaseEnterAcceleratedCompositingMode):
607         (webkitWebViewBaseExitAcceleratedCompositingMode):
608         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
609         * UIProcess/CoordinatedGraphics/WebView.h:
610         * UIProcess/DrawingAreaProxy.h:
611         (WebKit::DrawingAreaProxy::willEnterAcceleratedCompositingMode):
612         * UIProcess/DrawingAreaProxy.messages.in:
613         * UIProcess/DrawingAreaProxyImpl.cpp:
614         (WebKit::DrawingAreaProxyImpl::willEnterAcceleratedCompositingMode):
615         * UIProcess/DrawingAreaProxyImpl.h:
616         (WebKit::DrawingAreaProxyImpl::forceResize): Deleted.
617         * UIProcess/PageClient.h:
618         * UIProcess/WebPageProxy.cpp:
619         (WebKit::WebPageProxy::willEnterAcceleratedCompositingMode):
620         * UIProcess/WebPageProxy.h:
621         * UIProcess/ios/PageClientImplIOS.h:
622         * UIProcess/ios/PageClientImplIOS.mm:
623         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
624         * UIProcess/mac/PageClientImpl.h:
625         * UIProcess/mac/PageClientImpl.mm:
626         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
627         * WebProcess/WebPage/DrawingAreaImpl.cpp:
628         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
629
630 2015-10-20  Sergio Villar Senin  <svillar@igalia.com>
631
632         [GTK] Fix build for ENABLE_PLUGIN_PROCESS_GTK2=OFF
633         https://bugs.webkit.org/show_bug.cgi?id=150086
634
635         Reviewed by Darin Adler.
636
637         * UIProcess/cairo/BackingStoreCairo.cpp:
638         (WebKit::BackingStore::createBackend):
639
640 2015-10-20  Yoav Weiss  <yoav@yoav.ws>
641
642         Rename the PICTURE_SIZES flag to CURRENTSRC
643         https://bugs.webkit.org/show_bug.cgi?id=150275
644
645         Reviewed by Dean Jackson.
646
647         * Configurations/FeatureDefines.xcconfig:
648
649 2015-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
650
651         ERROR: Unhandled web process message 'StorageAreaMap:DispatchStorageEvent'
652         https://bugs.webkit.org/show_bug.cgi?id=150315
653
654         Reviewed by Andreas Kling.
655
656         It was introduced in r184930, that keeps the session storage area
657         maps alive in the UI process when they are destroyed by the web
658         process. The problem is that we also keep the listeners, so that
659         events are also dispatched to the listeners of destroyed areas,
660         and the message handlers were removed in the web process.
661
662         * UIProcess/Storage/StorageManager.cpp:
663         (WebKit::StorageManager::createTransientLocalStorageMap): Add a
664         listener for the new storage map ID when the map is reused.
665         (WebKit::StorageManager::destroyStorageMap): Always remove
666         listeners of destroyed maps.
667
668 2015-10-19  Tim Horton  <timothy_horton@apple.com>
669
670         Remove unused support for long presses from WebKit
671         https://bugs.webkit.org/show_bug.cgi?id=150345
672
673         Reviewed by Beth Dakin.
674
675         * Shared/WebPreferencesDefinitions.h:
676         * UIProcess/API/APIUIClient.h:
677         (API::UIClient::didBeginTrackingPotentialLongMousePress): Deleted.
678         (API::UIClient::didRecognizeLongMousePress): Deleted.
679         (API::UIClient::didCancelTrackingPotentialLongMousePress): Deleted.
680         * UIProcess/API/C/WKPage.cpp:
681         (WKPageSetPageUIClient): Deleted.
682         * UIProcess/API/C/WKPageUIClient.h:
683         * UIProcess/API/C/WKPreferences.cpp:
684         (WKPreferencesGetLongMousePressEnabled):
685         (WKPreferencesSetLongMousePressEnabled): Deleted.
686         * UIProcess/API/C/WKPreferencesRefPrivate.h:
687         * UIProcess/WebPageProxy.cpp:
688         (WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress): Deleted.
689         (WebKit::WebPageProxy::didRecognizeLongMousePress): Deleted.
690         (WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress): Deleted.
691         * UIProcess/WebPageProxy.h:
692         * UIProcess/WebPageProxy.messages.in:
693         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
694         (API::InjectedBundle::PageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
695         (API::InjectedBundle::PageUIClient::didRecognizeLongMousePress): Deleted.
696         (API::InjectedBundle::PageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
697         * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
698         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
699         (WebKit::InjectedBundlePageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
700         (WebKit::InjectedBundlePageUIClient::didRecognizeLongMousePress): Deleted.
701         (WebKit::InjectedBundlePageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
702         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
703         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
704         (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress): Deleted.
705         (WebKit::WebChromeClient::didRecognizeLongMousePress): Deleted.
706         (WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress): Deleted.
707         * WebProcess/WebCoreSupport/WebChromeClient.h:
708         * WebProcess/WebPage/WebPage.cpp:
709         (WebKit::WebPage::updatePreferences): Deleted.
710
711 2015-10-19  Chris Dumez  <cdumez@apple.com>
712
713         Make sure development Safari does not delete the stable Safari cache storage.
714         https://bugs.webkit.org/show_bug.cgi?id=150343
715
716         Reviewed by Antti Koivisto.
717
718         Make sure development Safari does not delete the stable Safari disk cache
719         storage. Development Safari now uses Version 5, while the last stable
720         Safari uses Version 4. Since the 2 versions can co-exist, it is best not
721         to drop the old cache version (4) at this point.
722
723         * NetworkProcess/cache/NetworkCacheStorage.cpp:
724         (WebKit::NetworkCache::Storage::deleteOldVersions):
725
726 2015-10-19  Tim Horton  <timothy_horton@apple.com>
727
728         WKView being inside WKWebView leads to weird API issues
729         https://bugs.webkit.org/show_bug.cgi?id=150174
730
731         Reviewed by Darin Adler.
732
733         * UIProcess/API/mac/WKView.mm:
734         * UIProcess/API/mac/WKViewInternal.h:
735         * UIProcess/Cocoa/WebViewImpl.h: Added.
736         * UIProcess/Cocoa/WebViewImpl.mm: Added.
737         (WebKit::WebViewImpl::WebViewImpl):
738         (WebKit::WebViewImpl::~WebViewImpl):
739         (WebKit::WebViewImpl::setDrawsBackground):
740         (WebKit::WebViewImpl::drawsBackground):
741         (WebKit::WebViewImpl::setDrawsTransparentBackground):
742         (WebKit::WebViewImpl::drawsTransparentBackground):
743         (WebKit::WebViewImpl::acceptsFirstResponder):
744         (WebKit::WebViewImpl::becomeFirstResponder):
745         (WebKit::WebViewImpl::resignFirstResponder):
746         (WebKit::WebViewImpl::isFocused):
747         (WebKit::WebViewImpl::viewWillStartLiveResize):
748         (WebKit::WebViewImpl::viewDidEndLiveResize):
749         (WebKit::WebViewImpl::setFrameSize):
750         (WebKit::WebViewImpl::disableFrameSizeUpdates):
751         (WebKit::WebViewImpl::enableFrameSizeUpdates):
752         (WebKit::WebViewImpl::frameSizeUpdatesDisabled):
753         (WebKit::WebViewImpl::setFrameAndScrollBy):
754         (WebKit::WebViewImpl::setFixedLayoutSize):
755         (WebKit::WebViewImpl::fixedLayoutSize):
756         (WebKit::WebViewImpl::setDrawingAreaSize):
757         (WebKit::WebViewImpl::setContentPreparationRect):
758         (WebKit::WebViewImpl::updateViewExposedRect):
759         (WebKit::WebViewImpl::setClipsToVisibleRect):
760         (WebKit::WebViewImpl::setIntrinsicContentSize):
761         (WebKit::WebViewImpl::intrinsicContentSize):
762         (WebKit::WebViewImpl::setViewScale):
763         (WebKit::WebViewImpl::viewScale):
764         (WebKit::WebViewImpl::layoutMode):
765         (WebKit::WebViewImpl::setLayoutMode):
766         (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
767         (WebKit::WebViewImpl::updateSupportsArbitraryLayoutModes):
768         (WebKit::WebViewImpl::updateSecureInputState):
769         (WebKit::WebViewImpl::resetSecureInputState):
770         (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
771         (WebKit::WebViewImpl::hasFullScreenWindowController):
772         (WebKit::WebViewImpl::fullScreenWindowController):
773         (WebKit::WebViewImpl::closeFullScreenWindowController):
774         (WebKit::WebViewImpl::fullScreenPlaceholderView):
775         (WebKit::WebViewImpl::createFullScreenWindow):
776         Move the actual implementation of a number of WKView methods into a
777         C++ class, WebViewImpl, which WKView calls directly into.
778         Eventually, we will move all of the logic of WKView into WebViewImpl,
779         and then duplicate the necessary forwarding in WKWebView and remove
780         WKWebView's inner WKView.
781
782         * UIProcess/mac/PageClientImpl.h:
783         * UIProcess/mac/PageClientImpl.mm:
784         (WebKit::PageClientImpl::isViewFocused):
785         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
786         (WebKit::PageClientImpl::updateSecureInputState):
787         (WebKit::PageClientImpl::resetSecureInputState):
788         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
789         (WebKit::PageClientImpl::beganEnterFullScreen):
790         (WebKit::PageClientImpl::beganExitFullScreen):
791         For now, forward PageClient requests that can be answered by WebViewImpl
792         to WebViewImpl. Eventually, we'll probably fold PageClientImpl and WebViewImpl
793         together into one class, and these things will collapse down.
794
795         * UIProcess/mac/WKFullScreenWindowController.h:
796         * UIProcess/mac/WKFullScreenWindowController.mm:
797         (-[WKFullScreenWindowController initWithWindow:webView:page:]):
798         (-[WKFullScreenWindowController enterFullScreen:]):
799         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
800         (-[WKFullScreenWindowController exitFullScreen]):
801         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
802         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
803         (-[WKFullScreenWindowController _manager]):
804         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
805         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
806         (-[WKFullScreenWindowController initWithWindow:webView:]): Deleted.
807         (-[WKFullScreenWindowController _page]): Deleted.
808         * UIProcess/mac/WKViewLayoutStrategy.h:
809         * UIProcess/mac/WKViewLayoutStrategy.mm:
810         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]):
811         (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]):
812         (-[WKViewLayoutStrategy invalidate]):
813         (-[WKViewLayoutStrategy didChangeFrameSize]):
814         (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
815         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
816         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]):
817         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
818         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
819         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
820         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]): Deleted.
821         (-[WKViewLayoutStrategy initWithPage:view:mode:]): Deleted.
822         (-[WKViewLayoutStrategy willDestroyView:]): Deleted.
823         (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
824         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
825         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]): Deleted.
826         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
827         Make WKViewLayoutStrategy and WKFullScreenWindowController operate in terms of generic
828         NSViews instead of WKView, so that eventually they will be able to work for either
829         WKView or WKWebView, and so that they can sit underneath WebViewImpl.
830
831         * WebKit2.xcodeproj/project.pbxproj:
832
833 2015-10-19  Commit Queue  <commit-queue@webkit.org>
834
835         Unreviewed, rolling out r191307.
836         https://bugs.webkit.org/show_bug.cgi?id=150338
837
838         broke lots of API tests, need time to figure out whats up
839         (Requested by thorton on #webkit).
840
841         Reverted changeset:
842
843         "WKView being inside WKWebView leads to weird API issues"
844         https://bugs.webkit.org/show_bug.cgi?id=150174
845         http://trac.webkit.org/changeset/191307
846
847 2015-10-19  Tim Horton  <timothy_horton@apple.com>
848
849         Try again to fix the 32-bit build.
850
851         * UIProcess/mac/WebContextMenuProxyMac.mm:
852         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
853
854 2015-10-17  Wenson Hsieh  <wenson_hsieh@apple.com>
855
856         Extend fast-clicking behavior to trigger on elements that have negligible zoom
857         https://bugs.webkit.org/show_bug.cgi?id=150248
858         <rdar://problem/23140069>
859
860         Reviewed by Simon Fraser.
861
862         Currently, fast-clicking only triggers on pages that have unscalable viewports. To allow more websites to benefit from fast-clicking
863         behavior, we generalize fast-clicking to also occur when tapping on elements for which double-tap-to-zoom would zoom the element in
864         or out by an insignificant amount. We define an insignificant amount of zoom to mean that zooming would increase the viewport scale
865         by less than a configurable threshold, or decrease the viewport scale by more than a configurable threshold. We accomplish this by
866         temporarily disabling the double tap gesture recognizer for the duration of the tap. This patch refactors some logic used to compute
867         zoomed viewports to make it possible to predict the change in viewport scale when double tapping to zoom. See the changes in
868         SmartMagnificationController and ViewGestureGeometryCollector for more details.
869
870         There are no new tests, since this patch does not change existing behavior. Instead, this patch adds the machinery needed for zoom-
871         dependent fast-clicking: by setting the preferences WebKitFastClickingEnabled and WebKitFastClickZoomThreshold, we will be able to tweak
872         the behavior dynamically.
873
874         * UIProcess/API/Cocoa/WKWebView.mm:
875         (-[WKWebView _didCommitLayerTree:]):
876         (-[WKWebView _contentZoomScale]):
877         (-[WKWebView _targetContentZoomScaleForRect:currentScale:fitEntireRect:minimumScale:maximumScale:]):
878         (-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
879         (-[WKWebView _viewportIsUserScalable]):
880         * UIProcess/API/Cocoa/WKWebViewInternal.h:
881         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
882         * UIProcess/PageClient.h:
883         * UIProcess/WebPageProxy.h:
884         * UIProcess/WebPageProxy.messages.in:
885         * UIProcess/ios/PageClientImplIOS.h:
886         * UIProcess/ios/PageClientImplIOS.mm:
887         (WebKit::PageClientImpl::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary):
888         * UIProcess/ios/SmartMagnificationController.h:
889         * UIProcess/ios/SmartMagnificationController.mm:
890         (WebKit::SmartMagnificationController::adjustSmartMagnificationTargetRectAndZoomScales):
891         (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
892         (WebKit::SmartMagnificationController::magnify):
893         * UIProcess/ios/WKContentViewInteraction.h:
894         * UIProcess/ios/WKContentViewInteraction.mm:
895         (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
896         (-[WKContentView _fastClickZoomThreshold]):
897         (-[WKContentView _allowDoubleTapToZoomForCurrentZoomScale:andTargetZoomScale:]):
898         (-[WKContentView _disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:allowsDoubleTapZoom:targetRect:isReplaced:minimumScale:maximumScale:]):
899         (-[WKContentView _highlightLongPressRecognized:]):
900         (-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
901         (-[WKContentView _singleTapRecognized:]):
902         (cancelPotentialTapIfNecessary):
903         (-[WKContentView _singleTapCommited:]):
904         (-[WKContentView webSelectionRects]): Deleted.
905         * UIProcess/ios/WebPageProxyIOS.mm:
906         (WebKit::WebPageProxy::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary):
907         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
908         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
909         (WebKit::ViewGestureGeometryCollector::computeZoomInformationForNode):
910         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
911         * WebProcess/WebPage/ios/WebPageIOS.mm:
912         (WebKit::WebPage::potentialTapAtPosition):
913
914 2015-10-19  Tim Horton  <timothy_horton@apple.com>
915
916         WKView being inside WKWebView leads to weird API issues
917         https://bugs.webkit.org/show_bug.cgi?id=150174
918
919         Reviewed by Darin Adler.
920
921         * UIProcess/API/mac/WKView.mm:
922         * UIProcess/API/mac/WKViewInternal.h:
923         * UIProcess/Cocoa/WebViewImpl.h: Added.
924         * UIProcess/Cocoa/WebViewImpl.mm: Added.
925         (WebKit::WebViewImpl::WebViewImpl):
926         (WebKit::WebViewImpl::~WebViewImpl):
927         (WebKit::WebViewImpl::setDrawsBackground):
928         (WebKit::WebViewImpl::drawsBackground):
929         (WebKit::WebViewImpl::setDrawsTransparentBackground):
930         (WebKit::WebViewImpl::drawsTransparentBackground):
931         (WebKit::WebViewImpl::acceptsFirstResponder):
932         (WebKit::WebViewImpl::becomeFirstResponder):
933         (WebKit::WebViewImpl::resignFirstResponder):
934         (WebKit::WebViewImpl::isFocused):
935         (WebKit::WebViewImpl::viewWillStartLiveResize):
936         (WebKit::WebViewImpl::viewDidEndLiveResize):
937         (WebKit::WebViewImpl::setFrameSize):
938         (WebKit::WebViewImpl::disableFrameSizeUpdates):
939         (WebKit::WebViewImpl::enableFrameSizeUpdates):
940         (WebKit::WebViewImpl::frameSizeUpdatesDisabled):
941         (WebKit::WebViewImpl::setFrameAndScrollBy):
942         (WebKit::WebViewImpl::setFixedLayoutSize):
943         (WebKit::WebViewImpl::fixedLayoutSize):
944         (WebKit::WebViewImpl::setDrawingAreaSize):
945         (WebKit::WebViewImpl::setContentPreparationRect):
946         (WebKit::WebViewImpl::updateViewExposedRect):
947         (WebKit::WebViewImpl::setClipsToVisibleRect):
948         (WebKit::WebViewImpl::setIntrinsicContentSize):
949         (WebKit::WebViewImpl::intrinsicContentSize):
950         (WebKit::WebViewImpl::setViewScale):
951         (WebKit::WebViewImpl::viewScale):
952         (WebKit::WebViewImpl::layoutMode):
953         (WebKit::WebViewImpl::setLayoutMode):
954         (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
955         (WebKit::WebViewImpl::updateSupportsArbitraryLayoutModes):
956         (WebKit::WebViewImpl::updateSecureInputState):
957         (WebKit::WebViewImpl::resetSecureInputState):
958         (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
959         (WebKit::WebViewImpl::hasFullScreenWindowController):
960         (WebKit::WebViewImpl::fullScreenWindowController):
961         (WebKit::WebViewImpl::closeFullScreenWindowController):
962         (WebKit::WebViewImpl::fullScreenPlaceholderView):
963         (WebKit::WebViewImpl::createFullScreenWindow):
964         Move the actual implementation of a number of WKView methods into a
965         C++ class, WebViewImpl, which WKView calls directly into.
966         Eventually, we will move all of the logic of WKView into WebViewImpl,
967         and then duplicate the necessary forwarding in WKWebView and remove
968         WKWebView's inner WKView.
969
970         * UIProcess/mac/PageClientImpl.h:
971         * UIProcess/mac/PageClientImpl.mm:
972         (WebKit::PageClientImpl::isViewFocused):
973         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
974         (WebKit::PageClientImpl::updateSecureInputState):
975         (WebKit::PageClientImpl::resetSecureInputState):
976         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
977         (WebKit::PageClientImpl::beganEnterFullScreen):
978         (WebKit::PageClientImpl::beganExitFullScreen):
979         For now, forward PageClient requests that can be answered by WebViewImpl
980         to WebViewImpl. Eventually, we'll probably fold PageClientImpl and WebViewImpl
981         together into one class, and these things will collapse down.
982
983         * UIProcess/mac/WKFullScreenWindowController.h:
984         * UIProcess/mac/WKFullScreenWindowController.mm:
985         (-[WKFullScreenWindowController initWithWindow:webView:page:]):
986         (-[WKFullScreenWindowController enterFullScreen:]):
987         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
988         (-[WKFullScreenWindowController exitFullScreen]):
989         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
990         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
991         (-[WKFullScreenWindowController _manager]):
992         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
993         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
994         (-[WKFullScreenWindowController initWithWindow:webView:]): Deleted.
995         (-[WKFullScreenWindowController _page]): Deleted.
996         * UIProcess/mac/WKViewLayoutStrategy.h:
997         * UIProcess/mac/WKViewLayoutStrategy.mm:
998         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]):
999         (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]):
1000         (-[WKViewLayoutStrategy invalidate]):
1001         (-[WKViewLayoutStrategy didChangeFrameSize]):
1002         (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
1003         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
1004         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]):
1005         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
1006         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
1007         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
1008         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]): Deleted.
1009         (-[WKViewLayoutStrategy initWithPage:view:mode:]): Deleted.
1010         (-[WKViewLayoutStrategy willDestroyView:]): Deleted.
1011         (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
1012         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
1013         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]): Deleted.
1014         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
1015         Make WKViewLayoutStrategy and WKFullScreenWindowController operate in terms of generic
1016         NSViews instead of WKView, so that eventually they will be able to work for either
1017         WKView or WKWebView, and so that they can sit underneath WebViewImpl.
1018
1019         * WebKit2.xcodeproj/project.pbxproj:
1020
1021 2015-10-19  Chris Dumez  <cdumez@apple.com>
1022
1023         [WK2] Generalize NetworkCacheStorage API so it can store different types of metadata
1024         https://bugs.webkit.org/show_bug.cgi?id=150221
1025         <rdar://problem/23149771>
1026
1027         Reviewed by Darin Adler and Antti Koivisto.
1028
1029         Generalize NetworkCacheStorage API so it can store different types of
1030         metadata alongside the network resources. This is a pre-requirement to
1031         making our NetworkCache smarter by storing information about the
1032         resources.
1033
1034         To keep the code simple, the entry type is now part of the entry key and
1035         we store records of a specific type in a 'type' subfolder. The cache
1036         structure looks like so:
1037         - WebKitCache/Version 5/[Partition]/[Type]/[Hash]
1038         - WebKitCache/Version 5/[Partition]/[Type]/[Hash]-blob (Optional)
1039
1040         Existing cache entries now that the 'resource' type as these are network
1041         resources.
1042
1043         * NetworkProcess/cache/NetworkCache.cpp:
1044         * NetworkProcess/cache/NetworkCacheKey.cpp:
1045         * NetworkProcess/cache/NetworkCacheKey.h:
1046         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1047         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1048         * NetworkProcess/cache/NetworkCacheStorage.h:
1049
1050 2015-10-19  Tim Horton  <timothy_horton@apple.com>
1051
1052         Try to fix the iOS build
1053
1054         * Configurations/FeatureDefines.xcconfig:
1055
1056 2015-10-19  Tim Horton  <timothy_horton@apple.com>
1057
1058         Try to fix the 32-bit build.
1059
1060         * UIProcess/mac/WebContextMenuProxyMac.mm:
1061         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
1062
1063 2015-10-16  Anders Carlsson  <andersca@apple.com>
1064
1065         Fix image service menus somewhat
1066         https://bugs.webkit.org/show_bug.cgi?id=150265
1067
1068         Reviewed by Tim Horton.
1069
1070         * Shared/ContextMenuContextData.cpp:
1071         (WebKit::ContextMenuContextData::ContextMenuContextData):
1072         It's a service menu if we have a controlled image.
1073
1074         * UIProcess/mac/WebContextMenuProxyMac.mm:
1075         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
1076         Use an item provider.
1077
1078 2015-10-19  Tim Horton  <timothy_horton@apple.com>
1079
1080         Add magnify and rotate gesture event support for Mac
1081         https://bugs.webkit.org/show_bug.cgi?id=150179
1082         <rdar://problem/8036240>
1083
1084         Reviewed by Darin Adler.
1085
1086         * Configurations/FeatureDefines.xcconfig:
1087         New feature flag.
1088
1089         * Shared/NativeWebGestureEvent.h: Added.
1090         (WebKit::NativeWebGestureEvent::nativeEvent):
1091         * Shared/WebEvent.h:
1092         * Shared/WebEventConversion.cpp:
1093         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
1094         (WebKit::platform):
1095         * Shared/WebEventConversion.h:
1096         * Shared/mac/NativeWebGestureEventMac.mm: Added.
1097         (WebKit::webEventTypeForNSEvent):
1098         (WebKit::pointForEvent):
1099         (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
1100         Add and plumb a new native event that wraps a NSEvent of type
1101         NSEventTypeMagnify or NSEventTypeRotate (gesture events).
1102
1103         * Shared/mac/WebGestureEvent.cpp: Added.
1104         (WebKit::WebGestureEvent::encode):
1105         (WebKit::WebGestureEvent::decode):
1106         (WebKit::WebGestureEvent::isGestureEventType):
1107         * Shared/mac/WebGestureEvent.h: Added.
1108         (WebKit::WebGestureEvent::WebGestureEvent):
1109         (WebKit::WebGestureEvent::position):
1110         (WebKit::WebGestureEvent::gestureScale):
1111         (WebKit::WebGestureEvent::gestureRotation):
1112         Add IPC plumbing for WebGestureEvent, which becomes a WebCore::PlatformGestureEvent.
1113
1114         * UIProcess/API/Cocoa/WKViewPrivate.h:
1115         Remove unnecessary iPhone-only WKView code.
1116         Add _gestureEventWasNotHandledByWebCore, SPI which can be overridden
1117         to react when WebCore decides not to handle a gesture event.
1118
1119         * UIProcess/API/mac/WKView.mm:
1120         (-[WKView magnifyWithEvent:]):
1121         Route magnification gesture events to the page, unless we're already
1122         in an active view zoom gesture, in which case we'll bypass the page
1123         and send the event straight to ViewGestureController.
1124
1125         (-[WKView rotateWithEvent:]):
1126         Route rotation gesture events to the page.
1127
1128         (-[WKView _gestureEventWasNotHandledByWebCore:]):
1129         Let ViewGestureController know that WebCore didn't handle a gesture event.
1130         We always give WebCore the first crack at the event if we're not in a zoom,
1131         because it could preventDefault() on the Begin phase event, and that should
1132         prevent pinch-zoom from starting.
1133
1134         * UIProcess/PageClient.h:
1135         * UIProcess/mac/PageClientImpl.h:
1136         * UIProcess/mac/PageClientImpl.mm:
1137         (WebKit::PageClientImpl::gestureEventWasNotHandledByWebCore):
1138         Plumb gestureEventWasNotHandledByWebCore back from WebPageProxy to WKView.
1139
1140         * UIProcess/WebPageProxy.cpp:
1141         (WebKit::WebPageProxy::handleGestureEvent):
1142         (WebKit::WebPageProxy::didReceiveEvent):
1143         * UIProcess/WebPageProxy.h:
1144         Forward gesture events to EventDispatcher, and let WKView know when WebCore
1145         passes on handling them.
1146         
1147         * UIProcess/mac/ViewGestureController.h:
1148         (WebKit::ViewGestureController::hasActiveMagnificationGesture):
1149         * UIProcess/mac/ViewGestureControllerMac.mm:
1150         (WebKit::ViewGestureController::gestureEventWasNotHandledByWebCore):
1151         (WebKit::ViewGestureController::handleMagnificationGestureEvent):
1152         Don't try to start a zoom with anything other than a Begin phase event.
1153         Try to start a zoom with any events that WebCore doesn't handle.
1154         Move dispatch of endMagnificationGesture into ViewGestureController;
1155         there is no reason for that to be in WKView anymore.
1156
1157         * WebKit2.xcodeproj/project.pbxproj:
1158         * WebProcess/WebPage/EventDispatcher.cpp:
1159         (WebKit::EventDispatcher::gestureEvent):
1160         (WebKit::EventDispatcher::dispatchGestureEvent):
1161         * WebProcess/WebPage/EventDispatcher.h:
1162         * WebProcess/WebPage/EventDispatcher.messages.in:
1163         * WebProcess/WebPage/WebPage.cpp:
1164         (WebKit::handleGestureEvent):
1165         (WebKit::WebPage::gestureEvent):
1166         * WebProcess/WebPage/WebPage.h:
1167         Dispatch to the main thread and hand off the gesture event to WebCore,
1168         asynchronously informing the UI process of whether the event was handled or not.
1169
1170 2015-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1171
1172         [GTK] ASSERTION FAILED: parent in WebInspectorProxy::platformDetach()
1173         https://bugs.webkit.org/show_bug.cgi?id=150319
1174
1175         Reviewed by Žan Doberšek.
1176
1177         This happens when the inspector is shown/closed very
1178         quickly. Since we start the inspector attached by default, when
1179         the web inspector is created m_isAttached is set to true, so that
1180         when opened, it's attached to the view. If the inspector is closed
1181         before it has been actually attached, the inspector view doesn't
1182         have a parent, even if the m_isAttached is true. So, we should
1183         handle this case instead of asserting. This is what happens in
1184         test http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash.html.
1185
1186         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1187         (WebKit::WebInspectorProxy::platformDetach): Remove the view from
1188         its parent container if it was actually attached.
1189
1190 2015-10-19  Hunseop Jeong  <hs85.jeong@samsung.com>
1191
1192         [EFL] Implement WebContextMenuProxyEfl::showContextMenu after r191194
1193         https://bugs.webkit.org/show_bug.cgi?id=150310
1194
1195         Reviewed by Gyuyoung Kim.
1196
1197         showContextMenu() doesn't work correctly after r191194 in EFL port.
1198         This patch implements WebContextMenuProxyEfl::showContextMenu.
1199
1200         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
1201         (WebKit::WebContextMenuProxyEfl::WebContextMenuProxyEfl):
1202         (WebKit::WebContextMenuProxyEfl::showContextMenu):
1203         (WebKit::WebContextMenuProxyEfl::hideContextMenu):
1204         * UIProcess/efl/WebContextMenuProxyEfl.h:
1205
1206 2015-10-18  Csaba Osztrogonác  <ossy@webkit.org>
1207
1208         [WK2] Simplify unused return warning in WKRetainPtr.h
1209         https://bugs.webkit.org/show_bug.cgi?id=150173
1210
1211         Reviewed by Darin Adler.
1212
1213         * UIProcess/API/cpp/WKRetainPtr.h:
1214         (WebKit::__attribute__):
1215         (WebKit::adoptWK): Deleted.
1216
1217 2015-10-18  Csaba Osztrogonác  <ossy@webkit.org>
1218
1219         Fix the ENABLE(SECCOMP_FILTERS) build after r187030
1220         https://bugs.webkit.org/show_bug.cgi?id=150172
1221
1222         Reviewed by Alexey Proskuryakov.
1223
1224         * Shared/linux/SeccompFilters/Syscall.cpp:
1225         (WebKit::reportUnexpectedSyscall):
1226
1227 2015-10-18  Joonghun Park  <jh718.park@samsung.com>
1228
1229         [GTK] Remove WebKitContextMenu related missing annotation warnings
1230         https://bugs.webkit.org/show_bug.cgi?id=150299
1231
1232         Reviewed by Darin Adler.
1233
1234         The warnings occur currently because when executing g-ir-scanner,
1235         it doesn't consider WebKitContextMenu related .cpp files,
1236         but only .h files.
1237
1238         * PlatformGTK.cmake: Add WebKitContextMenu related cpp files.
1239
1240 2015-10-18  Myles C. Maxfield  <mmaxfield@apple.com>
1241
1242         Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
1243         https://bugs.webkit.org/show_bug.cgi?id=150287
1244
1245         Reviewed by Simon Fraser.
1246
1247         * Shared/WebProcessCreationParameters.cpp:
1248         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
1249         (WebKit::WebProcessCreationParameters::encode): Deleted.
1250         (WebKit::WebProcessCreationParameters::decode): Deleted.
1251         * Shared/WebProcessCreationParameters.h:
1252         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1253         (WebKit::registerUserDefaultsIfNeeded): Deleted.
1254         (WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
1255         * WebProcess/cocoa/WebProcessCocoa.mm:
1256         (WebKit::WebProcess::platformInitializeWebProcess): Deleted.
1257
1258 2015-10-18  Yusuke Suzuki  <utatane.tea@gmail.com>
1259
1260         [GTK] Implement WebContextMenuProxyGtk::showContextMenu after r191194
1261         https://bugs.webkit.org/show_bug.cgi?id=150276
1262
1263         Reviewed by Carlos Garcia Campos.
1264
1265         After r191194, showContextMenu signature becomes changed, and the implementation
1266         is moved from the generic file to the Mac port. It poses the compile error in GTK port.
1267         This patch implements WebContextMenuProxyGtk::showContextMenu. The logic is the same
1268         to the old one except for dropping SERVICE_CONTROLS support. This is because
1269         SERVICE_CONTROLS is not related to GTK.
1270
1271         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1272         (WebKit::WebContextMenuProxyGtk::showContextMenu):
1273         * UIProcess/gtk/WebContextMenuProxyGtk.h:
1274
1275 2015-10-18  Commit Queue  <commit-queue@webkit.org>
1276
1277         Unreviewed, rolling out r191250 and r191253.
1278         https://bugs.webkit.org/show_bug.cgi?id=150296
1279
1280         Broke all the tests on Windows (Requested by ap on #webkit).
1281
1282         Reverted changesets:
1283
1284         "Stop honoring the user default
1285         "WebKitKerningAndLigaturesEnabledByDefault""
1286         https://bugs.webkit.org/show_bug.cgi?id=150287
1287         http://trac.webkit.org/changeset/191250
1288
1289         "Build fix after r191250"
1290         http://trac.webkit.org/changeset/191253
1291
1292 2015-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
1293
1294         Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
1295         https://bugs.webkit.org/show_bug.cgi?id=150287
1296
1297         Reviewed by Simon Fraser.
1298
1299         * Shared/WebProcessCreationParameters.cpp:
1300         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
1301         (WebKit::WebProcessCreationParameters::encode): Deleted.
1302         (WebKit::WebProcessCreationParameters::decode): Deleted.
1303         * Shared/WebProcessCreationParameters.h:
1304         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1305         (WebKit::registerUserDefaultsIfNeeded): Deleted.
1306         (WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
1307         * WebProcess/cocoa/WebProcessCocoa.mm:
1308         (WebKit::WebProcess::platformInitializeWebProcess): Deleted.
1309
1310 2015-10-17  Dan Bernstein  <mitz@apple.com>
1311
1312         [Cocoa] Stop using WKAXRegisterRemoteApp
1313         https://bugs.webkit.org/show_bug.cgi?id=150283
1314
1315         Reviewed by Alexey Proskuryakov.
1316
1317         * Platform/spi/mac: Added.
1318         * Platform/spi/mac/AppKitSPI.h: Added. Includes declaration of
1319           +[NSAccessibilityRemoteUIElement setRemoteUIApp:].
1320
1321         * WebKit2.xcodeproj/project.pbxproj: Added reference to new header. Also changed the path of
1322           the Platform/spi/Cocoa group to the corresponding path in the source tree.
1323
1324         * WebProcess/cocoa/WebProcessCocoa.mm:
1325         (WebKit::registerWithAccessibility): Added.
1326         (WebKit::WebProcess::platformInitializeProcess): Use new registerWithAccessibility instead
1327           of WKAXRegisterRemoteApp.
1328
1329 2015-10-16  Simon Fraser  <simon.fraser@apple.com>
1330
1331         Enhance TextStream for logging, remove subclasses, log more things
1332         https://bugs.webkit.org/show_bug.cgi?id=150269
1333
1334         Reviewed by Zalan Bujtas.
1335
1336         Remove the various TextStream subclasses that only existed to support indenting,
1337         and output additional types. Add output for more WebCore and WebKit2 types, and
1338         just use TextStream everywhere.
1339         
1340         TextStream is enhance to support grouping (open paren and intent), with a 
1341         stack-based class to open/end a group.
1342         
1343         Remove some SVG-specific duplicate output functions.
1344         
1345         Outdent namespace contents of GraphicsTypes.h.
1346
1347         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1348         (WebKit::dump):
1349         (WebKit::recursiveDumpNodes):
1350         (WebKit::RemoteScrollingCoordinatorTransaction::description):
1351         (WebKit::RemoteScrollingTreeTextStream::RemoteScrollingTreeTextStream): Deleted.
1352         (WebKit::RemoteScrollingTreeTextStream::increaseIndent): Deleted.
1353         (WebKit::RemoteScrollingTreeTextStream::decreaseIndent): Deleted.
1354         (WebKit::RemoteScrollingTreeTextStream::writeIndent): Deleted.
1355         (WebKit::dumpProperty): Deleted.
1356         (WebKit::RemoteScrollingTreeTextStream::operator<<): Deleted.
1357         (WebKit::RemoteScrollingTreeTextStream::dump): Deleted.
1358         (WebKit::RemoteScrollingTreeTextStream::recursiveDumpNodes): Deleted.
1359         * Shared/mac/RemoteLayerTreeTransaction.mm:
1360         (WebKit::operator<<):
1361         (WebKit::dumpChangedLayers):
1362         (WebKit::RemoteLayerTreeTransaction::description):
1363         (WebKit::RemoteLayerTreeTextStream::RemoteLayerTreeTextStream): Deleted.
1364         (WebKit::RemoteLayerTreeTextStream::increaseIndent): Deleted.
1365         (WebKit::RemoteLayerTreeTextStream::decreaseIndent): Deleted.
1366         (WebKit::dumpProperty): Deleted.
1367         (WebKit::RemoteLayerTreeTextStream::operator<<): Deleted.
1368         (WebKit::RemoteLayerTreeTextStream::writeIndent): Deleted.
1369         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
1370         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1371         (WebKit::operator<<):
1372
1373 2015-10-17  Hunseop Jeong  <hs85.jeong@samsung.com>
1374
1375         URTBF after r191194 to fix EFL build.
1376         https://bugs.webkit.org/show_bug.cgi?id=150272
1377
1378         Reviewed by Csaba Osztrogonác.
1379
1380         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
1381         (WebKit::WebContextMenuProxyEfl::showContextMenu):
1382         * UIProcess/efl/WebContextMenuProxyEfl.h:
1383
1384 2015-10-16  Wenson Hsieh  <wenson_hsieh@apple.com>
1385
1386         Add a WKWebView input delegate SPI
1387         https://bugs.webkit.org/show_bug.cgi?id=149646
1388
1389         Reviewed by Dan Bernstein.
1390
1391         Renames the existing _WKFormDelegate to _WKInputDelegate and adds a new delegate SPI method
1392         -[_WKInputDelegate _webView:focusShouldStartInputSession:] that allows clients to allow or
1393         disallow showing up the keyboard. To make this decision, clients are given a
1394         _WKFocusedElementInfo, which contains information about the focused element prior to the
1395         keyboard showing up so the client will be able to override default assistance behavior.
1396
1397         While the information contained in a _WKFocusedElementInfo currently seems like overkill for
1398         _webView:focusShouldStartInputSession, our intentions are to give WebKit clients control over more
1399         details of how node assistance works, such as being able to use a custom editor for certain
1400         types of nodes.
1401
1402         * Shared/API/Cocoa/WebKitPrivate.h: Added new header _WKFocusedElementInfo.h.
1403         * UIProcess/API/Cocoa/WKWebView.h:
1404         * UIProcess/API/Cocoa/WKWebView.mm:
1405         (-[WKWebView _inputDelegate]):
1406         (-[WKWebView _formDelegate]):
1407         (-[WKWebView _setInputDelegate:]):
1408         (-[WKWebView _setFormDelegate:]):
1409         (-[WKWebView initWithFrame:configuration:]): Deleted canAssistOnProgrammaticFocus flag.
1410         (-[WKWebView canAssistOnProgrammaticFocus]): Ditto.
1411         (-[WKWebView setCanAssistOnProgrammaticFocus:]): Ditto.
1412         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1413         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1414         (-[WKWebViewConfiguration init]): Deleted.
1415         (-[WKWebViewConfiguration _canAssistOnProgrammaticFocus]): Deleted canAssistOnProgrammaticFocus flag.
1416         (-[WKWebViewConfiguration _setCanAssistOnProgrammaticFocus:]): Ditto.
1417         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1418         * UIProcess/API/Cocoa/_WKFocusedElementInfo.h: Added.
1419         * UIProcess/API/Cocoa/_WKFormDelegate.h:
1420         * UIProcess/API/Cocoa/_WKInputDelegate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKFormDelegate.h.
1421         * UIProcess/ios/WKContentViewInteraction.mm:
1422         (-[WKFocusedElementInfo initWithAssistedNodeInformation:isInteracting:]):
1423         (-[WKFocusedElementInfo type]):
1424         (-[WKFocusedElementInfo value]):
1425         (-[WKFocusedElementInfo isUserInitiated]):
1426         (-[WKContentView accessoryAutoFill]):
1427         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): If the input delegate responds to
1428             shouldStartInputSession, consult it to see if we should bring up the keyboard; otherwise, use our default behavior.
1429         * WebKit2.xcodeproj/project.pbxproj:
1430
1431 2015-10-16  Simon Fraser  <simon.fraser@apple.com>
1432
1433         Make TextStream the canonical way to log classes in WebCore
1434         https://bugs.webkit.org/show_bug.cgi?id=150256
1435
1436         Reviewed by Sam Weinig.
1437
1438         We vacillated between PrintStream and TextStream as being the canonical way
1439         to stringify WebCore data structures. This patch solidifies TextStream
1440         as the solution, since it has convenient stream syntax, and is what we
1441         use for render tree dumps.
1442
1443         Remove TextStream member functions that output non-simple structs
1444         (sizes, points and rects), replacing them with free operator<< functions
1445         in the .cpp file for the relevant class. Formatting is currently consistent
1446         with RenderTreeAsText output, to avoid breaking tests.
1447
1448         Remove custom FloatRect outputting in SVG and RemoteLayerTreeTransaction.
1449
1450         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1451         (WebKit::RemoteScrollingTreeTextStream::operator<<): Deleted.
1452         * Shared/mac/RemoteLayerTreeTransaction.mm:
1453         (WebKit::RemoteLayerTreeTextStream::operator<<): Deleted.
1454
1455 2015-10-16  Anders Carlsson  <andersca@apple.com>
1456
1457         Remove some dead menu code
1458         https://bugs.webkit.org/show_bug.cgi?id=150247
1459
1460         Reviewed by Andreas Kling.
1461
1462         * Shared/WebContextMenuItemData.cpp:
1463         (WebKit::WebContextMenuItemData::WebContextMenuItemData):
1464         (WebKit::WebContextMenuItemData::encode): Deleted.
1465         * Shared/WebContextMenuItemData.h:
1466         (WebKit::WebContextMenuItemData::selectionHandler): Deleted.
1467         * UIProcess/mac/WebContextMenuProxyMac.mm:
1468         (WebKit::nsMenuItem):
1469
1470 2015-10-16  Anders Carlsson  <andersca@apple.com>
1471
1472         Move more code to WebContextMenuProxyMac
1473         https://bugs.webkit.org/show_bug.cgi?id=150240
1474
1475         Reviewed by Tim Horton.
1476
1477         * UIProcess/WebContextMenuProxy.h:
1478         * UIProcess/WebPageProxy.cpp:
1479         (WebKit::WebPageProxy::internalShowContextMenu):
1480         * UIProcess/WebPageProxy.h:
1481         (WebKit::WebPageProxy::contextMenuClient):
1482         * UIProcess/mac/WebContextMenuProxyMac.h:
1483         * UIProcess/mac/WebContextMenuProxyMac.mm:
1484         (WebKit::WebContextMenuProxyMac::initializeShareMenuItem):
1485         (WebKit::WebContextMenuProxyMac::showContextMenu):
1486         * UIProcess/mac/WebPageProxyMac.mm:
1487         (WebKit::WebPageProxy::platformInitializeShareMenuItem): Deleted.
1488
1489 2015-10-16  Tim Horton  <timothy_horton@apple.com>
1490
1491         Hook up autolayout intrinsic sizing for WKWebView
1492         https://bugs.webkit.org/show_bug.cgi?id=150219
1493         <rdar://problem/20016905>
1494
1495         Reviewed by Simon Fraser.
1496
1497         * UIProcess/API/Cocoa/WKWebView.mm:
1498         (-[WKWebView initWithFrame:configuration:]):
1499         (-[WKWebView intrinsicContentSize]):
1500         (-[WKWebView _setIntrinsicContentSize:]):
1501         (-[WKWebView _minimumLayoutWidth]):
1502         (-[WKWebView _setMinimumLayoutWidth:]):
1503         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1504         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1505         Add a simple SPI to specify the minimum width that a WKWebView will attempt
1506         to lay out to, similar to WKView except just a width, not a size, and
1507         with no option to force the height to the view size. Similar behavior can
1508         be achieved by clients by setting custom autolayout constraints on the view.
1509
1510         * UIProcess/mac/PageClientImpl.mm:
1511         (WebKit::PageClientImpl::intrinsicContentSizeDidChange):
1512         Forward intrinsic content size changes to the WKWebView, not its inner WKView,
1513         if we have one.
1514
1515         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1516         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1517         Only set the autosizing fixed minimum height if we're using that behavior;
1518         otherwise, setting it to the view's height will end up accidentally
1519         turning on that behavior (which involves an extra layout per resize!).
1520
1521 2015-10-15  Anders Carlsson  <andersca@apple.com>
1522
1523         Use the ShowContextMenu message for service menus as well
1524         https://bugs.webkit.org/show_bug.cgi?id=150206
1525
1526         Reviewed by Tim Horton.
1527
1528         * Shared/ContextMenuContextData.cpp:
1529         (WebKit::ContextMenuContextData::ContextMenuContextData):
1530         (WebKit::ContextMenuContextData::encode):
1531         (WebKit::ContextMenuContextData::decode):
1532         * Shared/ContextMenuContextData.h:
1533         (WebKit::ContextMenuContextData::type):
1534         (WebKit::ContextMenuContextData::ContextMenuContextData):
1535         (WebKit::ContextMenuContextData::isServicesMenu):
1536         (WebKit::ContextMenuContextData::needsServicesMenu): Deleted.
1537         * UIProcess/WebPageProxy.cpp:
1538         (WebKit::WebPageProxy::showContextMenu):
1539         (WebKit::WebPageProxy::internalShowContextMenu):
1540         * UIProcess/WebPageProxy.h:
1541         * UIProcess/WebPageProxy.messages.in:
1542         * UIProcess/mac/WebContextMenuProxyMac.mm:
1543         (WebKit::WebContextMenuProxyMac::populate):
1544         (WebKit::WebContextMenuProxyMac::showContextMenu):
1545         * UIProcess/mac/WebPageProxyMac.mm:
1546         (WebKit::WebPageProxy::showSelectionServiceMenu): Deleted.
1547         * WebProcess/WebPage/mac/WebPageMac.mm:
1548         (WebKit::WebPage::handleSelectionServiceClick):
1549
1550 2015-10-16  Hunseop Jeong  <hs85.jeong@samsung.com>
1551
1552         [GTK] Try to fix the build after r191137
1553         https://bugs.webkit.org/show_bug.cgi?id=150222
1554
1555         Reviewed by Carlos Garcia Campos.
1556
1557         * UIProcess/API/gtk/PageClientImpl.cpp:
1558         (WebKit::PageClientImpl::doneWithKeyEvent):
1559         (WebKit::PageClientImpl::createPopupMenuProxy):
1560         (WebKit::PageClientImpl::createContextMenuProxy):
1561         (WebKit::PageClientImpl::createColorPicker):
1562         * UIProcess/API/gtk/PageClientImpl.h:
1563         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1564         (WebKit::WebContextMenuProxyGtk::populate):
1565         (WebKit::WebContextMenuProxyGtk::showContextMenu):
1566         (WebKit::WebContextMenuProxyGtk::hideContextMenu):
1567         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
1568         * UIProcess/gtk/WebContextMenuProxyGtk.h:
1569         (WebKit::WebContextMenuProxyGtk::create):
1570         (WebKit::WebContextMenuProxyGtk::gtkMenu):
1571         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
1572         (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
1573         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
1574         (WebKit::WebPopupMenuProxyGtk::create):
1575         (WebKit::WebPopupMenuProxyGtk::setCurrentlySelectedMenuItem):
1576
1577 2015-10-15  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1578
1579          EFL build fix since r191137
1580
1581          Unreviewed EFL build fix.
1582
1583         * UIProcess/CoordinatedGraphics/WebView.cpp: Removed.
1584
1585 2015-10-15  Myles C. Maxfield  <mmaxfield@apple.com>
1586
1587         Migrate to CGContextSetBaseCTM() and CGContextResetClip() from WKSI
1588         https://bugs.webkit.org/show_bug.cgi?id=150155
1589
1590         Reviewed by Tim Horton.
1591
1592         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1593         (InitWebCoreSystemInterface): Deleted.
1594
1595 2015-10-15  Dean Jackson  <dino@apple.com>
1596
1597         Fix the iOS build. And hopefully not breaking the other builds
1598         at the same time.
1599
1600         * UIProcess/PageClient.h:
1601         * UIProcess/WebContextMenuProxy.cpp:
1602         * UIProcess/WebContextMenuProxy.h:
1603         * UIProcess/ios/PageClientImplIOS.h:
1604         * UIProcess/ios/PageClientImplIOS.mm:
1605         * UIProcess/mac/PageClientImpl.h:
1606         * UIProcess/mac/PageClientImpl.mm:
1607
1608 2015-10-15  Anders Carlsson  <andersca@apple.com>
1609
1610         Use the context inside WebContextMenuProxyMac
1611         https://bugs.webkit.org/show_bug.cgi?id=150196
1612
1613         Reviewed by Tim Horton.
1614
1615         * UIProcess/WebContextMenuProxy.h:
1616         * UIProcess/WebPageProxy.cpp:
1617         (WebKit::WebPageProxy::internalShowContextMenu):
1618         * UIProcess/mac/WebContextMenuProxyMac.h:
1619         * UIProcess/mac/WebContextMenuProxyMac.mm:
1620         (WebKit::WebContextMenuProxyMac::populate):
1621         (WebKit::WebContextMenuProxyMac::showContextMenu):
1622
1623 2015-10-15  Anders Carlsson  <andersca@apple.com>
1624
1625         Use the context menu location that's stored in the context data
1626         https://bugs.webkit.org/show_bug.cgi?id=150194
1627
1628         Reviewed by Tim Horton.
1629
1630         * UIProcess/WebContextMenuProxy.h:
1631         * UIProcess/WebPageProxy.cpp:
1632         (WebKit::WebPageProxy::internalShowContextMenu):
1633         * UIProcess/mac/WebContextMenuProxyMac.h:
1634         * UIProcess/mac/WebContextMenuProxyMac.mm:
1635         (WebKit::WebContextMenuProxyMac::showContextMenu):
1636
1637 2015-10-15  Anders Carlsson  <andersca@apple.com>
1638
1639         Store the context menu data and user data in the WebContextMenuProxy object
1640         https://bugs.webkit.org/show_bug.cgi?id=150191
1641
1642         Reviewed by Tim Horton.
1643
1644         * UIProcess/PageClient.h:
1645         * UIProcess/WebContextMenuProxy.cpp:
1646         (WebKit::WebContextMenuProxy::WebContextMenuProxy):
1647         * UIProcess/WebContextMenuProxy.h:
1648         * UIProcess/WebPageProxy.cpp:
1649         (WebKit::WebPageProxy::internalShowContextMenu):
1650         * UIProcess/ios/PageClientImplIOS.h:
1651         * UIProcess/ios/PageClientImplIOS.mm:
1652         (WebKit::PageClientImpl::createContextMenuProxy):
1653         * UIProcess/mac/PageClientImpl.h:
1654         * UIProcess/mac/PageClientImpl.mm:
1655         (WebKit::PageClientImpl::createContextMenuProxy):
1656         * UIProcess/mac/WebContextMenuProxyMac.h:
1657         (WebKit::WebContextMenuProxyMac::create):
1658         * UIProcess/mac/WebContextMenuProxyMac.mm:
1659         (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
1660
1661 2015-10-15  Dan Bernstein  <mitz@apple.com>
1662
1663         [Cocoa] Stop using WKSetNSURLConnectionDefersCallbacks
1664         https://bugs.webkit.org/show_bug.cgi?id=150189
1665
1666         Reviewed by Anders Carlsson.
1667
1668         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1669         (InitWebCoreSystemInterface): Removed initialization.
1670
1671 2015-10-15  Anders Carlsson  <andersca@apple.com>
1672
1673         Fix build.
1674
1675         * UIProcess/API/APIFrameInfo.cpp:
1676         (API::FrameInfo::~FrameInfo):
1677         * UIProcess/API/APIFrameInfo.h:
1678         * UIProcess/API/Cocoa/WKUserContentController.mm:
1679
1680 2015-10-15  Anders Carlsson  <andersca@apple.com>
1681
1682         CTTE menu proxies
1683         https://bugs.webkit.org/show_bug.cgi?id=150187
1684
1685         Reviewed by Tim Horton.
1686
1687         * UIProcess/PageClient.h:
1688         * UIProcess/WebPageProxy.cpp:
1689         (WebKit::WebPageProxy::showPopupMenu):
1690         (WebKit::WebPageProxy::internalShowContextMenu):
1691         * UIProcess/WebPopupMenuProxy.h:
1692         (WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
1693         * UIProcess/ios/PageClientImplIOS.h:
1694         * UIProcess/ios/PageClientImplIOS.mm:
1695         (WebKit::PageClientImpl::createPopupMenuProxy):
1696         (WebKit::PageClientImpl::createContextMenuProxy): Deleted.
1697         * UIProcess/mac/PageClientImpl.h:
1698         * UIProcess/mac/PageClientImpl.mm:
1699         (WebKit::PageClientImpl::createPopupMenuProxy):
1700         (WebKit::PageClientImpl::createContextMenuProxy):
1701         * UIProcess/mac/WebContextMenuProxyMac.h:
1702         (WebKit::WebContextMenuProxyMac::create):
1703         (WebKit::WebContextMenuProxyMac::page):
1704         * UIProcess/mac/WebContextMenuProxyMac.mm:
1705         (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
1706         (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
1707         (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
1708         * UIProcess/mac/WebPopupMenuProxyMac.h:
1709         (WebKit::WebPopupMenuProxyMac::create):
1710         * UIProcess/mac/WebPopupMenuProxyMac.mm:
1711         (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
1712
1713 2015-10-15  Anders Carlsson  <andersca@apple.com>
1714
1715         Add -[WKFrameInfo _handle]
1716         https://bugs.webkit.org/show_bug.cgi?id=150185
1717         rdar://problem/23132371
1718
1719         Reviewed by Tim Horton.
1720
1721         * UIProcess/API/APIFrameInfo.cpp:
1722         (API::FrameInfo::FrameInfo):
1723         * UIProcess/API/APIFrameInfo.h:
1724         * UIProcess/API/Cocoa/WKFrameInfo.mm:
1725         (-[WKFrameInfo _handle]):
1726         * UIProcess/API/Cocoa/WKFrameInfoInternal.h:
1727         * UIProcess/API/Cocoa/WKFrameInfoPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h.
1728         * UIProcess/WebPageProxy.cpp:
1729         (WebKit::WebPageProxy::showPopupMenu):
1730         (WebKit::WebPageProxy::internalShowContextMenu):
1731         * UIProcess/WebPopupMenuProxy.h:
1732         (WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
1733         * WebKit2.xcodeproj/project.pbxproj:
1734
1735 2015-10-15  Anders Carlsson  <andersca@apple.com>
1736
1737         The menu location and menu items should be part of ContextMenuContextData
1738         https://bugs.webkit.org/show_bug.cgi?id=150182
1739
1740         Reviewed by Andreas Kling.
1741
1742         * Shared/ContextMenuContextData.cpp:
1743         (WebKit::ContextMenuContextData::ContextMenuContextData):
1744         (WebKit::ContextMenuContextData::encode):
1745         (WebKit::ContextMenuContextData::decode):
1746         * Shared/ContextMenuContextData.h:
1747         (WebKit::ContextMenuContextData::menuLocation):
1748         (WebKit::ContextMenuContextData::menuItems):
1749         (WebKit::ContextMenuContextData::ContextMenuContextData):
1750         * UIProcess/WebPageProxy.cpp:
1751         (WebKit::WebPageProxy::showContextMenu):
1752         (WebKit::WebPageProxy::internalShowContextMenu):
1753         * UIProcess/WebPageProxy.h:
1754         * UIProcess/WebPageProxy.messages.in:
1755         * UIProcess/mac/WebPageProxyMac.mm:
1756         (WebKit::WebPageProxy::showSelectionServiceMenu):
1757         * WebProcess/WebPage/WebContextMenu.cpp:
1758         (WebKit::WebContextMenu::show):
1759
1760 2015-10-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1761
1762         [GTK] Test WebKit2.RestoreSessionStateContainingFormData fails
1763         https://bugs.webkit.org/show_bug.cgi?id=84960
1764
1765         Reviewed by Žan Doberšek.
1766
1767         Add a cross-platform implementation to LegacySessionStateCodingNone
1768         using the new SessionState, so that non mac ports can make unit
1769         tests that use the legacy session state coding pass.
1770
1771         * UIProcess/LegacySessionStateCodingNone.cpp:
1772         (WebKit::encodeLegacySessionState):
1773         (WebKit::decodeLegacySessionState):
1774         (WebKit::encodeLegacySessionHistoryEntryData): Deleted.
1775         (WebKit::decodeLegacySessionHistoryEntryData): Deleted.
1776
1777 2015-10-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1778
1779         Unreviewed. Fix wrong #ifdef added in r190615.
1780
1781         This disabled accelerated compositing unconditionally.
1782
1783         * UIProcess/gtk/WebPreferencesGtk.cpp:
1784         (WebKit::WebPreferences::platformInitializeStore):
1785
1786 2015-10-14  Zhuo Li  <zachli@apple.com>
1787
1788         Augment <input type=search>’s recent search history with the time each entry was added,
1789         in order to allow time-based clearing of search history.
1790         https://bugs.webkit.org/show_bug.cgi?id=148388.
1791
1792         Reviewed by Darin Adler.
1793
1794         Replace Vector<String> with Vector<RecentSearch>, where RecentSearch is a struct
1795         that consists search string and time, for recent searches in order to store additional time
1796         information.
1797
1798         All these new RecentSearches are stored in a plist in which the structure looks like:
1799         Root {
1800             "items": {
1801                 autosave name: {
1802                     "searches": [
1803                         { "searchString": searchString, "date": date },
1804                         ...
1805                     ]
1806                 }
1807             }
1808         }
1809
1810         * Scripts/webkit/messages.py:
1811         (headers_for_type):
1812         * Shared/WebCoreArgumentCoders.cpp:
1813         (IPC::ArgumentCoder<RecentSearch>::encode): Encode the new struct RecentSearch
1814         (IPC::ArgumentCoder<RecentSearch>::decode): Decode the new struct RecentSearch
1815         * Shared/WebCoreArgumentCoders.h:
1816         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1817         (WebKit::WebPageProxy::saveRecentSearches): Call saveRecentSearches in WebCore::SearchPopupMenuCocoa.
1818         (WebKit::WebPageProxy::loadRecentSearches): Call loadRecentSearches in WebCore::SearchPopupMenuCocoa.
1819         * UIProcess/WebPageProxy.h:
1820         * UIProcess/WebPageProxy.messages.in:
1821         * UIProcess/efl/WebPageProxyEfl.cpp:
1822         (WebKit::WebPageProxy::saveRecentSearches):
1823         (WebKit::WebPageProxy::loadRecentSearches):
1824         * UIProcess/gtk/WebPageProxyGtk.cpp:
1825         (WebKit::WebPageProxy::saveRecentSearches):
1826         (WebKit::WebPageProxy::loadRecentSearches):
1827         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
1828         (WebKit::WebSearchPopupMenu::saveRecentSearches):
1829         (WebKit::WebSearchPopupMenu::loadRecentSearches):
1830         * WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
1831
1832 2015-10-14  Wenson Hsieh  <wenson_hsieh@apple.com>
1833
1834         Web pages with unscalable viewports shouldn't have a single tap delay
1835         https://bugs.webkit.org/show_bug.cgi?id=149968
1836         <rdar://problem/23054453>
1837
1838         Reviewed by Simon Fraser.
1839
1840         When a viewport is unscalable (specified through the meta viewport tag) we
1841         do not add a delay to our single tap gesture recognizer. We do this by
1842         disabling or reinitializing the WKContentView's double tap gesture recognizer
1843         when the viewport becomes unscalable or scalable, respectively. A viewport is
1844         deemed unscalable when it has user-scalable = no, or when the minimum scale is
1845         greater than or equal to the maximum scale.
1846
1847         * UIProcess/API/Cocoa/WKWebView.mm:
1848         (-[WKWebView _didCommitLayerTree:]):
1849         * UIProcess/ios/WKContentViewInteraction.h:
1850         * UIProcess/ios/WKContentViewInteraction.mm:
1851         (-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]): Pulled logic
1852                 for initializing a double tap gesture recognizer out into a helper function.
1853         (-[WKContentView setupInteraction]):
1854         (-[WKContentView _setDoubleTapGesturesEnabled:]): Turns gesture recognition for double
1855                 taps on or off.
1856
1857 2015-10-14  Anders Carlsson  <andersca@apple.com>
1858
1859         Remove a message that isn't used by anyone
1860         https://bugs.webkit.org/show_bug.cgi?id=150136
1861
1862         Reviewed by Andreas Kling.
1863
1864         * UIProcess/API/APILoaderClient.h:
1865         (API::LoaderClient::didRemoveFrameFromHierarchy): Deleted.
1866         * UIProcess/API/C/WKPage.cpp:
1867         (WKPageSetPageLoaderClient): Deleted.
1868         * UIProcess/WebPageProxy.cpp:
1869         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy): Deleted.
1870         * UIProcess/WebPageProxy.h:
1871         * UIProcess/WebPageProxy.messages.in:
1872         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1873         (WebKit::WebFrameLoaderClient::detachedFromParent2): Deleted.
1874
1875 2015-10-14  Alex Christensen  <achristensen@webkit.org>
1876
1877         Add SPI for reloading without content blockers
1878         https://bugs.webkit.org/show_bug.cgi?id=150058
1879         rdar://problem/22742222
1880
1881         Reviewed by Sam Weinig.
1882
1883         * Shared/WebPageCreationParameters.cpp:
1884         (WebKit::WebPageCreationParameters::encode):
1885         (WebKit::WebPageCreationParameters::decode):
1886         * Shared/WebPageCreationParameters.h:
1887         * UIProcess/API/C/WKPage.cpp:
1888         (WKPageReload):
1889         (WKPageReloadWithoutContentBlockers):
1890         (WKPageReloadFromOrigin):
1891         (WKPageTryClose):
1892         (WKPageSetUserContentExtensionsEnabled):
1893         (WKPageSupportsTextEncoding):
1894         * UIProcess/API/C/WKPage.h:
1895         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1896         (-[WKBrowsingContextController reload]):
1897         (-[WKBrowsingContextController reloadFromOrigin]):
1898         (-[WKBrowsingContextController applicationNameForUserAgent]):
1899         * UIProcess/API/Cocoa/WKWebView.mm:
1900         (-[WKWebView reload]):
1901         (-[WKWebView reloadFromOrigin]):
1902         (-[WKWebView _setUserContentExtensionsEnabled:]):
1903         (-[WKWebView _userContentExtensionsEnabled]):
1904         (-[WKWebView _webProcessIdentifier]):
1905         (-[WKWebView _killWebContentProcess]):
1906         (-[WKWebView _reloadWithoutContentBlockers]):
1907         (-[WKWebView _killWebContentProcessAndResetState]):
1908         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1909         * UIProcess/API/gtk/WebKitWebView.cpp:
1910         (webkit_web_view_reload):
1911         (webkit_web_view_reload_bypass_cache):
1912         * UIProcess/WebFrameProxy.cpp:
1913         (WebKit::WebFrameProxy::didHandleContentFilterUnblockNavigation):
1914         * UIProcess/WebPageProxy.cpp:
1915         (WebKit::WebPageProxy::stopLoading):
1916         (WebKit::WebPageProxy::reload):
1917         (WebKit::WebPageProxy::creationParameters):
1918         (WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
1919         (WebKit::WebPageProxy::setUserContentExtensionsEnabled): Deleted.
1920         * UIProcess/WebPageProxy.h:
1921         (WebKit::WebPageProxy::userContentExtensionsEnabled): Deleted.
1922         * WebProcess/WebPage/WebPage.cpp:
1923         (WebKit::m_shouldDispatchFakeMouseMoveEvents):
1924         (WebKit::WebPage::setDefersLoading):
1925         (WebKit::WebPage::reload):
1926         (WebKit::WebPage::goForward):
1927         (WebKit::WebPage::createDocumentLoader):
1928         (WebKit::WebPage::setShouldScaleViewToFitDocument):
1929         (WebKit::WebPage::imageOrMediaDocumentSizeChanged):
1930         (WebKit::WebPage::setUserContentExtensionsEnabled): Deleted.
1931         * WebProcess/WebPage/WebPage.h:
1932         * WebProcess/WebPage/WebPage.messages.in:
1933
1934 2015-10-14  Simon Fraser  <simon.fraser@apple.com>
1935
1936         Change GraphicsContext image-drawing functions to take references
1937         https://bugs.webkit.org/show_bug.cgi?id=150108
1938
1939         Reviewed by Tim Horton and Sam Weinig.
1940
1941         Change GraphicsContext::drawImage(), drawTiledImage(), drawImageBuffer(), clipToImageBuffer()
1942         and isCompatibleWithBuffer() to take references, and adjust calling code, adding
1943         null-checks where necessary.
1944
1945         * Shared/ContextMenuContextData.cpp:
1946         (WebKit::ContextMenuContextData::ContextMenuContextData):
1947         * Shared/WebCoreArgumentCoders.cpp:
1948         (IPC::encodeImage):
1949         (IPC::encodeOptionalImage):
1950         (IPC::ArgumentCoder<Cursor>::encode):
1951         * WebProcess/WebPage/WebFrame.cpp:
1952         (WebKit::WebFrame::createSelectionSnapshot):
1953
1954 2015-10-14  Anders Carlsson  <andersca@apple.com>
1955
1956         Change the bundle app cache APIs to take a page
1957         https://bugs.webkit.org/show_bug.cgi?id=150123
1958
1959         Reviewed by Sam Weinig.
1960
1961         This is another step towards getting rid of ApplicationCacheStorage::singleton().
1962         Ideally the WKTR tests that use this should be converted to API tests.
1963
1964         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1965         (WKBundleClearApplicationCache): Deleted.
1966         (WKBundleClearApplicationCacheForOrigin): Deleted.
1967         (WKBundleSetAppCacheMaximumSize): Deleted.
1968         (WKBundleGetAppCacheUsageForOrigin): Deleted.
1969         (WKBundleSetApplicationCacheOriginQuota): Deleted.
1970         (WKBundleResetApplicationCacheOriginQuota): Deleted.
1971         (WKBundleCopyOriginsWithApplicationCache): Deleted.
1972         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1973         (WKBundlePageClearApplicationCache):
1974         (WKBundlePageClearApplicationCacheForOrigin):
1975         (WKBundlePageSetAppCacheMaximumSize):
1976         (WKBundlePageGetAppCacheUsageForOrigin):
1977         (WKBundlePageSetApplicationCacheOriginQuota):
1978         (WKBundlePageResetApplicationCacheOriginQuota):
1979         (WKBundlePageCopyOriginsWithApplicationCache):
1980         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1981         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1982         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1983         (WebKit::InjectedBundle::clearApplicationCache): Deleted.
1984         (WebKit::InjectedBundle::clearApplicationCacheForOrigin): Deleted.
1985         (WebKit::InjectedBundle::setAppCacheMaximumSize): Deleted.
1986         (WebKit::InjectedBundle::appCacheUsageForOrigin): Deleted.
1987         (WebKit::InjectedBundle::setApplicationCacheOriginQuota): Deleted.
1988         (WebKit::InjectedBundle::resetApplicationCacheOriginQuota): Deleted.
1989         (WebKit::InjectedBundle::originsWithApplicationCache): Deleted.
1990         * WebProcess/InjectedBundle/InjectedBundle.h:
1991
1992 2015-10-14  Joonghun Park  <jh718.park@samsung.com>
1993
1994         [EFL] Fix the problem in which environment variable included in webprocess-cmd-prefix can't be parsed
1995         https://bugs.webkit.org/show_bug.cgi?id=148616
1996
1997         Reviewed by Gyuyoung Kim.
1998
1999         This patch fixes the problem in which environment variable in web process-cmd-prefix can't be parsed.
2000         process-cmd-prefix option doesn't work in two cases.
2001         1. When executing run-layout-tests,
2002         2. When executing MiniBrowser with web process-cmd-prefix environment variable.
2003
2004         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
2005         (WebKit::parseAndRemoveEnvironments):
2006         (WebKit::ProcessLauncher::launchProcess):
2007
2008 2015-10-13  Yongjun Zhang  <yongjun_zhang@apple.com>
2009
2010         Use the correct notification strings for view service applications state change.
2011         https://bugs.webkit.org/show_bug.cgi?id=150107
2012
2013         Use the correct notification names "_UIViewServiceHostDidEnterBackgroundNotification" and
2014         "_UIViewServiceHostWillEnterForegroundNotification" to listen to view service application state changes.
2015
2016         Reviewed by Gavin Barraclough.
2017
2018         * UIProcess/ApplicationStateTracker.mm:
2019         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
2020
2021 2015-10-13  Myles C. Maxfield  <mmaxfield@apple.com>
2022
2023         Split TypesettingFeatures into kerning and ligatures bools
2024         https://bugs.webkit.org/show_bug.cgi?id=150074
2025
2026         Reviewed by Simon Fraser.
2027
2028         * Shared/WebProcessCreationParameters.cpp:
2029         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
2030         (WebKit::WebProcessCreationParameters::encode):
2031         (WebKit::WebProcessCreationParameters::decode):
2032         * Shared/WebProcessCreationParameters.h:
2033         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2034         (WebKit::WebProcessPool::platformInitializeWebProcess):
2035         * WebProcess/cocoa/WebProcessCocoa.mm:
2036         (WebKit::WebProcess::platformInitializeWebProcess):
2037
2038 2015-10-13  Dean Jackson  <dino@apple.com>
2039
2040         Fix iOS-family builds.
2041
2042         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
2043         (WKPageGetObjectRegistry):
2044         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2045         (-[WKBrowsingContextController _remoteObjectRegistry]):
2046         * UIProcess/API/mac/WKViewInternal.h:
2047
2048 2015-10-13  Anders Carlsson  <andersca@apple.com>
2049
2050         Fix 32-bit build.
2051
2052         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
2053         (WKPageGetObjectRegistry):
2054
2055 2015-10-13  Anders Carlsson  <andersca@apple.com>
2056
2057         Add and implement WKPageGetObjectRegistry
2058         https://bugs.webkit.org/show_bug.cgi?id=150102
2059
2060         Reviewed by Tim Horton.
2061
2062         Put the _WKObjectRegistry used by WKPageRef and WKBrowsingContextController on the WKView for now.
2063         If we decide to share more code between WKView and WKWebView, the object registry could live in an object that would be shared
2064         between WKView and WKWebView.
2065
2066         * UIProcess/API/C/mac/WKPagePrivateMac.h:
2067         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
2068         (WKPageGetObjectRegistry):
2069         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2070         (-[WKBrowsingContextController _remoteObjectRegistry]):
2071         (-[WKBrowsingContextController dealloc]): Deleted.
2072         * UIProcess/API/mac/WKView.mm:
2073         (-[WKView dealloc]):
2074         (-[WKView _remoteObjectRegistry]):
2075         * UIProcess/API/mac/WKViewInternal.h:
2076
2077 2015-10-13  Chris Dumez  <cdumez@apple.com>
2078
2079         Avoid useless copies in range-loops that are using 'auto'
2080         https://bugs.webkit.org/show_bug.cgi?id=150091
2081
2082         Reviewed by Sam Weinig.
2083
2084         Avoid useless copies in range-loops that are using 'auto'. Also use
2085         'auto*' instead of 'auto' when range values are pointers for clarity.
2086
2087         * UIProcess/VisitedLinkStore.cpp:
2088         (WebKit::VisitedLinkStore::pendingVisitedLinksTimerFired):
2089         (WebKit::VisitedLinkStore::resizeTable):
2090         * UIProcess/WebProcessProxy.cpp:
2091         (WebKit::WebProcessProxy::releaseRemainingIconsForPageURLs):
2092         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2093         (WebKit::WebsiteDataStore::fetchData):
2094         (WebKit::WebsiteDataStore::removeData):
2095         (WebKit::WebsiteDataStore::plugins):
2096
2097 2015-10-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
2098
2099         Add debug settings for using giant tiles (4096x4096)
2100         https://bugs.webkit.org/show_bug.cgi?id=149977
2101         <rdar://problem/23017093>
2102
2103         Reviewed by Tim Horton.
2104
2105         * Shared/WebPreferencesDefinitions.h:
2106         * UIProcess/API/C/WKPreferences.cpp:
2107         (WKPreferencesSetUseGiantTiles):
2108         (WKPreferencesGetUseGiantTiles):
2109         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2110         * WebProcess/WebPage/WebPage.cpp:
2111         (WebKit::WebPage::updatePreferences):
2112
2113 2015-10-13  Brent Fulgham  <bfulgham@apple.com>
2114
2115         [iOS] Avoid crash due to invalid screen bounds
2116         https://bugs.webkit.org/show_bug.cgi?id=150048
2117         <rdar://problem/22112664>
2118
2119         Reviewed by Jer Noble.
2120
2121         Check for an invalid bounds, and reset it to a known state before
2122         attempting to use it.
2123
2124         * WebProcess/ios/WebVideoFullscreenManager.mm:
2125         (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
2126
2127 2015-10-13  Sergio Villar Senin  <svillar@igalia.com>
2128
2129         [GTK] Fix build for ENABLE_TOUCH_EVENTS=OFF
2130         https://bugs.webkit.org/show_bug.cgi?id=150085
2131
2132         Reviewed by Carlos Garcia Campos.
2133
2134         * Shared/gtk/NativeWebTouchEventGtk.cpp:
2135         * Shared/gtk/WebEventFactory.cpp:
2136         * Shared/gtk/WebEventFactory.h:
2137         * UIProcess/API/gtk/PageClientImpl.cpp:
2138         * UIProcess/API/gtk/PageClientImpl.h:
2139         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2140         (webkit_web_view_base_class_init):
2141
2142 2015-10-13  Chris Dumez  <cdumez@apple.com>
2143
2144         Avoid useless copying of Key::HashType in loops in NetworkCache::Storage::synchronize()
2145         https://bugs.webkit.org/show_bug.cgi?id=150061
2146
2147         Reviewed by Carlos Garcia Campos.
2148
2149         Avoid useless copying of Key::HashType in loops in NetworkCache::Storage::synchronize().
2150         Key::HashType is currently a SHA1::Digest, which is a std::array<uint8_t, 20>.
2151
2152         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2153         (WebKit::NetworkCache::Storage::synchronize):
2154
2155 2015-10-12  Philip Chimento  <philip.chimento@gmail.com>
2156
2157         [GTK] OSX linker doesn't understand --whole-archive
2158         https://bugs.webkit.org/show_bug.cgi?id=144557
2159
2160         Reviewed by Martin Robinson.
2161
2162         * PlatformGTK.cmake: Link with extra libraries on Darwin, since
2163         we don't have the --whole-archive linker option.
2164
2165 2015-10-09  Anders Carlsson  <andersca@apple.com>
2166
2167         Don't allow plug-ins to override image types for <embed> elements
2168         https://bugs.webkit.org/show_bug.cgi?id=149979
2169
2170         Reviewed by Tim Horton.
2171
2172         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2173         (WebKit::WebFrameLoaderClient::objectContentType):
2174         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2175
2176 2015-10-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2177
2178         [EFL] Bump Version/X in user agent
2179         https://bugs.webkit.org/show_bug.cgi?id=150013
2180
2181         Reviewed by Csaba Osztrogonác.
2182
2183         EFL port needs to ensure maximum compatibility with existing web sites.
2184         Thus version number needs to be bumped from 5.0 to 8.0 as GTK port.
2185
2186         * UIProcess/efl/WebPageProxyEfl.cpp:
2187         (WebKit::WebPageProxy::standardUserAgent):
2188
2189 2015-10-10  Dan Bernstein  <mitz@apple.com>
2190
2191         [iOS] Remove unnecessary iOS version checks
2192         https://bugs.webkit.org/show_bug.cgi?id=150002
2193
2194         Reviewed by Alexey Proskuryakov.
2195
2196         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2197         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2198         * Platform/IPC/mac/ConnectionMac.mm:
2199         (IPC::AccessibilityProcessSuspendedNotification):
2200         * Platform/spi/ios/SafariServicesSPI.h:
2201         * Platform/spi/ios/UIKitSPI.h:
2202         * Shared/Network/NetworkProcessCreationParameters.cpp:
2203         (WebKit::NetworkProcessCreationParameters::encode):
2204         (WebKit::NetworkProcessCreationParameters::decode):
2205         * Shared/Network/NetworkProcessCreationParameters.h:
2206         * Shared/Plugins/PluginProcessCreationParameters.cpp:
2207         (WebKit::PluginProcessCreationParameters::encode):
2208         (WebKit::PluginProcessCreationParameters::decode):
2209         * Shared/Plugins/PluginProcessCreationParameters.h:
2210         * Shared/WebEventConversion.cpp:
2211         (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
2212         * Shared/WebProcessCreationParameters.cpp:
2213         (WebKit::WebProcessCreationParameters::encode):
2214         (WebKit::WebProcessCreationParameters::decode):
2215         * Shared/WebProcessCreationParameters.h:
2216         * Shared/ios/NativeWebTouchEventIOS.mm:
2217         (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
2218         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
2219         * Shared/ios/WebPlatformTouchPointIOS.cpp:
2220         (WebKit::WebPlatformTouchPoint::encode):
2221         (WebKit::WebPlatformTouchPoint::decode):
2222         * UIProcess/API/Cocoa/WKWebView.mm:
2223         (-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]):
2224         (shouldAllowPictureInPictureMediaPlayback):
2225         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2226         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2227         (WebKit::WebProcessPool::platformInitializeWebProcess):
2228         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2229         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2230         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
2231         * UIProcess/ios/ViewGestureControllerIOS.mm:
2232         (-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
2233         * UIProcess/ios/WKContentViewInteraction.mm:
2234         (-[WKContentView setupInteraction]):
2235         (-[WKContentView _ensureFormAccessoryView]):
2236         (-[WKContentView webSelectionAssistant]):
2237         (-[WKContentView selectionInteractionAssistant]):
2238         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2239         (WebKit::WebVideoFullscreenManagerProxy::create):
2240         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2241         (photoLibraryIcon):
2242         (cameraIcon):
2243         (fallbackIconForFile):
2244         (iconForImageFile):
2245         * WebKit2.xcodeproj/project.pbxproj:
2246         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2247         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2248         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2249         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2250         * WebProcess/cocoa/WebProcessCocoa.mm:
2251         (WebKit::WebProcess::platformInitializeWebProcess):
2252
2253 2015-10-10  Dan Bernstein  <mitz@apple.com>
2254
2255         [iOS] Remove project support for iOS 8
2256         https://bugs.webkit.org/show_bug.cgi?id=149993
2257
2258         Reviewed by Alexey Proskuryakov.
2259
2260         * Configurations/Base.xcconfig:
2261         * Configurations/BaseLegacyProcess.xcconfig:
2262         * Configurations/BaseXPCService.xcconfig:
2263         * Configurations/PluginProcessShim.xcconfig:
2264         * Configurations/SecItemShim.xcconfig:
2265         * Configurations/WebKit.xcconfig:
2266         * Configurations/WebKit2.xcconfig:
2267         * Configurations/WebProcessShim.xcconfig:
2268
2269 2015-10-09  Myles C. Maxfield  <mmaxfield@apple.com>
2270
2271         Unreviewed, rolling out r190689
2272         https://bugs.webkit.org/show_bug.cgi?id=149992
2273
2274         Fixed in other repository.
2275
2276         Reverted changesets:
2277
2278         "Unreviewed, rolling out r190572, r190593, r190594, and r190639."
2279         https://bugs.webkit.org/show_bug.cgi?id=149897
2280
2281 2015-10-09  Beth Dakin  <bdakin@apple.com>
2282
2283         Rubber-stamped by Anders Carlsson.
2284
2285         Remove unnecessary includes.
2286         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2287         * WebProcess/Plugins/Plugin.h:
2288         * WebProcess/Plugins/PluginProxy.h:
2289         * WebProcess/Plugins/PluginView.h:
2290         * WebProcess/WebPage/mac/WebPageMac.mm:
2291
2292 2015-10-09  Beth Dakin  <bdakin@apple.com>
2293
2294         Build fix.
2295
2296         * CMakeLists.txt:
2297         * Shared/API/APIHitTestResult.cpp: Removed.
2298         * Shared/API/APIHitTestResult.h: Removed.
2299         * WebKit2.xcodeproj/project.pbxproj:
2300
2301 2015-10-09  Beth Dakin  <bdakin@apple.com>
2302
2303         Build fix.
2304
2305         * UIProcess/API/APIHitTestResult.cpp: Copied from Shared/API/APIHitTestResult.cpp.
2306         * UIProcess/API/APIHitTestResult.h: Copied from Shared/API/APIHitTestResult.h.
2307         * UIProcess/mac/PageClientImpl.mm:
2308
2309 2015-10-09  Beth Dakin  <bdakin@apple.com>
2310
2311         WKWebView needs SPI to customize immediate actions
2312         https://bugs.webkit.org/show_bug.cgi?id=149939
2313         -and corresponding-
2314         rdar://problem/20016849
2315
2316         Reviewed by Anders Carlsson.
2317
2318         This patch breaks WebHitTestResult into two files. WebHiTestResultData 
2319         continues to live in the WebKit namespace and contains the old 
2320         WebHitTestResult::Data struct. The rest of WebHitTestResult is now 
2321         API::HitTestResult. The patch also adds _WKHitTestResult as Obj-C API to wrap 
2322         API::HitTestResult.
2323
2324         Attempt to keep other ports happy with new files.
2325         * CMakeLists.txt:
2326
2327         WebKit::WebHitTestResult no longer contains the Data struct and is now called 
2328         API::HitTestResult.
2329         * Shared/API/APIHitTestResult.cpp: Copied from Shared/WebHitTestResult.cpp.
2330         (API::HitTestResult::create):
2331         (WebKit::WebHitTestResult::create): Deleted.
2332         (WebKit::WebHitTestResult::Data::Data): Deleted.
2333         (WebKit::WebHitTestResult::Data::~Data): Deleted.
2334         (WebKit::WebHitTestResult::Data::encode): Deleted.
2335         (WebKit::WebHitTestResult::Data::decode): Deleted.
2336         (WebKit::WebHitTestResult::Data::platformEncode): Deleted.
2337         (WebKit::WebHitTestResult::Data::platformDecode): Deleted.
2338         (WebKit::WebHitTestResult::Data::elementBoundingBoxInWindowCoordinates): Deleted.
2339         * Shared/API/APIHitTestResult.h: Copied from Shared/WebHitTestResult.h.
2340         (API::HitTestResult::absoluteImageURL):
2341         (API::HitTestResult::absolutePDFURL):
2342         (API::HitTestResult::absoluteLinkURL):
2343         (API::HitTestResult::absoluteMediaURL):
2344         (API::HitTestResult::linkLabel):
2345         (API::HitTestResult::linkTitle):
2346         (API::HitTestResult::lookupText):
2347         (API::HitTestResult::isContentEditable):
2348         (API::HitTestResult::isDownloadableMedia):
2349         (API::HitTestResult::HitTestResult):
2350         (WebKit::WebHitTestResult::absoluteImageURL): Deleted.
2351         (WebKit::WebHitTestResult::absolutePDFURL): Deleted.
2352         (WebKit::WebHitTestResult::absoluteLinkURL): Deleted.
2353         (WebKit::WebHitTestResult::absoluteMediaURL): Deleted.
2354         (WebKit::WebHitTestResult::linkLabel): Deleted.
2355         (WebKit::WebHitTestResult::linkTitle): Deleted.
2356         (WebKit::WebHitTestResult::lookupText): Deleted.
2357         (WebKit::WebHitTestResult::isContentEditable): Deleted.
2358         (WebKit::WebHitTestResult::isDownloadableMedia): Deleted.
2359         (WebKit::WebHitTestResult::WebHitTestResult): Deleted.
2360
2361         This is a new obj-c object that we can use for the modern immediate action 
2362         API.
2363         * Shared/API/Cocoa/_WKHitTestResult.h: Added.
2364         * Shared/API/Cocoa/_WKHitTestResult.mm: Added.
2365         (-[_WKHitTestResult dealloc]):
2366         (-[_WKHitTestResult absoluteImageURL]):
2367         (-[_WKHitTestResult absolutePDFURL]):
2368         (-[_WKHitTestResult absoluteLinkURL]):
2369         (-[_WKHitTestResult absoluteMediaURL]):
2370         (-[_WKHitTestResult linkLabel]):
2371         (-[_WKHitTestResult linkTitle]):
2372         (-[_WKHitTestResult lookupText]):
2373         (-[_WKHitTestResult isContentEditable]):
2374         (-[_WKHitTestResult elementBoundingBox]):
2375         (-[_WKHitTestResult copyWithZone:]):
2376         (-[_WKHitTestResult _apiObject]):
2377
2378         _WKHitTestResult wraps API::HitTestResult.
2379         * Shared/API/Cocoa/_WKHitTestResultInternal.h: Added.
2380         (API::wrapper):
2381         * Shared/Cocoa/APIObject.mm:
2382         (API::Object::newObject):
2383
2384         Since we want to use the same enum name for the new enum, use a #define instead of a typedef in the old C SPI. This should keep old clients working in the meantime.
2385         * Shared/API/c/WKImmediateActionTypes.h:
2386
2387         WebHitTestResult::Data is now WebHitTestResultData.
2388         * Shared/ContextMenuContextData.h:
2389         (WebKit::ContextMenuContextData::webHitTestResultData):
2390         (WebKit::ContextMenuContextData::selectedText):
2391
2392         Remove WebHitTestResult, and add WebHitTestResultData for the Data struct.
2393         * Shared/WebHitTestResult.cpp: Removed.
2394         * Shared/WebHitTestResult.h: Removed.
2395         * Shared/WebHitTestResultData.cpp: Added.
2396         (WebKit::WebHitTestResultData::WebHitTestResultData):
2397         (WebKit::WebHitTestResultData::~WebHitTestResultData):
2398         (WebKit::WebHitTestResultData::encode):
2399         (WebKit::WebHitTestResultData::decode):
2400         (WebKit::WebHitTestResultData::platformEncode):
2401         (WebKit::WebHitTestResultData::platformDecode):
2402         (WebKit::WebHitTestResultData::elementBoundingBoxInWindowCoordinates):
2403         * Shared/WebHitTestResultData.h: Added.
2404         * Shared/mac/WebHitTestResult.mm: Removed.
2405         * Shared/mac/WebHitTestResultData.mm: Copied from Shared/mac/WebHitTestResult.mm.
2406         (WebKit::WebHitTestResultData::platformEncode):
2407         (WebKit::WebHitTestResultData::platformDecode):
2408         (WebKit::WebHitTestResult::Data::platformEncode): Deleted.
2409         (WebKit::WebHitTestResult::Data::platformDecode): Deleted.
2410
2411         WebHitTestResult::Data is now WebHitTestResultData.
2412         * UIProcess/API/APIContextMenuClient.h:
2413         (API::ContextMenuClient::~ContextMenuClient):
2414         (API::ContextMenuClient::getContextMenuFromProposedMenu):
2415         (API::ContextMenuClient::customContextMenuItemSelected):
2416         (API::ContextMenuClient::contextMenuDismissed):
2417         (API::ContextMenuClient::showContextMenu):
2418
2419         WebHitTestResult is now WebHitTestResult
2420         * UIProcess/API/APIUIClient.h:
2421         (API::UIClient::runJavaScriptPrompt):
2422         (API::UIClient::setStatusText):
2423         (API::UIClient::mouseDidMoveOverElement):
2424         (API::UIClient::unavailablePluginButtonClicked):
2425         (API::UIClient::pinnedStateDidChange):
2426         (API::UIClient::didBeginTrackingPotentialLongMousePress):
2427         (API::UIClient::didRecognizeLongMousePress):
2428         (API::UIClient::didCancelTrackingPotentialLongMousePress):
2429         * UIProcess/API/C/WKAPICast.h:
2430         * UIProcess/API/C/WKHitTestResult.cpp:
2431         (WKHitTestResultGetTypeID):
2432         (WKHitTestResultCopyAbsoluteImageURL):
2433         * UIProcess/API/C/WKPage.cpp:
2434         (WKPageSetPageContextMenuClient):
2435         (WKPageSetPageUIClient):
2436
2437         New WKWebView SPI _immediateActionAnimationControllerForHitTestResult
2438         * UIProcess/API/Cocoa/WKViewPrivate.h:
2439         * UIProcess/API/Cocoa/WKWebView.mm:
2440         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2441
2442         Attempts to keep other ports happy with the re-name.
2443         * UIProcess/API/efl/WebAccessibility.cpp:
2444         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
2445         * UIProcess/API/gtk/WebKitHitTestResult.cpp:
2446         (webkit_hit_test_result_class_init):
2447         (webkitHitTestResultCreate):
2448         (stringIsEqualToCString):
2449         (webkitHitTestResultCompare):
2450         * UIProcess/API/gtk/WebKitHitTestResultPrivate.h:
2451         * UIProcess/API/gtk/WebKitUIClient.cpp:
2452         * UIProcess/API/gtk/WebKitWebView.cpp:
2453         (webkitWebViewMakePermissionRequest):
2454         (webkitWebViewMouseTargetChanged):
2455         (contextMenuDismissed):
2456         (webkitWebViewPopulateContextMenu):
2457         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
2458
2459         Re-name, and just use uint32_t for the old SPI.
2460         * UIProcess/API/mac/WKView.mm:
2461         (-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
2462         (-[WKView _setDidMoveSwipeSnapshotCallback:]):
2463         (-[WKView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
2464         * UIProcess/API/mac/WKViewInternal.h:
2465
2466         PageClient will figure out whether to call into WKWebView or WKView for this 
2467         SPI.
2468         * UIProcess/PageClient.h:
2469         * UIProcess/WebPageProxy.cpp:
2470         (WebKit::WebPageProxy::immediateActionAnimationControllerForHitTestResult):
2471         * UIProcess/WebPageProxy.h:
2472         * UIProcess/mac/PageClientImpl.h:
2473         * UIProcess/mac/PageClientImpl.mm:
2474         (WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult):
2475
2476         WebKit::WebHitTestResult::Data is now WebKit::WebHitTestResultData.
2477         * UIProcess/WebPageProxy.messages.in:
2478
2479         WKImmediateActionController calls through to WebPageProxy which calls to 
2480         PageClient, which figures out which API to call. Also cache the type as a 
2481         uint32_t
2482         * UIProcess/mac/WKImmediateActionController.h:
2483         * UIProcess/mac/WKImmediateActionController.mm:
2484         (-[WKImmediateActionController _updateImmediateActionItem]):
2485
2486         WebHitTestResult::Data is now WebHitTestResultData.
2487         * UIProcess/mac/WebPageProxyMac.mm:
2488         (WebKit::WebPageProxy::platformInitializeShareMenuItem):
2489
2490         New files!
2491         * WebKit2.xcodeproj/project.pbxproj:
2492
2493         Deal with the #define situation for the enum.
2494         * WebKit2Prefix.h:
2495
2496         New names for things. WebHitTestResult::Data -> WebHitTestResultData
2497         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2498         * WebProcess/Plugins/PDF/PDFPlugin.h:
2499         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2500         (WebKit::pointInLayoutSpaceForPointInWindowSpace):
2501         (WebKit::PDFPlugin::lookupTextAtLocation):
2502         * WebProcess/Plugins/Plugin.h:
2503         * WebProcess/Plugins/PluginProxy.h:
2504         * WebProcess/Plugins/PluginView.h:
2505         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2506         (WebKit::WebChromeClient::mouseDidMoveOverElement):
2507         (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress):
2508         * WebProcess/WebPage/mac/WebPageMac.mm:
2509         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
2510
2511 2015-10-09  Anders Carlsson  <andersca@apple.com>
2512
2513         Remove two unused WKFrame functions
2514         https://bugs.webkit.org/show_bug.cgi?id=149958
2515
2516         Reviewed by Dan Bernstein.
2517
2518         * UIProcess/API/C/WKFrame.cpp:
2519         (WKFrameCopyChildFrames): Deleted.
2520         (WKFrameGetParentFrame): Deleted.
2521         * UIProcess/API/C/WKFrame.h:
2522
2523 2015-10-08  Michael Catanzaro  <mcatanzaro@igalia.com>
2524
2525         Format string issues in NetworkCache.cpp
2526         https://bugs.webkit.org/show_bug.cgi?id=149867
2527
2528         Reviewed by Csaba Osztrogonác.
2529
2530         Cast enums to ints before printing them to placate GCC's -Wformat.
2531
2532         * NetworkProcess/cache/NetworkCache.cpp:
2533         (WebKit::NetworkCache::Cache::retrieve):
2534         (WebKit::NetworkCache::Cache::store):
2535
2536 2015-10-08  Michael Catanzaro  <mcatanzaro@igalia.com>
2537
2538         Format string issue in WebResourceLoadScheduler.cpp
2539         https://bugs.webkit.org/show_bug.cgi?id=149868
2540
2541         Reviewed by Csaba Osztrogonác.
2542
2543         Cast enums to ints before printing them to placate GCC's -Wformat.
2544
2545         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2546         (WebKit::WebResourceLoadScheduler::scheduleLoad):
2547
2548 2015-10-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2549
2550         [GTK] Stop using a nested main loop for popup menus
2551         https://bugs.webkit.org/show_bug.cgi?id=149920
2552
2553         Reviewed by Sergio Villar Senin.
2554
2555         WebPageProxy used to expect the popup menus to run in a nested
2556         main loop and invalidated the menu right after showing it. But
2557         this is no longer the case, so there's no reason to keep using
2558         the nested main loop.
2559
2560         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
2561         (WebKit::WebPopupMenuProxyGtk::~WebPopupMenuProxyGtk):
2562         (WebKit::WebPopupMenuProxyGtk::cancelTracking):
2563         (WebKit::WebPopupMenuProxyGtk::menuItemActivated):
2564         (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk): Deleted.
2565         (WebKit::WebPopupMenuProxyGtk::showPopupMenu): Deleted.
2566         (WebKit::WebPopupMenuProxyGtk::shutdownRunLoop): Deleted.
2567         (WebKit::WebPopupMenuProxyGtk::menuUnmapped): Deleted.
2568         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
2569         (WebKit::WebPopupMenuProxyGtk::setActiveItem): Deleted.
2570
2571 2015-10-07  Anders Carlsson  <andersca@apple.com>
2572
2573         Add API for getting a group identifier from a bundle page
2574         https://bugs.webkit.org/show_bug.cgi?id=149902
2575
2576         Reviewed by Tim Horton.
2577
2578         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2579         (WKBundlePageCopyGroupIdentifier):
2580         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2581
2582 2015-10-07  Csaba Osztrogonác  <ossy@webkit.org>
2583
2584         URTBF after r190678 to fix GTK and EFL builds.
2585
2586         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
2587         (WebKit::InjectedBundle::setBundleParameters):
2588         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2589         (WebKit::InjectedBundle::setBundleParameters):
2590
2591 2015-10-07  Commit Queue  <commit-queue@webkit.org>
2592
2593         Unreviewed, rolling out r190572, r190593, r190594, and
2594         r190639.
2595         https://bugs.webkit.org/show_bug.cgi?id=149897
2596
2597         Breaks Mavericks build (Requested by litherum on #webkit).
2598
2599         Reverted changesets:
2600
2601         "Allow WKRetainPtrs to be used as keys in hashing data
2602         structures"
2603         https://bugs.webkit.org/show_bug.cgi?id=149762
2604         http://trac.webkit.org/changeset/190572
2605
2606         "REGRESSION(189668?): http/tests/notifications/events.html
2607         flakily asserts or times out"
2608         https://bugs.webkit.org/show_bug.cgi?id=149218
2609         http://trac.webkit.org/changeset/190593
2610
2611         "Prospective Mavericks build fix."
2612         http://trac.webkit.org/changeset/190594
2613
2614         "Post-review cleanup after r190572."
2615         http://trac.webkit.org/changeset/190639
2616
2617 2015-10-07  Anders Carlsson  <andersca@apple.com>
2618
2619         Provide a way to get a WKFrameInfoRef from a WKFrameRef
2620         https://bugs.webkit.org/show_bug.cgi?id=149896
2621         rdar://problem/23016081
2622
2623         Reviewed by Dan Bernstein.
2624
2625         * UIProcess/API/C/WKFrame.cpp:
2626         (WKFrameCreateFrameInfo):
2627         * UIProcess/API/C/WKFrame.h:
2628
2629 2015-10-07  Anders Carlsson  <andersca@apple.com>
2630
2631         Add unreachable URL to _WKObservablePageState
2632         https://bugs.webkit.org/show_bug.cgi?id=149893
2633         <rdar://problem/23017235>
2634  
2635         Reviewed by Dan Bernstein.
2636
2637         * UIProcess/API/C/mac/WKPagePrivateMac.h:
2638         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
2639         (-[WKObservablePageState unreachableURL]):
2640
2641 2015-10-07  Anders Carlsson  <andersca@apple.com>
2642
2643         Add -[WKProcessPool _setObjectsForBundleParametersWithDictionary:]
2644         https://bugs.webkit.org/show_bug.cgi?id=149887
2645
2646         Reviewed by Tim Horton.
2647
2648         * UIProcess/API/Cocoa/WKProcessPool.mm:
2649         (-[WKProcessPool _setObjectsForBundleParametersWithDictionary:]):
2650         Copy the dictionary, archive it, and set the values on the UI side bundle parameter data struct.
2651
2652         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2653         Add new SPI.
2654
2655         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
2656         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
2657         (-[WKWebProcessBundleParameters setParameter:forKey:]):
2658         We can just call setValue:forKey: on the dictionary; it will do the right thing if value is nil.
2659
2660         (-[WKWebProcessBundleParameters setParametersForKeyWithDictionary:]):
2661         Enumerate the dictionary and call setValue:forKey: on each key/value pair.
2662
2663         * WebProcess/InjectedBundle/InjectedBundle.h:
2664         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2665         (WebKit::InjectedBundle::setBundleParameter):
2666         If we fail to unarchive a parameter, don't set it to null.
2667
2668         (WebKit::InjectedBundle::setBundleParameters):
2669         Unarchive the dictionary and update the bundle parameters.
2670
2671         * WebProcess/WebProcess.cpp:
2672         (WebKit::WebProcess::setInjectedBundleParameters):
2673         Call the injected bundle.
2674
2675         * WebProcess/WebProcess.h:
2676         * WebProcess/WebProcess.messages.in:
2677         Add new message.
2678
2679 2015-10-06  Anders Carlsson  <andersca@apple.com>
2680
2681         Expose the bundle parameter object on WKBundleRef
2682         https://bugs.webkit.org/show_bug.cgi?id=149860
2683
2684         Reviewed by Tim Horton.
2685
2686         * WebKit2.xcodeproj/project.pbxproj:
2687         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
2688         (-[WKWebProcessBundleParameters description]):
2689         Add a description that includes the parameters.
2690
2691         * WebProcess/InjectedBundle/API/c/mac/WKBundleMac.h:
2692         * WebProcess/InjectedBundle/API/c/mac/WKBundleMac.mm:
2693         (WKBundleGetParameters):
2694         Add getter.
2695
2696         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2697         (WebKit::InjectedBundle::initialize):
2698         Make sure to decode the bundle parameters before calling out to the bundle.
2699
2700 2015-10-06  Michael Catanzaro  <mcatanzaro@igalia.com>
2701
2702         [GTK] Add autocleanups
2703         https://bugs.webkit.org/show_bug.cgi?id=149588
2704
2705         Reviewed by Darin Adler.
2706
2707         * PlatformGTK.cmake:
2708         * UIProcess/API/gtk/WebKitAutocleanups.h: Added.
2709         * UIProcess/API/gtk/webkit2.h:
2710         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionAutocleanups.h: Added.
2711         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
2712
2713 2015-10-06  Anders Carlsson  <andersca@apple.com>
2714
2715         Try to fix the 32-bit build.
2716
2717         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
2718
2719 2015-10-06  Anders Carlsson  <andersca@apple.com>
2720
2721         WKPage needs to expose a KVO-compliant object, similar to WKWebView
2722         https://bugs.webkit.org/show_bug.cgi?id=149851
2723         rdar://problem/22382022
2724
2725         Reviewed by Dan Bernstein.
2726
2727         Move the PageLoadStateObserver object from WKBrowsingContextController out into a separate file and make it
2728         work with any Objective-C object. Use it in WKObservablePageState and add a WKPageCreateObservableState function.
2729
2730         * UIProcess/API/C/mac/WKPagePrivateMac.h:
2731         * UIProcess/API/C/mac/WKPagePrivateMac.mm: Renamed from Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.cpp.
2732         (-[WKObservablePageState initWithPage:]):
2733         (-[WKObservablePageState dealloc]):
2734         (-[WKObservablePageState isLoading]):
2735         (-[WKObservablePageState title]):
2736         (-[WKObservablePageState URL]):
2737         (-[WKObservablePageState hasOnlySecureContent]):
2738         (-[WKObservablePageState estimatedProgress]):
2739         (WKPageCreateObservableState):
2740         (WKPageGetProcessIdentifier):
2741         (WKPageIsURLKnownHSTSHost):
2742         * UIProcess/API/Cocoa/PageLoadStateObserver.h: Added.
2743         (WebKit::PageLoadStateObserver::PageLoadStateObserver):
2744         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2745         (PageLoadStateObserver::PageLoadStateObserver): Deleted.
2746         * WebKit2.xcodeproj/project.pbxproj:
2747
2748 2015-10-06  Daniel Bates  <dbates@webkit.org>
2749
2750         Enable XSLT when building WebKit for iOS using the public iOS SDK
2751         https://bugs.webkit.org/show_bug.cgi?id=149827
2752
2753         Reviewed by Alexey Proskuryakov.
2754
2755         * Configurations/FeatureDefines.xcconfig:
2756
2757 2015-10-06  Emanuele Aina  <emanuele.aina@collabora.com>
2758
2759         Fix ENABLE_OPENGL=OFF builds
2760         https://bugs.webkit.org/show_bug.cgi?id=146511
2761
2762         Reviewed by Darin Adler.
2763
2764         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2765         (webkitWebViewBaseRealize):
2766         (webkitWebViewBaseDraw):
2767         (webkitWebViewBaseDidRelaunchWebProcess):
2768         Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
2769         webkitWebViewRenderAcceleratedCompositingResults()
2770         * UIProcess/DrawingAreaProxyImpl.cpp:
2771         * UIProcess/DrawingAreaProxyImpl.h:
2772         * WebProcess/WebPage/DrawingArea.cpp:
2773         (WebKit::DrawingArea::DrawingArea):
2774         * WebProcess/WebPage/DrawingArea.h:
2775         * WebProcess/WebPage/LayerTreeHost.h:
2776         Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
2777         setNativeSurfaceHandleForCompositing().
2778         * UIProcess/gtk/WebPreferencesGtk.cpp:
2779         (WebKit::WebPreferences::platformInitializeStore):
2780         Default to no AC if no GL support has been built.
2781         * WebProcess/WebPage/DrawingArea.messages.in:
2782         Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
2783         SetNativeSurfaceHandleForCompositing.
2784         * WebProcess/WebPage/DrawingAreaImpl.h:
2785         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2786         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
2787         Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
2788         setNativeSurfaceHandleForCompositing().
2789         (WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
2790         Force setAcceleratedCompositingEnabled() only if a LayerTreeHost
2791         implementation is available, to avoid crashing when building without
2792         any GL support.
2793
2794 2015-10-06  Csaba Osztrogonác  <ossy@webkit.org>
2795
2796         URTBF after r190611.
2797
2798         * CMakeLists.txt:
2799
2800 2015-10-06  Alex Christensen  <achristensen@webkit.org>
2801
2802         Report error when main resource is blocked by content blocker
2803         https://bugs.webkit.org/show_bug.cgi?id=149719
2804         rdar://problem/21970595
2805
2806         Reviewed by Brady Eidson.
2807
2808         * Shared/API/c/WKErrorRef.h:
2809         * WebProcess/WebCoreSupport/WebErrors.h:
2810         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2811         (WebKit::WebFrameLoaderClient::blockedError):
2812         (WebKit::WebFrameLoaderClient::blockedByContentBlockerError):
2813         (WebKit::WebFrameLoaderClient::cannotShowURLError):
2814         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2815         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
2816         (WebKit::blockedError):
2817         (WebKit::blockedByContentBlockerError):
2818         (WebKit::cannotShowURLError):
2819         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
2820         (WebKit::blockedError):
2821         (WebKit::blockedByContentBlockerError):
2822         (WebKit::cannotShowURLError):
2823         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
2824         (WebKit::blockedError):
2825         (WebKit::blockedByContentBlockerError):
2826         (WebKit::cannotShowURLError):
2827         Make a new error type for loads that were blocked by a content blocker.
2828
2829 2015-10-05  Jer Noble  <jer.noble@apple.com>
2830
2831         [iOS] REGRESSION(r190434): Media continues to play when locking screen
2832         https://bugs.webkit.org/show_bug.cgi?id=149822
2833
2834         Reviewed by Brent Fulgham.
2835
2836         Pass through isSuspendedUnderLock when notifying the WebPage that the
2837         applicationWillEnterForeground, and pass that boolean in the userInfo of the
2838         WebUIApplicationWillEnterForegroundNotification.
2839
2840         * UIProcess/ios/WebPageProxyIOS.mm:
2841         (WebKit::WebPageProxy::applicationWillEnterForeground):
2842         * WebProcess/WebPage/WebPage.h:
2843         * WebProcess/WebPage/WebPage.messages.in:
2844         * WebProcess/WebPage/ios/WebPageIOS.mm:
2845         (WebKit::WebPage::applicationWillEnterForeground):
2846
2847 2015-10-05  Anders Carlsson  <andersca@apple.com>
2848
2849         Get rid of some dead code
2850         https://bugs.webkit.org/show_bug.cgi?id=149825
2851
2852         Reviewed by Tim Horton.
2853
2854         * UIProcess/API/APIUIClient.h:
2855         (API::UIClient::didDraw): Deleted.
2856         * UIProcess/API/C/WKPage.cpp:
2857         (WKPageSetPageUIClient): Deleted.
2858         * UIProcess/WebPageProxy.cpp:
2859         (WebKit::WebPageProxy::didDraw): Deleted.
2860         * UIProcess/WebPageProxy.h:
2861
2862 2015-10-05  Myles C. Maxfield  <mmaxfield@apple.com>
2863
2864         Prospective Mavericks build fix.
2865
2866         Unreviewed.
2867
2868         * UIProcess/API/cpp/WKRetainPtr.h:
2869
2870 2015-10-05  Beth Dakin  <bdakin@apple.com>
2871
2872         Compress snapshots on iOS
2873         https://bugs.webkit.org/show_bug.cgi?id=149814
2874         -and corresponding-
2875         rdar://problem/22976230
2876
2877         Reviewed by Simon Fraser.
2878
2879         Compress the snapshot.
2880         * UIProcess/API/Cocoa/WKWebView.mm:
2881         (-[WKWebView _takeViewSnapshot]):
2882
2883         Since the snapshots are converted to YUV asynchronously, it is possible to 
2884         get here and have a snapshot that does not yet have an image, so we have to 
2885         relax this constraint.
2886         * UIProcess/mac/ViewSnapshotStore.mm:
2887         (WebKit::ViewSnapshotStore::recordSnapshot):
2888
2889 2015-10-05  Myles C. Maxfield  <mmaxfield@apple.com>
2890
2891         Allow WKRetainPtrs to be used as keys in hashing data structures
2892         https://bugs.webkit.org/show_bug.cgi?id=149762
2893
2894         Reviewed by Anders Carlsson.
2895
2896         Use RefPtr as a model.
2897
2898         * UIProcess/API/cpp/WKRetainPtr.h:
2899         (WebKit::WKRetainPtr::WKRetainPtr):
2900         (WebKit::WKRetainPtr::isHashTableDeletedValue):
2901         (WebKit::WKRetainPtr::hashTableDeletedValue):
2902         (WTF::HashTraits<WKRetainPtr<P>>::emptyValue):
2903         (WTF::HashTraits<WKRetainPtr<P>>::peek):
2904
2905 2015-10-05  Enrica Casucci  <enrica@apple.com>
2906
2907         Cannot select certain text on Wikipedia homepage even when zoomed in.
2908         https://bugs.webkit.org/show_bug.cgi?id=149758
2909         rdar://problem/22407947
2910
2911         Reviewed by Dan Bernstein.
2912
2913         Several functions that handle gestures for text selection are used for both
2914         editable and non editable content. When used on editable content, the point
2915         where the gesture occurs needs to be constrained within the boundaries of the
2916         editable element. In the WebProcess we decide whether to constrain the point or not only based
2917         on the presence of the assisted node.
2918         That unfortunately does not guarantee that the user is actually editing the element,
2919         but only that the element is focused. Since the knowledge about the interaction exists reliably
2920         in the UI process, this patch adds a parameter to each gesture handler that tries to clip
2921         the point, to indicate whether the user is actually interacting with the element so that
2922         in the WebProcess the assisted node information can be used to constrain the point.
2923
2924         * UIProcess/WebPageProxy.h:
2925         (WebKit::WebPageProxy::deviceOrientation):
2926         * UIProcess/ios/WKContentViewInteraction.mm:
2927         (-[WKContentView _isInteractingWithAssistedNode]):
2928         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
2929         (-[WKContentView selectPositionAtPoint:completionHandler:]):
2930         (-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]):
2931         (-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]):
2932         (-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
2933         (-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]):
2934         * UIProcess/ios/WebPageProxyIOS.mm:
2935         (WebKit::WebPageProxy::selectWithGesture):
2936         (WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
2937         (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
2938         (WebKit::WebPageProxy::selectPositionAtPoint):
2939         (WebKit::WebPageProxy::updateSelectionWithExtentPoint):
2940         (WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
2941         * WebProcess/WebPage/WebPage.h:
2942         * WebProcess/WebPage/WebPage.messages.in:
2943         * WebProcess/WebPage/ios/WebPageIOS.mm:
2944         (WebKit::WebPage::selectWithGesture):
2945         (WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
2946         (WebKit::WebPage::selectPositionAtPoint):
2947         (WebKit::WebPage::selectPositionAtBoundaryWithDirection):
2948         (WebKit::WebPage::rangeForGranularityAtPoint):
2949         (WebKit::WebPage::selectTextWithGranularityAtPoint):
2950         (WebKit::WebPage::updateSelectionWithExtentPointAndBoundary):
2951         (WebKit::WebPage::updateSelectionWithExtentPoint):
2952
2953 2015-10-05  Antti Koivisto  <antti@apple.com>
2954
2955         Remove CancelResourceLoader message
2956         https://bugs.webkit.org/show_bug.cgi?id=149801
2957
2958         Reviewed by Andreas Kling.
2959
2960         It has no clients.
2961
2962         * WebProcess/Network/WebResourceLoader.cpp:
2963         (WebKit::WebResourceLoader::messageSenderDestinationID):
2964         (WebKit::WebResourceLoader::detachFromCoreLoader):
2965         (WebKit::WebResourceLoader::cancelResourceLoader): Deleted.
2966         * WebProcess/Network/WebResourceLoader.h:
2967         * WebProcess/Network/WebResourceLoader.messages.in:
2968
2969 2015-10-03  Ricky Mondello  <rmondello@apple.com>
2970
2971         "Plug-in is blocked" message doesn't draw correctly
2972         https://bugs.webkit.org/show_bug.cgi?id=149741
2973         <rdar://problem/22920949>
2974
2975         Patch by Conrad Shultz and Ricky Mondello.
2976
2977         Reviewed by Anders Carlsson.
2978
2979         If a WebKit client sets plug-in X to not be visible to the web, that doesn't mean we shouldn't consult
2980         that plug-in when determining what kind of object type an object is. Properly classifying a non-web-visible
2981         Netscape plug-in as such allows its bounds to properly measured, allowing it to be drawn properly.
2982
2983         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2984         (WebKit::WebFrameLoaderClient::objectContentType): Use PluginData's supportsMimeType, rather than its
2985             supportsWebVisibleMimeType, when determining the ObjectContentType for a MIME type on a url.
2986
2987 2015-10-02  Enrica Casucci  <enrica@apple.com>
2988
2989         Text selection is inaccurate in Wikipedia pages when starting navigation from wikipedia.org.
2990         https://bugs.webkit.org/show_bug.cgi?id=149756
2991         rdar://problem/22332409
2992
2993         Reviewed by Tim Horton.
2994
2995         When loading a new document into the same WebPage object, we need
2996         to clear the assisted node, since there is no guarantee that the
2997         node will be blurred. The bug is caused by the use of a stale
2998         assisted node to constrain the point where the gesture occurs.
2999         A fix for this problem was landed in http://trac.webkit.org/changeset/179885
3000         where the cleanup was added when FrameLoaderClient::detach2 was called.
3001         This method doesn't seem to be called any longer for the main frame,
3002         so the correct solution is to add the cleanup to didCommitLoad in WebPage.
3003         I've also added some checks to webSelectionsRects and selectedTextRange to avoid
3004         the use of postLayoutData when the selection is none.
3005
3006         * UIProcess/ios/WKContentViewInteraction.mm:
3007         (-[WKContentView webSelectionRects]):
3008         (-[WKContentView selectedTextRange]):
3009         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3010         (WebKit::WebFrameLoaderClient::detachedFromParent2): Removed call to resetAssistedNodeForFrame.
3011         * WebProcess/WebPage/WebPage.cpp:
3012         (WebKit::WebPage::didCommitLoad): Added call to resetAssistedNodeForFrame.
3013
3014 2015-10-02  Alex Christensen  <achristensen@webkit.org>
3015
3016         Reloading without content blockers doesn't apply to resource loads after the main frame finishes
3017         https://bugs.webkit.org/show_bug.cgi?id=149430
3018         rdar://problem/22742222
3019
3020         Reviewed by Geoffrey Garen.
3021
3022         * WebProcess/WebPage/WebPage.cpp:
3023         (WebKit::WebPage::createDocumentLoader):
3024         Copy the state of whether content extensions are disabled from the Page to the DocumentLoader
3025         when making a DocumentLoader.
3026
3027 2015-10-02  Antoine Quint  <graouts@apple.com>
3028
3029         popstate is fired at the wrong time on load
3030         https://bugs.webkit.org/show_bug.cgi?id=94265
3031
3032         Reviewed by Darin Adler.
3033
3034         Ensure we have a valid page before trying to get to its drawingArea as this could lead
3035         to a crash as observed with fast/loader/stateobjects/pushstate-object-types.html.
3036
3037         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3038         (WebKit::WebFrameLoaderClient::restoreViewState):
3039
3040 2015-10-01  Antti Koivisto  <antti@apple.com>
3041
3042         Network cache: Subresource referer header wrong after cached redirect
3043         https://bugs.webkit.org/show_bug.cgi?id=149709
3044         rdar://problem/22917174
3045
3046         Reviewed by Chris Dumez.
3047
3048         If a main resource is loaded from a cache entry that involved redirects the document
3049         will end up setting the Referer-headers of the subresources to the request URL not the redirected URL
3050
3051         * NetworkProcess/NetworkResourceLoader.cpp:
3052         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
3053
3054             If a cache entry involved a redirect synthesize a minimal willSendRequest message so that WebCore side
3055             runs through the same code paths as when receiving a redirect from network.
3056
3057 2015-10-01  Carlos Garcia Campos  <cgarcia@igalia.com>
3058
3059         [GTK] Websites with invalid auth header keep loading forever
3060         https://bugs.webkit.org/show_bug.cgi?id=149710
3061
3062         Reviewed by Martin Robinson.
3063
3064         Do not show the remember credentials checkbutton in the auth
3065         dialog if the realm is empty.
3066
3067         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
3068         (webkitAuthenticationDialogInitialize):
3069
3070 2015-09-30  Chris Dumez  <cdumez@apple.com>
3071
3072         Unreviewed, roll out r188331: "NetworkProcess: DNS prefetch happens in the Web Process"
3073         <rdar://problem/22560715>
3074
3075         Speculative roll out of r188331 as we had a ~2.5% PLT regression around
3076         the time it landed and it seems the most likely culprit. I'll reland if
3077         the perf bots do not recover after the roll out.
3078
3079         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3080         (WebKit::storageSession): Deleted.
3081         * NetworkProcess/NetworkConnectionToWebProcess.h:
3082         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3083         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
3084         (webkitWebExtensionDidReceiveMessage):
3085         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3086         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3087         * WebProcess/WebPage/ios/WebPageIOS.mm:
3088         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
3089         * WebProcess/WebProcess.cpp:
3090         * WebProcess/WebProcess.h:
3091
3092 2015-09-30  Timothy Horton  <timothy_horton@apple.com>
3093
3094         Compute document marker rects at use time instead of paint time
3095         https://bugs.webkit.org/show_bug.cgi?id=149643
3096
3097         Reviewed by Darin Adler.
3098
3099         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3100         (WebKit::WebChromeClient::didInvalidateDocumentMarkerRects):
3101         * WebProcess/WebCoreSupport/WebChromeClient.h:
3102         Plumb the notification about invalidated document marker rects through to FindController.
3103
3104         * WebProcess/WebPage/FindController.cpp:
3105         (WebKit::FindController::updateFindUIAfterPageScroll):
3106         Make a document-relative PageOverlay, so that we get fast scrolling.
3107
3108         (WebKit::FindController::rectsForTextMatchesInRect):
3109         Return find hole rects in main-FrameView content coordinates, to 
3110         match the document-relative page overlay.
3111         We'll only return rects that intersect the passed-in rect, which
3112         comes from the dirty rect passed to drawRect.
3113
3114         (WebKit::FindController::drawRect):
3115         Inflate the dirty rect by the border width so that we hit all relevant
3116         markers in each tile. Otherwise, we would end up missing the border of a marker
3117         that touched the edge of a tile.
3118
3119         (WebKit::FindController::didInvalidateDocumentMarkerRects):
3120         Repaint (for now, the entire overlay) when document marker rects change.
3121
3122         * WebProcess/WebPage/FindController.h:
3123
3124 2015-09-30  Carlos Alberto Lopez Perez  <clopez@igalia.com>
3125
3126         [GTK] Build error with -DENABLE_SPELLCHECK=OFF
3127         https://bugs.webkit.org/show_bug.cgi?id=146904
3128
3129         Reviewed by Carlos Garcia Campos.
3130
3131         Add ifdef guards to allow building when SPELLCHECK is not enabled.
3132
3133         * UIProcess/gtk/TextCheckerGtk.cpp:
3134         (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
3135         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
3136         (WebKit::TextChecker::setGrammarCheckingEnabled):
3137         (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
3138         (WebKit::TextChecker::grammarCheckingEnabledStateChanged):
3139         (WebKit::TextChecker::checkSpellingOfString):
3140         (WebKit::TextChecker::getGuessesForWord):
3141         (WebKit::TextChecker::learnWord):
3142         (WebKit::TextChecker::ignoreWord):
3143         (WebKit::TextChecker::requestCheckingOfString):
3144         (WebKit::TextChecker::checkTextOfParagraph):
3145         (WebKit::TextChecker::setSpellCheckingLanguages):
3146         (WebKit::TextChecker::loadedSpellCheckingLanguages):
3147
3148 2015-09-30  Gwang Yoon Hwang  <yoon@igalia.com>
3149
3150         [GTK] Support HiDPI Properly in WebKitGtk+ with the TextureMapper
3151         https://bugs.webkit.org/show_bug.cgi?id=141782
3152
3153         Reviewed by Carlos Garcia Campos.
3154
3155         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3156         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
3157
3158             Modified to create scaled size of window.
3159
3160         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3161         (WebKit::LayerTreeHostGtk::initialize):
3162         (WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged):
3163
3164             We should apply device scale factor to the root layer to apply
3165             the scale matrix before applying other transform matrices.
3166
3167         (WebKit::LayerTreeHostGtk::deviceScaleFactor): Added.
3168         (WebKit::LayerTreeHostGtk::pageScaleFactor): Added.
3169
3170 2015-09-29  Daniel Bates  <dabates@apple.com>
3171
3172         Make WebKit for iOS Simulator build with the public iOS 9 SDK
3173         https://bugs.webkit.org/show_bug.cgi?id=149652
3174
3175         Reviewed by Simon Fraser.
3176
3177         * Platform/spi/ios/SafariServicesSPI.h: Add definition for SFSafariViewController.
3178         * Platform/spi/ios/UIKitSPI.h: Add more SPI.
3179         * WebProcess/cocoa/WebProcessCocoa.mm: Include header pthreadSPI.h.
3180
3181 2015-09-29  Brady Eidson  <beidson@apple.com>
3182
3183         Followup to "Move WebKit2 AsyncTask to WebCore CrossThreadTask."
3184         https://bugs.webkit.org/show_bug.cgi?id=149651
3185
3186         Rubberstamped by Alex Christensen.
3187
3188         * DatabaseProcess/DatabaseProcess.h: CrossThreadTask is in the WebCore namespace, not WebKit.
3189         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h: Ditto.
3190
3191 2015-09-29  Brady Eidson  <beidson@apple.com>
3192
3193         Move WebKit2 AsyncTask to WebCore CrossThreadTask.
3194         https://bugs.webkit.org/show_bug.cgi?id=149651
3195
3196         Reviewed by Alex Christensen.
3197
3198         * DatabaseProcess/DatabaseProcess.cpp:
3199         (WebKit::DatabaseProcess::ensureIndexedDatabaseRelativePathExists):
3200         (WebKit::DatabaseProcess::postDatabaseTask):
3201         (WebKit::DatabaseProcess::performNextDatabaseTask):
3202         (WebKit::DatabaseProcess::fetchWebsiteData):
3203         (WebKit::DatabaseProcess::deleteWebsiteData):
3204         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
3205         * DatabaseProcess/DatabaseProcess.h:
3206         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
3207         (WebKit::UniqueIDBDatabase::shutdown):
3208         (WebKit::UniqueIDBDatabase::shutdownBackingStore):
3209         (WebKit::UniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata):
3210         (WebKit::UniqueIDBDatabase::openBackingStoreAndReadMetadata):
3211         (WebKit::UniqueIDBDatabase::openTransaction):
3212         (WebKit::UniqueIDBDatabase::beginTransaction):
3213         (WebKit::UniqueIDBDatabase::commitTransaction):
3214         (WebKit::UniqueIDBDatabase::resetTransaction):
3215         (WebKit::UniqueIDBDatabase::rollbackTransaction):
3216         (WebKit::UniqueIDBDatabase::postTransactionOperation):
3217         (WebKit::UniqueIDBDatabase::changeDatabaseVersion):
3218         (WebKit::UniqueIDBDatabase::createObjectStore):
3219         (WebKit::UniqueIDBDatabase::deleteObjectStore):
3220         (WebKit::UniqueIDBDatabase::clearObjectStore):
3221         (WebKit::UniqueIDBDatabase::createIndex):
3222         (WebKit::UniqueIDBDatabase::deleteIndex):
3223         (WebKit::UniqueIDBDatabase::putRecord):
3224         (WebKit::UniqueIDBDatabase::getRecord):
3225         (WebKit::UniqueIDBDatabase::openCursor):
3226         (WebKit::UniqueIDBDatabase::cursorAdvance):
3227         (WebKit::UniqueIDBDatabase::cursorIterate):
3228         (WebKit::UniqueIDBDatabase::count):
3229         (WebKit::UniqueIDBDatabase::deleteRange):
3230         (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
3231         (WebKit::UniqueIDBDatabase::beginBackingStoreTransaction):
3232         (WebKit::UniqueIDBDatabase::commitBackingStoreTransaction):
3233         (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
3234         (WebKit::UniqueIDBDatabase::rollbackBackingStoreTransaction):
3235         (WebKit::UniqueIDBDatabase::changeDatabaseVersionInBackingStore):
3236         (WebKit::UniqueIDBDatabase::createObjectStoreInBackingStore):
3237         (WebKit::UniqueIDBDatabase::deleteObjectStoreInBackingStore):
3238         (WebKit::UniqueIDBDatabase::clearObjectStoreInBackingStore):
3239         (WebKit::UniqueIDBDatabase::createIndexInBackingStore):
3240         (WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):
3241         (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
3242         (WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
3243         (WebKit::UniqueIDBDatabase::openCursorInBackingStore):
3244         (WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
3245         (WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):
3246         (WebKit::UniqueIDBDatabase::countInBackingStore):
3247         (WebKit::UniqueIDBDatabase::deleteRangeInBackingStore):
3248         (WebKit::UniqueIDBDatabase::postMainThreadTask):
3249         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
3250         (WebKit::UniqueIDBDatabase::postDatabaseTask):
3251         (WebKit::UniqueIDBDatabase::performNextDatabaseTask):
3252         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
3253         * WebKit2.xcodeproj/project.pbxproj:
3254
3255 2015-09-29  Chris Dumez  <cdumez@apple.com>
3256
3257         Memory cache revalidations should refresh the network disk cache
3258         https://bugs.webkit.org/show_bug.cgi?id=149606
3259
3260         Reviewed by Darin Adler.
3261
3262         Previously, resource revalidations triggered by the memory cache would
3263         bypass the disk cache entirely because the requests are conditional. As
3264         a result, when the server responds with a 304, we were unable to update
3265         the headers (e.g. new expiration date) of the corresponding entry in
3266         the disk cache.
3267
3268         This patch updates our disk cache implementation to not bypass the disk
3269         cache when the request is conditional. Instead, we look up the cached
3270         entry and force its revalidation from the network. If the server then
3271         returns a 304, we are now able to update the headers of this cached
3272         entry. In such case though, we let the 304 response through to WebCore
3273         unlike revalidations triggered by the disk cache.
3274
3275         * NetworkProcess/NetworkResourceLoader.cpp:
3276         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
3277         * NetworkProcess/cache/NetworkCache.cpp:
3278         (WebKit::NetworkCache::makeUseDecision):
3279         (WebKit::NetworkCache::makeRetrieveDecision):
3280
3281 2015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3282
3283         printing does not use minimum page zoom factor
3284         https://bugs.webkit.org/show_bug.cgi?id=108507
3285
3286         Reviewed by Darin Adler.
3287
3288         Add kWKSnapshotOptionsPrinting flag to indicate the snapshot
3289         should be generated in printing mode.
3290
3291         * Shared/API/c/WKImage.h:
3292         * Shared/API/c/WKSharedAPICast.h:
3293         (WebKit::toSnapshotOptions):
3294         * Shared/ImageOptions.h:
3295         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3296         (WebKit::InjectedBundle::numberOfPages): Pass the frame as a
3297         reference instead of a pointer.
3298         * WebProcess/WebPage/WebPage.cpp:
3299         (WebKit::WebPage::scaledSnapshotWithOptions): In case of printing,
3300         calculate the bitmap height based on the number of pages.
3301         (WebKit::WebPage::snapshotAtSize): In case of printing, use
3302         PrintContext::spoolAllPagesWithBoundaries() and return.
3303
3304 2015-09-28  Brent Fulgham  <bfulgham@apple.com>
3305
3306         Expose 'geometryFlipped' state for debugging/logging purposes
3307         https://bugs.webkit.org/show_bug.cgi?id=149557
3308
3309         Reviewed by Simon Fraser.
3310
3311         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3312         (WebKit::PlatformCALayerRemote::geometryFlipped): Added.
3313         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
3314
3315 2015-09-28  Brady Eidson  <beidson@apple.com>
3316
3317         Add an IDB Server that can roundtrip a request back to the client.
3318         https://bugs.webkit.org/show_bug.cgi?id=149603
3319
3320         Reviewed by Alex Christensen.
3321
3322         * WebProcess/Databases/WebDatabaseProvider.h:
3323
3324 2015-09-28  Beth Dakin  <bdakin@apple.com>
3325
3326         Heavy taps on links are sometimes interpreted as the preview gesture
3327         https://bugs.webkit.org/show_bug.cgi?id=149304
3328         -and corresponding-
3329         rdar://problem/22689258
3330
3331         Rubber-stamped by Tim Horton.
3332
3333         Rolling out this patch. We should try to fix this at the UIKit-level.
3334         * UIProcess/ios/WKContentViewInteraction.h:
3335         * UIProcess/ios/WKContentViewInteraction.mm:
3336         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
3337         (-[WKContentView _interactionStoppedFromPreviewItemController:]):
3338
3339 2015-09-27  Wenson Hsieh  <wenson_hsieh@apple.com>
3340
3341         Expose a WKWebView API for allowing programmatic focus to trigger node assistance
3342         https://bugs.webkit.org/show_bug.cgi?id=149567
3343
3344         Reviewed by Darin Adler.
3345
3346         Adds an API method to WKWebView that allows clients to override the default iOS behavior of not
3347         starting node assistance when programmatically focusing. Also fixes a bug caused by naively
3348         introducing the flag where the autofocus attribute could trigger node assistance before layout
3349         occurs, causing an ASSERT to fail in EditorState::postLayoutData.
3350
3351         I fixed this issue by not assisting the node if the editor state is missing post layout data,
3352         instead deferring node assistance until layout has occurred.
3353
3354         * UIProcess/API/Cocoa/WKWebView.h:
3355         * UIProcess/API/Cocoa/WKWebView.mm:
3356         (-[WKWebView initWithFrame:configuration:]): Initializes the new node assistance flag to NO, which
3357             is the current default behavior.
3358         (-[WKWebView canAssistOnProgrammaticFocus]):
3359         (-[WKWebView setCanAssistOnProgrammaticFocus:]): New API method that allows clients to set node
3360             assistance behavior upon programmatic focus.
3361         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
3362         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3363         (-[WKWebViewConfiguration init]): Added new node assistance flag to configuration.
3364         (-[WKWebViewConfiguration _canAssistOnProgrammaticFocus]):
3365         (-[WKWebViewConfiguration _setCanAssistOnProgrammaticFocus:]):
3366         * UIProcess/WebPageProxy.h: Added NodeAssistanceArguments struct.
3367         * UIProcess/ios/WKContentViewInteraction.mm:
3368         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Do not return
3369             early if the node assistance flag is set to allow programmatic focus.
3370         * UIProcess/ios/WebPageProxyIOS.mm:
3371         (WebKit::WebPageProxy::didCommitLayerTree): After committing the layer tree, if we have deferred
3372             starting node assistance, immediately trigger node assistance.
3373         (WebKit::WebPageProxy::startAssistingNode): Defer starting node assistance if we have not yet repainted.
3374         (WebKit::WebPageProxy::stopAssistingNode): Also cancel any deferred node assistance.
3375
3376 2015-09-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3377
3378         REGRESSION(r188639): [GTK] Several inspector tests started to time out in GTK+ bots after r188639
3379         https://bugs.webkit.org/show_bug.cgi?id=148569
3380
3381         Reviewed by Darin Adler.
3382
3383         * PlatformGTK.cmake: Add missing inspector files required for
3384         layout tests.
3385
3386 2015-09-25  Eric Carlson  <eric.carlson@apple.com>
3387
3388         Clean up user media request internal API
3389         https://bugs.webkit.org/show_bug.cgi?id=149527
3390
3391         Reviewed by Tim Horton.
3392
3393         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
3394         (WKUserMediaPermissionRequestVideoDeviceUIDs): New, renamed from WKUserMediaPermissionRequestDeviceNamesVideo.
3395         (WKUserMediaPermissionRequestAudioDeviceUIDs): New, renamed from WKUserMediaPermissionRequestDeviceNamesAudio.
3396         (WKUserMediaPermissionRequestAllowBest): Deleted.
3397         (WKUserMediaPermissionRequestDeviceNamesVideo): Deleted.
3398         (WKUserMediaPermissionRequestDeviceNamesAudio): Deleted.
3399         (WKUserMediaPermissionRequestFirstVideoDeviceUID): Deleted.
3400         (WKUserMediaPermissionRequestFirstAudioDeviceUID): Deleted.
3401         * UIProcess/API/C/WKUserMediaPermissionRequest.h:
3402
3403         * UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
3404         (webkitUserMediaPermissionRequestAllow): Update for UserMediaRequest API change.
3405
3406         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3407         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Get rid of the bool parameters.
3408           Switch audio/video parameter order to be consistent with everywhere else.
3409         (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Ditto.
3410         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
3411
3412         * UIProcess/UserMediaPermissionRequestProxy.cpp:
3413         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): Get rid of the bool parameters.
3414           Switch audio/video parameter order to be consistent with everywhere else.
3415         (WebKit::UserMediaPermissionRequestProxy::allow): Switch audio/video parameter order.
3416         (WebKit::UserMediaPermissionRequestProxy::getDeviceNameForUID): Deleted.
3417         * UIProcess/UserMediaPermissionRequestProxy.h:
3418         (WebKit::UserMediaPermissionRequestProxy::create):
3419         (WebKit::UserMediaPermissionRequestProxy::videoDeviceUIDs):
3420         (WebKit::UserMediaPermissionRequestProxy::audioDeviceUIDs):
3421         (WebKit::UserMediaPermissionRequestProxy::firstAudioDeviceUID):
3422         (WebKit::UserMediaPermissionRequestProxy::requiresAudio): Deleted.
3423         (WebKit::UserMediaPermissionRequestProxy::requiresVideo): Deleted.
3424
3425         * UIProcess/WebPageProxy.cpp:
3426         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Get rid of the bool parameters.
3427           Switch audio/video parameter order to be consistent with everywhere else.
3428         * UIProcess/WebPageProxy.h: Ditto.
3429         * UIProcess/WebPageProxy.messages.in: Ditto.
3430
3431         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
3432         (WebKit::UserMediaPermissionRequestManager::startRequest): Get rid of bool params, the device
3433           vectors have the same information.
3434         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision): Switch audio/video
3435           parameter order to be consistent with everywhere else. deviceUIDVideo -> videoDeviceUID,
3436         deviceUIDAudio -> audioDeviceUID.
3437         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
3438
3439         * WebProcess/WebPage/WebPage.cpp:
3440         (WebKit::WebPage::didReceiveUserMediaPermissionDecision): Switch audio/video parameter order.
3441         * WebProcess/WebPage/WebPage.h:
3442
3443 2015-09-25  Simon Fraser  <simon.fraser@apple.com>
3444
3445         [iOS WK2] Add viewport tests and fix runUIScript() timing issues
3446         https://bugs.webkit.org/show_bug.cgi?id=149577
3447
3448         Reviewed by Tim Horton.
3449         
3450         When calling testRunner.runUIScript() from a page load event, the script could run
3451         in the UI process before the current remote layer tree transaction had been handled
3452         there. This meant that runUIScript() could query state which was about to change.
3453         
3454         Fix by delaying the execution of the UI script until a layer tree transaction has
3455         been handled by the UI process, leveraging the existing DrawingAreaProxy::dispatchAfterEnsuringDrawing().
3456         
3457         This is done using a new C SPI function WKPageCallAfterNextPresentationUpdate(),