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