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