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