Fix the build with newer clang and other custom configuration options
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2016-05-28  Alexey Proskuryakov  <ap@apple.com>
2
3         Fix the build with newer clang and other custom configuration options
4         https://bugs.webkit.org/show_bug.cgi?id=158161
5
6         Reviewed by Dan Bernstein.
7
8         * NetworkProcess/ios/NetworkProcessIOS.mm: -setAllowsSpecificHTTPSCertificate:forHost:
9         is now in CFNetworkSPI.h
10         * NetworkProcess/mac/NetworkProcessMac.mm: Ditto.
11         * Shared/mac/CookieStorageShimLibrary.cpp:
12         (WebKit::WebKitCookieStorageShimInitialize): Use more portable std::call_once.
13
14 2016-05-28  Chris Dumez  <cdumez@apple.com>
15
16         Modernize lambda captures in the network disk cache implementation
17         https://bugs.webkit.org/show_bug.cgi?id=158179
18
19         Reviewed by Darin Adler.
20
21         Modernize lambda captures in the network disk cache implementation.
22
23         * NetworkProcess/cache/NetworkCache.cpp:
24         (WebKit::NetworkCache::Cache::retrieve):
25         (WebKit::NetworkCache::Cache::store):
26         (WebKit::NetworkCache::Cache::traverse):
27         * NetworkProcess/cache/NetworkCache.h:
28         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
29         (WebKit::NetworkCache::inputStreamReadReadyCallback):
30         (WebKit::NetworkCache::outputStreamWriteReadyCallback):
31         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
32         (WebKit::NetworkCache::Statistics::initialize):
33         (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
34         (WebKit::NetworkCache::Statistics::queryWasEverRequested):
35         * NetworkProcess/cache/NetworkCacheStatistics.h:
36         * NetworkProcess/cache/NetworkCacheStorage.cpp:
37         (WebKit::NetworkCache::Storage::updateFileModificationTime):
38         (WebKit::NetworkCache::Storage::clear):
39
40 2016-05-27  Caitlin Potter  <caitp@igalia.com>
41
42         [JSC] implement async functions proposal
43         https://bugs.webkit.org/show_bug.cgi?id=156147
44
45         Reviewed by Yusuke Suzuki.
46
47         * UIProcess/API/C/WKPreferencesRefPrivate.h:
48         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
49
50 2016-05-27  Chris Dumez  <cdumez@apple.com>
51
52         Improve lambda capture in NetworkCache::Storage::synchronize()
53         https://bugs.webkit.org/show_bug.cgi?id=158176
54
55         Reviewed by Brady Eidson.
56
57         Improve lambda capture in NetworkCache::Storage::synchronize(). We can
58         now capture the std::unique_ptr<> variables directly thanks to:
59         1. C++14's support for initializer's in lambda captures
60         2. RunLoop::dispatch() now takes a NoncopyableFunction in instead of
61            a std::function, allowing us to capture non-copyable variables.
62
63         * NetworkProcess/cache/NetworkCacheStorage.cpp:
64         (WebKit::NetworkCache::Storage::synchronize):
65
66 2016-05-27  Jeremy Jones  <jeremyj@apple.com>
67
68         Decrease flicker when changing video presentation mode.
69         https://bugs.webkit.org/show_bug.cgi?id=158148
70         rdar://problem/24476949
71
72         Reviewed by Tim Horton.
73
74         Prevent flicker by using setVideoFullscreenLayer with a completion handler to delay 
75         enter fullscreen and cleanup fullscreen until the video layer has completely been
76         installed or removed.
77
78         * WebProcess/cocoa/WebVideoFullscreenManager.mm:
79         (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
80         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
81
82 2016-05-27  Chris Dumez  <cdumez@apple.com>
83
84         WorkQueue::dispatch() / RunLoop::dispatch() should not copy captured lambda variables
85         https://bugs.webkit.org/show_bug.cgi?id=158111
86
87         Reviewed by Darin Adler.
88
89         WorkQueue::dispatch() / RunLoop::dispatch() should not copy captured lambda variables.
90         These are often used cross-thread and copying the captured lambda variables can be
91         dangerous (e.g. we do not want to copy a String after calling isolatedCopy() upon
92         capture).
93
94         * NetworkProcess/NetworkProcess.cpp:
95         (WebKit::clearDiskCacheEntries):
96         * NetworkProcess/cache/NetworkCache.cpp:
97         (WebKit::NetworkCache::Cache::clear):
98         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
99         (WebKit::NetworkCache::runTaskInQueue):
100         * Platform/IPC/Connection.cpp:
101         (IPC::Connection::processIncomingMessage):
102         * UIProcess/Storage/StorageManager.cpp:
103         (WebKit::StorageManager::getSessionStorageOrigins):
104         (WebKit::StorageManager::deleteSessionStorageOrigins):
105         (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
106         (WebKit::StorageManager::getLocalStorageOrigins):
107         (WebKit::StorageManager::getLocalStorageOriginDetails):
108         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
109         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
110         * UIProcess/Storage/StorageManager.h:
111
112 2016-05-27  Alex Christensen  <achristensen@webkit.org>
113
114         Expose content extension failure error codes in SPI
115         https://bugs.webkit.org/show_bug.cgi?id=158095
116         rdar://problem/26475651
117
118         Reviewed by Anders Carlsson.
119
120         * UIProcess/API/APIUserContentExtensionStore.cpp:
121         (API::UserContentExtensionStore::synchronousRemoveAllContentExtensions):
122         (API::UserContentExtensionStore::invalidateContentExtensionVersion):
123         Added for testing.
124         (API::userContentExtensionStoreErrorCategory):
125         * UIProcess/API/APIUserContentExtensionStore.h:
126         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
127         Added the new enum, _WKUserContentExtensionStoreErrorCode.
128         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
129         (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
130         Sometimes the error code returned by UserContentExtensionStore::compileContentExtension has the error code from compileRuleList.
131         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.
132         (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
133         (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
134         (-[_WKUserContentExtensionStore _removeAllContentExtensions]):
135         (-[_WKUserContentExtensionStore _invalidateContentExtensionVersionForIdentifier:]):
136         * UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h:
137         Added new invalidator for testing.
138
139 2016-05-27  Zalan Bujtas  <zalan@apple.com>
140
141         Regression(r200972): Webcore::Range::collectSelectionsRects() asserts in startContainer() while selecting text.
142         https://bugs.webkit.org/show_bug.cgi?id=158155
143         <rdar://problem/26502712>
144
145         Reviewed by Chris Dumez.
146
147         This patch ensures that we still have a valid paragraphRange after returning from enclosingTextUnitOfGranularity().
148
149         * WebProcess/WebPage/ios/WebPageIOS.mm:
150         (WebKit::WebPage::selectTextWithGranularityAtPoint):
151
152 2016-05-26  Brady Eidson  <beidson@apple.com>
153
154         Certain NetworkResourceLoader callbacks can deref a null m_networkLoad.
155         https://bugs.webkit.org/show_bug.cgi?id=158134
156
157         Reviewed by Alex Christensen.
158
159         It's legit for m_networkLoad to be null in these callbacks.
160         
161         We need null checks, just like we have in many other callbacks in this class.
162         
163         * NetworkProcess/NetworkResourceLoader.cpp:
164         (WebKit::NetworkResourceLoader::continueWillSendRequest):
165         (WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
166
167 2016-05-26  Darin Adler  <darin@apple.com>
168
169         Media queries and platform screen modernization and streamlining
170         https://bugs.webkit.org/show_bug.cgi?id=158067
171
172         Reviewed by Alex Christensen.
173
174         * Shared/mac/WebEventFactory.mm:
175         (WebKit::screenForWindow): Deleted.
176         (WebKit::flipScreenPoint): Deleted.
177         (WebKit::globalPoint): Deleted.
178         (WebKit::globalPointForEvent): Use globalPoint function from WebCore so we don't need
179         copies of everything in here.
180
181         * UIProcess/Cocoa/WebViewImpl.mm:
182         (WebKit::WebViewImpl::windowDidChangeScreen): Removed unneeded type cast.
183         (WebKit::WebViewImpl::draggedImage): Added type cast since globalPoint now returns an
184         NSPoint rather than an IntPoint.
185
186         * UIProcess/WebPageProxy.h: Use pragma once. Add a WebCore prefix to a use of
187         PlatformDisplayID, since that is now inside the WebCore namespace.
188         * WebProcess/WebCoreSupport/WebChromeClient.h: Ditto.
189         * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h: Ditto.
190         * WebProcess/WebPage/DrawingArea.h: Ditto.
191         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h: Ditto.
192
193 2016-05-26  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
194
195         Purge PassRefPtr in Modules/battery
196         https://bugs.webkit.org/show_bug.cgi?id=157062
197
198         Reviewed by Darin Adler.
199
200         Use RefPtr<>& to reduce uses of PassRefPtr in WebKit.
201
202         * WebProcess/Battery/WebBatteryManager.cpp:
203         (WebKit::WebBatteryManager::didChangeBatteryStatus):
204         (WebKit::WebBatteryManager::updateBatteryStatus):
205         * WebProcess/WebPage/WebPage.cpp:
206         (WebKit::m_shouldDispatchFakeMouseMoveEvents):
207
208 2016-05-26  Myles C. Maxfield  <mmaxfield@apple.com>
209
210         Build fix
211
212         Rubber stamped by Lucas Forschler.
213
214         * Configurations/DebugRelease.xcconfig:
215
216 2016-05-25  Jer Noble  <jer.noble@apple.com>
217
218         Flashiness and jumpiness when entering fullscreen
219         https://bugs.webkit.org/show_bug.cgi?id=158087
220
221         Reviewed by Beth Dakin.
222
223         Multiple independant sources of jumpiness and flashiness are addressed here:
224
225         - Setting the top content inset on the WKView cause a vertical jump during fullscreen
226         transition. Instead of setting the content inset to 0, take the existing inset into account
227         when placing the WKView in the NSWindow.
228
229         - The enter fullscreen transition causes a white flash due to the NSWindow needing
230         display before ordering onscreen. Ensure the window has a backing by calling -displayIfNeeded
231         before entering fullscreen mode.
232
233         - The exit fullscreen transition causes a white background color flash for an unknown
234         reason, but is solved by not making the window's content view layer-backed. Rather than
235         directly animating the contentView's background color, create a specific background view
236         and animate it's background color instead.
237
238         * UIProcess/mac/WKFullScreenWindowController.h:
239         * UIProcess/mac/WKFullScreenWindowController.mm:
240         (-[WKFullScreenWindowController initWithWindow:webView:page:]):
241         (-[WKFullScreenWindowController enterFullScreen:]):
242         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
243         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
244         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
245         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
246         * WebProcess/FullScreen/WebFullScreenManager.cpp:
247         (WebKit::WebFullScreenManager::saveScrollPosition): Deleted.
248         (WebKit::WebFullScreenManager::restoreScrollPosition): Deleted.
249
250 2016-05-25  Alex Christensen  <achristensen@webkit.org>
251
252         Fix CMake build.
253
254         * PlatformMac.cmake:
255
256 2016-05-25  Chris Dumez  <cdumez@apple.com>
257
258         Simplify a few lambda captures in the network cache code
259         https://bugs.webkit.org/show_bug.cgi?id=158076
260
261         Reviewed by Antti Koivisto.
262
263         Simplify a few lambda captures in the network cache code by WTFMoving
264         upon capture.
265
266         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
267         (WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
268         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
269         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
270         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
271         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
272         (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
273         (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
274         (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
275         (WebKit::NetworkCache::Statistics::writeTimerFired):
276         (WebKit::NetworkCache::Statistics::addHashesToDatabase):
277         (WebKit::NetworkCache::Statistics::addStoreDecisionsToDatabase):
278         * NetworkProcess/cache/NetworkCacheStatistics.h:
279
280 2016-05-25  Fujii Hironori  <Hironori.Fujii@sony.com>
281
282         [Unix] Potential buffer overrun of m_fileDescriptors in readBytesFromSocket of ConnectionUnix.cpp
283         https://bugs.webkit.org/show_bug.cgi?id=158058
284
285         Reviewed by Carlos Garcia Campos.
286
287         Memcpy does not check the boundary of m_fileDescriptors in
288         readBytesFromSocket of ConnectionUnix.cpp.  This is not a problem
289         in normal cases, but in the case when Web process is hijacked and
290         malicious IPC packets were sent.  WTF::Vector already has two
291         members m_capacity and m_size.  There is no need to have a
292         separate member m_fileDescriptorsSize to remember the number of
293         remaining data.
294
295         * Platform/IPC/Connection.h: Remove members m_readBufferSize and
296         m_fileDescriptorsSize.
297         * Platform/IPC/unix/ConnectionUnix.cpp:
298         (IPC::Connection::platformInitialize): Removed initialization of
299         m_readBufferSize and m_fileDescriptorsSize.  Reserve initial
300         capacity for m_readBuffer and m_fileDescriptors.
301         (IPC::Connection::processMessage): Replace m_readBufferSize and
302         m_fileDescriptorsSize with m_readBuffer.size() and
303         m_fileDescriptors.size().  Use Vector::shrink() to reset the
304         number of remaining data in the buffers.
305         (IPC::readBytesFromSocket) : Change argument types to WTF::Vector
306         instead of pointers and sizes.
307         (IPC::Connection::readyReadHandler): Call new readBytesFromSocket
308
309 2016-05-25  Chris Dumez  <cdumez@apple.com>
310
311         Update constructRevalidationRequest() to stop returning a unique_ptr<ResourceRequest>
312         https://bugs.webkit.org/show_bug.cgi?id=158046
313
314         Reviewed by Darin Adler.
315
316         Update constructRevalidationRequest() to stop returning a unique_ptr<ResourceRequest>
317         and to return a ResourceRequest instead. There is no reason for it to return a
318         pointer.
319
320         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
321         (WebKit::NetworkCache::constructRevalidationRequest):
322         (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
323         (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::revalidationRequest):
324         (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
325         (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
326         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
327
328 2016-05-25  Antoine Quint  <graouts@apple.com>
329
330         Elements with backdrop-filter cannot be clipped with clip-path or mask
331         https://bugs.webkit.org/show_bug.cgi?id=142662
332         <rdar://problem/20150192>
333
334         Reviewed by Dean Jackson.
335
336         Ensure layer clones are set up with the same shape path as their original layer.
337
338         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
339         (WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
340
341 2016-05-24  Chris Dumez  <cdumez@apple.com>
342
343         Simplify a couple of lambda captures in the network cache code
344         https://bugs.webkit.org/show_bug.cgi?id=158053
345
346         Reviewed by Brady Eidson.
347
348         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
349         (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
350         Just capture subResourceInfo instead of allocating a new copy
351         on the heap. There is no reason we cannot simply capture
352         subResourceInfo here.
353
354         * NetworkProcess/cache/NetworkCacheStorage.cpp:
355         (WebKit::NetworkCache::Storage::clear):
356         Use new C++14 capture with initialization to make the code a
357         bit nicer.
358
359 2016-05-24  Conrad Shultz  <conrad_shultz@apple.com>
360
361         _WKThumbnailView should expose its snapshot size
362         https://bugs.webkit.org/show_bug.cgi?id=158049
363
364         Reviewed by Tim Horton.
365
366         * UIProcess/API/Cocoa/_WKThumbnailView.h:
367         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
368         (-[_WKThumbnailView _didTakeSnapshot:]):
369         Update the new snapshotSize property in a KVO-compliant manner.
370
371 2016-05-24  Ryan Haddad  <ryanhaddad@apple.com>
372
373         Unreviewed, rolling out r201349.
374
375         This change caused compositing tests to assert on iOS
376         simulator
377
378         Reverted changeset:
379
380         "Elements with backdrop-filter cannot be clipped with clip-
381         path or mask"
382         https://bugs.webkit.org/show_bug.cgi?id=142662
383         http://trac.webkit.org/changeset/201349
384
385 2016-05-24  Ryan Haddad  <ryanhaddad@apple.com>
386
387         Unreviewed, rolling out r201341.
388
389         This change may have caused LayoutTests to crash on Mac and
390         iOS
391
392         Reverted changeset:
393
394         "Use lambda capture with initializer instead of StringCapture"
395         https://bugs.webkit.org/show_bug.cgi?id=158010
396         http://trac.webkit.org/changeset/201341
397
398 2016-05-24  Alex Christensen  <achristensen@webkit.org>
399
400         Fix null pointer dereferencing in WebViewImpl::inputContext
401         https://bugs.webkit.org/show_bug.cgi?id=158026
402         rdar://problem/25994093
403
404         Reviewed by Tim Horton.
405
406         * UIProcess/API/Cocoa/WKWebView.mm:
407         (-[WKWebView inputContext]):
408         this was null sometimes in WebViewImpl::inputContext.
409
410 2016-05-24  Antoine Quint  <graouts@apple.com>
411
412         Elements with backdrop-filter cannot be clipped with clip-path or mask
413         https://bugs.webkit.org/show_bug.cgi?id=142662
414         <rdar://problem/20150192>
415
416         Reviewed by Dean Jackson.
417
418         Ensure layer clones are set up with the same shape path as their original layer.
419
420         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
421         (WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
422
423 2016-05-24  Chelsea Pugh  <cpugh@apple.com>
424
425         [iOS] Allow clients to override the type of an input field
426         https://bugs.webkit.org/show_bug.cgi?id=157995
427
428         Reviewed by Dan Bernstein.
429
430         * UIProcess/API/Cocoa/_WKFormInputSession.h:
431         * UIProcess/ios/WKContentViewInteraction.mm:
432         (-[WKFormInputSession textContentType]): Getter for textContentType.
433         (-[WKFormInputSession setTextContentType:]): Set the textContentType and reload
434         input views.
435         (contentTypeFromFieldName): Factor out switch statement to get text content type
436         from autofill field name into its own function.
437         (-[WKContentView textInputTraits]): If the client has set a text content type,
438         set the traits' content type to that. Otherwise, set the text content type if
439         there is one based on the assisted node information's autofill field name. If
440         neither the form input session nor the assisted node info yields a text content
441         type, set the text content type to nil, its default value.
442
443 2016-05-24  Chris Dumez  <cdumez@apple.com>
444
445         Use lambda capture with initializer instead of StringCapture
446         https://bugs.webkit.org/show_bug.cgi?id=158010
447
448         Reviewed by Antti Koivisto.
449
450         Use lambda capture with initializer instead of StringCapture now that 
451         we support C++14.
452
453         * NetworkProcess/cache/NetworkCache.cpp:
454         (WebKit::NetworkCache::Cache::deleteDumpFile):
455         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
456         (WebKit::NetworkCache::Statistics::initialize):
457         (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
458         * NetworkProcess/cache/NetworkCacheStorage.cpp:
459         (WebKit::NetworkCache::Storage::updateFileModificationTime):
460         (WebKit::NetworkCache::Storage::clear):
461         * UIProcess/API/APIUserContentExtensionStore.cpp:
462         (API::UserContentExtensionStore::lookupContentExtension):
463         (API::UserContentExtensionStore::compileContentExtension):
464         (API::UserContentExtensionStore::removeContentExtension):
465         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
466         (WebKit::WebsiteDataStore::fetchData):
467         (WebKit::WebsiteDataStore::removeData):
468
469 2016-05-24  Chris Dumez  <cdumez@apple.com>
470
471         Use auto for some of our lambda function parameters
472         https://bugs.webkit.org/show_bug.cgi?id=158001
473
474         Reviewed by Darin Adler.
475
476         Use auto for some of our lambda function parameters now that we build with c++14.
477
478         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
479         (WebKit::WebIDBConnectionToClient::didGetRecord):
480         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
481         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
482         * NetworkProcess/NetworkProcess.cpp:
483         (WebKit::fetchDiskCacheEntries):
484         (WebKit::NetworkProcess::fetchWebsiteData):
485         (WebKit::clearDiskCacheEntries):
486         * NetworkProcess/NetworkResourceLoader.cpp:
487         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
488         (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
489         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
490         (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
491         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
492         (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
493         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
494         (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
495         (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
496         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
497         * NetworkProcess/cache/NetworkCacheStorage.cpp:
498         (WebKit::NetworkCache::Storage::removeFromPendingWriteOperations):
499         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
500         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
501         (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
502         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
503         (-[_WKRemoteObjectInterface debugDescription]):
504         * UIProcess/API/C/WKApplicationCacheManager.cpp:
505         (WKApplicationCacheManagerGetApplicationCacheOrigins):
506         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
507         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
508         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
509         * UIProcess/API/C/WKResourceCacheManager.cpp:
510         (WKResourceCacheManagerGetCacheOrigins):
511         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
512         (-[WKWebsiteDataStore _fetchDataRecordsOfTypes:withOptions:completionHandler:]):
513         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
514         (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
515         (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
516         (WebKit::WebUserContentControllerProxy::removeAllUserMessageHandlers):
517         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
518         (WebKit::PlatformCALayerRemote::removeAnimationForKey):
519
520 2016-05-23  Yusuke Suzuki  <utatane.tea@gmail.com>
521
522         Assertion failure for Reflect.get with Proxy and primitive value as explicit receiver
523         https://bugs.webkit.org/show_bug.cgi?id=157080
524
525         Reviewed by Saam Barati.
526
527         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
528         (WebKit::JSNPObject::propertyGetter):
529         (WebKit::JSNPObject::methodGetter):
530         * WebProcess/Plugins/Netscape/JSNPObject.h:
531
532 2016-05-23  Chris Dumez  <cdumez@apple.com>
533
534         Generate bindings code for EventTarget.addEventListener() / removeEventListener()
535         https://bugs.webkit.org/show_bug.cgi?id=157882
536
537         Reviewed by Darin Adler.
538
539         Generate bindings code for EventTarget.addEventListener() / removeEventListener()
540         instead of hardcoding them in the bindings generator.
541
542         * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
543         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
544         (WebKit::PDFPluginAnnotation::attach):
545         (WebKit::PDFPluginAnnotation::~PDFPluginAnnotation):
546         * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
547         (WebKit::PDFPluginPasswordField::~PDFPluginPasswordField):
548         (WebKit::PDFPluginPasswordField::createAnnotationElement):
549         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
550         (WebKit::PDFPluginTextAnnotation::~PDFPluginTextAnnotation):
551         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
552
553 2016-05-23  Beth Dakin  <bdakin@apple.com>
554
555         Need SPI for clients to require a user action to get an editing controls 
556         manager
557         https://bugs.webkit.org/show_bug.cgi?id=157992
558         -and corresponding-
559         rdar://problem/26379927
560
561         Reviewed by Tim Horton.
562
563         New SPI _setRequiresUserActionForEditingControlsManager. The SPI defaults to 
564         False, which means that by default there is no user action requirement to 
565         have an editing controls manager. The SPI is on WKViewPrivate and 
566         WKWebViewConfigurationPrivate, and it’s implemented in WebViewImpl.
567         * UIProcess/API/Cocoa/WKViewPrivate.h:
568         * UIProcess/API/Cocoa/WKWebView.mm:
569         (-[WKWebView _initializeWithConfiguration:]):
570         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
571         (-[WKWebViewConfiguration init]):
572         (-[WKWebViewConfiguration copyWithZone:]):
573         (-[WKWebViewConfiguration _requiresUserActionForEditingControlsManager]):
574         (-[WKWebViewConfiguration _setRequiresUserActionForEditingControlsManager:]):
575         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
576         * UIProcess/API/mac/WKView.mm:
577         (-[WKView _requiresUserActionForEditingControlsManager]):
578         (-[WKView _setRequiresUserActionForEditingControlsManager:]):
579         * UIProcess/Cocoa/WebViewImpl.h:
580         (WebKit::WebViewImpl::setRequiresUserActionForEditingControlsManager):
581         (WebKit::WebViewImpl::requiresUserActionForEditingControlsManager):
582
583         New message allows the WebProcess to tell the UI process whether the current 
584         web page has had any selection changes based on user interaction.
585         * UIProcess/WebPageProxy.cpp:
586         (WebKit::WebPageProxy::setHasHadSelectionChangesFromUserInteraction):
587         * UIProcess/WebPageProxy.h:
588         (WebKit::WebPageProxy::hasHadSelectionChangesFromUserInteraction):
589         * UIProcess/WebPageProxy.messages.in:
590
591         m_userIsInteracting m_hasFocusedDueToUserInteraction used to be iOS only, but 
592         now we want to track them for Mac as well.
593         * WebProcess/WebPage/WebPage.cpp:
594
595         Handling mouse events and key events will toggle m_userIsInteracting.
596         (WebKit::WebPage::mouseEvent):
597         (WebKit::WebPage::keyEvent):
598
599         m_userIsInteracting is no longer iOS-only.
600         (WebKit::WebPage::setInitialFocus):
601
602         Send a message to the UI process on page transition to re-set 
603         hasHadSelectionChangesFromUserInteraction to false.
604         (WebKit::WebPage::didStartPageTransition):
605
606         Send a message to the UI process if this is the first selection change to 
607         happen as a result of a user action.
608         (WebKit::WebPage::didChangeSelection):
609         * WebProcess/WebPage/WebPage.h:
610
611 2016-05-23  Alex Christensen  <achristensen@webkit.org>
612
613         Add logging for NSURLSession calls
614         https://bugs.webkit.org/show_bug.cgi?id=157996
615
616         Reviewed by Brady Eidson.
617
618         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
619         (WebKit::NetworkDataTask::NetworkDataTask):
620         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
621         (toNSURLSessionResponseDisposition):
622         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
623         (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
624         (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]):
625         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
626         (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
627         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
628         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
629         * Platform/Logging.h:
630
631 2016-05-23  Chris Fleizach  <cfleizach@apple.com>
632
633         AX: iOS: when bringing focus to a text field we may zoom the page even if author wanted max scale = 1
634         https://bugs.webkit.org/show_bug.cgi?id=157771
635
636         Reviewed by Tim Horton.
637
638         * Shared/AssistedNodeInformation.cpp:
639         (WebKit::AssistedNodeInformation::encode):
640         (WebKit::AssistedNodeInformation::decode):
641         * Shared/AssistedNodeInformation.h:
642         * UIProcess/ios/WKContentViewInteraction.mm:
643         (-[WKContentView _displayFormNodeInputView]):
644         * WebProcess/WebPage/ios/WebPageIOS.mm:
645         (WebKit::WebPage::getAssistedNodeInformation):
646
647 2016-05-23  Miguel Gomez  <magomez@igalia.com>
648
649         [ThreadedCompositor] Ensure that the BitmapTexture used by CoordinatedBackingStoreTile matches the opacity of the painted surface
650         https://bugs.webkit.org/show_bug.cgi?id=157942
651
652         Reviewed by Žan Doberšek.
653
654         * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
655         (WebKit::CoordinatedBackingStoreTile::swapBuffers):
656         Reset the BitmapTexture if it doesn't match the opacity required by the surface
657         that's being painted.
658
659 2016-05-22  Carlos Garcia Campos  <cgarcia@igalia.com>
660
661         [GTK] Disk cache: enable speculative revalidation
662         https://bugs.webkit.org/show_bug.cgi?id=157125
663
664         Reviewed by Sergio Villar Senin.
665
666         * NetworkProcess/soup/NetworkProcessSoup.cpp:
667         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
668         * UIProcess/API/gtk/WebKitWebContext.cpp:
669         (webkitWebContextConstructed):
670         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
671         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
672         * UIProcess/WebProcessPool.cpp:
673         (WebKit::WebProcessPool::ensureNetworkProcess):
674         * config.h:
675
676 2016-05-22  Brady Eidson  <beidson@apple.com>
677
678         Move to C++14.
679         https://bugs.webkit.org/show_bug.cgi?id=157948
680
681         Reviewed by Michael Catanzaro.
682
683         * Configurations/Base.xcconfig:
684
685         Replace time literal suffixes that have underscores to the forms without
686         (e.g. 0_ms becomes 0ms):
687         * NetworkProcess/NetworkResourceLoadParameters.cpp:
688         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
689
690         * NetworkProcess/NetworkResourceLoader.cpp:
691         (WebKit::NetworkResourceLoader::startNetworkLoad):
692
693         * NetworkProcess/cache/NetworkCache.cpp:
694         (WebKit::NetworkCache::responseHasExpired):
695         (WebKit::NetworkCache::responseNeedsRevalidation):
696         (WebKit::NetworkCache::makeStoreDecision):
697
698         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
699         (WebKit::NetworkCache::responseNeedsRevalidation):
700
701         * NetworkProcess/cache/NetworkCacheStorage.cpp:
702         (WebKit::NetworkCache::Storage::dispatchReadOperation):
703         (WebKit::NetworkCache::Storage::store):
704         (WebKit::NetworkCache::computeRecordWorth):
705
706         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
707
708         * UIProcess/ViewGestureController.cpp:
709
710         * WebProcess/Network/WebLoaderStrategy.cpp:
711         (WebKit::maximumBufferingTime):
712
713         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
714         (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlushImmediately):
715         (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
716
717 2016-05-21  Andy Estes  <aestes@apple.com>
718
719         REGRESSION (r188642): All pages are blank when printing a webpage in iOS Safari
720         https://bugs.webkit.org/show_bug.cgi?id=157924
721         rdar://problem/22524550
722
723         Reviewed by Sam Weinig.
724
725         When UIPrintInteractionController asks WKWebView to print a webpage, it does so in several phases. First we're
726         asked to compute the page count, followed later by a series of messages asking us to draw each page into a
727         provided CGContext.
728
729         When asked for the page count, we send a message to the Web process instructing it to compute and
730         return the page count synchronously and then immediately start drawing the page for printing. If the drawing has
731         finished by the time we're asked to print the first page, then we can do so without waiting. But if it hasn't
732         then we block by calling Connection::waitForMessage(), passing std::chromo::milliseconds::max() as the relative
733         timeout.
734         
735         Prior to r188642, Connection::waitForMessage() called std::condition_variable::wait_for(), which takes a
736         relative timeout value. r188642 replaced this with WTF::Condition::waitUntil(), which takes an absolute timeout
737         instead. To convert from relative to absolute, this line was added to Connection::waitForMessage():
738
739             Condition::Clock::time_point absoluteTimeout = Condition::Clock::now() + timeout;
740
741         std::chrono will convert both operands to a common duration type before performing the addition. When timeout
742         equals something very large, like milliseconds::max(), this conversion results in signed integer overflow,
743         giving absoluteTimeout a value less than Clock::now() and making waitForMessage time out immediately.
744         
745         To fix this, compute how many milliseconds remain on our clock, and add the smaller of that and the timeout
746         value to Clock::now() to arrive at an absolute timeout.
747
748         * Platform/IPC/Connection.cpp:
749         (IPC::Connection::waitForMessage):
750         * UIProcess/API/Cocoa/WKWebView.mm:
751         (-[WKWebView _printedDocument]): Removed an unnecessary nanoseconds-to-milliseconds conversion.
752
753 2016-05-20  Enrica Casucci  <enrica@apple.com>
754
755         Drag cannot start if no drag data or custom data is available in the Pasteboard.
756         https://bugs.webkit.org/show_bug.cgi?id=157911
757         rdar://problem/24577706
758
759         Reviewed by Tim Horton.
760
761         We need to make sure there is always one item in common between source and target
762         of the drag and drop operation.
763
764         * UIProcess/Cocoa/WebViewImpl.mm:
765         (WebKit::WebViewImpl::dragImageForView):
766
767 2016-05-20  John Wilander  <wilander@apple.com>
768
769         Remove unnecessary PageOverlay client function pageOverlayDestroyed
770         https://bugs.webkit.org/show_bug.cgi?id=157388
771         <rdar://problem/25471523>
772
773         Reviewed by Tim Horton.
774
775         Remove dead PageOverlay code. Almost all of these overrides were empty and
776         never called. In the case of WebPageOverlay it was never called but had a
777         function body, causing confusion. There was a fear of dangling pointers in
778         WebPageOverlay's static hash map between PageOverlays and WebPageOverlays.
779         Only WebPageOverlay's constructor creates its PageOverlay object and adds it
780         to the hash map. Its client object is kept in a unique pointer member which
781         is automatically deleted when the WebPageOverlay object itself is deleted.
782         This explains why PageOverlayClientImpl::pageOverlayDestroyed in
783         WKBundlePageOverlay can safely be removed. Finally, WebPageOverlay's
784         destructor clears the hash map entry for its PageOverlay object. Thus, there
785         is no need to call WebPageOverlay::pageOverlayDestroyed nor a need for
786         WebPageOverlay's destructor to call pageOverlayDestroyed on its client.
787
788         No new tests. I tried to come up with a WebKit API test for this but I
789         wasn't able to test presence/absence of WebPageOverlay's map entries since
790         the map is not exposed.
791
792         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
793         (WebKit::PageOverlayClientImpl::pageOverlayDestroyed): Deleted.
794         * WebProcess/Plugins/PDF/PDFPlugin.h:
795         * WebProcess/Plugins/PDF/PDFPlugin.mm:
796         (WebKit::PDFPlugin::HUD::pageOverlayDestroyed): Deleted.
797         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
798         * WebProcess/WebCoreSupport/WebInspectorClient.h:
799         (WebKit::WebInspectorClient::pageOverlayDestroyed): Deleted.
800         * WebProcess/WebPage/FindController.cpp:
801         * WebProcess/WebPage/FindController.h:
802         (WebKit::FindController::pageOverlayDestroyed): Deleted.
803         * WebProcess/WebPage/WebPageOverlay.cpp:
804         * WebProcess/WebPage/WebPageOverlay.h:
805         (WebKit::WebPageOverlay::pageOverlayDestroyed): Deleted.
806         * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
807         (WebKit::FindIndicatorOverlayClientIOS::pageOverlayDestroyed): Deleted.
808
809 2016-05-19  Chris Dumez  <cdumez@apple.com>
810
811         Improve compile-time assertions in is<>() / downcast<>()
812         https://bugs.webkit.org/show_bug.cgi?id=157817
813
814         Reviewed by Darin Adler.
815
816         Add missing includes.
817
818         * WebProcess/WebPage/WebFrame.cpp:
819         * WebProcess/WebPage/WebPage.cpp:
820
821 2016-05-19  Tim Horton  <timothy_horton@apple.com>
822
823         Mail crashes under TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate() when the Web process crashes
824         https://bugs.webkit.org/show_bug.cgi?id=157927
825         <rdar://problem/24793374>
826
827         Reviewed by Dean Jackson.
828
829         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
830         (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
831         With just the right combination of layout mechanisms and Web Content process
832         crash timing, it is possible to get a frame change underneath WebPageProxy::processDidCrash,
833         before the DrawingArea has been nulled out but after the Connection has.
834         This can lead to a null dereference. I had a lot of trouble writing a API
835         test for this, though I'm certain it's possible.
836
837 2016-05-16  Enrica Casucci  <enrica@apple.com>
838
839         No candidate punctuation when typing punctuation in WK2 text field.
840         https://bugs.webkit.org/show_bug.cgi?id=157773
841         rdar://problem/23084603
842
843         Reviewed by Sam Weinig.
844
845         We need to adopt the new addInputString:withFlags:withInputManagerHint function
846         for this to work propertly.
847
848         * Platform/spi/ios/UIKitSPI.h:
849         * UIProcess/ios/WKContentViewInteraction.mm:
850         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
851
852 2016-05-19  Brady Eidson  <beidson@apple.com>
853
854         Finishing off: Modern IDB: Website data store management.
855         https://bugs.webkit.org/show_bug.cgi?id=157626
856
857         Reviewed by Alex Christensen.
858
859         * DatabaseProcess/DatabaseProcess.cpp:
860         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
861         (WebKit::removeAllDatabasesForOriginPath): Deleted.
862         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigins): Deleted.
863         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedSince): Deleted.
864         * DatabaseProcess/DatabaseProcess.h:
865
866 2016-05-19  Brent Fulgham  <bfulgham@apple.com>
867
868         [OS X][WK2] Expand sandbox for new mach endpoints
869         https://bugs.webkit.org/show_bug.cgi?id=157919
870         <rdar://problem/25238336>
871
872         Reviewed by Alexey Proskuryakov.
873
874         Grant the WebContent and Networking processes the mach lookup capability for
875         various Security-related mach endpoints..
876
877         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
878         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
879
880 2016-05-19  Brian Burg  <bburg@apple.com>
881
882         Web Inspector: CRASH when closing a page while element selection mode is enabled via Develop menu
883         https://bugs.webkit.org/show_bug.cgi?id=157925
884         <rdar://problem/26259618>
885
886         Reviewed by Joseph Pecoraro.
887
888         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
889         (WebKit::WebInspectorClient::elementSelectionChanged):
890         Null-check m_page->inspector() since it will return nullptr if the page
891         is closed but not yet destructed. This is triggered by teardown code
892         in InspectorDOMAgent::willDestroyFrontendAndBackend.
893
894 2016-05-19  Enrica Casucci  <enrica@apple.com>
895
896         Drag cannot start if no drag data is available in the Pasteboard.
897         https://bugs.webkit.org/show_bug.cgi?id=157911
898         rdar://problem/24577706
899
900         Reviewed by Tim Horton.
901
902         Setting dummy data to allow drag to start.
903
904         * Shared/mac/PasteboardTypes.h:
905         * Shared/mac/PasteboardTypes.mm:
906         * UIProcess/Cocoa/WebViewImpl.mm:
907         (WebKit::WebViewImpl::registerDraggedTypes):
908         (WebKit::WebViewImpl::dragImageForView):
909
910 2016-05-19  Jer Noble  <jer.noble@apple.com>
911
912         [IOS] Add setting to allow playback to continue inline after exiting fullscreen.
913         https://bugs.webkit.org/show_bug.cgi?id=157912
914
915         Reviewed by Eric Carlson.
916
917         Add a preference and configuration property to control whether media should be allowed to continue
918         playing inline when exiting fullscreen.
919
920         * Shared/WebPreferencesDefinitions.h:
921         * UIProcess/API/Cocoa/WKWebView.mm:
922         (-[WKWebView _initializeWithConfiguration:]):
923         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
924         (-[WKWebViewConfiguration init]):
925         (-[WKWebViewConfiguration encodeWithCoder:]):
926         (-[WKWebViewConfiguration initWithCoder:]):
927         (-[WKWebViewConfiguration copyWithZone:]):
928         (-[WKWebViewConfiguration _allowsInlineMediaPlaybackAfterFullscreen]):
929         (-[WKWebViewConfiguration _setAllowsInlineMediaPlaybackAfterFullscreen:]):
930         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
931         * UIProcess/mac/WKFullScreenWindowController.mm:
932         (disableScreenUpdates):
933         (enableScreenUpdates):
934         (-[WKFullScreenWindowController enterFullScreen:]):
935         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
936         (-[WKFullScreenWindowController exitFullScreen]):
937         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
938         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
939         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
940         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
941         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
942         * WebProcess/WebPage/WebPage.cpp:
943         (WebKit::WebPage::updatePreferences):
944
945 2016-05-19  Brian Burg  <bburg@apple.com>
946
947         Web Inspector: timelines should not update via requestAnimationFrame unless Web Inspector is visible
948         https://bugs.webkit.org/show_bug.cgi?id=157897
949         <rdar://problem/26330802>
950
951         Reviewed by Timothy Hatcher.
952
953         The UIProcess needs to notify the Inspector frontend when it is truly visible.
954         The frontend can't use document.visibilityState because it doesn't seem to work
955         if the inspector frontend's WKWebView is created but not attached to a window.
956
957         * UIProcess/WebInspectorProxy.cpp:
958         (WebKit::WebInspectorProxy::open):
959         (WebKit::WebInspectorProxy::didClose):
960         Send visibility updates to the inspector process when the inspector becomes
961         "visible" or "not visible". It becomes visible if it is attached to the
962         inspected page's window, or gets its own native window.
963
964         * WebProcess/WebPage/WebInspectorUI.cpp:
965         (WebKit::WebInspectorUI::frontendLoaded):
966         (WebKit::WebInspectorUI::setDockingUnavailable):
967         (WebKit::WebInspectorUI::setIsVisible):
968         Call InspectorFrontendAPI.updateVisibilityState to let the frontend know.
969
970         * WebProcess/WebPage/WebInspectorUI.h:
971         * WebProcess/WebPage/WebInspectorUI.messages.in:
972         Add new message.
973
974 2016-05-19  Brian Burg  <bburg@apple.com>
975
976         Web Inspector: use a consistent prefix for injected scripts
977         https://bugs.webkit.org/show_bug.cgi?id=157715
978         <rdar://problem/26287188>
979
980         Reviewed by Timothy Hatcher.
981
982         * CMakeLists.txt:
983         * DerivedSources.make:
984         * WebProcess/Automation/WebAutomationSessionProxy.js:
985
986 2016-05-18  Anders Carlsson  <andersca@apple.com>
987
988         Add WKPreferencesRef getter/setter pair to set RTL mode
989         https://bugs.webkit.org/show_bug.cgi?id=157873
990         rdar://problem/26329970
991
992         Reviewed by Tim Horton.
993
994         * UIProcess/API/C/WKPreferences.cpp:
995         (WKPreferencesSetUserInterfaceDirectionPolicy):
996         (WKPreferencesGetUserInterfaceDirectionPolicy):
997         * UIProcess/API/C/WKPreferencesRef.h:
998
999 2016-05-18  Alex Christensen  <achristensen@webkit.org>
1000
1001         Clean up CSS code
1002         https://bugs.webkit.org/show_bug.cgi?id=157808
1003
1004         Reviewed by Chris Dumez.
1005
1006         * UIProcess/Cocoa/WebViewImpl.mm:
1007
1008 2016-05-18  Jer Noble  <jer.noble@apple.com>
1009
1010         Disable default user gesture requirement for audio playback on Mac
1011         https://bugs.webkit.org/show_bug.cgi?id=157820
1012
1013         Reviewed by Sam Weinig.
1014
1015         Disable the WebPreferences and matching WKWebViewConfiguration.mediaTypesRequiringUserActionForPlayback
1016         settings on Mac (and other non-iOS ports).
1017
1018         * Shared/WebPreferencesDefinitions.h:
1019         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1020         (-[WKWebViewConfiguration init]):
1021
1022 2016-05-18  Alex Christensen  <achristensen@webkit.org>
1023
1024         Build fix when not using CredentialStorage with NetworkSession.
1025
1026         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1027         (WebKit::NetworkSession::clearCredentials):
1028
1029 2016-05-18  Brady Eidson  <beidson@apple.com>
1030
1031         Fix null-deref crash sporadically seen after http://trac.webkit.org/changeset/201098
1032
1033         No review.
1034
1035         * DatabaseProcess/DatabaseProcess.cpp:
1036         (WebKit::DatabaseProcess::deleteWebsiteData): Don't access m_idbServer directly, as calling
1037           the idbServer() accessor is how you actually get your IDBServer created for you.
1038
1039 2016-05-18  Brian Burg  <bburg@apple.com>
1040
1041         Web Inspector: InspectorFrontendAPI.setTimelineProfilingEnabled should not implicitly show Timelines tab
1042         https://bugs.webkit.org/show_bug.cgi?id=157846
1043
1044         Reviewed by Timothy Hatcher.
1045
1046         Add a separate ShowTimelines message to WebInspector and WebInspectorUI. Have the
1047         start/stop profiling methods in public APIs explicitly call showTimelines() rather than
1048         relying on InspectorFrontendAPI to do it.
1049
1050         * UIProcess/API/C/WKInspector.cpp:
1051         (WKInspectorTogglePageProfiling):
1052         * UIProcess/WebInspectorProxy.cpp:
1053         (WebKit::WebInspectorProxy::showTimelines):
1054         * UIProcess/WebInspectorProxy.h:
1055         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
1056         (WKBundleInspectorSetPageProfilingEnabled):
1057         * WebProcess/WebPage/WebInspector.cpp:
1058         (WebKit::WebInspector::showTimelines):
1059         * WebProcess/WebPage/WebInspector.h:
1060         * WebProcess/WebPage/WebInspector.messages.in:
1061         * WebProcess/WebPage/WebInspectorUI.cpp:
1062         (WebKit::WebInspectorUI::showTimelines):
1063         * WebProcess/WebPage/WebInspectorUI.h:
1064         * WebProcess/WebPage/WebInspectorUI.messages.in:
1065
1066 2016-05-18  Brady Eidson  <beidson@apple.com>
1067
1068         Modern IDB: Add support for server side closing of open database connections.
1069         https://bugs.webkit.org/show_bug.cgi?id=157843
1070
1071         Reviewed by Alex Christensen.
1072
1073         - Implement the required IDB delegate code.
1074         - Make DatabaseProcess::deleteWebsiteData call the right method in IDB server.
1075
1076         * DatabaseProcess/DatabaseProcess.cpp:
1077         (WebKit::DatabaseProcess::deleteWebsiteData):
1078
1079         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1080         (WebKit::WebIDBConnectionToClient::didGetRecord):
1081         (WebKit::WebIDBConnectionToClient::didCloseFromServer):
1082         (WebKit::WebIDBConnectionToClient::confirmDidCloseFromServer):
1083         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
1084         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
1085
1086         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1087         (WebKit::WebIDBConnectionToServer::confirmDidCloseFromServer):
1088         (WebKit::WebIDBConnectionToServer::didStartTransaction):
1089         (WebKit::WebIDBConnectionToServer::didCloseFromServer):
1090         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
1091         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
1092
1093 2016-05-18  Brady Eidson  <beidson@apple.com>
1094
1095         Modern IDB: Make TestRunner.clearAllDatabases also delete IndexedDB databases (once doing so is supported).
1096         https://bugs.webkit.org/show_bug.cgi?id=157823
1097
1098         Reviewed by Alex Christensen.
1099
1100         * CMakeLists.txt:
1101         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1102         (WKWebsiteDataStoreRemoveAllIndexedDatabases):
1103         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
1104
1105 2016-05-18  Brian Burg  <bburg@apple.com>
1106
1107         REGRESSION(r200959): "Start Timeline Recording" menu item doesn't start recording
1108         https://bugs.webkit.org/show_bug.cgi?id=157821
1109         <rdar://problem/26335429>
1110
1111         Reviewed by Timothy Hatcher.
1112
1113         In r200959, WebInspectorProxy started sending start/stop profiling
1114         messages directly to the frontend process to avoid the inspected page
1115         process from implicitly showing the frontend. To compensate, the WebKit
1116         API layer was changed to call show() in togglePageProfiling().
1117
1118         Unfortunately, this fix was not quite right, because the ordering of
1119         the Show and StartPageProfiling messages is undefined. The latter has to bounce
1120         from UI to inspected to inspector processes, so the frontend may try
1121         to start profiling before the frontend is shown, causing it to be ignored.
1122
1123         This patch takes a different approach: just remove all implicit show()
1124         calls in the inspected page processes, and bounce both the Show and
1125         StartPageProfiling messages through the inspected page process to ensure
1126         they are handled in order by the frontend process.
1127
1128         * UIProcess/WebInspectorProxy.cpp:
1129         (WebKit::WebInspectorProxy::togglePageProfiling):
1130         Revert to sending to the inspected page process.
1131
1132         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
1133         (WKBundleInspectorSetPageProfilingEnabled):
1134         Add a call to show() now that the implementation doesn't do it implicitly.
1135
1136         * WebProcess/WebPage/WebInspector.cpp:
1137         (WebKit::WebInspector::startPageProfiling):
1138         (WebKit::WebInspector::stopPageProfiling):
1139         Don't implicitly show the inspector. These methods are only called
1140         through the WKBundleInspector API and via IPC from WebInspectorProxy.
1141
1142 2016-05-17  Beth Dakin  <bdakin@apple.com>
1143
1144         Make handleAcceptedCandidate a public function
1145         https://bugs.webkit.org/show_bug.cgi?id=157763
1146         -and corresponding-
1147         rdar://problem/26206397
1148
1149         Reviewed by Tim Horton.
1150
1151         This patch makes handleAcceptedCandidate a public member of WebViewImpl 
1152         instead of a private member. 
1153         * UIProcess/Cocoa/WebViewImpl.h:
1154         (WebKit::WebViewImpl::createWeakPtr):
1155
1156 2016-05-17  Dean Jackson  <dino@apple.com>
1157
1158         Remove ES6_GENERATORS flag
1159         https://bugs.webkit.org/show_bug.cgi?id=157815
1160         <rdar://problem/26332894>
1161
1162         Reviewed by Geoffrey Garen.
1163
1164         This flag isn't needed. Generators are enabled everywhere and
1165         part of a stable specification.
1166
1167         * Configurations/FeatureDefines.xcconfig:
1168
1169 2016-05-17  Dean Jackson  <dino@apple.com>
1170
1171         Temporarily enable Experimental Features
1172         https://bugs.webkit.org/show_bug.cgi?id=157810
1173         <rdar://problem/26330804>
1174
1175         Reviewed by Anders Carlsson.
1176
1177         We currently don't have good UI for enabling these features,
1178         which would mean Safari Technology Preview users would
1179         never be able to turn them on… unless we enable them by
1180         default temporarily.
1181
1182         * Shared/WebPreferencesDefinitions.h:
1183
1184 2016-05-17  Filip Pizlo  <fpizlo@apple.com>
1185
1186         WTF should know about Language
1187         https://bugs.webkit.org/show_bug.cgi?id=157756
1188
1189         Reviewed by Geoffrey Garen and Alexey Proskuryakov.
1190
1191         Rewires a bunch of includes/imports.
1192
1193         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1194         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1195         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1196         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1197
1198 2016-05-17  Jer Noble  <jer.noble@apple.com>
1199
1200         Unreviewed GTK+ and EFL bulid fix; make the audio playback user gesture requirement
1201         Cocoa-only.
1202
1203         * Shared/WebPreferencesDefinitions.h:
1204
1205 2016-05-16  Anders Carlsson  <andersca@apple.com>
1206
1207         Add a WKA extension point for WKPreferences SPI
1208         https://bugs.webkit.org/show_bug.cgi?id=157762
1209         rdar://problem/24529203
1210
1211         Reviewed by Sam Weinig.
1212
1213         * UIProcess/API/Cocoa/WKPreferences.mm:
1214
1215 2016-05-16  David Kilzer  <ddkilzer@apple.com>
1216
1217         Action sheets don’t work in presented view controllers
1218         <https://webkit.org/b/157754>
1219         <rdar://problem/26304845>
1220
1221         Reviewed by Anders Carlsson.
1222
1223         * UIProcess/ios/WKActionSheet.mm:
1224         (-[WKActionSheet presentSheetFromRect:]):
1225         (-[WKActionSheet willRotate]):
1226         - Call SPI to get the presenting view controller, since it may
1227           not always be the root view controller.
1228
1229 2016-05-13  Enrica Casucci  <enrica@apple.com>
1230
1231         Text selection is basically impossible on plain text pages.
1232         https://bugs.webkit.org/show_bug.cgi?id=157681
1233         rdar://problem/26065660
1234
1235         Reviewed by Darin Adler.
1236
1237         When dealing with a plain text file, the rules for deciding whether
1238         a position is selectable should be different and we should never
1239         switch to block selection.
1240
1241         * WebProcess/WebPage/ios/WebPageIOS.mm:
1242         (WebKit::WebPage::shouldSwitchToBlockModeForHandle):
1243         (WebKit::rectIsTooBigForSelection): Added helper function.
1244         (WebKit::WebPage::selectTextWithGranularityAtPoint):
1245         (WebKit::WebPage::getPositionInformation):
1246
1247 2016-05-16  Chelsea Pugh  <cpugh@apple.com>
1248
1249         [iOS] Remove dispatch_after in -[WKFormInputSession setSuggestions:]
1250         https://bugs.webkit.org/show_bug.cgi?id=157745
1251
1252         Reviewed by Dan Bernstein.
1253
1254         * UIProcess/ios/WKContentViewInteraction.mm:
1255         (-[WKFormInputSession setSuggestions:]): Remove the dispatch_after since
1256         there is no longer a chance of keyboard suggestions replacing the
1257         suggestions set here.
1258
1259 2016-05-16  Brian Burg  <bburg@apple.com>
1260
1261         Crash simulating keystrokes at WebKit::WebAutomationSession::platformSimulateKeyStroke
1262         https://bugs.webkit.org/show_bug.cgi?id=157737
1263         <rdar://problem/26292946>
1264
1265         Reviewed by Timothy Hatcher.
1266
1267         * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
1268         (WebKit::WebAutomationSession::platformSimulateKeyStroke):
1269         AppKit expects characters passed to [NSEvent keyEventWithType:...]
1270         to be non-nil even if there are no characters. Initialize characters
1271         to the empty string @"". It will be overwritten if the keystroke should
1272         produce any unicode characters.
1273
1274 2016-05-16  Brian Burg  <bburg@apple.com>
1275
1276         Web Automation: Automation.inspectBrowsingContext should automatically start page profiling
1277         https://bugs.webkit.org/show_bug.cgi?id=157739
1278
1279         Reviewed by Timothy Hatcher.
1280
1281         * UIProcess/API/C/WKInspector.cpp:
1282         (WKInspectorTogglePageProfiling):
1283         Implicitly show the Web Inspector in the C API command to preserve existing behavior.
1284
1285         * UIProcess/Automation/WebAutomationSession.cpp:
1286         (WebKit::WebAutomationSession::inspectorFrontendLoaded):
1287         If the frontend loaded, it was either because the user opened Web Inspector (and
1288         turning on page profiling is harmless), or it was loaded but not shown by the
1289         inspectBrowsingContext command. For the latter, we want to start page profiling
1290         before processing any additional commands so subsequent execution is captured.
1291
1292         * UIProcess/WebInspectorProxy.cpp:
1293         (WebKit::WebInspectorProxy::togglePageProfiling):
1294         Send the start/stop profiling messages directly to the WebInspectorUI process instead of
1295         bouncing through the inspected page's process, which does an implicit show() we don't want.
1296
1297         * UIProcess/WebPageProxy.cpp:
1298         (WebKit::WebPageProxy::inspector): Make it const.
1299         * UIProcess/WebPageProxy.h:
1300
1301 2016-05-16  Conrad Shultz  <conrad_shultz@apple.com>
1302
1303         Fix some deprecation warnings.
1304
1305         * UIProcess/mac/WKPrintingView.mm:
1306         (-[WKPrintingView _drawPDFDocument:page:atPoint:]):
1307         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
1308         (WebKit::PDFPlugin::setActiveAnnotation):
1309         (WebKit::PDFPlugin::lookupTextAtLocation):
1310         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
1311         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
1312         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
1313         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
1314         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
1315         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
1316         * WebProcess/WebPage/mac/WebPageMac.mm:
1317         (WebKit::drawPDFPage):
1318
1319 2016-04-06  Jer Noble  <jer.noble@apple.com>
1320
1321         [WK2] Add API to WKWebViewConfiguration to control autoplay policy.
1322         https://bugs.webkit.org/show_bug.cgi?id=156312
1323
1324         Reviewed by Dan Bernstein.
1325
1326         Add a new API to WKWebViewConfiguration to allow fine-grained control over when media is allowed
1327         to play without a user gesture, and simultaneously deprecate the existing, all-or-nothing API,
1328         and deprecated the equivalent SPIs.
1329
1330         * UIProcess/API/Cocoa/WKWebView.mm:
1331         (-[WKWebView _initializeWithConfiguration:]):
1332         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1333         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1334         (-[WKWebViewConfiguration init]):
1335         (-[WKWebViewConfiguration encodeWithCoder:]):
1336         (-[WKWebViewConfiguration initWithCoder:]):
1337         (-[WKWebViewConfiguration copyWithZone:]):
1338         (-[WKWebViewConfiguration _requiresUserActionForVideoPlayback]):
1339         (-[WKWebViewConfiguration _setRequiresUserActionForVideoPlayback:]):
1340         (-[WKWebViewConfiguration _requiresUserActionForAudioPlayback]):
1341         (-[WKWebViewConfiguration _setRequiresUserActionForAudioPlayback:]):
1342         (-[WKWebViewConfiguration requiresUserActionForMediaPlayback]):
1343         (-[WKWebViewConfiguration setRequiresUserActionForMediaPlayback:]):
1344         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1345
1346 2016-05-16  Brian Burg  <bburg@apple.com>
1347
1348         Web Automation: WebAutomationSessionProxy.js gets injected more than once sometimes
1349         https://bugs.webkit.org/show_bug.cgi?id=157716
1350         <rdar://problem/26287306>
1351
1352         Reviewed by Timothy Hatcher.
1353
1354         Whenever a script was injected into a non-normal world by a WebKit client,
1355         the WebProcess's WebAutomationSessionProxy singleton would get a
1356         notification that the window was cleared from the relevant frame.
1357         This notification happens when creating the world's window shell for
1358         the first time.
1359
1360         This code should ignore such notifications that originate from non-main world
1361         contexts. Web Inspector's instrumentation already ignored this, but
1362         the automation session notification comes in via a different WebKit2 layer.
1363
1364         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1365         (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
1366
1367 2016-05-13  Dean Jackson  <dino@apple.com>
1368
1369         Fix iOS Build.
1370
1371         * Shared/AssistedNodeInformation.h:
1372         (WebKit::OptionItem::OptionItem):
1373
1374 2016-05-13  Sam Weinig  <sam@webkit.org>
1375
1376         REGRESSION (r200463): Autofill Credit Card expected but got Autofill Contact
1377         <rdar://problem/26251538>
1378         https://bugs.webkit.org/show_bug.cgi?id=157701
1379
1380         Reviewed by Dan Bernstein.
1381
1382         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
1383         (-[WKWebProcessPlugInFrame _certificateChain]):
1384         We need to do a retain-autorelease here now because the CertificateInfo's that contain the
1385         cached certificate chain, are being destroyed, and therefore destroying the chain, before this
1386         function returns. This used to work when the chain wasn't just a cache, because there was still
1387         a strong reference to it being held by the ResourceResponse's CertificateInfo copy, but now
1388         there is none.
1389
1390 2016-05-13  Dean Jackson  <dino@apple.com>
1391
1392         [iOS] <select> elements popover should render right-aligned when in RTL mode
1393         https://bugs.webkit.org/show_bug.cgi?id=157699
1394         <rdar://problem/26282319>
1395
1396         Reviewed by Simon Fraser.
1397
1398         Some follow-up changes as suggested by Darin in review.
1399
1400         * Shared/AssistedNodeInformation.h: Use initializers so we can
1401         remove the constructors.
1402         (WebKit::OptionItem::OptionItem): Deleted.
1403         (WebKit::AssistedNodeInformation::AssistedNodeInformation): Deleted.
1404         * UIProcess/ios/forms/WKFormSelectPopover.mm: Add a comment to explain
1405         why we are explicitly setting the language.
1406         (-[WKSelectTableViewController initWithView:hasGroups:]):
1407
1408 2016-05-13  Chris Dumez  <cdumez@apple.com>
1409
1410         [NetworkCache] Avoid having to re-parse URLs after deserializing them
1411         https://bugs.webkit.org/show_bug.cgi?id=157660
1412
1413         Reviewed by Darin Adler.
1414
1415         * NetworkProcess/cache/NetworkCacheCoders.cpp:
1416         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::encode): Deleted.
1417         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode): Deleted.
1418         * NetworkProcess/cache/NetworkCacheCoders.h:
1419         Drop template specializations used by our network cache for encoding
1420         / decoding URLs as Strings. This causes us to now rely on
1421         URL::encode() / URL::decode() instead.
1422
1423         * Shared/WebCoreArgumentCoders.cpp:
1424         (IPC::ArgumentCoder<BlobPart>::decode):
1425         Fix bug in BlobPart encoding / decoding. It was encoding the url member
1426         as a URL but decoding it as a String.
1427
1428 2016-05-13  Dan Bernstein  <mitz@apple.com>
1429
1430         Try to fix some non-iOS builds.
1431
1432         * mac/postprocess-framework-headers.sh:
1433
1434 2016-05-13  Ryan Haddad  <ryanhaddad@apple.com>
1435
1436         Attempt to fix the iOS build after r200874
1437
1438         Unreviewed build fix.
1439
1440         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1441
1442 2016-05-13  Sam Weinig  <sam@webkit.org>
1443
1444         Rename WKDataDetectorTypeSpotlightSuggestion to WKDataDetectorTypeLookupSuggestion
1445         <rdar://problem/26269611>
1446
1447         Reviewed by Dan Bernstein and Enrica Casucci. 
1448
1449         * Shared/API/Cocoa/WKFoundation.h:
1450         * Shared/API/c/WKDeclarationSpecifiers.h:
1451         * UIProcess/API/Cocoa/WKWebView.mm:
1452         (fromWKDataDetectorTypes):
1453         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1454         * mac/postprocess-framework-headers.sh:
1455
1456 2016-05-13  Beth Dakin  <bdakin@apple.com>
1457
1458         Add dyldSPI.h for linked on or after checks, and add one for link preview
1459         https://bugs.webkit.org/show_bug.cgi?id=157401
1460
1461         Reviewed by Darin Adler.
1462
1463         Set _allowsLinkPreview to YES for programs linked on or after 
1464         firstSDKVersionWithLinkPreviewEnabledByDefault.
1465         * UIProcess/API/Cocoa/WKWebView.h:
1466         * UIProcess/API/Cocoa/WKWebView.mm:
1467         (-[WKWebView _initializeWithConfiguration:]):
1468
1469 2016-05-13  Jer Noble  <jer.noble@apple.com>
1470
1471         Fullscreen view attempts to resize when in 2-up mode
1472         https://bugs.webkit.org/show_bug.cgi?id=157558
1473
1474         Reviewed by Darin Adler.
1475
1476         No need to react to NSApplicationDidChangeScreenParametersNotification to resize the
1477         fullscreen window when the screen parameters change; the NSWindow fullscreen machinery
1478         will do that on our behalf.
1479
1480         * UIProcess/mac/WKFullScreenWindowController.mm:
1481         (-[WKFullScreenWindowController windowDidLoad]): Deleted.
1482         (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): Deleted.
1483
1484 2016-05-13  Antoine Quint  <graouts@apple.com>
1485
1486         [iOS] <select> elements popover should render right-aligned when in RTL mode
1487         https://bugs.webkit.org/show_bug.cgi?id=157672
1488         <rdar://problem/26193442>
1489
1490         Reviewed by Darin Adler.
1491
1492         Add a new isRTL field to the AssistedNodeInformation as specified by the assisted
1493         node's render style and account for it when displaying the table view shown in the
1494         popover attached to the assisted node using the UIView semanticContentAttribute
1495         property.
1496
1497         * Shared/AssistedNodeInformation.cpp:
1498         (WebKit::AssistedNodeInformation::encode):
1499         (WebKit::AssistedNodeInformation::decode):
1500         * Shared/AssistedNodeInformation.h:
1501         (WebKit::AssistedNodeInformation::AssistedNodeInformation):
1502         * UIProcess/ios/forms/WKFormSelectPopover.mm:
1503         (-[WKSelectTableViewController initWithView:hasGroups:]):
1504         (-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
1505         * WebProcess/WebPage/ios/WebPageIOS.mm:
1506         (WebKit::WebPage::getAssistedNodeInformation):
1507
1508 2016-05-13  Tina Liu  <iting_liu@apple.com>
1509
1510         Revert r199691.
1511         https://bugs.webkit.org/show_bug.cgi?id=157645
1512         <rdar://problem/26235373>
1513
1514         Reviewed by Darin Adler.
1515
1516         * Shared/WebProcessCreationParameters.cpp:
1517         (WebKit::WebProcessCreationParameters::encode): Deleted.
1518         (WebKit::WebProcessCreationParameters::decode): Deleted.
1519         * Shared/WebProcessCreationParameters.h:
1520         * UIProcess/API/C/mac/WKContextPrivateMac.h:
1521         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
1522         (WKContextSetPrivateBrowsingPluginLoadClientPolicy): Deleted.
1523         * UIProcess/WebProcessPool.cpp:
1524         (WebKit::WebProcessPool::setPluginLoadClientPolicy):
1525         (WebKit::WebProcessPool::createNewWebProcess): Deleted.
1526         (WebKit::WebProcessPool::setPluginLoadClientPolicyForPrivateBrowsing): Deleted.
1527         (WebKit::WebProcessPool::setPrivateBrowsingPluginLoadClientPolicy): Deleted.
1528         (WebKit::WebProcessPool::clearPluginClientPolicies): Deleted.
1529         * UIProcess/WebProcessPool.h:
1530         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1531         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
1532         (WebKit::WebPlatformStrategies::longestMatchedWildcardHostForHost):
1533         (WebKit::WebPlatformStrategies::replaceHostWithMatchedWildcardHost):
1534         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
1535         (WebKit::WebPlatformStrategies::populatePluginCache):
1536         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicyForPrivateBrowsing): Deleted.
1537         (WebKit::WebPlatformStrategies::setPrivateBrowsingPluginLoadClientPolicy): Deleted.
1538         (WebKit::WebPlatformStrategies::clearPluginClientPolicies): Deleted.
1539         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHostForPrivateBrowsing): Deleted.
1540         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1541         * WebProcess/WebProcess.cpp:
1542         (WebKit::WebProcess::initializeWebProcess):
1543         (WebKit::WebProcess::setPluginLoadClientPolicies): Deleted.
1544         (WebKit::WebProcess::setPrivateBrowsingPluginLoadClientPolicy): Deleted.
1545         * WebProcess/WebProcess.h:
1546         * WebProcess/WebProcess.messages.in:
1547
1548 2016-05-12  Daniel Bates  <dabates@apple.com>
1549
1550         Use SecTask SPI to retrieve code signing identifier for user directory suffix
1551         https://bugs.webkit.org/show_bug.cgi?id=157570
1552         <rdar://problem/25706517>
1553
1554         Reviewed by Darin Adler.
1555
1556         It is sufficient to make use of the SecTask SPI to retrieve the code signing
1557         identifier of the embedding client for use in the user directory suffix. This
1558         avoids the need to allow Code Signing Services to have access to the bundle
1559         of the embedding client.
1560
1561         * Shared/mac/ChildProcessMac.mm:
1562         (WebKit::ChildProcess::initializeSandbox): Use the code signing identifier of the
1563         embedding client as part of the user directory suffix if available.
1564         * Shared/mac/CodeSigning.h: Update comment and include header wtf/spi/darwin/XPCSPI.h
1565         for the definition of xpc_connection_t. Renamed codeSigningIdentifier() to codeSigningIdentifierForCurrentProcess()
1566         to convey that it returns the code signing identifier for the current process. Repurposed
1567         the name codeSigningIdentifier for the variant of this function that takes a xpc_connection_t.
1568         * Shared/mac/CodeSigning.mm:
1569         (WebKit::codeSigningIdentifier): Added. Uses the audit token associated with the specified
1570         XPC connection to get the code signing identifier for the embedding client.
1571         (WebKit::codeSigningIdentifierForCurrentProcess): Renamed; formerly named codeSigningIdentifier.
1572         Implemented in terms of the SecTask API.
1573         (WebKit::secCodeForCurrentProcess): Deleted.
1574         (WebKit::secCodeForProcess): Deleted.
1575         (WebKit::secCodeSigningInformation): Deleted.
1576         (WebKit::appleSignedOrMacAppStoreSignedOrAppleDeveloperSignedRequirement): Deleted.
1577         (WebKit::secCodeSigningIdentifier): Deleted.
1578         (WebKit::codeSigningIdentifierForProcess): Deleted.
1579         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1580         (WebKit::connectToService): Update code due to renaming.
1581
1582 2016-05-12  Konstantin Tokarev  <annulen@yandex.ru>
1583
1584         Use reference instead of pointer in FrameLoaderClient::saveViewStateToItem.
1585         https://bugs.webkit.org/show_bug.cgi?id=157624
1586
1587         Reviewed by Darin Adler.
1588
1589         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1590         (WebKit::WebFrameLoaderClient::saveViewStateToItem):
1591         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1592
1593 2016-05-12  Csaba Osztrogonác  <ossy@webkit.org>
1594
1595         Remove ENABLE(ES6_ARROWFUNCTION_SYNTAX) guards
1596         https://bugs.webkit.org/show_bug.cgi?id=157564
1597
1598         Reviewed by Darin Adler.
1599
1600         * Configurations/FeatureDefines.xcconfig:
1601
1602 2016-05-11  Anders Carlsson  <andersca@apple.com>
1603
1604         We have two different types of contextual menus in iBooks
1605         https://bugs.webkit.org/show_bug.cgi?id=157587
1606         rdar://problem/25904169
1607
1608         Reviewed by Darin Adler.
1609
1610         Give clients the option to bypass the WebKit context menu machinery.
1611
1612         * UIProcess/mac/WebContextMenuProxyMac.mm:
1613         (WebKit::WebContextMenuProxyMac::showContextMenu):
1614
1615 2016-05-10  Brian Burg  <bburg@apple.com>
1616
1617         Web Automation: add command to asynchronously load the Web Inspector frontend in the background
1618         https://bugs.webkit.org/show_bug.cgi?id=157509
1619
1620         Reviewed by Timothy Hatcher and Joseph Pecoraro.
1621
1622         In order to make it easier to debug code that executes as a result of an automation
1623         command, this patch adds a new Automation command to asynchronously load the debugger
1624         and Inspector frontend. It is designed for use by automation clients to implement an
1625         auto-inspection feature to aid in debugging automation scripts.
1626
1627         * UIProcess/Automation/Automation.json: Add new command.
1628         * UIProcess/Automation/WebAutomationSession.cpp:
1629         (WebKit::WebAutomationSession::inspectBrowsingContext): Added.
1630         (WebKit::WebAutomationSession::inspectorFrontendLoaded): Added.
1631         This message is forwarded by WebInspectorProxy to the inspected page's session.
1632
1633         * UIProcess/Automation/WebAutomationSession.h:
1634         * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
1635         (WebKit::WebAutomationSession::sendSynthesizedEventsToPage):
1636         Force the active automation window to become key and bring to front prior to
1637         sending each NSEvent. This way, if the Inspector pauses while a command executes,
1638         the automation window will get back focus when the Inspector unpauses just before
1639         the next synthesized mouse or keyboard NSEvent is sent to its NSWindow.
1640
1641         * UIProcess/WebInspectorProxy.cpp:
1642         (WebKit::WebInspectorProxy::frontendLoaded):
1643         Forward to the inspected page's session.
1644
1645         * UIProcess/WebInspectorProxy.h:
1646         * UIProcess/WebInspectorProxy.messages.in: Add notification of the frontend's load.
1647
1648         * WebProcess/WebPage/WebInspectorUI.cpp:
1649         (WebKit::WebInspectorUI::frontendLoaded):
1650         Kick off notifying the automation session in UIProcess that the inspector loaded.
1651
1652         (WebKit::WebInspectorUI::closeWindow):
1653         In some circumstances, the Web Inspector can be loaded without showing
1654         the window. If this hidden page closes, make sure the frontend host gets
1655         a chance to disconnect its InspectorFrontendClient. Normally this happens
1656         when the window closes, but unshown Inspectors do not get window instances.
1657
1658 2016-05-11  Chris Dumez  <cdumez@apple.com>
1659
1660         Update Node::appendChild() / replaceChild() / removeChild() / insertBefore() to take references instead of pointers
1661         https://bugs.webkit.org/show_bug.cgi?id=157556
1662
1663         Reviewed by Darin Adler.
1664
1665         * WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
1666         (-[WKDOMNode insertNode:before:]):
1667         (-[WKDOMNode appendChild:]):
1668         (-[WKDOMNode removeChild:]):
1669         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
1670         (WebKit::PDFPlugin::PDFPlugin):
1671         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
1672         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
1673
1674 2016-05-11  Brady Eidson  <beidson@apple.com>
1675
1676         Modern IDB: IDBOpenDBRequests that are stop()'ed don't notify the IDBServer of that fact.
1677         https://bugs.webkit.org/show_bug.cgi?id=157448
1678
1679         Reviewed by Alex Christensen.
1680
1681         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1682         (WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
1683         (WebKit::WebIDBConnectionToClient::openDBRequestCancelled):
1684         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
1685         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
1686
1687         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1688         (WebKit::WebIDBConnectionToServer::didFinishHandlingVersionChangeTransaction):
1689         (WebKit::WebIDBConnectionToServer::openDBRequestCancelled):
1690         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
1691
1692 2016-05-11  Myles C. Maxfield  <mmaxfield@apple.com>
1693
1694         Fix a typo in r200330
1695
1696         Unreviewed.
1697
1698         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1699
1700 2016-05-10  Sam Weinig  <sam@webkit.org>
1701
1702         Only expose WKDataDetectorTypes and -[WKWebViewConfiguration dataDetectorTypes] on iOS
1703         for now, since we don't have it fully implemented on Mac.
1704
1705         Reviewed by Tim Horton.
1706
1707         * UIProcess/API/Cocoa/WKWebView.mm:
1708         (fromWKDataDetectorTypes):
1709         (-[WKWebView _initializeWithConfiguration:]):
1710         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1711         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1712         (-[WKWebViewConfiguration encodeWithCoder:]):
1713         (-[WKWebViewConfiguration initWithCoder:]):
1714         (-[WKWebViewConfiguration copyWithZone:]):
1715
1716 2016-05-10  Sam Weinig  <sam@webkit.org>
1717
1718         Add SPI for Data Detectors to get ranges of text around an existing range.
1719         <rdar://problem/26009749>
1720
1721         Reviewed by Enrica Casucci.
1722
1723         * WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
1724         * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
1725         (-[WKDOMRange rangeByExpandingToWordBoundaryByCharacters:inDirection:]):
1726
1727 2016-05-10  Enrica Casucci  <enrica@apple.com>
1728
1729         Numerous block selection issues on iOS.
1730         https://bugs.webkit.org/show_bug.cgi?id=157490
1731         rdar://problem/25717977
1732         rdar://problem/23042215
1733
1734         Reviewed by Tim Horton.
1735
1736         This patch fixes a number of issues with block selection on iOS.
1737         We no longer eagerly choose block selection vs text selection and we
1738         make sure we are capable of switching back to text selection from block
1739         under every circumstance. The patch also fixes the logic used to decide
1740         when to switch to block selection. It now computes the rectangle for the
1741         paragraph containing the initial text selection to decide when we are
1742         actually dragging outside the boundaries of the paragraph block.
1743
1744         * UIProcess/WebPageProxy.h:
1745         * UIProcess/WebPageProxy.messages.in:
1746         * UIProcess/ios/WKContentViewInteraction.mm:
1747         (selectionChangedWithGesture):
1748         (selectionChangedWithTouch):
1749         (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
1750         * UIProcess/ios/WebPageProxyIOS.mm:
1751         (WebKit::WebPageProxy::gestureCallback):
1752         (WebKit::WebPageProxy::touchesCallback):
1753         (WebKit::WebPageProxy::autocorrectionDataCallback):
1754         (WebKit::WebPageProxy::selectWithGesture):
1755         (WebKit::WebPageProxy::updateSelectionWithTouches):
1756         * WebProcess/WebPage/WebPage.h:
1757         * WebProcess/WebPage/ios/WebPageIOS.mm:
1758         (WebKit::selectionBoxForRange):
1759         (WebKit::canShrinkToTextSelection):
1760         (WebKit::hasCustomLineHeight):
1761         (WebKit::WebPage::rangeForWebSelectionAtPosition):
1762         (WebKit::WebPage::contractedRangeFromHandle):
1763         (WebKit::WebPage::updateBlockSelectionWithTouch):
1764         (WebKit::WebPage::clearSelection):
1765         (WebKit::WebPage::switchToBlockSelectionAtPoint):
1766         (WebKit::WebPage::shouldSwitchToBlockModeForHandle):
1767         (WebKit::WebPage::updateSelectionWithTouches):
1768         (WebKit::WebPage::selectWithTwoTouches):
1769
1770 2016-05-10  Alex Christensen  <achristensen@webkit.org>
1771
1772         Handle _schemeUpgraded delegate callbacks in NSURLSessionDataDelegate
1773         https://bugs.webkit.org/show_bug.cgi?id=157354
1774         rdar://problem/25842107
1775
1776         Reviewed by Darin Adler.
1777
1778         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1779         (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
1780         When we make a request to a http url and CFNetwork determines that that url would have redirected to an HSTS site
1781         and it is going to change the request to an https request, this delegate callback is called.  We need to call the
1782         redirection code to have the same behavior as the NSURLConnection-based loader.
1783
1784 2016-05-10  Csaba Osztrogonác  <ossy@webkit.org>
1785
1786         Fix the !ENABLE(VIDEO) build
1787         https://bugs.webkit.org/show_bug.cgi?id=157518
1788
1789         Reviewed by Alex Christensen.
1790
1791         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1792         (WebKit::WebsiteDataStore::fetchData):
1793         (WebKit::WebsiteDataStore::removeData):
1794         * WebProcess/WebProcess.cpp:
1795         (WebKit::WebProcess::initializeWebProcess):
1796
1797 2016-05-10  Anders Carlsson  <andersca@apple.com>
1798
1799         Fix more deprecation warnings.
1800
1801         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
1802         (NetworkServiceInitializer):
1803         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
1804         (PluginServiceInitializer):
1805         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
1806         (WebContentServiceInitializer):
1807
1808 2016-05-10  Chris Dumez  <cdumez@apple.com>
1809
1810         [SpeculativeValidation] Do not start a preload if there is already one pending
1811         https://bugs.webkit.org/show_bug.cgi?id=157522
1812         <rdar://problem/26156083>
1813
1814         Reviewed by Alex Christensen.
1815
1816         Do not start a preload if there is already one pending. We failed to check in
1817         SpeculativeLoadManager::preloadEntry() if there was already a pending preload.
1818         As a result, we would sometimes cancel an already pending preload and start
1819         one from scratch which is inefficient. It would also sometimes lead to hitting
1820         an assertion in the SpeculativeLoad destructor because we could destroy the
1821         SpeculativeLoad without finishing or cancelling the load.
1822
1823         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
1824         (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
1825
1826 2016-05-10  Anders Carlsson  <andersca@apple.com>
1827
1828         Fix a deprecation warning.
1829
1830         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
1831         (DatabaseServiceInitializer):
1832
1833 2016-05-10  Tim Horton  <timothy_horton@apple.com>
1834
1835         Clicks do not work in Safari after pressing the Track package button in Gmail
1836         https://bugs.webkit.org/show_bug.cgi?id=157508
1837         <rdar://problem/22646404>
1838
1839         Reviewed by Anders Carlsson.
1840
1841         * UIProcess/Cocoa/WebViewImpl.mm:
1842         (WebKit::WebViewImpl::viewDidMoveToWindow):
1843         Explicitly cancel the force-click animation when we're removing the gesture
1844         recognizer due to the WK*View being unparented. This works around a bug
1845         where we don't get the cancellation callback in this situation, causing
1846         Safari to be left in an inconsistent and unexpected state.
1847
1848 2016-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>
1849
1850         [Linux] Remove seccomp filters support
1851         https://bugs.webkit.org/show_bug.cgi?id=157380
1852
1853         Reviewed by Darin Adler.
1854
1855         * NetworkProcess/NetworkProcessCreationParameters.cpp:
1856         (WebKit::NetworkProcessCreationParameters::encode): Deleted.
1857         (WebKit::NetworkProcessCreationParameters::decode): Deleted.
1858         * NetworkProcess/NetworkProcessCreationParameters.h:
1859         * PlatformEfl.cmake:
1860         * PlatformGTK.cmake:
1861         * Shared/WebProcessCreationParameters.cpp:
1862         (WebKit::WebProcessCreationParameters::encode): Deleted.
1863         (WebKit::WebProcessCreationParameters::decode): Deleted.
1864         * Shared/WebProcessCreationParameters.h:
1865         * Shared/linux/SeccompFilters/OpenSyscall.cpp: Removed.
1866         * Shared/linux/SeccompFilters/OpenSyscall.h: Removed.
1867         * Shared/linux/SeccompFilters/SeccompBroker.cpp: Removed.
1868         * Shared/linux/SeccompFilters/SeccompBroker.h: Removed.
1869         * Shared/linux/SeccompFilters/SeccompFilters.cpp: Removed.
1870         * Shared/linux/SeccompFilters/SeccompFilters.h: Removed.
1871         * Shared/linux/SeccompFilters/SigactionSyscall.cpp: Removed.
1872         * Shared/linux/SeccompFilters/SigactionSyscall.h: Removed.
1873         * Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp: Removed.
1874         * Shared/linux/SeccompFilters/SigprocmaskSyscall.h: Removed.
1875         * Shared/linux/SeccompFilters/Syscall.cpp: Removed.
1876         * Shared/linux/SeccompFilters/Syscall.h: Removed.
1877         * Shared/linux/SeccompFilters/SyscallPolicy.cpp: Removed.
1878         * Shared/linux/SeccompFilters/SyscallPolicy.h: Removed.
1879         * Shared/linux/SeccompFilters/XDGBaseDirectory.h: Removed.
1880         * Shared/linux/SeccompFilters/XDGBaseDirectoryGLib.cpp: Removed.
1881         * UIProcess/WebProcessPool.cpp:
1882         (WebKit::WebProcessPool::ensureNetworkProcess): Deleted.
1883         (WebKit::WebProcessPool::createNewWebProcess): Deleted.
1884         (WebKit::WebProcessPool::cookieStorageDirectory): Deleted.
1885         * UIProcess/WebProcessPool.h:
1886         * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp: Removed.
1887         * WebProcess/efl/SeccompFiltersWebProcessEfl.h: Removed.
1888         * WebProcess/gtk/SeccompFiltersWebProcessGtk.cpp: Removed.
1889         * WebProcess/gtk/SeccompFiltersWebProcessGtk.h: Removed.
1890         * WebProcess/soup/WebProcessSoup.cpp:
1891         (WebKit::WebProcess::platformInitializeWebProcess): Deleted.
1892
1893 2016-05-09  Tim Horton  <timothy_horton@apple.com>
1894
1895         REGRESSION (r191922): Zoom in/Zoom Out is not working for PDFs
1896         https://bugs.webkit.org/show_bug.cgi?id=157503
1897         <rdar://problem/23736297>
1898
1899         Reviewed by Anders Carlsson.
1900
1901         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
1902         Restore a requiresUnifiedScaleFactor that was lost in r191922.
1903
1904         * UIProcess/WebPageProxy.cpp:
1905         (WebKit::WebPageProxy::didCommitLoadForFrame):
1906         (WebKit::WebPageProxy::mainFramePluginHandlesPageScaleGestureDidChange):
1907         * UIProcess/WebPageProxy.h:
1908         * UIProcess/WebPageProxy.messages.in:        
1909         * WebProcess/Plugins/PluginView.cpp:
1910         (WebKit::PluginView::didInitializePlugin):
1911         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1912         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1913         Separate mainFramePluginHandlesPageScaleGesture changes out from didCommitLoadForFrame,
1914         because the PluginView doesn't exist at this point, so it can't answer
1915         the handlesPageScaleGesture question correctly (or at all).
1916         Instead, we'll send the message when the main-frame PluginView is initialized.
1917
1918 2016-05-09  Simon Fraser  <simon.fraser@apple.com>
1919
1920         [iOS] visibility:hidden -webkit-overflow-scrolling: touch divs can interfere with page scrolling
1921         https://bugs.webkit.org/show_bug.cgi?id=157496
1922         rdar://problem/22963278
1923
1924         Reviewed by Tim Horton.
1925
1926         UIScrollViews are constructed in the UI process for visibility:hidden scrollable elements
1927         with -webkit-overflow-scrolling: touch, and these intercept user events when they should not.
1928
1929         Fix by propagating a "contentsHidden" flag from the web process which is used to turn off
1930         user interaction on these views.
1931
1932         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1933         (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
1934         * Shared/mac/RemoteLayerTreeTransaction.h:
1935         * Shared/mac/RemoteLayerTreeTransaction.mm:
1936         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
1937         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1938         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1939         (WebKit::dumpChangedLayers):
1940         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
1941         (-[UIView _recursiveFindDescendantScrollViewAtPoint:withEvent:]): Our custom hit
1942         test needs to take view.isUserInteractionEnabled into account.
1943         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1944         (WebKit::PlatformCALayerRemote::setHidden):
1945         (WebKit::PlatformCALayerRemote::contentsHidden):
1946         (WebKit::PlatformCALayerRemote::setContentsHidden):
1947         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1948
1949 2016-05-09  Ada Chan  <adachan@apple.com>
1950
1951         Introduce WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen() and use it in WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen()
1952         https://bugs.webkit.org/show_bug.cgi?id=157493
1953
1954         Reviewed by Dan Bernstein.
1955
1956         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
1957         (WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):
1958
1959 2016-05-06  Ada Chan  <adachan@apple.com>
1960
1961         Add WKPageRef SPI to tell whether there's a video playing in enhanced fullscreen
1962         https://bugs.webkit.org/show_bug.cgi?id=157434
1963
1964         Reviewed by Darin Adler.
1965
1966         * UIProcess/API/C/mac/WKPagePrivateMac.h:
1967         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
1968         (WKPageIsPlayingVideoInEnhancedFullscreen):
1969         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
1970         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
1971         (WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):
1972         * UIProcess/WebPageProxy.cpp:
1973         (WebKit::WebPageProxy::isPlayingVideoInEnhancedFullscreen):
1974         * UIProcess/WebPageProxy.h:
1975
1976 2016-05-09  Anders Carlsson  <andersca@apple.com>
1977
1978         Add injected bundle SPI for getting favicon and touch icon URLs
1979         https://bugs.webkit.org/show_bug.cgi?id=157435
1980
1981         Reviewed by Darin Adler.
1982
1983         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
1984         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
1985         (collectIcons):
1986         New helper function that calls into the WebCore LinkCollector.
1987
1988         (-[WKWebProcessPlugInFrame appleTouchIconURLs]):
1989         Call collectIcons.
1990
1991         (-[WKWebProcessPlugInFrame faviconURLs]):
1992         Ditto.
1993
1994 2016-05-06  Simon Fraser  <simon.fraser@apple.com>
1995
1996         [iOS WK2] Font size increases on some pages after navigating then going back
1997         https://bugs.webkit.org/show_bug.cgi?id=157441
1998         rdar://problem/22873240
1999
2000         Reviewed by Darin Adler.
2001
2002         There's an ordering dependency between setting the viewport configuration and doing
2003         layouts when going back to a page from the page cache that is incorrectly handled.
2004
2005         In FrameLoader::commitProvisionalLoad(), CachedPage::restore() triggers a layout under
2006         updateContentsSize(), but this happens before dispatchDidCommitLoad() which updates
2007         the viewport arguments via ViewportConfiguration::setViewportArguments().
2008
2009         This issue is not addressed by the current commit. But a second problem is:
2010         if the inputs to text autosizing change, we need to invalidate the autosizing state.
2011         The relevant input here is the fixed layout width (which is determined from the viewport
2012         configuration).
2013
2014         The current code invalidated text autosizing when m_viewportConfiguration.minimumLayoutSize()
2015         changed, but the correct behavior is to invalidate based on fixed layout size changing.
2016
2017         * WebProcess/WebPage/WebPage.cpp:
2018         (WebKit::WebPage::sendViewportAttributesChanged):
2019         (WebKit::WebPage::setFixedLayoutSize):
2020         * WebProcess/WebPage/WebPage.h:
2021         * WebProcess/WebPage/ios/WebPageIOS.mm:
2022         (WebKit::WebPage::resetTextAutosizing):
2023         (WebKit::WebPage::dynamicViewportSizeUpdate):
2024         (WebKit::WebPage::viewportConfigurationChanged):
2025         (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize): Deleted.
2026         (WebKit::WebPage::resetTextAutosizingBeforeLayoutIfNeeded): Deleted.
2027
2028 2016-05-09  Alex Christensen  <achristensen@webkit.org>
2029
2030         Don't use DiskCache for media resource loads
2031         https://bugs.webkit.org/show_bug.cgi?id=157405
2032
2033         Reviewed by Darin Adler.
2034
2035         * NetworkProcess/cache/NetworkCache.cpp:
2036         (WebKit::NetworkCache::makeRetrieveDecision):
2037         (WebKit::NetworkCache::makeStoreDecision):
2038         * NetworkProcess/cache/NetworkCache.h:
2039         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2040         (WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):
2041
2042 2016-05-08  Myles C. Maxfield  <mmaxfield@apple.com>
2043
2044         [OS X] Migrate our Font classes entirely off of NSFont
2045         https://bugs.webkit.org/show_bug.cgi?id=157464
2046
2047         Reviewed by Darin Adler.
2048
2049         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
2050         (WebKit::WebPopupMenu::setUpPlatformData):
2051         * WebProcess/WebPage/mac/WebPageMac.mm:
2052         (WebKit::WebPage::fontAtSelection):
2053
2054 2016-05-06  Joseph Pecoraro  <pecoraro@apple.com>
2055
2056         Rename HitTestRequest DisallowShadowContent to DisallowUserAgentShadowContent
2057         https://bugs.webkit.org/show_bug.cgi?id=157447
2058
2059         Reviewed by Ryosuke Niwa.
2060
2061         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
2062         (WebKit::WebPage::findZoomableAreaForPoint):
2063         * WebProcess/WebPage/WebFrame.cpp:
2064         (WebKit::WebFrame::hitTest):
2065         * WebProcess/WebPage/WebPage.cpp:
2066         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
2067         * WebProcess/WebPage/ios/WebPageIOS.mm:
2068         (WebKit::WebPage::rangeForWebSelectionAtPosition):
2069         (WebKit::WebPage::rangeForBlockAtPoint):
2070         (WebKit::WebPage::getPositionInformation):
2071
2072 2016-05-06  Simon Fraser  <simon.fraser@apple.com>
2073
2074         Enable IOS_TEXT_AUTOSIZING on Mac and make it testable
2075         https://bugs.webkit.org/show_bug.cgi?id=157432
2076         rdar://problem/16406720
2077
2078         Reviewed by Dean Jackson.
2079
2080         Enable IOS_TEXT_AUTOSIZING on Mac so it can be tested.
2081         
2082         Make the setTextAutosizingEnabled() Setting work, and plumb it through WK1 and WK2
2083         preferences for WTR and DRT. Make textAutosizingWindowSizeOverride() work, for layout tests.
2084         These two settings are shared with TEXT_AUTOSIZING.
2085
2086         Add a TextAutosizing log channel, which is useful for generated -expected.html results.
2087
2088         Move adjustComputedFontSizesOnBlocks() and related code from RenderObject to RenderElement
2089         without changes.
2090
2091         An implication of this set of changes is that the way clients enable text autosizing
2092         has changed. Previously, they set the "MinimumZoomFontSize" preference to 0.
2093         Settings::defaultMinimumZoomFontSize() used to do this in order to enable text autosizing
2094         on iPhone only, not iPad.
2095
2096         Now the preferred technique is to leave minimumZoomFontSize alone, and to use textAutosizingEnabled()
2097         instead. Settings::defaultTextAutosizingEnabled() now does the check for iPhone.
2098
2099         UIWebView calls WebKitGetMinimumZoomFontSize() to setup the default minimum font zoom size,
2100         which will now always return 15, but had no other code that toggled this. So it's safe to just rely
2101         on Settings::defaultTextAutosizingEnabled() doing the right thing for iPhone/iPad.
2102
2103         * Configurations/FeatureDefines.xcconfig:
2104         * Shared/WebPreferencesDefinitions.h:
2105         * UIProcess/API/Cocoa/WKPreferences.mm:
2106         (-[WKPreferences _textAutosizingEnabled]):
2107         (-[WKPreferences _setTextAutosizingEnabled:]):
2108         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2109         * WebProcess/WebPage/WebPage.cpp:
2110         (WebKit::WebPage::updatePreferences):
2111
2112 2016-05-06  Dean Jackson  <dino@apple.com>
2113
2114         Regions, Shapes and Tracks don't need runtime features
2115         https://bugs.webkit.org/show_bug.cgi?id=157426
2116         <rdar://problem/26146262>
2117
2118         Reviewed by Simon Fraser.
2119
2120         The following RuntimeEnabledFeatures can be removed since
2121         we have no need to disable them (they are stable and have
2122         shipped for a while):
2123         - CSS Regions
2124         - CSS Shapes
2125         - Media tracks
2126
2127         * Shared/WebPreferencesDefinitions.h:
2128         * UIProcess/API/C/WKPreferences.cpp:
2129         (WKPreferencesSetCSSRegionsEnabled): Deleted.
2130         (WKPreferencesGetCSSRegionsEnabled): Deleted.
2131         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2132         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2133         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Deleted.
2134         (WebKit::InjectedBundle::setCSSRegionsEnabled): Deleted.
2135         (WebKit::InjectedBundle::setCSSCompositingEnabled): Deleted.
2136         * WebProcess/InjectedBundle/InjectedBundle.h:
2137         * WebProcess/WebPage/WebPage.cpp:
2138         (WebKit::WebPage::updatePreferences): Deleted.
2139
2140 2016-05-05  Ada Chan  <adachan@apple.com>
2141
2142         Create a fence in WebVideoFullscreenManagerProxy::setVideoLayerFrame() to pass to the web process
2143         https://bugs.webkit.org/show_bug.cgi?id=157409
2144
2145         Reviewed by Tim Horton.
2146
2147         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
2148         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
2149         Create a fence by calling DrawingAreaProxy::createFence() and pass it when sending the
2150         WebVideoFullscreenManager::SetVideoLayerFrameFenced message.
2151
2152         * UIProcess/DrawingAreaProxy.cpp:
2153         (WebKit::DrawingAreaProxy::createFence):
2154         Stub implementation. Assert not to be reached here since it's only implemented on Mac so far.
2155         * UIProcess/DrawingAreaProxy.h:
2156
2157         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2158         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2159         (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
2160         Renamed from createFenceForGeometryUpdate() since we are using it for more than just updating geometry.
2161         (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
2162         Update due to method rename.
2163
2164 2016-05-05  Brady Eidson  <beidson@apple.com>
2165
2166         Modern IDB (Workers): Get everything to the right threads.
2167         https://bugs.webkit.org/show_bug.cgi?id=157398
2168
2169         Reviewed by Alex Christensen.
2170
2171         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
2172         (WebKit::WebIDBConnectionToServer::putOrAdd):
2173         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
2174
2175 2016-05-05  Manuel Rego Casasnovas  <rego@igalia.com>
2176
2177         [GTK] Remove "region based columns" runtime feature remainings
2178         https://bugs.webkit.org/show_bug.cgi?id=157393
2179
2180         The runtime feature was removed in r168978,
2181         and the usage in WebKitSettings.cpp in r168988.
2182         However it was still around in ExperimentalFeatures class.
2183
2184         Reviewed by Michael Catanzaro.
2185
2186         * UIProcess/gtk/ExperimentalFeatures.cpp: Remove runtime feature.
2187         * UIProcess/gtk/ExperimentalFeatures.h: Ditto.
2188
2189 2016-05-05  Manuel Rego Casasnovas  <rego@igalia.com>
2190
2191         [GTK] Add CSS Grid Layout as experimental feature
2192         https://bugs.webkit.org/show_bug.cgi?id=157391
2193
2194         Reviewed by Michael Catanzaro.
2195
2196         Now that we've a runtime feature again for CSS Grid Layout (r200215),
2197         we can recover the old patch (r162215) that allows to enable/disable
2198         CSS Grid Layout through the environment variable
2199         WEBKITGTK_EXPERIMENTAL_FEATURES.
2200
2201         Example: WEBKITGTK_EXPERIMENTAL_FEATURES="CSS_GRID_LAYOUT=1"
2202
2203         * UIProcess/API/gtk/WebKitSettings.cpp:
2204         (webKitSettingsConstructed): Use new experimental feature to enable
2205         or disable CSS Grid Layout.
2206         * UIProcess/gtk/ExperimentalFeatures.cpp: Add new experimental feature.
2207         * UIProcess/gtk/ExperimentalFeatures.h: Ditto.
2208
2209 2016-05-05  Jer Noble  <jer.noble@apple.com>
2210
2211         [WK2] Media controls don't update if controller is created after the interface is created
2212         https://bugs.webkit.org/show_bug.cgi?id=157376
2213
2214         Reviewed by Beth Dakin.
2215
2216         Implement the new getter methods on WebPlaybackSessionModelContext by caching the values
2217         passed through WebPlaybackSessionManagerProxy.
2218
2219         * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
2220         * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
2221         (WebKit::WebPlaybackSessionManagerProxy::setCurrentTime):
2222         (WebKit::WebPlaybackSessionManagerProxy::setBufferedTime):
2223         (WebKit::WebPlaybackSessionManagerProxy::setSeekableRangesVector):
2224         (WebKit::WebPlaybackSessionManagerProxy::setCanPlayFastReverse):
2225         (WebKit::WebPlaybackSessionManagerProxy::setAudioMediaSelectionOptions):
2226         (WebKit::WebPlaybackSessionManagerProxy::setLegibleMediaSelectionOptions):
2227         (WebKit::WebPlaybackSessionManagerProxy::setExternalPlaybackProperties):
2228         (WebKit::WebPlaybackSessionManagerProxy::setWirelessVideoPlaybackDisabled):
2229         (WebKit::WebPlaybackSessionManagerProxy::setDuration):
2230         (WebKit::WebPlaybackSessionManagerProxy::setRate):
2231         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
2232         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
2233         (WebKit::WebVideoFullscreenModelContext::requestFullscreenMode): Deleted.
2234         (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame): Deleted.
2235         (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity): Deleted.
2236         (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged): Deleted.
2237         (WebKit::WebVideoFullscreenModelContext::isVisible): Deleted.
2238         (WebKit::WebVideoFullscreenModelContext::didSetupFullscreen): Deleted.
2239         (WebKit::WebVideoFullscreenModelContext::didEnterFullscreen): Deleted.
2240         (WebKit::WebVideoFullscreenModelContext::didExitFullscreen): Deleted.
2241         (WebKit::WebVideoFullscreenModelContext::didCleanupFullscreen): Deleted.
2242         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy): Deleted.
2243         (WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy): Deleted.
2244
2245 2016-05-05  Dean Jackson  <dino@apple.com>
2246
2247         Shadow DOM should not be experimental
2248         https://bugs.webkit.org/show_bug.cgi?id=157384
2249         <rdar://problem/26123254>
2250
2251         Reviewed by Anders Carlsson.
2252
2253         Shadow DOM is not an experimental feature. We want
2254         it enabled by default.
2255
2256         This fixes the timeout in:
2257         WebKit2.InjectedBundleMakeAllShadowRootOpenTest
2258
2259         * Shared/WebPreferencesDefinitions.h: Move the Shadow
2260         DOM preference out of Experimental.
2261         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2262         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2263         * WebProcess/WebPage/WebPage.cpp:
2264         (WebKit::WebPage::updatePreferences):
2265
2266 2016-05-05  Simon Fraser  <simon.fraser@apple.com>
2267
2268         Revert r200390, thus putting r199259 and r200161 and back.
2269
2270         * Shared/VisibleContentRectUpdateInfo.cpp:
2271         (WebKit::VisibleContentRectUpdateInfo::encode):
2272         (WebKit::VisibleContentRectUpdateInfo::decode):
2273         * Shared/VisibleContentRectUpdateInfo.h:
2274         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
2275         (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollableAncestorView):
2276         (WebKit::operator==):
2277         * UIProcess/API/Cocoa/WKWebView.mm:
2278         (-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
2279         (-[WKWebView _didFinishScrolling]):
2280         (-[WKWebView scrollViewDidScroll:]):
2281         (-[WKWebView scrollViewDidZoom:]):
2282         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
2283         (-[WKWebView _scrollViewDidInterruptDecelerating:]):
2284         (-[WKWebView _visibleRectInEnclosingScrollView:]):
2285         (-[WKWebView _visibleContentRect]):
2286         (-[WKWebView _didScroll]):
2287         (-[WKWebView _enclosingScrollerScrollingEnded:]):
2288         (-[WKWebView _frameOrBoundsChanged]):
2289         (-[WKWebView _updateVisibleContentRects]):
2290         (-[WKWebView _updateVisibleContentRectAfterScrollInView:]):
2291         (scrollViewCanScroll):
2292         (-[WKWebView _updateContentRectsWithState:]):
2293         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2294         * UIProcess/WebPageProxy.h:
2295         * UIProcess/ios/WKContentView.h:
2296         * UIProcess/ios/WKContentView.mm:
2297         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
2298         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]): Deleted.
2299         * UIProcess/ios/WebPageProxyIOS.mm:
2300         (WebKit::WebPageProxy::updateVisibleContentRects):
2301         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2302         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
2303         * WebProcess/WebPage/ios/WebPageIOS.mm:
2304         (WebKit::WebPage::updateVisibleContentRects):
2305
2306 2016-05-02  Sam Weinig  <sam@webkit.org>
2307
2308         On platforms that support it, use a SecTrustRef as the basis of CertificateInfo instead of a chain of SecCertificateRefs.
2309         https://bugs.webkit.org/show_bug.cgi?id=157220
2310
2311         Reviewed by Darin Adler.
2312
2313         * Shared/Authentication/mac/AuthenticationManager.mac.mm:
2314         (WebKit::leafCertificate):
2315         (WebKit::chain):
2316         (WebKit::AuthenticationManager::tryUseCertificateInfoForChallenge):
2317         When supported, get the SecCertificateRef from the SecTrustRef rather than the
2318         stored certificate chain.
2319
2320         * Shared/cf/ArgumentCodersCF.cpp:
2321         (IPC::typeFromCFTypeRef):
2322         (IPC::encode):
2323         (IPC::decode):
2324         * Shared/cf/ArgumentCodersCF.h:
2325         Add support for encoding/decoding SecTrustRef objects.
2326
2327         * Shared/mac/WebCoreArgumentCodersMac.mm:
2328         (IPC::ArgumentCoder<CertificateInfo>::encode):
2329         (IPC::ArgumentCoder<CertificateInfo>::decode):
2330         Add support for encoding/decoding CertificateInfo's that contain SecTrustRef objects.
2331
2332         (IPC::encodeNSError):
2333         (IPC::decodeNSError):
2334         Simplify error encoding/decoding by not using an addition CertificateInfo object for encoding
2335         the peerCertificateChain. Also, add the peerTrust to the userInfo that get's encoded/decoded.
2336
2337         * UIProcess/API/Cocoa/WKWebView.h:
2338         * UIProcess/API/Cocoa/WKWebView.mm:
2339         (-[WKWebView serverTrust]):
2340         (-[WKWebView certificateChain]):
2341         Add new serverTrust API and deprecate certificateChain.
2342
2343         * UIProcess/Cocoa/NavigationState.mm:
2344         (WebKit::NavigationState::willChangeCertificateInfo):
2345         (WebKit::NavigationState::didChangeCertificateInfo):
2346         Add support for KVO of -[WKWebView serverTrust].
2347
2348 2016-05-05  Daniel Bates  <dabates@apple.com>
2349
2350         Remove workaround added in r200391 (rdar://problem/25992976)
2351         https://bugs.webkit.org/show_bug.cgi?id=157378
2352         <rdar://problem/26118503>
2353
2354         Reviewed by Anders Carlsson.
2355
2356         Following the fix for <rdar://problem/26075714> we can remove the workaround added in r200391 (rdar://problem/25992976).
2357
2358         * Shared/mac/CodeSigning.mm:
2359         (WebKit::secCodeSigningIdentifier):
2360
2361 2016-05-04  Dean Jackson  <dino@apple.com>
2362
2363         Experimental Features don't need an "Experimental" prefix
2364         https://bugs.webkit.org/show_bug.cgi?id=157363
2365         <rdar://problem/26100630>
2366
2367         Reviewed by Anders Carlsson.
2368
2369         Since we're not persisting the value of the experimental
2370         features, it's unlikely there will ever be the case
2371         where we move a Preference from experimental to normal
2372         and use a stored value.
2373
2374         * Shared/WebPreferencesDefinitions.h:
2375         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2376         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2377         * WebProcess/WebPage/WebPage.cpp:
2378         (WebKit::WebPage::updatePreferences):
2379
2380 2016-05-04  Dean Jackson  <dino@apple.com>
2381
2382         Experimental features should toggle runtime flags
2383         https://bugs.webkit.org/show_bug.cgi?id=157353
2384         <rdar://problem/23621603>
2385
2386         Reviewed by Anders Carlsson.
2387
2388         Hook up the experimental WebPreferences to RuntimeEnabledFeatures.
2389         In the process I removed the general preference for WebGL 2 (we
2390         already had an experimental feature for it) and moved Custom
2391         Elements and Shadow DOM to experimental.
2392
2393         I also removed the C versions of the preferences, since experimental
2394         features only need the ObjC API (which is generated automatically).
2395
2396         * Shared/WebPreferencesDefinitions.h: Move/remove some features and
2397         make the experimental section more clear.
2398         * UIProcess/API/C/WKPreferences.cpp:
2399         (WKPreferencesSetWebGL2Enabled): Deleted.
2400         (WKPreferencesGetWebGL2Enabled): Deleted.
2401         (WKPreferencesSetShadowDOMEnabled): Deleted.
2402         (WKPreferencesGetShadowDOMEnabled): Deleted.
2403         (WKPreferencesSetCustomElementsEnabled): Deleted.
2404         (WKPreferencesGetCustomElementsEnabled): Deleted.
2405         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2406         * UIProcess/WebPreferences.cpp:
2407         (WebKit::WebPreferences::updateBoolValueForExperimentalFeatureKey): A
2408         version of updateBoolValueForKey that doesn't call the platform
2409         function (e.g. doesn't save to NSUserDefaults).
2410         * UIProcess/WebPreferences.h:
2411         * UIProcess/mac/WebPreferencesMac.mm:
2412         (WebKit::WebPreferences::platformInitializeStore): Deleted.
2413         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2414         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2415         * WebProcess/WebPage/WebPage.cpp:
2416         (WebKit::WebPage::updatePreferences):
2417
2418 2016-05-04  Dean Jackson  <dino@apple.com>
2419
2420         TestRunner should always enable all the experimental features
2421         https://bugs.webkit.org/show_bug.cgi?id=157360
2422         <rdar://problem/26099748>
2423
2424         Reviewed by Anders Carlsson.
2425
2426         Experimental features are disabled by default, but it is
2427         a pain to enable them in every test. Instead, have the
2428         test runner turn them all on.
2429
2430         * UIProcess/API/C/WKPreferences.cpp:
2431         (WKPreferencesEnableAllExperimentalFeatures):
2432         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2433         * UIProcess/WebPreferences.cpp:
2434         (WebKit::WebPreferences::enableAllExperimentalFeatures):
2435         * UIProcess/WebPreferences.h:
2436
2437 2016-05-04  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2438
2439         Add WKPreference for SelectionPaintingWithoutSelectionGaps
2440         https://bugs.webkit.org/show_bug.cgi?id=156900
2441
2442         Reviewed by Michael Catanzaro.
2443
2444         Unlike other browsers WebKit has been drawing selection gaps
2445         between render blocks during the text selection. This often
2446         cause text selection screen looks messy.
2447
2448         This patch adds a setting method to disable the functionality,
2449         and EFL port disables it by default.
2450
2451         * Shared/WebPreferencesDefinitions.h:
2452         * UIProcess/API/C/WKPreferences.cpp:
2453         (WKPreferencesSetSelectionPaintingWithoutSelectionGapsEnabled):
2454         (WKPreferencesGetSelectionPaintingWithoutSelectionGapsEnabled):
2455         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2456         * WebProcess/WebPage/WebPage.cpp:
2457         (WebKit::WebPage::updatePreferences):
2458
2459 2016-05-04  Zan Dobersek  <zdobersek@igalia.com>
2460
2461         [CoordGraphics] CompositingCoordinator should hande root compositing and view overlay layers separately
2462         https://bugs.webkit.org/show_bug.cgi?id=157305
2463
2464         Reviewed by Carlos Garcia Campos.
2465
2466         Update CoordinatedLayerTreeHost and ThreadCoordinatedLayerTreeHost to
2467         correctly use setRootCompositingLayer() and setViewOverlayRootLayer()
2468         methods on the CompositingCoordinator object.
2469
2470         CoordinatedLayerTreeHost doesn't have to keep a pointer to the root
2471         compositing layer anymore. updateRootLayers() can be removed.
2472
2473         ThreadCoordinatedLayerTreeHost doen't have to keep a pointer to both
2474         the root compositing and the view overlay layers anymore. Similarly,
2475         updateRootLayers() can be removed.
2476
2477         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2478         (WebKit::CoordinatedLayerTreeHost::setViewOverlayRootLayer):
2479         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
2480         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): Deleted.
2481         (WebKit::CoordinatedLayerTreeHost::updateRootLayers): Deleted.
2482         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2483         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
2484         (WebKit::ThreadedCoordinatedLayerTreeHost::setRootCompositingLayer):
2485         (WebKit::ThreadedCoordinatedLayerTreeHost::setViewOverlayRootLayer):
2486         (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost): Deleted.
2487         (WebKit::ThreadedCoordinatedLayerTreeHost::updateRootLayers): Deleted.
2488         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
2489
2490 2016-05-03  Beth Dakin  <bdakin@apple.com>
2491
2492         Add VideoControlsManager tests
2493         https://bugs.webkit.org/show_bug.cgi?id=157332
2494         -and corresponding-
2495         rdar://problem/24358431
2496
2497         Reviewed by Sam Weinig.
2498
2499         Expose _hasActiveVideoForControlsManager on WKWebViewPrivate for the sake of 
2500         testing. 
2501         * UIProcess/API/Cocoa/WKWebView.mm:
2502         (-[WKWebView _hasActiveVideoForControlsManager]):
2503         (-[WKWebView _doAfterNextPresentationUpdate:]):
2504         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2505
2506 2016-05-03  Jer Noble  <jer.noble@apple.com>
2507
2508         [iOS][WK2] Allow WKWebView to play local filesystem media when created with -loadFileURL:allowingReadAccessToURL:
2509         https://bugs.webkit.org/show_bug.cgi?id=156875
2510         <rdar://problem/24281444>
2511
2512         Reviewed by Alexey Proskuryakov.
2513
2514         Grant AVFoundation the right to issue file read sandbox extensions from the WebContent process to the mediaserverd
2515         process, so that it can play back local media files.
2516
2517         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2518
2519 2016-05-03  Jiewen Tan  <jiewen_tan@apple.com>
2520
2521         File Upload: Photo upload name is always generic (image.jpg)
2522         https://bugs.webkit.org/show_bug.cgi?id=157291
2523         <rdar://problem/12353008>
2524
2525         Reviewed by Darin Adler.
2526
2527         Use the original filename as the name of an uploaded image instead of
2528         a generic name, i.e. image.jpg.
2529
2530         * Platform/spi/ios/PhotosSPI.h: Added.
2531         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2532         (-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]):
2533         * WebKit2.xcodeproj/project.pbxproj:
2534
2535 2016-05-03  Chris Dumez  <cdumez@apple.com>
2536
2537         [WK2][DiskCache] Store common HTTP header names as strings
2538         https://bugs.webkit.org/show_bug.cgi?id=157326
2539         <rdar://problem/26073498>
2540
2541         Reviewed by Antti Koivisto.
2542
2543         Store common HTTP header names as strings in the disk cache instead of
2544         using their value in the HTTPHeaderName enumeration. Having the disk
2545         cache rely in the HTTPHeaderName enumeration is risky becomes it means
2546         the cached data would become invalid every time someone updates
2547         HTTPHeaderNames.in in WebCore. If someone were to update
2548         HTTPHeaderNames.in without bumping the disk cache version, we would end
2549         up with wrongly recognized HTTP header names after loading responses
2550         from the cache.
2551
2552         * NetworkProcess/cache/NetworkCacheCoders.cpp:
2553         (WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::encode):
2554         (WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::decode):
2555         * NetworkProcess/cache/NetworkCacheCoders.h:
2556         * NetworkProcess/cache/NetworkCacheStorage.h:
2557
2558 2016-05-03  Daniel Bates  <dabates@apple.com>
2559
2560         Temporary workaround for Apple Internal builds
2561         <rdar://problem/25992976>
2562
2563         For Apple Internal builds treat error code errSecCSGuestInvalid as if it were error code errSecCSUnsigned.
2564         We will look to remove this workaround in the fix for <rdar://problem/26075714>.
2565
2566         * Shared/mac/CodeSigning.mm:
2567         (WebKit::secCodeSigningIdentifier):
2568
2569 2016-05-03  Chris Dumez  <cdumez@apple.com>
2570
2571         Unreviewed, rolling out r199259 and r200161.
2572
2573         Seems to have caused a ~1.2% PLT regression on iOS
2574
2575         Reverted changesets:
2576
2577         "[iOS WK2] WKWebViews should consult ancestor UIScrollViews to
2578         determine tiling area"
2579         https://bugs.webkit.org/show_bug.cgi?id=156429
2580         http://trac.webkit.org/changeset/199259
2581
2582         "[iOS WK2] When determining tile size, check whether ancestor
2583         UIScrollViews are actually scrollable"
2584         https://bugs.webkit.org/show_bug.cgi?id=157107
2585         http://trac.webkit.org/changeset/200161
2586
2587 2016-05-03  Dean Jackson  <dino@apple.com>
2588
2589         CSS Grid should be an experimental feature flag
2590         https://bugs.webkit.org/show_bug.cgi?id=157327
2591         <rdar://problem/26075147>
2592
2593         Reviewed by Anders Carlsson.
2594
2595         The CSS Grid Layout runtime flag was exposed by
2596         a WebKit preference. It was in the experimental
2597         section but was missing the "Experimental" prefix.
2598
2599         It was also missing the human readable description.
2600
2601         Lastly, there is no need for the C API for experimental
2602         features.
2603
2604         * Shared/WebPreferencesDefinitions.h:
2605         * UIProcess/API/C/WKPreferences.cpp:
2606         (WKPreferencesSetCSSGridLayoutEnabled): Deleted.
2607         (WKPreferencesGetCSSGridLayoutEnabled): Deleted.
2608         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2609         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2610         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2611         * WebProcess/WebPage/WebPage.cpp:
2612         (WebKit::WebPage::updatePreferences):
2613
2614 2016-05-03  Alex Christensen  <achristensen@webkit.org>
2615
2616         Remove firing assertion when redirecting
2617         https://bugs.webkit.org/show_bug.cgi?id=155800
2618         rdar://25299194
2619
2620         Reviewed by Sam Weinig.
2621
2622         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2623         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
2624         (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]):
2625         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
2626         (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
2627         With NSURLConnection, we stopped getting delegate callbacks once the delegate is destroyed, and everything was cancelled.
2628         With NSURLSession we continue getting delegate callbacks because the session's delegate is not destroyed after each load.
2629         As documented in NSURLSession.h: "In some cases, the task may signal other work before it acknowledges the cancelation."
2630         In the cases where we cancel a load, delete the NetworkLoad and corresponding NetworkDataTask, we want to call all
2631         completion handlers indicating that we really want to cancel instead of asserting.
2632
2633 2016-05-02  Darin Adler  <darin@apple.com>
2634
2635         Change IDL enumerations to be nested in their C++ class instead of at WebCore namespace level
2636         https://bugs.webkit.org/show_bug.cgi?id=157257
2637
2638         Reviewed by Chris Dumez.
2639
2640         * WebProcess/Network/WebLoaderStrategy.cpp:
2641         (WebKit::WebLoaderStrategy::loadResource): Updated since we changed
2642         ReferrerHeaderPolicy back to ReferrerPolicy.
2643         (WebKit::WebLoaderStrategy::schedulePluginStreamLoad): Ditto.
2644
2645 2016-05-02  Brady Eidson  <beidson@apple.com>
2646
2647         Const-ify some IDB code.
2648         https://bugs.webkit.org/show_bug.cgi?id=157287
2649
2650         Reviewed by Alex Christensen.
2651
2652         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
2653         (WebKit::WebIDBConnectionToServer::deleteDatabase):
2654         (WebKit::WebIDBConnectionToServer::openDatabase):
2655         (WebKit::WebIDBConnectionToServer::abortTransaction):
2656         (WebKit::WebIDBConnectionToServer::commitTransaction):
2657         (WebKit::WebIDBConnectionToServer::didFinishHandlingVersionChangeTransaction):
2658         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
2659
2660 2016-05-02  Simon Fraser  <simon.fraser@apple.com>
2661
2662         Sort the project file.
2663
2664         * WebKit2.xcodeproj/project.pbxproj:
2665
2666 2016-05-02  Simon Fraser  <simon.fraser@apple.com>
2667
2668         Fix shouldUpdateScrollLayerPositionSynchronously() for non-main frames. Remove updatesScrollLayerPositionOnMainThread()
2669         https://bugs.webkit.org/show_bug.cgi?id=157277
2670
2671         Reviewed by Dean Jackson, Tim Horton.
2672
2673         Remove updatesScrollLayerPositionOnMainThread() which is unused by all ports.
2674
2675         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
2676
2677 2016-05-02  Alex Christensen  <achristensen@webkit.org>
2678
2679         Crash if a certificate chain has null certificates
2680         https://bugs.webkit.org/show_bug.cgi?id=157206
2681
2682         Reviewed by Alexey Proskuryakov.
2683
2684         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2685         (WebKit::certificatesMatch):
2686         SecTrustGetCertificateAtIndex can return null.
2687         If this ever happens, something has gone horribly wrong in the security code and we should crash.
2688         See rdar://problem/21723172
2689
2690 2016-05-02  Myles C. Maxfield  <mmaxfield@apple.com>
2691
2692         Addressing post-review comments after r200116
2693         https://bugs.webkit.org/show_bug.cgi?id=157228
2694
2695         Reviewed by Anders Carlsson.
2696
2697         * Shared/WebPreferencesDefinitions.h:
2698         * UIProcess/API/Cocoa/WKWebView.mm:
2699         (-[WKWebView _initializeWithConfiguration:]):
2700         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2701         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2702         (-[WKWebViewConfiguration encodeWithCoder:]):
2703         (-[WKWebViewConfiguration initWithCoder:]):
2704         (-[WKWebViewConfiguration copyWithZone:]):
2705         * UIProcess/WebPageProxy.cpp:
2706         * WebProcess/WebPage/WebPage.cpp:
2707         (WebKit::WebPage::updatePreferences):
2708
2709 2016-05-02  Daniel Bates  <dabates@apple.com>
2710
2711         DatabaseTracker::closeAllDatabases calls Database::close from the wrong thread
2712         https://bugs.webkit.org/show_bug.cgi?id=147672
2713         <rdar://problem/22357464>
2714
2715         Reviewed by Brady Eidson.
2716
2717         Call DatabaseTracker::closeAllDatabases() with CurrentQueryBehavior::Interrupt so that we abort
2718         a long running query and close the database immediately to avoid holding a locked file when the
2719         process is suspended.
2720
2721         * WebProcess/WebProcess.cpp:
2722         (WebKit::WebProcess::processWillSuspendImminently):
2723
2724 2016-05-01  Darin Adler  <darin@apple.com>
2725
2726         Update Fetch to use enum class instead of string for enumerations
2727         https://bugs.webkit.org/show_bug.cgi?id=157241
2728
2729         Reviewed by Chris Dumez.
2730
2731         * WebProcess/Network/WebLoaderStrategy.cpp:
2732         (WebKit::WebLoaderStrategy::loadResource): Updated for the change where I
2733         renamed ReferrerPolicy to ReferrerHeaderPolicy, at least for now.
2734         (WebKit::WebLoaderStrategy::schedulePluginStreamLoad): Ditto.
2735
2736 2016-05-01  Konstantin Tokarev  <annulen@yandex.ru>
2737
2738         Fixed build with !ENABLED(DATABASE_PROCESS).
2739
2740         Unreviewed build fix.
2741
2742         * UIProcess/Network/NetworkProcessProxy.cpp:
2743         (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs):
2744
2745 2016-04-29  Chris Dumez  <cdumez@apple.com>
2746
2747         Drop useless check in SpeculativeLoadManager::registerLoad()
2748         https://bugs.webkit.org/show_bug.cgi?id=157204
2749
2750         Reviewed by Antti Koivisto.
2751
2752         Drop useless check in SpeculativeLoadManager::registerLoad(). There is
2753         no way to end up this code path with a non-HTTP family request.
2754
2755         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2756         (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
2757
2758 2016-04-29  Brian Burg  <bburg@apple.com>
2759
2760         Web Automation: add SPI to mark an existing NSEvent as synthesized for automation
2761         https://bugs.webkit.org/show_bug.cgi?id=157221
2762         <rdar://problem/26019356>
2763
2764         Reviewed by Timothy Hatcher.
2765
2766         In cases where an NSEvent is duplicated, clients need to re-mark an NSEvent
2767         as synthesized for automation if the original NSEvent was marked as such.
2768
2769         * UIProcess/API/Cocoa/_WKAutomationSession.h:
2770         * UIProcess/API/Cocoa/_WKAutomationSession.mm:
2771         (-[_WKAutomationSession markEventAsSynthesizedForAutomation:]):
2772         * UIProcess/Automation/WebAutomationSession.h:
2773         * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
2774         (WebKit::WebAutomationSession::sendSynthesizedEventsToPage):
2775         (WebKit::WebAutomationSession::markEventAsSynthesizedForAutomation):
2776
2777 2016-04-29  Brian Burg  <bburg@apple.com>
2778
2779         Web Automation: use a magic eventNumber as a fallback for detecting NSEvents synthesized for automation
2780         https://bugs.webkit.org/show_bug.cgi?id=157222
2781
2782         Reviewed by Timothy Hatcher.
2783
2784         Sometimes events are copied and redelivered in a way that can't be reliably intercepted,
2785         so use eventNumber as an alternate means of detecting synthesized mouse NSEvents.
2786
2787         * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
2788         (WebKit::WebAutomationSession::wasEventSynthesizedForAutomation):
2789         If it's a mouse-related event, check the eventNumber if the associated object was missing.
2790
2791         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
2792         Most real events from input devices fill in eventNumber with a non-zero value.
2793         In my testing, using zero did not seem to adversely affect event delivery.
2794
2795 2016-04-29  Joseph Pecoraro  <pecoraro@apple.com>
2796
2797         Web Inspector: Issues inspecting the inspector, pausing on breakpoints causes content to not load
2798         https://bugs.webkit.org/show_bug.cgi?id=157198
2799         <rdar://problem/26011049>
2800
2801         Reviewed by Timothy Hatcher.
2802
2803         * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.h:
2804         * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp:
2805         (WebKit::WebInspectorFrontendAPIDispatcher::reset):
2806         (WebKit::WebInspectorFrontendAPIDispatcher::frontendLoaded):
2807         (WebKit::WebInspectorFrontendAPIDispatcher::suspend):
2808         (WebKit::WebInspectorFrontendAPIDispatcher::unsuspend):
2809         (WebKit::WebInspectorFrontendAPIDispatcher::dispatchCommand):
2810         (WebKit::WebInspectorFrontendAPIDispatcher::dispatchMessageAsync):
2811         (WebKit::WebInspectorFrontendAPIDispatcher::evaluateOrQueueExpression):
2812         (WebKit::WebInspectorFrontendAPIDispatcher::evaluateQueuedExpressions):
2813         Avoid evaluating expressions when the page is paused. Generalize the
2814         message queueing and dispatching for pause/suspend that we already
2815         had for waiting for the frontend page to be loaded.
2816
2817         * WebProcess/WebPage/WebInspectorUI.h:
2818         * WebProcess/WebPage/WebInspectorUI.cpp:
2819         (WebKit::WebInspectorUI::pagePaused):
2820         (WebKit::WebInspectorUI::pageUnpaused):
2821         When the frontend page pauses/unpauses, suspend/resume the dispatcher.
2822
2823 2016-04-29  Chris Dumez  <cdumez@apple.com>
2824
2825         Remove unnecessary isolated String copying from one of NetworkCache::Key's constructor
2826         https://bugs.webkit.org/show_bug.cgi?id=157207
2827
2828         Reviewed by Antti Koivisto.
2829
2830         Remove unnecessary isolated String copying from one of NetworkCache::Key's
2831         constructor. We are anyway going to create isolated copies if the Key ends
2832         up getting copied.
2833
2834         * NetworkProcess/cache/NetworkCacheKey.cpp:
2835         (WebKit::NetworkCache::Key::Key):
2836
2837 2016-04-29  Brian Burg  <bburg@apple.com>
2838
2839         Web Automation: performMouseInteraction command computes mouse event coordinates incorrectly
2840         https://bugs.webkit.org/show_bug.cgi?id=157218
2841         <rdar://problem/26018230>
2842
2843         Reviewed by Timothy Hatcher.
2844
2845         This patch fixes two issues: the min/max clamp was in the wrong order,
2846         and the y-value did not account for the window's top content inset.
2847
2848         * UIProcess/Automation/WebAutomationSession.cpp:
2849         (WebKit::WebAutomationSession::performMouseInteraction):
2850
2851 2016-04-29  Dean Jackson  <dino@apple.com>
2852
2853         RTL <select> popup menu is in the wrong location
2854         https://bugs.webkit.org/show_bug.cgi?id=157159
2855         <rdar://problem/25894451>
2856
2857         Reapply http://trac.webkit.org/changeset/200217
2858         but with changes that will allow it to build on Yosemite.
2859
2860         * UIProcess/mac/WebPopupMenuProxyMac.mm:
2861         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
2862
2863 2016-04-28  Ada Chan  <adachan@apple.com>
2864
2865         Indicate we are processing user gesture when handling messages from WebPlaybackSessionManagerProxy to WebPlaybackSessionManager
2866         https://bugs.webkit.org/show_bug.cgi?id=157151
2867
2868         Reviewed by Jer Noble.
2869
2870         Messages from WebPlaybackSessionManagerProxy to WebPlaybackSessionManager are triggered by
2871         user actions, so add a UserGestureIndicator in the methods that handle those messages.
2872
2873         * WebProcess/cocoa/WebPlaybackSessionManager.mm:
2874         (WebKit::WebPlaybackSessionManager::play):
2875         (WebKit::WebPlaybackSessionManager::pause):
2876         (WebKit::WebPlaybackSessionManager::togglePlayState):
2877         (WebKit::WebPlaybackSessionManager::beginScrubbing):
2878         (WebKit::WebPlaybackSessionManager::endScrubbing):
2879         (WebKit::WebPlaybackSessionManager::seekToTime):
2880         (WebKit::WebPlaybackSessionManager::fastSeek):
2881         (WebKit::WebPlaybackSessionManager::beginScanningForward):
2882         (WebKit::WebPlaybackSessionManager::beginScanningBackward):
2883         (WebKit::WebPlaybackSessionManager::endScanning):
2884         (WebKit::WebPlaybackSessionManager::selectAudioMediaOption):
2885         (WebKit::WebPlaybackSessionManager::selectLegibleMediaOption):
2886
2887 2016-04-29  Brady Eidson  <beidson@apple.com>
2888
2889         Add a default ".isolatedCopy()" specialization to CrossThreadCopier, and other small cleanup.
2890         https://bugs.webkit.org/show_bug.cgi?id=157185
2891
2892         Reviewed by Anders Carlsson.
2893
2894         * Shared/WebCrossThreadCopier.cpp:
2895         (WebCore::Vector<char>>::copy): reserveInitialCapacity() before creating the copy.
2896         (WebCore::Vector<int64_t>>::copy): Ditto.
2897         (WebCore::Vector<uint8_t>>::copy): Ditto.
2898         (WebCore::Vector<Vector<IDBKeyData>>>::copy): Deleted dead code.
2899         * Shared/WebCrossThreadCopier.h:
2900
2901 2016-04-29  Commit Queue  <commit-queue@webkit.org>
2902
2903         Unreviewed, rolling out r200217.
2904         https://bugs.webkit.org/show_bug.cgi?id=157183
2905
2906         This change broke the Yosemite build. (Requested by ryanhaddad
2907         on #webkit).
2908
2909         Reverted changeset:
2910
2911         "RTL <select> popup menu is in the wrong location"
2912         https://bugs.webkit.org/show_bug.cgi?id=157159
2913         http://trac.webkit.org/changeset/200217
2914
2915 2016-04-29  Claudio Saavedra  <csaavedra@igalia.com>
2916
2917         [GTK] Move WK2 shareable code out from gtk directories
2918         https://bugs.webkit.org/show_bug.cgi?id=157135
2919
2920         Reviewed by Darin Adler.
2921
2922         Both NetworkProcessMain and InjectedBundle can go out from their respective gtk directories.
2923
2924         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
2925         (WebKit::NetworkProcessMainUnix): Deleted.
2926         * NetworkProcess/soup/NetworkProcessMainSoup.cpp: Renamed from Source/WebKit2/NetworkProcess/gtk/NetworkProcessMainGtk.cpp.
2927         (WebKit::NetworkProcessMainUnix):
2928         * PlatformGTK.cmake: Update.
2929         * WebProcess/InjectedBundle/glib/InjectedBundleGlib.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp.
2930         (WebKit::InjectedBundle::initialize):
2931         (WebKit::InjectedBundle::setBundleParameter):
2932         (WebKit::InjectedBundle::setBundleParameters):
2933         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2934         (WebKit::InjectedBundle::initialize): Deleted.
2935         (WebKit::InjectedBundle::setBundleParameter): Deleted.
2936         (WebKit::InjectedBundle::setBundleParameters): Deleted.
2937
2938 2016-04-28  Dean Jackson  <dino@apple.com>
2939
2940         RTL <select> popup menu is in the wrong location
2941         https://bugs.webkit.org/show_bug.cgi?id=157159
2942         <rdar://problem/25894451>
2943
2944         Reviewed by Simon Fraser.
2945
2946         Make sure the NSPopupMenu takes the text direction
2947         into account, and offset the position
2948         of the menu slightly if we're in RTL mode.
2949
2950         Unfortunately our test infrastructure is unable to exercise
2951         this because it runs without a window, and the popup menu
2952         is not captured in the screenshot.
2953
2954         * UIProcess/mac/WebPopupMenuProxyMac.mm:
2955         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
2956
2957 2016-04-28  Manuel Rego Casasnovas  <rego@igalia.com>
2958
2959         [css-grid] Add CSS Grid Layout runtime flag
2960         https://bugs.webkit.org/show_bug.cgi?id=157134
2961
2962         Reviewed by Simon Fraser.
2963
2964         Add CSS Grid Layout runtime flag based on preferences,
2965         enabled by default.
2966
2967         * Shared/WebPreferencesDefinitions.h:
2968         * UIProcess/API/C/WKPreferences.cpp:
2969         (WKPreferencesSetCSSGridLayoutEnabled):
2970         (WKPreferencesGetCSSGridLayoutEnabled):
2971         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2972         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2973         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2974         * WebProcess/WebPage/WebPage.cpp:
2975         (WebKit::WebPage::updatePreferences):
2976
2977 2016-04-28  Daniel Bates  <dabates@apple.com>
2978
2979         Fix the Apple Internal OS X build
2980
2981         * UIProcess/mac/WKPrintingView.mm:
2982         (-[WKPrintingView _drawPDFDocument:page:atPoint:]): Ignore deprecation warning for -[PDFPage drawWithBox:].
2983         * WebProcess/WebPage/mac/WebPageMac.mm:
2984         (WebKit::drawPDFPage): Ditto.
2985
2986 2016-04-28  Manuel Rego Casasnovas  <rego@igalia.com>
2987
2988         Fix mistake in custom elements runtime flag
2989         https://bugs.webkit.org/show_bug.cgi?id=157130
2990
2991         Reviewed by Chris Dumez.
2992
2993         The methods for the custom elements runtime flag were using
2994         the Shadow DOM flag instead.
2995         These methods were introduced in r197921,
2996         it seems it was just a copy&paste mistake.
2997
2998         * UIProcess/API/C/WKPreferences.cpp:
2999         (WKPreferencesSetCustomElementsEnabled):
3000         (WKPreferencesGetCustomElementsEnabled):
3001
3002 2016-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3003
3004         Unreviewed. Add missing files to the compilation of GTK+ inspector.
3005
3006         * PlatformGTK.cmake:
3007
3008 2016-04-27  Dan Bernstein  <mitz@apple.com>
3009
3010         <rdar://problem/25915253> REGRESSION (r199628): Netflix playback fails in Safari Technology Preview with error code S7363-1260-FFFF58D8
3011
3012         Rubber-stamped by Tim Horton.
3013
3014         Reverted r199628.
3015
3016         * Configurations/WebContentService.xcconfig:
3017
3018 2016-04-27  Brady Eidson  <beidson@apple.com>
3019
3020         Modern IDB: Implement native IDBFactory.getAllDatabaseNames for WebInspector.
3021         https://bugs.webkit.org/show_bug.cgi?id=157072
3022
3023         Reviewed by Alex Christensen.
3024
3025         Handle the process hop for the new getAllDatabaseNames call.
3026         
3027         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
3028         (WebKit::WebIDBConnectionToClient::didGetAllDatabaseNames):
3029         (WebKit::WebIDBConnectionToClient::getAllDatabaseNames):
3030         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
3031         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
3032
3033         * Shared/WebCrossThreadCopier.cpp:
3034         (WebCore::SecurityOriginData>::copy): Deleted, as its in WebCore now.
3035         * Shared/WebCrossThreadCopier.h:
3036
3037         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3038         (WebKit::WebIDBConnectionToServer::getAllDatabaseNames):
3039         (WebKit::WebIDBConnectionToServer::didGetAllDatabaseNames):
3040         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
3041         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
3042
3043 2016-04-27  Simon Fraser  <simon.fraser@apple.com>
3044
3045         [iOS WK2] When determining tile size, check whether ancestor UIScrollViews are actually scrollable
3046         https://bugs.webkit.org/show_bug.cgi?id=157107
3047         rdar://problem/25943577
3048
3049         Reviewed by Tim Horton.
3050         
3051         We should only fall back to 512x512 tiles if the WKWebView has a UIScrollView ancestor,
3052         and that UIScrollView actually scrolls. This avoids falling back to small tiles in
3053         MobileSafari.
3054
3055         Rename "enclosedInScrollView" to "enclosedInScrollableAncestorView" everywhere.
3056
3057         * Shared/VisibleContentRectUpdateInfo.cpp:
3058         (WebKit::VisibleContentRectUpdateInfo::encode):
3059         (WebKit::VisibleContentRectUpdateInfo::decode):
3060         * Shared/VisibleContentRectUpdateInfo.h:
3061         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
3062         (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollableAncestorView):
3063         (WebKit::operator==):
3064         (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollView): Deleted.
3065         * UIProcess/API/Cocoa/WKWebView.mm:
3066         (scrollViewCanScroll):
3067         (-[WKWebView _updateContentRectsWithState:]):
3068         * UIProcess/ios/WKContentView.h:
3069         * UIProcess/ios/WKContentView.mm:
3070         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
3071         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollView:]): Deleted.
3072         * WebProcess/WebPage/ios/WebPageIOS.mm:
3073         (WebKit::WebPage::updateVisibleContentRects):
3074
3075 2016-04-26  Ada Chan  <adachan@apple.com>
3076
3077         Set WebVideoFullscreenInterfaceMac up as a client of WebPlaybackSessionInterfaceMac to listen for playback state changes
3078         https://bugs.webkit.org/show_bug.cgi?id=157008
3079
3080         Reviewed by Jer Noble.
3081
3082         Since WebVideoFullscreenInterfaceMac holds onto WebPlaybackSessionInterfaceMac, we can't let
3083         WebPlaybackSessionManagerProxy unregister the context for that media element while
3084         WebVideoFullscreenInterfaceMac is still using it. WebVideoFullscreenInterfaceMac should add
3085         to the client count for that WebPlaybackSession context.
3086
3087         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
3088         (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface):
3089         When the context for the media element is created with the WebVideoFullscreenManagerProxy, it should
3090         add one to the client count for the media element context in WebPlaybackSessionManagerProxy.
3091         (WebKit::WebVideoFullscreenManagerProxy::removeClientForContext):
3092         When WebVideoFullscreenManagerProxy unregisters the context for this media element, it should
3093         subtract one from the client count for the media element context in WebPlaybackSessionManagerProxy.
3094
3095         * WebProcess/cocoa/WebPlaybackSessionManager.mm:
3096         (WebKit::WebPlaybackSessionManager::clearPlaybackControlsManager):
3097         Bail early if m_controlsManagerContextId is zero. Otherwise, we'd end up sending a
3098         ClearPlaybackControlsManager message to the UI process inadvertently.
3099         (WebKit::WebPlaybackSessionManager::contextIdForMediaElement):
3100         Make sure the model element for the context ID is set to the media element.
3101
3102         * WebProcess/cocoa/WebVideoFullscreenManager.mm:
3103         (WebKit::WebVideoFullscreenManager::createModelAndInterface):
3104         When the context for the media element is created with the WebVideoFullscreenManager, it should
3105         add one to the client count for the media element context in WebPlaybackSessionManager.
3106         (WebKit::WebVideoFullscreenManager::removeContext):
3107         When WebVideoFullscreenManager unregisters the context for this media element, it should
3108         subtract one from the client count for the media element context in WebPlaybackSessionManager.
3109
3110 2016-04-27  Alex Christensen  <achristensen@webkit.org>
3111
3112         Remove download message receiver when NetworkProcess crashes
3113         https://bugs.webkit.org/show_bug.cgi?id=157102
3114         <rdar://problem/25550106>
3115
3116         Reviewed by Anders Carlsson.
3117
3118         * UIProcess/Downloads/DownloadProxyMap.cpp:
3119         (WebKit::DownloadProxyMap::processDidClose):
3120         When the NetworkProcess crashes during a download, we want to remove the message receiver from the map
3121         so we don't get an assertion in ~MessageReceiver in the UIProcess so we do not have a freed
3122         message receiver in the map.
3123
3124 2016-04-27  Alex Christensen  <achristensen@webkit.org>
3125
3126         Fix client certificate authentication with NSURLSession on iOS
3127         https://bugs.webkit.org/show_bug.cgi?id=157094
3128         <rdar://problem/25946859>
3129
3130         Reviewed by Darin Adler.
3131
3132         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3133         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
3134         We only want to create a non-persistent credential with the given user and password 
3135         and store the user and password in the CredentialStorage if there is a user and password.
3136         We previously only skipped this if we were doing server trust evaluation, in which case 
3137         we will have a credential from serverTrustCredential which has no user or password.
3138         When doing client certificate authentication on iOS, this completion handler is called with
3139         a credential with session persistence and also no user or password, so we need to do the same thing.
3140         The reason this was never hit on Mac was because the credential came from tryUseCertificateInfoForChallenge,
3141         which always had persistence none.
3142
3143 2016-04-27  Claudio Saavedra  <csaavedra@igalia.com>
3144
3145         [GTK][EFL] Move WK2 platform code to a common place
3146         https://bugs.webkit.org/show_bug.cgi?id=157069
3147
3148         Reviewed by Carlos Garcia Campos.
3149
3150         Logging implementation can be shared between EFL and GTK, so move it to unix.
3151         The GTK Module implementation doesn't depend on GTK anyhow so move it to glib.
3152
3153         * Platform/efl/LoggingEfl.cpp: Removed.
3154         (WebKit::logLevelString): Deleted.
3155         * Platform/glib/ModuleGlib.cpp: Renamed from Source/WebKit2/Platform/gtk/ModuleGtk.cpp.
3156         (WebKit::Module::load):
3157         (WebKit::Module::unload):
3158         (WebKit::Module::platformFunctionPointer):
3159         * Platform/gtk/LoggingGtk.cpp:
3160         (WebKit::logLevelString): Deleted.
3161         * Platform/gtk/ModuleGtk.cpp:
3162         (WebKit::Module::load): Deleted.
3163         (WebKit::Module::unload): Deleted.
3164         (WebKit::Module::platformFunctionPointer): Deleted.
3165         * Platform/unix/LoggingUnix.cpp: Renamed from Source/WebKit2/Platform/gtk/LoggingGtk.cpp.
3166         (WebKit::logLevelString):
3167         * PlatformEfl.cmake: Update.
3168         * PlatformGTK.cmake: Update
3169
3170 2016-04-27  Alex Christensen  <achristensen@webkit.org>
3171
3172         Fix assertion when downloading with NSURLSession after r198955
3173         https://bugs.webkit.org/show_bug.cgi?id=157051
3174
3175         Reviewed by Brady Eidson.
3176
3177         * NetworkProcess/NetworkProcess.cpp:
3178         (WebKit::NetworkProcess::continueDecidePendingDownloadDestination):
3179
3180 2016-04-27  Carlos Garcia Campos  <cgarcia@igalia.com>
3181
3182         REGRESSION(r200094): [FreeType] Vertical text is broken after r200094
3183         https://bugs.webkit.org/show_bug.cgi?id=157066
3184
3185         Reviewed by Martin Robinson.
3186
3187         Add Source/WebCore/platform/graphics/freetype to the list of include dirs, because now FontPlatformData.h
3188         includes FcUniquePtr.h.
3189
3190         * PlatformEfl.cmake:
3191         * PlatformGTK.cmake:
3192
3193 2016-04-26  Joseph Pecoraro  <pecoraro@apple.com>
3194
3195         Uncaught Exception: SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent.
3196         https://bugs.webkit.org/show_bug.cgi?id=156991
3197         <rdar://problem/25913475>
3198
3199         Reviewed by Timothy Hatcher.
3200
3201         * UIProcess/mac/WebInspectorProxyMac.mm:
3202         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3203         Explicitly always allow access to storage for Web Inspector content just
3204         in case, as we already allow universal file access.
3205
3206 2016-04-26  Myles C. Maxfield  <mmaxfield@apple.com>
3207
3208         [WK2] [OS X] Create API for switching RTL scrollbar policy
3209         https://bugs.webkit.org/show_bug.cgi?id=156948
3210         <rdar://problem/25707757>
3211
3212         Reviewed by Darin Adler.
3213
3214         Add the new API.
3215
3216         * Shared/WebPreferencesDefinitions.h:
3217         * UIProcess/API/Cocoa/WKWebView.mm:
3218         (-[WKWebView _initializeWithConfiguration:]):
3219         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
3220         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3221         (-[WKWebViewConfiguration init]):
3222         (-[WKWebViewConfiguration encodeWithCoder:]):
3223         (-[WKWebViewConfiguration initWithCoder:]):
3224         (-[WKWebViewConfiguration copyWithZone:]):
3225         * UIProcess/WebPageProxy.cpp:
3226         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
3227         * WebProcess/WebPage/WebPage.cpp:
3228         (WebKit::WebPage::updatePreferences):
3229
3230 2016-04-26  Beth Dakin  <bdakin@apple.com>
3231
3232         Check to make sure shouldRequestCandidates() before requesting candidates
3233         https://bugs.webkit.org/show_bug.cgi?id=157038
3234         -and corresponding-
3235         rdar://problem/25910418
3236
3237         Reviewed by Tim Horton.
3238
3239         This patch limits requesting and showing candidates to cases where 
3240         shouldRequestCandidates() is true. This patch also caches the sequence number 
3241         returned by [NSSpellChecker requestCandidatesForSelectedRange:] to make sure 
3242         it is equal to the sequence number sent to the callback handler so that we do 
3243         not show candidates for old requests.
3244
3245         * UIProcess/Cocoa/WebViewImpl.h:
3246         * UIProcess/Cocoa/WebViewImpl.mm:
3247         (WebKit::WebViewImpl::updateWebViewImplAdditions):
3248         (WebKit::WebViewImpl::shouldRequestCandidates):
3249         (WebKit::WebViewImpl::showCandidates):
3250         (WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):
3251         (WebKit::WebViewImpl::handleRequestedCandidates):
3252
3253 2016-04-26  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3254
3255         [EFL] Update expectation result in ewk_context_preferred_languages API test
3256         https://bugs.webkit.org/show_bug.cgi?id=157027
3257
3258         Reviewed by Carlos Garcia Campos.
3259
3260         platformLanguage() has been returning lower case value since r199815. Thus existing expected result
3261         needs to be updated together.
3262
3263         * UIProcess/API/efl/tests/test_ewk2_context.cpp: Change en-US with en-us.
3264         (TEST_F):
3265
3266 2016-04-26  Zan Dobersek  <zdobersek@igalia.com>
3267
3268         Mark two methods in the CoordinatedGraphicsScene and the
3269         ThreadedCoordinatedLayerTreeHost classes as overrides, fixing
3270         the compiler warnings.
3271
3272         Rubber-stamped by Carlos Garcia Campos.
3273
3274         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
3275         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
3276
3277 2016-04-25  Ryosuke Niwa  <rniwa@webkit.org>
3278
3279         Remove the build flag for template elements
3280         https://bugs.webkit.org/show_bug.cgi?id=157022
3281
3282         Reviewed by Daniel Bates.
3283
3284         * Configurations/FeatureDefines.xcconfig:
3285
3286 2016-04-25  Chris Dumez  <cdumez@apple.com>
3287
3288         Crash under -[WKWebView _mayAutomaticallyShowVideoPictureInPicture] + 32 (WKWebView.mm:309)
3289         https://bugs.webkit.org/show_bug.cgi?id=156990
3290         <rdar://problem/25904376>
3291
3292         Reviewed by Jer Noble.
3293
3294         In case of WebProcess crash, WebPageProxy::processDidCrash() will call resetState() which
3295         will nullify WebPageProxy::m_videoFullscreenManager. In WebPageProxy::reattachToWebProcess(),
3296         we then call updateViewState() before re-initializing m_videoFullscreenManager, and
3297         updateViewState() ends up calling [WKWebView _mayAutomaticallyShowVideoPictureInPicture]
3298         which dereferences WebPageProxy::m_videoFullscreenManager without null check. This patch
3299         adds a null check for m_videoFullscreenManager in _mayAutomaticallyShowVideoPictureInPicture.
3300
3301         * UIProcess/API/Cocoa/WKWebView.mm:
3302         (-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]):
3303
3304 2016-04-25  Dan Bernstein  <mitz@apple.com>
3305
3306         Fix a couple of mistakes from r199700.
3307
3308         Rubber-stamped by Anders Carlsson.
3309
3310         * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Added availability attributes to new properties.
3311         * WebKit2.xcodeproj/project.pbxproj: Demoted _WKExperimentalFeatureInternal.h from Private to Project.
3312
3313 2016-04-24  Hunseop Jeong  <hs85.jeong@samsung.com>
3314
3315         [EFL] Update the ewk_settings_offline_web_application_cache_enabled_get() expected value after r199854.
3316         https://bugs.webkit.org/show_bug.cgi?id=156968
3317
3318         Reviewed by Gyuyoung Kim.
3319
3320         * UIProcess/API/C/WKPreferencesRef.h: Update the comment.
3321         * UIProcess/API/efl/tests/test_ewk2_settings.cpp: 
3322         (TEST_F):
3323
3324 2016-04-23  Andy Estes  <aestes@apple.com>
3325
3326         Fix issues found by the clang static analyzer
3327         https://bugs.webkit.org/show_bug.cgi?id=156956
3328
3329         Reviewed by Alexey Proskuryakov.
3330
3331         * UIProcess/API/Cocoa/WKPreviewActionItem.mm:
3332         (-[WKPreviewAction dealloc]): Added to release _identifier.
3333         * UIProcess/_WKWebViewPrintFormatter.mm:
3334         (-[_WKWebViewPrintFormatter dealloc]): Released _frameToPrint.
3335         * UIProcess/ios/WKContentViewInteraction.mm:
3336         (-[WKContentView inputView]): -createPeripheralWithView: returned a retained object, but the method name did not
3337         match Cocoa conventions. Called -initWithView: instead.
3338         (-[WKContentView _showAttachmentSheet]): Stored the _WKActivatedElementInfo in a RetainPtr.
3339         (-[WKContentView _dataForPreviewItemController:atPosition:type:]): Ditto.
3340         (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
3341         The properties contextBeforeSelection, selectedText, markedText, and contextAfterSelection have the 'copy'
3342         annotation in UIWKAutocorrectionContext, so the additional copy made here would be leaked. Removed the extra copy.
3343         (-[WKAutocorrectionContext dealloc]): Deleted.
3344         * UIProcess/ios/forms/WKFormInputControl.h: Removed -createPeripheralWithView: and declared -initWithView:.
3345         * UIProcess/ios/forms/WKFormInputControl.mm:
3346         (-[WKFormInputControl initWithView:]): Changed to return instancetype.
3347         (+[WKFormInputControl createPeripheralWithView:]): Deleted.
3348         * UIProcess/ios/forms/WKFormSelectControl.h: Removed -createPeripheralWithView: and declared -initWithView:.
3349         * UIProcess/ios/forms/WKFormSelectControl.mm:
3350         (+[WKFormSelectControl createPeripheralWithView:]): Deleted.
3351         * UIProcess/mac/LegacySessionStateCoding.cpp:
3352         (WebKit::decodeLegacySessionState): If dynamic_cf_cast returned nullptr, the result of
3353         CFPropertyListCreateWithData would leak. Stored the CFPropertyListRef in a RetainPtr before calling dynamic_cf_cast.
3354         * UIProcess/mac/ServicesController.mm:
3355         (WebKit::ServicesController::refreshExistingServices): Used a RetainPtr for attachment and cell.
3356         * UIProcess/mac/WebContextMenuProxyMac.mm:
3357         (WebKit::WebContextMenuProxyMac::setupServicesMenu): Used a RetainPtr for groupEntry.
3358
3359 2016-04-23  Chris Dumez  <cdumez@apple.com>
3360
3361         Tie the DiagnosticLoggingClient's lifetime to the Page
3362         https://bugs.webkit.org/show_bug.cgi?id=156938
3363         <rdar://problem/25851499>
3364
3365         Reviewed by Antti Koivisto.
3366
3367         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
3368         (WebKit::WebDiagnosticLoggingClient::pageDestroyed):
3369         (WebKit::WebDiagnosticLoggingClient::mainFrameDestroyed): Deleted.
3370         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
3371         * WebProcess/WebPage/ios/WebPageIOS.mm:
3372         (WebKit::WebPage::willStartUserTriggeredZooming):
3373
3374 2016-04-23  Dan Bernstein  <mitz@apple.com>
3375
3376         <rdar://problem/25893246> WebKit2 has failed to build: error: use of undeclared identifier 'm_playbackSessionManager'
3377
3378         Fixed the non-AVKit build.
3379
3380         * UIProcess/API/Cocoa/WKWebView.mm:
3381         (-[WKWebView _isShowingVideoPictureInPicture]):
3382         (-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]):
3383         * UIProcess/WebPageProxy.cpp:
3384         (WebKit::WebPageProxy::fullScreenManager):
3385         (WebKit::WebPageProxy::playbackSessionManager):
3386         * UIProcess/WebPageProxy.h:
3387         * UIProcess/ios/WebPageProxyIOS.mm:
3388         (WebKit::WebPageProxy::applicationDidBecomeActive):
3389         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3390         (WebKit::WebChromeClient::createScrollingCoordinator):
3391         (WebKit::WebChromeClient::supportsVideoFullscreen):
3392         * WebProcess/WebCoreSupport/WebChromeClient.h:
3393         * WebProcess/WebPage/WebPage.cpp:
3394         (WebKit::WebPage::inspectorUI):
3395         (WebKit::WebPage::playbackSessionManager):
3396         * WebProcess/WebPage/WebPage.h:
3397         * WebProcess/cocoa/WebVideoFullscreenManager.h:
3398         * WebProcess/cocoa/WebVideoFullscreenManager.mm:
3399
3400 2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>
3401
3402         Fixing a typo in my last commit.
3403
3404         Unreviewed build fix.
3405
3406         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
3407         * WebProcess/cocoa/WebVideoFullscreenManager.messages.in:
3408
3409 2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>
3410
3411         Missed some macros to fix builds that do not support AVKit.
3412
3413         Unreviewed build fix.
3414
3415         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
3416         * WebProcess/cocoa/WebVideoFullscreenManager.messages.in:
3417
3418 2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>
3419
3420         Fix builds that do not support AVKit
3421
3422         Unreviewed build fix.
3423
3424         * UIProcess/WebPageProxy.h:
3425
3426 2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>
3427
3428         Take 2 for fixing builds that do not support AVKit
3429
3430         Unreviewed build fix.
3431
3432         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
3433         * UIProcess/WebPageProxy.cpp:
3434         (WebKit::WebPageProxy::resetState):
3435
3436 2016-04-22  Anders Carlsson  <andersca@apple.com>
3437
3438         WKWebView WebSQL is not enabled
3439         https://bugs.webkit.org/show_bug.cgi?id=156928
3440         rdar://problem/19029603
3441
3442         Reviewed by Beth Dakin.
3443
3444         Give databases a default quota of 50 MB, matching what we have in UIWebView.
3445
3446         * UIProcess/Cocoa/UIDelegate.mm:
3447         (WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
3448
3449 2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>
3450
3451         Fix builds that do not support AVKit
3452
3453         Unreviewed build fix.
3454
3455         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
3456         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
3457         * UIProcess/WebPageProxy.cpp:
3458         (WebKit::WebPageProxy::WebPageProxy):
3459         (WebKit::WebPageProxy::reattachToWebProcess):
3460         (WebKit::WebPageProxy::viewDidLeaveWindow):
3461         * UIProcess/ios/WebPageProxyIOS.mm:
3462
3463 2016-04-22  Brady Eidson  <beidson@apple.com>
3464
3465         Modern IDB: Rework the ownership/RefCounting model of IDBConnectionToServer and IDBConnectionProxy.
3466         https://bugs.webkit.org/show_bug.cgi?id=156916
3467
3468         Reviewed by Tim Horton.
3469
3470         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3471         (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
3472
3473 2016-04-22  Zan Dobersek  <zdobersek@igalia.com>
3474
3475         NetworkCacheIOChannelSoup: detach the newly-created IOChannel::readSync thread
3476         https://bugs.webkit.org/show_bug.cgi?id=156907
3477