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