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