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