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