20e0a2797031fc6b526862b21dad71fb3193331f
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         Unreviewed. Fix GTK+ build after r191924.
4
5         * UIProcess/API/gtk/WebKitWebView.cpp:
6
7 2015-11-02  Alex Christensen  <achristensen@webkit.org>
8
9         Fix CMake build after r191922.
10
11         * PlatformMac.cmake:
12
13 2015-11-02  Andy Estes  <aestes@apple.com>
14
15         Try again to fix the iOS build.
16
17         * Shared/mac/PDFKitImports.mm:
18
19 2015-11-02  Tim Horton  <timothy_horton@apple.com>
20
21         Try to fix the iOS build
22
23         * Shared/mac/PDFKitImports.h:
24
25 2015-11-02  Tim Horton  <timothy_horton@apple.com>
26
27         Address a misssed review comment in r191922
28
29         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
30         (WebKit::PDFPlugin::nextMatchForString):
31
32 2015-11-02  Anders Carlsson  <andersca@apple.com>
33
34         Add KVO-compliant _webProcessIsResponsive property to WKWebView and _WKObservablePageState
35         https://bugs.webkit.org/show_bug.cgi?id=150818
36         rdar://problem/22372131
37
38         Reviewed by Tim Horton.
39
40         * UIProcess/API/C/mac/WKPagePrivateMac.h:
41         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
42         (-[WKObservablePageState _webProcessIsResponsive]):
43         * UIProcess/API/Cocoa/PageLoadStateObserver.h:
44         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
45         (-[WKBrowsingContextController _webProcessIsResponsive]):
46         * UIProcess/API/Cocoa/WKWebView.mm:
47         (-[WKWebView _webProcessIsResponsive]):
48         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
49         * UIProcess/Cocoa/NavigationState.h:
50         * UIProcess/Cocoa/NavigationState.mm:
51         (WebKit::NavigationState::willChangeWebProcessIsResponsive):
52         (WebKit::NavigationState::didChangeWebProcessIsResponsive):
53         * UIProcess/PageLoadState.cpp:
54         (WebKit::PageLoadState::willChangeProcessIsResponsive):
55         (WebKit::PageLoadState::didChangeProcessIsResponsive):
56         * UIProcess/PageLoadState.h:
57         * UIProcess/ResponsivenessTimer.cpp:
58         (WebKit::ResponsivenessTimer::ResponsivenessTimer):
59         (WebKit::ResponsivenessTimer::timerFired):
60         (WebKit::ResponsivenessTimer::stop):
61         * UIProcess/ResponsivenessTimer.h:
62         * UIProcess/WebPageProxy.cpp:
63         (WebKit::WebPageProxy::willChangeProcessIsResponsive):
64         (WebKit::WebPageProxy::didChangeProcessIsResponsive):
65         * UIProcess/WebPageProxy.h:
66         * UIProcess/WebProcessProxy.cpp:
67         (WebKit::WebProcessProxy::WebProcessProxy):
68         (WebKit::WebProcessProxy::didBecomeUnresponsive):
69         (WebKit::WebProcessProxy::didBecomeResponsive):
70         (WebKit::WebProcessProxy::willChangeIsResponsive):
71         (WebKit::WebProcessProxy::didChangeIsResponsive):
72         * UIProcess/WebProcessProxy.h:
73
74 2015-11-02  Tim Horton  <timothy_horton@apple.com>
75
76         PDFPlugin should take advantage of threaded scrolling
77         https://bugs.webkit.org/show_bug.cgi?id=150037
78
79         Reviewed by Anders Carlsson.
80
81         Duplicate PDFPlugin, creating PDFPlugin (the modern version), and
82         DeprecatedPDFPlugin (containing the code that used to be in PDFPlugin
83         prior to this patch).
84
85         The new PDFPlugin differs from the old one in a few significant ways,
86         and we need to keep both alive for the time being. Significant differences
87         include:
88
89         - PDFPlugin is no longer a ScrollableArea
90         - PDFPlugin no longer hosts layers owned by PDFKit; instead, it draws
91           into the page tiles, allowing WebCore's threaded scrolling to do its job
92         - PDFPlugin now resizes itself to the size of the document
93         - PDFPlugin doesn't handle zooming itself, it just delegates to the page
94         - PDFLayerController has large and incompatible API changes
95         - PDFPlugin now implements more of the HUD behavior, but it's still
96           painted by PDFLayerController (into a view-relative PageOverlay)
97
98         [ File list elided because it's long and useless. ]
99
100 2015-11-02  Andy Estes  <aestes@apple.com>
101
102         [Cocoa] Add tvOS and watchOS to SUPPORTED_PLATFORMS
103         https://bugs.webkit.org/show_bug.cgi?id=150819
104
105         Reviewed by Dan Bernstein.
106
107         This tells Xcode to include these platforms in its Devices dropdown, making it possible to build in the IDE.
108
109         * Configurations/Base.xcconfig:
110
111 2015-11-02  Anders Carlsson  <andersca@apple.com>
112
113         Begin work on supporting reply blocks in _WKRemoteObjectRegistry
114         https://bugs.webkit.org/show_bug.cgi?id=150739
115
116         Reviewed by Tim Horton.
117
118         * Platform/spi/Cocoa/BlockSPI.h:
119         Add SPI header.
120
121         * Shared/API/Cocoa/RemoteObjectInvocation.h:
122         (WebKit::RemoteObjectInvocation::ReplyInfo::ReplyInfo):
123         (WebKit::RemoteObjectInvocation::replyInfo):
124         * Shared/API/Cocoa/RemoteObjectInvocation.mm:
125         (WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
126         (WebKit::RemoteObjectInvocation::encode):
127         (WebKit::RemoteObjectInvocation::decode):
128         Add an optional ReplyInfo struct to RemoteObjectInvocation.
129
130         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
131         (generateReplyIdentifier):
132         Helper function to generate a reply identifier.
133
134         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
135         Do some block parameter validation.
136
137         * WebKit2.xcodeproj/project.pbxproj:
138
139 2015-11-02  Brent Fulgham  <bfulgham@apple.com>
140
141         [iOS] Another unreviewed sandbox update.
142
143         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Change copyright.
144
145 2015-11-02  Brent Fulgham  <bfulgham@apple.com>
146
147         [iOS] Unreviewed sandbox update.
148
149         Correcting copyright information.
150
151         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
152
153 2015-11-02  Tim Horton  <timothy_horton@apple.com>
154
155         Get rid of WKWebView's inner WKView (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/Cocoa/WKWebView.mm:
161         (-[WKWebView initWithFrame:configuration:]):
162         (-[WKWebView dealloc]):
163         (-[WKWebView allowsLinkPreview]):
164         (-[WKWebView setAllowsLinkPreview:]):
165         (-[WKWebView acceptsFirstResponder]):
166         (-[WKWebView becomeFirstResponder]):
167         (-[WKWebView resignFirstResponder]):
168         (-[WKWebView viewWillStartLiveResize]):
169         (-[WKWebView viewDidEndLiveResize]):
170         (-[WKWebView isFlipped]):
171         (-[WKWebView intrinsicContentSize]):
172         (-[WKWebView prepareContentInRect:]):
173         (-[WKWebView setFrameSize:]):
174         (-[WKWebView renewGState]):
175         (-[WKWebView writeSelectionToPasteboard:types:]):
176         (-[WKWebView centerSelectionInVisibleArea:]):
177         (-[WKWebView validRequestorForSendType:returnType:]):
178         (-[WKWebView readSelectionFromPasteboard:]):
179         (-[WKWebView changeFont:]):
180         (-[WKWebView validateUserInterfaceItem:]):
181         (-[WKWebView startSpeaking:]):
182         (-[WKWebView stopSpeaking:]):
183         (-[WKWebView showGuessPanel:]):
184         (-[WKWebView checkSpelling:]):
185         (-[WKWebView changeSpelling:]):
186         (-[WKWebView toggleContinuousSpellChecking:]):
187         (-[WKWebView isGrammarCheckingEnabled]):
188         (-[WKWebView setGrammarCheckingEnabled:]):
189         (-[WKWebView toggleGrammarChecking:]):
190         (-[WKWebView toggleAutomaticSpellingCorrection:]):
191         (-[WKWebView orderFrontSubstitutionsPanel:]):
192         (-[WKWebView toggleSmartInsertDelete:]):
193         (-[WKWebView isAutomaticQuoteSubstitutionEnabled]):
194         (-[WKWebView setAutomaticQuoteSubstitutionEnabled:]):
195         (-[WKWebView toggleAutomaticQuoteSubstitution:]):
196         (-[WKWebView isAutomaticDashSubstitutionEnabled]):
197         (-[WKWebView setAutomaticDashSubstitutionEnabled:]):
198         (-[WKWebView toggleAutomaticDashSubstitution:]):
199         (-[WKWebView isAutomaticLinkDetectionEnabled]):
200         (-[WKWebView setAutomaticLinkDetectionEnabled:]):
201         (-[WKWebView toggleAutomaticLinkDetection:]):
202         (-[WKWebView isAutomaticTextReplacementEnabled]):
203         (-[WKWebView setAutomaticTextReplacementEnabled:]):
204         (-[WKWebView toggleAutomaticTextReplacement:]):
205         (-[WKWebView uppercaseWord:]):
206         (-[WKWebView lowercaseWord:]):
207         (-[WKWebView capitalizeWord:]):
208         (-[WKWebView _wantsKeyDownForEvent:]):
209         (-[WKWebView scrollWheel:]):
210         (-[WKWebView swipeWithEvent:]):
211         (-[WKWebView mouseMoved:]):
212         (-[WKWebView mouseDown:]):
213         (-[WKWebView mouseUp:]):
214         (-[WKWebView mouseDragged:]):
215         (-[WKWebView mouseEntered:]):
216         (-[WKWebView mouseExited:]):
217         (-[WKWebView otherMouseDown:]):
218         (-[WKWebView otherMouseDragged:]):
219         (-[WKWebView otherMouseUp:]):
220         (-[WKWebView rightMouseDown:]):
221         (-[WKWebView rightMouseDragged:]):
222         (-[WKWebView rightMouseUp:]):
223         (-[WKWebView pressureChangeWithEvent:]):
224         (-[WKWebView acceptsFirstMouse:]):
225         (-[WKWebView shouldDelayWindowOrderingForEvent:]):
226         (-[WKWebView doCommandBySelector:]):
227         (-[WKWebView insertText:]):
228         (-[WKWebView insertText:replacementRange:]):
229         (-[WKWebView inputContext]):
230         (-[WKWebView performKeyEquivalent:]):
231         (-[WKWebView keyUp:]):
232         (-[WKWebView keyDown:]):
233         (-[WKWebView flagsChanged:]):
234         (-[WKWebView setMarkedText:selectedRange:replacementRange:]):
235         (-[WKWebView unmarkText]):
236         (-[WKWebView selectedRange]):
237         (-[WKWebView hasMarkedText]):
238         (-[WKWebView markedRange]):
239         (-[WKWebView attributedSubstringForProposedRange:actualRange:]):
240         (-[WKWebView characterIndexForPoint:]):
241         (-[WKWebView firstRectForCharacterRange:actualRange:]):
242         (-[WKWebView selectedRangeWithCompletionHandler:]):
243         (-[WKWebView markedRangeWithCompletionHandler:]):
244         (-[WKWebView hasMarkedTextWithCompletionHandler:]):
245         (-[WKWebView attributedSubstringForProposedRange:completionHandler:]):
246         (-[WKWebView firstRectForCharacterRange:completionHandler:]):
247         (-[WKWebView characterIndexForPoint:completionHandler:]):
248         (-[WKWebView validAttributesForMarkedText]):
249         (-[WKWebView draggedImage:endedAt:operation:]):
250         (-[WKWebView draggingEntered:]):
251         (-[WKWebView draggingUpdated:]):
252         (-[WKWebView draggingExited:]):
253         (-[WKWebView prepareForDragOperation:]):
254         (-[WKWebView performDragOperation:]):
255         (-[WKWebView _hitTest:dragTypes:]):
256         (-[WKWebView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
257         (-[WKWebView viewWillMoveToWindow:]):
258         (-[WKWebView viewDidMoveToWindow]):
259         (-[WKWebView drawRect:]):
260         (-[WKWebView isOpaque]):
261         (-[WKWebView mouseDownCanMoveWindow]):
262         (-[WKWebView viewDidHide]):
263         (-[WKWebView viewDidUnhide]):
264         (-[WKWebView viewDidChangeBackingProperties]):
265         (-[WKWebView _activeSpaceDidChange:]):
266         (-[WKWebView accessibilityFocusedUIElement]):
267         (-[WKWebView accessibilityIsIgnored]):
268         (-[WKWebView accessibilityHitTest:]):
269         (-[WKWebView accessibilityAttributeValue:]):
270         (-[WKWebView hitTest:]):
271         (-[WKWebView conversationIdentifier]):
272         (-[WKWebView quickLookWithEvent:]):
273         (-[WKWebView addTrackingRect:owner:userData:assumeInside:]):
274         (-[WKWebView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]):
275         (-[WKWebView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]):
276         (-[WKWebView removeTrackingRect:]):
277         (-[WKWebView _removeTrackingRects:count:]):
278         (-[WKWebView view:stringForToolTip:point:userData:]):
279         (-[WKWebView pasteboardChangedOwner:]):
280         (-[WKWebView pasteboard:provideDataForType:]):
281         (-[WKWebView namesOfPromisedFilesDroppedAtDestination:]):
282         (-[WKWebView wantsUpdateLayer]):
283         (-[WKWebView updateLayer]):
284         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
285         (-[WKWebView allowsBackForwardNavigationGestures]):
286         (-[WKWebView smartMagnifyWithEvent:]):
287         (-[WKWebView setMagnification:centeredAtPoint:]):
288         (-[WKWebView setMagnification:]):
289         (-[WKWebView magnification]):
290         (-[WKWebView setAllowsMagnification:]):
291         (-[WKWebView allowsMagnification]):
292         (-[WKWebView magnifyWithEvent:]):
293         (-[WKWebView rotateWithEvent:]):
294         (-[WKWebView _web_superInputContext]):
295         (-[WKWebView _web_superQuickLookWithEvent:]):
296         (-[WKWebView _web_superSwipeWithEvent:]):
297         (-[WKWebView _web_superMagnifyWithEvent:]):
298         (-[WKWebView _web_superSmartMagnifyWithEvent:]):
299         (-[WKWebView _web_superRemoveTrackingRect:]):
300         (-[WKWebView _web_superAccessibilityAttributeValue:]):
301         (-[WKWebView _web_superDoCommandBySelector:]):
302         (-[WKWebView _web_superPerformKeyEquivalent:]):
303         (-[WKWebView _web_superKeyDown:]):
304         (-[WKWebView _web_superHitTest:]):
305         (-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
306         (-[WKWebView _web_prepareForImmediateActionAnimation]):
307         (-[WKWebView _web_cancelImmediateActionAnimation]):
308         (-[WKWebView _web_completeImmediateActionAnimation]):
309         (-[WKWebView _web_didChangeContentSize:]):
310         (-[WKWebView _web_dismissContentRelativeChildWindows]):
311         (-[WKWebView _web_dismissContentRelativeChildWindowsWithAnimation:]):
312         (-[WKWebView _web_gestureEventWasNotHandledByWebCore:]):
313         (-[WKWebView _setEditable:]):
314         (-[WKWebView _remoteObjectRegistry]):
315         (-[WKWebView _layoutMode]):
316         (-[WKWebView _setLayoutMode:]):
317         (-[WKWebView _setViewScale:]):
318         (-[WKWebView _drawsTransparentBackground]):
319         (-[WKWebView _setDrawsTransparentBackground:]):
320         (-[WKWebView _inspectorAttachmentView]):
321         (-[WKWebView _setInspectorAttachmentView:]):
322         (-[WKWebView _windowOcclusionDetectionEnabled]):
323         (-[WKWebView _setWindowOcclusionDetectionEnabled:]):
324         (-[WKWebView _setOverrideDeviceScaleFactor:]):
325         (-[WKWebView _overrideDeviceScaleFactor]):
326         (-[WKWebView _setTopContentInset:]):
327         (-[WKWebView _topContentInset]):
328         (-[WKWebView _pageExtendedBackgroundColor]):
329         (-[WKWebView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
330         (-[WKWebView _setAutomaticallyAdjustsContentInsets:]):
331         (-[WKWebView _automaticallyAdjustsContentInsets]):
332         (-[WKWebView _setMinimumLayoutWidth:]):
333         (-[WKWebView resizeSubviewsWithOldSize:]): Deleted.
334         (-[WKWebView _ignoresNonWheelEvents]): Deleted.
335         (-[WKWebView _setIgnoresNonWheelEvents:]): Deleted.
336         (-[WKWebView _setIntrinsicContentSize:]): Deleted.
337         * UIProcess/API/Cocoa/WKWebViewInternal.h:
338         * UIProcess/API/mac/WKView.mm:
339         (-[WKView _web_superInputContext]):
340         (-[WKView _web_superQuickLookWithEvent:]):
341         (-[WKView _web_superSwipeWithEvent:]):
342         (-[WKView _web_superMagnifyWithEvent:]):
343         (-[WKView _web_superSmartMagnifyWithEvent:]):
344         (-[WKView _web_superRemoveTrackingRect:]):
345         (-[WKView _web_superAccessibilityAttributeValue:]):
346         (-[WKView _web_superDoCommandBySelector:]):
347         (-[WKView _web_superPerformKeyEquivalent:]):
348         (-[WKView _web_superKeyDown:]):
349         (-[WKView _web_superHitTest:]):
350         (-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
351         (-[WKView _web_prepareForImmediateActionAnimation]):
352         (-[WKView _web_cancelImmediateActionAnimation]):
353         (-[WKView _web_completeImmediateActionAnimation]):
354         (-[WKView _web_didChangeContentSize:]):
355         (-[WKView _web_dismissContentRelativeChildWindows]):
356         (-[WKView _web_dismissContentRelativeChildWindowsWithAnimation:]):
357         (-[WKView _web_gestureEventWasNotHandledByWebCore:]):
358         (-[WKView _superInputContext]): Deleted.
359         (-[WKView _superQuickLookWithEvent:]): Deleted.
360         (-[WKView _superSwipeWithEvent:]): Deleted.
361         (-[WKView _superMagnifyWithEvent:]): Deleted.
362         (-[WKView _superSmartMagnifyWithEvent:]): Deleted.
363         (-[WKView _superRemoveTrackingRect:]): Deleted.
364         (-[WKView _superAccessibilityAttributeValue:]): Deleted.
365         (-[WKView _superDoCommandBySelector:]): Deleted.
366         (-[WKView _superPerformKeyEquivalent:]): Deleted.
367         (-[WKView _superKeyDown:]): Deleted.
368         (-[WKView _superHitTest:]): Deleted.
369         (-[WKView _addFontPanelObserver]): Deleted.
370         * UIProcess/API/mac/WKViewInternal.h:
371         * UIProcess/Cocoa/WebViewImpl.h:
372         * UIProcess/Cocoa/WebViewImpl.mm:
373         (WebKit::WebViewImpl::hitTest):
374         (WebKit::WebViewImpl::updateSecureInputState):
375         (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
376         (WebKit::WebViewImpl::executeSavedCommandBySelector):
377         (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimation):
378         (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly):
379         (WebKit::WebViewImpl::quickLookWithEvent):
380         (WebKit::WebViewImpl::prepareForImmediateActionAnimation):
381         (WebKit::WebViewImpl::cancelImmediateActionAnimation):
382         (WebKit::WebViewImpl::completeImmediateActionAnimation):
383         (WebKit::WebViewImpl::didChangeContentSize):
384         (WebKit::WebViewImpl::accessibilityAttributeValue):
385         (WebKit::WebViewImpl::removeTrackingRect):
386         (WebKit::WebViewImpl::swipeWithEvent):
387         (WebKit::WebViewImpl::magnifyWithEvent):
388         (WebKit::WebViewImpl::smartMagnifyWithEvent):
389         (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCore):
390         (WebKit::WebViewImpl::doCommandBySelector):
391         (WebKit::WebViewImpl::inputContext):
392         (WebKit::WebViewImpl::performKeyEquivalent):
393         (WebKit::WebViewImpl::keyDown):
394         * UIProcess/mac/PageClientImpl.mm:
395         (WebKit::PageClientImpl::setDragImage):
396         (WebKit::PageClientImpl::intrinsicContentSizeDidChange): Deleted.
397         (WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult): Deleted.
398         Plop.
399
400 2015-11-02  Anders Carlsson  <andersca@apple.com>
401
402         Remove unused API client callback code
403         https://bugs.webkit.org/show_bug.cgi?id=150813
404
405         Reviewed by Tim Horton.
406
407         * UIProcess/API/APILoaderClient.h:
408         (API::LoaderClient::interactionOccurredWhileProcessUnresponsive): Deleted.
409         * UIProcess/API/C/WKPage.cpp:
410         (WKPageSetPageLoaderClient): Deleted.
411         * UIProcess/ResponsivenessTimer.cpp:
412         (WebKit::ResponsivenessTimer::timerFired):
413         * UIProcess/ResponsivenessTimer.h:
414         * UIProcess/WebPageProxy.cpp:
415         (WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive): Deleted.
416         * UIProcess/WebPageProxy.h:
417         * UIProcess/WebProcessProxy.cpp:
418         (WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive): Deleted.
419         * UIProcess/WebProcessProxy.h:
420
421 2015-10-31  Andy Estes  <aestes@apple.com>
422
423         Replace iOS-only WebKitSystemInterface calls with SPI
424         https://bugs.webkit.org/show_bug.cgi?id=150763
425
426         Reviewed by Darin Adler.
427
428         * Platform/ios/AccessibilityIOS.h: Added.
429         * Platform/ios/AccessibilityIOS.mm: Added.
430         (WebKit::newAccessibilityRemoteToken): Upstreamed the implementation of WKAXRemoteToken() from WebKitSystemInterface.
431         * Shared/WebPreferencesDefinitions.h: Used Settings::defaultMinimumZoomFontSize() instead of WKGetMinimumZoomFontSize().
432         * Shared/WebPreferencesStore.cpp:
433         * UIProcess/API/Cocoa/WKWebView.mm:
434         (shouldAllowPictureInPictureMediaPlayback): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
435         (-[WKWebView _takeViewSnapshot]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
436         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
437         (-[WKWebViewConfiguration init]): Used deviceClass() instead of WKGetDeviceClass().
438         * UIProcess/ios/WKContentView.mm:
439         (-[WKContentView _commonInitializationWithProcessPool:configuration:]): Used screenScaleFactor() instead of WKGetScaleFactorForScreen().
440         (-[WKContentView _updateForScreen:]): Ditto.
441         (storeAccessibilityRemoteConnectionInformation): Upstreamed the implementation of WKAXStoreRemoteConnectionInformation() from WebKitSystemInterface.
442         (-[WKContentView _accessibilityRegisterUIProcessTokens]): Used newAccessibilityRemoteToken() and storeAccessibilityRemoteConnectionInformation() instead of WKAXRemoteToken() and WKAXStoreRemoteConnectionInformation().
443         * UIProcess/ios/WKContentViewInteraction.mm:
444         * UIProcess/ios/WebPageProxyIOS.mm:
445         (WebKit::WebPageProxy::screenSize): Used screenSize() instead of WKGetScreenSize().
446         (WebKit::WebPageProxy::availableScreenSize): Used availableScreenSize() instead of WKGetAvailableScreenSize().
447         (WebKit::WebPageProxy::textAutosizingWidth): Used screenSize() instead of WKGetScreenSize().
448         * WebKit2.xcodeproj/project.pbxproj:
449         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
450         (InitWebCoreSystemInterface): Deleted.
451         * WebProcess/WebPage/ios/WebPageIOS.mm:
452         (WebKit::WebPage::platformInitializeAccessibility): Used newAccessibilityRemoteToken() instead of WKAXRemoteToken().
453
454 2015-11-02  Commit Queue  <commit-queue@webkit.org>
455
456         Unreviewed, rolling out r191902.
457         https://bugs.webkit.org/show_bug.cgi?id=150811
458
459         This change broke iOS builders (Requested by ryanhaddad on
460         #webkit).
461
462         Reverted changeset:
463
464         "Replace iOS-only WebKitSystemInterface calls with SPI"
465         https://bugs.webkit.org/show_bug.cgi?id=150763
466         http://trac.webkit.org/changeset/191902
467
468 2015-10-31  Andy Estes  <aestes@apple.com>
469
470         Replace iOS-only WebKitSystemInterface calls with SPI
471         https://bugs.webkit.org/show_bug.cgi?id=150763
472
473         Reviewed by Darin Adler.
474
475         * Platform/ios/AccessibilityIOS.h: Added.
476         * Platform/ios/AccessibilityIOS.mm: Added.
477         (WebKit::newAccessibilityRemoteToken): Upstreamed the implementation of WKAXRemoteToken() from WebKitSystemInterface.
478         * Shared/WebPreferencesDefinitions.h: Used Settings::defaultMinimumZoomFontSize() instead of WKGetMinimumZoomFontSize().
479         * Shared/WebPreferencesStore.cpp:
480         * UIProcess/API/Cocoa/WKWebView.mm:
481         (shouldAllowPictureInPictureMediaPlayback): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
482         (-[WKWebView _takeViewSnapshot]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
483         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
484         (-[WKWebViewConfiguration init]): Used deviceClass() instead of WKGetDeviceClass().
485         * UIProcess/ios/WKContentView.mm:
486         (-[WKContentView _commonInitializationWithProcessPool:configuration:]): Used screenScaleFactor() instead of WKGetScaleFactorForScreen().
487         (-[WKContentView _updateForScreen:]): Ditto.
488         (storeAccessibilityRemoteConnectionInformation): Upstreamed the implementation of WKAXStoreRemoteConnectionInformation() from WebKitSystemInterface.
489         (-[WKContentView _accessibilityRegisterUIProcessTokens]): Used newAccessibilityRemoteToken() and storeAccessibilityRemoteConnectionInformation() instead of WKAXRemoteToken() and WKAXStoreRemoteConnectionInformation().
490         * UIProcess/ios/WKContentViewInteraction.mm:
491         * UIProcess/ios/WebPageProxyIOS.mm:
492         (WebKit::WebPageProxy::screenSize): Used screenSize() instead of WKGetScreenSize().
493         (WebKit::WebPageProxy::availableScreenSize): Used availableScreenSize() instead of WKGetAvailableScreenSize().
494         (WebKit::WebPageProxy::textAutosizingWidth): Used screenSize() instead of WKGetScreenSize().
495         * WebKit2.xcodeproj/project.pbxproj:
496         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
497         (InitWebCoreSystemInterface): Deleted.
498         * WebProcess/WebPage/ios/WebPageIOS.mm:
499         (WebKit::WebPage::platformInitializeAccessibility): Used newAccessibilityRemoteToken() instead of WKAXRemoteToken().
500
501 2015-11-02  Yongjun Zhang  <yongjun_zhang@apple.com>
502
503         Add objC delegate callback for webProcessDidBecomeResponsive and webProcessDidBecomeUnresponsive.
504         https://bugs.webkit.org/show_bug.cgi?id=150778
505
506         Add methods into WKNavigationDelegatePrivate to notify WebKit client when web process becomes unresponsive
507         or responsive, which is reported by WebKit::ResponsivenessTimer.
508
509         Reviewed by Darin Adler.
510
511         * UIProcess/API/APINavigationClient.h: Add two new method processDidBecomeResponsive and processDidBecomeUnresponsive
512             to NavigationClient; they are called when WebKit::ResponsivenessTimer update its client's state.
513         (API::NavigationClient::processDidBecomeResponsive):
514         (API::NavigationClient::processDidBecomeUnresponsive):
515         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Add two new delegate method to WKNavigationDelegatePrivate:
516             _webViewWebProcessDidBecomeResponsive: and _webViewWebProcessDidBecomeUnresponsive:
517         * UIProcess/Cocoa/NavigationState.h: Add new overriding methods processDidBecomeResponsive and processDidBecomeUnresponsive.
518             Also add a bool member for each method to indicate if the delegate has implement the related method.
519         * UIProcess/Cocoa/NavigationState.mm:
520         (WebKit::NavigationState::setNavigationDelegate): Update the new bool members based on the delegate.
521         (WebKit::NavigationState::NavigationClient::processDidBecomeResponsive): Send the delegate message to navigationDelegate
522             if _webViewWebProcessDidBecomeResponsive: is implemented.
523         (WebKit::NavigationState::NavigationClient::processDidBecomeUnresponsive): Ditto.
524         * UIProcess/WebPageProxy.cpp:
525         (WebKit::WebPageProxy::processDidBecomeUnresponsive): Call navigationClient's processDidBecomeUnresponsive if the page proxy
526             has navigationClient.
527         (WebKit::WebPageProxy::processDidBecomeResponsive):  Call navigationClient's processDidBecomeResponsive if the page proxy
528             has navigationClient.
529
530 2015-11-02  Beth Dakin  <bdakin@apple.com>
531
532         Tapping and holding a link should have a share option
533         https://bugs.webkit.org/show_bug.cgi?id=150693
534
535         Reviewed by Dan Bernstein.
536
537         This is a follow-up to the original change. This change fixes non-ascii URLs. 
538         They should maintain their non-ascii characters when they are shared.
539
540         * UIProcess/ios/WKContentViewInteraction.mm:
541         (-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
542         * UIProcess/ios/WKPDFView.mm:
543         (-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):
544
545 2015-11-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
546
547         Rename JSDOMWrapper.impl to JSDOMWrapper.wrapped
548         https://bugs.webkit.org/show_bug.cgi?id=150613
549
550         Reviewed by Darin Adler.
551
552         * WebProcess/WebPage/WebFrame.cpp:
553         (WebKit::WebFrame::frameForContext): Renaming impl() to wrapped().
554         (WebKit::WebFrame::counterValue): Ditto.
555
556 2015-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
557
558         [GLIB] Remove support for GSocket main loop sources from GMainLoopSource
559         https://bugs.webkit.org/show_bug.cgi?id=150772
560
561         Reviewed by Žan Doberšek.
562
563         Add GSocketMonitor class to be used by Connection to monitor the
564         availability of the socket file descriptor instead of using a
565         GMainLoopSource.
566
567         * Platform/IPC/Connection.h:
568         * Platform/IPC/glib/GSocketMonitor.cpp: Added.
569         (IPC::GSocketMonitor::~GSocketMonitor):
570         (IPC::GSocketMonitor::socketSourceCallback):
571         (IPC::GSocketMonitor::start):
572         (IPC::GSocketMonitor::stop):
573         * Platform/IPC/glib/GSocketMonitor.h: Added.
574         * Platform/IPC/unix/ConnectionUnix.cpp:
575         (IPC::Connection::platformInvalidate):
576         (IPC::Connection::open):
577         * PlatformGTK.cmake:
578
579 2015-11-01  Carlos Garcia Campos  <cgarcia@igalia.com>
580
581         [GTK] Use RunLoop in WorkQueue implementation
582         https://bugs.webkit.org/show_bug.cgi?id=150770
583
584         Reviewed by Darin Adler.
585
586         * Platform/IPC/unix/ConnectionUnix.cpp:
587         (IPC::Connection::open): Get the main context from the WorkQueue Runloop.
588
589 2015-11-01  Yusuke Suzuki  <utatane.tea@gmail.com>
590
591         [ES6] Support Generator Syntax
592         https://bugs.webkit.org/show_bug.cgi?id=150769
593
594         Reviewed by Geoffrey Garen.
595
596         Added ENABLE_ES6_GENERATORS flag.
597
598         * Configurations/FeatureDefines.xcconfig:
599
600 2015-11-01  Brent Fulgham  <bfulgham@apple.com>
601
602         Use convenience function in sandbox profile
603         https://bugs.webkit.org/show_bug.cgi?id=150732
604         <rdar://problem/23287894>
605
606         Reviewed by Alexey Proskuryakov.
607
608         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Switch to
609         the 'awd-log-directory' convenience function.
610
611 2015-11-01  Joonghun Park  <jh718.park@samsung.com>
612
613         [EFL] Fix inappropriate move semantics use in parseAndRemoveEnvironments function
614         https://bugs.webkit.org/show_bug.cgi?id=150544
615
616         Reviewed by Darin Adler.
617
618         In parseAndRemoveEnvironments function, it declares its paramerter type as rvalue.
619         But in ProcessLauncher::launchProcess(), the argument of
620         parseAndRemoveEnvironments still be used after the call of the function.
621         Currently the rvalue is not assigned to any other variable in parseAndRemoveEnvironments,
622         so it doesn't lead to runtime error but use of move semantic
623         is not appropriate semantically in this case.
624
625         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
626         (WebKit::parseAndRemoveEnvironments):
627         (WebKit::ProcessLauncher::launchProcess):
628
629 2015-11-01  Commit Queue  <commit-queue@webkit.org>
630
631         Unreviewed, rolling out r191831.
632         https://bugs.webkit.org/show_bug.cgi?id=150774
633
634         The new test fails (Requested by ap on #webkit).
635
636         Reverted changeset:
637
638         "Begin work on supporting reply blocks in
639         _WKRemoteObjectRegistry"
640         https://bugs.webkit.org/show_bug.cgi?id=150739
641         http://trac.webkit.org/changeset/191831
642
643 2015-11-01  Philip Chimento  <philip.chimento@gmail.com>
644
645         [GTK] Fix combinations of PLATFORM(GTK) and OS(DARWIN)
646         https://bugs.webkit.org/show_bug.cgi?id=144560
647
648         Reviewed by Darin Adler.
649
650         * NetworkProcess/NetworkProcess.cpp:
651         (WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
652         Change order of OS(DARWIN) and USE(UNIX_DOMAIN_SOCKETS) checks,
653         so that we can use Unix domain sockets even on Darwin for the GTK
654         platform.
655         * Platform/IPC/Attachment.cpp: Add USE(UNIX_DOMAIN_SOCKETS) check
656         to OS(DARWIN) check, in order to support GTK platform on OSX.
657         * Platform/IPC/Attachment.h: Change order of OS(DARWIN) and
658         USE(UNIX_DOMAIN_SOCKETS) checks throughout.
659         (IPC::Attachment::size):
660         (IPC::Attachment::releaseFileDescriptor):
661         (IPC::Attachment::fileDescriptor):
662         (IPC::Attachment::disposition):
663         (IPC::Attachment::port): 
664         * Platform/IPC/Connection.h: Ditto.
665         (IPC::Connection::identifierIsNull):
666         (IPC::Connection::Identifier::Identifier): 
667         (IPC::Connection::xpcConnection): 
668         * Platform/IPC/unix/ConnectionUnix.cpp: Only use SOCK_SEQPACKET
669         if the platform is not GTK, because otherwise the PLATFORM(GTK)
670         check below is never reached.
671         * Platform/SharedMemory.h: Change order of OS(DARWIN) and
672         USE(UNIX_DOMAIN_SOCKETS) checks.
673         * PluginProcess/PluginProcess.cpp: Ditto.
674         (WebKit::PluginProcess::createWebProcessConnection):
675         * Shared/API/c/WKBase.h: Don't include WKBaseMac.h if building
676         GTK.
677         * UIProcess/API/C/WKNativeEvent.h: Don't use Apple API if
678         building GTK.
679         * UIProcess/Launcher/ProcessLauncher.cpp: Change to
680         OS(DARWIN) && !PLATFORM(GTK), in the absence of a better platform
681         macro such as USE(MACH).
682         (WebKit::ProcessLauncher::didFinishLaunchingProcess):
683         * UIProcess/Launcher/ProcessLauncher.h: Ditto.
684         * UIProcess/Network/NetworkProcessProxy.cpp: Change order of
685         OS(DARWIN) and PLATFORM(GTK) checks.
686         (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
687         (WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess):
688         * UIProcess/Plugins/PluginProcessProxy.cpp: Ditto.
689         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
690         (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
691         * WebProcess/Plugins/PluginProcessConnectionManager.cpp: Ditto.
692         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
693         * WebProcess/WebPage/WebInspector.cpp: Ditto.
694         (WebKit::WebInspector::createInspectorPage):
695         * WebProcess/WebPage/WebInspectorUI.cpp: Ditto.
696         (WebKit::WebInspectorUI::establishConnection):
697         * WebProcess/WebProcess.cpp: Ditto.
698         (WebKit::WebProcess::ensureNetworkProcessConnection):
699
700 2015-11-01  Carlos Garcia Campos  <cgarcia@igalia.com>
701
702         [GTK] Use RunLoop::Timer in PluginInfoCache
703         https://bugs.webkit.org/show_bug.cgi?id=150757
704
705         Reviewed by Darin Adler.
706
707         Use RunLoop::Timer instead of GMainLoopSource to save the cache
708         contents in an idle. Also remove the mutex, since RunLoop::Timer
709         is thread safe and saveToFile() is private and only called by the
710         main thread loop. Also removed the code to save the file in the
711         destructor since PluginInfoCache is a singleton and never
712         destroyed. It's very unlikely that the program finished before the
713         cache is saved, but even if that happens it would be harmless, the
714         cache will be saved at some point the next time.
715
716         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
717         (WebKit::PluginInfoCache::PluginInfoCache):
718         (WebKit::PluginInfoCache::updatePluginInfo):
719         (WebKit::PluginInfoCache::~PluginInfoCache):
720         (WebKit::PluginInfoCache::saveToFile):
721         * UIProcess/Plugins/gtk/PluginInfoCache.h:
722
723 2015-11-01  Carlos Garcia Campos  <cgarcia@igalia.com>
724
725         [GTK] Use a RunLoop::Timer to schedule rendering frames in accelerated compositing mode
726         https://bugs.webkit.org/show_bug.cgi?id=150756
727
728         Reviewed by Darin Adler.
729
730         Use a RunLoop::Timer instead of a GMainLoopSource for the
731         accelerated compositing render loop to improve the performance,
732         since RunLoop::Timer uses a persistent source.
733         All the logic to schedule rames has been moved to a helper
734         internal class RenderFrameScheduler.
735
736         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
737         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::RenderFrameScheduler):
738         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::~RenderFrameScheduler):
739         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::start):
740         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::stop):
741         (WebKit::shouldSkipNextFrameBecauseOfContinousImmediateFlushes):
742         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::nextFrame):
743         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::renderFrame):
744         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
745         (WebKit::LayerTreeHostGtk::renderFrame):
746         (WebKit::LayerTreeHostGtk::scheduleLayerFlush):
747         (WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
748         (WebKit::LayerTreeHostGtk::layerFlushTimerFired): Deleted.
749         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
750
751 2015-10-31  Andreas Kling  <akling@apple.com>
752
753         Add a debug overlay with information about web process resource usage.
754         <https://webkit.org/b/150599>
755
756         Reviewed by Darin Adler.
757
758         Add WK2 preferences SPI for showing/hiding the resource usage overlay.
759
760         * Shared/WebPreferencesDefinitions.h:
761         * UIProcess/API/C/WKPreferences.cpp:
762         (WKPreferencesSetResourceUsageOverlayVisible):
763         (WKPreferencesGetResourceUsageOverlayVisible):
764         * UIProcess/API/C/WKPreferencesRefPrivate.h:
765         * UIProcess/API/Cocoa/WKPreferences.mm:
766         (-[WKPreferences _resourceUsageOverlayVisible]):
767         (-[WKPreferences _setResourceUsageOverlayVisible:]):
768         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
769         * WebProcess/WebPage/WebPage.cpp:
770         (WebKit::WebPage::updatePreferences):
771
772 2015-10-31  Alex Christensen  <achristensen@webkit.org>
773
774         Share more code between NETWORK_SESSION and non-NETWORK_SESSION NetworkResourceLoaders
775         https://bugs.webkit.org/show_bug.cgi?id=150742
776
777         Reviewed by Darin Adler.
778
779         r191457 added enough code to NetworkResourceLoader to load most resources successfully if there are no errors.
780         It passed about 80% of LayoutTests/http and crashed sometimes.
781         This passes about 95% of LayoutTests/http and does not crash on any of the LayoutTests/http.
782         It should not change behavior of the non-NETWORK_SESSION code which is currently the default in trunk.
783
784         * NetworkProcess/NetworkResourceLoader.cpp:
785         (WebKit::NetworkResourceLoader::abort):
786         (WebKit::NetworkResourceLoader::sharedDidReceiveResponse):
787         (WebKit::NetworkResourceLoader::sharedDidReceiveBuffer):
788         (WebKit::NetworkResourceLoader::sharedDidFinishLoading):
789         (WebKit::NetworkResourceLoader::sharedDidFail):
790         (WebKit::NetworkResourceLoader::sharedWillSendRedirectedRequest):
791         (WebKit::NetworkResourceLoader::willPerformHTTPRedirection):
792         (WebKit::NetworkResourceLoader::didReceiveChallenge):
793         (WebKit::NetworkResourceLoader::didReceiveResponse):
794         (WebKit::NetworkResourceLoader::didReceiveData):
795         (WebKit::NetworkResourceLoader::didCompleteWithError):
796         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
797         (WebKit::NetworkResourceLoader::didReceiveBuffer):
798         (WebKit::NetworkResourceLoader::didFinishLoading):
799         (WebKit::NetworkResourceLoader::didFail):
800         (WebKit::NetworkResourceLoader::willSendRequestAsync):
801         * NetworkProcess/NetworkResourceLoader.h:
802         * NetworkProcess/NetworkSession.h:
803         (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
804
805 2015-10-28  Wenson Hsieh  <wenson_hsieh@apple.com>
806
807         Inner height behavior when the keyboard is shown should match on WKWebView and MobileSafari
808         https://bugs.webkit.org/show_bug.cgi?id=150634
809         <rdar://problem/23202254>
810
811         Reviewed by Benjamin Poulain.
812
813         Make WKWebView match behavior in Safari by not firing resize events and changing the inner height when showing
814         or hiding the keyboard. Previously, the WKWebView would do both of the above because we use the scroll view's
815         contentInset property when no unobscured insets are explicitly set for the WKWebView. To fix this, when updating
816         the visible content rect of a WKWebView for computing the inner height, we readjust the computed bottom inset
817         to not take the keyboard height into account. To know how much we need to readjust the inset by, we store the
818         total amount by which the scroll view's bottom inset has been adjusted due to the keyboard.
819
820         We perform this readjustment in _updateVisibleContentRects rather than in _computedContentInset since some users
821         of _computedContentInset may still expect the bottom inset to account for the keyboard height. However, when
822         updating visible content rects, we should not account for the keyboard height since we don't want the inner height
823         to change when showing or hiding the keyboard.
824
825         Lastly, while calling _adjustForAutomaticKeyboardInfo, we may end up calling _updateVisibleContentRects. This call
826         is unnecessary since we call it again immediately after _adjustForAutomaticKeyboardInfo, and it also complicates
827         the readjustment logic, so it makes sense to prevent the update from happening altogether while we are adjusting
828         the scroll view's insets due to keyboard changes. Altogether, these changes mean that the computed inner height
829         will no longer be adjusted for the keyboard height on WKWebViews, matching the behavior observed on mobile Safari.
830
831         Test: LayoutTests/fast/events/ios/keyboard-should-not-trigger-resize.html
832
833         * UIProcess/API/Cocoa/WKWebView.mm:
834         (-[WKWebView _updateVisibleContentRects]):
835         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
836
837 2015-10-30  Anders Carlsson  <andersca@apple.com>
838
839         Begin work on supporting reply blocks in _WKRemoteObjectRegistry
840         https://bugs.webkit.org/show_bug.cgi?id=150739
841
842         Reviewed by Tim Horton.
843
844         * Platform/spi/Cocoa/BlockSPI.h:
845         Add SPI header.
846
847         * Shared/API/Cocoa/RemoteObjectInvocation.h:
848         (WebKit::RemoteObjectInvocation::ReplyInfo::ReplyInfo):
849         (WebKit::RemoteObjectInvocation::replyInfo):
850         * Shared/API/Cocoa/RemoteObjectInvocation.mm:
851         (WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
852         (WebKit::RemoteObjectInvocation::encode):
853         (WebKit::RemoteObjectInvocation::decode):
854         Add an optional ReplyInfo struct to RemoteObjectInvocation.
855
856         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
857         (generateReplyIdentifier):
858         Helper function to generate a reply identifier.
859
860         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
861         Do some block parameter validation.
862
863         * WebKit2.xcodeproj/project.pbxproj:
864
865 2015-10-30  Beth Dakin  <bdakin@apple.com>
866
867         Link preview doesn't work on XHTML pages with Content-Type header as 
868         ‘application/xhtml+xml’
869         https://bugs.webkit.org/show_bug.cgi?id=150740
870         -and corresponding-
871         rdar://problem/23063585
872
873         Reviewed by Tim Horton.
874
875         For XHTML pages, the element names are lowercase. This patch uses 
876         equalIgnoringCase to fix the bug.
877         * UIProcess/ios/WKContentViewInteraction.mm:
878         (-[WKContentView _actionForLongPress]):
879         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
880         (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
881
882 2015-10-30  Tim Horton  <timothy_horton@apple.com>
883
884         WKView being inside WKWebView leads to weird API issues
885         https://bugs.webkit.org/show_bug.cgi?id=150174
886
887         Reviewed by Anders Carlsson.
888
889         * UIProcess/API/mac/WKView.mm:
890         (-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
891         (-[WKView prepareContentInRect:]):
892         (-[WKView initWithFrame:processPool:configuration:webView:]):
893         (-[WKView pageRef]):
894         (-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
895         (-[WKView dealloc]): Deleted.
896         * UIProcess/Cocoa/WebViewImpl.h:
897         (WebKit::WebViewImpl::page):
898         * UIProcess/Cocoa/WebViewImpl.mm:
899         (-[WKWindowVisibilityObserver initWithView:impl:]):
900         (-[WKWindowVisibilityObserver dealloc]):
901         (-[WKWindowVisibilityObserver _activeSpaceDidChange:]):
902         (WebKit::WebViewImpl::WebViewImpl):
903         (WebKit::WebViewImpl::~WebViewImpl):
904         (WebKit::WebViewImpl::setDrawsBackground):
905         (WebKit::WebViewImpl::drawsBackground):
906         (WebKit::WebViewImpl::setDrawsTransparentBackground):
907         (WebKit::WebViewImpl::drawsTransparentBackground):
908         (WebKit::WebViewImpl::isOpaque):
909         (WebKit::WebViewImpl::acceptsFirstMouse):
910         (WebKit::WebViewImpl::becomeFirstResponder):
911         (WebKit::WebViewImpl::resignFirstResponder):
912         (WebKit::WebViewImpl::viewWillStartLiveResize):
913         (WebKit::WebViewImpl::viewDidEndLiveResize):
914         (WebKit::WebViewImpl::updateWindowAndViewFrames):
915         (WebKit::WebViewImpl::setFixedLayoutSize):
916         (WebKit::WebViewImpl::fixedLayoutSize):
917         (WebKit::WebViewImpl::isUsingUISideCompositing):
918         (WebKit::WebViewImpl::setDrawingAreaSize):
919         (WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate):
920         (WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate):
921         (WebKit::WebViewImpl::updateLayer):
922         (WebKit::WebViewImpl::drawRect):
923         (WebKit::WebViewImpl::dispatchSetTopContentInset):
924         (WebKit::WebViewImpl::prepareContentInRect):
925         (WebKit::WebViewImpl::updateViewExposedRect):
926         (WebKit::WebViewImpl::setMinimumSizeForAutoLayout):
927         (WebKit::WebViewImpl::minimumSizeForAutoLayout):
928         (WebKit::WebViewImpl::setShouldExpandToViewHeightForAutoLayout):
929         (WebKit::WebViewImpl::shouldExpandToViewHeightForAutoLayout):
930         (WebKit::WebViewImpl::setIntrinsicContentSize):
931         (WebKit::WebViewImpl::setViewScale):
932         (WebKit::WebViewImpl::viewScale):
933         (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
934         (WebKit::WebViewImpl::setOverrideDeviceScaleFactor):
935         (WebKit::WebViewImpl::windowDidOrderOffScreen):
936         (WebKit::WebViewImpl::windowDidOrderOnScreen):
937         (WebKit::WebViewImpl::windowDidBecomeKey):
938         (WebKit::WebViewImpl::windowDidResignKey):
939         (WebKit::WebViewImpl::windowDidMiniaturize):
940         (WebKit::WebViewImpl::windowDidDeminiaturize):
941         (WebKit::WebViewImpl::windowDidChangeBackingProperties):
942         (WebKit::WebViewImpl::windowDidChangeScreen):
943         (WebKit::WebViewImpl::windowDidChangeLayerHosting):
944         (WebKit::WebViewImpl::windowDidChangeOcclusionState):
945         (WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
946         (WebKit::WebViewImpl::windowResizeMouseLocationIsInVisibleScrollerThumb):
947         (WebKit::WebViewImpl::viewDidMoveToWindow):
948         (WebKit::WebViewImpl::viewDidChangeBackingProperties):
949         (WebKit::WebViewImpl::viewDidHide):
950         (WebKit::WebViewImpl::viewDidUnhide):
951         (WebKit::WebViewImpl::activeSpaceDidChange):
952         (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
953         (WebKit::WebViewImpl::setUnderlayColor):
954         (WebKit::WebViewImpl::underlayColor):
955         (WebKit::WebViewImpl::pageExtendedBackgroundColor):
956         (WebKit::WebViewImpl::setOverlayScrollbarStyle):
957         (WebKit::WebViewImpl::overlayScrollbarStyle):
958         (WebKit::WebViewImpl::endDeferringViewInWindowChanges):
959         (WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
960         (WebKit::WebViewImpl::prepareForMoveToWindow):
961         (WebKit::WebViewImpl::updateSecureInputState):
962         (WebKit::WebViewImpl::setPluginComplexTextInputState):
963         (WebKit::WebViewImpl::handlePluginComplexTextInputKeyDown):
964         (WebKit::WebViewImpl::handleAcceptedAlternativeText):
965         (WebKit::WebViewImpl::pressureChangeWithEvent):
966         (WebKit::WebViewImpl::isEditable):
967         (WebKit::WebViewImpl::executeEditCommandForSelector):
968         (WebKit::WebViewImpl::writeSelectionToPasteboard):
969         (WebKit::WebViewImpl::readSelectionFromPasteboard):
970         (WebKit::WebViewImpl::validRequestorForSendAndReturnTypes):
971         (WebKit::WebViewImpl::centerSelectionInVisibleArea):
972         (WebKit::WebViewImpl::updateFontPanelIfNeeded):
973         (WebKit::WebViewImpl::changeFontFromFontPanel):
974         (WebKit::WebViewImpl::validateUserInterfaceItem):
975         (WebKit::WebViewImpl::startSpeaking):
976         (WebKit::WebViewImpl::showGuessPanel):
977         (WebKit::WebViewImpl::checkSpelling):
978         (WebKit::WebViewImpl::changeSpelling):
979         (WebKit::WebViewImpl::toggleContinuousSpellChecking):
980         (WebKit::WebViewImpl::setGrammarCheckingEnabled):
981         (WebKit::WebViewImpl::toggleGrammarChecking):
982         (WebKit::WebViewImpl::toggleAutomaticSpellingCorrection):
983         (WebKit::WebViewImpl::toggleSmartInsertDelete):
984         (WebKit::WebViewImpl::setAutomaticQuoteSubstitutionEnabled):
985         (WebKit::WebViewImpl::toggleAutomaticQuoteSubstitution):
986         (WebKit::WebViewImpl::setAutomaticDashSubstitutionEnabled):
987         (WebKit::WebViewImpl::toggleAutomaticDashSubstitution):
988         (WebKit::WebViewImpl::setAutomaticLinkDetectionEnabled):
989         (WebKit::WebViewImpl::toggleAutomaticLinkDetection):
990         (WebKit::WebViewImpl::setAutomaticTextReplacementEnabled):
991         (WebKit::WebViewImpl::toggleAutomaticTextReplacement):
992         (WebKit::WebViewImpl::uppercaseWord):
993         (WebKit::WebViewImpl::lowercaseWord):
994         (WebKit::WebViewImpl::capitalizeWord):
995         (WebKit::WebViewImpl::preferencesDidChange):
996         (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):
997         (WebKit::WebViewImpl::quickLookWithEvent):
998         (WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResult):
999         (WebKit::WebViewImpl::didChangeContentSize):
1000         (WebKit::WebViewImpl::setIgnoresNonWheelEvents):
1001         (WebKit::WebViewImpl::updateRemoteAccessibilityRegistration):
1002         (WebKit::WebViewImpl::accessibilityRegisterUIProcessTokens):
1003         (WebKit::WebViewImpl::stringForToolTip):
1004         (WebKit::WebViewImpl::setInspectorAttachmentView):
1005         (WebKit::WebViewImpl::remoteObjectRegistry):
1006         (WebKit::WebViewImpl::browsingContextController):
1007         (WebKit::WebViewImpl::draggedImage):
1008         (WebKit::WebViewImpl::draggingEntered):
1009         (WebKit::WebViewImpl::draggingUpdated):
1010         (WebKit::WebViewImpl::draggingExited):
1011         (WebKit::WebViewImpl::performDragOperation):
1012         (WebKit::WebViewImpl::takeViewSnapshot):
1013         (WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
1014         (WebKit::WebViewImpl::saveBackForwardSnapshotForItem):
1015         (WebKit::WebViewImpl::setAllowsBackForwardNavigationGestures):
1016         (WebKit::WebViewImpl::setMagnification):
1017         (WebKit::WebViewImpl::magnification):
1018         (WebKit::WebViewImpl::scrollWheel):
1019         (WebKit::WebViewImpl::swipeWithEvent):
1020         (WebKit::WebViewImpl::magnifyWithEvent):
1021         (WebKit::WebViewImpl::rotateWithEvent):
1022         (WebKit::WebViewImpl::doCommandBySelector):
1023         (WebKit::WebViewImpl::insertText):
1024         (WebKit::WebViewImpl::selectedRangeWithCompletionHandler):
1025         (WebKit::WebViewImpl::markedRangeWithCompletionHandler):
1026         (WebKit::WebViewImpl::hasMarkedTextWithCompletionHandler):
1027         (WebKit::WebViewImpl::attributedSubstringForProposedRange):
1028         (WebKit::WebViewImpl::firstRectForCharacterRange):
1029         (WebKit::WebViewImpl::characterIndexForPoint):
1030         (WebKit::WebViewImpl::inputContext):
1031         (WebKit::WebViewImpl::unmarkText):
1032         (WebKit::WebViewImpl::setMarkedText):
1033         (WebKit::WebViewImpl::performKeyEquivalent):
1034         (WebKit::WebViewImpl::keyUp):
1035         (WebKit::WebViewImpl::keyDown):
1036         (WebKit::WebViewImpl::flagsChanged):
1037         (WebKit::WebViewImpl::executeSavedKeypressCommands):
1038         (WebKit::WebViewImpl::selectedRange):
1039         (WebKit::WebViewImpl::hasMarkedText):
1040         (WebKit::WebViewImpl::markedRange):
1041         (WebKit::WebViewImpl::setContentPreparationRect): Deleted.
1042         (WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResultFromViewOnly): Deleted.
1043         (WebKit::WebViewImpl::destroyRemoteObjectRegistry): Deleted.
1044         * UIProcess/WebPageProxy.h:
1045         (WebKit::WebPageProxy::scrollPinningBehavior):
1046         (WebKit::WebPageProxy::overlayScrollbarStyle):
1047         * UIProcess/WebProcessPool.cpp:
1048         (WebKit::WebProcessPool::createWebPage):
1049         * UIProcess/WebProcessPool.h:
1050         * UIProcess/mac/PageClientImpl.h:
1051         * UIProcess/mac/PageClientImpl.mm:
1052         (WebKit::PageClientImpl::PageClientImpl):
1053         (WebKit::PageClientImpl::createDrawingAreaProxy):
1054         (WebKit::PageClientImpl::viewSize):
1055         (WebKit::PageClientImpl::activeView):
1056         (WebKit::PageClientImpl::activeWindow):
1057         (WebKit::PageClientImpl::isViewFocused):
1058         (WebKit::PageClientImpl::makeFirstResponder):
1059         (WebKit::PageClientImpl::isViewVisible):
1060         (WebKit::PageClientImpl::colorSpace):
1061         (WebKit::PageClientImpl::processDidExit):
1062         (WebKit::PageClientImpl::pageClosed):
1063         (WebKit::PageClientImpl::didRelaunchProcess):
1064         (WebKit::PageClientImpl::preferencesDidChange):
1065         (WebKit::PageClientImpl::toolTipChanged):
1066         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
1067         (WebKit::PageClientImpl::didChangeContentSize):
1068         (WebKit::PageClientImpl::setCursor):
1069         (WebKit::PageClientImpl::registerEditCommand):
1070         (WebKit::PageClientImpl::registerInsertionUndoGrouping):
1071         (WebKit::PageClientImpl::clearAllEditCommands):
1072         (WebKit::PageClientImpl::canUndoRedo):
1073         (WebKit::PageClientImpl::executeUndoRedo):
1074         (WebKit::PageClientImpl::setDragImage):
1075         (WebKit::PageClientImpl::setPromisedDataForImage):
1076         (WebKit::PageClientImpl::setPromisedDataForAttachment):
1077         (WebKit::PageClientImpl::updateSecureInputState):
1078         (WebKit::PageClientImpl::resetSecureInputState):
1079         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
1080         (WebKit::PageClientImpl::convertToDeviceSpace):
1081         (WebKit::PageClientImpl::convertToUserSpace):
1082         (WebKit::PageClientImpl::screenToRootView):
1083         (WebKit::PageClientImpl::rootViewToScreen):
1084         (WebKit::PageClientImpl::doneWithKeyEvent):
1085         (WebKit::PageClientImpl::createPopupMenuProxy):
1086         (WebKit::PageClientImpl::createContextMenuProxy):
1087         (WebKit::PageClientImpl::createColorPicker):
1088         (WebKit::PageClientImpl::setTextIndicator):
1089         (WebKit::PageClientImpl::clearTextIndicator):
1090         (WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
1091         (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
1092         (WebKit::PageClientImpl::enterAcceleratedCompositingMode):
1093         (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
1094         (WebKit::PageClientImpl::updateAcceleratedCompositingMode):
1095         (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
1096         (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
1097         (WebKit::PageClientImpl::takeViewSnapshot):
1098         (WebKit::PageClientImpl::selectionDidChange):
1099         (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
1100         (WebKit::PageClientImpl::gestureEventWasNotHandledByWebCore):
1101         (WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged):
1102         (WebKit::PageClientImpl::setPluginComplexTextInputState):
1103         (WebKit::PageClientImpl::didPerformDictionaryLookup):
1104         (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
1105         (WebKit::PageClientImpl::showCorrectionPanel):
1106         (WebKit::PageClientImpl::recordAutocorrectionResponse):
1107         (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
1108         (WebKit::PageClientImpl::intrinsicContentSizeDidChange):
1109         (WebKit::PageClientImpl::executeSavedCommandBySelector):
1110         (WebKit::PageClientImpl::showDictationAlternativeUI):
1111         (WebKit::PageClientImpl::closeFullScreenManager):
1112         (WebKit::PageClientImpl::isFullScreen):
1113         (WebKit::PageClientImpl::enterFullScreen):
1114         (WebKit::PageClientImpl::exitFullScreen):
1115         (WebKit::PageClientImpl::beganEnterFullScreen):
1116         (WebKit::PageClientImpl::beganExitFullScreen):
1117         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
1118         (WebKit::PageClientImpl::didFinishLoadForMainFrame):
1119         (WebKit::PageClientImpl::didFailLoadForMainFrame):
1120         (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
1121         (WebKit::PageClientImpl::removeNavigationGestureSnapshot):
1122         (WebKit::PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates):
1123         (WebKit::PageClientImpl::didPerformImmediateActionHitTest):
1124         (WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult):
1125         (WebKit::PageClientImpl::showPlatformContextMenu):
1126         (WebKit::PageClientImpl::refView):
1127         (WebKit::PageClientImpl::derefView):
1128         (WebKit::PageClientImpl::startWindowDrag):
1129         (WebKit::PageClientImpl::platformWindow):
1130         (WebKit::PageClientImpl::inspectorAttachmentView):
1131         (WebKit::PageClientImpl::remoteObjectRegistry):
1132         * UIProcess/mac/WebColorPickerMac.h:
1133         * UIProcess/mac/WebColorPickerMac.mm:
1134         (WebKit::WebColorPickerMac::create):
1135         (WebKit::WebColorPickerMac::WebColorPickerMac):
1136         (-[WKColorPopoverMac initWithFrame:inView:]):
1137         * UIProcess/mac/WebContextMenuProxyMac.h:
1138         * UIProcess/mac/WebContextMenuProxyMac.mm:
1139         (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
1140         * UIProcess/mac/WebPopupMenuProxyMac.h:
1141         (WebKit::WebPopupMenuProxyMac::create):
1142         * UIProcess/mac/WebPopupMenuProxyMac.mm:
1143         (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
1144         Move ownership of WebPageProxy and PageClientImpl to WebViewImpl.
1145
1146 2015-10-30  Alex Christensen  <achristensen@webkit.org>
1147
1148         Fix Mac CMake build after rr191810.
1149
1150         * PlatformMac.cmake:
1151         Add RemoteObjectInvocation.mm.
1152
1153 2015-10-30  Anders Carlsson  <andersca@apple.com>
1154
1155         Add a separate object that represents a remote object invocation
1156         https://bugs.webkit.org/show_bug.cgi?id=150639
1157
1158         Reviewed by Tim Horton.
1159
1160         * Shared/API/Cocoa/RemoteObjectInvocation.h: Copied from Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.h.
1161         (WebKit::RemoteObjectInvocation::interfaceIdentifier):
1162         (WebKit::RemoteObjectInvocation::encodedInvocation):
1163         * Shared/API/Cocoa/RemoteObjectInvocation.mm: Copied from Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.mm.
1164         (WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
1165         (WebKit::RemoteObjectInvocation::encode):
1166         (WebKit::RemoteObjectInvocation::decode):
1167         * Shared/API/Cocoa/RemoteObjectRegistry.h:
1168         * Shared/API/Cocoa/RemoteObjectRegistry.messages.in:
1169         * Shared/API/Cocoa/RemoteObjectRegistry.mm:
1170         (WebKit::RemoteObjectRegistry::sendInvocation):
1171         (WebKit::RemoteObjectRegistry::invokeMethod):
1172         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
1173         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
1174         (-[_WKRemoteObjectRegistry _invokeMethod:]):
1175         * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
1176         * WebKit2.xcodeproj/project.pbxproj:
1177
1178 2015-10-30  Beth Dakin  <bdakin@apple.com>
1179
1180         Another speculative build fix.
1181
1182         * UIProcess/API/Cocoa/_WKElementAction.h:
1183
1184 2015-10-30  Beth Dakin  <bdakin@apple.com>
1185
1186         Speculative build fix.
1187
1188         * Platform/spi/ios/UIKitSPI.h:
1189         * UIProcess/ios/WKContentViewInteraction.mm:
1190
1191 2015-10-30  Tim Horton  <timothy_horton@apple.com>
1192
1193         WKView being inside WKWebView leads to weird API issues
1194         https://bugs.webkit.org/show_bug.cgi?id=150174
1195
1196         Reviewed by Anders Carlsson.
1197
1198         * UIProcess/API/mac/WKView.mm:
1199         (-[WKView mouseMoved:]):
1200         (-[WKView mouseDown:]):
1201         (-[WKView mouseUp:]):
1202         (-[WKView mouseDragged:]):
1203         (-[WKView mouseEntered:]):
1204         (-[WKView mouseExited:]):
1205         (-[WKView otherMouseDown:]):
1206         (-[WKView otherMouseDragged:]):
1207         (-[WKView otherMouseUp:]):
1208         (-[WKView rightMouseDown:]):
1209         (-[WKView rightMouseDragged:]):
1210         (-[WKView rightMouseUp:]):
1211         (-[WKView _updateViewExposedRect]): Deleted.
1212         * UIProcess/Cocoa/WebViewImpl.h:
1213         * UIProcess/Cocoa/WebViewImpl.mm:
1214         (WebKit::WebViewImpl::mouseMoved):
1215         (WebKit::WebViewImpl::mouseDown):
1216         (WebKit::WebViewImpl::mouseUp):
1217         (WebKit::WebViewImpl::mouseDragged):
1218         Move mouse event handling.
1219
1220 2015-10-30  Beth Dakin  <bdakin@apple.com>
1221
1222         Tapping and holding a link should have a share option
1223         https://bugs.webkit.org/show_bug.cgi?id=150693
1224         -and corresponding-
1225         rdar://problem/21319702
1226
1227         Reviewed by Tim Horton.
1228
1229         New _WKElementActionType called _WKElementActionTypeShare.
1230         * UIProcess/API/Cocoa/_WKElementAction.h:
1231         * UIProcess/API/Cocoa/_WKElementAction.mm:
1232         (+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
1233
1234         _WKElementActionTypeShare is part of the default actions for links.
1235         * UIProcess/ios/WKActionSheetAssistant.h:
1236         * UIProcess/ios/WKActionSheetAssistant.mm:
1237         (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
1238
1239         Handle the sharing part!
1240         * UIProcess/ios/WKContentViewInteraction.mm:
1241         (-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
1242
1243         To support this in PDF, PDF need to create a _webSelectionAssistant.
1244         * UIProcess/ios/WKPDFView.mm:
1245         (-[WKPDFView web_initWithFrame:webView:]):
1246         (-[WKPDFView actionSheetAssistant:openElementAtLocation:]):
1247         (-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):
1248         (-[WKPDFView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
1249
1250 2015-10-30  Tim Horton  <timothy_horton@apple.com>
1251
1252         WKView being inside WKWebView leads to weird API issues
1253         https://bugs.webkit.org/show_bug.cgi?id=150174
1254
1255         Reviewed by Anders Carlsson.
1256
1257         * UIProcess/API/mac/WKView.mm:
1258         (-[WKView _wantsKeyDownForEvent:]):
1259         (-[WKView acceptsFirstMouse:]):
1260         (-[WKView shouldDelayWindowOrderingForEvent:]):
1261         (-[WKView validAttributesForMarkedText]):
1262         (-[WKView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
1263         (-[WKView drawRect:]):
1264         (-[WKView isOpaque]):
1265         (-[WKView mouseDownCanMoveWindow]):
1266         (-[WKView viewDidHide]):
1267         (-[WKView viewDidUnhide]):
1268         (-[WKView _activeSpaceDidChange:]):
1269         (-[WKView hitTest:]):
1270         (-[WKView wantsUpdateLayer]):
1271         (-[WKView canChangeFrameLayout:]):
1272         (-[WKView printOperationWithPrintInfo:forFrame:]):
1273         (+[WKView hideWordDefinitionWindow]):
1274         * UIProcess/Cocoa/WebViewImpl.h:
1275         (WebKit::WebViewImpl::wantsUpdateLayer):
1276         (WebKit::WebViewImpl::mouseDownCanMoveWindow):
1277         (WebKit::WebViewImpl::wantsKeyDownForEvent):
1278         (WebKit::WebViewImpl::layerHostingView): Deleted.
1279         * UIProcess/Cocoa/WebViewImpl.mm:
1280         (WebKit::WebViewImpl::isOpaque):
1281         (WebKit::WebViewImpl::acceptsFirstMouse):
1282         (WebKit::WebViewImpl::drawRect):
1283         (WebKit::WebViewImpl::canChangeFrameLayout):
1284         (WebKit::WebViewImpl::printOperationWithPrintInfo):
1285         (WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
1286         (WebKit::WebViewImpl::windowResizeMouseLocationIsInVisibleScrollerThumb):
1287         (WebKit::WebViewImpl::viewDidHide):
1288         (WebKit::WebViewImpl::viewDidUnhide):
1289         (WebKit::WebViewImpl::activeSpaceDidChange):
1290         (WebKit::WebViewImpl::hitTest):
1291         (WebKit::WebViewImpl::hideWordDefinitionWindow):
1292         (WebKit::WebViewImpl::validAttributesForMarkedText):
1293         Printing and random bits.
1294
1295 2015-10-30  Anders Carlsson  <andersca@apple.com>
1296
1297         REGRESSION (r191691): Unexpected "Share" context menu when right clicking around inspector
1298         https://bugs.webkit.org/show_bug.cgi?id=150699
1299         rdar://problem/23324522
1300
1301         Reviewed by Tim Horton.
1302
1303         Don't create a share menu item if we have nothing to share.
1304
1305         * UIProcess/mac/WebContextMenuProxyMac.mm:
1306         (WebKit::WebContextMenuProxyMac::createShareMenuItem):
1307
1308 2015-10-30  Tim Horton  <timothy_horton@apple.com>
1309
1310         Initialize some new WebViewImpl members
1311
1312         * UIProcess/Cocoa/WebViewImpl.h:
1313         Oh well.
1314
1315 2015-10-30  Tim Horton  <timothy_horton@apple.com>
1316
1317         Fix the build
1318
1319         * UIProcess/API/mac/WKView.mm:
1320
1321 2015-10-30  Tim Horton  <timothy_horton@apple.com>
1322
1323         Fix the build
1324
1325         * UIProcess/Cocoa/WebViewImpl.h:
1326         * UIProcess/Cocoa/WebViewImpl.mm:
1327         (WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
1328
1329 2015-10-30  Tim Horton  <timothy_horton@apple.com>
1330
1331         WKView being inside WKWebView leads to weird API issues
1332         https://bugs.webkit.org/show_bug.cgi?id=150174
1333
1334         Reviewed by Darin Adler.
1335
1336         * UIProcess/API/mac/WKView.mm:
1337         (-[WKView doCommandBySelector:]):
1338         (-[WKView insertText:]):
1339         (-[WKView insertText:replacementRange:]):
1340         (-[WKView inputContext]):
1341         (-[WKView performKeyEquivalent:]):
1342         (-[WKView keyUp:]):
1343         (-[WKView keyDown:]):
1344         (-[WKView flagsChanged:]):
1345         (-[WKView setMarkedText:selectedRange:replacementRange:]):
1346         (-[WKView unmarkText]):
1347         (-[WKView selectedRange]):
1348         (-[WKView hasMarkedText]):
1349         (-[WKView markedRange]):
1350         (-[WKView attributedSubstringForProposedRange:actualRange:]):
1351         (-[WKView characterIndexForPoint:]):
1352         (-[WKView firstRectForCharacterRange:actualRange:]):
1353         (-[WKView selectedRangeWithCompletionHandler:]):
1354         (-[WKView markedRangeWithCompletionHandler:]):
1355         (-[WKView hasMarkedTextWithCompletionHandler:]):
1356         (-[WKView attributedSubstringForProposedRange:completionHandler:]):
1357         (-[WKView firstRectForCharacterRange:completionHandler:]):
1358         (-[WKView characterIndexForPoint:completionHandler:]):
1359         (-[WKView _superPerformKeyEquivalent:]):
1360         (-[WKView _superKeyDown:]):
1361         (extractUnderlines): Deleted.
1362         (-[WKView _collectKeyboardLayoutCommandsForEvent:to:]): Deleted.
1363         (-[WKView _interpretKeyEvent:completionHandler:]): Deleted.
1364         (-[WKView NO_RETURN_DUE_TO_ASSERT]): Deleted.
1365         (-[WKView _interpretKeyEvent:savingCommandsTo:]): Deleted.
1366         (-[WKView _executeSavedKeypressCommands]): Deleted.
1367         (-[WKView _doneWithKeyEvent:eventWasHandled:]): Deleted.
1368         * UIProcess/API/mac/WKViewInternal.h:
1369         * UIProcess/Cocoa/WebViewImpl.h:
1370         * UIProcess/Cocoa/WebViewImpl.mm:
1371         (WebKit::WebViewImpl::doneWithKeyEvent):
1372         (WebKit::extractUnderlines):
1373         (WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
1374         (WebKit::WebViewImpl::interpretKeyEvent):
1375         (WebKit::WebViewImpl::doCommandBySelector):
1376         (WebKit::WebViewImpl::insertText):
1377         (WebKit::WebViewImpl::selectedRangeWithCompletionHandler):
1378         (WebKit::WebViewImpl::markedRangeWithCompletionHandler):
1379         (WebKit::WebViewImpl::hasMarkedTextWithCompletionHandler):
1380         (WebKit::WebViewImpl::attributedSubstringForProposedRange):
1381         (WebKit::WebViewImpl::firstRectForCharacterRange):
1382         (WebKit::WebViewImpl::characterIndexForPoint):
1383         (WebKit::WebViewImpl::inputContext):
1384         (WebKit::WebViewImpl::unmarkText):
1385         (WebKit::WebViewImpl::setMarkedText):
1386         (WebKit::WebViewImpl::selectedRange):
1387         (WebKit::WebViewImpl::hasMarkedText):
1388         (WebKit::WebViewImpl::markedRange):
1389         (WebKit::WebViewImpl::performKeyEquivalent):
1390         (WebKit::WebViewImpl::keyUp):
1391         (WebKit::WebViewImpl::keyDown):
1392         (WebKit::WebViewImpl::flagsChanged):
1393         (WebKit::WebViewImpl::executeSavedKeypressCommands):
1394         * UIProcess/mac/PageClientImpl.mm:
1395         (WebKit::PageClientImpl::doneWithKeyEvent):
1396         Move NSTextInputClient implementation.
1397
1398 2015-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>
1399
1400         [GTK] Move the socket polling off the WorkQueue
1401         https://bugs.webkit.org/show_bug.cgi?id=150593
1402
1403         Reviewed by Anders Carlsson.
1404
1405         Create the socket poll source in Connection::open and attach it to
1406         the connection work queue context.
1407
1408         * Platform/IPC/Connection.h:
1409         * Platform/IPC/unix/ConnectionUnix.cpp:
1410         (IPC::Connection::platformInvalidate):
1411         (IPC::Connection::open):
1412
1413 2015-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>
1414
1415         [GTK] Use RunLoop::Timer instead of GMainLoopSource
1416         https://bugs.webkit.org/show_bug.cgi?id=150592
1417
1418         Reviewed by Žan Doberšek.
1419
1420         * Shared/Downloads/soup/DownloadSoup.cpp:
1421         (WebKit::DownloadClient::DownloadClient):
1422         (WebKit::DownloadClient::didReceiveData):
1423         (WebKit::DownloadClient::handleResponseLater):
1424         * UIProcess/gtk/GestureController.cpp:
1425         (WebKit::GestureController::DragGesture::begin):
1426         (WebKit::GestureController::DragGesture::update):
1427         (WebKit::GestureController::DragGesture::end):
1428         (WebKit::GestureController::DragGesture::longPressFired):
1429         (WebKit::GestureController::DragGesture::DragGesture):
1430         (WebKit::GestureController::ZoomGesture::scaleChanged):
1431         (WebKit::GestureController::ZoomGesture::ZoomGesture):
1432         * UIProcess/gtk/GestureController.h:
1433
1434 2015-10-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1435
1436         [GTK] Use a persistent main loop source in RunLoop glib implementation
1437         https://bugs.webkit.org/show_bug.cgi?id=150590
1438
1439         Reviewed by Žan Doberšek.
1440
1441         Use RunLoop::dispatch() instead of
1442         GMainLoopSource::scheduleAndDeleteOnDestroy in a couple of simple
1443         cases.
1444
1445         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1446         (WebKit::NetworkCache::runTaskInQueue):
1447         * UIProcess/gtk/DragAndDropHandler.cpp:
1448         (WebKit::DragAndDropHandler::dragLeave):
1449
1450 2015-10-29  Alex Christensen  <achristensen@webkit.org>
1451
1452         Make WebCore a framework in Mac CMake build
1453         https://bugs.webkit.org/show_bug.cgi?id=150702
1454
1455         Reviewed by Geoffrey Garen.
1456
1457         * PlatformMac.cmake:
1458
1459 2015-10-29  Alex Christensen  <achristensen@webkit.org>
1460
1461         EFL build fix after r191749
1462
1463         * CMakeLists.txt:
1464         Only Mac should include the Cocoa directory.
1465
1466 2015-10-29  Tim Horton  <timothy_horton@apple.com>
1467
1468         WKView being inside WKWebView leads to weird API issues
1469         https://bugs.webkit.org/show_bug.cgi?id=150174
1470
1471         Reviewed by Anders Carlsson.
1472
1473         * Platform/spi/mac/AppKitSPI.h:
1474         * UIProcess/API/mac/WKView.mm:
1475         (-[WKView validRequestorForSendType:returnType:]):
1476         (-[WKView readSelectionFromPasteboard:]):
1477         (-[WKView changeFont:]):
1478         (-[WKView startSpeaking:]):
1479         (-[WKView stopSpeaking:]):
1480         (-[WKView showGuessPanel:]):
1481         (-[WKView checkSpelling:]):
1482         (-[WKView changeSpelling:]):
1483         (-[WKView toggleContinuousSpellChecking:]):
1484         (-[WKView isGrammarCheckingEnabled]):
1485         (-[WKView setGrammarCheckingEnabled:]):
1486         (-[WKView toggleGrammarChecking:]):
1487         (-[WKView toggleAutomaticSpellingCorrection:]):
1488         (-[WKView orderFrontSubstitutionsPanel:]):
1489         (-[WKView toggleSmartInsertDelete:]):
1490         (-[WKView isAutomaticQuoteSubstitutionEnabled]):
1491         (-[WKView setAutomaticQuoteSubstitutionEnabled:]):
1492         (-[WKView toggleAutomaticQuoteSubstitution:]):
1493         (-[WKView isAutomaticDashSubstitutionEnabled]):
1494         (-[WKView setAutomaticDashSubstitutionEnabled:]):
1495         (-[WKView toggleAutomaticDashSubstitution:]):
1496         (-[WKView isAutomaticLinkDetectionEnabled]):
1497         (-[WKView setAutomaticLinkDetectionEnabled:]):
1498         (-[WKView toggleAutomaticLinkDetection:]):
1499         (-[WKView isAutomaticTextReplacementEnabled]):
1500         (-[WKView setAutomaticTextReplacementEnabled:]):
1501         (-[WKView toggleAutomaticTextReplacement:]):
1502         (-[WKView uppercaseWord:]):
1503         (-[WKView lowercaseWord:]):
1504         (-[WKView capitalizeWord:]):
1505         * UIProcess/Cocoa/WebViewImpl.h:
1506         * UIProcess/Cocoa/WebViewImpl.mm:
1507         (WebKit::WebViewImpl::readSelectionFromPasteboard):
1508         (WebKit::WebViewImpl::validRequestorForSendAndReturnTypes):
1509         (WebKit::WebViewImpl::changeFontFromFontPanel):
1510         (WebKit::WebViewImpl::startSpeaking):
1511         (WebKit::WebViewImpl::stopSpeaking):
1512         (WebKit::WebViewImpl::showGuessPanel):
1513         (WebKit::WebViewImpl::checkSpelling):
1514         (WebKit::WebViewImpl::changeSpelling):
1515         (WebKit::WebViewImpl::toggleContinuousSpellChecking):
1516         (WebKit::WebViewImpl::isGrammarCheckingEnabled):
1517         (WebKit::WebViewImpl::setGrammarCheckingEnabled):
1518         (WebKit::WebViewImpl::toggleGrammarChecking):
1519         (WebKit::WebViewImpl::toggleAutomaticSpellingCorrection):
1520         (WebKit::WebViewImpl::orderFrontSubstitutionsPanel):
1521         (WebKit::WebViewImpl::toggleSmartInsertDelete):
1522         (WebKit::WebViewImpl::isAutomaticQuoteSubstitutionEnabled):
1523         (WebKit::WebViewImpl::setAutomaticQuoteSubstitutionEnabled):
1524         (WebKit::WebViewImpl::toggleAutomaticQuoteSubstitution):
1525         (WebKit::WebViewImpl::isAutomaticDashSubstitutionEnabled):
1526         (WebKit::WebViewImpl::setAutomaticDashSubstitutionEnabled):
1527         (WebKit::WebViewImpl::toggleAutomaticDashSubstitution):
1528         (WebKit::WebViewImpl::isAutomaticLinkDetectionEnabled):
1529         (WebKit::WebViewImpl::setAutomaticLinkDetectionEnabled):
1530         (WebKit::WebViewImpl::toggleAutomaticLinkDetection):
1531         (WebKit::WebViewImpl::setAutomaticTextReplacementEnabled):
1532         (WebKit::WebViewImpl::toggleAutomaticTextReplacement):
1533         (WebKit::WebViewImpl::uppercaseWord):
1534         (WebKit::WebViewImpl::lowercaseWord):
1535         (WebKit::WebViewImpl::capitalizeWord):
1536         Move spellcheck and related bits.
1537
1538 2015-10-29  Eric Carlson  <eric.carlson@apple.com>
1539
1540         Revert inadvertent changes
1541         https://bugs.webkit.org/show_bug.cgi?id=150694
1542
1543         Reviewed by Tim Horton.
1544
1545         * WebProcess/com.apple.WebProcess.sb.in:
1546
1547 2015-10-29  Alex Christensen  <achristensen@webkit.org>
1548
1549         CMake build fix.
1550
1551         * CMakeLists.txt:
1552         * PlatformMac.cmake:
1553         I mistakenly added some mac-specific files to the shared CMakeLists.txt.  This puts them in the right place.
1554         * UIProcess/WebPageProxy.cpp:
1555         (WebKit::WebPageProxy::viewWillStartLiveResize):
1556         (WebKit::WebPageProxy::viewDidLeaveWindow):
1557         (WebKit::WebPageProxy::didEndColorPicker):
1558         Add preprocessor enable checks.
1559
1560 2015-10-29  Tim Horton  <timothy_horton@apple.com>
1561
1562         WKView being inside WKWebView leads to weird API issues
1563         https://bugs.webkit.org/show_bug.cgi?id=150174
1564
1565         Reviewed by Darin Adler.
1566
1567         * UIProcess/API/mac/WKView.mm:
1568         (-[WKView browsingContextController]):
1569         (-[WKView validateUserInterfaceItem:]):
1570         (-[WKView saveBackForwardSnapshotForCurrentItem]):
1571         (-[WKView saveBackForwardSnapshotForItem:]):
1572         (-[WKView updateLayer]):
1573         (-[WKView minimumSizeForAutoLayout]):
1574         (-[WKView setMinimumSizeForAutoLayout:]):
1575         (-[WKView shouldExpandToViewHeightForAutoLayout]):
1576         (-[WKView setShouldExpandToViewHeightForAutoLayout:]):
1577         (-[WKView underlayColor]):
1578         (-[WKView setUnderlayColor:]):
1579         (-[WKView _setOverlayScrollbarStyle:]):
1580         (-[WKView _overlayScrollbarStyle]):
1581         (-[WKView _pageExtendedBackgroundColor]):
1582         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
1583         (-[WKView waitForAsyncDrawingAreaSizeUpdate]):
1584         (-[WKView isUsingUISideCompositing]):
1585         (createSelectorExceptionMap): Deleted.
1586         (commandNameForSelector): Deleted.
1587         (menuItem): Deleted.
1588         (toolbarItem): Deleted.
1589         (-[WKView _setUserInterfaceItemState:enabled:state:]): Deleted.
1590         * UIProcess/Cocoa/WebViewImpl.h:
1591         * UIProcess/Cocoa/WebViewImpl.mm:
1592         (WebKit::WebViewImpl::createDrawingAreaProxy):
1593         (WebKit::WebViewImpl::isUsingUISideCompositing):
1594         (WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate):
1595         (WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate):
1596         (WebKit::WebViewImpl::updateLayer):
1597         (WebKit::WebViewImpl::setMinimumSizeForAutoLayout):
1598         (WebKit::WebViewImpl::minimumSizeForAutoLayout):
1599         (WebKit::WebViewImpl::setShouldExpandToViewHeightForAutoLayout):
1600         (WebKit::WebViewImpl::shouldExpandToViewHeightForAutoLayout):
1601         (WebKit::WebViewImpl::setUnderlayColor):
1602         (WebKit::WebViewImpl::underlayColor):
1603         (WebKit::WebViewImpl::pageExtendedBackgroundColor):
1604         (WebKit::WebViewImpl::setOverlayScrollbarStyle):
1605         (WebKit::WebViewImpl::overlayScrollbarStyle):
1606         (WebKit::createSelectorExceptionMap):
1607         (WebKit::commandNameForSelector):
1608         (WebKit::WebViewImpl::executeSavedCommandBySelector):
1609         (WebKit::WebViewImpl::executeEditCommandForSelector):
1610         (WebKit::menuItem):
1611         (WebKit::toolbarItem):
1612         (WebKit::WebViewImpl::validateUserInterfaceItem):
1613         (WebKit::WebViewImpl::setUserInterfaceItemState):
1614         (WebKit::WebViewImpl::browsingContextController):
1615         (WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
1616         (WebKit::WebViewImpl::saveBackForwardSnapshotForItem):
1617         (WebKit::WebViewImpl::executeEditCommand): Deleted.
1618         Move UI validation and a grab-bag of other things.
1619
1620 2015-10-29  Alex Christensen  <achristensen@webkit.org>
1621
1622         Fix Mac CMake build
1623         https://bugs.webkit.org/show_bug.cgi?id=150686
1624
1625         Reviewed by Filip Pizlo.
1626
1627         * CMakeLists.txt:
1628         * PlatformMac.cmake:
1629
1630 2015-10-29  Commit Queue  <commit-queue@webkit.org>
1631
1632         Unreviewed, rolling out r191728.
1633         https://bugs.webkit.org/show_bug.cgi?id=150668
1634
1635         Caused a lot of timeouts in layout tests (Requested by KaL on
1636         #webkit).
1637
1638         Reverted changeset:
1639
1640         "[GTK] Use a persistent main loop source in RunLoop glib
1641         implementation"
1642         https://bugs.webkit.org/show_bug.cgi?id=150590
1643         http://trac.webkit.org/changeset/191728
1644
1645 2015-10-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1646
1647         [GTK] Use a persistent main loop source in RunLoop glib implementation
1648         https://bugs.webkit.org/show_bug.cgi?id=150590
1649
1650         Reviewed by Žan Doberšek.
1651
1652         Use RunLoop::dispatch() instead of
1653         GMainLoopSource::scheduleAndDeleteOnDestroy in a couple of simple
1654         cases.
1655
1656         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1657         (WebKit::NetworkCache::runTaskInQueue):
1658         * UIProcess/gtk/DragAndDropHandler.cpp:
1659         (WebKit::DragAndDropHandler::dragLeave):
1660
1661 2015-10-28  Tim Horton  <timothy_horton@apple.com>
1662
1663         Fix the build
1664
1665         * UIProcess/mac/PageClientImpl.mm:
1666         (WebKit::PageClientImpl::startWindowDrag):
1667         (WebKit::PageClientImpl::platformWindow):
1668
1669 2015-10-28  Tim Horton  <timothy_horton@apple.com>
1670
1671         WKView being inside WKWebView leads to weird API issues
1672         https://bugs.webkit.org/show_bug.cgi?id=150174
1673
1674         Reviewed by Anders Carlsson.
1675
1676         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
1677         (WKPageGetObjectRegistry):
1678         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1679         (-[WKBrowsingContextController _remoteObjectRegistry]):
1680         * UIProcess/API/mac/WKView.mm:
1681         (-[WKView dealloc]):
1682         (-[WKView _inspectorAttachmentView]):
1683         (-[WKView _setInspectorAttachmentView:]):
1684         (-[WKView windowOcclusionDetectionEnabled]):
1685         (-[WKView setWindowOcclusionDetectionEnabled:]):
1686         (-[WKView _setTotalHeightOfBanners:]):
1687         (-[WKView _totalHeightOfBanners]):
1688         (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
1689         (-[WKView _remoteObjectRegistry]): Deleted.
1690         (-[WKView _startWindowDrag]): Deleted.
1691         * UIProcess/API/mac/WKViewInternal.h:
1692         * UIProcess/Cocoa/WebViewImpl.h:
1693         (WebKit::WebViewImpl::setWindowOcclusionDetectionEnabled):
1694         (WebKit::WebViewImpl::windowOcclusionDetectionEnabled):
1695         (WebKit::WebViewImpl::setTotalHeightOfBanners):
1696         (WebKit::WebViewImpl::totalHeightOfBanners):
1697         * UIProcess/Cocoa/WebViewImpl.mm:
1698         (WebKit::WebViewImpl::window):
1699         (WebKit::WebViewImpl::setInspectorAttachmentView):
1700         (WebKit::WebViewImpl::inspectorAttachmentView):
1701         (WebKit::WebViewImpl::remoteObjectRegistry):
1702         (WebKit::WebViewImpl::destroyRemoteObjectRegistry):
1703         * UIProcess/PageClient.h:
1704         * UIProcess/WebPageProxy.h:
1705         * UIProcess/mac/PageClientImpl.h:
1706         * UIProcess/mac/PageClientImpl.mm:
1707         (WebKit::PageClientImpl::isViewVisible):
1708         (WebKit::PageClientImpl::createColorPicker):
1709         (WebKit::PageClientImpl::startWindowDrag):
1710         (WebKit::PageClientImpl::platformWindow):
1711         (WebKit::PageClientImpl::inspectorAttachmentView):
1712         (WebKit::PageClientImpl::remoteObjectRegistry):
1713         * UIProcess/mac/WebInspectorProxyMac.mm:
1714         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1715         (WebKit::WebInspectorProxy::platformCanAttach):
1716         (WebKit::WebInspectorProxy::platformBringToFront):
1717         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
1718         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
1719         (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
1720         (WebKit::WebInspectorProxy::platformAttach):
1721         (WebKit::WebInspectorProxy::platformDetach):
1722         (WebKit::WebInspectorProxy::platformStartWindowDrag):
1723         * UIProcess/mac/WebPageProxyMac.mm:
1724         (WebKit::WebPageProxy::startWindowDrag):
1725         (WebKit::WebPageProxy::platformWindow):
1726         (WebKit::WebPageProxy::inspectorAttachmentView):
1727         (WebKit::WebPageProxy::remoteObjectRegistry):
1728         (WebKit::WebPageProxy::wkView): Deleted.
1729         Get rid of the wkView() getters on PageClientImpl and WebPageProxy, because
1730         those can't be a thing in the brave new world. Instead, plumb the four
1731         callers through PageClient to WebViewImpl.
1732
1733         Also, move a few more things (banners, window occlusion).
1734
1735 2015-10-27  Anders Carlsson  <andersca@apple.com>
1736
1737         Stub out more of the context menu SPI
1738         https://bugs.webkit.org/show_bug.cgi?id=150606
1739
1740         Reviewed by Dan Bernstein.
1741
1742         Add a delegate method that will allow the client to modify the menu. Also,
1743         add an empty _WKContextMenuElementInfo class and its _WKElementInfo superclass.
1744
1745         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1746         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h: Added.
1747         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm: Added.
1748         * UIProcess/API/Cocoa/_WKElementInfo.h: Added.
1749         * UIProcess/API/Cocoa/_WKElementInfo.mm: Added.
1750         * UIProcess/Cocoa/UIDelegate.h:
1751         * UIProcess/Cocoa/UIDelegate.mm:
1752         (WebKit::UIDelegate::setDelegate):
1753         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
1754         (WebKit::UIDelegate::UIClient::createNewPage):
1755         * UIProcess/mac/WebContextMenuProxyMac.mm:
1756         (WebKit::WebContextMenuProxyMac::showContextMenu):
1757         * WebKit2.xcodeproj/project.pbxproj:
1758
1759 2015-10-28  Anders Carlsson  <andersca@apple.com>
1760
1761         Stop using ContextMenuItem::shareMenuItem in the UI process
1762         https://bugs.webkit.org/show_bug.cgi?id=150578
1763
1764         Reviewed by Tim Horton.
1765
1766         * UIProcess/mac/WebContextMenuProxyMac.h:
1767         * UIProcess/mac/WebContextMenuProxyMac.mm:
1768         (WebKit::WebContextMenuProxyMac::createShareMenuItem):
1769         (WebKit::WebContextMenuProxyMac::createContextMenuItem):
1770         (WebKit::WebContextMenuProxyMac::shareMenuItem): Deleted.
1771
1772 2015-10-28  Tim Horton  <timothy_horton@apple.com>
1773
1774         WKView being inside WKWebView leads to weird API issues
1775         https://bugs.webkit.org/show_bug.cgi?id=150174
1776
1777         Reviewed by Anders Carlsson.
1778
1779         * UIProcess/API/mac/WKView.mm:
1780         (-[WKView _superDoCommandBySelector:]):
1781         (-[WKView _createDrawingAreaProxy]): Deleted.
1782         (-[WKView _processDidExit]): Deleted.
1783         (-[WKView _pageClosed]): Deleted.
1784         (-[WKView _didRelaunchProcess]): Deleted.
1785         (-[WKView _convertToDeviceSpace:]): Deleted.
1786         (-[WKView _convertToUserSpace:]): Deleted.
1787         (-[WKView _executeSavedCommandBySelector:]): Deleted.
1788         (-[WKResponderChainSink initWithResponderChain:]): Deleted.
1789         (-[WKResponderChainSink detach]): Deleted.
1790         (-[WKResponderChainSink didReceiveUnhandledCommand]): Deleted.
1791         (-[WKResponderChainSink noResponderFor:]): Deleted.
1792         (-[WKResponderChainSink doCommandBySelector:]): Deleted.
1793         (-[WKResponderChainSink tryToPerform:with:]): Deleted.
1794         * UIProcess/API/mac/WKViewInternal.h:
1795         * UIProcess/Cocoa/WebViewImpl.h:
1796         * UIProcess/Cocoa/WebViewImpl.mm:
1797         (-[WKResponderChainSink initWithResponderChain:]):
1798         (-[WKResponderChainSink detach]):
1799         (-[WKResponderChainSink didReceiveUnhandledCommand]):
1800         (-[WKResponderChainSink noResponderFor:]):
1801         (-[WKResponderChainSink doCommandBySelector:]):
1802         (-[WKResponderChainSink tryToPerform:with:]):
1803         (WebKit::WebViewImpl::createDrawingAreaProxy):
1804         (WebKit::WebViewImpl::processDidExit):
1805         (WebKit::WebViewImpl::pageClosed):
1806         (WebKit::WebViewImpl::didRelaunchProcess):
1807         (WebKit::WebViewImpl::executeSavedCommandBySelector):
1808         (WebKit::WebViewImpl::resetGestureController): Deleted.
1809         * UIProcess/mac/PageClientImpl.mm:
1810         (WebKit::PageClientImpl::createDrawingAreaProxy):
1811         (WebKit::PageClientImpl::processDidExit):
1812         (WebKit::PageClientImpl::pageClosed):
1813         (WebKit::PageClientImpl::didRelaunchProcess):
1814         (WebKit::PageClientImpl::convertToDeviceSpace):
1815         (WebKit::PageClientImpl::convertToUserSpace):
1816         (WebKit::PageClientImpl::executeSavedCommandBySelector):
1817         Move most of the rest of WKViewInternal.h's methods to WebViewImpl.
1818
1819 2015-10-28  Alex Christensen  <achristensen@webkit.org>
1820
1821         Compile and link with CMake on Mac
1822         https://bugs.webkit.org/show_bug.cgi?id=150632
1823
1824         Reviewed by Tim Horton.
1825
1826         * CMakeLists.txt:
1827         * PlatformEfl.cmake:
1828         * PlatformGTK.cmake:
1829         * PlatformMac.cmake:
1830
1831 2015-10-27  Anders Carlsson  <andersca@apple.com>
1832
1833         Stub out more of the context menu SPI
1834         https://bugs.webkit.org/show_bug.cgi?id=150606
1835
1836         Reviewed by Dan Bernstein.
1837
1838         Add a delegate method that will allow the client to modify the menu. Also,
1839         add an empty _WKContextMenuElementInfo class and its _WKElementInfo superclass.
1840
1841         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1842         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h: Added.
1843         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm: Added.
1844         * UIProcess/API/Cocoa/_WKElementInfo.h: Added.
1845         * UIProcess/API/Cocoa/_WKElementInfo.mm: Added.
1846         * UIProcess/Cocoa/UIDelegate.h:
1847         * UIProcess/Cocoa/UIDelegate.mm:
1848         (WebKit::UIDelegate::setDelegate):
1849         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
1850         (WebKit::UIDelegate::UIClient::createNewPage):
1851         * UIProcess/mac/WebContextMenuProxyMac.mm:
1852         (WebKit::WebContextMenuProxyMac::showContextMenu):
1853         * WebKit2.xcodeproj/project.pbxproj:
1854
1855 2015-10-28  Chris Dumez  <cdumez@apple.com>
1856
1857         Use RunLoopTimer in DataURLDecoder to avoid issues related to runloops
1858         https://bugs.webkit.org/show_bug.cgi?id=150609
1859         <rdar://problem/22702894>
1860
1861         Reviewed by Antti Koivisto.
1862
1863         Move addSchedulePair() call to Page::platformInitialize() so that
1864         RunLoopTimer can be used by any Page, even those that don't have
1865         a WebPage wrapper.
1866
1867         * WebProcess/WebPage/mac/WebPageMac.mm:
1868         (WebKit::WebPage::platformInitialize): Deleted.
1869
1870 2015-10-27  Tim Horton  <timothy_horton@apple.com>
1871
1872         Fix the 32-bit build.
1873
1874         * UIProcess/Cocoa/WebViewImpl.mm:
1875         (WebKit::WebViewImpl::dragImageForView):
1876
1877 2015-10-27  Tim Horton  <timothy_horton@apple.com>
1878
1879         Fix the build.
1880
1881         * UIProcess/Cocoa/WebViewImpl.mm:
1882
1883 2015-10-27  Tim Horton  <timothy_horton@apple.com>
1884
1885         WKView being inside WKWebView leads to weird API issues
1886         https://bugs.webkit.org/show_bug.cgi?id=150174
1887
1888         Reviewed by Anders Carlsson.
1889
1890         * UIProcess/API/mac/WKView.mm:
1891         (-[WKView mouseDown:]):
1892         (-[WKView mouseUp:]):
1893         (-[WKView acceptsFirstMouse:]):
1894         (-[WKView shouldDelayWindowOrderingForEvent:]):
1895         (-[WKView pasteboardChangedOwner:]):
1896         (-[WKView pasteboard:provideDataForType:]):
1897         (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
1898         (-[WKView _startWindowDrag]):
1899         (-[WKView _setMouseDownEvent:]): Deleted.
1900         (-[WKView _colorSpace]): Deleted.
1901         (-[WKView _dragImageForView:withImage:at:linkDrag:]): Deleted.
1902         (matchesExtensionOrEquivalent): Deleted.
1903         (-[WKView _setFileAndURLTypes:withExtension:withTitle:withURL:withVisibleURL:forPasteboard:]): Deleted.
1904         (-[WKView _setPromisedDataForImage:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]): Deleted.
1905         (-[WKView _setPromisedDataForAttachment:withExtension:withTitle:withURL:withVisibleURL:forPasteboard:]): Deleted.
1906         (fileExists): Deleted.
1907         (pathWithUniqueFilenameForPath): Deleted.
1908         (-[WKView spellCheckerDocumentTag]): Deleted.
1909         (-[WKView handleAcceptedAlternativeText:]): Deleted.
1910         (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
1911         * UIProcess/API/mac/WKViewInternal.h:
1912         * UIProcess/Cocoa/WebViewImpl.h:
1913         * UIProcess/Cocoa/WebViewImpl.mm:
1914         (WebKit::WebViewImpl::handleAcceptedAlternativeText):
1915         (WebKit::WebViewImpl::spellCheckerDocumentTag):
1916         (WebKit::WebViewImpl::startWindowDrag):
1917         (WebKit::WebViewImpl::dragImageForView):
1918         (WebKit::matchesExtensionOrEquivalent):
1919         (WebKit::WebViewImpl::setFileAndURLTypes):
1920         (WebKit::WebViewImpl::setPromisedDataForImage):
1921         (WebKit::WebViewImpl::setPromisedDataForAttachment):
1922         (WebKit::WebViewImpl::pasteboardChangedOwner):
1923         (WebKit::WebViewImpl::provideDataForPasteboard):
1924         (WebKit::fileExists):
1925         (WebKit::pathWithUniqueFilenameForPath):
1926         (WebKit::WebViewImpl::namesOfPromisedFilesDroppedAtDestination):
1927         (WebKit::WebViewImpl::setLastMouseDownEvent):
1928         * UIProcess/mac/CorrectionPanel.h:
1929         * UIProcess/mac/CorrectionPanel.mm:
1930         (WebKit::CorrectionPanel::show):
1931         (WebKit::CorrectionPanel::recordAutocorrectionResponse):
1932         (WebKit::CorrectionPanel::handleAcceptedReplacement):
1933         * UIProcess/mac/PageClientImpl.mm:
1934         (WebKit::PageClientImpl::colorSpace):
1935         (WebKit::PageClientImpl::setDragImage):
1936         (WebKit::PageClientImpl::setPromisedDataForImage):
1937         (WebKit::PageClientImpl::setPromisedDataForAttachment):
1938         (WebKit::PageClientImpl::showCorrectionPanel):
1939         (WebKit::PageClientImpl::recordAutocorrectionResponse):
1940         (WebKit::PageClientImpl::showDictationAlternativeUI):
1941         Move some pasteboard and spellcheck code.
1942
1943 2015-10-27  Wenson Hsieh  <wenson_hsieh@apple.com>
1944
1945         Implement viewport-width-based fast-click heuristic
1946         https://bugs.webkit.org/show_bug.cgi?id=150604
1947         <rdar://problem/23267308>
1948
1949         Reviewed by Simon Fraser.
1950
1951         Implement a new fast-click heuristic that applies to viewports with width = device-width. The basic rules are
1952         as follows: when a page has viewport width = device-width and is at initial zoom scale, we disable double-tapping
1953         in favor of fast-clicking. However, if the viewport scale is not the initial scale, we allow double tapping. For
1954         fast-clicking to remain useful after the user pinch-zooms, we change our double-tap to zoom out behavior to zoom
1955         to the initial scale rather than the minimum scale. For unscalable viewports, we default to fast-clicking behavior,
1956         and for all other viewports not at device-width, we double-tap to zoom and scroll as normal.
1957
1958         This patch removes some logic previously used for our scroll- and zoom-based fast-clicking heuristic, and adds
1959         information about the viewport width and initial scale to RemoteLayerTreeTransactions. This information is then
1960         used by the UI process to determine whether double tapping should be disabled or enabled.
1961
1962         The fast-click heuristic can be turned off through user default preferences, and a tap highlight for debugging
1963         fast-clicking can also be enabled through a user default preference. A red highlight indicates that a single-
1964         tap was slow, whereas a green highlight indicates a fast single-tap.
1965
1966         * Shared/mac/RemoteLayerTreeTransaction.h:
1967         (WebKit::RemoteLayerTreeTransaction::initialScaleFactor):
1968         (WebKit::RemoteLayerTreeTransaction::setInitialScaleFactor):
1969         (WebKit::RemoteLayerTreeTransaction::viewportMetaTagWidth):
1970         (WebKit::RemoteLayerTreeTransaction::setViewportMetaTagWidth):
1971         * Shared/mac/RemoteLayerTreeTransaction.mm:
1972         (WebKit::RemoteLayerTreeTransaction::encode):
1973         (WebKit::RemoteLayerTreeTransaction::decode):
1974         * UIProcess/API/Cocoa/WKWebView.mm:
1975         (-[WKWebView initWithFrame:configuration:]):
1976         (-[WKWebView _processDidExit]):
1977         (-[WKWebView _didCommitLayerTree:]):
1978         (-[WKWebView _zoomToInitialScaleWithOrigin:animated:]):
1979         (-[WKWebView _allowsDoubleTapGestures]):
1980         (-[WKWebView _setViewportMetaTagWidth:]): Deleted.
1981         (-[WKWebView _contentZoomScale]): Deleted.
1982         (-[WKWebView _viewportMetaTagWidth]): Deleted.
1983         (-[WKWebView _viewportIsUserScalable]): Deleted.
1984         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1985         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1986         * UIProcess/PageClient.h:
1987         * UIProcess/WebPageProxy.h:
1988         * UIProcess/WebPageProxy.messages.in:
1989         * UIProcess/ios/PageClientImplIOS.h:
1990         * UIProcess/ios/PageClientImplIOS.mm:
1991         (WebKit::PageClientImpl::disableDoubleTapGesturesDuringTapIfNecessary):
1992         (WebKit::PageClientImpl::didChangeViewportMetaTagWidth): Deleted.
1993         (WebKit::PageClientImpl::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary): Deleted.
1994         * UIProcess/ios/SmartMagnificationController.h:
1995         * UIProcess/ios/SmartMagnificationController.mm:
1996         (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
1997         * UIProcess/ios/WKContentView.h:
1998         * UIProcess/ios/WKContentView.mm:
1999         (-[WKContentView _zoomToInitialScaleWithOrigin:]):
2000         * UIProcess/ios/WKContentViewInteraction.h:
2001         * UIProcess/ios/WKContentViewInteraction.mm:
2002         (-[WKContentView setupInteraction]):
2003         (-[WKContentView _showTapHighlight]):
2004         (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
2005         (-[WKContentView _mayDisableDoubleTapGesturesDuringSingleTap]):
2006         (-[WKContentView _disableDoubleTapGesturesDuringTapIfNecessary:]):
2007         (-[WKContentView _finishInteraction]):
2008         (-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
2009         (-[WKContentView _tapHighlightColorForFastClick:]):
2010         (-[WKContentView _setDoubleTapGesturesEnabled:]):
2011         (-[WKContentView _fastClickZoomThreshold]): Deleted.
2012         (-[WKContentView _allowDoubleTapToZoomForCurrentZoomScale:andTargetZoomScale:]): Deleted.
2013         (-[WKContentView _disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:allowsDoubleTapZoom:targetRect:isReplaced:minimumScale:maximumScale:]): Deleted.
2014         * UIProcess/ios/WebPageProxyIOS.mm:
2015         (WebKit::WebPageProxy::disableDoubleTapGesturesDuringTapIfNecessary):
2016         (WebKit::WebPageProxy::viewportMetaTagWidthDidChange): Deleted.
2017         (WebKit::WebPageProxy::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary): Deleted.
2018         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
2019         * WebProcess/WebPage/WebPage.cpp:
2020         (WebKit::WebPage::willCommitLayerTree):
2021         * WebProcess/WebPage/ios/WebPageIOS.mm:
2022         (WebKit::WebPage::potentialTapAtPosition):
2023         (WebKit::WebPage::viewportPropertiesDidChange): Deleted.
2024
2025 2015-10-27  Tim Horton  <timothy_horton@apple.com>
2026
2027         WKView being inside WKWebView leads to weird API issues
2028         https://bugs.webkit.org/show_bug.cgi?id=150174
2029
2030         Reviewed by Anders Carlsson.
2031
2032         * UIProcess/API/mac/WKView.mm:
2033         (-[WKView _superAccessibilityAttributeValue:]):
2034         (-[WKView accessibilityFocusedUIElement]):
2035         (-[WKView accessibilityIsIgnored]):
2036         (-[WKView accessibilityHitTest:]):
2037         (-[WKView accessibilityAttributeValue:]):
2038         (-[WKView _processDidExit]):
2039         (-[WKView _pageClosed]):
2040         (-[WKView _updateRemoteAccessibilityRegistration:]): Deleted.
2041         (-[WKView enableAccessibilityIfNecessary]): Deleted.
2042         (-[WKView _toolTipChangedFrom:to:]): Deleted.
2043         (-[WKView _setAccessibilityWebProcessToken:]): Deleted.
2044         (-[WKView _hasFullScreenWindowController]): Deleted.
2045         (-[WKView _fullScreenWindowController]): Deleted.
2046         (-[WKView _closeFullScreenWindowController]): Deleted.
2047         (-[WKView _setSuppressVisibilityUpdates:]): Deleted.
2048         (-[WKView _suppressVisibilityUpdates]): Deleted.
2049         (-[WKView _primaryTrackingArea]): Deleted.
2050         (-[WKView _setPrimaryTrackingArea:]): Deleted.
2051         (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
2052         * UIProcess/API/mac/WKViewInternal.h:
2053         * UIProcess/Cocoa/WebViewImpl.h:
2054         (WebKit::WebViewImpl::accessibilityIsIgnored):
2055         (WebKit::WebViewImpl::primaryTrackingArea):
2056         * UIProcess/Cocoa/WebViewImpl.mm:
2057         (WebKit::trackingAreaOptions):
2058         (WebKit::WebViewImpl::WebViewImpl):
2059         (WebKit::WebViewImpl::setAccessibilityWebProcessToken):
2060         (WebKit::WebViewImpl::updateRemoteAccessibilityRegistration):
2061         (WebKit::WebViewImpl::accessibilityFocusedUIElement):
2062         (WebKit::WebViewImpl::accessibilityHitTest):
2063         (WebKit::WebViewImpl::enableAccessibilityIfNecessary):
2064         (WebKit::WebViewImpl::accessibilityAttributeValue):
2065         (WebKit::WebViewImpl::setPrimaryTrackingArea):
2066         (WebKit::WebViewImpl::toolTipChanged):
2067         * UIProcess/mac/PageClientImpl.mm:
2068         (WebKit::PageClientImpl::toolTipChanged):
2069         (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
2070         (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
2071         (WebKit::PageClientImpl::closeFullScreenManager):
2072         (WebKit::PageClientImpl::isFullScreen):
2073         (WebKit::PageClientImpl::enterFullScreen):
2074         (WebKit::PageClientImpl::exitFullScreen):
2075         (WebKit::PageClientImpl::beganEnterFullScreen):
2076         (WebKit::PageClientImpl::beganExitFullScreen):
2077         Move accessibility code, and fold in some internal-only methods.
2078
2079 2015-10-27  Tim Horton  <timothy_horton@apple.com>
2080
2081         WKView being inside WKWebView leads to weird API issues
2082         https://bugs.webkit.org/show_bug.cgi?id=150174
2083
2084         Reviewed by Anders Carlsson.
2085
2086         * UIProcess/API/mac/WKView.mm:
2087         (-[WKView scrollWheel:]):
2088         (-[WKView swipeWithEvent:]):
2089         (-[WKView _superSwipeWithEvent:]):
2090         (-[WKView _superMagnifyWithEvent:]):
2091         (-[WKView _superSmartMagnifyWithEvent:]):
2092         (-[WKView _processDidExit]):
2093         (-[WKView setAllowsBackForwardNavigationGestures:]):
2094         (-[WKView allowsBackForwardNavigationGestures]):
2095         (-[WKView setAllowsMagnification:]):
2096         (-[WKView allowsMagnification]):
2097         (-[WKView magnifyWithEvent:]):
2098         (-[WKView rotateWithEvent:]):
2099         (-[WKView _gestureEventWasNotHandledByWebCore:]):
2100         (-[WKView smartMagnifyWithEvent:]):
2101         (-[WKView setMagnification:centeredAtPoint:]):
2102         (-[WKView setMagnification:]):
2103         (-[WKView magnification]):
2104         (-[WKView _setCustomSwipeViews:]):
2105         (-[WKView _setCustomSwipeViewsTopContentInset:]):
2106         (-[WKView _tryToSwipeWithEvent:ignoringPinnedState:]):
2107         (-[WKView _setDidMoveSwipeSnapshotCallback:]):
2108         (-[WKView _ensureGestureController]): Deleted.
2109         (takeWindowSnapshot): Deleted.
2110         (-[WKView _takeViewSnapshot]): Deleted.
2111         (-[WKView _wheelEventWasNotHandledByWebCore:]): Deleted.
2112         (-[WKView _didFirstVisuallyNonEmptyLayoutForMainFrame]): Deleted.
2113         (-[WKView _didFinishLoadForMainFrame]): Deleted.
2114         (-[WKView _didFailLoadForMainFrame]): Deleted.
2115         (-[WKView _didSameDocumentNavigationForMainFrame:]): Deleted.
2116         (-[WKView _removeNavigationGestureSnapshot]): Deleted.
2117         * UIProcess/API/mac/WKViewInternal.h:
2118         * UIProcess/Cocoa/WebViewImpl.h:
2119         (WebKit::WebViewImpl::gestureController):
2120         (WebKit::WebViewImpl::allowsBackForwardNavigationGestures):
2121         (WebKit::WebViewImpl::allowsMagnification):
2122         * UIProcess/Cocoa/WebViewImpl.mm:
2123         (WebKit::takeWindowSnapshot):
2124         (WebKit::WebViewImpl::takeViewSnapshot):
2125         (WebKit::WebViewImpl::ensureGestureController):
2126         (WebKit::WebViewImpl::resetGestureController):
2127         (WebKit::WebViewImpl::setAllowsBackForwardNavigationGestures):
2128         (WebKit::WebViewImpl::setAllowsMagnification):
2129         (WebKit::WebViewImpl::setMagnification):
2130         (WebKit::WebViewImpl::magnification):
2131         (WebKit::WebViewImpl::setCustomSwipeViews):
2132         (WebKit::WebViewImpl::setCustomSwipeViewsTopContentInset):
2133         (WebKit::WebViewImpl::tryToSwipeWithEvent):
2134         (WebKit::WebViewImpl::setDidMoveSwipeSnapshotCallback):
2135         (WebKit::WebViewImpl::scrollWheel):
2136         (WebKit::WebViewImpl::swipeWithEvent):
2137         (WebKit::WebViewImpl::magnifyWithEvent):
2138         (WebKit::WebViewImpl::smartMagnifyWithEvent):
2139         (WebKit::WebViewImpl::rotateWithEvent):
2140         (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCore):
2141         (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCoreFromViewOnly):
2142         * UIProcess/mac/PageClientImpl.mm:
2143         (WebKit::PageClientImpl::takeViewSnapshot):
2144         (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
2145         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
2146         (WebKit::PageClientImpl::didFinishLoadForMainFrame):
2147         (WebKit::PageClientImpl::didFailLoadForMainFrame):
2148         (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
2149         (WebKit::PageClientImpl::removeNavigationGestureSnapshot):
2150         Move swipe, zoom, rotate, and snapshotting code.
2151
2152 2015-10-27  Zhuo Li  <zachli@apple.com>
2153
2154         Add WebKit API to clear data type Search Field Recent Searches.
2155         https://bugs.webkit.org/show_bug.cgi?id=150019.
2156
2157         Reviewed by Anders Carlsson.
2158
2159         * Shared/WebsiteData/WebsiteDataTypes.h: Add data type Search Field Recent Searches.
2160         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
2161         (dataTypesToString): Ditto.
2162         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
2163         (WebKit::toWebsiteDataTypes): Ditto.
2164         (WebKit::toWKWebsiteDataTypes): Ditto.
2165         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h: Ditto.
2166         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2167         (WebKit::WebsiteDataStore::removeData): Handle the case when data type is Search
2168         Field Recent Searches.
2169         * UIProcess/WebsiteData/WebsiteDataStore.h: Add a private function for removing
2170         recent searches based on time.
2171         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
2172         (WebKit::WebsiteDataStoreCocoa::platformRemoveRecentSearches): Call the removing
2173         recent searches logic in WebCore.
2174         * UIProcess/efl/WebPageProxyEfl.cpp:
2175         (WebKit::WebsiteDataStore::platformRemoveRecentSearches): Not implemented.
2176         * UIProcess/gtk/WebPageProxyGtk.cpp:
2177         (WebKit::WebsiteDataStore::platformRemoveRecentSearches): Not implemented.
2178
2179 2015-10-26  Brady Eidson  <beidson@apple.com>
2180
2181         Make IDBKeyData from a struct to a class.
2182         https://bugs.webkit.org/show_bug.cgi?id=150576
2183
2184         Reviewed by Alex Christensen.
2185
2186         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
2187         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
2188         * DatabaseProcess/IndexedDB/IDBSerialization.h:
2189         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2190         (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
2191         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2192         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
2193         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
2194         (WebKit::buildIndexStatement):
2195         (WebKit::buildObjectStoreStatement):
2196         (WebKit::SQLiteIDBCursor::establishStatement):
2197         (WebKit::SQLiteIDBCursor::createSQLiteStatement):
2198         (WebKit::SQLiteIDBCursor::resetAndRebindStatement):
2199         (WebKit::SQLiteIDBCursor::iterate):
2200         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2201         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
2202         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2203         (WebKit::WebIDBServerConnection::didPutRecord):
2204         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2205         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
2206
2207 2015-10-26  Philip Chimento  <philip.chimento@gmail.com>
2208
2209         [GTK] [Stable] InstallMissingMediaPluginsPermissionRequest not defined when building without GStreamer
2210         https://bugs.webkit.org/show_bug.cgi?id=148607
2211
2212         Unreviewed, build fix.
2213
2214         * UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.h:
2215         Add a stub for the InstallMissingMediaPluginsPermissionRequest class
2216         for the case when video is disabled or not using GStreamer. It's OK
2217         that this class does nothing, because the associated C API contains
2218         an assert_not_reached if video is disabled. We just need to define
2219         the symbol so that the function signature will compile.
2220
2221 2015-10-26  Anders Carlsson  <andersca@apple.com>
2222
2223         Pipe custom context menu handling through to the UIDelegate object
2224         https://bugs.webkit.org/show_bug.cgi?id=150572
2225
2226         Reviewed by Tim Horton.
2227
2228         * UIProcess/API/APIContextMenuClient.h:
2229         (API::ContextMenuClient::menuFromProposedMenu):
2230         * UIProcess/API/Cocoa/WKWebView.mm:
2231         (-[WKWebView setUIDelegate:]):
2232         * UIProcess/Cocoa/UIDelegate.h:
2233         * UIProcess/Cocoa/UIDelegate.mm:
2234         (WebKit::UIDelegate::createContextMenuClient):
2235         (WebKit::UIDelegate::ContextMenuClient::ContextMenuClient):
2236         (WebKit::UIDelegate::ContextMenuClient::~ContextMenuClient):
2237         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
2238         * UIProcess/mac/WebContextMenuProxyMac.mm:
2239         (WebKit::WebContextMenuProxyMac::showContextMenu):
2240
2241 2015-10-26  Tim Horton  <timothy_horton@apple.com>
2242
2243         WKView being inside WKWebView leads to weird API issues
2244         https://bugs.webkit.org/show_bug.cgi?id=150174
2245
2246         Reviewed by Anders Carlsson.
2247
2248         * UIProcess/API/mac/WKView.mm:
2249         (-[WKView mouseDown:]):
2250         (-[WKView mouseDragged:]):
2251         (-[WKView draggedImage:endedAt:operation:]):
2252         (-[WKView draggingEntered:]):
2253         (-[WKView draggingUpdated:]):
2254         (-[WKView draggingExited:]):
2255         (-[WKView prepareForDragOperation:]):
2256         (-[WKView performDragOperation:]):
2257         (-[WKView _hitTest:dragTypes:]):
2258         (-[WKView initWithFrame:processPool:configuration:webView:]):
2259         (-[WKView applicationFlags:]): Deleted.
2260         (maybeCreateSandboxExtensionFromPasteboard): Deleted.
2261         (createSandboxExtensionsForFileUpload): Deleted.
2262         (-[WKView _registerDraggedTypes]): Deleted.
2263         * UIProcess/Cocoa/WebViewImpl.h:
2264         (WebKit::WebViewImpl::ignoresMouseDraggedEvents):
2265         * UIProcess/Cocoa/WebViewImpl.mm:
2266         (WebKit::WebViewImpl::setIgnoresMouseDraggedEvents):
2267         (WebKit::WebViewImpl::draggedImage):
2268         (WebKit::applicationFlagsForDrag):
2269         (WebKit::WebViewImpl::draggingEntered):
2270         (WebKit::WebViewImpl::draggingUpdated):
2271         (WebKit::WebViewImpl::draggingExited):
2272         (WebKit::WebViewImpl::prepareForDragOperation):
2273         (WebKit::maybeCreateSandboxExtensionFromPasteboard):
2274         (WebKit::createSandboxExtensionsForFileUpload):
2275         (WebKit::WebViewImpl::performDragOperation):
2276         (WebKit::WebViewImpl::hitTestForDragTypes):
2277         (WebKit::WebViewImpl::registerDraggedTypes):
2278         Move some drag-related things to WebViewImpl.
2279
2280 2015-10-26  Anders Carlsson  <andersca@apple.com>
2281
2282         Pipe custom context menu handling through to the UIDelegate object
2283         https://bugs.webkit.org/show_bug.cgi?id=150572
2284
2285         Reviewed by Tim Horton.
2286
2287         * UIProcess/API/APIContextMenuClient.h:
2288         (API::ContextMenuClient::menuFromProposedMenu):
2289         * UIProcess/API/Cocoa/WKWebView.mm:
2290         (-[WKWebView setUIDelegate:]):
2291         * UIProcess/Cocoa/UIDelegate.h:
2292         * UIProcess/Cocoa/UIDelegate.mm:
2293         (WebKit::UIDelegate::createContextMenuClient):
2294         (WebKit::UIDelegate::ContextMenuClient::ContextMenuClient):
2295         (WebKit::UIDelegate::ContextMenuClient::~ContextMenuClient):
2296         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
2297         * UIProcess/mac/WebContextMenuProxyMac.mm:
2298         (WebKit::WebContextMenuProxyMac::showContextMenu):
2299
2300 2015-10-26  Alex Christensen  <achristensen@webkit.org>
2301
2302         Build fix when using NETWORK_SESSION after r191457.
2303
2304         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2305         (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
2306         Use resourceResponse.
2307
2308 2015-10-26  Anders Carlsson  <andersca@apple.com>
2309
2310         Remove more dead context menu code
2311         https://bugs.webkit.org/show_bug.cgi?id=150569
2312
2313         Reviewed by Tim Horton.
2314
2315         * UIProcess/API/APIContextMenuClient.h:
2316         (API::ContextMenuClient::contextMenuDismissed): Deleted.
2317         * UIProcess/API/C/WKPage.cpp:
2318         (WKPageSetPageContextMenuClient): Deleted.
2319
2320 2015-10-26  Anders Carlsson  <andersca@apple.com>
2321
2322         Remove dead context menu code
2323         https://bugs.webkit.org/show_bug.cgi?id=150567
2324
2325         Reviewed by Tim Horton.
2326
2327         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2328         (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems): Deleted.
2329         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
2330
2331 2015-10-26  Tim Horton  <timothy_horton@apple.com>
2332
2333         Don't expose the whitelist/blacklist in _WKUserStyleSheet
2334         https://bugs.webkit.org/show_bug.cgi?id=150566
2335
2336         Reviewed by Anders Carlsson.
2337
2338         * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
2339         * UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
2340         (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:]):
2341         (toWTFStrings): Deleted.
2342         (-[_WKUserStyleSheet initWithSource:whitelistedURLPatterns:blacklistedURLPatterns:forMainFrameOnly:]): Deleted.
2343         (-[_WKUserStyleSheet whitelistedURLPatterns]): Deleted.
2344         (-[_WKUserStyleSheet blacklistedURLPatterns]): Deleted.
2345
2346 2015-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2347
2348         Unreviewed. Fix GTK+ build after r191543.
2349
2350         * UIProcess/API/gtk/WebKitWebView.cpp:
2351         (webkit_web_view_run_javascript):
2352         (resourcesStreamReadCallback):
2353
2354 2015-10-24  Tim Horton  <timothy_horton@apple.com>
2355
2356         Add a way to add user style sheets to WKUserContentController
2357         https://bugs.webkit.org/show_bug.cgi?id=150531
2358         <rdar://problem/23191691>
2359
2360         Reviewed by Darin Adler.
2361
2362         * Shared/API/APIObject.h:
2363         * Shared/Cocoa/APIObject.mm:
2364         (API::Object::newObject):
2365         Boilerplate for a new API::UserStyleSheet.
2366
2367         * UIProcess/API/APIUserStyleSheet.cpp: Added.
2368         (API::generateIdentifier):
2369         (API::UserStyleSheet::generateUniqueURL):
2370         * UIProcess/API/APIUserStyleSheet.h: Added.
2371         Added API::UserStyleSheet, borrowing URL generation code from API::UserScript.
2372
2373         * UIProcess/API/Cocoa/WKUserContentController.mm:
2374         (-[WKUserContentController _addUserStyleSheet:]):
2375         (-[WKUserContentController _removeAllUserStyleSheets]):
2376         Forward add and remove-all to WebUserContentControllerProxy.
2377
2378         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
2379         * UIProcess/API/Cocoa/_WKUserStyleSheet.h: Added.
2380         * UIProcess/API/Cocoa/_WKUserStyleSheet.mm: Added.
2381         (toWTFStrings):
2382         (-[_WKUserStyleSheet initWithSource:whitelistedURLPatterns:blacklistedURLPatterns:forMainFrameOnly:]):
2383         (-[_WKUserStyleSheet source]):
2384         (-[_WKUserStyleSheet isForMainFrameOnly]):
2385         (-[_WKUserStyleSheet copyWithZone:]):
2386         (-[_WKUserStyleSheet _apiObject]):
2387         * UIProcess/API/Cocoa/_WKUserStyleSheetInternal.h: Added.
2388         (API::wrapper):
2389         * WebKit2.xcodeproj/project.pbxproj:
2390         Add the new modern API object (as SPI for now).
2391
2392 2015-10-24  Tim Horton  <timothy_horton@apple.com>
2393
2394         Expose more information about the exception in WKErrorJavaScriptExceptionOccurred errors
2395         https://bugs.webkit.org/show_bug.cgi?id=150525
2396
2397         Reviewed by Darin Adler.
2398
2399         * Scripts/webkit/messages.py:
2400         (headers_for_type):
2401         * Shared/WebCoreArgumentCoders.cpp:
2402         (IPC::ArgumentCoder<ExceptionDetails>::encode):
2403         (IPC::ArgumentCoder<ExceptionDetails>::decode):
2404         * Shared/WebCoreArgumentCoders.h:
2405         Learn how to en/decode ExceptionDetails.
2406
2407         * UIProcess/API/C/WKPage.cpp:
2408         (WKPageRunJavaScriptInMainFrame):
2409         * UIProcess/WebPageProxy.cpp:
2410         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
2411         (WebKit::WebPageProxy::scriptValueCallback):
2412         * UIProcess/WebPageProxy.h:
2413         * UIProcess/WebPageProxy.messages.in:
2414         * WebProcess/WebPage/WebPage.cpp:
2415         (WebKit::WebPage::runJavaScriptInMainFrame):
2416         Plumb ExceptionDetails back through runJavaScriptInMainFrame, across the
2417         process boundary.
2418
2419         * UIProcess/API/Cocoa/WKError.mm:
2420         (localizedDescriptionForErrorCode):
2421         * UIProcess/API/Cocoa/WKErrorInternal.h:
2422         * UIProcess/API/Cocoa/WKErrorPrivate.h:
2423         Expose localizedDescriptionForErrorCode so that WKWebView can do special
2424         things with its error.
2425         Add new private userInfo keys for exception info.
2426
2427         * UIProcess/API/Cocoa/WKWebView.mm:
2428         (-[WKWebView evaluateJavaScript:completionHandler:]):
2429         Fill in the NSError userInfo with the exception info.
2430
2431 2015-10-24  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2432
2433         [EFL] Fix a wrong enum variable use
2434         https://bugs.webkit.org/show_bug.cgi?id=150522
2435
2436         Reviewed by Csaba Osztrogonác.
2437
2438         * UIProcess/API/efl/EwkView.cpp:
2439         (EwkView::requestPopupMenu):
2440         Use kWKPopupItemTextDirectionLTR instead of EWK_TEXT_DIRECTION_LEFT_TO_RIGHT.
2441
2442 2015-10-24  Dan Bernstein  <mitz@apple.com>
2443
2444         [Cocoa] _WKFormInputSession should provide access to the focused element info
2445         https://bugs.webkit.org/show_bug.cgi?id=150512
2446
2447         Reviewed by Tim Horton.
2448
2449         * UIProcess/API/Cocoa/_WKFormInputSession.h: Added focusedElementInfo property to the
2450           protocol.
2451
2452         * UIProcess/ios/WKContentViewInteraction.mm:
2453         (-[WKFormInputSession initWithContentView:focusedElementInfo:userObject:]): Added the
2454           focusedElementInfo argument, used to initialize a new ivar.
2455         (-[WKFormInputSession focusedElementInfo]): Added this getter for the new
2456           _WKFormInputSession property.
2457         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
2458           Create the WKFocusedElementInfo unconditionally and pass it to the new WKFormInputSession
2459           initializer.
2460
2461 2015-10-24  Dan Bernstein  <mitz@apple.com>
2462
2463         [iOS] Allow clients to specify a custom input view to be used for a form input session
2464         https://bugs.webkit.org/show_bug.cgi?id=150395
2465
2466         Reviewed by Tim Horton.
2467
2468         * UIProcess/API/Cocoa/_WKFormInputSession.h: Added customInputView property to the protocol.
2469
2470         * UIProcess/ios/WKContentViewInteraction.mm:
2471         (-[WKFormInputSession customInputView]): Added this getter.
2472         (-[WKFormInputSession setCustomInputView:]): Added this setter, which reloads the input
2473           views when the custom input view changes.
2474         (-[WKContentView inputView]): Changed to return the custom view from the input session if
2475           there is one.
2476
2477 2015-10-23  Alex Christensen  <achristensen@webkit.org>
2478
2479         Fix CMake compile error and add correct null check
2480         https://bugs.webkit.org/show_bug.cgi?id=150520
2481
2482         Reviewed by Simon Fraser.
2483
2484         * UIProcess/API/Cocoa/WKWebView.mm:
2485         (-[WKWebView _doAfterNextPresentationUpdate:]):
2486
2487 2015-10-23  Alex Christensen  <achristensen@webkit.org>
2488
2489         Progress towards CMake on Mac
2490         https://bugs.webkit.org/show_bug.cgi?id=150517
2491
2492         Reviewed by Tim Horton.
2493
2494         * CMakeLists.txt:
2495         * PlatformEfl.cmake:
2496         * PlatformGTK.cmake:
2497         * PlatformMac.cmake:
2498         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp: Removed.
2499         * WebProcess/Cookies/curl/WebCookieManagerCurl.cpp: Removed.
2500
2501 2015-10-23  Tim Horton  <timothy_horton@apple.com>
2502
2503         WKView being inside WKWebView leads to weird API issues
2504         https://bugs.webkit.org/show_bug.cgi?id=150174
2505
2506         * UIProcess/Cocoa/WebViewImpl.h:
2507         Whoops.
2508
2509 2015-10-23  Tim Horton  <timothy_horton@apple.com>
2510
2511         WKView being inside WKWebView leads to weird API issues
2512         https://bugs.webkit.org/show_bug.cgi?id=150174
2513
2514         Reviewed by Anders Carlsson.
2515
2516         * UIProcess/API/mac/WKView.mm:
2517         (-[WKView hitTest:]):
2518         (-[WKView _processDidExit]):
2519         (-[WKView _setThumbnailView:]):
2520         (-[WKView _thumbnailView]):
2521         (-[WKFlippedView isFlipped]): Deleted.
2522         (-[WKView dealloc]): Deleted.
2523         (-[WKView _setAcceleratedCompositingModeRootLayer:]): Deleted.
2524         (-[WKView _acceleratedCompositingModeRootLayer]): Deleted.
2525         (-[WKView _updateThumbnailViewLayer]): Deleted.
2526         (-[WKView _reparentLayerTreeInThumbnailView]): Deleted.
2527         * UIProcess/API/mac/WKViewInternal.h:
2528         * UIProcess/Cocoa/WebViewImpl.h:
2529         (WebKit::WebViewImpl::acceleratedCompositingRootLayer):
2530         (WebKit::WebViewImpl::layerHostingView):
2531         (WebKit::WebViewImpl::thumbnailView):
2532         * UIProcess/Cocoa/WebViewImpl.mm:
2533         (-[WKFlippedView isFlipped]):
2534         (WebKit::WebViewImpl::~WebViewImpl):
2535         (WebKit::WebViewImpl::setAcceleratedCompositingRootLayer):
2536         (WebKit::WebViewImpl::setThumbnailView):
2537         (WebKit::WebViewImpl::reparentLayerTreeInThumbnailView):
2538         (WebKit::WebViewImpl::updateThumbnailViewLayer):
2539         * UIProcess/mac/PageClientImpl.mm:
2540         (WebKit::PageClientImpl::enterAcceleratedCompositingMode):
2541         (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
2542         (WebKit::PageClientImpl::updateAcceleratedCompositingMode):
2543         (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
2544         (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
2545         Move accelerated compositing and thumbnail view code.
2546
2547 2015-10-23  Tim Horton  <timothy_horton@apple.com>
2548
2549         WKView being inside WKWebView leads to weird API issues
2550         https://bugs.webkit.org/show_bug.cgi?id=150174
2551
2552         Reviewed by Anders Carlsson.
2553
2554         * UIProcess/API/mac/WKView.mm:
2555         (-[WKView _superRemoveTrackingRect:]):
2556         (-[WKView addTrackingRect:owner:userData:assumeInside:]):
2557         (-[WKView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]):
2558         (-[WKView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]):
2559         (-[WKView removeTrackingRect:]):
2560         (-[WKView _removeTrackingRects:count:]):
2561         (-[WKView view:stringForToolTip:point:userData:]):
2562         (-[WKView _toolTipChangedFrom:to:]):
2563         (-[WKView _setAcceleratedCompositingModeRootLayer:]): Deleted.
2564         (-[WKView _acceleratedCompositingModeRootLayer]): Deleted.
2565         (takeWindowSnapshot): Deleted.
2566         * UIProcess/Cocoa/WebViewImpl.h:
2567         * UIProcess/Cocoa/WebViewImpl.mm:
2568         (WebKit::WebViewImpl::addTrackingRect):
2569         (WebKit::WebViewImpl::addTrackingRectWithTrackingNum):
2570         (WebKit::WebViewImpl::addTrackingRectsWithTrackingNums):
2571         (WebKit::WebViewImpl::removeTrackingRect):
2572         (WebKit::WebViewImpl::removeTrackingRects):
2573         (WebKit::WebViewImpl::sendToolTipMouseExited):
2574         (WebKit::WebViewImpl::sendToolTipMouseEntered):
2575         (WebKit::WebViewImpl::stringForToolTip):
2576         (WebKit::WebViewImpl::toolTipChanged):
2577         Move tooltip code.
2578
2579 2015-10-23  Tim Horton  <timothy_horton@apple.com>
2580
2581         WKView being inside WKWebView leads to weird API issues
2582         https://bugs.webkit.org/show_bug.cgi?id=150174
2583
2584         Reviewed by Anders Carlsson.
2585
2586         * UIProcess/API/mac/WKView.mm:
2587         (-[WKView _interpretKeyEvent:completionHandler:]):
2588         (-[WKView inputContext]):
2589         (-[WKView performKeyEquivalent:]):
2590         (-[WKView keyDown:]):
2591         (-[WKView _doneWithKeyEvent:eventWasHandled:]):
2592         (-[WKView _setPluginComplexTextInputState:]): Deleted.
2593         (-[WKView _disableComplexTextInputIfNecessary]): Deleted.
2594         (-[WKView _handlePluginComplexTextInputKeyDown:]): Deleted.
2595         (-[WKView _tryHandlePluginComplexTextInputKeyDown:]): Deleted.
2596         (-[WKView _tryPostProcessPluginComplexTextInputKeyDown:]): Deleted.
2597         (-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]): Deleted.
2598         (-[WKView _setPluginComplexTextInputState:pluginComplexTextInputIdentifier:]): Deleted.
2599         * UIProcess/API/mac/WKViewInternal.h:
2600         * UIProcess/Cocoa/WebViewImpl.h:
2601         (WebKit::WebViewImpl::pluginComplexTextInputState):
2602         (WebKit::WebViewImpl::pluginComplexTextInputIdentifier):
2603         * UIProcess/Cocoa/WebViewImpl.mm:
2604         (WebKit::WebViewImpl::setPluginComplexTextInputState):
2605         (WebKit::WebViewImpl::setPluginComplexTextInputStateAndIdentifier):
2606         (WebKit::WebViewImpl::disableComplexTextInputIfNecessary):
2607         (WebKit::WebViewImpl::handlePluginComplexTextInputKeyDown):
2608         (WebKit::WebViewImpl::tryHandlePluginComplexTextInputKeyDown):
2609         (WebKit::WebViewImpl::pluginFocusOrWindowFocusChanged):
2610         (WebKit::WebViewImpl::tryPostProcessPluginComplexTextInputKeyDown):
2611         * UIProcess/mac/PageClientImpl.mm:
2612         (WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged):
2613         (WebKit::PageClientImpl::setPluginComplexTextInputState):
2614         Move a few more methods.
2615
2616 2015-10-23  Eric Carlson  <eric.carlson@apple.com>
2617
2618         [MediaStream] Fix UserMediaPermissionRequestProxy::invalidate
2619         https://bugs.webkit.org/show_bug.cgi?id=150503
2620         <rdar://problem/23235386>
2621
2622         Reviewed by Dean Jackson.
2623
2624         * UIProcess/UserMediaPermissionRequestProxy.cpp:
2625         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): m_manager is a pointer.
2626         (WebKit::UserMediaPermissionRequestProxy::allow): Return early if m_manager is null, clear it after
2627           calling the manager.
2628         (WebKit::UserMediaPermissionRequestProxy::deny): Ditto.
2629         (WebKit::UserMediaPermissionRequestProxy::invalidate): Clear m_manager.
2630         * UIProcess/UserMediaPermissionRequestProxy.h: Change m_manager from a reference to a
2631           pointer so it can be cleared.
2632
2633 2015-10-23  Claudio Saavedra  <csaavedra@igalia.com>
2634
2635         [GTK] Minor web editor fixes
2636         https://bugs.webkit.org/show_bug.cgi?id=150501
2637
2638         Reviewed by Carlos Garcia Campos.
2639
2640         * UIProcess/gtk/KeyBindingTranslator.cpp: Remove
2641         "MoveParagraphForward/Backward" as these commands do not exist in
2642         WebKit (anymore?).
2643         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
2644         (WebKit::WebEditorClient::executePendingEditorCommands):
2645         Editor::Command can take a String, no need to convert to a C char.
2646
2647 2015-10-23  Timothy Horton  <timothy_horton@apple.com>
2648
2649         Fix the build by unapplying review comments.
2650
2651         * UIProcess/Cocoa/WebViewImpl.h:
2652
2653 2015-10-23  Tim Horton  <timothy_horton@apple.com>
2654
2655         WKView being inside WKWebView leads to weird API issues
2656         https://bugs.webkit.org/show_bug.cgi?id=150174
2657
2658         Reviewed by Anders Carlsson.
2659
2660         * UIProcess/API/mac/WKView.mm:
2661         (-[WKView renewGState]):
2662         (-[WKView writeSelectionToPasteboard:types:]):
2663         (-[WKView centerSelectionInVisibleArea:]):
2664         (-[WKView scrollWheel:]):
2665         (-[WKView swipeWithEvent:]):
2666         (-[WKView mouseMoved:]):
2667         (-[WKView mouseDown:]):
2668         (-[WKView mouseUp:]):
2669         (-[WKView mouseDragged:]):
2670         (-[WKView pressureChangeWithEvent:]):
2671         (-[WKView acceptsFirstMouse:]):
2672         (-[WKView shouldDelayWindowOrderingForEvent:]):
2673         (-[WKView performKeyEquivalent:]):
2674         (-[WKView keyUp:]):
2675         (-[WKView keyDown:]):
2676         (-[WKView flagsChanged:]):
2677         (-[WKView _superQuickLookWithEvent:]):
2678         (-[WKView _addFontPanelObserver]):
2679         (-[WKView viewWillMoveToWindow:]):
2680         (-[WKView viewDidMoveToWindow]):
2681         (-[WKView viewDidChangeBackingProperties]):
2682         (-[WKView enableAccessibilityIfNecessary]):
2683         (-[WKView quickLookWithEvent:]):
2684         (-[WKView _colorSpace]):
2685         (-[WKView _didRelaunchProcess]):
2686         (-[WKView _setTextIndicator:]):
2687         (-[WKView _setTextIndicator:withLifetime:]):
2688         (-[WKView _clearTextIndicatorWithAnimation:]):
2689         (-[WKView _setTextIndicatorAnimationProgress:]):
2690         (-[WKView initWithFrame:processPool:configuration:webView:]):
2691         (-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
2692         (-[WKView _internalImmediateActionAnimationControllerForHitTestResult:withType:userData:]):
2693         (-[WKView _internalPrepareForImmediateActionAnimation]):
2694         (-[WKView _internalCancelImmediateActionAnimation]):
2695         (-[WKView _internalCompleteImmediateActionAnimation]):
2696         (-[WKView _internalDismissContentRelativeChildWindowsWithAnimation:]):
2697         (-[WKView beginDeferringViewInWindowChanges]):
2698         (-[WKView endDeferringViewInWindowChanges]):
2699         (-[WKView endDeferringViewInWindowChangesSync]):
2700         (-[WKView _prepareForMoveToWindow:withCompletionHandler:]):
2701         (-[WKView isDeferringViewInWindowChanges]):
2702         (-[WKView allowsLinkPreview]):
2703         (-[WKView setAllowsLinkPreview:]):
2704         (-[WKView _setIgnoresAllEvents:]):
2705         (-[WKView _setIgnoresNonWheelMouseEvents:]):
2706         (-[WKView _setIgnoresNonWheelEvents:]):
2707         (-[WKView _ignoresNonWheelEvents]):
2708         (-[WKView _ignoresAllEvents]):
2709         (-[WKView _setOverrideDeviceScaleFactor:]):
2710         (-[WKView _overrideDeviceScaleFactor]):
2711         (-[WKView _setTopContentInset:]):
2712         (-[WKView _topContentInset]):
2713         (-[WKView _dismissContentRelativeChildWindows]):
2714         (-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
2715         (-[WKView _setAutomaticallyAdjustsContentInsets:]):
2716         (-[WKView _automaticallyAdjustsContentInsets]):
2717         (-[WKWindowVisibilityObserver initWithView:]): Deleted.
2718         (-[WKWindowVisibilityObserver startObserving:]): Deleted.
2719         (-[WKWindowVisibilityObserver stopObserving:]): Deleted.
2720         (-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]): Deleted.
2721         (-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]): Deleted.
2722         (-[WKView dealloc]): Deleted.
2723         (-[WKView _updateWindowAndViewFrames]): Deleted.
2724         (-[WKView updateFontPanelIfNeeded]): Deleted.
2725         (-[WKView _selectionChanged]): Deleted.
2726         (-[WKView addWindowObserversForWindow:]): Deleted.
2727         (-[WKView removeWindowObservers]): Deleted.
2728         (-[WKView doWindowDidChangeScreen]): Deleted.
2729         (-[WKView _windowDidBecomeKey:]): Deleted.
2730         (-[WKView _windowDidChangeScreen:]): Deleted.
2731         (-[WKView _windowDidChangeLayerHosting:]): Deleted.
2732         (-[WKView _windowDidResignKey:]): Deleted.
2733         (-[WKView _windowDidMiniaturize:]): Deleted.
2734         (-[WKView _windowDidDeminiaturize:]): Deleted.
2735         (-[WKView _windowDidMove:]): Deleted.
2736         (-[WKView _windowDidResize:]): Deleted.
2737         (-[WKView _windowDidOrderOffScreen:]): Deleted.
2738         (-[WKView _windowDidOrderOnScreen:]): Deleted.
2739         (-[WKView _windowDidChangeBackingProperties:]): Deleted.
2740         (-[WKView _windowDidChangeOcclusionState:]): Deleted.
2741         (-[WKView _prepareForDictionaryLookup]): Deleted.
2742         (-[WKView _dictionaryLookupPopoverWillClose:]): Deleted.
2743         (-[WKView _accessibilityRegisterUIProcessTokens]): Deleted.
2744         (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): Deleted.
2745         (-[WKView _intrinsicDeviceScaleFactor]): Deleted.
2746         (-[WKView _preferencesDidChange]): Deleted.
2747         (-[WKView _targetWindowForMovePreparation]): Deleted.
2748         (-[WKView _updateContentInsetsIfAutomatic]): Deleted.
2749         (-[WKView observeValueForKeyPath:ofObject:change:context:]): Deleted.
2750         (-[WKView _dispatchSetTopContentInset]): Deleted.
2751         * UIProcess/API/mac/WKViewInternal.h:
2752         * UIProcess/Cocoa/WebViewImpl.h:
2753         (WebKit::WebViewImpl::automaticallyAdjustsContentInsets):
2754         (WebKit::WebViewImpl::topContentInset):
2755         (WebKit::WebViewImpl::overrideDeviceScaleFactor):
2756         (WebKit::WebViewImpl::isDeferringViewInWindowChanges):
2757         (WebKit::WebViewImpl::targetWindowForMovePreparation):
2758         (WebKit::WebViewImpl::lastPressureEvent):
2759         (WebKit::WebViewImpl::allowsLinkPreview):
2760         (WebKit::WebViewImpl::ignoresNonWheelEvents):
2761         (WebKit::WebViewImpl::ignoresAllEvents):
2762         (WebKit::WebViewImpl::createWeakPtr):
2763         * UIProcess/Cocoa/WebViewImpl.mm:
2764         (SOFT_LINK_CONSTANT_MAY_FAIL):
2765         (-[WKWindowVisibilityObserver initWithView:impl:]):
2766         (-[WKWindowVisibilityObserver dealloc]):
2767         (-[WKWindowVisibilityObserver startObserving:]):
2768         (-[WKWindowVisibilityObserver stopObserving:]):
2769         (-[WKWindowVisibilityObserver startObservingFontPanel]):
2770         (-[WKWindowVisibilityObserver startObservingLookupDismissal]):
2771         (-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]):
2772         (-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]):
2773         (-[WKWindowVisibilityObserver _windowDidBecomeKey:]):
2774         (-[WKWindowVisibilityObserver _windowDidResignKey:]):
2775         (-[WKWindowVisibilityObserver _windowDidMiniaturize:]):
2776         (-[WKWindowVisibilityObserver _windowDidDeminiaturize:]):
2777         (-[WKWindowVisibilityObserver _windowDidMove:]):
2778         (-[WKWindowVisibilityObserver _windowDidResize:]):
2779         (-[WKWindowVisibilityObserver _windowDidChangeBackingProperties:]):
2780         (-[WKWindowVisibilityObserver _windowDidChangeScreen:]):
2781         (-[WKWindowVisibilityObserver _windowDidChangeLayerHosting:]):
2782         (-[WKWindowVisibilityObserver _windowDidChangeOcclusionState:]):
2783         (-[WKWindowVisibilityObserver observeValueForKeyPath:ofObject:change:context:]):
2784         (-[WKWindowVisibilityObserver _dictionaryLookupPopoverWillClose:]):
2785         (-[WKEditCommandObjC initWithWebEditCommandProxy:]):
2786         (-[WKEditCommandObjC command]):
2787         (-[WKEditorUndoTargetObjC undoEditing:]):
2788         (-[WKEditorUndoTargetObjC redoEditing:]):
2789         (WebKit::WebViewImpl::WebViewImpl):
2790         (WebKit::WebViewImpl::~WebViewImpl):
2791         (WebKit::WebViewImpl::becomeFirstResponder):
2792         (WebKit::WebViewImpl::resignFirstResponder):
2793         (WebKit::WebViewImpl::renewGState):
2794         (WebKit::WebViewImpl::updateWindowAndViewFrames):
2795         (WebKit::WebViewImpl::setAutomaticallyAdjustsContentInsets):
2796         (WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
2797         (WebKit::WebViewImpl::setTopContentInset):
2798         (WebKit::WebViewImpl::dispatchSetTopContentInset):
2799         (WebKit::WebViewImpl::setOverrideDeviceScaleFactor):
2800         (WebKit::WebViewImpl::intrinsicDeviceScaleFactor):
2801         (WebKit::WebViewImpl::windowDidOrderOffScreen):
2802         (WebKit::WebViewImpl::windowDidOrderOnScreen):
2803         (WebKit::WebViewImpl::windowDidBecomeKey):
2804         (WebKit::WebViewImpl::windowDidResignKey):
2805         (WebKit::WebViewImpl::windowDidMiniaturize):
2806         (WebKit::WebViewImpl::windowDidDeminiaturize):
2807         (WebKit::WebViewImpl::windowDidMove):
2808         (WebKit::WebViewImpl::windowDidResize):
2809         (WebKit::WebViewImpl::windowDidChangeBackingProperties):
2810         (WebKit::WebViewImpl::windowDidChangeScreen):
2811         (WebKit::WebViewImpl::windowDidChangeLayerHosting):
2812         (WebKit::WebViewImpl::windowDidChangeOcclusionState):
2813         (WebKit::WebViewImpl::viewWillMoveToWindow):
2814         (WebKit::WebViewImpl::viewDidMoveToWindow):
2815         (WebKit::WebViewImpl::viewDidChangeBackingProperties):
2816         (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
2817         (WebKit::WebViewImpl::colorSpace):
2818         (WebKit::WebViewImpl::beginDeferringViewInWindowChanges):
2819         (WebKit::WebViewImpl::endDeferringViewInWindowChanges):
2820         (WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
2821         (WebKit::WebViewImpl::prepareForMoveToWindow):
2822         (WebKit::WebViewImpl::pressureChangeWithEvent):
2823         (WebKit::WebViewImpl::isEditable):
2824         (WebKit::WebViewImpl::executeEditCommand):
2825         (WebKit::WebViewImpl::registerEditCommand):
2826         (WebKit::WebViewImpl::clearAllEditCommands):
2827         (WebKit::WebViewImpl::writeSelectionToPasteboard):
2828         (WebKit::WebViewImpl::centerSelectionInVisibleArea):
2829         (WebKit::WebViewImpl::selectionDidChange):
2830         (WebKit::WebViewImpl::startObservingFontPanel):
2831         (WebKit::WebViewImpl::updateFontPanelIfNeeded):
2832         (WebKit::WebViewImpl::preferencesDidChange):
2833         (WebKit::WebViewImpl::setTextIndicator):
2834         (WebKit::WebViewImpl::clearTextIndicatorWithAnimation):
2835         (WebKit::WebViewImpl::setTextIndicatorAnimationProgress):
2836         (WebKit::WebViewImpl::dismissContentRelativeChildWindows):
2837         (WebKit::WebViewImpl::quickLookWithEvent):
2838         (WebKit::WebViewImpl::prepareForDictionaryLookup):
2839         (WebKit::WebViewImpl::setAllowsLinkPreview):
2840         (WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResult):
2841         (WebKit::WebViewImpl::prepareForImmediateActionAnimation):
2842         (WebKit::WebViewImpl::cancelImmediateActionAnimation):
2843         (WebKit::WebViewImpl::completeImmediateActionAnimation):
2844         (WebKit::WebViewImpl::setIgnoresNonWheelEvents):
2845         (WebKit::WebViewImpl::setIgnoresAllEvents):
2846         (WebKit::WebViewImpl::accessibilityRegisterUIProcessTokens):
2847         * UIProcess/mac/PageClientImpl.h:
2848         * UIProcess/mac/PageClientImpl.mm:
2849         (WebKit::PageClientImpl::activeWindow):
2850         (WebKit::PageClientImpl::preferencesDidChange):
2851         (WebKit::PageClientImpl::registerEditCommand):
2852         (WebKit::PageClientImpl::clearAllEditCommands):
2853         (WebKit::PageClientImpl::selectionDidChange):
2854         (WebKit::PageClientImpl::didPerformDictionaryLookup):
2855         (-[WKEditCommandObjC initWithWebEditCommandProxy:]): Deleted.
2856         (-[WKEditCommandObjC command]): Deleted.
2857         (-[WKEditorUndoTargetObjC undoEditing:]): Deleted.
2858         (-[WKEditorUndoTargetObjC redoEditing:]): Deleted.
2859         (WebKit::PageClientImpl::PageClientImpl): Deleted.
2860         Move more things to WebViewImpl.
2861         This also introduces an unfortunate pattern that is required for things which
2862         clients override on WKView, where we have a flow like this:
2863                 - somebody (PageClient, etc.) calls WebViewImpl::x
2864                 - WebViewImpl::x does nothing except call [WKView _x]
2865                 - [WKView _x] calls WebViewImpl::xFromViewOnly, which does the real work
2866         As long as no clients call the -FromViewOnly variant, this will mean that
2867         all callers are bottlenecked through the overridable WKView method.
2868         How this works with WKWebView, I am not sure yet.
2869
2870         * UIProcess/mac/WKImmediateActionController.h:
2871         * UIProcess/mac/WKImmediateActionController.mm:
2872         (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]):
2873         (-[WKImmediateActionController willDestroyView:]):
2874         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
2875         (-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
2876         (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
2877         (-[WKImmediateActionController menuItem:viewAtScreenPoint:]):
2878         (-[WKImmediateActionController menuItem:previewItemAtPoint:]):
2879         (-[WKImmediateActionController menuItem:itemFrameForPoint:]):
2880         (-[WKImmediateActionController menuItem:maxSizeForPoint:]):
2881         (-[WKImmediateActionController _animationControllerForDataDetectedText]):
2882         (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
2883         (-[WKImmediateActionController _animationControllerForText]):
2884         (-[WKImmediateActionController initWithPage:view:recognizer:]): Deleted.
2885         Keep a generic NSView, use the WebViewImpl for WK*View related things.
2886
2887 2015-10-22  Joonghun Park  <jh718.park@samsung.com>
2888
2889         [GTK] Fix build break since r191471
2890         https://bugs.webkit.org/show_bug.cgi?id=150487
2891
2892         Reviewed by Žan Doberšek.
2893
2894         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
2895         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2896         (WebKit::WebContextMenuProxyGtk::populate):
2897
2898 2015-10-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2899
2900         [EFL] Build break since r191472 and r191473
2901         https://bugs.webkit.org/show_bug.cgi?id=150485
2902
2903         Unreviewed build fix.
2904
2905         * CMakeLists.txt: Remove icu include path and move page include path.
2906
2907 2015-10-22  Sam Weinig  <sam@webkit.org>
2908
2909         Navigations on the same host (but with different schemes and ports) should not trigger universal links
2910         <rdar://problem/22811325>
2911         https://bugs.webkit.org/show_bug.cgi?id=150481
2912
2913         Reviewed by Dan Bernstein.
2914
2915         Update the policy for following universal links to only take host into consideration.
2916
2917         * UIProcess/API/C/WKPage.cpp:
2918         (WKPageSetPageUIClient):
2919         * UIProcess/Cocoa/UIDelegate.mm:
2920         (WebKit::UIDelegate::UIClient::createNewPage):
2921         * UIProcess/WebPageProxy.cpp:
2922         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2923         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
2924         (WebKit::WebPageProxy::createNewPage):
2925         (WebKit::WebPageProxy::showPage):
2926
2927 2015-10-22  Anders Carlsson  <andersca@apple.com>
2928
2929         Simplify menu creation
2930         https://bugs.webkit.org/show_bug.cgi?id=150476
2931
2932         Reviewed by Tim Horton.
2933
2934         Instead of creating vectors of NSMenuItem objects, just simply build the menu recursively.
2935
2936         * UIProcess/mac/WebContextMenuProxyMac.h:
2937         * UIProcess/mac/WebContextMenuProxyMac.mm:
2938         (WebKit::WebContextMenuProxyMac::createContextMenuFromItems):
2939         (WebKit::WebContextMenuProxyMac::createContextMenuItem):
2940         (WebKit::WebContextMenuProxyMac::showContextMenu):
2941         (WebKit::populateNSMenu): Deleted.
2942         (WebKit::nsMenuItem): Deleted.
2943         (WebKit::nsMenuItemVector): Deleted.
2944
2945 2015-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2946
2947         ERROR: Unhandled web process message 'StorageAreaMap:DispatchStorageEvent'
2948         https://bugs.webkit.org/show_bug.cgi?id=150315
2949
2950         Reviewed by Andreas Kling.
2951
2952         It was introduced in r184930, that keeps the session storage area
2953         maps alive in the UI process when they are destroyed by the web
2954         process. The problem is that we also keep the listeners, so that
2955         events are also dispatched to the listeners of destroyed areas,
2956         and the message handlers were removed in the web process.
2957
2958         * UIProcess/Storage/StorageManager.cpp:
2959         (WebKit::StorageManager::createTransientLocalStorageMap): Add a
2960         listener for the new storage map ID when the map is reused.
2961         (WebKit::StorageManager::destroyStorageMap): Always remove
2962         listeners of destroyed maps.
2963
2964 2015-10-22  Tim Horton  <timothy_horton@apple.com>
2965
2966         Add a SPI variant of loadData that accepts user data to WKWebView
2967         https://bugs.webkit.org/show_bug.cgi?id=150475
2968
2969         Reviewed by Anders Carlsson.
2970
2971         * UIProcess/API/Cocoa/WKWebView.mm:
2972         (-[WKWebView _loadData:MIMEType:characterEncodingName:baseURL:userData:]):
2973         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2974
2975 2015-10-22  Alex Christensen  <achristensen@webkit.org>
2976
2977         Progress towards CMake on Mac
2978         https://bugs.webkit.org/show_bug.cgi?id=150466
2979
2980         Reviewed by Chris Dumez.
2981
2982         * CMakeLists.txt:
2983         * PlatformMac.cmake:
2984         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2985
2986 2015-10-22  Anders Carlsson  <andersca@apple.com>
2987
2988         NativeContextMenuItem isn't needed anymore, remove it
2989         https://bugs.webkit.org/show_bug.cgi?id=150473
2990
2991         Reviewed by Tim Horton.
2992
2993         * PlatformEfl.cmake:
2994         * PlatformGTK.cmake:
2995         * Shared/NativeContextMenuItem.h: Removed.
2996         (WebKit::NativeContextMenuItem::~NativeContextMenuItem): Deleted.
2997         (WebKit::NativeContextMenuItem::nsMenuItem): Deleted.
2998         * Shared/WebContextMenuItem.cpp:
2999         (WebKit::WebContextMenuItem::WebContextMenuItem): Deleted.
3000         * Shared/WebContextMenuItem.h:
3001         (WebKit::WebContextMenuItem::create): Deleted.
3002         (WebKit::WebContextMenuItem::nativeContextMenuItem): Deleted.
3003         * Shared/efl/NativeContextMenuItemEfl.cpp: Removed.
3004         (WebKit::NativeContextMenuItem::NativeContextMenuItem): Deleted.
3005         * Shared/gtk/NativeContextMenuItemGtk.cpp: Removed.
3006         (WebKit::NativeContextMenuItem::NativeContextMenuItem): Deleted.
3007         * Shared/mac/NativeContextMenuItem.mm: Removed.
3008         (WebKit::NativeContextMenuItem::NativeContextMenuItem): Deleted.
3009         * UIProcess/mac/WebContextMenuProxyMac.mm:
3010         (WebKit::nsMenuItem): Deleted.
3011         * WebKit2.xcodeproj/project.pbxproj:
3012
3013 2015-10-22  Anders Carlsson  <andersca@apple.com>
3014
3015         CTTE WebContextMenuItemData
3016         https://bugs.webkit.org/show_bug.cgi?id=150471
3017
3018         Reviewed by Tim Horton.
3019
3020         * Shared/API/c/WKContextMenuItem.cpp:
3021         (WKContextMenuItemGetTag):
3022         (WKContextMenuItemGetType):
3023         (WKContextMenuItemCopyTitle):
3024         (WKContextMenuItemGetEnabled):
3025         (WKContextMenuItemGetChecked):
3026         * Shared/WebContextMenuItem.cpp:
3027         (WebKit::WebContextMenuItem::create):
3028         * Shared/WebContextMenuItem.h:
3029         (WebKit::WebContextMenuItem::data):
3030         * UIProcess/API/C/WKPage.cpp:
3031         (WKPageSelectContextMenuItem):
3032         * UIProcess/mac/WebContextMenuProxyMac.mm:
3033         (WebKit::nsMenuItem):
3034         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3035         (WKBundlePageClickMenuItem):
3036         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
3037         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
3038
3039 2015-10-22  Anders Carlsson  <andersca@apple.com>
3040
3041         Handle nil menu items.
3042
3043         * UIProcess/mac/WebContextMenuProxyMac.mm:
3044         (WebKit::nsMenuItemVector):
3045
3046 2015-10-22  Anders Carlsson  <andersca@apple.com>
3047
3048         Wait to convert the share menu item to a real share menu until after calling out to the client
3049         https://bugs.webkit.org/show_bug.cgi?id=150465
3050
3051         Reviewed by Tim Horton.
3052
3053         This will let us simplify more code in upcoming patches.
3054
3055         * UIProcess/mac/WebContextMenuProxyMac.h:
3056         * UIProcess/mac/WebContextMenuProxyMac.mm:
3057         (WebKit::nsMenuItem):
3058         (WebKit::nsMenuItemVector):
3059         (WebKit::WebContextMenuProxyMac::showContextMenu):
3060
3061 2015-10-22  Myles C. Maxfield  <mmaxfield@apple.com>
3062
3063         [Cocoa] Migrate WKSetPatternPhaseInUserSpace() and WKGetUserToBaseCTM() from WKSI
3064         https://bugs.webkit.org/show_bug.cgi?id=150460
3065
3066         Reviewed by Tim Horton.
3067
3068         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3069         (InitWebCoreSystemInterface): Deleted.
3070
3071 2015-10-22  Alex Christensen  <achristensen@webkit.org>
3072
3073         Initial NSURLSession WebResourceLoader implementation
3074         https://bugs.webkit.org/show_bug.cgi?id=150355
3075
3076         Reviewed by Antti Koivisto.
3077
3078         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3079         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
3080         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
3081         * NetworkProcess/NetworkResourceLoader.cpp:
3082         (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
3083         (WebKit::NetworkResourceLoader::startNetworkLoad):
3084         (WebKit::NetworkResourceLoader::setDefersLoading):
3085         (WebKit::NetworkResourceLoader::cleanup):
3086         (WebKit::NetworkResourceLoader::didConvertHandleToDownload):
3087         (WebKit::NetworkResourceLoader::abort):
3088         (WebKit::NetworkResourceLoader::willPerformHTTPRedirection):
3089         (WebKit::NetworkResourceLoader::didReceiveChallenge):
3090         (WebKit::NetworkResourceLoader::didReceiveResponse):
3091         (WebKit::NetworkResourceLoader::didReceiveData):
3092         (WebKit::NetworkResourceLoader::didCompleteWithError):
3093         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
3094         (WebKit::NetworkResourceLoader::willSendRequestAsync):
3095         (WebKit::NetworkResourceLoader::continueWillSendRequest):
3096         (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
3097         (WebKit::NetworkResourceLoader::didSendData):
3098         (WebKit::NetworkResourceLoader::receivedCancellation):
3099         (WebKit::NetworkResourceLoader::startBufferingTimerIfNeeded):
3100         (WebKit::NetworkResourceLoader::bufferingTimerFired):
3101         (WebKit::NetworkResourceLoader::validateCacheEntry):
3102         (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
3103         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
3104         (WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
3105         (WebKit::NetworkResourceLoader::supportsDataArray):
3106         * NetworkProcess/NetworkResourceLoader.h:
3107         (WebKit::NetworkResourceLoader::create):
3108         (WebKit::NetworkResourceLoader::currentRequest):
3109         (WebKit::NetworkResourceLoader::handle):
3110         * NetworkProcess/NetworkSession.h: Added.
3111         (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
3112         (WebKit::NetworkingDataTask::client):
3113         (WebKit::NetworkingDataTask::clearClient):
3114         (WebKit::NetworkSession::~NetworkSession):
3115         * NetworkProcess/cocoa/NetworkSessionCocoa.mm: Added.
3116         (toNSURLSessionResponseDisposition):
3117         (toNSURLSessionAuthChallengeDisposition):
3118         (-[NetworkSessionDelegate initWithNetworkSession:]):
3119         (-[NetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
3120         (-[NetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
3121         (-[NetworkSessionDelegate URLSession:task:didCompleteWithError:]):
3122         (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
3123         (-[NetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
3124         (WebKit::NetworkSession::create):
3125         (WebKit::NetworkSession::singleton):
3126         (WebKit::configurationForType):
3127         (WebKit::NetworkSession::NetworkSession):
3128         (WebKit::NetworkSession::createDataTaskWithRequest):
3129         (WebKit::NetworkSession::dataTaskForIdentifier):
3130         (WebKit::NetworkingDataTask::NetworkingDataTask):
3131         (WebKit::NetworkingDataTask::~NetworkingDataTask):
3132         (WebKit::NetworkingDataTask::suspend):
3133         (WebKit::NetworkingDataTask::resume):
3134         (WebKit::NetworkingDataTask::taskIdentifier):
3135         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
3136         (WebKit::NetworkResourceLoader::willCacheResponseAsync):
3137         * WebKit2.xcodeproj/project.pbxproj:
3138         * config.h:
3139
3140 2015-10-22  Philippe Normand  <pnormand@igalia.com>
3141
3142         Unreviewed, GTK build fix for disabled redirected XComposite window support.
3143
3144         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Add USE(REDIRECTED_XCOMPOSITE_WINDOW) guards.
3145         * UIProcess/DrawingAreaProxyImpl.h: Mark virtual methods as override to avoid compilation warnings.
3146
3147 2015-10-22  Wenson Hsieh  <wenson_hsieh@apple.com>
3148
3149         Implement touch-action: manipulation; for iOS
3150         https://bugs.webkit.org/show_bug.cgi?id=149854
3151         <rdar://problem/23017145>
3152
3153         Reviewed by Benjamin Poulain.
3154
3155         Implements the manipulation value for the CSS property touch-action. Performs hit-testing upon receiving a potential
3156         tap to determine whether to disable double-tap gesture recognition over the duration of the tap. If so, sends a message
3157         from the web process to the UI process indicating that double-tapping should be disabled, allowing single taps to
3158         avoid the delay.
3159
3160         * WebProcess/WebPage/ios/WebPageIOS.mm:
3161         (WebKit::WebPage::potentialTapAtPosition):
3162
3163 2015-10-22  Ryosuke Niwa  <rniwa@webkit.org>
3164
3165         REGRESSION (r181972): Scroll position changes to top of youtube page when switching tabs
3166         https://bugs.webkit.org/show_bug.cgi?id=150428
3167
3168         Reviewed by Antti Koivisto.
3169
3170         Call updateFocusAppearance with RevealMode::DoNotReveal to avoid revealing the focused element.
3171
3172         * WebProcess/WebPage/WebPage.cpp:
3173         (WebKit::WebPage::restoreSelectionInFocusedEditableElement):
3174
3175 2015-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
3176
3177         Unreviewed. Fix a crash in GTk+ after r191402.
3178
3179         Since r191402 WebContextMenuProxy is no longer refcounted, and
3180         std::unique_ptr is used instead. This means that when we show the
3181         context menu for the second time in a web view, a new
3182         WebContextMenuProxy is created and the previous one is
3183         destroyed. We were setting the active context menu of the WebView
3184         in the constructor of WebContextMenuProxy, and unsetting it in the
3185         destructor. Now the constructor of the new WebContextMenuProxy
3186         happens before the destructor of the current one that unsets the
3187         WebView active context menu. This patch simply makes the web view
3188         unset its active context menu when it's unmapped and a new one
3189         hasn't been set.
3190
3191         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3192         (activeContextMenuUnmapped):
3193         (webkitWebViewBaseSetActiveContextMenuProxy):
3194         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
3195         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
3196
3197 2015-10-22  Hunseop Jeong  <hs85.jeong@samsung.com>
3198
3199         [GTK] Try to fix the build after r191402.
3200         https://bugs.webkit.org/show_bug.cgi?id=150435
3201
3202         Reviewed by Carlos Garcia Campos.
3203
3204         * UIProcess/API/gtk/PageClientImpl.cpp:
3205         (WebKit::PageClientImpl::createPopupMenuProxy):
3206         (WebKit::PageClientImpl::createContextMenuProxy):
3207         (WebKit::PageClientImpl::createColorPicker):
3208         * UIProcess/API/gtk/PageClientImpl.h:
3209         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
3210         (WebKit::WebContextMenuProxyGtk::populate):
3211         (WebKit::WebContextMenuProxyGtk::show):
3212         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
3213         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
3214         (WebKit::WebContextMenuProxyGtk::menuPositionFunction):
3215         (WebKit::WebContextMenuProxyGtk::showContextMenu): Deleted.
3216         (WebKit::WebContextMenuProxyGtk::hideContextMenu): Deleted.
3217         (WebKit::WebContextMenuProxyGtk::cancelTracking): Deleted.
3218         * UIProcess/gtk/WebContextMenuProxyGtk.h:
3219         (WebKit::WebContextMenuProxyGtk::gtkMenu):
3220         (WebKit::WebContextMenuProxyGtk::create): Deleted.
3221
3222 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3223
3224        Unreviewed EFL build fix. Remove customizeMenu implementation.
3225
3226         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3227         (WebKit::WebContextMenuClient::customizeMenu): Deleted.
3228
3229 2015-10-21  Alex Christensen  <achristensen@webkit.org>
3230
3231         Speculative EFL build fix.
3232
3233         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
3234         Remove another customizeMenu call.
3235
3236 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3237
3238         [EFL][GTK][WK2] Fix build break since r191402, r191401
3239         https://bugs.webkit.org/show_bug.cgi?id=150432
3240
3241         Unreviewed EFL and GTK build fix.
3242
3243         * CMakeLists.txt:
3244         * UIProcess/CoordinatedGraphics/WebView.cpp:
3245         (WebKit::WebView::createContextMenuProxy):
3246         * UIProcess/CoordinatedGraphics/WebView.h:
3247         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
3248         (WebKit::WebContextMenuProxyEfl::show):
3249         * UIProcess/efl/WebContextMenuProxyEfl.h:
3250         (WebKit::WebContextMenuProxyEfl::create): Deleted.
3251         * UIProcess/efl/WebViewEfl.cpp:
3252         (WebKit::WebViewEfl::createContextMenuProxy):
3253         * UIProcess/efl/WebViewEfl.h:
3254         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3255         (WebKit::WebContextMenuClient::customizeMenu):
3256         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
3257
3258 2015-10-21  Anders Carlsson  <andersca@apple.com>
3259
3260         Get rid of WebContextMenuClient::customizeMenu, it's no longer used
3261         https://bugs.webkit.org/show_bug.cgi?id=150427
3262
3263         Reviewed by Tim Horton.
3264
3265         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3266         (WebKit::WebContextMenuClient::customizeMenu): Deleted.
3267         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
3268
3269 2015-10-21  Tim Horton  <timothy_horton@apple.com>
3270
3271         API-ify the FindMatches client
3272         https://bugs.webkit.org/show_bug.cgi?id=150422
3273
3274         Reviewed by Anders Carlsson.
3275
3276         * UIProcess/API/APIFindMatchesClient.h: Renamed from Source/WebKit2/UIProcess/WebFindClient.h.
3277         (API::FindMatchesClient::~FindMatchesClient):
3278         (API::FindMatchesClient::didFindStringMatches):
3279         (API::FindMatchesClient::didGetImageForMatchResult):
3280         * UIProcess/API/C/WKPage.cpp:
3281         (WKPageSetPageFindMatchesClient):
3282         * UIProcess/WebFindClient.cpp: Removed.
3283         * UIProcess/WebPageProxy.cpp:
3284         (WebKit::WebPageProxy::WebPageProxy):
3285         (WebKit::WebPageProxy::setFindMatchesClient):
3286         (WebKit::WebPageProxy::close):
3287         (WebKit::WebPageProxy::didGetImageForFindMatch):
3288         (WebKit::WebPageProxy::didFindStringMatches):
3289         (WebKit::WebPageProxy::initializeFindMatchesClient): Deleted.
3290         * UIProcess/WebPageProxy.h:
3291         (WebKit::WebPageProxy::findMatchesClient):
3292         * WebKit2.xcodeproj/project.pbxproj:
3293
3294 2015-10-21  Enrica Casucci  <enrica@apple.com>
3295
3296         WebProcess crashes when accessibility bundle is not found.
3297         https://bugs.webkit.org/show_bug.cgi?id=150414
3298
3299         Reviewed by Dan Bernstein.
3300
3301         The uninitialized pointer to NSError causes the print function to crash.
3302
3303         * WebProcess/cocoa/WebProcessCocoa.mm:
3304         (WebKit::registerWithAccessibility):
3305
3306 2015-10-21  Anders Carlsson  <andersca@apple.com>
3307
3308         Move services menu handling out into a separate function
3309         https://bugs.webkit.org/show_bug.cgi?id=150420
3310
3311         Reviewed by Tim Horton.
3312
3313         * UIProcess/mac/WebContextMenuProxyMac.h:
3314         * UIProcess/mac/WebContextMenuProxyMac.mm:
3315         (WebKit::WebContextMenuProxyMac::showServicesMenu):
3316         (WebKit::WebContextMenuProxyMac::show):
3317         (WebKit::WebContextMenuProxyMac::showContextMenu):
3318         (WebKit::WebContextMenuProxyMac::populate): Deleted.
3319
3320 2015-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>
3321
3322         Single tapping clickable elements in unscalable pages should show a tap highlight
3323         https://bugs.webkit.org/show_bug.cgi?id=150382
3324
3325         Reviewed by Simon Fraser.
3326
3327         When the double tap gesture recognizer is disabled ahead of time (as in the case of unscalable pages) the tap is
3328         committed before the geometries come in. To fix this, we introduce a flag that allows the single tap to be
3329         committed before the tap highlight arrives. This allows the tap highlight to be immediately animated when receiving
3330         the tap highlight geometries only in the case where double tapping is disabled when recognizing the single tap.
3331
3332         * UIProcess/ios/WKContentViewInteraction.h:
3333         * UIProcess/ios/WKContentViewInteraction.mm:
3334         (-[WKContentView setupInteraction]):
3335         (-[WKContentView cleanupInteraction]):
3336         (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
3337         (-[WKContentView _singleTapRecognized:]):
3338         (-[WKContentView _singleTapCommited:]):
3339
3340 2015-10-21  Anders Carlsson  <andersca@apple.com>
3341
3342         Get rid of useBinaryEncoding from WKPageGetContentsAsMHTMLData
3343         https://bugs.webkit.org/show_bug.cgi?id=150417
3344
3345         Reviewed by Tim Horton.
3346
3347         The useBinaryEncoding parameter is always false, so just get rid of it.
3348
3349         * UIProcess/API/C/WKPage.cpp:
3350         (WKPageGetContentsAsMHTMLData):
3351         * UIProcess/API/C/WKPage.h:
3352         * UIProcess/API/efl/ewk_view.cpp:
3353         (ewk_view_page_contents_get):
3354         * UIProcess/API/gtk/WebKitWebView.cpp:
3355         (webkit_web_view_save):
3356         (webkit_web_view_save_to_file):
3357         * UIProcess/WebPageProxy.cpp:
3358         (WebKit::WebPageProxy::getContentsAsMHTMLData):
3359         * UIProcess/WebPageProxy.h:
3360         * WebProcess/WebPage/WebPage.cpp:
3361         (WebKit::WebPage::getContentsAsMHTMLData):
3362         * WebProcess/WebPage/WebPage.h:
3363         * WebProcess/WebPage/WebPage.messages.in:
3364
3365 2015-10-21  Anders Carlsson  <andersca@apple.com>
3366
3367         WebContextMenuProxyMac::setupServicesMenu doesn't need to take a context parameter
3368         https://bugs.webkit.org/show_bug.cgi?id=150418
3369
3370         Reviewed by Tim Horton.
3371
3372         * UIProcess/mac/WebContextMenuProxyMac.h:
3373         * UIProcess/mac/WebContextMenuProxyMac.mm:
3374         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
3375         (WebKit::WebContextMenuProxyMac::populate):
3376
3377 2015-10-21  Anders Carlsson  <andersca@apple.com>
3378
3379         WebContextMenuProxy doesn't have to be ref-counted
3380         https://bugs.webkit.org/show_bug.cgi?id=150415
3381
3382         Reviewed by Tim Horton.
3383
3384         Change WebContextMenuProxy to not inherit from RefCounted. Instead of using RefPtr, use std::unique_ptr.
3385         Get rid of cancelTracking and hideContextMenu and dismiss the menu whenever the menu proxy is destroyed.
3386         Also, rename showContextMenu to show.
3387
3388         * UIProcess/PageClient.h:
3389         * UIProcess/WebContextMenuProxy.h:
3390         (WebKit::WebContextMenuProxy::cancelTracking): Deleted.
3391         * UIProcess/WebPageProxy.cpp:
3392         (WebKit::WebPageProxy::close):
3393         (WebKit::WebPageProxy::internalShowContextMenu):
3394         * UIProcess/WebPageProxy.h:
3395         * UIProcess/ios/PageClientImplIOS.h:
3396         * UIProcess/ios/PageClientImplIOS.mm:
3397         (WebKit::PageClientImpl::createContextMenuProxy):
3398         * UIProcess/mac/PageClientImpl.h:
3399         * UIProcess/mac/PageClientImpl.mm:
3400         (WebKit::PageClientImpl::createContextMenuProxy):
3401         * UIProcess/mac/WebContextMenuProxyMac.h:
3402         (WebKit::WebContextMenuProxyMac::create): Deleted.
3403         * UIProcess/mac/WebContextMenuProxyMac.mm:
3404         (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
3405         (WebKit::WebContextMenuProxyMac::show):
3406         (WebKit::WebContextMenuProxyMac::showContextMenu): Deleted.
3407         (WebKit::WebContextMenuProxyMac::hideContextMenu): Deleted.
3408         (WebKit::WebContextMenuProxyMac::cancelTracking): Deleted.
3409
3410 2015-10-21  Anders Carlsson  <andersca@apple.com>
3411
3412         Stop using a popup menu button cell(!) for context menus
3413         https://bugs.webkit.org/show_bug.cgi?id=150413
3414
3415         Reviewed by Tim Horton.
3416
3417         Just use a regular NSMenu. Also, have the service menu code path store the service menu
3418         in the same member variable.
3419
3420         * UIProcess/mac/WebContextMenuProxyMac.h:
3421         * UIProcess/mac/WebContextMenuProxyMac.mm:
3422         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
3423         (WebKit::WebContextMenuProxyMac::clearServicesMenu):
3424         (WebKit::WebContextMenuProxyMac::populate):
3425         (WebKit::WebContextMenuProxyMac::showContextMenu):
3426         (WebKit::WebContextMenuProxyMac::hideContextMenu):
3427         (WebKit::WebContextMenuProxyMac::cancelTracking):
3428         (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac): Deleted.
3429
3430 2015-10-21  Chris Dumez  <cdumez@apple.com>
3431
3432         Add assertions to NetworkCache::Entry constructor to make sure a key's type is "resource"
3433         https://bugs.webkit.org/show_bug.cgi?id=150369
3434
3435         Reviewed by Antti Koivisto.
3436
3437         Add assertions to NetworkCache::Entry constructor to make sure a key's
3438         type is "resource" now that the NetworkCache storage supports other
3439         types of entries.
3440
3441         * NetworkProcess/cache/NetworkCacheEntry.cpp:
3442         (WebKit::NetworkCache::Entry::Entry):
3443
3444 2015-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3445
3446         NetworkProcess: DNS prefetch happens in the Web Process
3447         https://bugs.webkit.org/show_bug.cgi?id=147824
3448
3449         Reviewed by Chris Dumez.
3450
3451         DNS prefetch requests started in the WebProcess should be sent to
3452         the network process when it's enabled.
3453
3454         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3455         (WebKit::NetworkConnectionToWebProcess::prefetchDNS): Use NetworkProcess::prefetchDNS().
3456         * NetworkProcess/NetworkConnectionToWebProcess.h:
3457         * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Add
3458         PrefetchDNS message.
3459         * NetworkProcess/NetworkProcess.cpp:
3460         (WebKit::NetworkProcess::prefetchDNS): Do the actual DNS prefetch.
3461         * NetworkProcess/NetworkProcess.h:
3462         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
3463         (webkitWebExtensionDidReceiveMessage): Use WebProcess::prefetchDNS().
3464         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3465         (WebKit::WebFrameLoaderClient::prefetchDNS): Use WebProcess::prefetchDNS().
3466         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3467         * WebProcess/WebPage/ios/WebPageIOS.mm:
3468         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Use
3469         FrameLoaderClient to do the DNS prefetch.
3470         * WebProcess/WebProcess.cpp:
3471         (WebKit::WebProcess::WebProcess): Initialize the DNS prefetched
3472         hosts cleanup hysteresis activity. Clear the cache of DNS
3473         prefetched when hysteresis activity stopped.
3474         (WebKit::WebProcess::prefetchDNS): Send the request to the network
3475         process if it's enabled, otherwise do the actual DNS prefetch.
3476         * WebProcess/WebProcess.h:
3477
3478 2015-10-20  Chris Dumez  <cdumez@apple.com>
3479
3480         [WK2] Generalize NetworkCacheStorage API so it can store different types of metadata
3481         https://bugs.webkit.org/show_bug.cgi?id=150221
3482         <rdar://problem/23149771>
3483
3484         Reviewed by Darin Adler and Antti Koivisto.
3485
3486         Generalize NetworkCacheStorage API so it can store different types of
3487         metadata alongside the network resources. This is a pre-requirement to
3488         making our NetworkCache smarter by storing information about the
3489         resources.
3490
3491         To keep the code simple, the entry type is now part of the entry key and
3492         we store records of a specific type in a 'type' subfolder. The cache
3493         structure looks like so:
3494         - WebKitCache/Version 5/[Partition]/[Type]/[Hash]
3495         - WebKitCache/Version 5/[Partition]/[Type]/[Hash]-blob (Optional)
3496
3497         Existing cache entries now that the 'resource' type as these are network
3498         resources.
3499
3500         * NetworkProcess/cache/NetworkCache.cpp:
3501         * NetworkProcess/cache/NetworkCacheKey.cpp:
3502         * NetworkProcess/cache/NetworkCacheKey.h:
3503         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
3504         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3505         * NetworkProcess/cache/NetworkCacheStorage.h:
3506
3507 2015-10-20  Hunseop Jeong  <hs85.jeong@samsung.com>
3508
3509         [EFL] ContextMenu doesn't work correctly on MiniBrowser after r191194.
3510         https://bugs.webkit.org/show_bug.cgi?id=150311
3511
3512         Reviewed by Gyuyoung Kim.
3513
3514         Restore the test_ewk2_context_menu API test to check the context menu whether it works correctly.
3515
3516         * PlatformEfl.cmake:
3517
3518 2015-10-13  Conrad Shultz  <conrad_shultz@apple.com>
3519
3520         _WKThumbnailView should support a snapshot-only mode
3521         https://bugs.webkit.org/show_bug.cgi?id=150106
3522
3523         Reviewed by Tim Horton.
3524
3525         Add a new property to _WKThumbnailView, exclusivelyUsesSnapshot, which causes _WKThumbnailView
3526         to bypass both layer tree reparenting and event suppression on the associated WKView.
3527
3528         Add a new method, -requestSnapshot, which clients can use to force _WKThumbnailView to refresh
3529         on demand.
3530
3531         * UIProcess/API/Cocoa/_WKThumbnailView.h:
3532         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
3533         (-[_WKThumbnailView requestSnapshot]):
3534         Extracted from -_requestSnapshotIfNeeded:.
3535         (-[_WKThumbnailView _viewWasUnparented]):
3536         (-[_WKThumbnailView _viewWasParented]):
3537         (-[_WKThumbnailView _requestSnapshotIfNeeded]):
3538
3539 2015-10-20  Alexey Proskuryakov  <ap@apple.com>
3540
3541         Build fix.
3542
3543         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
3544         * UIProcess/ios/forms/WKFileUploadPanel.mm:
3545
3546 2015-10-20  Joseph Pecoraro  <pecoraro@apple.com>
3547
3548         ASSERT when right clicking on SVG Image generating Share menu - can break Web Inspector
3549         https://bugs.webkit.org/show_bug.cgi?id=150374
3550
3551         Reviewed by Brian Burg.
3552
3553         When there is no absolute URL or downloadable media URL no system share
3554         menu is created, but we were still appending the null context menu to
3555         the list of context menu items.
3556
3557         * UIProcess/mac/WebContextMenuProxyMac.mm:
3558         (WebKit::WebContextMenuProxyMac::shareMenuItem):
3559         Bail early if the context menu is null.
3560
3561         (WebKit::WebContextMenuProxyMac::showContextMenu):
3562         Only append the share context menu item if it is non-null.
3563         This matches ContextMenuController.cpp in WebCore.
3564
3565 2015-10-20  Commit Queue  <commit-queue@webkit.org>
3566
3567         Unreviewed, rolling out r191306.
3568         https://bugs.webkit.org/show_bug.cgi?id=150371
3569
3570         "May have caused a significant warm PLT regression" (Requested
3571         by cdumez_ on #webkit).
3572
3573         Reverted changeset:
3574
3575         "[WK2] Generalize NetworkCacheStorage API so it can store
3576         different types of metadata"
3577         https://bugs.webkit.org/show_bug.cgi?id=150221
3578         http://trac.webkit.org/changeset/191306
3579
3580 2015-10-20  Tim Horton  <timothy_horton@apple.com>
3581
3582         Try to fix the build by disabling MAC_GESTURE_EVENTS on 10.9 and 10.10
3583
3584         * Configurations/FeatureDefines.xcconfig:
3585
3586 2015-10-20  Commit Queue  <commit-queue@webkit.org>
3587
3588         Unreviewed, rolling out r191333.
3589         https://bugs.webkit.org/show_bug.cgi?id=150362
3590
3591         Caused assertions on regression tests (Requested by ap on
3592         #webkit).
3593
3594         Reverted changeset:
3595
3596         "ERROR: Unhandled web process message
3597         'StorageAreaMap:DispatchStorageEvent'"
3598         https://bugs.webkit.org/show_bug.cgi?id=150315
3599         http://trac.webkit.org/changeset/191333
3600
3601 2015-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3602
3603         [UNIX] ASSERTION FAILED: m_shouldWaitForSyncReplies in Connection::connectionDidClose()
3604         https://bugs.webkit.org/show_bug.cgi?id=150361
3605
3606         Reviewed by Martin Robinson.
3607
3608         It doesn't always happen because it depends on how sockets are
3609         closed, and the state of the threads. The problem is that we are
3610         not handling the case when the read fails because we closed the
3611         connection. In that case we log the error and call
3612         Connection::connectionDidClose(). But it was connectionDidClose()
3613         the one closing the socket. So, in this particular case it's not an
3614         error but a normal termination, and we shouldn't try to close the
3615         connection again. Something similar can happen while sending a
3616         message, and we get a broken pipe error, but in that case we are
3617         only printing the error, so it's harmless.
3618
3619         * Platform/IPC/unix/ConnectionUnix.cpp:
3620         (IPC::Connection::readyReadHandler): Only print error and call
3621         connectionDidClose() if we are still connected when read fails.
3622         (IPC::Connection::sendOutgoingMessage): Only print error if we are
3623         still connected when send fails.
3624
3625 2015-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3626
3627         [GTK] Graphics corruption when entering/leaving AC mode quickly
3628         https://bugs.webkit.org/show_bug.cgi?id=150323
3629
3630         Reviewed by Mario Sanchez Prada.
3631
3632         The UI process is notified when entering accelerated compositing
3633         mode after the layers have been flushed and rendered to avoid
3634         flickering. However, this is producing flickering in the GTK+
3635         port, because we use an offscreen redirected window that is
3636         resized to a minimium size to save memory when not in AC mode. The
3637         web process always uses the current size of the redirected window,
3638         so when entering AC mode, contents are rendered into the 1x1
3639         window, then the UI process is notified, the redirected window is
3640         resized to its actual size, and we force a resize to ask the web
3641         process to render again, now at the correct size. Rendering at 1x1
3642         and then resizing the window is what produces the flickering when
3643         entering AC mode, but it's also inefficient, since we need to
3644         render again after the redirected window is resized. So, this
3645         patch adds a WillEnterAcceleratedCompositing message that is sent
3646         to the UI process when the layer tree host is created but before
3647         the contents have been composited and rendered. This is
3648         implemented by the GTK+ port to prepare for entering AC mode, by
3649         resizing the redirected window. When we actually enter AC mode,
3650         the contents have already been rendered in the web process at the
3651         correct size, so we can just use the redirected window surface
3652         instead of the drawing area one, and paint in the web view without
3653         any flickering. We no longer need the forceResize either.
3654         When leaving accelerated compositing mode, we now clear the redirected
3655         window resources after a short delay. This ensures that we have
3656         already rendered the update sent in the ExitAcceleratedCompositingMode
3657         message, but also that entering/leaving AC mode quickly doesn't
3658         produce any redirected window resize.
3659
3660         * UIProcess/API/gtk/PageClientImpl.cpp:
3661         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
3662         * UIProcess/API/gtk/PageClientImpl.h:
3663         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3664         (webkitWebViewBaseClearRedirectedWindowSoon):
3665         (webkitWebViewBaseWillEnterAcceleratedCompositingMode):
3666         (webkitWebViewBaseEnterAcceleratedCompositingMode):
3667         (webkitWebViewBaseExitAcceleratedCompositingMode):
3668         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
3669         * UIProcess/CoordinatedGraphics/WebView.h:
3670         * UIProcess/DrawingAreaProxy.h:
3671         (WebKit::DrawingAreaProxy::willEnterAcceleratedCompositingMode):
3672         * UIProcess/DrawingAreaProxy.messages.in:
3673         * UIProcess/DrawingAreaProxyImpl.cpp:
3674         (WebKit::DrawingAreaProxyImpl::willEnterAcceleratedCompositingMode):
3675         * UIProcess/DrawingAreaProxyImpl.h:
3676         (WebKit::DrawingAreaProxyImpl::forceResize): Deleted.
3677         * UIProcess/PageClient.h:
3678         * UIProcess/WebPageProxy.cpp:
3679         (WebKit::WebPageProxy::willEnterAcceleratedCompositingMode):
3680         * UIProcess/WebPageProxy.h:
3681         * UIProcess/ios/PageClientImplIOS.h:
3682         * UIProcess/ios/PageClientImplIOS.mm:
3683         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
3684         * UIProcess/mac/PageClientImpl.h:
3685         * UIProcess/mac/PageClientImpl.mm:
3686         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
3687         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3688         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
3689
3690 2015-10-20  Sergio Villar Senin  <svillar@igalia.com>
3691
3692         [GTK] Fix build for ENABLE_PLUGIN_PROCESS_GTK2=OFF
3693         https://bugs.webkit.org/show_bug.cgi?id=150086
3694
3695         Reviewed by Darin Adler.
3696
3697         * UIProcess/cairo/BackingStoreCairo.cpp:
3698         (WebKit::BackingStore::createBackend):
3699
3700 2015-10-20  Yoav Weiss  <yoav@yoav.ws>
3701
3702         Rename the PICTURE_SIZES flag to CURRENTSRC
3703         https://bugs.webkit.org/show_bug.cgi?id=150275
3704
3705         Reviewed by Dean Jackson.
3706
3707         * Configurations/FeatureDefines.xcconfig:
3708
3709 2015-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3710
3711         ERROR: Unhandled web process message 'StorageAreaMap:DispatchStorageEvent'
3712         https://bugs.webkit.org/show_bug.cgi?id=150315
3713
3714         Reviewed by Andreas Kling.
3715
3716         It was introduced in r184930, that keeps the session storage area
3717         maps alive in the UI process when they are destroyed by the web
3718         process. The problem is that we also keep the listeners, so that
3719         events are also dispatched to the listeners of destroyed areas,
3720         and the message handlers were removed in the web process.
3721
3722         * UIProcess/Storage/StorageManager.cpp:
3723         (WebKit::StorageManager::createTransientLocalStorageMap): Add a
3724         listener for the new storage map ID when the map is reused.
3725         (WebKit::StorageManager::destroyStorageMap): Always remove
3726         listeners of destroyed maps.
3727
3728 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3729
3730         Remove unused support for long presses from WebKit
3731         https://bugs.webkit.org/show_bug.cgi?id=150345
3732
3733         Reviewed by Beth Dakin.
3734
3735         * Shared/WebPreferencesDefinitions.h:
3736         * UIProcess/API/APIUIClient.h:
3737         (API::UIClient::didBeginTrackingPotentialLongMousePress): Deleted.
3738         (API::UIClient::didRecognizeLongMousePress): Deleted.
3739         (API::UIClient::didCancelTrackingPotentialLongMousePress): Deleted.
3740         * UIProcess/API/C/WKPage.cpp:
3741         (WKPageSetPageUIClient): Deleted.
3742         * UIProcess/API/C/WKPageUIClient.h:
3743         * UIProcess/API/C/WKPreferences.cpp:
3744         (WKPreferencesGetLongMousePressEnabled):
3745         (WKPreferencesSetLongMousePressEnabled): Deleted.
3746         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3747         * UIProcess/WebPageProxy.cpp:
3748         (WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress): Deleted.
3749         (WebKit::WebPageProxy::didRecognizeLongMousePress): Deleted.
3750         (WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress): Deleted.
3751         * UIProcess/WebPageProxy.h:
3752         * UIProcess/WebPageProxy.messages.in:
3753         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
3754         (API::InjectedBundle::PageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
3755         (API::InjectedBundle::PageUIClient::didRecognizeLongMousePress): Deleted.
3756         (API::InjectedBundle::PageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
3757         * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
3758         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
3759         (WebKit::InjectedBundlePageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
3760         (WebKit::InjectedBundlePageUIClient::didRecognizeLongMousePress): Deleted.
3761         (WebKit::InjectedBundlePageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
3762         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
3763         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3764         (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress): Deleted.
3765         (WebKit::WebChromeClient::didRecognizeLongMousePress): Deleted.
3766         (WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress): Deleted.
3767         * WebProcess/WebCoreSupport/WebChromeClient.h:
3768         * WebProcess/WebPage/WebPage.cpp:
3769         (WebKit::WebPage::updatePreferences): Deleted.
3770
3771 2015-10-19  Chris Dumez  <cdumez@apple.com>
3772
3773         Make sure development Safari does not delete the stable Safari cache storage.
3774         https://bugs.webkit.org/show_bug.cgi?id=150343
3775
3776         Reviewed by Antti Koivisto.
3777
3778         Make sure development Safari does not delete the stable Safari disk cache
3779         storage. Development Safari now uses Version 5, while the last stable
3780         Safari uses Version 4. Since the 2 versions can co-exist, it is best not
3781         to drop the old cache version (4) at this point.
3782
3783         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3784         (WebKit::NetworkCache::Storage::deleteOldVersions):
3785
3786 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3787
3788         WKView being inside WKWebView leads to weird API issues
3789         https://bugs.webkit.org/show_bug.cgi?id=150174
3790
3791         Reviewed by Darin Adler.
3792
3793         * UIProcess/API/mac/WKView.mm:
3794         * UIProcess/API/mac/WKViewInternal.h:
3795         * UIProcess/Cocoa/WebViewImpl.h: Added.
3796         * UIProcess/Cocoa/WebViewImpl.mm: Added.
3797         (WebKit::WebViewImpl::WebViewImpl):
3798         (WebKit::WebViewImpl::~WebViewImpl):
3799         (WebKit::WebViewImpl::setDrawsBackground):
3800         (WebKit::WebViewImpl::drawsBackground):
3801         (WebKit::WebViewImpl::setDrawsTransparentBackground):
3802         (WebKit::WebViewImpl::drawsTransparentBackground):
3803         (WebKit::WebViewImpl::acceptsFirstResponder):
3804         (WebKit::WebViewImpl::becomeFirstResponder):
3805         (WebKit::WebViewImpl::resignFirstResponder):
3806         (WebKit::WebViewImpl::isFocused):
3807         (WebKit::WebViewImpl::viewWillStartLiveResize):
3808         (WebKit::WebViewImpl::viewDidEndLiveResize):
3809         (WebKit::WebViewImpl::setFrameSize):
3810         (WebKit::WebViewImpl::disableFrameSizeUpdates):
3811         (WebKit::WebViewImpl::enableFrameSizeUpdates):
3812         (WebKit::WebViewImpl::frameSizeUpdatesDisabled):
3813         (WebKit::WebViewImpl::setFrameAndScrollBy):
3814         (WebKit::WebViewImpl::setFixedLayoutSize):
3815         (WebKit::WebViewImpl::fixedLayoutSize):
3816         (WebKit::WebViewImpl::setDrawingAreaSize):
3817         (WebKit::WebViewImpl::setContentPreparationRect):
3818         (WebKit::WebViewImpl::updateViewExposedRect):
3819         (WebKit::WebViewImpl::setClipsToVisibleRect):
3820         (WebKit::WebViewImpl::setIntrinsicContentSize):
3821         (WebKit::WebViewImpl::intrinsicContentSize):
3822         (WebKit::WebViewImpl::setViewScale):
3823         (WebKit::WebViewImpl::viewScale):
3824         (WebKit::WebViewImpl::layoutMode):
3825         (WebKit::WebViewImpl::setLayoutMode):
3826         (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
3827         (WebKit::WebViewImpl::updateSupportsArbitraryLayoutModes):
3828         (WebKit::WebViewImpl::updateSecureInputState):
3829         (WebKit::WebViewImpl::resetSecureInputState):
3830         (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
3831         (WebKit::WebViewImpl::hasFullScreenWindowController):
3832         (WebKit::WebViewImpl::fullScreenWindowController):
3833         (WebKit::WebViewImpl::closeFullScreenWindowController):
3834         (WebKit::WebViewImpl::fullScreenPlaceholderView):
3835         (WebKit::WebViewImpl::createFullScreenWindow):
3836         Move the actual implementation of a number of WKView methods into a
3837         C++ class, WebViewImpl, which WKView calls directly into.
3838         Eventually, we will move all of the logic of WKView into WebViewImpl,
3839         and then duplicate the necessary forwarding in WKWebView and remove
3840         WKWebView's inner WKView.
3841
3842         * UIProcess/mac/PageClientImpl.h:
3843         * UIProcess/mac/PageClientImpl.mm:
3844         (WebKit::PageClientImpl::isViewFocused):
3845         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
3846         (WebKit::PageClientImpl::updateSecureInputState):
3847         (WebKit::PageClientImpl::resetSecureInputState):
3848         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
3849         (WebKit::PageClientImpl::beganEnterFullScreen):
3850         (WebKit::PageClientImpl::beganExitFullScreen):
3851         For now, forward PageClient requests that can be answered by WebViewImpl
3852         to WebViewImpl. Eventually, we'll probably fold PageClientImpl and WebViewImpl
3853         together into one class, and these things will collapse down.
3854
3855         * UIProcess/mac/WKFullScreenWindowController.h:
3856         * UIProcess/mac/WKFullScreenWindowController.mm:
3857         (-[WKFullScreenWindowController initWithWindow:webView:page:]):
3858         (-[WKFullScreenWindowController enterFullScreen:]):
3859         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
3860         (-[WKFullScreenWindowController exitFullScreen]):
3861         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
3862         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
3863         (-[WKFullScreenWindowController _manager]):
3864         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
3865         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
3866         (-[WKFullScreenWindowController initWithWindow:webView:]): Deleted.
3867         (-[WKFullScreenWindowController _page]): Deleted.
3868         * UIProcess/mac/WKViewLayoutStrategy.h:
3869         * UIProcess/mac/WKViewLayoutStrategy.mm:
3870         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]):
3871         (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]):
3872         (-[WKViewLayoutStrategy invalidate]):
3873         (-[WKViewLayoutStrategy didChangeFrameSize]):
3874         (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
3875         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
3876         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]):
3877         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
3878         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
3879         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
3880         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]): Deleted.
3881         (-[WKViewLayoutStrategy initWithPage:view:mode:]): Deleted.
3882         (-[WKViewLayoutStrategy willDestroyView:]): Deleted.
3883         (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
3884         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
3885         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]): Deleted.
3886         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
3887         Make WKViewLayoutStrategy and WKFullScreenWindowController operate in terms of generic
3888         NSViews instead of WKView, so that eventually they will be able to work for either
3889         WKView or WKWebView, and so that they can sit underneath WebViewImpl.
3890
3891         * WebKit2.xcodeproj/project.pbxproj:
3892
3893 2015-10-19  Commit Queue  <commit-queue@webkit.org>
3894
3895         Unreviewed, rolling out r191307.
3896         https://bugs.webkit.org/show_bug.cgi?id=150338
3897
3898         broke lots of API tests, need time to figure out whats up
3899         (Requested by thorton on #webkit).
3900
3901         Reverted changeset:
3902
3903         "WKView being inside WKWebView leads to weird API issues"
3904         https://bugs.webkit.org/show_bug.cgi?id=150174
3905         http://trac.webkit.org/changeset/191307
3906
3907 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3908
3909         Try again to fix the 32-bit build.
3910
3911         * UIProcess/mac/WebContextMenuProxyMac.mm:
3912         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
3913
3914 2015-10-17  Wenson Hsieh  <wenson_hsieh@apple.com>
3915
3916         Extend fast-clicking behavior to trigger on elements that have negligible zoom
3917         https://bugs.webkit.org/show_bug.cgi?id=150248
3918         <rdar://problem/23140069>
3919
3920         Reviewed by Simon Fraser.
3921
3922         Currently, fast-clicking only triggers on pages that have unscalable viewports. To allow more websites to benefit from fast-clicking
3923         behavior, we generalize fast-clicking to also occur when tapping on elements for which double-tap-to-zoom would zoom the element in
3924         or out by an insignificant amount. We define an insignificant amount of zoom to mean that zooming would increase the viewport scale
3925         by less than a configurable threshold, or decrease the viewport scale by more than a configurable threshold. We accomplish this by
3926         temporarily disabling the double tap gesture recognizer for the duration of the tap. This patch refactors some logic used to compute
3927         zoomed viewports to make it possible to predict the change in viewport scale when double tapping to zoom. See the changes in
3928         SmartMagnificationController and ViewGestureGeometryCollector for more details.
3929
3930         There are no new tests, since this patch does not change existing behavior. Instead, this patch adds the machinery needed for zoom-
3931         dependent fast-clicking: by setting the preferences WebKitFastClickingEnabled and WebKitFastClickZoomThreshold, we will be able to tweak
3932         the behavior dynamically.
3933
3934         * UIProcess/API/Cocoa/WKWebView.mm:
3935         (-[WKWebView _didCommitLayerTree:]):
3936         (-[WKWebView _contentZoomScale]):
3937         (-[WKWebView _targetContentZoomScaleForRect:currentScale:fitEntireRect:minimumScale:maximumScale:]):
3938         (-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
3939         (-[WKWebView _viewportIsUserScalable]):
3940         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3941         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3942         * UIProcess/PageClient.h:
3943         * UIProcess/WebPageProxy.h:
3944         * UIProcess/WebPageProxy.messages.in:
3945         * UIProcess/ios/PageClientImplIOS.h:
3946         * UIProcess/ios/PageClientImplIOS.mm:
3947         (WebKit::PageClientImpl::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary):
3948         * UIProcess/ios/SmartMagnificationController.h:
3949         * UIProcess/ios/SmartMagnificationController.mm:
3950         (WebKit::SmartMagnificationController::adjustSmartMagnificationTargetRectAndZoomScales):
3951         (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
3952         (WebKit::SmartMagnificationController::magnify):
3953         * UIProcess/ios/WKContentViewInteraction.h:
3954         * UIProcess/ios/WKContentViewInteraction.mm:
3955         (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
3956         (-[WKContentView _fastClickZoomThreshold]):
3957         (-[WKContentView _allowDoubleTapToZoomForCurrentZoomScale:andTargetZoomScale:]):
3958         (-[WKContentView _disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:allowsDoubleTapZoom:targetRect:isReplaced:minimumScale:maximumScale:]):
3959         (-[WKContentView _highlightLongPressRecognized:]):
3960         (-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
3961         (-[WKContentView _singleTapRecognized:]):
3962         (cancelPotentialTapIfNecessary):
3963         (-[WKContentView _singleTapCommited:]):
3964         (-[WKContentView webSelectionRects]): Deleted.
3965         * UIProcess/ios/WebPageProxyIOS.mm:
3966         (WebKit::WebPageProxy::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary):
3967         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
3968         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
3969         (WebKit::ViewGestureGeometryCollector::computeZoomInformationForNode):
3970         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
3971         * WebProcess/WebPage/ios/WebPageIOS.mm:
3972         (WebKit::WebPage::potentialTapAtPosition):
3973
3974 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3975
3976         WKView being inside WKWebView leads to weird API issues
3977         https://bugs.webkit.org/show_bug.cgi?id=150174
3978
3979         Reviewed by Darin Adler.
3980
3981         * UIProcess/API/mac/WKView.mm:
3982         * UIProcess/API/mac/WKViewInternal.h:
3983         * UIProcess/Cocoa/WebViewImpl.h: Added.
3984         * UIProcess/Cocoa/WebViewImpl.mm: Added.
3985         (WebKit::WebViewImpl::WebViewImpl):
3986         (WebKit::WebViewImpl::~WebViewImpl):
3987         (WebKit::WebViewImpl::setDrawsBackground):
3988         (WebKit::WebViewImpl::drawsBackground):
3989         (WebKit::WebViewImpl::setDrawsTransparentBackground):
3990         (WebKit::WebViewImpl::drawsTransparentBackground):
3991         (WebKit::WebViewImpl::acceptsFirstResponder):
3992         (WebKit::WebViewImpl::becomeFirstResponder):
3993         (WebKit::WebViewImpl::resignFirstResponder):
3994         (WebKit::WebViewImpl::isFocused):
3995         (WebKit::WebViewImpl::viewWillStartLiveResize):
3996         (WebKit::WebViewImpl::viewDidEndLiveResize):
3997         (WebKit::WebViewImpl::setFrameSize):
3998         (WebKit::WebViewImpl::disableFrameSizeUpdates):
3999         (WebKit::WebViewImpl::enableFrameSizeUpdates):
4000         (WebKit::WebViewImpl::frameSizeUpdatesDisabled):
4001         (WebKit::WebViewImpl::setFrameAndScrollBy):
4002         (WebKit::WebViewImpl::setFixedLayoutSize):
4003         (WebKit::WebViewImpl::fixedLayoutSize):
4004         (WebKit::WebViewImpl::setDrawingAreaSize):
4005         (WebKit::WebViewImpl::setContentPreparationRect):
4006         (WebKit::WebViewImpl::updateViewExposedRect):
4007         (WebKit::WebViewImpl::setClipsToVisibleRect):
4008         (WebKit::WebViewImpl::setIntrinsicContentSize):
4009         (WebKit::WebViewImpl::intrinsicContentSize):
4010         (WebKit::WebViewImpl::setViewScale):
4011         (WebKit::WebViewImpl::viewScale):
4012         (WebKit::WebViewImpl::layoutMode):
4013         (WebKit::WebViewImpl::setLayoutMode):
4014         (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
4015         (WebKit::WebViewImpl::updateSupportsArbitraryLayoutModes):
4016         (WebKit::WebViewImpl::updateSecureInputState):
4017         (WebKit::WebViewImpl::resetSecureInputState):
4018         (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
4019         (WebKit::WebViewImpl::hasFullScreenWindowController):
4020         (WebKit::WebViewImpl::fullScreenWindowController):
4021         (WebKit::WebViewImpl::closeFullScreenWindowController):