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