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