Crash when starting a download before the network process has been launched
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-01-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         Crash when starting a download before the network process has been launched
4         https://bugs.webkit.org/show_bug.cgi?id=126258
5
6         Reviewed by Anders Carlsson.
7
8         We need to ensure there's a network process running before
9         starting a new download like we do when using the web process.
10
11         * UIProcess/WebContext.cpp:
12         (WebKit::WebContext::download): Use ChildProcessProxy::send()
13         instead of using the connection to make sure messages are queued
14         if the process is still launching.
15         (WebKit::WebContext::createDownloadProxy): Call
16         ensureNetworkProcess() before creating the download proxy.
17
18 2014-01-09  Carlos Garcia Campos  <cgarcia@igalia.com>
19
20         [SOUP] Partial file left on disk after a download fails or is cancelled in WebKit2
21         https://bugs.webkit.org/show_bug.cgi?id=126686
22
23         Reviewed by Martin Robinson.
24
25         We are currently writing the downloads directly into the
26         destination, and when a download fails or is cancelled after the
27         destination has been decided, the partial file is left on the
28         disk. Deleting the final file is not safe because there might be a
29         race condition, so we can use an intermediate file like other
30         browsers do, a file in the same directory than the target
31         destination but with .wkdownload suffix, that is removed when the
32         download fails or is cancelled. If the download finishes
33         successfully the intermediate file is renamed to the final
34         destination.
35
36         * Shared/Downloads/soup/DownloadSoup.cpp:
37         (WebKit::DownloadClient::deleteIntermediateFileInNeeded): Delete
38         the intermdiate file if it's been created already.
39         (WebKit::DownloadClient::downloadFailed): Call deleteIntermediateFileInNeeded.
40         (WebKit::DownloadClient::didReceiveResponse): Do not create a
41         SoupMessage for the given ResourceResponse that is not used, cache
42         the ResourceResponse instead. Create the intermediate file and use
43         it instead of the final destination.
44         (WebKit::DownloadClient::didReceiveData): Use the cached
45         ResourceResponse directly.
46         (WebKit::DownloadClient::didFinishLoading): Rename the
47         intermediate file to the final destination and write the metadata
48         in the final target destination.
49         (WebKit::DownloadClient::cancel): Handle the download cancellation
50         here, removing the intermediate file is needed and cancelling the
51         ResourceHandle and the download.
52         (WebKit::DownloadClient::handleResponseLater):
53         (WebKit::Download::cancel): Let the client handle the cancellation.
54
55 2014-01-08  Jinwoo Song  <jinwoo7.song@samsung.com>
56
57         WebKit2 EFL build fix after r161530
58         https://bugs.webkit.org/show_bug.cgi?id=126678
59
60         Reviewed by Tim Horton.
61
62         Add PLATFORM(MAC) guards around setExposedRect() and exposedRect()
63         in DrawingArea and WebFrameLoaderClient.
64
65         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
66         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
67         * WebProcess/WebPage/DrawingArea.h:
68
69 2014-01-08  Martin Hock  <mhock@apple.com>
70
71         Stub for Session API
72         https://bugs.webkit.org/show_bug.cgi?id=126626
73
74         Reviewed by Sam Weinig.
75
76         * Shared/API/c/WKBase.h:
77         * Shared/API/c/WKSharedAPICast.h:
78         * Shared/APIObject.h:
79         * UIProcess/API/C/WKSessionRef.cpp: Added.
80         (WKSessionGetTypeID):
81         (WKSessionGetEphemeral):
82         * UIProcess/API/C/WKSessionRef.h: Added.
83         * UIProcess/API/Cocoa/WKSession.h: Added.
84         * UIProcess/API/Cocoa/WKSession.mm: Added.
85         (-[WKSession dealloc]):
86         (-[WKSession ephemeral]):
87         (-[WKSession API::]):
88         * UIProcess/API/Cocoa/WKSessionInternal.h: Added.
89         (WebKit::wrapper):
90         * UIProcess/APISession.cpp: Added.
91         (API::Session::Session):
92         (API::Session::create):
93         (API::Session::isEphemeral):
94         (API::Session::~Session):
95         * UIProcess/APISession.h: Added.
96         * WebKit2.xcodeproj/project.pbxproj:
97
98 2014-01-08  Claudio Saavedra  <csaavedra@igalia.com>
99
100         [GTK] Add xdg.origin.url extended attribute to downloads
101         https://bugs.webkit.org/show_bug.cgi?id=126638
102
103         Reviewed by Carlos Garcia Campos.
104
105         This is proposed by fdo in
106         http://www.freedesktop.org/wiki/CommonExtendedAttributes/
107
108         * Shared/Downloads/soup/DownloadSoup.cpp:
109         (WebKit::DownloadClient::didReceiveResponse):
110
111 2014-01-08  Simon Fraser  <simon.fraser@apple.com>
112
113         Make WK2 build when ENABLE(ASYNC_SCROLLING) is not defined
114         https://bugs.webkit.org/show_bug.cgi?id=126675
115
116         Reviewed by Tim Horton.
117         
118         We need a stub RemoteScrollingCoordinatorTransaction outside
119         the #ifdef so that RemoteLayerTreeDrawingAreaProxy messages
120         work.
121
122         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
123         (WebKit::RemoteScrollingCoordinatorTransaction::encode):
124         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
125         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
126         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
127         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
128         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
129         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
130
131 2014-01-08  Tim Horton  <timothy_horton@apple.com>
132
133         TileController can fail to receive exposedRect from the drawing area if set at the wrong time
134         https://bugs.webkit.org/show_bug.cgi?id=126536
135
136         Reviewed by Simon Fraser.
137
138         * Configurations/WebKit2.xcconfig:
139         * UIProcess/API/mac/WKView.mm:
140         (-[WKView _updateViewExposedRect]):
141         * UIProcess/DrawingAreaProxy.cpp:
142         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
143         (WebKit::DrawingAreaProxy::setExposedRect):
144         (WebKit::DrawingAreaProxy::exposedRectChangedTimerFired):
145         * UIProcess/DrawingAreaProxy.h:
146         (WebKit::DrawingAreaProxy::exposedRect):
147         * UIProcess/WebPageProxy.cpp:
148         (WebKit::WebPageProxy::WebPageProxy):
149         (WebKit::WebPageProxy::close):
150         * UIProcess/WebPageProxy.h:
151         Move exposedRect stuff from WebPageProxy to DrawingAreaProxy.
152
153         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
154         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
155         Push the exposedRect down into WebCore.
156
157         * WebProcess/WebPage/DrawingArea.h:
158         * WebProcess/WebPage/DrawingArea.messages.in:
159         * WebProcess/WebPage/WebPage.cpp:
160         * WebProcess/WebPage/WebPage.h:
161         * WebProcess/WebPage/WebPage.messages.in:
162         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
163         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
164         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
165         (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
166         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
167         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
168         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
169         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
170         (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
171         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
172         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
173         (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
174         Get rid of "clipsToExposedRect", we just use infinite-ness of the rect
175         to indicate that now.
176         Don't scroll an infinite rect; it won't work.
177
178 2014-01-08  Simon Fraser  <simon.fraser@apple.com>
179
180         Add ENABLE(ASYNC_SCROLLING) guards around WK2 scrolling files
181         https://bugs.webkit.org/show_bug.cgi?id=126672
182
183         Reviewed by Tim Horton.
184         
185         Protected WK2 scrolling files with ENABLE(ASYNC_SCROLLING) guards.
186
187         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
188         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
189         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
190         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
191         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
192         * UIProcess/Scrolling/RemoteScrollingTree.h:
193         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
194         * WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in:
195         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
196
197 2014-01-08  Ryuan Choi  <ryuan.choi@samsung.com>
198
199         [EFL][WK2] Add API to execute js script
200         https://bugs.webkit.org/show_bug.cgi?id=101904
201
202         Reviewed by Gyuyoung Kim.
203
204         Add ewk_view_script_execute() which provides a way to execute user
205         script.
206
207         * UIProcess/API/efl/ewk_context.cpp:
208         Added JS Global Contexta which is required to deserialize to the script
209         value from the callback.
210         (EwkContext::EwkContext):
211         (EwkContext::~EwkContext):
212         (EwkContext::jsGlobalContext):
213         * UIProcess/API/efl/ewk_context_private.h:
214         * UIProcess/API/efl/ewk_view.cpp:
215         (Ewk_View_Script_Execute_Callback_Context::Ewk_View_Script_Execute_Callback_Context):
216         (runJavaScriptCallback):
217         (ewk_view_script_execute):
218         * UIProcess/API/efl/ewk_view.h:
219         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
220         Added unit test for ewk_view_script_execute.
221         (scriptExecuteCallback):
222         (TEST_F):
223
224 2014-01-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
225
226         [EFL] Move efl API test binaries to TestWebKitAPI/EWebKit|EWebKit2
227         https://bugs.webkit.org/show_bug.cgi?id=126615
228
229         Reviewed by Martin Robinson.
230
231         Now EFL API test binaries created in *bin* directory with other executables.
232         It would be good to move them to their folder. This patch moves them to
233         *TestWebKitAPI/EWebKit|EWebKit2* directories.
234
235         * PlatformEfl.cmake:
236
237 2014-01-08  Anders Carlsson  <andersca@apple.com>
238
239         Add WTF::StringView and use it for grammar checking
240         https://bugs.webkit.org/show_bug.cgi?id=126644
241
242         Reviewed by Antti Koivisto.
243
244         Use a StringView and remove a FIXME.
245
246         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
247         (WebKit::WebEditorClient::checkTextOfParagraph):
248         * WebProcess/WebCoreSupport/WebEditorClient.h:
249
250 2014-01-08  Zan Dobersek  <zdobersek@igalia.com>
251
252         [Automake] Scripts for generated build targets do not necessarily produce their output
253         https://bugs.webkit.org/show_bug.cgi?id=126378
254
255         Reviewed by Carlos Garcia Campos.
256
257         * GNUmakefile.am: Don't pass the -n option to the ln command that links the build's include
258         directories to actual source directories. This doesn't replace the original symbolic link,
259         which can lead to the actual link being older than its dependencies and subsequent constant
260         relinking at every build.
261
262 2014-01-07  Eric Carlson  <eric.carlson@apple.com>
263
264         Teach MediaSessionManager to manage interruptions
265         https://bugs.webkit.org/show_bug.cgi?id=126530
266
267         Reviewed by Sam Weinig.
268
269         * CMakeLists.txt: Add ${WEBCORE_DIR}/platform/animation to WebCore include directories.
270
271 2014-01-07  Jinwoo Song  <jinwoo7.song@samsung.com>
272
273         [EFL][WK2] Fix failing ewk_view_page_contents_get() API test
274         https://bugs.webkit.org/show_bug.cgi?id=126609
275
276         Reviewed by Gyuyoung Kim.
277
278         Compare the amount of bytes in the expected result file with
279         the size of callback data from the API since the 'Date' field
280         and the boundaries will be different on each case.
281         Refered the test case of GTK port.
282
283         * UIProcess/API/efl/tests/resources/resultMHTML.mht: Added.
284         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
285         (EWK2ViewTest::PageContentsAsMHTMLCallback):
286
287 2014-01-07  Seokju Kwon  <seokju@webkit.org>
288
289         Web Inspector: Remove leftover 'device metrics' code
290         https://bugs.webkit.org/show_bug.cgi?id=126607
291
292         Reviewed by Joseph Pecoraro.
293
294         * mac/WebKit2.order: Update after removing InspectorClient::overrideDeviceMetrics().
295
296 2014-01-07  Simon Fraser  <simon.fraser@apple.com>
297
298         Fix the build. The WebKit2 project copied all of WebKit2/Scripts/webkit2 into WebKit2.framework/PrivateHeaders,
299         but that's bad because there are test result files in there now. Fix by having the project copy specific
300         .py files into rivateHeaders/webkit2
301
302         * WebKit2.xcodeproj/project.pbxproj:
303
304 2014-01-07  Simon Fraser  <simon.fraser@apple.com>
305
306         Make it possible for MessageReceivers to pass messages to their superclass, and use it for RemoteLayerTreeDrawingAreaProxy
307         https://bugs.webkit.org/show_bug.cgi?id=126558
308
309         Reviewed by Anders Carlsson.
310         
311         In a message.in file it's now possible to say:
312         
313         messages -> Subclass : Superclass { ... } and the generated code will
314         call Superclass::didReceiveMessage().
315         
316         Use this to have RemoteLayerTreeDrawingAreaProxy pass messages up to
317         DrawingAreaProxy.
318
319         * Scripts/webkit2/messages.py:
320         (generate_message_handler):
321         * Scripts/webkit2/model.py:
322         (MessageReceiver.__init__):
323         * Scripts/webkit2/parser.py:
324         (parse):
325         * UIProcess/DrawingAreaProxy.h:
326         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in:
327
328 2014-01-07  Simon Fraser  <simon.fraser@apple.com>
329
330         Add message-generation test for non-legacy message receiver
331         https://bugs.webkit.org/show_bug.cgi?id=126603
332
333         Reviewed by Anders Carlsson.
334         
335         Add expected output files for a non-legacy message receiver, and add
336         testing for same.
337
338         * Scripts/webkit2/LegacyMessageReceiver-expected.cpp: Copied from Source/WebKit2/Scripts/webkit2/MessageReceiver-expected.cpp.
339         * Scripts/webkit2/LegacyMessages-expected.h: Added.
340         * Scripts/webkit2/MessageReceiver-expected.cpp:
341         (WebKit::WebPage::didReceiveMessage):
342         (WebKit::WebPage::didReceiveSyncMessage):
343         * Scripts/webkit2/messages_unittest.py:
344         (MessagesTest.setUp):
345         (ParsingTest.test_receiver):
346         (HeaderTest.test_header):
347         (ReceiverImplementationTest.test_receiver_implementation):
348         * Scripts/webkit2/test-legacy-messages.in: Copied from Source/WebKit2/Scripts/webkit2/test-messages.in.
349         * Scripts/webkit2/test-messages.in:
350
351 2014-01-07  Simon Fraser  <simon.fraser@apple.com>
352
353         Move expected results out of messages_unittest.py into separate files
354         https://bugs.webkit.org/show_bug.cgi?id=126602
355
356         Reviewed by Anders Carlsson.
357         
358         Uninline the test input and output from messages_unittest.py to make
359         it easier to add more tests.
360
361         * Scripts/webkit2/MessageReceiver-expected.cpp: Added.
362         (WebKit::WebPage::didReceiveWebPageMessage):
363         (WebKit::WebPage::didReceiveSyncWebPageMessage):
364         * Scripts/webkit2/Messages-expected.h: Added.
365         * Scripts/webkit2/messages_unittest.py:
366         (ParsingTest.test_receiver):
367         * Scripts/webkit2/test-messages.in: Added.
368
369 2014-01-07  Commit Queue  <commit-queue@webkit.org>
370
371         Unreviewed, rolling out r161447.
372         http://trac.webkit.org/changeset/161447
373         https://bugs.webkit.org/show_bug.cgi?id=126592
374
375         needs some more work (Requested by thorton on #webkit).
376
377         * UIProcess/API/mac/WKView.mm:
378         (-[WKView _updateViewExposedRect]):
379         * UIProcess/DrawingAreaProxy.cpp:
380         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
381         * UIProcess/DrawingAreaProxy.h:
382         * UIProcess/WebPageProxy.cpp:
383         (WebKit::WebPageProxy::WebPageProxy):
384         (WebKit::WebPageProxy::close):
385         (WebKit::WebPageProxy::viewExposedRectChanged):
386         (WebKit::WebPageProxy::exposedRectChangedTimerFired):
387         * UIProcess/WebPageProxy.h:
388         (WebKit::WebPageProxy::viewExposedRect):
389         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
390         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
391         * WebProcess/WebPage/DrawingArea.h:
392         (WebKit::DrawingArea::setExposedRect):
393         (WebKit::DrawingArea::setClipsToExposedRect):
394         * WebProcess/WebPage/DrawingArea.messages.in:
395         * WebProcess/WebPage/WebPage.cpp:
396         (WebKit::WebPage::viewExposedRectChanged):
397         * WebProcess/WebPage/WebPage.h:
398         * WebProcess/WebPage/WebPage.messages.in:
399         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
400         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
401         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
402         (WebKit::RemoteLayerTreeDrawingArea::setClipsToExposedRect):
403         (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
404         (WebKit::RemoteLayerTreeDrawingArea::updateMainFrameClipsToExposedRect):
405         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
406         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
407         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
408         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
409         (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect):
410         (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
411         (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
412         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
413         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
414         (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
415
416 2014-01-07  Tim Horton  <timothy_horton@apple.com>
417
418         TileController can fail to receive exposedRect from the drawing area if set at the wrong time
419         https://bugs.webkit.org/show_bug.cgi?id=126536
420
421         Reviewed by Anders Carlsson.
422
423         * UIProcess/API/mac/WKView.mm:
424         (-[WKView _updateViewExposedRect]):
425         * UIProcess/DrawingAreaProxy.cpp:
426         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
427         (WebKit::DrawingAreaProxy::setExposedRect):
428         (WebKit::DrawingAreaProxy::exposedRectChangedTimerFired):
429         * UIProcess/DrawingAreaProxy.h:
430         (WebKit::DrawingAreaProxy::exposedRect):
431         * UIProcess/WebPageProxy.cpp:
432         (WebKit::WebPageProxy::WebPageProxy):
433         (WebKit::WebPageProxy::close):
434         * UIProcess/WebPageProxy.h:
435         Move exposedRect stuff from WebPageProxy to DrawingAreaProxy.
436
437         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
438         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
439         Push the exposedRect down into WebCore.
440
441         * WebProcess/WebPage/DrawingArea.h:
442         * WebProcess/WebPage/DrawingArea.messages.in:
443         * WebProcess/WebPage/WebPage.cpp:
444         * WebProcess/WebPage/WebPage.h:
445         * WebProcess/WebPage/WebPage.messages.in:
446         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
447         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
448         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
449         (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
450         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
451         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
452         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
453         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
454         (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
455         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
456         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
457         (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
458         Get rid of "clipsToExposedRect", we just use infinite-ness of the rect
459         to indicate that now.
460         Don't scroll an infinite rect; it won't work.
461
462 2014-01-07  Carlos Garcia Campos  <cgarcia@igalia.com>
463
464         Crash when trying to register a custom scheme before network process has been launched
465         https://bugs.webkit.org/show_bug.cgi?id=126385
466
467         Reviewed by Anders Carlsson.
468
469         WebContext::registerSchemeForCustomProtocol() uses
470         sendToNetworkingProcess() to send the message to the appropriate
471         networking process. In the case of using web process,
472         sendToNetworkingProcess() first checks if there's already a web
473         process, doing nothing otherwise, but when using the network
474         process it assumes there's already a network process. In both
475         cases it's safe to do nothing, because the schemes will be passed
476         as creation parameters to the process when launched.
477
478         * UIProcess/WebContext.h:
479         (WebKit::WebContext::sendToNetworkingProcess):
480
481 2014-01-07  Jinwoo Song  <jinwoo7.song@samsung.com>
482
483         WebKit2 EFL build fix after r161387
484         https://bugs.webkit.org/show_bug.cgi?id=126566
485
486         Reviewed by Andreas Kling.
487
488         Add missing ASYNC_SCROLLING macro.
489
490         * UIProcess/WebPageProxy.h:
491         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
492         * WebProcess/WebCoreSupport/WebChromeClient.h:
493         * WebProcess/WebPage/WebPage.cpp:
494         * WebProcess/WebPage/WebPage.h:
495
496 2014-01-06  Simon Fraser  <simon.fraser@apple.com>
497
498         Hook up the RemoteScrollingCoordinator
499         https://bugs.webkit.org/show_bug.cgi?id=126547
500
501         Reviewed by Tim Horton.
502         
503         Hook up the RemoteScrollingCoordinator in WebKit2.
504         
505         When the RemoteLayerTreeDrawingArea is in use, WebPageProxy creates
506         a RemoteScrollingCoordinator, and hands it mouseWheel events. It then
507         scrolls via a RemoteScrollingTree constructed from state tree commits from the
508         WebProcess.
509         
510         Scrolling tree commits happen via a transaction received by RemoteLayerTreeDrawingAreaProxy,
511         atomically with layer tree transactions.
512
513         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
514         (WebKit::RemoteScrollingCoordinatorTransaction::encode): Fix encoding for some
515         cases seen in WebKitTestRunner where a page has no ScrollingCoordinator.
516         * UIProcess/WebPageProxy.cpp:
517         (WebKit::WebPageProxy::initializeWebPage): Create the RemoteScrollingCoordinatorProxy
518         when using a remote layer tree drawing area.
519         (WebKit::WebPageProxy::handleWheelEvent): Pass to the scrolling coordinator.
520         * UIProcess/WebPageProxy.h:
521         (WebKit::WebPageProxy::scrollingCoordinatorProxy):
522         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h: Include the RemoteScrollingCoordinatorTransaction.
523         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in:
524         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
525         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
526         * UIProcess/mac/RemoteLayerTreeHost.mm:
527         (WebKit::RemoteLayerTreeHost::getLayer): It's valid to get a 0 layerID (e.g. when
528         a layer disappears) so handle this case.
529         * WebKit2.xcodeproj/project.pbxproj:
530         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
531         (WebKit::WebChromeClient::createScrollingCoordinator): Override to create the
532         RemoteScrollingCoordinator in the WebProcess.
533         * WebProcess/WebCoreSupport/WebChromeClient.h:
534         * WebProcess/WebPage/WebPage.cpp:
535         (WebKit::WebPage::scrollingCoordinator): Not inline to avoid polluting the
536         header with #includes.
537         * WebProcess/WebPage/WebPage.h:
538         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h: Say that we want a ScrollingCoordinator.
539         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
540         (WebKit::RemoteLayerTreeDrawingArea::flushLayers): Add the scrollingTransaction to the
541         message.
542
543 2014-01-06  Jaehun Lim  <ljaehun.lim@samsung.com>
544
545         Use hasEnabledVerticalScrollbar instead of hasEnabledHorizontalScrollbar.
546         https://bugs.webkit.org/show_bug.cgi?id=126546
547
548         Reviewed by Simon Fraser.
549
550         hasEnabledHorizontalScrollbar is used twice.
551
552         * Shared/WebCoreArgumentCoders.cpp:
553         (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::encode):
554
555 2014-01-06  Simon Fraser  <simon.fraser@apple.com>
556
557         Another build fix.
558         
559         Need to look in the WebProcess/Scrolling directory for .messages.in files.
560
561         * DerivedSources.make:
562
563 2014-01-06  Simon Fraser  <simon.fraser@apple.com>
564
565         Fix the build.
566         
567         Need to add RemoteScrollingCoordinator to MESSAGE_RECEIVERS so that
568         RemoteScrollingCoordinatorMessages.h gets generated.
569
570         * DerivedSources.make:
571
572 2014-01-06  Simon Fraser  <simon.fraser@apple.com>
573
574         Rename DrawingArea::supportsThreadedScrolling() to supportsAsyncScrolling()
575         https://bugs.webkit.org/show_bug.cgi?id=126529
576
577         Reviewed by Tim Horton.
578         
579         Change function name from using "threaded" to "async" terminology.
580
581         * WebProcess/WebPage/DrawingArea.h:
582         (WebKit::DrawingArea::supportsAsyncScrolling):
583         * WebProcess/WebPage/WebPage.cpp:
584         (WebKit::WebPage::WebPage):
585         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
586
587 2014-01-06  Simon Fraser  <simon.fraser@apple.com>
588
589         Add new files for UI-side scrolling
590         https://bugs.webkit.org/show_bug.cgi?id=126532
591
592         Reviewed by Anders Carlson.
593         
594         Add RemoteScrollingCoordinator, RemoteScrollingCoordinatorProxy,
595         RemoteScrollingCoordinatorTransaction, RemoteScrollingTree. 
596         
597         These allow the scrolling tree to be used in the UI process.
598         RemoteScrollingCoordinator builds a ScrollingStateTree, which is
599         encoded by RemoteScrollingCoordinatorTransaction. Decoding the
600         transaction recreates that ScrollingStateTree in the UI process,
601         and RemoteScrollingCoordinatorProxy "commits" that to update
602         the RemoteScrollingTree.
603         
604         New classes are not hooked up to anything yet.
605
606         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp: Added.
607         (ArgumentCoder<ScrollingStateNode>::encode):
608         (ArgumentCoder<ScrollingStateNode>::decode):
609         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
610         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
611         (ArgumentCoder<ScrollingStateFixedNode>::encode):
612         (ArgumentCoder<ScrollingStateFixedNode>::decode):
613         (ArgumentCoder<ScrollingStateStickyNode>::encode):
614         (ArgumentCoder<ScrollingStateStickyNode>::decode):
615         (WebKit::encodeNodeAndDescendants):
616         (WebKit::RemoteScrollingCoordinatorTransaction::encode):
617         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
618         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h: Added.
619         (WebKit::RemoteScrollingCoordinatorTransaction::setStateTreeToEncode):
620         (WebKit::RemoteScrollingCoordinatorTransaction::scrollingStateTree):
621         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: Added.
622         (WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
623         (WebKit::RemoteScrollingCoordinatorProxy::~RemoteScrollingCoordinatorProxy):
624         (WebKit::RemoteScrollingCoordinatorProxy::layerTreeHost):
625         (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
626         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
627         (WebKit::RemoteScrollingCoordinatorProxy::handleWheelEvent):
628         (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged):
629         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h: Added.
630         * UIProcess/Scrolling/RemoteScrollingTree.cpp: Added.
631         (WebKit::RemoteScrollingTree::create):
632         (WebKit::RemoteScrollingTree::RemoteScrollingTree):
633         (WebKit::RemoteScrollingTree::~RemoteScrollingTree):
634         (WebKit::RemoteScrollingTree::tryToHandleWheelEvent):
635         (WebKit::RemoteScrollingTree::handleWheelEventPhase):
636         (WebKit::RemoteScrollingTree::updateMainFrameScrollPosition):
637         (WebKit::RemoteScrollingTree::createNode):
638         * UIProcess/Scrolling/RemoteScrollingTree.h: Added.
639         (WebKit::RemoteScrollingTree::scrollingCoordinatorProxy):
640         * WebKit2.xcodeproj/project.pbxproj:
641         * WebProcess/Scrolling/RemoteScrollingCoordinator.h: Added.
642         (WebKit::RemoteScrollingCoordinator::create):
643         * WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in: Added.
644         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm: Added.
645         (WebKit::RemoteScrollingCoordinator::RemoteScrollingCoordinator):
646         (WebKit::RemoteScrollingCoordinator::~RemoteScrollingCoordinator):
647         (WebKit::RemoteScrollingCoordinator::scheduleTreeStateCommit):
648         (WebKit::RemoteScrollingCoordinator::createScrollingTreeNode):
649         (WebKit::RemoteScrollingCoordinator::isRubberBandInProgress):
650         (WebKit::RemoteScrollingCoordinator::setScrollPinningBehavior):
651         (WebKit::RemoteScrollingCoordinator::buildTransaction):
652         (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
653
654 2014-01-06  Martin Robinson  <mrobinson@igalia.com>
655
656         Small build fix for the GTK+ CMake port
657
658         * PlatformGTK.cmake: Include a missing GeoClue include directory.
659
660 2014-01-06  Simon Fraser  <simon.fraser@apple.com>
661
662         Rename DrawingArea::supportsThreadedScrolling() to supportsAsyncScrolling()
663         https://bugs.webkit.org/show_bug.cgi?id=126529
664
665         Reviewed by Tim Horton.
666         
667         Change function name from using "threaded" to "async" terminology.
668
669         * WebProcess/WebPage/DrawingArea.h:
670         (WebKit::DrawingArea::supportsAsyncScrolling):
671         * WebProcess/WebPage/WebPage.cpp:
672         (WebKit::WebPage::WebPage):
673         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
674
675 2014-01-04  Carlos Garcia Campos  <cgarcia@igalia.com>
676
677         [GTK] Move all GTK/GObject unit tests to Tools/TestWebKitAPI
678         https://bugs.webkit.org/show_bug.cgi?id=126342
679
680         Reviewed by Gustavo Noronha Silva.
681
682         * UIProcess/API/gtk/tests/CMakeLists.txt: Removed.
683         * UIProcess/API/gtk/tests/GNUmakefile.am: Removed.
684
685 2014-01-06  Enrica Casucci  <enrica@apple.com>
686
687         Add support to retrieve the autocorrection context.
688         https://bugs.webkit.org/show_bug.cgi?id=126479
689
690         Reviewed by Sam Weinig.
691         
692         We are adding the support to retrieve the input context for autocorrection
693         and input methods on iOS. The implementation is provided both via synchronous
694         and asynchronous calls to the WebProcess.
695
696         * Platform/IPC/HandleMessage.h: Added template with zero input parameters and six reply parameters.
697         * UIProcess/API/ios/WKInteractionView.mm:
698         (autocorrectionData):
699         (-[WKInteractionView requestAutocorrectionRectsForString:withCompletionHandler:]):
700         (autocorrectionResult):
701         (-[WKInteractionView applyAutocorrection:toString:withCompletionHandler:]):
702         (autocorrectionContext):
703         (-[WKInteractionView requestAutocorrectionContextWithCompletionHandler:]):
704         (-[WKInteractionView hasMarkedText]):
705         (-[WKInteractionView _startAssistingNode]):
706         (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
707         (-[WKAutocorrectionContext dealloc]):
708         * UIProcess/AutoCorrectionCallback.h:
709         (WebKit::AutocorrectionContextCallback::create):
710         (WebKit::AutocorrectionContextCallback::~AutocorrectionContextCallback):
711         (WebKit::AutocorrectionContextCallback::performCallbackWithReturnValue):
712         (WebKit::AutocorrectionContextCallback::invalidate):
713         (WebKit::AutocorrectionContextCallback::AutocorrectionContextCallback):
714         * UIProcess/WebPageProxy.cpp:
715         (WebKit::WebPageProxy::resetState):
716         * UIProcess/WebPageProxy.h:
717         * UIProcess/WebPageProxy.messages.in:
718         * UIProcess/ios/WebPageProxyIOS.mm:
719         (WebKit::WebPageProxy::autocorrectionContextCallback):
720         (WebKit::WebPageProxy::requestAutocorrectionContext):
721         (WebKit::WebPageProxy::getAutocorrectionContext):
722         * WebProcess/WebPage/WebPage.h:
723         * WebProcess/WebPage/WebPage.messages.in:
724         * WebProcess/WebPage/ios/WebPageIOS.mm:
725         (WebKit::computeAutocorrectionContext):
726         (WebKit::WebPage::requestAutocorrectionContext):
727         (WebKit::WebPage::getAutocorrectionContext):
728
729 2014-01-06  Gavin Barraclough  <barraclough@apple.com>
730
731         Move ViewState to WebCore
732         https://bugs.webkit.org/show_bug.cgi?id=126488
733
734         Reviewed by Anders Carlson.
735
736         This change also partial reverts handling of LayerHostingMode, making this
737         a separate message again. With hindsight the new way of doing this wasn't
738         in all ways simpler, and it won't make sense to move this to WebCore.
739
740         * Shared/ViewState.h: Removed.
741             - Moved to WebCore.
742         * Shared/WebPageCreationParameters.cpp:
743         (WebKit::WebPageCreationParameters::encode):
744         (WebKit::WebPageCreationParameters::decode):
745         * Shared/WebPageCreationParameters.h:
746             - Added layerHostingMode.
747         * UIProcess/API/mac/PageClientImpl.h:
748         * UIProcess/API/mac/PageClientImpl.mm:
749         (WebKit::PageClientImpl::PageClientImpl):
750         (WebKit::PageClientImpl::viewLayerHostingMode):
751         * UIProcess/PageClient.h:
752         (WebKit::PageClient::viewLayerHostingMode):
753             - Revert isLayerWindowServerHosted -> viewLayerHostingMode.
754         * UIProcess/WebPageProxy.cpp:
755         (WebKit::WebPageProxy::WebPageProxy):
756             - Added back m_layerHostingMode.
757         (WebKit::WebPageProxy::updateViewState):
758             - Removed IsLayerWindowServerHosted from ViewState.
759         (WebKit::WebPageProxy::viewStateDidChange):
760             - Added SetLayerHostingMode message.
761         (WebKit::WebPageProxy::initializeCreationParameters):
762             - Pass layerHostingMode.
763         * UIProcess/WebPageProxy.h:
764         (WebKit::WebPageProxy::isInWindow):
765         (WebKit::WebPageProxy::isViewVisible):
766             - ViewState moved to WebCore.
767         * WebKit2.xcodeproj/project.pbxproj:
768             - Removed ViewState.
769         * WebProcess/Plugins/PluginView.cpp:
770         (WebKit::PluginView::setLayerHostingMode):
771         (WebKit::PluginView::platformViewStateDidChange):
772             - Separated setLayerHostingMode from platformViewStateDidChange.
773         * WebProcess/Plugins/PluginView.h:
774         * WebProcess/WebPage/DrawingArea.h:
775         (WebKit::DrawingArea::viewStateDidChange):
776         (WebKit::DrawingArea::setLayerHostingMode):
777             - Added virtual function, overridden in TiledCoreAnimationDrawingArea.
778         * WebProcess/WebPage/WebPage.cpp:
779         (WebKit::WebPage::WebPage):
780         (WebKit::WebPage::setLayerHostingMode):
781             - Separated setLayerHostingMode from platformViewStateDidChange.
782         * WebProcess/WebPage/WebPage.h:
783         (WebKit::WebPage::isVisible):
784         (WebKit::WebPage::layerHostingMode):
785             - ViewState moved to WebCore.
786         * WebProcess/WebPage/WebPage.messages.in:
787             - Added SetLayerHostingMode message.
788         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
789         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
790         (WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
791             - viewStateDidChange no longer calls setLayerHostingMode (this is called by WebPage).
792
793 2014-01-06  Martin Robinson  <mrobinson@igalia.com>
794
795         [GTK] [CMake] Parallel builds still fail when building WebKit2 GObject API unit tests
796         https://bugs.webkit.org/show_bug.cgi?id=126465
797
798         Reviewed by Gustavo Noronha Silva.
799
800         * UIProcess/API/gtk/tests/CMakeLists.txt: Explicitly link the libWebKit2APITestCore static object against
801         WebKit2, which seems to be necessary on my new system. Also create an explicit dependency between the
802         injected bundle tests and WebKit2, because they need to use the generated headers.
803
804 2014-01-06  László Langó  <lango@inf.u-szeged.hu>
805
806         Use unsigned consistently, and check for invalid casts when calling into SharedBuffer from other code.
807         https://bugs.webkit.org/show_bug.cgi?id=124579
808
809         Reviewed by Anders Carlsson.
810
811         * NetworkProcess/NetworkResourceLoader.cpp:
812         (WebKit::NetworkResourceLoader::didReceiveData):
813         (WebKit::NetworkResourceLoader::willStopBufferingData):
814         * NetworkProcess/NetworkResourceLoader.h:
815         * Shared/Downloads/soup/DownloadSoup.cpp:
816         (WebKit::DownloadClient::didReceiveData):
817
818 2014-01-04  Simon Fraser  <simon.fraser@apple.com>
819
820         Add encoding of ViewportConstraint and ScrollingParameter types
821         https://bugs.webkit.org/show_bug.cgi?id=126497
822
823         Reviewed by Andreas Kling.
824         
825         Add encoding/decoding of ScrollableAreaParameters, FixedPositionViewportConstraints
826         and StickyPositionViewportConstraints.
827
828         * Shared/WebCoreArgumentCoders.cpp:
829         (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::encode):
830         (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::decode):
831         (IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::encode):
832         (IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::decode):
833         (IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::encode):
834         (IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::decode):
835         * Shared/WebCoreArgumentCoders.h:
836
837 2014-01-05  Simon Fraser  <simon.fraser@apple.com>
838
839         Move responsibility for remote layer tree committing to RemoteLayerTreeDrawingArea
840         https://bugs.webkit.org/show_bug.cgi?id=126501
841
842         Reviewed by Sam Weinig.
843         
844         Soon we shall need to do atomic commits of both the remote layer tree, and
845         the remote scrolling tree. Pave the way by moving responsibility for remote
846         layer tree committing to RemoteLayerTreeDrawingArea.
847         
848         So move the flushing logic from RemoteLayerTreeHost to RemoteLayerTreeDrawingArea.
849         After this change, RemoteLayerTreeHost doesn't do much and could possibly be
850         removed in future.
851         
852         Also add type-safe casting to GraphicsLayer and DrawingArea.
853
854         * DerivedSources.make: Out with RemoteLayerTreeHost, in with RemoteLayerTreeDrawingAreaProxy
855         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
856         (WebKit::RemoteLayerTreeDrawingAreaProxy::remoteLayerTreeHost):
857         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in: Renamed from Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.messages.in.
858         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
859         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): Add message receiver.
860         (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy): Remove message receiver.
861         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): Hand the transaction off to the layer
862         tree host.
863         * UIProcess/mac/RemoteLayerTreeHost.h:
864         * UIProcess/mac/RemoteLayerTreeHost.mm:
865         (WebKit::RemoteLayerTreeHost::RemoteLayerTreeHost): No longer a message receiver.
866         (WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
867         (WebKit::RemoteLayerTreeHost::updateLayerTree):
868         * WebKit2.xcodeproj/project.pbxproj:
869         * WebProcess/WebPage/DrawingArea.h:
870         (WebKit::DrawingArea::type):
871         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
872         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
873         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
874         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
875         (WebKit::RemoteLayerTreeContext::RemoteLayerTreeContext):
876         (WebKit::RemoteLayerTreeContext::flushOutOfTreeLayers):
877         (WebKit::RemoteLayerTreeContext::buildTransaction):
878         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
879         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
880         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
881         (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
882         (WebKit::RemoteLayerTreeDrawingArea::setLayerTreeStateIsFrozen):
883         (WebKit::RemoteLayerTreeDrawingArea::forceRepaint):
884         (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
885         (WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired):
886         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
887
888 2014-01-05  Martin Robinson  <mrobinson@igalia.com>
889
890         [GTK] [CMake] Ensure that the autotools build and the CMake install the same files
891         https://bugs.webkit.org/show_bug.cgi?id=116379
892
893         Reviewed by Gustavo Noronha Silva.
894
895         * CMakeLists.txt: Install the plugin process to the new LIBEXEC directory, which
896         for non-GTK+ platforms is the same as EXEC.
897         * PlatformGTK.cmake: Install API headers, gir files, and the pkg-config file. Move
898         a couple installed and generated headers to the installed headers list. Rename the
899         headers list to be consistent with the WebKit1 build. No longer use a variable for
900         the name of the plugin process, as it's unnecessary.
901
902 2014-01-05  Carlos Garcia Campos  <cgarcia@igalia.com>
903
904         [GTK] Stop installing WebKit2 C API headers
905         https://bugs.webkit.org/show_bug.cgi?id=126489
906
907         Reviewed by Martin Robinson.
908
909         We are not actually maintaining the API/ABI compatibility of the
910         WebKit2 C API, it's only used internally by the public GTK+ API
911         and nobody is using it.
912
913         * GNUmakefile.am:
914         * GNUmakefile.list.am:
915
916 2014-01-05  Gavin Barraclough  <barraclough@apple.com>
917
918         Move process suppression of WebProcess to Page (from UIProcess)
919         https://bugs.webkit.org/show_bug.cgi?id=126480
920
921         Reviewed by Sam Weinig.
922
923         Let each page take a UserActivity rather than having to coalesce this state, and take different activity
924         tokens for normal visibility and suppression disabled, so we can see why the process is not suppressed.
925
926         * Shared/mac/ChildProcessMac.mm:
927         (WebKit::ChildProcess::platformInitialize):
928             - Don't start with process supression disabled; this is unnecessary,
929               message from the UIProcess should wake.
930         * UIProcess/mac/WebProcessProxyMac.mm:
931         (WebKit::WebProcessProxy::updateProcessSuppressionState):
932             - Don't send explicit messages to supress the WebProcess, it handles this for itself.
933         * WebProcess/WebPage/WebPage.cpp:
934         (WebKit::WebPage::WebPage):
935             - call setIsVisuallyIdle.
936         (WebKit::WebPage::setViewState):
937             - call setIsVisuallyIdle.
938         (WebKit::WebPage::updatePreferences):
939             - Use m_suppressionDisabled to disable supression if the WebPreference is set.
940         (WebKit::WebPage::setIsVisuallyIdle):
941             - setThrottled -> setIsVisuallyIdle.
942         * WebProcess/WebPage/WebPage.h:
943             - setThrottled -> setIsVisuallyIdle, added m_suppressionDisabled.
944         * WebProcess/WebProcess.cpp:
945         * WebProcess/WebProcess.h:
946         (WebKit::WebProcess::shouldForceScreenFontSubstitution):
947             - Removed setProcessSuppressionEnabled - WebPage now detects the supression change.
948
949 2014-01-04  Martin Robinson  <mrobinson@igalia.com>
950
951         [GTK] [CMake] Improve the way we locate gobject-introspection
952         https://bugs.webkit.org/show_bug.cgi?id=126452
953
954         Reviewed by Philippe Normand.
955
956         * PlatformGTK.cmake: Use the new introspection variables.
957
958 2014-01-04  Zan Dobersek  <zdobersek@igalia.com>
959
960         Explicitly use the std:: nested name specifier when using std::pair, std::make_pair
961         https://bugs.webkit.org/show_bug.cgi?id=126439
962
963         Reviewed by Andreas Kling.
964
965         Instead of relying on std::pair and std::make_pair symbols being present in the current scope
966         through the pair and make_pair symbols, the std:: specifier should be used explicitly.
967
968         * Shared/mac/ArgumentCodersMac.mm:
969         (IPC::encode):
970         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
971         (WebKit::WebNotificationManagerProxy::show):
972         (WebKit::WebNotificationManagerProxy::cancel):
973         (WebKit::WebNotificationManagerProxy::didDestroyNotification):
974         * UIProcess/Notifications/WebNotificationManagerProxy.h:
975         * UIProcess/WebContext.cpp:
976         (WebKit::WebContext::createNewWebProcess):
977         * UIProcess/WebContext.h:
978
979 2014-01-03  Piotr Grad  <p.grad@samsung.com>
980
981         Build brake after 161045 on EFL port with WebKit2 and gcc 4.6.3
982         https://bugs.webkit.org/show_bug.cgi?id=126383
983
984         Reviewed by Sam Weinig.
985
986         Class identifier was missing.
987
988         * DatabaseProcess/DatabaseProcess.h:
989         * NetworkProcess/NetworkProcess.h:
990         * PluginProcess/PluginProcess.h:
991         * Shared/mac/CookieStorageShim.h:
992         * UIProcess/Plugins/PluginProcessManager.h:
993         * UIProcess/WebPageProxy.cpp:
994         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
995         * WebProcess/WebProcess.h:
996
997 2014-01-03  Seokju Kwon  <seokju@webkit.org>
998
999         Unreviewed build fix on non-Mac port
1000
1001         * Shared/API/c/WKDeprecatedFunctions.cpp: Add ENABLE(MAC) guard for "WKContextPrivateMac.h".
1002
1003 2014-01-03  Gavin Barraclough  <barraclough@apple.com>
1004
1005         Simplify process suppression state calculation
1006         https://bugs.webkit.org/show_bug.cgi?id=126473
1007
1008         Reviewed by Geoffrey Garen & Sam Weinig.
1009
1010         Don't check the application occlusion state (this is covered by the pages already),
1011         and let the page check visually idle. Remove layers of functions.
1012
1013         * UIProcess/Network/NetworkProcessProxy.cpp:
1014         (WebKit::NetworkProcessProxy::didFinishLaunching):
1015             - Let the network process nap if all processes in its context are napping.*
1016               (* Except not really. We currently leak a boost onto the process anyway.)
1017         * UIProcess/Plugins/PluginProcessProxy.cpp:
1018         (WebKit::PluginProcessProxy::didFinishLaunching):
1019             - Let the plugin process nap if all processes in all contexts are napping.
1020         * UIProcess/WebContext.h:
1021             - Remove canEnableProcessSuppressionForNetworkProcess & canEnableProcessSuppressionForWebProcess
1022             - canEnableProcessSuppressionForGlobalChildProcesses -> processSuppressionIsEnabledForAllContexts
1023             - combine updateProcessSuppressionStateOfChildProcesses & updateProcessSuppressionStateOfGlobalChildProcesses
1024                 -> updateProcessSuppressionState
1025         * UIProcess/WebPageProxy.cpp:
1026         (WebKit::WebPageProxy::isProcessSuppressible):
1027             - WebProcess is supressible if IsVisuallyIdle.
1028         (WebKit::WebPageProxy::viewStateDidChange):
1029             - WebProcessProxy should updateProcessSuppressionState when IsVisuallyIdle changes.
1030         * UIProcess/WebPageProxy.h:
1031         * UIProcess/WebProcessProxy.cpp:
1032         (WebKit::WebProcessProxy::createWebPage):
1033         (WebKit::WebProcessProxy::addExistingWebPage):
1034         (WebKit::WebProcessProxy::pageSuppressibilityChanged):
1035         (WebKit::WebProcessProxy::pagePreferencesChanged):
1036             - pageIsProcessSuppressible -> isProcessSuppressible
1037         * UIProcess/WebProcessProxy.h:
1038         * UIProcess/mac/WebContextMac.mm:
1039         (WebKit::WebContext::updateProcessSuppressionState):
1040             - Update supression state of network & plugin processes.
1041         (WebKit::WebContext::processSuppressionIsEnabledForAllContexts):
1042             - Changed iterator style, made a static member of WebContext.
1043         * UIProcess/mac/WebProcessProxyMac.mm:
1044         (WebKit::WebProcessProxy::updateProcessSuppressionState):
1045             - Ask the WebContext to update supression state.
1046         * UIProcess/mac/WindowServerConnection.h:
1047         * UIProcess/mac/WindowServerConnection.mm:
1048         (WebKit::WindowServerConnection::windowServerConnectionStateChanged):
1049         (WebKit::WindowServerConnection::WindowServerConnection):
1050             - Remove application occlusion state.
1051
1052 2014-01-03  Tim Horton  <timothy_horton@apple.com>
1053
1054         [iOS] [WK2] TileController creates all tiles on first paint, making it slow and consuming lots of memory
1055         https://bugs.webkit.org/show_bug.cgi?id=126457
1056
1057         Reviewed by Simon Fraser.
1058
1059         Instead of making all of the tiles all of the time, we should use the
1060         view-exposed-rect mechanism to inform TileController about what portion
1061         of the WKContentView is currently exposed by the WKScrollView.
1062
1063         * UIProcess/API/ios/WKContentView.h:
1064         * UIProcess/API/ios/WKContentView.mm:
1065         (-[WKContentView setViewportSize:]):
1066         (-[WKContentView didFinishScrollTo:]):
1067         (-[WKContentView didScrollTo:]):
1068         Inform the WebPageProxy that our exposed rect changed.
1069
1070         * UIProcess/API/ios/WKView.mm:
1071         (-[WKView scrollViewDidScroll:]):
1072         Inform the WKContentView that we've scrolled at all.
1073         Rename the existing WKContentView didScrollTo: to didFinishScrollTo:,
1074         because it is expected to only fire when a scroll lands. Add didScrollTo:,
1075         which fires continually as scrolling progresses.
1076
1077         * UIProcess/WebPageProxy.cpp:
1078         (WebKit::WebPageProxy::WebPageProxy):
1079         (WebKit::WebPageProxy::viewExposedRectChanged):
1080         (WebKit::WebPageProxy::exposedRectChangedTimerFired):
1081         * UIProcess/WebPageProxy.h:
1082         (WebKit::WebPageProxy::viewExposedRect):
1083         * UIProcess/mac/WebPageProxyMac.mm:
1084         Move view-exposed-rect stuff to WebPageProxy so it can be built on both
1085         Mac and iOS, and un-!PLATFORM(IOS) some of the related members.
1086
1087         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1088         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1089         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
1090         (WebKit::RemoteLayerTreeDrawingArea::setExposedRect):
1091         (WebKit::RemoteLayerTreeDrawingArea::setClipsToExposedRect):
1092         (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
1093         (WebKit::RemoteLayerTreeDrawingArea::updateMainFrameClipsToExposedRect):
1094         (WebKit::RemoteLayerTreeDrawingArea::mainFrameTiledBacking):
1095         Steal TiledCoreAnimationDrawingArea's exposed-rect code.
1096         Note that on iOS, we don't need to manually offset the exposed rect by
1097         the scroll position, because the scroll position is already baked into
1098         the exposed rect, and WebCore's notion of the scroll position will be
1099         inaccurate until the scroll lands.
1100
1101 2014-01-03  Simon Fraser  <simon.fraser@apple.com>
1102
1103         Give all PlatformCALayers a PlatformLayerID, not just remote ones
1104         https://bugs.webkit.org/show_bug.cgi?id=126466
1105
1106         Reviewed by Tim Horton.
1107
1108         The ScrollingStateTree has references to both GraphicsLayers and PlatformLayers
1109         which is confusing, and is necessary because the underlying PlatformLayer
1110         inside a GraphicsLayer can change. In order to hide some of this complexity,
1111         expose GraphicsLayer::primaryLayerID() which is a PlatformLayerID that clients
1112         can hold onto to test for underlying layer swapping.
1113         
1114         GraphicsLayerCARemote and PlatformCALayerRemote can now just use the
1115         primaryLayerID() function exposed via the base class.
1116
1117         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
1118         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
1119         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1120         (PlatformCALayerRemote::PlatformCALayerRemote):
1121         (PlatformCALayerRemote::recursiveBuildTransaction):
1122         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1123
1124 2014-01-03  Dan Bernstein  <mitz@apple.com>
1125
1126         [Cocoa] Expose session state API
1127         https://bugs.webkit.org/show_bug.cgi?id=126463
1128
1129         Reviewed by Sam Weinig.
1130
1131         * UIProcess/API/Cocoa/WKBrowsingContextController.h: Declared new property and method.
1132         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1133         (-[WKBrowsingContextController sessionState]): Added. Calls WebPageProxy::sessionStateData.
1134         (-[WKBrowsingContextController restoreFromSessionState:]): Added. Calls
1135         WebPageProxy::restoreFromSessionState.
1136
1137 2014-01-03  Gavin Barraclough  <barraclough@apple.com>
1138
1139         Remove SPI, user default for disabling process suppression
1140         https://bugs.webkit.org/show_bug.cgi?id=126458
1141
1142         Reviewed by Sam Weinig.
1143
1144         * Shared/API/c/WKDeprecatedFunctions.cpp:
1145         (WKContextGetProcessSuppressionEnabled):
1146         (WKContextSetProcessSuppressionEnabled):
1147             - depracated SPI.
1148         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
1149             - depracated SPI.
1150         * UIProcess/WebContext.cpp:
1151         (WebKit::WebContext::WebContext):
1152             - removed m_processSuppressionEnabled.
1153         * UIProcess/WebContext.h:
1154             - removed setProcessSuppressionEnabled, processSuppressionEnabled implementation,
1155               processSuppressionEnabledChanged, m_processSuppressionEnabled.
1156         * UIProcess/mac/WebContextMac.mm:
1157         (WebKit::WebContext::platformInitialize):
1158             - removed m_processSuppressionEnabled.
1159         (WebKit::WebContext::processSuppressionEnabled):
1160             - check whether all pages in all processes are suppressible.
1161         (WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess):
1162             - removed call to omitProcessSuppression, m_processSuppressionEnabled -> processSuppressionEnabled().
1163         (WebKit::WebContext::canEnableProcessSuppressionForWebProcess):
1164             - removed call to omitProcessSuppression, processSuppressionEnabled (we don't care if a page in a difference process is not suppresible).
1165         (WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses):
1166             - removed call to omitProcessSuppression, s_processSuppressionEnabledForAllContexts -> processSuppressionIsEnabledForAllContexts().
1167
1168 2014-01-03  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1169
1170         [WK2][CoordinatedGraphics] Removing repeated protected keyword in WebView
1171         https://bugs.webkit.org/show_bug.cgi?id=126462
1172
1173         Reviewed by Simon Fraser.
1174
1175         * UIProcess/CoordinatedGraphics/WebView.h:
1176
1177 2014-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1178
1179         Define WebProcess::usesNetworkProcess unconditionally
1180         https://bugs.webkit.org/show_bug.cgi?id=126208
1181
1182         Reviewed by Martin Robinson.
1183
1184         Returning false when network process is not enabled like
1185         WebContext does. This way we reduce the amount of ifdefs used when
1186         checking whether network process is in use.
1187
1188         * UIProcess/gtk/WebContextGtk.cpp:
1189         (WebKit::WebContext::platformInitializeWebProcess): Remove #ifdef
1190         and only setup network features when not using network process.
1191         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1192         (WebKit::WebPlatformStrategies::isAvailable): Remove #ifdef.
1193         * WebProcess/WebProcess.cpp:
1194         (WebKit::WebProcess::downloadManager):
1195         (WebKit::WebProcess::shouldTerminate):
1196         (WebKit::WebProcess::usesNetworkProcess):
1197         * WebProcess/WebProcess.h:
1198         * WebProcess/mac/WebProcessMac.mm:
1199         (WebKit::WebProcess::platformSetCacheModel): Remove #ifdef.
1200         (WebKit::WebProcess::platformInitializeWebProcess): Ditto.
1201         * WebProcess/soup/WebProcessSoup.cpp:
1202         (WebKit::WebProcess::platformSetCacheModel): Ditto.
1203         (WebKit::WebProcess::platformClearResourceCaches): Ditto.
1204         (WebKit::WebProcess::platformInitializeWebProcess): Ditto.
1205         (WebKit::WebProcess::platformTerminate): Only remove the language
1206         observer when not using network process.
1207         (WebKit::WebProcess::setIgnoreTLSErrors): Assert when this is
1208         called with network process enabled.
1209         (WebKit::WebProcess::allowSpecificHTTPSCertificateForHost): Ditto.
1210
1211 2014-01-03  Jinwoo Song  <jinwoo7.song@samsung.com>
1212
1213         VibrationPattern should allocate an single vector instance for single integer input
1214         https://bugs.webkit.org/show_bug.cgi?id=126417
1215
1216         Reviewed by Gyuyoung Kim.
1217
1218         Fix a vibration unit test regression after r161139. Also remove unnecessary test cases. 
1219
1220         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1221         (EWK2ViewTest::loadVibrationHTMLString):
1222         (TEST_F):
1223
1224 2014-01-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1225
1226         [GTK] Add API to WebKitResponsePolicyDecision to check if the MIME type can be shown
1227         https://bugs.webkit.org/show_bug.cgi?id=124652
1228
1229         Reviewed by Martin Robinson.
1230
1231         * UIProcess/API/gtk/WebKitPolicyClient.cpp:
1232         (decidePolicyForResponse): Pass canShowMIMEType to
1233         webkitResponsePolicyDecisionCreate.
1234         * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
1235         (webkit_response_policy_decision_is_mime_type_supported): Return
1236         canShowMIMEType.
1237         (webkitResponsePolicyDecisionCreate): Set the canShowMIMEType
1238         member from the given parameter.
1239         * UIProcess/API/gtk/WebKitResponsePolicyDecision.h:
1240         * UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h:
1241         * UIProcess/API/gtk/WebKitWebView.cpp:
1242         (webkitWebViewDecidePolicy): Use the new API instead of
1243         webkit_web_view_can_show_mime_type() since it's more efficient.
1244         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
1245         * UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp:
1246         (testResponsePolicy): Test the new API.
1247
1248 2014-01-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1249
1250         REGRESSION(r160304): [GTK] Disable libtool fast install
1251         https://bugs.webkit.org/show_bug.cgi?id=126381
1252
1253         Reviewed by Martin Robinson.
1254
1255         Remove -no-fast-install ld flag since fast install is now disabled
1256         globally.
1257
1258         * GNUmakefile.am:
1259         * UIProcess/API/gtk/tests/GNUmakefile.am:
1260
1261 2014-01-02  Ryuan Choi  <ryuan.choi@samsung.com>
1262
1263         [EFL][WK2] Remove defaultPageGroupIdentifier not to make the confusion
1264         https://bugs.webkit.org/show_bug.cgi?id=126249
1265
1266         Reviewed by Gyuyoung Kim.
1267
1268         ewk_page_group_create always creates new page group,
1269         but the identifiers of page groups will be same as "defaultPageGroupIdentifier" when passed 0 or "".
1270         It is unnecessary and just makes the confusion.
1271
1272         This patch let WebPageGroup generate unique identifier if 0 or "" is passed as argument.
1273
1274         * UIProcess/API/efl/ewk_page_group.cpp:
1275         (EwkPageGroup::create):
1276         * UIProcess/API/efl/ewk_page_group_private.h:
1277
1278 2014-01-02  Zan Dobersek  <zdobersek@igalia.com>
1279
1280         [GTK] Switch from WTF::Function to std::function in WebProcessTest
1281         https://bugs.webkit.org/show_bug.cgi?id=126397
1282
1283         Reviewed by Anders Carlsson.
1284
1285         Use std::function<> and std::bind() instead of WTF::Function and WTF::bind,
1286         following the effort of using STL concepts where possible.
1287
1288         * UIProcess/API/gtk/tests/WebProcessTest.cpp:
1289         (WebProcessTest::add):
1290         * UIProcess/API/gtk/tests/WebProcessTest.h:
1291
1292 2014-01-02  Gavin Barraclough  <barraclough@apple.com>
1293
1294         Refactor NSActivity handling code from ChildProcess to UserActivity
1295         https://bugs.webkit.org/show_bug.cgi?id=126330
1296
1297         Reviewed by Sam Weinig.
1298
1299         UserActivity is a mechanism to express to the operating system (where appropriate)
1300         that a user initiated activity is taking place, and as such that resources should be
1301         made available to the process accordingly.
1302
1303         Currently we hold a single NSActivity, at the WebKit layer. This refactoring allows us
1304         to hold different activity tokens for different user actions (which simplifies the
1305         handling, and aides debugging since the token can more accurately express the activity
1306         taking place), and also will allow us to avoid the layering difficulty of calling back
1307         up the stack to WebKit to register that an activity is taking place.
1308
1309         * Shared/ChildProcess.cpp:
1310         (WebKit::ChildProcess::ChildProcess):
1311             - removed fields to directly manage NSActivity, use UserActivity objects instead.
1312         * Shared/ChildProcess.h:
1313         (WebKit::ChildProcess::processSuppressionEnabled):
1314             - changed to initialize new fields.
1315         * Shared/mac/ChildProcessMac.mm:
1316         (WebKit::ChildProcess::setProcessSuppressionEnabled):
1317             - implemented in terms of UserActivity m_processSuppressionDisabled.
1318         (WebKit::ChildProcess::incrementActiveTaskCount):
1319             - implemented in terms of UserActivity m_activeTasks.
1320         (WebKit::ChildProcess::decrementActiveTaskCount):
1321             - implemented in terms of UserActivity m_activeTasks.
1322         (WebKit::ChildProcess::platformInitialize):
1323             - implemented in terms of UserActivity m_processSuppressionDisabled.
1324
1325 2014-01-02  Gavin Barraclough  <barraclough@apple.com>
1326
1327         Propagate WindowServer modifications state to WebProcess
1328         https://bugs.webkit.org/show_bug.cgi?id=126356
1329
1330         Reviewed by Sam Weinig.
1331
1332         This will be necessary to move control of process suppression to the WebProcess.
1333         IsVisuallyIdle implies the process has stopped painting, or painted rects are
1334         occluded and not actually being composited. State is provided on a per
1335         WindowServer connection basis, and as such may produce (safe) false positives.
1336
1337         * Shared/ViewState.h:
1338             - added IsVisuallyIdle.
1339         * UIProcess/API/mac/PageClientImpl.h:
1340         * UIProcess/API/mac/PageClientImpl.mm:
1341         (WebKit::PageClientImpl::isVisuallyIdle):
1342             - added, on mac checks WindowServerConnection.
1343         * UIProcess/PageClient.h:
1344         (WebKit::PageClient::isVisuallyIdle):
1345             - base implementation purely based on isViewVisible.
1346         * UIProcess/WebContext.cpp:
1347         (WebKit::WebContext::windowServerConnectionStateChanged):
1348             - broadcast the state change.
1349         * UIProcess/WebContext.h:
1350         * UIProcess/WebPageProxy.cpp:
1351         (WebKit::WebPageProxy::updateViewState):
1352         (WebKit::WebPageProxy::viewStateDidChange):
1353             - propagate IsVisuallyIdle.
1354         * UIProcess/WebProcessProxy.cpp:
1355         (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
1356             - broadcast the state change.
1357         * UIProcess/WebProcessProxy.h:
1358             - add windowServerConnectionStateChanged.
1359         * UIProcess/mac/WebContextMac.mm:
1360         (WebKit::WebContext::updateProcessSuppressionStateOfGlobalChildProcesses):
1361             - moved from static in fle to static member of class.
1362         (WebKit::WebContext::platformInitialize):
1363             - no need to enableOcclusionNotifications.
1364         (WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess):
1365         (WebKit::WebContext::canEnableProcessSuppressionForWebProcess):
1366         (WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses):
1367             - changed to call WindowServerConnection.
1368         (WebKit::WebContext::processSuppressionEnabledChanged):
1369             - don't remove/reregister occlusion notifications.
1370         * UIProcess/mac/WindowServerConnection.h: Added.
1371         (WebKit::WindowServerConnection::applicationIsOccluded):
1372         (WebKit::WindowServerConnection::applicationWindowModificationsHaveStopped):
1373             - accessors.
1374         * UIProcess/mac/WindowServerConnection.mm: Added.
1375         (WebKit::WindowServerConnection::applicationBecameOccluded):
1376         (WebKit::WindowServerConnection::applicationWindowModificationsStopped):
1377         (WebKit::WindowServerConnection::applicationBecameVisible):
1378         (WebKit::WindowServerConnection::applicationWindowModificationsStarted):
1379             - handle notifications from the WindowServer.
1380         (WebKit::WindowServerConnection::windowServerConnectionStateChanged):
1381             - broadcast the state change.
1382         (WebKit::WindowServerConnection::shared):
1383             - accessor for singleton object.
1384         (WebKit::WindowServerConnection::WindowServerConnection):
1385             - constructor inizializes fields & register notification handlers.
1386         * WebKit2.xcodeproj/project.pbxproj:
1387             - added new files.
1388         * config.h:
1389             - added HAVE_WINDOW_SERVER_OCCLUSION_NOTIFICATIONS.
1390
1391 2014-01-02  Gavin Barraclough  <barraclough@apple.com>
1392
1393         Remove WindowIsVisible
1394         https://bugs.webkit.org/show_bug.cgi?id=126270
1395
1396         Reviewed by Tim Horton.
1397
1398         We currently track visibility in two ways - ViewState::IsVisible and ViewState::WindowIsVisible.
1399         The latter detects that the content is hidden in fewer cases than the former, and as such, the
1400         former is always preferable.
1401
1402         This affects the hidden state provided to FocusController::contentAreaDidShowOrHide and to
1403         Plugin::windowVisibilityChanged.
1404
1405         * Shared/ViewState.h:
1406             - remove WindowIsVisible.
1407         * UIProcess/API/mac/PageClientImpl.h:
1408         * UIProcess/API/mac/PageClientImpl.mm:
1409             - remove isWindowVisible.
1410         * UIProcess/API/mac/WKView.mm:
1411         (-[WKView viewDidMoveToWindow]):
1412         (-[WKView _windowDidMiniaturize:]):
1413         (-[WKView _windowDidDeminiaturize:]):
1414         (-[WKView _windowDidOrderOffScreen:]):
1415         (-[WKView _windowDidOrderOnScreen:]):
1416             - remove ViewState::WindowIsVisible.
1417         * UIProcess/PageClient.h:
1418             - remove isWindowVisible.
1419         * UIProcess/WebPageProxy.cpp:
1420         (WebKit::WebPageProxy::updateViewState):
1421             - remove handling of ViewState::WindowIsVisible.
1422         * WebProcess/Plugins/PluginView.cpp:
1423         (WebKit::PluginView::setIsVisible):
1424         (WebKit::PluginView::didInitializePlugin):
1425         * WebProcess/Plugins/PluginView.h:
1426             - setWindowIsVisible -> setIsVisible.
1427         * WebProcess/WebPage/WebPage.cpp:
1428         (WebKit::WebPage::WebPage):
1429         (WebKit::WebPage::setViewIsVisible):
1430         (WebKit::WebPage::setViewState):
1431         (WebKit::WebPage::windowAndWebPageAreFocused):
1432         * WebProcess/WebPage/WebPage.h:
1433         (WebKit::WebPage::isVisible):
1434             - remove m_windowIsVisible, setWindowIsVisible (implementation moved to setViewIsVisible).
1435
1436 2014-01-02  Gavin Barraclough  <barraclough@apple.com>
1437
1438         Refactor ViewState handling for drawing area / plugins
1439         https://bugs.webkit.org/show_bug.cgi?id=126272
1440
1441         Reviewed by Tim Horton.
1442
1443         Instead of all ViewState changes being handled by the WebPage, notify the DrawingArea & PluginView to better encapsulate.
1444
1445         * WebProcess/Plugins/PluginView.cpp:
1446         (WebKit::PluginView::viewStateDidChange):
1447         (WebKit::PluginView::platformViewStateDidChange):
1448             - added, handle changes in ViewState relevant to PluginView.
1449         (WebKit::PluginView::didInitializePlugin):
1450             - helper function removed.
1451         * WebProcess/Plugins/PluginView.h:
1452             - added/removed function declarations.
1453         * WebProcess/WebPage/DrawingArea.h:
1454         (WebKit::DrawingArea::viewStateDidChange):
1455             - declare viewStateDidChange.
1456         * WebProcess/WebPage/WebPage.cpp:
1457         (WebKit::WebPage::setActive):
1458             - no need to notify plugin.
1459         (WebKit::WebPage::setViewIsVisible):
1460             - no need to notify drawing area.
1461         (WebKit::WebPage::setViewState):
1462             - send viewStateDidChange to drawing area / plugin.
1463         (WebKit::WebPage::setWindowIsVisible):
1464             - no need to notify plugin.
1465         * WebProcess/WebPage/WebPage.h:
1466         (WebKit::WebPage::layerHostingMode):
1467             - removed setLayerHostingMode.
1468         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1469             - declare viewStateDidChange.
1470         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1471         (WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
1472             - added, handle changes in ViewState relevant to DrawingArea.
1473
1474 2014-01-02  Alexey Proskuryakov  <ap@apple.com>
1475
1476         Merge didMoveOnscreen / page visibility to isVisible
1477         https://bugs.webkit.org/show_bug.cgi?id=126268
1478
1479         Build fix.
1480
1481         * UIProcess/WebContext.h: Removed some accidental input.
1482
1483 2014-01-02  Gavin Barraclough  <barraclough@apple.com>
1484
1485         Merge didMoveOnscreen / page visibility to isVisible
1486         https://bugs.webkit.org/show_bug.cgi?id=126268
1487
1488         Reviewed by Tim Horton.
1489
1490         The onscreen state most closely tracks view visibility (though currently
1491         also tracks a mix of in-window state). Make more consistent, simplify,
1492         and move all animation suspension logic to Page, so it can be controlled
1493         by the PageThrottler.
1494
1495         * WebProcess/WebPage/WebPage.cpp:
1496         (WebKit::WebPage::WebPage):
1497         (WebKit::WebPage::setViewIsVisible):
1498             - updateVisibilityState -> setIsVisible.
1499         (WebKit::WebPage::setIsInWindow):
1500             - remove redundant willMoveOffscreen/didMoveOnscreen calls - this is handled
1501               by setIsVisible.
1502         (WebKit::WebPage::setMayStartMediaWhenInWindow):
1503             - isOnscreen -> isInWindow. We start media when the view is in a window, not
1504               when the view is visible.
1505         (WebKit::WebPage::setVisibilityStatePrerender):
1506             - setVisibilityState -> setIsPrerender.
1507
1508 2013-12-23  Oliver Hunt  <oliver@apple.com>
1509
1510         Refactor PutPropertySlot to be aware of custom properties
1511         https://bugs.webkit.org/show_bug.cgi?id=126187
1512
1513         Reviewed by Antti Koivisto.
1514
1515         Update for new method signatures.
1516
1517         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1518         (WebKit::NPJSObject::setProperty):
1519
1520 2014-01-02  Simon Fraser  <simon.fraser@apple.com>
1521
1522         Add AsyncScrollingCoordinator, which is a base class for threaded and future remote ScrollingCoordinators
1523         https://bugs.webkit.org/show_bug.cgi?id=126389
1524
1525         Reviewed by Tim Horton.
1526         
1527         Add AsyncScrollingCoordinator, a ScrollingCoordinator that knows about ScrollingStateTrees
1528         and ScrollingTrees, but leaves it up to subclasses to decide when and how to commit.
1529         
1530         * WebProcess/WebPage/EventDispatcher.cpp:
1531         (WebKit::EventDispatcher::addScrollingTreeForPage): The ScrollingTree is exposed on
1532         AsyncScrollingCoordinator now, not ScrollingCoordinator, so we have to cast here.
1533         * WebProcess/WebPage/WebPage.cpp: m_useThreadedScrolling -> m_useAsyncScrolling terminology change.
1534         (WebKit::WebPage::WebPage):
1535         (WebKit::WebPage::~WebPage):
1536         * WebProcess/WebPage/WebPage.h:
1537         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1538         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): Cast to AsyncScrollingCoordinator in order
1539         to get to the ScrollingTree.
1540
1541 2014-01-01  Simon Fraser  <simon.fraser@apple.com>
1542
1543         Create a ThreadedScrollingTree subclass of ScrollingTree, and push all knowledge of the scrolling thread into it
1544         https://bugs.webkit.org/show_bug.cgi?id=126362
1545
1546         Reviewed by Sam Weinig.
1547
1548         Eventually we'll have a ScrollingTree in situations where there is no scrolling
1549         thread, so make the ScrollingTree base class thread-agnostic (but threadsafe),
1550         and subclass it in ThreadedScrollingTree for scrolling-thread-specific functionality.
1551         
1552         The ScrollingTree base class also no longer needs to know about the
1553         ScrollingCoordinator.
1554
1555         ScrollingCoordinatorMac creates a ThreadedScrollingTree.
1556
1557         * WebProcess/WebPage/EventDispatcher.cpp:
1558         (WebKit::EventDispatcher::addScrollingTreeForPage):
1559         (WebKit::EventDispatcher::wheelEvent):
1560         * WebProcess/WebPage/EventDispatcher.h:
1561
1562 2014-01-01  Simon Fraser  <simon.fraser@apple.com>
1563
1564         Add a typedef for PlatformLayerID on GraphicsLayer, and migrate RemoteLayerTreeTransaction to use it
1565         https://bugs.webkit.org/show_bug.cgi?id=126346
1566
1567         Reviewed by Tim Horton.
1568         
1569         Remote scrolling tree code is soon going to use RemoteLayerTreeTransaction::LayerID,
1570         so it makes more sense to put this layerID type on GraphicsLayer as
1571         GraphicsLayer::PlatformLayerID.
1572         
1573         Also add some type cast macros for PlatformCALayer and subclasses, and use them
1574         where appropriate.
1575
1576         * Shared/mac/RemoteLayerTreePropertyApplier.h:
1577         * Shared/mac/RemoteLayerTreeTransaction.h:
1578         (WebKit::RemoteLayerTreeTransaction::rootLayerID):
1579         (WebKit::RemoteLayerTreeTransaction::changedLayers):
1580         (WebKit::RemoteLayerTreeTransaction::destroyedLayers):
1581         * Shared/mac/RemoteLayerTreeTransaction.mm:
1582         (WebKit::RemoteLayerTreeTransaction::decode):
1583         (WebKit::RemoteLayerTreeTransaction::setRootLayerID):
1584         (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs):
1585         (WebKit::RemoteLayerTreeTextStream::operator<<):
1586         (WebKit::dumpChangedLayers):
1587         (WebKit::RemoteLayerTreeTransaction::description):
1588         * UIProcess/mac/RemoteLayerTreeHost.h:
1589         * UIProcess/mac/RemoteLayerTreeHost.mm:
1590         (WebKit::RemoteLayerTreeHost::commit):
1591         (WebKit::RemoteLayerTreeHost::getLayer):
1592         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
1593         (WebKit::GraphicsLayerCARemote::primaryLayerID):
1594         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
1595         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1596         (generateLayerID):
1597         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1598         (WebKit::PlatformCALayerRemote::layerID):
1599         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
1600
1601 2014-01-01  Martin Robinson  <mrobinson@igalia.com>
1602
1603         [GTK] [CMake] Fix the WEBKIT_SRC_DIR define when building the WebKit2 GObject API unit tests
1604         https://bugs.webkit.org/show_bug.cgi?id=126350
1605
1606         Reviewed by Carlos Garcia Campos.
1607
1608         * UIProcess/API/gtk/tests/CMakeLists.txt: Fix the define.
1609
1610 2014-01-01  Martin Robinson  <mrobinson@igalia.com>
1611
1612         [GTK] Rename libtestnetscapeplugin to libTestNetscapePlugin
1613         https://bugs.webkit.org/show_bug.cgi?id=126349
1614
1615         Reviewed by Carlos Garcia Campos.
1616
1617         All CMake ports use "libTestNetscapePlugin," so choosing the same
1618         name in the autotools port will make the transition easier.
1619
1620         * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
1621         (testWebContextGetPlugins): Use the new plugin library name.
1622
1623 2013-12-31  Brendan Long  <b.long@cablelabs.com>
1624
1625         [Gtk] WebKitWebInspector has build warnings due to uninitialized didChangeAttachedWidth member
1626         https://bugs.webkit.org/show_bug.cgi?id=126353
1627
1628         Reviewed by Martin Robinson.
1629
1630         * UIProcess/API/gtk/WebKitWebInspector.cpp:
1631         (webkitWebInspectorCreate): Initialize didChangeAttachedWidth to null.
1632
1633 2013-12-30  Martin Robinson  <mrobinson@igalia.com>
1634
1635         [GTK] Make the output directory of GObject unit tests binaries consistent with the CMake build
1636         https://bugs.webkit.org/show_bug.cgi?id=126297
1637
1638         Reviewed by Philippe Normand.
1639
1640         * UIProcess/API/gtk/tests/GNUmakefile.am: Build the tests in the new directory.
1641         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
1642         (startTestServer): Update the search path to reflect the new directory.
1643         * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:
1644         (startTestServer): Update the search path to reflect the new directory.
1645
1646 2013-12-30  Carlos Garcia Campos  <cgarcia@igalia.com>
1647
1648         [SOUP] willSendRequest doesn't work after a redirect
1649         https://bugs.webkit.org/show_bug.cgi?id=126290
1650
1651         Reviewed by Martin Robinson.
1652
1653         Add test cases to test send-request signal in case of
1654         redirection.
1655
1656         * UIProcess/API/gtk/tests/TestResources.cpp:
1657         (testWebResourceSendRequest):
1658         (serverCallback):
1659
1660 2013-12-30  Commit Queue  <commit-queue@webkit.org>
1661
1662         Unreviewed, rolling out r161157, r161158, r161160, r161161,
1663         r161163, and r161165.
1664         http://trac.webkit.org/changeset/161157
1665         http://trac.webkit.org/changeset/161158
1666         http://trac.webkit.org/changeset/161160
1667         http://trac.webkit.org/changeset/161161
1668         http://trac.webkit.org/changeset/161163
1669         http://trac.webkit.org/changeset/161165
1670         https://bugs.webkit.org/show_bug.cgi?id=126332
1671
1672         Broke WebKit2 on Mountain Lion (Requested by ap on #webkit).
1673
1674         * Platform/IPC/Connection.cpp:
1675         (IPC::Connection::SyncMessageState::wait):
1676         (IPC::Connection::sendSyncMessageFromSecondaryThread):
1677         (IPC::Connection::waitForSyncReply):
1678
1679 2013-12-30  Anders Carlsson  <andersca@apple.com>
1680
1681         Try to fix the test failures seen on the bots.
1682
1683         Restore the BinarySemaphore behavior that existed in the old binary semaphore.
1684
1685         * Platform/IPC/Connection.cpp:
1686         (IPC::BinarySemaphore::wait):
1687
1688 2013-12-30  Anders Carlsson  <andersca@apple.com>
1689
1690         Fix.
1691
1692         * WebProcess/WebProcess.cpp:
1693         (WebKit::WebProcess::plugInDidStartFromOrigin):
1694
1695 2013-12-30  Anders Carlsson  <andersca@apple.com>
1696
1697         Move more of Connection over to STL threading primitives
1698         https://bugs.webkit.org/show_bug.cgi?id=126308
1699
1700         Reviewed by Andreas Kling.
1701
1702         * Platform/IPC/Connection.cpp:
1703         (IPC::BinarySemaphore::BinarySemaphore):
1704         (IPC::BinarySemaphore::~BinarySemaphore):
1705         (IPC::BinarySemaphore::signal):
1706         (IPC::BinarySemaphore::wait):
1707         Add a new BinarySemaphore class that uses STL threading primitives.
1708
1709         (IPC::Connection::SyncMessageState::wait):
1710         Change this to take a std::chrono::steady_clock::time_point.
1711
1712         (IPC::absoluteTimeoutTime):
1713         Add a new helper function that returns a time point from the a given timeout duration,
1714         correctly handling the max duration.
1715
1716         (IPC::Connection::sendSyncMessageFromSecondaryThread):
1717         Pass a time point to SyncMessageState::wait.
1718
1719         (IPC::Connection::waitForSyncReply):
1720         Ditto.
1721
1722 2013-12-30  Ryuan Choi  <ryuan.choi@samsung.com>
1723
1724         Replace remaning CoreIPC namespace to IPC
1725         https://bugs.webkit.org/show_bug.cgi?id=126305
1726
1727         Reviewed by Anders Carlsson.
1728
1729         This patch replaces CoreIPC to IPC in build scripts and source codes to fix
1730         build break on CMake based ports and Gtk (and maybe IOS).
1731
1732         * CMakeLists.txt:
1733         * GNUmakefile.am:
1734         * GNUmakefile.list.am:
1735         * Platform/IPC/unix/AttachmentUnix.cpp:
1736         * Platform/IPC/unix/ConnectionUnix.cpp:
1737         * Platform/unix/SharedMemoryUnix.cpp:
1738         (WebKit::SharedMemory::Handle::encode):
1739         (WebKit::SharedMemory::Handle::decode):
1740         (WebKit::SharedMemory::Handle::releaseToAttachment):
1741         * PlatformEfl.cmake:
1742         * PlatformGTK.cmake:
1743         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1744         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
1745         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
1746         (WebKit::WebCoordinatedSurface::Handle::encode):
1747         (WebKit::WebCoordinatedSurface::Handle::decode):
1748         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
1749         * Shared/Downloads/soup/DownloadSoup.cpp:
1750         (WebKit::DownloadClient::downloadFailed):
1751         (WebKit::Download::cancel):
1752         * Shared/WebBatteryStatus.cpp:
1753         (WebKit::WebBatteryStatus::Data::encode):
1754         (WebKit::WebBatteryStatus::Data::decode):
1755         * Shared/WebBatteryStatus.h:
1756         * Shared/WebNetworkInfo.cpp:
1757         (WebKit::WebNetworkInfo::Data::encode):
1758         (WebKit::WebNetworkInfo::Data::decode):
1759         * Shared/WebNetworkInfo.h:
1760         * Shared/cairo/LayerTreeContextCairo.cpp:
1761         (WebKit::LayerTreeContext::encode):
1762         (WebKit::LayerTreeContext::decode):
1763         * Shared/efl/LayerTreeContextEfl.cpp:
1764         (WebKit::LayerTreeContext::encode):
1765         (WebKit::LayerTreeContext::decode):
1766         * Shared/gtk/ArgumentCodersGtk.cpp:
1767         * Shared/gtk/ArgumentCodersGtk.h:
1768         * Shared/gtk/LayerTreeContextGtk.cpp:
1769         (WebKit::LayerTreeContext::encode):
1770         (WebKit::LayerTreeContext::decode):
1771         * Shared/ios/WebPlatformTouchPointIOS.cpp:
1772         (WebKit::WebPlatformTouchPoint::encode):
1773         (WebKit::WebPlatformTouchPoint::decode):
1774         * Shared/ios/WebTouchEventIOS.cpp:
1775         (WebKit::WebTouchEvent::encode):
1776         (WebKit::WebTouchEvent::decode):
1777         * Shared/linux/SeccompFilters/OpenSyscall.cpp:
1778         (WebKit::OpenSyscall::encode):
1779         (WebKit::OpenSyscall::decode):
1780         (WebKit::OpenSyscallResult::encode):
1781         (WebKit::OpenSyscallResult::decode):
1782         * Shared/linux/SeccompFilters/OpenSyscall.h:
1783         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
1784         (WebKit::SeccompBrokerClient::dispatch):
1785         (WebKit::SeccompBroker::runLoop):
1786         * Shared/linux/SeccompFilters/Syscall.cpp:
1787         (WebKit::Syscall::createFromDecoder):
1788         (WebKit::SyscallResult::createFromDecoder):
1789         * Shared/linux/SeccompFilters/Syscall.h:
1790         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
1791         (IPC::ArgumentCoder<CertificateInfo>::encode):
1792         (IPC::ArgumentCoder<CertificateInfo>::decode):
1793         * UIProcess/API/ios/PageClientImplIOS.h:
1794         * UIProcess/API/ios/PageClientImplIOS.mm:
1795         (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
1796         * UIProcess/API/mac/PDFViewController.h:
1797         * UIProcess/API/mac/PDFViewController.mm:
1798         (WebKit::convertPostScriptDataSourceToPDF):
1799         (WebKit::PDFViewController::setPDFDocumentData):
1800         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h:
1801         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1802         * UIProcess/DrawingAreaProxyImpl.h:
1803         * UIProcess/WebBatteryManagerProxy.h:
1804         * UIProcess/WebNetworkInfoManagerProxy.h:
1805         * UIProcess/WebVibrationProxy.h:
1806         * UIProcess/ios/WebPageProxyIOS.mm:
1807         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
1808         (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
1809         (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication):
1810         * UIProcess/soup/WebSoupRequestManagerProxy.h:
1811         * WebProcess/Battery/WebBatteryManager.h:
1812         * WebProcess/NetworkInfo/WebNetworkInfoManager.h:
1813         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
1814         (WebKit::CoordinatedDrawingArea::didReceiveCoordinatedLayerTreeHostMessage):
1815         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
1816         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1817         * WebProcess/WebPage/DrawingAreaImpl.h:
1818         * WebProcess/WebPage/ios/WebPageIOS.mm:
1819         (WebKit::WebPage::registerUIProcessAccessibilityTokens):
1820         * WebProcess/ios/WebProcessIOS.mm:
1821         (WebKit::WebProcess::platformInitializeWebProcess):
1822         * WebProcess/soup/WebProcessSoup.cpp:
1823         (WebKit::WebProcess::platformInitializeWebProcess):
1824         * WebProcess/soup/WebSoupRequestManager.cpp:
1825         (WebKit::WebSoupRequestManager::didHandleURIRequest):
1826         (WebKit::WebSoupRequestManager::didReceiveURIRequestData):
1827         * WebProcess/soup/WebSoupRequestManager.h:
1828         * WebProcess/soup/WebSoupRequestManager.messages.in:
1829
1830 2013-12-30  Ryuan Choi  <ryuan.choi@samsung.com>
1831
1832         Unreviewed build fix attempt on GTK port after 161152
1833
1834         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1835         (WebKit::WebEditorClient::getEditorCommandsForKeyEvent):
1836
1837 2013-12-30  Anders Carlsson  <andersca@apple.com>
1838
1839         Use std::chrono::milliseconds for all IPC message timeouts
1840         https://bugs.webkit.org/show_bug.cgi?id=126303
1841
1842         Reviewed by Andreas Kling.
1843
1844         * Platform/IPC/Connection.cpp:
1845         (IPC::Connection::sendSyncMessage):
1846         (IPC::Connection::sendSyncMessageFromSecondaryThread):
1847         (IPC::Connection::waitForSyncReply):
1848         * Platform/IPC/Connection.h:
1849         (IPC::Connection::sendSync):
1850         * Platform/IPC/MessageSender.h:
1851         (IPC::MessageSender::sendSync):
1852         * Shared/ChildProcessProxy.h:
1853         (WebKit::ChildProcessProxy::sendSync):
1854         * UIProcess/mac/WebPageProxyMac.mm:
1855         (WebKit::WebPageProxy::stringSelectionForPasteboard):
1856         (WebKit::WebPageProxy::dataSelectionForPasteboard):
1857         (WebKit::WebPageProxy::readSelectionFromPasteboard):
1858         (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
1859         (WebKit::WebPageProxy::acceptsFirstMouse):
1860         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1861         (WebKit::InjectedBundle::postSynchronousMessage):
1862         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1863         (WebKit::WebChromeClient::runJavaScriptAlert):
1864         (WebKit::WebChromeClient::runJavaScriptConfirm):
1865         (WebKit::WebChromeClient::runJavaScriptPrompt):
1866         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1867         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1868         * WebProcess/WebPage/WebInspector.cpp:
1869         (WebKit::WebInspector::createInspectorPage):
1870
1871 2013-12-30  Anders Carlsson  <andersca@apple.com>
1872
1873         Remove empty directories.
1874
1875         * Platform/CoreIPC: Removed.
1876         * Platform/CoreIPC/mac: Removed.
1877         * Platform/CoreIPC/unix: Removed.
1878
1879 2013-12-30  Anders Carlsson  <andersca@apple.com>
1880
1881         Move code over to the IPC namespace.
1882
1883         Rubber-stamped by Andreas Kling.
1884
1885         * DatabaseProcess/DatabaseProcess.cpp:
1886         (WebKit::DatabaseProcess::initializeConnection):
1887         (WebKit::DatabaseProcess::didClose):
1888         (WebKit::DatabaseProcess::didReceiveInvalidMessage):
1889         (WebKit::DatabaseProcess::createDatabaseToWebProcessConnection):
1890         * DatabaseProcess/DatabaseProcess.h:
1891         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
1892         (WebKit::DatabaseToWebProcessConnection::create):
1893         (WebKit::DatabaseToWebProcessConnection::DatabaseToWebProcessConnection):
1894         (WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
1895         (WebKit::DatabaseToWebProcessConnection::didClose):
1896         (WebKit::DatabaseToWebProcessConnection::didReceiveInvalidMessage):
1897         * DatabaseProcess/DatabaseToWebProcessConnection.h:
1898         (WebKit::DatabaseToWebProcessConnection::connection):
1899         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1900         (WebKit::DatabaseProcessIDBConnection::messageSenderConnection):
1901         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
1902         * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
1903         (WebKit::AsynchronousNetworkLoaderClient::willSendRequest):
1904         (WebKit::AsynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace):
1905         (WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
1906         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1907         (WebKit::NetworkConnectionToWebProcess::create):
1908         (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
1909         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
1910         (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage):
1911         (WebKit::NetworkConnectionToWebProcess::didClose):
1912         (WebKit::NetworkConnectionToWebProcess::didReceiveInvalidMessage):
1913         * NetworkProcess/NetworkConnectionToWebProcess.h:
1914         (WebKit::NetworkConnectionToWebProcess::connection):
1915         * NetworkProcess/NetworkProcess.cpp:
1916         (WebKit::NetworkProcess::didReceiveMessage):
1917         (WebKit::NetworkProcess::didReceiveSyncMessage):
1918         (WebKit::NetworkProcess::didClose):
1919         (WebKit::NetworkProcess::didReceiveInvalidMessage):
1920         (WebKit::NetworkProcess::downloadProxyConnection):
1921         (WebKit::NetworkProcess::initializeConnection):
1922         (WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
1923         * NetworkProcess/NetworkProcess.h:
1924         * NetworkProcess/NetworkResourceLoader.cpp:
1925         (WebKit::NetworkResourceLoader::messageSenderConnection):
1926         * NetworkProcess/NetworkResourceLoader.h:
1927         * NetworkProcess/mac/DiskCacheMonitor.h:
1928         * NetworkProcess/mac/DiskCacheMonitor.mm:
1929         (WebKit::DiskCacheMonitor::messageSenderConnection):
1930         * Platform/IPC/ArgumentCoder.h:
1931         * Platform/IPC/ArgumentCoders.cpp:
1932         * Platform/IPC/ArgumentCoders.h:
1933         * Platform/IPC/ArgumentDecoder.cpp:
1934         * Platform/IPC/ArgumentDecoder.h:
1935         * Platform/IPC/ArgumentEncoder.cpp:
1936         * Platform/IPC/ArgumentEncoder.h:
1937         * Platform/IPC/Arguments.h:
1938         * Platform/IPC/Attachment.cpp:
1939         * Platform/IPC/Attachment.h:
1940         * Platform/IPC/Connection.cpp:
1941         (IPC::Connection::Connection):
1942         * Platform/IPC/Connection.h:
1943         * Platform/IPC/HandleMessage.h:
1944         * Platform/IPC/MessageDecoder.cpp:
1945         * Platform/IPC/MessageDecoder.h:
1946         * Platform/IPC/MessageEncoder.cpp:
1947         * Platform/IPC/MessageEncoder.h:
1948         * Platform/IPC/MessageFlags.h:
1949         * Platform/IPC/MessageReceiver.h:
1950         * Platform/IPC/MessageReceiverMap.cpp:
1951         * Platform/IPC/MessageReceiverMap.h:
1952         * Platform/IPC/mac/ConnectionMac.cpp:
1953         * Platform/IPC/mac/ImportanceAssertion.h:
1954         * Platform/IPC/mac/MachPort.h:
1955         * Platform/SharedMemory.h:
1956         * Platform/mac/SharedMemoryMac.cpp:
1957         (WebKit::SharedMemory::Handle::encode):
1958         (WebKit::SharedMemory::Handle::decode):
1959         * PluginProcess/PluginControllerProxy.cpp:
1960         (WebKit::PluginControllerProxy::streamDidReceiveData):
1961         (WebKit::PluginControllerProxy::manualStreamDidReceiveData):
1962         * PluginProcess/PluginControllerProxy.h:
1963         * PluginProcess/PluginControllerProxy.messages.in:
1964         * PluginProcess/PluginCreationParameters.cpp:
1965         (WebKit::PluginCreationParameters::encode):
1966         (WebKit::PluginCreationParameters::decode):
1967         * PluginProcess/PluginCreationParameters.h:
1968         * PluginProcess/PluginProcess.cpp:
1969         (WebKit::PluginProcess::didReceiveMessage):
1970         (WebKit::PluginProcess::didClose):
1971         (WebKit::PluginProcess::didReceiveInvalidMessage):
1972         (WebKit::PluginProcess::createWebProcessConnection):
1973         * PluginProcess/PluginProcess.h:
1974         * PluginProcess/WebProcessConnection.cpp:
1975         (WebKit::WebProcessConnection::create):
1976         (WebKit::WebProcessConnection::WebProcessConnection):
1977         (WebKit::WebProcessConnection::setGlobalException):
1978         (WebKit::WebProcessConnection::didReceiveMessage):
1979         (WebKit::WebProcessConnection::didReceiveSyncMessage):
1980         (WebKit::WebProcessConnection::didClose):
1981         (WebKit::WebProcessConnection::didReceiveInvalidMessage):
1982         * PluginProcess/WebProcessConnection.h:
1983         (WebKit::WebProcessConnection::connection):
1984         * PluginProcess/mac/PluginControllerProxyMac.mm:
1985         (WebKit::PluginControllerProxy::setComplexTextInputState):
1986         * Scripts/webkit2/messages.py:
1987         (arguments_type_old):
1988         (message_to_struct_declaration):
1989         (forward_declarations_and_headers):
1990         (generate_messages_header):
1991         (async_message_statement):
1992         (sync_message_statement):
1993         (headers_for_type):
1994         (generate_message_handler):
1995         * Scripts/webkit2/messages_unittest.py:
1996         (IPC):
1997         (std):
1998         * Shared/API/Cocoa/RemoteObjectRegistry.h:
1999         * Shared/APIGeometry.cpp:
2000         (API::Point::encode):
2001         (API::Point::decode):
2002         (API::Size::encode):
2003         (API::Size::decode):
2004         (API::Rect::encode):
2005         (API::Rect::decode):
2006         * Shared/APIGeometry.h:
2007         * Shared/APINumber.h:
2008         (API::Number::encode):
2009         (API::Number::decode):
2010         * Shared/Authentication/AuthenticationManager.h:
2011         * Shared/ChildProcess.cpp:
2012         (WebKit::didCloseOnConnectionWorkQueue):
2013         (WebKit::ChildProcess::initialize):
2014         (WebKit::ChildProcess::initializeConnection):
2015         (WebKit::ChildProcess::addMessageReceiver):
2016         (WebKit::ChildProcess::removeMessageReceiver):
2017         (WebKit::ChildProcess::messageSenderConnection):
2018         * Shared/ChildProcess.h:
2019         (WebKit::ChildProcess::parentProcessConnection):
2020         (WebKit::ChildProcess::messageReceiverMap):
2021         * Shared/ChildProcessProxy.cpp:
2022         (WebKit::ChildProcessProxy::fromConnection):
2023         (WebKit::ChildProcessProxy::sendMessage):
2024         (WebKit::ChildProcessProxy::addMessageReceiver):
2025         (WebKit::ChildProcessProxy::removeMessageReceiver):
2026         (WebKit::ChildProcessProxy::dispatchMessage):
2027         (WebKit::ChildProcessProxy::dispatchSyncMessage):
2028         (WebKit::ChildProcessProxy::didFinishLaunching):
2029         (WebKit::ChildProcessProxy::connectionWillOpen):
2030         (WebKit::ChildProcessProxy::connectionWillClose):
2031         * Shared/ChildProcessProxy.h:
2032         (WebKit::ChildProcessProxy::connection):
2033         (WebKit::ChildProcessProxy::send):
2034         * Shared/ChildProcessSupplement.h:
2035         (WebKit::ChildProcessSupplement::initializeConnection):
2036         * Shared/ConnectionStack.h:
2037         (WebKit::ConnectionStack::current):
2038         (WebKit::ConnectionStack::CurrentConnectionPusher::CurrentConnectionPusher):
2039         * Shared/CoreIPCSupport/WebContextMessageKinds.h:
2040         (WebContextLegacyMessages::messageReceiverName):
2041         (WebContextLegacyMessages::postMessageMessageName):
2042         (WebContextLegacyMessages::postSynchronousMessageMessageName):
2043         * Shared/Databases/DatabaseProcessCreationParameters.cpp:
2044         (WebKit::DatabaseProcessCreationParameters::encode):
2045         (WebKit::DatabaseProcessCreationParameters::decode):
2046         * Shared/Databases/DatabaseProcessCreationParameters.h:
2047         * Shared/DictionaryPopupInfo.cpp:
2048         (WebKit::DictionaryPopupInfo::encode):
2049         (WebKit::DictionaryPopupInfo::decode):
2050         * Shared/DictionaryPopupInfo.h:
2051         * Shared/Downloads/Download.cpp:
2052         (WebKit::Download::didFail):
2053         (WebKit::Download::didCancel):
2054         (WebKit::Download::messageSenderConnection):
2055         * Shared/Downloads/Download.h:
2056         * Shared/Downloads/DownloadManager.cpp:
2057         (WebKit::DownloadManager::downloadProxyConnection):
2058         * Shared/Downloads/DownloadManager.h:
2059         * Shared/Downloads/mac/DownloadMac.mm:
2060         (WebKit::Download::cancel):
2061         (-[WKDownloadAsDelegate download:didFailWithError:]):
2062         * Shared/EditorState.cpp:
2063         (WebKit::EditorState::encode):
2064         (WebKit::EditorState::decode):
2065         * Shared/EditorState.h:
2066         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h:
2067         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm:
2068         (WebKit::ChildProcessMainDelegate::getConnectionIdentifier):
2069         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
2070         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
2071         (WebKit::XPCServiceInitializerDelegate::getConnectionIdentifier):
2072         * Shared/FileAPI/BlobRegistrationData.cpp:
2073         (WebKit::BlobRegistrationData::encode):
2074         (WebKit::BlobRegistrationData::decode):
2075         * Shared/FileAPI/BlobRegistrationData.h:
2076         * Shared/FontInfo.cpp:
2077         (WebKit::FontInfo::encode):
2078         (WebKit::FontInfo::decode):
2079         * Shared/FontInfo.h:
2080         * Shared/LayerTreeContext.h:
2081         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
2082         * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in:
2083         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
2084         (WebKit::CustomProtocolManager::initializeConnection):
2085         (WebKit::CustomProtocolManager::didLoadData):
2086         * Shared/Network/NetworkProcessCreationParameters.cpp:
2087         (WebKit::NetworkProcessCreationParameters::encode):
2088         (WebKit::NetworkProcessCreationParameters::decode):
2089         * Shared/Network/NetworkProcessCreationParameters.h:
2090         * Shared/Network/NetworkResourceLoadParameters.cpp:
2091         (WebKit::NetworkResourceLoadParameters::encode):
2092         (WebKit::NetworkResourceLoadParameters::decode):
2093         * Shared/Network/NetworkResourceLoadParameters.h:
2094         * Shared/OriginAndDatabases.cpp:
2095         (WebKit::OriginAndDatabases::encode):
2096         (WebKit::OriginAndDatabases::decode):
2097         * Shared/OriginAndDatabases.h:
2098         * Shared/PlatformPopupMenuData.cpp:
2099         (WebKit::PlatformPopupMenuData::encode):
2100         (WebKit::PlatformPopupMenuData::decode):
2101         * Shared/PlatformPopupMenuData.h:
2102         * Shared/Plugins/NPIdentifierData.cpp:
2103         (WebKit::NPIdentifierData::encode):
2104         (WebKit::NPIdentifierData::decode):
2105         * Shared/Plugins/NPIdentifierData.h:
2106         * Shared/Plugins/NPObjectMessageReceiver.h:
2107         * Shared/Plugins/NPRemoteObjectMap.cpp:
2108         (WebKit::NPRemoteObjectMap::create):
2109         (WebKit::NPRemoteObjectMap::NPRemoteObjectMap):
2110         (WebKit::NPRemoteObjectMap::didReceiveSyncMessage):
2111         * Shared/Plugins/NPRemoteObjectMap.h:
2112         (WebKit::NPRemoteObjectMap::connection):
2113         * Shared/Plugins/NPVariantData.cpp:
2114         (WebKit::NPVariantData::encode):
2115         (WebKit::NPVariantData::decode):
2116         * Shared/Plugins/NPVariantData.h:
2117         * Shared/Plugins/PluginProcessCreationParameters.cpp:
2118         (WebKit::PluginProcessCreationParameters::encode):
2119         (WebKit::PluginProcessCreationParameters::decode):
2120         * Shared/Plugins/PluginProcessCreationParameters.h:
2121         * Shared/PrintInfo.cpp:
2122         (WebKit::PrintInfo::encode):
2123         (WebKit::PrintInfo::decode):
2124         * Shared/PrintInfo.h:
2125         * Shared/SandboxExtension.h:
2126         (WebKit::SandboxExtension::Handle::encode):
2127         (WebKit::SandboxExtension::Handle::decode):
2128         (WebKit::SandboxExtension::HandleArray::encode):
2129         (WebKit::SandboxExtension::HandleArray::decode):
2130         * Shared/SecurityOriginData.cpp:
2131         (WebKit::SecurityOriginData::encode):
2132         (WebKit::SecurityOriginData::decode):
2133         * Shared/SecurityOriginData.h:
2134         * Shared/SessionState.cpp:
2135         (WebKit::SessionState::encode):
2136         (WebKit::SessionState::decode):
2137         * Shared/SessionState.h:
2138         * Shared/ShareableBitmap.cpp:
2139         (WebKit::ShareableBitmap::Handle::encode):
2140         (WebKit::ShareableBitmap::Handle::decode):
2141         * Shared/ShareableBitmap.h:
2142         * Shared/ShareableResource.cpp:
2143         (WebKit::ShareableResource::Handle::encode):
2144         (WebKit::ShareableResource::Handle::decode):
2145         * Shared/ShareableResource.h:
2146         * Shared/StatisticsData.cpp:
2147         (WebKit::StatisticsData::encode):
2148         (WebKit::StatisticsData::decode):
2149         * Shared/StatisticsData.h:
2150         * Shared/TextCheckerState.h:
2151         * Shared/UpdateInfo.cpp:
2152         (WebKit::UpdateInfo::encode):
2153         (WebKit::UpdateInfo::decode):
2154         * Shared/UpdateInfo.h:
2155         * Shared/UserData.cpp:
2156         (WebKit::UserData::encode):
2157         (WebKit::UserData::decode):
2158         * Shared/UserData.h:
2159         * Shared/UserMessageCoders.h:
2160         (WebKit::UserMessageEncoder::baseEncode):
2161         (WebKit::UserMessageDecoder::baseDecode):
2162         * Shared/WebBackForwardListItem.cpp:
2163         (WebKit::WebBackForwardListItem::encode):
2164         (WebKit::WebBackForwardListItem::decode):
2165         * Shared/WebBackForwardListItem.h:
2166         * Shared/WebConnection.cpp:
2167         (WebKit::WebConnection::postMessage):
2168         (WebKit::WebConnection::didReceiveMessage):
2169         (WebKit::WebConnection::handleMessage):
2170         * Shared/WebConnection.h:
2171         * Shared/WebContextMenuItemData.cpp:
2172         (WebKit::WebContextMenuItemData::encode):
2173         (WebKit::WebContextMenuItemData::decode):
2174         * Shared/WebContextMenuItemData.h:
2175         * Shared/WebCoreArgumentCoders.cpp:
2176         * Shared/WebCoreArgumentCoders.h:
2177         * Shared/WebEvent.cpp:
2178         (WebKit::WebEvent::encode):
2179         (WebKit::WebEvent::decode):
2180         * Shared/WebEvent.h:
2181         * Shared/WebGeolocationPosition.cpp:
2182         (WebKit::WebGeolocationPosition::Data::encode):
2183         (WebKit::WebGeolocationPosition::Data::decode):
2184         * Shared/WebGeolocationPosition.h:
2185         * Shared/WebHitTestResult.cpp:
2186         (WebKit::WebHitTestResult::Data::encode):
2187         (WebKit::WebHitTestResult::Data::decode):
2188         * Shared/WebHitTestResult.h:
2189         * Shared/WebKeyboardEvent.cpp:
2190         (WebKit::WebKeyboardEvent::encode):
2191         (WebKit::WebKeyboardEvent::decode):
2192         * Shared/WebMouseEvent.cpp:
2193         (WebKit::WebMouseEvent::encode):
2194         (WebKit::WebMouseEvent::decode):
2195         * Shared/WebNavigationDataStore.h:
2196         (WebKit::WebNavigationDataStore::encode):
2197         (WebKit::WebNavigationDataStore::decode):
2198         * Shared/WebPageCreationParameters.cpp:
2199         (WebKit::WebPageCreationParameters::encode):
2200         (WebKit::WebPageCreationParameters::decode):
2201         * Shared/WebPageCreationParameters.h:
2202         * Shared/WebPageGroupData.cpp:
2203         (WebKit::WebPageGroupData::encode):
2204         (WebKit::WebPageGroupData::decode):
2205         * Shared/WebPageGroupData.h:
2206         * Shared/WebPlatformTouchPoint.cpp:
2207         (WebKit::WebPlatformTouchPoint::encode):
2208         (WebKit::WebPlatformTouchPoint::decode):
2209         * Shared/WebPopupItem.cpp:
2210         (WebKit::WebPopupItem::encode):
2211         (WebKit::WebPopupItem::decode):
2212         * Shared/WebPopupItem.h:
2213         * Shared/WebPreferencesStore.cpp:
2214         (WebKit::WebPreferencesStore::encode):
2215         (WebKit::WebPreferencesStore::decode):
2216         * Shared/WebPreferencesStore.h:
2217         * Shared/WebProcessCreationParameters.cpp:
2218         (WebKit::WebProcessCreationParameters::encode):
2219         (WebKit::WebProcessCreationParameters::decode):
2220         * Shared/WebProcessCreationParameters.h:
2221         * Shared/WebSerializedScriptValue.h:
2222         (WebKit::WebSerializedScriptValue::dataReference):
2223         * Shared/WebTouchEvent.cpp:
2224         (WebKit::WebTouchEvent::encode):
2225         (WebKit::WebTouchEvent::decode):
2226         * Shared/WebWheelEvent.cpp:
2227         (WebKit::WebWheelEvent::encode):
2228         (WebKit::WebWheelEvent::decode):
2229         * Shared/cf/ArgumentCodersCF.cpp:
2230         (IPC::encode):
2231         (IPC::decode):
2232         * Shared/cf/ArgumentCodersCF.h:
2233         * Shared/mac/ArgumentCodersMac.h:
2234         * Shared/mac/ArgumentCodersMac.mm:
2235         (IPC::encode):
2236         (IPC::decode):
2237         * Shared/mac/AttributedString.h:
2238         * Shared/mac/AttributedString.mm:
2239         (WebKit::AttributedString::encode):
2240         (WebKit::AttributedString::decode):
2241         * Shared/mac/ColorSpaceData.h:
2242         * Shared/mac/ColorSpaceData.mm:
2243         (WebKit::ColorSpaceData::encode):
2244         (WebKit::ColorSpaceData::decode):
2245         * Shared/mac/LayerTreeContextMac.mm:
2246         (WebKit::LayerTreeContext::encode):
2247         (WebKit::LayerTreeContext::decode):
2248         * Shared/mac/ObjCObjectGraphCoders.h:
2249         * Shared/mac/ObjCObjectGraphCoders.mm:
2250         (WebKit::ObjCObjectGraphEncoder::baseEncode):
2251         (WebKit::ObjCObjectGraphDecoder::baseDecode):
2252         (WebKit::WebContextObjCObjectGraphEncoderImpl::encode):
2253         (WebKit::WebContextObjCObjectGraphDecoderImpl::decode):
2254         (WebKit::InjectedBundleObjCObjectGraphEncoderImpl::encode):
2255         (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode):
2256         (WebKit::WebContextObjCObjectGraphEncoder::encode):
2257         (WebKit::WebContextObjCObjectGraphDecoder::decode):
2258         (WebKit::InjectedBundleObjCObjectGraphEncoder::encode):
2259         (WebKit::InjectedBundleObjCObjectGraphDecoder::decode):
2260         * Shared/mac/RemoteLayerBackingStore.h:
2261         * Shared/mac/RemoteLayerBackingStore.mm:
2262         (RemoteLayerBackingStore::encode):
2263         (RemoteLayerBackingStore::decode):
2264         * Shared/mac/RemoteLayerTreeTransaction.h:
2265         * Shared/mac/RemoteLayerTreeTransaction.mm:
2266         (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode):
2267         (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode):
2268         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
2269         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
2270         (WebKit::RemoteLayerTreeTransaction::encode):
2271         (WebKit::RemoteLayerTreeTransaction::decode):
2272         * Shared/mac/SandboxExtensionMac.mm:
2273         (WebKit::SandboxExtension::Handle::encode):
2274         (WebKit::SandboxExtension::Handle::decode):
2275         (WebKit::SandboxExtension::HandleArray::encode):
2276         (WebKit::SandboxExtension::HandleArray::decode):
2277         * Shared/mac/SecItemRequestData.cpp:
2278         (WebKit::SecItemRequestData::encode):
2279         (WebKit::SecItemRequestData::decode):
2280         * Shared/mac/SecItemRequestData.h:
2281         * Shared/mac/SecItemResponseData.cpp:
2282         (WebKit::SecItemResponseData::encode):
2283         (WebKit::SecItemResponseData::decode):
2284         * Shared/mac/SecItemResponseData.h:
2285         * Shared/mac/SecItemShim.cpp:
2286         (WebKit::SecItemShim::initializeConnection):
2287         * Shared/mac/SecItemShim.h:
2288         * Shared/mac/WebCoreArgumentCodersMac.mm:
2289         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
2290         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
2291         (IPC::ArgumentCoder<ResourceResponse>::encodePlatformData):
2292         (IPC::ArgumentCoder<ResourceResponse>::decodePlatformData):
2293         (IPC::ArgumentCoder<CertificateInfo>::encode):
2294         (IPC::ArgumentCoder<CertificateInfo>::decode):
2295         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
2296         (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
2297         * UIProcess/API/mac/PageClientImpl.h:
2298         * UIProcess/API/mac/PageClientImpl.mm:
2299         (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
2300         * UIProcess/API/mac/WKView.mm:
2301         (-[WKView _accessibilityRegisterUIProcessTokens]):
2302         * UIProcess/API/mac/WKViewInternal.h:
2303         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
2304         (WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy):
2305         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
2306         (WebKit::AuthenticationChallengeProxy::create):
2307         * UIProcess/Databases/DatabaseProcessProxy.cpp:
2308         (WebKit::DatabaseProcessProxy::connectionWillOpen):
2309         (WebKit::DatabaseProcessProxy::connectionWillClose):
2310         (WebKit::DatabaseProcessProxy::getDatabaseProcessConnection):
2311         (WebKit::DatabaseProcessProxy::didClose):
2312         (WebKit::DatabaseProcessProxy::didReceiveInvalidMessage):
2313         (WebKit::DatabaseProcessProxy::didCreateDatabaseToWebProcessConnection):
2314         (WebKit::DatabaseProcessProxy::didFinishLaunching):
2315         * UIProcess/Databases/DatabaseProcessProxy.h:
2316         * UIProcess/Databases/DatabaseProcessProxy.messages.in:
2317         * UIProcess/Downloads/DownloadProxy.cpp:
2318         (WebKit::createData):
2319         (WebKit::DownloadProxy::didFail):
2320         (WebKit::DownloadProxy::didCancel):
2321         * UIProcess/Downloads/DownloadProxy.h:
2322         * UIProcess/Downloads/DownloadProxy.messages.in:
2323         * UIProcess/DrawingAreaProxy.h:
2324         * UIProcess/Launcher/ProcessLauncher.cpp:
2325         (WebKit::ProcessLauncher::didFinishLaunchingProcess):
2326         * UIProcess/Launcher/ProcessLauncher.h:
2327         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2328         (WebKit::connectToService):
2329         (WebKit::tryPreexistingProcess):
2330         (WebKit::createProcess):
2331         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
2332         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
2333         (-[WKCustomProtocolLoader connection:didReceiveData:]):
2334         * UIProcess/Network/NetworkProcessProxy.cpp:
2335         (WebKit::NetworkProcessProxy::connectionWillOpen):
2336         (WebKit::NetworkProcessProxy::connectionWillClose):
2337         (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
2338         (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
2339         (WebKit::NetworkProcessProxy::didReceiveMessage):
2340         (WebKit::NetworkProcessProxy::didReceiveSyncMessage):
2341         (WebKit::NetworkProcessProxy::didClose):
2342         (WebKit::NetworkProcessProxy::didReceiveInvalidMessage):
2343         (WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess):
2344         (WebKit::NetworkProcessProxy::didFinishLaunching):
2345         * UIProcess/Network/NetworkProcessProxy.h:
2346         * UIProcess/Network/NetworkProcessProxy.messages.in:
2347         * UIProcess/Notifications/WebNotification.h:
2348         * UIProcess/PageClient.h:
2349         * UIProcess/Plugins/PluginProcessManager.h:
2350         * UIProcess/Plugins/PluginProcessProxy.cpp:
2351         (WebKit::PluginProcessProxy::getPluginProcessConnection):
2352         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
2353         (WebKit::PluginProcessProxy::didClose):
2354         (WebKit::PluginProcessProxy::didReceiveInvalidMessage):
2355         (WebKit::PluginProcessProxy::didFinishLaunching):
2356         (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
2357         * UIProcess/Plugins/PluginProcessProxy.h:
2358         * UIProcess/Plugins/PluginProcessProxy.messages.in:
2359         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2360         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
2361         * UIProcess/Storage/StorageManager.cpp:
2362         (WebKit::StorageManager::StorageArea::addListener):
2363         (WebKit::StorageManager::StorageArea::removeListener):
2364         (WebKit::StorageManager::StorageArea::setItem):
2365         (WebKit::StorageManager::StorageArea::removeItem):
2366         (WebKit::StorageManager::StorageArea::clear):
2367         (WebKit::StorageManager::StorageArea::dispatchEvents):
2368         (WebKit::StorageManager::SessionStorageNamespace::allowedConnection):
2369         (WebKit::StorageManager::SessionStorageNamespace::create):
2370         (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace):
2371         (WebKit::StorageManager::SessionStorageNamespace::setAllowedConnection):
2372         (WebKit::StorageManager::createSessionStorageNamespace):
2373         (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnection):
2374         (WebKit::StorageManager::processWillCloseConnection):
2375         (WebKit::StorageManager::createLocalStorageMap):
2376         (WebKit::StorageManager::createSessionStorageMap):
2377         (WebKit::StorageManager::destroyStorageMap):
2378         (WebKit::StorageManager::getValues):
2379         (WebKit::StorageManager::setItem):
2380         (WebKit::StorageManager::removeItem):
2381         (WebKit::StorageManager::clear):
2382         (WebKit::StorageManager::createSessionStorageNamespaceInternal):
2383         (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnectionInternal):
2384         (WebKit::StorageManager::invalidateConnectionInternal):
2385         (WebKit::StorageManager::findStorageArea):
2386         * UIProcess/Storage/StorageManager.h:
2387         * UIProcess/WebApplicationCacheManagerProxy.h:
2388         * UIProcess/WebConnectionToWebProcess.cpp:
2389         (WebKit::WebConnectionToWebProcess::encodeMessageBody):
2390         (WebKit::WebConnectionToWebProcess::decodeMessageBody):
2391         (WebKit::WebConnectionToWebProcess::messageSenderConnection):
2392         * UIProcess/WebConnectionToWebProcess.h:
2393         * UIProcess/WebContext.cpp:
2394         (WebKit::WebContext::networkingProcessConnection):
2395         (WebKit::WebContext::didReceiveInvalidMessage):
2396         (WebKit::WebContext::createNewWebProcess):
2397         (WebKit::WebContext::postMessageToInjectedBundle):
2398         (WebKit::WebContext::addMessageReceiver):
2399         (WebKit::WebContext::removeMessageReceiver):
2400         (WebKit::WebContext::dispatchMessage):
2401         (WebKit::WebContext::dispatchSyncMessage):
2402         (WebKit::WebContext::didReceiveMessage):
2403         (WebKit::WebContext::didReceiveSyncMessage):
2404         * UIProcess/WebContext.h:
2405         * UIProcess/WebContextUserMessageCoders.h:
2406         (WebKit::WebContextUserMessageEncoder::encode):
2407         (WebKit::WebContextUserMessageDecoder::decode):
2408         * UIProcess/WebCookieManagerProxy.h:
2409         * UIProcess/WebDatabaseManagerProxy.h:
2410         * UIProcess/WebEditCommandProxy.cpp:
2411         (WebKit::WebEditCommandProxy::unapply):
2412         (WebKit::WebEditCommandProxy::reapply):
2413         * UIProcess/WebFrameProxy.h:
2414         * UIProcess/WebFullScreenManagerProxy.h:
2415         * UIProcess/WebGeolocationManagerProxy.cpp:
2416         (WebKit::WebGeolocationManagerProxy::startUpdating):
2417         (WebKit::WebGeolocationManagerProxy::stopUpdating):
2418         (WebKit::WebGeolocationManagerProxy::removeRequester):
2419         (WebKit::WebGeolocationManagerProxy::setEnableHighAccuracy):
2420         * UIProcess/WebGeolocationManagerProxy.h:
2421         * UIProcess/WebIconDatabase.cpp:
2422         (WebKit::WebIconDatabase::setIconDataForIconURL):
2423         (WebKit::WebIconDatabase::synchronousIconDataForPageURL):
2424         * UIProcess/WebIconDatabase.h:
2425         * UIProcess/WebIconDatabase.messages.in:
2426         * UIProcess/WebInspectorProxy.h:
2427         * UIProcess/WebMediaCacheManagerProxy.h:
2428         * UIProcess/WebOriginDataManagerProxy.h:
2429         * UIProcess/WebPageProxy.cpp:
2430         (WebKit::WebPageProxy::willGoToBackForwardListItem):
2431         (WebKit::WebPageProxy::preferencesDidChange):
2432         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
2433         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
2434         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
2435         (WebKit::WebPageProxy::didCommitLoadForFrame):
2436         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
2437         (WebKit::WebPageProxy::didFinishLoadForFrame):
2438         (WebKit::WebPageProxy::didFailLoadForFrame):
2439         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
2440         (WebKit::WebPageProxy::didReceiveTitleForFrame):
2441         (WebKit::WebPageProxy::didFirstLayoutForFrame):
2442         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
2443         (WebKit::WebPageProxy::didLayout):
2444         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
2445         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
2446         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
2447         (WebKit::WebPageProxy::didDetectXSSForFrame):
2448         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2449         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
2450         (WebKit::WebPageProxy::decidePolicyForResponse):
2451         (WebKit::WebPageProxy::decidePolicyForResponseSync):
2452         (WebKit::WebPageProxy::unableToImplementPolicy):
2453         (WebKit::WebPageProxy::willSubmitForm):
2454         (WebKit::WebPageProxy::mouseDidMoveOverElement):
2455         (WebKit::WebPageProxy::connectionWillOpen):
2456         (WebKit::WebPageProxy::connectionWillClose):
2457         (WebKit::WebPageProxy::sendMessage):
2458         (WebKit::WebPageProxy::messageSenderConnection):
2459         (WebKit::WebPageProxy::showContextMenu):
2460         (WebKit::WebPageProxy::internalShowContextMenu):
2461         (WebKit::WebPageProxy::dataCallback):
2462         (WebKit::WebPageProxy::scriptValueCallback):
2463         (WebKit::WebPageProxy::beginPrinting):
2464         (WebKit::WebPageProxy::endPrinting):
2465         (WebKit::WebPageProxy::computePagesForPrinting):
2466         (WebKit::WebPageProxy::drawRectToImage):
2467         (WebKit::WebPageProxy::drawPagesToPDF):
2468         (WebKit::WebPageProxy::drawPagesForPrinting):
2469         (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder):
2470         * UIProcess/WebPageProxy.h:
2471         * UIProcess/WebPageProxy.messages.in:
2472         * UIProcess/WebProcessProxy.cpp:
2473         (WebKit::WebProcessProxy::connectionWillOpen):
2474         (WebKit::WebProcessProxy::connectionWillClose):
2475         (WebKit::WebProcessProxy::addBackForwardItem):
2476         (WebKit::WebProcessProxy::didReceiveMessage):
2477         (WebKit::WebProcessProxy::didReceiveSyncMessage):
2478         (WebKit::WebProcessProxy::didClose):
2479         (WebKit::WebProcessProxy::didReceiveInvalidMessage):
2480         (WebKit::WebProcessProxy::didFinishLaunching):
2481         * UIProcess/WebProcessProxy.h:
2482         (WebKit::WebProcessProxy::fromConnection):
2483         * UIProcess/WebProcessProxy.messages.in:
2484         * UIProcess/WebResourceCacheManagerProxy.h:
2485         * UIProcess/cf/WebBackForwardListCF.cpp:
2486         (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
2487         * UIProcess/mac/RemoteLayerTreeHost.h:
2488         * UIProcess/mac/SecItemShimProxy.cpp:
2489         (WebKit::SecItemShimProxy::initializeConnection):
2490         (WebKit::SecItemShimProxy::secItemRequest):
2491         * UIProcess/mac/SecItemShimProxy.h:
2492         * UIProcess/mac/ViewGestureController.h:
2493         * UIProcess/mac/WebContextMac.mm:
2494         (WebKit::WebContext::platformInitializeWebProcess):
2495         * UIProcess/mac/WebPageProxyMac.mm:
2496         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
2497         (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
2498         (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication):
2499         * WebKit2.xcodeproj/project.pbxproj:
2500         * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
2501         * WebProcess/Cookies/WebCookieManager.h:
2502         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2503         (WebKit::WebIDBServerConnection::messageSenderConnection):
2504         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2505         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
2506         (WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection):
2507         (WebKit::WebToDatabaseProcessConnection::didReceiveMessage):
2508         (WebKit::WebToDatabaseProcessConnection::didClose):
2509         (WebKit::WebToDatabaseProcessConnection::didReceiveInvalidMessage):
2510         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
2511         (WebKit::WebToDatabaseProcessConnection::create):
2512         (WebKit::WebToDatabaseProcessConnection::connection):
2513         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
2514         (WebKit::WebContentProcessMainDelegate::getConnectionIdentifier):
2515         * WebProcess/FullScreen/WebFullScreenManager.cpp:
2516         (WebKit::WebFullScreenManager::didReceiveMessage):
2517         * WebProcess/FullScreen/WebFullScreenManager.h:
2518         * WebProcess/Geolocation/WebGeolocationManager.h:
2519         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
2520         (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
2521         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
2522         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
2523         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2524         (WebKit::InjectedBundle::postMessage):
2525         (WebKit::InjectedBundle::postSynchronousMessage):
2526         * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
2527         (WebKit::InjectedBundleUserMessageEncoder::encode):
2528         (WebKit::InjectedBundleUserMessageDecoder::decode):
2529         * WebProcess/MediaCache/WebMediaCacheManager.h:
2530         * WebProcess/Network/NetworkProcessConnection.cpp:
2531         (WebKit::NetworkProcessConnection::NetworkProcessConnection):
2532         (WebKit::NetworkProcessConnection::didReceiveMessage):
2533         (WebKit::NetworkProcessConnection::didReceiveSyncMessage):
2534         (WebKit::NetworkProcessConnection::didClose):
2535         (WebKit::NetworkProcessConnection::didReceiveInvalidMessage):
2536         * WebProcess/Network/NetworkProcessConnection.h:
2537         (WebKit::NetworkProcessConnection::create):
2538         (WebKit::NetworkProcessConnection::connection):
2539         * WebProcess/Network/WebResourceLoader.cpp:
2540         (WebKit::WebResourceLoader::messageSenderConnection):
2541         (WebKit::WebResourceLoader::didReceiveData):
2542         * WebProcess/Network/WebResourceLoader.h:
2543         * WebProcess/Network/WebResourceLoader.messages.in:
2544         * WebProcess/Notifications/WebNotificationManager.h:
2545         * WebProcess/OriginData/WebOriginDataManager.h:
2546         * WebProcess/Plugins/PDF/PDFPlugin.h:
2547         * WebProcess/Plugins/Plugin.cpp:
2548         (WebKit::Plugin::Parameters::encode):
2549         (WebKit::Plugin::Parameters::decode):
2550         * WebProcess/Plugins/Plugin.h:
2551         * WebProcess/Plugins/PluginProcessConnection.cpp:
2552         (WebKit::PluginProcessConnection::PluginProcessConnection):
2553         (WebKit::PluginProcessConnection::didReceiveMessage):
2554         (WebKit::PluginProcessConnection::didReceiveSyncMessage):
2555         (WebKit::PluginProcessConnection::didClose):
2556         (WebKit::PluginProcessConnection::didReceiveInvalidMessage):
2557         * WebProcess/Plugins/PluginProcessConnection.h:
2558         (WebKit::PluginProcessConnection::create):
2559         (WebKit::PluginProcessConnection::connection):
2560         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2561         (WebKit::PluginProcessConnectionManager::initializeConnection):
2562         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
2563         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
2564         * WebProcess/Plugins/PluginProcessConnectionManager.h:
2565         * WebProcess/Plugins/PluginProxy.cpp:
2566         (WebKit::PluginProxy::geometryDidChange):
2567         (WebKit::PluginProxy::streamDidReceiveData):
2568         (WebKit::PluginProxy::manualStreamDidReceiveData):
2569         * WebProcess/Plugins/PluginProxy.h:
2570         * WebProcess/ResourceCache/WebResourceCacheManager.h:
2571         * WebProcess/Storage/StorageAreaMap.h:
2572         * WebProcess/WebConnectionToUIProcess.cpp:
2573         (WebKit::WebConnectionToUIProcess::encodeMessageBody):
2574         (WebKit::WebConnectionToUIProcess::decodeMessageBody):
2575         (WebKit::WebConnectionToUIProcess::messageSenderConnection):
2576         * WebProcess/WebConnectionToUIProcess.h:
2577         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2578         (WebKit::WebChromeClient::runJavaScriptAlert):
2579         (WebKit::WebChromeClient::runJavaScriptConfirm):
2580         (WebKit::WebChromeClient::runJavaScriptPrompt):
2581         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
2582         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2583         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2584         * WebProcess/WebPage/DecoderAdapter.cpp:
2585         (WebKit::DecoderAdapter::decodeBytes):
2586         (WebKit::DecoderAdapter::decodeString):
2587         * WebProcess/WebPage/DecoderAdapter.h:
2588         * WebProcess/WebPage/DrawingArea.h:
2589         * WebProcess/WebPage/EncoderAdapter.cpp:
2590         (WebKit::EncoderAdapter::dataReference):
2591         (WebKit::EncoderAdapter::encodeBytes):
2592         (WebKit::EncoderAdapter::encodeString):
2593         * WebProcess/WebPage/EncoderAdapter.h:
2594         * WebProcess/WebPage/EventDispatcher.cpp:
2595         (WebKit::EventDispatcher::initializeConnection):
2596         * WebProcess/WebPage/EventDispatcher.h:
2597         * WebProcess/WebPage/LayerTreeHost.h:
2598         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
2599         * WebProcess/WebPage/WebInspector.cpp:
2600         (WebKit::WebInspector::createInspectorPage):
2601         * WebProcess/WebPage/WebInspector.h:
2602         * WebProcess/WebPage/WebPage.cpp:
2603         (WebKit::WebPage::messageSenderConnection):
2604         (WebKit::WebPage::loadURL):
2605         (WebKit::WebPage::loadURLRequest):
2606         (WebKit::WebPage::loadDataImpl):
2607         (WebKit::WebPage::loadString):
2608         (WebKit::WebPage::loadData):
2609         (WebKit::WebPage::loadHTMLString):
2610         (WebKit::WebPage::loadAlternateHTMLString):
2611         (WebKit::WebPage::loadPlainTextString):
2612         (WebKit::WebPage::loadWebArchiveData):
2613         (WebKit::WebPage::postInjectedBundleMessage):
2614         (WebKit::WebPage::runJavaScriptInMainFrame):
2615         (WebKit::WebPage::getContentsAsMHTMLData):
2616         (WebKit::WebPage::getSelectionAsWebArchiveData):
2617         (WebKit::WebPage::getMainResourceDataOfFrame):
2618         (WebKit::WebPage::getResourceDataFromFrame):
2619         (WebKit::WebPage::getWebArchiveOfFrame):
2620         (WebKit::WebPage::didReceiveMessage):
2621         (WebKit::WebPage::didReceiveSyncMessage):
2622         (WebKit::WebPage::drawPagesToPDF):
2623         (WebKit::WebPage::savePDFToFileInDownloadsFolder):
2624         (WebKit::WebPage::savePDFToTemporaryFolderAndOpenWithNativeApplication):
2625         * WebProcess/WebPage/WebPage.h:
2626         * WebProcess/WebPage/WebPage.messages.in:
2627         * WebProcess/WebPage/WebPageGroupProxy.h:
2628         * WebProcess/WebPage/mac/WebPageMac.mm:
2629         (WebKit::WebPage::platformInitialize):
2630         (WebKit::WebPage::registerUIProcessAccessibilityTokens):
2631         * WebProcess/WebProcess.cpp:
2632         (WebKit::WebProcess::initializeConnection):
2633         (WebKit::WebProcess::downloadProxyConnection):
2634         (WebKit::WebProcess::initializeWebProcess):
2635         (WebKit::WebProcess::ensureNetworkProcessConnection):
2636         (WebKit::WebProcess::didReceiveSyncMessage):
2637         (WebKit::WebProcess::didReceiveMessage):
2638         (WebKit::WebProcess::didClose):
2639         (WebKit::WebProcess::didReceiveInvalidMessage):
2640         (WebKit::WebProcess::postInjectedBundleMessage):
2641         (WebKit::WebProcess::ensureWebToDatabaseProcessConnection):
2642         * WebProcess/WebProcess.h:
2643         * WebProcess/WebProcess.messages.in:
2644         * WebProcess/mac/WebProcessMac.mm:
2645         (WebKit::WebProcess::platformInitializeWebProcess):
2646         * config.h:
2647
2648 2013-12-30  Anders Carlsson  <andersca@apple.com>
2649
2650         Move remaining IPC related files to Platform/IPC.
2651
2652         Rubber-stamped by Andreas Kling.
2653
2654         * Platform/IPC/ArgumentCoder.h: Renamed from Source/WebKit2/Platform/CoreIPC/ArgumentCoder.h.
2655         * Platform/IPC/ArgumentCoders.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/ArgumentCoders.cpp.
2656         * Platform/IPC/ArgumentCoders.h: Renamed from Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h.
2657         * Platform/IPC/ArgumentDecoder.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.cpp.
2658         * Platform/IPC/ArgumentDecoder.h: Renamed from Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h.
2659         * Platform/IPC/ArgumentEncoder.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.cpp.
2660         * Platform/IPC/ArgumentEncoder.h: Renamed from Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.h.
2661         * Platform/IPC/Arguments.h: Renamed from Source/WebKit2/Platform/CoreIPC/Arguments.h.
2662         * Platform/IPC/Attachment.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/Attachment.cpp.
2663         * Platform/IPC/Attachment.h: Renamed from Source/WebKit2/Platform/CoreIPC/Attachment.h.
2664         * Platform/IPC/Connection.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/Connection.cpp.
2665         * Platform/IPC/Connection.h: Renamed from Source/WebKit2/Platform/CoreIPC/Connection.h.
2666         * Platform/IPC/HandleMessage.h: Renamed from Source/WebKit2/Platform/CoreIPC/HandleMessage.h.
2667         * Platform/IPC/MessageDecoder.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/MessageDecoder.cpp.
2668         * Platform/IPC/MessageDecoder.h: Renamed from Source/WebKit2/Platform/CoreIPC/MessageDecoder.h.
2669         * Platform/IPC/MessageEncoder.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/MessageEncoder.cpp.
2670         * Platform/IPC/MessageEncoder.h: Renamed from Source/WebKit2/Platform/CoreIPC/MessageEncoder.h.
2671         * Platform/IPC/MessageFlags.h: Renamed from Source/WebKit2/Platform/CoreIPC/MessageFlags.h.
2672         * Platform/IPC/MessageReceiver.h: Renamed from Source/WebKit2/Platform/CoreIPC/MessageReceiver.h.
2673         * Platform/IPC/MessageReceiverMap.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/MessageReceiverMap.cpp.
2674         * Platform/IPC/MessageReceiverMap.h: Renamed from Source/WebKit2/Platform/CoreIPC/MessageReceiverMap.h.
2675         * Platform/IPC/mac/ConnectionMac.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp.
2676         * Platform/IPC/mac/ImportanceAssertion.h: Renamed from Source/WebKit2/Platform/CoreIPC/mac/ImportanceAssertion.h.
2677         * Platform/IPC/mac/MachPort.h: Renamed from Source/WebKit2/Platform/CoreIPC/mac/MachPort.h.
2678         * Platform/IPC/unix/AttachmentUnix.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/unix/AttachmentUnix.cpp.
2679         * Platform/IPC/unix/ConnectionUnix.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp.
2680         * WebKit2.xcodeproj/project.pbxproj:
2681
2682 2013-12-30  Martin Robinson  <mrobinson@igalia.com>
2683
2684         [GTK] [CMake] Parallel build sometimes fails when building libWebKit2APITestCore
2685         https://bugs.webkit.org/show_bug.cgi?id=126294
2686
2687         Reviewed by Daniel Bates.
2688
2689         * UIProcess/API/gtk/tests/CMakeLists.txt: Give libWebKit2APITestCore a dependency on
2690         WebKit2 so that it's always built before the auto-generated sources.
2691
2692 2013-12-30  Martin Robinson  <mrobinson@igalia.com>
2693
2694         [CMake] [GTK] Add support for GObject introspection
2695         https://bugs.webkit.org/show_bug.cgi?id=126162
2696
2697         Reviewed by Daniel Bates.
2698
2699         * PlatformGTK.cmake: Add the GIR targets, split the installed headers list
2700         between WebKitWebExtension and the WebKit2 library. Update the headers list
2701         with new headers.
2702
2703 2013-12-30  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2704
2705         [EFL][WK2] Replace ecore_main_loop_iterate with waitUntilTrue in ewk tests
2706         https://bugs.webkit.org/show_bug.cgi?id=125919
2707
2708         Reviewed by Gyuyoung Kim.
2709
2710         Using ecore_main_loop_iterate in while loop may result in tests hang-up when
2711         condition is not met. Replacing it with waitUntilTrue introduces a timer
2712         after which internal loop is canceled. This will cause test to fail instead
2713         of running infinitely.
2714
2715         * UIProcess/API/efl/tests/test_ewk2_auth_request.cpp:
2716         (TEST_F):
2717         * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
2718         (TEST_F):
2719         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
2720         (TEST_F):
2721         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2722         (EWK2ViewTest::onVibrate):
2723         (EWK2ViewTest::onCancelVibration):
2724         (EWK2ViewTest::loadVibrationHTMLString):
2725         (TEST_F):
2726
2727 2013-12-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2728
2729         [GTK] Split WebKit2APITests/TestWebKitWebView
2730         https://bugs.webkit.org/show_bug.cgi?id=126284
2731
2732         Reviewed by Philippe Normand.
2733
2734         WebKitWebView test is too big already making more difficult to
2735         handle timeouts and skipped tests. Split it in 3 by moving
2736         UIClient and auth tests to their own files.
2737
2738         * UIProcess/API/gtk/tests/GNUmakefile.am:
2739         * UIProcess/API/gtk/tests/TestAuthentication.cpp: Added.
2740         (testWebViewAuthenticationRequest):
2741         (testWebViewAuthenticationCancel):
2742         (testWebViewAuthenticationLoadCancelled):
2743         (testWebViewAuthenticationFailure):
2744         (testWebViewAuthenticationNoCredential):
2745         (testWebViewAuthenticationStorage):
2746         (testWebViewAuthenticationSuccess):
2747         (serverCallback):
2748         (beforeAll):
2749         (afterAll):
2750         * UIProcess/API/gtk/tests/TestUIClient.cpp: Added.
2751         (testWebViewCreateReadyClose):
2752         (checkMimeTypeForFilter):
2753         (testWebViewAllowModalDialogs):
2754         (testWebViewDisallowModalDialogs):
2755         (testWebViewJavaScriptDialogs):
2756         (testWebViewWindowProperties):
2757         (testWebViewMouseTarget):
2758         (testWebViewPermissionRequests):
2759         (testWebViewFileChooserRequest):
2760         (beforeAll):
2761         (afterAll):
2762         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2763         (beforeAll):
2764         (afterAll):
2765
2766 2013-12-29  Martin Robinson  <mrobinson@igalia.com>
2767
2768         [GTK] [CMake] Convenience libraries that export API should be compiled with --whole-archive on Unix
2769         https://bugs.webkit.org/show_bug.cgi?id=126232
2770
2771         Reviewed by Gustavo Noronha Silva.
2772
2773         * PlatformGTK.cmake: Prefix libGObjectDOMBindings with --whole-archive so that
2774         symbols are not omitted during final linking.
2775
2776 2013-12-26  Sam Weinig  <sam@webkit.org>
2777
2778         Move FilterIterator and IteratorPair to WTF and reimplement HashMap::keys() and HashMap::values() using IteratorPair
2779         https://bugs.webkit.org/show_bug.cgi?id=126253
2780
2781         Reviewed by Anders Carlsson.
2782
2783         * Shared/APIArray.h:
2784         Update includes and make elementsOfType() a bit easier to read by using a typedef and some
2785         judicial indentation.
2786
2787         * Shared/FilterIterator.h: Moved to WTF.
2788         * Shared/IteratorPair.h: Moved to WTF.
2789         
2790         * WebKit2.xcodeproj/project.pbxproj:
2791         Remove the two files.
2792
2793 2013-12-28  Kwang Yul Seo  <skyul@company100.net>
2794
2795         [WK2][SOUP] Fix handling of cookies when network process is enabled
2796         https://bugs.webkit.org/show_bug.cgi?id=125576
2797
2798         Reviewed by Carlos Garcia Campos.
2799
2800         Initialize the network process with cookie accept policy, persistent
2801         storage path and type. Use
2802         WebContext::sendToNetworkingProcessRelaunchingIfNecessary instead of
2803         WebContext::sendToAllProcessesRelaunchingThemIfNecessary to send
2804         SetCookiePersistentStorage message.
2805
2806         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2807         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2808         * Shared/Network/NetworkProcessCreationParameters.cpp:
2809         (WebKit::NetworkProcessCreationParameters::encode):
2810         (WebKit::NetworkProcessCreationParameters::decode):
2811         * Shared/Network/NetworkProcessCreationParameters.h:
2812         * UIProcess/soup/WebContextSoup.cpp:
2813         (WebKit::WebContext::platformInitializeNetworkProcess):
2814         * UIProcess/soup/WebCookieManagerProxySoup.cpp:
2815         (WebKit::WebCookieManagerProxy::setCookiePersistentStorage):
2816         * WebProcess/soup/WebProcessSoup.cpp:
2817         (WebKit::WebProcess::platformInitializeWebProcess):
2818
2819 2013-12-27  Daniel Bates  <dabates@apple.com>
2820
2821         [iOS] Upstream WebCore/page changes
2822         https://bugs.webkit.org/show_bug.cgi?id=126180
2823
2824         Reviewed by Darin Adler.
2825
2826         * WebProcess/WebCoreSupport/WebChromeClient.h:
2827         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm: Added.
2828         * WebProcess/WebPage/WebPage.cpp: Include header <WebCore/HitTestResult.h>.
2829
2830 2013-12-27  Gavin Barraclough  <barraclough@apple.com>
2831
2832         Merge PageVisibilityState & ViewState::IsVisible in WebKit2
2833         https://bugs.webkit.org/show_bug.cgi?id=126214
2834
2835         Reviewed by Alexey Proskuryakov.
2836
2837         WebKit2 redundantly tracks the visibility of the view through two mechanisms - the visibility
2838         state, and the view state. Remove visibility state from the WebKit2 layer. The visibility
2839         state also tracks the prerender state - so split this out and handle it separately (a change
2840         we should make in WebCore, too).
2841
2842         Removing the redundancy also removes the ability from the API to set a fake visibility state
2843         (IsVisible tracks the actual visibility of the view). Through private API
2844         (WKPageSetVisibilityState) a client could previously request the view be reported as hidden or
2845         visible, but this didn't really work - the override was not enforced and the API may reset the
2846         state at an arbitrary point. The mechanism is only used by testing code, which instead should
2847         actually update the view visibility (this tests more of the actual visibility mechanisms used
2848         by the browser). The one aspect of the API relied on by existing clients is the ability to
2849         initialize a hidden view as prerender - continue to support this specific functionality via
2850         WKPageSetVisibilityState, to maintain backwards compatibility.
2851
2852         - WebKit2 - remove internal state that tracks page visibility separately from the view state
2853         visibility. For backwards compatibility continue to support the WKPageSetVisibilityState API,
2854         but only to initialize the state to prerender.
2855
2856         * UIProcess/API/C/WKPage.cpp:
2857         (WKPageSetVisibilityState):
2858             - only support initializing the visibility state to prerender.
2859         * UIProcess/WebPageProxy.cpp:
2860         (WebKit::WebPageProxy::WebPageProxy):
2861             - remove m_visibilityState
2862         (WebKit::WebPageProxy::initializeWebPage):
2863             - no need to send initial visibility state (this is sent as a part of the creation parameters).
2864         (WebKit::WebPageProxy::viewStateDidChange):
2865             - no need to send visibility state change (this is sent as a part of view state).
2866         (WebKit::WebPageProxy::setVisibilityStatePrerender):
2867             - setVisibilityState -> setVisibilityStatePrerender.
2868         * UIProcess/WebPageProxy.h:
2869             - remove m_visibilityState, setVisibilityState -> setVisibilityStatePrerender.
2870         * WebProcess/WebPage/WebPage.cpp:
2871         (WebKit::WebPage::WebPage):
2872             - added call to updateVisibilityState.
2873         (WebKit::WebPage::setViewIsVisible):
2874             - added call to updateVisibilityState.
2875         (WebKit::WebPage::updateVisibilityState):
2876             - previously setVisibilityState, updates the page visibility state according to the view state.
2877         (WebKit::WebPage::setVisibilityStatePrerender):
2878             - set visibility state to prerender.
2879         * WebProcess/WebPage/WebPage.h:
2880             - remove m_visibilityState, setVisibilityState -> setVisibilityStatePrerender.
2881         * WebProcess/WebPage/WebPage.messages.in:
2882             - SetVisibilityState -> SetVisibilityStatePrerender.
2883
2884 2013-12-27  Zan Dobersek  <zdobersek@igalia.com>
2885
2886         [GTK] Unnecessary code is built into WebKitPluginProcess
2887         https://bugs.webkit.org/show_bug.cgi?id=126259
2888
2889         Reviewed by Carlos Garcia Campos.
2890
2891         * GNUmakefile.list.am: Stop building ChildProcessProxy and ProcessLauncher classes into WebKitPluginProcess.
2892         That code is not required in the plugin process, as one would expect.
2893
2894 2013-12-27  Ryuan Choi  <ryuan.choi@samsung.com>
2895
2896         [EFL][WK2] MiniBrowser scale up/down infinitely after r161087
2897         https://bugs.webkit.org/show_bug.cgi?id=126254
2898
2899         Reviewed by Gyuyoung Kim.
2900
2901         After r161087, contentScaleFactor of WebView is synced with pageScaleFactor
2902         of WebPage. It means that WKViewGetContentScaleFactor might not be same
2903         with PageViewportController's current scale value until received PageScaleFactorDidChange.
2904
2905         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
2906         (WebKit::PageViewportControllerClientEfl::setViewportPosition):
2907         Use controller's current scale just to update and sync the position.
2908
2909 2013-12-26  Martin Robinson  <mrobinson@igalia.com>
2910
2911         Small build fix for the GTK+ CMake port
2912
2913         * UIProcess/API/gtk/tests/CMakeLists.txt: Make the way the output directory is specified similar
2914         to the WebKit1 version of these tests, so that it is more difficult to inadvertently specify the
2915         wrong directory.
2916
2917 2013-12-26  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2918
2919         [WK2][CoordinatedGraphics] Removing duplicate scale information from WebVIew.cpp
2920         https://bugs.webkit.org/show_bug.cgi?id=126243
2921
2922         Reviewed by Benjamin Poulain.
2923
2924         The scale factor of the WebView must reflect the same information present in
2925         WebPageProxy.
2926         Previously, in WebView.cpp, there was a m_contentScaleFactor member, which adds
2927         information duplication and needs to be synchronizing with pageScaleFactor in
2928         WebPageProxy. We can avoid this by just making WebView access and set WebPageProxy's
2929         pageScaleFactor directly.
2930
2931         * UIProcess/CoordinatedGraphics/WebView.cpp:
2932         (WebKit::WebView::WebView):
2933         (WebKit::WebView::setContentScaleFactor):
2934         (WebKit::WebView::transformToScene):
2935         (WebKit::WebView::visibleContentsSize):
2936         * UIProcess/CoordinatedGraphics/WebView.h:
2937         (WebKit::WebView::contentScaleFactor):
2938
2939 2013-12-25  Commit Queue  <commit-queue@webkit.org>
2940
2941         Unreviewed, rolling out r161033 and r161074.
2942         http://trac.webkit.org/changeset/161033
2943         http://trac.webkit.org/changeset/161074
2944         https://bugs.webkit.org/show_bug.cgi?id=126240
2945
2946         Oliver says that a rollout would be better (Requested by ap on
2947         #webkit).
2948
2949         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2950         (WebKit::NPJSObject::setProperty):
2951
2952 2013-12-25  Brady Eidson  <beidson@apple.com>
2953
2954         DatabaseProcess: Implement version changing
2955         https://bugs.webkit.org/show_bug.cgi?id=126099
2956
2957         Reviewed by Sam Weinig.
2958
2959         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
2960         (WebKit::DatabaseProcessIDBConnection::getOrEstablishIDBDatabaseMetadata): Add logging.
2961         (WebKit::DatabaseProcessIDBConnection::openTransaction): Ditto.
2962         (WebKit::DatabaseProcessIDBConnection::beginTransaction): Ditto.
2963         (WebKit::DatabaseProcessIDBConnection::commitTransaction): Ditto.
2964         (WebKit::DatabaseProcessIDBConnection::resetTransaction): Ditto.
2965         (WebKit::DatabaseProcessIDBConnection::rollbackTransaction): Ditto.
2966         (WebKit::DatabaseProcessIDBConnection::changeDatabaseVersion): Implement this!
2967         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
2968         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
2969
2970         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2971         (WebKit::UniqueIDBDatabase::shutdown): Clean up all requests, and also cleanup the backing store
2972           on the database queue.
2973         (WebKit::UniqueIDBDatabase::shutdownBackingStore): Shutdown the backing store.
2974         (WebKit::UniqueIDBDatabase::didShutdownBackingStore):
2975         (WebKit::UniqueIDBDatabase::changeDatabaseVersion): Pass along the new version to the database queue.
2976         (WebKit::UniqueIDBDatabase::didChangeDatabaseVersion):
2977         (WebKit::UniqueIDBDatabase::changeDatabaseVersionInBackingStore): Set the new version in the backing store.
2978         (WebKit::UniqueIDBDatabase::postMainThreadTask): Add a ref() to keep the database alive incase it is being
2979           shutdown on the main thread.
2980         (WebKit::UniqueIDBDatabase::performNextMainThreadTask): Balance the ref() from postMainThreadTask, and
2981           accept an empty mainThreadTask queue.
2982         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2983
2984         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h: Add changeDatabaseVersion.
2985
2986         Flesh out SQLiteIDBTransaction to actually operation on a SQLiteTransaction in a real SQLiteDatabase:
2987         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
2988         (WebKit::SQLiteIDBTransaction::SQLiteIDBTransaction):
2989         (WebKit::SQLiteIDBTransaction::~SQLiteIDBTransaction):
2990         (WebKit::SQLiteIDBTransaction::begin):
2991         (WebKit::SQLiteIDBTransaction::commit):
2992         (WebKit::SQLiteIDBTransaction::reset):
2993         (WebKit::SQLiteIDBTransaction::rollback):
2994         (WebKit::SQLiteIDBTransaction::inProgress):
2995         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
2996         (WebKit::SQLiteIDBTransaction::create):
2997         (WebKit::SQLiteIDBTransaction::mode):
2998
2999         Rename m_metadataDB to m_sqliteDB, 
3000         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
3001         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
3002         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata):
3003         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::openSQLiteDatabaseAtPath): Disable threading checks on the DB
3004           as work queues can change threads.
3005         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):
3006         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
3007         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::beginTransaction):
3008         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::changeDatabaseVersion): After validating the transaction, actually
3009           update the version number on disk.
3010         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
3011
3012         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
3013         (WebKit::WebIDBServerConnection::~WebIDBServerConnection): Make sure to abort in-flight requests.
3014         (WebKit::WebIDBServerConnection::changeDatabaseVersion): 
3015         (WebKit::WebIDBServerConnection::didChangeDatabaseVersion):
3016         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
3017         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
3018
3019 2013-12-25  Martin Robinson  <mrobinson@igalia.com>
3020
3021         [GTK] [CMake] Fix CMake style errors in Source/WebKit2/PlatformGTK.cmake
3022         https://bugs.webkit.org/show_bug.cgi?id=126221
3023
3024         Reviewed by Gustavo Noronha Silva.
3025
3026         * PlatformGTK.cmake: Fix CMake style errors.
3027
3028 2013-12-25  Martin Robinson  <mrobinson@igalia.com>
3029
3030         [GTK] [CMake] Clean up generated sources directories
3031         https://bugs.webkit.org/show_bug.cgi?id=126216
3032
3033         Reviewed by Gustavo Noronha Silva.
3034
3035         * PlatformGTK.cmake: Use the new derived sources variables.
3036         * UIProcess/API/gtk/tests/CMakeLists.txt: Ditto.
3037
3038 2013-12-25  Philippe Normand  <pnormand@igalia.com>
3039
3040         Unreviewed, GTK build fix after r161063
3041
3042         * GNUmakefile.am: Use locally built .gir dependencies when
3043         building the WebExtensions gir file.
3044
3045 2013-12-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3046
3047         [GTK] Fix warnings when generating WebExtensions gobject-instrospection files
3048         https://bugs.webkit.org/show_bug.cgi?id=126225
3049
3050         Reviewed by Philippe Normand.
3051
3052         Add transfer annotation to webkit_web_page_get_dom_document() and
3053         document webkit_web_page_get_main_frame().
3054
3055         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3056
3057 2013-12-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3058
3059         [GTK] Missing introspection information for WebExtensions
3060         https://bugs.webkit.org/show_bug.cgi?id=122407
3061
3062         Reviewed by Philippe Normand.
3063
3064         Generate WebKit2WebExtension-3.0.gir with the WebExtensions API
3065         and move the DOM bindings API from WebKit2-3.0.gir to
3066         WebKit2WebExtension-3.0.gir.
3067
3068         * GNUmakefile.am:
3069
3070 2013-12-24  Ryosuke Niwa  <rniwa@webkit.org>
3071
3072         32-bit Mac build fix attempt after r161045.
3073
3074         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3075         (WebKit::windowMap):
3076
3077 2013-12-22  Sam Weinig  <sam@webkit.org>
3078
3079         [WK2] Replace usage of DEFINE_STATIC_LOCAL with NeverDestroyed
3080         https://bugs.webkit.org/show_bug.cgi?id=126144
3081
3082         Reviewed by Anders Carlsson.
3083
3084         * DatabaseProcess/DatabaseProcess.cpp:
3085         (WebKit::DatabaseProcess::shared):
3086         * DatabaseProcess/DatabaseProcess.h:
3087         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
3088         (WebKit::NetworkBlobRegistry::shared):
3089         * NetworkProcess/NetworkProcess.cpp:
3090         (WebKit::NetworkProcess::shared):
3091         (WebKit::NetworkProcess::downloadManager):
3092         * NetworkProcess/NetworkProcess.h:
3093         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
3094         (WebKit::NetworkProcessPlatformStrategies::initialize):
3095         * NetworkProcess/mac/RemoteNetworkingContext.mm:
3096         (WebKit::privateBrowsingStorageSessionIdentifierBase):
3097         * Platform/CoreIPC/Connection.cpp:
3098         (CoreIPC::Connection::SyncMessageState::syncMessageStateMap):
3099         (CoreIPC::Connection::SyncMessageState::syncMessageStateMapMutex):
3100         * PluginProcess/PluginProcess.cpp:
3101         (WebKit::PluginProcess::shared):
3102         * PluginProcess/PluginProcess.h:
3103         * PluginProcess/mac/PluginProcessMac.mm:
3104         (WebKit::fullscreenWindowTracker):
3105         * Shared/ConnectionStack.cpp:
3106         (WebKit::ConnectionStack::shared):
3107         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
3108         (WebKit::initializedNetscapePluginModules):
3109         * Shared/WebContextMenuItem.cpp:
3110         (WebKit::WebContextMenuItem::separatorItem):
3111         * Shared/WebPreferencesStore.cpp:
3112         (WebKit::boolTestRunnerOverridesMap):
3113         * Shared/mac/CookieStorageShim.cpp:
3114         (WebKit::CookieStorageShim::shared):
3115         * Shared/mac/CookieStorageShim.h:
3116         (WebKit::CookieStorageShim::CookieStorageShim):
3117         * UIProcess/Plugins/PluginProcessManager.cpp:
3118         (WebKit::PluginProcessManager::shared):
3119         * UIProcess/Plugins/PluginProcessManager.h:
3120         * UIProcess/WebContext.cpp:
3121         (WebKit::contexts):
3122         * UIProcess/WebDatabaseManagerProxy.cpp:
3123         (WebKit::WebDatabaseManagerProxy::originKey):
3124         (WebKit::WebDatabaseManagerProxy::originQuotaKey):
3125         (WebKit::WebDatabaseManagerProxy::originUsageKey):
3126         (WebKit::WebDatabaseManagerProxy::databaseDetailsKey):
3127         (WebKit::WebDatabaseManagerProxy::databaseDetailsNameKey):
3128         (WebKit::WebDatabaseManagerProxy::databaseDetailsDisplayNameKey):
3129         (WebKit::WebDatabaseManagerProxy::databaseDetailsExpectedUsageKey):
3130         (WebKit::WebDatabaseManagerProxy::databaseDetailsCurrentUsageKey):
3131         * UIProcess/WebInspectorProxy.cpp:
3132         (WebKit::WebInspectorPageGroups::shared):
3133         * UIProcess/WebPageGroup.cpp:
3134         (WebKit::webPageGroupMap):
3135         * UIProcess/WebPageProxy.cpp:
3136         (WebKit::ExceededDatabaseQuotaRecords::shared):
3137         (WebKit::WebPageProxy::executeEditCommand):
3138         * UIProcess/WebProcessProxy.cpp:
3139         (WebKit::globalPageMap):
3140         * UIProcess/cf/WebBackForwardListCF.cpp:
3141         (WebKit::SessionHistoryCurrentVersion):
3142         (WebKit::createEmptySessionHistoryDictionary):
3143         (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
3144         (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation):
3145         (WebKit::WebBackForwardList::restoreFromV0CFDictionaryRepresentation):
3146         (WebKit::WebBackForwardList::restoreFromV1CFDictionaryRepresentation):
3147         (WebKit::extractBackForwardListEntriesFromArray):
3148         * UIProcess/cf/WebPageProxyCF.cpp:
3149         (WebKit::WebPageProxy::sessionStateData):
3150         (WebKit::WebPageProxy::restoreFromSessionStateData):
3151         * UIProcess/mac/WebPageProxyMac.mm:
3152         (WebKit::WebPageProxy::standardUserAgent):
3153         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
3154         (WebKit::sharedDatabaseBackendMap):
3155         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
3156         (WebKit::generateServerConnectionIdentifier):
3157         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
3158         (WebKit::WKDOMNodeCache):
3159         (WebKit::WKDOMRangeCache):
3160         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3161         (WebKit::domHandleCache):
3162         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
3163         (WebKit::domHandleCache):
3164         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
3165         (WebKit::allExtensions):
3166         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
3167         (WebKit::allWorlds):
3168         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
3169         (WebKit::globalExceptionString):
3170         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3171         (WebKit::windowMap):
3172         * WebProcess/Storage/StorageNamespaceImpl.cpp:
3173         (WebKit::localStorageNamespaceMap):
3174         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3175         (WebKit::WebEditorClient::didBeginEditing):
3176         (WebKit::WebEditorClient::respondToChangedContents):
3177         (WebKit::WebEditorClient::respondToChangedSelection):
3178         (WebKit::WebEditorClient::didEndEditing):
3179         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3180         (WebKit::WebFrameLoaderClient::shouldFallBack):
3181         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3182         (WebKit::WebPlatformStrategies::initialize):
3183         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3184         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3185         (WebKit::idToHistoryItemMap):
3186         (WebKit::historyItemToIDMap):
3187         * WebProcess/WebProcess.cpp:
3188         (WebKit::WebProcess::downloadManager):
3189         * WebProcess/WebProcess.h:
3190         * config.h:
3191
3192 2013-12-23  Tim Horton  <timothy_horton@apple.com>
3193
3194         Fix the iOS build after r161013 and r160672.
3195
3196         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
3197         (WebKit::updateCustomAppearance):
3198         * Shared/mac/RemoteLayerTreeTransaction.mm:
3199
3200 2013-12-23  Ryuan Choi  <ryuan.choi@samsung.com>
3201
3202         Unreviewed build fix for EFL after r161007
3203
3204         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
3205         (WebKit::CoordinatedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
3206         Changed the timeout parameter to std::chrono::milliseconds
3207
3208 2013-12-23  Oliver Hunt  <oliver@apple.com>
3209
3210         Refactor PutPropertySlot to be aware of custom properties
3211         https://bugs.webkit.org/show_bug.cgi?id=126187
3212
3213         Reviewed by msaboff.
3214
3215         Update for new method signatures.
3216
3217         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
3218         (WebKit::NPJSObject::setProperty):
3219
3220 2013-12-23  Zan Dobersek  <zdobersek@igalia.com>
3221
3222         [GTK][WK2] Simplify ProcessExecutablePathGtk
3223         https://bugs.webkit.org/show_bug.cgi?id=126173
3224
3225         Reviewed by Martin Robinson.
3226
3227         Don't store process name strings in global variables -- each of the names is only used in the relevant
3228         function, so the string can be directly passed into the findWebKitProcess function call.
3229
3230         Simplify the findWebKitProcess function. Make the execDirectory variable static so that g_getenv is only
3231         called once, as it's not expected for the WEBKIT_EXEC_PATH environment variable to change during the runtime.
3232
3233         Introduce the getExecutablePath helper function that gets the current executable path and, if non-null, returns
3234         the directory path of that executable. The helper function preserves the small performance improvement of querying
3235         and processing the executable path only once.
3236         The return value of getExecutablePath is stored in a static variable and is used to construct the process path
3237         if the executable path was successfully retrieved.
3238
3239         * Shared/gtk/ProcessExecutablePathGtk.cpp:
3240         (WebKit::getExecutablePath):
3241         (WebKit::findWebKitProcess):
3242         (WebKit::executablePathOfWebProcess):
3243         (WebKit::executablePathOfPluginProcess):
3244         (WebKit::executablePathOfNetworkProcess):
3245
3246 2013-12-23  Zan Dobersek  <zdobersek@igalia.com>
3247
3248         Unreviewed build fix for GTK and EFL after r161007.
3249
3250         * UIProcess/DrawingAreaProxyImpl.cpp:
3251         (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState):
3252         Use std::chrono::milliseconds instead of double for the timeout parameter to
3253         CoreIPC::Connection::waitForAndDispatchImmediately.
3254
3255 2013-12-23  Gustavo Noronha Silva  <gns@gnome.org>
3256
3257         [GTK] [CMake] Add support for generating gtkdoc
3258         https://bugs.webkit.org/show_bug.cgi?id=116376
3259
3260         Reviewed by Martin Robinson.
3261
3262         * PlatformGTK.cmake: make generated API files go to DerivedSources/WebKit2, to
3263         match the autotools build and gtkdoc.py's expectation.
3264
3265 2013-12-23  Martin Robinson  <mrobinson@igalia.com>
3266
3267         [GTK] [CMake] Build the WebKit2 GObject API tests
3268         https://bugs.webkit.org/show_bug.cgi?id=125683
3269
3270         Reviewed by Daniel Bates.
3271
3272         * UIProcess/API/gtk/tests/CMakeLists.txt: Added.
3273
3274 2013-12-23  Tim Horton  <timothy_horton@apple.com>
3275
3276         REGRESSION (r160672): Random remote layers are getting shadows
3277         https://bugs.webkit.org/show_bug.cgi?id=126126
3278
3279         Reviewed by Anders Carlsson.
3280
3281         In http://trac.webkit.org/changeset/160672, we unconditionally
3282         check m_properties.customAppearance without regard for whether it
3283         has ever been initialized. This would result in sending an uninitialized
3284         custom appearance to the UI process, which could end up requesting a shadow.
3285
3286         * Shared/mac/RemoteLayerTreeTransaction.mm:
3287         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
3288         Initialize LayerProperties to the CoreAnimation defaults.
3289
3290         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3291         (PlatformCALayerRemote::PlatformCALayerRemote):
3292         Remove wrongly-placed default initialization of contentsScale;
3293         there's no reason to send it across the wire for every new layer
3294         if it's left at the default.
3295
3296 2013-12-23  Anders Carlsson  <andersca@apple.com>
3297
3298         Use std::chrono::milliseconds for message wait timeouts in WebKit2
3299         https://bugs.webkit.org/show_bug.cgi?id=126168
3300
3301         Reviewed by Sam Weinig.
3302
3303         * Platform/CoreIPC/Connection.cpp:
3304         (CoreIPC::Connection::waitForMessage):
3305         * Platform/CoreIPC/Connection.h:
3306         (CoreIPC::Connection::waitForAndDispatchImmediately):
3307         * UIProcess/API/mac/WKView.mm:
3308         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
3309         (-[WKView waitForAsyncDrawingAreaSizeUpdate]):
3310         * UIProcess/DrawingAreaProxy.cpp:
3311         * UIProcess/DrawingAreaProxy.h:
3312         (WebKit::DrawingAreaProxy::didUpdateBackingStoreStateTimeout):
3313         (WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate):
3314         * UIProcess/WebPageProxy.cpp:
3315         (WebKit::WebPageProxy::waitForDidUpdateViewState):
3316         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
3317         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
3318         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
3319
3320 2013-12-23  Anders Carlsson  <andersca@apple.com>
3321
3322         Include <condition_variable>, not <thread>.
3323
3324         * Platform/CoreIPC/Connection.h:
3325         * Shared/BlockingResponseMap.h:
3326         * UIProcess/API/mac/WKPrintingView.h:
3327
3328 2013-12-23  Lucas Forschler  <lforschler@apple.com>
3329
3330         <rdar://problem/15682948> Update copyright strings
3331
3332         Reviewed by Dan Bernstein
3333
3334         * DatabaseProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3335         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService.Development/Info.plist:
3336         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist:
3337         * Info.plist:
3338         * NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3339         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist:
3340         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
3341         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist:
3342         * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3343         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
3344         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
3345         * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3346         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
3347         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
3348         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
3349
3350 2013-12-23  Anders Carlsson  <andersca@apple.com>
3351
3352         Convert ThreadCondition in WebKit2 over to std::condition_variable
3353         https://bugs.webkit.org/show_bug.cgi?id=126161
3354
3355         Reviewed by Sam Weinig.
3356
3357         * Platform/CoreIPC/Connection.cpp:
3358         (CoreIPC::Connection::waitForMessage):
3359         (CoreIPC::Connection::processIncomingMessage):
3360         * Platform/CoreIPC/Connection.h:
3361         * Shared/BlockingResponseMap.h:
3362         (BlockingResponseMap::waitForResponse):
3363         (BlockingResponseMap::didReceiveResponse):
3364         (BlockingResponseMap::cancel):
3365         * UIProcess/API/mac/WKPrintingView.h:
3366         * UIProcess/API/mac/WKPrintingView.mm:
3367         (pageDidDrawToPDF):
3368         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
3369         (prepareDataForPrintingOnSecondaryThread):
3370         (-[WKPrintingView knowsPageRange:]):
3371
3372 2013-12-22  Martin Robinson  <mrobinson@igalia.com>
3373
3374         [GTK][CMake] libtool-compatible soversion calculation
3375         https://bugs.webkit.org/show_bug.cgi?id=125511
3376
3377         Reviewed by Gustavo Noronha Silva.
3378
3379         * CMakeLists.txt: Use the POPULATE_LIBRARY_VERSION macro and the
3380         library-specific version information.
3381
3382 2013-12-23  Gustavo Noronha Silva  <gns@gnome.org>
3383
3384         [GTK] [CMake] Generate pkg-config files
3385         https://bugs.webkit.org/show_bug.cgi?id=125685
3386
3387         Reviewed by Martin Robinson.
3388
3389         * PlatformGTK.cmake: generate webkit2gtk.pc.
3390
3391 2013-12-23  Carlos Garcia Campos  <cgarcia@igalia.com>
3392
3393         [GTK] Build with network process unconditionally
3394         https://bugs.webkit.org/show_bug.cgi?id=126128
3395
3396         Reviewed by Martin Robinson.
3397
3398         Build always with the network process enabled and decide whether
3399         to use it or not using an environment variable. This makes a lot
3400         easier to work on the network process and also to switch between
3401         using it or not.
3402
3403         * GNUmakefile.am: Make sure we always include the WebKit2Prefix.h.
3404         * UIProcess/API/gtk/WebKitWebContext.cpp:
3405         (createDefaultWebContext): Use the network process when
3406         WEBKIT_USE_NETWORK_PROCESS environment variable is present.
3407         * WebKit2Prefix.h: Always enable network process for GTK port.
3408
3409 2013-12-23  Brian Holt  <brian.holt@samsung.com>
3410
3411         [WK2] Implement platform specific Resource Response for SOUP
3412         https://bugs.webkit.org/show_bug.cgi?id=125422
3413
3414         Reviewed by Martin Robinson.
3415
3416         SOUP specific Resource Response implementation for the Network
3417         Process.
3418
3419         * NetworkProcess/NetworkResourceLoader.cpp:
3420         (WebKit::NetworkResourceLoader::continueWillSendRequest):
3421         * WebProcess/Network/WebResourceLoader.cpp: