d39adc9783b3cbcdab6f4690485d92e2cd5bc68a
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-05-20  Chris Dumez  <cdumez@apple.com>
2
3         [WK2][iOS] Update WebContent process sandbox profile for AWD logging
4         https://bugs.webkit.org/show_bug.cgi?id=145229
5         <rdar://problem/20543269>
6
7         Reviewed by Alexey Proskuryakov.
8
9         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
10
11 2015-05-20  Gavin Barraclough  <barraclough@apple.com>
12
13         dispatchViewStateChange should not wait for sync reply if the page isn't visible
14         https://bugs.webkit.org/show_bug.cgi?id=145242
15         <rdar://problem/20967937>
16
17         Reviewed by Ben Poulain.
18
19         This is particularly problematic on iOS, since if the page isn't visible the process is likely suspended.
20
21
22         * UIProcess/WebPageProxy.cpp:
23         (WebKit::WebPageProxy::dispatchViewStateChange):
24         (WebKit::WebPageProxy::waitForDidUpdateViewState):
25
26 2015-05-20  Marcos Chavarría Teijeiro  <mchavarria@igalia.com>
27
28         Enable disk cache for range requests
29         https://bugs.webkit.org/show_bug.cgi?id=144682
30
31         Reviewed by Antti Koivisto.
32
33         Add Range header value to the network cache key constructor so we take
34         into account this value. The 206 response code is also marked to be cached.
35
36         * NetworkProcess/cache/NetworkCache.cpp:
37         (WebKit::NetworkCache::makeCacheKey):
38         (WebKit::NetworkCache::isStatusCodeCacheableByDefault):
39         * NetworkProcess/cache/NetworkCacheKey.cpp:
40         (WebKit::NetworkCache::Key::Key):
41         (WebKit::NetworkCache::Key::operator=):
42         (WebKit::NetworkCache::Key::computeHash):
43         (WebKit::NetworkCache::Key::operator==):
44         (WebKit::NetworkCache::Key::encode):
45         (WebKit::NetworkCache::Key::decode):
46         (WebKit::NetworkCache::Key::stringToHash): Deleted.
47         * NetworkProcess/cache/NetworkCacheKey.h:
48
49 2015-05-20  Anders Carlsson  <andersca@apple.com>
50
51         WKWebsiteDataStore API doesn't report webkit.org as using Databases or App Cache after visiting http://www.webkit.org/demos/sticky-notes/
52         https://bugs.webkit.org/show_bug.cgi?id=145238
53         rdar://problem/20581175
54
55         Reviewed by Tim Horton.
56
57         Make sure to set the application cache and WebSQL directories when using the legacy data store.
58
59         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
60         (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
61         (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory):
62         Rename this and move it to the right place.
63
64         * UIProcess/WebProcessPool.cpp:
65         (WebKit::legacyWebsiteDataStoreConfiguration):
66         Rename this and add the application cache and WebSQL directories.
67
68         (WebKit::WebProcessPool::WebProcessPool):
69         Call legacyWebsiteDataStoreConfiguration.
70
71         (WebKit::WebProcessPool::applicationCacheDirectory):
72         Call legacyPlatformDefaultApplicationCacheDirectory.
73
74         * UIProcess/WebProcessPool.h:
75
76 2015-05-20  Enrica Casucci  <enrica@apple.com>
77
78         [iOS] Using CSS viewport units causes incorrect layout.
79         https://bugs.webkit.org/show_bug.cgi?id=145225
80         rdar://problem/20924495
81
82         Reviewed by Benjamin Poulain.
83
84         * WebProcess/WebPage/ios/WebPageIOS.mm:
85         (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
86
87 2015-05-20  Tim Horton  <timothy_horton@apple.com>
88
89         Allow overriding the waitForDidUpdateViewState timeout
90         https://bugs.webkit.org/show_bug.cgi?id=145230
91         <rdar://problem/20990162>
92
93         Reviewed by Darin Adler.
94
95         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
96         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
97         Use the value from NSUserDefaults, if it exists.
98         We'll only check once, so changing the default requires a restart of the UI process.
99
100 2015-05-20  Anders Carlsson  <andersca@apple.com>
101
102         Make sure we always have a process pool to perform data store operations with
103         https://bugs.webkit.org/show_bug.cgi?id=145231
104         rdar://problem/20618248
105
106         Reviewed by Tim Horton.
107
108         Make sure that we always return a process pool. If we're a legacy C SPI per-context data store,
109         find the process pool we're a part of and use that. Otherwise, create a new one.
110     
111         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
112         (WebKit::WebsiteDataStore::processPools):
113
114 2015-05-19  Jer Noble  <jer.noble@apple.com>
115
116         Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild.
117         https://bugs.webkit.org/show_bug.cgi?id=145193
118
119         Reviewed by Eric Carlson.
120
121         Use HTMLMediaElementEnums instead of HTMLMediaElement.
122
123         * UIProcess/API/Cocoa/WKWebView.mm:
124         (-[WKWebView _isShowingVideoOptimized]): HTMLMediaElement -> HTMLMediaElementEnums.
125         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
126         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
127         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
128         (WebKit::WebVideoFullscreenManagerProxy::hasMode): Ditto.
129         (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged): Ditto.
130         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.
131         (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged): Ditto.
132         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
133         (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Ditto.
134         * WebProcess/WebCoreSupport/WebChromeClient.h:
135         * WebProcess/ios/WebVideoFullscreenManager.h:
136         (WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode): Ditto.
137         (WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode): Ditto.
138         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
139         * WebProcess/ios/WebVideoFullscreenManager.mm:
140         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
141         (WebKit::WebVideoFullscreenManager::fullscreenModeChanged): Ditto.
142         (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.
143
144 2015-05-20  Anders Carlsson  <andersca@apple.com>
145
146         Refactor process pool enumeration code in WebsiteDataStore
147         https://bugs.webkit.org/show_bug.cgi?id=145218
148
149         Reviewed by Tim Horton.
150
151         Also make sure to keep the WebProcessPool objects alive for the duration of the various data store
152         operations. This is the first step towards having the data store create a single process pool lazily if
153         there are no web views associated with the data store.
154
155         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
156         (WebKit::WebsiteDataStore::fetchData):
157         (WebKit::WebsiteDataStore::removeData):
158         (WebKit::WebsiteDataStore::processPools):
159         * UIProcess/WebsiteData/WebsiteDataStore.h:
160
161 2015-05-20  Alex Christensen  <achristensen@webkit.org>
162
163         [Content Extensions] Relax restrictions on triggers that match everything.
164         https://bugs.webkit.org/show_bug.cgi?id=145069
165
166         Reviewed by Benjamin Poulain.
167
168         * UIProcess/API/APIUserContentExtensionStore.h:
169         Increment version number to reflect changes in DFABytecode.
170
171 2015-05-20  Sungmann Cho  <sungmann.cho@navercorp.com>
172
173         Minor cleanups to PluginProcessProxy.
174         https://bugs.webkit.org/show_bug.cgi?id=145199
175
176         Reviewed by Anders Carlsson.
177
178         1. Remove unnecessary forward declaration.
179         2. Remove unnecessary #include.
180
181         * UIProcess/Plugins/PluginProcessProxy.cpp:
182         * UIProcess/Plugins/PluginProcessProxy.h:
183
184 2015-05-20  Marcos Chavarría Teijeiro  <mchavarria@igalia.com>
185
186         [GTK] Add some documentation to WebKitWebExtension
187         https://bugs.webkit.org/show_bug.cgi?id=142786
188
189         Reviewed by Carlos Garcia Campos.
190
191         WebKitWebExtension API documentation lacks of some details and the information
192         available is in some contributors blog posts. I add the section
193         documentation with a small guide about how to use WebExtensions.
194
195         The code examples were taken from Carlos García and Adrián Pérez blog
196         posts.
197
198         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
199
200 2015-05-20  Sungmann Cho  <sungmann.cho@navercorp.com>
201
202         Rename WebsiteDataStore::isNonPersistent() to WebsiteDataStore::isPersistent().
203         https://bugs.webkit.org/show_bug.cgi?id=145111
204
205         Reviewed by Darin Adler.
206
207         This is a follow up to https://bugs.webkit.org/show_bug.cgi?id=144158.
208
209         * UIProcess/API/APIWebsiteDataStore.cpp:
210         (API::WebsiteDataStore::isPersistent):
211         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
212         (WebKit::WebsiteDataStore::fetchData):
213         (WebKit::WebsiteDataStore::removeData):
214         * UIProcess/WebsiteData/WebsiteDataStore.h:
215         (WebKit::WebsiteDataStore::isPersistent):
216         (WebKit::WebsiteDataStore::isNonPersistent): Deleted.
217
218 2015-05-20  Hyungwook Lee  <hyungwook.lee@navercorp.com>
219
220         [EFL] Fix build failure, linker does not find libXext.
221         https://bugs.webkit.org/show_bug.cgi?id=144100
222
223         Reviewed by Gyuyoung Kim.
224
225         Move Xext library from WebProcess_LIBRARIES to WebKit2_LIBRARIES.
226
227         * PlatformEfl.cmake:
228
229 2015-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
230
231         [SOUP] Network Cache: Implement ShareableResource for Soup and enable it for GTK platform
232         https://bugs.webkit.org/show_bug.cgi?id=144380
233
234         Reviewed by Antti Koivisto.
235
236         It improves the network cache performance, by mmaping big
237         resources and sending only the file descriptor to the web process
238         instead of the actual file data. It needs some changes in
239         cross-platform code, because we can't use the same approach as
240         mac (it uses a platform specific implementation not available in
241         other platforms).
242
243         * NetworkProcess/cache/NetworkCache.cpp:
244         (WebKit::NetworkCache::Cache::store): Use
245         Data::tryCreateSharedMemory() to create the shared memory used by
246         the ShareableResource. Also add an ASSERT instead of checking the
247         shareable resource created is not nullptr, because the
248         ShareableResource::create() that receives a shared memory should
249         never return nullptr.
250         * NetworkProcess/cache/NetworkCacheData.h:
251         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
252         (WebKit::NetworkCache::Data::tryCreateSharedMemory):
253         * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
254         (WebKit::NetworkCache::Data::tryCreateSharedMemory): Create a
255         SharedMemory object to wrap the mapped file, but keeping the ownership.
256         * NetworkProcess/cache/NetworkCacheEntry.cpp:
257         (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
258         Use Data::tryCreateSharedMemory() to create the shared memory used
259         bythe ShareableResource. Also add an ASSERT instead of checking
260         the shareable resource created is not nullptr, because the
261         ShareableResource::create() that receives a shared memory should
262         never return nullptr.
263         * Platform/SharedMemory.h:
264         * Platform/unix/SharedMemoryUnix.cpp:
265         (WebKit::SharedMemory::map): Use wrapMap() and initialize
266         m_isWrappingMap to false.
267         (WebKit::SharedMemory::wrapMap): Create a SharedMemory object for
268         the given map, without taking its ownership.
269         (WebKit::SharedMemory::~SharedMemory): Do not unmap and close the
270         file descriptor if m_isWrappingMap is true.
271         * Shared/ShareableResource.cpp:
272         (WebKit::createShareableResourceDeallocator):
273         (WebKit::ShareableResource::wrapInSharedBuffer): Create a SharedBuffer
274         wrapping the ShareableResource data.
275         (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer): Create
276         a ShareableResource for the handle and create a SharedBuffer
277         wrapping it.
278         * Shared/ShareableResource.h:
279         * WebKit2Prefix.h: Enable ENABLE_SHAREABLE_RESOURCE for GTK.
280         * WebProcess/Network/WebResourceLoader.cpp:
281         (WebKit::WebResourceLoader::didReceiveResource): Get the CFData
282         from the SharedBuffer for QuickLook instead of wrapping the handle again.
283
284 2015-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
285
286         [SOUP] Network Cache: Disable network cache efficacy logging
287         https://bugs.webkit.org/show_bug.cgi?id=145172
288
289         Reviewed by Martin Robinson.
290
291         Disable network cache efficacy logging by default, since we are
292         not currently using the collected data.
293
294         * UIProcess/soup/WebProcessPoolSoup.cpp:
295         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
296
297 2015-05-19  Michael Saboff  <msaboff@apple.com>
298
299         REGRESSION(183787): JIT is enabled for all builds
300         https://bugs.webkit.org/show_bug.cgi?id=145179
301
302         Reviewed by Geoffrey Garen.
303
304         Eliminated the setting of ENABLE_JIT, as wtf/Platform.h has appropriate logic to
305         set it depending on OS and CPU type.
306
307         * Configurations/FeatureDefines.xcconfig:
308
309 2015-05-19  Brady Eidson  <beidson@apple.com>
310
311         X-Frame-Options headers not respected when loading from application cache.
312         <rdar://problem/14877623> and https://bugs.webkit.org/show_bug.cgi?id=131800
313
314         Reviewed by Alexey Proskuryakov.
315
316         * WebProcess/WebPage/WebPage.cpp:
317         (WebKit::WebPage::loadDataImpl):
318
319 2015-05-19  Sungmann Cho  <sungmann.cho@navercorp.com>
320
321         Add PLUGIN_ARCHITECTURE(MAC) around WKNVCALayerRenderServerPort in NetscapeBrowserFunc.h.
322         https://bugs.webkit.org/show_bug.cgi?id=145173
323
324         Reviewed by Anders Carlsson.
325
326         WKNVCALayerRenderServerPort in NetscapeBrowserFunc.h is meaningful only for Mac.
327         So we need to add PLUGIN_ARCHITECTURE(MAC) around it.
328
329         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h:
330
331 2015-05-19  Brent Fulgham  <bfulgham@apple.com>
332
333         REGRESSION(142590): Part 2: Scroll-snap points are improperly snapping to earlier index values (Scrolling Thread) 
334         https://bugs.webkit.org/show_bug.cgi?id=145175
335         <rdar://problem/21023785>
336
337         Reviewed by Beth Dakin.
338
339         Add a stub implementation of isScrollSnapInProgress to match ScrollingCoordinator signature.
340
341         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
342         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
343         (WebKit::RemoteScrollingCoordinator::isScrollSnapInProgress): Added stub.
344
345 2015-05-19  Jeremy Jones  <jeremyj@apple.com>
346
347         WebVideoFullscreenManagerProxy has incorrect OS_VERSION_MIN_REQUIRED conditionals.
348         https://bugs.webkit.org/show_bug.cgi?id=145158
349
350         Reviewed by Eric Carlson.
351
352         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
353         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
354
355 2015-05-19  Ting-Wei Lan  <lantw44@gmail.com>
356
357         [SOUP] Use st_birthtime to get creation time of files on systems support it
358         https://bugs.webkit.org/show_bug.cgi?id=144989
359
360         Reviewed by Carlos Garcia Campos.
361
362         FreeBSD and NetBSD have either st_birthtime field or compatiblity macro
363         with the same name in stat. It is better to use it instead of manually
364         setting xattr, which is unreliable because both operating systems and
365         file systems support are required.
366
367         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
368         (WebKit::NetworkCache::fileTimes):
369         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
370         (WebKit::NetworkCache::IOChannel::IOChannel):
371
372 2015-05-19  Chris Dumez  <cdumez@apple.com>
373
374         Mark static variables as const when possible
375         https://bugs.webkit.org/show_bug.cgi?id=145161
376
377         Reviewed by Andreas Kling.
378
379         * Platform/IPC/MessageEncoder.cpp:
380         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
381         (WebKit::networkProcessLatencyQOS):
382         (WebKit::networkProcessThroughputQOS):
383         (WebKit::webProcessLatencyQOS):
384         (WebKit::webProcessThroughputQOS):
385         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
386         (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap):
387         (WebKit::pluginProcessLatencyQOS):
388         (WebKit::pluginProcessThroughputQOS):
389         * WebProcess/WebPage/WebPage.cpp:
390
391 2015-05-18  Michael Catanzaro  <mcatanzaro@igalia.com>
392
393         [CMake] Ignore warnings in system headers
394         https://bugs.webkit.org/show_bug.cgi?id=144747
395
396         Reviewed by Darin Adler.
397
398         Separate include directories into WebKit project includes and system includes. Suppress all
399         warnings from headers in system include directories using the SYSTEM argument to
400         the include_directories command.
401
402         * CMakeLists.txt:
403         * PlatformEfl.cmake:
404         * PlatformGTK.cmake:
405
406 2015-05-18  Csaba Osztrogonác  <ossy@webkit.org>
407
408         Fix return-type warnings in test_ewk2_color_picker.cpp
409         https://bugs.webkit.org/show_bug.cgi?id=145122
410
411         Reviewed by Gyuyoung Kim.
412
413         * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
414         (EWK2ColorPickerTest::hideColorPicker):
415         (EWK2ColorPickerTest::hideColorPickerByRemovingElement):
416
417 2015-05-18  Skachkov Alexandr  <gskachkov@gmail.com>
418
419         [ES6] Arrow function syntax. Feature flag for arrow function
420         https://bugs.webkit.org/show_bug.cgi?id=145108
421
422         Reviewed by Ryosuke Niwa.
423
424         Added feature flag ENABLE_ES6_ARROWFUNCTION_SYNTAX for arrow function
425
426         * Configurations/FeatureDefines.xcconfig:
427
428 2015-05-18  Anders Carlsson  <andersca@apple.com>
429
430         WKWebsiteDataStore should fully support session storage
431         https://bugs.webkit.org/show_bug.cgi?id=145145
432         rdar://problem/10690447
433
434         Reviewed by Sam Weinig.
435
436         Add a session store data type and handle it when clearing and fetching data.
437
438         * Shared/WebsiteData/WebsiteDataTypes.h:
439         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
440         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
441         (dataTypesToString):
442         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
443         (WebKit::toWebsiteDataTypes):
444         (WebKit::toWKWebsiteDataTypes):
445         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
446         (+[WKWebsiteDataStore allWebsiteDataTypes]):
447         * UIProcess/Storage/StorageManager.cpp:
448         (WebKit::StorageManager::SessionStorageNamespace::origins):
449         (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
450         (WebKit::StorageManager::SessionStorageNamespace::clearAllStorageAreas):
451         (WebKit::StorageManager::getSessionStorageOrigins):
452         (WebKit::StorageManager::deleteSessionStorageOrigins):
453         (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
454         * UIProcess/Storage/StorageManager.h:
455         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
456         (WebKit::WebsiteDataStore::fetchData):
457         (WebKit::WebsiteDataStore::removeData):
458
459 2015-05-18  Brady Eidson  <beidson@apple.com>
460
461         Followup to: Networking process on iOS can be suspended and never exit
462         https://bugs.webkit.org/show_bug.cgi?id=144971.
463
464         Unreviewed. Fixing API tests that revealed the unintentional change in behavior.
465
466         * Shared/ChildProcessProxy.cpp:
467         (WebKit::ChildProcessProxy::shutDownProcess): The on WebProcessProxy code path that this
468           was adopted from had an m_connection null check, and that null check needs to remain.
469
470 2015-05-18  Csaba Osztrogonác  <ossy@webkit.org>
471
472         [GTK] URTBF after r184503.
473
474         * PlatformGTK.cmake:
475
476 2015-05-18  Brady Eidson  <beidson@apple.com>
477
478         Networking process on iOS can be suspended and never exit.
479         <rdar://problem/20368630> and https://bugs.webkit.org/show_bug.cgi?id=144971
480
481         Reviewed by Darin Adler.
482
483         There's a few issues here.
484         
485         1 - When the NetworkProcessProxy goes away, it takes its process assertion with it. This causes
486             the Network process to suspend indefinitely, unable to ever respond to IPC::Connection callbacks.
487             We already solved this with WebProcess with a watchdog timer keeping both the process assertion
488             and xpc_connection alive while the process shuts down. This patch expands that to the network
489             process, and it will be easy to expand that to database and plugin processes doing forward.
490         
491         2 - All of our child processes either decide to self-terminate or listen for their connection to
492             close at which point they terminate. This leads to various races. We should
493             move to a model where the UI process explicitly tells them to shutdown, and this patch starts us 
494             down that path.
495         
496         * CMakeLists.txt:
497         * DerivedSources.make:
498         * WebKit2.xcodeproj/project.pbxproj:
499         
500         * NetworkProcess/NetworkProcess.cpp:
501         (WebKit::NetworkProcess::didReceiveMessage): Send ChildProcess messages to ChildProcess.
502         
503         * Shared/ChildProcess.cpp:
504         (WebKit::ChildProcess::shutDown): For now, just terminate the process. In the future have the
505           process do cleanup work before it is terminated.
506         * Shared/ChildProcess.h:
507         * Shared/ChildProcess.messages.in: Added.
508         
509         * Shared/ChildProcessProxy.cpp:
510         (WebKit::ChildProcessProxy::shutDownProcess): Set a watchdog and - if possible - explicitly message 
511           the process to ShutDown.
512         (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded): Deleted.
513         * Shared/ChildProcessProxy.h:
514         
515         * UIProcess/WebProcessPool.cpp:
516         (WebKit::WebProcessPool::~WebProcessPool): Explicitly tell the network process to shut down.
517         
518         * UIProcess/WebProcessProxy.cpp:
519         (WebKit::WebProcessProxy::removeWebPage): Move abortProcessLaunchIfNeeded() and the watchdog timer
520           code to ChildProcessProxy::shutDownProcess.
521         
522         * WebProcess/WebProcess.cpp:
523         (WebKit::WebProcess::didReceiveMessage): Send ChildProcess messages to ChildProcess::didReceiveMessage.
524
525 2015-05-17  Carlos Garcia Campos  <cgarcia@igalia.com>
526
527         Network Cache: Make Data::adoptMap take the ownership of the file descriptor
528         https://bugs.webkit.org/show_bug.cgi?id=144950
529
530         Reviewed by Antti Koivisto.
531
532         It will be required to implement ShareableResource for soup
533         network backend. Also move the common code of Data to a common
534         file and add mapToFile(). The mapFile version that receives a file
535         descriptor has been renamed to adoptAndMapFile().
536
537         * CMakeLists.txt: Add new file to compilation.
538         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
539         (WebKit::NetworkCache::BlobStorage::add): Use mapToFile().
540         * NetworkProcess/cache/NetworkCacheData.cpp: Added.
541         (WebKit::NetworkCache::Data::mapToFile): Write the data to the
542         given file and map it.
543         (WebKit::NetworkCache::mapFile):
544         (WebKit::NetworkCache::adoptAndMapFile):
545         (WebKit::NetworkCache::computeSHA1):
546         (WebKit::NetworkCache::bytesEqual):
547         * NetworkProcess/cache/NetworkCacheData.h:
548         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
549         (WebKit::NetworkCache::Data::adoptMap): Close the file descriptor.
550         * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
551         (WebKit::NetworkCache::Data::Data): Use a constructor that
552         receives a file descriptor instead of the one receiving
553         Backing. If the file descriptor is not -1 then the Data is a map.
554         (WebKit::NetworkCache::MapWrapper::~MapWrapper): Also close the
555         file descriptor.
556         (WebKit::NetworkCache::Data::adoptMap): Pass the file descriptor
557         to the MapWrapper and create the Data passing the file descriptor.
558         * UIProcess/API/APIUserContentExtensionStore.cpp:
559         (API::openAndMapContentExtension): Use mapFile that receives a
560         file path.
561         (API::compiledToFile): Use adoptAndMapFile() and don't close the
562         descriptor.
563
564 2015-05-16  Andy Estes  <aestes@apple.com>
565
566         [iOS] WKPDFView should not follow javascript: links
567         https://bugs.webkit.org/show_bug.cgi?id=145101
568
569         Reviewed by Dan Bernstein.
570
571         * UIProcess/WebPageProxy.cpp:
572         (WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick): Returned early if url's protocol is javascript:.
573         (WebKit::WebPageProxy::navigateToURLWithSimulatedClick): Renamed to navigateToPDFLinkWithSimulatedClick to
574         reflect that this function is exclusively for following PDF links.
575         * UIProcess/WebPageProxy.h:
576         * UIProcess/ios/WKPDFView.mm:
577         (-[WKPDFView annotation:wasTouchedAtPoint:controller:]):
578         (-[WKPDFView actionSheetAssistant:openElementAtLocation:]):
579         * WebProcess/WebPage/WebPage.cpp:
580         (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick): Renamed from navigateToURLWithSimulatedClick.
581         (WebKit::WebPage::navigateToURLWithSimulatedClick): Renamed to navigateToPDFLinkWithSimulatedClick.
582         * WebProcess/WebPage/WebPage.h:
583         * WebProcess/WebPage/WebPage.messages.in:
584
585 2015-05-16  Brent Fulgham  <bfulgham@apple.com>
586
587         [iOS] Remote scrolling tree needs to coordinate scroll snap state during resize/rotations
588         https://bugs.webkit.org/show_bug.cgi?id=145059
589         <rdar://problem/20975978>
590
591         Reviewed by Simon Fraser.
592
593         The web view needs to update its scroll snap point offsets to take into account any
594         adjustments to the view size caused by content insets. We also need to update the
595         offstes after device rotation.
596
597         * UIProcess/API/Cocoa/WKWebView.mm:
598         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Retrieve the proper
599         computed content inset for the view and incorporate into any scroll snap point adjustments.
600         (-[WKWebView _updateVisibleContentRects]): If we have active scroll snap points, 
601         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
602         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
603         (WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Update to account
604         for content inset.
605         (WebKit::RemoteScrollingCoordinatorProxy::shouldSnapForMainFrameScrolling): Also validate that the
606         active index is valid.
607         (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Update to track
608         current active snap offset index.
609         (WebKit::RemoteScrollingCoordinatorProxy::hasActiveSnapPoint): Added.
610         (WebKit::RemoteScrollingCoordinatorProxy::nearestActiveSnapPoint): Added. It calculates the proper
611         scroll position incorporating any snap point and content insets.
612
613 2015-05-15  Yongjun Zhang  <yongjun_zhang@apple.com>
614
615         Don't reset the preview recognizer in [WKContentViewInteraction cleanupInteraction]
616         https://bugs.webkit.org/show_bug.cgi?id=145081
617
618         We shouldn't reset the recognizer in [WKContentViewInteraction cleanupInteraction] since we don't re-add it
619         back to WKContentView when the process relaunched. Since we already add/remove it when the view is move into/
620         removed from the window, we don't need reset it in cleanupInteraction.
621
622         Reviewed by Dan Bernstein.
623
624         * UIProcess/ios/WKContentViewInteraction.mm:
625         (-[WKContentView cleanupInteraction]):
626
627 2015-05-15  James Savage  <james.savage@apple.com>
628
629         REGRESSION (r181910): WKWebView incorrectly scales snapshot
630         https://bugs.webkit.org/show_bug.cgi?id=145076
631
632         Reviewed by Tim Horton.
633
634         We added a fast path to snapshotting using IOSurfaces with
635         http://trac.webkit.org/changeset/181910 which incorrectly determined
636         scale and transform and resulted in bad snapshots in some situations.
637
638         * UIProcess/API/Cocoa/WKWebView.mm:
639         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
640         When snapshotting an IOSurface we need to compute our scale based off of
641         the rect in the WKWebView coordinates, we also failed to account for
642         non-zero origins in the snapshot rect. Remove an unused varible while
643         we're here.
644
645 2015-05-15  Alex Christensen  <achristensen@webkit.org>
646
647         [Content Extensions] Fail to load old content extension files
648         https://bugs.webkit.org/show_bug.cgi?id=145027
649
650         Reviewed by Eric Carlson.
651
652         * UIProcess/API/APIUserContentExtensionStore.cpp:
653         (API::openAndMapContentExtension):
654         * UIProcess/API/APIUserContentExtensionStore.h:
655
656 2015-05-15  Jeremy Jones  <jeremyj@apple.com>
657
658         Limit alternate fullscreen with linked on or after.
659         https://bugs.webkit.org/show_bug.cgi?id=144894
660
661         Reviewed by Dean Jackson.
662
663         * UIProcess/API/Cocoa/WKWebView.mm:
664         (shouldAllowAlternateFullscreen): Added.
665         (-[WKWebView initWithFrame:configuration:]):
666
667 2015-05-15  Chris Dumez  <cdumez@apple.com>
668
669         [WK2][Cocoa] Back swipe tab snapshot takes a long time to be removed on bing.com
670         https://bugs.webkit.org/show_bug.cgi?id=145061
671         <rdar://problem/20939743>
672
673         Reviewed by Tim Horton.
674
675         When swiping back from a video search result to the list of video
676         search results on bing.com, the back swipe gesture tab snapshot takes
677         ~3 seconds to be removed, even though the page gets loaded almost
678         instantly from PageCache. The tab snapshot should be removed as soon as
679         the load is done.
680
681         The issue is that we only cleared the back swipe gesture tab snapshot
682         after PageClient::didFinishLoadForMainFrame() has been called. However,
683         PageClient::didFinishLoadForMainFrame() was only being called by
684         WebPageProxy if the main frame loaded *without* error. In case the main
685         frame loaded with an error, only WebPageProxy::didFailLoadForFrame() is
686         called, not WebPageProxy::didFinishLoadForFrame() and we would fail to
687         remove the gesture snapshot until the 3 seconds timeout.
688
689         This patch calls PageClient::didFinishLoadForMainFrame() from
690         WebPageProxy::didFailLoadForFrame() so we remove the snapshot in the
691         error case as well.
692
693         The reason didFailLoadForFrame() is being called on bing.com video
694         search results is because a "ping" load is aborted when the page is
695         entering PageCache. Aborting any kind of resource load sets a
696         "cancellation" error on the main document.
697
698         * UIProcess/WebPageProxy.cpp:
699         (WebKit::WebPageProxy::didFailLoadForFrame):
700
701 2015-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
702
703         REGRESSION(r183861): [SOUP] Downloads are broken when using the Network Process
704         https://bugs.webkit.org/show_bug.cgi?id=144738
705
706         Reviewed by Alexey Proskuryakov.
707
708         When converting the main resource handle to a download, the
709         NetworkResourceLoader is aborted, and the ResourceHandle is
710         cleaned up aborting the download operation. We need to use a
711         different ResourceHandle for the download operation.
712
713         * Shared/Downloads/soup/DownloadSoup.cpp:
714         (WebKit::Download::startWithHandle): Use ResourceHandle::releaseForDownload()
715         instead of reusing the given handle.
716
717 2015-05-14  Brady Eidson  <beidson@apple.com>
718
719         Rename connectionDidClose and related methods to be more clear.
720         https://bugs.webkit.org/show_bug.cgi?id=145030
721
722         Reviewed by Darin Adler.
723
724         These methods were easy to confuse with "Connection::Client::didClose()", yet they
725         were about something much more explicit: A child process being shut down by the UI Process.
726
727         Let's call them as such.
728
729         * Shared/ChildProcessProxy.cpp:
730         (WebKit::ChildProcessProxy::shutDownProcess):
731         (WebKit::ChildProcessProxy::clearConnection): Deleted.
732         (WebKit::ChildProcessProxy::connectionDidClose): Deleted.
733         * Shared/ChildProcessProxy.h:
734
735         * UIProcess/Databases/DatabaseProcessProxy.cpp:
736         (WebKit::DatabaseProcessProxy::processWillShutDown):
737         * UIProcess/Databases/DatabaseProcessProxy.h:
738
739         * UIProcess/Network/NetworkProcessProxy.cpp:
740         (WebKit::NetworkProcessProxy::processWillShutDown):
741         * UIProcess/Network/NetworkProcessProxy.h:
742
743         * UIProcess/Plugins/PluginProcessProxy.cpp:
744         (WebKit::PluginProcessProxy::processWillShutDown):
745         * UIProcess/Plugins/PluginProcessProxy.h:
746
747         * UIProcess/WebFrameProxy.cpp:
748         (WebKit::WebFrameProxy::webProcessWillShutDown):
749         (WebKit::WebFrameProxy::disconnect): Deleted.
750         * UIProcess/WebFrameProxy.h:
751
752         * UIProcess/WebPageProxy.cpp:
753         (WebKit::WebPageProxy::webProcessWillShutDown):
754         (WebKit::WebPageProxy::connectionDidClose): Deleted.
755         * UIProcess/WebPageProxy.h:
756
757         * UIProcess/WebProcessLifetimeTracker.cpp:
758         (WebKit::WebProcessLifetimeTracker::webProcessWillShutDown):
759         (WebKit::WebProcessLifetimeTracker::connectionDidClose): Deleted.
760         * UIProcess/WebProcessLifetimeTracker.h:
761
762         * UIProcess/WebProcessProxy.cpp:
763         (WebKit::WebProcessProxy::processWillShutDown):
764         (WebKit::WebProcessProxy::shutDown):
765         (WebKit::WebProcessProxy::removeWebPage):
766         (WebKit::WebProcessProxy::didClose):
767         (WebKit::WebProcessProxy::disconnectFramesFromPage):
768         (WebKit::WebProcessProxy::shouldTerminate):
769         (WebKit::WebProcessProxy::requestTermination):
770         (WebKit::WebProcessProxy::connectionDidClose): Deleted.
771         (WebKit::WebProcessProxy::disconnect): Deleted.
772         * UIProcess/WebProcessProxy.h:
773
774 2015-05-14  Zhuo Li  <zachli@apple.com>
775
776         Some CFNetwork SPI to reset HSTS hosts added since a date should not be used on Yosemite.
777         https://bugs.webkit.org/show_bug.cgi?id=145025.
778         and
779         rdar://problem/20646308.
780
781         Reviewed by Alexey Proskuryakov.
782
783         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
784         (WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate):
785
786 2015-05-14  Timothy Horton  <timothy_horton@apple.com>
787
788         Add a layout mode that scales down the view to try to fit the document
789         https://bugs.webkit.org/show_bug.cgi?id=145022
790         <rdar://problem/19790341>
791
792         Reviewed by Dean Jackson.
793
794         * Shared/WebPageCreationParameters.cpp:
795         (WebKit::WebPageCreationParameters::encode):
796         (WebKit::WebPageCreationParameters::decode):
797         * Shared/WebPageCreationParameters.h:
798         * UIProcess/WebPageProxy.cpp:
799         (WebKit::WebPageProxy::creationParameters):
800         (WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
801         * UIProcess/WebPageProxy.h:
802         * WebProcess/WebPage/DrawingArea.h:
803         (WebKit::DrawingArea::setShouldScaleViewToFitDocument):
804         * WebProcess/WebPage/WebPage.cpp:
805         (WebKit::WebPage::WebPage):
806         (WebKit::WebPage::setShouldScaleViewToFitDocument):
807         * WebProcess/WebPage/WebPage.h:
808         * WebProcess/WebPage/WebPage.messages.in:
809         Plumb shouldScaleViewToFitDocument through to the DrawingArea.
810
811         * UIProcess/mac/WKViewLayoutStrategy.mm:
812         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
813         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]):
814         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy updateLayout]):
815         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy willChangeLayoutStrategy]):
816         * UIProcess/API/C/WKLayoutMode.h:
817         * UIProcess/API/Cocoa/_WKLayoutMode.h:
818         Add a new layout mode, which just turns on shouldScaleViewToFitDocument,
819         and otherwise behaves as normal.
820
821         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
822         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
823         (WebKit::TiledCoreAnimationDrawingArea::setShouldScaleViewToFitDocument):
824         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
825         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
826         On every flush where either the document size or view size has changed,
827         or layout is outstanding, do a layout with fixed layout off to determine
828         whether the document fits inside the view. If it doesn't, scale it down
829         to fit. This will require an extra layout for every resize while in the
830         scaled-down state, but there is potential for future optimization.
831
832 2015-05-14  Anders Carlsson  <andersca@apple.com>
833
834         Local storage origins should include origins with transient local storage
835         https://bugs.webkit.org/show_bug.cgi?id=145017
836         rdar://problem/10690447
837
838         Reviewed by Sam Weinig.
839
840         The transient local storage namespaces are used for third party data blocking and will stay
841         around until the UI process exits so we need to be able to include website data from transient storage
842         in the website data store APIs.
843
844         * UIProcess/Storage/StorageManager.cpp:
845         (WebKit::StorageManager::TransientLocalStorageNamespace::origins):
846         (WebKit::StorageManager::getLocalStorageOrigins):
847         * UIProcess/Storage/StorageManager.h:
848         * UIProcess/WebKeyValueStorageManager.cpp:
849         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
850         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
851         (WebKit::WebsiteDataStore::fetchData):
852
853 2015-05-14  Beth Dakin  <bdakin@apple.com>
854
855         Change range of possible forces for mouseforcechanged DOM event
856         https://bugs.webkit.org/show_bug.cgi?id=144987
857         -and corresponding-
858         rdar://problem/20472802
859
860         Reviewed by Tim Horton.
861
862         Change to a 0-3 range.
863         * Shared/mac/WebEventFactory.mm:
864         (WebKit::WebEventFactory::createWebMouseEvent):
865
866 2015-05-14  Zan Dobersek  <zdobersek@igalia.com>
867
868         [GTK] Add missing ENABLE(NETSCAPE_PLUGIN_API) build guards
869         https://bugs.webkit.org/show_bug.cgi?id=144994
870
871         Reviewed by Carlos Garcia Campos.
872
873         This fixes the build when configured with Netscape plugin API
874         support disabled.
875
876         * UIProcess/API/gtk/WebKitWebContext.cpp:
877         (webkit_web_context_set_additional_plugins_directory):
878         (webkitWebContextGetPluginThread):
879         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
880         (WebKit::ProcessLauncher::launchProcess):
881
882 2015-05-13  Carlos Garcia Campos  <cgarcia@igalia.com>
883
884         [SOUP] Network Cache: NetworkProcess segfault when file system doesn't support xattrs
885         https://bugs.webkit.org/show_bug.cgi?id=144953
886
887         Reviewed by Martin Robinson.
888
889         Return early if we fail to get the birthtime xattr.
890
891         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
892         (WebKit::NetworkCache::fileTimes):
893
894 2015-05-13  Daniel Bates  <dabates@apple.com>
895
896         Rename ProcessThrottlerClient::{send, cancel}ProcessWillSuspend() to {send, cancel}PrepareToSuspend()
897         https://bugs.webkit.org/show_bug.cgi?id=144619
898         <rdar://problem/20812779>
899
900         Reviewed by Andy Estes.
901
902         The names of the functions ProcessThrottlerClient::{send, cancel}ProcessWillSuspend() are misnomers. These
903         functions are called when the ProcessThrottler wants to prepare the process that it manages for suspension
904         and changes its mind, respectively. That is, these functions do not actually correspond to the OS decision
905         to suspend a process or cancel the suspension of a process, respectively. So, rename these functions and
906         associated {Network, Web}ProcessProxy message names to better describe their purpose.
907
908         * NetworkProcess/NetworkProcess.cpp:
909         (WebKit::NetworkProcess::prepareToSuspend):
910         (WebKit::NetworkProcess::cancelPrepareToSuspend):
911         (WebKit::NetworkProcess::processWillSuspend): Deleted.
912         (WebKit::NetworkProcess::cancelProcessWillSuspend): Deleted.
913         * NetworkProcess/NetworkProcess.h:
914         * NetworkProcess/NetworkProcess.messages.in:
915         * UIProcess/Network/NetworkProcessProxy.cpp:
916         (WebKit::NetworkProcessProxy::sendPrepareToSuspend):
917         (WebKit::NetworkProcessProxy::sendCancelPrepareToSuspend):
918         (WebKit::NetworkProcessProxy::sendProcessWillSuspend): Deleted.
919         (WebKit::NetworkProcessProxy::sendCancelProcessWillSuspend): Deleted.
920         * UIProcess/Network/NetworkProcessProxy.h:
921         * UIProcess/ProcessThrottler.cpp:
922         (WebKit::ProcessThrottler::updateAssertion):
923         * UIProcess/ProcessThrottlerClient.h:
924         * UIProcess/WebProcessProxy.cpp:
925         (WebKit::WebProcess::actualPrepareToSuspend): Formerly named prepareToSuspend.
926         (WebKit::WebProcessProxy::sendPrepareToSuspend):
927         (WebKit::WebProcessProxy::sendCancelPrepareToSuspend):
928         (WebKit::WebProcessProxy::sendProcessWillSuspend): Deleted.
929         (WebKit::WebProcessProxy::sendCancelProcessWillSuspend): Deleted.
930         * UIProcess/WebProcessProxy.h:
931         * WebProcess/WebProcess.cpp:
932         (WebKit::WebProcess::prepareToSuspend):
933         (WebKit::WebProcess::cancelPrepareToSuspend):
934         (WebKit::WebProcess::processWillSuspend): Deleted.
935         (WebKit::WebProcess::cancelProcessWillSuspend): Deleted.
936         * WebProcess/WebProcess.h:
937         * WebProcess/WebProcess.messages.in:
938
939 2015-05-13  Anders Carlsson  <andersca@apple.com>
940
941         Don't create a per-pool data store when using the modern API
942         https://bugs.webkit.org/show_bug.cgi?id=144963
943         rdar://problem/20331756
944
945         Reviewed by Tim Horton.
946
947         * UIProcess/API/APIProcessPoolConfiguration.cpp:
948         (API::ProcessPoolConfiguration::createWithLegacyOptions):
949         (API::ProcessPoolConfiguration::copy):
950         * UIProcess/API/APIProcessPoolConfiguration.h:
951         Keep track of whether the process pool should have a data store.
952
953         * UIProcess/API/C/WKContext.cpp:
954         (WKContextGetWebsiteDataStore):
955         * UIProcess/WebKeyValueStorageManager.cpp:
956         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
957         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
958         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
959         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
960         Update now that WebProcessPool::dataStore() no longer returns a reference.
961
962         * UIProcess/WebProcessPool.cpp:
963         (WebKit::WebProcessPool::WebProcessPool):
964         Only create a data store if the configuration states that we should.
965
966         * UIProcess/WebProcessPool.h:
967         Change dataStore() to return a pointer instead of a reference.
968
969 2015-05-13  Alexey Proskuryakov  <ap@apple.com>
970
971         [Mac] Sandbox violation reading SubmitDiagInfo.domains
972         https://bugs.webkit.org/show_bug.cgi?id=144962
973         rdar://problem/20719330
974
975         Reviewed by Darin Adler.
976
977         * WebProcess/com.apple.WebProcess.sb.in:
978
979 2015-05-13  Beth Dakin  <bdakin@apple.com>
980
981         Speculative build fix.
982
983         * UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h:
984
985 2015-05-13  Michael Catanzaro  <mcatanzaro@igalia.com>
986
987         [GTK][CMake] Extra include directory when libnotify is present but disabled
988         https://bugs.webkit.org/show_bug.cgi?id=144941
989
990         Reviewed by Martin Robinson.
991
992         Add LIBNOTIFY_INCLUDE_DIRS to WebKit2_INCLUDE_DIRECTORIES only if USE_LIBNOTIFY is true,
993         rather than checking LIBNOTIFY_FOUND.
994
995         * PlatformGTK.cmake:
996
997 2015-05-13  Beth Dakin  <bdakin@apple.com>
998
999         Need SPI to set the overlay scroll bar style
1000         https://bugs.webkit.org/show_bug.cgi?id=144928
1001         -and corresponding-
1002         rdar://problem/20143614
1003
1004         Reviewed by Anders Carlsson.
1005
1006         Make scrollbarOverlayStyle a part of the creation parameters. 
1007         * Shared/WebPageCreationParameters.cpp:
1008         (WebKit::WebPageCreationParameters::encode):
1009         (WebKit::WebPageCreationParameters::decode):
1010         * Shared/WebPageCreationParameters.h:
1011
1012         New SPI.
1013         * UIProcess/API/Cocoa/WKViewPrivate.h:
1014         * UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h: Added.
1015         * UIProcess/API/mac/WKView.mm:
1016         (-[WKView _setOverlayScrollbarStyle:]):
1017         (-[WKView _overlayScrollbarStyle]):
1018
1019         Store m_scrollbarOverlayStyle on WebPageProxy, and set it to the WebProcess.
1020         * UIProcess/WebPageProxy.cpp:
1021         (WebKit::WebPageProxy::WebPageProxy):
1022         (WebKit::WebPageProxy::creationParameters):
1023         (WebKit::WebPageProxy::setOverlayScrollbarStyle):
1024         * UIProcess/WebPageProxy.h:
1025         (WebKit::WebPageProxy::overlayScrollbarStyle):
1026         * WebKit2.xcodeproj/project.pbxproj:
1027
1028         Return WebPage’s scrollbarOverlayStyle().
1029         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1030         (WebKit::WebChromeClient::preferredScrollbarOverlayStyle):
1031         * WebProcess/WebCoreSupport/WebChromeClient.h:
1032
1033         Cache the scrollbarOverlayStyle() here for the WebProcess. 
1034         * WebProcess/WebPage/WebPage.cpp:
1035         (WebKit::WebPage::WebPage):
1036         (WebKit::WebPage::setScrollbarOverlayStyle):
1037         * WebProcess/WebPage/WebPage.h:
1038         (WebKit::WebPage::scrollbarOverlayStyle):
1039         * WebProcess/WebPage/WebPage.messages.in:
1040
1041 2015-05-13  Anders Carlsson  <andersca@apple.com>
1042
1043         Rename some StorageManager functions to indicate that they work on local storage entries
1044         https://bugs.webkit.org/show_bug.cgi?id=144958
1045         First part of rdar://problem/10690447.
1046
1047         Reviewed by Beth Dakin.
1048
1049         * UIProcess/Storage/StorageManager.cpp:
1050         (WebKit::StorageManager::getLocalStorageOrigins):
1051         (WebKit::StorageManager::getLocalStorageDetailsByOrigin):
1052         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
1053         (WebKit::StorageManager::deleteAllLocalStorageEntries):
1054         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
1055         (WebKit::StorageManager::getOrigins): Deleted.
1056         (WebKit::StorageManager::getStorageDetailsByOrigin): Deleted.
1057         (WebKit::StorageManager::deleteEntriesForOrigin): Deleted.
1058         (WebKit::StorageManager::deleteAllEntries): Deleted.
1059         (WebKit::StorageManager::deleteEntriesForOrigins): Deleted.
1060         * UIProcess/Storage/StorageManager.h:
1061         * UIProcess/WebKeyValueStorageManager.cpp:
1062         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1063         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
1064         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
1065         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
1066         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1067         (WebKit::WebsiteDataStore::fetchData):
1068         (WebKit::WebsiteDataStore::removeData):
1069
1070 2015-05-13  Joseph Pecoraro  <pecoraro@apple.com>
1071
1072         Crash under WebKit::WebInspectorProxy::attachAvailabilityChanged sometimes opening new page
1073         https://bugs.webkit.org/show_bug.cgi?id=144957
1074
1075         Reviewed by Simon Fraser.
1076
1077         * UIProcess/WebInspectorProxy.cpp:
1078         (WebKit::WebInspectorProxy::attachAvailabilityChanged):
1079
1080 2015-05-13  Joseph Pecoraro  <pecoraro@apple.com>
1081
1082         Pass String as reference in more places
1083         https://bugs.webkit.org/show_bug.cgi?id=144769
1084
1085         Reviewed by Daniel Bates.
1086
1087         * WebProcess/WebPage/WebInspectorUI.cpp:
1088         (WebKit::WebInspectorUI::showMainResourceForFrame):
1089         * WebProcess/WebPage/WebInspectorUI.h:
1090
1091 2015-05-13  Timothy Horton  <timothy_horton@apple.com>
1092
1093         View scale changes are temporarily lost after restoring a page from the page cache
1094         https://bugs.webkit.org/show_bug.cgi?id=144934
1095
1096         Reviewed by Brady Eidson.
1097
1098         * WebProcess/WebPage/WebPage.cpp:
1099         (WebKit::WebPage::WebPage):
1100         (WebKit::WebPage::scalePage):
1101         (WebKit::WebPage::scalePageInViewCoordinates):
1102         (WebKit::WebPage::pageScaleFactor):
1103         (WebKit::WebPage::viewScaleFactor):
1104         (WebKit::WebPage::scaleView):
1105         * WebProcess/WebPage/WebPage.h:
1106         (WebKit::WebPage::viewScaleFactor): Deleted.
1107         Get rid of m_viewScaleFactor, instead using Page::viewScaleFactor.
1108
1109 2015-05-13  Sungmann Cho  <sungmann.cho@navercorp.com>
1110
1111         Minor cleanups to PluginProxy.cpp.
1112         https://bugs.webkit.org/show_bug.cgi?id=144948
1113
1114         Reviewed by Gyuyoung Kim.
1115
1116         1. Remove unnecessary #include.
1117         2. Remove unnecessary return statement from PluginProxy::paint().
1118
1119         No new tests, no behavior change.
1120
1121         * WebProcess/Plugins/PluginProxy.cpp:
1122         (WebKit::PluginProxy::paint):
1123
1124 2015-05-13  Daegyu Lee  <daegyu.lee@navercorp.com>
1125
1126         REGRESSION(r176631): [EFL] Fullscreen feature doesn't work correctly on MiniBrowser
1127         https://bugs.webkit.org/show_bug.cgi?id=144906
1128
1129         Reviewed by Gyuyoung Kim.
1130
1131         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
1132         (WebKit::PageViewportController::updateMinimumScaleToFit): Recover the r176631 condition to
1133         call applyScaleAfterRenderingContents function to apply correct scale.
1134
1135 2015-05-12  Dan Bernstein  <mitz@apple.com>
1136
1137         In Safari, Debug > Get Bytecode Profile crashes the Web Content process
1138         https://bugs.webkit.org/show_bug.cgi?id=144944
1139
1140         Reviewed by Darin Adler.
1141
1142         * WebProcess/WebPage/WebPage.cpp:
1143         (WebKit::WebPage::getBytecodeProfile): Don’t assert that m_perBytecodeProfiler isn’t null,
1144         because it is when the profiler is disabled, which is the default. In that case, return
1145         after sending back the empty string, rather than continuing to dereference a null pointer.
1146
1147 2015-05-12  Jon Honeycutt  <jhoneycutt@apple.com>
1148
1149         Crash when using <input type=file>
1150
1151         <https://bugs.webkit.org/show_bug.cgi?id=144939>
1152         <rdar://problem/20172315>
1153
1154         Reviewed by Andy Estes.
1155
1156         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1157         Use a RefPtr to hold the WebOpenPanelResultListenerProxy, because the
1158         WKFileUploadPanel can outlive it.
1159
1160 2015-05-12  Simon Fraser  <simon.fraser@apple.com>
1161
1162         Turn antialiased font dilation off by default
1163         https://bugs.webkit.org/show_bug.cgi?id=144940
1164         rdar://problem/20923031
1165
1166         Reviewed by Sam Weinig.
1167
1168         Turn antialised font dilation off by default.
1169
1170         * Shared/WebPreferencesDefinitions.h:
1171         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1172
1173 2015-05-12  Daniel Bates  <dabates@apple.com>
1174
1175         Make {Network, Web}ProcessProxy inherit from ProcessThrottleClient privately
1176         https://bugs.webkit.org/show_bug.cgi?id=144886
1177
1178         Reviewed by Darin Adler.
1179
1180         {Network, Web}ProcessProxy are implemented in terms of ProcessThrottleClient, an
1181         interface that defines the callbacks that ProcessThrottler makes to a client. We
1182         do not want to allow arbitrary callers to make use of the interface ProcessThrottleClient.
1183         So, we should use private inheritance to represent the relationship between
1184         {Network, Web}ProcessProxy and ProcessThrottleClient instead of public inheritance.
1185
1186         Additionally make ProcessThrottler a instance variable of {Network, Web}ProcessProxy instead
1187         of holding a smart pointer to a ProcessThrottler instance because we always want to
1188         have a ProcessThrottler for each instance of {Network, Web}ProcessProxy.
1189
1190         * UIProcess/Network/NetworkProcessProxy.cpp:
1191         (WebKit::NetworkProcessProxy::NetworkProcessProxy): Update code to work now that m_throttler
1192         is an instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
1193         (WebKit::NetworkProcessProxy::didFinishLaunching): Update code to access functions of
1194         m_throttler by reference instead of by pointer.
1195         (WebKit::NetworkProcessProxy::didCancelProcessSuspension): Ditto.
1196         (WebKit::NetworkProcessProxy::processReadyToSuspend): Ditto.
1197         (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles): Ditto.
1198         * UIProcess/Network/NetworkProcessProxy.h: Inherit from ProcessThrottleClient privately.
1199         (WebKit::NetworkProcessProxy::throttler): Update code to work now that m_throttler is an
1200         instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
1201         * UIProcess/ProcessThrottler.cpp:
1202         (WebKit::ProcessThrottler::ProcessThrottler): Update code to work now that m_process is
1203         a lvalue reference instead of a pointer.
1204         (WebKit::ProcessThrottler::updateAssertion): Ditto.
1205         (WebKit::ProcessThrottler::assertionWillExpireImminently): Ditto.
1206         * UIProcess/ProcessThrottler.h: Ditto.
1207         * UIProcess/WebProcessProxy.cpp:
1208         (WebKit::WebProcessProxy::WebProcessProxy): Update code to work now that m_throttler is an
1209         instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance. 
1210         (WebKit::WebProcessProxy::didFinishLaunching): Update code to access functions of
1211         m_throttler by reference instead of by pointer.
1212         (WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
1213         (WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.
1214         (WebKit::WebProcessProxy::setIsHoldingLockedFiles): Ditto.
1215         * UIProcess/WebProcessProxy.h: Inherit from ProcessThrottleClient privately.
1216         (WebKit::WebProcessProxy::throttler): Update code to work now that m_throttler is an
1217         instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
1218
1219 2015-05-12  Anders Carlsson  <andersca@apple.com>
1220
1221         Production builds should link against the shims directly
1222         https://bugs.webkit.org/show_bug.cgi?id=144922
1223         rdar://problem/19708579
1224
1225         Reviewed by Dan Bernstein.
1226
1227         * Configurations/NetworkService.xcconfig:
1228         Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
1229         Link directly against SecItemShim.dylib where possible.
1230
1231         * Configurations/PluginProcessShim.xcconfig:
1232         Set the install name and install path.
1233
1234         * Configurations/PluginService.32.xcconfig:
1235         Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
1236         Link directly against PluginProcessShim.dylib where possible.
1237
1238         * Configurations/PluginService.64.xcconfig:
1239         Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
1240         Link directly against PluginProcessShim.dylib where possible.
1241
1242         * Configurations/SecItemShim.xcconfig:
1243         Set the install name and install path.
1244
1245         * Configurations/WebContentService.xcconfig:
1246         Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
1247         Link directly against WebProcessShim.dylib where possible.
1248
1249         * Configurations/WebProcessShim.xcconfig:
1250         Set the install name and install path.
1251
1252         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist.
1253         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
1254         Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.
1255
1256         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Copied from Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist.
1257         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
1258         Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.
1259
1260         * WebKit2.xcodeproj/project.pbxproj:
1261         Add new files.
1262
1263         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist.
1264         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
1265         Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.
1266
1267 2015-05-12  Alexey Proskuryakov  <ap@apple.com>
1268
1269         Undo a mistaken part of r184211.
1270
1271         * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::cookieStorageDirectory):
1272         * UIProcess/WebProcessPool.h:
1273         cookieStorageDirectory() is used on iOS, so bring it back.
1274
1275 2015-05-08  Alexey Proskuryakov  <ap@apple.com>
1276
1277         [Mac] Share cookie storage between UI process and secondary processes
1278         https://bugs.webkit.org/show_bug.cgi?id=144820
1279         rdar://problem/20572830
1280
1281         Reviewed by Darin Adler.
1282
1283         Pass a cookie storage descriptor that includes file path as well as other data that
1284         CFNetwork needs to use the same cookies storage as in another process (session cookies
1285         are still separate).
1286
1287         While at it, started to clean up code that passes cookie storage path. It was mostly
1288         dead and unimplemented, only used in child processes when USE(SECCOMP_FILTERS) was enabled.
1289
1290         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1291         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1292         * Shared/Network/NetworkProcessCreationParameters.cpp:
1293         (WebKit::NetworkProcessCreationParameters::encode):
1294         (WebKit::NetworkProcessCreationParameters::decode):
1295         * Shared/Network/NetworkProcessCreationParameters.h:
1296         * Shared/WebProcessCreationParameters.cpp:
1297         (WebKit::WebProcessCreationParameters::encode):
1298         (WebKit::WebProcessCreationParameters::decode):
1299         * Shared/WebProcessCreationParameters.h:
1300         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1301         (WebKit::WebProcessPool::platformInitializeWebProcess):
1302         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1303         (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
1304         * UIProcess/WebProcessPool.cpp:
1305         (WebKit::WebProcessPool::ensureNetworkProcess):
1306         (WebKit::WebProcessPool::createNewWebProcess):
1307         (WebKit::WebProcessPool::cookieStorageDirectory):
1308         * UIProcess/WebProcessPool.h:
1309         * UIProcess/efl/WebProcessPoolEfl.cpp:
1310         (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
1311         * UIProcess/gtk/WebProcessPoolGtk.cpp:
1312         (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
1313         * WebProcess/cocoa/WebProcessCocoa.mm:
1314         (WebKit::WebProcess::platformInitializeWebProcess):
1315
1316 2015-05-12  Chris Dumez  <cdumez@apple.com>
1317
1318         [WK2] Log using diagnostic logging how far back in history we navigate
1319         https://bugs.webkit.org/show_bug.cgi?id=144919
1320         <rdar://problem/20920043>
1321
1322         Reviewed by Gavin Barraclough.
1323
1324         Log using diagnostic logging how far back in history we navigate.
1325         When a back navigation or a backward indexed navigation occurs, we
1326         log the delta: (HistoryListSize - 1) - NewHistoryItemIndex.
1327
1328         * UIProcess/WebBackForwardList.cpp:
1329         (WebKit::WebBackForwardList::goToItem):
1330
1331 2015-05-11  Sam Weinig  <sam@webkit.org>
1332
1333         ChildProcess should take an os_activity
1334         https://bugs.webkit.org/show_bug.cgi?id=141781
1335
1336         Reviewed by Ryosuke Niwa.
1337
1338         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
1339         (DatabaseServiceInitializer):
1340         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
1341         (NetworkServiceInitializer):
1342         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
1343         (PluginServiceInitializer):
1344         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
1345         (WebContentServiceInitializer):
1346         Start an os_activity in the initializer for each XPC service.
1347
1348         * config.h:
1349         Add HAVE_OS_ACTIVITY where available.
1350
1351 2015-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1352
1353         Unreviewed. Fix GTK+ debug build after r184197.
1354
1355         * UIProcess/gtk/RedirectedXCompositeWindow.cpp: Add missing include.
1356
1357 2015-05-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1358
1359         [X11] Add XUniquePtr and XUniqueResource to automatically free X resources
1360         https://bugs.webkit.org/show_bug.cgi?id=144521
1361
1362         Reviewed by Darin Adler.
1363
1364         Use XUniquePtr and XUniqueResource to free X resources.
1365
1366         * PlatformEfl.cmake: Add Source/WebCore/platform/graphics/x11 dir
1367         to the include dir list.
1368         * PlatformGTK.cmake: Ditto.
1369         * UIProcess/cairo/BackingStoreCairo.cpp:
1370         (WebKit::BackingStore::createBackend): Do not pass the display to
1371         the BackingStoreBackendCairoX11 constructor.
1372         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
1373         (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
1374         (WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
1375         (WebKit::RedirectedXCompositeWindow::resize):
1376         (WebKit::RedirectedXCompositeWindow::cleanupPixmapAndPixmapSurface):
1377         (WebKit::RedirectedXCompositeWindow::surface):
1378         * UIProcess/gtk/RedirectedXCompositeWindow.h:
1379         (WebKit::RedirectedXCompositeWindow::windowID):
1380         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1381         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1382         (WebKit::NetscapePlugin::platformPostInitializeWindowless):
1383         (WebKit::NetscapePlugin::platformDestroy):
1384         (WebKit::NetscapePlugin::platformGeometryDidChange):
1385         (WebKit::NetscapePlugin::platformPaint):
1386
1387 2015-05-11  Dan Bernstein  <mitz@apple.com>
1388
1389         WebKit2 part of <rdar://problem/20878075> Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL
1390
1391         Reviewed by Alexey Proskuryakov.
1392
1393         * UIProcess/WebPageProxy.cpp:
1394         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame): Added. Update internal state the
1395         same way we update it for server redirects, but don’t make client callbacks. Clients
1396         observing the URL property will see it change.
1397         * UIProcess/WebPageProxy.h:
1398
1399         * UIProcess/WebPageProxy.messages.in: Added DidChangeProvisionalURLForFrame.
1400
1401         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1402         (WebKit::WebFrameLoaderClient::dispatchDidChangeProvisionalURL): Override this new
1403         FrameLoaderClient function to send a DidChangeProvisionalURLForFrame message to the UI
1404         process.
1405         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1406
1407 2015-05-11  Dan Bernstein  <mitz@apple.com>
1408
1409         <rdar://problem/19773721> [iOS] Find on page feels like it zooms in too much
1410         https://bugs.webkit.org/show_bug.cgi?id=144891
1411
1412         Reviewed by Darin Adler.
1413
1414         Sometimes, Find on Page’s constant 1.6 scale factor is too much. Smart magnification is
1415         designed to choose a scale factor that is just right.
1416
1417         * UIProcess/ios/SmartMagnificationController.h:
1418         * UIProcess/ios/SmartMagnificationController.messages.in: Added Magnify message.
1419         * UIProcess/ios/SmartMagnificationController.mm:
1420         (WebKit::SmartMagnificationController::magnify): Added. Handle the new message using
1421         -[WKContentView _soomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:].
1422         * WebProcess/WebPage/ios/FindControllerIOS.mm:
1423         (WebKit::FindController::updateFindIndicator): Instead of zooming to the selection rect,
1424         get the surrounding render rect (the area we would target for a double-tap at the beginning
1425         of the selection), and tell the magnification controller to target it. Use the center of the
1426         start of the selection as the origin.
1427
1428 2015-05-11  Brent Fulgham  <bfulgham@apple.com>
1429
1430         Scroll snap logic should be triggered when resizing the WebView
1431         https://bugs.webkit.org/show_bug.cgi?id=142590
1432         <rdar://problem/20125088>
1433
1434         Reviewed by Simon Fraser.
1435
1436         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1437         (RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Modify use of 'closestSnapOffset' to satisfy the additional
1438         argument I added. This is currently not used for anything on iOS.
1439         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: Ditto.
1440
1441 2015-05-11  Andreas Kling  <akling@apple.com>
1442
1443         Force a rebuild of JSNPObject.cpp on bots.
1444
1445         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1446         (WebKit::JSNPObject::callMethod):
1447
1448 2015-05-11  Anders Carlsson  <andersca@apple.com>
1449
1450         Simplify shim path computation
1451         https://bugs.webkit.org/show_bug.cgi?id=144884
1452         Part of rdar://problem/19708579.
1453
1454         Reviewed by Sam Weinig.
1455
1456         Factor the code that computes the shim path out into a separate function. Also make this mac only
1457         since we don't have any shims on iOS.
1458
1459         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1460         (WebKit::computeProcessShimPath):
1461         (WebKit::addDYLDEnvironmentAdditions):
1462
1463 2015-05-11  Myles C. Maxfield  <mmaxfield@apple.com>
1464
1465         Unreviewed build fix
1466
1467         Unreviewed.
1468
1469         * UIProcess/API/APIUserContentExtensionStore.cpp:
1470         (API::compiledToFile):
1471
1472 2015-05-11  Alex Christensen  <achristensen@webkit.org>
1473
1474         [Content Extensions] Support domain-specific rules and exceptions.
1475         https://bugs.webkit.org/show_bug.cgi?id=144833
1476
1477         Reviewed by Darin Adler.
1478
1479         * Shared/WebCompiledContentExtension.cpp:
1480         (WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecode):
1481         (WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecodeLength):
1482         (WebKit::WebCompiledContentExtension::filtersWithDomainsBytecode):
1483         (WebKit::WebCompiledContentExtension::filtersWithDomainsBytecodeLength):
1484         (WebKit::WebCompiledContentExtension::domainFiltersBytecode):
1485         (WebKit::WebCompiledContentExtension::domainFiltersBytecodeLength):
1486         (WebKit::WebCompiledContentExtension::bytecode): Deleted.
1487         (WebKit::WebCompiledContentExtension::bytecodeLength): Deleted.
1488         * Shared/WebCompiledContentExtension.h:
1489         * Shared/WebCompiledContentExtensionData.cpp:
1490         (WebKit::WebCompiledContentExtensionData::encode):
1491         (WebKit::WebCompiledContentExtensionData::decode):
1492         * Shared/WebCompiledContentExtensionData.h:
1493         (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
1494         * UIProcess/API/APIUserContentExtensionStore.cpp:
1495         (API::ContentExtensionMetaData::fileSize):
1496         (API::encodeContentExtensionMetaData):
1497         (API::decodeContentExtensionMetaData):
1498         (API::compiledToFile):
1499         (API::createExtension):
1500         Keep track of 3 different types of bytecode to be able to handle domain-specific rules.
1501
1502 2015-05-11  Tim Horton  <timothy_horton@apple.com>
1503
1504         Page overlay action context override should indicate the source of the request
1505         https://bugs.webkit.org/show_bug.cgi?id=144832
1506         <rdar://problem/20562594>
1507
1508         Reviewed by Darin Adler.
1509
1510         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
1511         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
1512         * WebProcess/WebPage/WebPageOverlay.cpp:
1513         (WebKit::WebPageOverlay::actionContextForResultAtPoint):
1514         * WebProcess/WebPage/WebPageOverlay.h:
1515         (WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
1516         * WebProcess/WebPage/mac/WebPageMac.mm:
1517         (WebKit::WebPage::performActionMenuHitTestAtLocation):
1518         Add a parameter to WKBundlePageOverlayActionContextForResultAtPoint so that
1519         clients can tell whether the requested action context should be targetted
1520         at an action menu or immediate action.
1521
1522 2015-05-11  Daniel Bates  <dabates@apple.com>
1523
1524         [iOS] Close all open databases in expiration handler of process assertion
1525         https://bugs.webkit.org/show_bug.cgi?id=144661
1526         <rdar://problem/20845052>
1527
1528         Reviewed by Darin Adler.
1529
1530         For WebKit2, close all open databases when the process assertion expiration
1531         handler is called.
1532
1533         When the process assertion expiration handler is called we dispatch a synchronous
1534         message called ProcessWillSuspendImminently to the {Web, Network} processes to inform
1535         them that they will be suspended imminently. The {Web, Network} process will always
1536         service this message regardless if they were waiting for another message. In the
1537         WebProcess, we will close all open databases among other tasks upon receiving this
1538         message. In the NetworkProcess, we will purge some data from memory.
1539
1540         * NetworkProcess/NetworkProcess.cpp:
1541         (WebKit::NetworkProcess::didReceiveSyncMessage): Modified to call NetworkProcess::didReceiveSyncNetworkProcessMessage()
1542         to process the synchronous ProcessWillSuspendImminently message.
1543         (WebKit::NetworkProcess::processWillSuspendImminently): Added; free some memory.
1544         * NetworkProcess/NetworkProcess.h:
1545         * NetworkProcess/NetworkProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.
1546         * Shared/ChildProcessProxy.h:
1547         (WebKit::ChildProcessProxy::sendSync): Added parameter sendSyncFlags so that we can send
1548         a sync message with flag IPC::InterruptWaitingIfSyncMessageArrives to cause the {Web, Network}Process
1549         to process the message regardless of whether it is waiting for another message.
1550         * UIProcess/Network/NetworkProcessProxy.cpp:
1551         (WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
1552         ProcessWillSuspendImminently to the NetworkProcess.
1553         * UIProcess/Network/NetworkProcessProxy.h:
1554         * UIProcess/ProcessAssertion.cpp:
1555         (WebKit::ProcessAndUIAssertion::setClient): Added.
1556         * UIProcess/ProcessAssertion.h: Added abstract class ProcessAssertionClient.
1557         (WebKit::ProcessAssertionClient::~ProcessAssertionClient): Added.
1558         (WebKit::ProcessAssertion::setClient): Added.
1559         (WebKit::ProcessAssertion::client): Added.
1560         * UIProcess/ProcessThrottler.cpp:
1561         (WebKit::ProcessThrottler::didConnectToProcess):
1562         (WebKit::ProcessThrottler::assertionWillExpireImminently): Added; implements the ProcessAssertionClient
1563         interface. Notify the process throttler clients that the assertion is near expiration.
1564         * UIProcess/ProcessThrottler.h:
1565         * UIProcess/ProcessThrottlerClient.h: Added 
1566         * UIProcess/WebProcessProxy.cpp:
1567         (WebKit::WebProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
1568         ProcessWillSuspendImminently to the WebProcess.
1569         * UIProcess/WebProcessProxy.h:
1570         * UIProcess/ios/ProcessAssertionIOS.mm:
1571         (-[WKProcessAssertionBackgroundTaskManager addClient:]): Added.
1572         (-[WKProcessAssertionBackgroundTaskManager removeClient:]): Added.
1573         (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]): Modified expiration handler
1574         to notify ProcessAssertionClient clients that the assertion is near expiration.
1575         (WebKit::ProcessAssertion::~ProcessAssertion): Remove the client on destruction.
1576         (WebKit::ProcessAndUIAssertion::setClient): Added.
1577         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1578         (WebKit::WebDatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseManager::closeAllDatabases().
1579         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
1580         * WebProcess/WebProcess.cpp:
1581         (WebKit::WebProcess::didReceiveSyncMessage): Call WebProcess::didReceiveSyncWebProcessMessage() to process
1582         the synchronous ProcessWillSuspendImminently message. Removed logging for an unhandled synchronous message
1583         since WebProcess::didReceiveSyncWebProcessMessage() will ASSERT_NOT_REACHED() for such a message.
1584         (WebKit::WebProcess::prepareToSuspend): Extracted code from WebProcess::processWillSuspend() so that it can
1585         be used from both WebProcess::processWillSuspend() and WebProcess::processWillSuspendImminently(). And modified
1586         it to conditionally dispatch a ProcessReadyToSuspend message to the WebProcessProxy. We only want to dispatch
1587         such a message as part of a coordinated suspension by the ProcessThrottler. That is, we do not want to dispatch
1588         the ProcessReadyToSuspend message when the background assertion is near expiration (i.e. WebProcess::processWillSuspendImminently()
1589         is called).
1590         (WebKit::WebProcess::processWillSuspendImminently): Added. Suspend all open databases among other tasks.
1591         (WebKit::WebProcess::processWillSuspend): Implemented in terms of WebProcess::prepareToSuspend().
1592         (WebKit::WebProcess::processSuspensionCleanupTimerFired): Modified to conditionally dispatch a ProcessReadyToSuspend
1593         message to the WebProcessProxy.
1594         (WebKit::WebProcess::processDidResume): Stop the suspension cleanup timer, which may be active if the WebProcess
1595         did not mark all its graphics layers as volatile before process suspension.
1596         * WebProcess/WebProcess.h:
1597         * WebProcess/WebProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.
1598
1599 2015-05-10  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1600
1601         Use Ref instead of PassRefPtr in WebCore/page
1602         https://bugs.webkit.org/show_bug.cgi?id=144841
1603
1604         Reviewed by Darin Adler.
1605
1606         To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
1607         in WebCore/page.
1608
1609         (WebKit::WebUserContentController::WebUserContentController):
1610         * UIProcess/WebPageProxy.cpp:
1611         (WebKit::WebPageProxy::setTextIndicator):
1612         * UIProcess/mac/PageClientImpl.mm:
1613         (WebKit::PageClientImpl::didPerformDictionaryLookup):
1614         * WebProcess/UserContent/WebUserContentController.cpp:
1615         (WebKit::WebUserContentController::WebUserContentController):
1616
1617 2015-05-10  Philip Chimento  <philip.chimento@gmail.com>
1618
1619         [GTK][SOUP] Web and Network processes don't know how to get memory size on OSX
1620         https://bugs.webkit.org/show_bug.cgi?id=144554
1621
1622         Reviewed by Darin Adler.
1623
1624         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1625         (WebKit::NetworkProcess::platformSetCacheModel): Use WTF::ramSize()
1626         instead of local function. Also use WTF::MB instead of dividing by
1627         1024 * 1024.
1628         (WebKit::getMemorySize): Deleted.
1629         * WebProcess/soup/WebProcessSoup.cpp:
1630         (WebKit::WebProcess::platformSetCacheModel): Ditto.
1631         (WebKit::getMemorySize): Deleted.
1632
1633 2015-05-10  Yongjun Zhang  <yongjun_zhang@apple.com>
1634
1635         Use preview view controller from WebKitSystemInterface.
1636         https://bugs.webkit.org/show_bug.cgi?id=144836
1637
1638         Add a property _allowsLinkPreview to WKWebView so that we can turn on/off preview at runtime. Also,
1639         for client that doesn't provide preview view controller, use the default view controller prepared
1640         by WebKitSystemInterface.
1641
1642         Reviewed by Dan Bernstein.
1643
1644         * UIProcess/API/Cocoa/WKWebView.mm:
1645         (-[WKWebView initWithFrame:configuration:]):
1646         (-[WKWebView _allowsLinkPreview]):
1647         (-[WKWebView _setAllowsLinkPreview:]):
1648         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Add _allowsLinkPreview property
1649         * UIProcess/ios/WKContentView.mm:
1650         (-[WKContentView willMoveToWindow:]):
1651         * UIProcess/ios/WKContentViewInteraction.h:
1652         * UIProcess/ios/WKContentViewInteraction.mm:
1653         (-[WKContentView _registerPreviewInWindow:]):
1654         (-[WKContentView _unregisterPreviewInWindow:]):
1655         (-[WKContentView previewViewControllerForPosition:inSourceView:]): : For client that doesn't provide
1656             preview delegate, use preview view controller in WebKitSystemInterface.
1657         (-[WKContentView commitPreviewViewController:]):
1658
1659 2015-05-10  Darin Adler  <darin@apple.com>
1660
1661         Fix internal Apple builds on Mavericks.
1662
1663         * UIProcess/API/mac/WKView.mm:
1664         (-[WKView _dismissContentRelativeChildWindows]): Added missing conditionals around
1665         some code that is for OS X 10.10 or newer only. There were similar conditionals around
1666         other nearby code in this file, and around other uses of the same method in other files,
1667         so matched the style.
1668
1669 2015-05-10  Dan Bernstein  <mitz@apple.com>
1670
1671         iOS internal build fix.
1672
1673         * Platform/mac/MenuUtilities.mm:
1674
1675 2015-05-10  Sungmann Cho  <sungmann.cho@navercorp.com>
1676
1677         Remove unnecessary semicolons.
1678         https://bugs.webkit.org/show_bug.cgi?id=144844
1679
1680         Reviewed by Darin Adler.
1681
1682         No new tests, no behavior change.
1683
1684         * Shared/Downloads/mac/DownloadMac.mm:
1685         (-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
1686         * UIProcess/WebProcessProxy.cpp:
1687         (WebKit::WebProcessProxy::transformHandlesToObjects):
1688         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1689         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
1690         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1691         (WebKit::idToHistoryItemMap):
1692
1693 2015-05-10  Darin Adler  <darin@apple.com>
1694
1695         Fix build.
1696
1697         * Platform/mac/MenuUtilities.mm: Added includes that were somehow omitted in what
1698         I committed before.
1699
1700 2015-05-10  Darin Adler  <darin@apple.com>
1701
1702         [Cocoa] Don't soft link DataDetectorsCore
1703         https://bugs.webkit.org/show_bug.cgi?id=144837
1704
1705         Reviewed by Dan Bernstein.
1706
1707         * Platform/mac/MenuUtilities.mm: Use DataDetectorsSPI.h instead of doing it here.
1708
1709         * WebProcess/WebPage/mac/WebPageMac.mm: Removed unneeded include of unused header,
1710         DataDetectorsSPI.h.
1711
1712 2015-05-09  Dan Bernstein  <mitz@apple.com>
1713
1714         Deployment-target __NSi_ and __NSd_ definitions in WKFoundation.h are redundant
1715         https://bugs.webkit.org/show_bug.cgi?id=144831
1716
1717         Reviewed by Sam Weinig.
1718
1719         Reverted r182846 and r182904.
1720
1721         * Shared/API/Cocoa/WKFoundation.h:
1722         * WebKit2.xcodeproj/project.pbxproj:
1723
1724 2015-05-09  Yoav Weiss  <yoav@yoav.ws>
1725
1726         Remove the PICTURE_SIZES build flag
1727         https://bugs.webkit.org/show_bug.cgi?id=144679
1728
1729         Reviewed by Benjamin Poulain.
1730
1731         Removed the PICTURE_SIZES build time flag.
1732
1733         * Configurations/FeatureDefines.xcconfig:
1734
1735 2015-05-08  Beth Dakin  <bdakin@apple.com>
1736
1737         Shuffle touch-related code to keep the internal builds working
1738         https://bugs.webkit.org/show_bug.cgi?id=144812
1739
1740         Reviewed by Benjamin Poulain.
1741
1742         * Shared/NativeWebTouchEvent.h:
1743         * Shared/WebEvent.h:
1744         * Shared/WebEventConversion.cpp:
1745         * Shared/ios/NativeWebTouchEventIOS.mm:
1746         (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
1747         (WebKit::extractWebTouchPoint): Deleted.
1748         * Shared/ios/WebPlatformTouchPointIOS.cpp:
1749
1750 2015-05-08  Dan Bernstein  <mitz@apple.com>
1751
1752         <rdar://problem/20757196> NSInternalInconsistencyException raised in -[NSString encodeWithCoder:] beneath createEncodedObject when using WKRemoteObjectEncoder for Safari AutoFill
1753         https://bugs.webkit.org/show_bug.cgi?id=144818
1754
1755         Reviewed by Anders Carlsson.
1756
1757         Allow NSString instances that contain unpaired surrogates to be encoded by
1758         WKRemoteObjectCoder by encoding them directly rather than using
1759         -[NSString encodeWithCoder:].
1760
1761         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1762         (encodeString): Added. Sets an API::String as the object to encode.
1763         (encodeObject): Changed to use encodeString for NSString instances.
1764         (decodeString): Added. Gets an API::String from the dictionary and returns it as an
1765         NSString.
1766         (decodeObject): Changed to use decodeString for NSString instances.
1767
1768 2015-05-08  Timothy Horton  <timothy_horton@apple.com>
1769
1770         Fix the build.
1771
1772         * Platform/mac/LayerHostingContext.mm:
1773         (WebKit::LayerHostingContext::createFencePort):
1774
1775 2015-05-08  Timothy Horton  <timothy_horton@apple.com>
1776
1777         Periodically repaint during resize while using the DynamicSizeWithMinimumViewSize layout strategy
1778         https://bugs.webkit.org/show_bug.cgi?id=144816
1779
1780         Reviewed by Simon Fraser.
1781
1782         * UIProcess/mac/WKViewLayoutStrategy.mm:
1783         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]):
1784         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy _updateTransientScale:]):
1785         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
1786         Factor out _updateTransientScale from updateLayout.
1787         Keep track of the last viewScaleFactor that we know is being displayed
1788         (_lastCommittedViewScale) and use that for computing the transient scale,
1789         so that we can recompute the transient scale while the UI process's notion
1790         of the actual view scale might have moved ahead of what the Web process has
1791         painted.
1792
1793 2015-05-08  Timothy Horton  <timothy_horton@apple.com>
1794
1795         Fix the build.
1796
1797         * UIProcess/WebPageProxy.cpp:
1798
1799 2015-05-08  Timothy Horton  <timothy_horton@apple.com>
1800
1801         Fix the build.
1802
1803         * Platform/mac/LayerHostingContext.mm:
1804         (WebKit::LayerHostingContext::createFencePort):
1805
1806 2015-05-08  Timothy Horton  <timothy_horton@apple.com>
1807
1808         Fix the build.
1809
1810         * Platform/mac/LayerHostingContext.mm:
1811         (WebKit::LayerHostingContext::createFencePort):
1812
1813 2015-05-08  Timothy Horton  <timothy_horton@apple.com>
1814
1815         Flip the direction of the fence in scaleViewAndUpdateGeometryFenced
1816         https://bugs.webkit.org/show_bug.cgi?id=144810
1817
1818         Reviewed by Simon Fraser.
1819
1820         Send the fence from the Web process to the UI process, instead of vice versa.
1821         This means that we won't keep the UI process CAContext blocked for the whole
1822         time that the Web process is doing layout/painting/etc. Instead, we'll start
1823         blocking the Web process CAContext immediately after flushing and before committing,
1824         and send the fence to the UI process to be applied immediately. This minimizes
1825         the amount of time in both processes spent blocked on the fence.
1826
1827         * Platform/mac/LayerHostingContext.h:
1828         * Platform/mac/LayerHostingContext.mm:
1829         (WebKit::LayerHostingContext::createFencePort):
1830         Add createFencePort, which creates a MachSendRight wrapping a CA fence port.
1831         Note that you must setFencePort() with this port if you want the LayerHostingContext's
1832         CAContext to block on it!
1833
1834         * UIProcess/WebPageProxy.cpp:
1835         (WebKit::WebPageProxy::scaleViewAndUpdateGeometryFenced):
1836         (WebKit::WebPageProxy::machSendRightCallback):
1837         * UIProcess/WebPageProxy.h:
1838         * UIProcess/WebPageProxy.messages.in:
1839         Create a callback and send it to the Web process along with scaleViewAndUpdateGeometryFenced.
1840
1841         * UIProcess/mac/WKViewLayoutStrategy.mm:
1842         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
1843         When called back, install the fence port in our CAContext; when the commit goes through,
1844         remove the transient scale as we did previously.
1845
1846         * WebProcess/WebPage/DrawingArea.h:
1847         (WebKit::DrawingArea::replyWithFenceAfterNextFlush):
1848         (WebKit::DrawingArea::updateGeometry): Deleted.
1849         * WebProcess/WebPage/WebPage.cpp:
1850         (WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
1851         * WebProcess/WebPage/WebPage.h:
1852         * WebProcess/WebPage/WebPage.messages.in:
1853         Instead of installing a fence created in the UI process, tell the DrawingArea
1854         to create one and reply to the UI process with it after the next flush.
1855
1856         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1857         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1858         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1859         (WebKit::TiledCoreAnimationDrawingArea::replyWithFenceAfterNextFlush):
1860         After flushing, before committing, create a fence and reply to any
1861         callbacks that requested fences, and install it in our context.
1862
1863 2015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>
1864
1865         [GTK] Checks for DEVELOPMENT_BUILD are all wrong
1866         https://bugs.webkit.org/show_bug.cgi?id=144746
1867
1868         Reviewed by Carlos Garcia Campos.
1869
1870         Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD.
1871
1872         * Shared/gtk/ProcessExecutablePathGtk.cpp:
1873         (WebKit::findWebKitProcess):
1874         * UIProcess/API/gtk/WebKitWebContext.cpp:
1875         (injectedBundleDirectory):
1876         * UIProcess/gtk/TextCheckerGtk.cpp:
1877         (WebKit::enchantTextChecker):
1878
1879 2015-05-08  Anders Carlsson  <andersca@apple.com>
1880
1881         Fix ProcessLauncher port leak
1882         https://bugs.webkit.org/show_bug.cgi?id=144807
1883         rdar://problem/20593291
1884
1885         Reviewed by Sam Weinig.
1886
1887         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1888         (WebKit::connectToService):
1889         xpc_dictionary_set_mach_send increments the send right count so make sure to
1890         balance it with a call to mach_port_deallocate.
1891
1892 2015-05-08  Beth Dakin  <bdakin@apple.com>
1893
1894         Fix performance tests after r183954
1895         https://bugs.webkit.org/show_bug.cgi?id=144805
1896
1897         Reviewed by Alexey Proskuryakov.
1898
1899         Web* is traditionally a WK1 prefix, so use the WK2 prefix instead in WK2 so that 
1900         we don’t have two classes with the same name in the two projects.
1901         * UIProcess/mac/WKImmediateActionController.mm:
1902         (-[WKImmediateActionController _defaultAnimationController]):
1903
1904 2015-05-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1905
1906         [GTK] Expose allowFileAccessFromFileURLs setting to WebKit2 GTK+ API
1907         https://bugs.webkit.org/show_bug.cgi?id=144748
1908
1909         Reviewed by Sergio Villar Senin.
1910
1911         This is needed by local applications loaded as a file URI that do XMLHttpRequests.
1912
1913         * UIProcess/API/gtk/WebKitSettings.cpp:
1914         (webKitSettingsSetProperty):
1915         (webKitSettingsGetProperty):
1916         (webkit_settings_class_init):
1917         (webkit_settings_get_allow_file_access_from_file_urls):
1918         (webkit_settings_set_allow_file_access_from_file_urls):
1919         * UIProcess/API/gtk/WebKitSettings.h:
1920         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
1921         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
1922
1923 2015-05-08  Andreas Kling  <akling@apple.com>
1924
1925         Optimize serialization of quoted JSON strings.
1926         <https://webkit.org/b/144754>
1927
1928         Reviewed by Darin Adler.
1929
1930         * NetworkProcess/cache/NetworkCacheEntry.cpp:
1931         (WebKit::NetworkCache::Entry::asJSON): Use the new StringBuilder API.
1932
1933 2015-05-08  Commit Queue  <commit-queue@webkit.org>
1934
1935         Unreviewed, rolling out r183945.
1936         https://bugs.webkit.org/show_bug.cgi?id=144789
1937
1938         "It broke all the GTK+ tests" (Requested by KaL on #webkit).
1939
1940         Reverted changeset:
1941
1942         "[GTK] Checks for DEVELOPMENT_BUILD are all wrong"
1943         https://bugs.webkit.org/show_bug.cgi?id=144746
1944         http://trac.webkit.org/changeset/183945
1945
1946 2015-05-07  Conrad Shultz  <conrad_shultz@apple.com>
1947
1948         Don't register for Lookup notifications until needed
1949         https://bugs.webkit.org/show_bug.cgi?id=144783
1950
1951         Reviewed by Tim Horton.
1952
1953         * UIProcess/API/mac/WKView.mm:
1954         Add a WKViewData ivar to track whether we've already registered for popover notifications.
1955         (-[WKView _prepareForDictionaryLookup]):
1956         Added; moved notification registration from -[WKView initWithFrame:processPool:configuration:webView:.
1957         (-[WKView initWithFrame:processPool:configuration:webView:]):
1958         Move notification registration to -_prepareForDictionaryLookup.
1959
1960         * UIProcess/API/mac/WKViewInternal.h:
1961         Expose -_prepareForDictionaryLookup.
1962
1963         * UIProcess/mac/PageClientImpl.mm:
1964         (WebKit::PageClientImpl::didPerformDictionaryLookup):
1965         Send -[WKView _prepareForDictionaryLookup].
1966
1967         * UIProcess/mac/WKImmediateActionController.mm:
1968         (-[WKImmediateActionController _animationControllerForText]):
1969         Ditto.
1970
1971 2015-05-07  Commit Queue  <commit-queue@webkit.org>
1972
1973         Unreviewed, rolling out r183961.
1974         https://bugs.webkit.org/show_bug.cgi?id=144784
1975
1976         Broke js/dom/JSON-stringify.html (Requested by kling on
1977         #webkit).
1978
1979         Reverted changeset:
1980
1981         "Optimize serialization of quoted JSON strings."
1982         https://bugs.webkit.org/show_bug.cgi?id=144754
1983         http://trac.webkit.org/changeset/183961
1984
1985 2015-05-07  Anders Carlsson  <andersca@apple.com>
1986
1987         Build fixes.
1988
1989         * UIProcess/API/mac/WKView.mm:
1990         (-[WKView initWithFrame:processPool:configuration:webView:]):
1991         Use the regular init method.
1992
1993         * UIProcess/mac/WKSharingServicePickerDelegate.mm:
1994         (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
1995         * WebProcess/WebPage/mac/WebPageMac.mm:
1996         (WebKit::WebPage::handleSelectionServiceClick):
1997         Pass empty dictionaries instead of nil.
1998
1999 2015-05-07  Chris Dumez  <cdumez@apple.com>
2000
2001         ASSERTION when pasting text into the WebInspector console
2002         https://bugs.webkit.org/show_bug.cgi?id=144774
2003
2004         Reviewed by Ryosuke Niwa.
2005
2006         Fix assertion in didChangeSelection() meant to check that calling
2007         editorState() does not cause a synchronous layout. The assertion
2008         was not correct as it was relying on FrameView::needsLayout() and
2009         we would hit it if calling editorState() would schedule a layout.
2010         Instead, the new assertion relies on FrameView::layoutCount(),
2011         which is more accurate.
2012
2013         * WebProcess/WebPage/WebPage.cpp:
2014         (WebKit::WebPage::didChangeSelection):
2015
2016 2015-05-07  Andreas Kling  <akling@apple.com>
2017
2018         Optimize serialization of quoted JSON strings.
2019         <https://webkit.org/b/144754>
2020
2021         Reviewed by Darin Adler.
2022
2023         * NetworkProcess/cache/NetworkCacheEntry.cpp:
2024         (WebKit::NetworkCache::Entry::asJSON): Use the new StringBuilder API.
2025
2026 2015-05-07  Martin Robinson  <mrobinson@igalia.com>
2027
2028         Followup fixes to r183936
2029
2030         I neglected to include a few review comments when I landed the patch.
2031
2032         * UIProcess/gtk/TextCheckerGtk.cpp:
2033         (WebKit::checkerState): Remove double semicolons.
2034         (WebKit::updateStateForAllProcessPools): Use range-based-for loop here and
2035         give the function a better name.
2036         (WebKit::TextChecker::setContinuousSpellCheckingEnabled): Use new function name
2037         (WebKit::TextChecker::setGrammarCheckingEnabled):Use new function name
2038         (WebKit::TextChecker::ignoreWord): Fix unused parameter warning.
2039         (WebKit::updateStateForAllContexts): Deleted.
2040
2041 2015-05-07  Michael Catanzaro  <mcatanzaro@igalia.com>
2042
2043         [GTK] Checks for DEVELOPMENT_BUILD are all wrong
2044         https://bugs.webkit.org/show_bug.cgi?id=144746
2045
2046         Reviewed by Martin Robinson.
2047
2048         Use DEVELOPER_MODE rather than DEVELOPMENT_BUILD.
2049
2050         * Shared/gtk/ProcessExecutablePathGtk.cpp:
2051         (WebKit::findWebKitProcess):
2052         * UIProcess/API/gtk/WebKitWebContext.cpp:
2053         (injectedBundleDirectory):
2054         * UIProcess/gtk/TextCheckerGtk.cpp:
2055         (WebKit::enchantTextChecker):
2056
2057 2015-05-06  Dean Jackson  <dino@apple.com>
2058
2059         Handle backdrop views that have to tile
2060         https://bugs.webkit.org/show_bug.cgi?id=142317
2061         <rdar://problem/20049088>
2062
2063         Reviewed by Simon Fraser.
2064
2065         Take 2 - this was rolled out because Mavericks was crashing.
2066
2067         Add some better logging for custom appearance.
2068
2069         * Shared/mac/RemoteLayerTreeTransaction.mm:
2070         (WebKit::RemoteLayerTreeTextStream::operator<<):
2071
2072 2015-05-07  Sungmann Cho  <sungmann.cho@navercorp.com>
2073
2074         Add PLUGIN_ARCHITECTURE(X11) around m_frameRectInWindowCoordinates in NetscapePlugin.
2075         https://bugs.webkit.org/show_bug.cgi?id=144490
2076
2077         Reviewed by Darin Adler.
2078
2079         m_frameRectInWindowCoordinates in NetscapePlugin is currently being used only for
2080         the windowed plugins, and the windowed plugins are only supported on X11. So we can
2081         guard it with PLUGIN_ARCHITECTURE(X11).
2082
2083         No new tests, no behavior change.
2084
2085         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2086         (WebKit::NetscapePlugin::geometryDidChange):
2087         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2088
2089 2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>
2090
2091         Revert "Introducing the Platform Abstraction Layer (PAL)"
2092         https://bugs.webkit.org/show_bug.cgi?id=144751
2093
2094         Unreviewed.
2095
2096         PAL should be a new target inside WebCore, rather than a top-level folder.
2097
2098         * Configurations/FeatureDefines.xcconfig: Updated
2099
2100 2015-05-07  Jer Noble  <jer.noble@apple.com>
2101
2102         [WK2][Fullscreen] Fullscreen video does not enter low-power mode.
2103         https://bugs.webkit.org/show_bug.cgi?id=144744
2104
2105         Reviewed by Darin Adler.
2106
2107         One of the requirements of entering low-power compositing mode is that no masking layers
2108         are present in any of the ancestors of the fullscreen video layer. So once our fullscreen
2109         transition animation completes, remove the mask layer entirely from our clipping layer.
2110         This means it needs to be re-created and added when entering fullscreen, rather than just
2111         at initialization time.
2112
2113         * UIProcess/mac/WKFullScreenWindowController.mm:
2114         (-[WKFullScreenWindowController initWithWindow:webView:]):
2115         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
2116         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
2117
2118 2015-05-07  Martin Robinson  <mrobinson@igalia.com>
2119
2120         [GTK] All spell checking layout tests fail
2121         https://bugs.webkit.org/show_bug.cgi?id=144648
2122
2123         Reviewed by Carlos Garcia Campos.
2124
2125         Simplify and complete the GTK+ spell-checking implementation. Instead of using
2126         the EFL/GTK+ only WKTextChecker interface, directly implement Enchant spell-checking
2127         in TextCheckerGtk. The per-context spell checking API is an illusion, since all
2128         WKTextChecker implementations will adjust the same singleton. This can be a first step
2129         toward removing it entirely.
2130
2131         Also complete the implementation of the TextChecker interface by duplicating the EFL code,
2132         which reuses other methods in the same class. Eventually this duplication will collapse,
2133         once GTK+ and EFL can share an Enchant implementation.
2134
2135         * PlatformGTK.cmake:
2136         * UIProcess/API/gtk/WebKitPrivate.h:
2137         * UIProcess/API/gtk/WebKitTextChecker.cpp: Removed.
2138         * UIProcess/API/gtk/WebKitTextChecker.h: Removed.
2139         * UIProcess/API/gtk/WebKitWebContext.cpp: Remove WebTextChecker usage and
2140         replace it with calls directly to the TextChecker singleton via static methods.
2141         * UIProcess/TextChecker.h:
2142         * UIProcess/gtk/TextCheckerGtk.cpp: Move the WebTextChecker enchant implementation
2143         here and reuse the EFL version of WebKit::TextChecker::requestCheckingOfString.
2144         Also initialize languages properly when building for developer builds. This
2145         allows WebKitTestRunner to work even when it doesn't explicitly set the languages.
2146
2147 2015-05-07  Ada Chan  <adachan@apple.com>
2148
2149         Fix a couple of cases where the backForwardListState's currentIndex is not set correctly in WebBackForwardList::backForwardListState().
2150         https://bugs.webkit.org/show_bug.cgi?id=144666
2151
2152         Reviewed by Darin Adler.
2153
2154         * UIProcess/WebBackForwardList.cpp:
2155         (WebKit::WebBackForwardList::backForwardListState):
2156         If the first item is filtered out and the currentIndex is 0, don't decrement currentIndex.
2157         If all the items are filtered out, set currentIndex to the uninitialized value.
2158
2159 2015-05-07  Csaba Osztrogonác  <ossy@webkit.org>
2160
2161         [WK2] Remove Windows cruft
2162         https://bugs.webkit.org/show_bug.cgi?id=144745
2163
2164         Reviewed by Darin Adler.
2165
2166         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2167         (WebKit::getMemorySize):
2168         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2169         (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::encode):
2170         (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::decode):
2171         * WebProcess/soup/WebProcessSoup.cpp:
2172         (WebKit::getMemorySize):
2173
2174 2015-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2175
2176         REGRESSION(r182032): [GTK] Production build is broken after r182032
2177         https://bugs.webkit.org/show_bug.cgi?id=144736
2178
2179         Reviewed by Martin Robinson.
2180
2181         The problem is that r182032 moved the NetworkProcess sources from
2182         WebKit2 sources to NetworkProcess sources. That's not a problem
2183         for developer builds where all internal symbols are exported, but
2184         doesn't work for production builds because all those internal
2185         symbols are private.
2186
2187         * CMakeLists.txt: Use a different name for common network process
2188         sources variable.
2189         * PlatformMac.cmake: Append common network process sources to the
2190         network process source list for Mac.
2191
2192 2015-05-07  Dan Bernstein  <mitz@apple.com>
2193
2194         <rdar://problem/19317140> [Xcode] Remove usage of AspenFamily.xcconfig in Source/
2195         https://bugs.webkit.org/show_bug.cgi?id=144727
2196
2197         Reviewed by Darin Adler.
2198
2199         * Configurations/Base.xcconfig: Don’t include AspenFamily.xcconfig, and define
2200         INSTALL_PATH_PREFIX and LD_DYLIB_INSTALL_NAME for the iOS 8.x Simulator.
2201         * Configurations/WebKit2.xcconfig: Define INSTALL_PATH_ACTUAL and let INSTALL_PATH be
2202         derived from it and INSTALL_PATH_PREFIX. Don’t override DYLIB_INSTALL_NAME_BASE for iOS,
2203         because we define LD_DYLIB_INSTALL_NAME directly where needed.
2204
2205 2015-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2206
2207         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.1 release.
2208
2209         * gtk/NEWS: Add release notes for 2.9.1.
2210
2211 2015-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2212
2213         [GTK] Remove dock button from Web Inspector window
2214         https://bugs.webkit.org/show_bug.cgi?id=144728
2215
2216         Reviewed by Sergio Villar Senin.
2217
2218         We added the dock buttons to the headerbar, because they were
2219         removed from the inspector toolbar, but with the new tabbed
2220         design, the dock buttons are back in the toolbar and look redundant.
2221
2222         * UIProcess/WebInspectorProxy.h:
2223         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2224         (WebKit::WebInspectorProxy::createInspectorWindow):
2225         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
2226         (WebKit::WebInspectorProxy::dockButtonClicked): Deleted.
2227
2228 2015-05-06  Jer Noble  <jer.noble@apple.com>
2229
2230         [WK2][Fullscreen] Elements whose children extend beyond their bounds are clipped in fullscreen mode.
2231         https://bugs.webkit.org/show_bug.cgi?id=144716
2232
2233         Reviewed by Darin Adler.
2234
2235         We create a mask animation for the transition between windowed and fullscreen modes, on the
2236         assumption that the element being taken into fullscreen mode does not have visible children
2237         who extend beyond that elements bounds. This assumption breaks down in the case where div
2238         with absolutely positioned children is taken fullscreen. While we can't necessarily make the
2239         transition look correct in this case, we can remove the mask after the transition completes.
2240
2241         * UIProcess/mac/WKFullScreenWindowController.mm:
2242         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
2243         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
2244         (WebKit::removeAllMediaKeyStorageForOriginPath):
2245
2246 2015-05-06  Jinwoo Jeong  <jw00.jeong@samsung.com>
2247
2248         Fix a build break on EFL debug build
2249         https://bugs.webkit.org/show_bug.cgi?id=144654
2250
2251         Reviewed by Gyuyoung Kim.
2252
2253         No new tests, just build fix.
2254
2255         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2256         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
2257         (WebKit::CoordinatedGraphicsScene::paintToGraphicsContext):
2258
2259 2015-05-06  Daniel Bates  <dabates@apple.com>
2260
2261         [iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
2262         https://bugs.webkit.org/show_bug.cgi?id=144657
2263         <rdar://problem/18894598>
2264
2265         Reviewed by Andy Estes.
2266
2267         Pause and resume the database thread when the UIProcess enters and leaves the background,
2268         respectively, so that we avoid WebProcess termination due to holding a locked SQLite
2269         database file when the WebProcess is suspended. This behavior matches the analagous
2270         behavior in Legacy WebKit.
2271
2272         * UIProcess/WebPageProxy.h:
2273         * UIProcess/ios/WKContentView.mm:
2274         (-[WKContentView _applicationDidEnterBackground:]): Call WebPageProxy::applicationDidEnterBackground()
2275         when the UIProcess enters the background.
2276         * UIProcess/ios/WebPageProxyIOS.mm:
2277         (WebKit::WebPageProxy::applicationDidEnterBackground): Added; notify the WebProcess to pause the database thread.
2278         We temporarily take out background assertion on the WebProcess before sending this notification to ensure that the
2279         WebProcess is running to receive it. We'll release this assertion when the WebProcess replies that it received the
2280         notification.
2281         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
2282         (WebKit::WebDatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseManager::setPauseAllDatabases().
2283         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
2284         * WebProcess/WebPage/WebPage.h:
2285         * WebProcess/WebPage/WebPage.messages.in: Add message ApplicationDidEnterBackground(). Also,
2286         add empty lines to help demarcate this message and the other UIKit application lifecycle-related
2287         messages from the rest of the list of messages.
2288         * WebProcess/WebPage/ios/WebPageIOS.mm:
2289         (WebKit::WebPage::applicationWillEnterForeground): Resume the database thread.
2290         (WebKit::WebPage::applicationDidEnterBackground): Pause the database thread.
2291
2292 2015-05-06  Ryuan Choi  <ryuan.choi@navercorp.com>
2293
2294         [EFL] ewk_view_page_contents_get() API test is flaky
2295         https://bugs.webkit.org/show_bug.cgi?id=144683
2296
2297         Reviewed by Gyuyoung Kim.
2298
2299         Callback of WKPageGetContentsAsMHTMLData contains WKData which does not contain null terminated character.
2300
2301         * UIProcess/API/efl/ewk_view.cpp: Pass the data of string instead of WKData directly.
2302         (ewkViewPageContentsAsMHTMLCallback):
2303
2304 2015-05-06  Joseph Pecoraro  <pecoraro@apple.com>
2305
2306         Web Inspector: Docking Toolbar Buttons do not respect Docking Availability
2307         https://bugs.webkit.org/show_bug.cgi?id=144714
2308
2309         Reviewed by Timothy Hatcher.
2310
2311         * UIProcess/WebInspectorProxy.cpp:
2312         (WebKit::WebInspectorProxy::createInspectorPage):
2313         (WebKit::WebInspectorProxy::attachAvailabilityChanged):
2314         * WebProcess/WebPage/WebInspectorUI.cpp:
2315         (WebKit::WebInspectorUI::setDockingUnavailable):
2316         * WebProcess/WebPage/WebInspectorUI.h:
2317         * WebProcess/WebPage/WebInspectorUI.messages.in:
2318         When docking availability changes, inform the inspector page
2319         so it can respond by updating its UI.
2320
2321 2015-05-06  Joonghun Park  <jh718.park@samsung.com>
2322
2323         [WK2] Simplify AsyncRequestImpl::ArgumentType parameters
2324         https://bugs.webkit.org/show_bug.cgi?id=144689
2325
2326         Reviewed by Darin Adler.
2327
2328         Remove duplicated typename and ::type from AsyncRequestImpl related
2329         function parameters.
2330
2331         * Shared/AsyncRequest.h:
2332
2333 2015-05-06  Commit Queue  <commit-queue@webkit.org>
2334
2335         Unreviewed, rolling out r183894.
2336         https://bugs.webkit.org/show_bug.cgi?id=144719
2337
2338         crashes on mavericks (Requested by dino on #webkit).
2339
2340         Reverted changeset:
2341
2342         "Handle backdrop views that have to tile"
2343         https://bugs.webkit.org/show_bug.cgi?id=142317
2344         http://trac.webkit.org/changeset/183894
2345
2346 2015-05-06  Brady Eidson  <beidson@apple.com>
2347
2348         Addition review followup for:
2349         Crash executing null AsyncRequest in IDB code.
2350         <rdar://problem/18854856> and https://bugs.webkit.org/show_bug.cgi?id=144715
2351
2352         Reviewed by Darin Adler.
2353
2354         This patch adds a layer on top of the UniqueIDBDatabase request map to catch this coding mistake in the future. 
2355  
2356          * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2357         (WebKit::UniqueIDBDatabase::didCompleteBoolRequest): Get rid of the ASSERT and the temporary variable,
2358           make it a single line which reads better.
2359         (WebKit::UniqueIDBDatabase::didPutRecordInBackingStore): Ditto.
2360         (WebKit::UniqueIDBDatabase::didGetRecordFromBackingStore): Ditto.
2361         (WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore): Ditto.
2362         (WebKit::UniqueIDBDatabase::didAdvanceCursorInBackingStore): Ditto.
2363         (WebKit::UniqueIDBDatabase::didIterateCursorInBackingStore): Ditto.
2364         (WebKit::UniqueIDBDatabase::didCountInBackingStore): Ditto.
2365         (WebKit::UniqueIDBDatabase::didDeleteRangeInBackingStore): Ditto.
2366         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h: Ditto.
2367
2368         Add the class AsyncRequestMap which shadows a HashMap but does aggressive runtime checks
2369         in ::take() to make sure the same request was not dispatched twice in a row, and makes sure we
2370         never try to execute a null AsyncRequest by way of a RELEASE_ASSERT.
2371         * Shared/AsyncRequest.h:
2372         (WebKit::AsyncRequestMap::AsyncRequestMap):
2373         (WebKit::AsyncRequestMap::take):
2374         (WebKit::AsyncRequestMap::add):
2375         (WebKit::AsyncRequestMap::clear):
2376         (WebKit::AsyncRequestMap::values):
2377
2378 2015-05-06  Brady Eidson  <beidson@apple.com>
2379
2380         Crash executing null AsyncRequest in IDB code.
2381         <rdar://problem/18854856> and https://bugs.webkit.org/show_bug.cgi?id=144715
2382
2383         Reviewed by Darin Adler.
2384
2385         When UniqueIDBDatabase fails to execute an operation on the database work queue it usually
2386         dispatches an AsyncRequest ID back to the main thread with an error callback.
2387
2388         For two of its operations it would then also dispatch the success callback.
2389
2390         In those cases the main thread would first take the AsyncRequest for the error callback out
2391         of a map and then execute it.
2392
2393         It would then try to take the same AsyncRequest out of the map again, fail to do so, then
2394         execute a null AsyncRequest.
2395
2396         This patch fixes the two functions to not dispatch both an error and success callback.
2397
2398         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2399         (WebKit::UniqueIDBDatabase::countInBackingStore): Return after dispatching the error callback.
2400         (WebKit::UniqueIDBDatabase::deleteRangeInBackingStore): Ditto.
2401
2402 2015-05-06  Dean Jackson  <dino@apple.com>
2403
2404         Handle backdrop views that have to tile
2405         https://bugs.webkit.org/show_bug.cgi?id=142317
2406         <rdar://problem/20049088>
2407
2408         Reviewed by Simon Fraser.
2409
2410         Add some better logging for custom appearance.
2411
2412         * Shared/mac/RemoteLayerTreeTransaction.mm:
2413         (WebKit::RemoteLayerTreeTextStream::operator<<):
2414
2415 2015-05-06  Chris Dumez  <cdumez@apple.com>
2416
2417         Disable network cache efficacy logging
2418         https://bugs.webkit.org/show_bug.cgi?id=144703
2419         <rdar://problem/20439143>
2420
2421         Reviewed by Andreas Kling.
2422
2423         Disable network cache efficacy logging by default as we have sufficient
2424         data for now.
2425
2426         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2427         (WebKit::registerUserDefaultsIfNeeded):
2428
2429 2015-05-06  Timothy Horton  <timothy_horton@apple.com>
2430
2431         Fix the build.
2432
2433         * UIProcess/mac/WKViewLayoutStrategy.mm:
2434         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
2435
2436 2015-05-06  Dan Bernstein  <mitz@apple.com>
2437
2438         No way to get a WKWebProcessPlugInFrame’s parent frame
2439         https://bugs.webkit.org/show_bug.cgi?id=144705
2440
2441         Reviewed by Sam Weinig.
2442
2443         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
2444         (-[WKWebProcessPlugInFrame _parentFrame]): Added this getter.
2445         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h: Declared new
2446         _parentFrame property.
2447
2448 2015-05-06  Timothy Horton  <timothy_horton@apple.com>
2449
2450         Fix the build.
2451
2452         * UIProcess/mac/WKViewLayoutStrategy.mm:
2453         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
2454
2455 2015-04-02  Myles C. Maxfield  <mmaxfield@apple.com>
2456
2457         Introducing the Platform Abstraction Layer (PAL)
2458         https://bugs.webkit.org/show_bug.cgi?id=143358
2459
2460         Reviewed by Simon Fraser.
2461
2462         * Configurations/FeatureDefines.xcconfig: Updated
2463
2464 2015-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2465
2466         [GTK][WK2] The WebKit network disk cache is not enabled
2467         https://bugs.webkit.org/show_bug.cgi?id=142821
2468
2469         Reviewed by Martin Robinson.
2470
2471         Enable NetworkCache for the GTK+ port.
2472
2473         * config.h:
2474
2475 2015-05-06  Ryuan Choi  <ryuan.choi@navercorp.com>
2476
2477         [EFL] Remove redudant condition in ViewClientEfl::didChangeViewportAttributes
2478         https://bugs.webkit.org/show_bug.cgi?id=144672
2479
2480         Reviewed by Gyuyoung Kim.
2481
2482         ViewClientEfl::didChangeViewportAttributes is always called when fixed layout is disabled.
2483
2484         * UIProcess/efl/ViewClientEfl.cpp:
2485         (WebKit::ViewClientEfl::didChangeViewportAttributes):
2486         Removes condition that checks whether fixed layout is enabled.
2487
2488 2015-05-05  Alexey Proskuryakov  <ap@apple.com>
2489
2490         NetworkResourceLoader::cleanup() should clear ResourceHandle client pointer.
2491         https://bugs.webkit.org/show_bug.cgi?id=144641
2492         rdar://problem/20250960
2493
2494         Reviewed by David Kilzer.
2495
2496         * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::cleanup):
2497         Clear the client pointer.
2498
2499         * Shared/Authentication/AuthenticationManager.cpp:
2500         (WebKit::AuthenticationManager::useCredentialForChallenge):
2501         (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
2502         (WebKit::AuthenticationManager::cancelChallenge):
2503         (WebKit::AuthenticationManager::performDefaultHandling):
2504         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
2505         Updated comments, which were not accurate, at least on Mac.
2506
2507 2015-05-05  Tim Horton  <timothy_horton@apple.com>
2508
2509         Views get stuck with viewScale < 1 after switching from DynamicSizeWithMinimumViewSize to ViewSize
2510         https://bugs.webkit.org/show_bug.cgi?id=144656
2511
2512         Reviewed by Dan Bernstein.
2513
2514         * UIProcess/mac/WKViewLayoutStrategy.mm:
2515         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
2516         Reset the viewScale when we leave the DynamicSizeWithMinimumViewSize strategy.
2517
2518 2015-05-05  Tim Horton  <timothy_horton@apple.com>
2519
2520         Fix the build.
2521
2522         * Platform/mac/LayerHostingContext.mm:
2523         (WebKit::LayerHostingContext::setFencePort):
2524
2525 2015-05-05  Tim Horton  <timothy_horton@apple.com>
2526
2527         Fix the build.
2528
2529         * UIProcess/mac/WKViewLayoutStrategy.mm:
2530         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
2531
2532 2015-05-05  Timothy Horton  <timothy_horton@apple.com>
2533
2534         Add a layout mode for computing fixed layout size from a minimum size
2535         https://bugs.webkit.org/show_bug.cgi?id=144610
2536         <rdar://problem/19790341>
2537
2538         Reviewed by Simon Fraser.
2539
2540         Add a layout mode where WebKit determines the layout size with a set of
2541         (still in flux) heuristics, trying hard to keep the page usable below a
2542         particular client-defined threshold view size.
2543
2544         This can mean that WebKit will start scaling down the page inside the view
2545         to make the whole page fit, using the viewScale mechanism.
2546
2547         * UIProcess/API/C/WKLayoutMode.h:
2548         * UIProcess/API/Cocoa/_WKLayoutMode.h:
2549         Add the new layout mode, and documentation for the two complicated ones.
2550         
2551         * UIProcess/API/Cocoa/WKWebView.mm:
2552         (-[WKWebView _layoutMode]):
2553         (-[WKWebView _setLayoutMode:]):
2554         (-[WKWebView _setViewScale:]):
2555         (-[WKWebView _setMinimumViewSize:]):
2556         (-[WKWebView _minimumViewSize]):
2557         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2558         Forward the layoutMode and viewScale parameters to WKView if we have one.
2559
2560         * UIProcess/API/Cocoa/WKViewPrivate.h:
2561         * UIProcess/API/mac/WKView.mm:
2562         (-[WKView dealloc]):
2563         (-[WKView viewWillStartLiveResize]):
2564         (-[WKView viewDidEndLiveResize]):
2565         (-[WKView setFrameSize:]):
2566         (-[WKView initWithFrame:processPool:configuration:webView:]):
2567         (-[WKView disableFrameSizeUpdates]):
2568         (-[WKView enableFrameSizeUpdates]):
2569         (-[WKView frameSizeUpdatesDisabled]):
2570         (-[WKView _layoutMode]):
2571         (-[WKView _setLayoutMode:]):
2572         (-[WKView _setViewScale:]):
2573         (-[WKView _setMinimumViewSize:]):
2574         (-[WKView _minimumViewSize]):
2575         Store the minimum view size, and update the fixed layout size if needed.
2576
2577         (-[WKView _updateAutomaticallyComputedFixedLayoutSize]): Deleted.
2578         (-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]): Deleted.
2579         (-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]): Deleted.
2580         Store the WKLayoutMode on the WKViewLayoutStrategy instead of having a
2581         bunch of things like _automaticallyComputesFixedLayoutSizeFromViewScale.
2582
2583         * UIProcess/API/mac/WKViewInternal.h:
2584
2585         * UIProcess/mac/WKViewLayoutStrategy.h: Added.
2586         * UIProcess/mac/WKViewLayoutStrategy.mm: Added.
2587         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
2588         (-[WKViewLayoutStrategy initWithPage:view:mode:]):
2589         (-[WKViewLayoutStrategy willDestroyView:]):
2590         (-[WKViewLayoutStrategy layoutMode]):
2591         (-[WKViewLayoutStrategy updateLayout]):
2592         (-[WKViewLayoutStrategy disableFrameSizeUpdates]):
2593         (-[WKViewLayoutStrategy enableFrameSizeUpdates]):
2594         (-[WKViewLayoutStrategy frameSizeUpdatesDisabled]):
2595         (-[WKViewLayoutStrategy didChangeViewScale]):
2596         (-[WKViewLayoutStrategy didChangeMinimumViewSize]):
2597         (-[WKViewLayoutStrategy willStartLiveResize]):
2598         (-[WKViewLayoutStrategy didEndLiveResize]):
2599         (-[WKViewLayoutStrategy didChangeFrameSize]):
2600         (-[WKViewLayoutStrategy willChangeLayoutStrategy]):
2601         (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]):
2602         (-[WKViewViewSizeLayoutStrategy updateLayout]):
2603         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]):
2604         (-[WKViewFixedSizeLayoutStrategy updateLayout]):
2605         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]):
2606         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
2607         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeViewScale]):
2608         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
2609         Move the existing layout strategies from WKView into WKViewLayoutStrategy subclasses.
2610
2611         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]):
2612         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
2613         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeMinimumViewSize]):
2614         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willStartLiveResize]):
2615         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didEndLiveResize]):
2616         While in live resize with the new layout mode, disable frame size updates.
2617         The new layout mode will do a live scale during part of the resize, and
2618         we don't always want to send the new view size to the Web process.
2619
2620         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeFrameSize]):
2621         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
2622         While in the new layout mode, maintain the viewScale as the minimum of the
2623         scale required to fit the current view frame size inside the minimumViewSize.
2624         If no scaling is required, carry on as usual, pushing the new view frame size
2625         to the DrawingArea and on to the Web process.
2626         If scaling is required, apply a transform to the view in the UI process,
2627         until the live resize completes, in which case we send a fenced viewScale
2628         adjustment to the Web process (so that the tiles paint at the new viewScale
2629         synchronized with the removal of the transform in the UI process).
2630
2631         * UIProcess/WebPageProxy.cpp:
2632         (WebKit::WebPageProxy::scaleViewFenced):
2633         * UIProcess/WebPageProxy.h:
2634         * WebProcess/WebPage/DrawingArea.h:
2635         (WebKit::DrawingArea::addFence):
2636         (WebKit::DrawingArea::acceleratedAnimationDidEnd): Deleted.
2637         * WebProcess/WebPage/WebPage.cpp:
2638         (WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
2639         * WebProcess/WebPage/WebPage.h:
2640         * WebProcess/WebPage/WebPage.messages.in:
2641         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2642         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2643         (WebKit::TiledCoreAnimationDrawingArea::addFence):
2644         Add scaleViewAndUpdateGeometryFenced and the ability to install CoreAnimation fences on
2645         TiledCoreAnimationDrawingArea's CAContext.
2646
2647         Add the ability to send updateGeometry out-of-band, so that
2648         we can send it synchronously inside the message along with the CA fence.
2649         We have to both change the viewScale and updateGeometry simultaneously
2650         in the same CA commit that we install the fence into, in order to ensure
2651         that there is no flash.
2652
2653 2015-05-05  Alex Christensen  <achristensen@webkit.org>
2654
2655         [Content Extensions] Release input NSString when finished copying it.
2656         https://bugs.webkit.org/show_bug.cgi?id=144642
2657
2658         Reviewed by Brian Weinstein.
2659
2660         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
2661         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
2662         (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
2663
2664 2015-05-05  Alex Christensen  <achristensen@webkit.org>
2665
2666         [Content Extensions] Use less memory to store the json input.
2667         https://bugs.webkit.org/show_bug.cgi?id=144604
2668
2669         Reviewed by Benjamin Poulain.
2670
2671         * UIProcess/API/APIUserContentExtensionStore.cpp:
2672         (API::compiledToFile):
2673         (API::UserContentExtensionStore::compileContentExtension):
2674         * UIProcess/API/APIUserContentExtensionStore.h:
2675         Don't copy strings as much or keep them alive after done using them.
2676
2677 2015-05-04  Alex Christensen  <achristensen@webkit.org>
2678
2679         [Content Extensions] Use less memory when writing byte code to file
2680         https://bugs.webkit.org/show_bug.cgi?id=144602
2681
2682         Reviewed by Darin Adler.
2683
2684         * UIProcess/API/APIUserContentExtensionStore.cpp:
2685         (API::decodeContentExtensionMetaData):
2686         (API::writeDataToFile):
2687         (API::compiledToFile):
2688         (API::createExtension):
2689         Compile and write each DFA to file, then come back and write the header when finalizing.
2690         Also don't copy the DFA bytecode. This way, we don't need to keep more than one DFA's
2691         bytecode in memory at a time.
2692
2693 2015-05-05  Sungmann Cho  <sungmann.cho@navercorp.com>
2694
2695         Make all FrameLoadState data members private.
2696         https://bugs.webkit.org/show_bug.cgi?id=144562
2697
2698         Reviewed by Darin Adler.
2699
2700         Previously, all of the data members in FrameLoadState were public and accessed directly
2701         from outside the class. But these should all be private as noted in FrameLoadState.h
2702         for better encapsulation.
2703
2704         No new tests, no behavior change.
2705
2706         * UIProcess/API/C/WKFrame.cpp:
2707         (WKFrameGetFrameLoadState):
2708         * UIProcess/FrameLoadState.h:
2709         (WebKit::FrameLoadState::state):
2710         (WebKit::FrameLoadState::url):
2711         (WebKit::FrameLoadState::provisionalURL):
2712         (WebKit::FrameLoadState::unreachableURL):
2713         * UIProcess/WebFrameProxy.h:
2714         (WebKit::WebFrameProxy::url):
2715         (WebKit::WebFrameProxy::provisionalURL):
2716         (WebKit::WebFrameProxy::unreachableURL):
2717
2718 2015-05-05  Alexey Proskuryakov  <ap@apple.com>
2719
2720         Crashes in SandboxExtension::consumePermanently when uploading
2721         https://bugs.webkit.org/show_bug.cgi?id=144611
2722         rdar://problem/10156710
2723
2724         Reviewed by Darin Adler.
2725
2726         This only fixes the crashes, uploading still won't work.
2727         Added null checks and some logging that may help us get to the root cause eventually.
2728
2729         * Shared/SandboxExtension.h:
2730         (WebKit::SandboxExtension::createHandle):
2731         (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
2732         * Shared/mac/SandboxExtensionMac.mm:
2733         (WebKit::SandboxExtension::createHandle):
2734         (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
2735         * UIProcess/WebPageProxy.cpp:
2736         (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
2737         * WebProcess/WebPage/WebPage.cpp:
2738         (WebKit::WebPage::extendSandboxForFileFromOpenPanel):
2739
2740 2015-05-05  Csaba Osztrogonác  <ossy@webkit.org>
2741
2742         Remove TextureMapperImageBuffer
2743         https://bugs.webkit.org/show_bug.cgi?id=143561
2744
2745         Reviewed by Žan Doberšek.
2746
2747         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2748         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
2749         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2750         (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
2751
2752 2015-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2753
2754         [SOUP] Network Cache: IOChannel operations are not sent to the right thread
2755         https://bugs.webkit.org/show_bug.cgi?id=144542
2756
2757         Reviewed by Darin Adler.
2758
2759         We are ignoring the given WorkQueue and running the async
2760         operations in the current thread. Check the given WorkQueue
2761         instead and schedule the operation to the given queue. If the
2762         given queue is nullptr, which means the operation should be run in
2763         the main context, the operation is run directly if the current
2764         context is the main one or sent to the main context using a
2765         GMainLoopSource.
2766
2767         Fixes crashes due to asserts when running disk-cache layout tests
2768         in a Debug build.
2769
2770         * NetworkProcess/cache/NetworkCacheIOChannel.h:
2771         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
2772         (WebKit::NetworkCache::runTaskInQueue):
2773         (WebKit::NetworkCache::IOChannel::read):
2774         (WebKit::NetworkCache::IOChannel::readSync):
2775         (WebKit::NetworkCache::IOChannel::write):
2776
2777 2015-05-04  Dan Bernstein  <mitz@apple.com>
2778
2779         WebKit always goes through LaunchServices for main frame navigation actions
2780         https://bugs.webkit.org/show_bug.cgi?id=144608
2781
2782         Reviewed by Tim Horton.
2783
2784         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Defined
2785         _WKNavigationActionPolicyAllowWithoutTryingAppLink.
2786         * UIProcess/Cocoa/NavigationState.mm:
2787         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): If the policy
2788         is _WKNavigationActionPolicyAllowWithoutTryingAppLink, don’t go through tryAppLink.
2789
2790 2015-05-04  Enrica Casucci  <enrica@apple.com>
2791
2792         [iOS WK2] editorState should include information about selection clipping rectangle.
2793         https://bugs.webkit.org/show_bug.cgi?id=144603
2794         rdar://problem/20521252
2795
2796         Reviewed by Chris Dumez.
2797
2798         Adding selectionClipRect to the post-layout portion of EditorState.
2799         This way we can compute the selection clipping rectangle based on
2800         up-to-date information instead of using the rectangle provided when
2801         then element was first focused.
2802
2803         * Shared/EditorState.cpp:
2804         (WebKit::EditorState::PostLayoutData::encode):
2805         (WebKit::EditorState::PostLayoutData::decode):
2806         * Shared/EditorState.h:
2807         * UIProcess/ios/WKContentViewInteraction.mm:
2808         (-[WKContentView _selectionClipRect]):
2809         * WebProcess/WebPage/ios/WebPageIOS.mm:
2810         (WebKit::WebPage::platformEditorState):
2811
2812 2015-05-04  Antti Koivisto  <antti@apple.com>
2813
2814         Network Cache: Support time based cache clearing
2815         https://bugs.webkit.org/show_bug.cgi?id=144568
2816         <rdar://problem/19769820>
2817
2818         Reviewed by Andreas Kling.
2819
2820         Support clearing cache entries newer than given time only.
2821
2822         * NetworkProcess/cache/NetworkCache.cpp:
2823         (WebKit::NetworkCache::Cache::deleteDumpFile):
2824         (WebKit::NetworkCache::Storage::traverse):
2825
2826             Also fix thread safety of traverse handler function.
2827
2828         (WebKit::NetworkCache::Cache::clear):
2829
2830             Also add completion handler to support the API properly.
2831
2832         * NetworkProcess/cache/NetworkCache.h:
2833         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2834         (WebKit::NetworkCache::Storage::clear):
2835         * NetworkProcess/cache/NetworkCacheStorage.h:
2836         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2837         (WebKit::clearNSURLCache):
2838
2839             Factor to a function.
2840
2841         (WebKit::NetworkProcess::clearDiskCache):
2842
2843 2015-05-04  Zan Dobersek  <zdobersek@igalia.com>
2844
2845         [WTF] Remove Functional.h inclusions
2846         https://bugs.webkit.org/show_bug.cgi?id=144400
2847
2848         Reviewed by Darin Adler.
2849
2850         Remove unnecessary inclusions of the <wtf/Functional.h> header in WebKit2.
2851
2852         * Platform/IPC/unix/ConnectionUnix.cpp:
2853         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Import the <objc/runtime.h>
2854         header that was previously indirectly included through the Functional.h header.
2855         * WebProcess/WebPage/DrawingArea.cpp:
2856
2857 2015-05-04  Csaba Osztrogonác  <ossy@webkit.org>
2858
2859         [ARM] Don't compare unsigned chars to EOF (-1)
2860         https://bugs.webkit.org/show_bug.cgi?id=144439
2861
2862         Reviewed by Geoffrey Garen.
2863
2864         * Shared/linux/WebMemorySamplerLinux.cpp:
2865         (WebKit::nextToken): Don't cast return value of fgetc() to char.
2866
2867 2015-05-04  Antti Koivisto  <antti@apple.com>
2868
2869         Remove NetworkResourceLoadScheduler
2870         https://bugs.webkit.org/show_bug.cgi?id=144550
2871
2872         Reviewed by Sam Weinig.
2873
2874         It doesn't really do anything.
2875
2876         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2877         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
2878         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
2879         * NetworkProcess/NetworkProcess.cpp:
2880         (WebKit::NetworkProcess::getNetworkProcessStatistics):
2881         * NetworkProcess/NetworkProcess.h:
2882         (WebKit::NetworkProcess::networkResourceLoadScheduler): Deleted.
2883         * NetworkProcess/NetworkResourceLoadScheduler.cpp: Removed.
2884         * NetworkProcess/NetworkResourceLoadScheduler.h: Removed.
2885         * NetworkProcess/NetworkResourceLoader.cpp:
2886         (WebKit::NetworkResourceLoader::cleanup):
2887         * NetworkProcess/NetworkResourceLoader.h:
2888         (WebKit::NetworkResourceLoader::create):
2889         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2890         (WebKit::initializeNetworkSettings):
2891
2892             Moved from NetworkResourceLoadSchedulerMac.mm.
2893
2894         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2895         * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm: Removed.
2896         * NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp: Removed.
2897         * WebKit2.xcodeproj/project.pbxproj:
2898
2899 2015-05-03  Alexey Proskuryakov  <ap@apple.com>
2900
2901         Crash in SandboxExtension::consume when uploading iWork -tef documents to iCloud
2902         https://bugs.webkit.org/show_bug.cgi?id=144509
2903         rdar://problem/18731910
2904
2905         Reviewed by Daniel Bates.
2906
2907         No test, because testRunner.beginDragWithFiles doesn't work in WKTR, and making
2908         it work is hard.
2909
2910         * Shared/BlobDataFileReferenceWithSandboxExtension.cpp:
2911         (WebKit::BlobDataFileReferenceWithSandboxExtension::prepareForFileAccess):
2912         (WebKit::BlobDataFileReferenceWithSandboxExtension::revokeFileAccess):
2913
2914 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2915
2916         [GTK][EFL] Unify platform display handling
2917         https://bugs.webkit.org/show_bug.cgi?id=144517
2918
2919         Reviewed by Martin Robinson.
2920
2921         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2922         (webkitWebViewBaseRealize): Use PlatformDisplay::sharedDisplay()
2923         to checkt the display type.
2924         (webkitWebViewBaseCreateWebPage): Ditto.
2925         * UIProcess/cairo/BackingStoreCairo.cpp:
2926         (WebKit::BackingStore::createBackend): Pass the native X11 shared
2927         display to BackingStoreBackendCairoX11.
2928         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2929         (WebKit::NetscapePlugin::x11HostDisplay): Return the native X11
2930         shared display.
2931
2932 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2933
2934         Unreviewed. Fix Debug build with NETWORK_CACHE enabled and CACHE_PARTITIONING disabled.
2935
2936         * NetworkProcess/cache/NetworkCache.cpp:
2937         (WebKit::NetworkCache::Cache::store):
2938
2939 2015-05-01  Dan Bernstein  <mitz@apple.com>
2940
2941         WebKit2 part of <rdar://problem/8636045> Back/forward navigation to an error page in Safari breaks the back-forward list
2942         https://bugs.webkit.org/show_bug.cgi?id=144501
2943
2944         Reviewed by Darin Adler.
2945
2946         * UIProcess/WebPageProxy.cpp:
2947         (WebKit::WebPageProxy::loadAlternateHTMLString): If this is called during
2948         didFailProvisionalLoadForFrame, send back the provisional URL captured at the time of
2949         failure.
2950         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame): Get the provisioinal URL and keep
2951         it in new member variable m_failingProvisionalLoadURL for the duration of the client’s
2952         handling of this message.
2953         * UIProcess/WebPageProxy.h:
2954
2955         * UIProcess/WebPageProxy.messages.in: Added provisionalURL parameter to
2956         DidFailProvisionalLoadForFrame.
2957
2958         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2959         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad): Send the URL for this error
2960         to the UI process.
2961
2962         * WebProcess/WebPage/WebPage.cpp:
2963         (WebKit::WebPage::loadAlternateHTMLString): Temporarily restore the loader’s state to
2964         reflect the provisional load error being handled.
2965
2966         * WebProcess/WebPage/WebPage.h:
2967         * WebProcess/WebPage/WebPage.messages.in: Added provisionalLoadErrorURL parameter to
2968         LoadAlternateHTMLString.
2969
2970 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
2971
2972         USE(...) macro should expect unprefixed variables
2973         https://bugs.webkit.org/show_bug.cgi?id=144454
2974
2975         Reviewed by Daniel Bates.
2976
2977         * Shared/API/c/WKBase.h: Replace all occurrences WTF_USE with USE.
2978         * WebKit2.xcodeproj/project.pbxproj: Ditto.
2979
2980 2015-05-01  Brady Eidson  <beidson@apple.com>
2981
2982         Add API to disable meta refreshes.
2983         <rdar://problem/20333198> and https://bugs.webkit.org/show_bug.cgi?id=144269
2984
2985         Reviewed by Alexey Proskuryakov.
2986
2987         Add a preference to enable/disable meta refreshes, enabled by default.
2988
2989         * Shared/WebPreferencesDefinitions.h:
2990         * UIProcess/API/C/WKPreferences.cpp:
2991         (WKPreferencesSetMetaRefreshEnabled):
2992         (WKPreferencesGetMetaRefreshEnabled):
2993         (WKPreferencesGetIgnoreViewportScalingConstraints): Deleted.
2994         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2995         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2996         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2997         * WebProcess/WebPage/WebPage.cpp:
2998         (WebKit::WebPage::updatePreferences):
2999
3000 2015-05-01  Antti Koivisto  <antti@apple.com>
3001
3002         Remove network process load serialization code
3003         https://bugs.webkit.org/show_bug.cgi?id=144448
3004
3005         Reviewed by Alexey Proskuryakov.
3006
3007         TestRunner.setSerializeHTTPLoads is used by a few tests but it is unnecessary
3008         with network process. We don't reorder loads anyway so test results are consistent.
3009         There or no other clients for this code.
3010
3011         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3012         (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
3013         (WebKit::NetworkConnectionToWebProcess::setSerialLoadingEnabled): Deleted.
3014         * NetworkProcess/NetworkConnectionToWebProcess.h:
3015         (WebKit::NetworkConnectionToWebProcess::isSerialLoadingEnabled): Deleted.
3016         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3017         * NetworkProcess/NetworkProcess.cpp:
3018         (WebKit::NetworkProcess::getNetworkProcessStatistics):
3019         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
3020         (WebKit::NetworkResourceLoadScheduler::scheduleLoader):
3021         (WebKit::NetworkResourceLoadScheduler::removeLoader):
3022         (WebKit::NetworkResourceLoadScheduler::loadsPendingCount): Deleted.
3023         * NetworkProcess/NetworkResourceLoadScheduler.h:
3024         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3025         (WKBundleSetTabKeyCyclesThroughElements):
3026         (WKBundleSetSerialLoadingEnabled): Deleted.
3027         (WKBundleDispatchPendingLoadRequests): Deleted.
3028         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3029         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3030         (WebKit::InjectedBundle::setSerialLoadingEnabled): Deleted.
3031         (WebKit::InjectedBundle::dispatchPendingLoadRequests): Deleted.
3032
3033             Remove also this as it does nothing.
3034
3035         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3036         (WebKit::WebResourceLoadScheduler::WebResourceLoadScheduler):
3037         (WebKit::WebResourceLoadScheduler::suspendPendingRequests):
3038         (WebKit::WebResourceLoadScheduler::resumePendingRequests):
3039
3040             Remove implementation, it does nothing.
3041
3042         (WebKit::WebResourceLoadScheduler::setSerialLoadingEnabled):
3043         * WebProcess/Network/WebResourceLoadScheduler.h:
3044
3045 2015-04-30  Timothy Horton  <timothy_horton@apple.com>
3046
3047         Remove long-deprecated unused WKView minimumLayoutWidth properties
3048         https://bugs.webkit.org/show_bug.cgi?id=144480
3049
3050         Reviewed by Alexey Proskuryakov.
3051
3052         * UIProcess/API/Cocoa/WKViewPrivate.h:
3053         * UIProcess/API/mac/WKView.mm:
3054         (-[WKView minimumLayoutWidth]): Deleted.
3055         (-[WKView setMinimumLayoutWidth:]): Deleted.
3056         (-[WKView minimumWidthForAutoLayout]): Deleted.
3057         (-[WKView setMinimumWidthForAutoLayout:]): Deleted.
3058         These were replaced with minimumSizeForAutoLayout long ago.
3059
3060 2015-04-30  Simon Fraser  <simon.fraser@apple.com>
3061
3062         Fixed elements end up in the middle of the view with pageScale < 1
3063         https://bugs.webkit.org/show_bug.cgi?id=144428
3064         rdar://problem/20404982
3065
3066         Reviewed by Tim Horton.
3067
3068         Encode/decode fixedElementsLayoutRelativeToFrame.
3069
3070         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
3071         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
3072         (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
3073
3074 2015-04-30  Tim Horton  <timothy_horton@apple.com>
3075
3076         Asynchronous (or timed-out synchronous) resize flashes white instead of page background color
3077         https://bugs.webkit.org/show_bug.cgi?id=144468
3078
3079         Reviewed by Simon Fraser and Dan Bernstein.
3080
3081         * UIProcess/API/mac/WKView.mm:
3082         (-[WKView _viewBackgroundColor]):
3083         (-[WKView updateLayer]):
3084         Use the pageExtendedBackgroundColor for the background color of the WKView,
3085         if we have one (and aren't using a transparent background). This means
3086         during asynchronous resize or other cases where the Web process isn't keeping
3087         up with the UI process during a resize, we'll see background color instead of white.
3088
3089 2015-04-30  Beth Dakin  <bdakin@apple.com>
3090
3091         Should choose UIScrollView indicatorStyle based on the document background color
3092         https://bugs.webkit.org/show_bug.cgi?id=144473
3093         -and corresponding-
3094         rdar://problem/19897699
3095
3096         Reviewed by Simon Fraser.
3097
3098         Update the indicator style whenever the background color changes.  
3099         * UIProcess/API/Cocoa/WKWebView.mm:
3100         (-[WKWebView _updateScrollViewBackground]):
3101
3102 2015-04-30  Enrica Casucci  <enrica@apple.com>
3103
3104         [iOS] tapping in the middle of a word in editable content should not select the word.
3105         https://bugs.webkit.org/show_bug.cgi?id=144421
3106         rdar://problem/20710948
3107
3108         Reviewed by Tim Horton.
3109
3110         Reverting to the original behavior.
3111
3112         * WebProcess/WebPage/ios/WebPageIOS.mm:
3113         (WebKit::WebPage::selectWithGesture):
3114
3115 2015-04-29  Hunseop Jeong  <hs85.jeong@samsung.com>
3116
3117         Fix the EFL build after r183595
3118         https://bugs.webkit.org/show_bug.cgi?id=144427
3119
3120         Reviewed by Gyuyoung Kim.
3121
3122         updateWheelEventTestTriggersIfNeeded() is guarded by #if ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING).
3123
3124         * WebProcess/WebPage/EventDispatcher.cpp:
3125         (WebKit::updateWheelEventTestTriggersIfNeeded):
3126
3127 2015-04-29  Brent Fulgham  <bfulgham@apple.com>
3128
3129         Expand test infrastructure to support scrolling tests
3130         https://bugs.webkit.org/show_bug.cgi?id=143684
3131         <rdar://problem/20375516>
3132
3133         Reviewed by Simon Fraser.
3134
3135         Update test programs to activate (and deactivate) the new WheelEventTestTrigger logic.
3136
3137         * UIProcess/API/C/WKPage.cpp:
3138         (WKPageClearWheelEventTestTriggers): Added.
3139         * UIProcess/API/C/WKPage.h:
3140         * UIProcess/WebPageProxy.cpp:
3141         (WebKit::WebPageProxy::clearWheelEventTestTrigger): Added.
3142         * UIProcess/WebPageProxy.h:
3143         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3144         (WKBundlePageStartMonitoringScrollOperations): Interact with WheelEventTestTrigger through
3145         the Page, rather than MainFrame.
3146         (WKBundlePageRegisterScrollOperationCompletionCallback): Ditto.
3147         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3148         (WebKit::PDFPlugin::createScrollbar): Make sure scroll animator knows about any
3149         active test triggers.
3150         * WebPage/EventDispatcher.mm:
3151         (WebKit::EventDispatcher::wheelEvent): If the wheel event was passed to the scrolling thread,
3152         defer tests until a Scrolling Thread Sync has occurred.
3153         * WebPage/WebPage.cpp:
3154         (WebKit::WebPage::clearWheelEventTestTrigger): Added.
3155         * WebPage/WebPage.h:
3156         * WebPage/WebPage.message.in: Added ClearWheelEventTestTrigger message.
3157
3158 2015-04-29  Enrica Casucci  <enrica@apple.com>
3159
3160         Adding the ability to move selection by granularity on iOS.
3161         https://bugs.webkit.org/show_bug.cgi?id=144410
3162         rdar://problem/19213337
3163
3164         Reviewed by Benjamin Poulain.
3165
3166         This patch also correctly sets _usingGestureForSelection for all
3167         the functions that change the selection with a gesture.
3168         This way we make sure that the selection drawing is not delayed
3169         until the next time we paint.
3170
3171         * UIProcess/WebPageProxy.h:
3172         * UIProcess/ios/WKContentViewInteraction.mm:
3173         (-[WKContentView moveSelectionAtBoundary:inDirection:completionHandler:]):
3174         * UIProcess/ios/WebPageProxyIOS.mm:
3175         (WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection):
3176         * WebProcess/WebPage/WebPage.h:
3177         * WebProcess/WebPage/WebPage.messages.in:
3178         * WebProcess/WebPage/ios/WebPageIOS.mm:
3179         (WebKit::WebPage::moveSelectionAtBoundaryWithDirection):
3180
3181 2015-04-29  Tim Horton  <timothy_horton@apple.com>
3182
3183         UI process sometimes crashes under _takeViewSnapshot when the window is off-screen
3184         https://bugs.webkit.org/show_bug.cgi?id=144418
3185         <rdar://problem/20740278>
3186
3187         Reviewed by Alexey Proskuryakov.
3188
3189         * UIProcess/API/mac/WKView.mm:
3190         (-[WKView _takeViewSnapshot]):
3191         Null-check the array before checking if it has any items.
3192         If the window is off-screen, we can't snapshot it.
3193
3194 2015-04-29  Simon Fraser  <simon.fraser@apple.com>
3195
3196         Allow testing of plug-ins that handle wheel events.
3197         https://bugs.webkit.org/show_bug.cgi?id=144413
3198
3199         Reviewed by Tim Horton.
3200         
3201         Allow the Test Netscape Plug-in to pretend to handle wheel events,
3202         so layout tests can use it.
3203
3204         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
3205         (WebKit::NetscapePluginModule::determineQuirks):
3206
3207 2015-04-29  Filip Pizlo  <fpizlo@apple.com>
3208
3209         JSTypeInfo should have an inline type flag to indicate if getCallData() has been overridden
3210         https://bugs.webkit.org/show_bug.cgi?id=144397
3211
3212         Reviewed by Andreas Kling.
3213
3214         If you override getCallData() and you want to be called a "function", then you need to use the
3215         new TypeOfShouldCallGetCallData flag.
3216
3217         * WebProcess/Plugins/Netscape/JSNPObject.h:
3218
3219 2015-04-29  Antti Koivisto  <antti@apple.com>
3220
3221         ResourceLoadPriority should be enum class
3222         https://bugs.webkit.org/show_bug.cgi?id=144326
3223
3224         Reviewed by Darin Adler.
3225
3226         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3227         (WebKit::NetworkConnectionToWebProcess::servePendingRequests): Deleted.
3228
3229             Remove this unused message.
3230
3231         * NetworkProcess/NetworkConnectionToWebProcess.h:
3232         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3233         * NetworkProcess/cache/NetworkCache.cpp:
3234         (WebKit::NetworkCache::makeStoreDecision):
3235         (WebKit::NetworkCache::Cache::retrieve):
3236         * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
3237         (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
3238         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3239         (WebKit::WebResourceLoadScheduler::servePendingRequests):
3240         * WebProcess/Network/WebResourceLoadScheduler.h:
3241
3242 2015-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
3243
3244         [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
3245         https://bugs.webkit.org/show_bug.cgi?id=132159
3246
3247         Reviewed by Darin Adler.
3248
3249         Add SPI to set the font whitelist.
3250
3251         * Shared/WebProcessCreationParameters.cpp:
3252         (WebKit::WebProcessCreationParameters::encode):
3253         (WebKit::WebProcessCreationParameters::decode):
3254         * Shared/WebProcessCreationParameters.h:
3255         * UIProcess/API/C/WKContext.cpp:
3256         (WKContextSetFontWhitelist):
3257         * UIProcess/API/C/WKContextPrivate.h:
3258         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3259         (WebKit::WebProcessPool::platformInitializeWebProcess):
3260         * UIProcess/WebProcessPool.cpp:
3261         (WebKit::WebProcessPool::setFontWhitelist):
3262         * UIProcess/WebProcessPool.h:
3263         * WebProcess/cocoa/WebProcessCocoa.mm:
3264         (WebKit::WebProcess::platformInitializeWebProcess):
3265
3266 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
3267
3268         [CMake] [GTK] Organize and clean up unused CMake variables
3269         https://bugs.webkit.org/show_bug.cgi?id=144364
3270
3271         Reviewed by Gyuyoung Kim.
3272
3273         * PlatformGTK.cmake: Add variables specific to this project.
3274         * webkit2gtk-web-extension.pc.in: Hardcode the GTK+ API version. It rarely changes.
3275         * webkit2gtk.pc.in: Ditto.
3276
3277 2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3278
3279         REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
3280         https://bugs.webkit.org/show_bug.cgi?id=144388
3281
3282         Reviewed by Brady Eidson.
3283
3284         Move the WebContextMenuClient::shareMenuItem() implementation to
3285         platform files, since platforms not supporting share menu item
3286         should return a null ContextMenuIem instead.
3287
3288         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3289         (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
3290         * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
3291         (WebKit::WebContextMenuClient::shareMenuItem):
3292         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
3293         (WebKit::WebContextMenuClient::shareMenuItem):
3294         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
3295         (WebKit::WebContextMenuClient::shareMenuItem):
3296
3297 2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3298
3299         REGRESSION(r183467): [SOUP] isMainResource is no longer passed as resource load parameters to the network process
3300         https://bugs.webkit.org/show_bug.cgi?id=144381
3301
3302         Reviewed by Darin Adler.
3303
3304         A requester enum value is passed now as part of the
3305         ResourceRequest, but it's not encoded/decoded for soup.
3306
3307         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
3308         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData): Encode requester.
3309         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData): Decode requester.
3310
3311 2015-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3312
3313         [SOUP] Use xattrs to get/set the creation time of disk cache files
3314         https://bugs.webkit.org/show_bug.cgi?id=144251
3315
3316         Reviewed by Martin Robinson.
3317
3318         The network process disk cache uses the creation time to compute a
3319         worth value used to determine the order in which cached resources
3320         are deleted when the cache is shrunk. In some operating systems
3321         like Linux there's no st_birthtime in struct stat, but since cache
3322         files are always created and deleted by us, we could use a custom
3323         xattr to store and retrieve the creation time of cached resources.
3324
3325         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
3326         (WebKit::NetworkCache::fileTimes):
3327         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
3328         (WebKit::NetworkCache::IOChannel::IOChannel):
3329
3330 2015-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3331
3332         Network Cache: Do not create a SharedBuffer for mapped resources unless explicitly requested
3333         https://bugs.webkit.org/show_bug.cgi?id=144337
3334
3335         Reviewed by Antti Koivisto.
3336
3337         We send a buffer or a memory mapped handler to the web process
3338         depending on whether the resource body is mapped or not, but we
3339         are always creating a shared buffer even for mapped resources.
3340         Split initializeBufferFromStorageRecord() moving the mapped memory
3341         handler initialization to its own method.
3342
3343         * NetworkProcess/cache/NetworkCacheEntry.cpp:
3344         (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
3345         Initialize the mapped memory handler if the body data is mapped.
3346         (WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
3347         Initialize the buffer by wrapping the mapped memory if the body
3348         data is mapped, or using the body data directly otherwise.
3349         (WebKit::NetworkCache::Entry::shareableResourceHandle): Call
3350         initializeShareableResourceHandleFromStorageRecord() if the
3351         handler is null.
3352         * NetworkProcess/cache/NetworkCacheEntry.h:
3353
3354 2015-04-28  Simon Fraser  <simon.fraser@apple.com>
3355
3356         Make a non-static version of FrameView::yPositionForRootContentLayer()
3357         https://bugs.webkit.org/show_bug.cgi?id=144375
3358
3359         Reviewed by Andy Estes.
3360
3361         There were two calls to the static FrameView::yPositionForRootContentLayer()
3362         which passed in all the arguments for the same FrameView. Make a member
3363         function for convenience.
3364
3365         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3366         (WebKit::shadowLayerPositionForFrame):
3367
3368 2015-04-28  Ryuan Choi  <ryuan.choi@navercorp.com>
3369
3370         [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
3371         https://bugs.webkit.org/show_bug.cgi?id=143001
3372
3373         Reviewed by Gyuyoung Kim.
3374
3375         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
3376         (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
3377         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3378         (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
3379         * WebProcess/WebCoreSupport/WebChromeClient.h:
3380         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3381         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
3382         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
3383         * WebProcess/WebPage/WebPage.cpp:
3384         (WebKit::WebPage::setSize):
3385         (WebKit::WebPage::setUseFixedLayout):
3386         (WebKit::WebPage::canHandleUserEvents):
3387         * WebProcess/WebPage/WebPage.h:
3388
3389 2015-04-28  Timothy Horton  <timothy_horton@apple.com>
3390
3391         [TextIndicator] Yellow highlight takes too long to fade out on scroll
3392         https://bugs.webkit.org/show_bug.cgi?id=144358
3393         <rdar://problem/19451011>
3394
3395         Reviewed by Beth Dakin.
3396
3397         * UIProcess/API/Cocoa/WKViewPrivate.h:
3398         * UIProcess/API/mac/WKView.mm:
3399         (-[WKView renewGState]):
3400         (-[WKView viewDidMoveToWindow]):
3401         (-[WKView _dictionaryLookupPopoverWillClose:]):
3402         (-[WKView _setTextIndicator:]):
3403         (-[WKView _setTextIndicator:withLifetime:]):
3404         (-[WKView _clearTextIndicatorWithAnimation:]):
3405         (-[WKView magnifyWithEvent:]):
3406         (-[WKView smartMagnifyWithEvent:]):
3407         (-[WKView setMagnification:centeredAtPoint:]):
3408         (-[WKView setMagnification:]):
3409         (-[WKView _dismissContentRelativeChildWindows]):
3410         (-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
3411         (-[WKView _setTextIndicator:fadeOut:]): Deleted.
3412         * UIProcess/API/mac/WKViewInternal.h:
3413         * UIProcess/PageClient.h:
3414         * UIProcess/WebPageProxy.cpp:
3415         (WebKit::WebPageProxy::pageDidScroll):
3416         (WebKit::WebPageProxy::setTextIndicator):
3417         (WebKit::WebPageProxy::clearTextIndicator):
3418         * UIProcess/WebPageProxy.h:
3419         * UIProcess/WebPageProxy.messages.in:
3420         * UIProcess/ios/PageClientImplIOS.h:
3421         * UIProcess/ios/PageClientImplIOS.mm:
3422         (WebKit::PageClientImpl::setTextIndicator):
3423         (WebKit::PageClientImpl::clearTextIndicator):
3424         * UIProcess/mac/PageClientImpl.h:
3425         * UIProcess/mac/PageClientImpl.mm:
3426         (WebKit::PageClientImpl::setTextIndicator):
3427         (WebKit::PageClientImpl::clearTextIndicator):
3428         (WebKit::PageClientImpl::didPerformDictionaryLookup):
3429         (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
3430         * UIProcess/mac/WKActionMenuController.mm:
3431         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
3432         * UIProcess/mac/WKImmediateActionController.mm:
3433         (-[WKImmediateActionController _defaultAnimationController]):
3434         (-[WKImmediateActionController _animationControllerForDataDetectedText]):
3435         (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
3436         (-[WKImmediateActionController _animationControllerForText]):
3437         * WebProcess/WebPage/FindController.cpp:
3438         (WebKit::FindController::updateFindIndicator):
3439         Make _setTextIndicator take a reference.
3440         Add a variant of _setTextIndicator that takes a Lifetime.
3441         Make _clearTextIndicatorWithAnimation take a DismissalAnimation.
3442         Make dismissContentRelativeChildWindows take a parameter indicating
3443         whether the dismissal should include animation or not (currently
3444         only applies to TextIndicator).
3445         Don't animate when dismissal occurs because of scrolling, zooming,
3446         or other things in which the content will have changed significantly
3447         underneath the indicator and shouldn't have a slowly-fading-out yellow highlight.
3448
3449 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
3450
3451         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
3452         https://bugs.webkit.org/show_bug.cgi?id=144304
3453
3454         Reviewed by Geoffrey Garen.
3455
3456         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
3457
3458         * Configurations/FeatureDefines.xcconfig:
3459
3460 2015-04-28  Commit Queue  <commit-queue@webkit.org>
3461
3462         Unreviewed, rolling out r183514.
3463         https://bugs.webkit.org/show_bug.cgi?id=144359
3464
3465         It broke cloop test bots (Requested by mcatanzaro on #webkit).
3466
3467         Reverted changeset:
3468
3469         "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
3470         https://bugs.webkit.org/show_bug.cgi?id=144304
3471         http://trac.webkit.org/changeset/183514
3472
3473 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
3474
3475         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
3476         https://bugs.webkit.org/show_bug.cgi?id=144304
3477
3478         Reviewed by Geoffrey Garen.
3479
3480         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
3481
3482         * Configurations/FeatureDefines.xcconfig:
3483
3484 2015-04-28  Enrica Casucci  <enrica@apple.com>
3485
3486         Add support for lookup on iOS.
3487         https://bugs.webkit.org/show_bug.cgi?id=144342
3488         rdar://problem/19994090
3489
3490         Reviewed by Tim Horton.
3491
3492         * UIProcess/WebPageProxy.h:
3493         * UIProcess/ios/WKContentViewInteraction.mm:
3494         (-[WKContentView _lookup:]):
3495         (-[WKContentView canPerformAction:withSender:]):
3496         * UIProcess/ios/WebPageProxyIOS.mm:
3497         (WebKit::WebPageProxy::getLookupContextAtPoint):
3498         * WebProcess/WebPage/WebPage.h:
3499         * WebProcess/WebPage/WebPage.messages.in:
3500         * WebProcess/WebPage/ios/WebPageIOS.mm:
3501         (WebKit::WebPage::getLookupContextAtPoint):
3502
3503 2015-04-28  Brady Eidson  <beidson@apple.com>
3504
3505         Consolidate most "frame load" arguments into FrameLoadRequest.
3506         https://bugs.webkit.org/show_bug.cgi?id=144276
3507
3508         Reviewed by Alexey Proskuryakov.
3509
3510         * WebProcess/Plugins/PluginView.cpp:
3511         (WebKit::PluginView::loadURL):
3512         
3513         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3514         (WebKit::WebFrameLoaderClient::dispatchCreatePage):
3515         
3516         * WebProcess/WebPage/WebInspector.cpp:
3517         (WebKit::WebInspector::openInNewTab):
3518
3519 2015-04-28  Chris Dumez  <cdumez@apple.com>
3520
3521         [WK2][Mac] Update WebContent process' sandbox profile for AWD
3522         https://bugs.webkit.org/show_bug.cgi?id=144315
3523         <rdar://problem/20719293>
3524
3525         Reviewed by Alexey Proskuryakov.
3526
3527         Update sandbox profile for AWD similarly to what was done for iOS in
3528         r182278.
3529
3530         * WebProcess/com.apple.WebProcess.sb.in:
3531
3532 2015-04-28  Antti Koivisto  <antti@apple.com>
3533
3534         Network Cache: Disk cache getting filled by YouTube video data
3535         https://bugs.webkit.org/show_bug.cgi?id=144259
3536
3537         Reviewed by Darin Adler.
3538
3539         MSE media is loaded via XHR and tends to eventually fill the cache.
3540
3541         YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
3542         We can reduce disk writes and keep more useful resources around by not caching them
3543
3544         * NetworkProcess/NetworkResourceLoader.cpp:
3545         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
3546         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
3547         * NetworkProcess/cache/NetworkCache.cpp:
3548         (WebKit::NetworkCache::makeStoreDecision):
3549
3550             Don't store if the requester is XHR and response has video or audio content type.
3551
3552         * NetworkProcess/cache/NetworkCache.h:
3553         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
3554         (WebKit::NetworkCache::storeDecisionToDiagnosticKey):
3555         * Shared/Network/NetworkResourceLoadParameters.cpp:
3556         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
3557         (WebKit::NetworkResourceLoadParameters::encode):
3558         (WebKit::NetworkResourceLoadParameters::decode):
3559         * Shared/Network/NetworkResourceLoadParameters.h:
3560
3561             The requester type is now part of the ResourceRequest, no need for separate parameter.
3562
3563         * Shared/mac/WebCoreArgumentCodersMac.mm:
3564         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
3565         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
3566         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3567         (WebKit::WebResourceLoadScheduler::scheduleLoad):
3568
3569 2015-04-28  Zan Dobersek  <zdobersek@igalia.com>
3570
3571         [WK2] API::UserContentURLPattern creation functions should return Ref<>
3572         https://bugs.webkit.org/show_bug.cgi?id=144225
3573
3574         Reviewed by Darin Adler.
3575
3576         Have API::UserContentURLPattern creation functions return Ref<>.
3577         Call-sites are also updated, using and operating on the returned Ref<>
3578         object where possible.
3579
3580         * Shared/API/APIUserContentURLPattern.h:
3581         (API::UserContentURLPattern::create):
3582         * Shared/API/c/WKUserContentURLPattern.cpp:
3583         (WKUserContentURLPatternCreate):
3584
3585 2015-04-28  Zan Dobersek  <zdobersek@igalia.com>
3586
3587         [WK2] API::URLRequest, API::URLResponse creation functions should return Ref<>
3588         https://bugs.webkit.org/show_bug.cgi?id=144224
3589
3590         Reviewed by Darin Adler.
3591
3592         Have API::URLRequest and API::URLResponse creation functions return Ref<>.
3593         The call-sites are also updated, using and operating on the returned Ref<> object
3594         where possible.
3595
3596         * Shared/API/APIURLRequest.h:
3597         (API::URLRequest::create):
3598         * Shared/API/APIURLResponse.h:
3599         (API::URLResponse::create):
3600         * Shared/API/c/WKURLRequest.cpp:
3601         (WKURLRequestCreateWithWKURL):
3602         * Shared/API/c/mac/WKURLRequestNS.mm:
3603         (WKURLRequestCreateWithNSURLRequest):
3604         * Shared/API/c/mac/WKURLResponseNS.mm:
3605         (WKURLResponseCreateWithNSURLResponse):
3606         * UIProcess/API/C/WKContext.cpp:
3607         (WKContextSetDownloadClient):
3608         * UIProcess/API/C/WKDownload.cpp:
3609         (WKDownloadCopyRequest):
3610         * UIProcess/API/C/WKNavigationDataRef.cpp:
3611         (WKNavigationDataCopyOriginalRequest):
3612         * UIProcess/API/C/WKPage.cpp:
3613         (WKPageSetPagePolicyClient):
3614         (WKPageSetPageUIClient):
3615         * UIProcess/Cocoa/NavigationState.mm:
3616         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
3617         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
3618         (WebKit::WebSoupCustomProtocolRequestManagerClient::startLoading):
3619         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3620         (willSendRequestForFrame):
3621         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
3622         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
3623         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
3624         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
3625
3626 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
3627
3628         [WK2] API::Point, API::Size, API::Rect creation functions should return Ref<>
3629         https://bugs.webkit.org/show_bug.cgi?id=144223
3630
3631         Reviewed by Darin Adler.
3632
3633         Have API::Point, API::Size and API::Rect creation functions return Ref<>.
3634         Call-sites are also updated, using and operating on the returned Ref<> object
3635         where possible.
3636
3637         * Shared/API/APIGeometry.h:
3638         (API::Size::create):
3639         (API::Point::create):
3640         (API::Rect::create):
3641         * Shared/API/c/WKGeometry.cpp:
3642         (WKPointCreate):
3643         (WKSizeCreate):
3644         (WKRectCreate):
3645
3646 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
3647
3648         [WK2] API::Error creation functions should return Ref<>
3649         https://bugs.webkit.org/show_bug.cgi?id=144222
3650
3651         Reviewed by Darin Adler.
3652
3653         Have API::Error creation functions return Ref<>.
3654         The call-sites are also updated, using and operating
3655         on the returned Ref<> object where possible.
3656
3657         * Shared/API/APIError.h:
3658         (API::Error::create):
3659         * Shared/API/c/cf/WKErrorCF.cpp:
3660         (WKErrorCreateWithCFError):
3661         * UIProcess/API/C/WKOriginDataManager.cpp:
3662         (WKOriginDataManagerDeleteEntriesForOrigin):
3663         (WKOriginDataManagerDeleteEntriesModifiedBetweenDates):
3664         (WKOriginDataManagerDeleteAllEntries):
3665         * UIProcess/API/C/WKPage.cpp:
3666         (toGenericCallbackFunction):
3667         (WKPageForceRepaint):
3668         (WKPageValidateCommand):
3669         (WKPageComputePagesForPrinting):
3670         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
3671         (WKPluginSiteDataManagerClearSiteData):
3672         (WKPluginSiteDataManagerClearAllSiteData):
3673         * UIProcess/GenericCallback.h:
3674         (WebKit::toGenericCallbackFunction):
3675         * UIProcess/WebPageProxy.cpp:
3676         (WebKit::WebPageProxy::printFinishedCallback):
3677
3678 2015-04-27  Sungmann Cho  <sungmann.cho@navercorp.com>
3679
3680         [GTK] Remove unnecessary semicolon from WebKitNotificationProvider.h.
3681         https://bugs.webkit.org/show_bug.cgi?id=144312
3682
3683         Reviewed by Martin Robinson.
3684
3685         No new tests, no behavior change.
3686
3687         * UIProcess/API/gtk/WebKitNotificationProvider.h:
3688
3689 2015-04-27  Brent Fulgham  <bfulgham@apple.com>
3690
3691         PDF action menu fixes
3692         https://bugs.webkit.org/show_bug.cgi?id=144299
3693         <rdar://problem/20702215>
3694
3695         Reviewed by Tim Horton.
3696
3697         Make two corrections to how PDFs are handled:
3698         1. When calculating the view rect for the user's selection, make sure
3699         that we get coordinates for the correct PDF page. The existing code assumed
3700         that the current PDFLayerControler's current page was correct, but this will
3701         not be true if you zoom the PDF out so that several pages are displayed at
3702         once. Each selection keeps track of the page it is referenced against.
3703         
3704         2. Revise the offsets calculated for the TextIndicator to take into account
3705         the font descender (as well as the ascender), and to adjust by the scaled
3706         amount of margin around the selected text.
3707
3708         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3709         (WebKit::PDFPlugin::viewRectForSelection): Use correct page for calculating
3710         the coordinates.
3711         * WebProcess/WebPage/mac/WebPageMac.mm:
3712         (WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin): Include font 'descendant'
3713         and (scaled) margin when adjusting the hit target for the TextIndicator to draw.
3714
3715 2015-04-27  Michael Catanzaro  <mcatanzaro@igalia.com>
3716
3717         Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
3718         https://bugs.webkit.org/show_bug.cgi?id=144193
3719
3720         Reviewed by Darin Adler.
3721
3722         * CMakeLists.txt:
3723
3724 2015-04-24  Jon Honeycutt  <jhoneycutt@apple.com>
3725
3726         Context menus are not reshown after an orientation change
3727
3728         <https://bugs.webkit.org/show_bug.cgi?id=144143>
3729         <rdar://problem/20679931>
3730
3731         Reviewed by Darin Adler.
3732
3733         * UIProcess/ios/WKActionSheet.mm:
3734         (-[WKActionSheet updateSheetPosition]):
3735         Return early if we're still in a rotation, not if the rotation is
3736         complete.
3737
3738 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
3739
3740         [WK2] API::Dictionary creation functions should return Ref<>
3741         https://bugs.webkit.org/show_bug.cgi?id=144221
3742
3743         Reviewed by Darin Adler.
3744
3745         Have API::Dictionary creation functions return Ref<>.
3746         The call-sites are also updated, using and operating
3747         on the returned Ref<> object where possible.
3748
3749         * Shared/API/APIDictionary.cpp:
3750         (API::Dictionary::create):
3751         * Shared/API/APIDictionary.h:
3752         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
3753         (createEncodedObject):
3754         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
3755         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
3756         * Shared/API/c/WKDictionary.cpp:
3757         (WKDictionaryCreate):
3758         * Shared/API/c/WKMutableDictionary.cpp:
3759         (WKMutableDictionaryCreate):
3760         * Shared/Plugins/Netscape/PluginInformation.cpp:
3761         (WebKit::createPluginInformationDictionary):
3762         * Shared/Plugins/Netscape/PluginInformation.h:
3763         * UIProcess/API/C/WKPage.cpp:
3764         (WKPageSetPageUIClient):
3765         * UIProcess/API/gtk/WebKitWebContext.cpp:
3766         (webkit_web_context_prefetch_dns):
3767         * UIProcess/API/gtk/WebKitWebView.cpp:
3768         (webkit_web_view_get_snapshot):
3769         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
3770         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
3771         * UIProcess/Plugins/PlugInAutoStartProvider.h:
3772         * UIProcess/StatisticsRequest.cpp:
3773         (WebKit::createDictionaryFromHashMap):
3774         (WebKit::StatisticsRequest::completedRequest):
3775         * UIProcess/WebFormClient.cpp:
3776         (WebKit::WebFormClient::willSubmitForm):
3777         * UIProcess/WebPageProxy.cpp:
3778         (WebKit::WebPageProxy::didFailToInitializePlugin):
3779         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3780         (didInitiateLoadForResource):
3781         (willSendRequestForFrame):
3782         (didReceiveResponseForResource):
3783         (didReceiveContentLengthForResource):
3784         (didFinishLoadForResource):
3785         (didFailLoadForResource):
3786         (webkitWebPageDidReceiveMessage):
3787         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
3788         (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
3789         (WebKit::InjectedBundlePageFormClient::willSubmitForm):
3790
3791 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
3792
3793         [WK2] API::Data creation functions should return Ref<>
3794         https://bugs.webkit.org/show_bug.cgi?id=144220
3795
3796         Reviewed by Darin Adler.
3797
3798         Have API::Data creation functions return Ref<>.
3799         The call-sites are also updated, using and operating
3800         on the returned Ref<> object where possible.
3801
3802         * Shared/API/APIData.h:
3803         (API::Data::createWithoutCopying):
3804         (API::Data::create):
3805         * Shared/API/c/WKData.cpp:
3806         (WKDataCreate):
3807         * Shared/API/c/mac/WKWebArchive.cpp:
3808         (WKWebArchiveCopyData):
3809         * Shared/API/c/mac/WKWebArchiveResource.cpp:
3810         (WKWebArchiveResourceCopyData):
3811         * Shared/APIWebArchive.h:
3812         * Shared/APIWebArchive.mm:
3813         (API::WebArchive::data):
3814         * Shared/APIWebArchiveResource.h:
3815         * Shared/APIWebArchiveResource.mm:
3816         (API::WebArchiveResource::data):
3817         * Shared/Cocoa/APIDataCocoa.mm:
3818         (API::Data::createWithoutCopying):
3819         * UIProcess/API/Cocoa/WKWebView.mm:
3820         (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
3821         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
3822         (webkitURISchemeRequestReadCallback):
3823         * UIProcess/API/gtk/WebKitWebView.cpp:
3824         (webkit_web_view_load_bytes):
3825         * UIProcess/Downloads/DownloadProxy.cpp:
3826         (WebKit::createData):
3827         * UIProcess/WebPageProxy.cpp:
3828         (WebKit::WebPageProxy::dataCallback):
3829         (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder):
3830
3831 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
3832
3833         [WK2] API::URL creation functions should return Ref<>
3834         https://bugs.webkit.org/show_bug.cgi?id=144219
3835
3836         Reviewed by Darin Adler.
3837
3838         Have API::URL creation functions return Ref<>.
3839         The call-sites are also updated, using and operating in the
3840         returned Ref<> object, where possible.
3841
3842         * Shared/API/APIURL.h:
3843         (API::URL::create):
3844         * Shared/API/c/WKSharedAPICast.h:
3845         (WebKit::toCopiedURLAPI):
3846         * Shared/API/c/WKURL.cpp:
3847         (WKURLCreateWithUTF8CString):
3848         (WKURLCreateWithBaseURL):
3849         * UIProcess/API/gtk/WebKitWebResource.cpp:
3850         (webkit_web_resource_get_data):
3851         * UIProcess/WebIconDatabase.cpp:
3852         (WebKit::WebIconDatabase::didChangeIconForPageURL):
3853         (WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):
3854         * WebProcess/WebPage/WebPage.cpp:
3855         (WebKit::WebPage::userAgent):
3856
3857 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
3858
3859         [WK2] API::String creation functions should return Ref<>
3860         https://bugs.webkit.org/show_bug.cgi?id=144218
3861
3862         Reviewed by Darin Adler.
3863
3864         Have API::String creation functions return Ref<>.
3865         The call-sites are also updated, using and operating on the returned
3866         Ref<> object, where possible.
3867
3868         * Shared/API/APIString.h:
3869         * Shared/API/c/WKPluginInformation.cpp:
3870         (WKPluginInformationBundleIdentifierKey):
3871         (WKPluginInformationBundleVersionKey):
3872         (WKPluginInformationBundleShortVersionKey):
3873         (WKPluginInformationPathKey):
3874         (WKPluginInformationDisplayNameKey):
3875         (WKPluginInformationDefaultLoadPolicyKey):
3876         (WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
3877         (WKPluginInformationHasSandboxProfileKey):
3878         (WKPluginInformationFrameURLKey):
3879         (WKPluginInformationMIMETypeKey):
3880         (WKPluginInformationPageURLKey):
3881         (WKPluginInformationPluginspageAttributeURLKey):
3882         (WKPluginInformationPluginURLKey):
3883         (WKPlugInInformationReplacementObscuredKey):
3884         * Shared/API/c/WKSharedAPICast.h:
3885         (WebKit::ProxyingRefPtr::ProxyingRefPtr):
3886         (WebKit::toCopiedAPI):
3887         * Shared/API/c/WKString.cpp:
3888         (WKStringCreateWithUTF8CString):
3889         (WKStringCreateWithJSString):
3890         * UIProcess/API/C/WKDatabaseManager.cpp:
3891         (WKDatabaseManagerGetOriginKey):
3892         (WKDatabaseManagerGetOriginQuotaKey):
3893         (WKDatabaseManagerGetOriginUsageKey):
3894         (WKDatabaseManagerGetDatabaseDetailsKey):
3895         (WKDatabaseManagerGetDatabaseDetailsNameKey):
3896         (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
3897         (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
3898         (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
3899         (WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
3900         (WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
3901         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
3902         (WKKeyValueStorageManagerGetOriginKey):
3903         (WKKeyValueStorageManagerGetCreationTimeKey):
3904         (WKKeyValueStorageManagerGetModificationTimeKey):
3905         * UIProcess/API/C/WKPage.cpp:
3906         (WKPageGetSessionHistoryURLValueType):
3907         (WKPageGetSessionBackForwardListItemValueType):
3908         (toGenericCallbackFunction):
3909         (WKPageValidateCommand):
3910         * UIProcess/WebProcessPool.cpp:
3911         (WebKit::WebProcessPool::didReceiveInvalidMessage):
3912
3913 2015-04-27  Brady Eidson  <beidson@apple.com>
3914
3915         Make 'enum NavigationType' be an enum class
3916         https://bugs.webkit.org/show_bug.cgi?id=144270
3917
3918         Reviewed by Alex Christensen.
3919
3920         * Shared/API/c/WKSharedAPICast.h:
3921         (WebKit::toAPI):
3922         
3923         * Shared/NavigationActionData.cpp:
3924         (WebKit::NavigationActionData::NavigationActionData):
3925         
3926         * UIProcess/API/Cocoa/WKNavigationAction.mm:
3927         (toWKNavigationType):
3928         
3929         * UIProcess/API/gtk/WebKitPrivate.cpp:
3930         (toWebKitNavigationType):
3931         
3932         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3933         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3934         
3935         * WebProcess/WebPage/WebInspector.cpp:
3936         (WebKit::WebInspector::openInNewTab):
3937
3938 2015-04-27  Brent Fulgham  <bfulgham@apple.com>
3939
3940         REGRESSION(r182879): Images and video can no longer be downloaded
3941         https://bugs.webkit.org/show_bug.cgi?id=144267
3942         <rdar://problem/20702844>
3943
3944         Reviewed by Simon Fraser.
3945
3946         * UIProcess/mac/WKActionMenuController.mm:
3947         (-[WKActionMenuController _createActionMenuItemForTag:]): Check for
3948         "!WebCore::protocolIs(..., "file")" for image and media downloads.
3949
3950 2015-04-27  Csaba Osztrogonác  <ossy@webkit.org>
3951
3952         [EFL] TestWebKitAPI's forwarding header generator should depend on WebKit2's generator
3953         https://bugs.webkit.org/show_bug.cgi?id=143874
3954
3955         Reviewed by Gyuyoung Kim.
3956
3957         * PlatformEfl.cmake: Rename the generator to have consistent name with other generators.
3958         * Scripts/generate-forwarding-headers.pl: Removed the unnecessary multiple include-path support.
3959
3960 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
3961
3962         [SOUP] Add initial implementation of NetworkProcess disk cache
3963         https://bugs.webkit.org/show_bug.cgi?id=143872
3964
3965         Reviewed by Martin Robinson.
3966
3967         Implement the platform specific parts of the disk cache
3968         implementation for Soup. It's mainly NetworkCache::Data and
3969         NetworkCache::IOChannel.
3970
3971         * CMakeLists.txt:
3972         * NetworkProcess/cache/NetworkCache.cpp:
3973         (WebKit::NetworkCache::dumpFileChanged):
3974         (WebKit::NetworkCache::Cache::initialize):
3975         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
3976         * NetworkProcess/cache/NetworkCacheData.h:
3977         (WebKit::NetworkCache::Data::soupBuffer):
3978         * NetworkProcess/cache/NetworkCacheDataSoup.cpp: Added.
3979         (WebKit::NetworkCache::Data::Data):
3980         (WebKit::NetworkCache::Data::empty):
3981         (WebKit::NetworkCache::Data::data):
3982         (WebKit::NetworkCache::Data::isNull):
3983         (WebKit::NetworkCache::Data::apply):
3984         (WebKit::NetworkCache::Data::subrange):
3985         (WebKit::NetworkCache::concatenate):
3986         (WebKit::NetworkCache::MapWrapper::~MapWrapper):
3987         (WebKit::NetworkCache::deleteMapWrapper):
3988         (WebKit::NetworkCache::mapFile):
3989         (WebKit::NetworkCache::Data::adoptMap):
3990         (WebKit::NetworkCache::computeSHA1):
3991         (WebKit::NetworkCache::bytesEqual):
3992         * NetworkProcess/cache/NetworkCacheIOChannel.h:
3993         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp: Added.
3994         (WebKit::NetworkCache::IOChannel::IOChannel):
3995         (WebKit::NetworkCache::IOChannel::open):
3996         (WebKit::NetworkCache::fillDataFromReadBuffer):
3997         (WebKit::NetworkCache::inputStreamReadReadyCallback):
3998         (WebKit::NetworkCache::IOChannel::read):
3999         (WebKit::NetworkCache::IOChannel::readSync):
4000         (WebKit::NetworkCache::outputStreamWriteReadyCallback):
4001         (WebKit::NetworkCache::IOChannel::write):
4002         * NetworkProcess/cache/NetworkCacheStorageSoup.cpp: Removed.
4003         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
4004         * NetworkProcess/soup/NetworkProcessSoup.cpp:
4005         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
4006         (WebKit::NetworkProcess::platformSetCacheModel):
4007         (WebKit::NetworkProcess::clearDiskCache):
4008         * PlatformGTK.cmake:
4009
4010 2015-04-26  Yusuke Suzuki  <utatane.tea@gmail.com>
4011
4012         [ES6] Implement ES6 template literals
4013         https://bugs.webkit.org/show_bug.cgi?id=142691
4014
4015         Reviewed by Darin Adler.
4016
4017         Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
4018
4019         * Configurations/FeatureDefines.xcconfig:
4020
4021 2015-04-26  Sungmann Cho  <sungmann.cho@navercorp.com>
4022
4023         Remove PluginView::renderer().
4024         https://bugs.webkit.org/show_bug.cgi?id=144216
4025
4026         Reviewed by Darin Adler.
4027
4028         Nobody should have to know about the plug-in view's renderer except the plug-in view itself.
4029
4030         No new tests, no behavior change.
4031
4032         * WebProcess/Plugins/PDF/PDFPlugin.mm:
4033         (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
4034         (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
4035         * WebProcess/Plugins/PluginView.cpp:
4036         (WebKit::PluginView::renderer): Deleted.
4037         * WebProcess/Plugins/PluginView.h:
4038
4039 2015-04-26  Doug Russell  <d_russell@apple.com>
4040
4041         AX: richer text change notifications (142719)
4042         https://bugs.webkit.org/show_bug.cgi?id=142719
4043
4044         Reviewed by Darin Adler.
4045
4046         Richer accessibility value change notifications. Introduce AXTextEditType,
4047         postTextStateChangeNotification and postTextReplacementNotification to give assistive
4048         tech apps more reliable context for responding to changes in web content. Also implement
4049         a mechanism to post value changes in password form fields in coalesced ticks to thwart
4050         analyzing the cadence of changes.
4051
4052         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
4053         and an overload of postTextReplacementNotification to give assistive tech apps more
4054         reliable context for responding to changes in web content selection. Also block posting
4055         selection changes on password fields.
4056
4057         * UIProcess/WebEditCommandProxy.cpp:
4058         (WebKit::WebEditCommandProxy::nameForEditAction):
4059
4060 2015-04-26  Dan Bernstein  <mitz@apple.com>
4061
4062         <rdar://problem/20702337> REGRESSION (r182952): Plug-in service fails to load because it links against WebKit2.framework
4063         https://bugs.webkit.org/show_bug.cgi?id=144233
4064
4065         Reviewed by Simon Fraser.
4066
4067         Have the plug-in service link against WebKit.framework rather than WebKit2.framework.
4068
4069         * Configurations/PluginService.32.xcconfig: Removed linker flags for linking against WebKit2
4070         and Foundation from the definition of OTHER_LDFLAGS. Since linking is no longer conditional,
4071         we can just do it in the target’s Link Binary With Libraries build phase.
4072
4073         * Configurations/PluginService.64.xcconfig: Ditto.
4074
4075         * WebKit2.xcodeproj/project.pbxproj: Have Foundation and WebKit listed in the services’ Link
4076         Binariy With Libraries build phases (one service already had WebKit).
4077
4078 2015-04-26  Dan Bernstein  <mitz@apple.com>
4079
4080         Fixed the build.
4081
4082         * UIProcess/ios/forms/WKFileUploadPanel.mm:
4083         (-[WKFileUploadPanel _showDocumentPickerMenu]): Suppressed deprecation warnings around use
4084         of -[UIDocumentMenuViewController _setIgnoreApplicationEntitlementForImport:].
4085
4086 2015-04-25  Tim Horton  <timothy_horton@apple.com>
4087
4088         Further update gesture swipe shadow style
4089         https://bugs.webkit.org/show_bug.cgi?id=144215
4090         <rdar://problem/19295843>
4091
4092         Reviewed by Dan Bernstein.