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