Unreviewed, rolling out r191902.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-11-02  Commit Queue  <commit-queue@webkit.org>
2
3         Unreviewed, rolling out r191902.
4         https://bugs.webkit.org/show_bug.cgi?id=150811
5
6         This change broke iOS builders (Requested by ryanhaddad on
7         #webkit).
8
9         Reverted changeset:
10
11         "Replace iOS-only WebKitSystemInterface calls with SPI"
12         https://bugs.webkit.org/show_bug.cgi?id=150763
13         http://trac.webkit.org/changeset/191902
14
15 2015-10-31  Andy Estes  <aestes@apple.com>
16
17         Replace iOS-only WebKitSystemInterface calls with SPI
18         https://bugs.webkit.org/show_bug.cgi?id=150763
19
20         Reviewed by Darin Adler.
21
22         * Platform/ios/AccessibilityIOS.h: Added.
23         * Platform/ios/AccessibilityIOS.mm: Added.
24         (WebKit::newAccessibilityRemoteToken): Upstreamed the implementation of WKAXRemoteToken() from WebKitSystemInterface.
25         * Shared/WebPreferencesDefinitions.h: Used Settings::defaultMinimumZoomFontSize() instead of WKGetMinimumZoomFontSize().
26         * Shared/WebPreferencesStore.cpp:
27         * UIProcess/API/Cocoa/WKWebView.mm:
28         (shouldAllowPictureInPictureMediaPlayback): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
29         (-[WKWebView _takeViewSnapshot]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
30         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
31         (-[WKWebViewConfiguration init]): Used deviceClass() instead of WKGetDeviceClass().
32         * UIProcess/ios/WKContentView.mm:
33         (-[WKContentView _commonInitializationWithProcessPool:configuration:]): Used screenScaleFactor() instead of WKGetScaleFactorForScreen().
34         (-[WKContentView _updateForScreen:]): Ditto.
35         (storeAccessibilityRemoteConnectionInformation): Upstreamed the implementation of WKAXStoreRemoteConnectionInformation() from WebKitSystemInterface.
36         (-[WKContentView _accessibilityRegisterUIProcessTokens]): Used newAccessibilityRemoteToken() and storeAccessibilityRemoteConnectionInformation() instead of WKAXRemoteToken() and WKAXStoreRemoteConnectionInformation().
37         * UIProcess/ios/WKContentViewInteraction.mm:
38         * UIProcess/ios/WebPageProxyIOS.mm:
39         (WebKit::WebPageProxy::screenSize): Used screenSize() instead of WKGetScreenSize().
40         (WebKit::WebPageProxy::availableScreenSize): Used availableScreenSize() instead of WKGetAvailableScreenSize().
41         (WebKit::WebPageProxy::textAutosizingWidth): Used screenSize() instead of WKGetScreenSize().
42         * WebKit2.xcodeproj/project.pbxproj:
43         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
44         (InitWebCoreSystemInterface): Deleted.
45         * WebProcess/WebPage/ios/WebPageIOS.mm:
46         (WebKit::WebPage::platformInitializeAccessibility): Used newAccessibilityRemoteToken() instead of WKAXRemoteToken().
47
48 2015-11-02  Yongjun Zhang  <yongjun_zhang@apple.com>
49
50         Add objC delegate callback for webProcessDidBecomeResponsive and webProcessDidBecomeUnresponsive.
51         https://bugs.webkit.org/show_bug.cgi?id=150778
52
53         Add methods into WKNavigationDelegatePrivate to notify WebKit client when web process becomes unresponsive
54         or responsive, which is reported by WebKit::ResponsivenessTimer.
55
56         Reviewed by Darin Adler.
57
58         * UIProcess/API/APINavigationClient.h: Add two new method processDidBecomeResponsive and processDidBecomeUnresponsive
59             to NavigationClient; they are called when WebKit::ResponsivenessTimer update its client's state.
60         (API::NavigationClient::processDidBecomeResponsive):
61         (API::NavigationClient::processDidBecomeUnresponsive):
62         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Add two new delegate method to WKNavigationDelegatePrivate:
63             _webViewWebProcessDidBecomeResponsive: and _webViewWebProcessDidBecomeUnresponsive:
64         * UIProcess/Cocoa/NavigationState.h: Add new overriding methods processDidBecomeResponsive and processDidBecomeUnresponsive.
65             Also add a bool member for each method to indicate if the delegate has implement the related method.
66         * UIProcess/Cocoa/NavigationState.mm:
67         (WebKit::NavigationState::setNavigationDelegate): Update the new bool members based on the delegate.
68         (WebKit::NavigationState::NavigationClient::processDidBecomeResponsive): Send the delegate message to navigationDelegate
69             if _webViewWebProcessDidBecomeResponsive: is implemented.
70         (WebKit::NavigationState::NavigationClient::processDidBecomeUnresponsive): Ditto.
71         * UIProcess/WebPageProxy.cpp:
72         (WebKit::WebPageProxy::processDidBecomeUnresponsive): Call navigationClient's processDidBecomeUnresponsive if the page proxy
73             has navigationClient.
74         (WebKit::WebPageProxy::processDidBecomeResponsive):  Call navigationClient's processDidBecomeResponsive if the page proxy
75             has navigationClient.
76
77 2015-11-02  Beth Dakin  <bdakin@apple.com>
78
79         Tapping and holding a link should have a share option
80         https://bugs.webkit.org/show_bug.cgi?id=150693
81
82         Reviewed by Dan Bernstein.
83
84         This is a follow-up to the original change. This change fixes non-ascii URLs. 
85         They should maintain their non-ascii characters when they are shared.
86
87         * UIProcess/ios/WKContentViewInteraction.mm:
88         (-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
89         * UIProcess/ios/WKPDFView.mm:
90         (-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):
91
92 2015-11-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
93
94         Rename JSDOMWrapper.impl to JSDOMWrapper.wrapped
95         https://bugs.webkit.org/show_bug.cgi?id=150613
96
97         Reviewed by Darin Adler.
98
99         * WebProcess/WebPage/WebFrame.cpp:
100         (WebKit::WebFrame::frameForContext): Renaming impl() to wrapped().
101         (WebKit::WebFrame::counterValue): Ditto.
102
103 2015-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
104
105         [GLIB] Remove support for GSocket main loop sources from GMainLoopSource
106         https://bugs.webkit.org/show_bug.cgi?id=150772
107
108         Reviewed by Žan Doberšek.
109
110         Add GSocketMonitor class to be used by Connection to monitor the
111         availability of the socket file descriptor instead of using a
112         GMainLoopSource.
113
114         * Platform/IPC/Connection.h:
115         * Platform/IPC/glib/GSocketMonitor.cpp: Added.
116         (IPC::GSocketMonitor::~GSocketMonitor):
117         (IPC::GSocketMonitor::socketSourceCallback):
118         (IPC::GSocketMonitor::start):
119         (IPC::GSocketMonitor::stop):
120         * Platform/IPC/glib/GSocketMonitor.h: Added.
121         * Platform/IPC/unix/ConnectionUnix.cpp:
122         (IPC::Connection::platformInvalidate):
123         (IPC::Connection::open):
124         * PlatformGTK.cmake:
125
126 2015-11-01  Carlos Garcia Campos  <cgarcia@igalia.com>
127
128         [GTK] Use RunLoop in WorkQueue implementation
129         https://bugs.webkit.org/show_bug.cgi?id=150770
130
131         Reviewed by Darin Adler.
132
133         * Platform/IPC/unix/ConnectionUnix.cpp:
134         (IPC::Connection::open): Get the main context from the WorkQueue Runloop.
135
136 2015-11-01  Yusuke Suzuki  <utatane.tea@gmail.com>
137
138         [ES6] Support Generator Syntax
139         https://bugs.webkit.org/show_bug.cgi?id=150769
140
141         Reviewed by Geoffrey Garen.
142
143         Added ENABLE_ES6_GENERATORS flag.
144
145         * Configurations/FeatureDefines.xcconfig:
146
147 2015-11-01  Brent Fulgham  <bfulgham@apple.com>
148
149         Use convenience function in sandbox profile
150         https://bugs.webkit.org/show_bug.cgi?id=150732
151         <rdar://problem/23287894>
152
153         Reviewed by Alexey Proskuryakov.
154
155         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Switch to
156         the 'awd-log-directory' convenience function.
157
158 2015-11-01  Joonghun Park  <jh718.park@samsung.com>
159
160         [EFL] Fix inappropriate move semantics use in parseAndRemoveEnvironments function
161         https://bugs.webkit.org/show_bug.cgi?id=150544
162
163         Reviewed by Darin Adler.
164
165         In parseAndRemoveEnvironments function, it declares its paramerter type as rvalue.
166         But in ProcessLauncher::launchProcess(), the argument of
167         parseAndRemoveEnvironments still be used after the call of the function.
168         Currently the rvalue is not assigned to any other variable in parseAndRemoveEnvironments,
169         so it doesn't lead to runtime error but use of move semantic
170         is not appropriate semantically in this case.
171
172         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
173         (WebKit::parseAndRemoveEnvironments):
174         (WebKit::ProcessLauncher::launchProcess):
175
176 2015-11-01  Commit Queue  <commit-queue@webkit.org>
177
178         Unreviewed, rolling out r191831.
179         https://bugs.webkit.org/show_bug.cgi?id=150774
180
181         The new test fails (Requested by ap on #webkit).
182
183         Reverted changeset:
184
185         "Begin work on supporting reply blocks in
186         _WKRemoteObjectRegistry"
187         https://bugs.webkit.org/show_bug.cgi?id=150739
188         http://trac.webkit.org/changeset/191831
189
190 2015-11-01  Philip Chimento  <philip.chimento@gmail.com>
191
192         [GTK] Fix combinations of PLATFORM(GTK) and OS(DARWIN)
193         https://bugs.webkit.org/show_bug.cgi?id=144560
194
195         Reviewed by Darin Adler.
196
197         * NetworkProcess/NetworkProcess.cpp:
198         (WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
199         Change order of OS(DARWIN) and USE(UNIX_DOMAIN_SOCKETS) checks,
200         so that we can use Unix domain sockets even on Darwin for the GTK
201         platform.
202         * Platform/IPC/Attachment.cpp: Add USE(UNIX_DOMAIN_SOCKETS) check
203         to OS(DARWIN) check, in order to support GTK platform on OSX.
204         * Platform/IPC/Attachment.h: Change order of OS(DARWIN) and
205         USE(UNIX_DOMAIN_SOCKETS) checks throughout.
206         (IPC::Attachment::size):
207         (IPC::Attachment::releaseFileDescriptor):
208         (IPC::Attachment::fileDescriptor):
209         (IPC::Attachment::disposition):
210         (IPC::Attachment::port): 
211         * Platform/IPC/Connection.h: Ditto.
212         (IPC::Connection::identifierIsNull):
213         (IPC::Connection::Identifier::Identifier): 
214         (IPC::Connection::xpcConnection): 
215         * Platform/IPC/unix/ConnectionUnix.cpp: Only use SOCK_SEQPACKET
216         if the platform is not GTK, because otherwise the PLATFORM(GTK)
217         check below is never reached.
218         * Platform/SharedMemory.h: Change order of OS(DARWIN) and
219         USE(UNIX_DOMAIN_SOCKETS) checks.
220         * PluginProcess/PluginProcess.cpp: Ditto.
221         (WebKit::PluginProcess::createWebProcessConnection):
222         * Shared/API/c/WKBase.h: Don't include WKBaseMac.h if building
223         GTK.
224         * UIProcess/API/C/WKNativeEvent.h: Don't use Apple API if
225         building GTK.
226         * UIProcess/Launcher/ProcessLauncher.cpp: Change to
227         OS(DARWIN) && !PLATFORM(GTK), in the absence of a better platform
228         macro such as USE(MACH).
229         (WebKit::ProcessLauncher::didFinishLaunchingProcess):
230         * UIProcess/Launcher/ProcessLauncher.h: Ditto.
231         * UIProcess/Network/NetworkProcessProxy.cpp: Change order of
232         OS(DARWIN) and PLATFORM(GTK) checks.
233         (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
234         (WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess):
235         * UIProcess/Plugins/PluginProcessProxy.cpp: Ditto.
236         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
237         (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
238         * WebProcess/Plugins/PluginProcessConnectionManager.cpp: Ditto.
239         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
240         * WebProcess/WebPage/WebInspector.cpp: Ditto.
241         (WebKit::WebInspector::createInspectorPage):
242         * WebProcess/WebPage/WebInspectorUI.cpp: Ditto.
243         (WebKit::WebInspectorUI::establishConnection):
244         * WebProcess/WebProcess.cpp: Ditto.
245         (WebKit::WebProcess::ensureNetworkProcessConnection):
246
247 2015-11-01  Carlos Garcia Campos  <cgarcia@igalia.com>
248
249         [GTK] Use RunLoop::Timer in PluginInfoCache
250         https://bugs.webkit.org/show_bug.cgi?id=150757
251
252         Reviewed by Darin Adler.
253
254         Use RunLoop::Timer instead of GMainLoopSource to save the cache
255         contents in an idle. Also remove the mutex, since RunLoop::Timer
256         is thread safe and saveToFile() is private and only called by the
257         main thread loop. Also removed the code to save the file in the
258         destructor since PluginInfoCache is a singleton and never
259         destroyed. It's very unlikely that the program finished before the
260         cache is saved, but even if that happens it would be harmless, the
261         cache will be saved at some point the next time.
262
263         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
264         (WebKit::PluginInfoCache::PluginInfoCache):
265         (WebKit::PluginInfoCache::updatePluginInfo):
266         (WebKit::PluginInfoCache::~PluginInfoCache):
267         (WebKit::PluginInfoCache::saveToFile):
268         * UIProcess/Plugins/gtk/PluginInfoCache.h:
269
270 2015-11-01  Carlos Garcia Campos  <cgarcia@igalia.com>
271
272         [GTK] Use a RunLoop::Timer to schedule rendering frames in accelerated compositing mode
273         https://bugs.webkit.org/show_bug.cgi?id=150756
274
275         Reviewed by Darin Adler.
276
277         Use a RunLoop::Timer instead of a GMainLoopSource for the
278         accelerated compositing render loop to improve the performance,
279         since RunLoop::Timer uses a persistent source.
280         All the logic to schedule rames has been moved to a helper
281         internal class RenderFrameScheduler.
282
283         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
284         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::RenderFrameScheduler):
285         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::~RenderFrameScheduler):
286         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::start):
287         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::stop):
288         (WebKit::shouldSkipNextFrameBecauseOfContinousImmediateFlushes):
289         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::nextFrame):
290         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::renderFrame):
291         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
292         (WebKit::LayerTreeHostGtk::renderFrame):
293         (WebKit::LayerTreeHostGtk::scheduleLayerFlush):
294         (WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
295         (WebKit::LayerTreeHostGtk::layerFlushTimerFired): Deleted.
296         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
297
298 2015-10-31  Andreas Kling  <akling@apple.com>
299
300         Add a debug overlay with information about web process resource usage.
301         <https://webkit.org/b/150599>
302
303         Reviewed by Darin Adler.
304
305         Add WK2 preferences SPI for showing/hiding the resource usage overlay.
306
307         * Shared/WebPreferencesDefinitions.h:
308         * UIProcess/API/C/WKPreferences.cpp:
309         (WKPreferencesSetResourceUsageOverlayVisible):
310         (WKPreferencesGetResourceUsageOverlayVisible):
311         * UIProcess/API/C/WKPreferencesRefPrivate.h:
312         * UIProcess/API/Cocoa/WKPreferences.mm:
313         (-[WKPreferences _resourceUsageOverlayVisible]):
314         (-[WKPreferences _setResourceUsageOverlayVisible:]):
315         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
316         * WebProcess/WebPage/WebPage.cpp:
317         (WebKit::WebPage::updatePreferences):
318
319 2015-10-31  Alex Christensen  <achristensen@webkit.org>
320
321         Share more code between NETWORK_SESSION and non-NETWORK_SESSION NetworkResourceLoaders
322         https://bugs.webkit.org/show_bug.cgi?id=150742
323
324         Reviewed by Darin Adler.
325
326         r191457 added enough code to NetworkResourceLoader to load most resources successfully if there are no errors.
327         It passed about 80% of LayoutTests/http and crashed sometimes.
328         This passes about 95% of LayoutTests/http and does not crash on any of the LayoutTests/http.
329         It should not change behavior of the non-NETWORK_SESSION code which is currently the default in trunk.
330
331         * NetworkProcess/NetworkResourceLoader.cpp:
332         (WebKit::NetworkResourceLoader::abort):
333         (WebKit::NetworkResourceLoader::sharedDidReceiveResponse):
334         (WebKit::NetworkResourceLoader::sharedDidReceiveBuffer):
335         (WebKit::NetworkResourceLoader::sharedDidFinishLoading):
336         (WebKit::NetworkResourceLoader::sharedDidFail):
337         (WebKit::NetworkResourceLoader::sharedWillSendRedirectedRequest):
338         (WebKit::NetworkResourceLoader::willPerformHTTPRedirection):
339         (WebKit::NetworkResourceLoader::didReceiveChallenge):
340         (WebKit::NetworkResourceLoader::didReceiveResponse):
341         (WebKit::NetworkResourceLoader::didReceiveData):
342         (WebKit::NetworkResourceLoader::didCompleteWithError):
343         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
344         (WebKit::NetworkResourceLoader::didReceiveBuffer):
345         (WebKit::NetworkResourceLoader::didFinishLoading):
346         (WebKit::NetworkResourceLoader::didFail):
347         (WebKit::NetworkResourceLoader::willSendRequestAsync):
348         * NetworkProcess/NetworkResourceLoader.h:
349         * NetworkProcess/NetworkSession.h:
350         (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
351
352 2015-10-28  Wenson Hsieh  <wenson_hsieh@apple.com>
353
354         Inner height behavior when the keyboard is shown should match on WKWebView and MobileSafari
355         https://bugs.webkit.org/show_bug.cgi?id=150634
356         <rdar://problem/23202254>
357
358         Reviewed by Benjamin Poulain.
359
360         Make WKWebView match behavior in Safari by not firing resize events and changing the inner height when showing
361         or hiding the keyboard. Previously, the WKWebView would do both of the above because we use the scroll view's
362         contentInset property when no unobscured insets are explicitly set for the WKWebView. To fix this, when updating
363         the visible content rect of a WKWebView for computing the inner height, we readjust the computed bottom inset
364         to not take the keyboard height into account. To know how much we need to readjust the inset by, we store the
365         total amount by which the scroll view's bottom inset has been adjusted due to the keyboard.
366
367         We perform this readjustment in _updateVisibleContentRects rather than in _computedContentInset since some users
368         of _computedContentInset may still expect the bottom inset to account for the keyboard height. However, when
369         updating visible content rects, we should not account for the keyboard height since we don't want the inner height
370         to change when showing or hiding the keyboard.
371
372         Lastly, while calling _adjustForAutomaticKeyboardInfo, we may end up calling _updateVisibleContentRects. This call
373         is unnecessary since we call it again immediately after _adjustForAutomaticKeyboardInfo, and it also complicates
374         the readjustment logic, so it makes sense to prevent the update from happening altogether while we are adjusting
375         the scroll view's insets due to keyboard changes. Altogether, these changes mean that the computed inner height
376         will no longer be adjusted for the keyboard height on WKWebViews, matching the behavior observed on mobile Safari.
377
378         Test: LayoutTests/fast/events/ios/keyboard-should-not-trigger-resize.html
379
380         * UIProcess/API/Cocoa/WKWebView.mm:
381         (-[WKWebView _updateVisibleContentRects]):
382         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
383
384 2015-10-30  Anders Carlsson  <andersca@apple.com>
385
386         Begin work on supporting reply blocks in _WKRemoteObjectRegistry
387         https://bugs.webkit.org/show_bug.cgi?id=150739
388
389         Reviewed by Tim Horton.
390
391         * Platform/spi/Cocoa/BlockSPI.h:
392         Add SPI header.
393
394         * Shared/API/Cocoa/RemoteObjectInvocation.h:
395         (WebKit::RemoteObjectInvocation::ReplyInfo::ReplyInfo):
396         (WebKit::RemoteObjectInvocation::replyInfo):
397         * Shared/API/Cocoa/RemoteObjectInvocation.mm:
398         (WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
399         (WebKit::RemoteObjectInvocation::encode):
400         (WebKit::RemoteObjectInvocation::decode):
401         Add an optional ReplyInfo struct to RemoteObjectInvocation.
402
403         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
404         (generateReplyIdentifier):
405         Helper function to generate a reply identifier.
406
407         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
408         Do some block parameter validation.
409
410         * WebKit2.xcodeproj/project.pbxproj:
411
412 2015-10-30  Beth Dakin  <bdakin@apple.com>
413
414         Link preview doesn't work on XHTML pages with Content-Type header as 
415         ‘application/xhtml+xml’
416         https://bugs.webkit.org/show_bug.cgi?id=150740
417         -and corresponding-
418         rdar://problem/23063585
419
420         Reviewed by Tim Horton.
421
422         For XHTML pages, the element names are lowercase. This patch uses 
423         equalIgnoringCase to fix the bug.
424         * UIProcess/ios/WKContentViewInteraction.mm:
425         (-[WKContentView _actionForLongPress]):
426         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
427         (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
428
429 2015-10-30  Tim Horton  <timothy_horton@apple.com>
430
431         WKView being inside WKWebView leads to weird API issues
432         https://bugs.webkit.org/show_bug.cgi?id=150174
433
434         Reviewed by Anders Carlsson.
435
436         * UIProcess/API/mac/WKView.mm:
437         (-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
438         (-[WKView prepareContentInRect:]):
439         (-[WKView initWithFrame:processPool:configuration:webView:]):
440         (-[WKView pageRef]):
441         (-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
442         (-[WKView dealloc]): Deleted.
443         * UIProcess/Cocoa/WebViewImpl.h:
444         (WebKit::WebViewImpl::page):
445         * UIProcess/Cocoa/WebViewImpl.mm:
446         (-[WKWindowVisibilityObserver initWithView:impl:]):
447         (-[WKWindowVisibilityObserver dealloc]):
448         (-[WKWindowVisibilityObserver _activeSpaceDidChange:]):
449         (WebKit::WebViewImpl::WebViewImpl):
450         (WebKit::WebViewImpl::~WebViewImpl):
451         (WebKit::WebViewImpl::setDrawsBackground):
452         (WebKit::WebViewImpl::drawsBackground):
453         (WebKit::WebViewImpl::setDrawsTransparentBackground):
454         (WebKit::WebViewImpl::drawsTransparentBackground):
455         (WebKit::WebViewImpl::isOpaque):
456         (WebKit::WebViewImpl::acceptsFirstMouse):
457         (WebKit::WebViewImpl::becomeFirstResponder):
458         (WebKit::WebViewImpl::resignFirstResponder):
459         (WebKit::WebViewImpl::viewWillStartLiveResize):
460         (WebKit::WebViewImpl::viewDidEndLiveResize):
461         (WebKit::WebViewImpl::updateWindowAndViewFrames):
462         (WebKit::WebViewImpl::setFixedLayoutSize):
463         (WebKit::WebViewImpl::fixedLayoutSize):
464         (WebKit::WebViewImpl::isUsingUISideCompositing):
465         (WebKit::WebViewImpl::setDrawingAreaSize):
466         (WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate):
467         (WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate):
468         (WebKit::WebViewImpl::updateLayer):
469         (WebKit::WebViewImpl::drawRect):
470         (WebKit::WebViewImpl::dispatchSetTopContentInset):
471         (WebKit::WebViewImpl::prepareContentInRect):
472         (WebKit::WebViewImpl::updateViewExposedRect):
473         (WebKit::WebViewImpl::setMinimumSizeForAutoLayout):
474         (WebKit::WebViewImpl::minimumSizeForAutoLayout):
475         (WebKit::WebViewImpl::setShouldExpandToViewHeightForAutoLayout):
476         (WebKit::WebViewImpl::shouldExpandToViewHeightForAutoLayout):
477         (WebKit::WebViewImpl::setIntrinsicContentSize):
478         (WebKit::WebViewImpl::setViewScale):
479         (WebKit::WebViewImpl::viewScale):
480         (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
481         (WebKit::WebViewImpl::setOverrideDeviceScaleFactor):
482         (WebKit::WebViewImpl::windowDidOrderOffScreen):
483         (WebKit::WebViewImpl::windowDidOrderOnScreen):
484         (WebKit::WebViewImpl::windowDidBecomeKey):
485         (WebKit::WebViewImpl::windowDidResignKey):
486         (WebKit::WebViewImpl::windowDidMiniaturize):
487         (WebKit::WebViewImpl::windowDidDeminiaturize):
488         (WebKit::WebViewImpl::windowDidChangeBackingProperties):
489         (WebKit::WebViewImpl::windowDidChangeScreen):
490         (WebKit::WebViewImpl::windowDidChangeLayerHosting):
491         (WebKit::WebViewImpl::windowDidChangeOcclusionState):
492         (WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
493         (WebKit::WebViewImpl::windowResizeMouseLocationIsInVisibleScrollerThumb):
494         (WebKit::WebViewImpl::viewDidMoveToWindow):
495         (WebKit::WebViewImpl::viewDidChangeBackingProperties):
496         (WebKit::WebViewImpl::viewDidHide):
497         (WebKit::WebViewImpl::viewDidUnhide):
498         (WebKit::WebViewImpl::activeSpaceDidChange):
499         (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
500         (WebKit::WebViewImpl::setUnderlayColor):
501         (WebKit::WebViewImpl::underlayColor):
502         (WebKit::WebViewImpl::pageExtendedBackgroundColor):
503         (WebKit::WebViewImpl::setOverlayScrollbarStyle):
504         (WebKit::WebViewImpl::overlayScrollbarStyle):
505         (WebKit::WebViewImpl::endDeferringViewInWindowChanges):
506         (WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
507         (WebKit::WebViewImpl::prepareForMoveToWindow):
508         (WebKit::WebViewImpl::updateSecureInputState):
509         (WebKit::WebViewImpl::setPluginComplexTextInputState):
510         (WebKit::WebViewImpl::handlePluginComplexTextInputKeyDown):
511         (WebKit::WebViewImpl::handleAcceptedAlternativeText):
512         (WebKit::WebViewImpl::pressureChangeWithEvent):
513         (WebKit::WebViewImpl::isEditable):
514         (WebKit::WebViewImpl::executeEditCommandForSelector):
515         (WebKit::WebViewImpl::writeSelectionToPasteboard):
516         (WebKit::WebViewImpl::readSelectionFromPasteboard):
517         (WebKit::WebViewImpl::validRequestorForSendAndReturnTypes):
518         (WebKit::WebViewImpl::centerSelectionInVisibleArea):
519         (WebKit::WebViewImpl::updateFontPanelIfNeeded):
520         (WebKit::WebViewImpl::changeFontFromFontPanel):
521         (WebKit::WebViewImpl::validateUserInterfaceItem):
522         (WebKit::WebViewImpl::startSpeaking):
523         (WebKit::WebViewImpl::showGuessPanel):
524         (WebKit::WebViewImpl::checkSpelling):
525         (WebKit::WebViewImpl::changeSpelling):
526         (WebKit::WebViewImpl::toggleContinuousSpellChecking):
527         (WebKit::WebViewImpl::setGrammarCheckingEnabled):
528         (WebKit::WebViewImpl::toggleGrammarChecking):
529         (WebKit::WebViewImpl::toggleAutomaticSpellingCorrection):
530         (WebKit::WebViewImpl::toggleSmartInsertDelete):
531         (WebKit::WebViewImpl::setAutomaticQuoteSubstitutionEnabled):
532         (WebKit::WebViewImpl::toggleAutomaticQuoteSubstitution):
533         (WebKit::WebViewImpl::setAutomaticDashSubstitutionEnabled):
534         (WebKit::WebViewImpl::toggleAutomaticDashSubstitution):
535         (WebKit::WebViewImpl::setAutomaticLinkDetectionEnabled):
536         (WebKit::WebViewImpl::toggleAutomaticLinkDetection):
537         (WebKit::WebViewImpl::setAutomaticTextReplacementEnabled):
538         (WebKit::WebViewImpl::toggleAutomaticTextReplacement):
539         (WebKit::WebViewImpl::uppercaseWord):
540         (WebKit::WebViewImpl::lowercaseWord):
541         (WebKit::WebViewImpl::capitalizeWord):
542         (WebKit::WebViewImpl::preferencesDidChange):
543         (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):
544         (WebKit::WebViewImpl::quickLookWithEvent):
545         (WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResult):
546         (WebKit::WebViewImpl::didChangeContentSize):
547         (WebKit::WebViewImpl::setIgnoresNonWheelEvents):
548         (WebKit::WebViewImpl::updateRemoteAccessibilityRegistration):
549         (WebKit::WebViewImpl::accessibilityRegisterUIProcessTokens):
550         (WebKit::WebViewImpl::stringForToolTip):
551         (WebKit::WebViewImpl::setInspectorAttachmentView):
552         (WebKit::WebViewImpl::remoteObjectRegistry):
553         (WebKit::WebViewImpl::browsingContextController):
554         (WebKit::WebViewImpl::draggedImage):
555         (WebKit::WebViewImpl::draggingEntered):
556         (WebKit::WebViewImpl::draggingUpdated):
557         (WebKit::WebViewImpl::draggingExited):
558         (WebKit::WebViewImpl::performDragOperation):
559         (WebKit::WebViewImpl::takeViewSnapshot):
560         (WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
561         (WebKit::WebViewImpl::saveBackForwardSnapshotForItem):
562         (WebKit::WebViewImpl::setAllowsBackForwardNavigationGestures):
563         (WebKit::WebViewImpl::setMagnification):
564         (WebKit::WebViewImpl::magnification):
565         (WebKit::WebViewImpl::scrollWheel):
566         (WebKit::WebViewImpl::swipeWithEvent):
567         (WebKit::WebViewImpl::magnifyWithEvent):
568         (WebKit::WebViewImpl::rotateWithEvent):
569         (WebKit::WebViewImpl::doCommandBySelector):
570         (WebKit::WebViewImpl::insertText):
571         (WebKit::WebViewImpl::selectedRangeWithCompletionHandler):
572         (WebKit::WebViewImpl::markedRangeWithCompletionHandler):
573         (WebKit::WebViewImpl::hasMarkedTextWithCompletionHandler):
574         (WebKit::WebViewImpl::attributedSubstringForProposedRange):
575         (WebKit::WebViewImpl::firstRectForCharacterRange):
576         (WebKit::WebViewImpl::characterIndexForPoint):
577         (WebKit::WebViewImpl::inputContext):
578         (WebKit::WebViewImpl::unmarkText):
579         (WebKit::WebViewImpl::setMarkedText):
580         (WebKit::WebViewImpl::performKeyEquivalent):
581         (WebKit::WebViewImpl::keyUp):
582         (WebKit::WebViewImpl::keyDown):
583         (WebKit::WebViewImpl::flagsChanged):
584         (WebKit::WebViewImpl::executeSavedKeypressCommands):
585         (WebKit::WebViewImpl::selectedRange):
586         (WebKit::WebViewImpl::hasMarkedText):
587         (WebKit::WebViewImpl::markedRange):
588         (WebKit::WebViewImpl::setContentPreparationRect): Deleted.
589         (WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResultFromViewOnly): Deleted.
590         (WebKit::WebViewImpl::destroyRemoteObjectRegistry): Deleted.
591         * UIProcess/WebPageProxy.h:
592         (WebKit::WebPageProxy::scrollPinningBehavior):
593         (WebKit::WebPageProxy::overlayScrollbarStyle):
594         * UIProcess/WebProcessPool.cpp:
595         (WebKit::WebProcessPool::createWebPage):
596         * UIProcess/WebProcessPool.h:
597         * UIProcess/mac/PageClientImpl.h:
598         * UIProcess/mac/PageClientImpl.mm:
599         (WebKit::PageClientImpl::PageClientImpl):
600         (WebKit::PageClientImpl::createDrawingAreaProxy):
601         (WebKit::PageClientImpl::viewSize):
602         (WebKit::PageClientImpl::activeView):
603         (WebKit::PageClientImpl::activeWindow):
604         (WebKit::PageClientImpl::isViewFocused):
605         (WebKit::PageClientImpl::makeFirstResponder):
606         (WebKit::PageClientImpl::isViewVisible):
607         (WebKit::PageClientImpl::colorSpace):
608         (WebKit::PageClientImpl::processDidExit):
609         (WebKit::PageClientImpl::pageClosed):
610         (WebKit::PageClientImpl::didRelaunchProcess):
611         (WebKit::PageClientImpl::preferencesDidChange):
612         (WebKit::PageClientImpl::toolTipChanged):
613         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
614         (WebKit::PageClientImpl::didChangeContentSize):
615         (WebKit::PageClientImpl::setCursor):
616         (WebKit::PageClientImpl::registerEditCommand):
617         (WebKit::PageClientImpl::registerInsertionUndoGrouping):
618         (WebKit::PageClientImpl::clearAllEditCommands):
619         (WebKit::PageClientImpl::canUndoRedo):
620         (WebKit::PageClientImpl::executeUndoRedo):
621         (WebKit::PageClientImpl::setDragImage):
622         (WebKit::PageClientImpl::setPromisedDataForImage):
623         (WebKit::PageClientImpl::setPromisedDataForAttachment):
624         (WebKit::PageClientImpl::updateSecureInputState):
625         (WebKit::PageClientImpl::resetSecureInputState):
626         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
627         (WebKit::PageClientImpl::convertToDeviceSpace):
628         (WebKit::PageClientImpl::convertToUserSpace):
629         (WebKit::PageClientImpl::screenToRootView):
630         (WebKit::PageClientImpl::rootViewToScreen):
631         (WebKit::PageClientImpl::doneWithKeyEvent):
632         (WebKit::PageClientImpl::createPopupMenuProxy):
633         (WebKit::PageClientImpl::createContextMenuProxy):
634         (WebKit::PageClientImpl::createColorPicker):
635         (WebKit::PageClientImpl::setTextIndicator):
636         (WebKit::PageClientImpl::clearTextIndicator):
637         (WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
638         (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
639         (WebKit::PageClientImpl::enterAcceleratedCompositingMode):
640         (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
641         (WebKit::PageClientImpl::updateAcceleratedCompositingMode):
642         (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
643         (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
644         (WebKit::PageClientImpl::takeViewSnapshot):
645         (WebKit::PageClientImpl::selectionDidChange):
646         (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
647         (WebKit::PageClientImpl::gestureEventWasNotHandledByWebCore):
648         (WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged):
649         (WebKit::PageClientImpl::setPluginComplexTextInputState):
650         (WebKit::PageClientImpl::didPerformDictionaryLookup):
651         (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
652         (WebKit::PageClientImpl::showCorrectionPanel):
653         (WebKit::PageClientImpl::recordAutocorrectionResponse):
654         (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
655         (WebKit::PageClientImpl::intrinsicContentSizeDidChange):
656         (WebKit::PageClientImpl::executeSavedCommandBySelector):
657         (WebKit::PageClientImpl::showDictationAlternativeUI):
658         (WebKit::PageClientImpl::closeFullScreenManager):
659         (WebKit::PageClientImpl::isFullScreen):
660         (WebKit::PageClientImpl::enterFullScreen):
661         (WebKit::PageClientImpl::exitFullScreen):
662         (WebKit::PageClientImpl::beganEnterFullScreen):
663         (WebKit::PageClientImpl::beganExitFullScreen):
664         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
665         (WebKit::PageClientImpl::didFinishLoadForMainFrame):
666         (WebKit::PageClientImpl::didFailLoadForMainFrame):
667         (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
668         (WebKit::PageClientImpl::removeNavigationGestureSnapshot):
669         (WebKit::PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates):
670         (WebKit::PageClientImpl::didPerformImmediateActionHitTest):
671         (WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult):
672         (WebKit::PageClientImpl::showPlatformContextMenu):
673         (WebKit::PageClientImpl::refView):
674         (WebKit::PageClientImpl::derefView):
675         (WebKit::PageClientImpl::startWindowDrag):
676         (WebKit::PageClientImpl::platformWindow):
677         (WebKit::PageClientImpl::inspectorAttachmentView):
678         (WebKit::PageClientImpl::remoteObjectRegistry):
679         * UIProcess/mac/WebColorPickerMac.h:
680         * UIProcess/mac/WebColorPickerMac.mm:
681         (WebKit::WebColorPickerMac::create):
682         (WebKit::WebColorPickerMac::WebColorPickerMac):
683         (-[WKColorPopoverMac initWithFrame:inView:]):
684         * UIProcess/mac/WebContextMenuProxyMac.h:
685         * UIProcess/mac/WebContextMenuProxyMac.mm:
686         (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
687         * UIProcess/mac/WebPopupMenuProxyMac.h:
688         (WebKit::WebPopupMenuProxyMac::create):
689         * UIProcess/mac/WebPopupMenuProxyMac.mm:
690         (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
691         Move ownership of WebPageProxy and PageClientImpl to WebViewImpl.
692
693 2015-10-30  Alex Christensen  <achristensen@webkit.org>
694
695         Fix Mac CMake build after rr191810.
696
697         * PlatformMac.cmake:
698         Add RemoteObjectInvocation.mm.
699
700 2015-10-30  Anders Carlsson  <andersca@apple.com>
701
702         Add a separate object that represents a remote object invocation
703         https://bugs.webkit.org/show_bug.cgi?id=150639
704
705         Reviewed by Tim Horton.
706
707         * Shared/API/Cocoa/RemoteObjectInvocation.h: Copied from Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.h.
708         (WebKit::RemoteObjectInvocation::interfaceIdentifier):
709         (WebKit::RemoteObjectInvocation::encodedInvocation):
710         * Shared/API/Cocoa/RemoteObjectInvocation.mm: Copied from Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.mm.
711         (WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
712         (WebKit::RemoteObjectInvocation::encode):
713         (WebKit::RemoteObjectInvocation::decode):
714         * Shared/API/Cocoa/RemoteObjectRegistry.h:
715         * Shared/API/Cocoa/RemoteObjectRegistry.messages.in:
716         * Shared/API/Cocoa/RemoteObjectRegistry.mm:
717         (WebKit::RemoteObjectRegistry::sendInvocation):
718         (WebKit::RemoteObjectRegistry::invokeMethod):
719         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
720         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
721         (-[_WKRemoteObjectRegistry _invokeMethod:]):
722         * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
723         * WebKit2.xcodeproj/project.pbxproj:
724
725 2015-10-30  Beth Dakin  <bdakin@apple.com>
726
727         Another speculative build fix.
728
729         * UIProcess/API/Cocoa/_WKElementAction.h:
730
731 2015-10-30  Beth Dakin  <bdakin@apple.com>
732
733         Speculative build fix.
734
735         * Platform/spi/ios/UIKitSPI.h:
736         * UIProcess/ios/WKContentViewInteraction.mm:
737
738 2015-10-30  Tim Horton  <timothy_horton@apple.com>
739
740         WKView being inside WKWebView leads to weird API issues
741         https://bugs.webkit.org/show_bug.cgi?id=150174
742
743         Reviewed by Anders Carlsson.
744
745         * UIProcess/API/mac/WKView.mm:
746         (-[WKView mouseMoved:]):
747         (-[WKView mouseDown:]):
748         (-[WKView mouseUp:]):
749         (-[WKView mouseDragged:]):
750         (-[WKView mouseEntered:]):
751         (-[WKView mouseExited:]):
752         (-[WKView otherMouseDown:]):
753         (-[WKView otherMouseDragged:]):
754         (-[WKView otherMouseUp:]):
755         (-[WKView rightMouseDown:]):
756         (-[WKView rightMouseDragged:]):
757         (-[WKView rightMouseUp:]):
758         (-[WKView _updateViewExposedRect]): Deleted.
759         * UIProcess/Cocoa/WebViewImpl.h:
760         * UIProcess/Cocoa/WebViewImpl.mm:
761         (WebKit::WebViewImpl::mouseMoved):
762         (WebKit::WebViewImpl::mouseDown):
763         (WebKit::WebViewImpl::mouseUp):
764         (WebKit::WebViewImpl::mouseDragged):
765         Move mouse event handling.
766
767 2015-10-30  Beth Dakin  <bdakin@apple.com>
768
769         Tapping and holding a link should have a share option
770         https://bugs.webkit.org/show_bug.cgi?id=150693
771         -and corresponding-
772         rdar://problem/21319702
773
774         Reviewed by Tim Horton.
775
776         New _WKElementActionType called _WKElementActionTypeShare.
777         * UIProcess/API/Cocoa/_WKElementAction.h:
778         * UIProcess/API/Cocoa/_WKElementAction.mm:
779         (+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
780
781         _WKElementActionTypeShare is part of the default actions for links.
782         * UIProcess/ios/WKActionSheetAssistant.h:
783         * UIProcess/ios/WKActionSheetAssistant.mm:
784         (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
785
786         Handle the sharing part!
787         * UIProcess/ios/WKContentViewInteraction.mm:
788         (-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
789
790         To support this in PDF, PDF need to create a _webSelectionAssistant.
791         * UIProcess/ios/WKPDFView.mm:
792         (-[WKPDFView web_initWithFrame:webView:]):
793         (-[WKPDFView actionSheetAssistant:openElementAtLocation:]):
794         (-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):
795         (-[WKPDFView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
796
797 2015-10-30  Tim Horton  <timothy_horton@apple.com>
798
799         WKView being inside WKWebView leads to weird API issues
800         https://bugs.webkit.org/show_bug.cgi?id=150174
801
802         Reviewed by Anders Carlsson.
803
804         * UIProcess/API/mac/WKView.mm:
805         (-[WKView _wantsKeyDownForEvent:]):
806         (-[WKView acceptsFirstMouse:]):
807         (-[WKView shouldDelayWindowOrderingForEvent:]):
808         (-[WKView validAttributesForMarkedText]):
809         (-[WKView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
810         (-[WKView drawRect:]):
811         (-[WKView isOpaque]):
812         (-[WKView mouseDownCanMoveWindow]):
813         (-[WKView viewDidHide]):
814         (-[WKView viewDidUnhide]):
815         (-[WKView _activeSpaceDidChange:]):
816         (-[WKView hitTest:]):
817         (-[WKView wantsUpdateLayer]):
818         (-[WKView canChangeFrameLayout:]):
819         (-[WKView printOperationWithPrintInfo:forFrame:]):
820         (+[WKView hideWordDefinitionWindow]):
821         * UIProcess/Cocoa/WebViewImpl.h:
822         (WebKit::WebViewImpl::wantsUpdateLayer):
823         (WebKit::WebViewImpl::mouseDownCanMoveWindow):
824         (WebKit::WebViewImpl::wantsKeyDownForEvent):
825         (WebKit::WebViewImpl::layerHostingView): Deleted.
826         * UIProcess/Cocoa/WebViewImpl.mm:
827         (WebKit::WebViewImpl::isOpaque):
828         (WebKit::WebViewImpl::acceptsFirstMouse):
829         (WebKit::WebViewImpl::drawRect):
830         (WebKit::WebViewImpl::canChangeFrameLayout):
831         (WebKit::WebViewImpl::printOperationWithPrintInfo):
832         (WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
833         (WebKit::WebViewImpl::windowResizeMouseLocationIsInVisibleScrollerThumb):
834         (WebKit::WebViewImpl::viewDidHide):
835         (WebKit::WebViewImpl::viewDidUnhide):
836         (WebKit::WebViewImpl::activeSpaceDidChange):
837         (WebKit::WebViewImpl::hitTest):
838         (WebKit::WebViewImpl::hideWordDefinitionWindow):
839         (WebKit::WebViewImpl::validAttributesForMarkedText):
840         Printing and random bits.
841
842 2015-10-30  Anders Carlsson  <andersca@apple.com>
843
844         REGRESSION (r191691): Unexpected "Share" context menu when right clicking around inspector
845         https://bugs.webkit.org/show_bug.cgi?id=150699
846         rdar://problem/23324522
847
848         Reviewed by Tim Horton.
849
850         Don't create a share menu item if we have nothing to share.
851
852         * UIProcess/mac/WebContextMenuProxyMac.mm:
853         (WebKit::WebContextMenuProxyMac::createShareMenuItem):
854
855 2015-10-30  Tim Horton  <timothy_horton@apple.com>
856
857         Initialize some new WebViewImpl members
858
859         * UIProcess/Cocoa/WebViewImpl.h:
860         Oh well.
861
862 2015-10-30  Tim Horton  <timothy_horton@apple.com>
863
864         Fix the build
865
866         * UIProcess/API/mac/WKView.mm:
867
868 2015-10-30  Tim Horton  <timothy_horton@apple.com>
869
870         Fix the build
871
872         * UIProcess/Cocoa/WebViewImpl.h:
873         * UIProcess/Cocoa/WebViewImpl.mm:
874         (WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
875
876 2015-10-30  Tim Horton  <timothy_horton@apple.com>
877
878         WKView being inside WKWebView leads to weird API issues
879         https://bugs.webkit.org/show_bug.cgi?id=150174
880
881         Reviewed by Darin Adler.
882
883         * UIProcess/API/mac/WKView.mm:
884         (-[WKView doCommandBySelector:]):
885         (-[WKView insertText:]):
886         (-[WKView insertText:replacementRange:]):
887         (-[WKView inputContext]):
888         (-[WKView performKeyEquivalent:]):
889         (-[WKView keyUp:]):
890         (-[WKView keyDown:]):
891         (-[WKView flagsChanged:]):
892         (-[WKView setMarkedText:selectedRange:replacementRange:]):
893         (-[WKView unmarkText]):
894         (-[WKView selectedRange]):
895         (-[WKView hasMarkedText]):
896         (-[WKView markedRange]):
897         (-[WKView attributedSubstringForProposedRange:actualRange:]):
898         (-[WKView characterIndexForPoint:]):
899         (-[WKView firstRectForCharacterRange:actualRange:]):
900         (-[WKView selectedRangeWithCompletionHandler:]):
901         (-[WKView markedRangeWithCompletionHandler:]):
902         (-[WKView hasMarkedTextWithCompletionHandler:]):
903         (-[WKView attributedSubstringForProposedRange:completionHandler:]):
904         (-[WKView firstRectForCharacterRange:completionHandler:]):
905         (-[WKView characterIndexForPoint:completionHandler:]):
906         (-[WKView _superPerformKeyEquivalent:]):
907         (-[WKView _superKeyDown:]):
908         (extractUnderlines): Deleted.
909         (-[WKView _collectKeyboardLayoutCommandsForEvent:to:]): Deleted.
910         (-[WKView _interpretKeyEvent:completionHandler:]): Deleted.
911         (-[WKView NO_RETURN_DUE_TO_ASSERT]): Deleted.
912         (-[WKView _interpretKeyEvent:savingCommandsTo:]): Deleted.
913         (-[WKView _executeSavedKeypressCommands]): Deleted.
914         (-[WKView _doneWithKeyEvent:eventWasHandled:]): Deleted.
915         * UIProcess/API/mac/WKViewInternal.h:
916         * UIProcess/Cocoa/WebViewImpl.h:
917         * UIProcess/Cocoa/WebViewImpl.mm:
918         (WebKit::WebViewImpl::doneWithKeyEvent):
919         (WebKit::extractUnderlines):
920         (WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
921         (WebKit::WebViewImpl::interpretKeyEvent):
922         (WebKit::WebViewImpl::doCommandBySelector):
923         (WebKit::WebViewImpl::insertText):
924         (WebKit::WebViewImpl::selectedRangeWithCompletionHandler):
925         (WebKit::WebViewImpl::markedRangeWithCompletionHandler):
926         (WebKit::WebViewImpl::hasMarkedTextWithCompletionHandler):
927         (WebKit::WebViewImpl::attributedSubstringForProposedRange):
928         (WebKit::WebViewImpl::firstRectForCharacterRange):
929         (WebKit::WebViewImpl::characterIndexForPoint):
930         (WebKit::WebViewImpl::inputContext):
931         (WebKit::WebViewImpl::unmarkText):
932         (WebKit::WebViewImpl::setMarkedText):
933         (WebKit::WebViewImpl::selectedRange):
934         (WebKit::WebViewImpl::hasMarkedText):
935         (WebKit::WebViewImpl::markedRange):
936         (WebKit::WebViewImpl::performKeyEquivalent):
937         (WebKit::WebViewImpl::keyUp):
938         (WebKit::WebViewImpl::keyDown):
939         (WebKit::WebViewImpl::flagsChanged):
940         (WebKit::WebViewImpl::executeSavedKeypressCommands):
941         * UIProcess/mac/PageClientImpl.mm:
942         (WebKit::PageClientImpl::doneWithKeyEvent):
943         Move NSTextInputClient implementation.
944
945 2015-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>
946
947         [GTK] Move the socket polling off the WorkQueue
948         https://bugs.webkit.org/show_bug.cgi?id=150593
949
950         Reviewed by Anders Carlsson.
951
952         Create the socket poll source in Connection::open and attach it to
953         the connection work queue context.
954
955         * Platform/IPC/Connection.h:
956         * Platform/IPC/unix/ConnectionUnix.cpp:
957         (IPC::Connection::platformInvalidate):
958         (IPC::Connection::open):
959
960 2015-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>
961
962         [GTK] Use RunLoop::Timer instead of GMainLoopSource
963         https://bugs.webkit.org/show_bug.cgi?id=150592
964
965         Reviewed by Žan Doberšek.
966
967         * Shared/Downloads/soup/DownloadSoup.cpp:
968         (WebKit::DownloadClient::DownloadClient):
969         (WebKit::DownloadClient::didReceiveData):
970         (WebKit::DownloadClient::handleResponseLater):
971         * UIProcess/gtk/GestureController.cpp:
972         (WebKit::GestureController::DragGesture::begin):
973         (WebKit::GestureController::DragGesture::update):
974         (WebKit::GestureController::DragGesture::end):
975         (WebKit::GestureController::DragGesture::longPressFired):
976         (WebKit::GestureController::DragGesture::DragGesture):
977         (WebKit::GestureController::ZoomGesture::scaleChanged):
978         (WebKit::GestureController::ZoomGesture::ZoomGesture):
979         * UIProcess/gtk/GestureController.h:
980
981 2015-10-29  Carlos Garcia Campos  <cgarcia@igalia.com>
982
983         [GTK] Use a persistent main loop source in RunLoop glib implementation
984         https://bugs.webkit.org/show_bug.cgi?id=150590
985
986         Reviewed by Žan Doberšek.
987
988         Use RunLoop::dispatch() instead of
989         GMainLoopSource::scheduleAndDeleteOnDestroy in a couple of simple
990         cases.
991
992         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
993         (WebKit::NetworkCache::runTaskInQueue):
994         * UIProcess/gtk/DragAndDropHandler.cpp:
995         (WebKit::DragAndDropHandler::dragLeave):
996
997 2015-10-29  Alex Christensen  <achristensen@webkit.org>
998
999         Make WebCore a framework in Mac CMake build
1000         https://bugs.webkit.org/show_bug.cgi?id=150702
1001
1002         Reviewed by Geoffrey Garen.
1003
1004         * PlatformMac.cmake:
1005
1006 2015-10-29  Alex Christensen  <achristensen@webkit.org>
1007
1008         EFL build fix after r191749
1009
1010         * CMakeLists.txt:
1011         Only Mac should include the Cocoa directory.
1012
1013 2015-10-29  Tim Horton  <timothy_horton@apple.com>
1014
1015         WKView being inside WKWebView leads to weird API issues
1016         https://bugs.webkit.org/show_bug.cgi?id=150174
1017
1018         Reviewed by Anders Carlsson.
1019
1020         * Platform/spi/mac/AppKitSPI.h:
1021         * UIProcess/API/mac/WKView.mm:
1022         (-[WKView validRequestorForSendType:returnType:]):
1023         (-[WKView readSelectionFromPasteboard:]):
1024         (-[WKView changeFont:]):
1025         (-[WKView startSpeaking:]):
1026         (-[WKView stopSpeaking:]):
1027         (-[WKView showGuessPanel:]):
1028         (-[WKView checkSpelling:]):
1029         (-[WKView changeSpelling:]):
1030         (-[WKView toggleContinuousSpellChecking:]):
1031         (-[WKView isGrammarCheckingEnabled]):
1032         (-[WKView setGrammarCheckingEnabled:]):
1033         (-[WKView toggleGrammarChecking:]):
1034         (-[WKView toggleAutomaticSpellingCorrection:]):
1035         (-[WKView orderFrontSubstitutionsPanel:]):
1036         (-[WKView toggleSmartInsertDelete:]):
1037         (-[WKView isAutomaticQuoteSubstitutionEnabled]):
1038         (-[WKView setAutomaticQuoteSubstitutionEnabled:]):
1039         (-[WKView toggleAutomaticQuoteSubstitution:]):
1040         (-[WKView isAutomaticDashSubstitutionEnabled]):
1041         (-[WKView setAutomaticDashSubstitutionEnabled:]):
1042         (-[WKView toggleAutomaticDashSubstitution:]):
1043         (-[WKView isAutomaticLinkDetectionEnabled]):
1044         (-[WKView setAutomaticLinkDetectionEnabled:]):
1045         (-[WKView toggleAutomaticLinkDetection:]):
1046         (-[WKView isAutomaticTextReplacementEnabled]):
1047         (-[WKView setAutomaticTextReplacementEnabled:]):
1048         (-[WKView toggleAutomaticTextReplacement:]):
1049         (-[WKView uppercaseWord:]):
1050         (-[WKView lowercaseWord:]):
1051         (-[WKView capitalizeWord:]):
1052         * UIProcess/Cocoa/WebViewImpl.h:
1053         * UIProcess/Cocoa/WebViewImpl.mm:
1054         (WebKit::WebViewImpl::readSelectionFromPasteboard):
1055         (WebKit::WebViewImpl::validRequestorForSendAndReturnTypes):
1056         (WebKit::WebViewImpl::changeFontFromFontPanel):
1057         (WebKit::WebViewImpl::startSpeaking):
1058         (WebKit::WebViewImpl::stopSpeaking):
1059         (WebKit::WebViewImpl::showGuessPanel):
1060         (WebKit::WebViewImpl::checkSpelling):
1061         (WebKit::WebViewImpl::changeSpelling):
1062         (WebKit::WebViewImpl::toggleContinuousSpellChecking):
1063         (WebKit::WebViewImpl::isGrammarCheckingEnabled):
1064         (WebKit::WebViewImpl::setGrammarCheckingEnabled):
1065         (WebKit::WebViewImpl::toggleGrammarChecking):
1066         (WebKit::WebViewImpl::toggleAutomaticSpellingCorrection):
1067         (WebKit::WebViewImpl::orderFrontSubstitutionsPanel):
1068         (WebKit::WebViewImpl::toggleSmartInsertDelete):
1069         (WebKit::WebViewImpl::isAutomaticQuoteSubstitutionEnabled):
1070         (WebKit::WebViewImpl::setAutomaticQuoteSubstitutionEnabled):
1071         (WebKit::WebViewImpl::toggleAutomaticQuoteSubstitution):
1072         (WebKit::WebViewImpl::isAutomaticDashSubstitutionEnabled):
1073         (WebKit::WebViewImpl::setAutomaticDashSubstitutionEnabled):
1074         (WebKit::WebViewImpl::toggleAutomaticDashSubstitution):
1075         (WebKit::WebViewImpl::isAutomaticLinkDetectionEnabled):
1076         (WebKit::WebViewImpl::setAutomaticLinkDetectionEnabled):
1077         (WebKit::WebViewImpl::toggleAutomaticLinkDetection):
1078         (WebKit::WebViewImpl::setAutomaticTextReplacementEnabled):
1079         (WebKit::WebViewImpl::toggleAutomaticTextReplacement):
1080         (WebKit::WebViewImpl::uppercaseWord):
1081         (WebKit::WebViewImpl::lowercaseWord):
1082         (WebKit::WebViewImpl::capitalizeWord):
1083         Move spellcheck and related bits.
1084
1085 2015-10-29  Eric Carlson  <eric.carlson@apple.com>
1086
1087         Revert inadvertent changes
1088         https://bugs.webkit.org/show_bug.cgi?id=150694
1089
1090         Reviewed by Tim Horton.
1091
1092         * WebProcess/com.apple.WebProcess.sb.in:
1093
1094 2015-10-29  Alex Christensen  <achristensen@webkit.org>
1095
1096         CMake build fix.
1097
1098         * CMakeLists.txt:
1099         * PlatformMac.cmake:
1100         I mistakenly added some mac-specific files to the shared CMakeLists.txt.  This puts them in the right place.
1101         * UIProcess/WebPageProxy.cpp:
1102         (WebKit::WebPageProxy::viewWillStartLiveResize):
1103         (WebKit::WebPageProxy::viewDidLeaveWindow):
1104         (WebKit::WebPageProxy::didEndColorPicker):
1105         Add preprocessor enable checks.
1106
1107 2015-10-29  Tim Horton  <timothy_horton@apple.com>
1108
1109         WKView being inside WKWebView leads to weird API issues
1110         https://bugs.webkit.org/show_bug.cgi?id=150174
1111
1112         Reviewed by Darin Adler.
1113
1114         * UIProcess/API/mac/WKView.mm:
1115         (-[WKView browsingContextController]):
1116         (-[WKView validateUserInterfaceItem:]):
1117         (-[WKView saveBackForwardSnapshotForCurrentItem]):
1118         (-[WKView saveBackForwardSnapshotForItem:]):
1119         (-[WKView updateLayer]):
1120         (-[WKView minimumSizeForAutoLayout]):
1121         (-[WKView setMinimumSizeForAutoLayout:]):
1122         (-[WKView shouldExpandToViewHeightForAutoLayout]):
1123         (-[WKView setShouldExpandToViewHeightForAutoLayout:]):
1124         (-[WKView underlayColor]):
1125         (-[WKView setUnderlayColor:]):
1126         (-[WKView _setOverlayScrollbarStyle:]):
1127         (-[WKView _overlayScrollbarStyle]):
1128         (-[WKView _pageExtendedBackgroundColor]):
1129         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
1130         (-[WKView waitForAsyncDrawingAreaSizeUpdate]):
1131         (-[WKView isUsingUISideCompositing]):
1132         (createSelectorExceptionMap): Deleted.
1133         (commandNameForSelector): Deleted.
1134         (menuItem): Deleted.
1135         (toolbarItem): Deleted.
1136         (-[WKView _setUserInterfaceItemState:enabled:state:]): Deleted.
1137         * UIProcess/Cocoa/WebViewImpl.h:
1138         * UIProcess/Cocoa/WebViewImpl.mm:
1139         (WebKit::WebViewImpl::createDrawingAreaProxy):
1140         (WebKit::WebViewImpl::isUsingUISideCompositing):
1141         (WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate):
1142         (WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate):
1143         (WebKit::WebViewImpl::updateLayer):
1144         (WebKit::WebViewImpl::setMinimumSizeForAutoLayout):
1145         (WebKit::WebViewImpl::minimumSizeForAutoLayout):
1146         (WebKit::WebViewImpl::setShouldExpandToViewHeightForAutoLayout):
1147         (WebKit::WebViewImpl::shouldExpandToViewHeightForAutoLayout):
1148         (WebKit::WebViewImpl::setUnderlayColor):
1149         (WebKit::WebViewImpl::underlayColor):
1150         (WebKit::WebViewImpl::pageExtendedBackgroundColor):
1151         (WebKit::WebViewImpl::setOverlayScrollbarStyle):
1152         (WebKit::WebViewImpl::overlayScrollbarStyle):
1153         (WebKit::createSelectorExceptionMap):
1154         (WebKit::commandNameForSelector):
1155         (WebKit::WebViewImpl::executeSavedCommandBySelector):
1156         (WebKit::WebViewImpl::executeEditCommandForSelector):
1157         (WebKit::menuItem):
1158         (WebKit::toolbarItem):
1159         (WebKit::WebViewImpl::validateUserInterfaceItem):
1160         (WebKit::WebViewImpl::setUserInterfaceItemState):
1161         (WebKit::WebViewImpl::browsingContextController):
1162         (WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
1163         (WebKit::WebViewImpl::saveBackForwardSnapshotForItem):
1164         (WebKit::WebViewImpl::executeEditCommand): Deleted.
1165         Move UI validation and a grab-bag of other things.
1166
1167 2015-10-29  Alex Christensen  <achristensen@webkit.org>
1168
1169         Fix Mac CMake build
1170         https://bugs.webkit.org/show_bug.cgi?id=150686
1171
1172         Reviewed by Filip Pizlo.
1173
1174         * CMakeLists.txt:
1175         * PlatformMac.cmake:
1176
1177 2015-10-29  Commit Queue  <commit-queue@webkit.org>
1178
1179         Unreviewed, rolling out r191728.
1180         https://bugs.webkit.org/show_bug.cgi?id=150668
1181
1182         Caused a lot of timeouts in layout tests (Requested by KaL on
1183         #webkit).
1184
1185         Reverted changeset:
1186
1187         "[GTK] Use a persistent main loop source in RunLoop glib
1188         implementation"
1189         https://bugs.webkit.org/show_bug.cgi?id=150590
1190         http://trac.webkit.org/changeset/191728
1191
1192 2015-10-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1193
1194         [GTK] Use a persistent main loop source in RunLoop glib implementation
1195         https://bugs.webkit.org/show_bug.cgi?id=150590
1196
1197         Reviewed by Žan Doberšek.
1198
1199         Use RunLoop::dispatch() instead of
1200         GMainLoopSource::scheduleAndDeleteOnDestroy in a couple of simple
1201         cases.
1202
1203         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1204         (WebKit::NetworkCache::runTaskInQueue):
1205         * UIProcess/gtk/DragAndDropHandler.cpp:
1206         (WebKit::DragAndDropHandler::dragLeave):
1207
1208 2015-10-28  Tim Horton  <timothy_horton@apple.com>
1209
1210         Fix the build
1211
1212         * UIProcess/mac/PageClientImpl.mm:
1213         (WebKit::PageClientImpl::startWindowDrag):
1214         (WebKit::PageClientImpl::platformWindow):
1215
1216 2015-10-28  Tim Horton  <timothy_horton@apple.com>
1217
1218         WKView being inside WKWebView leads to weird API issues
1219         https://bugs.webkit.org/show_bug.cgi?id=150174
1220
1221         Reviewed by Anders Carlsson.
1222
1223         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
1224         (WKPageGetObjectRegistry):
1225         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1226         (-[WKBrowsingContextController _remoteObjectRegistry]):
1227         * UIProcess/API/mac/WKView.mm:
1228         (-[WKView dealloc]):
1229         (-[WKView _inspectorAttachmentView]):
1230         (-[WKView _setInspectorAttachmentView:]):
1231         (-[WKView windowOcclusionDetectionEnabled]):
1232         (-[WKView setWindowOcclusionDetectionEnabled:]):
1233         (-[WKView _setTotalHeightOfBanners:]):
1234         (-[WKView _totalHeightOfBanners]):
1235         (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
1236         (-[WKView _remoteObjectRegistry]): Deleted.
1237         (-[WKView _startWindowDrag]): Deleted.
1238         * UIProcess/API/mac/WKViewInternal.h:
1239         * UIProcess/Cocoa/WebViewImpl.h:
1240         (WebKit::WebViewImpl::setWindowOcclusionDetectionEnabled):
1241         (WebKit::WebViewImpl::windowOcclusionDetectionEnabled):
1242         (WebKit::WebViewImpl::setTotalHeightOfBanners):
1243         (WebKit::WebViewImpl::totalHeightOfBanners):
1244         * UIProcess/Cocoa/WebViewImpl.mm:
1245         (WebKit::WebViewImpl::window):
1246         (WebKit::WebViewImpl::setInspectorAttachmentView):
1247         (WebKit::WebViewImpl::inspectorAttachmentView):
1248         (WebKit::WebViewImpl::remoteObjectRegistry):
1249         (WebKit::WebViewImpl::destroyRemoteObjectRegistry):
1250         * UIProcess/PageClient.h:
1251         * UIProcess/WebPageProxy.h:
1252         * UIProcess/mac/PageClientImpl.h:
1253         * UIProcess/mac/PageClientImpl.mm:
1254         (WebKit::PageClientImpl::isViewVisible):
1255         (WebKit::PageClientImpl::createColorPicker):
1256         (WebKit::PageClientImpl::startWindowDrag):
1257         (WebKit::PageClientImpl::platformWindow):
1258         (WebKit::PageClientImpl::inspectorAttachmentView):
1259         (WebKit::PageClientImpl::remoteObjectRegistry):
1260         * UIProcess/mac/WebInspectorProxyMac.mm:
1261         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1262         (WebKit::WebInspectorProxy::platformCanAttach):
1263         (WebKit::WebInspectorProxy::platformBringToFront):
1264         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
1265         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
1266         (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
1267         (WebKit::WebInspectorProxy::platformAttach):
1268         (WebKit::WebInspectorProxy::platformDetach):
1269         (WebKit::WebInspectorProxy::platformStartWindowDrag):
1270         * UIProcess/mac/WebPageProxyMac.mm:
1271         (WebKit::WebPageProxy::startWindowDrag):
1272         (WebKit::WebPageProxy::platformWindow):
1273         (WebKit::WebPageProxy::inspectorAttachmentView):
1274         (WebKit::WebPageProxy::remoteObjectRegistry):
1275         (WebKit::WebPageProxy::wkView): Deleted.
1276         Get rid of the wkView() getters on PageClientImpl and WebPageProxy, because
1277         those can't be a thing in the brave new world. Instead, plumb the four
1278         callers through PageClient to WebViewImpl.
1279
1280         Also, move a few more things (banners, window occlusion).
1281
1282 2015-10-27  Anders Carlsson  <andersca@apple.com>
1283
1284         Stub out more of the context menu SPI
1285         https://bugs.webkit.org/show_bug.cgi?id=150606
1286
1287         Reviewed by Dan Bernstein.
1288
1289         Add a delegate method that will allow the client to modify the menu. Also,
1290         add an empty _WKContextMenuElementInfo class and its _WKElementInfo superclass.
1291
1292         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1293         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h: Added.
1294         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm: Added.
1295         * UIProcess/API/Cocoa/_WKElementInfo.h: Added.
1296         * UIProcess/API/Cocoa/_WKElementInfo.mm: Added.
1297         * UIProcess/Cocoa/UIDelegate.h:
1298         * UIProcess/Cocoa/UIDelegate.mm:
1299         (WebKit::UIDelegate::setDelegate):
1300         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
1301         (WebKit::UIDelegate::UIClient::createNewPage):
1302         * UIProcess/mac/WebContextMenuProxyMac.mm:
1303         (WebKit::WebContextMenuProxyMac::showContextMenu):
1304         * WebKit2.xcodeproj/project.pbxproj:
1305
1306 2015-10-28  Anders Carlsson  <andersca@apple.com>
1307
1308         Stop using ContextMenuItem::shareMenuItem in the UI process
1309         https://bugs.webkit.org/show_bug.cgi?id=150578
1310
1311         Reviewed by Tim Horton.
1312
1313         * UIProcess/mac/WebContextMenuProxyMac.h:
1314         * UIProcess/mac/WebContextMenuProxyMac.mm:
1315         (WebKit::WebContextMenuProxyMac::createShareMenuItem):
1316         (WebKit::WebContextMenuProxyMac::createContextMenuItem):
1317         (WebKit::WebContextMenuProxyMac::shareMenuItem): Deleted.
1318
1319 2015-10-28  Tim Horton  <timothy_horton@apple.com>
1320
1321         WKView being inside WKWebView leads to weird API issues
1322         https://bugs.webkit.org/show_bug.cgi?id=150174
1323
1324         Reviewed by Anders Carlsson.
1325
1326         * UIProcess/API/mac/WKView.mm:
1327         (-[WKView _superDoCommandBySelector:]):
1328         (-[WKView _createDrawingAreaProxy]): Deleted.
1329         (-[WKView _processDidExit]): Deleted.
1330         (-[WKView _pageClosed]): Deleted.
1331         (-[WKView _didRelaunchProcess]): Deleted.
1332         (-[WKView _convertToDeviceSpace:]): Deleted.
1333         (-[WKView _convertToUserSpace:]): Deleted.
1334         (-[WKView _executeSavedCommandBySelector:]): Deleted.
1335         (-[WKResponderChainSink initWithResponderChain:]): Deleted.
1336         (-[WKResponderChainSink detach]): Deleted.
1337         (-[WKResponderChainSink didReceiveUnhandledCommand]): Deleted.
1338         (-[WKResponderChainSink noResponderFor:]): Deleted.
1339         (-[WKResponderChainSink doCommandBySelector:]): Deleted.
1340         (-[WKResponderChainSink tryToPerform:with:]): Deleted.
1341         * UIProcess/API/mac/WKViewInternal.h:
1342         * UIProcess/Cocoa/WebViewImpl.h:
1343         * UIProcess/Cocoa/WebViewImpl.mm:
1344         (-[WKResponderChainSink initWithResponderChain:]):
1345         (-[WKResponderChainSink detach]):
1346         (-[WKResponderChainSink didReceiveUnhandledCommand]):
1347         (-[WKResponderChainSink noResponderFor:]):
1348         (-[WKResponderChainSink doCommandBySelector:]):
1349         (-[WKResponderChainSink tryToPerform:with:]):
1350         (WebKit::WebViewImpl::createDrawingAreaProxy):
1351         (WebKit::WebViewImpl::processDidExit):
1352         (WebKit::WebViewImpl::pageClosed):
1353         (WebKit::WebViewImpl::didRelaunchProcess):
1354         (WebKit::WebViewImpl::executeSavedCommandBySelector):
1355         (WebKit::WebViewImpl::resetGestureController): Deleted.
1356         * UIProcess/mac/PageClientImpl.mm:
1357         (WebKit::PageClientImpl::createDrawingAreaProxy):
1358         (WebKit::PageClientImpl::processDidExit):
1359         (WebKit::PageClientImpl::pageClosed):
1360         (WebKit::PageClientImpl::didRelaunchProcess):
1361         (WebKit::PageClientImpl::convertToDeviceSpace):
1362         (WebKit::PageClientImpl::convertToUserSpace):
1363         (WebKit::PageClientImpl::executeSavedCommandBySelector):
1364         Move most of the rest of WKViewInternal.h's methods to WebViewImpl.
1365
1366 2015-10-28  Alex Christensen  <achristensen@webkit.org>
1367
1368         Compile and link with CMake on Mac
1369         https://bugs.webkit.org/show_bug.cgi?id=150632
1370
1371         Reviewed by Tim Horton.
1372
1373         * CMakeLists.txt:
1374         * PlatformEfl.cmake:
1375         * PlatformGTK.cmake:
1376         * PlatformMac.cmake:
1377
1378 2015-10-27  Anders Carlsson  <andersca@apple.com>
1379
1380         Stub out more of the context menu SPI
1381         https://bugs.webkit.org/show_bug.cgi?id=150606
1382
1383         Reviewed by Dan Bernstein.
1384
1385         Add a delegate method that will allow the client to modify the menu. Also,
1386         add an empty _WKContextMenuElementInfo class and its _WKElementInfo superclass.
1387
1388         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1389         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h: Added.
1390         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm: Added.
1391         * UIProcess/API/Cocoa/_WKElementInfo.h: Added.
1392         * UIProcess/API/Cocoa/_WKElementInfo.mm: Added.
1393         * UIProcess/Cocoa/UIDelegate.h:
1394         * UIProcess/Cocoa/UIDelegate.mm:
1395         (WebKit::UIDelegate::setDelegate):
1396         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
1397         (WebKit::UIDelegate::UIClient::createNewPage):
1398         * UIProcess/mac/WebContextMenuProxyMac.mm:
1399         (WebKit::WebContextMenuProxyMac::showContextMenu):
1400         * WebKit2.xcodeproj/project.pbxproj:
1401
1402 2015-10-28  Chris Dumez  <cdumez@apple.com>
1403
1404         Use RunLoopTimer in DataURLDecoder to avoid issues related to runloops
1405         https://bugs.webkit.org/show_bug.cgi?id=150609
1406         <rdar://problem/22702894>
1407
1408         Reviewed by Antti Koivisto.
1409
1410         Move addSchedulePair() call to Page::platformInitialize() so that
1411         RunLoopTimer can be used by any Page, even those that don't have
1412         a WebPage wrapper.
1413
1414         * WebProcess/WebPage/mac/WebPageMac.mm:
1415         (WebKit::WebPage::platformInitialize): Deleted.
1416
1417 2015-10-27  Tim Horton  <timothy_horton@apple.com>
1418
1419         Fix the 32-bit build.
1420
1421         * UIProcess/Cocoa/WebViewImpl.mm:
1422         (WebKit::WebViewImpl::dragImageForView):
1423
1424 2015-10-27  Tim Horton  <timothy_horton@apple.com>
1425
1426         Fix the build.
1427
1428         * UIProcess/Cocoa/WebViewImpl.mm:
1429
1430 2015-10-27  Tim Horton  <timothy_horton@apple.com>
1431
1432         WKView being inside WKWebView leads to weird API issues
1433         https://bugs.webkit.org/show_bug.cgi?id=150174
1434
1435         Reviewed by Anders Carlsson.
1436
1437         * UIProcess/API/mac/WKView.mm:
1438         (-[WKView mouseDown:]):
1439         (-[WKView mouseUp:]):
1440         (-[WKView acceptsFirstMouse:]):
1441         (-[WKView shouldDelayWindowOrderingForEvent:]):
1442         (-[WKView pasteboardChangedOwner:]):
1443         (-[WKView pasteboard:provideDataForType:]):
1444         (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
1445         (-[WKView _startWindowDrag]):
1446         (-[WKView _setMouseDownEvent:]): Deleted.
1447         (-[WKView _colorSpace]): Deleted.
1448         (-[WKView _dragImageForView:withImage:at:linkDrag:]): Deleted.
1449         (matchesExtensionOrEquivalent): Deleted.
1450         (-[WKView _setFileAndURLTypes:withExtension:withTitle:withURL:withVisibleURL:forPasteboard:]): Deleted.
1451         (-[WKView _setPromisedDataForImage:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]): Deleted.
1452         (-[WKView _setPromisedDataForAttachment:withExtension:withTitle:withURL:withVisibleURL:forPasteboard:]): Deleted.
1453         (fileExists): Deleted.
1454         (pathWithUniqueFilenameForPath): Deleted.
1455         (-[WKView spellCheckerDocumentTag]): Deleted.
1456         (-[WKView handleAcceptedAlternativeText:]): Deleted.
1457         (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
1458         * UIProcess/API/mac/WKViewInternal.h:
1459         * UIProcess/Cocoa/WebViewImpl.h:
1460         * UIProcess/Cocoa/WebViewImpl.mm:
1461         (WebKit::WebViewImpl::handleAcceptedAlternativeText):
1462         (WebKit::WebViewImpl::spellCheckerDocumentTag):
1463         (WebKit::WebViewImpl::startWindowDrag):
1464         (WebKit::WebViewImpl::dragImageForView):
1465         (WebKit::matchesExtensionOrEquivalent):
1466         (WebKit::WebViewImpl::setFileAndURLTypes):
1467         (WebKit::WebViewImpl::setPromisedDataForImage):
1468         (WebKit::WebViewImpl::setPromisedDataForAttachment):
1469         (WebKit::WebViewImpl::pasteboardChangedOwner):
1470         (WebKit::WebViewImpl::provideDataForPasteboard):
1471         (WebKit::fileExists):
1472         (WebKit::pathWithUniqueFilenameForPath):
1473         (WebKit::WebViewImpl::namesOfPromisedFilesDroppedAtDestination):
1474         (WebKit::WebViewImpl::setLastMouseDownEvent):
1475         * UIProcess/mac/CorrectionPanel.h:
1476         * UIProcess/mac/CorrectionPanel.mm:
1477         (WebKit::CorrectionPanel::show):
1478         (WebKit::CorrectionPanel::recordAutocorrectionResponse):
1479         (WebKit::CorrectionPanel::handleAcceptedReplacement):
1480         * UIProcess/mac/PageClientImpl.mm:
1481         (WebKit::PageClientImpl::colorSpace):
1482         (WebKit::PageClientImpl::setDragImage):
1483         (WebKit::PageClientImpl::setPromisedDataForImage):
1484         (WebKit::PageClientImpl::setPromisedDataForAttachment):
1485         (WebKit::PageClientImpl::showCorrectionPanel):
1486         (WebKit::PageClientImpl::recordAutocorrectionResponse):
1487         (WebKit::PageClientImpl::showDictationAlternativeUI):
1488         Move some pasteboard and spellcheck code.
1489
1490 2015-10-27  Wenson Hsieh  <wenson_hsieh@apple.com>
1491
1492         Implement viewport-width-based fast-click heuristic
1493         https://bugs.webkit.org/show_bug.cgi?id=150604
1494         <rdar://problem/23267308>
1495
1496         Reviewed by Simon Fraser.
1497
1498         Implement a new fast-click heuristic that applies to viewports with width = device-width. The basic rules are
1499         as follows: when a page has viewport width = device-width and is at initial zoom scale, we disable double-tapping
1500         in favor of fast-clicking. However, if the viewport scale is not the initial scale, we allow double tapping. For
1501         fast-clicking to remain useful after the user pinch-zooms, we change our double-tap to zoom out behavior to zoom
1502         to the initial scale rather than the minimum scale. For unscalable viewports, we default to fast-clicking behavior,
1503         and for all other viewports not at device-width, we double-tap to zoom and scroll as normal.
1504
1505         This patch removes some logic previously used for our scroll- and zoom-based fast-clicking heuristic, and adds
1506         information about the viewport width and initial scale to RemoteLayerTreeTransactions. This information is then
1507         used by the UI process to determine whether double tapping should be disabled or enabled.
1508
1509         The fast-click heuristic can be turned off through user default preferences, and a tap highlight for debugging
1510         fast-clicking can also be enabled through a user default preference. A red highlight indicates that a single-
1511         tap was slow, whereas a green highlight indicates a fast single-tap.
1512
1513         * Shared/mac/RemoteLayerTreeTransaction.h:
1514         (WebKit::RemoteLayerTreeTransaction::initialScaleFactor):
1515         (WebKit::RemoteLayerTreeTransaction::setInitialScaleFactor):
1516         (WebKit::RemoteLayerTreeTransaction::viewportMetaTagWidth):
1517         (WebKit::RemoteLayerTreeTransaction::setViewportMetaTagWidth):
1518         * Shared/mac/RemoteLayerTreeTransaction.mm:
1519         (WebKit::RemoteLayerTreeTransaction::encode):
1520         (WebKit::RemoteLayerTreeTransaction::decode):
1521         * UIProcess/API/Cocoa/WKWebView.mm:
1522         (-[WKWebView initWithFrame:configuration:]):
1523         (-[WKWebView _processDidExit]):
1524         (-[WKWebView _didCommitLayerTree:]):
1525         (-[WKWebView _zoomToInitialScaleWithOrigin:animated:]):
1526         (-[WKWebView _allowsDoubleTapGestures]):
1527         (-[WKWebView _setViewportMetaTagWidth:]): Deleted.
1528         (-[WKWebView _contentZoomScale]): Deleted.
1529         (-[WKWebView _viewportMetaTagWidth]): Deleted.
1530         (-[WKWebView _viewportIsUserScalable]): Deleted.
1531         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1532         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1533         * UIProcess/PageClient.h:
1534         * UIProcess/WebPageProxy.h:
1535         * UIProcess/WebPageProxy.messages.in:
1536         * UIProcess/ios/PageClientImplIOS.h:
1537         * UIProcess/ios/PageClientImplIOS.mm:
1538         (WebKit::PageClientImpl::disableDoubleTapGesturesDuringTapIfNecessary):
1539         (WebKit::PageClientImpl::didChangeViewportMetaTagWidth): Deleted.
1540         (WebKit::PageClientImpl::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary): Deleted.
1541         * UIProcess/ios/SmartMagnificationController.h:
1542         * UIProcess/ios/SmartMagnificationController.mm:
1543         (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
1544         * UIProcess/ios/WKContentView.h:
1545         * UIProcess/ios/WKContentView.mm:
1546         (-[WKContentView _zoomToInitialScaleWithOrigin:]):
1547         * UIProcess/ios/WKContentViewInteraction.h:
1548         * UIProcess/ios/WKContentViewInteraction.mm:
1549         (-[WKContentView setupInteraction]):
1550         (-[WKContentView _showTapHighlight]):
1551         (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
1552         (-[WKContentView _mayDisableDoubleTapGesturesDuringSingleTap]):
1553         (-[WKContentView _disableDoubleTapGesturesDuringTapIfNecessary:]):
1554         (-[WKContentView _finishInteraction]):
1555         (-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
1556         (-[WKContentView _tapHighlightColorForFastClick:]):
1557         (-[WKContentView _setDoubleTapGesturesEnabled:]):
1558         (-[WKContentView _fastClickZoomThreshold]): Deleted.
1559         (-[WKContentView _allowDoubleTapToZoomForCurrentZoomScale:andTargetZoomScale:]): Deleted.
1560         (-[WKContentView _disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:allowsDoubleTapZoom:targetRect:isReplaced:minimumScale:maximumScale:]): Deleted.
1561         * UIProcess/ios/WebPageProxyIOS.mm:
1562         (WebKit::WebPageProxy::disableDoubleTapGesturesDuringTapIfNecessary):
1563         (WebKit::WebPageProxy::viewportMetaTagWidthDidChange): Deleted.
1564         (WebKit::WebPageProxy::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary): Deleted.
1565         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
1566         * WebProcess/WebPage/WebPage.cpp:
1567         (WebKit::WebPage::willCommitLayerTree):
1568         * WebProcess/WebPage/ios/WebPageIOS.mm:
1569         (WebKit::WebPage::potentialTapAtPosition):
1570         (WebKit::WebPage::viewportPropertiesDidChange): Deleted.
1571
1572 2015-10-27  Tim Horton  <timothy_horton@apple.com>
1573
1574         WKView being inside WKWebView leads to weird API issues
1575         https://bugs.webkit.org/show_bug.cgi?id=150174
1576
1577         Reviewed by Anders Carlsson.
1578
1579         * UIProcess/API/mac/WKView.mm:
1580         (-[WKView _superAccessibilityAttributeValue:]):
1581         (-[WKView accessibilityFocusedUIElement]):
1582         (-[WKView accessibilityIsIgnored]):
1583         (-[WKView accessibilityHitTest:]):
1584         (-[WKView accessibilityAttributeValue:]):
1585         (-[WKView _processDidExit]):
1586         (-[WKView _pageClosed]):
1587         (-[WKView _updateRemoteAccessibilityRegistration:]): Deleted.
1588         (-[WKView enableAccessibilityIfNecessary]): Deleted.
1589         (-[WKView _toolTipChangedFrom:to:]): Deleted.
1590         (-[WKView _setAccessibilityWebProcessToken:]): Deleted.
1591         (-[WKView _hasFullScreenWindowController]): Deleted.
1592         (-[WKView _fullScreenWindowController]): Deleted.
1593         (-[WKView _closeFullScreenWindowController]): Deleted.
1594         (-[WKView _setSuppressVisibilityUpdates:]): Deleted.
1595         (-[WKView _suppressVisibilityUpdates]): Deleted.
1596         (-[WKView _primaryTrackingArea]): Deleted.
1597         (-[WKView _setPrimaryTrackingArea:]): Deleted.
1598         (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
1599         * UIProcess/API/mac/WKViewInternal.h:
1600         * UIProcess/Cocoa/WebViewImpl.h:
1601         (WebKit::WebViewImpl::accessibilityIsIgnored):
1602         (WebKit::WebViewImpl::primaryTrackingArea):
1603         * UIProcess/Cocoa/WebViewImpl.mm:
1604         (WebKit::trackingAreaOptions):
1605         (WebKit::WebViewImpl::WebViewImpl):
1606         (WebKit::WebViewImpl::setAccessibilityWebProcessToken):
1607         (WebKit::WebViewImpl::updateRemoteAccessibilityRegistration):
1608         (WebKit::WebViewImpl::accessibilityFocusedUIElement):
1609         (WebKit::WebViewImpl::accessibilityHitTest):
1610         (WebKit::WebViewImpl::enableAccessibilityIfNecessary):
1611         (WebKit::WebViewImpl::accessibilityAttributeValue):
1612         (WebKit::WebViewImpl::setPrimaryTrackingArea):
1613         (WebKit::WebViewImpl::toolTipChanged):
1614         * UIProcess/mac/PageClientImpl.mm:
1615         (WebKit::PageClientImpl::toolTipChanged):
1616         (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
1617         (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
1618         (WebKit::PageClientImpl::closeFullScreenManager):
1619         (WebKit::PageClientImpl::isFullScreen):
1620         (WebKit::PageClientImpl::enterFullScreen):
1621         (WebKit::PageClientImpl::exitFullScreen):
1622         (WebKit::PageClientImpl::beganEnterFullScreen):
1623         (WebKit::PageClientImpl::beganExitFullScreen):
1624         Move accessibility code, and fold in some internal-only methods.
1625
1626 2015-10-27  Tim Horton  <timothy_horton@apple.com>
1627
1628         WKView being inside WKWebView leads to weird API issues
1629         https://bugs.webkit.org/show_bug.cgi?id=150174
1630
1631         Reviewed by Anders Carlsson.
1632
1633         * UIProcess/API/mac/WKView.mm:
1634         (-[WKView scrollWheel:]):
1635         (-[WKView swipeWithEvent:]):
1636         (-[WKView _superSwipeWithEvent:]):
1637         (-[WKView _superMagnifyWithEvent:]):
1638         (-[WKView _superSmartMagnifyWithEvent:]):
1639         (-[WKView _processDidExit]):
1640         (-[WKView setAllowsBackForwardNavigationGestures:]):
1641         (-[WKView allowsBackForwardNavigationGestures]):
1642         (-[WKView setAllowsMagnification:]):
1643         (-[WKView allowsMagnification]):
1644         (-[WKView magnifyWithEvent:]):
1645         (-[WKView rotateWithEvent:]):
1646         (-[WKView _gestureEventWasNotHandledByWebCore:]):
1647         (-[WKView smartMagnifyWithEvent:]):
1648         (-[WKView setMagnification:centeredAtPoint:]):
1649         (-[WKView setMagnification:]):
1650         (-[WKView magnification]):
1651         (-[WKView _setCustomSwipeViews:]):
1652         (-[WKView _setCustomSwipeViewsTopContentInset:]):
1653         (-[WKView _tryToSwipeWithEvent:ignoringPinnedState:]):
1654         (-[WKView _setDidMoveSwipeSnapshotCallback:]):
1655         (-[WKView _ensureGestureController]): Deleted.
1656         (takeWindowSnapshot): Deleted.
1657         (-[WKView _takeViewSnapshot]): Deleted.
1658         (-[WKView _wheelEventWasNotHandledByWebCore:]): Deleted.
1659         (-[WKView _didFirstVisuallyNonEmptyLayoutForMainFrame]): Deleted.
1660         (-[WKView _didFinishLoadForMainFrame]): Deleted.
1661         (-[WKView _didFailLoadForMainFrame]): Deleted.
1662         (-[WKView _didSameDocumentNavigationForMainFrame:]): Deleted.
1663         (-[WKView _removeNavigationGestureSnapshot]): Deleted.
1664         * UIProcess/API/mac/WKViewInternal.h:
1665         * UIProcess/Cocoa/WebViewImpl.h:
1666         (WebKit::WebViewImpl::gestureController):
1667         (WebKit::WebViewImpl::allowsBackForwardNavigationGestures):
1668         (WebKit::WebViewImpl::allowsMagnification):
1669         * UIProcess/Cocoa/WebViewImpl.mm:
1670         (WebKit::takeWindowSnapshot):
1671         (WebKit::WebViewImpl::takeViewSnapshot):
1672         (WebKit::WebViewImpl::ensureGestureController):
1673         (WebKit::WebViewImpl::resetGestureController):
1674         (WebKit::WebViewImpl::setAllowsBackForwardNavigationGestures):
1675         (WebKit::WebViewImpl::setAllowsMagnification):
1676         (WebKit::WebViewImpl::setMagnification):
1677         (WebKit::WebViewImpl::magnification):
1678         (WebKit::WebViewImpl::setCustomSwipeViews):
1679         (WebKit::WebViewImpl::setCustomSwipeViewsTopContentInset):
1680         (WebKit::WebViewImpl::tryToSwipeWithEvent):
1681         (WebKit::WebViewImpl::setDidMoveSwipeSnapshotCallback):
1682         (WebKit::WebViewImpl::scrollWheel):
1683         (WebKit::WebViewImpl::swipeWithEvent):
1684         (WebKit::WebViewImpl::magnifyWithEvent):
1685         (WebKit::WebViewImpl::smartMagnifyWithEvent):
1686         (WebKit::WebViewImpl::rotateWithEvent):
1687         (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCore):
1688         (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCoreFromViewOnly):
1689         * UIProcess/mac/PageClientImpl.mm:
1690         (WebKit::PageClientImpl::takeViewSnapshot):
1691         (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
1692         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
1693         (WebKit::PageClientImpl::didFinishLoadForMainFrame):
1694         (WebKit::PageClientImpl::didFailLoadForMainFrame):
1695         (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
1696         (WebKit::PageClientImpl::removeNavigationGestureSnapshot):
1697         Move swipe, zoom, rotate, and snapshotting code.
1698
1699 2015-10-27  Zhuo Li  <zachli@apple.com>
1700
1701         Add WebKit API to clear data type Search Field Recent Searches.
1702         https://bugs.webkit.org/show_bug.cgi?id=150019.
1703
1704         Reviewed by Anders Carlsson.
1705
1706         * Shared/WebsiteData/WebsiteDataTypes.h: Add data type Search Field Recent Searches.
1707         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
1708         (dataTypesToString): Ditto.
1709         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
1710         (WebKit::toWebsiteDataTypes): Ditto.
1711         (WebKit::toWKWebsiteDataTypes): Ditto.
1712         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h: Ditto.
1713         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1714         (WebKit::WebsiteDataStore::removeData): Handle the case when data type is Search
1715         Field Recent Searches.
1716         * UIProcess/WebsiteData/WebsiteDataStore.h: Add a private function for removing
1717         recent searches based on time.
1718         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
1719         (WebKit::WebsiteDataStoreCocoa::platformRemoveRecentSearches): Call the removing
1720         recent searches logic in WebCore.
1721         * UIProcess/efl/WebPageProxyEfl.cpp:
1722         (WebKit::WebsiteDataStore::platformRemoveRecentSearches): Not implemented.
1723         * UIProcess/gtk/WebPageProxyGtk.cpp:
1724         (WebKit::WebsiteDataStore::platformRemoveRecentSearches): Not implemented.
1725
1726 2015-10-26  Brady Eidson  <beidson@apple.com>
1727
1728         Make IDBKeyData from a struct to a class.
1729         https://bugs.webkit.org/show_bug.cgi?id=150576
1730
1731         Reviewed by Alex Christensen.
1732
1733         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
1734         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
1735         * DatabaseProcess/IndexedDB/IDBSerialization.h:
1736         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1737         (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
1738         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1739         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1740         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
1741         (WebKit::buildIndexStatement):
1742         (WebKit::buildObjectStoreStatement):
1743         (WebKit::SQLiteIDBCursor::establishStatement):
1744         (WebKit::SQLiteIDBCursor::createSQLiteStatement):
1745         (WebKit::SQLiteIDBCursor::resetAndRebindStatement):
1746         (WebKit::SQLiteIDBCursor::iterate):
1747         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1748         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
1749         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1750         (WebKit::WebIDBServerConnection::didPutRecord):
1751         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1752         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
1753
1754 2015-10-26  Philip Chimento  <philip.chimento@gmail.com>
1755
1756         [GTK] [Stable] InstallMissingMediaPluginsPermissionRequest not defined when building without GStreamer
1757         https://bugs.webkit.org/show_bug.cgi?id=148607
1758
1759         Unreviewed, build fix.
1760
1761         * UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.h:
1762         Add a stub for the InstallMissingMediaPluginsPermissionRequest class
1763         for the case when video is disabled or not using GStreamer. It's OK
1764         that this class does nothing, because the associated C API contains
1765         an assert_not_reached if video is disabled. We just need to define
1766         the symbol so that the function signature will compile.
1767
1768 2015-10-26  Anders Carlsson  <andersca@apple.com>
1769
1770         Pipe custom context menu handling through to the UIDelegate object
1771         https://bugs.webkit.org/show_bug.cgi?id=150572
1772
1773         Reviewed by Tim Horton.
1774
1775         * UIProcess/API/APIContextMenuClient.h:
1776         (API::ContextMenuClient::menuFromProposedMenu):
1777         * UIProcess/API/Cocoa/WKWebView.mm:
1778         (-[WKWebView setUIDelegate:]):
1779         * UIProcess/Cocoa/UIDelegate.h:
1780         * UIProcess/Cocoa/UIDelegate.mm:
1781         (WebKit::UIDelegate::createContextMenuClient):
1782         (WebKit::UIDelegate::ContextMenuClient::ContextMenuClient):
1783         (WebKit::UIDelegate::ContextMenuClient::~ContextMenuClient):
1784         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
1785         * UIProcess/mac/WebContextMenuProxyMac.mm:
1786         (WebKit::WebContextMenuProxyMac::showContextMenu):
1787
1788 2015-10-26  Tim Horton  <timothy_horton@apple.com>
1789
1790         WKView being inside WKWebView leads to weird API issues
1791         https://bugs.webkit.org/show_bug.cgi?id=150174
1792
1793         Reviewed by Anders Carlsson.
1794
1795         * UIProcess/API/mac/WKView.mm:
1796         (-[WKView mouseDown:]):
1797         (-[WKView mouseDragged:]):
1798         (-[WKView draggedImage:endedAt:operation:]):
1799         (-[WKView draggingEntered:]):
1800         (-[WKView draggingUpdated:]):
1801         (-[WKView draggingExited:]):
1802         (-[WKView prepareForDragOperation:]):
1803         (-[WKView performDragOperation:]):
1804         (-[WKView _hitTest:dragTypes:]):
1805         (-[WKView initWithFrame:processPool:configuration:webView:]):
1806         (-[WKView applicationFlags:]): Deleted.
1807         (maybeCreateSandboxExtensionFromPasteboard): Deleted.
1808         (createSandboxExtensionsForFileUpload): Deleted.
1809         (-[WKView _registerDraggedTypes]): Deleted.
1810         * UIProcess/Cocoa/WebViewImpl.h:
1811         (WebKit::WebViewImpl::ignoresMouseDraggedEvents):
1812         * UIProcess/Cocoa/WebViewImpl.mm:
1813         (WebKit::WebViewImpl::setIgnoresMouseDraggedEvents):
1814         (WebKit::WebViewImpl::draggedImage):
1815         (WebKit::applicationFlagsForDrag):
1816         (WebKit::WebViewImpl::draggingEntered):
1817         (WebKit::WebViewImpl::draggingUpdated):
1818         (WebKit::WebViewImpl::draggingExited):
1819         (WebKit::WebViewImpl::prepareForDragOperation):
1820         (WebKit::maybeCreateSandboxExtensionFromPasteboard):
1821         (WebKit::createSandboxExtensionsForFileUpload):
1822         (WebKit::WebViewImpl::performDragOperation):
1823         (WebKit::WebViewImpl::hitTestForDragTypes):
1824         (WebKit::WebViewImpl::registerDraggedTypes):
1825         Move some drag-related things to WebViewImpl.
1826
1827 2015-10-26  Anders Carlsson  <andersca@apple.com>
1828
1829         Pipe custom context menu handling through to the UIDelegate object
1830         https://bugs.webkit.org/show_bug.cgi?id=150572
1831
1832         Reviewed by Tim Horton.
1833
1834         * UIProcess/API/APIContextMenuClient.h:
1835         (API::ContextMenuClient::menuFromProposedMenu):
1836         * UIProcess/API/Cocoa/WKWebView.mm:
1837         (-[WKWebView setUIDelegate:]):
1838         * UIProcess/Cocoa/UIDelegate.h:
1839         * UIProcess/Cocoa/UIDelegate.mm:
1840         (WebKit::UIDelegate::createContextMenuClient):
1841         (WebKit::UIDelegate::ContextMenuClient::ContextMenuClient):
1842         (WebKit::UIDelegate::ContextMenuClient::~ContextMenuClient):
1843         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
1844         * UIProcess/mac/WebContextMenuProxyMac.mm:
1845         (WebKit::WebContextMenuProxyMac::showContextMenu):
1846
1847 2015-10-26  Alex Christensen  <achristensen@webkit.org>
1848
1849         Build fix when using NETWORK_SESSION after r191457.
1850
1851         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1852         (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
1853         Use resourceResponse.
1854
1855 2015-10-26  Anders Carlsson  <andersca@apple.com>
1856
1857         Remove more dead context menu code
1858         https://bugs.webkit.org/show_bug.cgi?id=150569
1859
1860         Reviewed by Tim Horton.
1861
1862         * UIProcess/API/APIContextMenuClient.h:
1863         (API::ContextMenuClient::contextMenuDismissed): Deleted.
1864         * UIProcess/API/C/WKPage.cpp:
1865         (WKPageSetPageContextMenuClient): Deleted.
1866
1867 2015-10-26  Anders Carlsson  <andersca@apple.com>
1868
1869         Remove dead context menu code
1870         https://bugs.webkit.org/show_bug.cgi?id=150567
1871
1872         Reviewed by Tim Horton.
1873
1874         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1875         (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems): Deleted.
1876         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
1877
1878 2015-10-26  Tim Horton  <timothy_horton@apple.com>
1879
1880         Don't expose the whitelist/blacklist in _WKUserStyleSheet
1881         https://bugs.webkit.org/show_bug.cgi?id=150566
1882
1883         Reviewed by Anders Carlsson.
1884
1885         * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
1886         * UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
1887         (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:]):
1888         (toWTFStrings): Deleted.
1889         (-[_WKUserStyleSheet initWithSource:whitelistedURLPatterns:blacklistedURLPatterns:forMainFrameOnly:]): Deleted.
1890         (-[_WKUserStyleSheet whitelistedURLPatterns]): Deleted.
1891         (-[_WKUserStyleSheet blacklistedURLPatterns]): Deleted.
1892
1893 2015-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1894
1895         Unreviewed. Fix GTK+ build after r191543.
1896
1897         * UIProcess/API/gtk/WebKitWebView.cpp:
1898         (webkit_web_view_run_javascript):
1899         (resourcesStreamReadCallback):
1900
1901 2015-10-24  Tim Horton  <timothy_horton@apple.com>
1902
1903         Add a way to add user style sheets to WKUserContentController
1904         https://bugs.webkit.org/show_bug.cgi?id=150531
1905         <rdar://problem/23191691>
1906
1907         Reviewed by Darin Adler.
1908
1909         * Shared/API/APIObject.h:
1910         * Shared/Cocoa/APIObject.mm:
1911         (API::Object::newObject):
1912         Boilerplate for a new API::UserStyleSheet.
1913
1914         * UIProcess/API/APIUserStyleSheet.cpp: Added.
1915         (API::generateIdentifier):
1916         (API::UserStyleSheet::generateUniqueURL):
1917         * UIProcess/API/APIUserStyleSheet.h: Added.
1918         Added API::UserStyleSheet, borrowing URL generation code from API::UserScript.
1919
1920         * UIProcess/API/Cocoa/WKUserContentController.mm:
1921         (-[WKUserContentController _addUserStyleSheet:]):
1922         (-[WKUserContentController _removeAllUserStyleSheets]):
1923         Forward add and remove-all to WebUserContentControllerProxy.
1924
1925         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
1926         * UIProcess/API/Cocoa/_WKUserStyleSheet.h: Added.
1927         * UIProcess/API/Cocoa/_WKUserStyleSheet.mm: Added.
1928         (toWTFStrings):
1929         (-[_WKUserStyleSheet initWithSource:whitelistedURLPatterns:blacklistedURLPatterns:forMainFrameOnly:]):
1930         (-[_WKUserStyleSheet source]):
1931         (-[_WKUserStyleSheet isForMainFrameOnly]):
1932         (-[_WKUserStyleSheet copyWithZone:]):
1933         (-[_WKUserStyleSheet _apiObject]):
1934         * UIProcess/API/Cocoa/_WKUserStyleSheetInternal.h: Added.
1935         (API::wrapper):
1936         * WebKit2.xcodeproj/project.pbxproj:
1937         Add the new modern API object (as SPI for now).
1938
1939 2015-10-24  Tim Horton  <timothy_horton@apple.com>
1940
1941         Expose more information about the exception in WKErrorJavaScriptExceptionOccurred errors
1942         https://bugs.webkit.org/show_bug.cgi?id=150525
1943
1944         Reviewed by Darin Adler.
1945
1946         * Scripts/webkit/messages.py:
1947         (headers_for_type):
1948         * Shared/WebCoreArgumentCoders.cpp:
1949         (IPC::ArgumentCoder<ExceptionDetails>::encode):
1950         (IPC::ArgumentCoder<ExceptionDetails>::decode):
1951         * Shared/WebCoreArgumentCoders.h:
1952         Learn how to en/decode ExceptionDetails.
1953
1954         * UIProcess/API/C/WKPage.cpp:
1955         (WKPageRunJavaScriptInMainFrame):
1956         * UIProcess/WebPageProxy.cpp:
1957         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
1958         (WebKit::WebPageProxy::scriptValueCallback):
1959         * UIProcess/WebPageProxy.h:
1960         * UIProcess/WebPageProxy.messages.in:
1961         * WebProcess/WebPage/WebPage.cpp:
1962         (WebKit::WebPage::runJavaScriptInMainFrame):
1963         Plumb ExceptionDetails back through runJavaScriptInMainFrame, across the
1964         process boundary.
1965
1966         * UIProcess/API/Cocoa/WKError.mm:
1967         (localizedDescriptionForErrorCode):
1968         * UIProcess/API/Cocoa/WKErrorInternal.h:
1969         * UIProcess/API/Cocoa/WKErrorPrivate.h:
1970         Expose localizedDescriptionForErrorCode so that WKWebView can do special
1971         things with its error.
1972         Add new private userInfo keys for exception info.
1973
1974         * UIProcess/API/Cocoa/WKWebView.mm:
1975         (-[WKWebView evaluateJavaScript:completionHandler:]):
1976         Fill in the NSError userInfo with the exception info.
1977
1978 2015-10-24  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1979
1980         [EFL] Fix a wrong enum variable use
1981         https://bugs.webkit.org/show_bug.cgi?id=150522
1982
1983         Reviewed by Csaba Osztrogonác.
1984
1985         * UIProcess/API/efl/EwkView.cpp:
1986         (EwkView::requestPopupMenu):
1987         Use kWKPopupItemTextDirectionLTR instead of EWK_TEXT_DIRECTION_LEFT_TO_RIGHT.
1988
1989 2015-10-24  Dan Bernstein  <mitz@apple.com>
1990
1991         [Cocoa] _WKFormInputSession should provide access to the focused element info
1992         https://bugs.webkit.org/show_bug.cgi?id=150512
1993
1994         Reviewed by Tim Horton.
1995
1996         * UIProcess/API/Cocoa/_WKFormInputSession.h: Added focusedElementInfo property to the
1997           protocol.
1998
1999         * UIProcess/ios/WKContentViewInteraction.mm:
2000         (-[WKFormInputSession initWithContentView:focusedElementInfo:userObject:]): Added the
2001           focusedElementInfo argument, used to initialize a new ivar.
2002         (-[WKFormInputSession focusedElementInfo]): Added this getter for the new
2003           _WKFormInputSession property.
2004         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
2005           Create the WKFocusedElementInfo unconditionally and pass it to the new WKFormInputSession
2006           initializer.
2007
2008 2015-10-24  Dan Bernstein  <mitz@apple.com>
2009
2010         [iOS] Allow clients to specify a custom input view to be used for a form input session
2011         https://bugs.webkit.org/show_bug.cgi?id=150395
2012
2013         Reviewed by Tim Horton.
2014
2015         * UIProcess/API/Cocoa/_WKFormInputSession.h: Added customInputView property to the protocol.
2016
2017         * UIProcess/ios/WKContentViewInteraction.mm:
2018         (-[WKFormInputSession customInputView]): Added this getter.
2019         (-[WKFormInputSession setCustomInputView:]): Added this setter, which reloads the input
2020           views when the custom input view changes.
2021         (-[WKContentView inputView]): Changed to return the custom view from the input session if
2022           there is one.
2023
2024 2015-10-23  Alex Christensen  <achristensen@webkit.org>
2025
2026         Fix CMake compile error and add correct null check
2027         https://bugs.webkit.org/show_bug.cgi?id=150520
2028
2029         Reviewed by Simon Fraser.
2030
2031         * UIProcess/API/Cocoa/WKWebView.mm:
2032         (-[WKWebView _doAfterNextPresentationUpdate:]):
2033
2034 2015-10-23  Alex Christensen  <achristensen@webkit.org>
2035
2036         Progress towards CMake on Mac
2037         https://bugs.webkit.org/show_bug.cgi?id=150517
2038
2039         Reviewed by Tim Horton.
2040
2041         * CMakeLists.txt:
2042         * PlatformEfl.cmake:
2043         * PlatformGTK.cmake:
2044         * PlatformMac.cmake:
2045         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp: Removed.
2046         * WebProcess/Cookies/curl/WebCookieManagerCurl.cpp: Removed.
2047
2048 2015-10-23  Tim Horton  <timothy_horton@apple.com>
2049
2050         WKView being inside WKWebView leads to weird API issues
2051         https://bugs.webkit.org/show_bug.cgi?id=150174
2052
2053         * UIProcess/Cocoa/WebViewImpl.h:
2054         Whoops.
2055
2056 2015-10-23  Tim Horton  <timothy_horton@apple.com>
2057
2058         WKView being inside WKWebView leads to weird API issues
2059         https://bugs.webkit.org/show_bug.cgi?id=150174
2060
2061         Reviewed by Anders Carlsson.
2062
2063         * UIProcess/API/mac/WKView.mm:
2064         (-[WKView hitTest:]):
2065         (-[WKView _processDidExit]):
2066         (-[WKView _setThumbnailView:]):
2067         (-[WKView _thumbnailView]):
2068         (-[WKFlippedView isFlipped]): Deleted.
2069         (-[WKView dealloc]): Deleted.
2070         (-[WKView _setAcceleratedCompositingModeRootLayer:]): Deleted.
2071         (-[WKView _acceleratedCompositingModeRootLayer]): Deleted.
2072         (-[WKView _updateThumbnailViewLayer]): Deleted.
2073         (-[WKView _reparentLayerTreeInThumbnailView]): Deleted.
2074         * UIProcess/API/mac/WKViewInternal.h:
2075         * UIProcess/Cocoa/WebViewImpl.h:
2076         (WebKit::WebViewImpl::acceleratedCompositingRootLayer):
2077         (WebKit::WebViewImpl::layerHostingView):
2078         (WebKit::WebViewImpl::thumbnailView):
2079         * UIProcess/Cocoa/WebViewImpl.mm:
2080         (-[WKFlippedView isFlipped]):
2081         (WebKit::WebViewImpl::~WebViewImpl):
2082         (WebKit::WebViewImpl::setAcceleratedCompositingRootLayer):
2083         (WebKit::WebViewImpl::setThumbnailView):
2084         (WebKit::WebViewImpl::reparentLayerTreeInThumbnailView):
2085         (WebKit::WebViewImpl::updateThumbnailViewLayer):
2086         * UIProcess/mac/PageClientImpl.mm:
2087         (WebKit::PageClientImpl::enterAcceleratedCompositingMode):
2088         (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
2089         (WebKit::PageClientImpl::updateAcceleratedCompositingMode):
2090         (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
2091         (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
2092         Move accelerated compositing and thumbnail view code.
2093
2094 2015-10-23  Tim Horton  <timothy_horton@apple.com>
2095
2096         WKView being inside WKWebView leads to weird API issues
2097         https://bugs.webkit.org/show_bug.cgi?id=150174
2098
2099         Reviewed by Anders Carlsson.
2100
2101         * UIProcess/API/mac/WKView.mm:
2102         (-[WKView _superRemoveTrackingRect:]):
2103         (-[WKView addTrackingRect:owner:userData:assumeInside:]):
2104         (-[WKView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]):
2105         (-[WKView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]):
2106         (-[WKView removeTrackingRect:]):
2107         (-[WKView _removeTrackingRects:count:]):
2108         (-[WKView view:stringForToolTip:point:userData:]):
2109         (-[WKView _toolTipChangedFrom:to:]):
2110         (-[WKView _setAcceleratedCompositingModeRootLayer:]): Deleted.
2111         (-[WKView _acceleratedCompositingModeRootLayer]): Deleted.
2112         (takeWindowSnapshot): Deleted.
2113         * UIProcess/Cocoa/WebViewImpl.h:
2114         * UIProcess/Cocoa/WebViewImpl.mm:
2115         (WebKit::WebViewImpl::addTrackingRect):
2116         (WebKit::WebViewImpl::addTrackingRectWithTrackingNum):
2117         (WebKit::WebViewImpl::addTrackingRectsWithTrackingNums):
2118         (WebKit::WebViewImpl::removeTrackingRect):
2119         (WebKit::WebViewImpl::removeTrackingRects):
2120         (WebKit::WebViewImpl::sendToolTipMouseExited):
2121         (WebKit::WebViewImpl::sendToolTipMouseEntered):
2122         (WebKit::WebViewImpl::stringForToolTip):
2123         (WebKit::WebViewImpl::toolTipChanged):
2124         Move tooltip code.
2125
2126 2015-10-23  Tim Horton  <timothy_horton@apple.com>
2127
2128         WKView being inside WKWebView leads to weird API issues
2129         https://bugs.webkit.org/show_bug.cgi?id=150174
2130
2131         Reviewed by Anders Carlsson.
2132
2133         * UIProcess/API/mac/WKView.mm:
2134         (-[WKView _interpretKeyEvent:completionHandler:]):
2135         (-[WKView inputContext]):
2136         (-[WKView performKeyEquivalent:]):
2137         (-[WKView keyDown:]):
2138         (-[WKView _doneWithKeyEvent:eventWasHandled:]):
2139         (-[WKView _setPluginComplexTextInputState:]): Deleted.
2140         (-[WKView _disableComplexTextInputIfNecessary]): Deleted.
2141         (-[WKView _handlePluginComplexTextInputKeyDown:]): Deleted.
2142         (-[WKView _tryHandlePluginComplexTextInputKeyDown:]): Deleted.
2143         (-[WKView _tryPostProcessPluginComplexTextInputKeyDown:]): Deleted.
2144         (-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]): Deleted.
2145         (-[WKView _setPluginComplexTextInputState:pluginComplexTextInputIdentifier:]): Deleted.
2146         * UIProcess/API/mac/WKViewInternal.h:
2147         * UIProcess/Cocoa/WebViewImpl.h:
2148         (WebKit::WebViewImpl::pluginComplexTextInputState):
2149         (WebKit::WebViewImpl::pluginComplexTextInputIdentifier):
2150         * UIProcess/Cocoa/WebViewImpl.mm:
2151         (WebKit::WebViewImpl::setPluginComplexTextInputState):
2152         (WebKit::WebViewImpl::setPluginComplexTextInputStateAndIdentifier):
2153         (WebKit::WebViewImpl::disableComplexTextInputIfNecessary):
2154         (WebKit::WebViewImpl::handlePluginComplexTextInputKeyDown):
2155         (WebKit::WebViewImpl::tryHandlePluginComplexTextInputKeyDown):
2156         (WebKit::WebViewImpl::pluginFocusOrWindowFocusChanged):
2157         (WebKit::WebViewImpl::tryPostProcessPluginComplexTextInputKeyDown):
2158         * UIProcess/mac/PageClientImpl.mm:
2159         (WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged):
2160         (WebKit::PageClientImpl::setPluginComplexTextInputState):
2161         Move a few more methods.
2162
2163 2015-10-23  Eric Carlson  <eric.carlson@apple.com>
2164
2165         [MediaStream] Fix UserMediaPermissionRequestProxy::invalidate
2166         https://bugs.webkit.org/show_bug.cgi?id=150503
2167         <rdar://problem/23235386>
2168
2169         Reviewed by Dean Jackson.
2170
2171         * UIProcess/UserMediaPermissionRequestProxy.cpp:
2172         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): m_manager is a pointer.
2173         (WebKit::UserMediaPermissionRequestProxy::allow): Return early if m_manager is null, clear it after
2174           calling the manager.
2175         (WebKit::UserMediaPermissionRequestProxy::deny): Ditto.
2176         (WebKit::UserMediaPermissionRequestProxy::invalidate): Clear m_manager.
2177         * UIProcess/UserMediaPermissionRequestProxy.h: Change m_manager from a reference to a
2178           pointer so it can be cleared.
2179
2180 2015-10-23  Claudio Saavedra  <csaavedra@igalia.com>
2181
2182         [GTK] Minor web editor fixes
2183         https://bugs.webkit.org/show_bug.cgi?id=150501
2184
2185         Reviewed by Carlos Garcia Campos.
2186
2187         * UIProcess/gtk/KeyBindingTranslator.cpp: Remove
2188         "MoveParagraphForward/Backward" as these commands do not exist in
2189         WebKit (anymore?).
2190         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
2191         (WebKit::WebEditorClient::executePendingEditorCommands):
2192         Editor::Command can take a String, no need to convert to a C char.
2193
2194 2015-10-23  Timothy Horton  <timothy_horton@apple.com>
2195
2196         Fix the build by unapplying review comments.
2197
2198         * UIProcess/Cocoa/WebViewImpl.h:
2199
2200 2015-10-23  Tim Horton  <timothy_horton@apple.com>
2201
2202         WKView being inside WKWebView leads to weird API issues
2203         https://bugs.webkit.org/show_bug.cgi?id=150174
2204
2205         Reviewed by Anders Carlsson.
2206
2207         * UIProcess/API/mac/WKView.mm:
2208         (-[WKView renewGState]):
2209         (-[WKView writeSelectionToPasteboard:types:]):
2210         (-[WKView centerSelectionInVisibleArea:]):
2211         (-[WKView scrollWheel:]):
2212         (-[WKView swipeWithEvent:]):
2213         (-[WKView mouseMoved:]):
2214         (-[WKView mouseDown:]):
2215         (-[WKView mouseUp:]):
2216         (-[WKView mouseDragged:]):
2217         (-[WKView pressureChangeWithEvent:]):
2218         (-[WKView acceptsFirstMouse:]):
2219         (-[WKView shouldDelayWindowOrderingForEvent:]):
2220         (-[WKView performKeyEquivalent:]):
2221         (-[WKView keyUp:]):
2222         (-[WKView keyDown:]):
2223         (-[WKView flagsChanged:]):
2224         (-[WKView _superQuickLookWithEvent:]):
2225         (-[WKView _addFontPanelObserver]):
2226         (-[WKView viewWillMoveToWindow:]):
2227         (-[WKView viewDidMoveToWindow]):
2228         (-[WKView viewDidChangeBackingProperties]):
2229         (-[WKView enableAccessibilityIfNecessary]):
2230         (-[WKView quickLookWithEvent:]):
2231         (-[WKView _colorSpace]):
2232         (-[WKView _didRelaunchProcess]):
2233         (-[WKView _setTextIndicator:]):
2234         (-[WKView _setTextIndicator:withLifetime:]):
2235         (-[WKView _clearTextIndicatorWithAnimation:]):
2236         (-[WKView _setTextIndicatorAnimationProgress:]):
2237         (-[WKView initWithFrame:processPool:configuration:webView:]):
2238         (-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
2239         (-[WKView _internalImmediateActionAnimationControllerForHitTestResult:withType:userData:]):
2240         (-[WKView _internalPrepareForImmediateActionAnimation]):
2241         (-[WKView _internalCancelImmediateActionAnimation]):
2242         (-[WKView _internalCompleteImmediateActionAnimation]):
2243         (-[WKView _internalDismissContentRelativeChildWindowsWithAnimation:]):
2244         (-[WKView beginDeferringViewInWindowChanges]):
2245         (-[WKView endDeferringViewInWindowChanges]):
2246         (-[WKView endDeferringViewInWindowChangesSync]):
2247         (-[WKView _prepareForMoveToWindow:withCompletionHandler:]):
2248         (-[WKView isDeferringViewInWindowChanges]):
2249         (-[WKView allowsLinkPreview]):
2250         (-[WKView setAllowsLinkPreview:]):
2251         (-[WKView _setIgnoresAllEvents:]):
2252         (-[WKView _setIgnoresNonWheelMouseEvents:]):
2253         (-[WKView _setIgnoresNonWheelEvents:]):
2254         (-[WKView _ignoresNonWheelEvents]):
2255         (-[WKView _ignoresAllEvents]):
2256         (-[WKView _setOverrideDeviceScaleFactor:]):
2257         (-[WKView _overrideDeviceScaleFactor]):
2258         (-[WKView _setTopContentInset:]):
2259         (-[WKView _topContentInset]):
2260         (-[WKView _dismissContentRelativeChildWindows]):
2261         (-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
2262         (-[WKView _setAutomaticallyAdjustsContentInsets:]):
2263         (-[WKView _automaticallyAdjustsContentInsets]):
2264         (-[WKWindowVisibilityObserver initWithView:]): Deleted.
2265         (-[WKWindowVisibilityObserver startObserving:]): Deleted.
2266         (-[WKWindowVisibilityObserver stopObserving:]): Deleted.
2267         (-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]): Deleted.
2268         (-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]): Deleted.
2269         (-[WKView dealloc]): Deleted.
2270         (-[WKView _updateWindowAndViewFrames]): Deleted.
2271         (-[WKView updateFontPanelIfNeeded]): Deleted.
2272         (-[WKView _selectionChanged]): Deleted.
2273         (-[WKView addWindowObserversForWindow:]): Deleted.
2274         (-[WKView removeWindowObservers]): Deleted.
2275         (-[WKView doWindowDidChangeScreen]): Deleted.
2276         (-[WKView _windowDidBecomeKey:]): Deleted.
2277         (-[WKView _windowDidChangeScreen:]): Deleted.
2278         (-[WKView _windowDidChangeLayerHosting:]): Deleted.
2279         (-[WKView _windowDidResignKey:]): Deleted.
2280         (-[WKView _windowDidMiniaturize:]): Deleted.
2281         (-[WKView _windowDidDeminiaturize:]): Deleted.
2282         (-[WKView _windowDidMove:]): Deleted.
2283         (-[WKView _windowDidResize:]): Deleted.
2284         (-[WKView _windowDidOrderOffScreen:]): Deleted.
2285         (-[WKView _windowDidOrderOnScreen:]): Deleted.
2286         (-[WKView _windowDidChangeBackingProperties:]): Deleted.
2287         (-[WKView _windowDidChangeOcclusionState:]): Deleted.
2288         (-[WKView _prepareForDictionaryLookup]): Deleted.
2289         (-[WKView _dictionaryLookupPopoverWillClose:]): Deleted.
2290         (-[WKView _accessibilityRegisterUIProcessTokens]): Deleted.
2291         (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): Deleted.
2292         (-[WKView _intrinsicDeviceScaleFactor]): Deleted.
2293         (-[WKView _preferencesDidChange]): Deleted.
2294         (-[WKView _targetWindowForMovePreparation]): Deleted.
2295         (-[WKView _updateContentInsetsIfAutomatic]): Deleted.
2296         (-[WKView observeValueForKeyPath:ofObject:change:context:]): Deleted.
2297         (-[WKView _dispatchSetTopContentInset]): Deleted.
2298         * UIProcess/API/mac/WKViewInternal.h:
2299         * UIProcess/Cocoa/WebViewImpl.h:
2300         (WebKit::WebViewImpl::automaticallyAdjustsContentInsets):
2301         (WebKit::WebViewImpl::topContentInset):
2302         (WebKit::WebViewImpl::overrideDeviceScaleFactor):
2303         (WebKit::WebViewImpl::isDeferringViewInWindowChanges):
2304         (WebKit::WebViewImpl::targetWindowForMovePreparation):
2305         (WebKit::WebViewImpl::lastPressureEvent):
2306         (WebKit::WebViewImpl::allowsLinkPreview):
2307         (WebKit::WebViewImpl::ignoresNonWheelEvents):
2308         (WebKit::WebViewImpl::ignoresAllEvents):
2309         (WebKit::WebViewImpl::createWeakPtr):
2310         * UIProcess/Cocoa/WebViewImpl.mm:
2311         (SOFT_LINK_CONSTANT_MAY_FAIL):
2312         (-[WKWindowVisibilityObserver initWithView:impl:]):
2313         (-[WKWindowVisibilityObserver dealloc]):
2314         (-[WKWindowVisibilityObserver startObserving:]):
2315         (-[WKWindowVisibilityObserver stopObserving:]):
2316         (-[WKWindowVisibilityObserver startObservingFontPanel]):
2317         (-[WKWindowVisibilityObserver startObservingLookupDismissal]):
2318         (-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]):
2319         (-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]):
2320         (-[WKWindowVisibilityObserver _windowDidBecomeKey:]):
2321         (-[WKWindowVisibilityObserver _windowDidResignKey:]):
2322         (-[WKWindowVisibilityObserver _windowDidMiniaturize:]):
2323         (-[WKWindowVisibilityObserver _windowDidDeminiaturize:]):
2324         (-[WKWindowVisibilityObserver _windowDidMove:]):
2325         (-[WKWindowVisibilityObserver _windowDidResize:]):
2326         (-[WKWindowVisibilityObserver _windowDidChangeBackingProperties:]):
2327         (-[WKWindowVisibilityObserver _windowDidChangeScreen:]):
2328         (-[WKWindowVisibilityObserver _windowDidChangeLayerHosting:]):
2329         (-[WKWindowVisibilityObserver _windowDidChangeOcclusionState:]):
2330         (-[WKWindowVisibilityObserver observeValueForKeyPath:ofObject:change:context:]):
2331         (-[WKWindowVisibilityObserver _dictionaryLookupPopoverWillClose:]):
2332         (-[WKEditCommandObjC initWithWebEditCommandProxy:]):
2333         (-[WKEditCommandObjC command]):
2334         (-[WKEditorUndoTargetObjC undoEditing:]):
2335         (-[WKEditorUndoTargetObjC redoEditing:]):
2336         (WebKit::WebViewImpl::WebViewImpl):
2337         (WebKit::WebViewImpl::~WebViewImpl):
2338         (WebKit::WebViewImpl::becomeFirstResponder):
2339         (WebKit::WebViewImpl::resignFirstResponder):
2340         (WebKit::WebViewImpl::renewGState):
2341         (WebKit::WebViewImpl::updateWindowAndViewFrames):
2342         (WebKit::WebViewImpl::setAutomaticallyAdjustsContentInsets):
2343         (WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
2344         (WebKit::WebViewImpl::setTopContentInset):
2345         (WebKit::WebViewImpl::dispatchSetTopContentInset):
2346         (WebKit::WebViewImpl::setOverrideDeviceScaleFactor):
2347         (WebKit::WebViewImpl::intrinsicDeviceScaleFactor):
2348         (WebKit::WebViewImpl::windowDidOrderOffScreen):
2349         (WebKit::WebViewImpl::windowDidOrderOnScreen):
2350         (WebKit::WebViewImpl::windowDidBecomeKey):
2351         (WebKit::WebViewImpl::windowDidResignKey):
2352         (WebKit::WebViewImpl::windowDidMiniaturize):
2353         (WebKit::WebViewImpl::windowDidDeminiaturize):
2354         (WebKit::WebViewImpl::windowDidMove):
2355         (WebKit::WebViewImpl::windowDidResize):
2356         (WebKit::WebViewImpl::windowDidChangeBackingProperties):
2357         (WebKit::WebViewImpl::windowDidChangeScreen):
2358         (WebKit::WebViewImpl::windowDidChangeLayerHosting):
2359         (WebKit::WebViewImpl::windowDidChangeOcclusionState):
2360         (WebKit::WebViewImpl::viewWillMoveToWindow):
2361         (WebKit::WebViewImpl::viewDidMoveToWindow):
2362         (WebKit::WebViewImpl::viewDidChangeBackingProperties):
2363         (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
2364         (WebKit::WebViewImpl::colorSpace):
2365         (WebKit::WebViewImpl::beginDeferringViewInWindowChanges):
2366         (WebKit::WebViewImpl::endDeferringViewInWindowChanges):
2367         (WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
2368         (WebKit::WebViewImpl::prepareForMoveToWindow):
2369         (WebKit::WebViewImpl::pressureChangeWithEvent):
2370         (WebKit::WebViewImpl::isEditable):
2371         (WebKit::WebViewImpl::executeEditCommand):
2372         (WebKit::WebViewImpl::registerEditCommand):
2373         (WebKit::WebViewImpl::clearAllEditCommands):
2374         (WebKit::WebViewImpl::writeSelectionToPasteboard):
2375         (WebKit::WebViewImpl::centerSelectionInVisibleArea):
2376         (WebKit::WebViewImpl::selectionDidChange):
2377         (WebKit::WebViewImpl::startObservingFontPanel):
2378         (WebKit::WebViewImpl::updateFontPanelIfNeeded):
2379         (WebKit::WebViewImpl::preferencesDidChange):
2380         (WebKit::WebViewImpl::setTextIndicator):
2381         (WebKit::WebViewImpl::clearTextIndicatorWithAnimation):
2382         (WebKit::WebViewImpl::setTextIndicatorAnimationProgress):
2383         (WebKit::WebViewImpl::dismissContentRelativeChildWindows):
2384         (WebKit::WebViewImpl::quickLookWithEvent):
2385         (WebKit::WebViewImpl::prepareForDictionaryLookup):
2386         (WebKit::WebViewImpl::setAllowsLinkPreview):
2387         (WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResult):
2388         (WebKit::WebViewImpl::prepareForImmediateActionAnimation):
2389         (WebKit::WebViewImpl::cancelImmediateActionAnimation):
2390         (WebKit::WebViewImpl::completeImmediateActionAnimation):
2391         (WebKit::WebViewImpl::setIgnoresNonWheelEvents):
2392         (WebKit::WebViewImpl::setIgnoresAllEvents):
2393         (WebKit::WebViewImpl::accessibilityRegisterUIProcessTokens):
2394         * UIProcess/mac/PageClientImpl.h:
2395         * UIProcess/mac/PageClientImpl.mm:
2396         (WebKit::PageClientImpl::activeWindow):
2397         (WebKit::PageClientImpl::preferencesDidChange):
2398         (WebKit::PageClientImpl::registerEditCommand):
2399         (WebKit::PageClientImpl::clearAllEditCommands):
2400         (WebKit::PageClientImpl::selectionDidChange):
2401         (WebKit::PageClientImpl::didPerformDictionaryLookup):
2402         (-[WKEditCommandObjC initWithWebEditCommandProxy:]): Deleted.
2403         (-[WKEditCommandObjC command]): Deleted.
2404         (-[WKEditorUndoTargetObjC undoEditing:]): Deleted.
2405         (-[WKEditorUndoTargetObjC redoEditing:]): Deleted.
2406         (WebKit::PageClientImpl::PageClientImpl): Deleted.
2407         Move more things to WebViewImpl.
2408         This also introduces an unfortunate pattern that is required for things which
2409         clients override on WKView, where we have a flow like this:
2410                 - somebody (PageClient, etc.) calls WebViewImpl::x
2411                 - WebViewImpl::x does nothing except call [WKView _x]
2412                 - [WKView _x] calls WebViewImpl::xFromViewOnly, which does the real work
2413         As long as no clients call the -FromViewOnly variant, this will mean that
2414         all callers are bottlenecked through the overridable WKView method.
2415         How this works with WKWebView, I am not sure yet.
2416
2417         * UIProcess/mac/WKImmediateActionController.h:
2418         * UIProcess/mac/WKImmediateActionController.mm:
2419         (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]):
2420         (-[WKImmediateActionController willDestroyView:]):
2421         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
2422         (-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
2423         (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
2424         (-[WKImmediateActionController menuItem:viewAtScreenPoint:]):
2425         (-[WKImmediateActionController menuItem:previewItemAtPoint:]):
2426         (-[WKImmediateActionController menuItem:itemFrameForPoint:]):
2427         (-[WKImmediateActionController menuItem:maxSizeForPoint:]):
2428         (-[WKImmediateActionController _animationControllerForDataDetectedText]):
2429         (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
2430         (-[WKImmediateActionController _animationControllerForText]):
2431         (-[WKImmediateActionController initWithPage:view:recognizer:]): Deleted.
2432         Keep a generic NSView, use the WebViewImpl for WK*View related things.
2433
2434 2015-10-22  Joonghun Park  <jh718.park@samsung.com>
2435
2436         [GTK] Fix build break since r191471
2437         https://bugs.webkit.org/show_bug.cgi?id=150487
2438
2439         Reviewed by Žan Doberšek.
2440
2441         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
2442         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2443         (WebKit::WebContextMenuProxyGtk::populate):
2444
2445 2015-10-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2446
2447         [EFL] Build break since r191472 and r191473
2448         https://bugs.webkit.org/show_bug.cgi?id=150485
2449
2450         Unreviewed build fix.
2451
2452         * CMakeLists.txt: Remove icu include path and move page include path.
2453
2454 2015-10-22  Sam Weinig  <sam@webkit.org>
2455
2456         Navigations on the same host (but with different schemes and ports) should not trigger universal links
2457         <rdar://problem/22811325>
2458         https://bugs.webkit.org/show_bug.cgi?id=150481
2459
2460         Reviewed by Dan Bernstein.
2461
2462         Update the policy for following universal links to only take host into consideration.
2463
2464         * UIProcess/API/C/WKPage.cpp:
2465         (WKPageSetPageUIClient):
2466         * UIProcess/Cocoa/UIDelegate.mm:
2467         (WebKit::UIDelegate::UIClient::createNewPage):
2468         * UIProcess/WebPageProxy.cpp:
2469         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2470         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
2471         (WebKit::WebPageProxy::createNewPage):
2472         (WebKit::WebPageProxy::showPage):
2473
2474 2015-10-22  Anders Carlsson  <andersca@apple.com>
2475
2476         Simplify menu creation
2477         https://bugs.webkit.org/show_bug.cgi?id=150476
2478
2479         Reviewed by Tim Horton.
2480
2481         Instead of creating vectors of NSMenuItem objects, just simply build the menu recursively.
2482
2483         * UIProcess/mac/WebContextMenuProxyMac.h:
2484         * UIProcess/mac/WebContextMenuProxyMac.mm:
2485         (WebKit::WebContextMenuProxyMac::createContextMenuFromItems):
2486         (WebKit::WebContextMenuProxyMac::createContextMenuItem):
2487         (WebKit::WebContextMenuProxyMac::showContextMenu):
2488         (WebKit::populateNSMenu): Deleted.
2489         (WebKit::nsMenuItem): Deleted.
2490         (WebKit::nsMenuItemVector): Deleted.
2491
2492 2015-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2493
2494         ERROR: Unhandled web process message 'StorageAreaMap:DispatchStorageEvent'
2495         https://bugs.webkit.org/show_bug.cgi?id=150315
2496
2497         Reviewed by Andreas Kling.
2498
2499         It was introduced in r184930, that keeps the session storage area
2500         maps alive in the UI process when they are destroyed by the web
2501         process. The problem is that we also keep the listeners, so that
2502         events are also dispatched to the listeners of destroyed areas,
2503         and the message handlers were removed in the web process.
2504
2505         * UIProcess/Storage/StorageManager.cpp:
2506         (WebKit::StorageManager::createTransientLocalStorageMap): Add a
2507         listener for the new storage map ID when the map is reused.
2508         (WebKit::StorageManager::destroyStorageMap): Always remove
2509         listeners of destroyed maps.
2510
2511 2015-10-22  Tim Horton  <timothy_horton@apple.com>
2512
2513         Add a SPI variant of loadData that accepts user data to WKWebView
2514         https://bugs.webkit.org/show_bug.cgi?id=150475
2515
2516         Reviewed by Anders Carlsson.
2517
2518         * UIProcess/API/Cocoa/WKWebView.mm:
2519         (-[WKWebView _loadData:MIMEType:characterEncodingName:baseURL:userData:]):
2520         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2521
2522 2015-10-22  Alex Christensen  <achristensen@webkit.org>
2523
2524         Progress towards CMake on Mac
2525         https://bugs.webkit.org/show_bug.cgi?id=150466
2526
2527         Reviewed by Chris Dumez.
2528
2529         * CMakeLists.txt:
2530         * PlatformMac.cmake:
2531         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2532
2533 2015-10-22  Anders Carlsson  <andersca@apple.com>
2534
2535         NativeContextMenuItem isn't needed anymore, remove it
2536         https://bugs.webkit.org/show_bug.cgi?id=150473
2537
2538         Reviewed by Tim Horton.
2539
2540         * PlatformEfl.cmake:
2541         * PlatformGTK.cmake:
2542         * Shared/NativeContextMenuItem.h: Removed.
2543         (WebKit::NativeContextMenuItem::~NativeContextMenuItem): Deleted.
2544         (WebKit::NativeContextMenuItem::nsMenuItem): Deleted.
2545         * Shared/WebContextMenuItem.cpp:
2546         (WebKit::WebContextMenuItem::WebContextMenuItem): Deleted.
2547         * Shared/WebContextMenuItem.h:
2548         (WebKit::WebContextMenuItem::create): Deleted.
2549         (WebKit::WebContextMenuItem::nativeContextMenuItem): Deleted.
2550         * Shared/efl/NativeContextMenuItemEfl.cpp: Removed.
2551         (WebKit::NativeContextMenuItem::NativeContextMenuItem): Deleted.
2552         * Shared/gtk/NativeContextMenuItemGtk.cpp: Removed.
2553         (WebKit::NativeContextMenuItem::NativeContextMenuItem): Deleted.
2554         * Shared/mac/NativeContextMenuItem.mm: Removed.
2555         (WebKit::NativeContextMenuItem::NativeContextMenuItem): Deleted.
2556         * UIProcess/mac/WebContextMenuProxyMac.mm:
2557         (WebKit::nsMenuItem): Deleted.
2558         * WebKit2.xcodeproj/project.pbxproj:
2559
2560 2015-10-22  Anders Carlsson  <andersca@apple.com>
2561
2562         CTTE WebContextMenuItemData
2563         https://bugs.webkit.org/show_bug.cgi?id=150471
2564
2565         Reviewed by Tim Horton.
2566
2567         * Shared/API/c/WKContextMenuItem.cpp:
2568         (WKContextMenuItemGetTag):
2569         (WKContextMenuItemGetType):
2570         (WKContextMenuItemCopyTitle):
2571         (WKContextMenuItemGetEnabled):
2572         (WKContextMenuItemGetChecked):
2573         * Shared/WebContextMenuItem.cpp:
2574         (WebKit::WebContextMenuItem::create):
2575         * Shared/WebContextMenuItem.h:
2576         (WebKit::WebContextMenuItem::data):
2577         * UIProcess/API/C/WKPage.cpp:
2578         (WKPageSelectContextMenuItem):
2579         * UIProcess/mac/WebContextMenuProxyMac.mm:
2580         (WebKit::nsMenuItem):
2581         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2582         (WKBundlePageClickMenuItem):
2583         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
2584         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
2585
2586 2015-10-22  Anders Carlsson  <andersca@apple.com>
2587
2588         Handle nil menu items.
2589
2590         * UIProcess/mac/WebContextMenuProxyMac.mm:
2591         (WebKit::nsMenuItemVector):
2592
2593 2015-10-22  Anders Carlsson  <andersca@apple.com>
2594
2595         Wait to convert the share menu item to a real share menu until after calling out to the client
2596         https://bugs.webkit.org/show_bug.cgi?id=150465
2597
2598         Reviewed by Tim Horton.
2599
2600         This will let us simplify more code in upcoming patches.
2601
2602         * UIProcess/mac/WebContextMenuProxyMac.h:
2603         * UIProcess/mac/WebContextMenuProxyMac.mm:
2604         (WebKit::nsMenuItem):
2605         (WebKit::nsMenuItemVector):
2606         (WebKit::WebContextMenuProxyMac::showContextMenu):
2607
2608 2015-10-22  Myles C. Maxfield  <mmaxfield@apple.com>
2609
2610         [Cocoa] Migrate WKSetPatternPhaseInUserSpace() and WKGetUserToBaseCTM() from WKSI
2611         https://bugs.webkit.org/show_bug.cgi?id=150460
2612
2613         Reviewed by Tim Horton.
2614
2615         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2616         (InitWebCoreSystemInterface): Deleted.
2617
2618 2015-10-22  Alex Christensen  <achristensen@webkit.org>
2619
2620         Initial NSURLSession WebResourceLoader implementation
2621         https://bugs.webkit.org/show_bug.cgi?id=150355
2622
2623         Reviewed by Antti Koivisto.
2624
2625         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2626         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
2627         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
2628         * NetworkProcess/NetworkResourceLoader.cpp:
2629         (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
2630         (WebKit::NetworkResourceLoader::startNetworkLoad):
2631         (WebKit::NetworkResourceLoader::setDefersLoading):
2632         (WebKit::NetworkResourceLoader::cleanup):
2633         (WebKit::NetworkResourceLoader::didConvertHandleToDownload):
2634         (WebKit::NetworkResourceLoader::abort):
2635         (WebKit::NetworkResourceLoader::willPerformHTTPRedirection):
2636         (WebKit::NetworkResourceLoader::didReceiveChallenge):
2637         (WebKit::NetworkResourceLoader::didReceiveResponse):
2638         (WebKit::NetworkResourceLoader::didReceiveData):
2639         (WebKit::NetworkResourceLoader::didCompleteWithError):
2640         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2641         (WebKit::NetworkResourceLoader::willSendRequestAsync):
2642         (WebKit::NetworkResourceLoader::continueWillSendRequest):
2643         (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
2644         (WebKit::NetworkResourceLoader::didSendData):
2645         (WebKit::NetworkResourceLoader::receivedCancellation):
2646         (WebKit::NetworkResourceLoader::startBufferingTimerIfNeeded):
2647         (WebKit::NetworkResourceLoader::bufferingTimerFired):
2648         (WebKit::NetworkResourceLoader::validateCacheEntry):
2649         (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
2650         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
2651         (WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
2652         (WebKit::NetworkResourceLoader::supportsDataArray):
2653         * NetworkProcess/NetworkResourceLoader.h:
2654         (WebKit::NetworkResourceLoader::create):
2655         (WebKit::NetworkResourceLoader::currentRequest):
2656         (WebKit::NetworkResourceLoader::handle):
2657         * NetworkProcess/NetworkSession.h: Added.
2658         (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
2659         (WebKit::NetworkingDataTask::client):
2660         (WebKit::NetworkingDataTask::clearClient):
2661         (WebKit::NetworkSession::~NetworkSession):
2662         * NetworkProcess/cocoa/NetworkSessionCocoa.mm: Added.
2663         (toNSURLSessionResponseDisposition):
2664         (toNSURLSessionAuthChallengeDisposition):
2665         (-[NetworkSessionDelegate initWithNetworkSession:]):
2666         (-[NetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
2667         (-[NetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
2668         (-[NetworkSessionDelegate URLSession:task:didCompleteWithError:]):
2669         (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
2670         (-[NetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
2671         (WebKit::NetworkSession::create):
2672         (WebKit::NetworkSession::singleton):
2673         (WebKit::configurationForType):
2674         (WebKit::NetworkSession::NetworkSession):
2675         (WebKit::NetworkSession::createDataTaskWithRequest):
2676         (WebKit::NetworkSession::dataTaskForIdentifier):
2677         (WebKit::NetworkingDataTask::NetworkingDataTask):
2678         (WebKit::NetworkingDataTask::~NetworkingDataTask):
2679         (WebKit::NetworkingDataTask::suspend):
2680         (WebKit::NetworkingDataTask::resume):
2681         (WebKit::NetworkingDataTask::taskIdentifier):
2682         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2683         (WebKit::NetworkResourceLoader::willCacheResponseAsync):
2684         * WebKit2.xcodeproj/project.pbxproj:
2685         * config.h:
2686
2687 2015-10-22  Philippe Normand  <pnormand@igalia.com>
2688
2689         Unreviewed, GTK build fix for disabled redirected XComposite window support.
2690
2691         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Add USE(REDIRECTED_XCOMPOSITE_WINDOW) guards.
2692         * UIProcess/DrawingAreaProxyImpl.h: Mark virtual methods as override to avoid compilation warnings.
2693
2694 2015-10-22  Wenson Hsieh  <wenson_hsieh@apple.com>
2695
2696         Implement touch-action: manipulation; for iOS
2697         https://bugs.webkit.org/show_bug.cgi?id=149854
2698         <rdar://problem/23017145>
2699
2700         Reviewed by Benjamin Poulain.
2701
2702         Implements the manipulation value for the CSS property touch-action. Performs hit-testing upon receiving a potential
2703         tap to determine whether to disable double-tap gesture recognition over the duration of the tap. If so, sends a message
2704         from the web process to the UI process indicating that double-tapping should be disabled, allowing single taps to
2705         avoid the delay.
2706
2707         * WebProcess/WebPage/ios/WebPageIOS.mm:
2708         (WebKit::WebPage::potentialTapAtPosition):
2709
2710 2015-10-22  Ryosuke Niwa  <rniwa@webkit.org>
2711
2712         REGRESSION (r181972): Scroll position changes to top of youtube page when switching tabs
2713         https://bugs.webkit.org/show_bug.cgi?id=150428
2714
2715         Reviewed by Antti Koivisto.
2716
2717         Call updateFocusAppearance with RevealMode::DoNotReveal to avoid revealing the focused element.
2718
2719         * WebProcess/WebPage/WebPage.cpp:
2720         (WebKit::WebPage::restoreSelectionInFocusedEditableElement):
2721
2722 2015-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2723
2724         Unreviewed. Fix a crash in GTk+ after r191402.
2725
2726         Since r191402 WebContextMenuProxy is no longer refcounted, and
2727         std::unique_ptr is used instead. This means that when we show the
2728         context menu for the second time in a web view, a new
2729         WebContextMenuProxy is created and the previous one is
2730         destroyed. We were setting the active context menu of the WebView
2731         in the constructor of WebContextMenuProxy, and unsetting it in the
2732         destructor. Now the constructor of the new WebContextMenuProxy
2733         happens before the destructor of the current one that unsets the
2734         WebView active context menu. This patch simply makes the web view
2735         unset its active context menu when it's unmapped and a new one
2736         hasn't been set.
2737
2738         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2739         (activeContextMenuUnmapped):
2740         (webkitWebViewBaseSetActiveContextMenuProxy):
2741         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2742         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
2743
2744 2015-10-22  Hunseop Jeong  <hs85.jeong@samsung.com>
2745
2746         [GTK] Try to fix the build after r191402.
2747         https://bugs.webkit.org/show_bug.cgi?id=150435
2748
2749         Reviewed by Carlos Garcia Campos.
2750
2751         * UIProcess/API/gtk/PageClientImpl.cpp:
2752         (WebKit::PageClientImpl::createPopupMenuProxy):
2753         (WebKit::PageClientImpl::createContextMenuProxy):
2754         (WebKit::PageClientImpl::createColorPicker):
2755         * UIProcess/API/gtk/PageClientImpl.h:
2756         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2757         (WebKit::WebContextMenuProxyGtk::populate):
2758         (WebKit::WebContextMenuProxyGtk::show):
2759         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
2760         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
2761         (WebKit::WebContextMenuProxyGtk::menuPositionFunction):
2762         (WebKit::WebContextMenuProxyGtk::showContextMenu): Deleted.
2763         (WebKit::WebContextMenuProxyGtk::hideContextMenu): Deleted.
2764         (WebKit::WebContextMenuProxyGtk::cancelTracking): Deleted.
2765         * UIProcess/gtk/WebContextMenuProxyGtk.h:
2766         (WebKit::WebContextMenuProxyGtk::gtkMenu):
2767         (WebKit::WebContextMenuProxyGtk::create): Deleted.
2768
2769 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2770
2771        Unreviewed EFL build fix. Remove customizeMenu implementation.
2772
2773         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2774         (WebKit::WebContextMenuClient::customizeMenu): Deleted.
2775
2776 2015-10-21  Alex Christensen  <achristensen@webkit.org>
2777
2778         Speculative EFL build fix.
2779
2780         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
2781         Remove another customizeMenu call.
2782
2783 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2784
2785         [EFL][GTK][WK2] Fix build break since r191402, r191401
2786         https://bugs.webkit.org/show_bug.cgi?id=150432
2787
2788         Unreviewed EFL and GTK build fix.
2789
2790         * CMakeLists.txt:
2791         * UIProcess/CoordinatedGraphics/WebView.cpp:
2792         (WebKit::WebView::createContextMenuProxy):
2793         * UIProcess/CoordinatedGraphics/WebView.h:
2794         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
2795         (WebKit::WebContextMenuProxyEfl::show):
2796         * UIProcess/efl/WebContextMenuProxyEfl.h:
2797         (WebKit::WebContextMenuProxyEfl::create): Deleted.
2798         * UIProcess/efl/WebViewEfl.cpp:
2799         (WebKit::WebViewEfl::createContextMenuProxy):
2800         * UIProcess/efl/WebViewEfl.h:
2801         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2802         (WebKit::WebContextMenuClient::customizeMenu):
2803         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
2804
2805 2015-10-21  Anders Carlsson  <andersca@apple.com>
2806
2807         Get rid of WebContextMenuClient::customizeMenu, it's no longer used
2808         https://bugs.webkit.org/show_bug.cgi?id=150427
2809
2810         Reviewed by Tim Horton.
2811
2812         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2813         (WebKit::WebContextMenuClient::customizeMenu): Deleted.
2814         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
2815
2816 2015-10-21  Tim Horton  <timothy_horton@apple.com>
2817
2818         API-ify the FindMatches client
2819         https://bugs.webkit.org/show_bug.cgi?id=150422
2820
2821         Reviewed by Anders Carlsson.
2822
2823         * UIProcess/API/APIFindMatchesClient.h: Renamed from Source/WebKit2/UIProcess/WebFindClient.h.
2824         (API::FindMatchesClient::~FindMatchesClient):
2825         (API::FindMatchesClient::didFindStringMatches):
2826         (API::FindMatchesClient::didGetImageForMatchResult):
2827         * UIProcess/API/C/WKPage.cpp:
2828         (WKPageSetPageFindMatchesClient):
2829         * UIProcess/WebFindClient.cpp: Removed.
2830         * UIProcess/WebPageProxy.cpp:
2831         (WebKit::WebPageProxy::WebPageProxy):
2832         (WebKit::WebPageProxy::setFindMatchesClient):
2833         (WebKit::WebPageProxy::close):
2834         (WebKit::WebPageProxy::didGetImageForFindMatch):
2835         (WebKit::WebPageProxy::didFindStringMatches):
2836         (WebKit::WebPageProxy::initializeFindMatchesClient): Deleted.
2837         * UIProcess/WebPageProxy.h:
2838         (WebKit::WebPageProxy::findMatchesClient):
2839         * WebKit2.xcodeproj/project.pbxproj:
2840
2841 2015-10-21  Enrica Casucci  <enrica@apple.com>
2842
2843         WebProcess crashes when accessibility bundle is not found.
2844         https://bugs.webkit.org/show_bug.cgi?id=150414
2845
2846         Reviewed by Dan Bernstein.
2847
2848         The uninitialized pointer to NSError causes the print function to crash.
2849
2850         * WebProcess/cocoa/WebProcessCocoa.mm:
2851         (WebKit::registerWithAccessibility):
2852
2853 2015-10-21  Anders Carlsson  <andersca@apple.com>
2854
2855         Move services menu handling out into a separate function
2856         https://bugs.webkit.org/show_bug.cgi?id=150420
2857
2858         Reviewed by Tim Horton.
2859
2860         * UIProcess/mac/WebContextMenuProxyMac.h:
2861         * UIProcess/mac/WebContextMenuProxyMac.mm:
2862         (WebKit::WebContextMenuProxyMac::showServicesMenu):
2863         (WebKit::WebContextMenuProxyMac::show):
2864         (WebKit::WebContextMenuProxyMac::showContextMenu):
2865         (WebKit::WebContextMenuProxyMac::populate): Deleted.
2866
2867 2015-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>
2868
2869         Single tapping clickable elements in unscalable pages should show a tap highlight
2870         https://bugs.webkit.org/show_bug.cgi?id=150382
2871
2872         Reviewed by Simon Fraser.
2873
2874         When the double tap gesture recognizer is disabled ahead of time (as in the case of unscalable pages) the tap is
2875         committed before the geometries come in. To fix this, we introduce a flag that allows the single tap to be
2876         committed before the tap highlight arrives. This allows the tap highlight to be immediately animated when receiving
2877         the tap highlight geometries only in the case where double tapping is disabled when recognizing the single tap.
2878
2879         * UIProcess/ios/WKContentViewInteraction.h:
2880         * UIProcess/ios/WKContentViewInteraction.mm:
2881         (-[WKContentView setupInteraction]):
2882         (-[WKContentView cleanupInteraction]):
2883         (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
2884         (-[WKContentView _singleTapRecognized:]):
2885         (-[WKContentView _singleTapCommited:]):
2886
2887 2015-10-21  Anders Carlsson  <andersca@apple.com>
2888
2889         Get rid of useBinaryEncoding from WKPageGetContentsAsMHTMLData
2890         https://bugs.webkit.org/show_bug.cgi?id=150417
2891
2892         Reviewed by Tim Horton.
2893
2894         The useBinaryEncoding parameter is always false, so just get rid of it.
2895
2896         * UIProcess/API/C/WKPage.cpp:
2897         (WKPageGetContentsAsMHTMLData):
2898         * UIProcess/API/C/WKPage.h:
2899         * UIProcess/API/efl/ewk_view.cpp:
2900         (ewk_view_page_contents_get):
2901         * UIProcess/API/gtk/WebKitWebView.cpp:
2902         (webkit_web_view_save):
2903         (webkit_web_view_save_to_file):
2904         * UIProcess/WebPageProxy.cpp:
2905         (WebKit::WebPageProxy::getContentsAsMHTMLData):
2906         * UIProcess/WebPageProxy.h:
2907         * WebProcess/WebPage/WebPage.cpp:
2908         (WebKit::WebPage::getContentsAsMHTMLData):
2909         * WebProcess/WebPage/WebPage.h:
2910         * WebProcess/WebPage/WebPage.messages.in:
2911
2912 2015-10-21  Anders Carlsson  <andersca@apple.com>
2913
2914         WebContextMenuProxyMac::setupServicesMenu doesn't need to take a context parameter
2915         https://bugs.webkit.org/show_bug.cgi?id=150418
2916
2917         Reviewed by Tim Horton.
2918
2919         * UIProcess/mac/WebContextMenuProxyMac.h:
2920         * UIProcess/mac/WebContextMenuProxyMac.mm:
2921         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2922         (WebKit::WebContextMenuProxyMac::populate):
2923
2924 2015-10-21  Anders Carlsson  <andersca@apple.com>
2925
2926         WebContextMenuProxy doesn't have to be ref-counted
2927         https://bugs.webkit.org/show_bug.cgi?id=150415
2928
2929         Reviewed by Tim Horton.
2930
2931         Change WebContextMenuProxy to not inherit from RefCounted. Instead of using RefPtr, use std::unique_ptr.
2932         Get rid of cancelTracking and hideContextMenu and dismiss the menu whenever the menu proxy is destroyed.
2933         Also, rename showContextMenu to show.
2934
2935         * UIProcess/PageClient.h:
2936         * UIProcess/WebContextMenuProxy.h:
2937         (WebKit::WebContextMenuProxy::cancelTracking): Deleted.
2938         * UIProcess/WebPageProxy.cpp:
2939         (WebKit::WebPageProxy::close):
2940         (WebKit::WebPageProxy::internalShowContextMenu):
2941         * UIProcess/WebPageProxy.h:
2942         * UIProcess/ios/PageClientImplIOS.h:
2943         * UIProcess/ios/PageClientImplIOS.mm:
2944         (WebKit::PageClientImpl::createContextMenuProxy):
2945         * UIProcess/mac/PageClientImpl.h:
2946         * UIProcess/mac/PageClientImpl.mm:
2947         (WebKit::PageClientImpl::createContextMenuProxy):
2948         * UIProcess/mac/WebContextMenuProxyMac.h:
2949         (WebKit::WebContextMenuProxyMac::create): Deleted.
2950         * UIProcess/mac/WebContextMenuProxyMac.mm:
2951         (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
2952         (WebKit::WebContextMenuProxyMac::show):
2953         (WebKit::WebContextMenuProxyMac::showContextMenu): Deleted.
2954         (WebKit::WebContextMenuProxyMac::hideContextMenu): Deleted.
2955         (WebKit::WebContextMenuProxyMac::cancelTracking): Deleted.
2956
2957 2015-10-21  Anders Carlsson  <andersca@apple.com>
2958
2959         Stop using a popup menu button cell(!) for context menus
2960         https://bugs.webkit.org/show_bug.cgi?id=150413
2961
2962         Reviewed by Tim Horton.
2963
2964         Just use a regular NSMenu. Also, have the service menu code path store the service menu
2965         in the same member variable.
2966
2967         * UIProcess/mac/WebContextMenuProxyMac.h:
2968         * UIProcess/mac/WebContextMenuProxyMac.mm:
2969         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2970         (WebKit::WebContextMenuProxyMac::clearServicesMenu):
2971         (WebKit::WebContextMenuProxyMac::populate):
2972         (WebKit::WebContextMenuProxyMac::showContextMenu):
2973         (WebKit::WebContextMenuProxyMac::hideContextMenu):
2974         (WebKit::WebContextMenuProxyMac::cancelTracking):
2975         (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac): Deleted.
2976
2977 2015-10-21  Chris Dumez  <cdumez@apple.com>
2978
2979         Add assertions to NetworkCache::Entry constructor to make sure a key's type is "resource"
2980         https://bugs.webkit.org/show_bug.cgi?id=150369
2981
2982         Reviewed by Antti Koivisto.
2983
2984         Add assertions to NetworkCache::Entry constructor to make sure a key's
2985         type is "resource" now that the NetworkCache storage supports other
2986         types of entries.
2987
2988         * NetworkProcess/cache/NetworkCacheEntry.cpp:
2989         (WebKit::NetworkCache::Entry::Entry):
2990
2991 2015-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2992
2993         NetworkProcess: DNS prefetch happens in the Web Process
2994         https://bugs.webkit.org/show_bug.cgi?id=147824
2995
2996         Reviewed by Chris Dumez.
2997
2998         DNS prefetch requests started in the WebProcess should be sent to
2999         the network process when it's enabled.
3000
3001         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3002         (WebKit::NetworkConnectionToWebProcess::prefetchDNS): Use NetworkProcess::prefetchDNS().
3003         * NetworkProcess/NetworkConnectionToWebProcess.h:
3004         * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Add
3005         PrefetchDNS message.
3006         * NetworkProcess/NetworkProcess.cpp:
3007         (WebKit::NetworkProcess::prefetchDNS): Do the actual DNS prefetch.
3008         * NetworkProcess/NetworkProcess.h:
3009         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
3010         (webkitWebExtensionDidReceiveMessage): Use WebProcess::prefetchDNS().
3011         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3012         (WebKit::WebFrameLoaderClient::prefetchDNS): Use WebProcess::prefetchDNS().
3013         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3014         * WebProcess/WebPage/ios/WebPageIOS.mm:
3015         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Use
3016         FrameLoaderClient to do the DNS prefetch.
3017         * WebProcess/WebProcess.cpp:
3018         (WebKit::WebProcess::WebProcess): Initialize the DNS prefetched
3019         hosts cleanup hysteresis activity. Clear the cache of DNS
3020         prefetched when hysteresis activity stopped.
3021         (WebKit::WebProcess::prefetchDNS): Send the request to the network
3022         process if it's enabled, otherwise do the actual DNS prefetch.
3023         * WebProcess/WebProcess.h:
3024
3025 2015-10-20  Chris Dumez  <cdumez@apple.com>
3026
3027         [WK2] Generalize NetworkCacheStorage API so it can store different types of metadata
3028         https://bugs.webkit.org/show_bug.cgi?id=150221
3029         <rdar://problem/23149771>
3030
3031         Reviewed by Darin Adler and Antti Koivisto.
3032
3033         Generalize NetworkCacheStorage API so it can store different types of
3034         metadata alongside the network resources. This is a pre-requirement to
3035         making our NetworkCache smarter by storing information about the
3036         resources.
3037
3038         To keep the code simple, the entry type is now part of the entry key and
3039         we store records of a specific type in a 'type' subfolder. The cache
3040         structure looks like so:
3041         - WebKitCache/Version 5/[Partition]/[Type]/[Hash]
3042         - WebKitCache/Version 5/[Partition]/[Type]/[Hash]-blob (Optional)
3043
3044         Existing cache entries now that the 'resource' type as these are network
3045         resources.
3046
3047         * NetworkProcess/cache/NetworkCache.cpp:
3048         * NetworkProcess/cache/NetworkCacheKey.cpp:
3049         * NetworkProcess/cache/NetworkCacheKey.h:
3050         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
3051         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3052         * NetworkProcess/cache/NetworkCacheStorage.h:
3053
3054 2015-10-20  Hunseop Jeong  <hs85.jeong@samsung.com>
3055
3056         [EFL] ContextMenu doesn't work correctly on MiniBrowser after r191194.
3057         https://bugs.webkit.org/show_bug.cgi?id=150311
3058
3059         Reviewed by Gyuyoung Kim.
3060
3061         Restore the test_ewk2_context_menu API test to check the context menu whether it works correctly.
3062
3063         * PlatformEfl.cmake:
3064
3065 2015-10-13  Conrad Shultz  <conrad_shultz@apple.com>
3066
3067         _WKThumbnailView should support a snapshot-only mode
3068         https://bugs.webkit.org/show_bug.cgi?id=150106
3069
3070         Reviewed by Tim Horton.
3071
3072         Add a new property to _WKThumbnailView, exclusivelyUsesSnapshot, which causes _WKThumbnailView
3073         to bypass both layer tree reparenting and event suppression on the associated WKView.
3074
3075         Add a new method, -requestSnapshot, which clients can use to force _WKThumbnailView to refresh
3076         on demand.
3077
3078         * UIProcess/API/Cocoa/_WKThumbnailView.h:
3079         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
3080         (-[_WKThumbnailView requestSnapshot]):
3081         Extracted from -_requestSnapshotIfNeeded:.
3082         (-[_WKThumbnailView _viewWasUnparented]):
3083         (-[_WKThumbnailView _viewWasParented]):
3084         (-[_WKThumbnailView _requestSnapshotIfNeeded]):
3085
3086 2015-10-20  Alexey Proskuryakov  <ap@apple.com>
3087
3088         Build fix.
3089
3090         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
3091         * UIProcess/ios/forms/WKFileUploadPanel.mm:
3092
3093 2015-10-20  Joseph Pecoraro  <pecoraro@apple.com>
3094
3095         ASSERT when right clicking on SVG Image generating Share menu - can break Web Inspector
3096         https://bugs.webkit.org/show_bug.cgi?id=150374
3097
3098         Reviewed by Brian Burg.
3099
3100         When there is no absolute URL or downloadable media URL no system share
3101         menu is created, but we were still appending the null context menu to
3102         the list of context menu items.
3103
3104         * UIProcess/mac/WebContextMenuProxyMac.mm:
3105         (WebKit::WebContextMenuProxyMac::shareMenuItem):
3106         Bail early if the context menu is null.
3107
3108         (WebKit::WebContextMenuProxyMac::showContextMenu):
3109         Only append the share context menu item if it is non-null.
3110         This matches ContextMenuController.cpp in WebCore.
3111
3112 2015-10-20  Commit Queue  <commit-queue@webkit.org>
3113
3114         Unreviewed, rolling out r191306.
3115         https://bugs.webkit.org/show_bug.cgi?id=150371
3116
3117         "May have caused a significant warm PLT regression" (Requested
3118         by cdumez_ on #webkit).
3119
3120         Reverted changeset:
3121
3122         "[WK2] Generalize NetworkCacheStorage API so it can store
3123         different types of metadata"
3124         https://bugs.webkit.org/show_bug.cgi?id=150221
3125         http://trac.webkit.org/changeset/191306
3126
3127 2015-10-20  Tim Horton  <timothy_horton@apple.com>
3128
3129         Try to fix the build by disabling MAC_GESTURE_EVENTS on 10.9 and 10.10
3130
3131         * Configurations/FeatureDefines.xcconfig:
3132
3133 2015-10-20  Commit Queue  <commit-queue@webkit.org>
3134
3135         Unreviewed, rolling out r191333.
3136         https://bugs.webkit.org/show_bug.cgi?id=150362
3137
3138         Caused assertions on regression tests (Requested by ap on
3139         #webkit).
3140
3141         Reverted changeset:
3142
3143         "ERROR: Unhandled web process message
3144         'StorageAreaMap:DispatchStorageEvent'"
3145         https://bugs.webkit.org/show_bug.cgi?id=150315
3146         http://trac.webkit.org/changeset/191333
3147
3148 2015-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3149
3150         [UNIX] ASSERTION FAILED: m_shouldWaitForSyncReplies in Connection::connectionDidClose()
3151         https://bugs.webkit.org/show_bug.cgi?id=150361
3152
3153         Reviewed by Martin Robinson.
3154
3155         It doesn't always happen because it depends on how sockets are
3156         closed, and the state of the threads. The problem is that we are
3157         not handling the case when the read fails because we closed the
3158         connection. In that case we log the error and call
3159         Connection::connectionDidClose(). But it was connectionDidClose()
3160         the one closing the socket. So, in this particular case it's not an
3161         error but a normal termination, and we shouldn't try to close the
3162         connection again. Something similar can happen while sending a
3163         message, and we get a broken pipe error, but in that case we are
3164         only printing the error, so it's harmless.
3165
3166         * Platform/IPC/unix/ConnectionUnix.cpp:
3167         (IPC::Connection::readyReadHandler): Only print error and call
3168         connectionDidClose() if we are still connected when read fails.
3169         (IPC::Connection::sendOutgoingMessage): Only print error if we are
3170         still connected when send fails.
3171
3172 2015-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3173
3174         [GTK] Graphics corruption when entering/leaving AC mode quickly
3175         https://bugs.webkit.org/show_bug.cgi?id=150323
3176
3177         Reviewed by Mario Sanchez Prada.
3178
3179         The UI process is notified when entering accelerated compositing
3180         mode after the layers have been flushed and rendered to avoid
3181         flickering. However, this is producing flickering in the GTK+
3182         port, because we use an offscreen redirected window that is
3183         resized to a minimium size to save memory when not in AC mode. The
3184         web process always uses the current size of the redirected window,
3185         so when entering AC mode, contents are rendered into the 1x1
3186         window, then the UI process is notified, the redirected window is
3187         resized to its actual size, and we force a resize to ask the web
3188         process to render again, now at the correct size. Rendering at 1x1
3189         and then resizing the window is what produces the flickering when
3190         entering AC mode, but it's also inefficient, since we need to
3191         render again after the redirected window is resized. So, this
3192         patch adds a WillEnterAcceleratedCompositing message that is sent
3193         to the UI process when the layer tree host is created but before
3194         the contents have been composited and rendered. This is
3195         implemented by the GTK+ port to prepare for entering AC mode, by
3196         resizing the redirected window. When we actually enter AC mode,
3197         the contents have already been rendered in the web process at the
3198         correct size, so we can just use the redirected window surface
3199         instead of the drawing area one, and paint in the web view without
3200         any flickering. We no longer need the forceResize either.
3201         When leaving accelerated compositing mode, we now clear the redirected
3202         window resources after a short delay. This ensures that we have
3203         already rendered the update sent in the ExitAcceleratedCompositingMode
3204         message, but also that entering/leaving AC mode quickly doesn't
3205         produce any redirected window resize.
3206
3207         * UIProcess/API/gtk/PageClientImpl.cpp:
3208         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
3209         * UIProcess/API/gtk/PageClientImpl.h:
3210         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3211         (webkitWebViewBaseClearRedirectedWindowSoon):
3212         (webkitWebViewBaseWillEnterAcceleratedCompositingMode):
3213         (webkitWebViewBaseEnterAcceleratedCompositingMode):
3214         (webkitWebViewBaseExitAcceleratedCompositingMode):
3215         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
3216         * UIProcess/CoordinatedGraphics/WebView.h:
3217         * UIProcess/DrawingAreaProxy.h:
3218         (WebKit::DrawingAreaProxy::willEnterAcceleratedCompositingMode):
3219         * UIProcess/DrawingAreaProxy.messages.in:
3220         * UIProcess/DrawingAreaProxyImpl.cpp:
3221         (WebKit::DrawingAreaProxyImpl::willEnterAcceleratedCompositingMode):
3222         * UIProcess/DrawingAreaProxyImpl.h:
3223         (WebKit::DrawingAreaProxyImpl::forceResize): Deleted.
3224         * UIProcess/PageClient.h:
3225         * UIProcess/WebPageProxy.cpp:
3226         (WebKit::WebPageProxy::willEnterAcceleratedCompositingMode):
3227         * UIProcess/WebPageProxy.h:
3228         * UIProcess/ios/PageClientImplIOS.h:
3229         * UIProcess/ios/PageClientImplIOS.mm:
3230         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
3231         * UIProcess/mac/PageClientImpl.h:
3232         * UIProcess/mac/PageClientImpl.mm:
3233         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
3234         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3235         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
3236
3237 2015-10-20  Sergio Villar Senin  <svillar@igalia.com>
3238
3239         [GTK] Fix build for ENABLE_PLUGIN_PROCESS_GTK2=OFF
3240         https://bugs.webkit.org/show_bug.cgi?id=150086
3241
3242         Reviewed by Darin Adler.
3243
3244         * UIProcess/cairo/BackingStoreCairo.cpp:
3245         (WebKit::BackingStore::createBackend):
3246
3247 2015-10-20  Yoav Weiss  <yoav@yoav.ws>
3248
3249         Rename the PICTURE_SIZES flag to CURRENTSRC
3250         https://bugs.webkit.org/show_bug.cgi?id=150275
3251
3252         Reviewed by Dean Jackson.
3253
3254         * Configurations/FeatureDefines.xcconfig:
3255
3256 2015-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3257
3258         ERROR: Unhandled web process message 'StorageAreaMap:DispatchStorageEvent'
3259         https://bugs.webkit.org/show_bug.cgi?id=150315
3260
3261         Reviewed by Andreas Kling.
3262
3263         It was introduced in r184930, that keeps the session storage area
3264         maps alive in the UI process when they are destroyed by the web
3265         process. The problem is that we also keep the listeners, so that
3266         events are also dispatched to the listeners of destroyed areas,
3267         and the message handlers were removed in the web process.
3268
3269         * UIProcess/Storage/StorageManager.cpp:
3270         (WebKit::StorageManager::createTransientLocalStorageMap): Add a
3271         listener for the new storage map ID when the map is reused.
3272         (WebKit::StorageManager::destroyStorageMap): Always remove
3273         listeners of destroyed maps.
3274
3275 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3276
3277         Remove unused support for long presses from WebKit
3278         https://bugs.webkit.org/show_bug.cgi?id=150345
3279
3280         Reviewed by Beth Dakin.
3281
3282         * Shared/WebPreferencesDefinitions.h:
3283         * UIProcess/API/APIUIClient.h:
3284         (API::UIClient::didBeginTrackingPotentialLongMousePress): Deleted.
3285         (API::UIClient::didRecognizeLongMousePress): Deleted.
3286         (API::UIClient::didCancelTrackingPotentialLongMousePress): Deleted.
3287         * UIProcess/API/C/WKPage.cpp:
3288         (WKPageSetPageUIClient): Deleted.
3289         * UIProcess/API/C/WKPageUIClient.h:
3290         * UIProcess/API/C/WKPreferences.cpp:
3291         (WKPreferencesGetLongMousePressEnabled):
3292         (WKPreferencesSetLongMousePressEnabled): Deleted.
3293         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3294         * UIProcess/WebPageProxy.cpp:
3295         (WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress): Deleted.
3296         (WebKit::WebPageProxy::didRecognizeLongMousePress): Deleted.
3297         (WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress): Deleted.
3298         * UIProcess/WebPageProxy.h:
3299         * UIProcess/WebPageProxy.messages.in:
3300         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
3301         (API::InjectedBundle::PageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
3302         (API::InjectedBundle::PageUIClient::didRecognizeLongMousePress): Deleted.
3303         (API::InjectedBundle::PageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
3304         * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
3305         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
3306         (WebKit::InjectedBundlePageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
3307         (WebKit::InjectedBundlePageUIClient::didRecognizeLongMousePress): Deleted.
3308         (WebKit::InjectedBundlePageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
3309         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
3310         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3311         (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress): Deleted.
3312         (WebKit::WebChromeClient::didRecognizeLongMousePress): Deleted.
3313         (WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress): Deleted.
3314         * WebProcess/WebCoreSupport/WebChromeClient.h:
3315         * WebProcess/WebPage/WebPage.cpp:
3316         (WebKit::WebPage::updatePreferences): Deleted.
3317
3318 2015-10-19  Chris Dumez  <cdumez@apple.com>
3319
3320         Make sure development Safari does not delete the stable Safari cache storage.
3321         https://bugs.webkit.org/show_bug.cgi?id=150343
3322
3323         Reviewed by Antti Koivisto.
3324
3325         Make sure development Safari does not delete the stable Safari disk cache
3326         storage. Development Safari now uses Version 5, while the last stable
3327         Safari uses Version 4. Since the 2 versions can co-exist, it is best not
3328         to drop the old cache version (4) at this point.
3329
3330         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3331         (WebKit::NetworkCache::Storage::deleteOldVersions):
3332
3333 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3334
3335         WKView being inside WKWebView leads to weird API issues
3336         https://bugs.webkit.org/show_bug.cgi?id=150174
3337
3338         Reviewed by Darin Adler.
3339
3340         * UIProcess/API/mac/WKView.mm:
3341         * UIProcess/API/mac/WKViewInternal.h:
3342         * UIProcess/Cocoa/WebViewImpl.h: Added.
3343         * UIProcess/Cocoa/WebViewImpl.mm: Added.
3344         (WebKit::WebViewImpl::WebViewImpl):
3345         (WebKit::WebViewImpl::~WebViewImpl):
3346         (WebKit::WebViewImpl::setDrawsBackground):
3347         (WebKit::WebViewImpl::drawsBackground):
3348         (WebKit::WebViewImpl::setDrawsTransparentBackground):
3349         (WebKit::WebViewImpl::drawsTransparentBackground):
3350         (WebKit::WebViewImpl::acceptsFirstResponder):
3351         (WebKit::WebViewImpl::becomeFirstResponder):
3352         (WebKit::WebViewImpl::resignFirstResponder):
3353         (WebKit::WebViewImpl::isFocused):
3354         (WebKit::WebViewImpl::viewWillStartLiveResize):
3355         (WebKit::WebViewImpl::viewDidEndLiveResize):
3356         (WebKit::WebViewImpl::setFrameSize):
3357         (WebKit::WebViewImpl::disableFrameSizeUpdates):
3358         (WebKit::WebViewImpl::enableFrameSizeUpdates):
3359         (WebKit::WebViewImpl::frameSizeUpdatesDisabled):
3360         (WebKit::WebViewImpl::setFrameAndScrollBy):
3361         (WebKit::WebViewImpl::setFixedLayoutSize):
3362         (WebKit::WebViewImpl::fixedLayoutSize):
3363         (WebKit::WebViewImpl::setDrawingAreaSize):
3364         (WebKit::WebViewImpl::setContentPreparationRect):
3365         (WebKit::WebViewImpl::updateViewExposedRect):
3366         (WebKit::WebViewImpl::setClipsToVisibleRect):
3367         (WebKit::WebViewImpl::setIntrinsicContentSize):
3368         (WebKit::WebViewImpl::intrinsicContentSize):
3369         (WebKit::WebViewImpl::setViewScale):
3370         (WebKit::WebViewImpl::viewScale):
3371         (WebKit::WebViewImpl::layoutMode):
3372         (WebKit::WebViewImpl::setLayoutMode):
3373         (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
3374         (WebKit::WebViewImpl::updateSupportsArbitraryLayoutModes):
3375         (WebKit::WebViewImpl::updateSecureInputState):
3376         (WebKit::WebViewImpl::resetSecureInputState):
3377         (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
3378         (WebKit::WebViewImpl::hasFullScreenWindowController):
3379         (WebKit::WebViewImpl::fullScreenWindowController):
3380         (WebKit::WebViewImpl::closeFullScreenWindowController):
3381         (WebKit::WebViewImpl::fullScreenPlaceholderView):
3382         (WebKit::WebViewImpl::createFullScreenWindow):
3383         Move the actual implementation of a number of WKView methods into a
3384         C++ class, WebViewImpl, which WKView calls directly into.
3385         Eventually, we will move all of the logic of WKView into WebViewImpl,
3386         and then duplicate the necessary forwarding in WKWebView and remove
3387         WKWebView's inner WKView.
3388
3389         * UIProcess/mac/PageClientImpl.h:
3390         * UIProcess/mac/PageClientImpl.mm:
3391         (WebKit::PageClientImpl::isViewFocused):
3392         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
3393         (WebKit::PageClientImpl::updateSecureInputState):
3394         (WebKit::PageClientImpl::resetSecureInputState):
3395         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
3396         (WebKit::PageClientImpl::beganEnterFullScreen):
3397         (WebKit::PageClientImpl::beganExitFullScreen):
3398         For now, forward PageClient requests that can be answered by WebViewImpl
3399         to WebViewImpl. Eventually, we'll probably fold PageClientImpl and WebViewImpl
3400         together into one class, and these things will collapse down.
3401
3402         * UIProcess/mac/WKFullScreenWindowController.h:
3403         * UIProcess/mac/WKFullScreenWindowController.mm:
3404         (-[WKFullScreenWindowController initWithWindow:webView:page:]):
3405         (-[WKFullScreenWindowController enterFullScreen:]):
3406         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
3407         (-[WKFullScreenWindowController exitFullScreen]):
3408         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
3409         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
3410         (-[WKFullScreenWindowController _manager]):
3411         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
3412         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
3413         (-[WKFullScreenWindowController initWithWindow:webView:]): Deleted.
3414         (-[WKFullScreenWindowController _page]): Deleted.
3415         * UIProcess/mac/WKViewLayoutStrategy.h:
3416         * UIProcess/mac/WKViewLayoutStrategy.mm:
3417         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]):
3418         (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]):
3419         (-[WKViewLayoutStrategy invalidate]):
3420         (-[WKViewLayoutStrategy didChangeFrameSize]):
3421         (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
3422         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
3423         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]):
3424         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
3425         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
3426         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
3427         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]): Deleted.
3428         (-[WKViewLayoutStrategy initWithPage:view:mode:]): Deleted.
3429         (-[WKViewLayoutStrategy willDestroyView:]): Deleted.
3430         (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
3431         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
3432         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]): Deleted.
3433         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
3434         Make WKViewLayoutStrategy and WKFullScreenWindowController operate in terms of generic
3435         NSViews instead of WKView, so that eventually they will be able to work for either
3436         WKView or WKWebView, and so that they can sit underneath WebViewImpl.
3437
3438         * WebKit2.xcodeproj/project.pbxproj:
3439
3440 2015-10-19  Commit Queue  <commit-queue@webkit.org>
3441
3442         Unreviewed, rolling out r191307.