Compile and link with CMake on Mac
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-10-28  Alex Christensen  <achristensen@webkit.org>
2
3         Compile and link with CMake on Mac
4         https://bugs.webkit.org/show_bug.cgi?id=150632
5
6         Reviewed by Tim Horton.
7
8         * CMakeLists.txt:
9         * PlatformEfl.cmake:
10         * PlatformGTK.cmake:
11         * PlatformMac.cmake:
12
13 2015-10-27  Anders Carlsson  <andersca@apple.com>
14
15         Stub out more of the context menu SPI
16         https://bugs.webkit.org/show_bug.cgi?id=150606
17
18         Reviewed by Dan Bernstein.
19
20         Add a delegate method that will allow the client to modify the menu. Also,
21         add an empty _WKContextMenuElementInfo class and its _WKElementInfo superclass.
22
23         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
24         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h: Added.
25         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm: Added.
26         * UIProcess/API/Cocoa/_WKElementInfo.h: Added.
27         * UIProcess/API/Cocoa/_WKElementInfo.mm: Added.
28         * UIProcess/Cocoa/UIDelegate.h:
29         * UIProcess/Cocoa/UIDelegate.mm:
30         (WebKit::UIDelegate::setDelegate):
31         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
32         (WebKit::UIDelegate::UIClient::createNewPage):
33         * UIProcess/mac/WebContextMenuProxyMac.mm:
34         (WebKit::WebContextMenuProxyMac::showContextMenu):
35         * WebKit2.xcodeproj/project.pbxproj:
36
37 2015-10-28  Chris Dumez  <cdumez@apple.com>
38
39         Use RunLoopTimer in DataURLDecoder to avoid issues related to runloops
40         https://bugs.webkit.org/show_bug.cgi?id=150609
41         <rdar://problem/22702894>
42
43         Reviewed by Antti Koivisto.
44
45         Move addSchedulePair() call to Page::platformInitialize() so that
46         RunLoopTimer can be used by any Page, even those that don't have
47         a WebPage wrapper.
48
49         * WebProcess/WebPage/mac/WebPageMac.mm:
50         (WebKit::WebPage::platformInitialize): Deleted.
51
52 2015-10-27  Tim Horton  <timothy_horton@apple.com>
53
54         Fix the 32-bit build.
55
56         * UIProcess/Cocoa/WebViewImpl.mm:
57         (WebKit::WebViewImpl::dragImageForView):
58
59 2015-10-27  Tim Horton  <timothy_horton@apple.com>
60
61         Fix the build.
62
63         * UIProcess/Cocoa/WebViewImpl.mm:
64
65 2015-10-27  Tim Horton  <timothy_horton@apple.com>
66
67         WKView being inside WKWebView leads to weird API issues
68         https://bugs.webkit.org/show_bug.cgi?id=150174
69
70         Reviewed by Anders Carlsson.
71
72         * UIProcess/API/mac/WKView.mm:
73         (-[WKView mouseDown:]):
74         (-[WKView mouseUp:]):
75         (-[WKView acceptsFirstMouse:]):
76         (-[WKView shouldDelayWindowOrderingForEvent:]):
77         (-[WKView pasteboardChangedOwner:]):
78         (-[WKView pasteboard:provideDataForType:]):
79         (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
80         (-[WKView _startWindowDrag]):
81         (-[WKView _setMouseDownEvent:]): Deleted.
82         (-[WKView _colorSpace]): Deleted.
83         (-[WKView _dragImageForView:withImage:at:linkDrag:]): Deleted.
84         (matchesExtensionOrEquivalent): Deleted.
85         (-[WKView _setFileAndURLTypes:withExtension:withTitle:withURL:withVisibleURL:forPasteboard:]): Deleted.
86         (-[WKView _setPromisedDataForImage:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]): Deleted.
87         (-[WKView _setPromisedDataForAttachment:withExtension:withTitle:withURL:withVisibleURL:forPasteboard:]): Deleted.
88         (fileExists): Deleted.
89         (pathWithUniqueFilenameForPath): Deleted.
90         (-[WKView spellCheckerDocumentTag]): Deleted.
91         (-[WKView handleAcceptedAlternativeText:]): Deleted.
92         (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
93         * UIProcess/API/mac/WKViewInternal.h:
94         * UIProcess/Cocoa/WebViewImpl.h:
95         * UIProcess/Cocoa/WebViewImpl.mm:
96         (WebKit::WebViewImpl::handleAcceptedAlternativeText):
97         (WebKit::WebViewImpl::spellCheckerDocumentTag):
98         (WebKit::WebViewImpl::startWindowDrag):
99         (WebKit::WebViewImpl::dragImageForView):
100         (WebKit::matchesExtensionOrEquivalent):
101         (WebKit::WebViewImpl::setFileAndURLTypes):
102         (WebKit::WebViewImpl::setPromisedDataForImage):
103         (WebKit::WebViewImpl::setPromisedDataForAttachment):
104         (WebKit::WebViewImpl::pasteboardChangedOwner):
105         (WebKit::WebViewImpl::provideDataForPasteboard):
106         (WebKit::fileExists):
107         (WebKit::pathWithUniqueFilenameForPath):
108         (WebKit::WebViewImpl::namesOfPromisedFilesDroppedAtDestination):
109         (WebKit::WebViewImpl::setLastMouseDownEvent):
110         * UIProcess/mac/CorrectionPanel.h:
111         * UIProcess/mac/CorrectionPanel.mm:
112         (WebKit::CorrectionPanel::show):
113         (WebKit::CorrectionPanel::recordAutocorrectionResponse):
114         (WebKit::CorrectionPanel::handleAcceptedReplacement):
115         * UIProcess/mac/PageClientImpl.mm:
116         (WebKit::PageClientImpl::colorSpace):
117         (WebKit::PageClientImpl::setDragImage):
118         (WebKit::PageClientImpl::setPromisedDataForImage):
119         (WebKit::PageClientImpl::setPromisedDataForAttachment):
120         (WebKit::PageClientImpl::showCorrectionPanel):
121         (WebKit::PageClientImpl::recordAutocorrectionResponse):
122         (WebKit::PageClientImpl::showDictationAlternativeUI):
123         Move some pasteboard and spellcheck code.
124
125 2015-10-27  Wenson Hsieh  <wenson_hsieh@apple.com>
126
127         Implement viewport-width-based fast-click heuristic
128         https://bugs.webkit.org/show_bug.cgi?id=150604
129         <rdar://problem/23267308>
130
131         Reviewed by Simon Fraser.
132
133         Implement a new fast-click heuristic that applies to viewports with width = device-width. The basic rules are
134         as follows: when a page has viewport width = device-width and is at initial zoom scale, we disable double-tapping
135         in favor of fast-clicking. However, if the viewport scale is not the initial scale, we allow double tapping. For
136         fast-clicking to remain useful after the user pinch-zooms, we change our double-tap to zoom out behavior to zoom
137         to the initial scale rather than the minimum scale. For unscalable viewports, we default to fast-clicking behavior,
138         and for all other viewports not at device-width, we double-tap to zoom and scroll as normal.
139
140         This patch removes some logic previously used for our scroll- and zoom-based fast-clicking heuristic, and adds
141         information about the viewport width and initial scale to RemoteLayerTreeTransactions. This information is then
142         used by the UI process to determine whether double tapping should be disabled or enabled.
143
144         The fast-click heuristic can be turned off through user default preferences, and a tap highlight for debugging
145         fast-clicking can also be enabled through a user default preference. A red highlight indicates that a single-
146         tap was slow, whereas a green highlight indicates a fast single-tap.
147
148         * Shared/mac/RemoteLayerTreeTransaction.h:
149         (WebKit::RemoteLayerTreeTransaction::initialScaleFactor):
150         (WebKit::RemoteLayerTreeTransaction::setInitialScaleFactor):
151         (WebKit::RemoteLayerTreeTransaction::viewportMetaTagWidth):
152         (WebKit::RemoteLayerTreeTransaction::setViewportMetaTagWidth):
153         * Shared/mac/RemoteLayerTreeTransaction.mm:
154         (WebKit::RemoteLayerTreeTransaction::encode):
155         (WebKit::RemoteLayerTreeTransaction::decode):
156         * UIProcess/API/Cocoa/WKWebView.mm:
157         (-[WKWebView initWithFrame:configuration:]):
158         (-[WKWebView _processDidExit]):
159         (-[WKWebView _didCommitLayerTree:]):
160         (-[WKWebView _zoomToInitialScaleWithOrigin:animated:]):
161         (-[WKWebView _allowsDoubleTapGestures]):
162         (-[WKWebView _setViewportMetaTagWidth:]): Deleted.
163         (-[WKWebView _contentZoomScale]): Deleted.
164         (-[WKWebView _viewportMetaTagWidth]): Deleted.
165         (-[WKWebView _viewportIsUserScalable]): Deleted.
166         * UIProcess/API/Cocoa/WKWebViewInternal.h:
167         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
168         * UIProcess/PageClient.h:
169         * UIProcess/WebPageProxy.h:
170         * UIProcess/WebPageProxy.messages.in:
171         * UIProcess/ios/PageClientImplIOS.h:
172         * UIProcess/ios/PageClientImplIOS.mm:
173         (WebKit::PageClientImpl::disableDoubleTapGesturesDuringTapIfNecessary):
174         (WebKit::PageClientImpl::didChangeViewportMetaTagWidth): Deleted.
175         (WebKit::PageClientImpl::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary): Deleted.
176         * UIProcess/ios/SmartMagnificationController.h:
177         * UIProcess/ios/SmartMagnificationController.mm:
178         (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
179         * UIProcess/ios/WKContentView.h:
180         * UIProcess/ios/WKContentView.mm:
181         (-[WKContentView _zoomToInitialScaleWithOrigin:]):
182         * UIProcess/ios/WKContentViewInteraction.h:
183         * UIProcess/ios/WKContentViewInteraction.mm:
184         (-[WKContentView setupInteraction]):
185         (-[WKContentView _showTapHighlight]):
186         (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
187         (-[WKContentView _mayDisableDoubleTapGesturesDuringSingleTap]):
188         (-[WKContentView _disableDoubleTapGesturesDuringTapIfNecessary:]):
189         (-[WKContentView _finishInteraction]):
190         (-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
191         (-[WKContentView _tapHighlightColorForFastClick:]):
192         (-[WKContentView _setDoubleTapGesturesEnabled:]):
193         (-[WKContentView _fastClickZoomThreshold]): Deleted.
194         (-[WKContentView _allowDoubleTapToZoomForCurrentZoomScale:andTargetZoomScale:]): Deleted.
195         (-[WKContentView _disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:allowsDoubleTapZoom:targetRect:isReplaced:minimumScale:maximumScale:]): Deleted.
196         * UIProcess/ios/WebPageProxyIOS.mm:
197         (WebKit::WebPageProxy::disableDoubleTapGesturesDuringTapIfNecessary):
198         (WebKit::WebPageProxy::viewportMetaTagWidthDidChange): Deleted.
199         (WebKit::WebPageProxy::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary): Deleted.
200         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
201         * WebProcess/WebPage/WebPage.cpp:
202         (WebKit::WebPage::willCommitLayerTree):
203         * WebProcess/WebPage/ios/WebPageIOS.mm:
204         (WebKit::WebPage::potentialTapAtPosition):
205         (WebKit::WebPage::viewportPropertiesDidChange): Deleted.
206
207 2015-10-27  Tim Horton  <timothy_horton@apple.com>
208
209         WKView being inside WKWebView leads to weird API issues
210         https://bugs.webkit.org/show_bug.cgi?id=150174
211
212         Reviewed by Anders Carlsson.
213
214         * UIProcess/API/mac/WKView.mm:
215         (-[WKView _superAccessibilityAttributeValue:]):
216         (-[WKView accessibilityFocusedUIElement]):
217         (-[WKView accessibilityIsIgnored]):
218         (-[WKView accessibilityHitTest:]):
219         (-[WKView accessibilityAttributeValue:]):
220         (-[WKView _processDidExit]):
221         (-[WKView _pageClosed]):
222         (-[WKView _updateRemoteAccessibilityRegistration:]): Deleted.
223         (-[WKView enableAccessibilityIfNecessary]): Deleted.
224         (-[WKView _toolTipChangedFrom:to:]): Deleted.
225         (-[WKView _setAccessibilityWebProcessToken:]): Deleted.
226         (-[WKView _hasFullScreenWindowController]): Deleted.
227         (-[WKView _fullScreenWindowController]): Deleted.
228         (-[WKView _closeFullScreenWindowController]): Deleted.
229         (-[WKView _setSuppressVisibilityUpdates:]): Deleted.
230         (-[WKView _suppressVisibilityUpdates]): Deleted.
231         (-[WKView _primaryTrackingArea]): Deleted.
232         (-[WKView _setPrimaryTrackingArea:]): Deleted.
233         (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
234         * UIProcess/API/mac/WKViewInternal.h:
235         * UIProcess/Cocoa/WebViewImpl.h:
236         (WebKit::WebViewImpl::accessibilityIsIgnored):
237         (WebKit::WebViewImpl::primaryTrackingArea):
238         * UIProcess/Cocoa/WebViewImpl.mm:
239         (WebKit::trackingAreaOptions):
240         (WebKit::WebViewImpl::WebViewImpl):
241         (WebKit::WebViewImpl::setAccessibilityWebProcessToken):
242         (WebKit::WebViewImpl::updateRemoteAccessibilityRegistration):
243         (WebKit::WebViewImpl::accessibilityFocusedUIElement):
244         (WebKit::WebViewImpl::accessibilityHitTest):
245         (WebKit::WebViewImpl::enableAccessibilityIfNecessary):
246         (WebKit::WebViewImpl::accessibilityAttributeValue):
247         (WebKit::WebViewImpl::setPrimaryTrackingArea):
248         (WebKit::WebViewImpl::toolTipChanged):
249         * UIProcess/mac/PageClientImpl.mm:
250         (WebKit::PageClientImpl::toolTipChanged):
251         (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
252         (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
253         (WebKit::PageClientImpl::closeFullScreenManager):
254         (WebKit::PageClientImpl::isFullScreen):
255         (WebKit::PageClientImpl::enterFullScreen):
256         (WebKit::PageClientImpl::exitFullScreen):
257         (WebKit::PageClientImpl::beganEnterFullScreen):
258         (WebKit::PageClientImpl::beganExitFullScreen):
259         Move accessibility code, and fold in some internal-only methods.
260
261 2015-10-27  Tim Horton  <timothy_horton@apple.com>
262
263         WKView being inside WKWebView leads to weird API issues
264         https://bugs.webkit.org/show_bug.cgi?id=150174
265
266         Reviewed by Anders Carlsson.
267
268         * UIProcess/API/mac/WKView.mm:
269         (-[WKView scrollWheel:]):
270         (-[WKView swipeWithEvent:]):
271         (-[WKView _superSwipeWithEvent:]):
272         (-[WKView _superMagnifyWithEvent:]):
273         (-[WKView _superSmartMagnifyWithEvent:]):
274         (-[WKView _processDidExit]):
275         (-[WKView setAllowsBackForwardNavigationGestures:]):
276         (-[WKView allowsBackForwardNavigationGestures]):
277         (-[WKView setAllowsMagnification:]):
278         (-[WKView allowsMagnification]):
279         (-[WKView magnifyWithEvent:]):
280         (-[WKView rotateWithEvent:]):
281         (-[WKView _gestureEventWasNotHandledByWebCore:]):
282         (-[WKView smartMagnifyWithEvent:]):
283         (-[WKView setMagnification:centeredAtPoint:]):
284         (-[WKView setMagnification:]):
285         (-[WKView magnification]):
286         (-[WKView _setCustomSwipeViews:]):
287         (-[WKView _setCustomSwipeViewsTopContentInset:]):
288         (-[WKView _tryToSwipeWithEvent:ignoringPinnedState:]):
289         (-[WKView _setDidMoveSwipeSnapshotCallback:]):
290         (-[WKView _ensureGestureController]): Deleted.
291         (takeWindowSnapshot): Deleted.
292         (-[WKView _takeViewSnapshot]): Deleted.
293         (-[WKView _wheelEventWasNotHandledByWebCore:]): Deleted.
294         (-[WKView _didFirstVisuallyNonEmptyLayoutForMainFrame]): Deleted.
295         (-[WKView _didFinishLoadForMainFrame]): Deleted.
296         (-[WKView _didFailLoadForMainFrame]): Deleted.
297         (-[WKView _didSameDocumentNavigationForMainFrame:]): Deleted.
298         (-[WKView _removeNavigationGestureSnapshot]): Deleted.
299         * UIProcess/API/mac/WKViewInternal.h:
300         * UIProcess/Cocoa/WebViewImpl.h:
301         (WebKit::WebViewImpl::gestureController):
302         (WebKit::WebViewImpl::allowsBackForwardNavigationGestures):
303         (WebKit::WebViewImpl::allowsMagnification):
304         * UIProcess/Cocoa/WebViewImpl.mm:
305         (WebKit::takeWindowSnapshot):
306         (WebKit::WebViewImpl::takeViewSnapshot):
307         (WebKit::WebViewImpl::ensureGestureController):
308         (WebKit::WebViewImpl::resetGestureController):
309         (WebKit::WebViewImpl::setAllowsBackForwardNavigationGestures):
310         (WebKit::WebViewImpl::setAllowsMagnification):
311         (WebKit::WebViewImpl::setMagnification):
312         (WebKit::WebViewImpl::magnification):
313         (WebKit::WebViewImpl::setCustomSwipeViews):
314         (WebKit::WebViewImpl::setCustomSwipeViewsTopContentInset):
315         (WebKit::WebViewImpl::tryToSwipeWithEvent):
316         (WebKit::WebViewImpl::setDidMoveSwipeSnapshotCallback):
317         (WebKit::WebViewImpl::scrollWheel):
318         (WebKit::WebViewImpl::swipeWithEvent):
319         (WebKit::WebViewImpl::magnifyWithEvent):
320         (WebKit::WebViewImpl::smartMagnifyWithEvent):
321         (WebKit::WebViewImpl::rotateWithEvent):
322         (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCore):
323         (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCoreFromViewOnly):
324         * UIProcess/mac/PageClientImpl.mm:
325         (WebKit::PageClientImpl::takeViewSnapshot):
326         (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
327         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
328         (WebKit::PageClientImpl::didFinishLoadForMainFrame):
329         (WebKit::PageClientImpl::didFailLoadForMainFrame):
330         (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
331         (WebKit::PageClientImpl::removeNavigationGestureSnapshot):
332         Move swipe, zoom, rotate, and snapshotting code.
333
334 2015-10-27  Zhuo Li  <zachli@apple.com>
335
336         Add WebKit API to clear data type Search Field Recent Searches.
337         https://bugs.webkit.org/show_bug.cgi?id=150019.
338
339         Reviewed by Anders Carlsson.
340
341         * Shared/WebsiteData/WebsiteDataTypes.h: Add data type Search Field Recent Searches.
342         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
343         (dataTypesToString): Ditto.
344         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
345         (WebKit::toWebsiteDataTypes): Ditto.
346         (WebKit::toWKWebsiteDataTypes): Ditto.
347         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h: Ditto.
348         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
349         (WebKit::WebsiteDataStore::removeData): Handle the case when data type is Search
350         Field Recent Searches.
351         * UIProcess/WebsiteData/WebsiteDataStore.h: Add a private function for removing
352         recent searches based on time.
353         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
354         (WebKit::WebsiteDataStoreCocoa::platformRemoveRecentSearches): Call the removing
355         recent searches logic in WebCore.
356         * UIProcess/efl/WebPageProxyEfl.cpp:
357         (WebKit::WebsiteDataStore::platformRemoveRecentSearches): Not implemented.
358         * UIProcess/gtk/WebPageProxyGtk.cpp:
359         (WebKit::WebsiteDataStore::platformRemoveRecentSearches): Not implemented.
360
361 2015-10-26  Brady Eidson  <beidson@apple.com>
362
363         Make IDBKeyData from a struct to a class.
364         https://bugs.webkit.org/show_bug.cgi?id=150576
365
366         Reviewed by Alex Christensen.
367
368         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
369         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
370         * DatabaseProcess/IndexedDB/IDBSerialization.h:
371         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
372         (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
373         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
374         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
375         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
376         (WebKit::buildIndexStatement):
377         (WebKit::buildObjectStoreStatement):
378         (WebKit::SQLiteIDBCursor::establishStatement):
379         (WebKit::SQLiteIDBCursor::createSQLiteStatement):
380         (WebKit::SQLiteIDBCursor::resetAndRebindStatement):
381         (WebKit::SQLiteIDBCursor::iterate):
382         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
383         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
384         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
385         (WebKit::WebIDBServerConnection::didPutRecord):
386         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
387         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
388
389 2015-10-26  Philip Chimento  <philip.chimento@gmail.com>
390
391         [GTK] [Stable] InstallMissingMediaPluginsPermissionRequest not defined when building without GStreamer
392         https://bugs.webkit.org/show_bug.cgi?id=148607
393
394         Unreviewed, build fix.
395
396         * UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.h:
397         Add a stub for the InstallMissingMediaPluginsPermissionRequest class
398         for the case when video is disabled or not using GStreamer. It's OK
399         that this class does nothing, because the associated C API contains
400         an assert_not_reached if video is disabled. We just need to define
401         the symbol so that the function signature will compile.
402
403 2015-10-26  Anders Carlsson  <andersca@apple.com>
404
405         Pipe custom context menu handling through to the UIDelegate object
406         https://bugs.webkit.org/show_bug.cgi?id=150572
407
408         Reviewed by Tim Horton.
409
410         * UIProcess/API/APIContextMenuClient.h:
411         (API::ContextMenuClient::menuFromProposedMenu):
412         * UIProcess/API/Cocoa/WKWebView.mm:
413         (-[WKWebView setUIDelegate:]):
414         * UIProcess/Cocoa/UIDelegate.h:
415         * UIProcess/Cocoa/UIDelegate.mm:
416         (WebKit::UIDelegate::createContextMenuClient):
417         (WebKit::UIDelegate::ContextMenuClient::ContextMenuClient):
418         (WebKit::UIDelegate::ContextMenuClient::~ContextMenuClient):
419         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
420         * UIProcess/mac/WebContextMenuProxyMac.mm:
421         (WebKit::WebContextMenuProxyMac::showContextMenu):
422
423 2015-10-26  Tim Horton  <timothy_horton@apple.com>
424
425         WKView being inside WKWebView leads to weird API issues
426         https://bugs.webkit.org/show_bug.cgi?id=150174
427
428         Reviewed by Anders Carlsson.
429
430         * UIProcess/API/mac/WKView.mm:
431         (-[WKView mouseDown:]):
432         (-[WKView mouseDragged:]):
433         (-[WKView draggedImage:endedAt:operation:]):
434         (-[WKView draggingEntered:]):
435         (-[WKView draggingUpdated:]):
436         (-[WKView draggingExited:]):
437         (-[WKView prepareForDragOperation:]):
438         (-[WKView performDragOperation:]):
439         (-[WKView _hitTest:dragTypes:]):
440         (-[WKView initWithFrame:processPool:configuration:webView:]):
441         (-[WKView applicationFlags:]): Deleted.
442         (maybeCreateSandboxExtensionFromPasteboard): Deleted.
443         (createSandboxExtensionsForFileUpload): Deleted.
444         (-[WKView _registerDraggedTypes]): Deleted.
445         * UIProcess/Cocoa/WebViewImpl.h:
446         (WebKit::WebViewImpl::ignoresMouseDraggedEvents):
447         * UIProcess/Cocoa/WebViewImpl.mm:
448         (WebKit::WebViewImpl::setIgnoresMouseDraggedEvents):
449         (WebKit::WebViewImpl::draggedImage):
450         (WebKit::applicationFlagsForDrag):
451         (WebKit::WebViewImpl::draggingEntered):
452         (WebKit::WebViewImpl::draggingUpdated):
453         (WebKit::WebViewImpl::draggingExited):
454         (WebKit::WebViewImpl::prepareForDragOperation):
455         (WebKit::maybeCreateSandboxExtensionFromPasteboard):
456         (WebKit::createSandboxExtensionsForFileUpload):
457         (WebKit::WebViewImpl::performDragOperation):
458         (WebKit::WebViewImpl::hitTestForDragTypes):
459         (WebKit::WebViewImpl::registerDraggedTypes):
460         Move some drag-related things to WebViewImpl.
461
462 2015-10-26  Anders Carlsson  <andersca@apple.com>
463
464         Pipe custom context menu handling through to the UIDelegate object
465         https://bugs.webkit.org/show_bug.cgi?id=150572
466
467         Reviewed by Tim Horton.
468
469         * UIProcess/API/APIContextMenuClient.h:
470         (API::ContextMenuClient::menuFromProposedMenu):
471         * UIProcess/API/Cocoa/WKWebView.mm:
472         (-[WKWebView setUIDelegate:]):
473         * UIProcess/Cocoa/UIDelegate.h:
474         * UIProcess/Cocoa/UIDelegate.mm:
475         (WebKit::UIDelegate::createContextMenuClient):
476         (WebKit::UIDelegate::ContextMenuClient::ContextMenuClient):
477         (WebKit::UIDelegate::ContextMenuClient::~ContextMenuClient):
478         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
479         * UIProcess/mac/WebContextMenuProxyMac.mm:
480         (WebKit::WebContextMenuProxyMac::showContextMenu):
481
482 2015-10-26  Alex Christensen  <achristensen@webkit.org>
483
484         Build fix when using NETWORK_SESSION after r191457.
485
486         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
487         (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
488         Use resourceResponse.
489
490 2015-10-26  Anders Carlsson  <andersca@apple.com>
491
492         Remove more dead context menu code
493         https://bugs.webkit.org/show_bug.cgi?id=150569
494
495         Reviewed by Tim Horton.
496
497         * UIProcess/API/APIContextMenuClient.h:
498         (API::ContextMenuClient::contextMenuDismissed): Deleted.
499         * UIProcess/API/C/WKPage.cpp:
500         (WKPageSetPageContextMenuClient): Deleted.
501
502 2015-10-26  Anders Carlsson  <andersca@apple.com>
503
504         Remove dead context menu code
505         https://bugs.webkit.org/show_bug.cgi?id=150567
506
507         Reviewed by Tim Horton.
508
509         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
510         (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems): Deleted.
511         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
512
513 2015-10-26  Tim Horton  <timothy_horton@apple.com>
514
515         Don't expose the whitelist/blacklist in _WKUserStyleSheet
516         https://bugs.webkit.org/show_bug.cgi?id=150566
517
518         Reviewed by Anders Carlsson.
519
520         * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
521         * UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
522         (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:]):
523         (toWTFStrings): Deleted.
524         (-[_WKUserStyleSheet initWithSource:whitelistedURLPatterns:blacklistedURLPatterns:forMainFrameOnly:]): Deleted.
525         (-[_WKUserStyleSheet whitelistedURLPatterns]): Deleted.
526         (-[_WKUserStyleSheet blacklistedURLPatterns]): Deleted.
527
528 2015-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
529
530         Unreviewed. Fix GTK+ build after r191543.
531
532         * UIProcess/API/gtk/WebKitWebView.cpp:
533         (webkit_web_view_run_javascript):
534         (resourcesStreamReadCallback):
535
536 2015-10-24  Tim Horton  <timothy_horton@apple.com>
537
538         Add a way to add user style sheets to WKUserContentController
539         https://bugs.webkit.org/show_bug.cgi?id=150531
540         <rdar://problem/23191691>
541
542         Reviewed by Darin Adler.
543
544         * Shared/API/APIObject.h:
545         * Shared/Cocoa/APIObject.mm:
546         (API::Object::newObject):
547         Boilerplate for a new API::UserStyleSheet.
548
549         * UIProcess/API/APIUserStyleSheet.cpp: Added.
550         (API::generateIdentifier):
551         (API::UserStyleSheet::generateUniqueURL):
552         * UIProcess/API/APIUserStyleSheet.h: Added.
553         Added API::UserStyleSheet, borrowing URL generation code from API::UserScript.
554
555         * UIProcess/API/Cocoa/WKUserContentController.mm:
556         (-[WKUserContentController _addUserStyleSheet:]):
557         (-[WKUserContentController _removeAllUserStyleSheets]):
558         Forward add and remove-all to WebUserContentControllerProxy.
559
560         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
561         * UIProcess/API/Cocoa/_WKUserStyleSheet.h: Added.
562         * UIProcess/API/Cocoa/_WKUserStyleSheet.mm: Added.
563         (toWTFStrings):
564         (-[_WKUserStyleSheet initWithSource:whitelistedURLPatterns:blacklistedURLPatterns:forMainFrameOnly:]):
565         (-[_WKUserStyleSheet source]):
566         (-[_WKUserStyleSheet isForMainFrameOnly]):
567         (-[_WKUserStyleSheet copyWithZone:]):
568         (-[_WKUserStyleSheet _apiObject]):
569         * UIProcess/API/Cocoa/_WKUserStyleSheetInternal.h: Added.
570         (API::wrapper):
571         * WebKit2.xcodeproj/project.pbxproj:
572         Add the new modern API object (as SPI for now).
573
574 2015-10-24  Tim Horton  <timothy_horton@apple.com>
575
576         Expose more information about the exception in WKErrorJavaScriptExceptionOccurred errors
577         https://bugs.webkit.org/show_bug.cgi?id=150525
578
579         Reviewed by Darin Adler.
580
581         * Scripts/webkit/messages.py:
582         (headers_for_type):
583         * Shared/WebCoreArgumentCoders.cpp:
584         (IPC::ArgumentCoder<ExceptionDetails>::encode):
585         (IPC::ArgumentCoder<ExceptionDetails>::decode):
586         * Shared/WebCoreArgumentCoders.h:
587         Learn how to en/decode ExceptionDetails.
588
589         * UIProcess/API/C/WKPage.cpp:
590         (WKPageRunJavaScriptInMainFrame):
591         * UIProcess/WebPageProxy.cpp:
592         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
593         (WebKit::WebPageProxy::scriptValueCallback):
594         * UIProcess/WebPageProxy.h:
595         * UIProcess/WebPageProxy.messages.in:
596         * WebProcess/WebPage/WebPage.cpp:
597         (WebKit::WebPage::runJavaScriptInMainFrame):
598         Plumb ExceptionDetails back through runJavaScriptInMainFrame, across the
599         process boundary.
600
601         * UIProcess/API/Cocoa/WKError.mm:
602         (localizedDescriptionForErrorCode):
603         * UIProcess/API/Cocoa/WKErrorInternal.h:
604         * UIProcess/API/Cocoa/WKErrorPrivate.h:
605         Expose localizedDescriptionForErrorCode so that WKWebView can do special
606         things with its error.
607         Add new private userInfo keys for exception info.
608
609         * UIProcess/API/Cocoa/WKWebView.mm:
610         (-[WKWebView evaluateJavaScript:completionHandler:]):
611         Fill in the NSError userInfo with the exception info.
612
613 2015-10-24  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
614
615         [EFL] Fix a wrong enum variable use
616         https://bugs.webkit.org/show_bug.cgi?id=150522
617
618         Reviewed by Csaba Osztrogonác.
619
620         * UIProcess/API/efl/EwkView.cpp:
621         (EwkView::requestPopupMenu):
622         Use kWKPopupItemTextDirectionLTR instead of EWK_TEXT_DIRECTION_LEFT_TO_RIGHT.
623
624 2015-10-24  Dan Bernstein  <mitz@apple.com>
625
626         [Cocoa] _WKFormInputSession should provide access to the focused element info
627         https://bugs.webkit.org/show_bug.cgi?id=150512
628
629         Reviewed by Tim Horton.
630
631         * UIProcess/API/Cocoa/_WKFormInputSession.h: Added focusedElementInfo property to the
632           protocol.
633
634         * UIProcess/ios/WKContentViewInteraction.mm:
635         (-[WKFormInputSession initWithContentView:focusedElementInfo:userObject:]): Added the
636           focusedElementInfo argument, used to initialize a new ivar.
637         (-[WKFormInputSession focusedElementInfo]): Added this getter for the new
638           _WKFormInputSession property.
639         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
640           Create the WKFocusedElementInfo unconditionally and pass it to the new WKFormInputSession
641           initializer.
642
643 2015-10-24  Dan Bernstein  <mitz@apple.com>
644
645         [iOS] Allow clients to specify a custom input view to be used for a form input session
646         https://bugs.webkit.org/show_bug.cgi?id=150395
647
648         Reviewed by Tim Horton.
649
650         * UIProcess/API/Cocoa/_WKFormInputSession.h: Added customInputView property to the protocol.
651
652         * UIProcess/ios/WKContentViewInteraction.mm:
653         (-[WKFormInputSession customInputView]): Added this getter.
654         (-[WKFormInputSession setCustomInputView:]): Added this setter, which reloads the input
655           views when the custom input view changes.
656         (-[WKContentView inputView]): Changed to return the custom view from the input session if
657           there is one.
658
659 2015-10-23  Alex Christensen  <achristensen@webkit.org>
660
661         Fix CMake compile error and add correct null check
662         https://bugs.webkit.org/show_bug.cgi?id=150520
663
664         Reviewed by Simon Fraser.
665
666         * UIProcess/API/Cocoa/WKWebView.mm:
667         (-[WKWebView _doAfterNextPresentationUpdate:]):
668
669 2015-10-23  Alex Christensen  <achristensen@webkit.org>
670
671         Progress towards CMake on Mac
672         https://bugs.webkit.org/show_bug.cgi?id=150517
673
674         Reviewed by Tim Horton.
675
676         * CMakeLists.txt:
677         * PlatformEfl.cmake:
678         * PlatformGTK.cmake:
679         * PlatformMac.cmake:
680         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp: Removed.
681         * WebProcess/Cookies/curl/WebCookieManagerCurl.cpp: Removed.
682
683 2015-10-23  Tim Horton  <timothy_horton@apple.com>
684
685         WKView being inside WKWebView leads to weird API issues
686         https://bugs.webkit.org/show_bug.cgi?id=150174
687
688         * UIProcess/Cocoa/WebViewImpl.h:
689         Whoops.
690
691 2015-10-23  Tim Horton  <timothy_horton@apple.com>
692
693         WKView being inside WKWebView leads to weird API issues
694         https://bugs.webkit.org/show_bug.cgi?id=150174
695
696         Reviewed by Anders Carlsson.
697
698         * UIProcess/API/mac/WKView.mm:
699         (-[WKView hitTest:]):
700         (-[WKView _processDidExit]):
701         (-[WKView _setThumbnailView:]):
702         (-[WKView _thumbnailView]):
703         (-[WKFlippedView isFlipped]): Deleted.
704         (-[WKView dealloc]): Deleted.
705         (-[WKView _setAcceleratedCompositingModeRootLayer:]): Deleted.
706         (-[WKView _acceleratedCompositingModeRootLayer]): Deleted.
707         (-[WKView _updateThumbnailViewLayer]): Deleted.
708         (-[WKView _reparentLayerTreeInThumbnailView]): Deleted.
709         * UIProcess/API/mac/WKViewInternal.h:
710         * UIProcess/Cocoa/WebViewImpl.h:
711         (WebKit::WebViewImpl::acceleratedCompositingRootLayer):
712         (WebKit::WebViewImpl::layerHostingView):
713         (WebKit::WebViewImpl::thumbnailView):
714         * UIProcess/Cocoa/WebViewImpl.mm:
715         (-[WKFlippedView isFlipped]):
716         (WebKit::WebViewImpl::~WebViewImpl):
717         (WebKit::WebViewImpl::setAcceleratedCompositingRootLayer):
718         (WebKit::WebViewImpl::setThumbnailView):
719         (WebKit::WebViewImpl::reparentLayerTreeInThumbnailView):
720         (WebKit::WebViewImpl::updateThumbnailViewLayer):
721         * UIProcess/mac/PageClientImpl.mm:
722         (WebKit::PageClientImpl::enterAcceleratedCompositingMode):
723         (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
724         (WebKit::PageClientImpl::updateAcceleratedCompositingMode):
725         (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
726         (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
727         Move accelerated compositing and thumbnail view code.
728
729 2015-10-23  Tim Horton  <timothy_horton@apple.com>
730
731         WKView being inside WKWebView leads to weird API issues
732         https://bugs.webkit.org/show_bug.cgi?id=150174
733
734         Reviewed by Anders Carlsson.
735
736         * UIProcess/API/mac/WKView.mm:
737         (-[WKView _superRemoveTrackingRect:]):
738         (-[WKView addTrackingRect:owner:userData:assumeInside:]):
739         (-[WKView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]):
740         (-[WKView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]):
741         (-[WKView removeTrackingRect:]):
742         (-[WKView _removeTrackingRects:count:]):
743         (-[WKView view:stringForToolTip:point:userData:]):
744         (-[WKView _toolTipChangedFrom:to:]):
745         (-[WKView _setAcceleratedCompositingModeRootLayer:]): Deleted.
746         (-[WKView _acceleratedCompositingModeRootLayer]): Deleted.
747         (takeWindowSnapshot): Deleted.
748         * UIProcess/Cocoa/WebViewImpl.h:
749         * UIProcess/Cocoa/WebViewImpl.mm:
750         (WebKit::WebViewImpl::addTrackingRect):
751         (WebKit::WebViewImpl::addTrackingRectWithTrackingNum):
752         (WebKit::WebViewImpl::addTrackingRectsWithTrackingNums):
753         (WebKit::WebViewImpl::removeTrackingRect):
754         (WebKit::WebViewImpl::removeTrackingRects):
755         (WebKit::WebViewImpl::sendToolTipMouseExited):
756         (WebKit::WebViewImpl::sendToolTipMouseEntered):
757         (WebKit::WebViewImpl::stringForToolTip):
758         (WebKit::WebViewImpl::toolTipChanged):
759         Move tooltip code.
760
761 2015-10-23  Tim Horton  <timothy_horton@apple.com>
762
763         WKView being inside WKWebView leads to weird API issues
764         https://bugs.webkit.org/show_bug.cgi?id=150174
765
766         Reviewed by Anders Carlsson.
767
768         * UIProcess/API/mac/WKView.mm:
769         (-[WKView _interpretKeyEvent:completionHandler:]):
770         (-[WKView inputContext]):
771         (-[WKView performKeyEquivalent:]):
772         (-[WKView keyDown:]):
773         (-[WKView _doneWithKeyEvent:eventWasHandled:]):
774         (-[WKView _setPluginComplexTextInputState:]): Deleted.
775         (-[WKView _disableComplexTextInputIfNecessary]): Deleted.
776         (-[WKView _handlePluginComplexTextInputKeyDown:]): Deleted.
777         (-[WKView _tryHandlePluginComplexTextInputKeyDown:]): Deleted.
778         (-[WKView _tryPostProcessPluginComplexTextInputKeyDown:]): Deleted.
779         (-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]): Deleted.
780         (-[WKView _setPluginComplexTextInputState:pluginComplexTextInputIdentifier:]): Deleted.
781         * UIProcess/API/mac/WKViewInternal.h:
782         * UIProcess/Cocoa/WebViewImpl.h:
783         (WebKit::WebViewImpl::pluginComplexTextInputState):
784         (WebKit::WebViewImpl::pluginComplexTextInputIdentifier):
785         * UIProcess/Cocoa/WebViewImpl.mm:
786         (WebKit::WebViewImpl::setPluginComplexTextInputState):
787         (WebKit::WebViewImpl::setPluginComplexTextInputStateAndIdentifier):
788         (WebKit::WebViewImpl::disableComplexTextInputIfNecessary):
789         (WebKit::WebViewImpl::handlePluginComplexTextInputKeyDown):
790         (WebKit::WebViewImpl::tryHandlePluginComplexTextInputKeyDown):
791         (WebKit::WebViewImpl::pluginFocusOrWindowFocusChanged):
792         (WebKit::WebViewImpl::tryPostProcessPluginComplexTextInputKeyDown):
793         * UIProcess/mac/PageClientImpl.mm:
794         (WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged):
795         (WebKit::PageClientImpl::setPluginComplexTextInputState):
796         Move a few more methods.
797
798 2015-10-23  Eric Carlson  <eric.carlson@apple.com>
799
800         [MediaStream] Fix UserMediaPermissionRequestProxy::invalidate
801         https://bugs.webkit.org/show_bug.cgi?id=150503
802         <rdar://problem/23235386>
803
804         Reviewed by Dean Jackson.
805
806         * UIProcess/UserMediaPermissionRequestProxy.cpp:
807         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): m_manager is a pointer.
808         (WebKit::UserMediaPermissionRequestProxy::allow): Return early if m_manager is null, clear it after
809           calling the manager.
810         (WebKit::UserMediaPermissionRequestProxy::deny): Ditto.
811         (WebKit::UserMediaPermissionRequestProxy::invalidate): Clear m_manager.
812         * UIProcess/UserMediaPermissionRequestProxy.h: Change m_manager from a reference to a
813           pointer so it can be cleared.
814
815 2015-10-23  Claudio Saavedra  <csaavedra@igalia.com>
816
817         [GTK] Minor web editor fixes
818         https://bugs.webkit.org/show_bug.cgi?id=150501
819
820         Reviewed by Carlos Garcia Campos.
821
822         * UIProcess/gtk/KeyBindingTranslator.cpp: Remove
823         "MoveParagraphForward/Backward" as these commands do not exist in
824         WebKit (anymore?).
825         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
826         (WebKit::WebEditorClient::executePendingEditorCommands):
827         Editor::Command can take a String, no need to convert to a C char.
828
829 2015-10-23  Timothy Horton  <timothy_horton@apple.com>
830
831         Fix the build by unapplying review comments.
832
833         * UIProcess/Cocoa/WebViewImpl.h:
834
835 2015-10-23  Tim Horton  <timothy_horton@apple.com>
836
837         WKView being inside WKWebView leads to weird API issues
838         https://bugs.webkit.org/show_bug.cgi?id=150174
839
840         Reviewed by Anders Carlsson.
841
842         * UIProcess/API/mac/WKView.mm:
843         (-[WKView renewGState]):
844         (-[WKView writeSelectionToPasteboard:types:]):
845         (-[WKView centerSelectionInVisibleArea:]):
846         (-[WKView scrollWheel:]):
847         (-[WKView swipeWithEvent:]):
848         (-[WKView mouseMoved:]):
849         (-[WKView mouseDown:]):
850         (-[WKView mouseUp:]):
851         (-[WKView mouseDragged:]):
852         (-[WKView pressureChangeWithEvent:]):
853         (-[WKView acceptsFirstMouse:]):
854         (-[WKView shouldDelayWindowOrderingForEvent:]):
855         (-[WKView performKeyEquivalent:]):
856         (-[WKView keyUp:]):
857         (-[WKView keyDown:]):
858         (-[WKView flagsChanged:]):
859         (-[WKView _superQuickLookWithEvent:]):
860         (-[WKView _addFontPanelObserver]):
861         (-[WKView viewWillMoveToWindow:]):
862         (-[WKView viewDidMoveToWindow]):
863         (-[WKView viewDidChangeBackingProperties]):
864         (-[WKView enableAccessibilityIfNecessary]):
865         (-[WKView quickLookWithEvent:]):
866         (-[WKView _colorSpace]):
867         (-[WKView _didRelaunchProcess]):
868         (-[WKView _setTextIndicator:]):
869         (-[WKView _setTextIndicator:withLifetime:]):
870         (-[WKView _clearTextIndicatorWithAnimation:]):
871         (-[WKView _setTextIndicatorAnimationProgress:]):
872         (-[WKView initWithFrame:processPool:configuration:webView:]):
873         (-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
874         (-[WKView _internalImmediateActionAnimationControllerForHitTestResult:withType:userData:]):
875         (-[WKView _internalPrepareForImmediateActionAnimation]):
876         (-[WKView _internalCancelImmediateActionAnimation]):
877         (-[WKView _internalCompleteImmediateActionAnimation]):
878         (-[WKView _internalDismissContentRelativeChildWindowsWithAnimation:]):
879         (-[WKView beginDeferringViewInWindowChanges]):
880         (-[WKView endDeferringViewInWindowChanges]):
881         (-[WKView endDeferringViewInWindowChangesSync]):
882         (-[WKView _prepareForMoveToWindow:withCompletionHandler:]):
883         (-[WKView isDeferringViewInWindowChanges]):
884         (-[WKView allowsLinkPreview]):
885         (-[WKView setAllowsLinkPreview:]):
886         (-[WKView _setIgnoresAllEvents:]):
887         (-[WKView _setIgnoresNonWheelMouseEvents:]):
888         (-[WKView _setIgnoresNonWheelEvents:]):
889         (-[WKView _ignoresNonWheelEvents]):
890         (-[WKView _ignoresAllEvents]):
891         (-[WKView _setOverrideDeviceScaleFactor:]):
892         (-[WKView _overrideDeviceScaleFactor]):
893         (-[WKView _setTopContentInset:]):
894         (-[WKView _topContentInset]):
895         (-[WKView _dismissContentRelativeChildWindows]):
896         (-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
897         (-[WKView _setAutomaticallyAdjustsContentInsets:]):
898         (-[WKView _automaticallyAdjustsContentInsets]):
899         (-[WKWindowVisibilityObserver initWithView:]): Deleted.
900         (-[WKWindowVisibilityObserver startObserving:]): Deleted.
901         (-[WKWindowVisibilityObserver stopObserving:]): Deleted.
902         (-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]): Deleted.
903         (-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]): Deleted.
904         (-[WKView dealloc]): Deleted.
905         (-[WKView _updateWindowAndViewFrames]): Deleted.
906         (-[WKView updateFontPanelIfNeeded]): Deleted.
907         (-[WKView _selectionChanged]): Deleted.
908         (-[WKView addWindowObserversForWindow:]): Deleted.
909         (-[WKView removeWindowObservers]): Deleted.
910         (-[WKView doWindowDidChangeScreen]): Deleted.
911         (-[WKView _windowDidBecomeKey:]): Deleted.
912         (-[WKView _windowDidChangeScreen:]): Deleted.
913         (-[WKView _windowDidChangeLayerHosting:]): Deleted.
914         (-[WKView _windowDidResignKey:]): Deleted.
915         (-[WKView _windowDidMiniaturize:]): Deleted.
916         (-[WKView _windowDidDeminiaturize:]): Deleted.
917         (-[WKView _windowDidMove:]): Deleted.
918         (-[WKView _windowDidResize:]): Deleted.
919         (-[WKView _windowDidOrderOffScreen:]): Deleted.
920         (-[WKView _windowDidOrderOnScreen:]): Deleted.
921         (-[WKView _windowDidChangeBackingProperties:]): Deleted.
922         (-[WKView _windowDidChangeOcclusionState:]): Deleted.
923         (-[WKView _prepareForDictionaryLookup]): Deleted.
924         (-[WKView _dictionaryLookupPopoverWillClose:]): Deleted.
925         (-[WKView _accessibilityRegisterUIProcessTokens]): Deleted.
926         (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): Deleted.
927         (-[WKView _intrinsicDeviceScaleFactor]): Deleted.
928         (-[WKView _preferencesDidChange]): Deleted.
929         (-[WKView _targetWindowForMovePreparation]): Deleted.
930         (-[WKView _updateContentInsetsIfAutomatic]): Deleted.
931         (-[WKView observeValueForKeyPath:ofObject:change:context:]): Deleted.
932         (-[WKView _dispatchSetTopContentInset]): Deleted.
933         * UIProcess/API/mac/WKViewInternal.h:
934         * UIProcess/Cocoa/WebViewImpl.h:
935         (WebKit::WebViewImpl::automaticallyAdjustsContentInsets):
936         (WebKit::WebViewImpl::topContentInset):
937         (WebKit::WebViewImpl::overrideDeviceScaleFactor):
938         (WebKit::WebViewImpl::isDeferringViewInWindowChanges):
939         (WebKit::WebViewImpl::targetWindowForMovePreparation):
940         (WebKit::WebViewImpl::lastPressureEvent):
941         (WebKit::WebViewImpl::allowsLinkPreview):
942         (WebKit::WebViewImpl::ignoresNonWheelEvents):
943         (WebKit::WebViewImpl::ignoresAllEvents):
944         (WebKit::WebViewImpl::createWeakPtr):
945         * UIProcess/Cocoa/WebViewImpl.mm:
946         (SOFT_LINK_CONSTANT_MAY_FAIL):
947         (-[WKWindowVisibilityObserver initWithView:impl:]):
948         (-[WKWindowVisibilityObserver dealloc]):
949         (-[WKWindowVisibilityObserver startObserving:]):
950         (-[WKWindowVisibilityObserver stopObserving:]):
951         (-[WKWindowVisibilityObserver startObservingFontPanel]):
952         (-[WKWindowVisibilityObserver startObservingLookupDismissal]):
953         (-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]):
954         (-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]):
955         (-[WKWindowVisibilityObserver _windowDidBecomeKey:]):
956         (-[WKWindowVisibilityObserver _windowDidResignKey:]):
957         (-[WKWindowVisibilityObserver _windowDidMiniaturize:]):
958         (-[WKWindowVisibilityObserver _windowDidDeminiaturize:]):
959         (-[WKWindowVisibilityObserver _windowDidMove:]):
960         (-[WKWindowVisibilityObserver _windowDidResize:]):
961         (-[WKWindowVisibilityObserver _windowDidChangeBackingProperties:]):
962         (-[WKWindowVisibilityObserver _windowDidChangeScreen:]):
963         (-[WKWindowVisibilityObserver _windowDidChangeLayerHosting:]):
964         (-[WKWindowVisibilityObserver _windowDidChangeOcclusionState:]):
965         (-[WKWindowVisibilityObserver observeValueForKeyPath:ofObject:change:context:]):
966         (-[WKWindowVisibilityObserver _dictionaryLookupPopoverWillClose:]):
967         (-[WKEditCommandObjC initWithWebEditCommandProxy:]):
968         (-[WKEditCommandObjC command]):
969         (-[WKEditorUndoTargetObjC undoEditing:]):
970         (-[WKEditorUndoTargetObjC redoEditing:]):
971         (WebKit::WebViewImpl::WebViewImpl):
972         (WebKit::WebViewImpl::~WebViewImpl):
973         (WebKit::WebViewImpl::becomeFirstResponder):
974         (WebKit::WebViewImpl::resignFirstResponder):
975         (WebKit::WebViewImpl::renewGState):
976         (WebKit::WebViewImpl::updateWindowAndViewFrames):
977         (WebKit::WebViewImpl::setAutomaticallyAdjustsContentInsets):
978         (WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
979         (WebKit::WebViewImpl::setTopContentInset):
980         (WebKit::WebViewImpl::dispatchSetTopContentInset):
981         (WebKit::WebViewImpl::setOverrideDeviceScaleFactor):
982         (WebKit::WebViewImpl::intrinsicDeviceScaleFactor):
983         (WebKit::WebViewImpl::windowDidOrderOffScreen):
984         (WebKit::WebViewImpl::windowDidOrderOnScreen):
985         (WebKit::WebViewImpl::windowDidBecomeKey):
986         (WebKit::WebViewImpl::windowDidResignKey):
987         (WebKit::WebViewImpl::windowDidMiniaturize):
988         (WebKit::WebViewImpl::windowDidDeminiaturize):
989         (WebKit::WebViewImpl::windowDidMove):
990         (WebKit::WebViewImpl::windowDidResize):
991         (WebKit::WebViewImpl::windowDidChangeBackingProperties):
992         (WebKit::WebViewImpl::windowDidChangeScreen):
993         (WebKit::WebViewImpl::windowDidChangeLayerHosting):
994         (WebKit::WebViewImpl::windowDidChangeOcclusionState):
995         (WebKit::WebViewImpl::viewWillMoveToWindow):
996         (WebKit::WebViewImpl::viewDidMoveToWindow):
997         (WebKit::WebViewImpl::viewDidChangeBackingProperties):
998         (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
999         (WebKit::WebViewImpl::colorSpace):
1000         (WebKit::WebViewImpl::beginDeferringViewInWindowChanges):
1001         (WebKit::WebViewImpl::endDeferringViewInWindowChanges):
1002         (WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
1003         (WebKit::WebViewImpl::prepareForMoveToWindow):
1004         (WebKit::WebViewImpl::pressureChangeWithEvent):
1005         (WebKit::WebViewImpl::isEditable):
1006         (WebKit::WebViewImpl::executeEditCommand):
1007         (WebKit::WebViewImpl::registerEditCommand):
1008         (WebKit::WebViewImpl::clearAllEditCommands):
1009         (WebKit::WebViewImpl::writeSelectionToPasteboard):
1010         (WebKit::WebViewImpl::centerSelectionInVisibleArea):
1011         (WebKit::WebViewImpl::selectionDidChange):
1012         (WebKit::WebViewImpl::startObservingFontPanel):
1013         (WebKit::WebViewImpl::updateFontPanelIfNeeded):
1014         (WebKit::WebViewImpl::preferencesDidChange):
1015         (WebKit::WebViewImpl::setTextIndicator):
1016         (WebKit::WebViewImpl::clearTextIndicatorWithAnimation):
1017         (WebKit::WebViewImpl::setTextIndicatorAnimationProgress):
1018         (WebKit::WebViewImpl::dismissContentRelativeChildWindows):
1019         (WebKit::WebViewImpl::quickLookWithEvent):
1020         (WebKit::WebViewImpl::prepareForDictionaryLookup):
1021         (WebKit::WebViewImpl::setAllowsLinkPreview):
1022         (WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResult):
1023         (WebKit::WebViewImpl::prepareForImmediateActionAnimation):
1024         (WebKit::WebViewImpl::cancelImmediateActionAnimation):
1025         (WebKit::WebViewImpl::completeImmediateActionAnimation):
1026         (WebKit::WebViewImpl::setIgnoresNonWheelEvents):
1027         (WebKit::WebViewImpl::setIgnoresAllEvents):
1028         (WebKit::WebViewImpl::accessibilityRegisterUIProcessTokens):
1029         * UIProcess/mac/PageClientImpl.h:
1030         * UIProcess/mac/PageClientImpl.mm:
1031         (WebKit::PageClientImpl::activeWindow):
1032         (WebKit::PageClientImpl::preferencesDidChange):
1033         (WebKit::PageClientImpl::registerEditCommand):
1034         (WebKit::PageClientImpl::clearAllEditCommands):
1035         (WebKit::PageClientImpl::selectionDidChange):
1036         (WebKit::PageClientImpl::didPerformDictionaryLookup):
1037         (-[WKEditCommandObjC initWithWebEditCommandProxy:]): Deleted.
1038         (-[WKEditCommandObjC command]): Deleted.
1039         (-[WKEditorUndoTargetObjC undoEditing:]): Deleted.
1040         (-[WKEditorUndoTargetObjC redoEditing:]): Deleted.
1041         (WebKit::PageClientImpl::PageClientImpl): Deleted.
1042         Move more things to WebViewImpl.
1043         This also introduces an unfortunate pattern that is required for things which
1044         clients override on WKView, where we have a flow like this:
1045                 - somebody (PageClient, etc.) calls WebViewImpl::x
1046                 - WebViewImpl::x does nothing except call [WKView _x]
1047                 - [WKView _x] calls WebViewImpl::xFromViewOnly, which does the real work
1048         As long as no clients call the -FromViewOnly variant, this will mean that
1049         all callers are bottlenecked through the overridable WKView method.
1050         How this works with WKWebView, I am not sure yet.
1051
1052         * UIProcess/mac/WKImmediateActionController.h:
1053         * UIProcess/mac/WKImmediateActionController.mm:
1054         (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]):
1055         (-[WKImmediateActionController willDestroyView:]):
1056         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
1057         (-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
1058         (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
1059         (-[WKImmediateActionController menuItem:viewAtScreenPoint:]):
1060         (-[WKImmediateActionController menuItem:previewItemAtPoint:]):
1061         (-[WKImmediateActionController menuItem:itemFrameForPoint:]):
1062         (-[WKImmediateActionController menuItem:maxSizeForPoint:]):
1063         (-[WKImmediateActionController _animationControllerForDataDetectedText]):
1064         (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
1065         (-[WKImmediateActionController _animationControllerForText]):
1066         (-[WKImmediateActionController initWithPage:view:recognizer:]): Deleted.
1067         Keep a generic NSView, use the WebViewImpl for WK*View related things.
1068
1069 2015-10-22  Joonghun Park  <jh718.park@samsung.com>
1070
1071         [GTK] Fix build break since r191471
1072         https://bugs.webkit.org/show_bug.cgi?id=150487
1073
1074         Reviewed by Žan Doberšek.
1075
1076         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
1077         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1078         (WebKit::WebContextMenuProxyGtk::populate):
1079
1080 2015-10-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1081
1082         [EFL] Build break since r191472 and r191473
1083         https://bugs.webkit.org/show_bug.cgi?id=150485
1084
1085         Unreviewed build fix.
1086
1087         * CMakeLists.txt: Remove icu include path and move page include path.
1088
1089 2015-10-22  Sam Weinig  <sam@webkit.org>
1090
1091         Navigations on the same host (but with different schemes and ports) should not trigger universal links
1092         <rdar://problem/22811325>
1093         https://bugs.webkit.org/show_bug.cgi?id=150481
1094
1095         Reviewed by Dan Bernstein.
1096
1097         Update the policy for following universal links to only take host into consideration.
1098
1099         * UIProcess/API/C/WKPage.cpp:
1100         (WKPageSetPageUIClient):
1101         * UIProcess/Cocoa/UIDelegate.mm:
1102         (WebKit::UIDelegate::UIClient::createNewPage):
1103         * UIProcess/WebPageProxy.cpp:
1104         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1105         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1106         (WebKit::WebPageProxy::createNewPage):
1107         (WebKit::WebPageProxy::showPage):
1108
1109 2015-10-22  Anders Carlsson  <andersca@apple.com>
1110
1111         Simplify menu creation
1112         https://bugs.webkit.org/show_bug.cgi?id=150476
1113
1114         Reviewed by Tim Horton.
1115
1116         Instead of creating vectors of NSMenuItem objects, just simply build the menu recursively.
1117
1118         * UIProcess/mac/WebContextMenuProxyMac.h:
1119         * UIProcess/mac/WebContextMenuProxyMac.mm:
1120         (WebKit::WebContextMenuProxyMac::createContextMenuFromItems):
1121         (WebKit::WebContextMenuProxyMac::createContextMenuItem):
1122         (WebKit::WebContextMenuProxyMac::showContextMenu):
1123         (WebKit::populateNSMenu): Deleted.
1124         (WebKit::nsMenuItem): Deleted.
1125         (WebKit::nsMenuItemVector): Deleted.
1126
1127 2015-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1128
1129         ERROR: Unhandled web process message 'StorageAreaMap:DispatchStorageEvent'
1130         https://bugs.webkit.org/show_bug.cgi?id=150315
1131
1132         Reviewed by Andreas Kling.
1133
1134         It was introduced in r184930, that keeps the session storage area
1135         maps alive in the UI process when they are destroyed by the web
1136         process. The problem is that we also keep the listeners, so that
1137         events are also dispatched to the listeners of destroyed areas,
1138         and the message handlers were removed in the web process.
1139
1140         * UIProcess/Storage/StorageManager.cpp:
1141         (WebKit::StorageManager::createTransientLocalStorageMap): Add a
1142         listener for the new storage map ID when the map is reused.
1143         (WebKit::StorageManager::destroyStorageMap): Always remove
1144         listeners of destroyed maps.
1145
1146 2015-10-22  Tim Horton  <timothy_horton@apple.com>
1147
1148         Add a SPI variant of loadData that accepts user data to WKWebView
1149         https://bugs.webkit.org/show_bug.cgi?id=150475
1150
1151         Reviewed by Anders Carlsson.
1152
1153         * UIProcess/API/Cocoa/WKWebView.mm:
1154         (-[WKWebView _loadData:MIMEType:characterEncodingName:baseURL:userData:]):
1155         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1156
1157 2015-10-22  Alex Christensen  <achristensen@webkit.org>
1158
1159         Progress towards CMake on Mac
1160         https://bugs.webkit.org/show_bug.cgi?id=150466
1161
1162         Reviewed by Chris Dumez.
1163
1164         * CMakeLists.txt:
1165         * PlatformMac.cmake:
1166         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1167
1168 2015-10-22  Anders Carlsson  <andersca@apple.com>
1169
1170         NativeContextMenuItem isn't needed anymore, remove it
1171         https://bugs.webkit.org/show_bug.cgi?id=150473
1172
1173         Reviewed by Tim Horton.
1174
1175         * PlatformEfl.cmake:
1176         * PlatformGTK.cmake:
1177         * Shared/NativeContextMenuItem.h: Removed.
1178         (WebKit::NativeContextMenuItem::~NativeContextMenuItem): Deleted.
1179         (WebKit::NativeContextMenuItem::nsMenuItem): Deleted.
1180         * Shared/WebContextMenuItem.cpp:
1181         (WebKit::WebContextMenuItem::WebContextMenuItem): Deleted.
1182         * Shared/WebContextMenuItem.h:
1183         (WebKit::WebContextMenuItem::create): Deleted.
1184         (WebKit::WebContextMenuItem::nativeContextMenuItem): Deleted.
1185         * Shared/efl/NativeContextMenuItemEfl.cpp: Removed.
1186         (WebKit::NativeContextMenuItem::NativeContextMenuItem): Deleted.
1187         * Shared/gtk/NativeContextMenuItemGtk.cpp: Removed.
1188         (WebKit::NativeContextMenuItem::NativeContextMenuItem): Deleted.
1189         * Shared/mac/NativeContextMenuItem.mm: Removed.
1190         (WebKit::NativeContextMenuItem::NativeContextMenuItem): Deleted.
1191         * UIProcess/mac/WebContextMenuProxyMac.mm:
1192         (WebKit::nsMenuItem): Deleted.
1193         * WebKit2.xcodeproj/project.pbxproj:
1194
1195 2015-10-22  Anders Carlsson  <andersca@apple.com>
1196
1197         CTTE WebContextMenuItemData
1198         https://bugs.webkit.org/show_bug.cgi?id=150471
1199
1200         Reviewed by Tim Horton.
1201
1202         * Shared/API/c/WKContextMenuItem.cpp:
1203         (WKContextMenuItemGetTag):
1204         (WKContextMenuItemGetType):
1205         (WKContextMenuItemCopyTitle):
1206         (WKContextMenuItemGetEnabled):
1207         (WKContextMenuItemGetChecked):
1208         * Shared/WebContextMenuItem.cpp:
1209         (WebKit::WebContextMenuItem::create):
1210         * Shared/WebContextMenuItem.h:
1211         (WebKit::WebContextMenuItem::data):
1212         * UIProcess/API/C/WKPage.cpp:
1213         (WKPageSelectContextMenuItem):
1214         * UIProcess/mac/WebContextMenuProxyMac.mm:
1215         (WebKit::nsMenuItem):
1216         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1217         (WKBundlePageClickMenuItem):
1218         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
1219         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
1220
1221 2015-10-22  Anders Carlsson  <andersca@apple.com>
1222
1223         Handle nil menu items.
1224
1225         * UIProcess/mac/WebContextMenuProxyMac.mm:
1226         (WebKit::nsMenuItemVector):
1227
1228 2015-10-22  Anders Carlsson  <andersca@apple.com>
1229
1230         Wait to convert the share menu item to a real share menu until after calling out to the client
1231         https://bugs.webkit.org/show_bug.cgi?id=150465
1232
1233         Reviewed by Tim Horton.
1234
1235         This will let us simplify more code in upcoming patches.
1236
1237         * UIProcess/mac/WebContextMenuProxyMac.h:
1238         * UIProcess/mac/WebContextMenuProxyMac.mm:
1239         (WebKit::nsMenuItem):
1240         (WebKit::nsMenuItemVector):
1241         (WebKit::WebContextMenuProxyMac::showContextMenu):
1242
1243 2015-10-22  Myles C. Maxfield  <mmaxfield@apple.com>
1244
1245         [Cocoa] Migrate WKSetPatternPhaseInUserSpace() and WKGetUserToBaseCTM() from WKSI
1246         https://bugs.webkit.org/show_bug.cgi?id=150460
1247
1248         Reviewed by Tim Horton.
1249
1250         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1251         (InitWebCoreSystemInterface): Deleted.
1252
1253 2015-10-22  Alex Christensen  <achristensen@webkit.org>
1254
1255         Initial NSURLSession WebResourceLoader implementation
1256         https://bugs.webkit.org/show_bug.cgi?id=150355
1257
1258         Reviewed by Antti Koivisto.
1259
1260         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1261         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
1262         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
1263         * NetworkProcess/NetworkResourceLoader.cpp:
1264         (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
1265         (WebKit::NetworkResourceLoader::startNetworkLoad):
1266         (WebKit::NetworkResourceLoader::setDefersLoading):
1267         (WebKit::NetworkResourceLoader::cleanup):
1268         (WebKit::NetworkResourceLoader::didConvertHandleToDownload):
1269         (WebKit::NetworkResourceLoader::abort):
1270         (WebKit::NetworkResourceLoader::willPerformHTTPRedirection):
1271         (WebKit::NetworkResourceLoader::didReceiveChallenge):
1272         (WebKit::NetworkResourceLoader::didReceiveResponse):
1273         (WebKit::NetworkResourceLoader::didReceiveData):
1274         (WebKit::NetworkResourceLoader::didCompleteWithError):
1275         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
1276         (WebKit::NetworkResourceLoader::willSendRequestAsync):
1277         (WebKit::NetworkResourceLoader::continueWillSendRequest):
1278         (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
1279         (WebKit::NetworkResourceLoader::didSendData):
1280         (WebKit::NetworkResourceLoader::receivedCancellation):
1281         (WebKit::NetworkResourceLoader::startBufferingTimerIfNeeded):
1282         (WebKit::NetworkResourceLoader::bufferingTimerFired):
1283         (WebKit::NetworkResourceLoader::validateCacheEntry):
1284         (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
1285         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
1286         (WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
1287         (WebKit::NetworkResourceLoader::supportsDataArray):
1288         * NetworkProcess/NetworkResourceLoader.h:
1289         (WebKit::NetworkResourceLoader::create):
1290         (WebKit::NetworkResourceLoader::currentRequest):
1291         (WebKit::NetworkResourceLoader::handle):
1292         * NetworkProcess/NetworkSession.h: Added.
1293         (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
1294         (WebKit::NetworkingDataTask::client):
1295         (WebKit::NetworkingDataTask::clearClient):
1296         (WebKit::NetworkSession::~NetworkSession):
1297         * NetworkProcess/cocoa/NetworkSessionCocoa.mm: Added.
1298         (toNSURLSessionResponseDisposition):
1299         (toNSURLSessionAuthChallengeDisposition):
1300         (-[NetworkSessionDelegate initWithNetworkSession:]):
1301         (-[NetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
1302         (-[NetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
1303         (-[NetworkSessionDelegate URLSession:task:didCompleteWithError:]):
1304         (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
1305         (-[NetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
1306         (WebKit::NetworkSession::create):
1307         (WebKit::NetworkSession::singleton):
1308         (WebKit::configurationForType):
1309         (WebKit::NetworkSession::NetworkSession):
1310         (WebKit::NetworkSession::createDataTaskWithRequest):
1311         (WebKit::NetworkSession::dataTaskForIdentifier):
1312         (WebKit::NetworkingDataTask::NetworkingDataTask):
1313         (WebKit::NetworkingDataTask::~NetworkingDataTask):
1314         (WebKit::NetworkingDataTask::suspend):
1315         (WebKit::NetworkingDataTask::resume):
1316         (WebKit::NetworkingDataTask::taskIdentifier):
1317         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
1318         (WebKit::NetworkResourceLoader::willCacheResponseAsync):
1319         * WebKit2.xcodeproj/project.pbxproj:
1320         * config.h:
1321
1322 2015-10-22  Philippe Normand  <pnormand@igalia.com>
1323
1324         Unreviewed, GTK build fix for disabled redirected XComposite window support.
1325
1326         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Add USE(REDIRECTED_XCOMPOSITE_WINDOW) guards.
1327         * UIProcess/DrawingAreaProxyImpl.h: Mark virtual methods as override to avoid compilation warnings.
1328
1329 2015-10-22  Wenson Hsieh  <wenson_hsieh@apple.com>
1330
1331         Implement touch-action: manipulation; for iOS
1332         https://bugs.webkit.org/show_bug.cgi?id=149854
1333         <rdar://problem/23017145>
1334
1335         Reviewed by Benjamin Poulain.
1336
1337         Implements the manipulation value for the CSS property touch-action. Performs hit-testing upon receiving a potential
1338         tap to determine whether to disable double-tap gesture recognition over the duration of the tap. If so, sends a message
1339         from the web process to the UI process indicating that double-tapping should be disabled, allowing single taps to
1340         avoid the delay.
1341
1342         * WebProcess/WebPage/ios/WebPageIOS.mm:
1343         (WebKit::WebPage::potentialTapAtPosition):
1344
1345 2015-10-22  Ryosuke Niwa  <rniwa@webkit.org>
1346
1347         REGRESSION (r181972): Scroll position changes to top of youtube page when switching tabs
1348         https://bugs.webkit.org/show_bug.cgi?id=150428
1349
1350         Reviewed by Antti Koivisto.
1351
1352         Call updateFocusAppearance with RevealMode::DoNotReveal to avoid revealing the focused element.
1353
1354         * WebProcess/WebPage/WebPage.cpp:
1355         (WebKit::WebPage::restoreSelectionInFocusedEditableElement):
1356
1357 2015-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1358
1359         Unreviewed. Fix a crash in GTk+ after r191402.
1360
1361         Since r191402 WebContextMenuProxy is no longer refcounted, and
1362         std::unique_ptr is used instead. This means that when we show the
1363         context menu for the second time in a web view, a new
1364         WebContextMenuProxy is created and the previous one is
1365         destroyed. We were setting the active context menu of the WebView
1366         in the constructor of WebContextMenuProxy, and unsetting it in the
1367         destructor. Now the constructor of the new WebContextMenuProxy
1368         happens before the destructor of the current one that unsets the
1369         WebView active context menu. This patch simply makes the web view
1370         unset its active context menu when it's unmapped and a new one
1371         hasn't been set.
1372
1373         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1374         (activeContextMenuUnmapped):
1375         (webkitWebViewBaseSetActiveContextMenuProxy):
1376         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1377         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
1378
1379 2015-10-22  Hunseop Jeong  <hs85.jeong@samsung.com>
1380
1381         [GTK] Try to fix the build after r191402.
1382         https://bugs.webkit.org/show_bug.cgi?id=150435
1383
1384         Reviewed by Carlos Garcia Campos.
1385
1386         * UIProcess/API/gtk/PageClientImpl.cpp:
1387         (WebKit::PageClientImpl::createPopupMenuProxy):
1388         (WebKit::PageClientImpl::createContextMenuProxy):
1389         (WebKit::PageClientImpl::createColorPicker):
1390         * UIProcess/API/gtk/PageClientImpl.h:
1391         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1392         (WebKit::WebContextMenuProxyGtk::populate):
1393         (WebKit::WebContextMenuProxyGtk::show):
1394         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
1395         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
1396         (WebKit::WebContextMenuProxyGtk::menuPositionFunction):
1397         (WebKit::WebContextMenuProxyGtk::showContextMenu): Deleted.
1398         (WebKit::WebContextMenuProxyGtk::hideContextMenu): Deleted.
1399         (WebKit::WebContextMenuProxyGtk::cancelTracking): Deleted.
1400         * UIProcess/gtk/WebContextMenuProxyGtk.h:
1401         (WebKit::WebContextMenuProxyGtk::gtkMenu):
1402         (WebKit::WebContextMenuProxyGtk::create): Deleted.
1403
1404 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1405
1406        Unreviewed EFL build fix. Remove customizeMenu implementation.
1407
1408         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1409         (WebKit::WebContextMenuClient::customizeMenu): Deleted.
1410
1411 2015-10-21  Alex Christensen  <achristensen@webkit.org>
1412
1413         Speculative EFL build fix.
1414
1415         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
1416         Remove another customizeMenu call.
1417
1418 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1419
1420         [EFL][GTK][WK2] Fix build break since r191402, r191401
1421         https://bugs.webkit.org/show_bug.cgi?id=150432
1422
1423         Unreviewed EFL and GTK build fix.
1424
1425         * CMakeLists.txt:
1426         * UIProcess/CoordinatedGraphics/WebView.cpp:
1427         (WebKit::WebView::createContextMenuProxy):
1428         * UIProcess/CoordinatedGraphics/WebView.h:
1429         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
1430         (WebKit::WebContextMenuProxyEfl::show):
1431         * UIProcess/efl/WebContextMenuProxyEfl.h:
1432         (WebKit::WebContextMenuProxyEfl::create): Deleted.
1433         * UIProcess/efl/WebViewEfl.cpp:
1434         (WebKit::WebViewEfl::createContextMenuProxy):
1435         * UIProcess/efl/WebViewEfl.h:
1436         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1437         (WebKit::WebContextMenuClient::customizeMenu):
1438         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
1439
1440 2015-10-21  Anders Carlsson  <andersca@apple.com>
1441
1442         Get rid of WebContextMenuClient::customizeMenu, it's no longer used
1443         https://bugs.webkit.org/show_bug.cgi?id=150427
1444
1445         Reviewed by Tim Horton.
1446
1447         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1448         (WebKit::WebContextMenuClient::customizeMenu): Deleted.
1449         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
1450
1451 2015-10-21  Tim Horton  <timothy_horton@apple.com>
1452
1453         API-ify the FindMatches client
1454         https://bugs.webkit.org/show_bug.cgi?id=150422
1455
1456         Reviewed by Anders Carlsson.
1457
1458         * UIProcess/API/APIFindMatchesClient.h: Renamed from Source/WebKit2/UIProcess/WebFindClient.h.
1459         (API::FindMatchesClient::~FindMatchesClient):
1460         (API::FindMatchesClient::didFindStringMatches):
1461         (API::FindMatchesClient::didGetImageForMatchResult):
1462         * UIProcess/API/C/WKPage.cpp:
1463         (WKPageSetPageFindMatchesClient):
1464         * UIProcess/WebFindClient.cpp: Removed.
1465         * UIProcess/WebPageProxy.cpp:
1466         (WebKit::WebPageProxy::WebPageProxy):
1467         (WebKit::WebPageProxy::setFindMatchesClient):
1468         (WebKit::WebPageProxy::close):
1469         (WebKit::WebPageProxy::didGetImageForFindMatch):
1470         (WebKit::WebPageProxy::didFindStringMatches):
1471         (WebKit::WebPageProxy::initializeFindMatchesClient): Deleted.
1472         * UIProcess/WebPageProxy.h:
1473         (WebKit::WebPageProxy::findMatchesClient):
1474         * WebKit2.xcodeproj/project.pbxproj:
1475
1476 2015-10-21  Enrica Casucci  <enrica@apple.com>
1477
1478         WebProcess crashes when accessibility bundle is not found.
1479         https://bugs.webkit.org/show_bug.cgi?id=150414
1480
1481         Reviewed by Dan Bernstein.
1482
1483         The uninitialized pointer to NSError causes the print function to crash.
1484
1485         * WebProcess/cocoa/WebProcessCocoa.mm:
1486         (WebKit::registerWithAccessibility):
1487
1488 2015-10-21  Anders Carlsson  <andersca@apple.com>
1489
1490         Move services menu handling out into a separate function
1491         https://bugs.webkit.org/show_bug.cgi?id=150420
1492
1493         Reviewed by Tim Horton.
1494
1495         * UIProcess/mac/WebContextMenuProxyMac.h:
1496         * UIProcess/mac/WebContextMenuProxyMac.mm:
1497         (WebKit::WebContextMenuProxyMac::showServicesMenu):
1498         (WebKit::WebContextMenuProxyMac::show):
1499         (WebKit::WebContextMenuProxyMac::showContextMenu):
1500         (WebKit::WebContextMenuProxyMac::populate): Deleted.
1501
1502 2015-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>
1503
1504         Single tapping clickable elements in unscalable pages should show a tap highlight
1505         https://bugs.webkit.org/show_bug.cgi?id=150382
1506
1507         Reviewed by Simon Fraser.
1508
1509         When the double tap gesture recognizer is disabled ahead of time (as in the case of unscalable pages) the tap is
1510         committed before the geometries come in. To fix this, we introduce a flag that allows the single tap to be
1511         committed before the tap highlight arrives. This allows the tap highlight to be immediately animated when receiving
1512         the tap highlight geometries only in the case where double tapping is disabled when recognizing the single tap.
1513
1514         * UIProcess/ios/WKContentViewInteraction.h:
1515         * UIProcess/ios/WKContentViewInteraction.mm:
1516         (-[WKContentView setupInteraction]):
1517         (-[WKContentView cleanupInteraction]):
1518         (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
1519         (-[WKContentView _singleTapRecognized:]):
1520         (-[WKContentView _singleTapCommited:]):
1521
1522 2015-10-21  Anders Carlsson  <andersca@apple.com>
1523
1524         Get rid of useBinaryEncoding from WKPageGetContentsAsMHTMLData
1525         https://bugs.webkit.org/show_bug.cgi?id=150417
1526
1527         Reviewed by Tim Horton.
1528
1529         The useBinaryEncoding parameter is always false, so just get rid of it.
1530
1531         * UIProcess/API/C/WKPage.cpp:
1532         (WKPageGetContentsAsMHTMLData):
1533         * UIProcess/API/C/WKPage.h:
1534         * UIProcess/API/efl/ewk_view.cpp:
1535         (ewk_view_page_contents_get):
1536         * UIProcess/API/gtk/WebKitWebView.cpp:
1537         (webkit_web_view_save):
1538         (webkit_web_view_save_to_file):
1539         * UIProcess/WebPageProxy.cpp:
1540         (WebKit::WebPageProxy::getContentsAsMHTMLData):
1541         * UIProcess/WebPageProxy.h:
1542         * WebProcess/WebPage/WebPage.cpp:
1543         (WebKit::WebPage::getContentsAsMHTMLData):
1544         * WebProcess/WebPage/WebPage.h:
1545         * WebProcess/WebPage/WebPage.messages.in:
1546
1547 2015-10-21  Anders Carlsson  <andersca@apple.com>
1548
1549         WebContextMenuProxyMac::setupServicesMenu doesn't need to take a context parameter
1550         https://bugs.webkit.org/show_bug.cgi?id=150418
1551
1552         Reviewed by Tim Horton.
1553
1554         * UIProcess/mac/WebContextMenuProxyMac.h:
1555         * UIProcess/mac/WebContextMenuProxyMac.mm:
1556         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
1557         (WebKit::WebContextMenuProxyMac::populate):
1558
1559 2015-10-21  Anders Carlsson  <andersca@apple.com>
1560
1561         WebContextMenuProxy doesn't have to be ref-counted
1562         https://bugs.webkit.org/show_bug.cgi?id=150415
1563
1564         Reviewed by Tim Horton.
1565
1566         Change WebContextMenuProxy to not inherit from RefCounted. Instead of using RefPtr, use std::unique_ptr.
1567         Get rid of cancelTracking and hideContextMenu and dismiss the menu whenever the menu proxy is destroyed.
1568         Also, rename showContextMenu to show.
1569
1570         * UIProcess/PageClient.h:
1571         * UIProcess/WebContextMenuProxy.h:
1572         (WebKit::WebContextMenuProxy::cancelTracking): Deleted.
1573         * UIProcess/WebPageProxy.cpp:
1574         (WebKit::WebPageProxy::close):
1575         (WebKit::WebPageProxy::internalShowContextMenu):
1576         * UIProcess/WebPageProxy.h:
1577         * UIProcess/ios/PageClientImplIOS.h:
1578         * UIProcess/ios/PageClientImplIOS.mm:
1579         (WebKit::PageClientImpl::createContextMenuProxy):
1580         * UIProcess/mac/PageClientImpl.h:
1581         * UIProcess/mac/PageClientImpl.mm:
1582         (WebKit::PageClientImpl::createContextMenuProxy):
1583         * UIProcess/mac/WebContextMenuProxyMac.h:
1584         (WebKit::WebContextMenuProxyMac::create): Deleted.
1585         * UIProcess/mac/WebContextMenuProxyMac.mm:
1586         (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
1587         (WebKit::WebContextMenuProxyMac::show):
1588         (WebKit::WebContextMenuProxyMac::showContextMenu): Deleted.
1589         (WebKit::WebContextMenuProxyMac::hideContextMenu): Deleted.
1590         (WebKit::WebContextMenuProxyMac::cancelTracking): Deleted.
1591
1592 2015-10-21  Anders Carlsson  <andersca@apple.com>
1593
1594         Stop using a popup menu button cell(!) for context menus
1595         https://bugs.webkit.org/show_bug.cgi?id=150413
1596
1597         Reviewed by Tim Horton.
1598
1599         Just use a regular NSMenu. Also, have the service menu code path store the service menu
1600         in the same member variable.
1601
1602         * UIProcess/mac/WebContextMenuProxyMac.h:
1603         * UIProcess/mac/WebContextMenuProxyMac.mm:
1604         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
1605         (WebKit::WebContextMenuProxyMac::clearServicesMenu):
1606         (WebKit::WebContextMenuProxyMac::populate):
1607         (WebKit::WebContextMenuProxyMac::showContextMenu):
1608         (WebKit::WebContextMenuProxyMac::hideContextMenu):
1609         (WebKit::WebContextMenuProxyMac::cancelTracking):
1610         (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac): Deleted.
1611
1612 2015-10-21  Chris Dumez  <cdumez@apple.com>
1613
1614         Add assertions to NetworkCache::Entry constructor to make sure a key's type is "resource"
1615         https://bugs.webkit.org/show_bug.cgi?id=150369
1616
1617         Reviewed by Antti Koivisto.
1618
1619         Add assertions to NetworkCache::Entry constructor to make sure a key's
1620         type is "resource" now that the NetworkCache storage supports other
1621         types of entries.
1622
1623         * NetworkProcess/cache/NetworkCacheEntry.cpp:
1624         (WebKit::NetworkCache::Entry::Entry):
1625
1626 2015-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1627
1628         NetworkProcess: DNS prefetch happens in the Web Process
1629         https://bugs.webkit.org/show_bug.cgi?id=147824
1630
1631         Reviewed by Chris Dumez.
1632
1633         DNS prefetch requests started in the WebProcess should be sent to
1634         the network process when it's enabled.
1635
1636         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1637         (WebKit::NetworkConnectionToWebProcess::prefetchDNS): Use NetworkProcess::prefetchDNS().
1638         * NetworkProcess/NetworkConnectionToWebProcess.h:
1639         * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Add
1640         PrefetchDNS message.
1641         * NetworkProcess/NetworkProcess.cpp:
1642         (WebKit::NetworkProcess::prefetchDNS): Do the actual DNS prefetch.
1643         * NetworkProcess/NetworkProcess.h:
1644         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
1645         (webkitWebExtensionDidReceiveMessage): Use WebProcess::prefetchDNS().
1646         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1647         (WebKit::WebFrameLoaderClient::prefetchDNS): Use WebProcess::prefetchDNS().
1648         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1649         * WebProcess/WebPage/ios/WebPageIOS.mm:
1650         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Use
1651         FrameLoaderClient to do the DNS prefetch.
1652         * WebProcess/WebProcess.cpp:
1653         (WebKit::WebProcess::WebProcess): Initialize the DNS prefetched
1654         hosts cleanup hysteresis activity. Clear the cache of DNS
1655         prefetched when hysteresis activity stopped.
1656         (WebKit::WebProcess::prefetchDNS): Send the request to the network
1657         process if it's enabled, otherwise do the actual DNS prefetch.
1658         * WebProcess/WebProcess.h:
1659
1660 2015-10-20  Chris Dumez  <cdumez@apple.com>
1661
1662         [WK2] Generalize NetworkCacheStorage API so it can store different types of metadata
1663         https://bugs.webkit.org/show_bug.cgi?id=150221
1664         <rdar://problem/23149771>
1665
1666         Reviewed by Darin Adler and Antti Koivisto.
1667
1668         Generalize NetworkCacheStorage API so it can store different types of
1669         metadata alongside the network resources. This is a pre-requirement to
1670         making our NetworkCache smarter by storing information about the
1671         resources.
1672
1673         To keep the code simple, the entry type is now part of the entry key and
1674         we store records of a specific type in a 'type' subfolder. The cache
1675         structure looks like so:
1676         - WebKitCache/Version 5/[Partition]/[Type]/[Hash]
1677         - WebKitCache/Version 5/[Partition]/[Type]/[Hash]-blob (Optional)
1678
1679         Existing cache entries now that the 'resource' type as these are network
1680         resources.
1681
1682         * NetworkProcess/cache/NetworkCache.cpp:
1683         * NetworkProcess/cache/NetworkCacheKey.cpp:
1684         * NetworkProcess/cache/NetworkCacheKey.h:
1685         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1686         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1687         * NetworkProcess/cache/NetworkCacheStorage.h:
1688
1689 2015-10-20  Hunseop Jeong  <hs85.jeong@samsung.com>
1690
1691         [EFL] ContextMenu doesn't work correctly on MiniBrowser after r191194.
1692         https://bugs.webkit.org/show_bug.cgi?id=150311
1693
1694         Reviewed by Gyuyoung Kim.
1695
1696         Restore the test_ewk2_context_menu API test to check the context menu whether it works correctly.
1697
1698         * PlatformEfl.cmake:
1699
1700 2015-10-13  Conrad Shultz  <conrad_shultz@apple.com>
1701
1702         _WKThumbnailView should support a snapshot-only mode
1703         https://bugs.webkit.org/show_bug.cgi?id=150106
1704
1705         Reviewed by Tim Horton.
1706
1707         Add a new property to _WKThumbnailView, exclusivelyUsesSnapshot, which causes _WKThumbnailView
1708         to bypass both layer tree reparenting and event suppression on the associated WKView.
1709
1710         Add a new method, -requestSnapshot, which clients can use to force _WKThumbnailView to refresh
1711         on demand.
1712
1713         * UIProcess/API/Cocoa/_WKThumbnailView.h:
1714         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
1715         (-[_WKThumbnailView requestSnapshot]):
1716         Extracted from -_requestSnapshotIfNeeded:.
1717         (-[_WKThumbnailView _viewWasUnparented]):
1718         (-[_WKThumbnailView _viewWasParented]):
1719         (-[_WKThumbnailView _requestSnapshotIfNeeded]):
1720
1721 2015-10-20  Alexey Proskuryakov  <ap@apple.com>
1722
1723         Build fix.
1724
1725         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
1726         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1727
1728 2015-10-20  Joseph Pecoraro  <pecoraro@apple.com>
1729
1730         ASSERT when right clicking on SVG Image generating Share menu - can break Web Inspector
1731         https://bugs.webkit.org/show_bug.cgi?id=150374
1732
1733         Reviewed by Brian Burg.
1734
1735         When there is no absolute URL or downloadable media URL no system share
1736         menu is created, but we were still appending the null context menu to
1737         the list of context menu items.
1738
1739         * UIProcess/mac/WebContextMenuProxyMac.mm:
1740         (WebKit::WebContextMenuProxyMac::shareMenuItem):
1741         Bail early if the context menu is null.
1742
1743         (WebKit::WebContextMenuProxyMac::showContextMenu):
1744         Only append the share context menu item if it is non-null.
1745         This matches ContextMenuController.cpp in WebCore.
1746
1747 2015-10-20  Commit Queue  <commit-queue@webkit.org>
1748
1749         Unreviewed, rolling out r191306.
1750         https://bugs.webkit.org/show_bug.cgi?id=150371
1751
1752         "May have caused a significant warm PLT regression" (Requested
1753         by cdumez_ on #webkit).
1754
1755         Reverted changeset:
1756
1757         "[WK2] Generalize NetworkCacheStorage API so it can store
1758         different types of metadata"
1759         https://bugs.webkit.org/show_bug.cgi?id=150221
1760         http://trac.webkit.org/changeset/191306
1761
1762 2015-10-20  Tim Horton  <timothy_horton@apple.com>
1763
1764         Try to fix the build by disabling MAC_GESTURE_EVENTS on 10.9 and 10.10
1765
1766         * Configurations/FeatureDefines.xcconfig:
1767
1768 2015-10-20  Commit Queue  <commit-queue@webkit.org>
1769
1770         Unreviewed, rolling out r191333.
1771         https://bugs.webkit.org/show_bug.cgi?id=150362
1772
1773         Caused assertions on regression tests (Requested by ap on
1774         #webkit).
1775
1776         Reverted changeset:
1777
1778         "ERROR: Unhandled web process message
1779         'StorageAreaMap:DispatchStorageEvent'"
1780         https://bugs.webkit.org/show_bug.cgi?id=150315
1781         http://trac.webkit.org/changeset/191333
1782
1783 2015-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1784
1785         [UNIX] ASSERTION FAILED: m_shouldWaitForSyncReplies in Connection::connectionDidClose()
1786         https://bugs.webkit.org/show_bug.cgi?id=150361
1787
1788         Reviewed by Martin Robinson.
1789
1790         It doesn't always happen because it depends on how sockets are
1791         closed, and the state of the threads. The problem is that we are
1792         not handling the case when the read fails because we closed the
1793         connection. In that case we log the error and call
1794         Connection::connectionDidClose(). But it was connectionDidClose()
1795         the one closing the socket. So, in this particular case it's not an
1796         error but a normal termination, and we shouldn't try to close the
1797         connection again. Something similar can happen while sending a
1798         message, and we get a broken pipe error, but in that case we are
1799         only printing the error, so it's harmless.
1800
1801         * Platform/IPC/unix/ConnectionUnix.cpp:
1802         (IPC::Connection::readyReadHandler): Only print error and call
1803         connectionDidClose() if we are still connected when read fails.
1804         (IPC::Connection::sendOutgoingMessage): Only print error if we are
1805         still connected when send fails.
1806
1807 2015-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1808
1809         [GTK] Graphics corruption when entering/leaving AC mode quickly
1810         https://bugs.webkit.org/show_bug.cgi?id=150323
1811
1812         Reviewed by Mario Sanchez Prada.
1813
1814         The UI process is notified when entering accelerated compositing
1815         mode after the layers have been flushed and rendered to avoid
1816         flickering. However, this is producing flickering in the GTK+
1817         port, because we use an offscreen redirected window that is
1818         resized to a minimium size to save memory when not in AC mode. The
1819         web process always uses the current size of the redirected window,
1820         so when entering AC mode, contents are rendered into the 1x1
1821         window, then the UI process is notified, the redirected window is
1822         resized to its actual size, and we force a resize to ask the web
1823         process to render again, now at the correct size. Rendering at 1x1
1824         and then resizing the window is what produces the flickering when
1825         entering AC mode, but it's also inefficient, since we need to
1826         render again after the redirected window is resized. So, this
1827         patch adds a WillEnterAcceleratedCompositing message that is sent
1828         to the UI process when the layer tree host is created but before
1829         the contents have been composited and rendered. This is
1830         implemented by the GTK+ port to prepare for entering AC mode, by
1831         resizing the redirected window. When we actually enter AC mode,
1832         the contents have already been rendered in the web process at the
1833         correct size, so we can just use the redirected window surface
1834         instead of the drawing area one, and paint in the web view without
1835         any flickering. We no longer need the forceResize either.
1836         When leaving accelerated compositing mode, we now clear the redirected
1837         window resources after a short delay. This ensures that we have
1838         already rendered the update sent in the ExitAcceleratedCompositingMode
1839         message, but also that entering/leaving AC mode quickly doesn't
1840         produce any redirected window resize.
1841
1842         * UIProcess/API/gtk/PageClientImpl.cpp:
1843         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
1844         * UIProcess/API/gtk/PageClientImpl.h:
1845         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1846         (webkitWebViewBaseClearRedirectedWindowSoon):
1847         (webkitWebViewBaseWillEnterAcceleratedCompositingMode):
1848         (webkitWebViewBaseEnterAcceleratedCompositingMode):
1849         (webkitWebViewBaseExitAcceleratedCompositingMode):
1850         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
1851         * UIProcess/CoordinatedGraphics/WebView.h:
1852         * UIProcess/DrawingAreaProxy.h:
1853         (WebKit::DrawingAreaProxy::willEnterAcceleratedCompositingMode):
1854         * UIProcess/DrawingAreaProxy.messages.in:
1855         * UIProcess/DrawingAreaProxyImpl.cpp:
1856         (WebKit::DrawingAreaProxyImpl::willEnterAcceleratedCompositingMode):
1857         * UIProcess/DrawingAreaProxyImpl.h:
1858         (WebKit::DrawingAreaProxyImpl::forceResize): Deleted.
1859         * UIProcess/PageClient.h:
1860         * UIProcess/WebPageProxy.cpp:
1861         (WebKit::WebPageProxy::willEnterAcceleratedCompositingMode):
1862         * UIProcess/WebPageProxy.h:
1863         * UIProcess/ios/PageClientImplIOS.h:
1864         * UIProcess/ios/PageClientImplIOS.mm:
1865         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
1866         * UIProcess/mac/PageClientImpl.h:
1867         * UIProcess/mac/PageClientImpl.mm:
1868         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
1869         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1870         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
1871
1872 2015-10-20  Sergio Villar Senin  <svillar@igalia.com>
1873
1874         [GTK] Fix build for ENABLE_PLUGIN_PROCESS_GTK2=OFF
1875         https://bugs.webkit.org/show_bug.cgi?id=150086
1876
1877         Reviewed by Darin Adler.
1878
1879         * UIProcess/cairo/BackingStoreCairo.cpp:
1880         (WebKit::BackingStore::createBackend):
1881
1882 2015-10-20  Yoav Weiss  <yoav@yoav.ws>
1883
1884         Rename the PICTURE_SIZES flag to CURRENTSRC
1885         https://bugs.webkit.org/show_bug.cgi?id=150275
1886
1887         Reviewed by Dean Jackson.
1888
1889         * Configurations/FeatureDefines.xcconfig:
1890
1891 2015-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1892
1893         ERROR: Unhandled web process message 'StorageAreaMap:DispatchStorageEvent'
1894         https://bugs.webkit.org/show_bug.cgi?id=150315
1895
1896         Reviewed by Andreas Kling.
1897
1898         It was introduced in r184930, that keeps the session storage area
1899         maps alive in the UI process when they are destroyed by the web
1900         process. The problem is that we also keep the listeners, so that
1901         events are also dispatched to the listeners of destroyed areas,
1902         and the message handlers were removed in the web process.
1903
1904         * UIProcess/Storage/StorageManager.cpp:
1905         (WebKit::StorageManager::createTransientLocalStorageMap): Add a
1906         listener for the new storage map ID when the map is reused.
1907         (WebKit::StorageManager::destroyStorageMap): Always remove
1908         listeners of destroyed maps.
1909
1910 2015-10-19  Tim Horton  <timothy_horton@apple.com>
1911
1912         Remove unused support for long presses from WebKit
1913         https://bugs.webkit.org/show_bug.cgi?id=150345
1914
1915         Reviewed by Beth Dakin.
1916
1917         * Shared/WebPreferencesDefinitions.h:
1918         * UIProcess/API/APIUIClient.h:
1919         (API::UIClient::didBeginTrackingPotentialLongMousePress): Deleted.
1920         (API::UIClient::didRecognizeLongMousePress): Deleted.
1921         (API::UIClient::didCancelTrackingPotentialLongMousePress): Deleted.
1922         * UIProcess/API/C/WKPage.cpp:
1923         (WKPageSetPageUIClient): Deleted.
1924         * UIProcess/API/C/WKPageUIClient.h:
1925         * UIProcess/API/C/WKPreferences.cpp:
1926         (WKPreferencesGetLongMousePressEnabled):
1927         (WKPreferencesSetLongMousePressEnabled): Deleted.
1928         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1929         * UIProcess/WebPageProxy.cpp:
1930         (WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress): Deleted.
1931         (WebKit::WebPageProxy::didRecognizeLongMousePress): Deleted.
1932         (WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress): Deleted.
1933         * UIProcess/WebPageProxy.h:
1934         * UIProcess/WebPageProxy.messages.in:
1935         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
1936         (API::InjectedBundle::PageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
1937         (API::InjectedBundle::PageUIClient::didRecognizeLongMousePress): Deleted.
1938         (API::InjectedBundle::PageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
1939         * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
1940         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1941         (WebKit::InjectedBundlePageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
1942         (WebKit::InjectedBundlePageUIClient::didRecognizeLongMousePress): Deleted.
1943         (WebKit::InjectedBundlePageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
1944         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
1945         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1946         (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress): Deleted.
1947         (WebKit::WebChromeClient::didRecognizeLongMousePress): Deleted.
1948         (WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress): Deleted.
1949         * WebProcess/WebCoreSupport/WebChromeClient.h:
1950         * WebProcess/WebPage/WebPage.cpp:
1951         (WebKit::WebPage::updatePreferences): Deleted.
1952
1953 2015-10-19  Chris Dumez  <cdumez@apple.com>
1954
1955         Make sure development Safari does not delete the stable Safari cache storage.
1956         https://bugs.webkit.org/show_bug.cgi?id=150343
1957
1958         Reviewed by Antti Koivisto.
1959
1960         Make sure development Safari does not delete the stable Safari disk cache
1961         storage. Development Safari now uses Version 5, while the last stable
1962         Safari uses Version 4. Since the 2 versions can co-exist, it is best not
1963         to drop the old cache version (4) at this point.
1964
1965         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1966         (WebKit::NetworkCache::Storage::deleteOldVersions):
1967
1968 2015-10-19  Tim Horton  <timothy_horton@apple.com>
1969
1970         WKView being inside WKWebView leads to weird API issues
1971         https://bugs.webkit.org/show_bug.cgi?id=150174
1972
1973         Reviewed by Darin Adler.
1974
1975         * UIProcess/API/mac/WKView.mm:
1976         * UIProcess/API/mac/WKViewInternal.h:
1977         * UIProcess/Cocoa/WebViewImpl.h: Added.
1978         * UIProcess/Cocoa/WebViewImpl.mm: Added.
1979         (WebKit::WebViewImpl::WebViewImpl):
1980         (WebKit::WebViewImpl::~WebViewImpl):
1981         (WebKit::WebViewImpl::setDrawsBackground):
1982         (WebKit::WebViewImpl::drawsBackground):
1983         (WebKit::WebViewImpl::setDrawsTransparentBackground):
1984         (WebKit::WebViewImpl::drawsTransparentBackground):
1985         (WebKit::WebViewImpl::acceptsFirstResponder):
1986         (WebKit::WebViewImpl::becomeFirstResponder):
1987         (WebKit::WebViewImpl::resignFirstResponder):
1988         (WebKit::WebViewImpl::isFocused):
1989         (WebKit::WebViewImpl::viewWillStartLiveResize):
1990         (WebKit::WebViewImpl::viewDidEndLiveResize):
1991         (WebKit::WebViewImpl::setFrameSize):
1992         (WebKit::WebViewImpl::disableFrameSizeUpdates):
1993         (WebKit::WebViewImpl::enableFrameSizeUpdates):
1994         (WebKit::WebViewImpl::frameSizeUpdatesDisabled):
1995         (WebKit::WebViewImpl::setFrameAndScrollBy):
1996         (WebKit::WebViewImpl::setFixedLayoutSize):
1997         (WebKit::WebViewImpl::fixedLayoutSize):
1998         (WebKit::WebViewImpl::setDrawingAreaSize):
1999         (WebKit::WebViewImpl::setContentPreparationRect):
2000         (WebKit::WebViewImpl::updateViewExposedRect):
2001         (WebKit::WebViewImpl::setClipsToVisibleRect):
2002         (WebKit::WebViewImpl::setIntrinsicContentSize):
2003         (WebKit::WebViewImpl::intrinsicContentSize):
2004         (WebKit::WebViewImpl::setViewScale):
2005         (WebKit::WebViewImpl::viewScale):
2006         (WebKit::WebViewImpl::layoutMode):
2007         (WebKit::WebViewImpl::setLayoutMode):
2008         (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
2009         (WebKit::WebViewImpl::updateSupportsArbitraryLayoutModes):
2010         (WebKit::WebViewImpl::updateSecureInputState):
2011         (WebKit::WebViewImpl::resetSecureInputState):
2012         (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
2013         (WebKit::WebViewImpl::hasFullScreenWindowController):
2014         (WebKit::WebViewImpl::fullScreenWindowController):
2015         (WebKit::WebViewImpl::closeFullScreenWindowController):
2016         (WebKit::WebViewImpl::fullScreenPlaceholderView):
2017         (WebKit::WebViewImpl::createFullScreenWindow):
2018         Move the actual implementation of a number of WKView methods into a
2019         C++ class, WebViewImpl, which WKView calls directly into.
2020         Eventually, we will move all of the logic of WKView into WebViewImpl,
2021         and then duplicate the necessary forwarding in WKWebView and remove
2022         WKWebView's inner WKView.
2023
2024         * UIProcess/mac/PageClientImpl.h:
2025         * UIProcess/mac/PageClientImpl.mm:
2026         (WebKit::PageClientImpl::isViewFocused):
2027         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
2028         (WebKit::PageClientImpl::updateSecureInputState):
2029         (WebKit::PageClientImpl::resetSecureInputState):
2030         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
2031         (WebKit::PageClientImpl::beganEnterFullScreen):
2032         (WebKit::PageClientImpl::beganExitFullScreen):
2033         For now, forward PageClient requests that can be answered by WebViewImpl
2034         to WebViewImpl. Eventually, we'll probably fold PageClientImpl and WebViewImpl
2035         together into one class, and these things will collapse down.
2036
2037         * UIProcess/mac/WKFullScreenWindowController.h:
2038         * UIProcess/mac/WKFullScreenWindowController.mm:
2039         (-[WKFullScreenWindowController initWithWindow:webView:page:]):
2040         (-[WKFullScreenWindowController enterFullScreen:]):
2041         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
2042         (-[WKFullScreenWindowController exitFullScreen]):
2043         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2044         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
2045         (-[WKFullScreenWindowController _manager]):
2046         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
2047         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
2048         (-[WKFullScreenWindowController initWithWindow:webView:]): Deleted.
2049         (-[WKFullScreenWindowController _page]): Deleted.
2050         * UIProcess/mac/WKViewLayoutStrategy.h:
2051         * UIProcess/mac/WKViewLayoutStrategy.mm:
2052         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]):
2053         (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]):
2054         (-[WKViewLayoutStrategy invalidate]):
2055         (-[WKViewLayoutStrategy didChangeFrameSize]):
2056         (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
2057         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
2058         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]):
2059         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
2060         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
2061         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
2062         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]): Deleted.
2063         (-[WKViewLayoutStrategy initWithPage:view:mode:]): Deleted.
2064         (-[WKViewLayoutStrategy willDestroyView:]): Deleted.
2065         (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
2066         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
2067         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]): Deleted.
2068         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
2069         Make WKViewLayoutStrategy and WKFullScreenWindowController operate in terms of generic
2070         NSViews instead of WKView, so that eventually they will be able to work for either
2071         WKView or WKWebView, and so that they can sit underneath WebViewImpl.
2072
2073         * WebKit2.xcodeproj/project.pbxproj:
2074
2075 2015-10-19  Commit Queue  <commit-queue@webkit.org>
2076
2077         Unreviewed, rolling out r191307.
2078         https://bugs.webkit.org/show_bug.cgi?id=150338
2079
2080         broke lots of API tests, need time to figure out whats up
2081         (Requested by thorton on #webkit).
2082
2083         Reverted changeset:
2084
2085         "WKView being inside WKWebView leads to weird API issues"
2086         https://bugs.webkit.org/show_bug.cgi?id=150174
2087         http://trac.webkit.org/changeset/191307
2088
2089 2015-10-19  Tim Horton  <timothy_horton@apple.com>
2090
2091         Try again to fix the 32-bit build.
2092
2093         * UIProcess/mac/WebContextMenuProxyMac.mm:
2094         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2095
2096 2015-10-17  Wenson Hsieh  <wenson_hsieh@apple.com>
2097
2098         Extend fast-clicking behavior to trigger on elements that have negligible zoom
2099         https://bugs.webkit.org/show_bug.cgi?id=150248
2100         <rdar://problem/23140069>
2101
2102         Reviewed by Simon Fraser.
2103
2104         Currently, fast-clicking only triggers on pages that have unscalable viewports. To allow more websites to benefit from fast-clicking
2105         behavior, we generalize fast-clicking to also occur when tapping on elements for which double-tap-to-zoom would zoom the element in
2106         or out by an insignificant amount. We define an insignificant amount of zoom to mean that zooming would increase the viewport scale
2107         by less than a configurable threshold, or decrease the viewport scale by more than a configurable threshold. We accomplish this by
2108         temporarily disabling the double tap gesture recognizer for the duration of the tap. This patch refactors some logic used to compute
2109         zoomed viewports to make it possible to predict the change in viewport scale when double tapping to zoom. See the changes in
2110         SmartMagnificationController and ViewGestureGeometryCollector for more details.
2111
2112         There are no new tests, since this patch does not change existing behavior. Instead, this patch adds the machinery needed for zoom-
2113         dependent fast-clicking: by setting the preferences WebKitFastClickingEnabled and WebKitFastClickZoomThreshold, we will be able to tweak
2114         the behavior dynamically.
2115
2116         * UIProcess/API/Cocoa/WKWebView.mm:
2117         (-[WKWebView _didCommitLayerTree:]):
2118         (-[WKWebView _contentZoomScale]):
2119         (-[WKWebView _targetContentZoomScaleForRect:currentScale:fitEntireRect:minimumScale:maximumScale:]):
2120         (-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
2121         (-[WKWebView _viewportIsUserScalable]):
2122         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2123         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2124         * UIProcess/PageClient.h:
2125         * UIProcess/WebPageProxy.h:
2126         * UIProcess/WebPageProxy.messages.in:
2127         * UIProcess/ios/PageClientImplIOS.h:
2128         * UIProcess/ios/PageClientImplIOS.mm:
2129         (WebKit::PageClientImpl::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary):
2130         * UIProcess/ios/SmartMagnificationController.h:
2131         * UIProcess/ios/SmartMagnificationController.mm:
2132         (WebKit::SmartMagnificationController::adjustSmartMagnificationTargetRectAndZoomScales):
2133         (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
2134         (WebKit::SmartMagnificationController::magnify):
2135         * UIProcess/ios/WKContentViewInteraction.h:
2136         * UIProcess/ios/WKContentViewInteraction.mm:
2137         (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
2138         (-[WKContentView _fastClickZoomThreshold]):
2139         (-[WKContentView _allowDoubleTapToZoomForCurrentZoomScale:andTargetZoomScale:]):
2140         (-[WKContentView _disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:allowsDoubleTapZoom:targetRect:isReplaced:minimumScale:maximumScale:]):
2141         (-[WKContentView _highlightLongPressRecognized:]):
2142         (-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
2143         (-[WKContentView _singleTapRecognized:]):
2144         (cancelPotentialTapIfNecessary):
2145         (-[WKContentView _singleTapCommited:]):
2146         (-[WKContentView webSelectionRects]): Deleted.
2147         * UIProcess/ios/WebPageProxyIOS.mm:
2148         (WebKit::WebPageProxy::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary):
2149         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
2150         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
2151         (WebKit::ViewGestureGeometryCollector::computeZoomInformationForNode):
2152         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
2153         * WebProcess/WebPage/ios/WebPageIOS.mm:
2154         (WebKit::WebPage::potentialTapAtPosition):
2155
2156 2015-10-19  Tim Horton  <timothy_horton@apple.com>
2157
2158         WKView being inside WKWebView leads to weird API issues
2159         https://bugs.webkit.org/show_bug.cgi?id=150174
2160
2161         Reviewed by Darin Adler.
2162
2163         * UIProcess/API/mac/WKView.mm:
2164         * UIProcess/API/mac/WKViewInternal.h:
2165         * UIProcess/Cocoa/WebViewImpl.h: Added.
2166         * UIProcess/Cocoa/WebViewImpl.mm: Added.
2167         (WebKit::WebViewImpl::WebViewImpl):
2168         (WebKit::WebViewImpl::~WebViewImpl):
2169         (WebKit::WebViewImpl::setDrawsBackground):
2170         (WebKit::WebViewImpl::drawsBackground):
2171         (WebKit::WebViewImpl::setDrawsTransparentBackground):
2172         (WebKit::WebViewImpl::drawsTransparentBackground):
2173         (WebKit::WebViewImpl::acceptsFirstResponder):
2174         (WebKit::WebViewImpl::becomeFirstResponder):
2175         (WebKit::WebViewImpl::resignFirstResponder):
2176         (WebKit::WebViewImpl::isFocused):
2177         (WebKit::WebViewImpl::viewWillStartLiveResize):
2178         (WebKit::WebViewImpl::viewDidEndLiveResize):
2179         (WebKit::WebViewImpl::setFrameSize):
2180         (WebKit::WebViewImpl::disableFrameSizeUpdates):
2181         (WebKit::WebViewImpl::enableFrameSizeUpdates):
2182         (WebKit::WebViewImpl::frameSizeUpdatesDisabled):
2183         (WebKit::WebViewImpl::setFrameAndScrollBy):
2184         (WebKit::WebViewImpl::setFixedLayoutSize):
2185         (WebKit::WebViewImpl::fixedLayoutSize):
2186         (WebKit::WebViewImpl::setDrawingAreaSize):
2187         (WebKit::WebViewImpl::setContentPreparationRect):
2188         (WebKit::WebViewImpl::updateViewExposedRect):
2189         (WebKit::WebViewImpl::setClipsToVisibleRect):
2190         (WebKit::WebViewImpl::setIntrinsicContentSize):
2191         (WebKit::WebViewImpl::intrinsicContentSize):
2192         (WebKit::WebViewImpl::setViewScale):
2193         (WebKit::WebViewImpl::viewScale):
2194         (WebKit::WebViewImpl::layoutMode):
2195         (WebKit::WebViewImpl::setLayoutMode):
2196         (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
2197         (WebKit::WebViewImpl::updateSupportsArbitraryLayoutModes):
2198         (WebKit::WebViewImpl::updateSecureInputState):
2199         (WebKit::WebViewImpl::resetSecureInputState):
2200         (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
2201         (WebKit::WebViewImpl::hasFullScreenWindowController):
2202         (WebKit::WebViewImpl::fullScreenWindowController):
2203         (WebKit::WebViewImpl::closeFullScreenWindowController):
2204         (WebKit::WebViewImpl::fullScreenPlaceholderView):
2205         (WebKit::WebViewImpl::createFullScreenWindow):
2206         Move the actual implementation of a number of WKView methods into a
2207         C++ class, WebViewImpl, which WKView calls directly into.
2208         Eventually, we will move all of the logic of WKView into WebViewImpl,
2209         and then duplicate the necessary forwarding in WKWebView and remove
2210         WKWebView's inner WKView.
2211
2212         * UIProcess/mac/PageClientImpl.h:
2213         * UIProcess/mac/PageClientImpl.mm:
2214         (WebKit::PageClientImpl::isViewFocused):
2215         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
2216         (WebKit::PageClientImpl::updateSecureInputState):
2217         (WebKit::PageClientImpl::resetSecureInputState):
2218         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
2219         (WebKit::PageClientImpl::beganEnterFullScreen):
2220         (WebKit::PageClientImpl::beganExitFullScreen):
2221         For now, forward PageClient requests that can be answered by WebViewImpl
2222         to WebViewImpl. Eventually, we'll probably fold PageClientImpl and WebViewImpl
2223         together into one class, and these things will collapse down.
2224
2225         * UIProcess/mac/WKFullScreenWindowController.h:
2226         * UIProcess/mac/WKFullScreenWindowController.mm:
2227         (-[WKFullScreenWindowController initWithWindow:webView:page:]):
2228         (-[WKFullScreenWindowController enterFullScreen:]):
2229         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
2230         (-[WKFullScreenWindowController exitFullScreen]):
2231         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2232         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
2233         (-[WKFullScreenWindowController _manager]):
2234         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
2235         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
2236         (-[WKFullScreenWindowController initWithWindow:webView:]): Deleted.
2237         (-[WKFullScreenWindowController _page]): Deleted.
2238         * UIProcess/mac/WKViewLayoutStrategy.h:
2239         * UIProcess/mac/WKViewLayoutStrategy.mm:
2240         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]):
2241         (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]):
2242         (-[WKViewLayoutStrategy invalidate]):
2243         (-[WKViewLayoutStrategy didChangeFrameSize]):
2244         (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
2245         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
2246         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]):
2247         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
2248         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
2249         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
2250         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]): Deleted.
2251         (-[WKViewLayoutStrategy initWithPage:view:mode:]): Deleted.
2252         (-[WKViewLayoutStrategy willDestroyView:]): Deleted.
2253         (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
2254         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
2255         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]): Deleted.
2256         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
2257         Make WKViewLayoutStrategy and WKFullScreenWindowController operate in terms of generic
2258         NSViews instead of WKView, so that eventually they will be able to work for either
2259         WKView or WKWebView, and so that they can sit underneath WebViewImpl.
2260
2261         * WebKit2.xcodeproj/project.pbxproj:
2262
2263 2015-10-19  Chris Dumez  <cdumez@apple.com>
2264
2265         [WK2] Generalize NetworkCacheStorage API so it can store different types of metadata
2266         https://bugs.webkit.org/show_bug.cgi?id=150221
2267         <rdar://problem/23149771>
2268
2269         Reviewed by Darin Adler and Antti Koivisto.
2270
2271         Generalize NetworkCacheStorage API so it can store different types of
2272         metadata alongside the network resources. This is a pre-requirement to
2273         making our NetworkCache smarter by storing information about the
2274         resources.
2275
2276         To keep the code simple, the entry type is now part of the entry key and
2277         we store records of a specific type in a 'type' subfolder. The cache
2278         structure looks like so:
2279         - WebKitCache/Version 5/[Partition]/[Type]/[Hash]
2280         - WebKitCache/Version 5/[Partition]/[Type]/[Hash]-blob (Optional)
2281
2282         Existing cache entries now that the 'resource' type as these are network
2283         resources.
2284
2285         * NetworkProcess/cache/NetworkCache.cpp:
2286         * NetworkProcess/cache/NetworkCacheKey.cpp:
2287         * NetworkProcess/cache/NetworkCacheKey.h:
2288         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2289         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2290         * NetworkProcess/cache/NetworkCacheStorage.h:
2291
2292 2015-10-19  Tim Horton  <timothy_horton@apple.com>
2293
2294         Try to fix the iOS build
2295
2296         * Configurations/FeatureDefines.xcconfig:
2297
2298 2015-10-19  Tim Horton  <timothy_horton@apple.com>
2299
2300         Try to fix the 32-bit build.
2301
2302         * UIProcess/mac/WebContextMenuProxyMac.mm:
2303         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2304
2305 2015-10-16  Anders Carlsson  <andersca@apple.com>
2306
2307         Fix image service menus somewhat
2308         https://bugs.webkit.org/show_bug.cgi?id=150265
2309
2310         Reviewed by Tim Horton.
2311
2312         * Shared/ContextMenuContextData.cpp:
2313         (WebKit::ContextMenuContextData::ContextMenuContextData):
2314         It's a service menu if we have a controlled image.
2315
2316         * UIProcess/mac/WebContextMenuProxyMac.mm:
2317         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2318         Use an item provider.
2319
2320 2015-10-19  Tim Horton  <timothy_horton@apple.com>
2321
2322         Add magnify and rotate gesture event support for Mac
2323         https://bugs.webkit.org/show_bug.cgi?id=150179
2324         <rdar://problem/8036240>
2325
2326         Reviewed by Darin Adler.
2327
2328         * Configurations/FeatureDefines.xcconfig:
2329         New feature flag.
2330
2331         * Shared/NativeWebGestureEvent.h: Added.
2332         (WebKit::NativeWebGestureEvent::nativeEvent):
2333         * Shared/WebEvent.h:
2334         * Shared/WebEventConversion.cpp:
2335         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
2336         (WebKit::platform):
2337         * Shared/WebEventConversion.h:
2338         * Shared/mac/NativeWebGestureEventMac.mm: Added.
2339         (WebKit::webEventTypeForNSEvent):
2340         (WebKit::pointForEvent):
2341         (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
2342         Add and plumb a new native event that wraps a NSEvent of type
2343         NSEventTypeMagnify or NSEventTypeRotate (gesture events).
2344
2345         * Shared/mac/WebGestureEvent.cpp: Added.
2346         (WebKit::WebGestureEvent::encode):
2347         (WebKit::WebGestureEvent::decode):
2348         (WebKit::WebGestureEvent::isGestureEventType):
2349         * Shared/mac/WebGestureEvent.h: Added.
2350         (WebKit::WebGestureEvent::WebGestureEvent):
2351         (WebKit::WebGestureEvent::position):
2352         (WebKit::WebGestureEvent::gestureScale):
2353         (WebKit::WebGestureEvent::gestureRotation):
2354         Add IPC plumbing for WebGestureEvent, which becomes a WebCore::PlatformGestureEvent.
2355
2356         * UIProcess/API/Cocoa/WKViewPrivate.h:
2357         Remove unnecessary iPhone-only WKView code.
2358         Add _gestureEventWasNotHandledByWebCore, SPI which can be overridden
2359         to react when WebCore decides not to handle a gesture event.
2360
2361         * UIProcess/API/mac/WKView.mm:
2362         (-[WKView magnifyWithEvent:]):
2363         Route magnification gesture events to the page, unless we're already
2364         in an active view zoom gesture, in which case we'll bypass the page
2365         and send the event straight to ViewGestureController.
2366
2367         (-[WKView rotateWithEvent:]):
2368         Route rotation gesture events to the page.
2369
2370         (-[WKView _gestureEventWasNotHandledByWebCore:]):
2371         Let ViewGestureController know that WebCore didn't handle a gesture event.
2372         We always give WebCore the first crack at the event if we're not in a zoom,
2373         because it could preventDefault() on the Begin phase event, and that should
2374         prevent pinch-zoom from starting.
2375
2376         * UIProcess/PageClient.h:
2377         * UIProcess/mac/PageClientImpl.h:
2378         * UIProcess/mac/PageClientImpl.mm:
2379         (WebKit::PageClientImpl::gestureEventWasNotHandledByWebCore):
2380         Plumb gestureEventWasNotHandledByWebCore back from WebPageProxy to WKView.
2381
2382         * UIProcess/WebPageProxy.cpp:
2383         (WebKit::WebPageProxy::handleGestureEvent):
2384         (WebKit::WebPageProxy::didReceiveEvent):
2385         * UIProcess/WebPageProxy.h:
2386         Forward gesture events to EventDispatcher, and let WKView know when WebCore
2387         passes on handling them.
2388         
2389         * UIProcess/mac/ViewGestureController.h:
2390         (WebKit::ViewGestureController::hasActiveMagnificationGesture):
2391         * UIProcess/mac/ViewGestureControllerMac.mm:
2392         (WebKit::ViewGestureController::gestureEventWasNotHandledByWebCore):
2393         (WebKit::ViewGestureController::handleMagnificationGestureEvent):
2394         Don't try to start a zoom with anything other than a Begin phase event.
2395         Try to start a zoom with any events that WebCore doesn't handle.
2396         Move dispatch of endMagnificationGesture into ViewGestureController;
2397         there is no reason for that to be in WKView anymore.
2398
2399         * WebKit2.xcodeproj/project.pbxproj:
2400         * WebProcess/WebPage/EventDispatcher.cpp:
2401         (WebKit::EventDispatcher::gestureEvent):
2402         (WebKit::EventDispatcher::dispatchGestureEvent):
2403         * WebProcess/WebPage/EventDispatcher.h:
2404         * WebProcess/WebPage/EventDispatcher.messages.in:
2405         * WebProcess/WebPage/WebPage.cpp:
2406         (WebKit::handleGestureEvent):
2407         (WebKit::WebPage::gestureEvent):
2408         * WebProcess/WebPage/WebPage.h:
2409         Dispatch to the main thread and hand off the gesture event to WebCore,
2410         asynchronously informing the UI process of whether the event was handled or not.
2411
2412 2015-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2413
2414         [GTK] ASSERTION FAILED: parent in WebInspectorProxy::platformDetach()
2415         https://bugs.webkit.org/show_bug.cgi?id=150319
2416
2417         Reviewed by Žan Doberšek.
2418
2419         This happens when the inspector is shown/closed very
2420         quickly. Since we start the inspector attached by default, when
2421         the web inspector is created m_isAttached is set to true, so that
2422         when opened, it's attached to the view. If the inspector is closed
2423         before it has been actually attached, the inspector view doesn't
2424         have a parent, even if the m_isAttached is true. So, we should
2425         handle this case instead of asserting. This is what happens in
2426         test http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash.html.
2427
2428         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2429         (WebKit::WebInspectorProxy::platformDetach): Remove the view from
2430         its parent container if it was actually attached.
2431
2432 2015-10-19  Hunseop Jeong  <hs85.jeong@samsung.com>
2433
2434         [EFL] Implement WebContextMenuProxyEfl::showContextMenu after r191194
2435         https://bugs.webkit.org/show_bug.cgi?id=150310
2436
2437         Reviewed by Gyuyoung Kim.
2438
2439         showContextMenu() doesn't work correctly after r191194 in EFL port.
2440         This patch implements WebContextMenuProxyEfl::showContextMenu.
2441
2442         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
2443         (WebKit::WebContextMenuProxyEfl::WebContextMenuProxyEfl):
2444         (WebKit::WebContextMenuProxyEfl::showContextMenu):
2445         (WebKit::WebContextMenuProxyEfl::hideContextMenu):
2446         * UIProcess/efl/WebContextMenuProxyEfl.h:
2447
2448 2015-10-18  Csaba Osztrogonác  <ossy@webkit.org>
2449
2450         [WK2] Simplify unused return warning in WKRetainPtr.h
2451         https://bugs.webkit.org/show_bug.cgi?id=150173
2452
2453         Reviewed by Darin Adler.
2454
2455         * UIProcess/API/cpp/WKRetainPtr.h:
2456         (WebKit::__attribute__):
2457         (WebKit::adoptWK): Deleted.
2458
2459 2015-10-18  Csaba Osztrogonác  <ossy@webkit.org>
2460
2461         Fix the ENABLE(SECCOMP_FILTERS) build after r187030
2462         https://bugs.webkit.org/show_bug.cgi?id=150172
2463
2464         Reviewed by Alexey Proskuryakov.
2465
2466         * Shared/linux/SeccompFilters/Syscall.cpp:
2467         (WebKit::reportUnexpectedSyscall):
2468
2469 2015-10-18  Joonghun Park  <jh718.park@samsung.com>
2470
2471         [GTK] Remove WebKitContextMenu related missing annotation warnings
2472         https://bugs.webkit.org/show_bug.cgi?id=150299
2473
2474         Reviewed by Darin Adler.
2475
2476         The warnings occur currently because when executing g-ir-scanner,
2477         it doesn't consider WebKitContextMenu related .cpp files,
2478         but only .h files.
2479
2480         * PlatformGTK.cmake: Add WebKitContextMenu related cpp files.
2481
2482 2015-10-18  Myles C. Maxfield  <mmaxfield@apple.com>
2483
2484         Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
2485         https://bugs.webkit.org/show_bug.cgi?id=150287
2486
2487         Reviewed by Simon Fraser.
2488
2489         * Shared/WebProcessCreationParameters.cpp:
2490         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
2491         (WebKit::WebProcessCreationParameters::encode): Deleted.
2492         (WebKit::WebProcessCreationParameters::decode): Deleted.
2493         * Shared/WebProcessCreationParameters.h:
2494         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2495         (WebKit::registerUserDefaultsIfNeeded): Deleted.
2496         (WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
2497         * WebProcess/cocoa/WebProcessCocoa.mm:
2498         (WebKit::WebProcess::platformInitializeWebProcess): Deleted.
2499
2500 2015-10-18  Yusuke Suzuki  <utatane.tea@gmail.com>
2501
2502         [GTK] Implement WebContextMenuProxyGtk::showContextMenu after r191194
2503         https://bugs.webkit.org/show_bug.cgi?id=150276
2504
2505         Reviewed by Carlos Garcia Campos.
2506
2507         After r191194, showContextMenu signature becomes changed, and the implementation
2508         is moved from the generic file to the Mac port. It poses the compile error in GTK port.
2509         This patch implements WebContextMenuProxyGtk::showContextMenu. The logic is the same
2510         to the old one except for dropping SERVICE_CONTROLS support. This is because
2511         SERVICE_CONTROLS is not related to GTK.
2512
2513         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2514         (WebKit::WebContextMenuProxyGtk::showContextMenu):
2515         * UIProcess/gtk/WebContextMenuProxyGtk.h:
2516
2517 2015-10-18  Commit Queue  <commit-queue@webkit.org>
2518
2519         Unreviewed, rolling out r191250 and r191253.
2520         https://bugs.webkit.org/show_bug.cgi?id=150296
2521
2522         Broke all the tests on Windows (Requested by ap on #webkit).
2523
2524         Reverted changesets:
2525
2526         "Stop honoring the user default
2527         "WebKitKerningAndLigaturesEnabledByDefault""
2528         https://bugs.webkit.org/show_bug.cgi?id=150287
2529         http://trac.webkit.org/changeset/191250
2530
2531         "Build fix after r191250"
2532         http://trac.webkit.org/changeset/191253
2533
2534 2015-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
2535
2536         Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
2537         https://bugs.webkit.org/show_bug.cgi?id=150287
2538
2539         Reviewed by Simon Fraser.
2540
2541         * Shared/WebProcessCreationParameters.cpp:
2542         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
2543         (WebKit::WebProcessCreationParameters::encode): Deleted.
2544         (WebKit::WebProcessCreationParameters::decode): Deleted.
2545         * Shared/WebProcessCreationParameters.h:
2546         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2547         (WebKit::registerUserDefaultsIfNeeded): Deleted.
2548         (WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
2549         * WebProcess/cocoa/WebProcessCocoa.mm:
2550         (WebKit::WebProcess::platformInitializeWebProcess): Deleted.
2551
2552 2015-10-17  Dan Bernstein  <mitz@apple.com>
2553
2554         [Cocoa] Stop using WKAXRegisterRemoteApp
2555         https://bugs.webkit.org/show_bug.cgi?id=150283
2556
2557         Reviewed by Alexey Proskuryakov.
2558
2559         * Platform/spi/mac: Added.
2560         * Platform/spi/mac/AppKitSPI.h: Added. Includes declaration of
2561           +[NSAccessibilityRemoteUIElement setRemoteUIApp:].
2562
2563         * WebKit2.xcodeproj/project.pbxproj: Added reference to new header. Also changed the path of
2564           the Platform/spi/Cocoa group to the corresponding path in the source tree.
2565
2566         * WebProcess/cocoa/WebProcessCocoa.mm:
2567         (WebKit::registerWithAccessibility): Added.
2568         (WebKit::WebProcess::platformInitializeProcess): Use new registerWithAccessibility instead
2569           of WKAXRegisterRemoteApp.
2570
2571 2015-10-16  Simon Fraser  <simon.fraser@apple.com>
2572
2573         Enhance TextStream for logging, remove subclasses, log more things
2574         https://bugs.webkit.org/show_bug.cgi?id=150269
2575
2576         Reviewed by Zalan Bujtas.
2577
2578         Remove the various TextStream subclasses that only existed to support indenting,
2579         and output additional types. Add output for more WebCore and WebKit2 types, and
2580         just use TextStream everywhere.
2581         
2582         TextStream is enhance to support grouping (open paren and intent), with a 
2583         stack-based class to open/end a group.
2584         
2585         Remove some SVG-specific duplicate output functions.
2586         
2587         Outdent namespace contents of GraphicsTypes.h.
2588
2589         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2590         (WebKit::dump):
2591         (WebKit::recursiveDumpNodes):
2592         (WebKit::RemoteScrollingCoordinatorTransaction::description):
2593         (WebKit::RemoteScrollingTreeTextStream::RemoteScrollingTreeTextStream): Deleted.
2594         (WebKit::RemoteScrollingTreeTextStream::increaseIndent): Deleted.
2595         (WebKit::RemoteScrollingTreeTextStream::decreaseIndent): Deleted.
2596         (WebKit::RemoteScrollingTreeTextStream::writeIndent): Deleted.
2597         (WebKit::dumpProperty): Deleted.
2598         (WebKit::RemoteScrollingTreeTextStream::operator<<): Deleted.
2599         (WebKit::RemoteScrollingTreeTextStream::dump): Deleted.
2600         (WebKit::RemoteScrollingTreeTextStream::recursiveDumpNodes): Deleted.
2601         * Shared/mac/RemoteLayerTreeTransaction.mm:
2602         (WebKit::operator<<):
2603         (WebKit::dumpChangedLayers):
2604         (WebKit::RemoteLayerTreeTransaction::description):
2605         (WebKit::RemoteLayerTreeTextStream::RemoteLayerTreeTextStream): Deleted.
2606         (WebKit::RemoteLayerTreeTextStream::increaseIndent): Deleted.
2607         (WebKit::RemoteLayerTreeTextStream::decreaseIndent): Deleted.
2608         (WebKit::dumpProperty): Deleted.
2609         (WebKit::RemoteLayerTreeTextStream::operator<<): Deleted.
2610         (WebKit::RemoteLayerTreeTextStream::writeIndent): Deleted.
2611         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
2612         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
2613         (WebKit::operator<<):
2614
2615 2015-10-17  Hunseop Jeong  <hs85.jeong@samsung.com>
2616
2617         URTBF after r191194 to fix EFL build.
2618         https://bugs.webkit.org/show_bug.cgi?id=150272
2619
2620         Reviewed by Csaba Osztrogonác.
2621
2622         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
2623         (WebKit::WebContextMenuProxyEfl::showContextMenu):
2624         * UIProcess/efl/WebContextMenuProxyEfl.h:
2625
2626 2015-10-16  Wenson Hsieh  <wenson_hsieh@apple.com>
2627
2628         Add a WKWebView input delegate SPI
2629         https://bugs.webkit.org/show_bug.cgi?id=149646
2630
2631         Reviewed by Dan Bernstein.
2632
2633         Renames the existing _WKFormDelegate to _WKInputDelegate and adds a new delegate SPI method
2634         -[_WKInputDelegate _webView:focusShouldStartInputSession:] that allows clients to allow or
2635         disallow showing up the keyboard. To make this decision, clients are given a
2636         _WKFocusedElementInfo, which contains information about the focused element prior to the
2637         keyboard showing up so the client will be able to override default assistance behavior.
2638
2639         While the information contained in a _WKFocusedElementInfo currently seems like overkill for
2640         _webView:focusShouldStartInputSession, our intentions are to give WebKit clients control over more
2641         details of how node assistance works, such as being able to use a custom editor for certain
2642         types of nodes.
2643
2644         * Shared/API/Cocoa/WebKitPrivate.h: Added new header _WKFocusedElementInfo.h.
2645         * UIProcess/API/Cocoa/WKWebView.h:
2646         * UIProcess/API/Cocoa/WKWebView.mm:
2647         (-[WKWebView _inputDelegate]):
2648         (-[WKWebView _formDelegate]):
2649         (-[WKWebView _setInputDelegate:]):
2650         (-[WKWebView _setFormDelegate:]):
2651         (-[WKWebView initWithFrame:configuration:]): Deleted canAssistOnProgrammaticFocus flag.
2652         (-[WKWebView canAssistOnProgrammaticFocus]): Ditto.
2653         (-[WKWebView setCanAssistOnProgrammaticFocus:]): Ditto.
2654         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2655         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2656         (-[WKWebViewConfiguration init]): Deleted.
2657         (-[WKWebViewConfiguration _canAssistOnProgrammaticFocus]): Deleted canAssistOnProgrammaticFocus flag.
2658         (-[WKWebViewConfiguration _setCanAssistOnProgrammaticFocus:]): Ditto.
2659         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2660         * UIProcess/API/Cocoa/_WKFocusedElementInfo.h: Added.
2661         * UIProcess/API/Cocoa/_WKFormDelegate.h:
2662         * UIProcess/API/Cocoa/_WKInputDelegate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKFormDelegate.h.
2663         * UIProcess/ios/WKContentViewInteraction.mm:
2664         (-[WKFocusedElementInfo initWithAssistedNodeInformation:isInteracting:]):
2665         (-[WKFocusedElementInfo type]):
2666         (-[WKFocusedElementInfo value]):
2667         (-[WKFocusedElementInfo isUserInitiated]):
2668         (-[WKContentView accessoryAutoFill]):
2669         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): If the input delegate responds to
2670             shouldStartInputSession, consult it to see if we should bring up the keyboard; otherwise, use our default behavior.
2671         * WebKit2.xcodeproj/project.pbxproj:
2672
2673 2015-10-16  Simon Fraser  <simon.fraser@apple.com>
2674
2675         Make TextStream the canonical way to log classes in WebCore
2676         https://bugs.webkit.org/show_bug.cgi?id=150256
2677
2678         Reviewed by Sam Weinig.
2679
2680         We vacillated between PrintStream and TextStream as being the canonical way
2681         to stringify WebCore data structures. This patch solidifies TextStream
2682         as the solution, since it has convenient stream syntax, and is what we
2683         use for render tree dumps.
2684
2685         Remove TextStream member functions that output non-simple structs
2686         (sizes, points and rects), replacing them with free operator<< functions
2687         in the .cpp file for the relevant class. Formatting is currently consistent
2688         with RenderTreeAsText output, to avoid breaking tests.
2689
2690         Remove custom FloatRect outputting in SVG and RemoteLayerTreeTransaction.
2691
2692         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2693         (WebKit::RemoteScrollingTreeTextStream::operator<<): Deleted.
2694         * Shared/mac/RemoteLayerTreeTransaction.mm:
2695         (WebKit::RemoteLayerTreeTextStream::operator<<): Deleted.
2696
2697 2015-10-16  Anders Carlsson  <andersca@apple.com>
2698
2699         Remove some dead menu code
2700         https://bugs.webkit.org/show_bug.cgi?id=150247
2701
2702         Reviewed by Andreas Kling.
2703
2704         * Shared/WebContextMenuItemData.cpp:
2705         (WebKit::WebContextMenuItemData::WebContextMenuItemData):
2706         (WebKit::WebContextMenuItemData::encode): Deleted.
2707         * Shared/WebContextMenuItemData.h:
2708         (WebKit::WebContextMenuItemData::selectionHandler): Deleted.
2709         * UIProcess/mac/WebContextMenuProxyMac.mm:
2710         (WebKit::nsMenuItem):
2711
2712 2015-10-16  Anders Carlsson  <andersca@apple.com>
2713
2714         Move more code to WebContextMenuProxyMac
2715         https://bugs.webkit.org/show_bug.cgi?id=150240
2716
2717         Reviewed by Tim Horton.
2718
2719         * UIProcess/WebContextMenuProxy.h:
2720         * UIProcess/WebPageProxy.cpp:
2721         (WebKit::WebPageProxy::internalShowContextMenu):
2722         * UIProcess/WebPageProxy.h:
2723         (WebKit::WebPageProxy::contextMenuClient):
2724         * UIProcess/mac/WebContextMenuProxyMac.h:
2725         * UIProcess/mac/WebContextMenuProxyMac.mm:
2726         (WebKit::WebContextMenuProxyMac::initializeShareMenuItem):
2727         (WebKit::WebContextMenuProxyMac::showContextMenu):
2728         * UIProcess/mac/WebPageProxyMac.mm:
2729         (WebKit::WebPageProxy::platformInitializeShareMenuItem): Deleted.
2730
2731 2015-10-16  Tim Horton  <timothy_horton@apple.com>
2732
2733         Hook up autolayout intrinsic sizing for WKWebView
2734         https://bugs.webkit.org/show_bug.cgi?id=150219
2735         <rdar://problem/20016905>
2736
2737         Reviewed by Simon Fraser.
2738
2739         * UIProcess/API/Cocoa/WKWebView.mm:
2740         (-[WKWebView initWithFrame:configuration:]):
2741         (-[WKWebView intrinsicContentSize]):
2742         (-[WKWebView _setIntrinsicContentSize:]):
2743         (-[WKWebView _minimumLayoutWidth]):
2744         (-[WKWebView _setMinimumLayoutWidth:]):
2745         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2746         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2747         Add a simple SPI to specify the minimum width that a WKWebView will attempt
2748         to lay out to, similar to WKView except just a width, not a size, and
2749         with no option to force the height to the view size. Similar behavior can
2750         be achieved by clients by setting custom autolayout constraints on the view.
2751
2752         * UIProcess/mac/PageClientImpl.mm:
2753         (WebKit::PageClientImpl::intrinsicContentSizeDidChange):
2754         Forward intrinsic content size changes to the WKWebView, not its inner WKView,
2755         if we have one.
2756
2757         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2758         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2759         Only set the autosizing fixed minimum height if we're using that behavior;
2760         otherwise, setting it to the view's height will end up accidentally
2761         turning on that behavior (which involves an extra layout per resize!).
2762
2763 2015-10-15  Anders Carlsson  <andersca@apple.com>
2764
2765         Use the ShowContextMenu message for service menus as well
2766         https://bugs.webkit.org/show_bug.cgi?id=150206
2767
2768         Reviewed by Tim Horton.
2769
2770         * Shared/ContextMenuContextData.cpp:
2771         (WebKit::ContextMenuContextData::ContextMenuContextData):
2772         (WebKit::ContextMenuContextData::encode):
2773         (WebKit::ContextMenuContextData::decode):
2774         * Shared/ContextMenuContextData.h:
2775         (WebKit::ContextMenuContextData::type):
2776         (WebKit::ContextMenuContextData::ContextMenuContextData):
2777         (WebKit::ContextMenuContextData::isServicesMenu):
2778         (WebKit::ContextMenuContextData::needsServicesMenu): Deleted.
2779         * UIProcess/WebPageProxy.cpp:
2780         (WebKit::WebPageProxy::showContextMenu):
2781         (WebKit::WebPageProxy::internalShowContextMenu):
2782         * UIProcess/WebPageProxy.h:
2783         * UIProcess/WebPageProxy.messages.in:
2784         * UIProcess/mac/WebContextMenuProxyMac.mm:
2785         (WebKit::WebContextMenuProxyMac::populate):
2786         (WebKit::WebContextMenuProxyMac::showContextMenu):
2787         * UIProcess/mac/WebPageProxyMac.mm:
2788         (WebKit::WebPageProxy::showSelectionServiceMenu): Deleted.
2789         * WebProcess/WebPage/mac/WebPageMac.mm:
2790         (WebKit::WebPage::handleSelectionServiceClick):
2791
2792 2015-10-16  Hunseop Jeong  <hs85.jeong@samsung.com>
2793
2794         [GTK] Try to fix the build after r191137
2795         https://bugs.webkit.org/show_bug.cgi?id=150222
2796
2797         Reviewed by Carlos Garcia Campos.
2798
2799         * UIProcess/API/gtk/PageClientImpl.cpp:
2800         (WebKit::PageClientImpl::doneWithKeyEvent):
2801         (WebKit::PageClientImpl::createPopupMenuProxy):
2802         (WebKit::PageClientImpl::createContextMenuProxy):
2803         (WebKit::PageClientImpl::createColorPicker):
2804         * UIProcess/API/gtk/PageClientImpl.h:
2805         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2806         (WebKit::WebContextMenuProxyGtk::populate):
2807         (WebKit::WebContextMenuProxyGtk::showContextMenu):
2808         (WebKit::WebContextMenuProxyGtk::hideContextMenu):
2809         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
2810         * UIProcess/gtk/WebContextMenuProxyGtk.h:
2811         (WebKit::WebContextMenuProxyGtk::create):
2812         (WebKit::WebContextMenuProxyGtk::gtkMenu):
2813         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
2814         (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
2815         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
2816         (WebKit::WebPopupMenuProxyGtk::create):
2817         (WebKit::WebPopupMenuProxyGtk::setCurrentlySelectedMenuItem):
2818
2819 2015-10-15  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2820
2821          EFL build fix since r191137
2822
2823          Unreviewed EFL build fix.
2824
2825         * UIProcess/CoordinatedGraphics/WebView.cpp: Removed.
2826
2827 2015-10-15  Myles C. Maxfield  <mmaxfield@apple.com>
2828
2829         Migrate to CGContextSetBaseCTM() and CGContextResetClip() from WKSI
2830         https://bugs.webkit.org/show_bug.cgi?id=150155
2831
2832         Reviewed by Tim Horton.
2833
2834         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2835         (InitWebCoreSystemInterface): Deleted.
2836
2837 2015-10-15  Dean Jackson  <dino@apple.com>
2838
2839         Fix the iOS build. And hopefully not breaking the other builds
2840         at the same time.
2841
2842         * UIProcess/PageClient.h:
2843         * UIProcess/WebContextMenuProxy.cpp:
2844         * UIProcess/WebContextMenuProxy.h:
2845         * UIProcess/ios/PageClientImplIOS.h:
2846         * UIProcess/ios/PageClientImplIOS.mm:
2847         * UIProcess/mac/PageClientImpl.h:
2848         * UIProcess/mac/PageClientImpl.mm:
2849
2850 2015-10-15  Anders Carlsson  <andersca@apple.com>
2851
2852         Use the context inside WebContextMenuProxyMac
2853         https://bugs.webkit.org/show_bug.cgi?id=150196
2854
2855         Reviewed by Tim Horton.
2856
2857         * UIProcess/WebContextMenuProxy.h:
2858         * UIProcess/WebPageProxy.cpp:
2859         (WebKit::WebPageProxy::internalShowContextMenu):
2860         * UIProcess/mac/WebContextMenuProxyMac.h:
2861         * UIProcess/mac/WebContextMenuProxyMac.mm:
2862         (WebKit::WebContextMenuProxyMac::populate):
2863         (WebKit::WebContextMenuProxyMac::showContextMenu):
2864
2865 2015-10-15  Anders Carlsson  <andersca@apple.com>
2866
2867         Use the context menu location that's stored in the context data
2868         https://bugs.webkit.org/show_bug.cgi?id=150194
2869
2870         Reviewed by Tim Horton.
2871
2872         * UIProcess/WebContextMenuProxy.h:
2873         * UIProcess/WebPageProxy.cpp:
2874         (WebKit::WebPageProxy::internalShowContextMenu):
2875         * UIProcess/mac/WebContextMenuProxyMac.h:
2876         * UIProcess/mac/WebContextMenuProxyMac.mm:
2877         (WebKit::WebContextMenuProxyMac::showContextMenu):
2878
2879 2015-10-15  Anders Carlsson  <andersca@apple.com>
2880
2881         Store the context menu data and user data in the WebContextMenuProxy object
2882         https://bugs.webkit.org/show_bug.cgi?id=150191
2883
2884         Reviewed by Tim Horton.
2885
2886         * UIProcess/PageClient.h:
2887         * UIProcess/WebContextMenuProxy.cpp:
2888         (WebKit::WebContextMenuProxy::WebContextMenuProxy):
2889         * UIProcess/WebContextMenuProxy.h:
2890         * UIProcess/WebPageProxy.cpp:
2891         (WebKit::WebPageProxy::internalShowContextMenu):
2892         * UIProcess/ios/PageClientImplIOS.h:
2893         * UIProcess/ios/PageClientImplIOS.mm:
2894         (WebKit::PageClientImpl::createContextMenuProxy):
2895         * UIProcess/mac/PageClientImpl.h:
2896         * UIProcess/mac/PageClientImpl.mm:
2897         (WebKit::PageClientImpl::createContextMenuProxy):
2898         * UIProcess/mac/WebContextMenuProxyMac.h:
2899         (WebKit::WebContextMenuProxyMac::create):
2900         * UIProcess/mac/WebContextMenuProxyMac.mm:
2901         (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
2902
2903 2015-10-15  Dan Bernstein  <mitz@apple.com>
2904
2905         [Cocoa] Stop using WKSetNSURLConnectionDefersCallbacks
2906         https://bugs.webkit.org/show_bug.cgi?id=150189
2907
2908         Reviewed by Anders Carlsson.
2909
2910         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2911         (InitWebCoreSystemInterface): Removed initialization.
2912
2913 2015-10-15  Anders Carlsson  <andersca@apple.com>
2914
2915         Fix build.
2916
2917         * UIProcess/API/APIFrameInfo.cpp:
2918         (API::FrameInfo::~FrameInfo):
2919         * UIProcess/API/APIFrameInfo.h:
2920         * UIProcess/API/Cocoa/WKUserContentController.mm:
2921
2922 2015-10-15  Anders Carlsson  <andersca@apple.com>
2923
2924         CTTE menu proxies
2925         https://bugs.webkit.org/show_bug.cgi?id=150187
2926
2927         Reviewed by Tim Horton.
2928
2929         * UIProcess/PageClient.h:
2930         * UIProcess/WebPageProxy.cpp:
2931         (WebKit::WebPageProxy::showPopupMenu):
2932         (WebKit::WebPageProxy::internalShowContextMenu):
2933         * UIProcess/WebPopupMenuProxy.h:
2934         (WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
2935         * UIProcess/ios/PageClientImplIOS.h:
2936         * UIProcess/ios/PageClientImplIOS.mm:
2937         (WebKit::PageClientImpl::createPopupMenuProxy):
2938         (WebKit::PageClientImpl::createContextMenuProxy): Deleted.
2939         * UIProcess/mac/PageClientImpl.h:
2940         * UIProcess/mac/PageClientImpl.mm:
2941         (WebKit::PageClientImpl::createPopupMenuProxy):
2942         (WebKit::PageClientImpl::createContextMenuProxy):
2943         * UIProcess/mac/WebContextMenuProxyMac.h:
2944         (WebKit::WebContextMenuProxyMac::create):
2945         (WebKit::WebContextMenuProxyMac::page):
2946         * UIProcess/mac/WebContextMenuProxyMac.mm:
2947         (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
2948         (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
2949         (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
2950         * UIProcess/mac/WebPopupMenuProxyMac.h:
2951         (WebKit::WebPopupMenuProxyMac::create):
2952         * UIProcess/mac/WebPopupMenuProxyMac.mm:
2953         (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
2954
2955 2015-10-15  Anders Carlsson  <andersca@apple.com>
2956
2957         Add -[WKFrameInfo _handle]
2958         https://bugs.webkit.org/show_bug.cgi?id=150185
2959         rdar://problem/23132371
2960
2961         Reviewed by Tim Horton.
2962
2963         * UIProcess/API/APIFrameInfo.cpp:
2964         (API::FrameInfo::FrameInfo):
2965         * UIProcess/API/APIFrameInfo.h:
2966         * UIProcess/API/Cocoa/WKFrameInfo.mm:
2967         (-[WKFrameInfo _handle]):
2968         * UIProcess/API/Cocoa/WKFrameInfoInternal.h:
2969         * UIProcess/API/Cocoa/WKFrameInfoPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h.
2970         * UIProcess/WebPageProxy.cpp:
2971         (WebKit::WebPageProxy::showPopupMenu):
2972         (WebKit::WebPageProxy::internalShowContextMenu):
2973         * UIProcess/WebPopupMenuProxy.h:
2974         (WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
2975         * WebKit2.xcodeproj/project.pbxproj:
2976
2977 2015-10-15  Anders Carlsson  <andersca@apple.com>
2978
2979         The menu location and menu items should be part of ContextMenuContextData
2980         https://bugs.webkit.org/show_bug.cgi?id=150182
2981
2982         Reviewed by Andreas Kling.
2983
2984         * Shared/ContextMenuContextData.cpp:
2985         (WebKit::ContextMenuContextData::ContextMenuContextData):
2986         (WebKit::ContextMenuContextData::encode):
2987         (WebKit::ContextMenuContextData::decode):
2988         * Shared/ContextMenuContextData.h:
2989         (WebKit::ContextMenuContextData::menuLocation):
2990         (WebKit::ContextMenuContextData::menuItems):
2991         (WebKit::ContextMenuContextData::ContextMenuContextData):
2992         * UIProcess/WebPageProxy.cpp:
2993         (WebKit::WebPageProxy::showContextMenu):
2994         (WebKit::WebPageProxy::internalShowContextMenu):
2995         * UIProcess/WebPageProxy.h:
2996         * UIProcess/WebPageProxy.messages.in:
2997         * UIProcess/mac/WebPageProxyMac.mm:
2998         (WebKit::WebPageProxy::showSelectionServiceMenu):
2999         * WebProcess/WebPage/WebContextMenu.cpp:
3000         (WebKit::WebContextMenu::show):
3001
3002 2015-10-15  Carlos Garcia Campos  <cgarcia@igalia.com>
3003
3004         [GTK] Test WebKit2.RestoreSessionStateContainingFormData fails
3005         https://bugs.webkit.org/show_bug.cgi?id=84960
3006
3007         Reviewed by Žan Doberšek.
3008
3009         Add a cross-platform implementation to LegacySessionStateCodingNone
3010         using the new SessionState, so that non mac ports can make unit
3011         tests that use the legacy session state coding pass.
3012
3013         * UIProcess/LegacySessionStateCodingNone.cpp:
3014         (WebKit::encodeLegacySessionState):
3015         (WebKit::decodeLegacySessionState):
3016         (WebKit::encodeLegacySessionHistoryEntryData): Deleted.
3017         (WebKit::decodeLegacySessionHistoryEntryData): Deleted.
3018
3019 2015-10-15  Carlos Garcia Campos  <cgarcia@igalia.com>
3020
3021         Unreviewed. Fix wrong #ifdef added in r190615.
3022
3023         This disabled accelerated compositing unconditionally.
3024
3025         * UIProcess/gtk/WebPreferencesGtk.cpp:
3026         (WebKit::WebPreferences::platformInitializeStore):
3027
3028 2015-10-14  Zhuo Li  <zachli@apple.com>
3029
3030         Augment <input type=search>’s recent search history with the time each entry was added,
3031         in order to allow time-based clearing of search history.
3032         https://bugs.webkit.org/show_bug.cgi?id=148388.
3033
3034         Reviewed by Darin Adler.
3035
3036         Replace Vector<String> with Vector<RecentSearch>, where RecentSearch is a struct
3037         that consists search string and time, for recent searches in order to store additional time
3038         information.
3039
3040         All these new RecentSearches are stored in a plist in which the structure looks like:
3041         Root {
3042             "items": {
3043                 autosave name: {
3044                     "searches": [
3045                         { "searchString": searchString, "date": date },
3046                         ...
3047                     ]
3048                 }
3049             }
3050         }
3051
3052         * Scripts/webkit/messages.py:
3053         (headers_for_type):
3054         * Shared/WebCoreArgumentCoders.cpp:
3055         (IPC::ArgumentCoder<RecentSearch>::encode): Encode the new struct RecentSearch
3056         (IPC::ArgumentCoder<RecentSearch>::decode): Decode the new struct RecentSearch
3057         * Shared/WebCoreArgumentCoders.h:
3058         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
3059         (WebKit::WebPageProxy::saveRecentSearches): Call saveRecentSearches in WebCore::SearchPopupMenuCocoa.
3060         (WebKit::WebPageProxy::loadRecentSearches): Call loadRecentSearches in WebCore::SearchPopupMenuCocoa.
3061         * UIProcess/WebPageProxy.h:
3062         * UIProcess/WebPageProxy.messages.in:
3063         * UIProcess/efl/WebPageProxyEfl.cpp:
3064         (WebKit::WebPageProxy::saveRecentSearches):
3065         (WebKit::WebPageProxy::loadRecentSearches):
3066         * UIProcess/gtk/WebPageProxyGtk.cpp:
3067         (WebKit::WebPageProxy::saveRecentSearches):
3068         (WebKit::WebPageProxy::loadRecentSearches):
3069         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
3070         (WebKit::WebSearchPopupMenu::saveRecentSearches):
3071         (WebKit::WebSearchPopupMenu::loadRecentSearches):
3072         * WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
3073
3074 2015-10-14  Wenson Hsieh  <wenson_hsieh@apple.com>
3075
3076         Web pages with unscalable viewports shouldn't have a single tap delay
3077         https://bugs.webkit.org/show_bug.cgi?id=149968
3078         <rdar://problem/23054453>
3079
3080         Reviewed by Simon Fraser.
3081
3082         When a viewport is unscalable (specified through the meta viewport tag) we
3083         do not add a delay to our single tap gesture recognizer. We do this by
3084         disabling or reinitializing the WKContentView's double tap gesture recognizer
3085         when the viewport becomes unscalable or scalable, respectively. A viewport is
3086         deemed unscalable when it has user-scalable = no, or when the minimum scale is
3087         greater than or equal to the maximum scale.
3088
3089         * UIProcess/API/Cocoa/WKWebView.mm:
3090         (-[WKWebView _didCommitLayerTree:]):
3091         * UIProcess/ios/WKContentViewInteraction.h:
3092         * UIProcess/ios/WKContentViewInteraction.mm:
3093         (-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]): Pulled logic
3094                 for initializing a double tap gesture recognizer out into a helper function.
3095         (-[WKContentView setupInteraction]):
3096         (-[WKContentView _setDoubleTapGesturesEnabled:]): Turns gesture recognition for double
3097                 taps on or off.
3098
3099 2015-10-14  Anders Carlsson  <andersca@apple.com>
3100
3101         Remove a message that isn't used by anyone
3102         https://bugs.webkit.org/show_bug.cgi?id=150136
3103
3104         Reviewed by Andreas Kling.
3105
3106         * UIProcess/API/APILoaderClient.h:
3107         (API::LoaderClient::didRemoveFrameFromHierarchy): Deleted.
3108         * UIProcess/API/C/WKPage.cpp:
3109         (WKPageSetPageLoaderClient): Deleted.
3110         * UIProcess/WebPageProxy.cpp:
3111         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy): Deleted.
3112         * UIProcess/WebPageProxy.h:
3113         * UIProcess/WebPageProxy.messages.in:
3114         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3115         (WebKit::WebFrameLoaderClient::detachedFromParent2): Deleted.
3116
3117 2015-10-14  Alex Christensen  <achristensen@webkit.org>
3118
3119         Add SPI for reloading without content blockers
3120         https://bugs.webkit.org/show_bug.cgi?id=150058
3121         rdar://problem/22742222
3122
3123         Reviewed by Sam Weinig.
3124
3125         * Shared/WebPageCreationParameters.cpp:
3126         (WebKit::WebPageCreationParameters::encode):
3127         (WebKit::WebPageCreationParameters::decode):
3128         * Shared/WebPageCreationParameters.h:
3129         * UIProcess/API/C/WKPage.cpp:
3130         (WKPageReload):
3131         (WKPageReloadWithoutContentBlockers):
3132         (WKPageReloadFromOrigin):
3133         (WKPageTryClose):
3134         (WKPageSetUserContentExtensionsEnabled):
3135         (WKPageSupportsTextEncoding):
3136         * UIProcess/API/C/WKPage.h:
3137         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3138         (-[WKBrowsingContextController reload]):
3139         (-[WKBrowsingContextController reloadFromOrigin]):
3140         (-[WKBrowsingContextController applicationNameForUserAgent]):
3141         * UIProcess/API/Cocoa/WKWebView.mm:
3142         (-[WKWebView reload]):
3143         (-[WKWebView reloadFromOrigin]):
3144         (-[WKWebView _setUserContentExtensionsEnabled:]):
3145         (-[WKWebView _userContentExtensionsEnabled]):
3146         (-[WKWebView _webProcessIdentifier]):
3147         (-[WKWebView _killWebContentProcess]):
3148         (-[WKWebView _reloadWithoutContentBlockers]):
3149         (-[WKWebView _killWebContentProcessAndResetState]):
3150         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3151         * UIProcess/API/gtk/WebKitWebView.cpp:
3152         (webkit_web_view_reload):
3153         (webkit_web_view_reload_bypass_cache):
3154         * UIProcess/WebFrameProxy.cpp:
3155         (WebKit::WebFrameProxy::didHandleContentFilterUnblockNavigation):
3156         * UIProcess/WebPageProxy.cpp:
3157         (WebKit::WebPageProxy::stopLoading):
3158         (WebKit::WebPageProxy::reload):
3159         (WebKit::WebPageProxy::creationParameters):
3160         (WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
3161         (WebKit::WebPageProxy::setUserContentExtensionsEnabled): Deleted.
3162         * UIProcess/WebPageProxy.h:
3163         (WebKit::WebPageProxy::userContentExtensionsEnabled): Deleted.
3164         * WebProcess/WebPage/WebPage.cpp:
3165         (WebKit::m_shouldDispatchFakeMouseMoveEvents):
3166         (WebKit::WebPage::setDefersLoading):
3167         (WebKit::WebPage::reload):
3168         (WebKit::WebPage::goForward):
3169         (WebKit::WebPage::createDocumentLoader):
3170         (WebKit::WebPage::setShouldScaleViewToFitDocument):
3171         (WebKit::WebPage::imageOrMediaDocumentSizeChanged):
3172         (WebKit::WebPage::setUserContentExtensionsEnabled): Deleted.
3173         * WebProcess/WebPage/WebPage.h:
3174         * WebProcess/WebPage/WebPage.messages.in:
3175
3176 2015-10-14  Simon Fraser  <simon.fraser@apple.com>
3177
3178         Change GraphicsContext image-drawing functions to take references
3179         https://bugs.webkit.org/show_bug.cgi?id=150108
3180
3181         Reviewed by Tim Horton and Sam Weinig.
3182
3183         Change GraphicsContext::drawImage(), drawTiledImage(), drawImageBuffer(), clipToImageBuffer()
3184         and isCompatibleWithBuffer() to take references, and adjust calling code, adding
3185         null-checks where necessary.
3186
3187         * Shared/ContextMenuContextData.cpp:
3188         (WebKit::ContextMenuContextData::ContextMenuContextData):
3189         * Shared/WebCoreArgumentCoders.cpp:
3190         (IPC::encodeImage):
3191         (IPC::encodeOptionalImage):
3192         (IPC::ArgumentCoder<Cursor>::encode):
3193         * WebProcess/WebPage/WebFrame.cpp:
3194         (WebKit::WebFrame::createSelectionSnapshot):
3195
3196 2015-10-14  Anders Carlsson  <andersca@apple.com>
3197
3198         Change the bundle app cache APIs to take a page
3199         https://bugs.webkit.org/show_bug.cgi?id=150123
3200
3201         Reviewed by Sam Weinig.
3202
3203         This is another step towards getting rid of ApplicationCacheStorage::singleton().
3204         Ideally the WKTR tests that use this should be converted to API tests.
3205
3206         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3207         (WKBundleClearApplicationCache): Deleted.
3208         (WKBundleClearApplicationCacheForOrigin): Deleted.
3209         (WKBundleSetAppCacheMaximumSize): Deleted.
3210         (WKBundleGetAppCacheUsageForOrigin): Deleted.
3211         (WKBundleSetApplicationCacheOriginQuota): Deleted.
3212         (WKBundleResetApplicationCacheOriginQuota): Deleted.
3213         (WKBundleCopyOriginsWithApplicationCache): Deleted.
3214         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3215         (WKBundlePageClearApplicationCache):
3216         (WKBundlePageClearApplicationCacheForOrigin):
3217         (WKBundlePageSetAppCacheMaximumSize):
3218         (WKBundlePageGetAppCacheUsageForOrigin):
3219         (WKBundlePageSetApplicationCacheOriginQuota):
3220         (WKBundlePageResetApplicationCacheOriginQuota):
3221         (WKBundlePageCopyOriginsWithApplicationCache):
3222         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
3223         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3224         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3225         (WebKit::InjectedBundle::clearApplicationCache): Deleted.
3226         (WebKit::InjectedBundle::clearApplicationCacheForOrigin): Deleted.
3227         (WebKit::InjectedBundle::setAppCacheMaximumSize): Deleted.
3228         (WebKit::InjectedBundle::appCacheUsageForOrigin): Deleted.
3229         (WebKit::InjectedBundle::setApplicationCacheOriginQuota): Deleted.
3230         (WebKit::InjectedBundle::resetApplicationCacheOriginQuota): Deleted.
3231         (WebKit::InjectedBundle::originsWithApplicationCache): Deleted.
3232         * WebProcess/InjectedBundle/InjectedBundle.h:
3233
3234 2015-10-14  Joonghun Park  <jh718.park@samsung.com>
3235
3236         [EFL] Fix the problem in which environment variable included in webprocess-cmd-prefix can't be parsed
3237         https://bugs.webkit.org/show_bug.cgi?id=148616
3238
3239         Reviewed by Gyuyoung Kim.
3240
3241         This patch fixes the problem in which environment variable in web process-cmd-prefix can't be parsed.
3242         process-cmd-prefix option doesn't work in two cases.
3243         1. When executing run-layout-tests,
3244         2. When executing MiniBrowser with web process-cmd-prefix environment variable.
3245
3246         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
3247         (WebKit::parseAndRemoveEnvironments):
3248         (WebKit::ProcessLauncher::launchProcess):
3249
3250 2015-10-13  Yongjun Zhang  <yongjun_zhang@apple.com>
3251
3252         Use the correct notification strings for view service applications state change.
3253         https://bugs.webkit.org/show_bug.cgi?id=150107
3254
3255         Use the correct notification names "_UIViewServiceHostDidEnterBackgroundNotification" and
3256         "_UIViewServiceHostWillEnterForegroundNotification" to listen to view service application state changes.
3257
3258         Reviewed by Gavin Barraclough.
3259
3260         * UIProcess/ApplicationStateTracker.mm:
3261         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
3262
3263 2015-10-13  Myles C. Maxfield  <mmaxfield@apple.com>
3264
3265         Split TypesettingFeatures into kerning and ligatures bools
3266         https://bugs.webkit.org/show_bug.cgi?id=150074
3267
3268         Reviewed by Simon Fraser.
3269
3270         * Shared/WebProcessCreationParameters.cpp:
3271         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
3272         (WebKit::WebProcessCreationParameters::encode):
3273         (WebKit::WebProcessCreationParameters::decode):
3274         * Shared/WebProcessCreationParameters.h:
3275         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3276         (WebKit::WebProcessPool::platformInitializeWebProcess):
3277         * WebProcess/cocoa/WebProcessCocoa.mm:
3278         (WebKit::WebProcess::platformInitializeWebProcess):
3279
3280 2015-10-13  Dean Jackson  <dino@apple.com>
3281
3282         Fix iOS-family builds.
3283
3284         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
3285         (WKPageGetObjectRegistry):
3286         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3287         (-[WKBrowsingContextController _remoteObjectRegistry]):
3288         * UIProcess/API/mac/WKViewInternal.h:
3289
3290 2015-10-13  Anders Carlsson  <andersca@apple.com>
3291
3292         Fix 32-bit build.
3293
3294         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
3295         (WKPageGetObjectRegistry):
3296
3297 2015-10-13  Anders Carlsson  <andersca@apple.com>
3298
3299         Add and implement WKPageGetObjectRegistry
3300         https://bugs.webkit.org/show_bug.cgi?id=150102
3301
3302         Reviewed by Tim Horton.
3303
3304         Put the _WKObjectRegistry used by WKPageRef and WKBrowsingContextController on the WKView for now.
3305         If we decide to share more code between WKView and WKWebView, the object registry could live in an object that would be shared
3306         between WKView and WKWebView.
3307
3308         * UIProcess/API/C/mac/WKPagePrivateMac.h:
3309         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
3310         (WKPageGetObjectRegistry):
3311         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3312         (-[WKBrowsingContextController _remoteObjectRegistry]):
3313         (-[WKBrowsingContextController dealloc]): Deleted.
3314         * UIProcess/API/mac/WKView.mm:
3315         (-[WKView dealloc]):
3316         (-[WKView _remoteObjectRegistry]):
3317         * UIProcess/API/mac/WKViewInternal.h:
3318
3319 2015-10-13  Chris Dumez  <cdumez@apple.com>
3320
3321         Avoid useless copies in range-loops that are using 'auto'
3322         https://bugs.webkit.org/show_bug.cgi?id=150091
3323
3324         Reviewed by Sam Weinig.
3325
3326         Avoid useless copies in range-loops that are using 'auto'. Also use
3327         'auto*' instead of 'auto' when range values are pointers for clarity.
3328
3329         * UIProcess/VisitedLinkStore.cpp:
3330         (WebKit::VisitedLinkStore::pendingVisitedLinksTimerFired):
3331         (WebKit::VisitedLinkStore::resizeTable):
3332         * UIProcess/WebProcessProxy.cpp:
3333         (WebKit::WebProcessProxy::releaseRemainingIconsForPageURLs):
3334         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3335         (WebKit::WebsiteDataStore::fetchData):
3336         (WebKit::WebsiteDataStore::removeData):
3337         (WebKit::WebsiteDataStore::plugins):
3338
3339 2015-10-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
3340
3341         Add debug settings for using giant tiles (4096x4096)
3342         https://bugs.webkit.org/show_bug.cgi?id=149977
3343         <rdar://problem/23017093>
3344
3345         Reviewed by Tim Horton.
3346
3347         * Shared/WebPreferencesDefinitions.h:
3348         * UIProcess/API/C/WKPreferences.cpp:
3349         (WKPreferencesSetUseGiantTiles):
3350         (WKPreferencesGetUseGiantTiles):
3351         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3352         * WebProcess/WebPage/WebPage.cpp:
3353         (WebKit::WebPage::updatePreferences):
3354
3355 2015-10-13  Brent Fulgham  <bfulgham@apple.com>
3356
3357         [iOS] Avoid crash due to invalid screen bounds
3358         https://bugs.webkit.org/show_bug.cgi?id=150048
3359         <rdar://problem/22112664>
3360
3361         Reviewed by Jer Noble.
3362
3363         Check for an invalid bounds, and reset it to a known state before
3364         attempting to use it.
3365
3366         * WebProcess/ios/WebVideoFullscreenManager.mm:
3367         (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
3368
3369 2015-10-13  Sergio Villar Senin  <svillar@igalia.com>
3370
3371         [GTK] Fix build for ENABLE_TOUCH_EVENTS=OFF
3372         https://bugs.webkit.org/show_bug.cgi?id=150085
3373
3374         Reviewed by Carlos Garcia Campos.
3375
3376         * Shared/gtk/NativeWebTouchEventGtk.cpp:
3377         * Shared/gtk/WebEventFactory.cpp:
3378         * Shared/gtk/WebEventFactory.h:
3379         * UIProcess/API/gtk/PageClientImpl.cpp:
3380         * UIProcess/API/gtk/PageClientImpl.h:
3381         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3382         (webkit_web_view_base_class_init):
3383
3384 2015-10-13  Chris Dumez  <cdumez@apple.com>
3385
3386         Avoid useless copying of Key::HashType in loops in NetworkCache::Storage::synchronize()
3387         https://bugs.webkit.org/show_bug.cgi?id=150061
3388
3389         Reviewed by Carlos Garcia Campos.
3390
3391         Avoid useless copying of Key::HashType in loops in NetworkCache::Storage::synchronize().
3392         Key::HashType is currently a SHA1::Digest, which is a std::array<uint8_t, 20>.
3393
3394         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3395         (WebKit::NetworkCache::Storage::synchronize):
3396
3397 2015-10-12  Philip Chimento  <philip.chimento@gmail.com>
3398
3399         [GTK] OSX linker doesn't understand --whole-archive
3400         https://bugs.webkit.org/show_bug.cgi?id=144557
3401
3402         Reviewed by Martin Robinson.
3403
3404         * PlatformGTK.cmake: Link with extra libraries on Darwin, since
3405         we don't have the --whole-archive linker option.
3406
3407 2015-10-09  Anders Carlsson  <andersca@apple.com>
3408
3409         Don't allow plug-ins to override image types for <embed> elements
3410         https://bugs.webkit.org/show_bug.cgi?id=149979
3411
3412         Reviewed by Tim Horton.
3413
3414         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3415         (WebKit::WebFrameLoaderClient::objectContentType):
3416         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3417
3418 2015-10-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3419
3420         [EFL] Bump Version/X in user agent
3421         https://bugs.webkit.org/show_bug.cgi?id=150013
3422
3423         Reviewed by Csaba Osztrogonác.
3424
3425         EFL port needs to ensure maximum compatibility with existing web sites.
3426         Thus version number needs to be bumped from 5.0 to 8.0 as GTK port.
3427
3428         * UIProcess/efl/WebPageProxyEfl.cpp:
3429         (WebKit::WebPageProxy::standardUserAgent):
3430
3431 2015-10-10  Dan Bernstein  <mitz@apple.com>
3432
3433         [iOS] Remove unnecessary iOS version checks
3434         https://bugs.webkit.org/show_bug.cgi?id=150002
3435
3436         Reviewed by Alexey Proskuryakov.
3437
3438         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3439         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
3440         * Platform/IPC/mac/ConnectionMac.mm:
3441         (IPC::AccessibilityProcessSuspendedNotification):
3442         * Platform/spi/ios/SafariServicesSPI.h:
3443         * Platform/spi/ios/UIKitSPI.h:
3444         * Shared/Network/NetworkProcessCreationParameters.cpp:
3445         (WebKit::NetworkProcessCreationParameters::encode):
3446         (WebKit::NetworkProcessCreationParameters::decode):
3447         * Shared/Network/NetworkProcessCreationParameters.h:
3448         * Shared/Plugins/PluginProcessCreationParameters.cpp:
3449         (WebKit::PluginProcessCreationParameters::encode):