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