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