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