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