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