Add WebSocketProvider stub
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2016-06-13  Alex Christensen  <achristensen@webkit.org>
2
3         Add WebSocketProvider stub
4         https://bugs.webkit.org/show_bug.cgi?id=158702
5
6         Reviewed by Brady Eidson.
7
8         * WebKit2.xcodeproj/project.pbxproj:
9         * WebProcess/Network/WebSocketProvider.h: Added.
10         * WebProcess/WebPage/WebPage.cpp:
11         (WebKit::m_shouldDispatchFakeMouseMoveEvents):
12
13 2016-06-10  Ada Chan  <adachan@apple.com>
14
15         Use the video element's video box when getting the inline video rect in WebVideoFullscreenManager
16         https://bugs.webkit.org/show_bug.cgi?id=158351
17         <rdar://problem/26567938>
18
19         Reviewed by Darin Adler.
20
21         * WebProcess/cocoa/WebVideoFullscreenManager.mm:
22         (WebKit::inlineVideoFrame):
23         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
24         (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
25         (WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
26         (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
27         (WebKit::clientRectForElement): Deleted.
28
29 2016-06-10  Benjamin Poulain  <bpoulain@apple.com>
30
31         Add support for passive event listeners on touch events
32         https://bugs.webkit.org/show_bug.cgi?id=158601
33
34         Reviewed by Simon Fraser.
35
36         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
37         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
38         (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
39         (WebKit::dump):
40         * Shared/WebCoreArgumentCoders.cpp:
41         (IPC::ArgumentCoder<EventTrackingRegions>::encode):
42         (IPC::ArgumentCoder<EventTrackingRegions>::decode):
43         * Shared/WebCoreArgumentCoders.h:
44         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
45         (WebKit::RemoteScrollingCoordinatorProxy::eventTrackingTypeForPoint):
46         (WebKit::RemoteScrollingCoordinatorProxy::isPointInNonFastScrollableRegion): Deleted.
47         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
48         * UIProcess/WebPageProxy.cpp:
49         (WebKit::WebPageProxy::touchEventTrackingType):
50         The type is the most restrictive type of all the touch points.
51         If any touch point needs synchronous tracking, everything has to be synchronous.
52
53         (WebKit::WebPageProxy::handleTouchEventSynchronously):
54         This is a very unfortunate design.
55
56         The upper layer dealing with UIKit knows about gesture and when something
57         can be dispatched asynchrnously because a gesture has started.
58         This layer knows about tracking and can use that extra inforamtion
59         to dispatch an event asynchrnously anyway.
60
61         In the future, we should refactor this to let WebPageProxy
62         always decide of the dispatch type. I am just concerned changing
63         the upper layer while we are stabilizing WebKit.
64
65         (WebKit::WebPageProxy::handleTouchEventAsynchronously):
66         (WebKit::WebPageProxy::handleTouchEvent):
67         (WebKit::WebPageProxy::resetState):
68         (WebKit::WebPageProxy::WebPageProxy): Deleted.
69         (WebKit::WebPageProxy::shouldStartTrackingTouchEvents): Deleted.
70         * UIProcess/WebPageProxy.h:
71
72 2016-06-10  Beth Dakin  <bdakin@apple.com>
73
74         Add requestExitFullScreen to WKFullScreenWindowController
75         https://bugs.webkit.org/show_bug.cgi?id=158633
76         -and corresponding-
77         rdar://problem/26564036
78
79         Reviewed by Tim Horton.
80
81         * UIProcess/mac/WKFullScreenWindowController.h:
82         * UIProcess/mac/WKFullScreenWindowController.mm:
83         (-[WKFullScreenWindowController requestExitFullScreen]):
84
85 2016-06-10  Alex Christensen  <achristensen@webkit.org>
86
87         Reduce ResourceResponse copying
88         https://bugs.webkit.org/show_bug.cgi?id=158232
89
90         Reviewed by Darin Adler.
91
92         * NetworkProcess/Downloads/PendingDownload.h:
93         * NetworkProcess/NetworkDataTask.h:
94         * NetworkProcess/NetworkLoad.cpp:
95         (WebKit::NetworkLoad::continueDidReceiveResponse):
96         (WebKit::NetworkLoad::sharedDidReceiveResponse):
97         (WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
98         (WebKit::NetworkLoad::didReceiveChallenge):
99         (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
100         (WebKit::NetworkLoad::didReceiveResponseAsync):
101         * NetworkProcess/NetworkLoad.h:
102         * NetworkProcess/NetworkLoadClient.h:
103         * NetworkProcess/NetworkResourceLoader.cpp:
104         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
105         (WebKit::NetworkResourceLoader::abort):
106         * NetworkProcess/NetworkResourceLoader.h:
107         * NetworkProcess/PingLoad.h:
108         * NetworkProcess/cache/NetworkCacheCoders.h:
109         (WebKit::NetworkCache::Coder<Optional<T>>::encode):
110         (WebKit::NetworkCache::Coder<Optional<T>>::decode):
111         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
112         (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
113         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
114         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
115         (WebKit::NetworkDataTask::didCompleteWithError):
116         (WebKit::NetworkDataTask::didReceiveResponse):
117         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
118         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
119         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
120         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
121         * WebProcess/WebPage/WebFrame.cpp:
122         (WebKit::WebFrame::url):
123         (WebKit::WebFrame::certificateInfo):
124         (WebKit::WebFrame::innerText):
125
126 2016-06-09  Ryosuke Niwa  <rniwa@webkit.org>
127
128         Add SPI to disable spellchecking on auto-fillable text fields
129         https://bugs.webkit.org/show_bug.cgi?id=158611
130
131         Reviewed by Anders Carlsson.
132
133         Added WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled to disable spellchecking on a text field.
134
135         This is used by WebKit2 client which desires to disable spellchecking and notably autocorrection on
136         login forms, etc... where such feature would interfere with user's actions.
137
138         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
139         (WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled): Added.
140         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
141         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
142         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementSpellcheckEnabled): Added.
143         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
144
145 2016-06-10  Alex Christensen  <achristensen@webkit.org>
146
147         Introduce WTF::UniqueRef
148         https://bugs.webkit.org/show_bug.cgi?id=158596
149
150         Reviewed by Brady Eidson.
151
152         * WebProcess/WebPage/WebPage.cpp:
153         (WebKit::m_shouldDispatchFakeMouseMoveEvents):
154
155 2016-06-10  Anders Carlsson  <andersca@apple.com>
156
157         Remove CommandLine class
158         https://bugs.webkit.org/show_bug.cgi?id=158628
159
160         Reviewed by Tim Horton.
161
162         * Shared/CommandLine.h: Removed.
163         (WebKit::CommandLine::operator[]): Deleted.
164         * Shared/posix/CommandLinePOSIX.cpp: Removed.
165         (WebKit::CommandLine::parse): Deleted.
166         * WebKit2.xcodeproj/project.pbxproj:
167
168 2016-06-10  Simon Fraser  <simon.fraser@apple.com>
169
170         [iOS WK2] Rare RELEASE_ASSERT under RemoteLayerTreeDrawingArea::flushLayers()
171         https://bugs.webkit.org/show_bug.cgi?id=158622
172         rdar://problem/26609452
173
174         Reviewed by Tim Horton.
175         
176         It's possible for a CADisplayLink to fire after being paused sometimes, possibly
177         when an app is running another CADisplayLink whose callback takes some time. When
178         this happens, RemoteLayerTreeDrawingAreaProxy could erroneously send a second
179         didUpdate() to the web process between commits, which would clear the m_waitingForBackingStoreSwap
180         flag too early, and allow a subsequent RemoteLayerTreeDrawingArea::flushLayers()
181         to proceed when the m_pendingBackingStoreFlusher was still flushing.
182
183         Fix by preventing two didUpdates from being sent from the UI process between
184         commits.
185         
186         Not easily testable.
187
188         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
189         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
190         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
191         (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
192
193 2016-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>
194
195         [Threaded Compositor] Content and viewport sizes are mixed
196         https://bugs.webkit.org/show_bug.cgi?id=158564
197
198         Reviewed by Žan Doberšek.
199
200         Make ThreadedCoordinatedLayerTreeHost::sizeDidChange() update the viewport size for consistency with all other
201         LayerTreeHost implementations and rename viewportSizeChanged() as contentsSizeChanged() and update the contents
202         size.
203
204         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
205         (WebKit::WebChromeClient::contentsSizeChanged): Remove ifdefed code here, the drawing area is notified two lines below.
206         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
207         (WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged): Update the viewport size to the contents size
208         only when using a fixed layout here instead of in cross-platform code.
209         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
210         (WebKit::ThreadedCoordinatedLayerTreeHost::contentsSizeChanged):
211         (WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange):
212         (WebKit::ThreadedCoordinatedLayerTreeHost::viewportSizeChanged): Deleted.
213         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
214         * WebProcess/WebPage/DrawingAreaImpl.cpp:
215         (WebKit::DrawingAreaImpl::mainFrameContentSizeChanged): Call LayerTreeHost::contentsSizeChanged().
216         (WebKit::DrawingAreaImpl::updateBackingStoreState): Remove ifdefed code for the threadecd compositor since it's
217         now consistent with all other LayerTreeHost implementations.
218         * WebProcess/WebPage/LayerTreeHost.h:
219
220 2016-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>
221
222         [Threaded Compositor] Make it clear that compositing thread operations are always scheduled from the main thread
223         https://bugs.webkit.org/show_bug.cgi?id=158562
224
225         Reviewed by Žan Doberšek.
226
227         The code is written as if the compositor thread could also call callOnCompositingRunLoop() which makes the code
228         confusing. This patch no longer checks if the task was scheduled in the compositing thread, and instead it adds
229         an ASSERT to ensure it's always called from the main thread as expected. It also adds some more ASSERTS to ensure
230         and clarify the methods are called from the expected thread.
231
232         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
233         (WebKit::CompositingRunLoop::performTask):
234         (WebKit::CompositingRunLoop::callOnCompositingRunLoop): Deleted.
235         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
236         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
237         (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing):
238         (WebKit::ThreadedCompositor::setDeviceScaleFactor):
239         (WebKit::ThreadedCompositor::didChangeViewportSize):
240         (WebKit::ThreadedCompositor::didChangeViewportAttribute):
241         (WebKit::ThreadedCompositor::didChangeContentsSize):
242         (WebKit::ThreadedCompositor::scrollTo):
243         (WebKit::ThreadedCompositor::scrollBy):
244         (WebKit::ThreadedCompositor::glContext):
245         (WebKit::ThreadedCompositor::didChangeVisibleRect):
246         (WebKit::ThreadedCompositor::renderLayerTree):
247         (WebKit::ThreadedCompositor::updateSceneState):
248         (WebKit::ThreadedCompositor::callOnCompositingThread): Deleted.
249         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
250
251 2016-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>
252
253         [GTK] Browser plugins crash under Wayland
254         https://bugs.webkit.org/show_bug.cgi?id=157605
255
256         Reviewed by Michael Catanzaro.
257
258         Fail the initialization of windowed plugins if we don't have a platform implementation.
259
260         * WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp:
261         (WebKit::NetscapePlugin::platformPostInitialize):
262
263 2016-06-09  Antoine Quint  <graouts@apple.com>
264
265         [iOS] -webkit-overflow-scrolling: touch; ignores pointer-events: none;
266         https://bugs.webkit.org/show_bug.cgi?id=119839
267         <rdar://problem/9671514>
268
269         Reviewed by Simon Fraser.
270
271         Propagate a "userInteractionEnabled" flag from the Web process which is used to turn off
272         user interaction on a UIScrollView created for -webkit-overflow-scrolling: touch.
273
274         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
275         (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
276         * Shared/mac/RemoteLayerTreeTransaction.h:
277         * Shared/mac/RemoteLayerTreeTransaction.mm:
278         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
279         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
280         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
281         (WebKit::dumpChangedLayers):
282         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
283         (WebKit::PlatformCALayerRemote::userInteractionEnabled):
284         (WebKit::PlatformCALayerRemote::setUserInteractionEnabled):
285         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
286
287 2016-06-09  Anders Carlsson  <andersca@apple.com>
288
289         Remove OriginAndDatabases.cpp, it's unused
290         https://bugs.webkit.org/show_bug.cgi?id=158595
291
292         Reviewed by Sam Weinig.
293
294         * CMakeLists.txt:
295         * Shared/OriginAndDatabases.cpp: Removed.
296         (WebKit::OriginAndDatabases::encode): Deleted.
297         (WebKit::OriginAndDatabases::decode): Deleted.
298         * Shared/OriginAndDatabases.h: Removed.
299         * WebKit2.xcodeproj/project.pbxproj:
300
301 2016-06-09  Alex Christensen  <achristensen@webkit.org>
302
303         Clean up EditorClient lifetime
304         https://bugs.webkit.org/show_bug.cgi?id=158588
305
306         Reviewed by Anders Carlsson.
307
308         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
309         (WebKit::generateTextCheckingRequestID):
310         (WebKit::WebEditorClient::shouldDeleteRange):
311         (WebKit::WebEditorClient::pageDestroyed): Deleted.
312         * WebProcess/WebCoreSupport/WebEditorClient.h:
313         (WebKit::WebEditorClient::WebEditorClient):
314         * WebProcess/WebPage/WebPage.cpp:
315         (WebKit::m_shouldDispatchFakeMouseMoveEvents):
316
317 2016-06-09  Andy Estes  <aestes@apple.com>
318
319         WKWebView does not render PDF pages in AirPrint
320         https://bugs.webkit.org/show_bug.cgi?id=151386
321         rdar://problem/22499157
322
323         Reviewed by Tim Horton.
324
325         _WKWebViewPrintFormatter originally attempted to handle PDFs, but the code path was never
326         properly tested since Safari prints PDFs by setting a printingItem on the
327         UIPrintInteractionController instead of going through a print formatter. The existing code
328         almost worked, if it weren't for CGContextScaleCTM() scaling each page into oblivion due to
329         _totalScaleFactor equaling 0.
330
331         This patch properly implements -[_WKWebViewPrintFormatter drawInRect:forPageAtIndex:] to
332         handle drawing both PDFs generated by WebKit and PDFs loaded in the main frame. It also
333         takes the opportunity to clean up a number of issues in the existing code:
334
335         - Handling of -[_WKWebViewPrintFormatter startPage] is now correct. I had previously assumed
336           this property represented the first page of output to print, but it actually represents
337           the first page in the overall print job that the print formatter renders. In other words,
338           regardless of -startPage, the print formatter should always print all its pages.
339         - Code specific to webpage and PDF printing was factored out into WKContentView and
340           WKPDFView, respectively. Each conforms to @protocol(_WKWebViewPrintProvider), and
341           _WKWebViewPrintFormatter accesses the provider via -[WKWebView _printProvider].
342         - Instead of piping the printed PDF data from WebPageProxy to WKWebView via PageClient, use
343           the GenericCallback mechanism to have WebPageProxy call a lambda specified by
344           WKContentView when the printed PDF is available.
345         - Removed _totalScaleFactor and used CGPDFPageGetDrawingTransform() to transform both
346           webpages and PDFs. For webpages, _totalScaleFactor will always equal the ratio of the
347           paper width to the PDF page width, so CGPDFPageGetDrawingTransform() will apply the same
348           scaling as CGContextScaleCTM(_totalScaleFactor, _totalScaleFactor) would.
349
350         * UIProcess/API/Cocoa/WKWebView.mm:
351         (-[WKWebView _printProvider]): Added. Returns _currentContentView if it conforms to
352         @protocol(_WKWebViewPrintProvider).
353         (-[WKWebView _computePageCountAndStartDrawingToPDFForFrame:printInfo:firstPage:computedTotalScaleFactor:]):
354         Moved code to _wk_pageCountForPrintFormatter in WKContentView and WKPDFView.
355         (-[WKWebView _endPrinting]): Deleted.
356         (-[WKWebView _printedDocument]): Deleted.
357         (-[WKWebView _setPrintedDocument:]): Deleted.
358         * UIProcess/API/Cocoa/WKWebViewInternal.h: Declared the _printProvider property.
359         * UIProcess/PageClient.h: Removed didFinishDrawingPagesToPDF().
360         * UIProcess/WebPageProxy.h: Declared computePagesForPrintingAndDrawToPDF() and
361         drawToPDFCallback().
362         * UIProcess/WebPageProxy.messages.in: Renamed DidFinishDrawingPagesToPDF to
363         DrawToPDFCallback.
364         * UIProcess/_WKWebViewPrintFormatter.mm: Backed the frameToPrint property with a RetainPtr
365         ivar so that it doesn't need to be released manually in -dealloc; removed _totalScaleFactor
366         and _printInfo ivars and added a _printedDocument ivar; removed the property declaration for
367         webView.
368         (-[_WKWebViewPrintFormatter frameToPrint]): Added a custom getter for the frameToPrint
369         property.
370         (-[_WKWebViewPrintFormatter setFrameToPrint:]): Added a custom setter for the frameToPrint
371         property.
372         (-[_WKWebViewPrintFormatter _webView]): Renamed from webView; added an underscore since this
373         is a private method.
374         (-[_WKWebViewPrintFormatter _recalcPageCount]): Retrieved the page count from the print
375         provider and clamped its value to NSIntegerMax.
376         (-[_WKWebViewPrintFormatter drawInRect:forPageAtIndex:]): Retrieved the printed document
377         from the print provider if needed; modified the CTM transformations to work for both
378         webpages and PDFs.
379         (-[_WKWebViewPrintFormatter dealloc]): Deleted.
380         (-[_WKWebViewPrintFormatter webView]): Renamed to _webView.
381         (-[_WKWebViewPrintFormatter rectForPageAtIndex:]): Deleted.
382         * UIProcess/_WKWebViewPrintFormatterInternal.h: Added. Moved a UIPrintFormatter internal
383         method declaration to here and defined the _WKWebViewPrintProvider protocol.
384         * UIProcess/ios/PageClientImplIOS.h: Removed didFinishDrawingPagesToPDF().
385         * UIProcess/ios/PageClientImplIOS.mm: Ditto.
386         (WebKit::PageClientImpl::didFinishDrawingPagesToPDF): Deleted.
387         * UIProcess/ios/WKContentView.mm: Conformed to @protocol(_WKWebViewPrintProvider).
388         (-[WKContentView _wk_pageCountForPrintFormatter:]): Moved the code to compute page count
389         from WKWebView to here.
390         (-[WKContentView _wk_printedDocument]): Moved the code to get the printed document from
391         WKWebView to here.
392         * UIProcess/ios/WKPDFView.mm:
393         (-[WKPDFView _wk_pageCountForPrintFormatter:]): Moved the code to compute the page count
394         from WKWebView to here; added a call to CGPDFDocumentAllowsPrinting(), returning 0 if
395         printing is not allowed.
396         (-[WKPDFView _wk_printedDocument]): Moved the code to get the printed document from
397         WKWebView to here.
398         * UIProcess/ios/WebPageProxyIOS.mm:
399         (WebKit::WebPageProxy::computePagesForPrintingAndDrawToPDF): Registered the callback with
400         m_callbacks and sent Messages::WebPage::ComputePagesForPrintingAndDrawToPDF; returned the
401         synchronously-returned page count.
402         (WebKit::WebPageProxy::drawToPDFCallback): Added to perform the callback when drawing to PDF
403         is complete.
404         (WebKit::WebPageProxy::didFinishDrawingPagesToPDF): Deleted.
405         * WebKit2.xcodeproj/project.pbxproj: Added _WKWebViewPrintFormatterInternal.h.
406         * WebProcess/WebPage/WebPage.h: Renamed computePagesForPrintingAndStartDrawingToPDF() to
407         computePagesForPrintingAndDrawToPDF().
408         * WebProcess/WebPage/WebPage.messages.in: Renamed
409         ComputePagesForPrintingAndStartDrawingToPDF to ComputePagesForPrintingAndDrawToPDF. Removed
410         the startPage parameter and added a callbackID.
411         * WebProcess/WebPage/ios/WebPageIOS.mm:
412         (WebKit::WebPage::computePagesForPrintingAndDrawToPDF): Renamed from
413         computePagesForPrintingAndStartDrawingToPDF(). Added a call to endPrinting() after sending
414         Messages::WebPageProxy::DrawToPDFCallback.
415         (WebKit::WebPage::computePagesForPrintingAndStartDrawingToPDF): Renamed to
416         computePagesForPrintingAndDrawToPDF.
417
418 2016-06-09  Alex Christensen  <achristensen@webkit.org>
419
420         Clean up WebSocket code
421         https://bugs.webkit.org/show_bug.cgi?id=158551
422
423         Reviewed by Darin Adler.
424
425         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
426         (WebKit::BlobRegistryProxy::registerFileBlobURL):
427         * WebProcess/FileAPI/BlobRegistryProxy.h:
428
429 2016-06-09  David Kilzer  <ddkilzer@apple.com>
430
431         Update properties for UIWKTextInteractionAssistant
432         <https://webkit.org/b/158559>
433
434         Reviewed by Darin Adler.
435
436         * Platform/spi/ios/UIKitSPI.h:
437         (UIWKTextInteractionAssistant.loupeGesture):
438         (UIWKTextInteractionAssistant.singleTapGesture):
439         Change from retain to assign since UIWKTextInteractionAssistant
440         is not responsible for their lifetime.  Sort alphabetically.
441
442 2016-06-09  Michael Saboff  <msaboff@apple.com>
443
444         WebKitTestRunner and DumpRenderTree do not handle dangling surrogate characters
445         https://bugs.webkit.org/show_bug.cgi?id=154863
446
447         Reviewed by Alexey Proskuryakov.
448
449         Added a non-strict verions of WKStringGetUTF8CString() that will handle dangling
450         surrogates called WKStringGetUTF8CStringNonStrict().
451
452         * Shared/API/c/WKString.cpp:
453         (WKStringGetUTF8CStringImpl):
454         (WKStringGetUTF8CString):
455         (WKStringGetUTF8CStringNonStrict):
456         * Shared/API/c/WKString.h:
457
458 2016-06-09  Carlos Garcia Campos  <cgarcia@igalia.com>
459
460         [Threaded Compositor] Many layout tests crash when threaded compositor is enabled
461         https://bugs.webkit.org/show_bug.cgi?id=158560
462
463         Reviewed by Žan Doberšek.
464
465         This is because CoordinatedGraphicsLayer::notifyFlushRequired() assumes it has a valid compositor when it's
466         called. But the compositor is only present when GraphicsLayer::create() is called with a
467         GraphicsLayerFactory. When running the layout tests, layers are created without a factory because DrawingAreaImpl
468         is not entering AC mode as expected and the layer tree host is not created, making
469         DrawingAreaImpl::graphicsLayerFactory() always return nullptr. This happens because DrawingAreaImpl is checking
470         acceleratedDrawingEnabled setting to decide whether to always use compositing mode or not, and WTR sets that
471         setting to false (changing its default value). The thing is that acceleratedDrawingEnabled setting doesn't have
472         any effect in non-Mac ports, what we really want to check there is whether acceleratedCompositingEnabled is true
473         or false.
474
475         * WebProcess/WebPage/DrawingAreaImpl.cpp:
476         (WebKit::DrawingAreaImpl::updatePreferences):
477
478 2016-06-09  Carlos Garcia Campos  <cgarcia@igalia.com>
479
480         [Threaded Compositor] Remove ThreadedCompositor::setNeedsDisplay()
481         https://bugs.webkit.org/show_bug.cgi?id=158523
482
483         Reviewed by Michael Catanzaro.
484
485         ThreadedCompositor::setNeedsDisplay() is always called from the main thread and schedules a task to the
486         compositing thread to schedule an immediate update. But RunLoop::Timer is thread-safe so we don't really need to
487         schedule a task to the update the timer in the compositing thread, we can do that directly in the main
488         thread. And that's exactly what scheduleDisplayImmediately() does, so we can use it instead of setNeedsDisplay().
489
490         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
491         (WebKit::ThreadedCompositor::setNeedsDisplay(): Deleted.
492         (WebKit::ThreadedCompositor::updateSceneState):
493         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
494
495 2016-06-08  Antti Koivisto  <antti@apple.com>
496
497         Increase disk cache capacity when there is lots of free space
498         https://bugs.webkit.org/show_bug.cgi?id=158526
499
500         Reviewed by Chris Dumez.
501
502         Our maximum disk cache capacity has been 175MB for a very long time. Meanwhile the average resource size has grown
503         massively. 175MB is now enough for cacheable resources of a few dozen sites at most. Using bigger caches when there is
504         room for it can reduce network traffic, reduce disk writes, save battery and speed up page loading.
505
506         This patch changes cache size for PrimaryWebBrowser cache model
507
508         >=16GB free: 175MB -> 500MB
509         8-16GB free: 150MB -> 250MB
510
511         and modestly for DocumentBrowser
512
513         >=16GB free: 50MB -> 75MB
514
515         Note that if system (on Cocoa platforms) really needs disk space it will wipe out caches so this doesn't reduce
516         available disk space in scenarios like software installation.
517
518         * Shared/CacheModel.cpp:
519         (WebKit::calculateCacheSizes):
520
521 2016-06-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
522
523         Introduce ResourceErrorBase::type
524         https://bugs.webkit.org/show_bug.cgi?id=158299
525
526         Reviewed by Alex Christensen.
527
528         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
529         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
530         (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
531
532 2016-06-08  Beth Dakin  <bdakin@apple.com>
533
534         _web_didAddMediaControlsManager should take a controlsManager as a parameter 
535         https://bugs.webkit.org/show_bug.cgi?id=158545
536
537         Reviewed by Tim Horton.
538
539         * UIProcess/Cocoa/WebViewImpl.h:
540
541 2016-06-06  Antti Koivisto  <antti@apple.com>
542
543         WebKit memory cache doesn't respect Vary header
544         https://bugs.webkit.org/show_bug.cgi?id=71509
545         <rdar://problem/26651033>
546
547         Reviewed by Sam Weinig.
548
549         * NetworkProcess/cache/NetworkCache.cpp:
550         (WebKit::NetworkCache::makeCacheKey):
551         (WebKit::NetworkCache::cachePolicyAllowsExpired):
552         (WebKit::NetworkCache::makeUseDecision):
553         (WebKit::NetworkCache::Cache::retrieve):
554         (WebKit::NetworkCache::Cache::store):
555         (WebKit::NetworkCache::Cache::storeRedirect):
556         (WebKit::NetworkCache::Cache::update):
557         (WebKit::NetworkCache::headerValueForVary): Deleted.
558         (WebKit::NetworkCache::collectVaryingRequestHeaders): Deleted.
559         (WebKit::NetworkCache::verifyVaryingRequestHeaders): Deleted.
560
561             These move to WebCore.
562
563 2016-06-08  Carlos Garcia Campos  <cgarcia@igalia.com>
564
565         Unreviewed. Fix GTK+ build with threaded compositor enabled after r201802.
566
567         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
568         (WebKit::ThreadedCoordinatedLayerTreeHost::create):
569
570 2016-06-08  Carlos Garcia Campos  <cgarcia@igalia.com>
571
572         LayerTreeHost should be created with a WebPage reference instead of a pointer
573         https://bugs.webkit.org/show_bug.cgi?id=158520
574
575         Reviewed by Žan Doberšek.
576
577         We are indeed creating the LayerTreeHost always from a WebPage reference but getting its address to pass it to
578         the LayerTreeHost create() function.
579
580         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
581         (WebKit::CoordinatedDrawingArea::enterAcceleratedCompositingMode):
582         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
583         (WebKit::CoordinatedLayerTreeHost::create):
584         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
585         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
586         (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
587         (WebKit::CoordinatedLayerTreeHost::commitSceneState):
588         (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
589         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
590         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
591         (WebKit::ThreadedCoordinatedLayerTreeHost::create):
592         (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost):
593         (WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
594         (WebKit::ThreadedCoordinatedLayerTreeHost::compositorDidFlushLayers):
595         (WebKit::ThreadedCoordinatedLayerTreeHost::didScaleFactorChanged):
596         (WebKit::ThreadedCoordinatedLayerTreeHost::setVisibleContentsRect):
597         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
598         * WebProcess/WebPage/DrawingAreaImpl.cpp:
599         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
600         * WebProcess/WebPage/LayerTreeHost.cpp:
601         (WebKit::LayerTreeHost::create):
602         (WebKit::LayerTreeHost::LayerTreeHost):
603         * WebProcess/WebPage/LayerTreeHost.h:
604         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
605         (WebKit::LayerTreeHostGtk::create):
606         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
607         (WebKit::LayerTreeHostGtk::makeContextCurrent):
608         (WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged):
609         (WebKit::LayerTreeHostGtk::paintContents):
610         (WebKit::LayerTreeHostGtk::deviceScaleFactor):
611         (WebKit::LayerTreeHostGtk::pageScaleFactor):
612         (WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
613         (WebKit::LayerTreeHostGtk::flushAndRenderLayers):
614         (WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged):
615         (WebKit::LayerTreeHostGtk::initialize): Deleted.
616         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
617
618 2016-06-07  Sam Weinig  <sam@webkit.org>
619
620         Fix 10.10 build.
621
622         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
623         (WebKit::addAnimationToLayer):
624
625 2016-06-06  Alex Christensen  <achristensen@webkit.org>
626
627         Modernize loading code
628         https://bugs.webkit.org/show_bug.cgi?id=158332
629
630         Reviewed by Darin Adler.
631
632         * NetworkProcess/Downloads/PendingDownload.h:
633         * NetworkProcess/NetworkDataTask.h:
634         (WebKit::NetworkDataTask::client):
635         * NetworkProcess/NetworkLoad.cpp:
636         (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
637         (WebKit::NetworkLoad::didReceiveData):
638         (WebKit::NetworkLoad::didReceiveBuffer):
639         * NetworkProcess/NetworkLoad.h:
640         * NetworkProcess/NetworkLoadClient.h:
641         * NetworkProcess/NetworkResourceLoader.cpp:
642         (WebKit::NetworkResourceLoader::didReceiveBuffer):
643         (WebKit::NetworkResourceLoader::didFinishLoading):
644         * NetworkProcess/NetworkResourceLoader.h:
645         * NetworkProcess/PingLoad.h:
646         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
647         (WebKit::NetworkCache::SpeculativeLoad::didReceiveBuffer):
648         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
649         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
650         (WebKit::NetworkDataTask::didReceiveResponse):
651         (WebKit::NetworkDataTask::didReceiveData):
652         * Shared/WebHitTestResultData.cpp:
653         * WebProcess/Network/WebResourceLoader.cpp:
654         (WebKit::WebResourceLoader::didReceiveResource):
655
656 2016-06-05  Sam Weinig  <sam@webkit.org>
657
658         Add experimental support for spring based CSS animations
659         https://bugs.webkit.org/show_bug.cgi?id=158403
660
661         Reviewed by Dean Jackson.
662
663         * Shared/WebCoreArgumentCoders.cpp:
664         (IPC::ArgumentCoder<StepsTimingFunction>::decode):
665         (IPC::ArgumentCoder<SpringTimingFunction>::encode):
666         (IPC::ArgumentCoder<SpringTimingFunction>::decode):
667         (IPC::ArgumentCoder<FloatPoint>::encode):
668         * Shared/WebCoreArgumentCoders.h:
669         * Shared/WebPreferencesDefinitions.h:
670         * WebProcess/WebPage/WebPage.cpp:
671         (WebKit::WebPage::updatePreferences):
672         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
673         (WebKit::PlatformCAAnimationRemote::Properties::encode):
674         (WebKit::PlatformCAAnimationRemote::Properties::decode):
675         (WebKit::addAnimationToLayer):
676         Pipe through support for the Spring animation.
677
678 2016-06-07  Michael Catanzaro  <mcatanzaro@igalia.com>
679
680         [GTK] Hide GTK+ 2 plugins if GTK+ 2 plugin process was built but is not installed
681         https://bugs.webkit.org/show_bug.cgi?id=158419
682
683         Reviewed by Carlos Garcia Campos.
684
685         Patch by Alberto Garcia <berto@igalia.com>
686
687         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
688         (WebKit::PluginInfoStore::getPluginInfo):
689         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
690         (WebKit::PluginProcessProxy::scanPlugin):
691
692 2016-06-06  Antoine Quint  <graouts@apple.com>
693
694         Position of WebGL <canvas> on iOS is incorrect with CSS borders
695         https://bugs.webkit.org/show_bug.cgi?id=156790
696
697         Reviewed by Simon Fraser.
698
699         WebGL layers on iOS are hosted by a WKRemoteView, which applies a transform scaling
700         its content by the inverse of the device pixel ratio, which affects how positions are
701         applied to the WebGL layer. The container layer of the layer hosted by a WKRemoteView
702         then has an inverse transform applied to it in the PlatformCALayerRemoteCustom
703         constructor. However, the position of a CALayer is not affected by its transform.
704
705         The fix for <rdar://problem/18316542> should be specific to video, so we only apply the
706         scaling in the case of a LayerTypeAVPlayerLayer.
707
708         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
709         (-[WKRemoteView initWithFrame:contextID:]):
710         (WebKit::RemoteLayerTreeHost::createLayer):
711         (-[WKRemoteView initWithFrame:contextID:hostingDeviceScaleFactor:]): Deleted.
712         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
713         (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
714
715 2016-06-06  Brady Eidson  <beidson@apple.com>
716
717         Fix build after r201717
718
719         Unreviewed.
720
721         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
722         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
723
724         * NetworkProcess/NetworkProcess.cpp:
725         (WebKit::NetworkProcess::grantSandboxExtensionsToDatabaseProcessForBlobs):
726         * NetworkProcess/NetworkProcess.h:
727         
728 2016-06-06  Brady Eidson  <beidson@apple.com>
729
730         Modern IDB: Crash seen in IDBConnectionProxy::putOrAdd on GuardMalloc bot
731         https://bugs.webkit.org/show_bug.cgi?id=158124
732
733         Reviewed by Darin Adler.
734         
735         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
736         (WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
737         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
738         
739         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
740         (WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
741         * WebProcess/FileAPI/BlobRegistryProxy.h:
742         
743         * WebProcess/Network/NetworkProcessConnection.cpp:
744         (WebKit::NetworkProcessConnection::didClose):
745         (WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):
746         * WebProcess/Network/NetworkProcessConnection.h:
747
748 2016-06-06  Commit Queue  <commit-queue@webkit.org>
749
750         Unreviewed, rolling out r201706.
751         https://bugs.webkit.org/show_bug.cgi?id=158427
752
753         This change broke the Yosemite build and its LayoutTest is
754         failing on Mac and iOS testers (Requested by ryanhaddad on
755         #webkit).
756
757         Reverted changeset:
758
759         "Add experimental support for spring based CSS animations"
760         https://bugs.webkit.org/show_bug.cgi?id=158403
761         http://trac.webkit.org/changeset/201706
762
763 2016-06-06  Alex Christensen  <achristensen@webkit.org>
764
765         Reduce ResourceRequest copying in loading code
766         https://bugs.webkit.org/show_bug.cgi?id=158251
767
768         Reviewed by Darin Adler.
769
770         * NetworkProcess/Downloads/DownloadManager.cpp:
771         (WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
772         (WebKit::DownloadManager::continueWillSendRequest):
773         (WebKit::DownloadManager::willDecidePendingDownloadDestination):
774         * NetworkProcess/Downloads/DownloadManager.h:
775         * NetworkProcess/Downloads/PendingDownload.cpp:
776         (WebKit::PendingDownload::PendingDownload):
777         (WebKit::PendingDownload::willSendRedirectedRequest):
778         (WebKit::PendingDownload::continueWillSendRequest):
779         (WebKit::PendingDownload::canAuthenticateAgainstProtectionSpaceAsync):
780         * NetworkProcess/Downloads/PendingDownload.h:
781         * NetworkProcess/NetworkDataTask.h:
782         (WebKit::NetworkDataTask::firstRequest):
783         * NetworkProcess/NetworkLoad.cpp:
784         (WebKit::NetworkLoad::cancel):
785         (WebKit::NetworkLoad::continueWillSendRequest):
786         (WebKit::NetworkLoad::sharedDidReceiveResponse):
787         (WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
788         (WebKit::NetworkLoad::setPendingDownload):
789         (WebKit::NetworkLoad::willPerformHTTPRedirection):
790         (WebKit::NetworkLoad::didReceiveChallenge):
791         (WebKit::NetworkLoad::didFail):
792         (WebKit::NetworkLoad::willSendRequestAsync):
793         * NetworkProcess/NetworkLoad.h:
794         (WebKit::NetworkLoad::currentRequest):
795         (WebKit::NetworkLoad::clearCurrentRequest):
796         (WebKit::NetworkLoad::pendingDownloadID):
797         * NetworkProcess/NetworkLoadClient.h:
798         * NetworkProcess/NetworkProcess.cpp:
799         (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
800         (WebKit::NetworkProcess::continueWillSendRequest):
801         (WebKit::NetworkProcess::pendingDownloadCanceled):
802         * NetworkProcess/NetworkProcess.h:
803         * NetworkProcess/NetworkResourceLoader.cpp:
804         (WebKit::NetworkResourceLoader::didFailLoading):
805         (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
806         (WebKit::NetworkResourceLoader::continueWillSendRequest):
807         (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
808         * NetworkProcess/NetworkResourceLoader.h:
809         * NetworkProcess/PingLoad.h:
810         (WebKit::PingLoad::PingLoad):
811         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
812         (WebKit::NetworkCache::SpeculativeLoad::~SpeculativeLoad):
813         (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
814         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
815         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
816         (WebKit::NetworkDataTask::didBecomeDownload):
817         (WebKit::NetworkDataTask::willPerformHTTPRedirection):
818         * WebProcess/Network/WebResourceLoader.cpp:
819         (WebKit::WebResourceLoader::detachFromCoreLoader):
820         (WebKit::WebResourceLoader::willSendRequest):
821         * WebProcess/Network/WebResourceLoader.h:
822
823 2016-06-05  Sam Weinig  <sam@webkit.org>
824
825         Add experimental support for spring based CSS animations
826         https://bugs.webkit.org/show_bug.cgi?id=158403
827
828         Reviewed by Dean Jackson.
829
830         * Shared/WebCoreArgumentCoders.cpp:
831         (IPC::ArgumentCoder<StepsTimingFunction>::decode):
832         (IPC::ArgumentCoder<SpringTimingFunction>::encode):
833         (IPC::ArgumentCoder<SpringTimingFunction>::decode):
834         (IPC::ArgumentCoder<FloatPoint>::encode):
835         * Shared/WebCoreArgumentCoders.h:
836         * Shared/WebPreferencesDefinitions.h:
837         * WebProcess/WebPage/WebPage.cpp:
838         (WebKit::WebPage::updatePreferences):
839         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
840         (WebKit::PlatformCAAnimationRemote::Properties::encode):
841         (WebKit::PlatformCAAnimationRemote::Properties::decode):
842         (WebKit::addAnimationToLayer):
843         Pipe through support for the Spring animation.
844
845 2016-06-05  Yusuke Suzuki  <utatane.tea@gmail.com>
846
847         Change ProxyObject.[[Get]] not to use custom accessor
848         https://bugs.webkit.org/show_bug.cgi?id=157080
849
850         Reviewed by Darin Adler.
851
852         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
853         (WebKit::JSNPObject::propertyGetter):
854         (WebKit::JSNPObject::methodGetter):
855         * WebProcess/Plugins/Netscape/JSNPObject.h:
856
857 2016-06-05  Brady Eidson  <beidson@apple.com>
858
859         Unreviewed, rolling out r201694.
860
861         201693
862
863         Reverted changeset:
864
865         "Fix the build after r201693."
866         https://bugs.webkit.org/show_bug.cgi?id=158394
867         http://trac.webkit.org/changeset/201694
868
869 2016-06-05  Brady Eidson  <beidson@apple.com>
870
871         Fix the build after r201693.
872         https://bugs.webkit.org/show_bug.cgi?id=158394
873
874         Reviewed by NOBODY (Build fix).
875
876         r201693 landed without the Source/WebKit2 changes, and I didn't have EWS/CQ available to check myself. *sigh*
877         
878         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
879         (WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
880         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
881         
882         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
883         (WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
884         * WebProcess/FileAPI/BlobRegistryProxy.h:
885         
886         * WebProcess/Network/NetworkProcessConnection.cpp:
887         (WebKit::NetworkProcessConnection::didClose):
888         (WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):
889         * WebProcess/Network/NetworkProcessConnection.h:
890
891 2016-06-03  Commit Queue  <commit-queue@webkit.org>
892
893         Unreviewed, rolling out r201663.
894         https://bugs.webkit.org/show_bug.cgi?id=158374
895
896         Broke the Windows build (Requested by andersca on #webkit).
897
898         Reverted changeset:
899
900         "Rename NoncopyableFunction to Function"
901         https://bugs.webkit.org/show_bug.cgi?id=158354
902         http://trac.webkit.org/changeset/201663
903
904 2016-06-03  Anders Carlsson  <andersca@apple.com>
905
906         Rename NoncopyableFunction to Function
907         https://bugs.webkit.org/show_bug.cgi?id=158354
908
909         Reviewed by Chris Dumez.
910
911         * NetworkProcess/NetworkProcess.cpp:
912         (WebKit::fetchDiskCacheEntries):
913         (WebKit::NetworkProcess::fetchWebsiteData):
914         (WebKit::clearDiskCacheEntries):
915         * NetworkProcess/NetworkProcess.h:
916         * NetworkProcess/cache/NetworkCache.cpp:
917         (WebKit::NetworkCache::Cache::traverse):
918         * NetworkProcess/cache/NetworkCache.h:
919         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
920         (WebKit::NetworkCache::runTaskInQueue):
921         * NetworkProcess/cache/NetworkCacheStorage.h:
922
923 2016-06-03  Chris Dumez  <cdumez@apple.com>
924
925         Unreviewed, roll out r196633 as it broke PageCache on iOS for WebKit.org
926         <rdar://problem/26521101>
927
928         * WebProcess/WebPage/VisitedLinkTableController.cpp:
929         (WebKit::VisitedLinkTableController::setVisitedLinkTable):
930         (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
931         (WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
932         (WebKit::VisitedLinkTableController::removeAllVisitedLinks):
933
934 2016-06-03  Csaba Osztrogonác  <ossy@webkit.org>
935
936         Fix the !ENABLE(INDEXED_DATABASE) build after r201575
937         https://bugs.webkit.org/show_bug.cgi?id=158346
938
939         Reviewed by Brady Eidson.
940
941         * DatabaseProcess/DatabaseProcess.cpp:
942         (WebKit::DatabaseProcess::fetchWebsiteData):
943         (WebKit::DatabaseProcess::deleteWebsiteData):
944         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
945
946 2016-06-02  Chris Dumez  <cdumez@apple.com>
947
948         Crash under WebProcess::registerWithStateDumper()
949         https://bugs.webkit.org/show_bug.cgi?id=158304
950         <rdar://problem/25329276>
951
952         Reviewed by Anders Carlsson.
953
954         The issue is that the block in registerWithStateDumper() was executed in
955         a background thread and is iterating over m_pageMap HashMap. The crash
956         occurs when a page gets removed from the m_pageMap HashMap while the
957         block is iterating over this same HashMap in another thread.
958
959         The solution proposed is to execute the registerWithStateDumper()'s
960         block in the main thread.
961
962         * WebProcess/cocoa/WebProcessCocoa.mm:
963         (WebKit::WebProcess::registerWithStateDumper):
964
965 2016-06-02  Brady Eidson  <beidson@apple.com>
966
967         Overhaul cross-thread use of ResourceRequest, ResourceResponse, and ResourceError.
968         https://bugs.webkit.org/show_bug.cgi?id=158293
969
970         Reviewed by Darin Adler.
971
972         * NetworkProcess/cache/NetworkCacheEntry.cpp:
973         (WebKit::NetworkCache::Entry::Entry):
974
975 2016-06-02  Chris Dumez  <cdumez@apple.com>
976
977         Modernize various lambda captures
978         https://bugs.webkit.org/show_bug.cgi?id=158292
979
980         Reviewed by Brady Eidson.
981
982         Modernize various lambda captures, especially the ones unnecessarily
983         allocating objects on the heap and destroying them in the lambda.
984
985         * NetworkProcess/NetworkProcess.cpp:
986         (WebKit::fetchDiskCacheEntries):
987         (WebKit::clearDiskCacheEntries):
988         (WebKit::NetworkProcess::fetchWebsiteData): Deleted.
989         * NetworkProcess/cache/NetworkCache.cpp:
990         (WebKit::NetworkCache::Cache::traverse):
991         * NetworkProcess/cache/NetworkCache.h:
992         * NetworkProcess/cache/NetworkCacheStorage.cpp:
993         (WebKit::NetworkCache::Storage::TraverseOperation::TraverseOperation):
994         * NetworkProcess/cache/NetworkCacheStorage.h:
995
996 2016-06-02  Chris Dumez  <cdumez@apple.com>
997
998         Speculative revalidated request returns 200 instead of 304
999         https://bugs.webkit.org/show_bug.cgi?id=158256
1000
1001         Reviewed by Antti Koivisto and Carlos Garcia Campos.
1002
1003         Already conditional requests coming from WebCore should bypass the
1004         SpeculativeLoadManager. This is because the validation is requested
1005         by WebCore (usually the memory cache) and not our network cache. As
1006         a result, we need to pipe the revalidation response (e.g. 304 status
1007         code) back to WebCore instead of resolving it as disk cache level.
1008
1009         This should fix the /webkit2/WebKitWebResource/response unit test.
1010
1011         * NetworkProcess/cache/NetworkCache.cpp:
1012         (WebKit::NetworkCache::Cache::retrieve):
1013         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
1014         (WebKit::NetworkCache::requestsHeadersMatch):
1015
1016 2016-06-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1017
1018         Use more references in ResourceLoader related code
1019         https://bugs.webkit.org/show_bug.cgi?id=158222
1020
1021         Reviewed by Darin Adler.
1022
1023         * WebProcess/Network/WebLoaderStrategy.cpp:
1024         (WebKit::WebLoaderStrategy::loadResource):
1025         (WebKit::WebLoaderStrategy::schedulePluginStreamLoad):
1026         (WebKit::WebLoaderStrategy::scheduleLoad):
1027         (WebKit::WebLoaderStrategy::scheduleInternallyFailedLoad):
1028         (WebKit::WebLoaderStrategy::startLocalLoad):
1029         (WebKit::WebLoaderStrategy::networkProcessCrashed):
1030         * WebProcess/Network/WebLoaderStrategy.h:
1031         * WebProcess/Network/WebResourceLoader.cpp:
1032         (WebKit::WebResourceLoader::create):
1033         (WebKit::WebResourceLoader::WebResourceLoader):
1034         * WebProcess/Network/WebResourceLoader.h:
1035         * WebProcess/Plugins/PluginView.cpp:
1036         (WebKit::PluginView::Stream::start):
1037
1038 2016-06-01  Yongjun Zhang  <yongjun_zhang@apple.com>
1039
1040         Notify client immediately if network session doesn't exist for a synchronous XHR load.
1041         https://bugs.webkit.org/show_bug.cgi?id=158239
1042         <rdar://problem/26344251>
1043
1044         Reviewed by Brady Eidson.
1045
1046         For a synchronous XHR load, if the network session doesn't exist, we should notify NetworkLoadClient.
1047         Otherwise the Web process could hang when waiting for the synchronous load to finish.
1048
1049         * NetworkProcess/NetworkLoad.cpp:
1050         (WebKit::NetworkLoad::NetworkLoad):
1051
1052 2016-05-31  Brian Burg  <bburg@apple.com>
1053   
1054         REGRESSION(r191907): Can't enter combining diacritic marks in Web Inspector fields
1055         https://bugs.webkit.org/show_bug.cgi?id=158227
1056         <rdar://problem/26232464>
1057
1058         Reviewed by Darin Adler and Alexey Proskuryakov.
1059
1060         Web Inspector uses a WKWebView subclass for the inspector frontend interface.
1061         Since r191907, WKWebView does not have an inner WKView, and instead shares
1062         a WebViewImpl to implement the same methods as WKView. So, WKView is no longer
1063         involved at all when delivering keystrokes to the Web Inspector interface.
1064
1065         This caused a subtle regression where some keystrokes were not being interpreted
1066         in the same way by AppKit because WKWebView does not conform to NSTextInputClient
1067         but WKView does. AppKit won't automatically create a NSTextInputContext for a NSView
1068         unless the subclass is declared as conforming to NSTextInputClient. Thus, the keystroke
1069         never goes through NSTextInputContext machinery which converts the keystroke into
1070         a combining diacritic character.
1071
1072         This regression is covered by a new API test.
1073
1074         * UIProcess/API/Cocoa/WKWebView.mm: mark WKWebView as conforming to NSTextInputClient.
1075
1076 2016-06-01  Dan Bernstein  <mitz@apple.com>
1077
1078         Try to fix ENABLE(IOS_TOUCH_EVENTS) builds.
1079
1080         * WebProcess/WebPage/EventDispatcher.cpp:
1081         (WebKit::EventDispatcher::touchEvent):
1082
1083 2016-05-31  Darin Adler  <darin@apple.com>
1084
1085         Audit RenderObject casts and fix problems and style issues found
1086         https://bugs.webkit.org/show_bug.cgi?id=158221
1087
1088         Reviewed by Chris Dumez.
1089
1090         * Shared/WebRenderObject.cpp:
1091         (WebKit::WebRenderObject::WebRenderObject): Tightened up the code that
1092         builds the tree of objects; fewer local variables.
1093
1094         * WebProcess/Plugins/PluginView.cpp:
1095         (WebKit::PluginView::invalidateRect): Cast to RenderEmbeddedObject since
1096         that is the class used for plug-ins.
1097         (WebKit::PluginView::pluginProcessCrashed): Ditto.
1098         * WebProcess/WebPage/WebPage.cpp:
1099         (WebKit::WebPage::createPlugin): Ditto.
1100         (WebKit::WebPage::plugInIsPrimarySize): Check the renderer for null here.
1101         Did not change this to RenderEmbeddedObject, though, because I wasn't
1102         absolute certain this is only called with that type of renderer.
1103
1104         * WebProcess/WebPage/ios/WebPageIOS.mm:
1105         (WebKit::WebPage::rangeForWebSelectionAtPosition): Tweaked.
1106
1107 2016-06-01  Brady Eidson  <beidson@apple.com>
1108
1109         Modernize lambda usage for all callers of RunLoop::dispatch() (take 2).
1110         https://bugs.webkit.org/show_bug.cgi?id=158277
1111
1112         Reviewed by Chris Dumez.
1113
1114         * NetworkProcess/cache/NetworkCache.cpp:
1115         (WebKit::NetworkCache::Cache::deleteDumpFile):
1116
1117         * Platform/IPC/Connection.cpp:
1118         (IPC::Connection::addWorkQueueMessageReceiver):
1119         (IPC::Connection::removeWorkQueueMessageReceiver):
1120         (IPC::Connection::invalidate):
1121         (IPC::Connection::sendMessage):
1122         (IPC::Connection::processIncomingMessage):
1123         (IPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
1124
1125         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1126         (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
1127
1128         * UIProcess/Storage/StorageManager.cpp:
1129         (WebKit::StorageManager::createSessionStorageNamespace):
1130         (WebKit::StorageManager::destroySessionStorageNamespace):
1131         (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnection):
1132         (WebKit::StorageManager::cloneSessionStorageNamespace):
1133         (WebKit::StorageManager::processDidCloseConnection):
1134
1135         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1136         (WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
1137
1138         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1139         (WebKit::WebsiteDataStore::fetchData):
1140         (WebKit::WebsiteDataStore::removeData):
1141
1142 2016-06-01  Chris Dumez  <cdumez@apple.com>
1143
1144         [iOS] Regression(r200972): Crash under WebKit::WebPage::selectTextWithGranularityAtPoint()
1145         https://bugs.webkit.org/show_bug.cgi?id=158284
1146         <rdar://problem/26573954>
1147
1148         Reviewed by Ryosuke Niwa.
1149
1150         range can be null but r200972 started dereferencing it without null
1151         check. This patch adds a null check for range and uses the pre-r200972
1152         code path if range is null.
1153
1154         * WebProcess/WebPage/ios/WebPageIOS.mm:
1155         (WebKit::WebPage::selectTextWithGranularityAtPoint):
1156
1157 2016-06-01  Brady Eidson  <beidson@apple.com>
1158
1159         Modernize lambda usage for all callers of RunLoop::dispatch().
1160         https://bugs.webkit.org/show_bug.cgi?id=158265
1161
1162         Reviewed by Chris Dumez.
1163
1164         * DatabaseProcess/DatabaseProcess.cpp:
1165         (WebKit::DatabaseProcess::fetchWebsiteData):
1166         (WebKit::DatabaseProcess::deleteWebsiteData):
1167         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
1168         
1169         * NetworkProcess/NetworkProcess.cpp:
1170         (WebKit::fetchDiskCacheEntries):
1171         (WebKit::NetworkProcess::fetchWebsiteData):
1172         
1173         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1174         (WebKit::NetworkCache::Storage::remove):
1175         (WebKit::NetworkCache::retrieveFromMemory):
1176         
1177         * Platform/IPC/Connection.cpp:
1178         (IPC::Connection::SyncMessageState::processIncomingMessage):
1179         (IPC::Connection::processIncomingMessage):
1180         (IPC::Connection::connectionDidClose):
1181         (IPC::Connection::enqueueIncomingMessage):
1182         * Platform/IPC/mac/ConnectionMac.mm:
1183         (IPC::Connection::receiveSourceEventHandler):
1184         
1185         * Shared/mac/CookieStorageShim.mm:
1186         (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
1187         * UIProcess/API/APIUserContentExtensionStore.cpp:
1188         (API::UserContentExtensionStore::lookupContentExtension):
1189         (API::UserContentExtensionStore::compileContentExtension):
1190         (API::UserContentExtensionStore::removeContentExtension):
1191         
1192         * UIProcess/Launcher/ProcessLauncher.cpp:
1193         (WebKit::ProcessLauncher::ProcessLauncher):
1194         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1195         (WebKit::connectToService):
1196         
1197         * UIProcess/Storage/StorageManager.cpp:
1198         (WebKit::StorageManager::getSessionStorageOrigins):
1199         (WebKit::StorageManager::deleteSessionStorageOrigins):
1200         (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
1201         (WebKit::StorageManager::getLocalStorageOrigins):
1202         (WebKit::StorageManager::getLocalStorageOriginDetails):
1203         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
1204         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
1205         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
1206         
1207         * UIProcess/WebPageProxy.cpp:
1208         (WebKit::WebPageProxy::isWebProcessResponsive):
1209         
1210         * UIProcess/WebProcessProxy.cpp:
1211         (WebKit::WebProcessProxy::isResponsive):
1212         
1213         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1214         (WebKit::WebsiteDataStore::fetchData):
1215         
1216         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1217         (WebKit::NetscapePlugin::pluginThreadAsyncCall):
1218         
1219         * WebProcess/Plugins/PluginView.cpp:
1220         (WebKit::PluginView::unprotectPluginFromDestruction):
1221         
1222         * WebProcess/WebPage/EventDispatcher.cpp:
1223         (WebKit::EventDispatcher::wheelEvent):
1224         (WebKit::EventDispatcher::gestureEvent):
1225         (WebKit::EventDispatcher::touchEvent):
1226         
1227         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
1228         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
1229
1230 2016-05-31  Yusuke Suzuki  <utatane.tea@gmail.com>
1231
1232         Unreviewed, roll out r201481, r201523: 0.3% regression in Octane code-load
1233         https://bugs.webkit.org/show_bug.cgi?id=158249
1234
1235         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1236         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1237
1238 2016-05-31  Beth Dakin  <bdakin@apple.com>
1239
1240         Add two optional items to WebViewImplDelegate
1241         https://bugs.webkit.org/show_bug.cgi?id=158242
1242         -and corresponding-
1243         rdar://problem/26473095
1244
1245         Reviewed by Tim Horton.
1246
1247         * UIProcess/Cocoa/WebViewImpl.h:
1248
1249 2016-05-31  Jer Noble  <jer.noble@apple.com>
1250
1251         REGRESSION (r201405): trailers.apple.com HUD is missing in fullscreen
1252         https://bugs.webkit.org/show_bug.cgi?id=158156
1253         <rdar://problem/26519589>
1254
1255         Reviewed by Darin Adler.
1256
1257         Only increase the frame of the webView (to account for top content inset) in one dimension.
1258
1259         * UIProcess/mac/WKFullScreenWindowController.mm:
1260         (-[WKFullScreenWindowController enterFullScreen:]):
1261
1262 2016-05-31  Chris Dumez  <cdumez@apple.com>
1263
1264         [iOS] Better deal with WebProcess suspension due to screen locking
1265         https://bugs.webkit.org/show_bug.cgi?id=158229
1266         <rdar://problem/17665473>
1267         <rdar://problem/26554699>
1268
1269         Reviewed by Tim Horton.
1270
1271         When locking the screen while MobileSafari is front-most, we would try keep
1272         trying to mark IOSurfaces as volatile until the 30 seconds timeout was
1273         reached. This patch deals more cleanly with this situation by only trying
1274         to mark IOSurfaces as volatile once if the suspension is due to screen
1275         locking. In such case, it is apparently expected that some IOSurfaces cannot
1276         be marked as volatile so it is enough to try once and let ourselves get
1277         suspended.
1278
1279         This patch also reduces the timeout from 30 seconds to ~3 seconds in the
1280         other suspension cases (e.g. homing out of MobileSafari). If we fail to mark
1281         them as purgeable for 3 seconds for a reason or another, it is no use in
1282         retrying, it is simply not going to happen and there is no reason to delay
1283         process suspension any further.
1284
1285         * WebProcess/WebPage/WebPage.cpp:
1286         (WebKit::WebPage::callVolatilityCompletionHandlers):
1287         (WebKit::WebPage::layerVolatilityTimerFired):
1288         (WebKit::WebPage::markLayersVolatileImmediatelyIfPossible):
1289         (WebKit::WebPage::markLayersVolatile):
1290         * WebProcess/WebPage/WebPage.h:
1291         (WebKit::WebPage::markLayersVolatile):
1292         * WebProcess/WebPage/ios/WebPageIOS.mm:
1293         (WebKit::WebPage::applicationDidEnterBackground):
1294         (WebKit::WebPage::applicationWillEnterForeground):
1295
1296 2016-05-31  Brady Eidson  <beidson@apple.com>
1297
1298         Make createCrossThreadTask() functions return on the stack instead of the heap.
1299         https://bugs.webkit.org/show_bug.cgi?id=158215
1300
1301         Reviewed by Darin Adler.
1302
1303         * DatabaseProcess/DatabaseProcess.cpp:
1304         (WebKit::DatabaseProcess::postDatabaseTask):
1305         (WebKit::DatabaseProcess::performNextDatabaseTask):
1306         (WebKit::DatabaseProcess::fetchWebsiteData):
1307         * DatabaseProcess/DatabaseProcess.h:
1308
1309 2016-05-31  Carlos Garcia Campos  <cgarcia@igalia.com>
1310
1311         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.13.1 release.
1312
1313         * gtk/NEWS: Add release notes for 2.13.1.
1314
1315 2016-05-31  Carlos Garcia Campos  <cgarcia@igalia.com>
1316
1317         Unreviewed. Fix GTK+ clean build after r201504.
1318
1319         * DatabaseProcess/DatabaseProcess.cpp: Add missing include.
1320
1321 2016-05-30  Brady Eidson  <beidson@apple.com>
1322
1323         Move CrossThreadCopier/CrossThreadTask to WTF.
1324         https://bugs.webkit.org/show_bug.cgi?id=158207
1325
1326         Reviewed by Alex Christensen.
1327
1328         * CMakeLists.txt:
1329         * WebKit2.xcodeproj/project.pbxproj:
1330
1331         * DatabaseProcess/DatabaseProcess.cpp:
1332         * DatabaseProcess/DatabaseProcess.h:
1333
1334         * Shared/WebCrossThreadCopier.cpp: Removed.
1335         * Shared/WebCrossThreadCopier.h: Removed.
1336
1337 2016-05-28  Chris Dumez  <cdumez@apple.com>
1338
1339         Templatize NoncopyableFunction class similarly to std::function
1340         https://bugs.webkit.org/show_bug.cgi?id=158185
1341
1342         Reviewed by Darin Adler.
1343
1344         Templatize NoncopyableFunction class similarly to std::function, so
1345         that it can be used as a std::function replacement in more places.
1346
1347         Previously, NoncopyableFunction could only support "void()" lambdas.
1348
1349         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1350         (WebKit::NetworkCache::runTaskInQueue):
1351
1352 2016-05-28  Alexey Proskuryakov  <ap@apple.com>
1353
1354         Fix the build with newer clang and other custom configuration options
1355         https://bugs.webkit.org/show_bug.cgi?id=158161
1356
1357         Reviewed by Dan Bernstein.
1358
1359         * NetworkProcess/ios/NetworkProcessIOS.mm: -setAllowsSpecificHTTPSCertificate:forHost:
1360         is now in CFNetworkSPI.h
1361         * NetworkProcess/mac/NetworkProcessMac.mm: Ditto.
1362         * Shared/mac/CookieStorageShimLibrary.cpp:
1363         (WebKit::WebKitCookieStorageShimInitialize): Use more portable std::call_once.
1364
1365 2016-05-28  Chris Dumez  <cdumez@apple.com>
1366
1367         Modernize lambda captures in the network disk cache implementation
1368         https://bugs.webkit.org/show_bug.cgi?id=158179
1369
1370         Reviewed by Darin Adler.
1371
1372         Modernize lambda captures in the network disk cache implementation.
1373
1374         * NetworkProcess/cache/NetworkCache.cpp:
1375         (WebKit::NetworkCache::Cache::retrieve):
1376         (WebKit::NetworkCache::Cache::store):
1377         (WebKit::NetworkCache::Cache::traverse):
1378         * NetworkProcess/cache/NetworkCache.h:
1379         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1380         (WebKit::NetworkCache::inputStreamReadReadyCallback):
1381         (WebKit::NetworkCache::outputStreamWriteReadyCallback):
1382         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1383         (WebKit::NetworkCache::Statistics::initialize):
1384         (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
1385         (WebKit::NetworkCache::Statistics::queryWasEverRequested):
1386         * NetworkProcess/cache/NetworkCacheStatistics.h:
1387         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1388         (WebKit::NetworkCache::Storage::updateFileModificationTime):
1389         (WebKit::NetworkCache::Storage::clear):
1390
1391 2016-05-27  Caitlin Potter  <caitp@igalia.com>
1392
1393         [JSC] implement async functions proposal
1394         https://bugs.webkit.org/show_bug.cgi?id=156147
1395
1396         Reviewed by Yusuke Suzuki.
1397
1398         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1399         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1400
1401 2016-05-27  Chris Dumez  <cdumez@apple.com>
1402
1403         Improve lambda capture in NetworkCache::Storage::synchronize()
1404         https://bugs.webkit.org/show_bug.cgi?id=158176
1405
1406         Reviewed by Brady Eidson.
1407
1408         Improve lambda capture in NetworkCache::Storage::synchronize(). We can
1409         now capture the std::unique_ptr<> variables directly thanks to:
1410         1. C++14's support for initializer's in lambda captures
1411         2. RunLoop::dispatch() now takes a NoncopyableFunction in instead of
1412            a std::function, allowing us to capture non-copyable variables.
1413
1414         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1415         (WebKit::NetworkCache::Storage::synchronize):
1416
1417 2016-05-27  Jeremy Jones  <jeremyj@apple.com>
1418
1419         Decrease flicker when changing video presentation mode.
1420         https://bugs.webkit.org/show_bug.cgi?id=158148
1421         rdar://problem/24476949
1422
1423         Reviewed by Tim Horton.
1424
1425         Prevent flicker by using setVideoFullscreenLayer with a completion handler to delay 
1426         enter fullscreen and cleanup fullscreen until the video layer has completely been
1427         installed or removed.
1428
1429         * WebProcess/cocoa/WebVideoFullscreenManager.mm:
1430         (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
1431         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
1432
1433 2016-05-27  Chris Dumez  <cdumez@apple.com>
1434
1435         WorkQueue::dispatch() / RunLoop::dispatch() should not copy captured lambda variables
1436         https://bugs.webkit.org/show_bug.cgi?id=158111
1437
1438         Reviewed by Darin Adler.
1439
1440         WorkQueue::dispatch() / RunLoop::dispatch() should not copy captured lambda variables.
1441         These are often used cross-thread and copying the captured lambda variables can be
1442         dangerous (e.g. we do not want to copy a String after calling isolatedCopy() upon
1443         capture).
1444
1445         * NetworkProcess/NetworkProcess.cpp:
1446         (WebKit::clearDiskCacheEntries):
1447         * NetworkProcess/cache/NetworkCache.cpp:
1448         (WebKit::NetworkCache::Cache::clear):
1449         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1450         (WebKit::NetworkCache::runTaskInQueue):
1451         * Platform/IPC/Connection.cpp:
1452         (IPC::Connection::processIncomingMessage):
1453         * UIProcess/Storage/StorageManager.cpp:
1454         (WebKit::StorageManager::getSessionStorageOrigins):
1455         (WebKit::StorageManager::deleteSessionStorageOrigins):
1456         (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
1457         (WebKit::StorageManager::getLocalStorageOrigins):
1458         (WebKit::StorageManager::getLocalStorageOriginDetails):
1459         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
1460         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
1461         * UIProcess/Storage/StorageManager.h:
1462
1463 2016-05-27  Alex Christensen  <achristensen@webkit.org>
1464
1465         Expose content extension failure error codes in SPI
1466         https://bugs.webkit.org/show_bug.cgi?id=158095
1467         rdar://problem/26475651
1468
1469         Reviewed by Anders Carlsson.
1470
1471         * UIProcess/API/APIUserContentExtensionStore.cpp:
1472         (API::UserContentExtensionStore::synchronousRemoveAllContentExtensions):
1473         (API::UserContentExtensionStore::invalidateContentExtensionVersion):
1474         Added for testing.
1475         (API::userContentExtensionStoreErrorCategory):
1476         * UIProcess/API/APIUserContentExtensionStore.h:
1477         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
1478         Added the new enum, _WKUserContentExtensionStoreErrorCode.
1479         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
1480         (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
1481         Sometimes the error code returned by UserContentExtensionStore::compileContentExtension has the error code from compileRuleList.
1482         When this happens, we want to get the message from the internal compiler error, but we want the NSError's code to always be CompileFailed.
1483         (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
1484         (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
1485         (-[_WKUserContentExtensionStore _removeAllContentExtensions]):
1486         (-[_WKUserContentExtensionStore _invalidateContentExtensionVersionForIdentifier:]):
1487         * UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h:
1488         Added new invalidator for testing.
1489
1490 2016-05-27  Zalan Bujtas  <zalan@apple.com>
1491
1492         Regression(r200972): Webcore::Range::collectSelectionsRects() asserts in startContainer() while selecting text.
1493         https://bugs.webkit.org/show_bug.cgi?id=158155
1494         <rdar://problem/26502712>
1495
1496         Reviewed by Chris Dumez.
1497
1498         This patch ensures that we still have a valid paragraphRange after returning from enclosingTextUnitOfGranularity().
1499
1500         * WebProcess/WebPage/ios/WebPageIOS.mm:
1501         (WebKit::WebPage::selectTextWithGranularityAtPoint):
1502
1503 2016-05-26  Brady Eidson  <beidson@apple.com>
1504
1505         Certain NetworkResourceLoader callbacks can deref a null m_networkLoad.
1506         https://bugs.webkit.org/show_bug.cgi?id=158134
1507
1508         Reviewed by Alex Christensen.
1509
1510         It's legit for m_networkLoad to be null in these callbacks.
1511         
1512         We need null checks, just like we have in many other callbacks in this class.
1513         
1514         * NetworkProcess/NetworkResourceLoader.cpp:
1515         (WebKit::NetworkResourceLoader::continueWillSendRequest):
1516         (WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
1517
1518 2016-05-26  Darin Adler  <darin@apple.com>
1519
1520         Media queries and platform screen modernization and streamlining
1521         https://bugs.webkit.org/show_bug.cgi?id=158067
1522
1523         Reviewed by Alex Christensen.
1524
1525         * Shared/mac/WebEventFactory.mm:
1526         (WebKit::screenForWindow): Deleted.
1527         (WebKit::flipScreenPoint): Deleted.
1528         (WebKit::globalPoint): Deleted.
1529         (WebKit::globalPointForEvent): Use globalPoint function from WebCore so we don't need
1530         copies of everything in here.
1531
1532         * UIProcess/Cocoa/WebViewImpl.mm:
1533         (WebKit::WebViewImpl::windowDidChangeScreen): Removed unneeded type cast.
1534         (WebKit::WebViewImpl::draggedImage): Added type cast since globalPoint now returns an
1535         NSPoint rather than an IntPoint.
1536
1537         * UIProcess/WebPageProxy.h: Use pragma once. Add a WebCore prefix to a use of
1538         PlatformDisplayID, since that is now inside the WebCore namespace.
1539         * WebProcess/WebCoreSupport/WebChromeClient.h: Ditto.
1540         * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h: Ditto.
1541         * WebProcess/WebPage/DrawingArea.h: Ditto.
1542         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h: Ditto.
1543
1544 2016-05-26  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1545
1546         Purge PassRefPtr in Modules/battery
1547         https://bugs.webkit.org/show_bug.cgi?id=157062
1548
1549         Reviewed by Darin Adler.
1550
1551         Use RefPtr<>& to reduce uses of PassRefPtr in WebKit.
1552
1553         * WebProcess/Battery/WebBatteryManager.cpp:
1554         (WebKit::WebBatteryManager::didChangeBatteryStatus):
1555         (WebKit::WebBatteryManager::updateBatteryStatus):
1556         * WebProcess/WebPage/WebPage.cpp:
1557         (WebKit::m_shouldDispatchFakeMouseMoveEvents):
1558
1559 2016-05-26  Myles C. Maxfield  <mmaxfield@apple.com>
1560
1561         Build fix
1562
1563         Rubber stamped by Lucas Forschler.
1564
1565         * Configurations/DebugRelease.xcconfig:
1566
1567 2016-05-25  Jer Noble  <jer.noble@apple.com>
1568
1569         Flashiness and jumpiness when entering fullscreen
1570         https://bugs.webkit.org/show_bug.cgi?id=158087
1571
1572         Reviewed by Beth Dakin.
1573
1574         Multiple independant sources of jumpiness and flashiness are addressed here:
1575
1576         - Setting the top content inset on the WKView cause a vertical jump during fullscreen
1577         transition. Instead of setting the content inset to 0, take the existing inset into account
1578         when placing the WKView in the NSWindow.
1579
1580         - The enter fullscreen transition causes a white flash due to the NSWindow needing
1581         display before ordering onscreen. Ensure the window has a backing by calling -displayIfNeeded
1582         before entering fullscreen mode.
1583
1584         - The exit fullscreen transition causes a white background color flash for an unknown
1585         reason, but is solved by not making the window's content view layer-backed. Rather than
1586         directly animating the contentView's background color, create a specific background view
1587         and animate it's background color instead.
1588
1589         * UIProcess/mac/WKFullScreenWindowController.h:
1590         * UIProcess/mac/WKFullScreenWindowController.mm:
1591         (-[WKFullScreenWindowController initWithWindow:webView:page:]):
1592         (-[WKFullScreenWindowController enterFullScreen:]):
1593         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
1594         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
1595         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
1596         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
1597         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1598         (WebKit::WebFullScreenManager::saveScrollPosition): Deleted.
1599         (WebKit::WebFullScreenManager::restoreScrollPosition): Deleted.
1600
1601 2016-05-25  Alex Christensen  <achristensen@webkit.org>
1602
1603         Fix CMake build.
1604
1605         * PlatformMac.cmake:
1606
1607 2016-05-25  Chris Dumez  <cdumez@apple.com>
1608
1609         Simplify a few lambda captures in the network cache code
1610         https://bugs.webkit.org/show_bug.cgi?id=158076
1611
1612         Reviewed by Antti Koivisto.
1613
1614         Simplify a few lambda captures in the network cache code by WTFMoving
1615         upon capture.
1616
1617         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
1618         (WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
1619         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
1620         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
1621         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
1622         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1623         (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
1624         (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
1625         (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
1626         (WebKit::NetworkCache::Statistics::writeTimerFired):
1627         (WebKit::NetworkCache::Statistics::addHashesToDatabase):
1628         (WebKit::NetworkCache::Statistics::addStoreDecisionsToDatabase):
1629         * NetworkProcess/cache/NetworkCacheStatistics.h:
1630
1631 2016-05-25  Fujii Hironori  <Hironori.Fujii@sony.com>
1632
1633         [Unix] Potential buffer overrun of m_fileDescriptors in readBytesFromSocket of ConnectionUnix.cpp
1634         https://bugs.webkit.org/show_bug.cgi?id=158058
1635
1636         Reviewed by Carlos Garcia Campos.
1637
1638         Memcpy does not check the boundary of m_fileDescriptors in
1639         readBytesFromSocket of ConnectionUnix.cpp.  This is not a problem
1640         in normal cases, but in the case when Web process is hijacked and
1641         malicious IPC packets were sent.  WTF::Vector already has two
1642         members m_capacity and m_size.  There is no need to have a
1643         separate member m_fileDescriptorsSize to remember the number of
1644         remaining data.
1645
1646         * Platform/IPC/Connection.h: Remove members m_readBufferSize and
1647         m_fileDescriptorsSize.
1648         * Platform/IPC/unix/ConnectionUnix.cpp:
1649         (IPC::Connection::platformInitialize): Removed initialization of
1650         m_readBufferSize and m_fileDescriptorsSize.  Reserve initial
1651         capacity for m_readBuffer and m_fileDescriptors.
1652         (IPC::Connection::processMessage): Replace m_readBufferSize and
1653         m_fileDescriptorsSize with m_readBuffer.size() and
1654         m_fileDescriptors.size().  Use Vector::shrink() to reset the
1655         number of remaining data in the buffers.
1656         (IPC::readBytesFromSocket) : Change argument types to WTF::Vector
1657         instead of pointers and sizes.
1658         (IPC::Connection::readyReadHandler): Call new readBytesFromSocket
1659
1660 2016-05-25  Chris Dumez  <cdumez@apple.com>
1661
1662         Update constructRevalidationRequest() to stop returning a unique_ptr<ResourceRequest>
1663         https://bugs.webkit.org/show_bug.cgi?id=158046
1664
1665         Reviewed by Darin Adler.
1666
1667         Update constructRevalidationRequest() to stop returning a unique_ptr<ResourceRequest>
1668         and to return a ResourceRequest instead. There is no reason for it to return a
1669         pointer.
1670
1671         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
1672         (WebKit::NetworkCache::constructRevalidationRequest):
1673         (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
1674         (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::revalidationRequest):
1675         (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
1676         (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
1677         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
1678
1679 2016-05-25  Antoine Quint  <graouts@apple.com>
1680
1681         Elements with backdrop-filter cannot be clipped with clip-path or mask
1682         https://bugs.webkit.org/show_bug.cgi?id=142662
1683         <rdar://problem/20150192>
1684
1685         Reviewed by Dean Jackson.
1686
1687         Ensure layer clones are set up with the same shape path as their original layer.
1688
1689         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1690         (WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
1691
1692 2016-05-24  Chris Dumez  <cdumez@apple.com>
1693
1694         Simplify a couple of lambda captures in the network cache code
1695         https://bugs.webkit.org/show_bug.cgi?id=158053
1696
1697         Reviewed by Brady Eidson.
1698
1699         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
1700         (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
1701         Just capture subResourceInfo instead of allocating a new copy
1702         on the heap. There is no reason we cannot simply capture
1703         subResourceInfo here.
1704
1705         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1706         (WebKit::NetworkCache::Storage::clear):
1707         Use new C++14 capture with initialization to make the code a
1708         bit nicer.
1709
1710 2016-05-24  Conrad Shultz  <conrad_shultz@apple.com>
1711
1712         _WKThumbnailView should expose its snapshot size
1713         https://bugs.webkit.org/show_bug.cgi?id=158049
1714
1715         Reviewed by Tim Horton.
1716
1717         * UIProcess/API/Cocoa/_WKThumbnailView.h:
1718         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
1719         (-[_WKThumbnailView _didTakeSnapshot:]):
1720         Update the new snapshotSize property in a KVO-compliant manner.
1721
1722 2016-05-24  Ryan Haddad  <ryanhaddad@apple.com>
1723
1724         Unreviewed, rolling out r201349.
1725
1726         This change caused compositing tests to assert on iOS
1727         simulator
1728
1729         Reverted changeset:
1730
1731         "Elements with backdrop-filter cannot be clipped with clip-
1732         path or mask"
1733         https://bugs.webkit.org/show_bug.cgi?id=142662
1734         http://trac.webkit.org/changeset/201349
1735
1736 2016-05-24  Ryan Haddad  <ryanhaddad@apple.com>
1737
1738         Unreviewed, rolling out r201341.
1739
1740         This change may have caused LayoutTests to crash on Mac and
1741         iOS
1742
1743         Reverted changeset:
1744
1745         "Use lambda capture with initializer instead of StringCapture"
1746         https://bugs.webkit.org/show_bug.cgi?id=158010
1747         http://trac.webkit.org/changeset/201341
1748
1749 2016-05-24  Alex Christensen  <achristensen@webkit.org>
1750
1751         Fix null pointer dereferencing in WebViewImpl::inputContext
1752         https://bugs.webkit.org/show_bug.cgi?id=158026
1753         rdar://problem/25994093
1754
1755         Reviewed by Tim Horton.
1756
1757         * UIProcess/API/Cocoa/WKWebView.mm:
1758         (-[WKWebView inputContext]):
1759         this was null sometimes in WebViewImpl::inputContext.
1760
1761 2016-05-24  Antoine Quint  <graouts@apple.com>
1762
1763         Elements with backdrop-filter cannot be clipped with clip-path or mask
1764         https://bugs.webkit.org/show_bug.cgi?id=142662
1765         <rdar://problem/20150192>
1766
1767         Reviewed by Dean Jackson.
1768
1769         Ensure layer clones are set up with the same shape path as their original layer.
1770
1771         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1772         (WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
1773
1774 2016-05-24  Chelsea Pugh  <cpugh@apple.com>
1775
1776         [iOS] Allow clients to override the type of an input field
1777         https://bugs.webkit.org/show_bug.cgi?id=157995
1778
1779         Reviewed by Dan Bernstein.
1780
1781         * UIProcess/API/Cocoa/_WKFormInputSession.h:
1782         * UIProcess/ios/WKContentViewInteraction.mm:
1783         (-[WKFormInputSession textContentType]): Getter for textContentType.
1784         (-[WKFormInputSession setTextContentType:]): Set the textContentType and reload
1785         input views.
1786         (contentTypeFromFieldName): Factor out switch statement to get text content type
1787         from autofill field name into its own function.
1788         (-[WKContentView textInputTraits]): If the client has set a text content type,
1789         set the traits' content type to that. Otherwise, set the text content type if
1790         there is one based on the assisted node information's autofill field name. If
1791         neither the form input session nor the assisted node info yields a text content
1792         type, set the text content type to nil, its default value.
1793
1794 2016-05-24  Chris Dumez  <cdumez@apple.com>
1795
1796         Use lambda capture with initializer instead of StringCapture
1797         https://bugs.webkit.org/show_bug.cgi?id=158010
1798
1799         Reviewed by Antti Koivisto.
1800
1801         Use lambda capture with initializer instead of StringCapture now that 
1802         we support C++14.
1803
1804         * NetworkProcess/cache/NetworkCache.cpp:
1805         (WebKit::NetworkCache::Cache::deleteDumpFile):
1806         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1807         (WebKit::NetworkCache::Statistics::initialize):
1808         (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
1809         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1810         (WebKit::NetworkCache::Storage::updateFileModificationTime):
1811         (WebKit::NetworkCache::Storage::clear):
1812         * UIProcess/API/APIUserContentExtensionStore.cpp:
1813         (API::UserContentExtensionStore::lookupContentExtension):
1814         (API::UserContentExtensionStore::compileContentExtension):
1815         (API::UserContentExtensionStore::removeContentExtension):
1816         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1817         (WebKit::WebsiteDataStore::fetchData):
1818         (WebKit::WebsiteDataStore::removeData):
1819
1820 2016-05-24  Chris Dumez  <cdumez@apple.com>
1821
1822         Use auto for some of our lambda function parameters
1823         https://bugs.webkit.org/show_bug.cgi?id=158001
1824
1825         Reviewed by Darin Adler.
1826
1827         Use auto for some of our lambda function parameters now that we build with c++14.
1828
1829         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1830         (WebKit::WebIDBConnectionToClient::didGetRecord):
1831         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1832         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
1833         * NetworkProcess/NetworkProcess.cpp:
1834         (WebKit::fetchDiskCacheEntries):
1835         (WebKit::NetworkProcess::fetchWebsiteData):
1836         (WebKit::clearDiskCacheEntries):
1837         * NetworkProcess/NetworkResourceLoader.cpp:
1838         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
1839         (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
1840         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
1841         (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
1842         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
1843         (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
1844         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
1845         (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
1846         (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
1847         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
1848         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1849         (WebKit::NetworkCache::Storage::removeFromPendingWriteOperations):
1850         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1851         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
1852         (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
1853         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
1854         (-[_WKRemoteObjectInterface debugDescription]):
1855         * UIProcess/API/C/WKApplicationCacheManager.cpp:
1856         (WKApplicationCacheManagerGetApplicationCacheOrigins):
1857         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1858         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
1859         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
1860         * UIProcess/API/C/WKResourceCacheManager.cpp:
1861         (WKResourceCacheManagerGetCacheOrigins):
1862         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1863         (-[WKWebsiteDataStore _fetchDataRecordsOfTypes:withOptions:completionHandler:]):
1864         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1865         (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
1866         (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
1867         (WebKit::WebUserContentControllerProxy::removeAllUserMessageHandlers):
1868         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1869         (WebKit::PlatformCALayerRemote::removeAnimationForKey):
1870
1871 2016-05-23  Yusuke Suzuki  <utatane.tea@gmail.com>
1872
1873         Assertion failure for Reflect.get with Proxy and primitive value as explicit receiver
1874         https://bugs.webkit.org/show_bug.cgi?id=157080
1875
1876         Reviewed by Saam Barati.
1877
1878         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1879         (WebKit::JSNPObject::propertyGetter):
1880         (WebKit::JSNPObject::methodGetter):
1881         * WebProcess/Plugins/Netscape/JSNPObject.h:
1882
1883 2016-05-23  Chris Dumez  <cdumez@apple.com>
1884
1885         Generate bindings code for EventTarget.addEventListener() / removeEventListener()
1886         https://bugs.webkit.org/show_bug.cgi?id=157882
1887
1888         Reviewed by Darin Adler.
1889
1890         Generate bindings code for EventTarget.addEventListener() / removeEventListener()
1891         instead of hardcoding them in the bindings generator.
1892
1893         * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
1894         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
1895         (WebKit::PDFPluginAnnotation::attach):
1896         (WebKit::PDFPluginAnnotation::~PDFPluginAnnotation):
1897         * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
1898         (WebKit::PDFPluginPasswordField::~PDFPluginPasswordField):
1899         (WebKit::PDFPluginPasswordField::createAnnotationElement):
1900         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
1901         (WebKit::PDFPluginTextAnnotation::~PDFPluginTextAnnotation):
1902         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
1903
1904 2016-05-23  Beth Dakin  <bdakin@apple.com>
1905
1906         Need SPI for clients to require a user action to get an editing controls 
1907         manager
1908         https://bugs.webkit.org/show_bug.cgi?id=157992
1909         -and corresponding-
1910         rdar://problem/26379927
1911
1912         Reviewed by Tim Horton.
1913
1914         New SPI _setRequiresUserActionForEditingControlsManager. The SPI defaults to 
1915         False, which means that by default there is no user action requirement to 
1916         have an editing controls manager. The SPI is on WKViewPrivate and 
1917         WKWebViewConfigurationPrivate, and it’s implemented in WebViewImpl.
1918         * UIProcess/API/Cocoa/WKViewPrivate.h:
1919         * UIProcess/API/Cocoa/WKWebView.mm:
1920         (-[WKWebView _initializeWithConfiguration:]):
1921         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1922         (-[WKWebViewConfiguration init]):
1923         (-[WKWebViewConfiguration copyWithZone:]):
1924         (-[WKWebViewConfiguration _requiresUserActionForEditingControlsManager]):
1925         (-[WKWebViewConfiguration _setRequiresUserActionForEditingControlsManager:]):
1926         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1927         * UIProcess/API/mac/WKView.mm:
1928         (-[WKView _requiresUserActionForEditingControlsManager]):
1929         (-[WKView _setRequiresUserActionForEditingControlsManager:]):
1930         * UIProcess/Cocoa/WebViewImpl.h:
1931         (WebKit::WebViewImpl::setRequiresUserActionForEditingControlsManager):
1932         (WebKit::WebViewImpl::requiresUserActionForEditingControlsManager):
1933
1934         New message allows the WebProcess to tell the UI process whether the current 
1935         web page has had any selection changes based on user interaction.
1936         * UIProcess/WebPageProxy.cpp:
1937         (WebKit::WebPageProxy::setHasHadSelectionChangesFromUserInteraction):
1938         * UIProcess/WebPageProxy.h:
1939         (WebKit::WebPageProxy::hasHadSelectionChangesFromUserInteraction):
1940         * UIProcess/WebPageProxy.messages.in:
1941
1942         m_userIsInteracting m_hasFocusedDueToUserInteraction used to be iOS only, but 
1943         now we want to track them for Mac as well.
1944         * WebProcess/WebPage/WebPage.cpp:
1945
1946         Handling mouse events and key events will toggle m_userIsInteracting.
1947         (WebKit::WebPage::mouseEvent):
1948         (WebKit::WebPage::keyEvent):
1949
1950         m_userIsInteracting is no longer iOS-only.
1951         (WebKit::WebPage::setInitialFocus):
1952
1953         Send a message to the UI process on page transition to re-set 
1954         hasHadSelectionChangesFromUserInteraction to false.
1955         (WebKit::WebPage::didStartPageTransition):
1956
1957         Send a message to the UI process if this is the first selection change to 
1958         happen as a result of a user action.
1959         (WebKit::WebPage::didChangeSelection):
1960         * WebProcess/WebPage/WebPage.h:
1961
1962 2016-05-23  Alex Christensen  <achristensen@webkit.org>
1963
1964         Add logging for NSURLSession calls
1965         https://bugs.webkit.org/show_bug.cgi?id=157996
1966
1967         Reviewed by Brady Eidson.
1968
1969         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1970         (WebKit::NetworkDataTask::NetworkDataTask):
1971         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1972         (toNSURLSessionResponseDisposition):
1973         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
1974         (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
1975         (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]):
1976         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
1977         (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
1978         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
1979         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
1980         * Platform/Logging.h:
1981
1982 2016-05-23  Chris Fleizach  <cfleizach@apple.com>
1983
1984         AX: iOS: when bringing focus to a text field we may zoom the page even if author wanted max scale = 1
1985         https://bugs.webkit.org/show_bug.cgi?id=157771
1986
1987         Reviewed by Tim Horton.
1988
1989         * Shared/AssistedNodeInformation.cpp:
1990         (WebKit::AssistedNodeInformation::encode):
1991         (WebKit::AssistedNodeInformation::decode):
1992         * Shared/AssistedNodeInformation.h:
1993         * UIProcess/ios/WKContentViewInteraction.mm:
1994         (-[WKContentView _displayFormNodeInputView]):
1995         * WebProcess/WebPage/ios/WebPageIOS.mm:
1996         (WebKit::WebPage::getAssistedNodeInformation):
1997
1998 2016-05-23  Miguel Gomez  <magomez@igalia.com>
1999
2000         [ThreadedCompositor] Ensure that the BitmapTexture used by CoordinatedBackingStoreTile matches the opacity of the painted surface
2001         https://bugs.webkit.org/show_bug.cgi?id=157942
2002
2003         Reviewed by Žan Doberšek.
2004
2005         * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
2006         (WebKit::CoordinatedBackingStoreTile::swapBuffers):
2007         Reset the BitmapTexture if it doesn't match the opacity required by the surface
2008         that's being painted.
2009
2010 2016-05-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2011
2012         [GTK] Disk cache: enable speculative revalidation
2013         https://bugs.webkit.org/show_bug.cgi?id=157125
2014
2015         Reviewed by Sergio Villar Senin.
2016
2017         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2018         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2019         * UIProcess/API/gtk/WebKitWebContext.cpp:
2020         (webkitWebContextConstructed):
2021         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2022         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2023         * UIProcess/WebProcessPool.cpp:
2024         (WebKit::WebProcessPool::ensureNetworkProcess):
2025         * config.h:
2026
2027 2016-05-22  Brady Eidson  <beidson@apple.com>
2028
2029         Move to C++14.
2030         https://bugs.webkit.org/show_bug.cgi?id=157948
2031
2032         Reviewed by Michael Catanzaro.
2033
2034         * Configurations/Base.xcconfig:
2035
2036         Replace time literal suffixes that have underscores to the forms without
2037         (e.g. 0_ms becomes 0ms):
2038         * NetworkProcess/NetworkResourceLoadParameters.cpp:
2039         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
2040
2041         * NetworkProcess/NetworkResourceLoader.cpp:
2042         (WebKit::NetworkResourceLoader::startNetworkLoad):
2043
2044         * NetworkProcess/cache/NetworkCache.cpp:
2045         (WebKit::NetworkCache::responseHasExpired):
2046         (WebKit::NetworkCache::responseNeedsRevalidation):
2047         (WebKit::NetworkCache::makeStoreDecision):
2048
2049         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2050         (WebKit::NetworkCache::responseNeedsRevalidation):
2051
2052         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2053         (WebKit::NetworkCache::Storage::dispatchReadOperation):
2054         (WebKit::NetworkCache::Storage::store):
2055         (WebKit::NetworkCache::computeRecordWorth):
2056
2057         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
2058
2059         * UIProcess/ViewGestureController.cpp:
2060
2061         * WebProcess/Network/WebLoaderStrategy.cpp:
2062         (WebKit::maximumBufferingTime):
2063
2064         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2065         (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlushImmediately):
2066         (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
2067
2068 2016-05-21  Andy Estes  <aestes@apple.com>
2069
2070         REGRESSION (r188642): All pages are blank when printing a webpage in iOS Safari
2071         https://bugs.webkit.org/show_bug.cgi?id=157924
2072         rdar://problem/22524550
2073
2074         Reviewed by Sam Weinig.
2075
2076         When UIPrintInteractionController asks WKWebView to print a webpage, it does so in several phases. First we're
2077         asked to compute the page count, followed later by a series of messages asking us to draw each page into a
2078         provided CGContext.
2079
2080         When asked for the page count, we send a message to the Web process instructing it to compute and
2081         return the page count synchronously and then immediately start drawing the page for printing. If the drawing has
2082         finished by the time we're asked to print the first page, then we can do so without waiting. But if it hasn't
2083         then we block by calling Connection::waitForMessage(), passing std::chromo::milliseconds::max() as the relative
2084         timeout.
2085         
2086         Prior to r188642, Connection::waitForMessage() called std::condition_variable::wait_for(), which takes a
2087         relative timeout value. r188642 replaced this with WTF::Condition::waitUntil(), which takes an absolute timeout
2088         instead. To convert from relative to absolute, this line was added to Connection::waitForMessage():
2089
2090             Condition::Clock::time_point absoluteTimeout = Condition::Clock::now() + timeout;
2091
2092         std::chrono will convert both operands to a common duration type before performing the addition. When timeout
2093         equals something very large, like milliseconds::max(), this conversion results in signed integer overflow,
2094         giving absoluteTimeout a value less than Clock::now() and making waitForMessage time out immediately.
2095         
2096         To fix this, compute how many milliseconds remain on our clock, and add the smaller of that and the timeout
2097         value to Clock::now() to arrive at an absolute timeout.
2098
2099         * Platform/IPC/Connection.cpp:
2100         (IPC::Connection::waitForMessage):
2101         * UIProcess/API/Cocoa/WKWebView.mm:
2102         (-[WKWebView _printedDocument]): Removed an unnecessary nanoseconds-to-milliseconds conversion.
2103
2104 2016-05-20  Enrica Casucci  <enrica@apple.com>
2105
2106         Drag cannot start if no drag data or custom data is available in the Pasteboard.
2107         https://bugs.webkit.org/show_bug.cgi?id=157911
2108         rdar://problem/24577706
2109
2110         Reviewed by Tim Horton.
2111
2112         We need to make sure there is always one item in common between source and target
2113         of the drag and drop operation.
2114
2115         * UIProcess/Cocoa/WebViewImpl.mm:
2116         (WebKit::WebViewImpl::dragImageForView):
2117
2118 2016-05-20  John Wilander  <wilander@apple.com>
2119
2120         Remove unnecessary PageOverlay client function pageOverlayDestroyed
2121         https://bugs.webkit.org/show_bug.cgi?id=157388
2122         <rdar://problem/25471523>
2123
2124         Reviewed by Tim Horton.
2125
2126         Remove dead PageOverlay code. Almost all of these overrides were empty and
2127         never called. In the case of WebPageOverlay it was never called but had a
2128         function body, causing confusion. There was a fear of dangling pointers in
2129         WebPageOverlay's static hash map between PageOverlays and WebPageOverlays.
2130         Only WebPageOverlay's constructor creates its PageOverlay object and adds it
2131         to the hash map. Its client object is kept in a unique pointer member which
2132         is automatically deleted when the WebPageOverlay object itself is deleted.
2133         This explains why PageOverlayClientImpl::pageOverlayDestroyed in
2134         WKBundlePageOverlay can safely be removed. Finally, WebPageOverlay's
2135         destructor clears the hash map entry for its PageOverlay object. Thus, there
2136         is no need to call WebPageOverlay::pageOverlayDestroyed nor a need for
2137         WebPageOverlay's destructor to call pageOverlayDestroyed on its client.
2138
2139         No new tests. I tried to come up with a WebKit API test for this but I
2140         wasn't able to test presence/absence of WebPageOverlay's map entries since
2141         the map is not exposed.
2142
2143         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
2144         (WebKit::PageOverlayClientImpl::pageOverlayDestroyed): Deleted.
2145         * WebProcess/Plugins/PDF/PDFPlugin.h:
2146         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2147         (WebKit::PDFPlugin::HUD::pageOverlayDestroyed): Deleted.
2148         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2149         * WebProcess/WebCoreSupport/WebInspectorClient.h:
2150         (WebKit::WebInspectorClient::pageOverlayDestroyed): Deleted.
2151         * WebProcess/WebPage/FindController.cpp:
2152         * WebProcess/WebPage/FindController.h:
2153         (WebKit::FindController::pageOverlayDestroyed): Deleted.
2154         * WebProcess/WebPage/WebPageOverlay.cpp:
2155         * WebProcess/WebPage/WebPageOverlay.h:
2156         (WebKit::WebPageOverlay::pageOverlayDestroyed): Deleted.
2157         * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
2158         (WebKit::FindIndicatorOverlayClientIOS::pageOverlayDestroyed): Deleted.
2159
2160 2016-05-19  Chris Dumez  <cdumez@apple.com>
2161
2162         Improve compile-time assertions in is<>() / downcast<>()
2163         https://bugs.webkit.org/show_bug.cgi?id=157817
2164
2165         Reviewed by Darin Adler.
2166
2167         Add missing includes.
2168
2169         * WebProcess/WebPage/WebFrame.cpp:
2170         * WebProcess/WebPage/WebPage.cpp:
2171
2172 2016-05-19  Tim Horton  <timothy_horton@apple.com>
2173
2174         Mail crashes under TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate() when the Web process crashes
2175         https://bugs.webkit.org/show_bug.cgi?id=157927
2176         <rdar://problem/24793374>
2177
2178         Reviewed by Dean Jackson.
2179
2180         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2181         (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
2182         With just the right combination of layout mechanisms and Web Content process
2183         crash timing, it is possible to get a frame change underneath WebPageProxy::processDidCrash,
2184         before the DrawingArea has been nulled out but after the Connection has.
2185         This can lead to a null dereference. I had a lot of trouble writing a API
2186         test for this, though I'm certain it's possible.
2187
2188 2016-05-16  Enrica Casucci  <enrica@apple.com>
2189
2190         No candidate punctuation when typing punctuation in WK2 text field.
2191         https://bugs.webkit.org/show_bug.cgi?id=157773
2192         rdar://problem/23084603
2193
2194         Reviewed by Sam Weinig.
2195
2196         We need to adopt the new addInputString:withFlags:withInputManagerHint function
2197         for this to work propertly.
2198
2199         * Platform/spi/ios/UIKitSPI.h:
2200         * UIProcess/ios/WKContentViewInteraction.mm:
2201         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
2202
2203 2016-05-19  Brady Eidson  <beidson@apple.com>
2204
2205         Finishing off: Modern IDB: Website data store management.
2206         https://bugs.webkit.org/show_bug.cgi?id=157626
2207
2208         Reviewed by Alex Christensen.
2209
2210         * DatabaseProcess/DatabaseProcess.cpp:
2211         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
2212         (WebKit::removeAllDatabasesForOriginPath): Deleted.
2213         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigins): Deleted.
2214         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedSince): Deleted.
2215         * DatabaseProcess/DatabaseProcess.h:
2216
2217 2016-05-19  Brent Fulgham  <bfulgham@apple.com>
2218
2219         [OS X][WK2] Expand sandbox for new mach endpoints
2220         https://bugs.webkit.org/show_bug.cgi?id=157919
2221         <rdar://problem/25238336>
2222
2223         Reviewed by Alexey Proskuryakov.
2224
2225         Grant the WebContent and Networking processes the mach lookup capability for
2226         various Security-related mach endpoints..
2227
2228         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2229         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2230
2231 2016-05-19  Brian Burg  <bburg@apple.com>
2232
2233         Web Inspector: CRASH when closing a page while element selection mode is enabled via Develop menu
2234         https://bugs.webkit.org/show_bug.cgi?id=157925
2235         <rdar://problem/26259618>
2236
2237         Reviewed by Joseph Pecoraro.
2238
2239         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2240         (WebKit::WebInspectorClient::elementSelectionChanged):
2241         Null-check m_page->inspector() since it will return nullptr if the page
2242         is closed but not yet destructed. This is triggered by teardown code
2243         in InspectorDOMAgent::willDestroyFrontendAndBackend.
2244
2245 2016-05-19  Enrica Casucci  <enrica@apple.com>
2246
2247         Drag cannot start if no drag data is available in the Pasteboard.
2248         https://bugs.webkit.org/show_bug.cgi?id=157911
2249         rdar://problem/24577706
2250
2251         Reviewed by Tim Horton.
2252
2253         Setting dummy data to allow drag to start.
2254
2255         * Shared/mac/PasteboardTypes.h:
2256         * Shared/mac/PasteboardTypes.mm:
2257         * UIProcess/Cocoa/WebViewImpl.mm:
2258         (WebKit::WebViewImpl::registerDraggedTypes):
2259         (WebKit::WebViewImpl::dragImageForView):
2260
2261 2016-05-19  Jer Noble  <jer.noble@apple.com>
2262
2263         [IOS] Add setting to allow playback to continue inline after exiting fullscreen.
2264         https://bugs.webkit.org/show_bug.cgi?id=157912
2265
2266         Reviewed by Eric Carlson.
2267
2268         Add a preference and configuration property to control whether media should be allowed to continue
2269         playing inline when exiting fullscreen.
2270
2271         * Shared/WebPreferencesDefinitions.h:
2272         * UIProcess/API/Cocoa/WKWebView.mm:
2273         (-[WKWebView _initializeWithConfiguration:]):
2274         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2275         (-[WKWebViewConfiguration init]):
2276         (-[WKWebViewConfiguration encodeWithCoder:]):
2277         (-[WKWebViewConfiguration initWithCoder:]):
2278         (-[WKWebViewConfiguration copyWithZone:]):
2279         (-[WKWebViewConfiguration _allowsInlineMediaPlaybackAfterFullscreen]):
2280         (-[WKWebViewConfiguration _setAllowsInlineMediaPlaybackAfterFullscreen:]):
2281         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2282         * UIProcess/mac/WKFullScreenWindowController.mm:
2283         (disableScreenUpdates):
2284         (enableScreenUpdates):
2285         (-[WKFullScreenWindowController enterFullScreen:]):
2286         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
2287         (-[WKFullScreenWindowController exitFullScreen]):
2288         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
2289         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2290         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
2291         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
2292         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
2293         * WebProcess/WebPage/WebPage.cpp:
2294         (WebKit::WebPage::updatePreferences):
2295
2296 2016-05-19  Brian Burg  <bburg@apple.com>
2297
2298         Web Inspector: timelines should not update via requestAnimationFrame unless Web Inspector is visible
2299         https://bugs.webkit.org/show_bug.cgi?id=157897
2300         <rdar://problem/26330802>
2301
2302         Reviewed by Timothy Hatcher.
2303
2304         The UIProcess needs to notify the Inspector frontend when it is truly visible.
2305         The frontend can't use document.visibilityState because it doesn't seem to work
2306         if the inspector frontend's WKWebView is created but not attached to a window.
2307
2308         * UIProcess/WebInspectorProxy.cpp:
2309         (WebKit::WebInspectorProxy::open):
2310         (WebKit::WebInspectorProxy::didClose):
2311         Send visibility updates to the inspector process when the inspector becomes
2312         "visible" or "not visible". It becomes visible if it is attached to the
2313         inspected page's window, or gets its own native window.
2314
2315         * WebProcess/WebPage/WebInspectorUI.cpp:
2316         (WebKit::WebInspectorUI::frontendLoaded):
2317         (WebKit::WebInspectorUI::setDockingUnavailable):
2318         (WebKit::WebInspectorUI::setIsVisible):
2319         Call InspectorFrontendAPI.updateVisibilityState to let the frontend know.
2320
2321         * WebProcess/WebPage/WebInspectorUI.h:
2322         * WebProcess/WebPage/WebInspectorUI.messages.in:
2323         Add new message.
2324
2325 2016-05-19  Brian Burg  <bburg@apple.com>
2326
2327         Web Inspector: use a consistent prefix for injected scripts
2328         https://bugs.webkit.org/show_bug.cgi?id=157715
2329         <rdar://problem/26287188>
2330
2331         Reviewed by Timothy Hatcher.
2332
2333         * CMakeLists.txt:
2334         * DerivedSources.make:
2335         * WebProcess/Automation/WebAutomationSessionProxy.js:
2336
2337 2016-05-18  Anders Carlsson  <andersca@apple.com>
2338
2339         Add WKPreferencesRef getter/setter pair to set RTL mode
2340         https://bugs.webkit.org/show_bug.cgi?id=157873
2341         rdar://problem/26329970
2342
2343         Reviewed by Tim Horton.
2344
2345         * UIProcess/API/C/WKPreferences.cpp:
2346         (WKPreferencesSetUserInterfaceDirectionPolicy):
2347         (WKPreferencesGetUserInterfaceDirectionPolicy):
2348         * UIProcess/API/C/WKPreferencesRef.h:
2349
2350 2016-05-18  Alex Christensen  <achristensen@webkit.org>
2351
2352         Clean up CSS code
2353         https://bugs.webkit.org/show_bug.cgi?id=157808
2354
2355         Reviewed by Chris Dumez.
2356
2357         * UIProcess/Cocoa/WebViewImpl.mm:
2358
2359 2016-05-18  Jer Noble  <jer.noble@apple.com>
2360
2361         Disable default user gesture requirement for audio playback on Mac
2362         https://bugs.webkit.org/show_bug.cgi?id=157820
2363
2364         Reviewed by Sam Weinig.
2365
2366         Disable the WebPreferences and matching WKWebViewConfiguration.mediaTypesRequiringUserActionForPlayback
2367         settings on Mac (and other non-iOS ports).
2368
2369         * Shared/WebPreferencesDefinitions.h:
2370         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2371         (-[WKWebViewConfiguration init]):
2372
2373 2016-05-18  Alex Christensen  <achristensen@webkit.org>
2374
2375         Build fix when not using CredentialStorage with NetworkSession.
2376
2377         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2378         (WebKit::NetworkSession::clearCredentials):
2379
2380 2016-05-18  Brady Eidson  <beidson@apple.com>
2381
2382         Fix null-deref crash sporadically seen after http://trac.webkit.org/changeset/201098
2383
2384         No review.
2385
2386         * DatabaseProcess/DatabaseProcess.cpp:
2387         (WebKit::DatabaseProcess::deleteWebsiteData): Don't access m_idbServer directly, as calling
2388           the idbServer() accessor is how you actually get your IDBServer created for you.
2389
2390 2016-05-18  Brian Burg  <bburg@apple.com>
2391
2392         Web Inspector: InspectorFrontendAPI.setTimelineProfilingEnabled should not implicitly show Timelines tab
2393         https://bugs.webkit.org/show_bug.cgi?id=157846
2394
2395         Reviewed by Timothy Hatcher.
2396
2397         Add a separate ShowTimelines message to WebInspector and WebInspectorUI. Have the
2398         start/stop profiling methods in public APIs explicitly call showTimelines() rather than
2399         relying on InspectorFrontendAPI to do it.
2400
2401         * UIProcess/API/C/WKInspector.cpp:
2402         (WKInspectorTogglePageProfiling):
2403         * UIProcess/WebInspectorProxy.cpp:
2404         (WebKit::WebInspectorProxy::showTimelines):
2405         * UIProcess/WebInspectorProxy.h:
2406         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
2407         (WKBundleInspectorSetPageProfilingEnabled):
2408         * WebProcess/WebPage/WebInspector.cpp:
2409         (WebKit::WebInspector::showTimelines):
2410         * WebProcess/WebPage/WebInspector.h:
2411         * WebProcess/WebPage/WebInspector.messages.in:
2412         * WebProcess/WebPage/WebInspectorUI.cpp:
2413         (WebKit::WebInspectorUI::showTimelines):
2414         * WebProcess/WebPage/WebInspectorUI.h:
2415         * WebProcess/WebPage/WebInspectorUI.messages.in:
2416
2417 2016-05-18  Brady Eidson  <beidson@apple.com>
2418
2419         Modern IDB: Add support for server side closing of open database connections.
2420         https://bugs.webkit.org/show_bug.cgi?id=157843
2421
2422         Reviewed by Alex Christensen.
2423
2424         - Implement the required IDB delegate code.
2425         - Make DatabaseProcess::deleteWebsiteData call the right method in IDB server.
2426
2427         * DatabaseProcess/DatabaseProcess.cpp:
2428         (WebKit::DatabaseProcess::deleteWebsiteData):
2429
2430         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
2431         (WebKit::WebIDBConnectionToClient::didGetRecord):
2432         (WebKit::WebIDBConnectionToClient::didCloseFromServer):
2433         (WebKit::WebIDBConnectionToClient::confirmDidCloseFromServer):
2434         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
2435         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
2436
2437         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
2438         (WebKit::WebIDBConnectionToServer::confirmDidCloseFromServer):
2439         (WebKit::WebIDBConnectionToServer::didStartTransaction):
2440         (WebKit::WebIDBConnectionToServer::didCloseFromServer):
2441         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
2442         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
2443
2444 2016-05-18  Brady Eidson  <beidson@apple.com>
2445
2446         Modern IDB: Make TestRunner.clearAllDatabases also delete IndexedDB databases (once doing so is supported).
2447         https://bugs.webkit.org/show_bug.cgi?id=157823
2448
2449         Reviewed by Alex Christensen.
2450
2451         * CMakeLists.txt:
2452         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2453         (WKWebsiteDataStoreRemoveAllIndexedDatabases):
2454         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
2455
2456 2016-05-18  Brian Burg  <bburg@apple.com>
2457
2458         REGRESSION(r200959): "Start Timeline Recording" menu item doesn't start recording
2459         https://bugs.webkit.org/show_bug.cgi?id=157821
2460         <rdar://problem/26335429>
2461
2462         Reviewed by Timothy Hatcher.
2463
2464         In r200959, WebInspectorProxy started sending start/stop profiling
2465         messages directly to the frontend process to avoid the inspected page
2466         process from implicitly showing the frontend. To compensate, the WebKit
2467         API layer was changed to call show() in togglePageProfiling().
2468
2469         Unfortunately, this fix was not quite right, because the ordering of
2470         the Show and StartPageProfiling messages is undefined. The latter has to bounce
2471         from UI to inspected to inspector processes, so the frontend may try
2472         to start profiling before the frontend is shown, causing it to be ignored.
2473
2474         This patch takes a different approach: just remove all implicit show()
2475         calls in the inspected page processes, and bounce both the Show and
2476         StartPageProfiling messages through the inspected page process to ensure
2477         they are handled in order by the frontend process.
2478
2479         * UIProcess/WebInspectorProxy.cpp:
2480         (WebKit::WebInspectorProxy::togglePageProfiling):
2481         Revert to sending to the inspected page process.
2482
2483         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
2484         (WKBundleInspectorSetPageProfilingEnabled):
2485         Add a call to show() now that the implementation doesn't do it implicitly.
2486
2487         * WebProcess/WebPage/WebInspector.cpp:
2488         (WebKit::WebInspector::startPageProfiling):
2489         (WebKit::WebInspector::stopPageProfiling):
2490         Don't implicitly show the inspector. These methods are only called
2491         through the WKBundleInspector API and via IPC from WebInspectorProxy.
2492
2493 2016-05-17  Beth Dakin  <bdakin@apple.com>
2494
2495         Make handleAcceptedCandidate a public function
2496         https://bugs.webkit.org/show_bug.cgi?id=157763
2497         -and corresponding-
2498         rdar://problem/26206397
2499
2500         Reviewed by Tim Horton.
2501
2502         This patch makes handleAcceptedCandidate a public member of WebViewImpl 
2503         instead of a private member. 
2504         * UIProcess/Cocoa/WebViewImpl.h:
2505         (WebKit::WebViewImpl::createWeakPtr):
2506
2507 2016-05-17  Dean Jackson  <dino@apple.com>
2508
2509         Remove ES6_GENERATORS flag
2510         https://bugs.webkit.org/show_bug.cgi?id=157815
2511         <rdar://problem/26332894>
2512
2513         Reviewed by Geoffrey Garen.
2514
2515         This flag isn't needed. Generators are enabled everywhere and
2516         part of a stable specification.
2517
2518         * Configurations/FeatureDefines.xcconfig:
2519
2520 2016-05-17  Dean Jackson  <dino@apple.com>
2521
2522         Temporarily enable Experimental Features
2523         https://bugs.webkit.org/show_bug.cgi?id=157810
2524         <rdar://problem/26330804>
2525
2526         Reviewed by Anders Carlsson.
2527
2528         We currently don't have good UI for enabling these features,
2529         which would mean Safari Technology Preview users would
2530         never be able to turn them on… unless we enable them by
2531         default temporarily.
2532
2533         * Shared/WebPreferencesDefinitions.h:
2534
2535 2016-05-17  Filip Pizlo  <fpizlo@apple.com>
2536
2537         WTF should know about Language
2538         https://bugs.webkit.org/show_bug.cgi?id=157756
2539
2540         Reviewed by Geoffrey Garen and Alexey Proskuryakov.
2541
2542         Rewires a bunch of includes/imports.
2543
2544         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2545         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2546         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2547         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
2548
2549 2016-05-17  Jer Noble  <jer.noble@apple.com>
2550
2551         Unreviewed GTK+ and EFL bulid fix; make the audio playback user gesture requirement
2552         Cocoa-only.
2553
2554         * Shared/WebPreferencesDefinitions.h:
2555
2556 2016-05-16  Anders Carlsson  <andersca@apple.com>
2557
2558         Add a WKA extension point for WKPreferences SPI
2559         https://bugs.webkit.org/show_bug.cgi?id=157762
2560         rdar://problem/24529203
2561
2562         Reviewed by Sam Weinig.
2563
2564         * UIProcess/API/Cocoa/WKPreferences.mm:
2565
2566 2016-05-16  David Kilzer  <ddkilzer@apple.com>
2567
2568         Action sheets don’t work in presented view controllers
2569         <https://webkit.org/b/157754>
2570         <rdar://problem/26304845>
2571
2572         Reviewed by Anders Carlsson.
2573
2574         * UIProcess/ios/WKActionSheet.mm:
2575         (-[WKActionSheet presentSheetFromRect:]):
2576         (-[WKActionSheet willRotate]):
2577         - Call SPI to get the presenting view controller, since it may
2578           not always be the root view controller.
2579
2580 2016-05-13  Enrica Casucci  <enrica@apple.com>
2581
2582         Text selection is basically impossible on plain text pages.
2583         https://bugs.webkit.org/show_bug.cgi?id=157681
2584         rdar://problem/26065660
2585
2586         Reviewed by Darin Adler.
2587
2588         When dealing with a plain text file, the rules for deciding whether
2589         a position is selectable should be different and we should never
2590         switch to block selection.
2591
2592         * WebProcess/WebPage/ios/WebPageIOS.mm:
2593         (WebKit::WebPage::shouldSwitchToBlockModeForHandle):
2594         (WebKit::rectIsTooBigForSelection): Added helper function.
2595         (WebKit::WebPage::selectTextWithGranularityAtPoint):
2596         (WebKit::WebPage::getPositionInformation):
2597
2598 2016-05-16  Chelsea Pugh  <cpugh@apple.com>
2599
2600         [iOS] Remove dispatch_after in -[WKFormInputSession setSuggestions:]
2601         https://bugs.webkit.org/show_bug.cgi?id=157745
2602
2603         Reviewed by Dan Bernstein.
2604
2605         * UIProcess/ios/WKContentViewInteraction.mm:
2606         (-[WKFormInputSession setSuggestions:]): Remove the dispatch_after since
2607         there is no longer a chance of keyboard suggestions replacing the
2608         suggestions set here.
2609
2610 2016-05-16  Brian Burg  <bburg@apple.com>
2611
2612         Crash simulating keystrokes at WebKit::WebAutomationSession::platformSimulateKeyStroke
2613         https://bugs.webkit.org/show_bug.cgi?id=157737
2614         <rdar://problem/26292946>
2615
2616         Reviewed by Timothy Hatcher.
2617
2618         * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
2619         (WebKit::WebAutomationSession::platformSimulateKeyStroke):
2620         AppKit expects characters passed to [NSEvent keyEventWithType:...]
2621         to be non-nil even if there are no characters. Initialize characters
2622         to the empty string @"". It will be overwritten if the keystroke should
2623         produce any unicode characters.
2624
2625 2016-05-16  Brian Burg  <bburg@apple.com>
2626
2627         Web Automation: Automation.inspectBrowsingContext should automatically start page profiling
2628         https://bugs.webkit.org/show_bug.cgi?id=157739
2629
2630         Reviewed by Timothy Hatcher.
2631
2632         * UIProcess/API/C/WKInspector.cpp:
2633         (WKInspectorTogglePageProfiling):
2634         Implicitly show the Web Inspector in the C API command to preserve existing behavior.
2635
2636         * UIProcess/Automation/WebAutomationSession.cpp:
2637         (WebKit::WebAutomationSession::inspectorFrontendLoaded):
2638         If the frontend loaded, it was either because the user opened Web Inspector (and
2639         turning on page profiling is harmless), or it was loaded but not shown by the
2640         inspectBrowsingContext command. For the latter, we want to start page profiling
2641         before processing any additional commands so subsequent execution is captured.
2642
2643         * UIProcess/WebInspectorProxy.cpp:
2644         (WebKit::WebInspectorProxy::togglePageProfiling):
2645         Send the start/stop profiling messages directly to the WebInspectorUI process instead of
2646         bouncing through the inspected page's process, which does an implicit show() we don't want.
2647
2648         * UIProcess/WebPageProxy.cpp:
2649         (WebKit::WebPageProxy::inspector): Make it const.
2650         * UIProcess/WebPageProxy.h:
2651
2652 2016-05-16  Conrad Shultz  <conrad_shultz@apple.com>
2653
2654         Fix some deprecation warnings.
2655
2656         * UIProcess/mac/WKPrintingView.mm:
2657         (-[WKPrintingView _drawPDFDocument:page:atPoint:]):
2658         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
2659         (WebKit::PDFPlugin::setActiveAnnotation):
2660         (WebKit::PDFPlugin::lookupTextAtLocation):
2661         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
2662         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
2663         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
2664         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
2665         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
2666         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
2667         * WebProcess/WebPage/mac/WebPageMac.mm:
2668         (WebKit::drawPDFPage):
2669
2670 2016-04-06  Jer Noble  <jer.noble@apple.com>
2671
2672         [WK2] Add API to WKWebViewConfiguration to control autoplay policy.
2673         https://bugs.webkit.org/show_bug.cgi?id=156312
2674
2675         Reviewed by Dan Bernstein.
2676
2677         Add a new API to WKWebViewConfiguration to allow fine-grained control over when media is allowed
2678         to play without a user gesture, and simultaneously deprecate the existing, all-or-nothing API,
2679         and deprecated the equivalent SPIs.
2680
2681         * UIProcess/API/Cocoa/WKWebView.mm:
2682         (-[WKWebView _initializeWithConfiguration:]):
2683         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2684         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2685         (-[WKWebViewConfiguration init]):
2686         (-[WKWebViewConfiguration encodeWithCoder:]):
2687         (-[WKWebViewConfiguration initWithCoder:]):
2688         (-[WKWebViewConfiguration copyWithZone:]):
2689         (-[WKWebViewConfiguration _requiresUserActionForVideoPlayback]):
2690         (-[WKWebViewConfiguration _setRequiresUserActionForVideoPlayback:]):
2691         (-[WKWebViewConfiguration _requiresUserActionForAudioPlayback]):
2692         (-[WKWebViewConfiguration _setRequiresUserActionForAudioPlayback:]):
2693         (-[WKWebViewConfiguration requiresUserActionForMediaPlayback]):
2694         (-[WKWebViewConfiguration setRequiresUserActionForMediaPlayback:]):
2695         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2696
2697 2016-05-16  Brian Burg  <bburg@apple.com>
2698
2699         Web Automation: WebAutomationSessionProxy.js gets injected more than once sometimes
2700         https://bugs.webkit.org/show_bug.cgi?id=157716
2701         <rdar://problem/26287306>
2702
2703         Reviewed by Timothy Hatcher.
2704
2705         Whenever a script was injected into a non-normal world by a WebKit client,
2706         the WebProcess's WebAutomationSessionProxy singleton would get a
2707         notification that the window was cleared from the relevant frame.
2708         This notification happens when creating the world's window shell for
2709         the first time.
2710
2711         This code should ignore such notifications that originate from non-main world
2712         contexts. Web Inspector's instrumentation already ignored this, but
2713         the automation session notification comes in via a different WebKit2 layer.
2714
2715         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2716         (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
2717
2718 2016-05-13  Dean Jackson  <dino@apple.com>
2719
2720         Fix iOS Build.
2721
2722         * Shared/AssistedNodeInformation.h:
2723         (WebKit::OptionItem::OptionItem):
2724
2725 2016-05-13  Sam Weinig  <sam@webkit.org>
2726
2727         REGRESSION (r200463): Autofill Credit Card expected but got Autofill Contact
2728         <rdar://problem/26251538>
2729         https://bugs.webkit.org/show_bug.cgi?id=157701
2730
2731         Reviewed by Dan Bernstein.
2732
2733         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
2734         (-[WKWebProcessPlugInFrame _certificateChain]):
2735         We need to do a retain-autorelease here now because the CertificateInfo's that contain the
2736         cached certificate chain, are being destroyed, and therefore destroying the chain, before this
2737         function returns. This used to work when the chain wasn't just a cache, because there was still
2738         a strong reference to it being held by the ResourceResponse's CertificateInfo copy, but now
2739         there is none.
2740
2741 2016-05-13  Dean Jackson  <dino@apple.com>
2742
2743         [iOS] <select> elements popover should render right-aligned when in RTL mode
2744         https://bugs.webkit.org/show_bug.cgi?id=157699
2745         <rdar://problem/26282319>
2746
2747         Reviewed by Simon Fraser.
2748
2749         Some follow-up changes as suggested by Darin in review.
2750
2751         * Shared/AssistedNodeInformation.h: Use initializers so we can
2752         remove the constructors.
2753         (WebKit::OptionItem::OptionItem): Deleted.
2754         (WebKit::AssistedNodeInformation::AssistedNodeInformation): Deleted.
2755         * UIProcess/ios/forms/WKFormSelectPopover.mm: Add a comment to explain
2756         why we are explicitly setting the language.
2757         (-[WKSelectTableViewController initWithView:hasGroups:]):
2758
2759 2016-05-13  Chris Dumez  <cdumez@apple.com>
2760
2761         [NetworkCache] Avoid having to re-parse URLs after deserializing them
2762         https://bugs.webkit.org/show_bug.cgi?id=157660
2763
2764         Reviewed by Darin Adler.
2765
2766         * NetworkProcess/cache/NetworkCacheCoders.cpp:
2767         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::encode): Deleted.
2768         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode): Deleted.
2769         * NetworkProcess/cache/NetworkCacheCoders.h:
2770         Drop template specializations used by our network cache for encoding
2771         / decoding URLs as Strings. This causes us to now rely on
2772         URL::encode() / URL::decode() instead.
2773
2774         * Shared/WebCoreArgumentCoders.cpp:
2775         (IPC::ArgumentCoder<BlobPart>::decode):
2776         Fix bug in BlobPart encoding / decoding. It was encoding the url member
2777         as a URL but decoding it as a String.
2778
2779 2016-05-13  Dan Bernstein  <mitz@apple.com>
2780
2781         Try to fix some non-iOS builds.
2782
2783         * mac/postprocess-framework-headers.sh:
2784
2785 2016-05-13  Ryan Haddad  <ryanhaddad@apple.com>
2786
2787         Attempt to fix the iOS build after r200874
2788
2789         Unreviewed build fix.
2790
2791         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2792
2793 2016-05-13  Sam Weinig  <sam@webkit.org>
2794
2795         Rename WKDataDetectorTypeSpotlightSuggestion to WKDataDetectorTypeLookupSuggestion
2796         <rdar://problem/26269611>
2797
2798         Reviewed by Dan Bernstein and Enrica Casucci. 
2799
2800         * Shared/API/Cocoa/WKFoundation.h:
2801         * Shared/API/c/WKDeclarationSpecifiers.h:
2802         * UIProcess/API/Cocoa/WKWebView.mm:
2803         (fromWKDataDetectorTypes):
2804         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2805         * mac/postprocess-framework-headers.sh:
2806
2807 2016-05-13  Beth Dakin  <bdakin@apple.com>
2808
2809         Add dyldSPI.h for linked on or after checks, and add one for link preview
2810         https://bugs.webkit.org/show_bug.cgi?id=157401
2811
2812         Reviewed by Darin Adler.
2813
2814         Set _allowsLinkPreview to YES for programs linked on or after 
2815         firstSDKVersionWithLinkPreviewEnabledByDefault.
2816         * UIProcess/API/Cocoa/WKWebView.h:
2817         * UIProcess/API/Cocoa/WKWebView.mm:
2818         (-[WKWebView _initializeWithConfiguration:]):
2819
2820 2016-05-13  Jer Noble  <jer.noble@apple.com>
2821
2822         Fullscreen view attempts to resize when in 2-up mode
2823         https://bugs.webkit.org/show_bug.cgi?id=157558
2824
2825         Reviewed by Darin Adler.
2826
2827         No need to react to NSApplicationDidChangeScreenParametersNotification to resize the
2828         fullscreen window when the screen parameters change; the NSWindow fullscreen machinery
2829         will do that on our behalf.
2830
2831         * UIProcess/mac/WKFullScreenWindowController.mm:
2832         (-[WKFullScreenWindowController windowDidLoad]): Deleted.
2833         (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): Deleted.
2834
2835 2016-05-13  Antoine Quint  <graouts@apple.com>
2836
2837         [iOS] <select> elements popover should render right-aligned when in RTL mode
2838         https://bugs.webkit.org/show_bug.cgi?id=157672
2839         <rdar://problem/26193442>
2840
2841         Reviewed by Darin Adler.
2842
2843         Add a new isRTL field to the AssistedNodeInformation as specified by the assisted
2844         node's render style and account for it when displaying the table view shown in the
2845         popover attached to the assisted node using the UIView semanticContentAttribute
2846         property.
2847
2848         * Shared/AssistedNodeInformation.cpp:
2849         (WebKit::AssistedNodeInformation::encode):
2850         (WebKit::AssistedNodeInformation::decode):
2851         * Shared/AssistedNodeInformation.h:
2852         (WebKit::AssistedNodeInformation::AssistedNodeInformation):
2853         * UIProcess/ios/forms/WKFormSelectPopover.mm:
2854         (-[WKSelectTableViewController initWithView:hasGroups:]):
2855         (-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
2856         * WebProcess/WebPage/ios/WebPageIOS.mm:
2857         (WebKit::WebPage::getAssistedNodeInformation):
2858
2859 2016-05-13  Tina Liu  <iting_liu@apple.com>
2860
2861         Revert r199691.
2862         https://bugs.webkit.org/show_bug.cgi?id=157645
2863         <rdar://problem/26235373>
2864
2865         Reviewed by Darin Adler.
2866
2867         * Shared/WebProcessCreationParameters.cpp:
2868         (WebKit::WebProcessCreationParameters::encode): Deleted.
2869         (WebKit::WebProcessCreationParameters::decode): Deleted.
2870         * Shared/WebProcessCreationParameters.h:
2871         * UIProcess/API/C/mac/WKContextPrivateMac.h:
2872         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
2873         (WKContextSetPrivateBrowsingPluginLoadClientPolicy): Deleted.
2874         * UIProcess/WebProcessPool.cpp:
2875         (WebKit::WebProcessPool::setPluginLoadClientPolicy):
2876         (WebKit::WebProcessPool::createNewWebProcess): Deleted.
2877         (WebKit::WebProcessPool::setPluginLoadClientPolicyForPrivateBrowsing): Deleted.
2878         (WebKit::WebProcessPool::setPrivateBrowsingPluginLoadClientPolicy): Deleted.
2879         (WebKit::WebProcessPool::clearPluginClientPolicies): Deleted.
2880         * UIProcess/WebProcessPool.h:
2881         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2882         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
2883         (WebKit::WebPlatformStrategies::longestMatchedWildcardHostForHost):
2884         (WebKit::WebPlatformStrategies::replaceHostWithMatchedWildcardHost):
2885         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
2886         (WebKit::WebPlatformStrategies::populatePluginCache):
2887         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicyForPrivateBrowsing): Deleted.
2888         (WebKit::WebPlatformStrategies::setPrivateBrowsingPluginLoadClientPolicy): Deleted.
2889         (WebKit::WebPlatformStrategies::clearPluginClientPolicies): Deleted.
2890         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHostForPrivateBrowsing): Deleted.
2891         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2892         * WebProcess/WebProcess.cpp:
2893         (WebKit::WebProcess::initializeWebProcess):
2894         (WebKit::WebProcess::setPluginLoadClientPolicies): Deleted.
2895         (WebKit::WebProcess::setPrivateBrowsingPluginLoadClientPolicy): Deleted.
2896         * WebProcess/WebProcess.h:
2897         * WebProcess/WebProcess.messages.in:
2898
2899 2016-05-12  Daniel Bates  <dabates@apple.com>
2900
2901         Use SecTask SPI to retrieve code signing identifier for user directory suffix
2902         https://bugs.webkit.org/show_bug.cgi?id=157570
2903         <rdar://problem/25706517>
2904
2905         Reviewed by Darin Adler.
2906
2907         It is sufficient to make use of the SecTask SPI to retrieve the code signing
2908         identifier of the embedding client for use in the user directory suffix. This
2909         avoids the need to allow Code Signing Services to have access to the bundle
2910         of the embedding client.
2911
2912         * Shared/mac/ChildProcessMac.mm:
2913         (WebKit::ChildProcess::initializeSandbox): Use the code signing identifier of the
2914         embedding client as part of the user directory suffix if available.
2915         * Shared/mac/CodeSigning.h: Update comment and include header wtf/spi/darwin/XPCSPI.h
2916         for the definition of xpc_connection_t. Renamed codeSigningIdentifier() to codeSigningIdentifierForCurrentProcess()
2917         to convey that it returns the code signing identifier for the current process. Repurposed
2918         the name codeSigningIdentifier for the variant of this function that takes a xpc_connection_t.
2919         * Shared/mac/CodeSigning.mm:
2920         (WebKit::codeSigningIdentifier): Added. Uses the audit token associated with the specified
2921         XPC connection to get the code signing identifier for the embedding client.
2922         (WebKit::codeSigningIdentifierForCurrentProcess): Renamed; formerly named codeSigningIdentifier.
2923         Implemented in terms of the SecTask API.
2924         (WebKit::secCodeForCurrentProcess): Deleted.
2925         (WebKit::secCodeForProcess): Deleted.
2926         (WebKit::secCodeSigningInformation): Deleted.
2927         (WebKit::appleSignedOrMacAppStoreSignedOrAppleDeveloperSignedRequirement): Deleted.
2928         (WebKit::secCodeSigningIdentifier): Deleted.
2929         (WebKit::codeSigningIdentifierForProcess): Deleted.
2930         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2931         (WebKit::connectToService): Update code due to renaming.
2932
2933 2016-05-12  Konstantin Tokarev  <annulen@yandex.ru>
2934
2935         Use reference instead of pointer in FrameLoaderClient::saveViewStateToItem.
2936         https://bugs.webkit.org/show_bug.cgi?id=157624
2937
2938         Reviewed by Darin Adler.
2939
2940         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2941         (WebKit::WebFrameLoaderClient::saveViewStateToItem):
2942         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2943
2944 2016-05-12  Csaba Osztrogonác  <ossy@webkit.org>
2945
2946         Remove ENABLE(ES6_ARROWFUNCTION_SYNTAX) guards
2947         https://bugs.webkit.org/show_bug.cgi?id=157564
2948
2949         Reviewed by Darin Adler.
2950
2951         * Configurations/FeatureDefines.xcconfig:
2952
2953 2016-05-11  Anders Carlsson  <andersca@apple.com>
2954
2955         We have two different types of contextual menus in iBooks
2956         https://bugs.webkit.org/show_bug.cgi?id=157587
2957         rdar://problem/25904169
2958
2959         Reviewed by Darin Adler.
2960
2961         Give clients the option to bypass the WebKit context menu machinery.
2962
2963         * UIProcess/mac/WebContextMenuProxyMac.mm:
2964         (WebKit::WebContextMenuProxyMac::showContextMenu):
2965
2966 2016-05-10  Brian Burg  <bburg@apple.com>
2967
2968         Web Automation: add command to asynchronously load the Web Inspector frontend in the background
2969         https://bugs.webkit.org/show_bug.cgi?id=157509
2970
2971         Reviewed by Timothy Hatcher and Joseph Pecoraro.
2972
2973         In order to make it easier to debug code that executes as a result of an automation
2974         command, this patch adds a new Automation command to asynchronously load the debugger
2975         and Inspector frontend. It is designed for use by automation clients to implement an
2976         auto-inspection feature to aid in debugging automation scripts.
2977
2978         * UIProcess/Automation/Automation.json: Add new command.
2979         * UIProcess/Automation/WebAutomationSession.cpp:
2980         (WebKit::WebAutomationSession::inspectBrowsingContext): Added.
2981         (WebKit::WebAutomationSession::inspectorFrontendLoaded): Added.
2982         This message is forwarded by WebInspectorProxy to the inspected page's session.
2983
2984         * UIProcess/Automation/WebAutomationSession.h:
2985         * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
2986         (WebKit::WebAutomationSession::sendSynthesizedEventsToPage):
2987         Force the active automation window to become key and bring to front prior to
2988         sending each NSEvent. This way, if the Inspector pauses while a command executes,
2989         the automation window will get back focus when the Inspector unpauses just before
2990         the next synthesized mouse or keyboard NSEvent is sent to its NSWindow.
2991
2992         * UIProcess/WebInspectorProxy.cpp:
2993         (WebKit::WebInspectorProxy::frontendLoaded):
2994         Forward to the inspected page's session.
2995
2996         * UIProcess/WebInspectorProxy.h:
2997         * UIProcess/WebInspectorProxy.messages.in: Add notification of the frontend's load.
2998
2999         * WebProcess/WebPage/WebInspectorUI.cpp:
3000         (WebKit::WebInspectorUI::frontendLoaded):
3001         Kick off notifying the automation session in UIProcess that the inspector loaded.
3002
3003         (WebKit::WebInspectorUI::closeWindow):
3004         In some circumstances, the Web Inspector can be loaded without showing
3005         the window. If this hidden page closes, make sure the frontend host gets
3006         a chance to disconnect its InspectorFrontendClient. Normally this happens
3007         when the window closes, but unshown Inspectors do not get window instances.
3008
3009 2016-05-11  Chris Dumez  <cdumez@apple.com>
3010
3011         Update Node::appendChild() / replaceChild() / removeChild() / insertBefore() to take references instead of pointers
3012         https://bugs.webkit.org/show_bug.cgi?id=157556
3013
3014         Reviewed by Darin Adler.
3015
3016         * WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
3017         (-[WKDOMNode insertNode:before:]):
3018         (-[WKDOMNode appendChild:]):
3019         (-[WKDOMNode removeChild:]):
3020         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
3021         (WebKit::PDFPlugin::PDFPlugin):
3022         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
3023         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
3024
3025 2016-05-11  Brady Eidson  <beidson@apple.com>
3026
3027         Modern IDB: IDBOpenDBRequests that are stop()'ed don't notify the IDBServer of that fact.
3028         https://bugs.webkit.org/show_bug.cgi?id=157448
3029
3030         Reviewed by Alex Christensen.
3031
3032         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
3033         (WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
3034         (WebKit::WebIDBConnectionToClient::openDBRequestCancelled):
3035         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
3036         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
3037
3038         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3039         (WebKit::WebIDBConnectionToServer::didFinishHandlingVersionChangeTransaction):
3040         (WebKit::WebIDBConnectionToServer::openDBRequestCancelled):
3041         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
3042
3043 2016-05-11  Myles C. Maxfield  <mmaxfield@apple.com>
3044
3045         Fix a typo in r200330
3046
3047         Unreviewed.
3048
3049         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
3050
3051 2016-05-10  Sam Weinig  <sam@webkit.org>
3052
3053         Only expose WKDataDetectorTypes and -[WKWebViewConfiguration dataDetectorTypes] on iOS
3054         for now, since we don't have it fully implemented on Mac.
3055
3056         Reviewed by Tim Horton.
3057
3058         * UIProcess/API/Cocoa/WKWebView.mm:
3059         (fromWKDataDetectorTypes):
3060         (-[WKWebView _initializeWithConfiguration:]):
3061         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
3062         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3063         (-[WKWebViewConfiguration encodeWithCoder:]):
3064         (-[WKWebViewConfiguration initWithCoder:]):
3065         (-[WKWebViewConfiguration copyWithZone:]):
3066
3067 2016-05-10  Sam Weinig  <sam@webkit.org>
3068
3069         Add SPI for Data Detectors to get ranges of text around an existing range.
3070         <rdar://problem/26009749>
3071
3072         Reviewed by Enrica Casucci.
3073
3074         * WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
3075         * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
3076         (-[WKDOMRange rangeByExpandingToWordBoundaryByCharacters:inDirection:]):
3077
3078 2016-05-10  Enrica Casucci  <enrica@apple.com>
3079
3080         Numerous block selection issues on iOS.
3081         https://bugs.webkit.org/show_bug.cgi?id=157490
3082         rdar://problem/25717977
3083         rdar://problem/23042215
3084
3085         Reviewed by Tim Horton.
3086
3087         This patch fixes a number of issues with block selection on iOS.
3088         We no longer eagerly choose block selection vs text selection and we
3089         make sure we are capable of switching back to text selection from block
3090         under every circumstance. The patch also fixes the logic used to decide
3091         when to switch to block selection. It now computes the rectangle for the
3092         paragraph containing the initial text selection to decide when we are
3093         actually dragging outside the boundaries of the paragraph block.
3094
3095         * UIProcess/WebPageProxy.h:
3096         * UIProcess/WebPageProxy.messages.in:
3097         * UIProcess/ios/WKContentViewInteraction.mm:
3098         (selectionChangedWithGesture):
3099         (selectionChangedWithTouch):
3100         (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
3101         * UIProcess/ios/WebPageProxyIOS.mm:
3102         (WebKit::WebPageProxy::gestureCallback):
3103         (WebKit::WebPageProxy::touchesCallback):
3104         (WebKit::WebPageProxy::autocorrectionDataCallback):
3105         (WebKit::WebPageProxy::selectWithGesture):
3106         (WebKit::WebPageProxy::updateSelectionWithTouches):
3107         * WebProcess/WebPage/WebPage.h:
3108         * WebProcess/WebPage/ios/WebPageIOS.mm:
3109         (WebKit::selectionBoxForRange):
3110         (WebKit::canShrinkToTextSelection):
3111         (WebKit::hasCustomLineHeight):
3112         (WebKit::WebPage::rangeForWebSelectionAtPosition):
3113         (WebKit::WebPage::contractedRangeFromHandle):
3114         (WebKit::WebPage::updateBlockSelectionWithTouch):
3115         (WebKit::WebPage::clearSelection):
3116         (WebKit::WebPage::switchToBlockSelectionAtPoint):
3117         (WebKit::WebPage::shouldSwitchToBlockModeForHandle):
3118         (WebKit::WebPage::updateSelectionWithTouches):
3119         (WebKit::WebPage::selectWithTwoTouches):
3120
3121 2016-05-10  Alex Christensen  <achristensen@webkit.org>
3122
3123         Handle _schemeUpgraded delegate callbacks in NSURLSessionDataDelegate
3124         https://bugs.webkit.org/show_bug.cgi?id=157354
3125         rdar://problem/25842107
3126
3127         Reviewed by Darin Adler.
3128
3129         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3130         (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
3131         When we make a request to a http url and CFNetwork determines that that url would have redirected to an HSTS site
3132         and it is going to change the request to an https request, this delegate callback is called.  We need to call the
3133         redirection code to have the same behavior as the NSURLConnection-based loader.
3134
3135 2016-05-10  Csaba Osztrogonác  <ossy@webkit.org>
3136
3137         Fix the !ENABLE(VIDEO) build
3138         https://bugs.webkit.org/show_bug.cgi?id=157518
3139
3140         Reviewed by Alex Christensen.
3141
3142         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3143         (WebKit::WebsiteDataStore::fetchData):
3144         (WebKit::WebsiteDataStore::removeData):
3145         * WebProcess/WebProcess.cpp:
3146         (WebKit::WebProcess::initializeWebProcess):
3147
3148 2016-05-10  Anders Carlsson  <andersca@apple.com>
3149
3150         Fix more deprecation warnings.
3151
3152         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
3153         (NetworkServiceInitializer):
3154         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
3155         (PluginServiceInitializer):
3156         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
3157         (WebContentServiceInitializer):
3158
3159 2016-05-10  Chris Dumez  <cdumez@apple.com>
3160
3161         [SpeculativeValidation] Do not start a preload if there is already one pending
3162         https://bugs.webkit.org/show_bug.cgi?id=157522
3163         <rdar://problem/26156083>
3164
3165         Reviewed by Alex Christensen.
3166
3167         Do not start a preload if there is already one pending. We failed to check in
3168         SpeculativeLoadManager::preloadEntry() if there was already a pending preload.
3169         As a result, we would sometimes cancel an already pending preload and start
3170         one from scratch which is inefficient. It would also sometimes lead to hitting
3171         an assertion in the SpeculativeLoad destructor because we could destroy the
3172         SpeculativeLoad without finishing or cancelling the load.
3173
3174         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
3175         (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
3176
3177 2016-05-10  Anders Carlsson  <andersca@apple.com>
3178
3179         Fix a deprecation warning.
3180
3181         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
3182         (DatabaseServiceInitializer):
3183
3184 2016-05-10  Tim Horton  <timothy_horton@apple.com>
3185
3186         Clicks do not work in Safari after pressing the Track package button in Gmail
3187         https://bugs.webkit.org/show_bug.cgi?id=157508
3188         <rdar://problem/22646404>
3189
3190         Reviewed by Anders Carlsson.
3191
3192         * UIProcess/Cocoa/WebViewImpl.mm:
3193         (WebKit::WebViewImpl::viewDidMoveToWindow):
3194         Explicitly cancel the force-click animation when we're removing the gesture
3195         recognizer due to the WK*View being unparented. This works around a bug
3196         where we don't get the cancellation callback in this situation, causing
3197         Safari to be left in an inconsistent and unexpected state.
3198
3199 2016-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>
3200
3201         [Linux] Remove seccomp filters support
3202         https://bugs.webkit.org/show_bug.cgi?id=157380
3203
3204         Reviewed by Darin Adler.
3205
3206         * NetworkProcess/NetworkProcessCreationParameters.cpp:
3207         (WebKit::NetworkProcessCreationParameters::encode): Deleted.
3208         (WebKit::NetworkProcessCreationParameters::decode): Deleted.
3209         * NetworkProcess/NetworkProcessCreationParameters.h:
3210         * PlatformEfl.cmake:
3211         * PlatformGTK.cmake:
3212         * Shared/WebProcessCreationParameters.cpp:
3213         (WebKit::WebProcessCreationParameters::encode): Deleted.
3214         (WebKit::WebProcessCreationParameters::decode): Deleted.
3215         * Shared/WebProcessCreationParameters.h:
3216         * Shared/linux/SeccompFilters/OpenSyscall.cpp: Removed.
3217         * Shared/linux/SeccompFilters/OpenSyscall.h: Removed.
3218         * Shared/linux/SeccompFilters/SeccompBroker.cpp: Removed.
3219         * Shared/linux/SeccompFilters/SeccompBroker.h: Removed.
3220         * Shared/linux/SeccompFilters/SeccompFilters.cpp: Removed.
3221         * Shared/linux/SeccompFilters/SeccompFilters.h: Removed.
3222         * Shared/linux/SeccompFilters/SigactionSyscall.cpp: Removed.
3223         * Shared/linux/SeccompFilters/SigactionSyscall.h: Removed.
3224         * Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp: Removed.
3225         * Shared/linux/SeccompFilters/SigprocmaskSyscall.h: Removed.
3226         * Shared/linux/SeccompFilters/Syscall.cpp: Removed.
3227         * Shared/linux/SeccompFilters/Syscall.h: Removed.
3228         * Shared/linux/SeccompFilters/SyscallPolicy.cpp: Removed.
3229         * Shared/linux/SeccompFilters/SyscallPolicy.h: Removed.
3230         * Shared/linux/SeccompFilters/XDGBaseDirectory.h: Removed.
3231         * Shared/linux/SeccompFilters/XDGBaseDirectoryGLib.cpp: Removed.
3232         * UIProcess/WebProcessPool.cpp:
3233         (WebKit::WebProcessPool::ensureNetworkProcess): Deleted.
3234         (WebKit::WebProcessPool::createNewWebProcess): Deleted.
3235         (WebKit::WebProcessPool::cookieStorageDirectory): Deleted.
3236         * UIProcess/WebProcessPool.h:
3237         * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp: Removed.
3238         * WebProcess/efl/SeccompFiltersWebProcessEfl.h: Removed.
3239         * WebProcess/gtk/SeccompFiltersWebProcessGtk.cpp: Removed.
3240         * WebProcess/gtk/SeccompFiltersWebProcessGtk.h: Removed.
3241         * WebProcess/soup/WebProcessSoup.cpp:
3242         (WebKit::WebProcess::platformInitializeWebProcess): Deleted.
3243
3244 2016-05-09  Tim Horton  <timothy_horton@apple.com>
3245
3246         REGRESSION (r191922): Zoom in/Zoom Out is not working for PDFs
3247         https://bugs.webkit.org/show_bug.cgi?id=157503
3248         <rdar://problem/23736297>
3249
3250         Reviewed by Anders Carlsson.
3251
3252         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
3253         Restore a requiresUnifiedScaleFactor that was lost in r191922.
3254
3255         * UIProcess/WebPageProxy.cpp:
3256         (WebKit::WebPageProxy::didCommitLoadForFrame):
3257         (WebKit::WebPageProxy::mainFramePluginHandlesPageScaleGestureDidChange):
3258         * UIProcess/WebPageProxy.h:
3259         * UIProcess/WebPageProxy.messages.in:        
3260         * WebProcess/Plugins/PluginView.cpp:
3261         (WebKit::PluginView::didInitializePlugin):
3262         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3263         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
3264         Separate mainFramePluginHandlesPageScaleGesture changes out from didCommitLoadForFrame,
3265         because the PluginView doesn't exist at this point, so it can't answer
3266         the handlesPageScaleGesture question correctly (or at all).
3267         Instead, we'll send the message when the main-frame PluginView is initialized.
3268
3269 2016-05-09  Simon Fraser  <simon.fraser@apple.com>
3270
3271         [iOS] visibility:hidden -webkit-overflow-scrolling: touch divs can interfere with page scrolling
3272         https://bugs.webkit.org/show_bug.cgi?id=157496
3273         rdar://problem/22963278
3274
3275         Reviewed by Tim Horton.
3276
3277         UIScrollViews are constructed in the UI process for visibility:hidden scrollable elements
3278         with -webkit-overflow-scrolling: touch, and these intercept user events when they should not.
3279
3280         Fix by propagating a "contentsHidden" flag from the web process which is used to turn off
3281         user interaction on these views.
3282
3283         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
3284         (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
3285         * Shared/mac/RemoteLayerTreeTransaction.h:
3286         * Shared/mac/RemoteLayerTreeTransaction.mm:
3287         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
3288         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
3289         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
3290         (WebKit::dumpChangedLayers):
3291         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
3292         (-[UIView _recursiveFindDescendantScrollViewAtPoint:withEvent:]): Our custom hit
3293         test needs to take view.isUserInteractionEnabled into account.
3294         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3295         (WebKit::PlatformCALayerRemote::setHidden):
3296         (WebKit::PlatformCALayerRemote::contentsHidden):
3297         (WebKit::PlatformCALayerRemote::setContentsHidden):
3298         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
3299
3300 2016-05-09  Ada Chan  <adachan@apple.com>
3301
3302         Introduce WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen() and use it in WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen()
3303         https://bugs.webkit.org/show_bug.cgi?id=157493
3304
3305         Reviewed by Dan Bernstein.
3306
3307         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
3308         (WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):
3309
3310 2016-05-06  Ada Chan  <adachan@apple.com>
3311
3312         Add WKPageRef SPI to tell whether there's a video playing in enhanced fullscreen
3313         https://bugs.webkit.org/show_bug.cgi?id=157434
3314
3315         Reviewed by Darin Adler.
3316
3317         * UIProcess/API/C/mac/WKPagePrivateMac.h:
3318         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
3319         (WKPageIsPlayingVideoInEnhancedFullscreen):
3320         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
3321         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
3322         (WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):
3323         * UIProcess/WebPageProxy.cpp:
3324         (WebKit::WebPageProxy::isPlayingVideoInEnhancedFullscreen):
3325         * UIProcess/WebPageProxy.h:
3326
3327 2016-05-09  Anders Carlsson  <andersca@apple.com>
3328
3329         Add injected bundle SPI for getting favicon and touch icon URLs
3330         https://bugs.webkit.org/show_bug.cgi?id=157435
3331
3332         Reviewed by Darin Adler.
3333
3334         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
3335         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
3336         (collectIcons):
3337         New helper function that calls into the WebCore LinkCollector.
3338
3339         (-[WKWebProcessPlugInFrame appleTouchIconURLs]):
3340         Call collectIcons.
3341
3342         (-[WKWebProcessPlugInFrame faviconURLs]):
3343         Ditto.
3344
3345 2016-05-06  Simon Fraser  <simon.fraser@apple.com>
3346
3347         [iOS WK2] Font size increases on some pages after navigating then going back
3348         https://bugs.webkit.org/show_bug.cgi?id=157441
3349         rdar://problem/22873240
3350
3351         Reviewed by Darin Adler.
3352
3353         There's an ordering dependency between setting the viewport configuration and doing
3354         layouts when going back to a page from the page cache that is incorrectly handled.
3355
3356         In FrameLoader::commitProvisionalLoad(), CachedPage::restore() triggers a layout under
3357         updateContentsSize(), but this happens before dispatchDidCommitLoad() which updates
3358         the viewport arguments via ViewportConfiguration::setViewportArguments().
3359
3360         This issue is not addressed by the current commit. But a second problem is:
3361         if the inputs to text autosizing change, we need to invalidate the autosizing state.
3362         The relevant input here is the fixed layout width (which is determined from the viewport
3363         configuration).
3364
3365         The current code invalidated text autosizing when m_viewportConfiguration.minimumLayoutSize()
3366         changed, but the correct behavior is to invalidate based on fixed layout size changing.
3367
3368         * WebProcess/WebPage/WebPage.cpp:
3369         (WebKit::WebPage::sendViewportAttributesChanged):
3370         (WebKit::WebPage::setFixedLayoutSize):
3371         * WebProcess/WebPage/WebPage.h:
3372         * WebProcess/WebPage/ios/WebPageIOS.mm:
3373         (WebKit::WebPage::resetTextAutosizing):
3374         (WebKit::WebPage::dynamicViewportSizeUpdate):
3375         (WebKit::WebPage::viewportConfigurationChanged):
3376         (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize): Deleted.
3377         (WebKit::WebPage::resetTextAutosizingBeforeLayoutIfNeeded): Deleted.
3378
3379 2016-05-09  Alex Christensen  <achristensen@webkit.org>
3380
3381         Don't use DiskCache for media resource loads
3382         https://bugs.webkit.org/show_bug.cgi?id=157405
3383
3384         Reviewed by Darin Adler.
3385
3386         * NetworkProcess/cache/NetworkCache.cpp:
3387         (WebKit::NetworkCache::makeRetrieveDecision):
3388         (WebKit::NetworkCache::makeStoreDecision):
3389         * NetworkProcess/cache/NetworkCache.h:
3390         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
3391         (WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):
3392
3393 2016-05-08  Myles C. Maxfield  <mmaxfield@apple.com>
3394
3395         [OS X] Migrate our Font classes entirely off of NSFont
3396         https://bugs.webkit.org/show_bug.cgi?id=157464
3397
3398         Reviewed by Darin Adler.
3399
3400         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
3401         (WebKit::WebPopupMenu::setUpPlatformData):
3402         * WebProcess/WebPage/mac/WebPageMac.mm:
3403         (WebKit::WebPage::fontAtSelection):
3404
3405 2016-05-06  Joseph Pecoraro  <pecoraro@apple.com>
3406
3407         Rename HitTestRequest DisallowShadowContent to DisallowUserAgentShadowContent
3408         https://bugs.webkit.org/show_bug.cgi?id=157447
3409
3410         Reviewed by Ryosuke Niwa.
3411
3412         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
3413         (WebKit::WebPage::findZoomableAreaForPoint):
3414         * WebProcess/WebPage/WebFrame.cpp:
3415         (WebKit::WebFrame::hitTest):
3416         * WebProcess/WebPage/WebPage.cpp:
3417         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
3418         * WebProcess/WebPage/ios/WebPageIOS.mm:
3419         (WebKit::WebPage::rangeForWebSelectionAtPosition):
3420         (WebKit::WebPage::rangeForBlockAtPoint):
3421         (WebKit::WebPage::getPositionInformation):
3422
3423 2016-05-06  Simon Fraser  <simon.fraser@apple.com>
3424
3425         Enable IOS_TEXT_AUTOSIZING on Mac and make it testable
3426         https://bugs.webkit.org/show_bug.cgi?id=157432
3427         rdar://problem/16406720
3428
3429         Reviewed by Dean Jackson.
3430
3431         Enable IOS_TEXT_AUTOSIZING on Mac so it can be tested.
3432         
3433         Make the setTextAutosizingEnabled() Setting work, and plumb it through WK1 and WK2
3434         preferences for WTR and DRT. Make textAutosizingWindowSizeOverride() work, for layout tests.
3435         These two settings are shared with TEXT_AUTOSIZING.
3436
3437         Add a TextAutosizing log channel, which is useful for generated -expected.html results.
3438
3439         Move adjustComputedFontSizesOnBlocks() and related code from RenderObject to RenderElement
3440         without changes.
3441
3442         An implication of this set of changes is that the way clients enable text autosizing
3443         has changed. Previously, they set the "MinimumZoomFontSize" preference to 0.
3444         Settings::defaultMinimumZoomFontSize() used to do this in order to enable text autosizing
3445         on iPhone only, not iPad.
3446
3447         Now the preferred technique is to leave minimumZoomFontSize alone, and to use textAutosizingEnabled()
3448         instead. Settings::defaultTextAutosizingEnabled() now does the check for iPhone.
3449
3450         UIWebView calls WebKitGetMinimumZoomFontSize() to setup the default minimum font zoom size,
3451         which will now always return 15, but had no other code that toggled this. So it's safe to just rely
3452         on Settings::defaultTextAutosizingEnabled() doing the right thing for iPhone/iPad.
3453
3454         * Configurations/FeatureDefines.xcconfig:
3455         * Shared/WebPreferencesDefinitions.h:
3456         * UIProcess/API/Cocoa/WKPreferences.mm:
3457         (-[WKPreferences _textAutosizingEnabled]):
3458         (-[WKPreferences _setTextAutosizingEnabled:]):
3459         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3460         * WebProcess/WebPage/WebPage.cpp:
3461         (WebKit::WebPage::updatePreferences):
3462
3463 2016-05-06  Dean Jackson  <dino@apple.com>
3464
3465         Regions, Shapes and Tracks don't need runtime features
3466         https://bugs.webkit.org/show_bug.cgi?id=157426
3467         <rdar://problem/26146262>
3468
3469   &nb