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