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