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