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