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