Add a context menu delegate method that takes a userInfo parameter
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-11-12  Anders Carlsson  <andersca@apple.com>
2
3         Add a context menu delegate method that takes a userInfo parameter
4         https://bugs.webkit.org/show_bug.cgi?id=151232
5
6         Reviewed by Tim Horton.
7
8         * UIProcess/API/APIContextMenuClient.h:
9         (API::ContextMenuClient::menuFromProposedMenu):
10         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
11         * UIProcess/Cocoa/UIDelegate.h:
12         * UIProcess/Cocoa/UIDelegate.mm:
13         (WebKit::UIDelegate::setDelegate):
14         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
15         * UIProcess/mac/WebContextMenuProxyMac.mm:
16         (WebKit::WebContextMenuProxyMac::showContextMenu):
17
18 2015-11-12  Anders Carlsson  <andersca@apple.com>
19
20         ContextMenuAction and WebMenuItemTag shouldn't have to be in sync
21         https://bugs.webkit.org/show_bug.cgi?id=151226
22
23         Reviewed by Tim Horton.
24
25         * Shared/API/c/WKSharedAPICast.h:
26         (WebKit::toAPI):
27         (WebKit::toImpl):
28         Remove ContextMenuItemTagOpenLinkInThisWindow.
29
30 2015-11-12  Anders Carlsson  <andersca@apple.com>
31
32         ContextMenuController::contextMenuItemSelected only needs the action and title, not the full item
33         https://bugs.webkit.org/show_bug.cgi?id=151217
34
35         Reviewed by Joseph Pecoraro.
36
37         * WebProcess/WebPage/WebContextMenu.cpp:
38         (WebKit::WebContextMenu::itemSelected):
39
40 2015-11-12  Anders Carlsson  <andersca@apple.com>
41
42         Remove an unused function
43         https://bugs.webkit.org/show_bug.cgi?id=151215
44
45         Reviewed by Joseph Pecoraro.
46
47         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
48         (WebKit::WebContextMenuClient::contextMenuItemSelected): Deleted.
49         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
50
51 2015-11-11  Anders Carlsson  <andersca@apple.com>
52
53         Enable cross-platform context menus by default
54         https://bugs.webkit.org/show_bug.cgi?id=151173
55
56         Reviewed by Tim Horton.
57
58         * Shared/WebContextMenuItemData.cpp:
59         (WebKit::WebContextMenuItemData::WebContextMenuItemData): Deleted.
60         * WebProcess/WebPage/WebContextMenu.cpp:
61         (WebKit::WebContextMenu::menuItemsWithUserData): Deleted.
62
63 2015-11-12  Dan Bernstein  <mitz@apple.com>
64
65         Fixed the build.
66
67         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
68         (PluginServiceInitializer):
69
70 2015-11-12  Csaba Osztrogonác  <ossy@webkit.org>
71
72         Remove ENABLE(SATURATED_LAYOUT_ARITHMETIC) guards
73         https://bugs.webkit.org/show_bug.cgi?id=150972
74
75         Reviewed by Darin Adler.
76
77         * Configurations/FeatureDefines.xcconfig:
78
79 2015-11-11  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
80
81         Print result of memory sampler more readable
82         https://bugs.webkit.org/show_bug.cgi?id=151085
83
84         Reviewed by Darin Adler.
85
86         Current memory sampler prints result of memory sample horizontally. It makes us hard to read
87         the result at a glance. To improve readability of the memory sampler result, this patch prints it
88         vertically.
89
90         * Shared/WebMemorySampler.cpp:
91         (WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile):
92         (WebKit::WebMemorySampler::writeHeaders):
93
94 2015-11-11  Geoffrey Garen  <ggaren@apple.com>
95
96         Rename handle.*Event to dispatch.*Event
97         https://bugs.webkit.org/show_bug.cgi?id=151168
98
99         Reviewed by Chris Dumez.
100
101         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
102         (WebKit::WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
103         (WebKit::WebFrameLoaderClient::dispatchDidDispatchOnloadEvents):
104         (WebKit::WebFrameLoaderClient::dispatchDidHandleOnloadEvents): Deleted.
105         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
106
107 2015-11-11  Anders Carlsson  <andersca@apple.com>
108
109         Fix builds.
110
111         * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
112         (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
113         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
114         (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
115
116 2015-11-11  Anders Carlsson  <andersca@apple.com>
117
118         REGRESSION (r191407): Context menus are missing Services
119         https://bugs.webkit.org/show_bug.cgi?id=151167
120         rdar://problem/23500769
121
122         Reviewed by Tim Horton.
123
124         * UIProcess/mac/WebContextMenuProxyMac.mm:
125         (WebKit::WebContextMenuProxyMac::showContextMenu):
126         Use contentsToRootView to better indicate which coordinate system we're using.
127
128         * WebProcess/WebPage/WebContextMenu.cpp:
129         (WebKit::WebContextMenu::show):
130         Use +[NSMenu popUpContextMenu:withEvent:forView:] so we'll get service menus where applicable.
131
132 2015-11-11  Anders Carlsson  <andersca@apple.com>
133
134         Remove more dead context menu code
135         https://bugs.webkit.org/show_bug.cgi?id=151163
136
137         Reviewed by Tim Horton.
138
139         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
140         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
141         (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
142
143 2015-11-11  Tim Horton  <timothy_horton@apple.com>
144
145         Remove an unnecessary zero-delay timer from swipe snapshot removal
146         https://bugs.webkit.org/show_bug.cgi?id=151161
147
148         Reviewed by Anders Carlsson.
149
150         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
151         (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
152         (WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector): Deleted.
153         (WebKit::ViewGestureGeometryCollector::renderTreeSizeNotificationTimerFired): Deleted.
154         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
155         There's no discernable reason for this zero-delay timer, and it dates back
156         to the original swipe patch with no explanation given. My only theory
157         is that I was depending on spinning the runloop to ensure we've painted,
158         but we have other mechanisms to do that now, on both platforms.
159
160         This also was a surprising waste of time in some cases where the web
161         process was very slow.
162
163 2015-11-11  Chris Dumez  <cdumez@apple.com>
164
165         Unreviewed attempt to fix the Mac CMake build.
166
167         * CMakeLists.txt:
168
169 2015-11-11  Chris Dumez  <cdumez@apple.com>
170
171         [WK2] Add initial support for speculative resource revalidation to the WebKit disk cache
172         https://bugs.webkit.org/show_bug.cgi?id=150856
173         <rdar://problem/23092196>
174
175         Reviewed by Antti Koivisto.
176
177         Add initial support for speculative resource revalidation to the WebKit
178         disk cache. When a main resource is requested by WebCore, we look up its
179         list of subresources in the cache and speculatively warm them up before
180         WebCore asks for them, in order to improve page load time. In this
181         context, warming it up means:
182         1. If the cached resource is usable (has not expired), keep it around
183            in a memory for a limited amount of time (10 seconds).
184         2. If the resource has expired, do a speculative revalidation of the
185            resource and then keep it in memory for a while as well (10 seconds).
186
187         The feature is currently behind a compile-time flag that is only enabled
188         on COCOA. Also, it is currently disabled at run-time until it is mature
189         enough.
190
191         Initial results show that speculative revalidation gives a ~5%
192         progression on throttled warm PLT on iPhone 5s.
193
194         * NetworkProcess/NetworkResourceLoader.cpp:
195         (WebKit::NetworkResourceLoader::start):
196         * NetworkProcess/cache/NetworkCache.cpp:
197         (WebKit::NetworkCache::Cache::retrieve):
198         (WebKit::NetworkCache::Cache::store):
199         (WebKit::NetworkCache::Cache::update):
200         * NetworkProcess/cache/NetworkCache.h:
201         * NetworkProcess/cache/NetworkCacheEntry.cpp:
202         (WebKit::NetworkCache::Entry::Entry):
203         * NetworkProcess/cache/NetworkCacheEntry.h:
204         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: Added.
205         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
206         (WebKit::NetworkCache::SpeculativeLoad::~SpeculativeLoad):
207         (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
208         (WebKit::NetworkCache::SpeculativeLoad::didReceiveBuffer):
209         (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
210         (WebKit::NetworkCache::SpeculativeLoad::didFailLoading):
211         (WebKit::NetworkCache::SpeculativeLoad::didComplete):
212         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h: Added.
213         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
214         (WebKit::NetworkCache::constructRevalidationRequest):
215         (WebKit::NetworkCache::responseNeedsRevalidation):
216         (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
217         (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::takeCacheEntry):
218         (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::lifetimeTimerFired):
219         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
220         (WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
221         (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
222         (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
223         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
224         (WebKit::NetworkCache::SpeculativeLoadManager::satisfyPendingRequests):
225         (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
226         (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
227         (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
228         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresource): Deleted.
229         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::encodeAsSubresourcesRecord): Deleted.
230         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
231         * WebKit2.xcodeproj/project.pbxproj:
232
233 2015-11-11  Anders Carlsson  <andersca@apple.com>
234
235         _WKRemoteObjectInterface should handle specifying allowed classes for reply block arguments
236         https://bugs.webkit.org/show_bug.cgi?id=151144
237
238         Reviewed by Tim Horton.
239
240         * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
241         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
242         (classesForSelectorArgument):
243         (-[_WKRemoteObjectInterface classesForSelector:argumentIndex:ofReply:]):
244         (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:ofReply:]):
245         (-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
246         (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
247
248 2015-11-11  Tim Horton  <timothy_horton@apple.com>
249
250         Add some font-related preferences to the modern API
251         https://bugs.webkit.org/show_bug.cgi?id=151138
252         <rdar://problem/23492636>
253
254         Reviewed by Anders Carlsson.
255
256         * UIProcess/API/Cocoa/WKPreferences.mm:
257         (-[WKPreferences _defaultFontSize]):
258         (-[WKPreferences _setDefaultFontSize:]):
259         (-[WKPreferences _defaultFixedPitchFontSize]):
260         (-[WKPreferences _setDefaultFixedPitchFontSize:]):
261         (-[WKPreferences _fixedPitchFontFamily]):
262         (-[WKPreferences _setFixedPitchFontFamily:]):
263         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
264
265 2015-11-11  Carlos Garcia Campos  <cgarcia@igalia.com>
266
267         [GTK] Runtime critical warnings when closing a page containing windowed plugins
268         https://bugs.webkit.org/show_bug.cgi?id=151132
269
270         Reviewed by Martin Robinson.
271
272         This is because our plugin widget, that is a GtkPlug (derived from
273         GtkWindow), can receive the delete-event signal before
274         NetscapePlugin::platformDestroy is called. The delete-event
275         signal, by default, destroys the window when the signal is not
276         handled. So, after the delete-event the GtkPlug is destroyed, but
277         our pointer hasn't been reset. We can handle the delete-event
278         using gtk_widget_hide_on_delete as callback, so that the plugin
279         widget is hidden instead of destroyed.
280
281         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
282         (WebKit::NetscapePlugin::platformPostInitializeWindowed):
283
284 2015-11-11  Carlos Garcia Campos  <cgarcia@igalia.com>
285
286         REGRESSION(r191856): [GTK] SOCK_SEQPACKET no longer used after r191856
287         https://bugs.webkit.org/show_bug.cgi?id=151129
288
289         Reviewed by Martin Robinson.
290
291         r191856 unconditionally disabled SOCK_SEQPACKET for GTK port.
292
293         * Platform/IPC/unix/ConnectionUnix.cpp: Use always SOCK_SEQPACKET
294         when available.
295
296 2015-11-10  Alex Christensen  <achristensen@webkit.org>
297
298         Implement authentication challenge handling when using NETWORK_SESSION
299         https://bugs.webkit.org/show_bug.cgi?id=150968
300
301         Reviewed by Antti Koivisto.
302
303         * NetworkProcess/NetworkLoad.cpp:
304         (WebKit::NetworkLoad::didReceiveChallenge):
305         Copy functionality from NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync (which is used when we don't use NETWORK_SESSION)
306         because there is no canAuthenticateAgainstProtectionSpace delegate callback when using NSURLSession, according to
307         https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/URLLoadingSystem/Articles/AuthenticationChallenges.html
308         Instead, all authentication challenge callbacks go to URLSession:task:didReceiveChallenge:completionHandler:
309         because we do not implement URLSession:didReceiveChallenge:completionHandler:
310         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
311         (-[NetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
312         (-[NetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
313         (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
314         Make a block copy of the completion handlers so we can copy the std::functions that wrap them into HashMaps and call them later,
315         in this case we call the completion handler after the UIProcess gives us credentials for an authentication challenge.
316         * Shared/Authentication/AuthenticationManager.cpp:
317         (WebKit::AuthenticationManager::AuthenticationManager):
318         (WebKit::AuthenticationManager::addChallengeToChallengeMap):
319         (WebKit::AuthenticationManager::shouldCoalesceChallenge):
320         (WebKit::AuthenticationManager::coalesceChallengesMatching):
321         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
322         Fix an existing bug that caused multiple calls to addChallengeToChallengeMap for one challenge.  This caused too many calls to 
323         the AuthenticationClient methods, which did not cause a problem because they were not one-time-use block copies of completion handlers before.
324         (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
325         (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
326         (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
327         (WebKit::AuthenticationManager::cancelChallenge):
328         (WebKit::AuthenticationManager::cancelSingleChallenge):
329         (WebKit::AuthenticationManager::performDefaultHandling):
330         (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
331         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
332         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
333         Call completion handlers which we stored in a HashMap before doing IPC if we are using NETWORK_SESSION,
334         which has completion handlers instead of continueSomething client calls.
335         * Shared/Authentication/AuthenticationManager.h:
336         (WebKit::AuthenticationManager::outstandingAuthenticationChallengeCount):
337         * Shared/Downloads/Download.cpp:
338         (WebKit::Download::didReceiveAuthenticationChallenge):
339         (WebKit::Download::didReceiveResponse):
340         * Shared/Downloads/DownloadAuthenticationClient.cpp:
341         (WebKit::DownloadAuthenticationClient::receivedChallengeRejection):
342         * Shared/Downloads/DownloadAuthenticationClient.h:
343         Add ifdefs for code related to downloading I will implement later.
344
345 2015-11-10  Simon Fraser  <simon.fraser@apple.com>
346
347         Use different pixel formats for displays that support them
348         https://bugs.webkit.org/show_bug.cgi?id=151122
349         rdar://problem/22846841
350
351         Reviewed by Tim Horton.
352         
353         New the new IOSurface formats when appropriate for the properties of the
354         display.
355
356         * Shared/mac/RemoteLayerBackingStore.mm:
357         (WebKit::bufferFormat):
358         (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
359
360 2015-11-10  Tim Horton  <timothy_horton@apple.com>
361
362         Adopt formal protocols for CA delegates
363         https://bugs.webkit.org/show_bug.cgi?id=151121
364         <rdar://problem/6739193>
365
366         Reviewed by Anders Carlsson.
367
368         * UIProcess/API/Cocoa/WKWebView.mm:
369         * UIProcess/Cocoa/WebViewImpl.mm:
370         * UIProcess/mac/WKTextFinderClient.mm:
371         * UIProcess/mac/WebPageProxyMac.mm:
372         * WebKit2.xcodeproj/project.pbxproj:
373         * WebProcess/cocoa/WebProcessCocoa.mm:
374         Adapt to the split out SPI headers.
375
376         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
377         Conform!
378
379 2015-11-10  Dan Bernstein  <mitz@apple.com>
380
381         Fixed the build.
382
383         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
384         (DatabaseServiceInitializer):
385         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
386         (NetworkServiceInitializer):
387         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
388         (WebContentServiceInitializer):
389
390 2015-11-10  Chris Dumez  <cdumez@apple.com>
391
392         [WK2][NetworkCache] Rename SpeculativeLoader to SpeculativeLoadManager
393         https://bugs.webkit.org/show_bug.cgi?id=151110
394
395         Reviewed by Alex Christensen.
396
397         Rename SpeculativeLoader to SpeculativeLoadManager for clarity, as it
398         manages all speculative loads.
399
400         * NetworkProcess/cache/NetworkCache.cpp:
401         (WebKit::NetworkCache::Cache::initialize):
402         (WebKit::NetworkCache::Cache::retrieve):
403         * NetworkProcess/cache/NetworkCache.h:
404         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: Renamed from Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoader.cpp.
405         (WebKit::NetworkCache::subresourcesType):
406         (WebKit::NetworkCache::makeSubresourcesKey):
407         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
408         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresource):
409         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::encodeAsSubresourcesRecord):
410         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::markAsCompleted):
411         (WebKit::NetworkCache::SpeculativeLoadManager::SpeculativeLoadManager):
412         (WebKit::NetworkCache::SpeculativeLoadManager::~SpeculativeLoadManager):
413         (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
414         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h: Renamed from Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoader.h.
415         * WebKit2.xcodeproj/project.pbxproj:
416
417 2015-11-10  Tim Horton  <timothy_horton@apple.com>
418
419         Add WKWebViewConfiguration SPI for a variety of different ex-preferences
420         https://bugs.webkit.org/show_bug.cgi?id=151070
421         <rdar://problem/23020454>
422
423         Reviewed by Anders Carlsson.
424
425         * UIProcess/API/Cocoa/WKWebView.mm:
426         (-[WKWebView initWithFrame:configuration:]):
427         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
428         (-[WKWebViewConfiguration init]):
429         (-[WKWebViewConfiguration copyWithZone:]):
430         (-[WKWebViewConfiguration _setRespectsImageOrientation:]):
431         (-[WKWebViewConfiguration _respectsImageOrientation]):
432         (-[WKWebViewConfiguration _setPrintsBackgrounds:]):
433         (-[WKWebViewConfiguration _printsBackgrounds]):
434         (-[WKWebViewConfiguration _setIncrementalRenderingSuppressionTimeout:]):
435         (-[WKWebViewConfiguration _incrementalRenderingSuppressionTimeout]):
436         (-[WKWebViewConfiguration _setAllowsJavaScriptMarkup:]):
437         (-[WKWebViewConfiguration _allowsJavaScriptMarkup]):
438         (-[WKWebViewConfiguration _setConvertsPositionStyleOnCopy:]):
439         (-[WKWebViewConfiguration _convertsPositionStyleOnCopy]):
440         (-[WKWebViewConfiguration _setAllowsMetaRefresh:]):
441         (-[WKWebViewConfiguration _allowsMetaRefresh]):
442         (-[WKWebViewConfiguration _setShowsURLsInToolTips:]):
443         (-[WKWebViewConfiguration _showsURLsInToolTips]):
444         (-[WKWebViewConfiguration _setServiceControlsEnabled:]):
445         (-[WKWebViewConfiguration _serviceControlsEnabled]):
446         (-[WKWebViewConfiguration _setImageControlsEnabled:]):
447         (-[WKWebViewConfiguration _imageControlsEnabled]):
448         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
449         Plumb some configuration SPI for various clients.
450
451 2015-11-10  Chris Dumez  <cdumez@apple.com>
452
453         [WK2][iOS] Update WebContent sandbox profile to allow loading injected bundles again
454         https://bugs.webkit.org/show_bug.cgi?id=151102
455         <rdar://problem/23442311>
456
457         Reviewed by Dan Bernstein.
458
459         Update WebContent sandbox profile to allow loading injected bundles again.
460
461         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
462
463 2015-11-10  Carlos Garcia Campos  <cgarcia@igalia.com>
464
465         [UNIX] Environment variable should take precedence over directories in plugin search path
466         https://bugs.webkit.org/show_bug.cgi?id=151096
467
468         Reviewed by Martin Robinson.
469
470         Otherwise you can't override the directories using the env vars
471         for plugins already installed.
472
473         * Shared/Plugins/unix/PluginSearchPath.cpp:
474         (WebKit::pluginsDirectories):
475
476 2015-11-10  Carlos Garcia Campos  <cgarcia@igalia.com>
477
478         [GTK] Use CROSS_PLATFORM_CONTEXT_MENUS
479         https://bugs.webkit.org/show_bug.cgi?id=150642
480
481         Reviewed by Martin Robinson.
482
483         Use CROSS_PLATFORM_CONTEXT_MENUS. Since we can't just use
484         WebContextMenuItemData, because we need to bind a GtkAction to the
485         menu items, this patch adds WebContextMenuItemGtk that derives
486         from WebContextMenuItemData and adds the GtkAction and its own
487         handling of submenu items. WebKitContextMenu and
488         WebKitContextMenuItem no longer deal with the widgets (GtkMenu and
489         GtkMenuItem), that are now created by WebContextMenuProxy when
490         building the popup menu.
491         This patch also removes the support for input methods submenu,
492         since it has been deprecated (and disabled by default) in GTK+ for
493         long time, it has never actually worked (because the menu items
494         don't have a GtkAction associated) and it makes the code more
495         complicated for no benefit.
496
497         * PlatformGTK.cmake:
498         * Shared/gtk/WebContextMenuItemGtk.cpp: Added.
499         (WebKit::gtkStockIDFromContextMenuAction):
500         (WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk):
501         (WebKit::WebContextMenuItemGtk::~WebContextMenuItemGtk):
502         (WebKit::WebContextMenuItemGtk::createGtkActionIfNeeded):
503         * Shared/gtk/WebContextMenuItemGtk.h: Copied from Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.h.
504         (WebKit::WebContextMenuItemGtk::gtkAction):
505         (WebKit::WebContextMenuItemGtk::submenuItems):
506         * UIProcess/API/gtk/WebKitContextMenu.cpp:
507         (webkitContextMenuPopulate):
508         (webkitContextMenuCreate): Deleted.
509         (webkitContextMenuSetParentItem): Deleted.
510         * UIProcess/API/gtk/WebKitContextMenuActions.cpp:
511         (webkitContextMenuActionGetForContextMenuItem):
512         * UIProcess/API/gtk/WebKitContextMenuActionsPrivate.h:
513         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
514         (webkitContextMenuItemSetSubMenu):
515         (webkitContextMenuItemCreate):
516         (webkitContextMenuItemToWebContextMenuItemGtk):
517         (webkitContextMenuItemToWebContextMenuItemData):
518         (webkit_context_menu_item_new):
519         (webkit_context_menu_item_new_from_stock_action):
520         (webkit_context_menu_item_new_from_stock_action_with_label):
521         (webkit_context_menu_item_new_with_submenu):
522         (webkit_context_menu_item_new_separator):
523         (webkit_context_menu_item_get_action):
524         (webkit_context_menu_item_get_stock_action):
525         (webkit_context_menu_item_is_separator): Deleted.
526         * UIProcess/API/gtk/WebKitContextMenuItemPrivate.h:
527         * UIProcess/API/gtk/WebKitContextMenuPrivate.h:
528         * UIProcess/API/gtk/WebKitWebView.cpp:
529         (webkitWebViewPopulateContextMenu):
530         (contextMenuDismissed): Deleted.
531         (webkitWebViewSubmitFormRequest): Deleted.
532         (webkitWebViewHandleAuthenticationChallenge): Deleted.
533         (webkitWebViewInsecureContentDetected): Deleted.
534         (webkitWebViewEmitRunColorChooser): Deleted.
535         (webkitWebViewRequestInstallMissingMediaPlugins): Deleted.
536         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
537         (WebKit::contextMenuItemActivatedCallback):
538         (WebKit::WebContextMenuProxyGtk::append):
539         (WebKit::WebContextMenuProxyGtk::populate):
540         (WebKit::WebContextMenuProxyGtk::show):
541         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
542         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
543         * UIProcess/gtk/WebContextMenuProxyGtk.h:
544         (WebKit::WebContextMenuProxyGtk::gtkMenu):
545         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
546
547 2015-11-09  Carlos Garcia Campos  <cgarcia@igalia.com>
548
549         Unreviewed. Fix GTK+ build after r192184.
550
551         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
552         (WebKit::LayerTreeHostGtk::initialize):
553         (WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged):
554
555 2015-11-09  Eric Carlson  <eric.carlson@apple.com>
556
557         [Mac] Add a mock AppleTV device for testing
558         https://bugs.webkit.org/show_bug.cgi?id=148912
559         <rdar://problem/22596272>
560
561         Reviewed by Tim Horton.
562
563         * Shared/WebCoreArgumentCoders.cpp:
564         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode): Update for MediaPlaybackTargetContext changes.
565         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decode): Ditto.
566         * Shared/WebCoreArgumentCoders.h:
567
568         * Shared/mac/WebCoreArgumentCodersMac.mm:
569         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): Ditto.
570         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): Ditto.
571
572         * UIProcess/WebPageProxy.cpp:
573         (WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerEnabled): New.
574         (WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerState): Ditto.
575         * UIProcess/WebPageProxy.h:
576
577         * UIProcess/WebPageProxy.messages.in: Add SetMockMediaPlaybackTargetPickerEnabled and 
578           SetMockMediaPlaybackTargetPickerState.
579
580         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
581         (WebKit::WebChromeClient::setMockMediaPlaybackTargetPickerEnabled): New.
582         (WebKit::WebChromeClient::setMockMediaPlaybackTargetPickerState): Ditto.
583         * WebProcess/WebCoreSupport/WebChromeClient.h:
584
585         * WebProcess/WebPage/WebPage.h: MediaPlaybackTargetContext is a class, not a struct.
586
587         * WebProcess/WebPage/WebPage.messages.in: Ditto.
588
589         * WebProcess/WebPage/mac/WebPageMac.mm:
590         (WebKit::WebPage::playbackTargetSelected): Support mock target.
591
592 2015-11-09  Ryuan Choi  <ryuan.choi@navercorp.com>
593
594         [EFL] Crash while opening child webview with EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
595         https://bugs.webkit.org/show_bug.cgi?id=145924
596
597         Reviewed by Gyuyoung Kim.
598
599         There are some crashes when we clicked the link that opens child window
600         via window.open or <a> tag with _blank target if process model is multiple
601         secondary.
602
603         It's because multiple secondary process model tries to assign new webprocess
604         if related page is null. In order to keep the child window in same process
605         with opener, we should pass related page when we create WebPageProxy.
606
607         This patch adds ewk_view_configuration object and ewk_view_add_configuration()
608         to pass related page to WebPageProxy.
609
610         * PlatformEfl.cmake:
611         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
612         (WKViewCreate):
613         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
614         * UIProcess/API/efl/EWebKit2.h.in:
615         * UIProcess/API/efl/EwkView.cpp:
616         (EwkView::createNewPage):
617         * UIProcess/API/efl/ewk_view_configuration.cpp: Added.
618         * UIProcess/API/efl/ewk_view_configuration.h: Added.
619         * UIProcess/API/efl/ewk_view_configuration_private.h: Added.
620         * UIProcess/API/efl/ewk_view.cpp:
621         (EWKViewCreate):
622         (ewk_view_smart_add):
623         (ewk_view_add_with_configuration): Added to pass configuration.
624         (ewk_view_add_with_context):
625         * UIProcess/API/efl/ewk_view.h:
626         * UIProcess/API/efl/ewk_view_private.h:
627         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
628         (EWK2UnitTest::EWK2UnitTestBase::waitUntilTitleChangedTo):
629         (EWK2UnitTest::EWK2UnitTestBase::waitUntilNotNull):
630         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
631         * UIProcess/API/efl/tests/test_ewk2_view.cpp: Added test cases to test window_create smart method.
632         (windowCreateCallback):
633         (TEST_F):
634         (EWK2ViewTestNewWindowWithMultipleProcesses::EWK2ViewTestNewWindowWithMultipleProcesses):
635         * UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
636         (EWK2WindowFeaturesTest::createDefaultWindow):
637         (EWK2WindowFeaturesTest::createWindow):
638         * UIProcess/CoordinatedGraphics/WebView.cpp:
639         (WebKit::WebView::WebView):
640         * UIProcess/CoordinatedGraphics/WebView.h:
641         * UIProcess/efl/WebInspectorProxyEfl.cpp:
642         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
643         * UIProcess/efl/WebViewEfl.cpp:
644         (WebKit::WebView::create):
645         (WebKit::WebViewEfl::WebViewEfl):
646         * UIProcess/efl/WebViewEfl.h:
647
648 2015-11-09  Anders Carlsson  <andersca@apple.com>
649
650         Don't call Vector::uncheckedAppend on a vector that we haven't reserved the capacity for
651         https://bugs.webkit.org/show_bug.cgi?id=151069
652         rdar://problem/23473435
653
654         Reviewed by Tim Horton.
655
656         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
657         (initializeMethod):
658
659 2015-11-09  Anders Carlsson  <andersca@apple.com>
660
661         Fix 32-bit build.
662
663         * Shared/API/Cocoa/RemoteObjectRegistry.mm:
664         (WebKit::RemoteObjectRegistry::callReplyBlock):
665
666 2015-11-09  Anders Carlsson  <andersca@apple.com>
667
668         Add reply blocks to _WKRemoteObjectInterface similar to NSXPCConnection
669         https://bugs.webkit.org/show_bug.cgi?id=151056
670         rdar://problem/23222609
671
672         Reviewed by Tim Horton.
673
674         * Platform/spi/Cocoa/NSInvocationSPI.h:
675         Add NSBlockInvocation declaration.
676
677         * Shared/API/Cocoa/RemoteObjectInvocation.mm:
678         (WebKit::RemoteObjectInvocation::encode):
679         Encode true if we have a reply ID.
680
681         * Shared/API/Cocoa/RemoteObjectRegistry.h:
682         Add new members.
683
684         * Shared/API/Cocoa/RemoteObjectRegistry.messages.in:
685         Add new CallReplyBlock message.
686
687         * Shared/API/Cocoa/RemoteObjectRegistry.mm:
688         (WebKit::RemoteObjectRegistry::sendReplyBlock):
689         Just send the CallReplyBlock message.
690
691         (WebKit::RemoteObjectRegistry::callReplyBlock):
692         Call through to _WKRemoteObjectRegistry.
693
694         * Shared/API/Cocoa/WKRemoteObjectCoder.h:
695         Pass an optional reply selector.
696
697         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
698         (encodeInvocationArguments):
699         Don't hard-code the first argument index.
700
701         (encodeInvocation):
702         Encode block invocations.
703
704         (-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:replyToSelector:]):
705         Initialize _replyToSelector.
706
707         (validateClass):
708         NSBlockInvocation doesn't need to conform to NSSecureCoding.
709
710         (decodeInvocationArguments):
711         Don't hard-code the first argument, take it as a parameter instead.
712
713         (decodeInvocation):
714         Decode NSBlockInvocations (reply block invocations).
715
716         (decodeObject):
717         Check for NSBlockInvocation.
718
719         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
720         (-[_WKRemoteObjectInterface _methodSignatureForSelector:]):
721         Return null if we can't find the method.
722
723         (-[_WKRemoteObjectInterface _methodSignatureForReplyBlockOfSelector:]):
724         Look up the reply block signature and return it.
725
726         (-[_WKRemoteObjectInterface _allowedArgumentClassesForReplyBlockOfSelector:]):
727         Look up the allowed reply argument classes and return them.
728
729         * Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h:
730         Add new methods.
731
732         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
733         (PendingReply::PendingReply):
734         Add new object that represents a pending reply.
735
736         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
737         If the invocation has a reply block, add a pending reply to our map.
738
739         (-[_WKRemoteObjectRegistry _invokeMethod:]):
740         If the method we're about to invoke has a reply block, construct a special reply block that calls us back with an invocation.
741         Encode this invocation and send it back across the wire.
742
743         (-[_WKRemoteObjectRegistry _callReplyWithID:blockInvocation:]):
744         Find the pending reply, decode the reply block invocation and call it.
745
746         * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
747         Add new methods.
748
749 2015-11-09  Tim Horton  <timothy_horton@apple.com>
750
751         Add drawsBackground SPI to WKWebView, and get rid of drawsTransparentBackground from WebKit2
752         https://bugs.webkit.org/show_bug.cgi?id=151054
753         <rdar://problem/22907994>
754
755         Reviewed by Simon Fraser.
756
757         * Shared/WebPageCreationParameters.cpp:
758         (WebKit::WebPageCreationParameters::encode): Deleted.
759         (WebKit::WebPageCreationParameters::decode): Deleted.
760         * Shared/WebPageCreationParameters.h:
761         * UIProcess/API/mac/WKView.mm:
762         (-[WKView setDrawsTransparentBackground:]):
763         (-[WKView drawsTransparentBackground]):
764         * UIProcess/Cocoa/WebViewImpl.h:
765         * UIProcess/Cocoa/WebViewImpl.mm:
766         (WebKit::WebViewImpl::updateLayer):
767         (WebKit::WebViewImpl::setDrawsTransparentBackground): Deleted.
768         (WebKit::WebViewImpl::drawsTransparentBackground): Deleted.
769         * UIProcess/WebPageProxy.cpp:
770         (WebKit::WebPageProxy::WebPageProxy): Deleted.
771         (WebKit::WebPageProxy::setDrawsTransparentBackground): Deleted.
772         (WebKit::WebPageProxy::creationParameters): Deleted.
773         * UIProcess/WebPageProxy.h:
774         (WebKit::WebPageProxy::drawsTransparentBackground): Deleted.
775         * UIProcess/mac/WebInspectorProxyMac.mm:
776         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
777         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
778         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
779         * WebProcess/WebPage/WebPage.cpp:
780         (WebKit::WebPage::WebPage): Deleted.
781         (WebKit::m_shouldDispatchFakeMouseMoveEvents): Deleted.
782         (WebKit::WebPage::setDrawsTransparentBackground): Deleted.
783         * WebProcess/WebPage/WebPage.h:
784         (WebKit::WebPage::drawsTransparentBackground): Deleted.
785         * WebProcess/WebPage/WebPage.messages.in:
786         Get rid of drawsTransparentBackground. It doesn't seem like there's any observable
787         difference in a layer-backed world. WKView's (set)drawsTransparentBackground
788         will just forward to drawsBackground (inverted).
789
790         * UIProcess/API/Cocoa/WKWebView.mm:
791         (-[WKWebView _webProcessIsResponsive]):
792         Move _webProcessIsResponsive up with the other cross-platform SPI methods, instead
793         of below all of the platform-specific SPI methods.
794
795         (-[WKWebView _drawsBackground]):
796         (-[WKWebView _setDrawsBackground:]):
797         Added.
798
799         (-[WKWebView _drawsTransparentBackground]):
800         (-[WKWebView _setDrawsTransparentBackground:]):
801         Deleted.
802         
803         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
804         Replace drawsTransparentBackground with drawsBackground.
805
806 2015-11-09  Joseph Pecoraro  <pecoraro@apple.com>
807
808         Web Inspector: REGRESSION: 2nd level inspector should not be able to dock to first
809         https://bugs.webkit.org/show_bug.cgi?id=151050
810
811         Reviewed by Brian Burg.
812
813         * UIProcess/mac/WebInspectorProxyMac.mm:
814         (WebKit::WebInspectorProxy::platformCanAttach):
815         Check now that the inspected view can be a WKWebView.
816
817 2015-11-09  Anders Carlsson  <andersca@apple.com>
818
819         Introspect reply block types as well
820         https://bugs.webkit.org/show_bug.cgi?id=151048
821
822         Reviewed by Tim Horton.
823
824         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
825         (initializeMethod):
826         (initializeMethods):
827         (-[_WKRemoteObjectInterface debugDescription]):
828
829 2015-11-09  Anders Carlsson  <andersca@apple.com>
830
831         Implement -[_WKRemoteObjectInterface debugDescription] and have it look like the NSXPCInterface equivalent
832         https://bugs.webkit.org/show_bug.cgi?id=151044
833
834         Reviewed by Tim Horton.
835
836         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
837         (-[_WKRemoteObjectInterface debugDescription]):
838         (-[_WKRemoteObjectInterface description]): Deleted.
839
840 2015-11-06  Anders Carlsson  <andersca@apple.com>
841
842         Rework the way allowed argument classes are stored
843         https://bugs.webkit.org/show_bug.cgi?id=150992
844
845         Reviewed by Darin Adler.
846
847         Add a separate MethodInfo class so we have someplace to store the reply block arguments.
848         Use HashSet<Class> instead of NSSet. No functionality change intended.
849
850         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
851         (-[WKRemoteObjectDecoder decodeValueOfObjCType:at:]):
852         (decodeObjectFromObjectStream):
853         (checkIfClassIsAllowed):
854         (decodeInvocationArguments):
855         (decodeObject):
856         (-[WKRemoteObjectDecoder decodeObjectOfClasses:forKey:]):
857         (-[WKRemoteObjectDecoder allowedClasses]):
858         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
859         (isContainerClass):
860         (propertyListClasses):
861         (initializeMethod):
862         (initializeMethods):
863         (-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
864         (classesForSelectorArgument):
865         (-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
866         (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
867         (-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
868         (allowedArgumentClassesForMethod): Deleted.
869         (initializeAllowedArgumentClasses): Deleted.
870         * Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h:
871
872 2015-11-09  Csaba Osztrogonác  <ossy@webkit.org>
873
874         Unreviewed CMake buildfix after r192113.
875
876         * PlatformMac.cmake: New file added.
877
878 2015-11-09  Csaba Osztrogonác  <ossy@webkit.org>
879
880         Unreviewed speculative CMake buildfix after r192111.
881
882         * CMakeLists.txt: New files added.
883
884 2015-11-08  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
885
886         [EFL] Add UserAgentEFl.cpp|h
887         https://bugs.webkit.org/show_bug.cgi?id=151007
888
889         Reviewed by Darin Adler.
890
891         As other ports EFL port starts to have UserAgentEfl class in order to support more detailed
892         UA.
893
894         * UIProcess/efl/WebPageProxyEfl.cpp:
895         (WebKit::WebPageProxy::standardUserAgent): Call WebCore::standardUserAgent().
896
897 2015-11-07  Simon Fraser  <simon.fraser@apple.com>
898
899         Remove ColorSpace argument to all the drawing calls
900         https://bugs.webkit.org/show_bug.cgi?id=150967
901
902         Reviewed by Darin Adler.
903
904         * Shared/API/c/cg/WKImageCG.cpp:
905         (WKImageCreateFromCGImage):
906         * Shared/ContextMenuContextData.cpp:
907         (WebKit::ContextMenuContextData::ContextMenuContextData):
908         * Shared/WebCoreArgumentCoders.cpp:
909         (IPC::encodeImage):
910         * Shared/mac/RemoteLayerBackingStore.mm:
911         (WebKit::RemoteLayerBackingStore::drawInContext):
912         * UIProcess/API/Cocoa/WKWebView.mm:
913         (-[WKWebView _updateScrollViewBackground]):
914         * UIProcess/WKInspectorHighlightView.mm:
915         (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]):
916         (-[WKInspectorHighlightView _layoutForRectsHighlight:]):
917         * UIProcess/ios/ViewGestureControllerIOS.mm:
918         (WebKit::ViewGestureController::beginSwipeGesture):
919         * UIProcess/ios/WKContentViewInteraction.mm:
920         (-[WKContentView _updateTapHighlight]):
921         * UIProcess/mac/ViewGestureControllerMac.mm:
922         (WebKit::ViewGestureController::beginSwipeGesture):
923         * WebProcess/WebPage/FindController.cpp:
924         (WebKit::FindController::drawRect):
925         * WebProcess/WebPage/WebFrame.cpp:
926         (WebKit::WebFrame::createSelectionSnapshot):
927         * WebProcess/WebPage/WebPage.cpp:
928         (WebKit::WebPage::snapshotAtSize):
929         * WebProcess/WebPage/ios/FindControllerIOS.mm:
930         (WebKit::FindIndicatorOverlayClientIOS::drawRect):
931         * WebProcess/WebPage/ios/WebPageIOS.mm:
932         (WebKit::WebPage::getPositionInformation):
933         * WebProcess/ios/WebVideoFullscreenManager.mm:
934         (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
935
936 2015-11-07  Simon Fraser  <simon.fraser@apple.com>
937
938         Use ColorSpaceSRGB for image buffers everywhere
939         https://bugs.webkit.org/show_bug.cgi?id=150990
940
941         Reviewed by Zalan Bujtas.
942
943         ColorSpaceSRGB and ColorSpaceDeviceRGB are equivalent now, so convert
944         code that creates image buffers tagged with ColorSpaceDeviceRGB to use ColorSpaceSRGB.
945
946         * Shared/mac/RemoteLayerBackingStore.mm:
947         (WebKit::RemoteLayerBackingStore::decode):
948         (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
949         * UIProcess/API/Cocoa/WKWebView.mm:
950         (-[WKWebView _takeViewSnapshot]):
951         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
952
953 2015-11-06  Brady Eidson  <beidson@apple.com>
954
955         Modern IDB: Make the result data for a "get" request be an IDBGetResult.
956         https://bugs.webkit.org/show_bug.cgi?id=150985
957
958         Reviewed by Alex Christensen.
959
960         * Shared/WebCoreArgumentCoders.cpp:
961         (IPC::ArgumentCoder<IDBGetResult>::encode):
962         (IPC::ArgumentCoder<IDBGetResult>::decode):
963
964 2015-11-06  Tim Horton  <timothy_horton@apple.com>
965
966         Add preliminary (SPI) support for NSTextFinder on WKWebView
967         https://bugs.webkit.org/show_bug.cgi?id=150907
968         <rdar://problem/19171624>
969
970         Reviewed by Darin Adler.
971
972         New API test: WebKit2.FindInPage
973
974         * Platform/spi/mac/AppKitSPI.h:
975         Add some SPI.
976
977         * UIProcess/API/APIFindClient.h:
978         (API::FindClient::didFindString):
979         * UIProcess/API/C/WKPage.cpp:
980         (WKPageSetPageFindClient):
981         * UIProcess/WebPageProxy.cpp:
982         (WebKit::WebPageProxy::didFindString):
983         * UIProcess/WebPageProxy.h:
984         * UIProcess/WebPageProxy.messages.in:
985         * UIProcess/Cocoa/FindClient.h:
986         * UIProcess/Cocoa/FindClient.mm:
987         (WebKit::FindClient::didFindString):
988         Make didFindString return the match rects like didFindStringMatches does.
989
990         * WebProcess/WebPage/FindController.cpp:
991         (WebKit::FindController::updateFindUIAfterPageScroll):
992         (WebKit::FindController::findString):
993         Keep the most recent find match around for incremental find just like we do
994         for the non-incremental version. This way, getImageForFindMatch and selectFindMatch
995         will work for incremental find too!
996
997         * UIProcess/API/Cocoa/WKWebView.mm:
998         (-[WKWebView _ensureTextFinderClient]):
999         (-[WKWebView findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
1000         (-[WKWebView documentContainerView]):
1001         (-[WKWebView getSelectedText:]):
1002         (-[WKWebView selectFindMatch:completionHandler:]):
1003         Implement NSTextFinder's async client protocol and forward to the new WKTextFinderClient.
1004
1005         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1006         Privately note our conformance to the aformentioned protocol.
1007
1008         * UIProcess/mac/WKTextFinderClient.h: Added.
1009         * UIProcess/mac/WKTextFinderClient.mm: Added.
1010         (WebKit::TextFinderFindClient::TextFinderFindClient):
1011         (-[WKTextFinderMatch initWithClient:view:index:rects:]):
1012         (-[WKTextFinderMatch containingView]):
1013         (-[WKTextFinderMatch textRects]):
1014         (-[WKTextFinderMatch generateTextImage:]):
1015         (-[WKTextFinderMatch index]):
1016         (-[WKTextFinderClient initWithPage:view:]):
1017         (-[WKTextFinderClient willDestroyView:]):
1018         (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
1019         (-[WKTextFinderClient getSelectedText:]):
1020         (-[WKTextFinderClient selectFindMatch:completionHandler:]):
1021         (-[WKTextFinderClient didFindStringMatches:rects:index:]):
1022         (-[WKTextFinderClient didGetImageForMatchResult:index:]):
1023         (-[WKTextFinderClient didFindString:rects:index:]):
1024         (-[WKTextFinderClient didFailToFindString:]):
1025         (-[WKTextFinderClient getImageForMatchResult:completionHandler:]):
1026         * WebKit2.xcodeproj/project.pbxproj:
1027         Add WKTextFinderClient. It installs itself as the FindClient and FindMatchesClient,
1028         so you can only use one mechanism or the other.
1029
1030 2015-11-06  Chris Dumez  <cdumez@apple.com>
1031
1032         [WK2][SpeculativeRevalidation] Save to disk cache relationship between resources
1033         https://bugs.webkit.org/show_bug.cgi?id=150951
1034         <rdar://problem/23092196>
1035
1036         Reviewed by Darin Adler.
1037
1038         This patch is a first step towards speculative revalidation support in
1039         the WebKit network cache. It maps sub-resources to the main resource
1040         that caused them to be requested. We then write this information to the
1041         network cache, as a list of subresource keys for each main resource,
1042         even if the main resource is not cacheable.
1043
1044         To map sub-resources to main resources, we track the loads happening
1045         in each frame and store the key of the main resource for the frame,
1046         as well as the key of each sub-resource later loaded in the frame. We
1047         use a HysteresisActivity to detect when loads settle down in each frame
1048         (no loads happen for a while) and we then write the information to the
1049         disk. If a new main resource is loaded in a frame where we were already
1050         tracking a load, we save the data to disk before tracking the new load,
1051         instead of waiting for the HysteresisActivity to detect the end of the
1052         load.
1053
1054         The feature is currently behind a compile-time flag that is enabled on
1055         Mac and iOS only. It is also behind a runtime flag (NSUserDefaults)
1056         that is disabled by default.
1057
1058         * NetworkProcess/NetworkResourceLoader.cpp:
1059         (WebKit::NetworkResourceLoader::start):
1060         Pass frameID in addition to the pageID. We need to globally identify
1061         frames (using <pageID, frameID> pair) to be able to track loads in
1062         each frame.
1063
1064         * NetworkProcess/cache/NetworkCache.cpp:
1065         (WebKit::NetworkCache::Cache::initialize):
1066         Only initialize the SpeculativeLoader if the
1067         enableNetworkCacheSpeculativeRevalidation run-time flag is set.
1068
1069         (WebKit::NetworkCache::Cache::retrieve):
1070         Register the load with the SpeculativeLoader.
1071
1072         * NetworkProcess/cache/NetworkCacheKey.h:
1073         (WebKit::NetworkCache::Key::Key):
1074         (WebKit::NetworkCache::Key::isHashTableDeletedValue):
1075         (WebKit::NetworkCache::Key::range):
1076         (WTF::NetworkCacheKeyHash::hash):
1077         (WTF::NetworkCacheKeyHash::equal):
1078         (WTF::HashTraits<WebKit::NetworkCache::Key>::isEmptyValue):
1079         Add needed HashTraits for NetworkCache::Key so it can be used as key in
1080         HashMap / HashSet.
1081
1082         * NetworkProcess/cache/NetworkCacheSpeculativeLoader.cpp: Added.
1083         * NetworkProcess/cache/NetworkCacheSpeculativeLoader.h: Added.
1084         Add new NetworkCacheSpeculativeLoader class that takes care of tracking
1085         loads in each frame to map subresources to main resources and then write
1086         this information to the network disk cache. In the future, this class we
1087         also take care of triggering speculative revalidations, thus the naming.
1088
1089         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1090         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1091         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1092         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1093         * Shared/Network/NetworkProcessCreationParameters.cpp:
1094         (WebKit::NetworkProcessCreationParameters::encode):
1095         (WebKit::NetworkProcessCreationParameters::decode):
1096         * Shared/Network/NetworkProcessCreationParameters.h:
1097         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1098         (WebKit::registerUserDefaultsIfNeeded):
1099         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1100         Add new NetworkProcess parameter to control at runtime if speculative loading
1101         should be enabled or not. It is disabled by default.
1102
1103         * WebKit2.xcodeproj/project.pbxproj:
1104         Add new files to XCode project.
1105
1106         * config.h:
1107         Add ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION build flag for the new
1108         feature that is enable by default on COCOA.
1109
1110 2015-11-06  Chris Dumez  <cdumez@apple.com>
1111
1112         Unreviewed, remove empty #if block landed by mistake in r192038.
1113
1114         * NetworkProcess/NetworkLoad.cpp:
1115
1116 2015-11-06  Philip Chimento  <philip.chimento@gmail.com>
1117
1118         [GTK] Fails to link libwebkit2gtkinjectedbundle.so on OSX
1119         https://bugs.webkit.org/show_bug.cgi?id=144785
1120
1121         Reviewed by Philippe Normand.
1122
1123         * PlatformGTK.cmake: Add missing WebKit2 library to list of
1124         libraries to link with. Required for OSX build.
1125
1126 2015-11-05  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
1127
1128         Add runtime and compile time flags for enabling Web Animations API and model.
1129         https://bugs.webkit.org/show_bug.cgi?id=150914
1130
1131         Reviewed by Benjamin Poulain.
1132
1133         Add ENABLE_WEB_ANIMATIONS compile time flag, runtime flag webAnimationsEnabled and Expose WK2 preference for runtime flag.
1134
1135         * Configurations/FeatureDefines.xcconfig:
1136         * Shared/WebPreferencesDefinitions.h:
1137         * UIProcess/API/C/WKPreferences.cpp:
1138         (WKPreferencesSetWebAnimationsEnabled):
1139         (WKPreferencesGetWebAnimationsEnabled):
1140         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1141         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1142         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1143         (WebKit::InjectedBundle::setWebAnimationsEnabled):
1144         * WebProcess/InjectedBundle/InjectedBundle.h:
1145         * WebProcess/WebPage/WebPage.cpp:
1146         (WebKit::WebPage::updatePreferences):
1147
1148 2015-11-05  Ryuan Choi  <ryuan.choi@navercorp.com>
1149
1150         [EFL] Separate beforeunload confirm callback from confirm callback
1151         https://bugs.webkit.org/show_bug.cgi?id=150964
1152
1153         Reviewed by Gyuyoung Kim.
1154
1155         Browser may need to distinguish between beforeunload confirm panel and general confirm panel.
1156         For example, browser may want to modify the message or show different buttons from confirm panel
1157         such as "Stay Page | Leave Page".
1158
1159         * UIProcess/API/efl/EwkView.cpp:
1160         (EwkView::requestJSBeforeUnloadConfirmPopup):
1161         * UIProcess/API/efl/EwkView.h:
1162         * UIProcess/API/efl/ewk_view.h:
1163         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1164         (TEST_F):
1165         * UIProcess/efl/PageUIClientEfl.cpp:
1166         (WebKit::PageUIClientEfl::runBeforeUnloadConfirmPanel):
1167
1168 2015-11-05  Commit Queue  <commit-queue@webkit.org>
1169
1170         Unreviewed, rolling out r192089.
1171         https://bugs.webkit.org/show_bug.cgi?id=150966
1172
1173         This change broke an existing layout test on Yosemite and
1174         Mavericks (Requested by ryanhaddad on #webkit).
1175
1176         Reverted changeset:
1177
1178         "Preview on apple.com/contact with all text selected shows a
1179         map"
1180         https://bugs.webkit.org/show_bug.cgi?id=150963
1181         http://trac.webkit.org/changeset/192089
1182
1183 2015-11-05  Tim Horton  <timothy_horton@apple.com>
1184
1185         Preview on apple.com/contact with all text selected shows a map
1186         https://bugs.webkit.org/show_bug.cgi?id=150963
1187         <rdar://problem/23421750>
1188
1189         Reviewed by Beth Dakin.
1190
1191         * WebProcess/WebPage/mac/WebPageMac.mm:
1192         (WebKit::WebPage::performDictionaryLookupForSelection):
1193         In this case, we don't know where we hit, so pass a null VisiblePosition.
1194
1195 2015-11-05  Geoffrey Garen  <ggaren@apple.com>
1196
1197         _WKObservablePageState's _webProcessIsResponsive property isn't set to YES when an unresponsive page is reloaded
1198         https://bugs.webkit.org/show_bug.cgi?id=150953
1199
1200         Reviewed by Anders Carlsson.
1201
1202         * UIProcess/ResponsivenessTimer.cpp:
1203         (WebKit::ResponsivenessTimer::processTerminated): Call stop() to
1204         indicate that we are responsive again. This gives the client a chance
1205         to remove the SPOD cursor, among other things.
1206
1207         * UIProcess/ResponsivenessTimer.h:
1208         (WebKit::ResponsivenessTimer::processTerminated): Anders told me to do this!
1209
1210         * UIProcess/WebPageProxy.cpp:
1211         (WebKit::WebPageProxy::resetStateAfterProcessExited): Be sure to reset
1212         the responsiveness timer too, or it will continue thinking we are
1213         unresponsive after a crash or a forced load or reload.
1214
1215 2015-11-05  Anders Carlsson  <andersca@apple.com>
1216
1217         Move invocation argument encoding out to a separate function
1218         https://bugs.webkit.org/show_bug.cgi?id=150950
1219
1220         Reviewed by Tim Horton.
1221
1222         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1223         (encodeInvocationArguments):
1224         (encodeInvocation):
1225
1226 2015-11-05  Chris Dumez  <cdumez@apple.com>
1227
1228         [WK2] Clean up / Modernize NetworkResourceLoader
1229         https://bugs.webkit.org/show_bug.cgi?id=150922
1230
1231         Reviewed by Andreas Kling.
1232
1233         Clean up / Modernize NetworkResourceLoader.
1234
1235         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1236         (WebKit::NetworkBlobRegistry::filesInBlob):
1237         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
1238         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1239         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
1240         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
1241         * NetworkProcess/NetworkConnectionToWebProcess.h:
1242         * NetworkProcess/NetworkResourceLoader.cpp:
1243         (WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
1244         (WebKit::sendReplyToSynchronousRequest):
1245         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1246         (WebKit::NetworkResourceLoader::startNetworkLoad):
1247         (WebKit::NetworkResourceLoader::didFinishLoading):
1248         (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
1249         (WebKit::NetworkResourceLoader::bufferingTimerFired):
1250         (WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
1251         (WebKit::NetworkResourceLoader::validateCacheEntry):
1252         (WebKit::NetworkResourceLoader::messageSenderConnection):
1253         (WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
1254         (WebKit::NetworkResourceLoader::~NetworkResourceLoader): Deleted.
1255         (WebKit::NetworkResourceLoader::didReceiveBuffer): Deleted.
1256         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry): Deleted.
1257         (WebKit::NetworkResourceLoader::consumeSandboxExtensions): Deleted.
1258         (WebKit::NetworkResourceLoader::sendAbortingOnFailure): Deleted.
1259         * NetworkProcess/NetworkResourceLoader.h:
1260         * NetworkProcess/mac/NetworkDiskCacheMonitor.h:
1261
1262 2015-11-05  Chris Dumez  <cdumez@apple.com>
1263
1264         Regression(r192038): Safari cannot load any pages
1265         https://bugs.webkit.org/show_bug.cgi?id=150937
1266         <rdar://problem/23413859>
1267
1268         Reviewed by Alex Christensen.
1269
1270         Make sure we use the current "defersLoading" state instead of the
1271         original one when constructing / initializing the NetworkLoad.
1272
1273         * NetworkProcess/NetworkResourceLoader.cpp:
1274         (WebKit::NetworkResourceLoader::startNetworkLoad):
1275
1276 2015-11-05  Ryuan Choi  <ryuan.choi@navercorp.com>
1277
1278         [EFL] Add try_close API to handle beforeunload event
1279         https://bugs.webkit.org/show_bug.cgi?id=150705
1280
1281         Reviewed by Gyuyoung Kim.
1282
1283         This patch adds ewk_view_try_close to have a chance to call confirm callback
1284         for beforeunload event while destryoing webview.
1285
1286         * UIProcess/API/efl/ewk_view.cpp:
1287         (ewk_view_try_close):
1288         * UIProcess/API/efl/ewk_view.h:
1289         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1290         (EWK2ViewTest::beforeUnloadCallback):
1291         (EWK2ViewTest::windowCloseCallback):
1292         (TEST_F): Added test case for ewk_view_try_close.
1293
1294 2015-11-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1295
1296         [GTK] Epiphany with Debug mode compiled WebKitGtk+ 2.10.3 hits ASSERT_ARG on willEnterAcceleratedCompositingMode
1297         https://bugs.webkit.org/show_bug.cgi?id=150620
1298
1299         Reviewed by Mario Sanchez Prada.
1300
1301         WillEnterAcceleratedCompositingMode message is sent when the
1302         LayerTreeHost is created in the Web Process. This can happen while
1303         there's still a DidUpdateBackingStoreState pending, in which case
1304         we are receiving the new backingStoreStateID, but the current one
1305         hasn't been updated yet.
1306
1307         * UIProcess/DrawingAreaProxyImpl.cpp:
1308         (WebKit::DrawingAreaProxyImpl::willEnterAcceleratedCompositingMode):
1309         Fix the ASSERT to check the given ID is alt least the next one,
1310         and remove the early return since it's valid to not enter AC mode
1311         in the end after the WillEnter message.
1312
1313 2015-11-04  Tim Horton  <timothy_horton@apple.com>
1314
1315         REGRESSION (r191499): 100% repro crash under _prepareForMoveToWindow:
1316         https://bugs.webkit.org/show_bug.cgi?id=150912
1317         <rdar://problem/23402116>
1318
1319         Reviewed by Simon Fraser.
1320
1321         * UIProcess/API/mac/WKView.mm:
1322         (-[WKView _prepareForMoveToWindow:withCompletionHandler:]):
1323
1324 2015-11-04  Chris Dumez  <cdumez@apple.com>
1325
1326         Regression(r192038): Crash in ~SandboxExtension()
1327         https://bugs.webkit.org/show_bug.cgi?id=150898
1328
1329         Reviewed by Alex Christensen.
1330
1331         We are seeing a couple of crashes under ~SandboxExtension() on the bots
1332         after ~SandboxExtension(). The reason is that the SandBoxExtension is
1333         still in use (useCount > 0) when destroyed. This happens due to a bug
1334         in setDefersLoading() that could cause the load to get started more
1335         than once and thus the SandboxExtension to be consumed more than once.
1336
1337         * NetworkProcess/NetworkResourceLoader.cpp:
1338         (WebKit::NetworkResourceLoader::setDefersLoading):
1339         (WebKit::NetworkResourceLoader::consumeSandboxExtensions):
1340
1341 2015-11-04  Chris Dumez  <cdumez@apple.com>
1342
1343         [WK2] Extract networking code out of NetworkResourceLoader class to improve reusability
1344         https://bugs.webkit.org/show_bug.cgi?id=150898
1345
1346         Reviewed by Alex Christensen.
1347
1348         Extract networking code out of NetworkResourceLoader class to improve
1349         reusability (will be used for speculative revalidation) and simplify
1350         the NetworkResourceLoader.
1351
1352         * CMakeLists.txt:
1353         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1354         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
1355         * NetworkProcess/NetworkLoad.cpp: Added.
1356         * NetworkProcess/NetworkLoad.h: Added.
1357         * NetworkProcess/NetworkLoadClient.h: Added.
1358         * NetworkProcess/NetworkLoadParameters.cpp: Added.
1359         * NetworkProcess/NetworkLoadParameters.h: Added.
1360         * NetworkProcess/NetworkResourceLoader.cpp:
1361         * NetworkProcess/NetworkResourceLoader.h:
1362         * NetworkProcess/mac/NetworkLoadMac.mm: Added.
1363         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
1364         (WebKit::NetworkResourceLoader::willCacheResponseAsync):
1365         * WebKit2.xcodeproj/project.pbxproj:
1366
1367 2015-11-04  Beth Dakin  <bdakin@apple.com>
1368
1369         Link preview doesn't work on XHTML pages with Content-Type header as 
1370         `application/xhtml+xml`
1371         https://bugs.webkit.org/show_bug.cgi?id=150740
1372         -and corresponding-
1373         rdar://problem/23063585
1374
1375         Reviewed by Darin Adler.
1376
1377         My original fix for this bug was incorrect in the presence of non-HTML 
1378         elements that happen to have the same local name as HTML elements. Since it 
1379         seems silly to have all of this logic in the UI process to determine whether 
1380         to treat something as a link or an image, this patch fixes the bug by adding 
1381         isLink and isImage to InteractionInformationAtPosition in order to simplify 
1382         everything. The only remaining uses of clickableElementName just use it to 
1383         compare against isNull and isEmpty, so that can be a bool too.
1384
1385         Add isLink and isImage, and turn clickableElementName into isClickableElement
1386         * Shared/InteractionInformationAtPosition.cpp:
1387         (WebKit::InteractionInformationAtPosition::encode):
1388         (WebKit::InteractionInformationAtPosition::decode):
1389         * Shared/InteractionInformationAtPosition.h:
1390
1391         Use the new isLink, isImage, and isClickableElement
1392         * UIProcess/ios/WKContentViewInteraction.mm:
1393         (-[WKContentView _actionForLongPress]):
1394         (-[WKContentView gestureRecognizerShouldBegin:]):
1395         (-[WKContentView _highlightLongPressRecognized:]):
1396         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
1397         (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
1398
1399         Set everything correctly.
1400         * WebProcess/WebPage/ios/WebPageIOS.mm:
1401         (WebKit::WebPage::getPositionInformation):
1402
1403 2015-11-04  Wenson Hsieh  <wenson_hsieh@apple.com>
1404
1405         Fix crashing fast-clicking WK2 tests on iOS
1406         https://bugs.webkit.org/show_bug.cgi?id=150896
1407         <rdar://problem/23344491>
1408
1409         Reviewed by Simon Fraser.
1410
1411         In order for the modified fast-clicking tests to pass, we can't allow hit-testing to
1412         find the tap highlight view. See the Radar for more UIKit-specific descriptions.
1413
1414         * UIProcess/ios/WKContentViewInteraction.mm:
1415         (-[WKContentView _showTapHighlight]):
1416
1417 2015-11-03  Anders Carlsson  <andersca@apple.com>
1418
1419         PageLoadState::will/didChangeProcessIsResponsive should call observers
1420         https://bugs.webkit.org/show_bug.cgi?id=150870
1421
1422         Reviewed by Dan Bernstein.
1423
1424         * UIProcess/PageLoadState.cpp:
1425         (WebKit::PageLoadState::willChangeProcessIsResponsive):
1426         (WebKit::PageLoadState::didChangeProcessIsResponsive):
1427
1428 2015-11-04  Ryan Haddad  <ryanhaddad@apple.com>
1429
1430         Speculative build fix. Missed the checkin for the changelog with r192029.
1431
1432         * UIProcess/API/Cocoa/WKWebView.mm:
1433
1434 2015-11-03  Andy Estes  <aestes@apple.com>
1435
1436         [Cocoa] Add SPI to warm an initial web process
1437         https://bugs.webkit.org/show_bug.cgi?id=150886
1438
1439         Reviewed by Dan Bernstein.
1440
1441         * UIProcess/API/Cocoa/WKProcessPool.mm:
1442         (-[WKProcessPool _warmInitialProcess]):
1443         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1444
1445 2015-11-03  Andy Estes  <aestes@apple.com>
1446
1447         [Cocoa] Adopt WKWebViewAdditions
1448         https://bugs.webkit.org/show_bug.cgi?id=150885
1449
1450         Reviewed by Dan Bernstein.
1451
1452         * UIProcess/API/Cocoa/WKWebView.mm:
1453
1454 2015-11-03  Tim Horton  <timothy_horton@apple.com>
1455
1456         Duplicate validateUserInterfaceItem in WKWebView
1457         https://bugs.webkit.org/show_bug.cgi?id=150873
1458
1459         Reviewed by Anders Carlsson.
1460
1461         * UIProcess/API/Cocoa/WKWebView.mm:
1462         (-[WKWebView changeFont:]):
1463         (-[WKWebView startSpeaking:]):
1464         (-[WKWebView validateUserInterfaceItem:]):
1465         (-[WKWebView goBack:]):
1466
1467 2015-11-03  Geoffrey Garen  <ggaren@apple.com>
1468
1469         Provide a way to turn off const in WebKit2.
1470
1471         Reviewed by Sam Weinig.
1472
1473         * Shared/WebProcessCreationParameters.cpp:
1474         (WebKit::WebProcessCreationParameters::encode):
1475         (WebKit::WebProcessCreationParameters::decode):
1476         * Shared/WebProcessCreationParameters.h:
1477         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1478         (WebKit::WebProcessPool::platformInitializeWebProcess):
1479         * WebProcess/WebProcess.cpp:
1480         (WebKit::WebProcess::initializeWebProcess):
1481
1482 2015-11-03  Alex Christensen  <achristensen@webkit.org>
1483
1484         Create a NetworkSession for each SessionID
1485         https://bugs.webkit.org/show_bug.cgi?id=150857
1486
1487         Reviewed by Anders Carlsson.
1488
1489         This patch renames SessionTracker::session to storageSession and makes a parallel
1490         structure for NetworkSessions.  NetworkSession and NetworkStorageSession should eventually
1491         become the same class in WebCore.  Because not everybody uses NetworkSessions yet,
1492         we keep them separate but created, destroyed, and managed together.
1493
1494         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1495         (WebKit::storageSession):
1496         * NetworkProcess/NetworkProcess.cpp:
1497         (WebKit::NetworkProcess::fetchWebsiteData):
1498         (WebKit::NetworkProcess::deleteWebsiteData):
1499         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
1500         * NetworkProcess/NetworkResourceLoader.cpp:
1501         (WebKit::NetworkResourceLoader::startNetworkLoad):
1502         (WebKit::NetworkResourceLoader::abort):
1503         * NetworkProcess/NetworkResourceLoader.h:
1504         * NetworkProcess/NetworkSession.h:
1505         (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
1506         (WebKit::NetworkDataTask::client):
1507         (WebKit::NetworkDataTask::clearClient):
1508         (WebKit::NetworkingDataTask::client): Deleted.
1509         (WebKit::NetworkingDataTask::clearClient): Deleted.
1510         (WebKit::NetworkSession::~NetworkSession): Deleted.
1511         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1512         (WebKit::configurationForType):
1513         (WebKit::defaultNetworkSession):
1514         (WebKit::NetworkSession::defaultSession):
1515         (WebKit::NetworkSession::NetworkSession):
1516         (WebKit::NetworkSession::~NetworkSession):
1517         (WebKit::NetworkSession::createDataTaskWithRequest):
1518         (WebKit::NetworkSession::dataTaskForIdentifier):
1519         (WebKit::NetworkDataTask::NetworkDataTask):
1520         (WebKit::NetworkDataTask::~NetworkDataTask):
1521         (WebKit::NetworkDataTask::cancel):
1522         (WebKit::NetworkDataTask::resume):
1523         (WebKit::NetworkDataTask::taskIdentifier):
1524         (WebKit::NetworkSession::create): Deleted.
1525         (WebKit::NetworkSession::singleton): Deleted.
1526         (WebKit::NetworkingDataTask::NetworkingDataTask): Deleted.
1527         (WebKit::NetworkingDataTask::~NetworkingDataTask): Deleted.
1528         (WebKit::NetworkingDataTask::suspend): Deleted.
1529         (WebKit::NetworkingDataTask::resume): Deleted.
1530         (WebKit::NetworkingDataTask::taskIdentifier): Deleted.
1531         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1532         (WebKit::RemoteNetworkingContext::storageSession):
1533         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
1534         * Shared/SessionTracker.cpp:
1535         (WebKit::staticStorageSessionMap):
1536         (WebKit::identifierBase):
1537         (WebKit::SessionTracker::storageSessionMap):
1538         (WebKit::SessionTracker::getIdentifierBase):
1539         (WebKit::SessionTracker::storageSession):
1540         (WebKit::staticSessionMap):
1541         (WebKit::SessionTracker::networkSession):
1542         (WebKit::SessionTracker::sessionID):
1543         (WebKit::SessionTracker::setSession):
1544         (WebKit::SessionTracker::destroySession):
1545         (WebKit::SessionTracker::sessionMap): Deleted.
1546         (WebKit::SessionTracker::session): Deleted.
1547         * Shared/SessionTracker.h:
1548         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1549         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
1550         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
1551         (WebKit::WebFrameNetworkingContext::storageSession):
1552         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
1553         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
1554         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
1555         (WebKit::WebFrameNetworkingContext::storageSession):
1556
1557 2015-11-03  Ryuan Choi  <ryuan.choi@navercorp.com>
1558
1559         [CoordinatedGraphics] invisible webview should not paint the content
1560         https://bugs.webkit.org/show_bug.cgi?id=150662
1561
1562         Reviewed by Darin Adler.
1563
1564         Suspend or resume the painting instead of just initializing m_isPaintingSuspended 
1565         for invisible webview not to paint the content until visibility is changed.
1566
1567         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
1568         (WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):
1569
1570 2015-11-03  Anders Carlsson  <andersca@apple.com>
1571
1572         Simplify -[_WKRemoteObjectRegistry _invokeMethod:]
1573         https://bugs.webkit.org/show_bug.cgi?id=150844
1574
1575         Reviewed by Tim Horton.
1576
1577         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
1578         (-[_WKRemoteObjectRegistry _invokeMethod:]):
1579         (-[_WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]): Deleted.
1580         * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
1581
1582 2015-11-02  Anders Carlsson  <andersca@apple.com>
1583
1584         CTTE the responsiveness timer getter
1585         https://bugs.webkit.org/show_bug.cgi?id=150825
1586
1587         Reviewed by Daniel Bates.
1588
1589         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
1590         (-[WKObservablePageState _webProcessIsResponsive]):
1591         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1592         (-[WKBrowsingContextController _webProcessIsResponsive]):
1593         * UIProcess/API/Cocoa/WKWebView.mm:
1594         (-[WKWebView _webProcessIsResponsive]):
1595         * UIProcess/WebPageProxy.cpp:
1596         (WebKit::WebPageProxy::reattachToWebProcessForReload):
1597         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
1598         (WebKit::WebPageProxy::tryClose):
1599         (WebKit::WebPageProxy::loadRequest):
1600         (WebKit::WebPageProxy::loadFile):
1601         (WebKit::WebPageProxy::loadData):
1602         (WebKit::WebPageProxy::loadHTMLString):
1603         (WebKit::WebPageProxy::loadAlternateHTMLString):
1604         (WebKit::WebPageProxy::loadPlainTextString):
1605         (WebKit::WebPageProxy::loadWebArchiveData):
1606         (WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick):
1607         (WebKit::WebPageProxy::stopLoading):
1608         (WebKit::WebPageProxy::reload):
1609         (WebKit::WebPageProxy::goForward):
1610         (WebKit::WebPageProxy::goBack):
1611         (WebKit::WebPageProxy::goToBackForwardItem):
1612         (WebKit::WebPageProxy::dispatchViewStateChange):
1613         (WebKit::WebPageProxy::handleMouseEvent):
1614         (WebKit::WebPageProxy::sendWheelEvent):
1615         (WebKit::WebPageProxy::handleKeyboardEvent):
1616         (WebKit::WebPageProxy::handleGestureEvent):
1617         (WebKit::WebPageProxy::handleTouchEventSynchronously):
1618         (WebKit::WebPageProxy::handleTouchEvent):
1619         (WebKit::WebPageProxy::closePage):
1620         (WebKit::WebPageProxy::runJavaScriptAlert):
1621         (WebKit::WebPageProxy::runJavaScriptConfirm):
1622         (WebKit::WebPageProxy::runJavaScriptPrompt):
1623         (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
1624         (WebKit::WebPageProxy::runOpenPanel):
1625         (WebKit::WebPageProxy::showPopupMenu):
1626         (WebKit::WebPageProxy::internalShowContextMenu):
1627         (WebKit::WebPageProxy::didReceiveEvent):
1628         (WebKit::WebPageProxy::stopResponsivenessTimer):
1629         (WebKit::WebPageProxy::runModal):
1630         (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
1631         * UIProcess/WebProcessProxy.h:
1632         (WebKit::WebProcessProxy::responsivenessTimer):
1633
1634 2015-11-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1635
1636         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.11.1 release.
1637
1638         * gtk/NEWS: Add release notes for 2.11.1.
1639
1640 2015-11-03  Alex Christensen  <achristensen@webkit.org>
1641
1642         Use the same cookie storage as WebCore when using NETWORK_SESSION
1643         https://bugs.webkit.org/show_bug.cgi?id=150833
1644
1645         Reviewed by Antti Koivisto.
1646
1647         This fixes 12 tests when using NETWORK_SESSION.
1648
1649         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1650         (WebKit::NetworkSession::NetworkSession):
1651
1652 2015-11-03  Alex Christensen  <achristensen@webkit.org>
1653
1654         Clean up NETWORK_SESSION code after r191848
1655         https://bugs.webkit.org/show_bug.cgi?id=150829
1656
1657         Reviewed by Darin Adler.
1658
1659         * NetworkProcess/NetworkResourceLoader.cpp:
1660         (WebKit::NetworkResourceLoader::didReceiveData):
1661         (WebKit::NetworkResourceLoader::didCompleteWithError):
1662         * NetworkProcess/NetworkSession.h:
1663         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1664         (WebKit::NetworkSession::NetworkSession):
1665         (WebKit::NetworkSession::createDataTaskWithRequest):
1666         (WebKit::NetworkSession::dataTaskForIdentifier):
1667
1668 2015-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1669
1670         Unreviewed. Fix GTK+ build after r191924.
1671
1672         * UIProcess/API/gtk/WebKitWebView.cpp:
1673
1674 2015-11-02  Alex Christensen  <achristensen@webkit.org>
1675
1676         Fix CMake build after r191922.
1677
1678         * PlatformMac.cmake:
1679
1680 2015-11-02  Andy Estes  <aestes@apple.com>
1681
1682         Try again to fix the iOS build.
1683
1684         * Shared/mac/PDFKitImports.mm:
1685
1686 2015-11-02  Tim Horton  <timothy_horton@apple.com>
1687
1688         Try to fix the iOS build
1689
1690         * Shared/mac/PDFKitImports.h:
1691
1692 2015-11-02  Tim Horton  <timothy_horton@apple.com>
1693
1694         Address a misssed review comment in r191922
1695
1696         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
1697         (WebKit::PDFPlugin::nextMatchForString):
1698
1699 2015-11-02  Anders Carlsson  <andersca@apple.com>
1700
1701         Add KVO-compliant _webProcessIsResponsive property to WKWebView and _WKObservablePageState
1702         https://bugs.webkit.org/show_bug.cgi?id=150818
1703         rdar://problem/22372131
1704
1705         Reviewed by Tim Horton.
1706
1707         * UIProcess/API/C/mac/WKPagePrivateMac.h:
1708         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
1709         (-[WKObservablePageState _webProcessIsResponsive]):
1710         * UIProcess/API/Cocoa/PageLoadStateObserver.h:
1711         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1712         (-[WKBrowsingContextController _webProcessIsResponsive]):
1713         * UIProcess/API/Cocoa/WKWebView.mm:
1714         (-[WKWebView _webProcessIsResponsive]):
1715         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1716         * UIProcess/Cocoa/NavigationState.h:
1717         * UIProcess/Cocoa/NavigationState.mm:
1718         (WebKit::NavigationState::willChangeWebProcessIsResponsive):
1719         (WebKit::NavigationState::didChangeWebProcessIsResponsive):
1720         * UIProcess/PageLoadState.cpp:
1721         (WebKit::PageLoadState::willChangeProcessIsResponsive):
1722         (WebKit::PageLoadState::didChangeProcessIsResponsive):
1723         * UIProcess/PageLoadState.h:
1724         * UIProcess/ResponsivenessTimer.cpp:
1725         (WebKit::ResponsivenessTimer::ResponsivenessTimer):
1726         (WebKit::ResponsivenessTimer::timerFired):
1727         (WebKit::ResponsivenessTimer::stop):
1728         * UIProcess/ResponsivenessTimer.h:
1729         * UIProcess/WebPageProxy.cpp:
1730         (WebKit::WebPageProxy::willChangeProcessIsResponsive):
1731         (WebKit::WebPageProxy::didChangeProcessIsResponsive):
1732         * UIProcess/WebPageProxy.h:
1733         * UIProcess/WebProcessProxy.cpp:
1734         (WebKit::WebProcessProxy::WebProcessProxy):
1735         (WebKit::WebProcessProxy::didBecomeUnresponsive):
1736         (WebKit::WebProcessProxy::didBecomeResponsive):
1737         (WebKit::WebProcessProxy::willChangeIsResponsive):
1738         (WebKit::WebProcessProxy::didChangeIsResponsive):
1739         * UIProcess/WebProcessProxy.h:
1740
1741 2015-11-02  Tim Horton  <timothy_horton@apple.com>
1742
1743         PDFPlugin should take advantage of threaded scrolling
1744         https://bugs.webkit.org/show_bug.cgi?id=150037
1745
1746         Reviewed by Anders Carlsson.
1747
1748         Duplicate PDFPlugin, creating PDFPlugin (the modern version), and
1749         DeprecatedPDFPlugin (containing the code that used to be in PDFPlugin
1750         prior to this patch).
1751
1752         The new PDFPlugin differs from the old one in a few significant ways,
1753         and we need to keep both alive for the time being. Significant differences
1754         include:
1755
1756         - PDFPlugin is no longer a ScrollableArea
1757         - PDFPlugin no longer hosts layers owned by PDFKit; instead, it draws
1758           into the page tiles, allowing WebCore's threaded scrolling to do its job
1759         - PDFPlugin now resizes itself to the size of the document
1760         - PDFPlugin doesn't handle zooming itself, it just delegates to the page
1761         - PDFLayerController has large and incompatible API changes
1762         - PDFPlugin now implements more of the HUD behavior, but it's still
1763           painted by PDFLayerController (into a view-relative PageOverlay)
1764
1765         [ File list elided because it's long and useless. ]
1766
1767 2015-11-02  Andy Estes  <aestes@apple.com>
1768
1769         [Cocoa] Add tvOS and watchOS to SUPPORTED_PLATFORMS
1770         https://bugs.webkit.org/show_bug.cgi?id=150819
1771
1772         Reviewed by Dan Bernstein.
1773
1774         This tells Xcode to include these platforms in its Devices dropdown, making it possible to build in the IDE.
1775
1776         * Configurations/Base.xcconfig:
1777
1778 2015-11-02  Anders Carlsson  <andersca@apple.com>
1779
1780         Begin work on supporting reply blocks in _WKRemoteObjectRegistry
1781         https://bugs.webkit.org/show_bug.cgi?id=150739
1782
1783         Reviewed by Tim Horton.
1784
1785         * Platform/spi/Cocoa/BlockSPI.h:
1786         Add SPI header.
1787
1788         * Shared/API/Cocoa/RemoteObjectInvocation.h:
1789         (WebKit::RemoteObjectInvocation::ReplyInfo::ReplyInfo):
1790         (WebKit::RemoteObjectInvocation::replyInfo):
1791         * Shared/API/Cocoa/RemoteObjectInvocation.mm:
1792         (WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
1793         (WebKit::RemoteObjectInvocation::encode):
1794         (WebKit::RemoteObjectInvocation::decode):
1795         Add an optional ReplyInfo struct to RemoteObjectInvocation.
1796
1797         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
1798         (generateReplyIdentifier):
1799         Helper function to generate a reply identifier.
1800
1801         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
1802         Do some block parameter validation.
1803
1804         * WebKit2.xcodeproj/project.pbxproj:
1805
1806 2015-11-02  Brent Fulgham  <bfulgham@apple.com>
1807
1808         [iOS] Another unreviewed sandbox update.
1809
1810         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Change copyright.
1811
1812 2015-11-02  Brent Fulgham  <bfulgham@apple.com>
1813
1814         [iOS] Unreviewed sandbox update.
1815
1816         Correcting copyright information.
1817
1818         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1819
1820 2015-11-02  Tim Horton  <timothy_horton@apple.com>
1821
1822         Get rid of WKWebView's inner WKView (WKView being inside WKWebView leads to weird API issues)
1823         https://bugs.webkit.org/show_bug.cgi?id=150174
1824
1825         Reviewed by Anders Carlsson.
1826
1827         * UIProcess/API/Cocoa/WKWebView.mm:
1828         (-[WKWebView initWithFrame:configuration:]):
1829         (-[WKWebView dealloc]):
1830         (-[WKWebView allowsLinkPreview]):
1831         (-[WKWebView setAllowsLinkPreview:]):
1832         (-[WKWebView acceptsFirstResponder]):
1833         (-[WKWebView becomeFirstResponder]):
1834         (-[WKWebView resignFirstResponder]):
1835         (-[WKWebView viewWillStartLiveResize]):
1836         (-[WKWebView viewDidEndLiveResize]):
1837         (-[WKWebView isFlipped]):
1838         (-[WKWebView intrinsicContentSize]):
1839         (-[WKWebView prepareContentInRect:]):
1840         (-[WKWebView setFrameSize:]):
1841         (-[WKWebView renewGState]):
1842         (-[WKWebView writeSelectionToPasteboard:types:]):
1843         (-[WKWebView centerSelectionInVisibleArea:]):
1844         (-[WKWebView validRequestorForSendType:returnType:]):
1845         (-[WKWebView readSelectionFromPasteboard:]):
1846         (-[WKWebView changeFont:]):
1847         (-[WKWebView validateUserInterfaceItem:]):
1848         (-[WKWebView startSpeaking:]):
1849         (-[WKWebView stopSpeaking:]):
1850         (-[WKWebView showGuessPanel:]):
1851         (-[WKWebView checkSpelling:]):
1852         (-[WKWebView changeSpelling:]):
1853         (-[WKWebView toggleContinuousSpellChecking:]):
1854         (-[WKWebView isGrammarCheckingEnabled]):
1855         (-[WKWebView setGrammarCheckingEnabled:]):
1856         (-[WKWebView toggleGrammarChecking:]):
1857         (-[WKWebView toggleAutomaticSpellingCorrection:]):
1858         (-[WKWebView orderFrontSubstitutionsPanel:]):
1859         (-[WKWebView toggleSmartInsertDelete:]):
1860         (-[WKWebView isAutomaticQuoteSubstitutionEnabled]):
1861         (-[WKWebView setAutomaticQuoteSubstitutionEnabled:]):
1862         (-[WKWebView toggleAutomaticQuoteSubstitution:]):
1863         (-[WKWebView isAutomaticDashSubstitutionEnabled]):
1864         (-[WKWebView setAutomaticDashSubstitutionEnabled:]):
1865         (-[WKWebView toggleAutomaticDashSubstitution:]):
1866         (-[WKWebView isAutomaticLinkDetectionEnabled]):
1867         (-[WKWebView setAutomaticLinkDetectionEnabled:]):
1868         (-[WKWebView toggleAutomaticLinkDetection:]):
1869         (-[WKWebView isAutomaticTextReplacementEnabled]):
1870         (-[WKWebView setAutomaticTextReplacementEnabled:]):
1871         (-[WKWebView toggleAutomaticTextReplacement:]):
1872         (-[WKWebView uppercaseWord:]):
1873         (-[WKWebView lowercaseWord:]):
1874         (-[WKWebView capitalizeWord:]):
1875         (-[WKWebView _wantsKeyDownForEvent:]):
1876         (-[WKWebView scrollWheel:]):
1877         (-[WKWebView swipeWithEvent:]):
1878         (-[WKWebView mouseMoved:]):
1879         (-[WKWebView mouseDown:]):
1880         (-[WKWebView mouseUp:]):
1881         (-[WKWebView mouseDragged:]):
1882         (-[WKWebView mouseEntered:]):
1883         (-[WKWebView mouseExited:]):
1884         (-[WKWebView otherMouseDown:]):
1885         (-[WKWebView otherMouseDragged:]):
1886         (-[WKWebView otherMouseUp:]):
1887         (-[WKWebView rightMouseDown:]):
1888         (-[WKWebView rightMouseDragged:]):
1889         (-[WKWebView rightMouseUp:]):
1890         (-[WKWebView pressureChangeWithEvent:]):
1891         (-[WKWebView acceptsFirstMouse:]):
1892         (-[WKWebView shouldDelayWindowOrderingForEvent:]):
1893         (-[WKWebView doCommandBySelector:]):
1894         (-[WKWebView insertText:]):
1895         (-[WKWebView insertText:replacementRange:]):
1896         (-[WKWebView inputContext]):
1897         (-[WKWebView performKeyEquivalent:]):
1898         (-[WKWebView keyUp:]):
1899         (-[WKWebView keyDown:]):
1900         (-[WKWebView flagsChanged:]):
1901         (-[WKWebView setMarkedText:selectedRange:replacementRange:]):
1902         (-[WKWebView unmarkText]):
1903         (-[WKWebView selectedRange]):
1904         (-[WKWebView hasMarkedText]):
1905         (-[WKWebView markedRange]):
1906         (-[WKWebView attributedSubstringForProposedRange:actualRange:]):
1907         (-[WKWebView characterIndexForPoint:]):
1908         (-[WKWebView firstRectForCharacterRange:actualRange:]):
1909         (-[WKWebView selectedRangeWithCompletionHandler:]):
1910         (-[WKWebView markedRangeWithCompletionHandler:]):
1911         (-[WKWebView hasMarkedTextWithCompletionHandler:]):
1912         (-[WKWebView attributedSubstringForProposedRange:completionHandler:]):
1913         (-[WKWebView firstRectForCharacterRange:completionHandler:]):
1914         (-[WKWebView characterIndexForPoint:completionHandler:]):
1915         (-[WKWebView validAttributesForMarkedText]):
1916         (-[WKWebView draggedImage:endedAt:operation:]):
1917         (-[WKWebView draggingEntered:]):
1918         (-[WKWebView draggingUpdated:]):
1919         (-[WKWebView draggingExited:]):
1920         (-[WKWebView prepareForDragOperation:]):
1921         (-[WKWebView performDragOperation:]):
1922         (-[WKWebView _hitTest:dragTypes:]):
1923         (-[WKWebView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
1924         (-[WKWebView viewWillMoveToWindow:]):
1925         (-[WKWebView viewDidMoveToWindow]):
1926         (-[WKWebView drawRect:]):
1927         (-[WKWebView isOpaque]):
1928         (-[WKWebView mouseDownCanMoveWindow]):
1929         (-[WKWebView viewDidHide]):
1930         (-[WKWebView viewDidUnhide]):
1931         (-[WKWebView viewDidChangeBackingProperties]):
1932         (-[WKWebView _activeSpaceDidChange:]):
1933         (-[WKWebView accessibilityFocusedUIElement]):
1934         (-[WKWebView accessibilityIsIgnored]):
1935         (-[WKWebView accessibilityHitTest:]):
1936         (-[WKWebView accessibilityAttributeValue:]):
1937         (-[WKWebView hitTest:]):
1938         (-[WKWebView conversationIdentifier]):
1939         (-[WKWebView quickLookWithEvent:]):
1940         (-[WKWebView addTrackingRect:owner:userData:assumeInside:]):
1941         (-[WKWebView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]):
1942         (-[WKWebView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]):
1943         (-[WKWebView removeTrackingRect:]):
1944         (-[WKWebView _removeTrackingRects:count:]):
1945         (-[WKWebView view:stringForToolTip:point:userData:]):
1946         (-[WKWebView pasteboardChangedOwner:]):
1947         (-[WKWebView pasteboard:provideDataForType:]):
1948         (-[WKWebView namesOfPromisedFilesDroppedAtDestination:]):
1949         (-[WKWebView wantsUpdateLayer]):
1950         (-[WKWebView updateLayer]):
1951         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
1952         (-[WKWebView allowsBackForwardNavigationGestures]):
1953         (-[WKWebView smartMagnifyWithEvent:]):
1954         (-[WKWebView setMagnification:centeredAtPoint:]):
1955         (-[WKWebView setMagnification:]):
1956         (-[WKWebView magnification]):
1957         (-[WKWebView setAllowsMagnification:]):
1958         (-[WKWebView allowsMagnification]):
1959         (-[WKWebView magnifyWithEvent:]):
1960         (-[WKWebView rotateWithEvent:]):
1961         (-[WKWebView _web_superInputContext]):
1962         (-[WKWebView _web_superQuickLookWithEvent:]):
1963         (-[WKWebView _web_superSwipeWithEvent:]):
1964         (-[WKWebView _web_superMagnifyWithEvent:]):
1965         (-[WKWebView _web_superSmartMagnifyWithEvent:]):
1966         (-[WKWebView _web_superRemoveTrackingRect:]):
1967         (-[WKWebView _web_superAccessibilityAttributeValue:]):
1968         (-[WKWebView _web_superDoCommandBySelector:]):
1969         (-[WKWebView _web_superPerformKeyEquivalent:]):
1970         (-[WKWebView _web_superKeyDown:]):
1971         (-[WKWebView _web_superHitTest:]):
1972         (-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
1973         (-[WKWebView _web_prepareForImmediateActionAnimation]):
1974         (-[WKWebView _web_cancelImmediateActionAnimation]):
1975         (-[WKWebView _web_completeImmediateActionAnimation]):
1976         (-[WKWebView _web_didChangeContentSize:]):
1977         (-[WKWebView _web_dismissContentRelativeChildWindows]):
1978         (-[WKWebView _web_dismissContentRelativeChildWindowsWithAnimation:]):
1979         (-[WKWebView _web_gestureEventWasNotHandledByWebCore:]):
1980         (-[WKWebView _setEditable:]):
1981         (-[WKWebView _remoteObjectRegistry]):
1982         (-[WKWebView _layoutMode]):
1983         (-[WKWebView _setLayoutMode:]):
1984         (-[WKWebView _setViewScale:]):
1985         (-[WKWebView _drawsTransparentBackground]):
1986         (-[WKWebView _setDrawsTransparentBackground:]):
1987         (-[WKWebView _inspectorAttachmentView]):
1988         (-[WKWebView _setInspectorAttachmentView:]):
1989         (-[WKWebView _windowOcclusionDetectionEnabled]):
1990         (-[WKWebView _setWindowOcclusionDetectionEnabled:]):
1991         (-[WKWebView _setOverrideDeviceScaleFactor:]):
1992         (-[WKWebView _overrideDeviceScaleFactor]):
1993         (-[WKWebView _setTopContentInset:]):
1994         (-[WKWebView _topContentInset]):
1995         (-[WKWebView _pageExtendedBackgroundColor]):
1996         (-[WKWebView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
1997         (-[WKWebView _setAutomaticallyAdjustsContentInsets:]):
1998         (-[WKWebView _automaticallyAdjustsContentInsets]):
1999         (-[WKWebView _setMinimumLayoutWidth:]):
2000         (-[WKWebView resizeSubviewsWithOldSize:]): Deleted.
2001         (-[WKWebView _ignoresNonWheelEvents]): Deleted.
2002         (-[WKWebView _setIgnoresNonWheelEvents:]): Deleted.
2003         (-[WKWebView _setIntrinsicContentSize:]): Deleted.
2004         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2005         * UIProcess/API/mac/WKView.mm:
2006         (-[WKView _web_superInputContext]):
2007         (-[WKView _web_superQuickLookWithEvent:]):
2008         (-[WKView _web_superSwipeWithEvent:]):
2009         (-[WKView _web_superMagnifyWithEvent:]):
2010         (-[WKView _web_superSmartMagnifyWithEvent:]):
2011         (-[WKView _web_superRemoveTrackingRect:]):
2012         (-[WKView _web_superAccessibilityAttributeValue:]):
2013         (-[WKView _web_superDoCommandBySelector:]):
2014         (-[WKView _web_superPerformKeyEquivalent:]):
2015         (-[WKView _web_superKeyDown:]):
2016         (-[WKView _web_superHitTest:]):
2017         (-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
2018         (-[WKView _web_prepareForImmediateActionAnimation]):
2019         (-[WKView _web_cancelImmediateActionAnimation]):
2020         (-[WKView _web_completeImmediateActionAnimation]):
2021         (-[WKView _web_didChangeContentSize:]):
2022         (-[WKView _web_dismissContentRelativeChildWindows]):
2023         (-[WKView _web_dismissContentRelativeChildWindowsWithAnimation:]):
2024         (-[WKView _web_gestureEventWasNotHandledByWebCore:]):
2025         (-[WKView _superInputContext]): Deleted.
2026         (-[WKView _superQuickLookWithEvent:]): Deleted.
2027         (-[WKView _superSwipeWithEvent:]): Deleted.
2028         (-[WKView _superMagnifyWithEvent:]): Deleted.
2029         (-[WKView _superSmartMagnifyWithEvent:]): Deleted.
2030         (-[WKView _superRemoveTrackingRect:]): Deleted.
2031         (-[WKView _superAccessibilityAttributeValue:]): Deleted.
2032         (-[WKView _superDoCommandBySelector:]): Deleted.
2033         (-[WKView _superPerformKeyEquivalent:]): Deleted.
2034         (-[WKView _superKeyDown:]): Deleted.
2035         (-[WKView _superHitTest:]): Deleted.
2036         (-[WKView _addFontPanelObserver]): Deleted.
2037         * UIProcess/API/mac/WKViewInternal.h:
2038         * UIProcess/Cocoa/WebViewImpl.h:
2039         * UIProcess/Cocoa/WebViewImpl.mm:
2040         (WebKit::WebViewImpl::hitTest):
2041         (WebKit::WebViewImpl::updateSecureInputState):
2042         (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
2043         (WebKit::WebViewImpl::executeSavedCommandBySelector):
2044         (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimation):
2045         (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly):
2046         (WebKit::WebViewImpl::quickLookWithEvent):
2047         (WebKit::WebViewImpl::prepareForImmediateActionAnimation):
2048         (WebKit::WebViewImpl::cancelImmediateActionAnimation):
2049         (WebKit::WebViewImpl::completeImmediateActionAnimation):
2050         (WebKit::WebViewImpl::didChangeContentSize):
2051         (WebKit::WebViewImpl::accessibilityAttributeValue):
2052         (WebKit::WebViewImpl::removeTrackingRect):
2053         (WebKit::WebViewImpl::swipeWithEvent):
2054         (WebKit::WebViewImpl::magnifyWithEvent):
2055         (WebKit::WebViewImpl::smartMagnifyWithEvent):
2056         (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCore):
2057         (WebKit::WebViewImpl::doCommandBySelector):
2058         (WebKit::WebViewImpl::inputContext):
2059         (WebKit::WebViewImpl::performKeyEquivalent):
2060         (WebKit::WebViewImpl::keyDown):
2061         * UIProcess/mac/PageClientImpl.mm:
2062         (WebKit::PageClientImpl::setDragImage):
2063         (WebKit::PageClientImpl::intrinsicContentSizeDidChange): Deleted.
2064         (WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult): Deleted.
2065         Plop.
2066
2067 2015-11-02  Anders Carlsson  <andersca@apple.com>
2068
2069         Remove unused API client callback code
2070         https://bugs.webkit.org/show_bug.cgi?id=150813
2071
2072         Reviewed by Tim Horton.
2073
2074         * UIProcess/API/APILoaderClient.h:
2075         (API::LoaderClient::interactionOccurredWhileProcessUnresponsive): Deleted.
2076         * UIProcess/API/C/WKPage.cpp:
2077         (WKPageSetPageLoaderClient): Deleted.
2078         * UIProcess/ResponsivenessTimer.cpp:
2079         (WebKit::ResponsivenessTimer::timerFired):
2080         * UIProcess/ResponsivenessTimer.h:
2081         * UIProcess/WebPageProxy.cpp:
2082         (WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive): Deleted.
2083         * UIProcess/WebPageProxy.h:
2084         * UIProcess/WebProcessProxy.cpp:
2085         (WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive): Deleted.
2086         * UIProcess/WebProcessProxy.h:
2087
2088 2015-10-31  Andy Estes  <aestes@apple.com>
2089
2090         Replace iOS-only WebKitSystemInterface calls with SPI
2091         https://bugs.webkit.org/show_bug.cgi?id=150763
2092
2093         Reviewed by Darin Adler.
2094
2095         * Platform/ios/AccessibilityIOS.h: Added.
2096         * Platform/ios/AccessibilityIOS.mm: Added.
2097         (WebKit::newAccessibilityRemoteToken): Upstreamed the implementation of WKAXRemoteToken() from WebKitSystemInterface.
2098         * Shared/WebPreferencesDefinitions.h: Used Settings::defaultMinimumZoomFontSize() instead of WKGetMinimumZoomFontSize().
2099         * Shared/WebPreferencesStore.cpp:
2100         * UIProcess/API/Cocoa/WKWebView.mm:
2101         (shouldAllowPictureInPictureMediaPlayback): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
2102         (-[WKWebView _takeViewSnapshot]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
2103         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2104         (-[WKWebViewConfiguration init]): Used deviceClass() instead of WKGetDeviceClass().
2105         * UIProcess/ios/WKContentView.mm:
2106         (-[WKContentView _commonInitializationWithProcessPool:configuration:]): Used screenScaleFactor() instead of WKGetScaleFactorForScreen().
2107         (-[WKContentView _updateForScreen:]): Ditto.
2108         (storeAccessibilityRemoteConnectionInformation): Upstreamed the implementation of WKAXStoreRemoteConnectionInformation() from WebKitSystemInterface.
2109         (-[WKContentView _accessibilityRegisterUIProcessTokens]): Used newAccessibilityRemoteToken() and storeAccessibilityRemoteConnectionInformation() instead of WKAXRemoteToken() and WKAXStoreRemoteConnectionInformation().
2110         * UIProcess/ios/WKContentViewInteraction.mm:
2111         * UIProcess/ios/WebPageProxyIOS.mm:
2112         (WebKit::WebPageProxy::screenSize): Used screenSize() instead of WKGetScreenSize().
2113         (WebKit::WebPageProxy::availableScreenSize): Used availableScreenSize() instead of WKGetAvailableScreenSize().
2114         (WebKit::WebPageProxy::textAutosizingWidth): Used screenSize() instead of WKGetScreenSize().
2115         * WebKit2.xcodeproj/project.pbxproj:
2116         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2117         (InitWebCoreSystemInterface): Deleted.
2118         * WebProcess/WebPage/ios/WebPageIOS.mm:
2119         (WebKit::WebPage::platformInitializeAccessibility): Used newAccessibilityRemoteToken() instead of WKAXRemoteToken().
2120
2121 2015-11-02  Commit Queue  <commit-queue@webkit.org>
2122
2123         Unreviewed, rolling out r191902.
2124         https://bugs.webkit.org/show_bug.cgi?id=150811
2125
2126         This change broke iOS builders (Requested by ryanhaddad on
2127         #webkit).
2128
2129         Reverted changeset:
2130
2131         "Replace iOS-only WebKitSystemInterface calls with SPI"
2132         https://bugs.webkit.org/show_bug.cgi?id=150763
2133         http://trac.webkit.org/changeset/191902
2134
2135 2015-10-31  Andy Estes  <aestes@apple.com>
2136
2137         Replace iOS-only WebKitSystemInterface calls with SPI
2138         https://bugs.webkit.org/show_bug.cgi?id=150763
2139
2140         Reviewed by Darin Adler.
2141
2142         * Platform/ios/AccessibilityIOS.h: Added.
2143         * Platform/ios/AccessibilityIOS.mm: Added.
2144         (WebKit::newAccessibilityRemoteToken): Upstreamed the implementation of WKAXRemoteToken() from WebKitSystemInterface.
2145         * Shared/WebPreferencesDefinitions.h: Used Settings::defaultMinimumZoomFontSize() instead of WKGetMinimumZoomFontSize().
2146         * Shared/WebPreferencesStore.cpp:
2147         * UIProcess/API/Cocoa/WKWebView.mm:
2148         (shouldAllowPictureInPictureMediaPlayback): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
2149         (-[WKWebView _takeViewSnapshot]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
2150         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2151         (-[WKWebViewConfiguration init]): Used deviceClass() instead of WKGetDeviceClass().
2152         * UIProcess/ios/WKContentView.mm:
2153         (-[WKContentView _commonInitializationWithProcessPool:configuration:]): Used screenScaleFactor() instead of WKGetScaleFactorForScreen().
2154         (-[WKContentView _updateForScreen:]): Ditto.
2155         (storeAccessibilityRemoteConnectionInformation): Upstreamed the implementation of WKAXStoreRemoteConnectionInformation() from WebKitSystemInterface.
2156         (-[WKContentView _accessibilityRegisterUIProcessTokens]): Used newAccessibilityRemoteToken() and storeAccessibilityRemoteConnectionInformation() instead of WKAXRemoteToken() and WKAXStoreRemoteConnectionInformation().
2157         * UIProcess/ios/WKContentViewInteraction.mm:
2158         * UIProcess/ios/WebPageProxyIOS.mm:
2159         (WebKit::WebPageProxy::screenSize): Used screenSize() instead of WKGetScreenSize().
2160         (WebKit::WebPageProxy::availableScreenSize): Used availableScreenSize() instead of WKGetAvailableScreenSize().
2161         (WebKit::WebPageProxy::textAutosizingWidth): Used screenSize() instead of WKGetScreenSize().
2162         * WebKit2.xcodeproj/project.pbxproj:
2163         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2164         (InitWebCoreSystemInterface): Deleted.
2165         * WebProcess/WebPage/ios/WebPageIOS.mm:
2166         (WebKit::WebPage::platformInitializeAccessibility): Used newAccessibilityRemoteToken() instead of WKAXRemoteToken().
2167
2168 2015-11-02  Yongjun Zhang  <yongjun_zhang@apple.com>
2169
2170         Add objC delegate callback for webProcessDidBecomeResponsive and webProcessDidBecomeUnresponsive.
2171         https://bugs.webkit.org/show_bug.cgi?id=150778
2172
2173         Add methods into WKNavigationDelegatePrivate to notify WebKit client when web process becomes unresponsive
2174         or responsive, which is reported by WebKit::ResponsivenessTimer.
2175
2176         Reviewed by Darin Adler.
2177
2178         * UIProcess/API/APINavigationClient.h: Add two new method processDidBecomeResponsive and processDidBecomeUnresponsive
2179             to NavigationClient; they are called when WebKit::ResponsivenessTimer update its client's state.
2180         (API::NavigationClient::processDidBecomeResponsive):
2181         (API::NavigationClient::processDidBecomeUnresponsive):
2182         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Add two new delegate method to WKNavigationDelegatePrivate:
2183             _webViewWebProcessDidBecomeResponsive: and _webViewWebProcessDidBecomeUnresponsive:
2184         * UIProcess/Cocoa/NavigationState.h: Add new overriding methods processDidBecomeResponsive and processDidBecomeUnresponsive.
2185             Also add a bool member for each method to indicate if the delegate has implement the related method.
2186         * UIProcess/Cocoa/NavigationState.mm:
2187         (WebKit::NavigationState::setNavigationDelegate): Update the new bool members based on the delegate.
2188         (WebKit::NavigationState::NavigationClient::processDidBecomeResponsive): Send the delegate message to navigationDelegate
2189             if _webViewWebProcessDidBecomeResponsive: is implemented.
2190         (WebKit::NavigationState::NavigationClient::processDidBecomeUnresponsive): Ditto.
2191         * UIProcess/WebPageProxy.cpp:
2192         (WebKit::WebPageProxy::processDidBecomeUnresponsive): Call navigationClient's processDidBecomeUnresponsive if the page proxy
2193             has navigationClient.
2194         (WebKit::WebPageProxy::processDidBecomeResponsive):  Call navigationClient's processDidBecomeResponsive if the page proxy
2195             has navigationClient.
2196
2197 2015-11-02  Beth Dakin  <bdakin@apple.com>
2198
2199         Tapping and holding a link should have a share option
2200         https://bugs.webkit.org/show_bug.cgi?id=150693
2201
2202         Reviewed by Dan Bernstein.
2203
2204         This is a follow-up to the original change. This change fixes non-ascii URLs. 
2205         They should maintain their non-ascii characters when they are shared.
2206
2207         * UIProcess/ios/WKContentViewInteraction.mm:
2208         (-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
2209         * UIProcess/ios/WKPDFView.mm:
2210         (-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):
2211
2212 2015-11-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2213
2214         Rename JSDOMWrapper.impl to JSDOMWrapper.wrapped
2215         https://bugs.webkit.org/show_bug.cgi?id=150613
2216
2217         Reviewed by Darin Adler.
2218
2219         * WebProcess/WebPage/WebFrame.cpp:
2220         (WebKit::WebFrame::frameForContext): Renaming impl() to wrapped().
2221         (WebKit::WebFrame::counterValue): Ditto.
2222
2223 2015-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2224
2225         [GLIB] Remove support for GSocket main loop sources from GMainLoopSource
2226         https://bugs.webkit.org/show_bug.cgi?id=150772
2227
2228         Reviewed by Žan Doberšek.
2229
2230         Add GSocketMonitor class to be used by Connection to monitor the
2231         availability of the socket file descriptor instead of using a
2232         GMainLoopSource.
2233
2234         * Platform/IPC/Connection.h:
2235         * Platform/IPC/glib/GSocketMonitor.cpp: Added.
2236         (IPC::GSocketMonitor::~GSocketMonitor):
2237         (IPC::GSocketMonitor::socketSourceCallback):
2238         (IPC::GSocketMonitor::start):
2239         (IPC::GSocketMonitor::stop):
2240         * Platform/IPC/glib/GSocketMonitor.h: Added.
2241         * Platform/IPC/unix/ConnectionUnix.cpp:
2242         (IPC::Connection::platformInvalidate):
2243         (IPC::Connection::open):
2244         * PlatformGTK.cmake:
2245
2246 2015-11-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2247
2248         [GTK] Use RunLoop in WorkQueue implementation
2249         https://bugs.webkit.org/show_bug.cgi?id=150770
2250
2251         Reviewed by Darin Adler.
2252
2253         * Platform/IPC/unix/ConnectionUnix.cpp:
2254         (IPC::Connection::open): Get the main context from the WorkQueue Runloop.
2255
2256 2015-11-01  Yusuke Suzuki  <utatane.tea@gmail.com>
2257
2258         [ES6] Support Generator Syntax
2259         https://bugs.webkit.org/show_bug.cgi?id=150769
2260
2261         Reviewed by Geoffrey Garen.
2262
2263         Added ENABLE_ES6_GENERATORS flag.
2264
2265         * Configurations/FeatureDefines.xcconfig:
2266
2267 2015-11-01  Brent Fulgham  <bfulgham@apple.com>
2268
2269         Use convenience function in sandbox profile
2270         https://bugs.webkit.org/show_bug.cgi?id=150732
2271         <rdar://problem/23287894>
2272
2273         Reviewed by Alexey Proskuryakov.
2274
2275         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Switch to
2276         the 'awd-log-directory' convenience function.
2277
2278 2015-11-01  Joonghun Park  <jh718.park@samsung.com>
2279
2280         [EFL] Fix inappropriate move semantics use in parseAndRemoveEnvironments function
2281         https://bugs.webkit.org/show_bug.cgi?id=150544
2282
2283         Reviewed by Darin Adler.
2284
2285         In parseAndRemoveEnvironments function, it declares its paramerter type as rvalue.
2286         But in ProcessLauncher::launchProcess(), the argument of
2287         parseAndRemoveEnvironments still be used after the call of the function.
2288         Currently the rvalue is not assigned to any other variable in parseAndRemoveEnvironments,
2289         so it doesn't lead to runtime error but use of move semantic
2290         is not appropriate semantically in this case.
2291
2292         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
2293         (WebKit::parseAndRemoveEnvironments):
2294         (WebKit::ProcessLauncher::launchProcess):
2295
2296 2015-11-01  Commit Queue  <commit-queue@webkit.org>
2297
2298         Unreviewed, rolling out r191831.
2299         https://bugs.webkit.org/show_bug.cgi?id=150774
2300
2301         The new test fails (Requested by ap on #webkit).
2302
2303         Reverted changeset:
2304
2305         "Begin work on supporting reply blocks in
2306         _WKRemoteObjectRegistry"
2307         https://bugs.webkit.org/show_bug.cgi?id=150739
2308         http://trac.webkit.org/changeset/191831
2309
2310 2015-11-01  Philip Chimento  <philip.chimento@gmail.com>
2311
2312         [GTK] Fix combinations of PLATFORM(GTK) and OS(DARWIN)
2313         https://bugs.webkit.org/show_bug.cgi?id=144560
2314
2315         Reviewed by Darin Adler.
2316
2317         * NetworkProcess/NetworkProcess.cpp:
2318         (WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
2319         Change order of OS(DARWIN) and USE(UNIX_DOMAIN_SOCKETS) checks,
2320         so that we can use Unix domain sockets even on Darwin for the GTK
2321         platform.
2322         * Platform/IPC/Attachment.cpp: Add USE(UNIX_DOMAIN_SOCKETS) check
2323         to OS(DARWIN) check, in order to support GTK platform on OSX.
2324         * Platform/IPC/Attachment.h: Change order of OS(DARWIN) and
2325         USE(UNIX_DOMAIN_SOCKETS) checks throughout.
2326         (IPC::Attachment::size):
2327         (IPC::Attachment::releaseFileDescriptor):
2328         (IPC::Attachment::fileDescriptor):
2329         (IPC::Attachment::disposition):
2330         (IPC::Attachment::port): 
2331         * Platform/IPC/Connection.h: Ditto.
2332         (IPC::Connection::identifierIsNull):
2333         (IPC::Connection::Identifier::Identifier): 
2334         (IPC::Connection::xpcConnection): 
2335         * Platform/IPC/unix/ConnectionUnix.cpp: Only use SOCK_SEQPACKET
2336         if the platform is not GTK, because otherwise the PLATFORM(GTK)
2337         check below is never reached.
2338         * Platform/SharedMemory.h: Change order of OS(DARWIN) and
2339         USE(UNIX_DOMAIN_SOCKETS) checks.
2340         * PluginProcess/PluginProcess.cpp: Ditto.
2341         (WebKit::PluginProcess::createWebProcessConnection):
2342         * Shared/API/c/WKBase.h: Don't include WKBaseMac.h if building
2343         GTK.
2344         * UIProcess/API/C/WKNativeEvent.h: Don't use Apple API if
2345         building GTK.
2346         * UIProcess/Launcher/ProcessLauncher.cpp: Change to
2347         OS(DARWIN) && !PLATFORM(GTK), in the absence of a better platform
2348         macro such as USE(MACH).
2349         (WebKit::ProcessLauncher::didFinishLaunchingProcess):
2350         * UIProcess/Launcher/ProcessLauncher.h: Ditto.
2351         * UIProcess/Network/NetworkProcessProxy.cpp: Change order of
2352         OS(DARWIN) and PLATFORM(GTK) checks.
2353         (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
2354         (WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess):
2355         * UIProcess/Plugins/PluginProcessProxy.cpp: Ditto.
2356         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
2357         (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
2358         * WebProcess/Plugins/PluginProcessConnectionManager.cpp: Ditto.
2359         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
2360         * WebProcess/WebPage/WebInspector.cpp: Ditto.
2361         (WebKit::WebInspector::createInspectorPage):
2362         * WebProcess/WebPage/WebInspectorUI.cpp: Ditto.
2363         (WebKit::WebInspectorUI::establishConnection):
2364         * WebProcess/WebProcess.cpp: Ditto.
2365         (WebKit::WebProcess::ensureNetworkProcessConnection):
2366
2367 2015-11-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2368
2369         [GTK] Use RunLoop::Timer in PluginInfoCache
2370         https://bugs.webkit.org/show_bug.cgi?id=150757
2371
2372         Reviewed by Darin Adler.
2373
2374         Use RunLoop::Timer instead of GMainLoopSource to save the cache
2375         contents in an idle. Also remove the mutex, since RunLoop::Timer
2376         is thread safe and saveToFile() is private and only called by the
2377         main thread loop. Also removed the code to save the file in the
2378         destructor since PluginInfoCache is a singleton and never
2379         destroyed. It's very unlikely that the program finished before the
2380         cache is saved, but even if that happens it would be harmless, the
2381         cache will be saved at some point the next time.
2382
2383         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
2384         (WebKit::PluginInfoCache::PluginInfoCache):
2385         (WebKit::PluginInfoCache::updatePluginInfo):
2386         (WebKit::PluginInfoCache::~PluginInfoCache):
2387         (WebKit::PluginInfoCache::saveToFile):
2388         * UIProcess/Plugins/gtk/PluginInfoCache.h:
2389
2390 2015-11-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2391
2392         [GTK] Use a RunLoop::Timer to schedule rendering frames in accelerated compositing mode
2393         https://bugs.webkit.org/show_bug.cgi?id=150756
2394
2395         Reviewed by Darin Adler.
2396
2397         Use a RunLoop::Timer instead of a GMainLoopSource for the
2398         accelerated compositing render loop to improve the performance,
2399         since RunLoop::Timer uses a persistent source.
2400         All the logic to schedule rames has been moved to a helper
2401         internal class RenderFrameScheduler.
2402
2403         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2404         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::RenderFrameScheduler):
2405         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::~RenderFrameScheduler):
2406         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::start):
2407         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::stop):
2408         (WebKit::shouldSkipNextFrameBecauseOfContinousImmediateFlushes):
2409         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::nextFrame):
2410         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::renderFrame):
2411         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
2412         (WebKit::LayerTreeHostGtk::renderFrame):
2413         (WebKit::LayerTreeHostGtk::scheduleLayerFlush):
2414         (WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
2415         (WebKit::LayerTreeHostGtk::layerFlushTimerFired): Deleted.
2416         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2417
2418 2015-10-31  Andreas Kling  <akling@apple.com>
2419
2420         Add a debug overlay with information about web process resource usage.
2421         <https://webkit.org/b/150599>
2422
2423         Reviewed by Darin Adler.
2424
2425         Add WK2 preferences SPI for showing/hiding the resource usage overlay.
2426
2427         * Shared/WebPreferencesDefinitions.h:
2428         * UIProcess/API/C/WKPreferences.cpp:
2429         (WKPreferencesSetResourceUsageOverlayVisible):
2430         (WKPreferencesGetResourceUsageOverlayVisible):
2431         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2432         * UIProcess/API/Cocoa/WKPreferences.mm:
2433         (-[WKPreferences _resourceUsageOverlayVisible]):
2434         (-[WKPreferences _setResourceUsageOverlayVisible:]):
2435         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2436         * WebProcess/WebPage/WebPage.cpp:
2437         (WebKit::WebPage::updatePreferences):
2438
2439 2015-10-31  Alex Christensen  <achristensen@webkit.org>
2440
2441         Share more code between NETWORK_SESSION and non-NETWORK_SESSION NetworkResourceLoaders
2442         https://bugs.webkit.org/show_bug.cgi?id=150742
2443
2444         Reviewed by Darin Adler.
2445
2446         r191457 added enough code to NetworkResourceLoader to load most resources successfully if there are no errors.
2447         It passed about 80% of LayoutTests/http and crashed sometimes.
2448         This passes about 95% of LayoutTests/http and does not crash on any of the LayoutTests/http.
2449         It should not change behavior of the non-NETWORK_SESSION code which is currently the default in trunk.
2450
2451         * NetworkProcess/NetworkResourceLoader.cpp:
2452         (WebKit::NetworkResourceLoader::abort):
2453         (WebKit::NetworkResourceLoader::sharedDidReceiveResponse):
2454         (WebKit::NetworkResourceLoader::sharedDidReceiveBuffer):
2455         (WebKit::NetworkResourceLoader::sharedDidFinishLoading):
2456         (WebKit::NetworkResourceLoader::sharedDidFail):
2457         (WebKit::NetworkResourceLoader::sharedWillSendRedirectedRequest):
2458         (WebKit::NetworkResourceLoader::willPerformHTTPRedirection):
2459         (WebKit::NetworkResourceLoader::didReceiveChallenge):
2460         (WebKit::NetworkResourceLoader::didReceiveResponse):
2461         (WebKit::NetworkResourceLoader::didReceiveData):
2462         (WebKit::NetworkResourceLoader::didCompleteWithError):
2463         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2464         (WebKit::NetworkResourceLoader::didReceiveBuffer):
2465         (WebKit::NetworkResourceLoader::didFinishLoading):
2466         (WebKit::NetworkResourceLoader::didFail):
2467         (WebKit::NetworkResourceLoader::willSendRequestAsync):
2468         * NetworkProcess/NetworkResourceLoader.h:
2469         * NetworkProcess/NetworkSession.h:
2470         (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
2471
2472 2015-10-28  Wenson Hsieh  <wenson_hsieh@apple.com>
2473
2474         Inner height behavior when the keyboard is shown should match on WKWebView and MobileSafari
2475         https://bugs.webkit.org/show_bug.cgi?id=150634
2476         <rdar://problem/23202254>
2477
2478         Reviewed by Benjamin Poulain.
2479
2480         Make WKWebView match behavior in Safari by not firing resize events and changing the inner height when showing
2481         or hiding the keyboard. Previously, the WKWebView would do both of the above because we use the scroll view's
2482         contentInset property when no unobscured insets are explicitly set for the WKWebView. To fix this, when updating
2483         the visible content rect of a WKWebView for computing the inner height, we readjust the computed bottom inset
2484         to not take the keyboard height into account. To know how much we need to readjust the inset by, we store the
2485         total amount by which the scroll view's bottom inset has been adjusted due to the keyboard.
2486
2487         We perform this readjustment in _updateVisibleContentRects rather than in _computedContentInset since some users
2488         of _computedContentInset may still expect the bottom inset to account for the keyboard height. However, when
2489         updating visible content rects, we should not account for the keyboard height since we don't want the inner height
2490         to change when showing or hiding the keyboard.
2491
2492         Lastly, while calling _adjustForAutomaticKeyboardInfo, we may end up calling _updateVisibleContentRects. This call
2493         is unnecessary since we call it again immediately after _adjustForAutomaticKeyboardInfo, and it also complicates
2494         the readjustment logic, so it makes sense to prevent the update from happening altogether while we are adjusting
2495         the scroll view's insets due to keyboard changes. Altogether, these changes mean that the computed inner height
2496         will no longer be adjusted for the keyboard height on WKWebViews, matching the behavior observed on mobile Safari.
2497
2498         Test: LayoutTests/fast/events/ios/keyboard-should-not-trigger-resize.html
2499
2500         * UIProcess/API/Cocoa/WKWebView.mm:
2501         (-[WKWebView _updateVisibleContentRects]):
2502         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
2503
2504 2015-10-30  Anders Carlsson  <andersca@apple.com>
2505
2506         Begin work on supporting reply blocks in _WKRemoteObjectRegistry
2507         https://bugs.webkit.org/show_bug.cgi?id=150739
2508
2509         Reviewed by Tim Horton.
2510
2511         * Platform/spi/Cocoa/BlockSPI.h:
2512         Add SPI header.
2513
2514         * Shared/API/Cocoa/RemoteObjectInvocation.h:
2515         (WebKit::RemoteObjectInvocation::ReplyInfo::ReplyInfo):
2516         (WebKit::RemoteObjectInvocation::replyInfo):
2517         * Shared/API/Cocoa/RemoteObjectInvocation.mm:
2518         (WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
2519         (WebKit::RemoteObjectInvocation::encode):
2520         (WebKit::RemoteObjectInvocation::decode):
2521         Add an optional ReplyInfo struct to RemoteObjectInvocation.
2522
2523         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
2524         (generateReplyIdentifier):
2525         Helper function to generate a reply identifier.
2526
2527         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
2528         Do some block parameter validation.
2529
2530         * WebKit2.xcodeproj/project.pbxproj:
2531
2532 2015-10-30  Beth Dakin  <bdakin@apple.com>
2533
2534         Link preview doesn't work on XHTML pages with Content-Type header as 
2535         ‘application/xhtml+xml’
2536         https://bugs.webkit.org/show_bug.cgi?id=150740
2537         -and corresponding-
2538         rdar://problem/23063585
2539
2540         Reviewed by Tim Horton.
2541
2542         For XHTML pages, the element names are lowercase. This patch uses 
2543         equalIgnoringCase to fix the bug.
2544         * UIProcess/ios/WKContentViewInteraction.mm:
2545         (-[WKContentView _actionForLongPress]):
2546         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
2547         (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
2548
2549 2015-10-30  Tim Horton  <timothy_horton@apple.com>
2550
2551         WKView being inside WKWebView leads to weird API issues
2552         https://bugs.webkit.org/show_bug.cgi?id=150174
2553
2554         Reviewed by Anders Carlsson.
2555
2556         * UIProcess/API/mac/WKView.mm:
2557         (-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
2558         (-[WKView prepareContentInRect:]):
2559         (-[WKView initWithFrame:processPool:configuration:webView:]):
2560         (-[WKView pageRef]):
2561         (-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
2562         (-[WKView dealloc]): Deleted.
2563         * UIProcess/Cocoa/WebViewImpl.h:
2564         (WebKit::WebViewImpl::page):
2565         * UIProcess/Cocoa/WebViewImpl.mm:
2566         (-[WKWindowVisibilityObserver initWithView:impl:]):
2567         (-[WKWindowVisibilityObserver dealloc]):
2568         (-[WKWindowVisibilityObserver _activeSpaceDidChange:]):
2569         (WebKit::WebViewImpl::WebViewImpl):
2570         (WebKit::WebViewImpl::~WebViewImpl):
2571         (WebKit::WebViewImpl::setDrawsBackground):
2572         (WebKit::WebViewImpl::drawsBackground):
2573         (WebKit::WebViewImpl::setDrawsTransparentBackground):
2574         (WebKit::WebViewImpl::drawsTransparentBackground):
2575         (WebKit::WebViewImpl::isOpaque):
2576         (WebKit::WebViewImpl::acceptsFirstMouse):
2577         (WebKit::WebViewImpl::becomeFirstResponder):
2578         (WebKit::WebViewImpl::resignFirstResponder):
2579         (WebKit::WebViewImpl::viewWillStartLiveResize):
2580         (WebKit::WebViewImpl::viewDidEndLiveResize):
2581         (WebKit::WebViewImpl::updateWindowAndViewFrames):
2582         (WebKit::WebViewImpl::setFixedLayoutSize):
2583         (WebKit::WebViewImpl::fixedLayoutSize):
2584         (WebKit::WebViewImpl::isUsingUISideCompositing):
2585         (WebKit::WebViewImpl::setDrawingAreaSize):
2586         (WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate):
2587         (WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate):
2588         (WebKit::WebViewImpl::updateLayer):
2589         (WebKit::WebViewImpl::drawRect):
2590         (WebKit::WebViewImpl::dispatchSetTopContentInset):
2591         (WebKit::WebViewImpl::prepareContentInRect):
2592         (WebKit::WebViewImpl::updateViewExposedRect):
2593         (WebKit::WebViewImpl::setMinimumSizeForAutoLayout):
2594         (WebKit::WebViewImpl::minimumSizeForAutoLayout):
2595         (WebKit::WebViewImpl::setShouldExpandToViewHeightForAutoLayout):
2596         (WebKit::WebViewImpl::shouldExpandToViewHeightForAutoLayout):
2597         (WebKit::WebViewImpl::setIntrinsicContentSize):
2598         (WebKit::WebViewImpl::setViewScale):
2599         (WebKit::WebViewImpl::viewScale):
2600         (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
2601         (WebKit::WebViewImpl::setOverrideDeviceScaleFactor):
2602         (WebKit::WebViewImpl::windowDidOrderOffScreen):
2603         (WebKit::WebViewImpl::windowDidOrderOnScreen):
2604         (WebKit::WebViewImpl::windowDidBecomeKey):
2605         (WebKit::WebViewImpl::windowDidResignKey):
2606         (WebKit::WebViewImpl::windowDidMiniaturize):
2607         (WebKit::WebViewImpl::windowDidDeminiaturize):
2608         (WebKit::WebViewImpl::windowDidChangeBackingProperties):
2609         (WebKit::WebViewImpl::windowDidChangeScreen):
2610         (WebKit::WebViewImpl::windowDidChangeLayerHosting):
2611         (WebKit::WebViewImpl::windowDidChangeOcclusionState):
2612         (WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
2613         (WebKit::WebViewImpl::windowResizeMouseLocationIsInVisibleScrollerThumb):
2614         (WebKit::WebViewImpl::viewDidMoveToWindow):
2615         (WebKit::WebViewImpl::viewDidChangeBackingProperties):
2616         (WebKit::WebViewImpl::viewDidHide):
2617         (WebKit::WebViewImpl::viewDidUnhide):
2618         (WebKit::WebViewImpl::activeSpaceDidChange):
2619         (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
2620         (WebKit::WebViewImpl::setUnderlayColor):
2621         (WebKit::WebViewImpl::underlayColor):
2622         (WebKit::WebViewImpl::pageExtendedBackgroundColor):
2623         (WebKit::WebViewImpl::setOverlayScrollbarStyle):
2624         (WebKit::WebViewImpl::overlayScrollbarStyle):
2625         (WebKit::WebViewImpl::endDeferringViewInWindowChanges):
2626         (WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
2627         (WebKit::WebViewImpl::prepareForMoveToWindow):
2628         (WebKit::WebViewImpl::updateSecureInputState):
2629         (WebKit::WebViewImpl::setPluginComplexTextInputState):
2630         (WebKit::WebViewImpl::handlePluginComplexTextInputKeyDown):
2631         (WebKit::WebViewImpl::handleAcceptedAlternativeText):
2632         (WebKit::WebViewImpl::pressureChangeWithEvent):
2633         (WebKit::WebViewImpl::isEditable):
2634         (WebKit::WebViewImpl::executeEditCommandForSelector):
2635         (WebKit::WebViewImpl::writeSelectionToPasteboard):
2636         (WebKit::WebViewImpl::readSelectionFromPasteboard):
2637         (WebKit::WebViewImpl::validRequestorForSendAndReturnTypes):
2638         (WebKit::WebViewImpl::centerSelectionInVisibleArea):
2639         (WebKit::WebViewImpl::updateFontPanelIfNeeded):
2640         (WebKit::WebViewImpl::changeFontFromFontPanel):
2641         (WebKit::WebViewImpl::validateUserInterfaceItem):
2642         (WebKit::WebViewImpl::startSpeaking):
2643         (WebKit::WebViewImpl::showGuessPanel):
2644         (WebKit::WebViewImpl::checkSpelling):
2645         (WebKit::WebViewImpl::changeSpelling):
2646         (WebKit::WebViewImpl::toggleContinuousSpellChecking):
2647         (WebKit::WebViewImpl::setGrammarCheckingEnabled):
2648         (WebKit::WebViewImpl::toggleGrammarChecking):
2649         (WebKit::WebViewImpl::toggleAutomaticSpellingCorrection):
2650         (WebKit::WebViewImpl::toggleSmartInsertDelete):
2651         (WebKit::WebViewImpl::setAutomaticQuoteSubstitutionEnabled):
2652         (WebKit::WebViewImpl::toggleAutomaticQuoteSubstitution):
2653         (WebKit::WebViewImpl::setAutomaticDashSubstitutionEnabled):
2654         (WebKit::WebViewImpl::toggleAutomaticDashSubstitution):
2655         (WebKit::WebViewImpl::setAutomaticLinkDetectionEnabled):
2656         (WebKit::WebViewImpl::toggleAutomaticLinkDetection):
2657         (WebKit::WebViewImpl::setAutomaticTextReplacementEnabled):
2658         (WebKit::WebViewImpl::toggleAutomaticTextReplacement):
2659         (WebKit::WebViewImpl::uppercaseWord):
2660         (WebKit::WebViewImpl::lowercaseWord):
2661         (WebKit::WebViewImpl::capitalizeWord):
2662         (WebKit::WebViewImpl::preferencesDidChange):
2663         (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):
2664         (WebKit::WebViewImpl::quickLookWithEvent):
2665         (WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResult):
2666         (WebKit::WebViewImpl::didChangeContentSize):
2667         (WebKit::WebViewImpl::setIgnoresNonWheelEvents):
2668         (WebKit::WebViewImpl::updateRemoteAccessibilityRegistration):
2669         (WebKit::WebViewImpl::accessibilityRegisterUIProcessTokens):
2670         (WebKit::WebViewImpl::stringForToolTip):
2671         (WebKit::WebViewImpl::setInspectorAttachmentView):
2672         (WebKit::WebViewImpl::remoteObjectRegistry):
2673         (WebKit::WebViewImpl::browsingContextController):
2674         (WebKit::WebViewImpl::draggedImage):
2675         (WebKit::WebViewImpl::draggingEntered):
2676         (WebKit::WebViewImpl::draggingUpdated):
2677         (WebKit::WebViewImpl::draggingExited):
2678         (WebKit::WebViewImpl::performDragOperation):
2679         (WebKit::WebViewImpl::takeViewSnapshot):
2680         (WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
2681         (WebKit::WebViewImpl::saveBackForwardSnapshotForItem):
2682         (WebKit::WebViewImpl::setAllowsBackForwardNavigationGestures):
2683         (WebKit::WebViewImpl::setMagnification):
2684         (WebKit::WebViewImpl::magnification):
2685         (WebKit::WebViewImpl::scrollWheel):
2686         (WebKit::WebViewImpl::swipeWithEvent):
2687         (WebKit::WebViewImpl::magnifyWithEvent):
2688         (WebKit::WebViewImpl::rotateWithEvent):
2689         (WebKit::WebViewImpl::doCommandBySelector):
2690         (WebKit::WebViewImpl::insertText):
2691         (WebKit::WebViewImpl::selectedRangeWithCompletionHandler):
2692         (WebKit::WebViewImpl::markedRangeWithCompletionHandler):
2693         (WebKit::WebViewImpl::hasMarkedTextWithCompletionHandler):
2694         (WebKit::WebViewImpl::attributedSubstringForProposedRange):
2695         (WebKit::WebViewImpl::firstRectForCharacterRange):
2696         (WebKit::WebViewImpl::characterIndexForPoint):
2697         (WebKit::WebViewImpl::inputContext):
2698         (WebKit::WebViewImpl::unmarkText):
2699         (WebKit::WebViewImpl::setMarkedText):
2700         (WebKit::WebViewImpl::performKeyEquivalent):
2701         (WebKit::WebViewImpl::keyUp):
2702         (WebKit::WebViewImpl::keyDown):
2703         (WebKit::WebViewImpl::flagsChanged):
2704         (WebKit::WebViewImpl::executeSavedKeypressCommands):
2705         (WebKit::WebViewImpl::selectedRange):
2706         (WebKit::WebViewImpl::hasMarkedText):
2707         (WebKit::WebViewImpl::markedRange):
2708         (WebKit::WebViewImpl::setContentPreparationRect): Deleted.
2709         (WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResultFromViewOnly): Deleted.
2710         (WebKit::WebViewImpl::destroyRemoteObjectRegistry): Deleted.
2711         * UIProcess/WebPageProxy.h:
2712         (WebKit::WebPageProxy::scrollPinningBehavior):
2713         (WebKit::WebPageProxy::overlayScrollbarStyle):
2714         * UIProcess/WebProcessPool.cpp:
2715         (WebKit::WebProcessPool::createWebPage):
2716         * UIProcess/WebProcessPool.h:
2717         * UIProcess/mac/PageClientImpl.h:
2718         * UIProcess/mac/PageClientImpl.mm:
2719         (WebKit::PageClientImpl::PageClientImpl):
2720         (WebKit::PageClientImpl::createDrawingAreaProxy):
2721         (WebKit::PageClientImpl::viewSize):
2722         (WebKit::PageClientImpl::activeView):
2723         (WebKit::PageClientImpl::activeWindow):
2724         (WebKit::PageClientImpl::isViewFocused):
2725         (WebKit::PageClientImpl::makeFirstResponder):
2726         (WebKit::PageClientImpl::isViewVisible):
2727         (WebKit::PageClientImpl::colorSpace):
2728         (WebKit::PageClientImpl::processDidExit):
2729         (WebKit::PageClientImpl::pageClosed):
2730         (WebKit::PageClientImpl::didRelaunchProcess):
2731         (WebKit::PageClientImpl::preferencesDidChange):
2732         (WebKit::PageClientImpl::toolTipChanged):
2733         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
2734         (WebKit::PageClientImpl::didChangeContentSize):
2735         (WebKit::PageClientImpl::setCursor):
2736         (WebKit::PageClientImpl::registerEditCommand):
2737         (WebKit::PageClientImpl::registerInsertionUndoGrouping):
2738         (WebKit::PageClientImpl::clearAllEditCommands):
2739         (WebKit::PageClientImpl::canUndoRedo):
2740         (WebKit::PageClientImpl::executeUndoRedo):
2741         (WebKit::PageClientImpl::setDragImage):
2742         (WebKit::PageClientImpl::setPromisedDataForImage):
2743         (WebKit::PageClientImpl::setPromisedDataForAttachment):
2744         (WebKit::PageClientImpl::updateSecureInputState):
2745         (WebKit::PageClientImpl::resetSecureInputState):
2746         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
2747         (WebKit::PageClientImpl::convertToDeviceSpace):
2748         (WebKit::PageClientImpl::convertToUserSpace):
2749         (WebKit::PageClientImpl::screenToRootView):
2750         (WebKit::PageClientImpl::rootViewToScreen):
2751         (WebKit::PageClientImpl::doneWithKeyEvent):
2752         (WebKit::PageClientImpl::createPopupMenuProxy):
2753         (WebKit::PageClientImpl::createContextMenuProxy):
2754         (WebKit::PageClientImpl::createColorPicker):
2755         (WebKit::PageClientImpl::setTextIndicator):
2756         (WebKit::PageClientImpl::clearTextIndicator):
2757         (WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
2758         (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
2759         (WebKit::PageClientImpl::enterAcceleratedCompositingMode):
2760         (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
2761         (WebKit::PageClientImpl::updateAcceleratedCompositingMode):
2762         (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
2763         (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
2764         (WebKit::PageClientImpl::takeViewSnapshot):
2765         (WebKit::PageClientImpl::selectionDidChange):
2766         (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
2767         (WebKit::PageClientImpl::gestureEventWasNotHandledByWebCore):
2768         (WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged):
2769         (WebKit::PageClientImpl::setPluginComplexTextInputState):
2770         (WebKit::PageClientImpl::didPerformDictionaryLookup):
2771         (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
2772         (WebKit::PageClientImpl::showCorrectionPanel):
2773         (WebKit::PageClientImpl::recordAutocorrectionResponse):
2774         (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
2775         (WebKit::PageClientImpl::intrinsicContentSizeDidChange):
2776         (WebKit::PageClientImpl::executeSavedCommandBySelector):
2777         (WebKit::PageClientImpl::showDictationAlternativeUI):
2778         (WebKit::PageClientImpl::closeFullScreenManager):
2779         (WebKit::PageClientImpl::isFullScreen):
2780         (WebKit::PageClientImpl::enterFullScreen):
2781         (WebKit::PageClientImpl::exitFullScreen):
2782         (WebKit::PageClientImpl::beganEnterFullScreen):
2783         (WebKit::PageClientImpl::beganExitFullScreen):
2784         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
2785         (WebKit::PageClientImpl::didFinishLoadForMainFrame):
2786         (WebKit::PageClientImpl::didFailLoadForMainFrame):
2787         (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
2788         (WebKit::PageClientImpl::removeNavigationGestureSnapshot):
2789         (WebKit::PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates):
2790         (WebKit::PageClientImpl::didPerformImmediateActionHitTest):
2791         (WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult):
2792         (WebKit::PageClientImpl::showPlatformContextMenu):
2793         (WebKit::PageClientImpl::refView):
2794         (WebKit::PageClientImpl::derefView):
2795         (WebKit::PageClientImpl::startWindowDrag):
2796         (WebKit::PageClientImpl::platformWindow):
2797         (WebKit::PageClientImpl::inspectorAttachmentView):
2798         (WebKit::PageClientImpl::remoteObjectRegistry):
2799         * UIProcess/mac/WebColorPickerMac.h:
2800         * UIProcess/mac/WebColorPickerMac.mm:
2801         (WebKit::WebColorPickerMac::create):
2802         (WebKit::WebColorPickerMac::WebColorPickerMac):
2803         (-[WKColorPopoverMac initWithFrame:inView:]):
2804         * UIProcess/mac/WebContextMenuProxyMac.h:
2805         * UIProcess/mac/WebContextMenuProxyMac.mm:
2806         (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
2807         * UIProcess/mac/WebPopupMenuProxyMac.h:
2808         (WebKit::WebPopupMenuProxyMac::create):
2809         * UIProcess/mac/WebPopupMenuProxyMac.mm:
2810         (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
2811         Move ownership of WebPageProxy and PageClientImpl to WebViewImpl.
2812
2813 2015-10-30  Alex Christensen  <achristensen@webkit.org>
2814
2815         Fix Mac CMake build after rr191810.
2816
2817         * PlatformMac.cmake:
2818         Add RemoteObjectInvocation.mm.
2819
2820 2015-10-30  Anders Carlsson  <andersca@apple.com>
2821
2822         Add a separate object that represents a remote object invocation
2823         https://bugs.webkit.org/show_bug.cgi?id=150639
2824
2825         Reviewed by Tim Horton.
2826
2827         * Shared/API/Cocoa/RemoteObjectInvocation.h: Copied from Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.h.
2828         (WebKit::RemoteObjectInvocation::interfaceIdentifier):
2829         (WebKit::RemoteObjectInvocation::encodedInvocation):
2830         * Shared/API/Cocoa/RemoteObjectInvocation.mm: Copied from Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.mm.
2831         (WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
2832         (WebKit::RemoteObjectInvocation::encode):
2833         (WebKit::RemoteObjectInvocation::decode):
2834         * Shared/API/Cocoa/RemoteObjectRegistry.h:
2835         * Shared/API/Cocoa/RemoteObjectRegistry.messages.in:
2836         * Shared/API/Cocoa/RemoteObjectRegistry.mm:
2837         (WebKit::RemoteObjectRegistry::sendInvocation):
2838         (WebKit::RemoteObjectRegistry::invokeMethod):
2839         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
2840         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
2841         (-[_WKRemoteObjectRegistry _invokeMethod:]):
2842         * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
2843         * WebKit2.xcodeproj/project.pbxproj:
2844
2845 2015-10-30  Beth Dakin  <bdakin@apple.com>
2846
2847         Another speculative build fix.
2848
2849         * UIProcess/API/Cocoa/_WKElementAction.h:
2850
2851 2015-10-30  Beth Dakin  <bdakin@apple.com>
2852
2853         Speculative build fix.
2854
2855         * Platform/spi/ios/UIKitSPI.h:
2856         * UIProcess/ios/WKContentViewInteraction.mm:
2857
2858 2015-10-30  Tim Horton  <timothy_horton@apple.com>
2859
2860         WKView being inside WKWebView leads to weird API issues
2861         https://bugs.webkit.org/show_bug.cgi?id=150174
2862
2863         Reviewed by Anders Carlsson.
2864
2865         * UIProcess/API/mac/WKView.mm:
2866         (-[WKView mouseMoved:]):
2867         (-[WKView mouseDown:]):
2868         (-[WKView mouseUp:]):
2869         (-[WKView mouseDragged:]):
2870         (-[WKView mouseEntered:]):
2871         (-[WKView mouseExited:]):
2872         (-[WKView otherMouseDown:]):
2873         (-[WKView otherMouseDragged:]):
2874         (-[WKView otherMouseUp:]):
2875         (-[WKView rightMouseDown:]):
2876         (-[WKView rightMouseDragged:]):
2877         (-[WKView rightMouseUp:]):
2878         (-[WKView _updateViewExposedRect]): Deleted.
2879         * UIProcess/Cocoa/WebViewImpl.h:
2880         * UIProcess/Cocoa/WebViewImpl.mm:
2881         (WebKit::WebViewImpl::mouseMoved):
2882         (WebKit::WebViewImpl::mouseDown):
2883         (WebKit::WebViewImpl::mouseUp):
2884         (WebKit::WebViewImpl::mouseDragged):
2885         Move mouse event handling.
2886
2887 2015-10-30  Beth Dakin  <bdakin@apple.com>
2888
2889         Tapping and holding a link should have a share option
2890         https://bugs.webkit.org/show_bug.cgi?id=150693
2891         -and corresponding-
2892         rdar://problem/21319702
2893
2894         Reviewed by Tim Horton.
2895
2896         New _WKElementActionType called _WKElementActionTypeShare.
2897         * UIProcess/API/Cocoa/_WKElementAction.h:
2898         * UIProcess/API/Cocoa/_WKElementAction.mm:
2899         (+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
2900
2901         _WKElementActionTypeShare is part of the default actions for links.
2902         * UIProcess/ios/WKActionSheetAssistant.h:
2903         * UIProcess/ios/WKActionSheetAssistant.mm:
2904         (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
2905
2906         Handle the sharing part!
2907         * UIProcess/ios/WKContentViewInteraction.mm:
2908         (-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
2909
2910         To support this in PDF, PDF need to create a _webSelectionAssistant.
2911         * UIProcess/ios/WKPDFView.mm:
2912         (-[WKPDFView web_initWithFrame:webView:]):
2913         (-[WKPDFView actionSheetAssistant:openElementAtLocation:]):
2914         (-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):
2915         (-[WKPDFView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
2916
2917 2015-10-30  Tim Horton  <timothy_horton@apple.com>
2918
2919         WKView being inside WKWebView leads to weird API issues
2920         https://bugs.webkit.org/show_bug.cgi?id=150174
2921
2922         Reviewed by Anders Carlsson.
2923
2924         * UIProcess/API/mac/WKView.mm:
2925         (-[WKView _wantsKeyDownForEvent:]):
2926         (-[WKView acceptsFirstMouse:]):
2927         (-[WKView shouldDelayWindowOrderingForEvent:]):
2928         (-[WKView validAttributesForMarkedText]):
2929         (-[WKView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
2930         (-[WKView drawRect:]):
2931         (-[WKView isOpaque]):
2932         (-[WKView mouseDownCanMoveWindow]):
2933         (-[WKView viewDidHide]):
2934         (-[WKView viewDidUnhide]):
2935         (-[WKView _activeSpaceDidChange:]):
2936         (-[WKView hitTest:]):
2937         (-[WKView wantsUpdateLayer]):
2938         (-[WKView canChangeFrameLayout:]):
2939         (-[WKView printOperationWithPrintInfo:forFrame:]):
2940         (+[WKView hideWordDefinitionWindow]):
2941         * UIProcess/Cocoa/WebViewImpl.h:
2942         (WebKit::WebViewImpl::wantsUpdateLayer):
2943         (WebKit::WebViewImpl::mouseDownCanMoveWindow):
2944         (WebKit::WebViewImpl::wantsKeyDownForEvent):
2945         (WebKit::WebViewImpl::layerHostingView): Deleted.
2946         * UIProcess/Cocoa/WebViewImpl.mm:
2947         (WebKit::WebViewImpl::isOpaque):
2948         (WebKit::WebViewImpl::acceptsFirstMouse):
2949         (WebKit::WebViewImpl::drawRect):
2950         (WebKit::WebViewImpl::canChangeFrameLayout):
2951         (WebKit::WebViewImpl::printOperationWithPrintInfo):
2952         (WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
2953         (WebKit::WebViewImpl::windowResizeMouseLocationIsInVisibleScrollerThumb):
2954         (WebKit::WebViewImpl::viewDidHide):
2955         (WebKit::WebViewImpl::viewDidUnhide):
2956         (WebKit::WebViewImpl::activeSpaceDidChange):
2957         (WebKit::WebViewImpl::hitTest):
2958         (WebKit::WebViewImpl::hideWordDefinitionWindow):
2959         (WebKit::WebViewImpl::validAttributesForMarkedText):
2960         Printing and random bits.
2961
2962 2015-10-30  Anders Carlsson  <andersca@apple.com>
2963
2964         REGRESSION (r191691): Unexpected "Share" context menu when right clicking around inspector
2965         https://bugs.webkit.org/show_bug.cgi?id=150699
2966         rdar://problem/23324522
2967
2968         Reviewed by Tim Horton.
2969
2970         Don't create a share menu item if we have nothing to share.
2971
2972         * UIProcess/mac/WebContextMenuProxyMac.mm:
2973         (WebKit::WebContextMenuProxyMac::createShareMenuItem):
2974
2975 2015-10-30  Tim Horton  <timothy_horton@apple.com>
2976
2977         Initialize some new WebViewImpl members
2978
2979         * UIProcess/Cocoa/WebViewImpl.h:
2980         Oh well.
2981
2982 2015-10-30  Tim Horton  <timothy_horton@apple.com>
2983
2984         Fix the build
2985
2986         * UIProcess/API/mac/WKView.mm:
2987
2988 2015-10-30  Tim Horton  <timothy_horton@apple.com>
2989
2990         Fix the build
2991
2992         * UIProcess/Cocoa/WebViewImpl.h:
2993         * UIProcess/Cocoa/WebViewImpl.mm:
2994         (WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
2995
2996 2015-10-30  Tim Horton  <timothy_horton@apple.com>
2997
2998         WKView being inside WKWebView leads to weird API issues
2999         https://bugs.webkit.org/show_bug.cgi?id=150174
3000
3001         Reviewed by Darin Adler.
3002
3003         * UIProcess/API/mac/WKView.mm:
3004         (-[WKView doCommandBySelector:]):
3005         (-[WKView insertText:]):
3006         (-[WKView insertText:replacementRange:]):
3007         (-[WKView inputContext]):
3008         (-[WKView performKeyEquivalent:]):
3009         (-[WKView keyUp:]):
3010         (-[WKView keyDown:]):
3011         (-[WKView flagsChanged:]):
3012         (-[WKView setMarkedText:selectedRange:replacementRange:]):
3013         (-[WKView unmarkText]):
3014         (-[WKView selectedRange]):
3015         (-[WKView hasMarkedText]):
3016         (-[WKView markedRange]):
3017         (-[WKView attributedSubstringForProposedRange:actualRange:]):
3018         (-[WKView characterIndexForPoint:]):
3019         (-[WKView firstRectForCharacterRange:actualRange:]):
3020         (-[WKView selectedRangeWithCompletionHandler:]):
3021         (-[WKView markedRangeWithCompletionHandler:]):
3022         (-[WKView hasMarkedTextWithCompletionHandler:]):
3023         (-[WKView attributedSubstringForProposedRange:completionHandler:]):
3024         (-[WKView firstRectForCharacterRange:completionHandler:]):
3025         (-[WKView characterIndexForPoint:completionHandler:]):
3026         (-[WKView _superPerformKeyEquivalent:]):
3027         (-[WKView _superKeyDown:]):
3028         (extractUnderlines): Deleted.
3029         (-[WKView _collectKeyboardLayoutCommandsForEvent:to:]): Deleted.
3030         (-[WKView _interpretKeyEvent:completionHandler:]): Deleted.
3031         (-[WKView NO_RETURN_DUE_TO_ASSERT]): Deleted.
3032         (-[WKView _interpretKeyEvent:savingCommandsTo:]): Deleted.
3033         (-[WKView _executeSavedKeypressCommands]): Deleted.
3034         (-[WKView _doneWithKeyEvent:eventWasHandled:]): Deleted.
3035         * UIProcess/API/mac/WKViewInternal.h:
3036         * UIProcess/Cocoa/WebViewImpl.h:
3037         * UIProcess/Cocoa/WebViewImpl.mm:
3038         (WebKit::WebViewImpl::doneWithKeyEvent):
3039         (WebKit::extractUnderlines):
3040         (WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
3041         (WebKit::WebViewImpl::interpretKeyEvent):
3042         (WebKit::WebViewImpl::doCommandBySelector):
3043         (WebKit::WebViewImpl::insertText):
3044         (WebKit::WebViewImpl::selectedRangeWithCompletionHandler):
3045         (WebKit::WebViewImpl::markedRangeWithCompletionHandler):
3046         (WebKit::WebViewImpl::hasMarkedTextWithCompletionHandler):
3047         (WebKit::WebViewImpl::attributedSubstringForProposedRange):
3048         (WebKit::WebViewImpl::firstRectForCharacterRange):
3049         (WebKit::WebViewImpl::characterIndexForPoint):
3050         (WebKit::WebViewImpl::inputContext):
3051         (WebKit::WebViewImpl::unmarkText):
3052         (WebKit::WebViewImpl::setMarkedText):
3053         (WebKit::WebViewImpl::selectedRange):
3054         (WebKit::WebViewImpl::hasMarkedText):
3055         (WebKit::WebViewImpl::markedRange):
3056         (WebKit::WebViewImpl::performKeyEquivalent):
3057         (WebKit::WebViewImpl::keyUp):
3058         (WebKit::WebViewImpl::keyDown):
3059         (WebKit::WebViewImpl::flagsChanged):
3060         (WebKit::WebViewImpl::executeSavedKeypressCommands):
3061         * UIProcess/mac/PageClientImpl.mm:
3062         (WebKit::PageClientImpl::doneWithKeyEvent):
3063         Move NSTextInputClient implementation.
3064
3065 2015-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>
3066
3067         [GTK] Move the socket polling off the WorkQueue
3068         https://bugs.webkit.org/show_bug.cgi?id=150593
3069
3070         Reviewed by Anders Carlsson.
3071
3072         Create the socket poll source in Connection::open and attach it to
3073         the connection work queue context.
3074
3075         * Platform/IPC/Connection.h:
3076         * Platform/IPC/unix/ConnectionUnix.cpp:
3077         (IPC::Connection::platformInvalidate):
3078         (IPC::Connection::open):
3079
3080 2015-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>
3081
3082         [GTK] Use RunLoop::Timer instead of GMainLoopSource
3083         https://bugs.webkit.org/show_bug.cgi?id=150592
3084
3085         Reviewed by Žan Doberšek.
3086
3087         * Shared/Downloads/soup/DownloadSoup.cpp:
3088         (WebKit::DownloadClient::DownloadClient):
3089         (WebKit::DownloadClient::didReceiveData):
3090         (WebKit::DownloadClient::handleResponseLater):
3091         * UIProcess/gtk/GestureController.cpp:
3092         (WebKit::GestureController::DragGesture::begin):
3093         (WebKit::GestureController::DragGesture::update):
3094         (WebKit::GestureController::DragGesture::end):
3095         (WebKit::GestureController::DragGesture::longPressFired):
3096         (WebKit::GestureController::DragGesture::DragGesture):
3097         (WebKit::GestureController::ZoomGesture::scaleChanged):
3098         (WebKit::GestureController::ZoomGesture::ZoomGesture):
3099         * UIProcess/gtk/GestureController.h:
3100
3101 2015-10-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3102
3103         [GTK] Use a persistent main loop source in RunLoop glib implementation
3104         https://bugs.webkit.org/show_bug.cgi?id=150590
3105
3106         Reviewed by Žan Doberšek.
3107
3108         Use RunLoop::dispatch() instead of
3109         GMainLoopSource::scheduleAndDeleteOnDestroy in a couple of simple
3110         cases.
3111
3112         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
3113         (WebKit::NetworkCache::runTaskInQueue):
3114         * UIProcess/gtk/DragAndDropHandler.cpp:
3115         (WebKit::DragAndDropHandler::dragLeave):
3116
3117 2015-10-29  Alex Christensen  <achristensen@webkit.org>
3118
3119         Make WebCore a framework in Mac CMake build
3120         https://bugs.webkit.org/show_bug.cgi?id=150702
3121
3122         Reviewed by Geoffrey Garen.
3123
3124         * PlatformMac.cmake:
3125
3126 2015-10-29  Alex Christensen  <achristensen@webkit.org>
3127
3128         EFL build fix after r191749
3129
3130         * CMakeLists.txt:
3131         Only Mac should include the Cocoa directory.
3132
3133 2015-10-29  Tim Horton  <timothy_horton@apple.com>
3134
3135         WKView being inside WKWebView leads to weird API issues
3136         https://bugs.webkit.org/show_bug.cgi?id=150174
3137
3138         Reviewed by Anders Carlsson.
3139
3140         * Platform/spi/mac/AppKitSPI.h:
3141         * UIProcess/API/mac/WKView.mm:
3142         (-[WKView validRequestorForSendType:returnType:]):
3143         (-[WKView readSelectionFromPasteboard:]):
3144         (-[WKView changeFont:]):
3145         (-[WKView startSpeaking:]):
3146         (-[WKView stopSpeaking:]):
3147         (-[WKView showGuessPanel:]):
3148         (-[WKView checkSpelling:]):
3149         (-[WKView changeSpelling:]):
3150         (-[WKView toggleContinuousSpellChecking:]):
3151         (-[WKView isGrammarCheckingEnabled]):
3152         (-[WKView setGrammarCheckingEnabled:]):
3153         (-[WKView toggleGrammarChecking:]):
3154         (-[WKView toggleAutomaticSpellingCorrection:]):
3155         (-[WKView orderFrontSubstitutionsPanel:]):
3156         (-[WKView toggleSmartInsertDelete:]):
3157         (-[WKView isAutomaticQuoteSubstitutionEnabled]):
3158         (-[WKView setAutomaticQuoteSubstitutionEnabled:]):
3159         (-[WKView toggleAutomaticQuoteSubstitution:]):
3160         (-[WKView isAutomaticDashSubstitutionEnabled]):
3161         (-[WKView setAutomaticDashSubstitutionEnabled:]):
3162         (-[WKView toggleAutomaticDashSubstitution:]):
3163         (-[WKView isAutomaticLinkDetectionEnabled]):
3164         (-[WKView setAutomaticLinkDetectionEnabled:]):
3165         (-[WKView toggleAutomaticLinkDetection:]):
3166         (-[WKView isAutomaticTextReplacementEnabled]):
3167         (-[WKView setAutomaticTextReplacementEnabled:]):
3168         (-[WKView toggleAutomaticTextReplacement:]):
3169         (-[WKView uppercaseWord:]):
3170         (-[WKView lowercaseWord:]):
3171         (-[WKView capitalizeWord:]):
3172         * UIProcess/Cocoa/WebViewImpl.h:
3173         * UIProcess/Cocoa/WebViewImpl.mm:
3174         (WebKit::WebViewImpl::readSelectionFromPasteboard):
3175         (WebKit::WebViewImpl::validRequestorForSendAndReturnTypes):
3176         (WebKit::WebViewImpl::changeFontFromFontPanel):
3177         (WebKit::WebViewImpl::startSpeaking):
3178         (WebKit::WebViewImpl::stopSpeaking):
3179         (WebKit::WebViewImpl::showGuessPanel):
3180         (WebKit::WebViewImpl::checkSpelling):
3181         (WebKit::WebViewImpl::changeSpelling):
3182         (WebKit::WebViewImpl::toggleContinuousSpellChecking):
3183         (WebKit::WebViewImpl::isGrammarCheckingEnabled):
3184         (WebKit::WebViewImpl::setGrammarCheckingEnabled):
3185         (WebKit::WebViewImpl::toggleGrammarChecking):
3186         (WebKit::WebViewImpl::toggleAutomaticSpellingCorrection):
3187         (WebKit::WebViewImpl::orderFrontSubstitutionsPanel):
3188         (WebKit::WebViewImpl::toggleSmartInsertDelete):
3189         (WebKit::WebViewImpl::isAutomaticQuoteSubstitutionEnabled):
3190         (WebKit::WebViewImpl::setAutomaticQuoteSubstitutionEnabled):
3191         (WebKit::WebViewImpl::toggleAutomaticQuoteSubstitution):
3192         (WebKit::WebViewImpl::isAutomaticDashSubstitutionEnabled):
3193         (WebKit::WebViewImpl::setAutomaticDashSubstitutionEnabled):
3194         (WebKit::WebViewImpl::toggleAutomaticDashSubstitution):
3195         (WebKit::WebViewImpl::isAutomaticLinkDetectionEnabled):
3196         (WebKit::WebViewImpl::setAutomaticLinkDetectionEnabled):
3197         (WebKit::WebViewImpl::toggleAutomaticLinkDetection):
3198         (WebKit::WebViewImpl::setAutomaticTextReplacementEnabled):
3199         (WebKit::WebViewImpl::toggleAutomaticTextReplacement):
3200         (WebKit::WebViewImpl::uppercaseWord):
3201         (WebKit::WebViewImpl::lowercaseWord):
3202         (WebKit::WebViewImpl::capitalizeWord):
3203         Move spellcheck and related bits.
3204
3205 2015-10-29  Eric Carlson  <eric.carlson@apple.com>
3206
3207         Revert inadvertent changes
3208         https://bugs.webkit.org/show_bug.cgi?id=150694
3209
3210         Reviewed by Tim Horton.
3211
3212         * WebProcess/com.apple.WebProcess.sb.in:
3213
3214 2015-10-29  Alex Christensen  <achristensen@webkit.org>
3215
3216         CMake build fix.
3217
3218         * CMakeLists.txt:
3219         * PlatformMac.cmake:
3220         I mistakenly added some mac-specific files to the shared CMakeLists.txt.  This puts them in the right place.
3221         * UIProcess/WebPageProxy.cpp:
3222         (WebKit::WebPageProxy::viewWillStartLiveResize):
3223         (WebKit::WebPageProxy::viewDidLeaveWindow):
3224         (WebKit::WebPageProxy::didEndColorPicker):
3225         Add preprocessor enable checks.
3226
3227 2015-10-29  Tim Horton  <timothy_horton@apple.com>
3228
3229         WKView being inside WKWebView leads to weird API issues
3230         https://bugs.webkit.org/show_bug.cgi?id=150174
3231
3232         Reviewed by Darin Adler.
3233
3234         * UIProcess/API/mac/WKView.mm:
3235         (-[WKView browsingContextController]):
3236         (-[WKView validateUserInterfaceItem:]):
3237         (-[WKView saveBackForwardSnapshotForCurrentItem]):
3238         (-[WKView saveBackForwardSnapshotForItem:]):
3239         (-[WKView updateLayer]):
3240         (-[WKView minimumSizeForAutoLayout]):
3241         (-[WKView setMinimumSizeForAutoLayout:]):
3242         (-[WKView shouldExpandToViewHeightForAutoLayout]):
3243         (-[WKView setShouldExpandToViewHeightForAutoLayout:]):
3244         (-[WKView underlayColor]):
3245         (-[WKView setUnderlayColor:]):
3246         (-[WKView _setOverlayScrollbarStyle:]):
3247         (-[WKView _overlayScrollbarStyle]):
3248         (-[WKView _pageExtendedBackgroundColor]):
3249         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
3250         (-[WKView waitForAsyncDrawingAreaSizeUpdate]):
3251         (-[WKView isUsingUISideCompositing]):
3252         (createSelectorExceptionMap): Deleted.
3253         (commandNameForSelector): Deleted.
3254         (menuItem): Deleted.
3255         (toolbarItem): Deleted.
3256         (-[WKView _setUserInterfaceItemState:enabled:state:]): Deleted.
3257         * UIProcess/Cocoa/WebViewImpl.h:
3258         * UIProcess/Cocoa/WebViewImpl.mm:
3259         (WebKit::WebViewImpl::createDrawingAreaProxy):
3260         (WebKit::WebViewImpl::isUsingUISideCompositing):
3261         (WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate):
3262         (WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate):
3263         (WebKit::WebViewImpl::updateLayer):
3264         (WebKit::WebViewImpl::setMinimumSizeForAutoLayout):
3265         (WebKit::WebViewImpl::minimumSizeForAutoLayout):
3266         (WebKit::WebViewImpl::setShouldExpandToViewHeightForAutoLayout):
3267         (WebKit::WebViewImpl::shouldExpandToViewHeightForAutoLayout):
3268         (WebKit::WebViewImpl::setUnderlayColor):
3269         (WebKit::WebViewImpl::underlayColor):
3270         (WebKit::WebViewImpl::pageExtendedBackgroundColor):
3271         (WebKit::WebViewImpl::setOverlayScrollbarStyle):
3272         (WebKit::WebViewImpl::overlayScrollbarStyle):
3273         (WebKit::createSelectorExceptionMap):
3274         (WebKit::commandNameForSelector):
3275         (WebKit::WebViewImpl::executeSavedCommandBySelector):
3276         (WebKit::WebViewImpl::executeEditCommandForSelector):
3277         (WebKit::menuItem):
3278         (WebKit::toolbarItem):
3279         (WebKit::WebViewImpl::validateUserInterfaceItem):
3280         (WebKit::WebViewImpl::setUserInterfaceItemState):
3281         (WebKit::WebViewImpl::browsingContextController):
3282         (WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
3283         (WebKit::WebViewImpl::saveBackForwardSnapshotForItem):
3284         (WebKit::WebViewImpl::executeEditCommand): Deleted.
3285         Move UI validation and a grab-bag of other things.
3286
3287 2015-10-29  Alex Christensen  <achristensen@webkit.org>
3288
3289         Fix Mac CMake build
3290         https://bugs.webkit.org/show_bug.cgi?id=150686
3291
3292         Reviewed by Filip Pizlo.
3293
3294         * CMakeLists.txt:
3295         * PlatformMac.cmake:
3296
3297 2015-10-29  Commit Queue  <commit-queue@webkit.org>
3298
3299         Unreviewed, rolling out r191728.
3300         https://bugs.webkit.org/show_bug.cgi?id=150668
3301
3302         Caused a lot of timeouts in layout tests (Requested by KaL on
3303         #webkit).
3304
3305         Reverted changeset:
3306
3307         "[GTK] Use a persistent main loop source in RunLoop glib
3308         implementation"
3309         https://bugs.webkit.org/show_bug.cgi?id=150590
3310         http://trac.webkit.org/changeset/191728
3311
3312 2015-10-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3313
3314         [GTK] Use a persistent main loop source in RunLoop glib implementation
3315         https://bugs.webkit.org/show_bug.cgi?id=150590
3316
3317         Reviewed by Žan Doberšek.
3318
3319         Use RunLoop::dispatch() instead of
3320         GMainLoopSource::scheduleAndDeleteOnDestroy in a couple of simple
3321         cases.
3322
3323         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
3324         (WebKit::NetworkCache::runTaskInQueue):
3325         * UIProcess/gtk/DragAndDropHandler.cpp:
3326         (WebKit::DragAndDropHandler::dragLeave):
3327
3328 2015-10-28  Tim Horton  <timothy_horton@apple.com>
3329
3330         Fix the build
3331
3332         * UIProcess/mac/PageClientImpl.mm:
3333         (WebKit::PageClientImpl::startWindowDrag):
3334         (WebKit::PageClientImpl::platformWindow):
3335
3336 2015-10-28  Tim Horton  <timothy_horton@apple.com>
3337
3338         WKView being inside WKWebView leads to weird API issues
3339         https://bugs.webkit.org/show_bug.cgi?id=150174
3340
3341         Reviewed by Anders Carlsson.
3342
3343         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
3344         (WKPageGetObjectRegistry):
3345         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3346         (-[WKBrowsingContextController _remoteObjectRegistry]):
3347         * UIProcess/API/mac/WKView.mm:
3348         (-[WKView dealloc]):
3349         (-[WKView _inspectorAttachmentView]):
3350         (-[WKView _setInspectorAttachmentView:]):
3351         (-[WKView windowOcclusionDetectionEnabled]):
3352         (-[WKView setWindowOcclusionDetectionEnabled:]):
3353         (-[WKView _setTotalHeightOfBanners:]):
3354         (-[WKView _totalHeightOfBanners]):
3355         (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
3356         (-[WKView _remoteObjectRegistry]): Deleted.
3357         (-[WKView _startWindowDrag]): Deleted.
3358         * UIProcess/API/mac/WKViewInternal.h:
3359         * UIProcess/Cocoa/WebViewImpl.h:
3360         (WebKit::WebViewImpl::setWindowOcclusionDetectionEnabled):
3361         (WebKit::WebViewImpl::windowOcclusionDetectionEnabled):
3362         (WebKit::WebViewImpl::setTotalHeightOfBanners):
3363         (WebKit::WebViewImpl::totalHeightOfBanners):
3364         * UIProcess/Cocoa/WebViewImpl.mm:
3365         (WebKit::WebViewImpl::window):
3366         (WebKit::WebViewImpl::setInspectorAttachmentView):
3367         (WebKit::WebViewImpl::inspectorAttachmentView):
3368         (WebKit::WebViewImpl::remoteObjectRegistry):
3369         (WebKit::WebViewImpl::destroyRemoteObjectRegistry):
3370         * UIProcess/PageClient.h:
3371         * UIProcess/WebPageProxy.h:
3372         * UIProcess/mac/PageClientImpl.h:
3373         * UIProcess/mac/PageClientImpl.mm:
3374         (WebKit::PageClientImpl::isViewVisible):
3375         (WebKit::PageClientImpl::createColorPicker):
3376         (WebKit::PageClientImpl::startWindowDrag):
3377         (WebKit::PageClientImpl::platformWindow):
3378         (WebKit::PageClientImpl::inspectorAttachmentView):
3379         (WebKit::PageClientImpl::remoteObjectRegistry):
3380         * UIProcess/mac/WebInspectorProxyMac.mm:
3381         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3382         (WebKit::WebInspectorProxy::platformCanAttach):
3383         (WebKit::WebInspectorProxy::platformBringToFront):
3384         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
3385         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
3386         (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
3387         (WebKit::WebInspectorProxy::platformAttach):
3388         (WebKit::WebInspectorProxy::platformDetach):
3389         (WebKit::WebInspectorProxy::platformStartWindowDrag):
3390         * UIProcess/mac/WebPageProxyMac.mm:
3391         (WebKit::WebPageProxy::startWindowDrag):
3392         (WebKit::WebPageProxy::platformWindow):
3393         (WebKit::WebPageProxy::inspectorAttachmentView):
3394         (WebKit::WebPageProxy::remoteObjectRegistry):
3395         (WebKit::WebPageProxy::wkView): Deleted.
3396         Get rid of the wkView() getters on PageClientImpl and WebPageProxy, because
3397         those can't be a thing in the brave new world. Instead, plumb the four
3398         callers through PageClient to WebViewImpl.
3399
3400         Also, move a few more things (banners, window occlusion).
3401
3402 2015-10-27  Anders Carlsson  <andersca@apple.com>
3403
3404         Stub out more of the context menu SPI
3405         https://bugs.webkit.org/show_bug.cgi?id=150606
3406
3407         Reviewed by Dan Bernstein.
3408
3409         Add a delegate method that will allow the client to modify the menu. Also,
3410         add an empty _WKContextMenuElementInfo class and its _WKElementInfo superclass.
3411
3412         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3413         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h: Added.
3414         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm: Added.
3415         * UIProcess/API/Cocoa/_WKElementInfo.h: Added.
3416         * UIProcess/API/Cocoa/_WKElementInfo.mm: Added.
3417         * UIProcess/Cocoa/UIDelegate.h:
3418         * UIProcess/Cocoa/UIDelegate.mm:
3419         (WebKit::UIDelegate::setDelegate):
3420         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
3421         (WebKit::UIDelegate::UIClient::createNewPage):
3422         * UIProcess/mac/WebContextMenuProxyMac.mm:
3423         (WebKit::WebContextMenuProxyMac::showContextMenu):
3424         * WebKit2.xcodeproj/project.pbxproj:
3425
3426 2015-10-28  Anders Carlsson  <andersca@apple.com>
3427
3428         Stop using ContextMenuItem::shareMenuItem in the UI process
3429         https://bugs.webkit.org/show_bug.cgi?id=150578
3430
3431         Reviewed by Tim Horton.
3432
3433         * UIProcess/mac/WebContextMenuProxyMac.h:
3434         * UIProcess/mac/WebContextMenuProxyMac.mm:
3435         (WebKit::WebContextMenuProxyMac::createShareMenuItem):
3436         (WebKit::WebContextMenuProxyMac::createContextMenuItem):
3437         (WebKit::WebContextMenuProxyMac::shareMenuItem): Deleted.
3438
3439 2015-10-28  Tim Horton  <timothy_horton@apple.com>
3440
3441         WKView being inside WKWebView leads to weird API issues
3442         https://bugs.webkit.org/show_bug.cgi?id=150174
3443
3444         Reviewed by Anders Carlsson.
3445
3446         * UIProcess/API/mac/WKView.mm:
3447         (-[WKView _superDoCommandBySelector:]):
3448         (-[WKView _createDrawingAreaProxy]): Deleted.
3449         (-[WKView _processDidExit]): Deleted.
3450         (-[WKView _pageClosed]): Deleted.
3451         (-[WKView _didRelaunchProcess]): Deleted.
3452         (-[WKView _convertToDeviceSpace:]): Deleted.
3453         (-[WKView _convertToUserSpace:]): Deleted.
3454         (-[WKView _executeSavedCommandBySelector:]): Deleted.
3455         (-[WKResponderChainSink initWithResponderChain:]): Deleted.
3456         (-[WKResponderChainSink detach]): Deleted.
3457         (-[WKResponderChainSink didReceiveUnhandledCommand]): Deleted.
3458         (-[WKResponderChainSink noResponderFor:]): Deleted.
3459         (-[WKResponderChainSink doCommandBySelector:]): Deleted.
3460         (-[WKResponderChainSink tryToPerform:with:]): Deleted.
3461         * UIProcess/API/mac/WKViewInternal.h:
3462         * UIProcess/Cocoa/WebViewImpl.h:
3463         * UIProcess/Cocoa/WebViewImpl.mm:
3464         (-[WKResponderChainSink initWithResponderChain:]):
3465         (-[WKResponderChainSink detach]):