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