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