[WK2] Make the WebNetworkInfoManager a supplement to the WebProcess
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-05-08  Zan Dobersek  <zdobersek@igalia.com>
2
3         [WK2] Make the WebNetworkInfoManager a supplement to the WebProcess
4         https://bugs.webkit.org/show_bug.cgi?id=115716
5
6         Reviewed by Andreas Kling.
7
8         WebNetworkInfoManager should inherit from WebProcessSupplement and should be used
9         as such by the WebProcess. This removes the need for the m_networkInfoManager member
10         variable in the WebProcess class and brings the WebNetworkInfoManager in line with
11         other manager classes of which instances are controlled by the WebProcess class.
12
13         * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp:
14         (WebKit::WebNetworkInfoManager::supplementName): Specify the supplement's name.
15         (WebKit):
16         * WebProcess/NetworkInfo/WebNetworkInfoManager.h:
17         (WebKit): Alphabetically reorder the two forwarding declarations.
18         (WebNetworkInfoManager): Inherit from the WebProcessSupplement interface.
19         * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp:
20         (WebKit::WebNetworkInfoClient::bandwidth): Access the WebNetworkInfoManager as a supplement.
21         (WebKit::WebNetworkInfoClient::metered): Ditto.
22         (WebKit::WebNetworkInfoClient::startUpdating): Ditto.
23         (WebKit::WebNetworkInfoClient::stopUpdating): Ditto.
24         (WebKit::WebNetworkInfoClient::networkInfoControllerDestroyed): Ditto.
25         * WebProcess/WebProcess.cpp:
26         (WebKit::WebProcess::WebProcess): Add the WebNetworkInfoManager instance as a supplement.
27         * WebProcess/WebProcess.h:
28         (WebProcess): Remove the m_networkInfoManager member variable and its getter method.
29
30 2013-05-08  Zan Dobersek  <zdobersek@igalia.com>
31
32         [WK2] Make the WebBatteryManager a supplement to the WebProcess
33         https://bugs.webkit.org/show_bug.cgi?id=115715
34
35         Reviewed by Andreas Kling.
36
37         WebBatteryManager should inherit from WebProcessSupplement and should be used as such
38         by the WebProcess. This removes the need for the m_batteryManager member variable in
39         the WebProcess class and brings the WebBatteryManager in line with other manager classes
40         of which instances are controlled by the WebProcess class.
41
42         * WebProcess/Battery/WebBatteryManager.cpp:
43         (WebKit::WebBatteryManager::supplementName): Specify the supplement's name.
44         (WebKit):
45         * WebProcess/Battery/WebBatteryManager.h:
46         (WebBatteryManager): Inherit from the WebProcessSupplement interface.
47         * WebProcess/WebCoreSupport/WebBatteryClient.cpp:
48         (WebKit::WebBatteryClient::startUpdating): Access the WebBatteryManager as a supplement.
49         (WebKit::WebBatteryClient::stopUpdating): Ditto.
50         (WebKit::WebBatteryClient::batteryControllerDestroyed): Ditto.
51         * WebProcess/WebProcess.cpp:
52         (WebKit::WebProcess::WebProcess): Add the WebBatteryManager instance as a supplement.
53         * WebProcess/WebProcess.h:
54         (WebProcess): Remove the m_batteryManager member variable and its getter method.
55
56 2013-05-06  Darin Adler  <darin@apple.com>
57
58         Use adoptCF and adoptNS in more places
59         https://bugs.webkit.org/show_bug.cgi?id=115657
60
61         Reviewed by Sam Weinig.
62
63         * Shared/Downloads/cfnet/DownloadCFNet.cpp:
64         (WebKit::Download::useCredential):
65         (WebKit::Download::start):
66         (WebKit::Download::startWithHandle):
67         (WebKit::Download::cancel):
68         (WebKit::Download::didDecideDestination):
69         Use adoptCF and adoptNS.
70
71 2013-05-06  Sam Weinig  <sam@webkit.org>
72
73         Add SPI to get an array of all the installed plug-ins
74         https://bugs.webkit.org/show_bug.cgi?id=115688
75
76         Reviewed by Anders Carlsson.
77
78         * UIProcess/API/C/mac/WKContextPrivateMac.h:
79         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
80         (createInfoDictionary):
81         Extract creation of info dictionary into helper.
82         (WKContextCopyPlugInInfoForBundleIdentifier):
83         Modified to use the new helper.
84         (WKContextGetInfoForInstalledPlugIns):
85         Added.
86
87 2013-05-07  Anders Carlsson  <andersca@apple.com>
88
89         Clean up KeyframeValueList and related classes
90         https://bugs.webkit.org/show_bug.cgi?id=115738
91
92         Reviewed by Simon Fraser.
93
94         Update for WebCore changes.
95
96         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
97         (CoreIPC::::decode):
98
99 2013-05-07  Anders Carlsson  <andersca@apple.com>
100
101         Add and remove databases and origins from the database tracker
102         https://bugs.webkit.org/show_bug.cgi?id=115752
103
104         Reviewed by Andreas Kling.
105
106         * UIProcess/Storage/LocalStorageDatabase.cpp:
107         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
108         Rename m_databaseFilename to m_databasePath.
109
110         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
111         Rename m_databaseFilename to m_databasePath.
112
113         * UIProcess/Storage/LocalStorageDatabase.h:
114         Rename m_databaseFilename to m_databasePath.
115
116         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
117         (WebKit::LocalStorageDatabaseTracker::databasePath):
118         Rename databaseFilename to databasePath.
119
120         (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
121         Call addDatabaseWithOriginIdentifier.
122
123         (WebKit::LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin):
124         Call removeDatabaseWithOriginIdentifier.
125
126         (WebKit::LocalStorageDatabaseTracker::trackerDatabasePath):
127         Call databasePath instead of databaseFile.
128
129         (WebKit::LocalStorageDatabaseTracker::openTrackerDatabase):
130         Bail if the database is already open.
131
132         (WebKit::LocalStorageDatabaseTracker::updateTrackerDatabaseFromLocalStorageDatabaseFiles):
133         Call addDatabaseWithOriginIdentifier if this is an origin we don't know about.
134
135         (WebKit::LocalStorageDatabaseTracker::addDatabaseWithOriginIdentifier):
136         Add the database to the Origins table.
137
138         (WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):
139         remove the database from the Origins table and delete it.
140
141         (WebKit::LocalStorageDatabaseTracker::pathForDatabaseWithOriginIdentifier):
142         Helper function that looks up a database path given its identifier.
143         
144         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
145         Rename databaseFile to databasePath.
146
147 2013-05-07  Anders Carlsson  <andersca@apple.com>
148
149         The storage database tracker should know when databases come and go
150         https://bugs.webkit.org/show_bug.cgi?id=115748
151
152         Reviewed by Andreas Kling.
153
154         * UIProcess/Storage/LocalStorageDatabase.cpp:
155         (WebKit::LocalStorageDatabase::openDatabase):
156         If we've opened the database successfully, call LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin.
157
158         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
159         Remove a FIXME; we run all storage related things on the same thread.
160
161         (WebKit::LocalStorageDatabase::close):
162         Close the database. If it's empty, call LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin.
163
164         (WebKit::LocalStorageDatabase::databaseIsEmpty):
165         Helper function for determining whether a database is empty.
166         
167         * UIProcess/Storage/LocalStorageDatabase.h:
168         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
169         (WebKit::LocalStorageDatabaseTracker::databaseFilename):
170         Add ".localstorage" to the filename.
171
172         (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
173         (WebKit::LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin):
174         Add empty stubs.
175
176 2013-05-07  Brady Eidson  <beidson@apple.com>
177
178         Add JoinExistingSession to the Networking XPC.
179         <rdar://problem/12902288> and https://bugs.webkit.org/show_bug.cgi?id=114991
180
181         Reviewed by Sam Weinig.
182
183         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist:
184         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist:
185
186 2013-05-07  Anders Carlsson  <andersca@apple.com>
187
188         REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
189         https://bugs.webkit.org/show_bug.cgi?id=115711
190
191         Reviewed by Andreas Kling.
192
193         Handle setting the local storage directory more than once.
194
195         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
196         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
197         Close the database (if necessary) and clear the origins map before importing the origin identifiers.
198
199 2013-05-07  Antoine Quint  <graouts@apple.com>
200
201         Re-establish autostart timeout extension on user interaction
202         https://bugs.webkit.org/show_bug.cgi?id=113232
203
204         Change WebProcess::pluginDidReceiveUserInteraction to use a tuple of
205         (pluginOrigin, pageOrigin, mimeType) arguments like the other similar
206         WebProcess methods and gather these arguments from the PlugInView's
207         plug-in element.
208
209         Reviewed by Dean Jackson.
210
211         * WebProcess/Plugins/PluginView.cpp:
212         (WebKit::PluginView::pluginDidReceiveUserInteraction):
213         Cast the m_pluginElement to a HTMLPlugInImageElement so we can obtain the
214         tuple of (pluginOrigin, pageOrigin, mimeType) to pass to pluginDidReceiveUserInteraction().
215
216         * WebProcess/WebProcess.cpp:
217         (WebKit::WebProcess::plugInDidReceiveUserInteraction):
218         * WebProcess/WebProcess.h:
219         (WebProcess):
220         Update method signature to a tuple of (pluginOrigin, pageOrigin, mimeType)
221         and obtain the plug-in origin hash from that.
222
223 2013-05-07  Anders Carlsson  <andersca@apple.com>
224
225         Each local storage database should know its origin
226         https://bugs.webkit.org/show_bug.cgi?id=115737
227
228         Reviewed by Andreas Kling.
229
230         Store the security origin in a member variable. It'll be used to communicate database state changes to the tracker.
231
232         * UIProcess/Storage/LocalStorageDatabase.cpp:
233         (WebKit::LocalStorageDatabase::create):
234         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
235         * UIProcess/Storage/LocalStorageDatabase.h:
236         (LocalStorageDatabase):
237
238 2013-05-07  Brady Eidson  <beidson@apple.com>
239
240         Remove some unnecessary soft linking in NetworkProcess. (Take 2)
241         <rdar://problem/13821779> and https://bugs.webkit.org/show_bug.cgi?id=115683
242
243         Reviewed by Dean Jackson and owned by Andreas Kling.
244
245         As a followup to r149651, include the private headers conditionally.
246         Also, fix a bug introduced with r149651 (bool vs CFBooleanRef).
247
248         * NetworkProcess/mac/DiskCacheMonitor.mm:
249         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
250         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
251
252 2013-05-07  Jinwoo Song  <jinwoo7.song@samsung.com>
253
254         [EFL][WK2] Add ewk APIs for setting and getting user agent
255         https://bugs.webkit.org/show_bug.cgi?id=114429
256
257         Reviewed by Andreas Kling.
258
259         Provide ewk_view_user_agent_get/set APIs which wraps WK APIs.
260
261         * UIProcess/API/efl/EwkView.cpp:
262         (EwkView::EwkView):
263         (EwkView::setUserAgent):
264         * UIProcess/API/efl/EwkView.h:
265         (EwkView::userAgent):
266         (EwkView):
267         * UIProcess/API/efl/ewk_view.cpp:
268         (ewk_view_user_agent_get):
269         (ewk_view_user_agent_set):
270         * UIProcess/API/efl/ewk_view.h:
271         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
272         (TEST_F):
273
274 2013-05-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
275
276         HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
277         https://bugs.webkit.org/show_bug.cgi?id=115646
278
279         Reviewed by Darin Adler.
280
281         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
282         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
283         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
284         (WebKit::NetworkResourceLoadScheduler::hostForURL):
285         * Shared/ImmutableDictionary.h:
286         (WebKit::ImmutableDictionary::get):
287         * UIProcess/Storage/StorageManager.cpp:
288         (WebKit::StorageManager::createSessionStorageMap):
289         (WebKit::StorageManager::cloneSessionStorageNamespaceInternal):
290         (WebKit::StorageManager::findStorageArea):
291         * UIProcess/WebContext.h:
292         (WebKit::WebContext::supplement):
293         * UIProcess/WebProcessProxy.cpp:
294         (WebKit::WebProcessProxy::webBackForwardItem):
295         (WebKit::WebProcessProxy::webFrame):
296         * UIProcess/efl/DownloadManagerEfl.cpp:
297         (WebKit::DownloadManagerEfl::ewkDownloadJob):
298         * WebProcess/Network/WebResourceLoadScheduler.h:
299         (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier):
300         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
301         (WebKit::NetscapePlugin::streamFromID):
302         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
303         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
304         * WebProcess/Plugins/PluginView.cpp:
305         (WebKit::PluginView::cancelStreamLoad):
306         * WebProcess/WebPage/EventDispatcher.cpp:
307         (WebKit::EventDispatcher::wheelEvent):
308         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
309         (WebKit::WebBackForwardListProxy::itemForID):
310         (WebKit::WebBackForwardListProxy::itemAtIndex):
311         * WebProcess/WebPage/WebPage.cpp:
312         (WebKit::WebPage::webUndoStep):
313         (WebKit::WebPage::didFinishCheckingText):
314         (WebKit::WebPage::didCancelCheckingText):
315         * WebProcess/WebProcess.cpp:
316         (WebKit::WebProcess::webPage):
317         (WebKit::WebProcess::webPageGroup):
318             Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
319
320 2013-05-06  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
321
322         [Qt] Unreviewed buildfix after r149637.
323
324         * Target.pri:
325
326 2013-05-06  Ryosuke Niwa  <rniwa@webkit.org>
327
328         REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
329         https://bugs.webkit.org/show_bug.cgi?id=115711    
330
331         Rubber-stamped by Anders Carlsson.
332
333         Temporarily removed the assertion. Andres is going to investigate it tomorrow.
334
335         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
336         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
337
338 2013-05-06  Darin Adler  <darin@apple.com>
339
340         Use OwnPtr instead of deleteAllValues in KeyframeValueList
341         https://bugs.webkit.org/show_bug.cgi?id=115652
342
343         Reviewed by Simon Fraser.
344
345         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
346         (CoreIPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Added adoptPtr
347         next to new when calling KeyframeValueList::insert.
348
349 2013-05-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
350
351         Unreviewed, build fix on EFL port
352
353         * CMakeLists.txt: Add LocalStorageDatabaseTracker.cpp
354
355 2013-05-06  Philippe Normand  <pnormand@igalia.com>
356
357         Unreviewed, GTK build fix after r149637.
358
359         * GNUmakefile.list.am: Add LocalStorageDatabaseTracker sources to
360         the build.
361
362 2013-05-06  Brady Eidson  <beidson@apple.com>
363
364         Remove some unnecessary soft linking in NetworkProcess.
365         <rdar://problem/13821779> and https://bugs.webkit.org/show_bug.cgi?id=115683
366
367         Reviewed by Sam Weinig.
368
369         Replace some unneeded soft linking with forward declarations.
370
371         * NetworkProcess/mac/DiskCacheMonitor.mm:
372         (WebKit::DiskCacheMonitor::DiskCacheMonitor):
373         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
374         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse):
375         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
376
377 2013-05-06  Anders Carlsson  <andersca@apple.com>
378
379         More work on LocalStorageDatabaseTracker
380         https://bugs.webkit.org/show_bug.cgi?id=115680
381
382         Reviewed by Andreas Kling.
383
384         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
385         (WebKit::LocalStorageDatabaseTracker::databaseFilename):
386         Call the new databaseFilename that takes a string.
387
388         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
389         Assert that we don't call this more than once. Dispatch a call to import origin identifiers.
390
391         (WebKit::LocalStorageDatabaseTracker::trackerDatabasePath):
392         New helper function that returns the tracker database path.
393
394         (WebKit::LocalStorageDatabaseTracker::openTrackerDatabase):
395         Open the database and create the Origins table if needed.
396
397         (WebKit::LocalStorageDatabaseTracker::importOriginIdentifiers):
398         Open the database and import the origin identifiers from it, then synchronize it with whatever files are on disk.
399
400         (WebKit::LocalStorageDatabaseTracker::updateTrackerDatabaseFromLocalStorageDatabaseFiles):
401         Bring the tracker database up to date from the database files on disk.
402
403         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
404         (LocalStorageDatabaseTracker):
405
406 2013-05-06  Alexey Proskuryakov  <ap@apple.com>
407
408         <rdar://problem/13479806> [Mac] Pass information about open pages to LaunchServices
409         https://bugs.webkit.org/show_bug.cgi?id=115665
410
411         Reviewed by Darin Adler.
412
413         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didCommitLoad): Moved repeated
414         check for frame->isMainFrame() to the top, matching oter similar functions.
415         Call updateActivePages().
416
417         * WebProcess/WebProcess.cpp:
418         (WebKit::WebProcess::networkProcessConnectionClosed): Removed an obsolete FIXME.
419         (WebKit::WebProcess::updateActivePages): Empty implementation for platforms
420         that don't need to do anything here.
421
422         * WebProcess/WebProcess.h: Added updateActivePages().
423
424         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::updateActivePages):
425         Collect user visible origins of pages in the process and pass them to LS.
426
427 2013-05-06  Mark Rowe  <mrowe@apple.com>
428
429         <rdar://problem/13775921> Switch off a deprecated API.
430
431         Reviewed by Oliver Hunt.
432
433         * Shared/mac/ChildProcessMac.mm:
434         (WebKit::ChildProcess::setProcessSuppressionEnabled): When disabling process suppression,
435         begin an activity that doesn't disable idle sleep, sudden termination or automatic termination.
436         When enabling process suppression, end the activity.
437
438 2013-05-06  Anders Carlsson  <andersca@apple.com>
439
440         Move local storage directory handling to LocalStorageDatabaseTracker
441         https://bugs.webkit.org/show_bug.cgi?id=115676
442
443         Reviewed by Andreas Kling.
444
445         * UIProcess/Storage/LocalStorageDatabase.cpp:
446         (WebKit::LocalStorageDatabase::create):
447         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
448         * UIProcess/Storage/LocalStorageDatabase.h:
449         (WebCore):
450         (LocalStorageDatabase):
451         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
452         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory):
453         (WebKit):
454         (WebKit::LocalStorageDatabaseTracker::databaseFilename):
455         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
456         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
457         (WebCore):
458         (LocalStorageDatabaseTracker):
459         * UIProcess/Storage/StorageManager.cpp:
460         (WebKit::StorageManager::StorageArea::StorageArea):
461         (WebKit::StorageManager::setLocalStorageDirectory):
462         * UIProcess/Storage/StorageManager.h:
463         (StorageManager):
464
465 2013-05-06  Manuel Rego Casasnovas  <rego@igalia.com>
466
467         [GTK] Add webkit_uri_scheme_request_finish_error
468         https://bugs.webkit.org/show_bug.cgi?id=94316
469
470         Reviewed by Anders Carlsson.
471
472         This new method will allow to finish WebKitURISchemeRequest with a
473         GError that will be passed to the WebKitWebView through the
474         "load-failed" signal.
475
476         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
477         (webkit_uri_scheme_request_finish_error): Implement new method using
478         WebSoupRequestManagerProxy::didFailURIRequest().
479         * UIProcess/API/gtk/WebKitURISchemeRequest.h: Add new method header.
480         * UIProcess/API/gtk/WebKitWebContext.cpp: Include the usage of the new
481         method in the code example at webkit_web_context_register_uri_scheme()
482         documentation.
483         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the new
484         method.
485         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
486         (loadFailedCallback): Set m_error to monitor it from the tests.
487         (LoadTrackingTest::loadURI): Clear m_error before each load.
488         (LoadTrackingTest::loadHtml): Ditto.
489         (LoadTrackingTest::loadPlainText): Ditto.
490         (LoadTrackingTest::loadRequest): Ditto.
491         (LoadTrackingTest::reload): Ditto.
492         (LoadTrackingTest::goBack): Ditto.
493         (LoadTrackingTest::goForward): Ditto.
494         * UIProcess/API/gtk/tests/LoadTrackingTest.h: Add new member m_error.
495         * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
496         (testWebContextURIScheme): Modify test to check the behavior of the new
497         method.
498         * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
499         (WebKit::WebSoupRequestManagerProxy::didFailURIRequest):
500         (WebKit): Implement new method using
501         WebSoupRequestManager::DidFailURIRequest().
502         * UIProcess/soup/WebSoupRequestManagerProxy.h:
503         (WebSoupRequestManagerProxy): Add new method header.
504         * WebProcess/soup/WebSoupRequestManager.cpp:
505         (WebKit):
506         (WebKit::WebSoupRequestManager::didFailURIRequest): Implement new method
507         setting the error and completing the request.
508         * WebProcess/soup/WebSoupRequestManager.h:
509         (WebSoupRequestManager): Add new method header.
510         * WebProcess/soup/WebSoupRequestManager.messages.in: Add new method
511         signature.
512
513 2013-05-06  Anders Carlsson  <andersca@apple.com>
514
515         Every LocalStorageDatabase should know about its tracker
516         https://bugs.webkit.org/show_bug.cgi?id=115673
517
518         Reviewed by Andreas Kling.
519
520         * UIProcess/Storage/LocalStorageDatabase.cpp:
521         (WebKit::LocalStorageDatabase::create):
522         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
523         * UIProcess/Storage/LocalStorageDatabase.h:
524         * UIProcess/Storage/StorageManager.cpp:
525         (WebKit::StorageManager::StorageArea::StorageArea):
526
527 2013-05-06  Anders Carlsson  <andersca@apple.com>
528
529         Add LocalStorageDatabaseTracker class
530         https://bugs.webkit.org/show_bug.cgi?id=115671
531
532         Reviewed by Andreas Kling.
533
534         Somewhat unsurprisingly, this class will be used for tracking local storage databases.
535
536         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: Added.
537         (WebKit::LocalStorageDatabaseTracker::create):
538         (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
539         (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
540         * UIProcess/Storage/LocalStorageDatabaseTracker.h: Added.
541         (LocalStorageDatabaseTracker):
542         
543         * UIProcess/Storage/StorageManager.cpp:
544         (WebKit::StorageManager::StorageManager):
545         Create a local storage database tracker.
546
547         * WebKit2.xcodeproj/project.pbxproj:
548         Add new files.
549
550 2013-05-06  Anders Carlsson  <andersca@apple.com>
551
552         Handle closing the local storage database
553         https://bugs.webkit.org/show_bug.cgi?id=115669
554
555         Reviewed by Beth Dakin.
556
557         * UIProcess/Storage/LocalStorageDatabase.cpp:
558         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
559         Initialize m_isClosed.
560     
561         (WebKit::LocalStorageDatabase::~LocalStorageDatabase):
562         Assert that m_isClosed is false.
563
564         (WebKit::LocalStorageDatabase::close):
565         Set m_isClosed to true and write any pending changes to disk.
566
567         (WebKit::LocalStorageDatabase::updateDatabase):
568         Compute the changed items and pass them to updateDatabaseWithChangedItems.
569
570         (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
571         Split out the code that actually writes to the database from updateDatabase and into this function.
572
573         * UIProcess/Storage/LocalStorageDatabase.h:
574         * UIProcess/Storage/StorageManager.cpp:
575         (WebKit::StorageManager::StorageArea::~StorageArea):
576         Call close().
577
578 2013-05-06  Zan Dobersek  <zdobersek@igalia.com>
579
580         [WK2] Make the WebNetworkInfoManagerProxy a supplement to the WebContext
581         https://bugs.webkit.org/show_bug.cgi?id=115654
582
583         Reviewed by Andreas Kling.
584
585         Rather than holding a RefPtr to the WebNetworkInfoManagerProxy object in WebContext, change the WebNetworkInfoManagerProxy
586         to implement the WebContextSupplement interface and handle the object as such in WebContext, simplifying its
587         construction and cleanup, removing the specific RefPtr member variable and its correlating getter method.
588
589         * UIProcess/API/C/WKContext.cpp:
590         (WKContextGetNetworkInfoManager): Retrieve the WebNetworkInfoManagerProxy object from the suppplements of the WebContext.
591         * UIProcess/WebContext.cpp:
592         (WebKit::WebContext::WebContext): Add the WebNetworkInfoManagerProxy object as a supplement instead of assigning it to
593         the now-removed member variable.
594         (WebKit::WebContext::~WebContext): No need for the specific cleanup, the equivalent is achieved when iterating through the
595         supplements vector.
596         (WebKit::WebContext::disconnectProcess): Ditto.
597         * UIProcess/WebContext.h:
598         (WebContext): Remove the WebNetworkInfoManagerProxy RefPtr member variable and its getter method.
599         * UIProcess/WebNetworkInfoManagerProxy.cpp:
600         (WebKit::WebNetworkInfoManagerProxy::supplementName): Specift the supplement's name.
601         (WebKit::WebNetworkInfoManagerProxy::WebNetworkInfoManagerProxy): Initialize as a WebContextSupplement.
602         (WebKit::WebNetworkInfoManagerProxy::providerDidChangeNetworkInformation): Adjust to use the context() method instead of
603         accessing the private m_context directly.
604         (WebKit::WebNetworkInfoManagerProxy::contextDestroyed): Stop updating when invoked.
605         (WebKit::WebNetworkInfoManagerProxy::processDidClose): Ditto.
606         (WebKit::WebNetworkInfoManagerProxy::refWebContextSupplement): Call APIObject::ref.
607         (WebKit::WebNetworkInfoManagerProxy::derefWebContextSupplement): Call APIObject::deref.
608         * UIProcess/WebNetworkInfoManagerProxy.h:
609         (WebNetworkInfoManagerProxy): Inherit from WebContextSupplement, declare the newly-inherited methods.
610
611 2013-05-06  Alexey Proskuryakov  <ap@apple.com>
612
613         <rdar://problem/13479806> [Mac] Pass plug-in bundle ID to LaunchServices
614         https://bugs.webkit.org/show_bug.cgi?id=115483
615
616         Reviewed by Darin Adler.
617
618         * PluginProcess/PluginProcess.h: Added m_pluginBundleIdentifier. We now need it
619         in multiple places, so it's easier to pre-compute it.
620
621         * PluginProcess/mac/PluginProcessMac.mm:
622         (WebKit::loadSandboxProfileForDirectory): Changed to use precomputed bundle ID.
623         (WebKit::loadSandboxProfile): Ditto.
624         (WebKit::PluginProcess::platformInitializeProcess): Pre-compute bundle ID.
625         (WebKit::PluginProcess::initializeProcessName): Pass it to LaunchServices.
626         (WebKit::PluginProcess::initializeSandbox): Pass precomputed bundle ID instead of
627         a path.
628
629 2013-05-06  Anders Carlsson  <andersca@apple.com>
630
631         Handle removeItem and clear in LocalStorageDatabase
632         https://bugs.webkit.org/show_bug.cgi?id=115664
633
634         Reviewed by Darin Adler.
635
636         * UIProcess/Storage/LocalStorageDatabase.cpp:
637         (WebKit::LocalStorageDatabase::removeItem):
638         Call itemDidChange with a null value, indicating that we want to remove this item.
639
640         (WebKit::LocalStorageDatabase::clear):
641         Clear items, set m_shouldClearItems and schedule a database update.
642
643         (WebKit::LocalStorageDatabase::updateDatabase):
644         If m_shouldClearItems is true, clear all items.
645
646         * UIProcess/Storage/StorageManager.cpp:
647         (WebKit::StorageManager::StorageArea::removeItem):
648         Call through to the local storage database.
649
650         (WebKit::StorageManager::StorageArea::clear):
651         Ditto.
652
653 2013-05-06  Anders Carlsson  <andersca@apple.com>
654
655         Write storage changes to disk
656         https://bugs.webkit.org/show_bug.cgi?id=115660
657
658         Reviewed by Andreas Kling.
659
660         * UIProcess/Storage/LocalStorageDatabase.cpp:
661         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
662         Initialize new member variables.
663
664         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
665         Disable database threading checks.
666
667         (WebKit::LocalStorageDatabase::importItems):
668         Only import the items once.
669
670         (WebKit::LocalStorageDatabase::setItem):
671         Call itemDidChange.
672
673         (WebKit::LocalStorageDatabase::itemDidChange):
674         Record the change and schedule a database update.
675
676         (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
677         Use WorkQueue::dispatchAfterDelay to schedule a datbase update.
678
679         (WebKit::LocalStorageDatabase::updateDatabase):
680         Write changes to disk. If there are more than 100 pending items, only write the first 100 and then schedule
681         another database update for the remaining items.
682
683         * UIProcess/Storage/LocalStorageDatabase.h:
684         Add new member variables.
685
686         * UIProcess/Storage/StorageManager.cpp:
687         (WebKit::StorageManager::StorageArea::setItem):
688         Call LocalStorageDatabase::setItem.
689
690 2013-05-06  Zan Dobersek  <zdobersek@igalia.com>
691
692         [WK2] Make the WebBatteryManagerProxy a supplement to the WebContext
693         https://bugs.webkit.org/show_bug.cgi?id=115625
694
695         Reviewed by Andreas Kling.
696
697         Rather than holding a RefPtr to the WebBatteryManagerProxy object in WebContext, change the WebBatteryManagerProxy
698         to implement the WebContextSupplement interface and handle the object as such in WebContext, simplifying its
699         construction and cleanup, removing the specific RefPtr member variable and its correlating getter method.
700
701         * UIProcess/API/C/WKContext.cpp:
702         (WKContextGetBatteryManager): Retrieve the WebBatteryManagerProxy object from the supplements of the WebContext.
703         * UIProcess/WebBatteryManagerProxy.cpp:
704         (WebKit::WebBatteryManagerProxy::supplementName): Specify the supplement's name.
705         (WebKit::WebBatteryManagerProxy::WebBatteryManagerProxy): Initialize as a WebContextSupplementable.
706         (WebKit::WebBatteryManagerProxy::providerDidChangeBatteryStatus): Adjust to use the context() method instead of accessing
707         the private m_context directly.
708         (WebKit::WebBatteryManagerProxy::providerUpdateBatteryStatus): Ditto.
709         (WebKit::WebBatteryManagerProxy::contextDestroyed): Stop updating when invoked.
710         (WebKit::WebBatteryManagerProxy::processDidClose): Ditto.
711         (WebKit::WebBatteryManagerProxy::refWebContextSupplement): Call APIObject::ref.
712         (WebKit::WebBatteryManagerProxy::derefWebContextSupplement): Call APIObject::deref.
713         (WebKit::WebBatteryManagerProxy::startUpdating): Fire up the provider if not yet updating.
714         (WebKit::WebBatteryManagerProxy::stopUpdating): Wind down the provider if updating.
715         * UIProcess/WebBatteryManagerProxy.h:
716         (WebBatteryManagerProxy): Inherit from WebContextSupplement, declare the newly-inherited methods.
717         * UIProcess/WebContext.cpp:
718         (WebKit::WebContext::WebContext): Add the WebBatteryManagerProxy object as a supplement instead of assigning it to
719         the now-removed member variable.
720         (WebKit::WebContext::~WebContext): No need for the specific cleanup, the equivalent is achieved when iterating through the
721         supplements vector.
722         (WebKit::WebContext::disconnectProcess): Ditto.
723         * UIProcess/WebContext.h:
724         (WebContext): Remove the WebBatteryManagerProxy RefPtr member variable and its getter method.
725
726 2013-05-06  Antoine Quint  <graouts@apple.com>
727
728         Manage the presentation of the snapshotted plug-in using JavaScript
729         https://bugs.webkit.org/show_bug.cgi?id=115548
730
731         Reviewed by Dean Jackson.
732
733         Expose a new plugInExtraScript method to support the injection of
734         a JS file from the chrome client to customize the rendering of a
735         snapshotted plug-in's shadow tree. Additionally, it is expected
736         the chrome client will want to provide localized strings taking
737         into account the snapshotted plug-in's mime-type, so we're adding
738         this as a parameter to both plugInStartLabelTitle and
739         plugInStartLabelSubtitle methods.
740
741         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
742         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
743         (WebKit::InjectedBundlePageUIClient::plugInStartLabelTitle):
744         (WebKit::InjectedBundlePageUIClient::plugInStartLabelSubtitle):
745         (WebKit::InjectedBundlePageUIClient::plugInExtraScript):
746         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
747         (InjectedBundlePageUIClient):
748         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
749         (WebKit::WebChromeClient::plugInStartLabelTitle):
750         (WebKit::WebChromeClient::plugInStartLabelSubtitle):
751         (WebKit::WebChromeClient::plugInExtraScript):
752         * WebProcess/WebCoreSupport/WebChromeClient.h:
753         (WebChromeClient):
754
755 2013-05-05  Chris Fleizach  <cfleizach@apple.com>
756
757         WEB SPEECH: deny file-read-data /Library/Speech/Synthesizers
758         https://bugs.webkit.org/show_bug.cgi?id=115621
759
760         Reviewed by Alexey Proskuryakov.
761
762         Allow access to the location where 3rd party speech synthesizers are stored.
763
764         * WebProcess/com.apple.WebProcess.sb.in:
765
766 2013-05-05  Tim Horton  <timothy_horton@apple.com>
767
768         [wk2] Page Overlays: deviceScaleFactor doesn't update when the display changes
769         https://bugs.webkit.org/show_bug.cgi?id=115577
770         <rdar://problem/13762583>
771
772         Reviewed by Darin Adler.
773
774         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
775         (WebKit::TiledCoreAnimationDrawingArea::setDeviceScaleFactor):
776         Invalidate the page overlay layers' device scale factor when
777         TiledCoreAnimationDrawingArea is notified that it has changed.
778
779 2013-05-05  Anders Carlsson  <andersca@apple.com>
780
781         Remove the Vector::append overload that takes a Vector
782         https://bugs.webkit.org/show_bug.cgi?id=115535
783
784         Reviewed by Andreas Kling.
785
786         Use Vector::appendVector instead.
787
788         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
789         (WebKit::NetworkBlobRegistry::registerBlobURL):
790         * NetworkProcess/SchedulableLoader.cpp:
791         (WebKit::SchedulableLoader::SchedulableLoader):
792         * Platform/CoreIPC/Connection.cpp:
793         (CoreIPC::Connection::SyncMessageState::dispatchMessages):
794         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
795         (WebKit::PluginInfoStore::pluginsDirectories):
796
797 2013-05-04  Sam Weinig  <sam@webkit.org>
798
799         Fix * placement in a few functions as noticed by Mark Rowe.
800
801         Rubber-stamped by Dan Bernstein.
802
803         * WebProcess/WebPage/PageBanner.h:
804         (PageBanner):
805         * WebProcess/WebPage/mac/PageBannerMac.mm:
806         (WebKit::PageBanner::create):
807         (WebKit::PageBanner::PageBanner):
808
809 2013-05-04  Sam Weinig  <sam@webkit.org>
810
811         REGRESSION(r148312): Crash when calling WKPageClose(page) followed by WKPageTerminate(page)
812         <rdar://problem/13702008>
813         https://bugs.webkit.org/show_bug.cgi?id=115607
814
815         Reviewed by Benjamin Poulain.
816
817         API Test: WebKit2.CloseThenTerminate
818
819         * UIProcess/WebPageProxy.cpp:
820         (WebKit::WebPageProxy::resetStateAfterProcessExited):
821         Don't try to reset the state if the page is closed, it won't work and its not worth it.
822
823 2013-05-04  Beth Dakin  <bdakin@apple.com>
824
825         https://bugs.webkit.org/show_bug.cgi?id=115574
826         Crash using new WKBundlePageSetHeaderBanner() API to set a banner to null
827
828         Reviewed by Darin Adler.
829
830         Don't call addToPage() on a null banner.
831         * WebProcess/WebPage/WebPage.cpp:
832         (WebKit::WebPage::setHeaderPageBanner):
833         (WebKit::WebPage::setFooterPageBanner):
834
835 2013-05-03  Alexey Proskuryakov  <ap@apple.com>
836
837         <rdar://problem/13806836> Tweak sandbox profile.
838
839         Reviewed by Dan Bernstein.
840
841         * WebProcess/com.apple.WebProcess.sb.in:
842
843 2013-05-03  Tim Horton  <timothy_horton@apple.com>
844
845         PDFPlugin: Changes being made to active annotation aren't saved when the PDF is exported
846         https://bugs.webkit.org/show_bug.cgi?id=115544
847         <rdar://problem/13801789>
848
849         Reviewed by Alexey Proskuryakov.
850
851         Commit changes to the active annotation (if there is one) before
852         returning the live PDF data, so that said changes are represented
853         in the exported or printed output.
854
855         * WebProcess/Plugins/PDF/PDFPlugin.h: Override liveData.
856         * WebProcess/Plugins/PDF/PDFPlugin.mm:
857         (WebKit::PDFPlugin::liveData): Commit the active annotation if there is one.
858         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
859         (SimplePDFPlugin): Make liveData virtual.
860
861 2013-05-03  Tim Horton  <timothy_horton@apple.com>
862
863         Web process crashes at WebPage::determinePrimarySnapshottedPlugInTimerFired + 8
864         https://bugs.webkit.org/show_bug.cgi?id=115056
865         <rdar://problem/13719543>
866
867         Reviewed by Simon Fraser.
868
869         Null-check m_page. In theory, we shouldn't get here, because we stop
870         the timer at the only point where m_page is cleared, but crash logs say
871         we're still crashing here.
872
873         * WebProcess/WebPage/WebPage.cpp:
874         (WebKit::WebPage::determinePrimarySnapshottedPlugInTimerFired):
875
876 2013-05-03  Tim Horton  <timothy_horton@apple.com>
877
878         Remove some "what" comments from FindController
879         https://bugs.webkit.org/show_bug.cgi?id=115546
880
881         Reviewed by Andreas Kling.
882
883         * WebProcess/WebPage/FindController.cpp:
884         (WebKit::FindController::countStringMatches):
885         (WebKit::FindController::updateFindUIAfterPageScroll):
886         (WebKit::FindController::willMoveToWebPage):
887         (WebKit::FindController::mouseEvent):
888         Remove or reword some comments.
889
890 2013-05-02  Andy Estes  <aestes@apple.com>
891
892         [WK2][CustomProtocols] NSURLProtocolClient methods should be dispatched on NSURLConnection's resource loader run loop
893         https://bugs.webkit.org/show_bug.cgi?id=115539
894
895         Reviewed by Alexey Proskuryakov.
896
897         It turns out that calling NSURLProtocolClient methods from a different
898         thread than the one running the NSURLConnection run loop is unsafe.
899         Although I can't capture it reliably in a test case, doing so can
900         sometimes result in a load timing out because the call to
901         -[NSURLProtocolClient URLProtocolDidFinishLoading:] was ignored by
902         NSURLConnection.
903
904         Fix this by dispatching these methods on the NSURLConnection resource
905         load run loop. This matches where NSURLProtocolClient methods are
906         dispatched by typical NSURLProtocol implementations, and in my testing
907         this solves the timeout issue.
908
909         * Shared/Network/CustomProtocols/CustomProtocolManager.h: Declare
910         dispatchOnResourceLoaderRunLoop().
911         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
912         Declare +[NSURLConnection resourceLoaderRunLoop] on a category of
913         NSURLConnection. Also include the header that declares it if it's present.
914         (WebKit::CustomProtocolManager::didFailWithError): Call the
915         NSURLProtocolClient method via dispatchOnResourceLoaderRunLoop().
916         (WebKit::CustomProtocolManager::didLoadData): Ditto.
917         (WebKit::CustomProtocolManager::didReceiveResponse): Ditto.
918         (WebKit::CustomProtocolManager::didFinishLoading): Ditto.
919         (WebKit::CustomProtocolManager::dispatchOnResourceLoaderRunLoop):
920         Dispatch a block on the NSURLConnection resource loader run loop and
921         then wake up the run loop.
922
923 2013-05-02  Brady Eidson  <beidson@apple.com>
924
925         REGRESSION (149389) Main resources converted to downloads are immediately cancelled.
926         <rdar://problem/13795795> and https://bugs.webkit.org/show_bug.cgi?id=115530
927
928         Reviewed by Alexey Proskuryakov.
929
930         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
931         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Call didConvertHandleToDownload
932           on the NetworkResourceLoader.
933
934         * NetworkProcess/NetworkResourceLoader.cpp:
935         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
936         (WebKit::NetworkResourceLoader::didConvertHandleToDownload): Set m_handleConvertedToDownload to true.
937         (WebKit::NetworkResourceLoader::abort): Only cancel the handle if m_handleConvertedToDownload is false.
938         * NetworkProcess/NetworkResourceLoader.h:
939
940 2013-05-02  Alexey Proskuryakov  <ap@apple.com>
941
942         <rdar://problem/13740375> Non-ASCII downloaded file names are garbled when using NetworkProcess
943         https://bugs.webkit.org/show_bug.cgi?id=115520
944
945         Reviewed by Darin Adler.
946
947         * Shared/mac/WebCoreArgumentCodersMac.mm:
948         (CoreIPC::::encodePlatformData):
949         (CoreIPC::::decodePlatformData):
950         Send the encoding fallback array over IPC, so that it's present when NetworkProcess does its loading.
951
952 2013-05-01  Alexey Proskuryakov  <ap@apple.com>
953
954         REGRESSION (r149422): -[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]
955         broken when second argument is nil
956         https://bugs.webkit.org/show_bug.cgi?id=115505
957         <rdar://problem/13787297>
958
959         Reviewed by Darin Adler.
960
961         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile): Pass a URL string
962         to assumeReadAccessToBaseURL, as this is what it takes.
963
964 2013-05-01  Ryosuke Niwa  <rniwa@webkit.org>
965
966         [Mac] WebKit doesn't enable or disable autocorrections when system preferences are changed
967         https://bugs.webkit.org/show_bug.cgi?id=115463
968
969         Reviewed by Darin Adler.
970
971         Observe the default notification center and propagate the changes to TextCheckerState and
972         to all WebProcesses when system preferences are updated.
973
974         * UIProcess/TextChecker.h:
975         * UIProcess/WebContext.h:
976         * UIProcess/mac/TextCheckerMac.mm:
977         (WebKit::shouldAutomaticTextReplacementBeEnabled):
978         (WebKit::shouldAutomaticSpellingCorrectionBeEnabled):
979         (WebKit::shouldAutomaticQuoteSubstitutionBeEnabled):
980         (WebKit::shouldAutomaticDashSubstitutionBeEnabled):
981         (WebKit::initializeState):
982         (WebKit::TextChecker::didChangeAutomaticTextReplacementEnabled):
983         (WebKit::TextChecker::didChangeAutomaticSpellingCorrectionEnabled):
984         (WebKit::TextChecker::didChangeAutomaticQuoteSubstitutionEnabled):
985         (WebKit::TextChecker::didChangeAutomaticDashSubstitutionEnabled):
986         * UIProcess/mac/WebContextMac.mm:
987         (WebKit::WebContext::registerNotificationObservers):
988         (WebKit::WebContext::unregisterNotificationObservers):
989
990 2013-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
991
992         [GTK] Fix build break after r149449
993         https://bugs.webkit.org/show_bug.cgi?id=115500
994
995         Reviewed by Gustavo Noronha Silva.
996
997         Unreviewed GTK build fix
998
999         * GNUmakefile.list.am: Added LocalStorageDatabase.[cpp|h] to the list of
1000         sources.
1001
1002 2013-05-01  Martin Robinson  <mrobinson@igalia.com>
1003
1004         [GTK] [WebKit2] Documentation for webkit_web_view_run_javascript should indicate what happens when JavaScript is disabled
1005         https://bugs.webkit.org/show_bug.cgi?id=115492
1006
1007         Reviewed by Xan Lopez.
1008
1009         * UIProcess/API/gtk/WebKitWebView.cpp: Clarify the documentation.
1010
1011 2013-05-01  Tim Horton  <timothy_horton@apple.com>
1012
1013         Move knowledge of PDF/PostScript MIME types into MIMETypeRegistry
1014         https://bugs.webkit.org/show_bug.cgi?id=115487
1015
1016         Reviewed by Darin Adler.
1017
1018         * UIProcess/WebContext.cpp:
1019         * UIProcess/WebContext.h:
1020         Remove pdfAndPostScriptMIMETypes.
1021
1022         * UIProcess/WebFrameProxy.cpp:
1023         (WebKit::WebFrameProxy::canShowMIMEType): Move PDF bits to WebPageProxy.
1024         (WebKit::WebFrameProxy::isDisplayingPDFDocument):
1025         Make use of WebCore's newfound knowledge of PDF and PostScript MIME types,
1026         so we don't have to duplicate it unnecessarily in WebKit2.
1027
1028         * UIProcess/WebPageProxy.cpp:
1029         (WebKit::WebPageProxy::canShowMIMEType):
1030         Add code which used to be in WebFrameProxy::canShowMIMEType, and adapt it
1031         to use WebCore's knowledge of PDF and PostScript MIME types.
1032
1033         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
1034         (WebKit::SimplePDFPlugin::pluginInfo):
1035         We previously supported the "text/pdf" MIME type for PDFViewController,
1036         so SimplePDFPlugin and PDFPlugin should support it as well.
1037
1038         * WebProcess/WebPage/WebPage.cpp:
1039         (WebKit::WebPage::createPlugin):
1040         Adopt MIMETypeRegistry::isPDFOrPostScriptMIMEType.
1041
1042         * WebProcess/WebPage/WebPage.h:
1043         (WebPage):
1044         Remove pdfAndPostScriptMIMETypes.
1045
1046         * WebProcess/WebPage/mac/WebPageMac.mm:
1047         (WebKit::WebPage::platformPreferencesDidChange):
1048         Adopt getPDFAndPostScriptMIMETypes instead of duplicating the list in WebKit2.
1049
1050 2013-05-01  Anders Carlsson  <andersca@apple.com>
1051
1052         Implement LocalStorageDatabase::importItems
1053         https://bugs.webkit.org/show_bug.cgi?id=115493
1054
1055         Reviewed by Andreas Kling.
1056
1057         Fetch items and insert them in the storage map.
1058         * UIProcess/Storage/LocalStorageDatabase.cpp:
1059         (WebKit::LocalStorageDatabase::importItems):
1060
1061 2013-05-01  Anders Carlsson  <andersca@apple.com>
1062
1063         Begin work on loading items from the local storage database
1064         https://bugs.webkit.org/show_bug.cgi?id=115489
1065
1066         Reviewed by Andreas Kling.
1067
1068         Some of the LocalStorageDatabase code is originally from WebCore,
1069         but has been simplified due to the fact that we don't need to load
1070         database data asynchronously since we're already running on a non-main thread.
1071
1072         * UIProcess/Storage/LocalStorageDatabase.cpp:
1073         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
1074         (WebKit::LocalStorageDatabase::openDatabase):
1075         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
1076         (WebKit::LocalStorageDatabase::migrateItemTableIfNeeded):
1077         (WebKit::LocalStorageDatabase::importItems):
1078
1079         * UIProcess/Storage/LocalStorageDatabase.h:
1080         (WebKit::StorageManager::StorageArea::setItem):
1081         (WebKit::StorageManager::StorageArea::removeItem):
1082         (WebKit::StorageManager::StorageArea::clear):
1083         (WebKit::StorageManager::StorageArea::items):
1084         Call importItemsFromDatabase().
1085         
1086         (WebKit::StorageManager::StorageArea::importItemsFromDatabase):
1087         Ask the database to import the items.
1088
1089 2013-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
1090
1091         [EFL] Unreviewed buildfix after r149449.
1092
1093         * CMakeLists.txt:
1094
1095 2013-05-01  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1096
1097         [Qt] Unreviewed buildfix after r149449.
1098
1099         * Target.pri:
1100
1101 2013-05-01  Anders Carlsson  <andersca@apple.com>
1102
1103         Add LocalStorageDatabase class
1104         https://bugs.webkit.org/show_bug.cgi?id=115486
1105
1106         Reviewed by Sam Weinig.
1107
1108         The LocalStorageDatabase class will persist local storage data to disk.
1109
1110         * UIProcess/Storage/LocalStorageDatabase.cpp:
1111         * UIProcess/Storage/LocalStorageDatabase.h: Added.
1112
1113         * UIProcess/Storage/StorageManager.cpp:
1114         (StorageManager::StorageArea):
1115         (WebKit::StorageManager::LocalStorageNamespace::storageManager):
1116         Add getter.
1117
1118         (StorageManager::LocalStorageNamespace):
1119         (WebKit::StorageManager::StorageArea::StorageArea):
1120         If this is a local storage area, create a LocalStorageDatabase.
1121
1122         (WebKit::StorageManager::LocalStorageNamespace::databaseFilename):
1123         Helper function for getting the name of the database for the given origin.
1124
1125         * WebKit2.xcodeproj/project.pbxproj:
1126         Add new files.
1127
1128 2013-05-01  Alexey Proskuryakov  <ap@apple.com>
1129
1130         <rdar://problem/13781156> Launching NetworkProcess broken on some OS versions.
1131
1132         Reviewed by Anders Carlsson.
1133
1134         Adapt to LaunchServices changes.
1135
1136         * Shared/mac/ChildProcessMac.mm:
1137         (WebKit::ChildProcess::setApplicationIsDaemon):
1138
1139 2013-05-01  Martin Robinson  <mrobinson@igalia.com>
1140
1141         [GTK] [WebKit2] Add a setting to control whether or not accelerated 2D canvas is enabled
1142         https://bugs.webkit.org/show_bug.cgi?id=114394
1143
1144         Reviewed by Anders Carlsson.
1145
1146         Add a setting to control accelerated 2D canvas, which determines whether
1147         or not to consider rendering HTML canvas with hardware acceleration.
1148
1149         * UIProcess/API/gtk/WebKitSettings.cpp:
1150         (webKitSettingsSetProperty): Added support for enable-accelerated-2d-canvas property.
1151         (webKitSettingsGetProperty): Added support for enable-accelerated-2d-canvas property.
1152         (webkit_settings_class_init): Added support for enable-accelerated-2d-canvas property.
1153         (webkit_settings_get_enable_accelerated_2d_canvas): Added.
1154         (webkit_settings_set_enable_accelerated_2d_canvas): Added.
1155         * UIProcess/API/gtk/WebKitSettings.h: New methods.
1156         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new methods to the documentation.
1157         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
1158         (testWebKitSettings): Added a simple test for the setting.
1159
1160 2013-04-30  Jer Noble  <jer.noble@apple.com>
1161
1162         Entering full screen mode shows desktop linen instead of WKView the first time.
1163         https://bugs.webkit.org/show_bug.cgi?id=115433
1164         <rdar://problem/13774540>
1165
1166         Reviewed by Eric Carlson.
1167
1168         For certain types of windows created by subclasses of WKView, the window in question fails to paint
1169         when created with a zero-size rect. Create the window with an initial size of the active screen frame
1170         as that is the likely destination size.
1171
1172         * UIProcess/API/mac/WKView.mm:
1173         (-[WKView createFullScreenWindow]):
1174
1175 2013-05-01  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1176
1177         [Qt][Win] Fix build after r149416.
1178         https://bugs.webkit.org/show_bug.cgi?id=115474
1179
1180         Reviewed by Anders Carlsson.
1181
1182         * Platform/CoreIPC/Connection.h:
1183         (Connection):
1184         * Platform/CoreIPC/win/ConnectionWin.cpp:
1185         (CoreIPC::Connection::dispatchSentMessagesUntil):
1186
1187 2013-05-01  Sergio Villar Senin  <svillar@igalia.com>
1188
1189         Unreviewed GTK build fix after r149417.
1190
1191         * GNUmakefile.list.am: Added PageBanner.[cpp|h] to the list of
1192         sources.
1193
1194 2013-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
1195
1196         [EFL] Unreviewed buildfix after r149416 and r149417.
1197
1198         Unreviewed build fix.
1199
1200         * CMakeLists.txt:
1201
1202 2013-05-01  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1203
1204         [Qt] Unreviewed buildfix after r149416 and r149417.
1205
1206         * Target.pri:
1207
1208 2013-04-30  Dongwoo Joshua Im  <dw.im@samsung.com>
1209
1210         [EFL] Unreviewed, EFL build fix after r149416
1211         https://bugs.webkit.org/show_bug.cgi?id=115467
1212
1213         Unreviewed build fix.
1214
1215         * CMakeLists.txt: Remove non-existing file, BinarySemaphore.cpp, from the list.
1216
1217 2013-04-30  Simon Cooper  <scooper@apple.com>
1218
1219         ipc-posix-shm backwards compatibility 
1220         https://bugs.webkit.org/show_bug.cgi?id=115448
1221         <rdar://problem/13743037>
1222
1223         Reviewed by Alexey Proskuryakov.
1224
1225         Add compatibility for older ipc-posix-shm operations, but prefer the
1226         newer names when writing profiles.
1227
1228         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
1229
1230 2013-04-30  Philippe Normand  <pnormand@igalia.com>
1231
1232         Unreviewed, GTK build fix after r149416.
1233
1234         * GNUmakefile.list.am: Remove references to non-existant
1235         BinarySemaphore module.
1236
1237 2013-04-28  Alexey Proskuryakov  <ap@apple.com>
1238
1239         <rdar://problem/13574729> Implement file path restrictions in WebKit Objective C API
1240         https://bugs.webkit.org/show_bug.cgi?id=115321
1241
1242         Reviewed by Darin Adler.
1243
1244         * UIProcess/API/C/WKPage.cpp:
1245         * UIProcess/API/C/WKPage.h: 
1246         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile):
1247         * UIProcess/WebPageProxy.h:
1248         Added and implemented a C API to load a file while only opening sandbox for
1249         a specific directory.
1250
1251         * UIProcess/API/mac/WKBrowsingContextController.h: Fixed a typo in a comment.
1252
1253         * UIProcess/API/mac/WKBrowsingContextController.mm:
1254         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
1255         Respect allowedDirectory argument. Updated the function to raise an exception for
1256         incorrect input, as decribed in header file.
1257
1258 2013-04-29  Sam Weinig  <sam@webkit.org>
1259
1260         Add API to allow WebKit2 banners to get mouse events
1261         https://bugs.webkit.org/show_bug.cgi?id=115395
1262
1263         Reviewed by Beth Dakin.
1264
1265         * Shared/API/c/WKBase.h:
1266         * Shared/APIObject.h:
1267         Add banner type.
1268
1269         * WebKit2.xcodeproj/project.pbxproj:
1270         Add files.
1271
1272         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
1273         Add conversion.
1274
1275         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1276         (WKBundlePageSetTopOverhangImage):
1277         (WKBundlePageSetBottomOverhangImage):
1278         Fix parameter names to be consistent.
1279
1280         (WKBundlePageSetHeaderBanner):
1281         (WKBundlePageSetFooterBanner):
1282         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1283         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.cpp: Added.
1284         (WKBundlePageBannerGetTypeID):
1285         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h: Added.
1286         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.h: Added.
1287         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm: Added.
1288         (PageBannerClientImpl):
1289         (PageBannerClientImpl::create):
1290         (PageBannerClientImpl::PageBannerClientImpl):
1291         (PageBannerClientImpl::pageBannerDestroyed):
1292         (PageBannerClientImpl::mouseEvent):
1293         (WKBundlePageBannerCreateBannerWithCALayer):
1294         (WKBundlePageBannerGetLayer):
1295         Add banner API.
1296
1297         * WebProcess/WebPage/PageBanner.h: Added.
1298         * WebProcess/WebPage/PageBanner.cpp: Added.
1299         (WebKit::PageBanner::~PageBanner):
1300         (WebKit::PageBanner::addToPage):
1301         (WebKit::PageBanner::detachFromPage):
1302         (WebKit::PageBanner::didChangeDeviceScaleFactor):
1303         (WebKit::PageBanner::mouseEvent):
1304         Add non-mac implementations.
1305
1306         * WebProcess/WebPage/WebPage.cpp:
1307         (WebKit::WebPage::~WebPage):
1308         (WebKit::WebPage::setHeaderPageBanner):
1309         (WebKit::WebPage::headerPageBanner):
1310         (WebKit::WebPage::setFooterPageBanner):
1311         (WebKit::WebPage::footerPageBanner):
1312         (WebKit::WebPage::mouseEvent):
1313         (WebKit::WebPage::mouseEventSyncForTesting):
1314         * WebProcess/WebPage/WebPage.h:
1315         Add banner setter/getters and give the banners a chance to handle mouse events.
1316
1317         * WebProcess/WebPage/mac/PageBannerMac.mm: Added.
1318         (WebKit::PageBanner::create):
1319         (WebKit::PageBanner::PageBanner):
1320         (WebKit::PageBanner::addToPage):
1321         (WebKit::PageBanner::detachFromPage):
1322         (WebKit::PageBanner::didChangeDeviceScaleFactor):
1323         (WebKit::PageBanner::mouseEvent):
1324         (WebKit::PageBanner::layer):
1325         Add Mac implementation.
1326
1327         * WebProcess/WebPage/mac/WebPageMac.mm:
1328         (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):
1329         Notify banners when the device scale changes.
1330
1331 2013-04-30  Anders Carlsson  <andersca@apple.com>
1332
1333         Remove the WebKit2 BinarySemaphore class
1334         https://bugs.webkit.org/show_bug.cgi?id=115458
1335
1336         Reviewed by Benjamin Poulain.
1337
1338         Remove the WK2 specific BinarySemaphore class and use the one from WTF.
1339
1340         * Platform/CoreIPC/BinarySemaphore.cpp: Removed.
1341         * Platform/CoreIPC/BinarySemaphore.h: Removed.
1342         * Platform/CoreIPC/Connection.cpp:
1343         * Platform/CoreIPC/Connection.h:
1344         * WebKit2.xcodeproj/project.pbxproj:
1345
1346 2013-04-30  Alexey Proskuryakov  <ap@apple.com>
1347
1348         <rdar://problem/13757475> WebProcess deny ipc-posix-shm-read-data CFPBS:A2:
1349
1350         Reviewed by Anders Carlsson.
1351
1352         * WebProcess/com.apple.WebProcess.sb.in: Allow pbs shared memory.
1353
1354 2013-04-30  Alexey Proskuryakov  <ap@apple.com>
1355
1356         [Mac] Don't open window server connection in network process
1357         https://bugs.webkit.org/show_bug.cgi?id=115446
1358
1359         Reviewed by Anders Carlsson.
1360
1361         * NetworkProcess/NetworkProcess.cpp:
1362         (WebKit::NetworkProcess::initializeProcess):
1363         * NetworkProcess/NetworkProcess.h:
1364         * NetworkProcess/mac/NetworkProcessMac.mm:
1365         (WebKit::NetworkProcess::initializeProcess):
1366         (WebKit::NetworkProcess::initializeProcessName):
1367         Instead of shutting down a connection after setting process name, just prevent
1368         it from being created.
1369
1370         * Shared/ChildProcess.h:
1371         * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::setApplicationIsDaemon):
1372         Expose a function for client processes to call if they don't run an NSApplication
1373         run loop.
1374
1375         * OfflineStorageProcess/OfflineStorageProcess.cpp:
1376         (WebKit::OfflineStorageProcess::initializeProcess):
1377         * OfflineStorageProcess/OfflineStorageProcess.h:
1378         * OfflineStorageProcess/mac/OfflineStorageProcessMac.mm:
1379         (WebKit::OfflineStorageProcess::initializeProcess):
1380         (WebKit::OfflineStorageProcess::initializeProcessName):
1381         * SharedWorkerProcess/SharedWorkerProcess.cpp:
1382         (WebKit::SharedWorkerProcess::initializeProcess):
1383         (WebKit::SharedWorkerProcess::initializeProcessName):
1384         * SharedWorkerProcess/SharedWorkerProcess.h:
1385         * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm:
1386         (WebKit::SharedWorkerProcess::initializeProcess):
1387         (WebKit::SharedWorkerProcess::initializeProcessName):
1388         Match NetworkProcess for consistency.
1389
1390         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::initializeProcessName):
1391         Don't null check UI process name. First, it can't be null, and second, some other
1392         processes already don't have this check.
1393
1394 2013-04-30  Tim Horton  <timothy_horton@apple.com>
1395
1396         Disable deprecation warnings around some NSProcessInfo API.
1397
1398         Rubber-stamped by Brady Eidson.
1399
1400         * Shared/mac/ChildProcessMac.mm:
1401         (WebKit::ChildProcess::setProcessSuppressionEnabled):
1402
1403 2013-04-30  Brady Eidson  <beidson@apple.com>
1404
1405         [WK2] Threads get stuck in NetworkProcess when canceling loads in WebProcess.
1406         <rdar://problem/13757687> and https://bugs.webkit.org/show_bug.cgi?id=115319
1407
1408         Written and reviewed by both Alexey Proskuryakov and Brady Eidson.
1409
1410         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1411         (WebKit::NetworkConnectionToWebProcess::didClose): Call abort() on all loaders
1412           instead of connectionToWebProcessDidClose()
1413         (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): Instead of removing
1414           the loader from the scheduler, call abort() which will also end up removing it.
1415
1416         * NetworkProcess/SchedulableLoader.h: Add a virtual abort() call.
1417
1418         * NetworkProcess/NetworkResourceLoader.cpp:
1419         (WebKit::NetworkResourceLoader::sendAbortingOnFailure): Added a messageFlags argument so 
1420           callers can pass DispatchMessageEvenWhenWaitingForSyncReply.
1421         (WebKit::NetworkResourceLoader::abort): Combined "abortInProgressLoad" and "cleanup" to
1422           be a general purpose "cancel"
1423         (WebKit::NetworkResourceLoader::didReceiveBuffer):
1424         (WebKit::NetworkResourceLoader::willSendRequestAsync):
1425         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
1426         * NetworkProcess/NetworkResourceLoader.h:
1427
1428         * NetworkProcess/SyncNetworkResourceLoader.cpp:
1429         (WebKit::SyncNetworkResourceLoader::abort):
1430         * NetworkProcess/SyncNetworkResourceLoader.h:
1431
1432         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1433         (WebKit::WebResourceLoadScheduler::remove): Remove an obsolete/incorrect comment.
1434
1435         * WebProcess/Network/WebResourceLoader.cpp:
1436         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Add comment stressing
1437           the importance of this null check so it's not removed again.
1438
1439 2013-04-30  Carlos Garcia Campos  <cgarcia@igalia.com>
1440
1441         [WK2][GTK] MiniBrowser won't play video in <embed> tag
1442         https://bugs.webkit.org/show_bug.cgi?id=113107
1443
1444         Reviewed by Anders Carlsson.
1445
1446         The wrong clip region is used for windowed plugins, because it's
1447         translated to window frame coords again.
1448
1449         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1450         (WebKit::NetscapePlugin::platformGeometryDidChange): Do not move
1451         the current clip region.
1452
1453 2013-04-30  Timothy Hatcher  <timothy@apple.com>
1454
1455         Make the Inspector dock to right button work in the WebKit nightlies on Safari 6.0.4.
1456
1457         https://webkit.org/b/115428
1458
1459         Reviewed by Joseph Pecoraro.
1460
1461         * UIProcess/mac/WebInspectorProxyMac.mm:
1462         (WebKit::WebInspectorProxy::createInspectorWindow): Reduce the required Safari version.
1463         (WebKit::WebInspectorProxy::platformDetach): Simplify the frame restoring code so it
1464         works on Safari 6.0.4.
1465
1466 2013-04-30  Artur Moryc  <a.moryc@samsung.com>
1467
1468         [WK2][EFL] Spelling marker disappears while selection is being changed
1469         https://bugs.webkit.org/show_bug.cgi?id=115165
1470
1471         Reviewed by Anders Carlsson.
1472
1473         The marker for a misspelled word disappears while the cursor is being navigated along the word.
1474
1475         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1476         (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
1477
1478 2013-04-30  Zalan Bujtas  <zalan@apple.com>
1479
1480         Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/
1481         https://bugs.webkit.org/show_bug.cgi?id=111244
1482
1483         Reviewed by David Kilzer.
1484         
1485         Enable performance.now() as a minimal subset of Web Timing API. 
1486         It returns DOMHighResTimeStamp, a monotonically increasing value representing the 
1487         number of milliseconds from the start of the navigation of the current document.
1488         JS libraries use this API to check against the requestAnimationFrame() timestamp.
1489
1490         * Configurations/FeatureDefines.xcconfig:
1491
1492 2013-04-29  Chris Fleizach  <cfleizach@apple.com>
1493
1494         WEB SPEECH: need to identify the default voice per language
1495         https://bugs.webkit.org/show_bug.cgi?id=115366
1496
1497         Reviewed by Tim Horton.
1498
1499         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1500         (InitWebCoreSystemInterface):
1501
1502 2013-04-29  Benjamin Poulain  <benjamin@webkit.org>
1503
1504         [WK2] Streamline the use of strings in WebProcess::getWebCoreStatistics
1505         https://bugs.webkit.org/show_bug.cgi?id=115315
1506
1507         Reviewed by Geoffrey Garen.
1508
1509         Remove a couple of unjustified DEFINE_STATIC_LOCAL.
1510         Use ASCIILiteral when allocating new String.
1511
1512         * WebProcess/WebProcess.cpp:
1513         (WebKit::getWebCoreMemoryCacheStatistics):
1514         (WebKit::WebProcess::getWebCoreStatistics):
1515
1516 2013-04-29  Anders Carlsson  <andersca@apple.com>
1517
1518         Remove StorageTracker::originsLoaded
1519         https://bugs.webkit.org/show_bug.cgi?id=115382
1520
1521         Reviewed by Sam Weinig.
1522
1523         Add m_didFinishLoadingOrigins.
1524
1525         * WebProcess/Storage/WebKeyValueStorageManager.cpp:
1526         (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
1527         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1528         (WebKit::WebKeyValueStorageManager::didFinishLoadingOrigins):
1529         * WebProcess/Storage/WebKeyValueStorageManager.h:
1530         (WebKeyValueStorageManager):
1531
1532 2013-04-29  Chris Fleizach  <cfleizach@apple.com>
1533
1534         WEB SPEECH Update seatbelt profile to work with speech synthesis
1535         https://bugs.webkit.org/show_bug.cgi?id=115368
1536
1537         Reviewed by Alexey Proskuryakov.
1538
1539         * WebProcess/com.apple.WebProcess.sb.in:
1540
1541 2013-04-28  Beth Dakin  <bdakin@apple.com>
1542
1543         Need a LayoutMilestone to fire when we have done our first paint after suppressing 
1544         incremental layout
1545         https://bugs.webkit.org/show_bug.cgi?id=115330
1546         -and corresponding-
1547         <rdar://problem/12722365>
1548
1549         Reviewed by Simon Fraser.
1550
1551         Two new millstones.
1552         * Shared/API/c/WKPageLoadTypes.h:
1553         * Shared/API/c/WKSharedAPICast.h:
1554         (WebKit::toWKLayoutMilestones):
1555         (WebKit::toLayoutMilestones):
1556
1557         This null-check is necessary now since this code ends up running at 
1558         WebFrame::init() time while we're setting up the Document. 
1559         setVisualUpdatesAllowed(true) has always been called as a part of that process, 
1560         and now the updateLayout(), ends up calling this code too, but we don't actually 
1561         have a mainFrame yet since it's still being created.
1562         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1563         (WebKit::findLargestFrameInFrameSet):
1564
1565 2013-04-29  Brady Eidson  <beidson@apple.com>
1566
1567         REGRESSION: We see authentication challenge sheets for favicon requests.
1568         <rdar://problem/13753470> and https://bugs.webkit.org/show_bug.cgi?id=115288
1569
1570         Reviewed by Alexey Proskuryakov.
1571
1572         Have NetworkResourceLoadParameters remember the ClientCredentialPolicy:
1573         * Shared/Network/NetworkResourceLoadParameters.cpp:
1574         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
1575         (WebKit::NetworkResourceLoadParameters::encode):
1576         (WebKit::NetworkResourceLoadParameters::decode):
1577         * Shared/Network/NetworkResourceLoadParameters.h:
1578
1579         Pass along the ClientCredentialPolicy to the NetworkProcess:
1580         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1581         (WebKit::WebResourceLoadScheduler::scheduleLoad):
1582         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1583         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
1584         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1585
1586         Have the SchedulableLoader remember the ClientCredentialPolicy:
1587         * NetworkProcess/SchedulableLoader.cpp:
1588         (WebKit::SchedulableLoader::SchedulableLoader):
1589         * NetworkProcess/SchedulableLoader.h:
1590         (WebKit::SchedulableLoader::clientCredentialPolicy):
1591
1592         Don’t message for credentials if the ClientCredentialPolicy forbids it:
1593         * NetworkProcess/NetworkResourceLoader.cpp:
1594         (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
1595         * NetworkProcess/NetworkResourceLoader.h:
1596
1597         Update for the new loadResourceSynchronously signature (which is still a no-op on the NetworkProcess side):
1598         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
1599         (WebKit::NetworkProcessPlatformStrategies::loadResourceSynchronously):
1600         * NetworkProcess/NetworkProcessPlatformStrategies.h:
1601
1602 2013-04-29  Jer Noble  <jer.noble@apple.com>
1603
1604         Unreviewed build fix. Point the Network process towards its own version of SecItemShim.dyld.
1605
1606         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist:
1607
1608 2013-04-29  Alexey Proskuryakov  <ap@apple.com>
1609
1610         Threads get stuck in NetworkProcess when canceling loads
1611         https://bugs.webkit.org/show_bug.cgi?id=115319
1612
1613         Backing out part of the fix, as it's causing crashes.
1614
1615         * WebProcess/Network/WebResourceLoader.cpp:
1616         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
1617
1618 2013-04-29  Noam Rosenthal  <noam@webkit.org>
1619
1620         Get rid of "non-composited contents" in CoordinatedLayerTreeHost
1621         https://bugs.webkit.org/show_bug.cgi?id=110355
1622
1623         Reviewed by Jocelyn Turcotte.
1624
1625         Instead of using a special non-composited contents layer, we let RenderLayerCompositor create
1626         a proper GraphicsLayer for that content.
1627         CoordinatedLayerTreeHost now needs to find the main contents layer for the purpose of setting
1628         the trajectory vector and applying the cover rect.
1629
1630         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1631         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1632         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
1633             Don't create the non-composited layer, instead keep a raw pointer to the root
1634             compositing layer created by the WebCore compositor.
1635
1636         (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplay):
1637         (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplayInRect):
1638         (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
1639         (WebKit::CoordinatedLayerTreeHost::sizeDidChange):
1640         (WebKit::CoordinatedLayerTreeHost::paintContents):
1641         (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
1642         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
1643             Remove non-composited layer specialization.
1644
1645 2013-04-29  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1646
1647         [Qt] Build fix. Enabling c++11 for Qt WK2 after r149259.
1648         https://bugs.webkit.org/show_bug.cgi?id=115345
1649
1650         Reviewed by Anders Carlsson.
1651
1652         * WebKit2.pri:
1653
1654 2013-04-29  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
1655
1656         [WK2][EFL] Skip cancel fullscreen request if not made from FullScreen API
1657         https://bugs.webkit.org/show_bug.cgi?id=108201
1658
1659         Reviewed by Andreas Kling.
1660
1661         Adds a check on WebFullScreenManagerProxyEfl whether fullscreen mode was
1662         set from FullScreen API or not, so it can skip cancelling fullscreen
1663         request if fullscreen mode was set by application, preventing
1664         WebProcess' FullScreenManager from crashing.
1665
1666         EFL unit test available: ewk_view_cancel_full_screen_request.
1667
1668         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
1669         (WKViewExitFullScreen):
1670         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
1671         WKViewExitFullScreen now returns a bool, indicating whether the
1672         operation has succeeded or not.
1673
1674         * UIProcess/API/efl/ewk_view.cpp:
1675         (ewk_view_fullscreen_exit):
1676         Skip request if not in fullscreen mode.
1677
1678         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1679         (TEST_F):
1680         Added ewk_view_cancel_full_screen_request unit test.
1681
1682         * UIProcess/CoordinatedGraphics/WebView.cpp:
1683         (WebKit::WebView::exitFullScreen):
1684         * UIProcess/CoordinatedGraphics/WebView.h:
1685         (WebView):
1686         exitFullScreen now returns a bool, indicating whether the operation has
1687         succeeded or not.
1688
1689         * UIProcess/WebFullScreenManagerProxy.cpp:
1690         (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
1691         * UIProcess/WebFullScreenManagerProxy.h:
1692         (WebFullScreenManagerProxy):
1693         * UIProcess/efl/WebFullScreenManagerProxyEfl.cpp:
1694         (WebKit::WebFullScreenManagerProxy::isFullScreen):
1695         (WebKit::WebFullScreenManagerProxy::enterFullScreen):
1696         (WebKit::WebFullScreenManagerProxy::exitFullScreen):
1697         Added m_hasRequestedFullScreen boolean flag to EFL port. Used to
1698         indicate if fullscreen mode is enabled, as well as sanity checks on both
1699         {enter,exit}FullScreen functions.
1700
1701 2013-04-29  Anders Carlsson  <andersca@apple.com>
1702
1703         Stop using range-based for syntax
1704         https://bugs.webkit.org/show_bug.cgi?id=115356
1705
1706         Reviewed by Andreas Kling.
1707
1708         * PluginProcess/WebProcessConnection.cpp:
1709         (WebKit::WebProcessConnection::didClose):
1710
1711 2013-04-29  Sergio Correia  <sergio.correia@openbossa.org>
1712
1713         [EFL][WK2]: WebProcessMain: hide call to ecore_x_shutdown() under guard
1714         https://bugs.webkit.org/show_bug.cgi?id=115295
1715
1716         Reviewed by Andreas Kling.
1717
1718         Since the mentioned function is declared in a header that is included
1719         conditionally depending on HAVE_ECORE_X being defined.
1720
1721         * WebProcess/efl/WebProcessMainEfl.cpp:
1722         (WebKit::WebProcessMainEfl):
1723
1724 2013-04-29  Jinwoo Song  <jinwoo7.song@samsung.com>
1725
1726         [WK2] Remove build warnings by -Wunused-parameter
1727         https://bugs.webkit.org/show_bug.cgi?id=115344
1728
1729         Reviewed by Noam Rosenthal.
1730
1731         Fix build warnigs -Wunused-parameter.
1732
1733         * UIProcess/CoordinatedGraphics/WebView.cpp:
1734         (WebKit::WebView::createContextMenuProxy):
1735         * UIProcess/DrawingAreaProxy.h:
1736         (WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate):
1737         * UIProcess/WebPageProxy.cpp:
1738         (WebKit::WebPageProxy::connectionWillClose):
1739
1740 2013-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1741
1742         Unreviewed. Fix make distcheck.
1743
1744         * GNUmakefile.list.am: Add missing header files to compilation.
1745
1746 2013-04-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1747
1748         Unreviewed fix build break on EFL port since r149259.
1749
1750         In EFL port, there is a non-compatible code when compiling based on C++11. This is a trivial build fix.
1751
1752         I got a confirm from Sam about landing a trivial build fix patch without sign-off from
1753         WK2 owner.
1754
1755         * UIProcess/API/efl/EwkViewCallbacks.h:
1756
1757 2013-04-28  Dean Jackson  <dino@apple.com>
1758
1759         [Mac] Disable canvas backing store scaling (HIGH_DPI_CANVAS)
1760         https://bugs.webkit.org/show_bug.cgi?id=115310
1761
1762         Reviewed by Simon Fraser.
1763
1764         Remove ENABLE_HIGH_DPI_CANVAS_macosx.
1765
1766         * Configurations/FeatureDefines.xcconfig:
1767
1768 2013-04-28  Sam Weinig  <sam@webkit.org>
1769
1770         [WebKit2] Adopt new API for detecting window occlusion
1771         https://bugs.webkit.org/show_bug.cgi?id=115334
1772
1773         Reviewed by Simon Fraser.
1774
1775         Switch off of WKSI for window occlusion and use the new NSWindowDidChangeOcclusionState notification
1776         instead.
1777
1778         * UIProcess/API/mac/WKView.mm:
1779         (-[WKView dealloc]):
1780         (-[WKView addWindowObserversForWindow:]):
1781         (-[WKView removeWindowObservers]):
1782         (-[WKView viewWillMoveToWindow:]):
1783         (-[WKView viewDidMoveToWindow]):
1784         (-[WKView _windowDidOrderOnScreen:]):
1785         (-[WKView _windowDidChangeOcclusionState:]):
1786         (-[WKView _setIsWindowOccluded:]):
1787         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
1788         (-[WKView windowOcclusionDetectionEnabled]):
1789         (-[WKView setWindowOcclusionDetectionEnabled:]):
1790         Only compile occlusion detection code where supported and remove calls to register/deregister
1791         for detection callbacks, now that NSWindow will handle that for us. We also no longer need to
1792         track all the WKViews, as that was only required to lookup the view that matched the window number
1793         returned from the occlusion callback.
1794
1795 2013-04-26  Anders Carlsson  <andersca@apple.com>
1796
1797         Use OwnPtr<PluginControllerProxy> for storing plug-in controllers in WebProcessConnection
1798         https://bugs.webkit.org/show_bug.cgi?id=115259
1799
1800         Reviewed by Andreas Kling.
1801
1802         * PluginProcess/WebProcessConnection.cpp:
1803         (WebKit::WebProcessConnection::addPluginControllerProxy):
1804         (WebKit::WebProcessConnection::removePluginControllerProxy):
1805         (WebKit::WebProcessConnection::didClose):
1806         * PluginProcess/WebProcessConnection.h:
1807         (WebProcessConnection):
1808
1809 2013-04-27  Jessie Berlin  <jberlin@apple.com>
1810
1811         Build fix.
1812
1813         * NetworkProcess/NetworkResourceLoader.cpp:
1814         (WebKit::NetworkResourceLoader::didReceiveBuffer):
1815         Do not declare another variable with the same name.
1816
1817 2013-04-27  Darin Adler  <darin@apple.com>
1818
1819         Move from constructor and member function adoptCF/NS to free function adoptCF/NS.
1820         https://bugs.webkit.org/show_bug.cgi?id=115307
1821
1822         Reviewed by Geoffrey Garen.
1823
1824         This change was done by a global replace followed by compiling and inspecting for
1825         cases that needed to be tweaked by hand.
1826
1827         * Platform/cg/CGUtilities.cpp:
1828         (WebKit::paintBitmapContext):
1829         * Platform/mac/ModuleMac.mm:
1830         (WebKit::Module::load):
1831         (WebKit::Module::platformFunctionPointer):
1832         * PluginProcess/mac/PluginProcessMac.mm:
1833         (WebKit::PluginProcess::initializeSandbox):
1834         * Shared/API/c/mac/WKURLRequestNS.mm:
1835         (WKURLRequestCreateWithNSURLRequest):
1836         * Shared/API/c/mac/WKURLResponseNS.mm:
1837         (WKURLResponseCreateWithNSURLResponse):
1838         * Shared/Downloads/mac/DownloadMac.mm:
1839         (WebKit::Download::start):
1840         (WebKit::Download::startWithHandle):
1841         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h:
1842         (WebKit::ChildProcessMain):
1843         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1844         (WebKit::getPluginArchitecture):
1845         (WebKit::contentsOfPropertyListAtURL):
1846         (WebKit::getMIMETypesFromPluginBundle):
1847         (WebKit::getStringListResource):
1848         (WebKit::NetscapePluginModule::getPluginInfo):
1849         * Shared/ShareableResource.cpp:
1850         (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
1851         * Shared/cf/ArgumentCodersCF.cpp:
1852         (CoreIPC::decode):
1853         (CoreIPC::encode):
1854         * Shared/cg/ShareableBitmapCG.cpp:
1855         (WebKit::ShareableBitmap::createGraphicsContext):
1856         (WebKit::ShareableBitmap::makeCGImageCopy):
1857         (WebKit::ShareableBitmap::makeCGImage):
1858         (WebKit::ShareableBitmap::createCGImage):
1859         * Shared/mac/ArgumentCodersMac.mm:
1860         (CoreIPC::decode):
1861         * Shared/mac/PlatformCertificateInfo.mm:
1862         (WebKit::PlatformCertificateInfo::dump):
1863         * Shared/mac/WebCoreArgumentCodersMac.mm:
1864         (CoreIPC::::encodePlatformData):
1865         (CoreIPC::::decodePlatformData):
1866         * UIProcess/API/mac/FindIndicatorWindow.mm:
1867         (WebKit::FindIndicatorWindow::setFindIndicator):
1868         (WebKit::FindIndicatorWindow::startFadeOutTimerFired):
1869         * UIProcess/API/mac/PDFViewController.mm:
1870         (-[WKPDFView initWithFrame:PDFViewController:]):
1871         (WebKit::PDFViewController::PDFViewController):
1872         (WebKit::convertPostScriptDataSourceToPDF):
1873         (WebKit::PDFViewController::setPDFDocumentData):
1874         * UIProcess/API/mac/PageClientImpl.mm:
1875         (WebKit::PageClientImpl::PageClientImpl):
1876         (WebKit::PageClientImpl::registerEditCommand):
1877         (WebKit::PageClientImpl::setDragImage):
1878         * UIProcess/API/mac/WKBrowsingContextController.mm:
1879         (didFailProvisionalLoadWithErrorForFrame):
1880         (didFailLoadWithErrorForFrame):
1881         * UIProcess/API/mac/WKConnection.mm:
1882         (didReceiveMessage):
1883         * UIProcess/API/mac/WKPrintingView.mm:
1884         (-[WKPrintingView drawRect:]):
1885         * UIProcess/API/mac/WKView.mm:
1886         (-[WKView browsingContextController]):
1887         (-[WKView _setAcceleratedCompositingModeRootLayer:]):
1888         (-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]):
1889         (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
1890         (-[WKView fullScreenWindowController]):
1891         (-[WKView _executeSavedCommandBySelector:]):
1892         (-[WKView printOperationWithPrintInfo:forFrame:]):
1893         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1894         (WebKit::createProcess):
1895         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
1896         (WebKit::PluginInfoStore::pluginPathsInDirectory):
1897         (WebKit::PluginInfoStore::getMIMETypeForExtension):
1898         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1899         (WebKit::PluginProcessProxy::beginModal):
1900         * UIProcess/cf/WebBackForwardListCF.cpp:
1901         (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
1902         * UIProcess/cf/WebPageProxyCF.cpp:
1903         (WebKit::WebPageProxy::sessionStateData):
1904         (WebKit::WebPageProxy::restoreFromSessionStateData):
1905         (WebKit::WebPageProxy::saveRecentSearches):
1906         (WebKit::WebPageProxy::loadRecentSearches):
1907         * UIProcess/cf/WebPreferencesCF.cpp:
1908         (WebKit::cfStringFromWebCoreString):
1909         (WebKit::setStringValueIfInUserDefaults):
1910         (WebKit::setBoolValueIfInUserDefaults):
1911         (WebKit::setUInt32ValueIfInUserDefaults):
1912         (WebKit::setDoubleValueIfInUserDefaults):
1913         (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
1914         (WebKit::WebPreferences::platformUpdateDoubleValueForKey):
1915         (WebKit::WebPreferences::platformUpdateFloatValueForKey):
1916         * UIProcess/mac/BackingStoreMac.mm:
1917         (WebKit::BackingStore::resetScrolledRect):
1918         (WebKit::BackingStore::backingStoreContext):
1919         * UIProcess/mac/CorrectionPanel.mm:
1920         (WebKit::CorrectionPanel::handleAcceptedReplacement):
1921         * UIProcess/mac/TextCheckerMac.mm:
1922         (WebKit::TextChecker::checkTextOfParagraph):
1923         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
1924         * UIProcess/mac/WKFullScreenWindowController.mm:
1925         (-[WKFullScreenWindowController enterFullScreen:]):
1926         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
1927         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
1928         * UIProcess/mac/WebContextMac.mm:
1929         (WebKit::WebContext::platformDefaultDiskCacheDirectory):
1930         * UIProcess/mac/WebContextMenuProxyMac.mm:
1931         (WebKit::nsMenuItemVector):
1932         (WebKit::WebContextMenuProxyMac::populate):
1933         * UIProcess/mac/WebInspectorProxyMac.mm:
1934         (WebKit::WebInspectorProxy::createInspectorWindow):
1935         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1936         * UIProcess/mac/WebPopupMenuProxyMac.mm:
1937         (WebKit::WebPopupMenuProxyMac::populate):
1938         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
1939         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
1940         (WebKit::InjectedBundle::load):
1941         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1942         (WebKit::NetscapePlugin::updatePluginLayer):
1943         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
1944         (WebKit::PluginProxy::pluginLayer):
1945         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1946         (WebKit::PDFPlugin::PDFPlugin):
1947         (WebKit::PDFPlugin::createScrollbar):
1948         (WebKit::PDFPlugin::pdfDocumentDidLoad):
1949         (WebKit::PDFPlugin::writeItemsToPasteboard):
1950         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
1951         (getAllScriptsInPDFDocument):
1952         (WebKit::SimplePDFPlugin::pdfDocumentDidLoad):
1953         (WebKit::SimplePDFPlugin::streamDidReceiveData):
1954         (WebKit::SimplePDFPlugin::manualStreamDidReceiveData):
1955         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
1956         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
1957         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
1958         (WebKit::WebResourceCacheManager::cfURLCacheHostNames):
1959         (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames):
1960         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
1961         (WebKit::createNSError):
1962         * WebProcess/WebPage/WebPage.cpp:
1963         (WebKit::WebPage::drawPagesToPDF):
1964         * WebProcess/WebPage/mac/WebPageMac.mm:
1965         (WebKit::WebPage::performDictionaryLookupForRange):
1966         (WebKit::cachedResponseForURL):
1967         (WebKit::WebPage::drawPagesToPDFFromPDFDocument):
1968         * WebProcess/mac/WebProcessMac.mm:
1969         (WebKit::WebProcess::platformSetCacheModel):
1970         Use adoptCF and adoptNS free functions.
1971
1972 2013-04-27  Alexey Proskuryakov  <ap@apple.com>
1973
1974         <rdar://problem/13757007> Crashes in NetworkResourceLoader::didReceiveResponseAsync
1975         https://bugs.webkit.org/show_bug.cgi?id=115318
1976
1977         Reviewed by Darin Adler.
1978
1979         sendAbortingOnFailure may actually fail, and abort the request, making m_handle null.
1980
1981         * NetworkProcess/NetworkResourceLoader.cpp:
1982         (WebKit::NetworkResourceLoader::didReceiveResponseAsync): Null check m_handle after
1983         sending a message, because the request will cancelled when connection is invalid.
1984         (WebKit::NetworkResourceLoader::didReceiveBuffer): Assert that m_handle matches
1985         the handle that we are called with.
1986         (WebKit::NetworkResourceLoader::didFinishLoading): Ditto.
1987         (WebKit::NetworkResourceLoader::didFail): Ditto.
1988         (WebKit::NetworkResourceLoader::willSendRequestAsync): Ditto.
1989         (WebKit::NetworkResourceLoader::didSendData): Ditto.
1990         (WebKit::NetworkResourceLoader::shouldUseCredentialStorage): Ditto.
1991         (WebKit::NetworkResourceLoader::shouldUseCredentialStorageAsync): Ditto.
1992         (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): Ditto.
1993         (WebKit::NetworkResourceLoader::didCancelAuthenticationChallenge): Ditto.
1994         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync): Ditto.
1995
1996 2013-04-27  Alexey Proskuryakov  <ap@apple.com>
1997
1998         <rdar://problem/13757687> Threads get stuck in NetworkProcess when canceling loads
1999         https://bugs.webkit.org/show_bug.cgi?id=115319
2000
2001         Reviewed by Darin Adler.
2002
2003         WebResourceLoader was second-guessing NetworkProcess as to whether it needs a response
2004         to DidReceiveResponseWithCertificateInfo, and it was guessing wrong if the load was
2005         alrady canceled on WebProcess side.
2006
2007         * NetworkProcess/NetworkResourceLoader.cpp:
2008         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2009         * WebProcess/Network/WebResourceLoader.cpp:
2010         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
2011         * WebProcess/Network/WebResourceLoader.h:
2012         * WebProcess/Network/WebResourceLoader.messages.in:
2013
2014 2013-04-27  Alexey Proskuryakov  <ap@apple.com>
2015
2016         Regression tests that reference a non-local resource crash with NetworkProcess enabled
2017         https://bugs.webkit.org/show_bug.cgi?id=115290
2018
2019         Reviewed by Sam Weinig.
2020
2021         Covered by fast/dom/icon-url-change.html and many other existing tests.
2022
2023         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2024         (WebKit::WebResourceLoadScheduler::remove): Handle this case. Architecturally, it
2025         would be better if SubresourceLoad::create just created an object an didn't do
2026         further checks before returning a pointer, but changing that is beyond the scope
2027         of the fix.
2028
2029 2013-04-26  Yael Aharon  <yael.aharon@intel.com>
2030
2031         [WK2][EFL] Build break after r149212
2032         https://bugs.webkit.org/show_bug.cgi?id=115294
2033
2034         Reviewed by Simon Fraser.
2035         r144672 bumped up the revision of WKContextClient API, and introduced a version array
2036         APIClientTraits<WKContextClient>::interfaceSizesByVersion .
2037         In r149212, the version was bumped back down and the version array was emptied but not removed.
2038         This causes a warning "array subscript is below array bounds", and in EFL the warning is
2039         treated as error.
2040
2041         * Shared/APIClientTraits.cpp:
2042         (WebKit):
2043         * Shared/APIClientTraits.h:
2044
2045 2013-04-26  Martin Robinson  <mrobinson@igalia.com>
2046
2047         [GTK] Add methods to add a user style sheet to the WebKit2 GTK+ API
2048         https://bugs.webkit.org/show_bug.cgi?id=99081
2049
2050         Reviewed by Carlos Garcia Campos, Gustavo Noronha Silva, and Benjamin Poulain.
2051
2052         Add methods to WebKitWebViewGroup to add and remove user style sheets.
2053         This allows clients to inject style sheets into pages with a set of
2054         rules for when those style sheets apply.
2055
2056         * UIProcess/API/gtk/WebKitWebViewGroup.cpp:
2057         (toImmutableArray): Added this helper which converts the GList* parameters into
2058         ImmutableArrays for use with the WebKit2 internal API.
2059         (webkit_web_view_group_add_user_style_sheet): Added new API for adding a style sheet.
2060         (webkit_web_view_group_remove_all_user_style_sheets): Add new API for clearing out all style sheets.
2061         * UIProcess/API/gtk/WebKitWebViewGroup.h: Added new method declarations.
2062         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new API to the documentation.
2063         * UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp: Added a test for the new API.
2064         (isStyleSheetInjectedForURLAtPath): Function to check whether the style sheet has been injected for a given URL.
2065         (fillURLListFromPaths): Helper which converts paths passed via varargs into a whitelist or blacklist.
2066         (removeOldInjectedStyleSheetsAndResetLists): Function to start afresh.
2067         (testWebViewGroupInjectedStyleSheet): The actual test.
2068         (serverCallback): Server callback for use with the test. We cannot use loadHTML or
2069         loadAlternateHTML, because that checks the whitelist and blacklist against about:blank.
2070         (beforeAll): Initialize the server and new test.
2071         (afterAll): Clean up the server.
2072
2073 2013-04-26  Simon Cooper  <scooper@apple.com>
2074
2075         Permit ~/Library or ~/Library/Preferences to be symlinks
2076         https://bugs.webkit.org/show_bug.cgi?id=115142
2077         <rdar://problem/12953603>
2078
2079         Reviewed by Alexey Proskuryakov.
2080
2081         Pass in two new parameters which are the resolved paths to ~/Library
2082         and ~/Library/Preferences. Added new expansion functions and
2083         substituted the new functions for home-regex, home-subpath and
2084         home-literal for places referencing resources in "~/Library" or
2085         "~/Library/Preferences".
2086
2087         * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
2088         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2089         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
2090         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
2091         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
2092         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
2093         * Shared/mac/ChildProcessMac.mm:
2094         (WebKit::ChildProcess::initializeSandbox):
2095
2096 2013-04-26  Alexey Proskuryakov  <ap@apple.com>
2097
2098         [WK2] WKContextClient doesn't need to be versioned yet
2099         https://bugs.webkit.org/show_bug.cgi?id=115279
2100
2101         Reviewed by Anders Carlsson.
2102
2103         * Shared/APIClientTraits.cpp:
2104         * Shared/APIClientTraits.h:
2105         * UIProcess/API/C/WKContext.h:
2106
2107 2013-04-26  Anders Carlsson  <andersca@apple.com>
2108
2109         Downloads need to be converted from the NSURLConnection, not canceled and restarted, when using the NetworkProcess
2110         https://bugs.webkit.org/show_bug.cgi?id=115277
2111         <rdar://problem/12890184>
2112
2113         Reviewed by Sam Weinig.
2114
2115         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2116         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
2117         Ask the download manager to convert the main resource load to a download.
2118
2119         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2120         Add new message.
2121
2122         * NetworkProcess/NetworkResourceLoader.h:
2123         (WebKit::NetworkResourceLoader::handle):
2124         Add getter.
2125
2126         * Shared/Downloads/mac/DownloadMac.mm:
2127         (dispatchOnMainThread):
2128         Helper function that ensures that a given block is called on the main thread.
2129
2130         (-[WKDownloadAsDelegate downloadDidBegin:]):
2131         (-[WKDownloadAsDelegate download:didReceiveAuthenticationChallenge:]):
2132         (-[WKDownloadAsDelegate download:didReceiveResponse:]):
2133         (-[WKDownloadAsDelegate download:didReceiveDataOfLength:]):
2134         (-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
2135         (-[WKDownloadAsDelegate download:decideDestinationWithSuggestedFilename:]):
2136         (-[WKDownloadAsDelegate download:didCreateDestination:]):
2137         (-[WKDownloadAsDelegate downloadDidFinish:]):
2138         (-[WKDownloadAsDelegate download:didFailWithError:]):
2139         Use dispatchOnMainThread.
2140
2141         * UIProcess/WebPageProxy.cpp:
2142         (WebKit::WebPageProxy::receivedPolicyDecision):
2143         Remove code that cancels the current load and starts a new download.
2144
2145         * WebProcess/WebPage/WebFrame.cpp:
2146         (WebKit::WebFrame::convertMainResourceLoadToDownload):
2147         Send the ConvertMainResourceLoadToDownload message to the network process.
2148
2149 2013-04-25  Roger Fong  <roger_fong@apple.com>
2150
2151         Disable sub-pixel layout on mac.
2152         https://bugs.webkit.org/show_bug.cgi?id=114999.
2153
2154         Reviewed by Simon Fraser.
2155
2156         * Configurations/FeatureDefines.xcconfig:
2157
2158 2013-04-26  Simon Fraser  <simon.fraser@apple.com>
2159
2160         Inspector window is often blank when opened
2161         https://bugs.webkit.org/show_bug.cgi?id=115220
2162
2163         Reviewed by Tim Horton.
2164         
2165         After disabling tiled scrolling and accelerated drawing in r149006, the
2166         Inspector window was often missing its content after opening. This only
2167         happened when the user has a preference on disk to use accelerated drawing
2168         in the Inspector.
2169         
2170         The missing content was caused by a failure to connect the correct contextID
2171         for remote layer hosting. On window creation, we hook up a context using
2172         WindowServer layer hosting (the default), but then switch back to app-hosted
2173         layers for the Inspector window. This switching happens in didUpdateBackingStoreState(),
2174         but that can be re-entered via its call to sendUpdateBackingStoreState(). In
2175         that cause, on unwinding the stack it would call enterAcceleratedCompositingMode()
2176         with a stale layerTreeContext.
2177         
2178         Fix by moving the code that exits/enters accelerated compositing mode to before
2179         the call to sendUpdateBackingStoreState() that can cause re-entrancy. That avoids
2180         use of a possibly stale layerTreeContext.
2181
2182         * UIProcess/DrawingAreaProxyImpl.cpp:
2183         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
2184
2185 2013-04-26  Alexey Proskuryakov  <ap@apple.com>
2186
2187         Crashes under ResourceHandle::continueDidReceiveResponse when loading blobs
2188         https://bugs.webkit.org/show_bug.cgi?id=115273
2189
2190         Reviewed by Anders Carlsson.
2191
2192         Covered by multiple existing tests (when using NetworkProcess), including:
2193         - http/tests/fileapi/blob-url-in-subframe.html
2194         - http/tests/fileapi/create-blob-url-from-data-url.html
2195
2196         * NetworkProcess/NetworkResourceLoader.cpp:
2197         (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
2198         Work around BlobResourceHandle badness.
2199
2200 2013-04-26  Alexey Proskuryakov  <ap@apple.com>
2201
2202         [WK2] Remove NetworkResourceLoader::cleanupOnMainThread
2203         https://bugs.webkit.org/show_bug.cgi?id=115268
2204
2205         Reviewed by Brady Eidson.
2206
2207         All cleanup() callers are now on main thread, and this indirection only complicates debugging.
2208
2209         * NetworkProcess/NetworkResourceLoader.cpp:
2210         (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose):
2211         (WebKit::NetworkResourceLoader::abortInProgressLoad):
2212         (WebKit::NetworkResourceLoader::didFinishLoading):
2213         (WebKit::NetworkResourceLoader::didFail):
2214         * NetworkProcess/NetworkResourceLoader.h:
2215
2216 2013-04-26  Andy Estes  <aestes@apple.com>
2217
2218         [WebKit2] CustomProtocolManager's m_registeredSchemes HashSet can be accessed by multiple threads
2219         https://bugs.webkit.org/show_bug.cgi?id=115267
2220
2221         Reviewed by Alexey Proskuryakov.
2222
2223         * Shared/Network/CustomProtocols/CustomProtocolManager.h: Added a Mutex to protect m_registeredSchemes.
2224         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
2225         (WebKit::CustomProtocolManager::registerScheme): Acquired the mutex before accessing m_registeredSchemes.
2226         (WebKit::CustomProtocolManager::unregisterScheme): Ditto.
2227         (WebKit::CustomProtocolManager::supportsScheme): Ditto.
2228
2229 2013-04-26  Alexey Proskuryakov  <ap@apple.com>
2230
2231         Blobs are not associated with connection when there are no sandbox extensions
2232         https://bugs.webkit.org/show_bug.cgi?id=115264
2233
2234         Reviewed by Brady Eidson.
2235
2236         Covered by multiple fast/files tests when using NetworkProcess.
2237
2238         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
2239         (WebKit::NetworkBlobRegistry::registerBlobURL): Fixed a logic error.
2240
2241 2013-04-25  Andy Estes  <aestes@apple.com>
2242
2243         [WebKit2] Loading a resource from a custom protocol in a synchronous XHR times out
2244         https://bugs.webkit.org/show_bug.cgi?id=115223
2245
2246         Reviewed by Darin Adler.
2247
2248         When WebKit performs a synchronous load on the Mac, it spins a nested
2249         run loop in a mode that only accepts input from the NSURLConnection
2250         performing the load. When the load is for a custom protocol in WebKit2,
2251         we proxy it to the UI process via CoreIPC messages, but the response
2252         messages from the UI process are never processed as long as the run
2253         loop is in a non-common mode (and we wouldn't want to process messages
2254         that could re-enter WebCore in the middle of loading, anyway). Since
2255         these messages never make it back to the NSURLConnection handling the
2256         request, the connection eventually times out.
2257
2258         Fix this by using a work queue to handle custom protocol messages in
2259         the networking process. The work queue can process incoming custom
2260         protocol messages while the main thread is blocked.
2261
2262         * NetworkProcess/NetworkProcess.cpp:
2263         (WebKit::NetworkProcess::initializeConnection): Called
2264         initializeConnection() on all the NetworkProcess's supplements.
2265         * Shared/ChildProcessSupplement.h: Added a base class for
2266         NetworkProcessSupplement and WebProcessSupplement which defines
2267         initializeConnection and provides an empty default implementation.
2268         (WebKit::ChildProcessSupplement::~ChildProcessSupplement):
2269         (WebKit::ChildProcessSupplement::initializeConnection):
2270         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
2271         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
2272         (WebKit::CustomProtocolManager::CustomProtocolManager): Instantiated a
2273         work queue for message processing.
2274         (WebKit::CustomProtocolManager::initializeConnection): Added the work
2275         queue as a message receiver on the CoreIPC connection.
2276         (WebKit::CustomProtocolManager::initialize): If we're in the web
2277         process and the network process is being used, unregister and destroy
2278         the work queue we previously created. It'd be better to not create it
2279         in the first place, but we have to register our work queue with the
2280         CoreIPC connection before it is established, which is before the UI
2281         process has told us whether the network process is in use.
2282         * Shared/Network/NetworkProcessSupplement.h: Inherited from
2283         ChildProcessSupplement.
2284         * WebKit2.xcodeproj/project.pbxproj: Added ChildProcessSupplement.h.
2285         * WebProcess/WebProcess.cpp:
2286         (WebKit::WebProcess::initializeConnection): Called
2287         initializeConnection() on all the WebProcess's supplements.
2288         * WebProcess/WebProcessSupplement.h: Inherited from
2289         ChildProcessSupplement.
2290
2291 2013-04-26  Eduardo Lima Mitev  <elima@igalia.com>
2292
2293         [GTK] Compilation of ProcessLauncherGtk.cpp fails due to unresolved symbols
2294         https://bugs.webkit.org/show_bug.cgi?id=115240
2295
2296         Reviewed by Martin Robinson.
2297
2298         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: Includes sys/socket.h if OS is Linux
2299
2300 2013-04-25  Zan Dobersek  <zdobersek@igalia.com>
2301
2302         [GTK] Plugin process broken due to a missing symbol
2303         https://bugs.webkit.org/show_bug.cgi?id=114901
2304
2305         Reviewed by Gustavo Noronha Silva.
2306
2307         Work around the missing symbols in the WebKitPluginProcess by specifying the required libraries
2308         multiple times in the program's LDADD list. Libtool fights fiercely to avoid duplicate static library
2309         references among the linker arguments (even if using the --preserve-dup-deps flag) so the required libraries
2310         are specified in various ways.
2311
2312         The unresolved symbols in object files are no longer ignored as this can lead to further trouble (for instance
2313         this patch also adds a few missing source files to the list of WebKitPluginProcess sources). The Freetype and
2314         gamepad dependencies' libraries are also added to the binary's LDADD list.
2315
2316         * GNUmakefile.am:
2317         * GNUmakefile.list.am: Add a few missing files to the build.
2318
2319 2013-04-24  Chris Fleizach  <cfleizach@apple.com>
2320
2321         WEB SPEECH: language support does not work as expected
2322         https://bugs.webkit.org/show_bug.cgi?id=115119
2323
2324         Reviewed by Alexey Proskuryakov.
2325
2326         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2327         (InitWebCoreSystemInterface):
2328
2329 2013-04-25  Anders Carlsson  <andersca@apple.com>
2330
2331         Rename DecidePolicyForResponse message to DecidePolicyForResponseSync
2332         https://bugs.webkit.org/show_bug.cgi?id=115207
2333
2334         Reviewed by Beth Dakin.
2335
2336         In preparation for adding a new async DecidePolicyForResponse message,
2337         rename the current one to DecidePolicyForResponseSync. Also split out the async part
2338         into a separate WebPageProxy::decidePolicyForResponse member function.
2339
2340         * UIProcess/WebPageProxy.cpp:
2341         (WebKit::WebPageProxy::WebPageProxy):
2342         (WebKit::WebPageProxy::receivedPolicyDecision):
2343         (WebKit::WebPageProxy::decidePolicyForResponse):
2344         (WebKit::WebPageProxy::decidePolicyForResponseSync):
2345         * UIProcess/WebPageProxy.h:
2346         (WebPageProxy):
2347         * UIProcess/WebPageProxy.messages.in:
2348         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2349         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2350
2351 2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
2352
2353         Web Inspector: ConsoleMessage should include line and column number where possible
2354         https://bugs.webkit.org/show_bug.cgi?id=114929
2355
2356         Reviewed by Timothy Hatcher.
2357
2358         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2359         (WebKit::WebChromeClient::addMessageToConsole):
2360         * WebProcess/WebCoreSupport/WebChromeClient.h:
2361
2362 2013-04-25  Brady Eidson  <beidson@apple.com>
2363
2364         Thread safety issues in WKCustomProtocol.
2365         <rdar://problem/13247304> and https://bugs.webkit.org/show_bug.cgi?id=115185
2366
2367         Reviewed by Alexey Proskuryakov.
2368
2369         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
2370
2371         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
2372         (WebKit::CustomProtocolManager::addCustomProtocol): Protect m_customProtocolMap with its mutex.
2373         (WebKit::CustomProtocolManager::removeCustomProtocol): Ditto.
2374         (WebKit::CustomProtocolManager::didFailWithError):
2375         (WebKit::CustomProtocolManager::didLoadData):
2376         (WebKit::CustomProtocolManager::didReceiveResponse):
2377         (WebKit::CustomProtocolManager::didFinishLoading):
2378         (WebKit::CustomProtocolManager::protocolForID): Protect m_customProtocolMap with its mutex, and return
2379           a RetainPtr instead of a raw pointer.
2380
2381 2013-04-25  Jer Noble  <jer.noble@apple.com>
2382
2383         Further build fixes: correct two more misnames of WebProcessShim.dyld.
2384
2385         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
2386         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
2387         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
2388
2389 2013-04-25  Martin Robinson  <mrobinson@igalia.com>
2390
2391         Make gobject-introspection warnings non-fatal
2392         https://bugs.webkit.org/show_bug.cgi?id=115184
2393
2394         Reviewed by Carlos Garcia Campos.
2395
2396         * GNUmakefile.am: Make it so that gobject-introspection errors do not fail the buld
2397         until we get to a point where gobject-introspection gives consistent warnings.
2398
2399 2013-04-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2400
2401         [GTK] Add WebKitWebViewGroup to WebKit2 GTK+ API
2402         https://bugs.webkit.org/show_bug.cgi?id=111265
2403
2404         Reviewed by Anders Carlsson.
2405
2406         In the current API the settings are always shared by all web
2407         views, because they are always created on the default page
2408         group. This makes impossible to have different settings on
2409         different web views. Expose the page group in the API,
2410         so that users can create web views on a group different than the
2411         default one to have their own settings.
2412
2413         * GNUmakefile.list.am: Add new files to compilation.
2414         * UIProcess/API/gtk/WebKitSettings.cpp:
2415         (webkitSettingsGetPreferences): Helper private method to get the
2416         WebPreferences wrapped by a WebKitSettings object.
2417         * UIProcess/API/gtk/WebKitSettingsPrivate.h:
2418         * UIProcess/API/gtk/WebKitWebContext.cpp:
2419         (_WebKitWebContextPrivate): Add a default WebKitWebViewGroup.
2420         (webkitWebContextCreatePageForWebView): Create the WebPageProxy
2421         with the WebPageGroup of the given WebKitWebViewGroup.
2422         (webkitWebContextGetDefaultWebViewGroup): Helper private method to
2423         get the default WebKitWebViewGroup.
2424         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
2425         * UIProcess/API/gtk/WebKitWebView.cpp:
2426         (_WebKitWebViewPrivate): Add a WebKitWebViewGroup in case the view
2427         is created with a group.
2428         (webkitWebViewUpdateSettings): Keep a reference of the group
2429         settings to be able to disconnect the signals when the settings
2430         object is replaced in the view group and connect to the signals
2431         for the custom settings.
2432         (webkitWebViewSettingsChanged): Disconnect the signals for the
2433         previous settings and set the new settings.
2434         (webkitWebViewDisconnectSettingsChangedSignalHandler): Disconnect
2435         notify::settings signal of WebKitWebViewGroup.
2436         (webkitWebViewConstructed): Pass the current WebKitWebViewGroup to
2437         webkitWebContextCreatePageForWebView().
2438         (webkitWebViewSetProperty): Add setter for group property.
2439         (webkitWebViewGetProperty): Add getter for group property.
2440         (webkitWebViewDispose): Call
2441         webkitWebViewDisconnectSettingsChangedSignalHandler().
2442         (webkit_web_view_class_init): Add WebKitWebView:group property.
2443         (webkitWebViewHandleAuthenticationChallenge): Use
2444         webkit_web_view_get_settings().
2445         (webkit_web_view_new_with_group): Create a new web view with the
2446         given WebKitWebViewGroup.
2447         (webkit_web_view_get_group): Return the current WebKitWebViewGroup
2448         or the default one if the view was not created with
2449         webkit_web_view_new_with_group().
2450         (webkit_web_view_set_settings): Set the settings of the current
2451         WebKitWebViewGroup.
2452         (webkit_web_view_get_settings): Get the settings of the current
2453         WebKitWebViewGroup.
2454         (webkit_web_view_set_zoom_level): Use
2455         webkit_web_view_get_settings().
2456         (webkit_web_view_get_zoom_level): Ditto.
2457         * UIProcess/API/gtk/WebKitWebView.h:
2458         * UIProcess/API/gtk/WebKitWebViewGroup.cpp: Added.
2459         (_WebKitWebViewGroupPrivate):
2460         (webkitWebViewGroupSetProperty):
2461         (webkitWebViewGroupGetProperty):
2462         (webkitWebViewGroupConstructed):
2463         (webkit_web_view_group_class_init):
2464         (webkitWebViewGroupAttachSettingsToPageGroup): Set the
2465         WebPreferences of the current WebKitSettings to the WebPageGroup.
2466         (webkitWebViewGroupCreate): Create a new WebKitWebViewGroup for
2467         the given WebPageGroup.
2468         (webkitWebViewGroupGetPageGroup): Helper private method to get the
2469         WebPageGroup wrapped by the WebKitWebViewGroup.
2470         (webkit_web_view_group_new): Create a new WebKitWebViewGroup.
2471         (webkit_web_view_group_get_name): Return the name of a
2472         WebKitWebViewGroup.
2473         (webkit_web_view_group_get_settings): Get the settings of a
2474         WebKitWebViewGroup.
2475         (webkit_web_view_group_set_settings): Set new settings of a
2476         WebKitWebViewGroup.
2477         * UIProcess/API/gtk/WebKitWebViewGroup.h: Added.
2478         (_WebKitWebViewGroup):
2479         (_WebKitWebViewGroupClass):
2480         * UIProcess/API/gtk/WebKitWebViewGroupPrivate.h: Added.
2481         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
2482         WebKitWebViewGroup section.
2483         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
2484         * UIProcess/API/gtk/docs/webkit2gtk.types: Add
2485         webkit_web_view_group_get_type.
2486         * UIProcess/API/gtk/tests/GNUmakefile.am: Add new files to
2487         compilation.
2488         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2489         (testWebViewSettings): We can't watch settings in the default view
2490         group anymore, because they are not released with the web view but
2491         with the web context that is freed after the Test destructor.
2492         * UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp: Added.
2493         (testWebViewGroupDefault):
2494         (testWebViewGroupNewGroup):
2495         (testWebViewNewWithGroup):
2496         (testWebViewGroupSettings):
2497         (beforeAll):
2498         (afterAll):
2499         * UIProcess/API/gtk/webkit2.h: Include WebKitWebViewGroup.h.
2500
2501 2013-04-25  Jer Noble  <jer.noble@apple.com>
2502
2503         Unreviewed build fix: Fix the name of DyldInterpose.h in
2504         SecItemShimLibrary.mm, fix the name of WebProcessShim.dyld in
2505         WebContentServiceEntryPoint.mm, and stop linking against libWTF.a
2506         directly (which means removing ASSERTs from
2507         CookieStorageShimLibrary.cpp).
2508
2509         * Shared/mac/CookieStorageShimLibrary.cpp:
2510         (WebKit::shimCFHTTPCookieStorageCopyRequestHeaderFieldsForURL):
2511         (WebKit::WebKitCookieStorageShimInitialize):
2512         * WebKit2.xcodeproj/project.pbxproj:
2513         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
2514         (WebContentServiceInitializer):
2515         * WebProcess/mac/SecItemShimLibrary.mm:
2516
2517 2013-04-24  Tim Horton  <timothy_horton@apple.com>
2518
2519         PDFPlugin: Cursor should become an i-beam when over selectable text
2520         https://bugs.webkit.org/show_bug.cgi?id=115018
2521         <rdar://problem/12645012>
2522
2523         Reviewed by Alexey Proskuryakov.
2524
2525         * WebProcess/Plugins/PDF/PDFPlugin.h:
2526         Add updateCursor(), the UpdateCursorMode and HitTestResult enums, and
2527         storage for the last PDF hit test result.
2528         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2529         (WebKit::PDFPlugin::updateCursor):
2530         Hit test the PDF. If there is a word under the cursor, use the I-beam cursor,
2531         otherwise, use the default pointer cursor. This approximates PDFKit's behavior,
2532         though does not match it precisely in the case of annotations.
2533         Only send the cursor update to the UIProcess if it is a change, or if
2534         we're explicitly asked to update.
2535         (WebKit::PDFPlugin::handleMouseEvent):
2536         If we're processing a mouse moved event, update the cursor if needed.
2537         (WebKit::PDFPlugin::handleMouseEnterEvent):
2538         If the cursor just moved over the PDFPlugin, force-update the cursor,
2539         even if it matches the previously-set cursor (because something else
2540         likely updated the cursor while it was not over the PDFPlugin).
2541
2542 2013-04-24  Tim Horton  <timothy_horton@apple.com>
2543
2544         Page Overlays shouldn't waste time flushing layers if we're not going to use it
2545         https://bugs.webkit.org/show_bug.cgi?id=115145
2546
2547         Reviewed by Simon Fraser.
2548
2549         Don't flush the page overlay layer when it's installed - it starts out
2550         with paintContents=false, so we don't really need a CALayer yet. We'll
2551         flush later if need be.
2552
2553         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2554         (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
2555
2556 2013-04-24  Jer Noble  <jer.noble@apple.com>
2557
2558         Further unreviewed build fix; CFNetwork.framework is the one which Lion
2559         refuses to link against.
2560
2561         * WebKit2.xcodeproj/project.pbxproj:
2562
2563 2013-04-24  Jer Noble  <jer.noble@apple.com>
2564
2565         Unreviewed build fix; link against CoreServices.framework instead of against
2566         CoreFoundation.framework directly, to make the linker happy on Lion.
2567
2568         * WebKit2.xcodeproj/project.pbxproj:
2569
2570 2013-04-22  Jer Noble  <jer.noble@apple.com>
2571
2572         WWDC session videos don’t play at developer.apple.com
2573         https://bugs.webkit.org/show_bug.cgi?id=114858
2574
2575         Reviewed by Eric Carlson. Rubber stamped by Brady Eidson.
2576
2577         AVFoundation uses CFNetwork to store and retrieve cookies from the global store.
2578         However, in the case where network access happens in the NetworkProcess, session
2579         cookies are stored in-memory, and are not accessable in the WebProcess. Until such
2580         a time as AVFoundation can provide an API which would allow us to provide cookies
2581         for a specific request, we will interpose the CFNetwork method which they use to
2582         retrieve the cookie string from the cookie store for their pending request.
2583
2584         Duplicate the previous SecItemShim target to a new, WebProcessShim target. This
2585         target includes the SecItemShim functionality, but will add a new shim for cookie
2586         retrieval:
2587         * Shared/mac/CookieStorageShimLibrary.h: Added
2588         (CookieStorageShimCallbacks):
2589         * Shared/mac/CookieStorageShimLibrary.cpp: Added.
2590         (WebKit::ShimProtector::ShimProtector): A simple stack-based counter class.
2591         (WebKit::ShimProtector::~ShimProtector):
2592         (WebKit::ShimProtector::count):
2593         (WebKit::shimCFHTTPCookieStorageCopyRequestHeaderFieldsForURL): Interpose
2594             the CFNetwork call, and pass to the registered callback.
2595         (WebKit::WebKitCookieStorageShimInitialize): Register the callbacks.
2596
2597         Add a helper singleton class which will talk to the shim through the 
2598         registered callbacks:
2599         * Shared/mac/CookieStorageShim.h: Added
2600         (WebKit::CookieStorageShim::CookieStorageShim):
2601         * Shared/mac/CookieStorageShim.cpp: Added.
2602         (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL): Pass the request
2603             over to the NetworkProcess.
2604         (WebKit::CookieStorageShim::shared): Simple singleton.
2605         (WebKit::CookieStorageShim::initialize): Call the library initializer.
2606
2607         Initialize the shim only when the WebProcess is delegating network loading
2608         to the NetworkProcess:
2609         * WebProcess/WebProcess.cpp:
2610         (WebKit::WebProcess::initializeWebProcess):
2611
2612         Rename the WebProcess's shim from SecItemShim -> WebProcessShim:
2613         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2614         (WebKit::addDYLDEnvironmentAdditions):
2615         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
2616         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
2617         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
2618         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
2619         (WebContentServiceInitializer):
2620
2621         As the DYLD_INTERPOSE macro is used in multiple files now, put it in its
2622         own header:
2623         * Shared/mac/DyldInterpose.h: Added.
2624         * PluginProcess/mac/PluginProcessShim.mm:
2625         * WebProcess/mac/SecItemShimLibrary.mm:
2626
2627         Add new files to the project:
2628         * WebKit2.xcodeproj/project.pbxproj:
2629
2630 2013-04-24  Byungwoo Lee  <bw80.lee@samsung.com>
2631
2632         [EFL] Fix build error after r148963.
2633         https://bugs.webkit.org/show_bug.cgi?id=115126
2634
2635         Reviewed by Laszlo Gombos.
2636
2637         Generate forwarding headers for 'CoordinatedGraphics' to generate WKView.h
2638
2639         * PlatformEfl.cmake:
2640
2641 2013-04-24  Anders Carlsson  <andersca@apple.com>
2642
2643         Crash when trying to determine the length of an invalid message
2644         https://bugs.webkit.org/show_bug.cgi?id=115127
2645         <rdar://problem/13700736>
2646
2647         Reviewed by Beth Dakin.
2648
2649         Use message instead of incomingMessage since incomingMessage will always be null.
2650
2651         * Platform/CoreIPC/Connection.cpp:
2652         (CoreIPC::Connection::processIncomingMessage):
2653
2654 2013-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2655
2656         [GTK] Use stamp files for generate-forwarding-headers makefile rules
2657         https://bugs.webkit.org/show_bug.cgi?id=115118
2658
2659         Reviewed by Martin Robinson.
2660
2661         Use a stamp file for the WebKit2 forwarding generator rule. Also
2662         fix the rule dependencies that pointed to a non existent variable.
2663
2664         * GNUmakefile.am:
2665
2666 2013-04-24  Zan Dobersek  <zdobersek@igalia.com>
2667
2668         [GTK][WK2] Implement LayerTreeHostGtk::pageBackgroundTransparencyChanged
2669         https://bugs.webkit.org/show_bug.cgi?id=115094
2670
2671         Reviewed by Tim Horton.
2672
2673         The method was introduced in r149004 (and a stub implementation for the GTK port added in r149017).
2674         Implement the method for the GTK port in the same manner it is implemented under the Mac port,
2675         calling setContentsOpaque on the non-composited content layer.
2676
2677         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2678         (WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged):
2679
2680 2013-04-24  Simon Cooper  <scooper@apple.com>
2681
2682         <rdar://problem/13614117> Refine the Flash Player profile
2683         https://bugs.webkit.org/show_bug.cgi?id=115016
2684
2685         Reviewed by Alexey Proskuryakov.
2686
2687         Add some refinements to the Flash Player profile. Make a non-/ home
2688         directory work. Fixes that allow file uploading via user selected files.
2689
2690         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
2691
2692 2013-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2693
2694         [WebKit2] Add CoordinatedGraphics to the list of platforms in generate-forwarding-headers.pl
2695         https://bugs.webkit.org/show_bug.cgi?id=115098
2696
2697         Reviewed by Martin Robinson.
2698
2699         r148963 introduced a new WKView.h header in a directory not listed
2700         as a platform prefix in generate-forwarding-headers.pl.
2701
2702         * Scripts/generate-forwarding-headers.pl: Replace unused chromium
2703         plaform prefix with CoordinatedGraphics that is used now.
2704
2705 2013-04-24  Seokju Kwon  <seokju.kwon@gmail.com>
2706
2707         Web Inspector: Add number to list from remote web inspector.
2708         https://bugs.webkit.org/show_bug.cgi?id=115014
2709
2710         Reviewed by Benjamin Poulain.
2711
2712         * UIProcess/InspectorServer/front-end/inspectorPageIndex.html:
2713
2714 2013-04-24  Vlad Vasilyeu  <vasvlad@gmail.com>
2715
2716         --minimal build fails with error: Source/WebKit2/Platform/CoreIPC/ArgumentCoder.h:44:36: error: decode is not a member of WebCore::TextCheckingResult
2717         https://bugs.webkit.org/show_bug.cgi?id=114367
2718
2719         Reviewed by Benjamin Poulain.
2720
2721         Include WebCoreArgumentCoders.h to WebEditorClientEfl.cpp from
2722         WebKit2/Shared/ for successfully building with option --minimal
2723
2724         * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
2725
2726 == Rolled over to ChangeLog-2013-04-24 ==