ASSERT when right clicking on SVG Image generating Share menu - can break Web Inspector
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-10-20  Joseph Pecoraro  <pecoraro@apple.com>
2
3         ASSERT when right clicking on SVG Image generating Share menu - can break Web Inspector
4         https://bugs.webkit.org/show_bug.cgi?id=150374
5
6         Reviewed by Brian Burg.
7
8         When there is no absolute URL or downloadable media URL no system share
9         menu is created, but we were still appending the null context menu to
10         the list of context menu items.
11
12         * UIProcess/mac/WebContextMenuProxyMac.mm:
13         (WebKit::WebContextMenuProxyMac::shareMenuItem):
14         Bail early if the context menu is null.
15
16         (WebKit::WebContextMenuProxyMac::showContextMenu):
17         Only append the share context menu item if it is non-null.
18         This matches ContextMenuController.cpp in WebCore.
19
20 2015-10-20  Commit Queue  <commit-queue@webkit.org>
21
22         Unreviewed, rolling out r191306.
23         https://bugs.webkit.org/show_bug.cgi?id=150371
24
25         "May have caused a significant warm PLT regression" (Requested
26         by cdumez_ on #webkit).
27
28         Reverted changeset:
29
30         "[WK2] Generalize NetworkCacheStorage API so it can store
31         different types of metadata"
32         https://bugs.webkit.org/show_bug.cgi?id=150221
33         http://trac.webkit.org/changeset/191306
34
35 2015-10-20  Tim Horton  <timothy_horton@apple.com>
36
37         Try to fix the build by disabling MAC_GESTURE_EVENTS on 10.9 and 10.10
38
39         * Configurations/FeatureDefines.xcconfig:
40
41 2015-10-20  Commit Queue  <commit-queue@webkit.org>
42
43         Unreviewed, rolling out r191333.
44         https://bugs.webkit.org/show_bug.cgi?id=150362
45
46         Caused assertions on regression tests (Requested by ap on
47         #webkit).
48
49         Reverted changeset:
50
51         "ERROR: Unhandled web process message
52         'StorageAreaMap:DispatchStorageEvent'"
53         https://bugs.webkit.org/show_bug.cgi?id=150315
54         http://trac.webkit.org/changeset/191333
55
56 2015-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
57
58         [UNIX] ASSERTION FAILED: m_shouldWaitForSyncReplies in Connection::connectionDidClose()
59         https://bugs.webkit.org/show_bug.cgi?id=150361
60
61         Reviewed by Martin Robinson.
62
63         It doesn't always happen because it depends on how sockets are
64         closed, and the state of the threads. The problem is that we are
65         not handling the case when the read fails because we closed the
66         connection. In that case we log the error and call
67         Connection::connectionDidClose(). But it was connectionDidClose()
68         the one closing the socket. So, in this particular case it's not an
69         error but a normal termination, and we shouldn't try to close the
70         connection again. Something similar can happen while sending a
71         message, and we get a broken pipe error, but in that case we are
72         only printing the error, so it's harmless.
73
74         * Platform/IPC/unix/ConnectionUnix.cpp:
75         (IPC::Connection::readyReadHandler): Only print error and call
76         connectionDidClose() if we are still connected when read fails.
77         (IPC::Connection::sendOutgoingMessage): Only print error if we are
78         still connected when send fails.
79
80 2015-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
81
82         [GTK] Graphics corruption when entering/leaving AC mode quickly
83         https://bugs.webkit.org/show_bug.cgi?id=150323
84
85         Reviewed by Mario Sanchez Prada.
86
87         The UI process is notified when entering accelerated compositing
88         mode after the layers have been flushed and rendered to avoid
89         flickering. However, this is producing flickering in the GTK+
90         port, because we use an offscreen redirected window that is
91         resized to a minimium size to save memory when not in AC mode. The
92         web process always uses the current size of the redirected window,
93         so when entering AC mode, contents are rendered into the 1x1
94         window, then the UI process is notified, the redirected window is
95         resized to its actual size, and we force a resize to ask the web
96         process to render again, now at the correct size. Rendering at 1x1
97         and then resizing the window is what produces the flickering when
98         entering AC mode, but it's also inefficient, since we need to
99         render again after the redirected window is resized. So, this
100         patch adds a WillEnterAcceleratedCompositing message that is sent
101         to the UI process when the layer tree host is created but before
102         the contents have been composited and rendered. This is
103         implemented by the GTK+ port to prepare for entering AC mode, by
104         resizing the redirected window. When we actually enter AC mode,
105         the contents have already been rendered in the web process at the
106         correct size, so we can just use the redirected window surface
107         instead of the drawing area one, and paint in the web view without
108         any flickering. We no longer need the forceResize either.
109         When leaving accelerated compositing mode, we now clear the redirected
110         window resources after a short delay. This ensures that we have
111         already rendered the update sent in the ExitAcceleratedCompositingMode
112         message, but also that entering/leaving AC mode quickly doesn't
113         produce any redirected window resize.
114
115         * UIProcess/API/gtk/PageClientImpl.cpp:
116         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
117         * UIProcess/API/gtk/PageClientImpl.h:
118         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
119         (webkitWebViewBaseClearRedirectedWindowSoon):
120         (webkitWebViewBaseWillEnterAcceleratedCompositingMode):
121         (webkitWebViewBaseEnterAcceleratedCompositingMode):
122         (webkitWebViewBaseExitAcceleratedCompositingMode):
123         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
124         * UIProcess/CoordinatedGraphics/WebView.h:
125         * UIProcess/DrawingAreaProxy.h:
126         (WebKit::DrawingAreaProxy::willEnterAcceleratedCompositingMode):
127         * UIProcess/DrawingAreaProxy.messages.in:
128         * UIProcess/DrawingAreaProxyImpl.cpp:
129         (WebKit::DrawingAreaProxyImpl::willEnterAcceleratedCompositingMode):
130         * UIProcess/DrawingAreaProxyImpl.h:
131         (WebKit::DrawingAreaProxyImpl::forceResize): Deleted.
132         * UIProcess/PageClient.h:
133         * UIProcess/WebPageProxy.cpp:
134         (WebKit::WebPageProxy::willEnterAcceleratedCompositingMode):
135         * UIProcess/WebPageProxy.h:
136         * UIProcess/ios/PageClientImplIOS.h:
137         * UIProcess/ios/PageClientImplIOS.mm:
138         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
139         * UIProcess/mac/PageClientImpl.h:
140         * UIProcess/mac/PageClientImpl.mm:
141         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
142         * WebProcess/WebPage/DrawingAreaImpl.cpp:
143         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
144
145 2015-10-20  Sergio Villar Senin  <svillar@igalia.com>
146
147         [GTK] Fix build for ENABLE_PLUGIN_PROCESS_GTK2=OFF
148         https://bugs.webkit.org/show_bug.cgi?id=150086
149
150         Reviewed by Darin Adler.
151
152         * UIProcess/cairo/BackingStoreCairo.cpp:
153         (WebKit::BackingStore::createBackend):
154
155 2015-10-20  Yoav Weiss  <yoav@yoav.ws>
156
157         Rename the PICTURE_SIZES flag to CURRENTSRC
158         https://bugs.webkit.org/show_bug.cgi?id=150275
159
160         Reviewed by Dean Jackson.
161
162         * Configurations/FeatureDefines.xcconfig:
163
164 2015-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
165
166         ERROR: Unhandled web process message 'StorageAreaMap:DispatchStorageEvent'
167         https://bugs.webkit.org/show_bug.cgi?id=150315
168
169         Reviewed by Andreas Kling.
170
171         It was introduced in r184930, that keeps the session storage area
172         maps alive in the UI process when they are destroyed by the web
173         process. The problem is that we also keep the listeners, so that
174         events are also dispatched to the listeners of destroyed areas,
175         and the message handlers were removed in the web process.
176
177         * UIProcess/Storage/StorageManager.cpp:
178         (WebKit::StorageManager::createTransientLocalStorageMap): Add a
179         listener for the new storage map ID when the map is reused.
180         (WebKit::StorageManager::destroyStorageMap): Always remove
181         listeners of destroyed maps.
182
183 2015-10-19  Tim Horton  <timothy_horton@apple.com>
184
185         Remove unused support for long presses from WebKit
186         https://bugs.webkit.org/show_bug.cgi?id=150345
187
188         Reviewed by Beth Dakin.
189
190         * Shared/WebPreferencesDefinitions.h:
191         * UIProcess/API/APIUIClient.h:
192         (API::UIClient::didBeginTrackingPotentialLongMousePress): Deleted.
193         (API::UIClient::didRecognizeLongMousePress): Deleted.
194         (API::UIClient::didCancelTrackingPotentialLongMousePress): Deleted.
195         * UIProcess/API/C/WKPage.cpp:
196         (WKPageSetPageUIClient): Deleted.
197         * UIProcess/API/C/WKPageUIClient.h:
198         * UIProcess/API/C/WKPreferences.cpp:
199         (WKPreferencesGetLongMousePressEnabled):
200         (WKPreferencesSetLongMousePressEnabled): Deleted.
201         * UIProcess/API/C/WKPreferencesRefPrivate.h:
202         * UIProcess/WebPageProxy.cpp:
203         (WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress): Deleted.
204         (WebKit::WebPageProxy::didRecognizeLongMousePress): Deleted.
205         (WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress): Deleted.
206         * UIProcess/WebPageProxy.h:
207         * UIProcess/WebPageProxy.messages.in:
208         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
209         (API::InjectedBundle::PageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
210         (API::InjectedBundle::PageUIClient::didRecognizeLongMousePress): Deleted.
211         (API::InjectedBundle::PageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
212         * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
213         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
214         (WebKit::InjectedBundlePageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
215         (WebKit::InjectedBundlePageUIClient::didRecognizeLongMousePress): Deleted.
216         (WebKit::InjectedBundlePageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
217         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
218         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
219         (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress): Deleted.
220         (WebKit::WebChromeClient::didRecognizeLongMousePress): Deleted.
221         (WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress): Deleted.
222         * WebProcess/WebCoreSupport/WebChromeClient.h:
223         * WebProcess/WebPage/WebPage.cpp:
224         (WebKit::WebPage::updatePreferences): Deleted.
225
226 2015-10-19  Chris Dumez  <cdumez@apple.com>
227
228         Make sure development Safari does not delete the stable Safari cache storage.
229         https://bugs.webkit.org/show_bug.cgi?id=150343
230
231         Reviewed by Antti Koivisto.
232
233         Make sure development Safari does not delete the stable Safari disk cache
234         storage. Development Safari now uses Version 5, while the last stable
235         Safari uses Version 4. Since the 2 versions can co-exist, it is best not
236         to drop the old cache version (4) at this point.
237
238         * NetworkProcess/cache/NetworkCacheStorage.cpp:
239         (WebKit::NetworkCache::Storage::deleteOldVersions):
240
241 2015-10-19  Tim Horton  <timothy_horton@apple.com>
242
243         WKView being inside WKWebView leads to weird API issues
244         https://bugs.webkit.org/show_bug.cgi?id=150174
245
246         Reviewed by Darin Adler.
247
248         * UIProcess/API/mac/WKView.mm:
249         * UIProcess/API/mac/WKViewInternal.h:
250         * UIProcess/Cocoa/WebViewImpl.h: Added.
251         * UIProcess/Cocoa/WebViewImpl.mm: Added.
252         (WebKit::WebViewImpl::WebViewImpl):
253         (WebKit::WebViewImpl::~WebViewImpl):
254         (WebKit::WebViewImpl::setDrawsBackground):
255         (WebKit::WebViewImpl::drawsBackground):
256         (WebKit::WebViewImpl::setDrawsTransparentBackground):
257         (WebKit::WebViewImpl::drawsTransparentBackground):
258         (WebKit::WebViewImpl::acceptsFirstResponder):
259         (WebKit::WebViewImpl::becomeFirstResponder):
260         (WebKit::WebViewImpl::resignFirstResponder):
261         (WebKit::WebViewImpl::isFocused):
262         (WebKit::WebViewImpl::viewWillStartLiveResize):
263         (WebKit::WebViewImpl::viewDidEndLiveResize):
264         (WebKit::WebViewImpl::setFrameSize):
265         (WebKit::WebViewImpl::disableFrameSizeUpdates):
266         (WebKit::WebViewImpl::enableFrameSizeUpdates):
267         (WebKit::WebViewImpl::frameSizeUpdatesDisabled):
268         (WebKit::WebViewImpl::setFrameAndScrollBy):
269         (WebKit::WebViewImpl::setFixedLayoutSize):
270         (WebKit::WebViewImpl::fixedLayoutSize):
271         (WebKit::WebViewImpl::setDrawingAreaSize):
272         (WebKit::WebViewImpl::setContentPreparationRect):
273         (WebKit::WebViewImpl::updateViewExposedRect):
274         (WebKit::WebViewImpl::setClipsToVisibleRect):
275         (WebKit::WebViewImpl::setIntrinsicContentSize):
276         (WebKit::WebViewImpl::intrinsicContentSize):
277         (WebKit::WebViewImpl::setViewScale):
278         (WebKit::WebViewImpl::viewScale):
279         (WebKit::WebViewImpl::layoutMode):
280         (WebKit::WebViewImpl::setLayoutMode):
281         (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
282         (WebKit::WebViewImpl::updateSupportsArbitraryLayoutModes):
283         (WebKit::WebViewImpl::updateSecureInputState):
284         (WebKit::WebViewImpl::resetSecureInputState):
285         (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
286         (WebKit::WebViewImpl::hasFullScreenWindowController):
287         (WebKit::WebViewImpl::fullScreenWindowController):
288         (WebKit::WebViewImpl::closeFullScreenWindowController):
289         (WebKit::WebViewImpl::fullScreenPlaceholderView):
290         (WebKit::WebViewImpl::createFullScreenWindow):
291         Move the actual implementation of a number of WKView methods into a
292         C++ class, WebViewImpl, which WKView calls directly into.
293         Eventually, we will move all of the logic of WKView into WebViewImpl,
294         and then duplicate the necessary forwarding in WKWebView and remove
295         WKWebView's inner WKView.
296
297         * UIProcess/mac/PageClientImpl.h:
298         * UIProcess/mac/PageClientImpl.mm:
299         (WebKit::PageClientImpl::isViewFocused):
300         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
301         (WebKit::PageClientImpl::updateSecureInputState):
302         (WebKit::PageClientImpl::resetSecureInputState):
303         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
304         (WebKit::PageClientImpl::beganEnterFullScreen):
305         (WebKit::PageClientImpl::beganExitFullScreen):
306         For now, forward PageClient requests that can be answered by WebViewImpl
307         to WebViewImpl. Eventually, we'll probably fold PageClientImpl and WebViewImpl
308         together into one class, and these things will collapse down.
309
310         * UIProcess/mac/WKFullScreenWindowController.h:
311         * UIProcess/mac/WKFullScreenWindowController.mm:
312         (-[WKFullScreenWindowController initWithWindow:webView:page:]):
313         (-[WKFullScreenWindowController enterFullScreen:]):
314         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
315         (-[WKFullScreenWindowController exitFullScreen]):
316         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
317         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
318         (-[WKFullScreenWindowController _manager]):
319         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
320         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
321         (-[WKFullScreenWindowController initWithWindow:webView:]): Deleted.
322         (-[WKFullScreenWindowController _page]): Deleted.
323         * UIProcess/mac/WKViewLayoutStrategy.h:
324         * UIProcess/mac/WKViewLayoutStrategy.mm:
325         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]):
326         (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]):
327         (-[WKViewLayoutStrategy invalidate]):
328         (-[WKViewLayoutStrategy didChangeFrameSize]):
329         (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
330         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
331         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]):
332         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
333         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
334         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
335         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]): Deleted.
336         (-[WKViewLayoutStrategy initWithPage:view:mode:]): Deleted.
337         (-[WKViewLayoutStrategy willDestroyView:]): Deleted.
338         (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
339         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
340         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]): Deleted.
341         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
342         Make WKViewLayoutStrategy and WKFullScreenWindowController operate in terms of generic
343         NSViews instead of WKView, so that eventually they will be able to work for either
344         WKView or WKWebView, and so that they can sit underneath WebViewImpl.
345
346         * WebKit2.xcodeproj/project.pbxproj:
347
348 2015-10-19  Commit Queue  <commit-queue@webkit.org>
349
350         Unreviewed, rolling out r191307.
351         https://bugs.webkit.org/show_bug.cgi?id=150338
352
353         broke lots of API tests, need time to figure out whats up
354         (Requested by thorton on #webkit).
355
356         Reverted changeset:
357
358         "WKView being inside WKWebView leads to weird API issues"
359         https://bugs.webkit.org/show_bug.cgi?id=150174
360         http://trac.webkit.org/changeset/191307
361
362 2015-10-19  Tim Horton  <timothy_horton@apple.com>
363
364         Try again to fix the 32-bit build.
365
366         * UIProcess/mac/WebContextMenuProxyMac.mm:
367         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
368
369 2015-10-17  Wenson Hsieh  <wenson_hsieh@apple.com>
370
371         Extend fast-clicking behavior to trigger on elements that have negligible zoom
372         https://bugs.webkit.org/show_bug.cgi?id=150248
373         <rdar://problem/23140069>
374
375         Reviewed by Simon Fraser.
376
377         Currently, fast-clicking only triggers on pages that have unscalable viewports. To allow more websites to benefit from fast-clicking
378         behavior, we generalize fast-clicking to also occur when tapping on elements for which double-tap-to-zoom would zoom the element in
379         or out by an insignificant amount. We define an insignificant amount of zoom to mean that zooming would increase the viewport scale
380         by less than a configurable threshold, or decrease the viewport scale by more than a configurable threshold. We accomplish this by
381         temporarily disabling the double tap gesture recognizer for the duration of the tap. This patch refactors some logic used to compute
382         zoomed viewports to make it possible to predict the change in viewport scale when double tapping to zoom. See the changes in
383         SmartMagnificationController and ViewGestureGeometryCollector for more details.
384
385         There are no new tests, since this patch does not change existing behavior. Instead, this patch adds the machinery needed for zoom-
386         dependent fast-clicking: by setting the preferences WebKitFastClickingEnabled and WebKitFastClickZoomThreshold, we will be able to tweak
387         the behavior dynamically.
388
389         * UIProcess/API/Cocoa/WKWebView.mm:
390         (-[WKWebView _didCommitLayerTree:]):
391         (-[WKWebView _contentZoomScale]):
392         (-[WKWebView _targetContentZoomScaleForRect:currentScale:fitEntireRect:minimumScale:maximumScale:]):
393         (-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
394         (-[WKWebView _viewportIsUserScalable]):
395         * UIProcess/API/Cocoa/WKWebViewInternal.h:
396         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
397         * UIProcess/PageClient.h:
398         * UIProcess/WebPageProxy.h:
399         * UIProcess/WebPageProxy.messages.in:
400         * UIProcess/ios/PageClientImplIOS.h:
401         * UIProcess/ios/PageClientImplIOS.mm:
402         (WebKit::PageClientImpl::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary):
403         * UIProcess/ios/SmartMagnificationController.h:
404         * UIProcess/ios/SmartMagnificationController.mm:
405         (WebKit::SmartMagnificationController::adjustSmartMagnificationTargetRectAndZoomScales):
406         (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
407         (WebKit::SmartMagnificationController::magnify):
408         * UIProcess/ios/WKContentViewInteraction.h:
409         * UIProcess/ios/WKContentViewInteraction.mm:
410         (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
411         (-[WKContentView _fastClickZoomThreshold]):
412         (-[WKContentView _allowDoubleTapToZoomForCurrentZoomScale:andTargetZoomScale:]):
413         (-[WKContentView _disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:allowsDoubleTapZoom:targetRect:isReplaced:minimumScale:maximumScale:]):
414         (-[WKContentView _highlightLongPressRecognized:]):
415         (-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
416         (-[WKContentView _singleTapRecognized:]):
417         (cancelPotentialTapIfNecessary):
418         (-[WKContentView _singleTapCommited:]):
419         (-[WKContentView webSelectionRects]): Deleted.
420         * UIProcess/ios/WebPageProxyIOS.mm:
421         (WebKit::WebPageProxy::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary):
422         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
423         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
424         (WebKit::ViewGestureGeometryCollector::computeZoomInformationForNode):
425         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
426         * WebProcess/WebPage/ios/WebPageIOS.mm:
427         (WebKit::WebPage::potentialTapAtPosition):
428
429 2015-10-19  Tim Horton  <timothy_horton@apple.com>
430
431         WKView being inside WKWebView leads to weird API issues
432         https://bugs.webkit.org/show_bug.cgi?id=150174
433
434         Reviewed by Darin Adler.
435
436         * UIProcess/API/mac/WKView.mm:
437         * UIProcess/API/mac/WKViewInternal.h:
438         * UIProcess/Cocoa/WebViewImpl.h: Added.
439         * UIProcess/Cocoa/WebViewImpl.mm: Added.
440         (WebKit::WebViewImpl::WebViewImpl):
441         (WebKit::WebViewImpl::~WebViewImpl):
442         (WebKit::WebViewImpl::setDrawsBackground):
443         (WebKit::WebViewImpl::drawsBackground):
444         (WebKit::WebViewImpl::setDrawsTransparentBackground):
445         (WebKit::WebViewImpl::drawsTransparentBackground):
446         (WebKit::WebViewImpl::acceptsFirstResponder):
447         (WebKit::WebViewImpl::becomeFirstResponder):
448         (WebKit::WebViewImpl::resignFirstResponder):
449         (WebKit::WebViewImpl::isFocused):
450         (WebKit::WebViewImpl::viewWillStartLiveResize):
451         (WebKit::WebViewImpl::viewDidEndLiveResize):
452         (WebKit::WebViewImpl::setFrameSize):
453         (WebKit::WebViewImpl::disableFrameSizeUpdates):
454         (WebKit::WebViewImpl::enableFrameSizeUpdates):
455         (WebKit::WebViewImpl::frameSizeUpdatesDisabled):
456         (WebKit::WebViewImpl::setFrameAndScrollBy):
457         (WebKit::WebViewImpl::setFixedLayoutSize):
458         (WebKit::WebViewImpl::fixedLayoutSize):
459         (WebKit::WebViewImpl::setDrawingAreaSize):
460         (WebKit::WebViewImpl::setContentPreparationRect):
461         (WebKit::WebViewImpl::updateViewExposedRect):
462         (WebKit::WebViewImpl::setClipsToVisibleRect):
463         (WebKit::WebViewImpl::setIntrinsicContentSize):
464         (WebKit::WebViewImpl::intrinsicContentSize):
465         (WebKit::WebViewImpl::setViewScale):
466         (WebKit::WebViewImpl::viewScale):
467         (WebKit::WebViewImpl::layoutMode):
468         (WebKit::WebViewImpl::setLayoutMode):
469         (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
470         (WebKit::WebViewImpl::updateSupportsArbitraryLayoutModes):
471         (WebKit::WebViewImpl::updateSecureInputState):
472         (WebKit::WebViewImpl::resetSecureInputState):
473         (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
474         (WebKit::WebViewImpl::hasFullScreenWindowController):
475         (WebKit::WebViewImpl::fullScreenWindowController):
476         (WebKit::WebViewImpl::closeFullScreenWindowController):
477         (WebKit::WebViewImpl::fullScreenPlaceholderView):
478         (WebKit::WebViewImpl::createFullScreenWindow):
479         Move the actual implementation of a number of WKView methods into a
480         C++ class, WebViewImpl, which WKView calls directly into.
481         Eventually, we will move all of the logic of WKView into WebViewImpl,
482         and then duplicate the necessary forwarding in WKWebView and remove
483         WKWebView's inner WKView.
484
485         * UIProcess/mac/PageClientImpl.h:
486         * UIProcess/mac/PageClientImpl.mm:
487         (WebKit::PageClientImpl::isViewFocused):
488         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
489         (WebKit::PageClientImpl::updateSecureInputState):
490         (WebKit::PageClientImpl::resetSecureInputState):
491         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
492         (WebKit::PageClientImpl::beganEnterFullScreen):
493         (WebKit::PageClientImpl::beganExitFullScreen):
494         For now, forward PageClient requests that can be answered by WebViewImpl
495         to WebViewImpl. Eventually, we'll probably fold PageClientImpl and WebViewImpl
496         together into one class, and these things will collapse down.
497
498         * UIProcess/mac/WKFullScreenWindowController.h:
499         * UIProcess/mac/WKFullScreenWindowController.mm:
500         (-[WKFullScreenWindowController initWithWindow:webView:page:]):
501         (-[WKFullScreenWindowController enterFullScreen:]):
502         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
503         (-[WKFullScreenWindowController exitFullScreen]):
504         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
505         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
506         (-[WKFullScreenWindowController _manager]):
507         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
508         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
509         (-[WKFullScreenWindowController initWithWindow:webView:]): Deleted.
510         (-[WKFullScreenWindowController _page]): Deleted.
511         * UIProcess/mac/WKViewLayoutStrategy.h:
512         * UIProcess/mac/WKViewLayoutStrategy.mm:
513         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]):
514         (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]):
515         (-[WKViewLayoutStrategy invalidate]):
516         (-[WKViewLayoutStrategy didChangeFrameSize]):
517         (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
518         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
519         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]):
520         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
521         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
522         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
523         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]): Deleted.
524         (-[WKViewLayoutStrategy initWithPage:view:mode:]): Deleted.
525         (-[WKViewLayoutStrategy willDestroyView:]): Deleted.
526         (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
527         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
528         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]): Deleted.
529         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
530         Make WKViewLayoutStrategy and WKFullScreenWindowController operate in terms of generic
531         NSViews instead of WKView, so that eventually they will be able to work for either
532         WKView or WKWebView, and so that they can sit underneath WebViewImpl.
533
534         * WebKit2.xcodeproj/project.pbxproj:
535
536 2015-10-19  Chris Dumez  <cdumez@apple.com>
537
538         [WK2] Generalize NetworkCacheStorage API so it can store different types of metadata
539         https://bugs.webkit.org/show_bug.cgi?id=150221
540         <rdar://problem/23149771>
541
542         Reviewed by Darin Adler and Antti Koivisto.
543
544         Generalize NetworkCacheStorage API so it can store different types of
545         metadata alongside the network resources. This is a pre-requirement to
546         making our NetworkCache smarter by storing information about the
547         resources.
548
549         To keep the code simple, the entry type is now part of the entry key and
550         we store records of a specific type in a 'type' subfolder. The cache
551         structure looks like so:
552         - WebKitCache/Version 5/[Partition]/[Type]/[Hash]
553         - WebKitCache/Version 5/[Partition]/[Type]/[Hash]-blob (Optional)
554
555         Existing cache entries now that the 'resource' type as these are network
556         resources.
557
558         * NetworkProcess/cache/NetworkCache.cpp:
559         * NetworkProcess/cache/NetworkCacheKey.cpp:
560         * NetworkProcess/cache/NetworkCacheKey.h:
561         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
562         * NetworkProcess/cache/NetworkCacheStorage.cpp:
563         * NetworkProcess/cache/NetworkCacheStorage.h:
564
565 2015-10-19  Tim Horton  <timothy_horton@apple.com>
566
567         Try to fix the iOS build
568
569         * Configurations/FeatureDefines.xcconfig:
570
571 2015-10-19  Tim Horton  <timothy_horton@apple.com>
572
573         Try to fix the 32-bit build.
574
575         * UIProcess/mac/WebContextMenuProxyMac.mm:
576         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
577
578 2015-10-16  Anders Carlsson  <andersca@apple.com>
579
580         Fix image service menus somewhat
581         https://bugs.webkit.org/show_bug.cgi?id=150265
582
583         Reviewed by Tim Horton.
584
585         * Shared/ContextMenuContextData.cpp:
586         (WebKit::ContextMenuContextData::ContextMenuContextData):
587         It's a service menu if we have a controlled image.
588
589         * UIProcess/mac/WebContextMenuProxyMac.mm:
590         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
591         Use an item provider.
592
593 2015-10-19  Tim Horton  <timothy_horton@apple.com>
594
595         Add magnify and rotate gesture event support for Mac
596         https://bugs.webkit.org/show_bug.cgi?id=150179
597         <rdar://problem/8036240>
598
599         Reviewed by Darin Adler.
600
601         * Configurations/FeatureDefines.xcconfig:
602         New feature flag.
603
604         * Shared/NativeWebGestureEvent.h: Added.
605         (WebKit::NativeWebGestureEvent::nativeEvent):
606         * Shared/WebEvent.h:
607         * Shared/WebEventConversion.cpp:
608         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
609         (WebKit::platform):
610         * Shared/WebEventConversion.h:
611         * Shared/mac/NativeWebGestureEventMac.mm: Added.
612         (WebKit::webEventTypeForNSEvent):
613         (WebKit::pointForEvent):
614         (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
615         Add and plumb a new native event that wraps a NSEvent of type
616         NSEventTypeMagnify or NSEventTypeRotate (gesture events).
617
618         * Shared/mac/WebGestureEvent.cpp: Added.
619         (WebKit::WebGestureEvent::encode):
620         (WebKit::WebGestureEvent::decode):
621         (WebKit::WebGestureEvent::isGestureEventType):
622         * Shared/mac/WebGestureEvent.h: Added.
623         (WebKit::WebGestureEvent::WebGestureEvent):
624         (WebKit::WebGestureEvent::position):
625         (WebKit::WebGestureEvent::gestureScale):
626         (WebKit::WebGestureEvent::gestureRotation):
627         Add IPC plumbing for WebGestureEvent, which becomes a WebCore::PlatformGestureEvent.
628
629         * UIProcess/API/Cocoa/WKViewPrivate.h:
630         Remove unnecessary iPhone-only WKView code.
631         Add _gestureEventWasNotHandledByWebCore, SPI which can be overridden
632         to react when WebCore decides not to handle a gesture event.
633
634         * UIProcess/API/mac/WKView.mm:
635         (-[WKView magnifyWithEvent:]):
636         Route magnification gesture events to the page, unless we're already
637         in an active view zoom gesture, in which case we'll bypass the page
638         and send the event straight to ViewGestureController.
639
640         (-[WKView rotateWithEvent:]):
641         Route rotation gesture events to the page.
642
643         (-[WKView _gestureEventWasNotHandledByWebCore:]):
644         Let ViewGestureController know that WebCore didn't handle a gesture event.
645         We always give WebCore the first crack at the event if we're not in a zoom,
646         because it could preventDefault() on the Begin phase event, and that should
647         prevent pinch-zoom from starting.
648
649         * UIProcess/PageClient.h:
650         * UIProcess/mac/PageClientImpl.h:
651         * UIProcess/mac/PageClientImpl.mm:
652         (WebKit::PageClientImpl::gestureEventWasNotHandledByWebCore):
653         Plumb gestureEventWasNotHandledByWebCore back from WebPageProxy to WKView.
654
655         * UIProcess/WebPageProxy.cpp:
656         (WebKit::WebPageProxy::handleGestureEvent):
657         (WebKit::WebPageProxy::didReceiveEvent):
658         * UIProcess/WebPageProxy.h:
659         Forward gesture events to EventDispatcher, and let WKView know when WebCore
660         passes on handling them.
661         
662         * UIProcess/mac/ViewGestureController.h:
663         (WebKit::ViewGestureController::hasActiveMagnificationGesture):
664         * UIProcess/mac/ViewGestureControllerMac.mm:
665         (WebKit::ViewGestureController::gestureEventWasNotHandledByWebCore):
666         (WebKit::ViewGestureController::handleMagnificationGestureEvent):
667         Don't try to start a zoom with anything other than a Begin phase event.
668         Try to start a zoom with any events that WebCore doesn't handle.
669         Move dispatch of endMagnificationGesture into ViewGestureController;
670         there is no reason for that to be in WKView anymore.
671
672         * WebKit2.xcodeproj/project.pbxproj:
673         * WebProcess/WebPage/EventDispatcher.cpp:
674         (WebKit::EventDispatcher::gestureEvent):
675         (WebKit::EventDispatcher::dispatchGestureEvent):
676         * WebProcess/WebPage/EventDispatcher.h:
677         * WebProcess/WebPage/EventDispatcher.messages.in:
678         * WebProcess/WebPage/WebPage.cpp:
679         (WebKit::handleGestureEvent):
680         (WebKit::WebPage::gestureEvent):
681         * WebProcess/WebPage/WebPage.h:
682         Dispatch to the main thread and hand off the gesture event to WebCore,
683         asynchronously informing the UI process of whether the event was handled or not.
684
685 2015-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
686
687         [GTK] ASSERTION FAILED: parent in WebInspectorProxy::platformDetach()
688         https://bugs.webkit.org/show_bug.cgi?id=150319
689
690         Reviewed by Žan Doberšek.
691
692         This happens when the inspector is shown/closed very
693         quickly. Since we start the inspector attached by default, when
694         the web inspector is created m_isAttached is set to true, so that
695         when opened, it's attached to the view. If the inspector is closed
696         before it has been actually attached, the inspector view doesn't
697         have a parent, even if the m_isAttached is true. So, we should
698         handle this case instead of asserting. This is what happens in
699         test http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash.html.
700
701         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
702         (WebKit::WebInspectorProxy::platformDetach): Remove the view from
703         its parent container if it was actually attached.
704
705 2015-10-19  Hunseop Jeong  <hs85.jeong@samsung.com>
706
707         [EFL] Implement WebContextMenuProxyEfl::showContextMenu after r191194
708         https://bugs.webkit.org/show_bug.cgi?id=150310
709
710         Reviewed by Gyuyoung Kim.
711
712         showContextMenu() doesn't work correctly after r191194 in EFL port.
713         This patch implements WebContextMenuProxyEfl::showContextMenu.
714
715         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
716         (WebKit::WebContextMenuProxyEfl::WebContextMenuProxyEfl):
717         (WebKit::WebContextMenuProxyEfl::showContextMenu):
718         (WebKit::WebContextMenuProxyEfl::hideContextMenu):
719         * UIProcess/efl/WebContextMenuProxyEfl.h:
720
721 2015-10-18  Csaba Osztrogonác  <ossy@webkit.org>
722
723         [WK2] Simplify unused return warning in WKRetainPtr.h
724         https://bugs.webkit.org/show_bug.cgi?id=150173
725
726         Reviewed by Darin Adler.
727
728         * UIProcess/API/cpp/WKRetainPtr.h:
729         (WebKit::__attribute__):
730         (WebKit::adoptWK): Deleted.
731
732 2015-10-18  Csaba Osztrogonác  <ossy@webkit.org>
733
734         Fix the ENABLE(SECCOMP_FILTERS) build after r187030
735         https://bugs.webkit.org/show_bug.cgi?id=150172
736
737         Reviewed by Alexey Proskuryakov.
738
739         * Shared/linux/SeccompFilters/Syscall.cpp:
740         (WebKit::reportUnexpectedSyscall):
741
742 2015-10-18  Joonghun Park  <jh718.park@samsung.com>
743
744         [GTK] Remove WebKitContextMenu related missing annotation warnings
745         https://bugs.webkit.org/show_bug.cgi?id=150299
746
747         Reviewed by Darin Adler.
748
749         The warnings occur currently because when executing g-ir-scanner,
750         it doesn't consider WebKitContextMenu related .cpp files,
751         but only .h files.
752
753         * PlatformGTK.cmake: Add WebKitContextMenu related cpp files.
754
755 2015-10-18  Myles C. Maxfield  <mmaxfield@apple.com>
756
757         Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
758         https://bugs.webkit.org/show_bug.cgi?id=150287
759
760         Reviewed by Simon Fraser.
761
762         * Shared/WebProcessCreationParameters.cpp:
763         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
764         (WebKit::WebProcessCreationParameters::encode): Deleted.
765         (WebKit::WebProcessCreationParameters::decode): Deleted.
766         * Shared/WebProcessCreationParameters.h:
767         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
768         (WebKit::registerUserDefaultsIfNeeded): Deleted.
769         (WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
770         * WebProcess/cocoa/WebProcessCocoa.mm:
771         (WebKit::WebProcess::platformInitializeWebProcess): Deleted.
772
773 2015-10-18  Yusuke Suzuki  <utatane.tea@gmail.com>
774
775         [GTK] Implement WebContextMenuProxyGtk::showContextMenu after r191194
776         https://bugs.webkit.org/show_bug.cgi?id=150276
777
778         Reviewed by Carlos Garcia Campos.
779
780         After r191194, showContextMenu signature becomes changed, and the implementation
781         is moved from the generic file to the Mac port. It poses the compile error in GTK port.
782         This patch implements WebContextMenuProxyGtk::showContextMenu. The logic is the same
783         to the old one except for dropping SERVICE_CONTROLS support. This is because
784         SERVICE_CONTROLS is not related to GTK.
785
786         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
787         (WebKit::WebContextMenuProxyGtk::showContextMenu):
788         * UIProcess/gtk/WebContextMenuProxyGtk.h:
789
790 2015-10-18  Commit Queue  <commit-queue@webkit.org>
791
792         Unreviewed, rolling out r191250 and r191253.
793         https://bugs.webkit.org/show_bug.cgi?id=150296
794
795         Broke all the tests on Windows (Requested by ap on #webkit).
796
797         Reverted changesets:
798
799         "Stop honoring the user default
800         "WebKitKerningAndLigaturesEnabledByDefault""
801         https://bugs.webkit.org/show_bug.cgi?id=150287
802         http://trac.webkit.org/changeset/191250
803
804         "Build fix after r191250"
805         http://trac.webkit.org/changeset/191253
806
807 2015-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
808
809         Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
810         https://bugs.webkit.org/show_bug.cgi?id=150287
811
812         Reviewed by Simon Fraser.
813
814         * Shared/WebProcessCreationParameters.cpp:
815         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
816         (WebKit::WebProcessCreationParameters::encode): Deleted.
817         (WebKit::WebProcessCreationParameters::decode): Deleted.
818         * Shared/WebProcessCreationParameters.h:
819         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
820         (WebKit::registerUserDefaultsIfNeeded): Deleted.
821         (WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
822         * WebProcess/cocoa/WebProcessCocoa.mm:
823         (WebKit::WebProcess::platformInitializeWebProcess): Deleted.
824
825 2015-10-17  Dan Bernstein  <mitz@apple.com>
826
827         [Cocoa] Stop using WKAXRegisterRemoteApp
828         https://bugs.webkit.org/show_bug.cgi?id=150283
829
830         Reviewed by Alexey Proskuryakov.
831
832         * Platform/spi/mac: Added.
833         * Platform/spi/mac/AppKitSPI.h: Added. Includes declaration of
834           +[NSAccessibilityRemoteUIElement setRemoteUIApp:].
835
836         * WebKit2.xcodeproj/project.pbxproj: Added reference to new header. Also changed the path of
837           the Platform/spi/Cocoa group to the corresponding path in the source tree.
838
839         * WebProcess/cocoa/WebProcessCocoa.mm:
840         (WebKit::registerWithAccessibility): Added.
841         (WebKit::WebProcess::platformInitializeProcess): Use new registerWithAccessibility instead
842           of WKAXRegisterRemoteApp.
843
844 2015-10-16  Simon Fraser  <simon.fraser@apple.com>
845
846         Enhance TextStream for logging, remove subclasses, log more things
847         https://bugs.webkit.org/show_bug.cgi?id=150269
848
849         Reviewed by Zalan Bujtas.
850
851         Remove the various TextStream subclasses that only existed to support indenting,
852         and output additional types. Add output for more WebCore and WebKit2 types, and
853         just use TextStream everywhere.
854         
855         TextStream is enhance to support grouping (open paren and intent), with a 
856         stack-based class to open/end a group.
857         
858         Remove some SVG-specific duplicate output functions.
859         
860         Outdent namespace contents of GraphicsTypes.h.
861
862         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
863         (WebKit::dump):
864         (WebKit::recursiveDumpNodes):
865         (WebKit::RemoteScrollingCoordinatorTransaction::description):
866         (WebKit::RemoteScrollingTreeTextStream::RemoteScrollingTreeTextStream): Deleted.
867         (WebKit::RemoteScrollingTreeTextStream::increaseIndent): Deleted.
868         (WebKit::RemoteScrollingTreeTextStream::decreaseIndent): Deleted.
869         (WebKit::RemoteScrollingTreeTextStream::writeIndent): Deleted.
870         (WebKit::dumpProperty): Deleted.
871         (WebKit::RemoteScrollingTreeTextStream::operator<<): Deleted.
872         (WebKit::RemoteScrollingTreeTextStream::dump): Deleted.
873         (WebKit::RemoteScrollingTreeTextStream::recursiveDumpNodes): Deleted.
874         * Shared/mac/RemoteLayerTreeTransaction.mm:
875         (WebKit::operator<<):
876         (WebKit::dumpChangedLayers):
877         (WebKit::RemoteLayerTreeTransaction::description):
878         (WebKit::RemoteLayerTreeTextStream::RemoteLayerTreeTextStream): Deleted.
879         (WebKit::RemoteLayerTreeTextStream::increaseIndent): Deleted.
880         (WebKit::RemoteLayerTreeTextStream::decreaseIndent): Deleted.
881         (WebKit::dumpProperty): Deleted.
882         (WebKit::RemoteLayerTreeTextStream::operator<<): Deleted.
883         (WebKit::RemoteLayerTreeTextStream::writeIndent): Deleted.
884         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
885         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
886         (WebKit::operator<<):
887
888 2015-10-17  Hunseop Jeong  <hs85.jeong@samsung.com>
889
890         URTBF after r191194 to fix EFL build.
891         https://bugs.webkit.org/show_bug.cgi?id=150272
892
893         Reviewed by Csaba Osztrogonác.
894
895         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
896         (WebKit::WebContextMenuProxyEfl::showContextMenu):
897         * UIProcess/efl/WebContextMenuProxyEfl.h:
898
899 2015-10-16  Wenson Hsieh  <wenson_hsieh@apple.com>
900
901         Add a WKWebView input delegate SPI
902         https://bugs.webkit.org/show_bug.cgi?id=149646
903
904         Reviewed by Dan Bernstein.
905
906         Renames the existing _WKFormDelegate to _WKInputDelegate and adds a new delegate SPI method
907         -[_WKInputDelegate _webView:focusShouldStartInputSession:] that allows clients to allow or
908         disallow showing up the keyboard. To make this decision, clients are given a
909         _WKFocusedElementInfo, which contains information about the focused element prior to the
910         keyboard showing up so the client will be able to override default assistance behavior.
911
912         While the information contained in a _WKFocusedElementInfo currently seems like overkill for
913         _webView:focusShouldStartInputSession, our intentions are to give WebKit clients control over more
914         details of how node assistance works, such as being able to use a custom editor for certain
915         types of nodes.
916
917         * Shared/API/Cocoa/WebKitPrivate.h: Added new header _WKFocusedElementInfo.h.
918         * UIProcess/API/Cocoa/WKWebView.h:
919         * UIProcess/API/Cocoa/WKWebView.mm:
920         (-[WKWebView _inputDelegate]):
921         (-[WKWebView _formDelegate]):
922         (-[WKWebView _setInputDelegate:]):
923         (-[WKWebView _setFormDelegate:]):
924         (-[WKWebView initWithFrame:configuration:]): Deleted canAssistOnProgrammaticFocus flag.
925         (-[WKWebView canAssistOnProgrammaticFocus]): Ditto.
926         (-[WKWebView setCanAssistOnProgrammaticFocus:]): Ditto.
927         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
928         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
929         (-[WKWebViewConfiguration init]): Deleted.
930         (-[WKWebViewConfiguration _canAssistOnProgrammaticFocus]): Deleted canAssistOnProgrammaticFocus flag.
931         (-[WKWebViewConfiguration _setCanAssistOnProgrammaticFocus:]): Ditto.
932         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
933         * UIProcess/API/Cocoa/_WKFocusedElementInfo.h: Added.
934         * UIProcess/API/Cocoa/_WKFormDelegate.h:
935         * UIProcess/API/Cocoa/_WKInputDelegate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKFormDelegate.h.
936         * UIProcess/ios/WKContentViewInteraction.mm:
937         (-[WKFocusedElementInfo initWithAssistedNodeInformation:isInteracting:]):
938         (-[WKFocusedElementInfo type]):
939         (-[WKFocusedElementInfo value]):
940         (-[WKFocusedElementInfo isUserInitiated]):
941         (-[WKContentView accessoryAutoFill]):
942         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): If the input delegate responds to
943             shouldStartInputSession, consult it to see if we should bring up the keyboard; otherwise, use our default behavior.
944         * WebKit2.xcodeproj/project.pbxproj:
945
946 2015-10-16  Simon Fraser  <simon.fraser@apple.com>
947
948         Make TextStream the canonical way to log classes in WebCore
949         https://bugs.webkit.org/show_bug.cgi?id=150256
950
951         Reviewed by Sam Weinig.
952
953         We vacillated between PrintStream and TextStream as being the canonical way
954         to stringify WebCore data structures. This patch solidifies TextStream
955         as the solution, since it has convenient stream syntax, and is what we
956         use for render tree dumps.
957
958         Remove TextStream member functions that output non-simple structs
959         (sizes, points and rects), replacing them with free operator<< functions
960         in the .cpp file for the relevant class. Formatting is currently consistent
961         with RenderTreeAsText output, to avoid breaking tests.
962
963         Remove custom FloatRect outputting in SVG and RemoteLayerTreeTransaction.
964
965         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
966         (WebKit::RemoteScrollingTreeTextStream::operator<<): Deleted.
967         * Shared/mac/RemoteLayerTreeTransaction.mm:
968         (WebKit::RemoteLayerTreeTextStream::operator<<): Deleted.
969
970 2015-10-16  Anders Carlsson  <andersca@apple.com>
971
972         Remove some dead menu code
973         https://bugs.webkit.org/show_bug.cgi?id=150247
974
975         Reviewed by Andreas Kling.
976
977         * Shared/WebContextMenuItemData.cpp:
978         (WebKit::WebContextMenuItemData::WebContextMenuItemData):
979         (WebKit::WebContextMenuItemData::encode): Deleted.
980         * Shared/WebContextMenuItemData.h:
981         (WebKit::WebContextMenuItemData::selectionHandler): Deleted.
982         * UIProcess/mac/WebContextMenuProxyMac.mm:
983         (WebKit::nsMenuItem):
984
985 2015-10-16  Anders Carlsson  <andersca@apple.com>
986
987         Move more code to WebContextMenuProxyMac
988         https://bugs.webkit.org/show_bug.cgi?id=150240
989
990         Reviewed by Tim Horton.
991
992         * UIProcess/WebContextMenuProxy.h:
993         * UIProcess/WebPageProxy.cpp:
994         (WebKit::WebPageProxy::internalShowContextMenu):
995         * UIProcess/WebPageProxy.h:
996         (WebKit::WebPageProxy::contextMenuClient):
997         * UIProcess/mac/WebContextMenuProxyMac.h:
998         * UIProcess/mac/WebContextMenuProxyMac.mm:
999         (WebKit::WebContextMenuProxyMac::initializeShareMenuItem):
1000         (WebKit::WebContextMenuProxyMac::showContextMenu):
1001         * UIProcess/mac/WebPageProxyMac.mm:
1002         (WebKit::WebPageProxy::platformInitializeShareMenuItem): Deleted.
1003
1004 2015-10-16  Tim Horton  <timothy_horton@apple.com>
1005
1006         Hook up autolayout intrinsic sizing for WKWebView
1007         https://bugs.webkit.org/show_bug.cgi?id=150219
1008         <rdar://problem/20016905>
1009
1010         Reviewed by Simon Fraser.
1011
1012         * UIProcess/API/Cocoa/WKWebView.mm:
1013         (-[WKWebView initWithFrame:configuration:]):
1014         (-[WKWebView intrinsicContentSize]):
1015         (-[WKWebView _setIntrinsicContentSize:]):
1016         (-[WKWebView _minimumLayoutWidth]):
1017         (-[WKWebView _setMinimumLayoutWidth:]):
1018         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1019         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1020         Add a simple SPI to specify the minimum width that a WKWebView will attempt
1021         to lay out to, similar to WKView except just a width, not a size, and
1022         with no option to force the height to the view size. Similar behavior can
1023         be achieved by clients by setting custom autolayout constraints on the view.
1024
1025         * UIProcess/mac/PageClientImpl.mm:
1026         (WebKit::PageClientImpl::intrinsicContentSizeDidChange):
1027         Forward intrinsic content size changes to the WKWebView, not its inner WKView,
1028         if we have one.
1029
1030         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1031         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1032         Only set the autosizing fixed minimum height if we're using that behavior;
1033         otherwise, setting it to the view's height will end up accidentally
1034         turning on that behavior (which involves an extra layout per resize!).
1035
1036 2015-10-15  Anders Carlsson  <andersca@apple.com>
1037
1038         Use the ShowContextMenu message for service menus as well
1039         https://bugs.webkit.org/show_bug.cgi?id=150206
1040
1041         Reviewed by Tim Horton.
1042
1043         * Shared/ContextMenuContextData.cpp:
1044         (WebKit::ContextMenuContextData::ContextMenuContextData):
1045         (WebKit::ContextMenuContextData::encode):
1046         (WebKit::ContextMenuContextData::decode):
1047         * Shared/ContextMenuContextData.h:
1048         (WebKit::ContextMenuContextData::type):
1049         (WebKit::ContextMenuContextData::ContextMenuContextData):
1050         (WebKit::ContextMenuContextData::isServicesMenu):
1051         (WebKit::ContextMenuContextData::needsServicesMenu): Deleted.
1052         * UIProcess/WebPageProxy.cpp:
1053         (WebKit::WebPageProxy::showContextMenu):
1054         (WebKit::WebPageProxy::internalShowContextMenu):
1055         * UIProcess/WebPageProxy.h:
1056         * UIProcess/WebPageProxy.messages.in:
1057         * UIProcess/mac/WebContextMenuProxyMac.mm:
1058         (WebKit::WebContextMenuProxyMac::populate):
1059         (WebKit::WebContextMenuProxyMac::showContextMenu):
1060         * UIProcess/mac/WebPageProxyMac.mm:
1061         (WebKit::WebPageProxy::showSelectionServiceMenu): Deleted.
1062         * WebProcess/WebPage/mac/WebPageMac.mm:
1063         (WebKit::WebPage::handleSelectionServiceClick):
1064
1065 2015-10-16  Hunseop Jeong  <hs85.jeong@samsung.com>
1066
1067         [GTK] Try to fix the build after r191137
1068         https://bugs.webkit.org/show_bug.cgi?id=150222
1069
1070         Reviewed by Carlos Garcia Campos.
1071
1072         * UIProcess/API/gtk/PageClientImpl.cpp:
1073         (WebKit::PageClientImpl::doneWithKeyEvent):
1074         (WebKit::PageClientImpl::createPopupMenuProxy):
1075         (WebKit::PageClientImpl::createContextMenuProxy):
1076         (WebKit::PageClientImpl::createColorPicker):
1077         * UIProcess/API/gtk/PageClientImpl.h:
1078         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1079         (WebKit::WebContextMenuProxyGtk::populate):
1080         (WebKit::WebContextMenuProxyGtk::showContextMenu):
1081         (WebKit::WebContextMenuProxyGtk::hideContextMenu):
1082         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
1083         * UIProcess/gtk/WebContextMenuProxyGtk.h:
1084         (WebKit::WebContextMenuProxyGtk::create):
1085         (WebKit::WebContextMenuProxyGtk::gtkMenu):
1086         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
1087         (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
1088         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
1089         (WebKit::WebPopupMenuProxyGtk::create):
1090         (WebKit::WebPopupMenuProxyGtk::setCurrentlySelectedMenuItem):
1091
1092 2015-10-15  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1093
1094          EFL build fix since r191137
1095
1096          Unreviewed EFL build fix.
1097
1098         * UIProcess/CoordinatedGraphics/WebView.cpp: Removed.
1099
1100 2015-10-15  Myles C. Maxfield  <mmaxfield@apple.com>
1101
1102         Migrate to CGContextSetBaseCTM() and CGContextResetClip() from WKSI
1103         https://bugs.webkit.org/show_bug.cgi?id=150155
1104
1105         Reviewed by Tim Horton.
1106
1107         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1108         (InitWebCoreSystemInterface): Deleted.
1109
1110 2015-10-15  Dean Jackson  <dino@apple.com>
1111
1112         Fix the iOS build. And hopefully not breaking the other builds
1113         at the same time.
1114
1115         * UIProcess/PageClient.h:
1116         * UIProcess/WebContextMenuProxy.cpp:
1117         * UIProcess/WebContextMenuProxy.h:
1118         * UIProcess/ios/PageClientImplIOS.h:
1119         * UIProcess/ios/PageClientImplIOS.mm:
1120         * UIProcess/mac/PageClientImpl.h:
1121         * UIProcess/mac/PageClientImpl.mm:
1122
1123 2015-10-15  Anders Carlsson  <andersca@apple.com>
1124
1125         Use the context inside WebContextMenuProxyMac
1126         https://bugs.webkit.org/show_bug.cgi?id=150196
1127
1128         Reviewed by Tim Horton.
1129
1130         * UIProcess/WebContextMenuProxy.h:
1131         * UIProcess/WebPageProxy.cpp:
1132         (WebKit::WebPageProxy::internalShowContextMenu):
1133         * UIProcess/mac/WebContextMenuProxyMac.h:
1134         * UIProcess/mac/WebContextMenuProxyMac.mm:
1135         (WebKit::WebContextMenuProxyMac::populate):
1136         (WebKit::WebContextMenuProxyMac::showContextMenu):
1137
1138 2015-10-15  Anders Carlsson  <andersca@apple.com>
1139
1140         Use the context menu location that's stored in the context data
1141         https://bugs.webkit.org/show_bug.cgi?id=150194
1142
1143         Reviewed by Tim Horton.
1144
1145         * UIProcess/WebContextMenuProxy.h:
1146         * UIProcess/WebPageProxy.cpp:
1147         (WebKit::WebPageProxy::internalShowContextMenu):
1148         * UIProcess/mac/WebContextMenuProxyMac.h:
1149         * UIProcess/mac/WebContextMenuProxyMac.mm:
1150         (WebKit::WebContextMenuProxyMac::showContextMenu):
1151
1152 2015-10-15  Anders Carlsson  <andersca@apple.com>
1153
1154         Store the context menu data and user data in the WebContextMenuProxy object
1155         https://bugs.webkit.org/show_bug.cgi?id=150191
1156
1157         Reviewed by Tim Horton.
1158
1159         * UIProcess/PageClient.h:
1160         * UIProcess/WebContextMenuProxy.cpp:
1161         (WebKit::WebContextMenuProxy::WebContextMenuProxy):
1162         * UIProcess/WebContextMenuProxy.h:
1163         * UIProcess/WebPageProxy.cpp:
1164         (WebKit::WebPageProxy::internalShowContextMenu):
1165         * UIProcess/ios/PageClientImplIOS.h:
1166         * UIProcess/ios/PageClientImplIOS.mm:
1167         (WebKit::PageClientImpl::createContextMenuProxy):
1168         * UIProcess/mac/PageClientImpl.h:
1169         * UIProcess/mac/PageClientImpl.mm:
1170         (WebKit::PageClientImpl::createContextMenuProxy):
1171         * UIProcess/mac/WebContextMenuProxyMac.h:
1172         (WebKit::WebContextMenuProxyMac::create):
1173         * UIProcess/mac/WebContextMenuProxyMac.mm:
1174         (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
1175
1176 2015-10-15  Dan Bernstein  <mitz@apple.com>
1177
1178         [Cocoa] Stop using WKSetNSURLConnectionDefersCallbacks
1179         https://bugs.webkit.org/show_bug.cgi?id=150189
1180
1181         Reviewed by Anders Carlsson.
1182
1183         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1184         (InitWebCoreSystemInterface): Removed initialization.
1185
1186 2015-10-15  Anders Carlsson  <andersca@apple.com>
1187
1188         Fix build.
1189
1190         * UIProcess/API/APIFrameInfo.cpp:
1191         (API::FrameInfo::~FrameInfo):
1192         * UIProcess/API/APIFrameInfo.h:
1193         * UIProcess/API/Cocoa/WKUserContentController.mm:
1194
1195 2015-10-15  Anders Carlsson  <andersca@apple.com>
1196
1197         CTTE menu proxies
1198         https://bugs.webkit.org/show_bug.cgi?id=150187
1199
1200         Reviewed by Tim Horton.
1201
1202         * UIProcess/PageClient.h:
1203         * UIProcess/WebPageProxy.cpp:
1204         (WebKit::WebPageProxy::showPopupMenu):
1205         (WebKit::WebPageProxy::internalShowContextMenu):
1206         * UIProcess/WebPopupMenuProxy.h:
1207         (WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
1208         * UIProcess/ios/PageClientImplIOS.h:
1209         * UIProcess/ios/PageClientImplIOS.mm:
1210         (WebKit::PageClientImpl::createPopupMenuProxy):
1211         (WebKit::PageClientImpl::createContextMenuProxy): Deleted.
1212         * UIProcess/mac/PageClientImpl.h:
1213         * UIProcess/mac/PageClientImpl.mm:
1214         (WebKit::PageClientImpl::createPopupMenuProxy):
1215         (WebKit::PageClientImpl::createContextMenuProxy):
1216         * UIProcess/mac/WebContextMenuProxyMac.h:
1217         (WebKit::WebContextMenuProxyMac::create):
1218         (WebKit::WebContextMenuProxyMac::page):
1219         * UIProcess/mac/WebContextMenuProxyMac.mm:
1220         (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
1221         (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
1222         (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
1223         * UIProcess/mac/WebPopupMenuProxyMac.h:
1224         (WebKit::WebPopupMenuProxyMac::create):
1225         * UIProcess/mac/WebPopupMenuProxyMac.mm:
1226         (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
1227
1228 2015-10-15  Anders Carlsson  <andersca@apple.com>
1229
1230         Add -[WKFrameInfo _handle]
1231         https://bugs.webkit.org/show_bug.cgi?id=150185
1232         rdar://problem/23132371
1233
1234         Reviewed by Tim Horton.
1235
1236         * UIProcess/API/APIFrameInfo.cpp:
1237         (API::FrameInfo::FrameInfo):
1238         * UIProcess/API/APIFrameInfo.h:
1239         * UIProcess/API/Cocoa/WKFrameInfo.mm:
1240         (-[WKFrameInfo _handle]):
1241         * UIProcess/API/Cocoa/WKFrameInfoInternal.h:
1242         * UIProcess/API/Cocoa/WKFrameInfoPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h.
1243         * UIProcess/WebPageProxy.cpp:
1244         (WebKit::WebPageProxy::showPopupMenu):
1245         (WebKit::WebPageProxy::internalShowContextMenu):
1246         * UIProcess/WebPopupMenuProxy.h:
1247         (WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
1248         * WebKit2.xcodeproj/project.pbxproj:
1249
1250 2015-10-15  Anders Carlsson  <andersca@apple.com>
1251
1252         The menu location and menu items should be part of ContextMenuContextData
1253         https://bugs.webkit.org/show_bug.cgi?id=150182
1254
1255         Reviewed by Andreas Kling.
1256
1257         * Shared/ContextMenuContextData.cpp:
1258         (WebKit::ContextMenuContextData::ContextMenuContextData):
1259         (WebKit::ContextMenuContextData::encode):
1260         (WebKit::ContextMenuContextData::decode):
1261         * Shared/ContextMenuContextData.h:
1262         (WebKit::ContextMenuContextData::menuLocation):
1263         (WebKit::ContextMenuContextData::menuItems):
1264         (WebKit::ContextMenuContextData::ContextMenuContextData):
1265         * UIProcess/WebPageProxy.cpp:
1266         (WebKit::WebPageProxy::showContextMenu):
1267         (WebKit::WebPageProxy::internalShowContextMenu):
1268         * UIProcess/WebPageProxy.h:
1269         * UIProcess/WebPageProxy.messages.in:
1270         * UIProcess/mac/WebPageProxyMac.mm:
1271         (WebKit::WebPageProxy::showSelectionServiceMenu):
1272         * WebProcess/WebPage/WebContextMenu.cpp:
1273         (WebKit::WebContextMenu::show):
1274
1275 2015-10-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1276
1277         [GTK] Test WebKit2.RestoreSessionStateContainingFormData fails
1278         https://bugs.webkit.org/show_bug.cgi?id=84960
1279
1280         Reviewed by Žan Doberšek.
1281
1282         Add a cross-platform implementation to LegacySessionStateCodingNone
1283         using the new SessionState, so that non mac ports can make unit
1284         tests that use the legacy session state coding pass.
1285
1286         * UIProcess/LegacySessionStateCodingNone.cpp:
1287         (WebKit::encodeLegacySessionState):
1288         (WebKit::decodeLegacySessionState):
1289         (WebKit::encodeLegacySessionHistoryEntryData): Deleted.
1290         (WebKit::decodeLegacySessionHistoryEntryData): Deleted.
1291
1292 2015-10-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1293
1294         Unreviewed. Fix wrong #ifdef added in r190615.
1295
1296         This disabled accelerated compositing unconditionally.
1297
1298         * UIProcess/gtk/WebPreferencesGtk.cpp:
1299         (WebKit::WebPreferences::platformInitializeStore):
1300
1301 2015-10-14  Zhuo Li  <zachli@apple.com>
1302
1303         Augment <input type=search>’s recent search history with the time each entry was added,
1304         in order to allow time-based clearing of search history.
1305         https://bugs.webkit.org/show_bug.cgi?id=148388.
1306
1307         Reviewed by Darin Adler.
1308
1309         Replace Vector<String> with Vector<RecentSearch>, where RecentSearch is a struct
1310         that consists search string and time, for recent searches in order to store additional time
1311         information.
1312
1313         All these new RecentSearches are stored in a plist in which the structure looks like:
1314         Root {
1315             "items": {
1316                 autosave name: {
1317                     "searches": [
1318                         { "searchString": searchString, "date": date },
1319                         ...
1320                     ]
1321                 }
1322             }
1323         }
1324
1325         * Scripts/webkit/messages.py:
1326         (headers_for_type):
1327         * Shared/WebCoreArgumentCoders.cpp:
1328         (IPC::ArgumentCoder<RecentSearch>::encode): Encode the new struct RecentSearch
1329         (IPC::ArgumentCoder<RecentSearch>::decode): Decode the new struct RecentSearch
1330         * Shared/WebCoreArgumentCoders.h:
1331         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1332         (WebKit::WebPageProxy::saveRecentSearches): Call saveRecentSearches in WebCore::SearchPopupMenuCocoa.
1333         (WebKit::WebPageProxy::loadRecentSearches): Call loadRecentSearches in WebCore::SearchPopupMenuCocoa.
1334         * UIProcess/WebPageProxy.h:
1335         * UIProcess/WebPageProxy.messages.in:
1336         * UIProcess/efl/WebPageProxyEfl.cpp:
1337         (WebKit::WebPageProxy::saveRecentSearches):
1338         (WebKit::WebPageProxy::loadRecentSearches):
1339         * UIProcess/gtk/WebPageProxyGtk.cpp:
1340         (WebKit::WebPageProxy::saveRecentSearches):
1341         (WebKit::WebPageProxy::loadRecentSearches):
1342         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
1343         (WebKit::WebSearchPopupMenu::saveRecentSearches):
1344         (WebKit::WebSearchPopupMenu::loadRecentSearches):
1345         * WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
1346
1347 2015-10-14  Wenson Hsieh  <wenson_hsieh@apple.com>
1348
1349         Web pages with unscalable viewports shouldn't have a single tap delay
1350         https://bugs.webkit.org/show_bug.cgi?id=149968
1351         <rdar://problem/23054453>
1352
1353         Reviewed by Simon Fraser.
1354
1355         When a viewport is unscalable (specified through the meta viewport tag) we
1356         do not add a delay to our single tap gesture recognizer. We do this by
1357         disabling or reinitializing the WKContentView's double tap gesture recognizer
1358         when the viewport becomes unscalable or scalable, respectively. A viewport is
1359         deemed unscalable when it has user-scalable = no, or when the minimum scale is
1360         greater than or equal to the maximum scale.
1361
1362         * UIProcess/API/Cocoa/WKWebView.mm:
1363         (-[WKWebView _didCommitLayerTree:]):
1364         * UIProcess/ios/WKContentViewInteraction.h:
1365         * UIProcess/ios/WKContentViewInteraction.mm:
1366         (-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]): Pulled logic
1367                 for initializing a double tap gesture recognizer out into a helper function.
1368         (-[WKContentView setupInteraction]):
1369         (-[WKContentView _setDoubleTapGesturesEnabled:]): Turns gesture recognition for double
1370                 taps on or off.
1371
1372 2015-10-14  Anders Carlsson  <andersca@apple.com>
1373
1374         Remove a message that isn't used by anyone
1375         https://bugs.webkit.org/show_bug.cgi?id=150136
1376
1377         Reviewed by Andreas Kling.
1378
1379         * UIProcess/API/APILoaderClient.h:
1380         (API::LoaderClient::didRemoveFrameFromHierarchy): Deleted.
1381         * UIProcess/API/C/WKPage.cpp:
1382         (WKPageSetPageLoaderClient): Deleted.
1383         * UIProcess/WebPageProxy.cpp:
1384         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy): Deleted.
1385         * UIProcess/WebPageProxy.h:
1386         * UIProcess/WebPageProxy.messages.in:
1387         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1388         (WebKit::WebFrameLoaderClient::detachedFromParent2): Deleted.
1389
1390 2015-10-14  Alex Christensen  <achristensen@webkit.org>
1391
1392         Add SPI for reloading without content blockers
1393         https://bugs.webkit.org/show_bug.cgi?id=150058
1394         rdar://problem/22742222
1395
1396         Reviewed by Sam Weinig.
1397
1398         * Shared/WebPageCreationParameters.cpp:
1399         (WebKit::WebPageCreationParameters::encode):
1400         (WebKit::WebPageCreationParameters::decode):
1401         * Shared/WebPageCreationParameters.h:
1402         * UIProcess/API/C/WKPage.cpp:
1403         (WKPageReload):
1404         (WKPageReloadWithoutContentBlockers):
1405         (WKPageReloadFromOrigin):
1406         (WKPageTryClose):
1407         (WKPageSetUserContentExtensionsEnabled):
1408         (WKPageSupportsTextEncoding):
1409         * UIProcess/API/C/WKPage.h:
1410         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1411         (-[WKBrowsingContextController reload]):
1412         (-[WKBrowsingContextController reloadFromOrigin]):
1413         (-[WKBrowsingContextController applicationNameForUserAgent]):
1414         * UIProcess/API/Cocoa/WKWebView.mm:
1415         (-[WKWebView reload]):
1416         (-[WKWebView reloadFromOrigin]):
1417         (-[WKWebView _setUserContentExtensionsEnabled:]):
1418         (-[WKWebView _userContentExtensionsEnabled]):
1419         (-[WKWebView _webProcessIdentifier]):
1420         (-[WKWebView _killWebContentProcess]):
1421         (-[WKWebView _reloadWithoutContentBlockers]):
1422         (-[WKWebView _killWebContentProcessAndResetState]):
1423         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1424         * UIProcess/API/gtk/WebKitWebView.cpp:
1425         (webkit_web_view_reload):
1426         (webkit_web_view_reload_bypass_cache):
1427         * UIProcess/WebFrameProxy.cpp:
1428         (WebKit::WebFrameProxy::didHandleContentFilterUnblockNavigation):
1429         * UIProcess/WebPageProxy.cpp:
1430         (WebKit::WebPageProxy::stopLoading):
1431         (WebKit::WebPageProxy::reload):
1432         (WebKit::WebPageProxy::creationParameters):
1433         (WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
1434         (WebKit::WebPageProxy::setUserContentExtensionsEnabled): Deleted.
1435         * UIProcess/WebPageProxy.h:
1436         (WebKit::WebPageProxy::userContentExtensionsEnabled): Deleted.
1437         * WebProcess/WebPage/WebPage.cpp:
1438         (WebKit::m_shouldDispatchFakeMouseMoveEvents):
1439         (WebKit::WebPage::setDefersLoading):
1440         (WebKit::WebPage::reload):
1441         (WebKit::WebPage::goForward):
1442         (WebKit::WebPage::createDocumentLoader):
1443         (WebKit::WebPage::setShouldScaleViewToFitDocument):
1444         (WebKit::WebPage::imageOrMediaDocumentSizeChanged):
1445         (WebKit::WebPage::setUserContentExtensionsEnabled): Deleted.
1446         * WebProcess/WebPage/WebPage.h:
1447         * WebProcess/WebPage/WebPage.messages.in:
1448
1449 2015-10-14  Simon Fraser  <simon.fraser@apple.com>
1450
1451         Change GraphicsContext image-drawing functions to take references
1452         https://bugs.webkit.org/show_bug.cgi?id=150108
1453
1454         Reviewed by Tim Horton and Sam Weinig.
1455
1456         Change GraphicsContext::drawImage(), drawTiledImage(), drawImageBuffer(), clipToImageBuffer()
1457         and isCompatibleWithBuffer() to take references, and adjust calling code, adding
1458         null-checks where necessary.
1459
1460         * Shared/ContextMenuContextData.cpp:
1461         (WebKit::ContextMenuContextData::ContextMenuContextData):
1462         * Shared/WebCoreArgumentCoders.cpp:
1463         (IPC::encodeImage):
1464         (IPC::encodeOptionalImage):
1465         (IPC::ArgumentCoder<Cursor>::encode):
1466         * WebProcess/WebPage/WebFrame.cpp:
1467         (WebKit::WebFrame::createSelectionSnapshot):
1468
1469 2015-10-14  Anders Carlsson  <andersca@apple.com>
1470
1471         Change the bundle app cache APIs to take a page
1472         https://bugs.webkit.org/show_bug.cgi?id=150123
1473
1474         Reviewed by Sam Weinig.
1475
1476         This is another step towards getting rid of ApplicationCacheStorage::singleton().
1477         Ideally the WKTR tests that use this should be converted to API tests.
1478
1479         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1480         (WKBundleClearApplicationCache): Deleted.
1481         (WKBundleClearApplicationCacheForOrigin): Deleted.
1482         (WKBundleSetAppCacheMaximumSize): Deleted.
1483         (WKBundleGetAppCacheUsageForOrigin): Deleted.
1484         (WKBundleSetApplicationCacheOriginQuota): Deleted.
1485         (WKBundleResetApplicationCacheOriginQuota): Deleted.
1486         (WKBundleCopyOriginsWithApplicationCache): Deleted.
1487         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1488         (WKBundlePageClearApplicationCache):
1489         (WKBundlePageClearApplicationCacheForOrigin):
1490         (WKBundlePageSetAppCacheMaximumSize):
1491         (WKBundlePageGetAppCacheUsageForOrigin):
1492         (WKBundlePageSetApplicationCacheOriginQuota):
1493         (WKBundlePageResetApplicationCacheOriginQuota):
1494         (WKBundlePageCopyOriginsWithApplicationCache):
1495         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1496         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1497         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1498         (WebKit::InjectedBundle::clearApplicationCache): Deleted.
1499         (WebKit::InjectedBundle::clearApplicationCacheForOrigin): Deleted.
1500         (WebKit::InjectedBundle::setAppCacheMaximumSize): Deleted.
1501         (WebKit::InjectedBundle::appCacheUsageForOrigin): Deleted.
1502         (WebKit::InjectedBundle::setApplicationCacheOriginQuota): Deleted.
1503         (WebKit::InjectedBundle::resetApplicationCacheOriginQuota): Deleted.
1504         (WebKit::InjectedBundle::originsWithApplicationCache): Deleted.
1505         * WebProcess/InjectedBundle/InjectedBundle.h:
1506
1507 2015-10-14  Joonghun Park  <jh718.park@samsung.com>
1508
1509         [EFL] Fix the problem in which environment variable included in webprocess-cmd-prefix can't be parsed
1510         https://bugs.webkit.org/show_bug.cgi?id=148616
1511
1512         Reviewed by Gyuyoung Kim.
1513
1514         This patch fixes the problem in which environment variable in web process-cmd-prefix can't be parsed.
1515         process-cmd-prefix option doesn't work in two cases.
1516         1. When executing run-layout-tests,
1517         2. When executing MiniBrowser with web process-cmd-prefix environment variable.
1518
1519         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
1520         (WebKit::parseAndRemoveEnvironments):
1521         (WebKit::ProcessLauncher::launchProcess):
1522
1523 2015-10-13  Yongjun Zhang  <yongjun_zhang@apple.com>
1524
1525         Use the correct notification strings for view service applications state change.
1526         https://bugs.webkit.org/show_bug.cgi?id=150107
1527
1528         Use the correct notification names "_UIViewServiceHostDidEnterBackgroundNotification" and
1529         "_UIViewServiceHostWillEnterForegroundNotification" to listen to view service application state changes.
1530
1531         Reviewed by Gavin Barraclough.
1532
1533         * UIProcess/ApplicationStateTracker.mm:
1534         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
1535
1536 2015-10-13  Myles C. Maxfield  <mmaxfield@apple.com>
1537
1538         Split TypesettingFeatures into kerning and ligatures bools
1539         https://bugs.webkit.org/show_bug.cgi?id=150074
1540
1541         Reviewed by Simon Fraser.
1542
1543         * Shared/WebProcessCreationParameters.cpp:
1544         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
1545         (WebKit::WebProcessCreationParameters::encode):
1546         (WebKit::WebProcessCreationParameters::decode):
1547         * Shared/WebProcessCreationParameters.h:
1548         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1549         (WebKit::WebProcessPool::platformInitializeWebProcess):
1550         * WebProcess/cocoa/WebProcessCocoa.mm:
1551         (WebKit::WebProcess::platformInitializeWebProcess):
1552
1553 2015-10-13  Dean Jackson  <dino@apple.com>
1554
1555         Fix iOS-family builds.
1556
1557         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
1558         (WKPageGetObjectRegistry):
1559         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1560         (-[WKBrowsingContextController _remoteObjectRegistry]):
1561         * UIProcess/API/mac/WKViewInternal.h:
1562
1563 2015-10-13  Anders Carlsson  <andersca@apple.com>
1564
1565         Fix 32-bit build.
1566
1567         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
1568         (WKPageGetObjectRegistry):
1569
1570 2015-10-13  Anders Carlsson  <andersca@apple.com>
1571
1572         Add and implement WKPageGetObjectRegistry
1573         https://bugs.webkit.org/show_bug.cgi?id=150102
1574
1575         Reviewed by Tim Horton.
1576
1577         Put the _WKObjectRegistry used by WKPageRef and WKBrowsingContextController on the WKView for now.
1578         If we decide to share more code between WKView and WKWebView, the object registry could live in an object that would be shared
1579         between WKView and WKWebView.
1580
1581         * UIProcess/API/C/mac/WKPagePrivateMac.h:
1582         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
1583         (WKPageGetObjectRegistry):
1584         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1585         (-[WKBrowsingContextController _remoteObjectRegistry]):
1586         (-[WKBrowsingContextController dealloc]): Deleted.
1587         * UIProcess/API/mac/WKView.mm:
1588         (-[WKView dealloc]):
1589         (-[WKView _remoteObjectRegistry]):
1590         * UIProcess/API/mac/WKViewInternal.h:
1591
1592 2015-10-13  Chris Dumez  <cdumez@apple.com>
1593
1594         Avoid useless copies in range-loops that are using 'auto'
1595         https://bugs.webkit.org/show_bug.cgi?id=150091
1596
1597         Reviewed by Sam Weinig.
1598
1599         Avoid useless copies in range-loops that are using 'auto'. Also use
1600         'auto*' instead of 'auto' when range values are pointers for clarity.
1601
1602         * UIProcess/VisitedLinkStore.cpp:
1603         (WebKit::VisitedLinkStore::pendingVisitedLinksTimerFired):
1604         (WebKit::VisitedLinkStore::resizeTable):
1605         * UIProcess/WebProcessProxy.cpp:
1606         (WebKit::WebProcessProxy::releaseRemainingIconsForPageURLs):
1607         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1608         (WebKit::WebsiteDataStore::fetchData):
1609         (WebKit::WebsiteDataStore::removeData):
1610         (WebKit::WebsiteDataStore::plugins):
1611
1612 2015-10-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
1613
1614         Add debug settings for using giant tiles (4096x4096)
1615         https://bugs.webkit.org/show_bug.cgi?id=149977
1616         <rdar://problem/23017093>
1617
1618         Reviewed by Tim Horton.
1619
1620         * Shared/WebPreferencesDefinitions.h:
1621         * UIProcess/API/C/WKPreferences.cpp:
1622         (WKPreferencesSetUseGiantTiles):
1623         (WKPreferencesGetUseGiantTiles):
1624         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1625         * WebProcess/WebPage/WebPage.cpp:
1626         (WebKit::WebPage::updatePreferences):
1627
1628 2015-10-13  Brent Fulgham  <bfulgham@apple.com>
1629
1630         [iOS] Avoid crash due to invalid screen bounds
1631         https://bugs.webkit.org/show_bug.cgi?id=150048
1632         <rdar://problem/22112664>
1633
1634         Reviewed by Jer Noble.
1635
1636         Check for an invalid bounds, and reset it to a known state before
1637         attempting to use it.
1638
1639         * WebProcess/ios/WebVideoFullscreenManager.mm:
1640         (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
1641
1642 2015-10-13  Sergio Villar Senin  <svillar@igalia.com>
1643
1644         [GTK] Fix build for ENABLE_TOUCH_EVENTS=OFF
1645         https://bugs.webkit.org/show_bug.cgi?id=150085
1646
1647         Reviewed by Carlos Garcia Campos.
1648
1649         * Shared/gtk/NativeWebTouchEventGtk.cpp:
1650         * Shared/gtk/WebEventFactory.cpp:
1651         * Shared/gtk/WebEventFactory.h:
1652         * UIProcess/API/gtk/PageClientImpl.cpp:
1653         * UIProcess/API/gtk/PageClientImpl.h:
1654         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1655         (webkit_web_view_base_class_init):
1656
1657 2015-10-13  Chris Dumez  <cdumez@apple.com>
1658
1659         Avoid useless copying of Key::HashType in loops in NetworkCache::Storage::synchronize()
1660         https://bugs.webkit.org/show_bug.cgi?id=150061
1661
1662         Reviewed by Carlos Garcia Campos.
1663
1664         Avoid useless copying of Key::HashType in loops in NetworkCache::Storage::synchronize().
1665         Key::HashType is currently a SHA1::Digest, which is a std::array<uint8_t, 20>.
1666
1667         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1668         (WebKit::NetworkCache::Storage::synchronize):
1669
1670 2015-10-12  Philip Chimento  <philip.chimento@gmail.com>
1671
1672         [GTK] OSX linker doesn't understand --whole-archive
1673         https://bugs.webkit.org/show_bug.cgi?id=144557
1674
1675         Reviewed by Martin Robinson.
1676
1677         * PlatformGTK.cmake: Link with extra libraries on Darwin, since
1678         we don't have the --whole-archive linker option.
1679
1680 2015-10-09  Anders Carlsson  <andersca@apple.com>
1681
1682         Don't allow plug-ins to override image types for <embed> elements
1683         https://bugs.webkit.org/show_bug.cgi?id=149979
1684
1685         Reviewed by Tim Horton.
1686
1687         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1688         (WebKit::WebFrameLoaderClient::objectContentType):
1689         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1690
1691 2015-10-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1692
1693         [EFL] Bump Version/X in user agent
1694         https://bugs.webkit.org/show_bug.cgi?id=150013
1695
1696         Reviewed by Csaba Osztrogonác.
1697
1698         EFL port needs to ensure maximum compatibility with existing web sites.
1699         Thus version number needs to be bumped from 5.0 to 8.0 as GTK port.
1700
1701         * UIProcess/efl/WebPageProxyEfl.cpp:
1702         (WebKit::WebPageProxy::standardUserAgent):
1703
1704 2015-10-10  Dan Bernstein  <mitz@apple.com>
1705
1706         [iOS] Remove unnecessary iOS version checks
1707         https://bugs.webkit.org/show_bug.cgi?id=150002
1708
1709         Reviewed by Alexey Proskuryakov.
1710
1711         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1712         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1713         * Platform/IPC/mac/ConnectionMac.mm:
1714         (IPC::AccessibilityProcessSuspendedNotification):
1715         * Platform/spi/ios/SafariServicesSPI.h:
1716         * Platform/spi/ios/UIKitSPI.h:
1717         * Shared/Network/NetworkProcessCreationParameters.cpp:
1718         (WebKit::NetworkProcessCreationParameters::encode):
1719         (WebKit::NetworkProcessCreationParameters::decode):
1720         * Shared/Network/NetworkProcessCreationParameters.h:
1721         * Shared/Plugins/PluginProcessCreationParameters.cpp:
1722         (WebKit::PluginProcessCreationParameters::encode):
1723         (WebKit::PluginProcessCreationParameters::decode):
1724         * Shared/Plugins/PluginProcessCreationParameters.h:
1725         * Shared/WebEventConversion.cpp:
1726         (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
1727         * Shared/WebProcessCreationParameters.cpp:
1728         (WebKit::WebProcessCreationParameters::encode):
1729         (WebKit::WebProcessCreationParameters::decode):
1730         * Shared/WebProcessCreationParameters.h:
1731         * Shared/ios/NativeWebTouchEventIOS.mm:
1732         (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
1733         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
1734         * Shared/ios/WebPlatformTouchPointIOS.cpp:
1735         (WebKit::WebPlatformTouchPoint::encode):
1736         (WebKit::WebPlatformTouchPoint::decode):
1737         * UIProcess/API/Cocoa/WKWebView.mm:
1738         (-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]):
1739         (shouldAllowPictureInPictureMediaPlayback):
1740         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
1741         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1742         (WebKit::WebProcessPool::platformInitializeWebProcess):
1743         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1744         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1745         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
1746         * UIProcess/ios/ViewGestureControllerIOS.mm:
1747         (-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
1748         * UIProcess/ios/WKContentViewInteraction.mm:
1749         (-[WKContentView setupInteraction]):
1750         (-[WKContentView _ensureFormAccessoryView]):
1751         (-[WKContentView webSelectionAssistant]):
1752         (-[WKContentView selectionInteractionAssistant]):
1753         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1754         (WebKit::WebVideoFullscreenManagerProxy::create):
1755         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1756         (photoLibraryIcon):
1757         (cameraIcon):
1758         (fallbackIconForFile):
1759         (iconForImageFile):
1760         * WebKit2.xcodeproj/project.pbxproj:
1761         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1762         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1763         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1764         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1765         * WebProcess/cocoa/WebProcessCocoa.mm:
1766         (WebKit::WebProcess::platformInitializeWebProcess):
1767
1768 2015-10-10  Dan Bernstein  <mitz@apple.com>
1769
1770         [iOS] Remove project support for iOS 8
1771         https://bugs.webkit.org/show_bug.cgi?id=149993
1772
1773         Reviewed by Alexey Proskuryakov.
1774
1775         * Configurations/Base.xcconfig:
1776         * Configurations/BaseLegacyProcess.xcconfig:
1777         * Configurations/BaseXPCService.xcconfig:
1778         * Configurations/PluginProcessShim.xcconfig:
1779         * Configurations/SecItemShim.xcconfig:
1780         * Configurations/WebKit.xcconfig:
1781         * Configurations/WebKit2.xcconfig:
1782         * Configurations/WebProcessShim.xcconfig:
1783
1784 2015-10-09  Myles C. Maxfield  <mmaxfield@apple.com>
1785
1786         Unreviewed, rolling out r190689
1787         https://bugs.webkit.org/show_bug.cgi?id=149992
1788
1789         Fixed in other repository.
1790
1791         Reverted changesets:
1792
1793         "Unreviewed, rolling out r190572, r190593, r190594, and r190639."
1794         https://bugs.webkit.org/show_bug.cgi?id=149897
1795
1796 2015-10-09  Beth Dakin  <bdakin@apple.com>
1797
1798         Rubber-stamped by Anders Carlsson.
1799
1800         Remove unnecessary includes.
1801         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1802         * WebProcess/Plugins/Plugin.h:
1803         * WebProcess/Plugins/PluginProxy.h:
1804         * WebProcess/Plugins/PluginView.h:
1805         * WebProcess/WebPage/mac/WebPageMac.mm:
1806
1807 2015-10-09  Beth Dakin  <bdakin@apple.com>
1808
1809         Build fix.
1810
1811         * CMakeLists.txt:
1812         * Shared/API/APIHitTestResult.cpp: Removed.
1813         * Shared/API/APIHitTestResult.h: Removed.
1814         * WebKit2.xcodeproj/project.pbxproj:
1815
1816 2015-10-09  Beth Dakin  <bdakin@apple.com>
1817
1818         Build fix.
1819
1820         * UIProcess/API/APIHitTestResult.cpp: Copied from Shared/API/APIHitTestResult.cpp.
1821         * UIProcess/API/APIHitTestResult.h: Copied from Shared/API/APIHitTestResult.h.
1822         * UIProcess/mac/PageClientImpl.mm:
1823
1824 2015-10-09  Beth Dakin  <bdakin@apple.com>
1825
1826         WKWebView needs SPI to customize immediate actions
1827         https://bugs.webkit.org/show_bug.cgi?id=149939
1828         -and corresponding-
1829         rdar://problem/20016849
1830
1831         Reviewed by Anders Carlsson.
1832
1833         This patch breaks WebHitTestResult into two files. WebHiTestResultData 
1834         continues to live in the WebKit namespace and contains the old 
1835         WebHitTestResult::Data struct. The rest of WebHitTestResult is now 
1836         API::HitTestResult. The patch also adds _WKHitTestResult as Obj-C API to wrap 
1837         API::HitTestResult.
1838
1839         Attempt to keep other ports happy with new files.
1840         * CMakeLists.txt:
1841
1842         WebKit::WebHitTestResult no longer contains the Data struct and is now called 
1843         API::HitTestResult.
1844         * Shared/API/APIHitTestResult.cpp: Copied from Shared/WebHitTestResult.cpp.
1845         (API::HitTestResult::create):
1846         (WebKit::WebHitTestResult::create): Deleted.
1847         (WebKit::WebHitTestResult::Data::Data): Deleted.
1848         (WebKit::WebHitTestResult::Data::~Data): Deleted.
1849         (WebKit::WebHitTestResult::Data::encode): Deleted.
1850         (WebKit::WebHitTestResult::Data::decode): Deleted.
1851         (WebKit::WebHitTestResult::Data::platformEncode): Deleted.
1852         (WebKit::WebHitTestResult::Data::platformDecode): Deleted.
1853         (WebKit::WebHitTestResult::Data::elementBoundingBoxInWindowCoordinates): Deleted.
1854         * Shared/API/APIHitTestResult.h: Copied from Shared/WebHitTestResult.h.
1855         (API::HitTestResult::absoluteImageURL):
1856         (API::HitTestResult::absolutePDFURL):
1857         (API::HitTestResult::absoluteLinkURL):
1858         (API::HitTestResult::absoluteMediaURL):
1859         (API::HitTestResult::linkLabel):
1860         (API::HitTestResult::linkTitle):
1861         (API::HitTestResult::lookupText):
1862         (API::HitTestResult::isContentEditable):
1863         (API::HitTestResult::isDownloadableMedia):
1864         (API::HitTestResult::HitTestResult):
1865         (WebKit::WebHitTestResult::absoluteImageURL): Deleted.
1866         (WebKit::WebHitTestResult::absolutePDFURL): Deleted.
1867         (WebKit::WebHitTestResult::absoluteLinkURL): Deleted.
1868         (WebKit::WebHitTestResult::absoluteMediaURL): Deleted.
1869         (WebKit::WebHitTestResult::linkLabel): Deleted.
1870         (WebKit::WebHitTestResult::linkTitle): Deleted.
1871         (WebKit::WebHitTestResult::lookupText): Deleted.
1872         (WebKit::WebHitTestResult::isContentEditable): Deleted.
1873         (WebKit::WebHitTestResult::isDownloadableMedia): Deleted.
1874         (WebKit::WebHitTestResult::WebHitTestResult): Deleted.
1875
1876         This is a new obj-c object that we can use for the modern immediate action 
1877         API.
1878         * Shared/API/Cocoa/_WKHitTestResult.h: Added.
1879         * Shared/API/Cocoa/_WKHitTestResult.mm: Added.
1880         (-[_WKHitTestResult dealloc]):
1881         (-[_WKHitTestResult absoluteImageURL]):
1882         (-[_WKHitTestResult absolutePDFURL]):
1883         (-[_WKHitTestResult absoluteLinkURL]):
1884         (-[_WKHitTestResult absoluteMediaURL]):
1885         (-[_WKHitTestResult linkLabel]):
1886         (-[_WKHitTestResult linkTitle]):
1887         (-[_WKHitTestResult lookupText]):
1888         (-[_WKHitTestResult isContentEditable]):
1889         (-[_WKHitTestResult elementBoundingBox]):
1890         (-[_WKHitTestResult copyWithZone:]):
1891         (-[_WKHitTestResult _apiObject]):
1892
1893         _WKHitTestResult wraps API::HitTestResult.
1894         * Shared/API/Cocoa/_WKHitTestResultInternal.h: Added.
1895         (API::wrapper):
1896         * Shared/Cocoa/APIObject.mm:
1897         (API::Object::newObject):
1898
1899         Since we want to use the same enum name for the new enum, use a #define instead of a typedef in the old C SPI. This should keep old clients working in the meantime.
1900         * Shared/API/c/WKImmediateActionTypes.h:
1901
1902         WebHitTestResult::Data is now WebHitTestResultData.
1903         * Shared/ContextMenuContextData.h:
1904         (WebKit::ContextMenuContextData::webHitTestResultData):
1905         (WebKit::ContextMenuContextData::selectedText):
1906
1907         Remove WebHitTestResult, and add WebHitTestResultData for the Data struct.
1908         * Shared/WebHitTestResult.cpp: Removed.
1909         * Shared/WebHitTestResult.h: Removed.
1910         * Shared/WebHitTestResultData.cpp: Added.
1911         (WebKit::WebHitTestResultData::WebHitTestResultData):
1912         (WebKit::WebHitTestResultData::~WebHitTestResultData):
1913         (WebKit::WebHitTestResultData::encode):
1914         (WebKit::WebHitTestResultData::decode):
1915         (WebKit::WebHitTestResultData::platformEncode):
1916         (WebKit::WebHitTestResultData::platformDecode):
1917         (WebKit::WebHitTestResultData::elementBoundingBoxInWindowCoordinates):
1918         * Shared/WebHitTestResultData.h: Added.
1919         * Shared/mac/WebHitTestResult.mm: Removed.
1920         * Shared/mac/WebHitTestResultData.mm: Copied from Shared/mac/WebHitTestResult.mm.
1921         (WebKit::WebHitTestResultData::platformEncode):
1922         (WebKit::WebHitTestResultData::platformDecode):
1923         (WebKit::WebHitTestResult::Data::platformEncode): Deleted.
1924         (WebKit::WebHitTestResult::Data::platformDecode): Deleted.
1925
1926         WebHitTestResult::Data is now WebHitTestResultData.
1927         * UIProcess/API/APIContextMenuClient.h:
1928         (API::ContextMenuClient::~ContextMenuClient):
1929         (API::ContextMenuClient::getContextMenuFromProposedMenu):
1930         (API::ContextMenuClient::customContextMenuItemSelected):
1931         (API::ContextMenuClient::contextMenuDismissed):
1932         (API::ContextMenuClient::showContextMenu):
1933
1934         WebHitTestResult is now WebHitTestResult
1935         * UIProcess/API/APIUIClient.h:
1936         (API::UIClient::runJavaScriptPrompt):
1937         (API::UIClient::setStatusText):
1938         (API::UIClient::mouseDidMoveOverElement):
1939         (API::UIClient::unavailablePluginButtonClicked):
1940         (API::UIClient::pinnedStateDidChange):
1941         (API::UIClient::didBeginTrackingPotentialLongMousePress):
1942         (API::UIClient::didRecognizeLongMousePress):
1943         (API::UIClient::didCancelTrackingPotentialLongMousePress):
1944         * UIProcess/API/C/WKAPICast.h:
1945         * UIProcess/API/C/WKHitTestResult.cpp:
1946         (WKHitTestResultGetTypeID):
1947         (WKHitTestResultCopyAbsoluteImageURL):
1948         * UIProcess/API/C/WKPage.cpp:
1949         (WKPageSetPageContextMenuClient):
1950         (WKPageSetPageUIClient):
1951
1952         New WKWebView SPI _immediateActionAnimationControllerForHitTestResult
1953         * UIProcess/API/Cocoa/WKViewPrivate.h:
1954         * UIProcess/API/Cocoa/WKWebView.mm:
1955         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1956
1957         Attempts to keep other ports happy with the re-name.
1958         * UIProcess/API/efl/WebAccessibility.cpp:
1959         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
1960         * UIProcess/API/gtk/WebKitHitTestResult.cpp:
1961         (webkit_hit_test_result_class_init):
1962         (webkitHitTestResultCreate):
1963         (stringIsEqualToCString):
1964         (webkitHitTestResultCompare):
1965         * UIProcess/API/gtk/WebKitHitTestResultPrivate.h:
1966         * UIProcess/API/gtk/WebKitUIClient.cpp:
1967         * UIProcess/API/gtk/WebKitWebView.cpp:
1968         (webkitWebViewMakePermissionRequest):
1969         (webkitWebViewMouseTargetChanged):
1970         (contextMenuDismissed):
1971         (webkitWebViewPopulateContextMenu):
1972         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1973
1974         Re-name, and just use uint32_t for the old SPI.
1975         * UIProcess/API/mac/WKView.mm:
1976         (-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
1977         (-[WKView _setDidMoveSwipeSnapshotCallback:]):
1978         (-[WKView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
1979         * UIProcess/API/mac/WKViewInternal.h:
1980
1981         PageClient will figure out whether to call into WKWebView or WKView for this 
1982         SPI.
1983         * UIProcess/PageClient.h:
1984         * UIProcess/WebPageProxy.cpp:
1985         (WebKit::WebPageProxy::immediateActionAnimationControllerForHitTestResult):
1986         * UIProcess/WebPageProxy.h:
1987         * UIProcess/mac/PageClientImpl.h:
1988         * UIProcess/mac/PageClientImpl.mm:
1989         (WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult):
1990
1991         WebKit::WebHitTestResult::Data is now WebKit::WebHitTestResultData.
1992         * UIProcess/WebPageProxy.messages.in:
1993
1994         WKImmediateActionController calls through to WebPageProxy which calls to 
1995         PageClient, which figures out which API to call. Also cache the type as a 
1996         uint32_t
1997         * UIProcess/mac/WKImmediateActionController.h:
1998         * UIProcess/mac/WKImmediateActionController.mm:
1999         (-[WKImmediateActionController _updateImmediateActionItem]):
2000
2001         WebHitTestResult::Data is now WebHitTestResultData.
2002         * UIProcess/mac/WebPageProxyMac.mm:
2003         (WebKit::WebPageProxy::platformInitializeShareMenuItem):
2004
2005         New files!
2006         * WebKit2.xcodeproj/project.pbxproj:
2007
2008         Deal with the #define situation for the enum.
2009         * WebKit2Prefix.h:
2010
2011         New names for things. WebHitTestResult::Data -> WebHitTestResultData
2012         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2013         * WebProcess/Plugins/PDF/PDFPlugin.h:
2014         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2015         (WebKit::pointInLayoutSpaceForPointInWindowSpace):
2016         (WebKit::PDFPlugin::lookupTextAtLocation):
2017         * WebProcess/Plugins/Plugin.h:
2018         * WebProcess/Plugins/PluginProxy.h:
2019         * WebProcess/Plugins/PluginView.h:
2020         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2021         (WebKit::WebChromeClient::mouseDidMoveOverElement):
2022         (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress):
2023         * WebProcess/WebPage/mac/WebPageMac.mm:
2024         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
2025
2026 2015-10-09  Anders Carlsson  <andersca@apple.com>
2027
2028         Remove two unused WKFrame functions
2029         https://bugs.webkit.org/show_bug.cgi?id=149958
2030
2031         Reviewed by Dan Bernstein.
2032
2033         * UIProcess/API/C/WKFrame.cpp:
2034         (WKFrameCopyChildFrames): Deleted.
2035         (WKFrameGetParentFrame): Deleted.
2036         * UIProcess/API/C/WKFrame.h:
2037
2038 2015-10-08  Michael Catanzaro  <mcatanzaro@igalia.com>
2039
2040         Format string issues in NetworkCache.cpp
2041         https://bugs.webkit.org/show_bug.cgi?id=149867
2042
2043         Reviewed by Csaba Osztrogonác.
2044
2045         Cast enums to ints before printing them to placate GCC's -Wformat.
2046
2047         * NetworkProcess/cache/NetworkCache.cpp:
2048         (WebKit::NetworkCache::Cache::retrieve):
2049         (WebKit::NetworkCache::Cache::store):
2050
2051 2015-10-08  Michael Catanzaro  <mcatanzaro@igalia.com>
2052
2053         Format string issue in WebResourceLoadScheduler.cpp
2054         https://bugs.webkit.org/show_bug.cgi?id=149868
2055
2056         Reviewed by Csaba Osztrogonác.
2057
2058         Cast enums to ints before printing them to placate GCC's -Wformat.
2059
2060         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2061         (WebKit::WebResourceLoadScheduler::scheduleLoad):
2062
2063 2015-10-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2064
2065         [GTK] Stop using a nested main loop for popup menus
2066         https://bugs.webkit.org/show_bug.cgi?id=149920
2067
2068         Reviewed by Sergio Villar Senin.
2069
2070         WebPageProxy used to expect the popup menus to run in a nested
2071         main loop and invalidated the menu right after showing it. But
2072         this is no longer the case, so there's no reason to keep using
2073         the nested main loop.
2074
2075         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
2076         (WebKit::WebPopupMenuProxyGtk::~WebPopupMenuProxyGtk):
2077         (WebKit::WebPopupMenuProxyGtk::cancelTracking):
2078         (WebKit::WebPopupMenuProxyGtk::menuItemActivated):
2079         (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk): Deleted.
2080         (WebKit::WebPopupMenuProxyGtk::showPopupMenu): Deleted.
2081         (WebKit::WebPopupMenuProxyGtk::shutdownRunLoop): Deleted.
2082         (WebKit::WebPopupMenuProxyGtk::menuUnmapped): Deleted.
2083         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
2084         (WebKit::WebPopupMenuProxyGtk::setActiveItem): Deleted.
2085
2086 2015-10-07  Anders Carlsson  <andersca@apple.com>
2087
2088         Add API for getting a group identifier from a bundle page
2089         https://bugs.webkit.org/show_bug.cgi?id=149902
2090
2091         Reviewed by Tim Horton.
2092
2093         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2094         (WKBundlePageCopyGroupIdentifier):
2095         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2096
2097 2015-10-07  Csaba Osztrogonác  <ossy@webkit.org>
2098
2099         URTBF after r190678 to fix GTK and EFL builds.
2100
2101         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
2102         (WebKit::InjectedBundle::setBundleParameters):
2103         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2104         (WebKit::InjectedBundle::setBundleParameters):
2105
2106 2015-10-07  Commit Queue  <commit-queue@webkit.org>
2107
2108         Unreviewed, rolling out r190572, r190593, r190594, and
2109         r190639.
2110         https://bugs.webkit.org/show_bug.cgi?id=149897
2111
2112         Breaks Mavericks build (Requested by litherum on #webkit).
2113
2114         Reverted changesets:
2115
2116         "Allow WKRetainPtrs to be used as keys in hashing data
2117         structures"
2118         https://bugs.webkit.org/show_bug.cgi?id=149762
2119         http://trac.webkit.org/changeset/190572
2120
2121         "REGRESSION(189668?): http/tests/notifications/events.html
2122         flakily asserts or times out"
2123         https://bugs.webkit.org/show_bug.cgi?id=149218
2124         http://trac.webkit.org/changeset/190593
2125
2126         "Prospective Mavericks build fix."
2127         http://trac.webkit.org/changeset/190594
2128
2129         "Post-review cleanup after r190572."
2130         http://trac.webkit.org/changeset/190639
2131
2132 2015-10-07  Anders Carlsson  <andersca@apple.com>
2133
2134         Provide a way to get a WKFrameInfoRef from a WKFrameRef
2135         https://bugs.webkit.org/show_bug.cgi?id=149896
2136         rdar://problem/23016081
2137
2138         Reviewed by Dan Bernstein.
2139
2140         * UIProcess/API/C/WKFrame.cpp:
2141         (WKFrameCreateFrameInfo):
2142         * UIProcess/API/C/WKFrame.h:
2143
2144 2015-10-07  Anders Carlsson  <andersca@apple.com>
2145
2146         Add unreachable URL to _WKObservablePageState
2147         https://bugs.webkit.org/show_bug.cgi?id=149893
2148         <rdar://problem/23017235>
2149  
2150         Reviewed by Dan Bernstein.
2151
2152         * UIProcess/API/C/mac/WKPagePrivateMac.h:
2153         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
2154         (-[WKObservablePageState unreachableURL]):
2155
2156 2015-10-07  Anders Carlsson  <andersca@apple.com>
2157
2158         Add -[WKProcessPool _setObjectsForBundleParametersWithDictionary:]
2159         https://bugs.webkit.org/show_bug.cgi?id=149887
2160
2161         Reviewed by Tim Horton.
2162
2163         * UIProcess/API/Cocoa/WKProcessPool.mm:
2164         (-[WKProcessPool _setObjectsForBundleParametersWithDictionary:]):
2165         Copy the dictionary, archive it, and set the values on the UI side bundle parameter data struct.
2166
2167         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2168         Add new SPI.
2169
2170         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
2171         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
2172         (-[WKWebProcessBundleParameters setParameter:forKey:]):
2173         We can just call setValue:forKey: on the dictionary; it will do the right thing if value is nil.
2174
2175         (-[WKWebProcessBundleParameters setParametersForKeyWithDictionary:]):
2176         Enumerate the dictionary and call setValue:forKey: on each key/value pair.
2177
2178         * WebProcess/InjectedBundle/InjectedBundle.h:
2179         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2180         (WebKit::InjectedBundle::setBundleParameter):
2181         If we fail to unarchive a parameter, don't set it to null.
2182
2183         (WebKit::InjectedBundle::setBundleParameters):
2184         Unarchive the dictionary and update the bundle parameters.
2185
2186         * WebProcess/WebProcess.cpp:
2187         (WebKit::WebProcess::setInjectedBundleParameters):
2188         Call the injected bundle.
2189
2190         * WebProcess/WebProcess.h:
2191         * WebProcess/WebProcess.messages.in:
2192         Add new message.
2193
2194 2015-10-06  Anders Carlsson  <andersca@apple.com>
2195
2196         Expose the bundle parameter object on WKBundleRef
2197         https://bugs.webkit.org/show_bug.cgi?id=149860
2198
2199         Reviewed by Tim Horton.
2200
2201         * WebKit2.xcodeproj/project.pbxproj:
2202         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
2203         (-[WKWebProcessBundleParameters description]):
2204         Add a description that includes the parameters.
2205
2206         * WebProcess/InjectedBundle/API/c/mac/WKBundleMac.h:
2207         * WebProcess/InjectedBundle/API/c/mac/WKBundleMac.mm:
2208         (WKBundleGetParameters):
2209         Add getter.
2210
2211         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2212         (WebKit::InjectedBundle::initialize):
2213         Make sure to decode the bundle parameters before calling out to the bundle.
2214
2215 2015-10-06  Michael Catanzaro  <mcatanzaro@igalia.com>
2216
2217         [GTK] Add autocleanups
2218         https://bugs.webkit.org/show_bug.cgi?id=149588
2219
2220         Reviewed by Darin Adler.
2221
2222         * PlatformGTK.cmake:
2223         * UIProcess/API/gtk/WebKitAutocleanups.h: Added.
2224         * UIProcess/API/gtk/webkit2.h:
2225         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionAutocleanups.h: Added.
2226         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
2227
2228 2015-10-06  Anders Carlsson  <andersca@apple.com>
2229
2230         Try to fix the 32-bit build.
2231
2232         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
2233
2234 2015-10-06  Anders Carlsson  <andersca@apple.com>
2235
2236         WKPage needs to expose a KVO-compliant object, similar to WKWebView
2237         https://bugs.webkit.org/show_bug.cgi?id=149851
2238         rdar://problem/22382022
2239
2240         Reviewed by Dan Bernstein.
2241
2242         Move the PageLoadStateObserver object from WKBrowsingContextController out into a separate file and make it
2243         work with any Objective-C object. Use it in WKObservablePageState and add a WKPageCreateObservableState function.
2244
2245         * UIProcess/API/C/mac/WKPagePrivateMac.h:
2246         * UIProcess/API/C/mac/WKPagePrivateMac.mm: Renamed from Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.cpp.
2247         (-[WKObservablePageState initWithPage:]):
2248         (-[WKObservablePageState dealloc]):
2249         (-[WKObservablePageState isLoading]):
2250         (-[WKObservablePageState title]):
2251         (-[WKObservablePageState URL]):
2252         (-[WKObservablePageState hasOnlySecureContent]):
2253         (-[WKObservablePageState estimatedProgress]):
2254         (WKPageCreateObservableState):
2255         (WKPageGetProcessIdentifier):
2256         (WKPageIsURLKnownHSTSHost):
2257         * UIProcess/API/Cocoa/PageLoadStateObserver.h: Added.
2258         (WebKit::PageLoadStateObserver::PageLoadStateObserver):
2259         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2260         (PageLoadStateObserver::PageLoadStateObserver): Deleted.
2261         * WebKit2.xcodeproj/project.pbxproj:
2262
2263 2015-10-06  Daniel Bates  <dbates@webkit.org>
2264
2265         Enable XSLT when building WebKit for iOS using the public iOS SDK
2266         https://bugs.webkit.org/show_bug.cgi?id=149827
2267
2268         Reviewed by Alexey Proskuryakov.
2269
2270         * Configurations/FeatureDefines.xcconfig:
2271
2272 2015-10-06  Emanuele Aina  <emanuele.aina@collabora.com>
2273
2274         Fix ENABLE_OPENGL=OFF builds
2275         https://bugs.webkit.org/show_bug.cgi?id=146511
2276
2277         Reviewed by Darin Adler.
2278
2279         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2280         (webkitWebViewBaseRealize):
2281         (webkitWebViewBaseDraw):
2282         (webkitWebViewBaseDidRelaunchWebProcess):
2283         Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
2284         webkitWebViewRenderAcceleratedCompositingResults()
2285         * UIProcess/DrawingAreaProxyImpl.cpp:
2286         * UIProcess/DrawingAreaProxyImpl.h:
2287         * WebProcess/WebPage/DrawingArea.cpp:
2288         (WebKit::DrawingArea::DrawingArea):
2289         * WebProcess/WebPage/DrawingArea.h:
2290         * WebProcess/WebPage/LayerTreeHost.h:
2291         Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
2292         setNativeSurfaceHandleForCompositing().
2293         * UIProcess/gtk/WebPreferencesGtk.cpp:
2294         (WebKit::WebPreferences::platformInitializeStore):
2295         Default to no AC if no GL support has been built.
2296         * WebProcess/WebPage/DrawingArea.messages.in:
2297         Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
2298         SetNativeSurfaceHandleForCompositing.
2299         * WebProcess/WebPage/DrawingAreaImpl.h:
2300         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2301         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
2302         Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
2303         setNativeSurfaceHandleForCompositing().
2304         (WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
2305         Force setAcceleratedCompositingEnabled() only if a LayerTreeHost
2306         implementation is available, to avoid crashing when building without
2307         any GL support.
2308
2309 2015-10-06  Csaba Osztrogonác  <ossy@webkit.org>
2310
2311         URTBF after r190611.
2312
2313         * CMakeLists.txt:
2314
2315 2015-10-06  Alex Christensen  <achristensen@webkit.org>
2316
2317         Report error when main resource is blocked by content blocker
2318         https://bugs.webkit.org/show_bug.cgi?id=149719
2319         rdar://problem/21970595
2320
2321         Reviewed by Brady Eidson.
2322
2323         * Shared/API/c/WKErrorRef.h:
2324         * WebProcess/WebCoreSupport/WebErrors.h:
2325         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2326         (WebKit::WebFrameLoaderClient::blockedError):
2327         (WebKit::WebFrameLoaderClient::blockedByContentBlockerError):
2328         (WebKit::WebFrameLoaderClient::cannotShowURLError):
2329         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2330         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
2331         (WebKit::blockedError):
2332         (WebKit::blockedByContentBlockerError):
2333         (WebKit::cannotShowURLError):
2334         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
2335         (WebKit::blockedError):
2336         (WebKit::blockedByContentBlockerError):
2337         (WebKit::cannotShowURLError):
2338         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
2339         (WebKit::blockedError):
2340         (WebKit::blockedByContentBlockerError):
2341         (WebKit::cannotShowURLError):
2342         Make a new error type for loads that were blocked by a content blocker.
2343
2344 2015-10-05  Jer Noble  <jer.noble@apple.com>
2345
2346         [iOS] REGRESSION(r190434): Media continues to play when locking screen
2347         https://bugs.webkit.org/show_bug.cgi?id=149822
2348
2349         Reviewed by Brent Fulgham.
2350
2351         Pass through isSuspendedUnderLock when notifying the WebPage that the
2352         applicationWillEnterForeground, and pass that boolean in the userInfo of the
2353         WebUIApplicationWillEnterForegroundNotification.
2354
2355         * UIProcess/ios/WebPageProxyIOS.mm:
2356         (WebKit::WebPageProxy::applicationWillEnterForeground):
2357         * WebProcess/WebPage/WebPage.h:
2358         * WebProcess/WebPage/WebPage.messages.in:
2359         * WebProcess/WebPage/ios/WebPageIOS.mm:
2360         (WebKit::WebPage::applicationWillEnterForeground):
2361
2362 2015-10-05  Anders Carlsson  <andersca@apple.com>
2363
2364         Get rid of some dead code
2365         https://bugs.webkit.org/show_bug.cgi?id=149825
2366
2367         Reviewed by Tim Horton.
2368
2369         * UIProcess/API/APIUIClient.h:
2370         (API::UIClient::didDraw): Deleted.
2371         * UIProcess/API/C/WKPage.cpp:
2372         (WKPageSetPageUIClient): Deleted.
2373         * UIProcess/WebPageProxy.cpp:
2374         (WebKit::WebPageProxy::didDraw): Deleted.
2375         * UIProcess/WebPageProxy.h:
2376
2377 2015-10-05  Myles C. Maxfield  <mmaxfield@apple.com>
2378
2379         Prospective Mavericks build fix.
2380
2381         Unreviewed.
2382
2383         * UIProcess/API/cpp/WKRetainPtr.h:
2384
2385 2015-10-05  Beth Dakin  <bdakin@apple.com>
2386
2387         Compress snapshots on iOS
2388         https://bugs.webkit.org/show_bug.cgi?id=149814
2389         -and corresponding-
2390         rdar://problem/22976230
2391
2392         Reviewed by Simon Fraser.
2393
2394         Compress the snapshot.
2395         * UIProcess/API/Cocoa/WKWebView.mm:
2396         (-[WKWebView _takeViewSnapshot]):
2397
2398         Since the snapshots are converted to YUV asynchronously, it is possible to 
2399         get here and have a snapshot that does not yet have an image, so we have to 
2400         relax this constraint.
2401         * UIProcess/mac/ViewSnapshotStore.mm:
2402         (WebKit::ViewSnapshotStore::recordSnapshot):
2403
2404 2015-10-05  Myles C. Maxfield  <mmaxfield@apple.com>
2405
2406         Allow WKRetainPtrs to be used as keys in hashing data structures
2407         https://bugs.webkit.org/show_bug.cgi?id=149762
2408
2409         Reviewed by Anders Carlsson.
2410
2411         Use RefPtr as a model.
2412
2413         * UIProcess/API/cpp/WKRetainPtr.h:
2414         (WebKit::WKRetainPtr::WKRetainPtr):
2415         (WebKit::WKRetainPtr::isHashTableDeletedValue):
2416         (WebKit::WKRetainPtr::hashTableDeletedValue):
2417         (WTF::HashTraits<WKRetainPtr<P>>::emptyValue):
2418         (WTF::HashTraits<WKRetainPtr<P>>::peek):
2419
2420 2015-10-05  Enrica Casucci  <enrica@apple.com>
2421
2422         Cannot select certain text on Wikipedia homepage even when zoomed in.
2423         https://bugs.webkit.org/show_bug.cgi?id=149758
2424         rdar://problem/22407947
2425
2426         Reviewed by Dan Bernstein.
2427
2428         Several functions that handle gestures for text selection are used for both
2429         editable and non editable content. When used on editable content, the point
2430         where the gesture occurs needs to be constrained within the boundaries of the
2431         editable element. In the WebProcess we decide whether to constrain the point or not only based
2432         on the presence of the assisted node.
2433         That unfortunately does not guarantee that the user is actually editing the element,
2434         but only that the element is focused. Since the knowledge about the interaction exists reliably
2435         in the UI process, this patch adds a parameter to each gesture handler that tries to clip
2436         the point, to indicate whether the user is actually interacting with the element so that
2437         in the WebProcess the assisted node information can be used to constrain the point.
2438
2439         * UIProcess/WebPageProxy.h:
2440         (WebKit::WebPageProxy::deviceOrientation):
2441         * UIProcess/ios/WKContentViewInteraction.mm:
2442         (-[WKContentView _isInteractingWithAssistedNode]):
2443         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
2444         (-[WKContentView selectPositionAtPoint:completionHandler:]):
2445         (-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]):
2446         (-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]):
2447         (-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
2448         (-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]):
2449         * UIProcess/ios/WebPageProxyIOS.mm:
2450         (WebKit::WebPageProxy::selectWithGesture):
2451         (WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
2452         (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
2453         (WebKit::WebPageProxy::selectPositionAtPoint):
2454         (WebKit::WebPageProxy::updateSelectionWithExtentPoint):
2455         (WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
2456         * WebProcess/WebPage/WebPage.h:
2457         * WebProcess/WebPage/WebPage.messages.in:
2458         * WebProcess/WebPage/ios/WebPageIOS.mm:
2459         (WebKit::WebPage::selectWithGesture):
2460         (WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
2461         (WebKit::WebPage::selectPositionAtPoint):
2462         (WebKit::WebPage::selectPositionAtBoundaryWithDirection):
2463         (WebKit::WebPage::rangeForGranularityAtPoint):
2464         (WebKit::WebPage::selectTextWithGranularityAtPoint):
2465         (WebKit::WebPage::updateSelectionWithExtentPointAndBoundary):
2466         (WebKit::WebPage::updateSelectionWithExtentPoint):
2467
2468 2015-10-05  Antti Koivisto  <antti@apple.com>
2469
2470         Remove CancelResourceLoader message
2471         https://bugs.webkit.org/show_bug.cgi?id=149801
2472
2473         Reviewed by Andreas Kling.
2474
2475         It has no clients.
2476
2477         * WebProcess/Network/WebResourceLoader.cpp:
2478         (WebKit::WebResourceLoader::messageSenderDestinationID):
2479         (WebKit::WebResourceLoader::detachFromCoreLoader):
2480         (WebKit::WebResourceLoader::cancelResourceLoader): Deleted.
2481         * WebProcess/Network/WebResourceLoader.h:
2482         * WebProcess/Network/WebResourceLoader.messages.in:
2483
2484 2015-10-03  Ricky Mondello  <rmondello@apple.com>
2485
2486         "Plug-in is blocked" message doesn't draw correctly
2487         https://bugs.webkit.org/show_bug.cgi?id=149741
2488         <rdar://problem/22920949>
2489
2490         Patch by Conrad Shultz and Ricky Mondello.
2491
2492         Reviewed by Anders Carlsson.
2493
2494         If a WebKit client sets plug-in X to not be visible to the web, that doesn't mean we shouldn't consult
2495         that plug-in when determining what kind of object type an object is. Properly classifying a non-web-visible
2496         Netscape plug-in as such allows its bounds to properly measured, allowing it to be drawn properly.
2497
2498         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2499         (WebKit::WebFrameLoaderClient::objectContentType): Use PluginData's supportsMimeType, rather than its
2500             supportsWebVisibleMimeType, when determining the ObjectContentType for a MIME type on a url.
2501
2502 2015-10-02  Enrica Casucci  <enrica@apple.com>
2503
2504         Text selection is inaccurate in Wikipedia pages when starting navigation from wikipedia.org.
2505         https://bugs.webkit.org/show_bug.cgi?id=149756
2506         rdar://problem/22332409
2507
2508         Reviewed by Tim Horton.
2509
2510         When loading a new document into the same WebPage object, we need
2511         to clear the assisted node, since there is no guarantee that the
2512         node will be blurred. The bug is caused by the use of a stale
2513         assisted node to constrain the point where the gesture occurs.
2514         A fix for this problem was landed in http://trac.webkit.org/changeset/179885
2515         where the cleanup was added when FrameLoaderClient::detach2 was called.
2516         This method doesn't seem to be called any longer for the main frame,
2517         so the correct solution is to add the cleanup to didCommitLoad in WebPage.
2518         I've also added some checks to webSelectionsRects and selectedTextRange to avoid
2519         the use of postLayoutData when the selection is none.
2520
2521         * UIProcess/ios/WKContentViewInteraction.mm:
2522         (-[WKContentView webSelectionRects]):
2523         (-[WKContentView selectedTextRange]):
2524         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2525         (WebKit::WebFrameLoaderClient::detachedFromParent2): Removed call to resetAssistedNodeForFrame.
2526         * WebProcess/WebPage/WebPage.cpp:
2527         (WebKit::WebPage::didCommitLoad): Added call to resetAssistedNodeForFrame.
2528
2529 2015-10-02  Alex Christensen  <achristensen@webkit.org>
2530
2531         Reloading without content blockers doesn't apply to resource loads after the main frame finishes
2532         https://bugs.webkit.org/show_bug.cgi?id=149430
2533         rdar://problem/22742222
2534
2535         Reviewed by Geoffrey Garen.
2536
2537         * WebProcess/WebPage/WebPage.cpp:
2538         (WebKit::WebPage::createDocumentLoader):
2539         Copy the state of whether content extensions are disabled from the Page to the DocumentLoader
2540         when making a DocumentLoader.
2541
2542 2015-10-02  Antoine Quint  <graouts@apple.com>
2543
2544         popstate is fired at the wrong time on load
2545         https://bugs.webkit.org/show_bug.cgi?id=94265
2546
2547         Reviewed by Darin Adler.
2548
2549         Ensure we have a valid page before trying to get to its drawingArea as this could lead
2550         to a crash as observed with fast/loader/stateobjects/pushstate-object-types.html.
2551
2552         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2553         (WebKit::WebFrameLoaderClient::restoreViewState):
2554
2555 2015-10-01  Antti Koivisto  <antti@apple.com>
2556
2557         Network cache: Subresource referer header wrong after cached redirect
2558         https://bugs.webkit.org/show_bug.cgi?id=149709
2559         rdar://problem/22917174
2560
2561         Reviewed by Chris Dumez.
2562
2563         If a main resource is loaded from a cache entry that involved redirects the document
2564         will end up setting the Referer-headers of the subresources to the request URL not the redirected URL
2565
2566         * NetworkProcess/NetworkResourceLoader.cpp:
2567         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
2568
2569             If a cache entry involved a redirect synthesize a minimal willSendRequest message so that WebCore side
2570             runs through the same code paths as when receiving a redirect from network.
2571
2572 2015-10-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2573
2574         [GTK] Websites with invalid auth header keep loading forever
2575         https://bugs.webkit.org/show_bug.cgi?id=149710
2576
2577         Reviewed by Martin Robinson.
2578
2579         Do not show the remember credentials checkbutton in the auth
2580         dialog if the realm is empty.
2581
2582         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
2583         (webkitAuthenticationDialogInitialize):
2584
2585 2015-09-30  Chris Dumez  <cdumez@apple.com>
2586
2587         Unreviewed, roll out r188331: "NetworkProcess: DNS prefetch happens in the Web Process"
2588         <rdar://problem/22560715>
2589
2590         Speculative roll out of r188331 as we had a ~2.5% PLT regression around
2591         the time it landed and it seems the most likely culprit. I'll reland if
2592         the perf bots do not recover after the roll out.
2593
2594         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2595         (WebKit::storageSession): Deleted.
2596         * NetworkProcess/NetworkConnectionToWebProcess.h:
2597         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2598         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
2599         (webkitWebExtensionDidReceiveMessage):
2600         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2601         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2602         * WebProcess/WebPage/ios/WebPageIOS.mm:
2603         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
2604         * WebProcess/WebProcess.cpp:
2605         * WebProcess/WebProcess.h:
2606
2607 2015-09-30  Timothy Horton  <timothy_horton@apple.com>
2608
2609         Compute document marker rects at use time instead of paint time
2610         https://bugs.webkit.org/show_bug.cgi?id=149643
2611
2612         Reviewed by Darin Adler.
2613
2614         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2615         (WebKit::WebChromeClient::didInvalidateDocumentMarkerRects):
2616         * WebProcess/WebCoreSupport/WebChromeClient.h:
2617         Plumb the notification about invalidated document marker rects through to FindController.
2618
2619         * WebProcess/WebPage/FindController.cpp:
2620         (WebKit::FindController::updateFindUIAfterPageScroll):
2621         Make a document-relative PageOverlay, so that we get fast scrolling.
2622
2623         (WebKit::FindController::rectsForTextMatchesInRect):
2624         Return find hole rects in main-FrameView content coordinates, to 
2625         match the document-relative page overlay.
2626         We'll only return rects that intersect the passed-in rect, which
2627         comes from the dirty rect passed to drawRect.
2628
2629         (WebKit::FindController::drawRect):
2630         Inflate the dirty rect by the border width so that we hit all relevant
2631         markers in each tile. Otherwise, we would end up missing the border of a marker
2632         that touched the edge of a tile.
2633
2634         (WebKit::FindController::didInvalidateDocumentMarkerRects):
2635         Repaint (for now, the entire overlay) when document marker rects change.
2636
2637         * WebProcess/WebPage/FindController.h:
2638
2639 2015-09-30  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2640
2641         [GTK] Build error with -DENABLE_SPELLCHECK=OFF
2642         https://bugs.webkit.org/show_bug.cgi?id=146904
2643
2644         Reviewed by Carlos Garcia Campos.
2645
2646         Add ifdef guards to allow building when SPELLCHECK is not enabled.
2647
2648         * UIProcess/gtk/TextCheckerGtk.cpp:
2649         (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
2650         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
2651         (WebKit::TextChecker::setGrammarCheckingEnabled):
2652         (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
2653         (WebKit::TextChecker::grammarCheckingEnabledStateChanged):
2654         (WebKit::TextChecker::checkSpellingOfString):
2655         (WebKit::TextChecker::getGuessesForWord):
2656         (WebKit::TextChecker::learnWord):
2657         (WebKit::TextChecker::ignoreWord):
2658         (WebKit::TextChecker::requestCheckingOfString):
2659         (WebKit::TextChecker::checkTextOfParagraph):
2660         (WebKit::TextChecker::setSpellCheckingLanguages):
2661         (WebKit::TextChecker::loadedSpellCheckingLanguages):
2662
2663 2015-09-30  Gwang Yoon Hwang  <yoon@igalia.com>
2664
2665         [GTK] Support HiDPI Properly in WebKitGtk+ with the TextureMapper
2666         https://bugs.webkit.org/show_bug.cgi?id=141782
2667
2668         Reviewed by Carlos Garcia Campos.
2669
2670         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2671         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
2672
2673             Modified to create scaled size of window.
2674
2675         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2676         (WebKit::LayerTreeHostGtk::initialize):
2677         (WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged):
2678
2679             We should apply device scale factor to the root layer to apply
2680             the scale matrix before applying other transform matrices.
2681
2682         (WebKit::LayerTreeHostGtk::deviceScaleFactor): Added.
2683         (WebKit::LayerTreeHostGtk::pageScaleFactor): Added.
2684
2685 2015-09-29  Daniel Bates  <dabates@apple.com>
2686
2687         Make WebKit for iOS Simulator build with the public iOS 9 SDK
2688         https://bugs.webkit.org/show_bug.cgi?id=149652
2689
2690         Reviewed by Simon Fraser.
2691
2692         * Platform/spi/ios/SafariServicesSPI.h: Add definition for SFSafariViewController.
2693         * Platform/spi/ios/UIKitSPI.h: Add more SPI.
2694         * WebProcess/cocoa/WebProcessCocoa.mm: Include header pthreadSPI.h.
2695
2696 2015-09-29  Brady Eidson  <beidson@apple.com>
2697
2698         Followup to "Move WebKit2 AsyncTask to WebCore CrossThreadTask."
2699         https://bugs.webkit.org/show_bug.cgi?id=149651
2700
2701         Rubberstamped by Alex Christensen.
2702
2703         * DatabaseProcess/DatabaseProcess.h: CrossThreadTask is in the WebCore namespace, not WebKit.
2704         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h: Ditto.
2705
2706 2015-09-29  Brady Eidson  <beidson@apple.com>
2707
2708         Move WebKit2 AsyncTask to WebCore CrossThreadTask.
2709         https://bugs.webkit.org/show_bug.cgi?id=149651
2710
2711         Reviewed by Alex Christensen.
2712
2713         * DatabaseProcess/DatabaseProcess.cpp:
2714         (WebKit::DatabaseProcess::ensureIndexedDatabaseRelativePathExists):
2715         (WebKit::DatabaseProcess::postDatabaseTask):
2716         (WebKit::DatabaseProcess::performNextDatabaseTask):
2717         (WebKit::DatabaseProcess::fetchWebsiteData):
2718         (WebKit::DatabaseProcess::deleteWebsiteData):
2719         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
2720         * DatabaseProcess/DatabaseProcess.h:
2721         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2722         (WebKit::UniqueIDBDatabase::shutdown):
2723         (WebKit::UniqueIDBDatabase::shutdownBackingStore):
2724         (WebKit::UniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata):
2725         (WebKit::UniqueIDBDatabase::openBackingStoreAndReadMetadata):
2726         (WebKit::UniqueIDBDatabase::openTransaction):
2727         (WebKit::UniqueIDBDatabase::beginTransaction):
2728         (WebKit::UniqueIDBDatabase::commitTransaction):
2729         (WebKit::UniqueIDBDatabase::resetTransaction):
2730         (WebKit::UniqueIDBDatabase::rollbackTransaction):
2731         (WebKit::UniqueIDBDatabase::postTransactionOperation):
2732         (WebKit::UniqueIDBDatabase::changeDatabaseVersion):
2733         (WebKit::UniqueIDBDatabase::createObjectStore):
2734         (WebKit::UniqueIDBDatabase::deleteObjectStore):
2735         (WebKit::UniqueIDBDatabase::clearObjectStore):
2736         (WebKit::UniqueIDBDatabase::createIndex):
2737         (WebKit::UniqueIDBDatabase::deleteIndex):
2738         (WebKit::UniqueIDBDatabase::putRecord):
2739         (WebKit::UniqueIDBDatabase::getRecord):
2740         (WebKit::UniqueIDBDatabase::openCursor):
2741         (WebKit::UniqueIDBDatabase::cursorAdvance):
2742         (WebKit::UniqueIDBDatabase::cursorIterate):
2743         (WebKit::UniqueIDBDatabase::count):
2744         (WebKit::UniqueIDBDatabase::deleteRange):
2745         (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
2746         (WebKit::UniqueIDBDatabase::beginBackingStoreTransaction):
2747         (WebKit::UniqueIDBDatabase::commitBackingStoreTransaction):
2748         (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
2749         (WebKit::UniqueIDBDatabase::rollbackBackingStoreTransaction):
2750         (WebKit::UniqueIDBDatabase::changeDatabaseVersionInBackingStore):
2751         (WebKit::UniqueIDBDatabase::createObjectStoreInBackingStore):
2752         (WebKit::UniqueIDBDatabase::deleteObjectStoreInBackingStore):
2753         (WebKit::UniqueIDBDatabase::clearObjectStoreInBackingStore):
2754         (WebKit::UniqueIDBDatabase::createIndexInBackingStore):
2755         (WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):
2756         (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
2757         (WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
2758         (WebKit::UniqueIDBDatabase::openCursorInBackingStore):
2759         (WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
2760         (WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):
2761         (WebKit::UniqueIDBDatabase::countInBackingStore):
2762         (WebKit::UniqueIDBDatabase::deleteRangeInBackingStore):
2763         (WebKit::UniqueIDBDatabase::postMainThreadTask):
2764         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
2765         (WebKit::UniqueIDBDatabase::postDatabaseTask):
2766         (WebKit::UniqueIDBDatabase::performNextDatabaseTask):
2767         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2768         * WebKit2.xcodeproj/project.pbxproj:
2769
2770 2015-09-29  Chris Dumez  <cdumez@apple.com>
2771
2772         Memory cache revalidations should refresh the network disk cache
2773         https://bugs.webkit.org/show_bug.cgi?id=149606
2774
2775         Reviewed by Darin Adler.
2776
2777         Previously, resource revalidations triggered by the memory cache would
2778         bypass the disk cache entirely because the requests are conditional. As
2779         a result, when the server responds with a 304, we were unable to update
2780         the headers (e.g. new expiration date) of the corresponding entry in
2781         the disk cache.
2782
2783         This patch updates our disk cache implementation to not bypass the disk
2784         cache when the request is conditional. Instead, we look up the cached
2785         entry and force its revalidation from the network. If the server then
2786         returns a 304, we are now able to update the headers of this cached
2787         entry. In such case though, we let the 304 response through to WebCore
2788         unlike revalidations triggered by the disk cache.
2789
2790         * NetworkProcess/NetworkResourceLoader.cpp:
2791         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2792         * NetworkProcess/cache/NetworkCache.cpp:
2793         (WebKit::NetworkCache::makeUseDecision):
2794         (WebKit::NetworkCache::makeRetrieveDecision):
2795
2796 2015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2797
2798         printing does not use minimum page zoom factor
2799         https://bugs.webkit.org/show_bug.cgi?id=108507
2800
2801         Reviewed by Darin Adler.
2802
2803         Add kWKSnapshotOptionsPrinting flag to indicate the snapshot
2804         should be generated in printing mode.
2805
2806         * Shared/API/c/WKImage.h:
2807         * Shared/API/c/WKSharedAPICast.h:
2808         (WebKit::toSnapshotOptions):
2809         * Shared/ImageOptions.h:
2810         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2811         (WebKit::InjectedBundle::numberOfPages): Pass the frame as a
2812         reference instead of a pointer.
2813         * WebProcess/WebPage/WebPage.cpp:
2814         (WebKit::WebPage::scaledSnapshotWithOptions): In case of printing,
2815         calculate the bitmap height based on the number of pages.
2816         (WebKit::WebPage::snapshotAtSize): In case of printing, use
2817         PrintContext::spoolAllPagesWithBoundaries() and return.
2818
2819 2015-09-28  Brent Fulgham  <bfulgham@apple.com>
2820
2821         Expose 'geometryFlipped' state for debugging/logging purposes
2822         https://bugs.webkit.org/show_bug.cgi?id=149557
2823
2824         Reviewed by Simon Fraser.
2825
2826         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2827         (WebKit::PlatformCALayerRemote::geometryFlipped): Added.
2828         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2829
2830 2015-09-28  Brady Eidson  <beidson@apple.com>
2831
2832         Add an IDB Server that can roundtrip a request back to the client.
2833         https://bugs.webkit.org/show_bug.cgi?id=149603
2834
2835         Reviewed by Alex Christensen.
2836
2837         * WebProcess/Databases/WebDatabaseProvider.h:
2838
2839 2015-09-28  Beth Dakin  <bdakin@apple.com>
2840
2841         Heavy taps on links are sometimes interpreted as the preview gesture
2842         https://bugs.webkit.org/show_bug.cgi?id=149304
2843         -and corresponding-
2844         rdar://problem/22689258
2845
2846         Rubber-stamped by Tim Horton.
2847
2848         Rolling out this patch. We should try to fix this at the UIKit-level.
2849         * UIProcess/ios/WKContentViewInteraction.h:
2850         * UIProcess/ios/WKContentViewInteraction.mm:
2851         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
2852         (-[WKContentView _interactionStoppedFromPreviewItemController:]):
2853
2854 2015-09-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2855
2856         Expose a WKWebView API for allowing programmatic focus to trigger node assistance
2857         https://bugs.webkit.org/show_bug.cgi?id=149567
2858
2859         Reviewed by Darin Adler.
2860
2861         Adds an API method to WKWebView that allows clients to override the default iOS behavior of not
2862         starting node assistance when programmatically focusing. Also fixes a bug caused by naively
2863         introducing the flag where the autofocus attribute could trigger node assistance before layout
2864         occurs, causing an ASSERT to fail in EditorState::postLayoutData.
2865
2866         I fixed this issue by not assisting the node if the editor state is missing post layout data,
2867         instead deferring node assistance until layout has occurred.
2868
2869         * UIProcess/API/Cocoa/WKWebView.h:
2870         * UIProcess/API/Cocoa/WKWebView.mm:
2871         (-[WKWebView initWithFrame:configuration:]): Initializes the new node assistance flag to NO, which
2872             is the current default behavior.
2873         (-[WKWebView canAssistOnProgrammaticFocus]):
2874         (-[WKWebView setCanAssistOnProgrammaticFocus:]): New API method that allows clients to set node
2875             assistance behavior upon programmatic focus.
2876         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2877         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2878         (-[WKWebViewConfiguration init]): Added new node assistance flag to configuration.
2879         (-[WKWebViewConfiguration _canAssistOnProgrammaticFocus]):
2880         (-[WKWebViewConfiguration _setCanAssistOnProgrammaticFocus:]):
2881         * UIProcess/WebPageProxy.h: Added NodeAssistanceArguments struct.
2882         * UIProcess/ios/WKContentViewInteraction.mm:
2883         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Do not return
2884             early if the node assistance flag is set to allow programmatic focus.
2885         * UIProcess/ios/WebPageProxyIOS.mm:
2886         (WebKit::WebPageProxy::didCommitLayerTree): After committing the layer tree, if we have deferred
2887             starting node assistance, immediately trigger node assistance.
2888         (WebKit::WebPageProxy::startAssistingNode): Defer starting node assistance if we have not yet repainted.
2889         (WebKit::WebPageProxy::stopAssistingNode): Also cancel any deferred node assistance.
2890
2891 2015-09-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2892
2893         REGRESSION(r188639): [GTK] Several inspector tests started to time out in GTK+ bots after r188639
2894         https://bugs.webkit.org/show_bug.cgi?id=148569
2895
2896         Reviewed by Darin Adler.
2897
2898         * PlatformGTK.cmake: Add missing inspector files required for
2899         layout tests.
2900
2901 2015-09-25  Eric Carlson  <eric.carlson@apple.com>
2902
2903         Clean up user media request internal API
2904         https://bugs.webkit.org/show_bug.cgi?id=149527
2905
2906         Reviewed by Tim Horton.
2907
2908         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
2909         (WKUserMediaPermissionRequestVideoDeviceUIDs): New, renamed from WKUserMediaPermissionRequestDeviceNamesVideo.
2910         (WKUserMediaPermissionRequestAudioDeviceUIDs): New, renamed from WKUserMediaPermissionRequestDeviceNamesAudio.
2911         (WKUserMediaPermissionRequestAllowBest): Deleted.
2912         (WKUserMediaPermissionRequestDeviceNamesVideo): Deleted.
2913         (WKUserMediaPermissionRequestDeviceNamesAudio): Deleted.
2914         (WKUserMediaPermissionRequestFirstVideoDeviceUID): Deleted.
2915         (WKUserMediaPermissionRequestFirstAudioDeviceUID): Deleted.
2916         * UIProcess/API/C/WKUserMediaPermissionRequest.h:
2917
2918         * UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
2919         (webkitUserMediaPermissionRequestAllow): Update for UserMediaRequest API change.
2920
2921         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2922         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Get rid of the bool parameters.
2923           Switch audio/video parameter order to be consistent with everywhere else.
2924         (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Ditto.
2925         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2926
2927         * UIProcess/UserMediaPermissionRequestProxy.cpp:
2928         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): Get rid of the bool parameters.
2929           Switch audio/video parameter order to be consistent with everywhere else.
2930         (WebKit::UserMediaPermissionRequestProxy::allow): Switch audio/video parameter order.
2931         (WebKit::UserMediaPermissionRequestProxy::getDeviceNameForUID): Deleted.
2932         * UIProcess/UserMediaPermissionRequestProxy.h:
2933         (WebKit::UserMediaPermissionRequestProxy::create):
2934         (WebKit::UserMediaPermissionRequestProxy::videoDeviceUIDs):
2935         (WebKit::UserMediaPermissionRequestProxy::audioDeviceUIDs):
2936         (WebKit::UserMediaPermissionRequestProxy::firstAudioDeviceUID):
2937         (WebKit::UserMediaPermissionRequestProxy::requiresAudio): Deleted.
2938         (WebKit::UserMediaPermissionRequestProxy::requiresVideo): Deleted.
2939
2940         * UIProcess/WebPageProxy.cpp:
2941         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Get rid of the bool parameters.
2942           Switch audio/video parameter order to be consistent with everywhere else.
2943         * UIProcess/WebPageProxy.h: Ditto.
2944         * UIProcess/WebPageProxy.messages.in: Ditto.
2945
2946         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2947         (WebKit::UserMediaPermissionRequestManager::startRequest): Get rid of bool params, the device
2948           vectors have the same information.
2949         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision): Switch audio/video
2950           parameter order to be consistent with everywhere else. deviceUIDVideo -> videoDeviceUID,
2951         deviceUIDAudio -> audioDeviceUID.
2952         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
2953
2954         * WebProcess/WebPage/WebPage.cpp:
2955         (WebKit::WebPage::didReceiveUserMediaPermissionDecision): Switch audio/video parameter order.
2956         * WebProcess/WebPage/WebPage.h:
2957
2958 2015-09-25  Simon Fraser  <simon.fraser@apple.com>
2959
2960         [iOS WK2] Add viewport tests and fix runUIScript() timing issues
2961         https://bugs.webkit.org/show_bug.cgi?id=149577
2962
2963         Reviewed by Tim Horton.
2964         
2965         When calling testRunner.runUIScript() from a page load event, the script could run
2966         in the UI process before the current remote layer tree transaction had been handled
2967         there. This meant that runUIScript() could query state which was about to change.
2968         
2969         Fix by delaying the execution of the UI script until a layer tree transaction has
2970         been handled by the UI process, leveraging the existing DrawingAreaProxy::dispatchAfterEnsuringDrawing().
2971         
2972         This is done using a new C SPI function WKPageCallAfterNextPresentationUpdate(),
2973         which is mirrored in the Obj-C SPI as -_doAfterNextPresentationUpdate:.
2974         
2975         Move WKWebView SPI which is testing-related into a WKTesting category. It is expected
2976         that this will grow significantly.
2977
2978         * UIProcess/API/C/WKPage.cpp:
2979         (WKPageCallAfterNextPresentationUpdate):
2980         * UIProcess/API/C/WKPagePrivate.h:
2981         * UIProcess/API/Cocoa/WKWebView.mm:
2982         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2983         * UIProcess/WebPageProxy.cpp:
2984         (WebKit::WebPageProxy::callAfterNextPresentationUpdate):
2985         * UIProcess/WebPageProxy.h:
2986         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2987         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2988         (WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):
2989
2990 2015-09-25  Alexey Proskuryakov  <ap@apple.com>
2991
2992         [Mac] Media tests start to time out after a few days of bot uptime
2993         https://bugs.webkit.org/show_bug.cgi?id=149468
2994
2995         Reviewed by Darin Adler.
2996
2997         Make the fix work with WebKit2, and avoid touching user's media cache for WebKit1.
2998
2999         When UI process is not sandboxed, inherit DIRHELPER_USER_DIR_SUFFIX from it.
3000         This means that during testing, WebContent uses a temporary directory of the form
3001         /private/var/folders/.../T/WebKitTestRunner-VKjmz0/com.apple.WebKit.WebContent.Development,
3002         instead of /private/var/folders/.../T/com.apple.WebKit.WebContent.Development+WebKitTestRunner.
3003
3004         WebKit1 now also better respects a temporary directory of the form
3005         /private/var/folders/.../T/DumpRenderTree-VKjmz0, instead of the default, which
3006         makes CoreMedia put its cache inside it.
3007
3008         As a result, almost everything is isolated per testing process, and deleted at the end.
3009         Same with cache directories. The only outliers that I know of are plug-in directories,
3010         which are per-process, but are not under the testing root, and thus aren't deleted.
3011
3012         * PluginProcess/mac/PluginProcessMac.mm:
3013         (WebKit::PluginProcess::initializeSandbox):
3014         * Shared/ChildProcessProxy.cpp:
3015         (WebKit::ChildProcessProxy::fromConnection):
3016         (WebKit::ChildProcessProxy::getLaunchOptions):
3017         (WebKit::ChildProcessProxy::connect):
3018         * Shared/ChildProcessProxy.h:
3019         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
3020         (WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
3021         * Shared/SandboxInitializationParameters.h:
3022         (WebKit::SandboxInitializationParameters::sandboxProfile):
3023         (WebKit::SandboxInitializationParameters::setUserDirectorySuffix):
3024         (WebKit::SandboxInitializationParameters::userDirectorySuffix):
3025         (WebKit::SandboxInitializationParameters::setSystemDirectorySuffix): Deleted.
3026         (WebKit::SandboxInitializationParameters::systemDirectorySuffix): Deleted.
3027         * Shared/ios/ChildProcessIOS.mm:
3028         (WebKit::ChildProcess::initializeSandbox):
3029         * Shared/mac/ChildProcessMac.mm:
3030         (WebKit::ChildProcess::initializeSandbox):
3031         * UIProcess/Databases/DatabaseProcessProxy.cpp:
3032         (WebKit::DatabaseProcessProxy::getLaunchOptions):
3033         * UIProcess/Network/NetworkProcessProxy.cpp:
3034         (WebKit::NetworkProcessProxy::getLaunchOptions):
3035         * UIProcess/Plugins/PluginProcessProxy.cpp:
3036         (WebKit::PluginProcessProxy::getLaunchOptions):
3037         * UIProcess/WebProcessProxy.cpp:
3038         (WebKit::WebProcessProxy::getLaunchOptions):
3039
3040 2015-09-25  Beth Dakin  <bdakin@apple.com>
3041
3042         Clicking on a data detected item inside a form control always pops up a map 
3043         on force touch trackpad
3044         https://bugs.webkit.org/show_bug.cgi?id=149559
3045         -and corresponding-
3046         rdar://problem/22826796
3047
3048         Reviewed by Tim Horton.
3049
3050         Look for Data Detected text for text nodes and HitTestResults that are over 
3051         text inside form controls.
3052
3053         * WebProcess/WebPage/mac/WebPageMac.mm:
3054         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
3055
3056 2015-09-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3057
3058         [GTK] ASSERTION FAILED: !m_inUpdateBackingStoreState in DrawingAreaImpl::display() after DrawingAreaImpl::forceRepaint()
3059         https://bugs.webkit.org/show_bug.cgi?id=148956
3060
3061         Reviewed by Žan Doberšek.
3062
3063         This is because those tests call notifyDone in the onresize event
3064         handler. InjectedBundlePage::dump() always calls WKBundlePageForceRepaint()
3065         before dumping. When the view is resized DrawingAreaImpl::updateBackingStoreState()
3066         is called, so if the size has changed the FrameView::resize()
3067         method is called and all children are resized, so the onresize
3068         handlers happen at that point, before the
3069         m_inUpdateBackingStoreState is set to false again. For WTR we
3070         could probably just return early from froceReapaint() when
3071         m_inUpdateBackingStoreState is true, because in that case we know
3072         the layout is updated because of the resize and the actual display
3073         is not really needed. But the UI process can also request a force
3074         repaint, so we could wait until the backing store update is done
3075         and then force the repaint. For WTR it will happen after the
3076         dump, but it shouldn't be a problem.
3077
3078         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3079         (WebKit::DrawingAreaImpl::forceRepaint):
3080         (WebKit::DrawingAreaImpl::updateBackingStoreState):
3081         * WebProcess/WebPage/DrawingAreaImpl.h:
3082
3083 2015-09-24  Tim Horton  <timothy_horton@apple.com>
3084
3085         Find hole drawn at subframe's 0x0 when a subframe find match is not rendered
3086         https://bugs.webkit.org/show_bug.cgi?id=149543
3087
3088         Reviewed by Beth Dakin.
3089
3090         * WebProcess/WebPage/FindController.cpp:
3091         (WebKit::FindController::rectsForTextMatches):
3092         Don't add empty rects to the list. Later code will just inflate them
3093         and end up drawing a nonsensical find hole.
3094
3095 2015-09-24  Chris Dumez  <cdumez@apple.com>
3096
3097         Drop XPATH_NAMESPACE_NODE from Node::NodeType enum
3098         https://bugs.webkit.org/show_bug.cgi?id=149532
3099
3100         Reviewed by Ryosuke Niwa.
3101
3102         Drop XPATH_NAMESPACE_NODE from Node::NodeType enum as there is currently
3103         no way to construct such Node in WebKit. This avoid having to handle this
3104         Node type everywhere.
3105
3106         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
3107         (WebKit::WKDOMNodeClass): Deleted.
3108
3109 2015-09-24  Ryosuke Niwa  <rniwa@webkit.org>
3110
3111         Ran sort-Xcode-project-file.
3112
3113         * WebKit2.xcodeproj/project.pbxproj:
3114
3115 2015-09-23  Timothy Horton  <timothy_horton@apple.com>
3116
3117         Link highlight rect is too rounded on blocks with border-radius
3118         https://bugs.webkit.org/show_bug.cgi?id=149511
3119
3120         Reviewed by Dan Bernstein.
3121
3122         * UIProcess/ios/WKContentViewInteraction.mm:
3123         (nsSizeForTapHighlightBorderRadius):
3124         (-[WKContentView _updateTapHighlight]):
3125         Scale the border radius from content to view coordinates, just like
3126         we do for the rects that WebKit returns us.
3127
3128 2015-09-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3129
3130         Add a file of pointer-lock to cmake ports
3131         https://bugs.webkit.org/show_bug.cgi?id=149453
3132
3133         Reviewed by Csaba Osztrogonác.
3134
3135         * WebProcess/WebPage/WebPage.cpp:
3136         (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick): Fix a build break.
3137
3138 2015-09-22  Anders Carlsson  <andersca@apple.com>
3139
3140         URL of page visited in private browsing still appears in Activity Monitor after page is closed
3141         https://bugs.webkit.org/show_bug.cgi?id=149475
3142         rdar://problem/22684521
3143
3144         Reviewed by Dan Bernstein.
3145
3146         * WebProcess/WebPage/WebPage.cpp:
3147         (WebKit::WebPage::close):
3148         Make sure to call updateActivePages after removing the page from the page map.
3149
3150         * WebProcess/cocoa/WebProcessCocoa.mm:
3151         (WebKit::WebProcess::updateActivePages):
3152         Don't include pages that have private browsing enabled.
3153
3154 2015-09-22  Tim Horton  <timothy_horton@apple.com>
3155
3156         Make it more obvious when using an unaccelerated image buffer, and fix a few callers who do
3157         https://bugs.webkit.org/show_bug.cgi?id=149428
3158
3159         Reviewed by Simon Fraser and Darin Adler.
3160
3161         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
3162         (WebKit::ThreadSafeCoordinatedSurface::create):
3163
3164 2015-09-22  Andreas Kling  <akling@apple.com>
3165
3166         [WK2][NetworkCache] New entry bodies remain in dirty memory after being written to disk.
3167         <https://webkit.org/b/149463>
3168
3169         Reviewed by Antti Koivisto.
3170
3171         Call msync(MS_ASYNC) on cache entry bodies after writing their data to a
3172         memory-mapped file. This turns the previously dirty memory into clean memory,
3173         reducing our effective footprint.
3174
3175         I previously believed this would happen automatically when the kernel finds
3176         itself under memory pressure, around the same time as it starts dropping
3177         volatile pages. Turns out that's not the case. Even under considerable pressure,
3178         we never flush this memory to file. So let's take care of it ourselves.
3179
3180         If this ends up generating more IO activity than we're comfortable with on some
3181         scenario, we can look at throttling.
3182
3183         * NetworkProcess/cache/NetworkCacheData.cpp:
3184         (WebKit::NetworkCache::Data::mapToFile):
3185
3186 2015-09-22  Chris Dumez  <cdumez@apple.com>
3187
3188         Drop support for legacy EntityReference DOM Node type
3189         https://bugs.webkit.org/show_bug.cgi?id=149348
3190
3191         Reviewed by Darin Adler.
3192
3193         Drop handling EntityReference Nodes.
3194
3195         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
3196         (WebKit::WKDOMNodeClass): Deleted.
3197         * WebProcess/WebPage/ios/WebPageIOS.mm:
3198         (WebKit::isAssistableElement):
3199
3200 2015-09-22  Commit Queue  <commit-queue@webkit.org>
3201
3202         Unreviewed, rolling out r189616.
3203         https://bugs.webkit.org/show_bug.cgi?id=149456
3204
3205         suspected cause of multiple regressions (Requested by kling on
3206         #webkit).
3207
3208         Reverted changeset:
3209
3210         "[JSC] Weak should only accept cell pointees."
3211         https://bugs.webkit.org/show_bug.cgi?id=148955
3212         http://trac.webkit.org/changeset/189616
3213
3214 2015-09-21  Timothy Horton  <timothy_horton@apple.com>
3215
3216         Allow DataDetectors to pre-filter telephone number menu items
3217         https://bugs.webkit.org/show_bug.cgi?id=149444
3218         <rdar://problem/19286320>
3219
3220         Reviewed by Sam Weinig.
3221
3222         * Platform/mac/MenuUtilities.mm:
3223         (WebKit::menuItemForTelephoneNumber):
3224         (WebKit::menuForTelephoneNumber):
3225         Let DataDetectors know what kind of items we want, so that they can avoid
3226         some unnecessary work in cases where we were just going to throw away the items anyway.
3227
3228 2015-09-21  Gwang Yoon Hwang  <yoon@igalia.com>
3229
3230         [Threaded Compositor] Modified to use reference of GraphicsContext instead of pointer
3231         https://bugs.webkit.org/show_bug.cgi?id=149399
3232
3233         Reviewed by Darin Adler.
3234
3235         This fixes build failure after r189144
3236
3237         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
3238         (WebKit::ThreadSafeCoordinatedSurface::paintToSurface):
3239         (WebKit::ThreadSafeCoordinatedSurface::beginPaint):
3240         (WebKit::ThreadSafeCoordinatedSurface::endPaint):
3241         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h:
3242
3243 2015-09-21  Simon Fraser  <simon.fraser@apple.com>
3244
3245         Add the ability for tests to run script in the UI process in WebKitTestRunner
3246         https://bugs.webkit.org/show_bug.cgi?id=149356
3247
3248         Reviewed by Tim Horton.
3249
3250         Expose a few private functions for testing.
3251
3252         * UIProcess/API/Cocoa/WKWebView.mm:
3253         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3254
3255 2015-09-21  Tim Horton  <timothy_horton@apple.com>
3256
3257         Layout milestones aren't synchronized with UI-side compositing transactions
3258         https://bugs.webkit.org/show_bug.cgi?id=149362
3259
3260         Reviewed by Anders Carlsson.
3261         
3262         Because layout milestones are primarily used to synchronize things with
3263         the displayed layout/rendering of the page, they should fire at the same
3264         time as the contents of the view change.
3265
3266         However, with UI-side compositing, the layer tree transaction will
3267         most likely come in *after* the layout milestones associated with its
3268         contents fire, breaking this synchronization.
3269
3270         Instead, put the layout milestones inside the transaction and fire them
3271         immediately after it is committed in the UI process.
3272
3273         * Shared/mac/RemoteLayerTreeTransaction.h:
3274         (WebKit::RemoteLayerTreeTransaction::setCallbackIDs):
3275         (WebKit::RemoteLayerTreeTransaction::newlyReachedLayoutMilestones):
3276         (WebKit::RemoteLayerTreeTransaction::setNewlyReachedLayoutMilestones):
3277         * Shared/mac/RemoteLayerTreeTransaction.mm:
3278         (WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):
3279         (WebKit::RemoteLayerTreeTransaction::encode):
3280         (WebKit::RemoteLayerTreeTransaction::decode):
3281         Add LayoutMilestones to the transaction.
3282
3283         * UIProcess/API/APILoaderClient.h:
3284         (API::LoaderClient::didLayout):
3285         * UIProcess/API/APINavigationClient.h:
3286         (API::NavigationClient::renderingProgressDidChange):
3287         * UIProcess/API/C/WKPage.cpp:
3288         (WKPageSetPageLoaderClient):
3289         (WKPageSetPageNavigationClient):
3290         * UIProcess/Cocoa/NavigationState.h:
3291         * UIProcess/Cocoa/NavigationState.mm:
3292         (WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
3293         * UIProcess/WebPageProxy.messages.in:
3294         * UIProcess/ios/WebPageProxyIOS.mm:
3295         (WebKit::WebPageProxy::didCommitLayerTree):
3296         Remove the UserData parameter from didLayout/renderingProgressDidChange,
3297         except for at the API level where we'll always pass null.
3298         Nobody uses UserData on didLayout, and we'll assert if any client sets it
3299         (and it won't get passed through to the UI process).
3300
3301         * UIProcess/WebPageProxy.cpp:
3302         (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
3303         Just call didLayout with the relevant milestones instead of reimplementing it.
3304
3305         (WebKit::WebPageProxy::didLayout):
3306         * UIProcess/WebPageProxy.h:
3307         Make didLayout public.
3308
3309         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3310         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
3311         Let WebPage handle dispatching didLayout.
3312
3313         * WebProcess/WebPage/WebPage.cpp:
3314         (WebKit::WebPage::dispatchDidLayout):
3315         * WebProcess/WebPage/WebPage.h:
3316         Let the DrawingArea handle dispatching didLayout.
3317         If it doesn't want to handle it, we'll just do the normal thing
3318         and dispatch an async message.
3319
3320         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3321         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
3322         If we reach a new layout milestone, dispatch didLayout client/delegate callbacks.
3323
3324         * WebProcess/WebPage/DrawingArea.h:
3325         (WebKit::DrawingArea::dispatchDidLayout):
3326         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3327         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3328         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3329         (WebKit::RemoteLayerTreeDrawingArea::dispatchDidLayout):
3330         Queue up milestones as we reach them, and send them in the transaction.
3331
3332 2015-09-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3333
3334         Remove XHR_TIMEOUT compilation guard
3335         https://bugs.webkit.org/show_bug.cgi?id=149260
3336
3337         Reviewed by Benjamin Poulain.
3338
3339         * Configurations/FeatureDefines.xcconfig:
3340
3341 2015-09-19  Michael Catanzaro  <mcatanzaro@igalia.com>
3342
3343         [GTK] WebEditorClient::supportsGlobalSelection returns true under Wayland
3344         https://bugs.webkit.org/show_bug.cgi?id=149375
3345
3346         Reviewed by Darin Adler.
3347
3348         WebEditorClient::supportsGlobalSelection should return false when running under Wayland,
3349         since Wayland does not have any equivalent for PRIMARY or the concept of a global selection.
3350
3351         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3352         (WebKit::WebEditorClient::supportsGlobalSelection):
3353
3354 2015-09-19  Dan Bernstein  <mitz@apple.com>
3355
3356         Attempted build fix.
3357
3358         * mac/postprocess-framework-headers.sh: Fixed an overzealous regular expression.
3359
3360 2015-09-18  Commit Queue  <commit-queue@webkit.org>
3361
3362         Unreviewed, rolling out r189908.
3363         https://bugs.webkit.org/show_bug.cgi?id=149368
3364
3365         Broke run-webkit-tests --pixel (Requested by ap on #webkit).
3366
3367         Reverted changeset:
3368
3369         "printing does not use minimum page zoom factor"
3370         https://bugs.webkit.org/show_bug.cgi?id=108507
3371         http://trac.webkit.org/changeset/189908
3372
3373 2015-09-18  Andy Estes  <aestes@apple.com>
3374
3375         [iOS] did{Start,Finish}LoadForQuickLookDocumentInMainFrame is never called on WKNavigationDelegate
3376         https://bugs.webkit.org/show_bug.cgi?id=149360
3377
3378         Reviewed by Tim Horton.
3379
3380         * UIProcess/ios/WebPageProxyIOS.mm:
3381         (WebKit::WebPageProxy::didStartLoadForQuickLookDocumentInMainFrame): Called on m_navigationDelegate if non-null.
3382         (WebKit::WebPageProxy::didFinishLoadForQuickLookDocumentInMainFrame): Ditto.
3383
3384 2015-09-18  Beth Dakin  <bdakin@apple.com>
3385
3386         Snapshots broken on iOS
3387         https://bugs.webkit.org/show_bug.cgi?id=149354
3388
3389         Reviewed by Tim Horton.
3390
3391         We need to send the IOSurface to ViewSnapshot::create() for this to work.
3392         * UIProcess/API/Cocoa/WKWebView.mm:
3393         (-[WKWebView _takeViewSnapshot]):
3394
3395 2015-09-18  Chris Dumez  <cdumez@apple.com>
3396
3397         Drop support for Entity Node type
3398         https://bugs.webkit.org/show_bug.cgi?id=149239
3399
3400         Reviewed by Darin Adler.
3401
3402         Stop handling the Entity node type.
3403
3404         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
3405
3406 2015-09-17  Brian Burg  <bburg@apple.com>
3407
3408         ASSERT(!m_frontendRouter->hasLocalFrontend()) when running Web Inspector tests
3409         https://bugs.webkit.org/show_bug.cgi?id=149006
3410         <rdar://problem/22654257>
3411         <rdar://problem/22631369>
3412
3413         Reviewed by Joseph Pecoraro.
3414
3415         Stop using InspectorController to close the frontend page. Go through
3416         the FrontendClient instead. Reduce redundant code paths.
3417
3418         This change seems to fix some recent crashes that were seen when
3419         closing Safari with Web Inspector open. These were caused by the frontend
3420         channel not being disconnected at the right time.
3421
3422         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3423         (WebKit::WebInspectorClient::inspectedPageDestroyed):
3424         (WebKit::WebInspectorClient::closeLocalFrontend): Deleted.
3425         * WebProcess/WebCoreSupport/WebInspectorClient.h:
3426         * WebProcess/WebPage/WebInspector.cpp:
3427         (WebKit::WebInspector::close):
3428         * WebProcess/WebPage/WebInspectorUI.cpp:
3429         (WebKit::WebInspectorUI::establishConnection):
3430
3431             Save a pointer to the frontend's InspectorController since we may
3432             need to use it while the page is being destructed and its getter
3433             is no longer accessible.
3434
3435         (WebKit::WebInspectorUI::closeWindow):
3436
3437             Explicitly remove the frontend client when closing the frontend.
3438
3439         * WebProcess/WebPage/WebInspectorUI.h:
3440         * WebProcess/WebPage/WebPage.cpp:
3441         (WebKit::WebPage::inspector):
3442
3443             Allow clients to specify whether an inspector should be eagerly created.
3444             Without this, we may accidentally create an instance during teardown.
3445
3446         * WebProcess/WebPage/WebPage.h:
3447
3448 2015-09-18  Emanuele Aina  <emanuele.aina@collabora.com>
3449
3450         Fix build with --no-indexed-database after r189831
3451         https://bugs.webkit.org/show_bug.cgi?id=149342
3452
3453         Reviewed by Csaba Osztrogonác.
3454
3455         * WebProcess/Databases/WebDatabaseProvider.h:
3456         Add ENABLE(INDEXED_DATABASE) guard around supportsModernIDB().
3457
3458 2015-09-17  Beth Dakin  <bdakin@apple.com>
3459
3460         Heavy taps on links are sometimes interpreted as the preview gesture
3461         https://bugs.webkit.org/show_bug.cgi?id=149304