Message decoding functions should take a MessageDecoder reference
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-02-01  Anders Carlsson  <andersca@apple.com>
2
3         Message decoding functions should take a MessageDecoder reference
4         https://bugs.webkit.org/show_bug.cgi?id=108669
5
6         Reviewed by Andreas Kling.
7
8         Message encoding functions already take a reference instead of a pointer, so
9         make the decoding functions take a reference as well.
10
11         * Platform/CoreIPC/ArgumentCoder.h:
12         (CoreIPC::ArgumentCoder::decode):
13         * Platform/CoreIPC/ArgumentCoders.cpp:
14         (CoreIPC::::decode):
15         (CoreIPC::decodeStringText):
16         * Platform/CoreIPC/ArgumentCoders.h:
17         (CoreIPC::SimpleArgumentCoder::decode):
18         * Platform/CoreIPC/ArgumentDecoder.h:
19         (CoreIPC::ArgumentDecoder::decode):
20         * Platform/CoreIPC/Arguments.h:
21         (CoreIPC::Arguments0::decode):
22         (CoreIPC::Arguments1::decode):
23         (CoreIPC::Arguments2::decode):
24         (CoreIPC::Arguments3::decode):
25         (CoreIPC::Arguments4::decode):
26         (CoreIPC::Arguments5::decode):
27         (CoreIPC::Arguments6::decode):
28         (CoreIPC::Arguments7::decode):
29         (CoreIPC::Arguments8::decode):
30         (CoreIPC::Arguments10::decode):
31         * Platform/CoreIPC/Attachment.cpp:
32         (CoreIPC::Attachment::decode):
33         * Platform/CoreIPC/Attachment.h:
34         (Attachment):
35         * Platform/CoreIPC/DataReference.cpp:
36         (CoreIPC::DataReference::decode):
37         * Platform/CoreIPC/DataReference.h:
38         (DataReference):
39         * Platform/CoreIPC/StringReference.cpp:
40         (CoreIPC::StringReference::decode):
41         * Platform/CoreIPC/StringReference.h:
42         (StringReference):
43         * Platform/CoreIPC/mac/MachPort.h:
44         (CoreIPC::MachPort::decode):
45         * Platform/SharedMemory.h:
46         (Handle):
47         * Platform/mac/SharedMemoryMac.cpp:
48         (WebKit::SharedMemory::Handle::decode):
49         * PluginProcess/PluginCreationParameters.cpp:
50         (WebKit::PluginCreationParameters::decode):
51         * PluginProcess/PluginCreationParameters.h:
52         (PluginCreationParameters):
53         * Shared/DictionaryPopupInfo.cpp:
54         (WebKit::DictionaryPopupInfo::decode):
55         * Shared/DictionaryPopupInfo.h:
56         (DictionaryPopupInfo):
57         * Shared/EditorState.cpp:
58         (WebKit::EditorState::decode):
59         * Shared/EditorState.h:
60         (EditorState):
61         * Shared/FontInfo.cpp:
62         (WebKit::FontInfo::decode):
63         * Shared/FontInfo.h:
64         (FontInfo):
65         * Shared/LayerTreeContext.h:
66         (LayerTreeContext):
67         * Shared/Network/NetworkProcessCreationParameters.cpp:
68         (WebKit::NetworkProcessCreationParameters::decode):
69         * Shared/Network/NetworkProcessCreationParameters.h:
70         (NetworkProcessCreationParameters):
71         * Shared/Network/NetworkResourceLoadParameters.cpp:
72         (WebKit::NetworkResourceLoadParameters::decode):
73         * Shared/Network/NetworkResourceLoadParameters.h:
74         (NetworkResourceLoadParameters):
75         * Shared/OriginAndDatabases.cpp:
76         (WebKit::OriginAndDatabases::decode):
77         * Shared/OriginAndDatabases.h:
78         (OriginAndDatabases):
79         * Shared/PlatformPopupMenuData.cpp:
80         (WebKit::PlatformPopupMenuData::decode):
81         * Shared/PlatformPopupMenuData.h:
82         (PlatformPopupMenuData):
83         * Shared/Plugins/NPIdentifierData.cpp:
84         (WebKit::NPIdentifierData::decode):
85         * Shared/Plugins/NPIdentifierData.h:
86         (NPIdentifierData):
87         * Shared/Plugins/NPVariantData.cpp:
88         (WebKit::NPVariantData::decode):
89         * Shared/Plugins/NPVariantData.h:
90         (NPVariantData):
91         * Shared/Plugins/PluginProcessCreationParameters.cpp:
92         (WebKit::PluginProcessCreationParameters::decode):
93         * Shared/Plugins/PluginProcessCreationParameters.h:
94         (PluginProcessCreationParameters):
95         * Shared/PrintInfo.cpp:
96         (WebKit::PrintInfo::decode):
97         * Shared/PrintInfo.h:
98         (PrintInfo):
99         * Shared/SandboxExtension.h:
100         (Handle):
101         (HandleArray):
102         (WebKit::SandboxExtension::Handle::decode):
103         (WebKit::SandboxExtension::HandleArray::decode):
104         * Shared/SecurityOriginData.cpp:
105         (WebKit::SecurityOriginData::decode):
106         * Shared/SecurityOriginData.h:
107         (SecurityOriginData):
108         * Shared/SessionState.cpp:
109         (WebKit::SessionState::decode):
110         * Shared/SessionState.h:
111         (SessionState):
112         * Shared/ShareableBitmap.cpp:
113         (WebKit::ShareableBitmap::Handle::decode):
114         * Shared/ShareableBitmap.h:
115         (Handle):
116         * Shared/ShareableResource.cpp:
117         (WebKit::ShareableResource::Handle::decode):
118         * Shared/ShareableResource.h:
119         (Handle):
120         * Shared/SharedWorkerProcessCreationParameters.cpp:
121         (WebKit::SharedWorkerProcessCreationParameters::decode):
122         * Shared/SharedWorkerProcessCreationParameters.h:
123         (SharedWorkerProcessCreationParameters):
124         * Shared/StatisticsData.cpp:
125         (WebKit::StatisticsData::decode):
126         * Shared/StatisticsData.h:
127         (StatisticsData):
128         * Shared/StringPairVector.h:
129         (WebKit::StringPairVector::decode):
130         * Shared/UpdateInfo.cpp:
131         (WebKit::UpdateInfo::decode):
132         * Shared/UpdateInfo.h:
133         (UpdateInfo):
134         * Shared/UserMessageCoders.h:
135         (WebKit::UserMessageDecoder::baseDecode):
136         * Shared/WebContextMenuItemData.cpp:
137         (WebKit::WebContextMenuItemData::decode):
138         * Shared/WebContextMenuItemData.h:
139         (WebContextMenuItemData):
140         * Shared/WebCoreArgumentCoders.cpp:
141         (CoreIPC::::decode):
142         (CoreIPC::decodeImage):
143         * Shared/WebCoreArgumentCoders.h:
144         * Shared/WebEvent.cpp:
145         (WebKit::WebEvent::decode):
146         * Shared/WebEvent.h:
147         (WebEvent):
148         (WebMouseEvent):
149         (WebWheelEvent):
150         (WebKeyboardEvent):
151         (WebGestureEvent):
152         (WebPlatformTouchPoint):
153         (WebTouchEvent):
154         * Shared/WebGeolocationPosition.cpp:
155         (WebKit::WebGeolocationPosition::Data::decode):
156         * Shared/WebGeolocationPosition.h:
157         (Data):
158         * Shared/WebGestureEvent.cpp:
159         (WebKit::WebGestureEvent::decode):
160         * Shared/WebHitTestResult.cpp:
161         (WebKit::WebHitTestResult::Data::decode):
162         * Shared/WebHitTestResult.h:
163         (Data):
164         * Shared/WebKeyboardEvent.cpp:
165         (WebKit::WebKeyboardEvent::decode):
166         * Shared/WebMouseEvent.cpp:
167         (WebKit::WebMouseEvent::decode):
168         * Shared/WebNavigationDataStore.h:
169         (WebKit::WebNavigationDataStore::decode):
170         * Shared/WebPageCreationParameters.cpp:
171         (WebKit::WebPageCreationParameters::decode):
172         * Shared/WebPageCreationParameters.h:
173         (WebPageCreationParameters):
174         * Shared/WebPageGroupData.cpp:
175         (WebKit::WebPageGroupData::decode):
176         * Shared/WebPageGroupData.h:
177         (WebPageGroupData):
178         * Shared/WebPlatformTouchPoint.cpp:
179         (WebKit::WebPlatformTouchPoint::decode):
180         * Shared/WebPopupItem.cpp:
181         (WebKit::WebPopupItem::decode):
182         * Shared/WebPopupItem.h:
183         * Shared/WebPreferencesStore.cpp:
184         (WebKit::WebPreferencesStore::decode):
185         * Shared/WebPreferencesStore.h:
186         (WebPreferencesStore):
187         * Shared/WebProcessCreationParameters.cpp:
188         (WebKit::WebProcessCreationParameters::decode):
189         * Shared/WebProcessCreationParameters.h:
190         (WebProcessCreationParameters):
191         * Shared/WebTouchEvent.cpp:
192         (WebKit::WebTouchEvent::decode):
193         * Shared/WebWheelEvent.cpp:
194         (WebKit::WebWheelEvent::decode):
195         * Shared/cf/ArgumentCodersCF.cpp:
196         (CoreIPC::decode):
197         * Shared/cf/ArgumentCodersCF.h:
198         (CoreIPC):
199         * Shared/mac/ArgumentCodersMac.h:
200         (CoreIPC):
201         * Shared/mac/ArgumentCodersMac.mm:
202         (CoreIPC::decode):
203         * Shared/mac/AttributedString.h:
204         (AttributedString):
205         * Shared/mac/AttributedString.mm:
206         (WebKit::AttributedString::decode):
207         * Shared/mac/ColorSpaceData.h:
208         (ColorSpaceData):
209         * Shared/mac/ColorSpaceData.mm:
210         (WebKit::ColorSpaceData::decode):
211         * Shared/mac/LayerTreeContextMac.mm:
212         (WebKit::LayerTreeContext::decode):
213         * Shared/mac/ObjCObjectGraphCoders.h:
214         (WebContextObjCObjectGraphDecoder):
215         (InjectedBundleObjCObjectGraphDecoder):
216         * Shared/mac/ObjCObjectGraphCoders.mm:
217         (WebKit::ObjCObjectGraphDecoder::baseDecode):
218         (WebKit::WebContextObjCObjectGraphDecoderImpl::decode):
219         (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode):
220         (WebKit::WebContextObjCObjectGraphDecoder::decode):
221         (WebKit::InjectedBundleObjCObjectGraphDecoder::decode):
222         * Shared/mac/PlatformCertificateInfo.h:
223         (PlatformCertificateInfo):
224         * Shared/mac/PlatformCertificateInfo.mm:
225         (WebKit::PlatformCertificateInfo::decode):
226         * Shared/mac/RemoteLayerTreeTransaction.h:
227         (LayerProperties):
228         (RemoteLayerTreeTransaction):
229         * Shared/mac/RemoteLayerTreeTransaction.mm:
230         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
231         (WebKit::RemoteLayerTreeTransaction::decode):
232         * Shared/mac/SandboxExtensionMac.mm:
233         (WebKit::SandboxExtension::Handle::decode):
234         (WebKit::SandboxExtension::HandleArray::decode):
235         * Shared/mac/SecItemRequestData.cpp:
236         (WebKit::SecItemRequestData::decode):
237         * Shared/mac/SecItemRequestData.h:
238         * Shared/mac/SecItemResponseData.cpp:
239         (WebKit::SecItemResponseData::decode):
240         * Shared/mac/SecItemResponseData.h:
241         (SecItemResponseData):
242         * Shared/mac/WebCoreArgumentCodersMac.mm:
243         (CoreIPC::::decodePlatformData):
244         (CoreIPC::::decode):
245         * UIProcess/WebContextUserMessageCoders.h:
246         (WebKit::WebContextUserMessageDecoder::decode):
247         * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
248         (WebKit::InjectedBundleUserMessageDecoder::decode):
249         * WebProcess/Plugins/Plugin.cpp:
250         (WebKit::Plugin::Parameters::decode):
251         * WebProcess/Plugins/Plugin.h:
252         (Parameters):
253
254 2013-02-01  Carlos Garcia Campos  <cgarcia@igalia.com>
255
256         [GTK] Adapt WorkQueueGtk to the latest changes in WebKit2 after r141497
257         https://bugs.webkit.org/show_bug.cgi?id=108607
258
259         Reviewed by Anders Carlsson.
260
261         * Platform/gtk/WorkQueueGtk.cpp:
262         (WorkQueue::EventSource::executeEventSource): Remove the is valid
263         work queue check.
264         (WorkQueue::EventSource): WorkQueue is now refcounted, so keep a
265         reference when a new job is scheduled and unref it when it
266         finishes.
267
268 2013-02-01  Sheriff Bot  <webkit.review.bot@gmail.com>
269
270         Unreviewed, rolling out r141319.
271         http://trac.webkit.org/changeset/141319
272         https://bugs.webkit.org/show_bug.cgi?id=108629
273
274         This patch is causing the UIProcess to hang on GTK port when
275         loading plugins (Requested by chris-qBT_laptop on #webkit).
276
277         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
278         (WebKit::PluginProcessProxy::scanPlugin):
279
280 2013-02-01  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
281
282         [EFL][WK2] EwkContext should be based on C WK2 API
283         https://bugs.webkit.org/show_bug.cgi?id=107666
284
285         Reviewed by Andreas Kling.
286
287         EwkContext should be based on C WK2 API so that API layering is not violated.
288
289         * UIProcess/API/efl/EwkView.cpp:
290         (EwkView::EwkView):
291         * UIProcess/API/efl/ewk_context.cpp:
292         (EwkContext::EwkContext):
293         (EwkContext::create):
294         (EwkContext::cookieManager):
295         (EwkContext::ensureFaviconDatabase):
296         (EwkContext::setFaviconDatabaseDirectoryPath):
297         (EwkContext::addVisitedLink):
298         (EwkContext::setCacheModel):
299         (EwkContext::cacheModel):
300         (EwkContext::setAdditionalPluginPath):
301         (EwkContext::clearResourceCache):
302         * UIProcess/API/efl/ewk_context_private.h:
303         (EwkContext):
304         * UIProcess/API/efl/ewk_view.cpp:
305         (ewk_view_base_add):
306
307 2013-02-01  Christophe Dumez  <christophe.dumez@intel.com>
308
309         [EFL][WK2] Use C API inside ewk_auth_request
310         https://bugs.webkit.org/show_bug.cgi?id=107806
311
312         Reviewed by Andreas Kling.
313
314         Use C API inside ewk_auth_request instead of accessing C++ internal
315         classes directly, to avoid violating layering.
316
317         * UIProcess/API/efl/ewk_auth_request.cpp:
318         (EwkAuthRequest::EwkAuthRequest):
319         (EwkAuthRequest::suggestedUsername):
320         (EwkAuthRequest::realm):
321         (EwkAuthRequest::host):
322         (EwkAuthRequest::continueWithoutCredential):
323         (EwkAuthRequest::authenticate):
324         (EwkAuthRequest::isRetrying):
325         (ewk_auth_request_authenticate):
326         * UIProcess/API/efl/ewk_auth_request_private.h:
327         (EwkAuthRequest::create):
328         (EwkAuthRequest):
329         * UIProcess/efl/PageLoadClientEfl.cpp:
330         (WebKit::PageLoadClientEfl::didReceiveAuthenticationChallengeInFrame):
331
332 2013-02-01  Seulgi Kim  <seulgikim@company100.net>
333
334         [Gtk][WK2] Fix build after recent WebKit2 changes
335         https://bugs.webkit.org/show_bug.cgi?id=108588
336
337         Reviewed by Andreas Kling.
338
339         Don't remove WorkQueue during execution.
340         Following the logic on https://bugs.webkit.org/show_bug.cgi?id=108544
341
342         * Platform/gtk/WorkQueueGtk.cpp:
343         (WorkQueue::EventSource::~EventSource):
344         (WorkQueue::EventSource::executeEventSource):
345         (WorkQueue::dispatch):
346         (WorkQueue::dispatchAfterDelay):
347         (WorkQueue::dispatchOnTermination):
348
349 2013-02-01  Alexis Menard  <alexis@webkit.org>
350
351         Enable unprefixed CSS transitions by default.
352         https://bugs.webkit.org/show_bug.cgi?id=108216
353
354         Reviewed by Dean Jackson.
355
356         Rename the flag CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED
357         to CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED which will be used later to 
358         guard the unprefixing work for CSS Transforms and animations.
359
360         * Configurations/FeatureDefines.xcconfig:
361
362 2013-02-01  Jae Hyun Park  <jae.park@company100.net>
363
364         Coordinated Graphics : Sort Target.pri and class declarations in alphabetical order.
365         https://bugs.webkit.org/show_bug.cgi?id=108590
366
367         Reviewed by Noam Rosenthal.
368
369         Sort class declarations in alphabetical order.
370
371         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
372         (WebCore):
373
374 2013-02-01  Gwang Yoon Hwang  <ryumiel@company100.net>
375
376         [EFL][WK2] MiniBrowser segfaults on loading google.com
377         https://bugs.webkit.org/show_bug.cgi?id=108597
378
379         Reviewed by Andreas Kling.
380
381         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
382         (CoreIPC::Connection::processMessage):
383         oolMessageBody should be properly initialized before it is used.
384
385         This patch also adds omitted break statement.
386
387 2013-01-31  Jae Hyun Park  <jae.park@company100.net>
388
389         [Qt] Add MessageFlags.h in Target.pri
390         https://bugs.webkit.org/show_bug.cgi?id=108583
391
392         Reviewed by Kentaro Hara.
393
394         Since MessageDecoder and MessageEncoder include MessageFlags.h, it
395         should be included in Target.pri.
396
397         * Target.pri:
398
399 2013-01-31  Jae Hyun Park  <jae.park@company100.net>
400
401         Coordinated Graphics : Move CoordinatedGraphics related files to WebCore
402         https://bugs.webkit.org/show_bug.cgi?id=108149
403
404         Reviewed by Noam Rosenthal.
405
406         This patch moves Coordinated Graphics related code to WebCore. To
407         implement Threaded Coordinated Graphics, most of Coordianted Graphics
408         code should be shared. Therefore, they should reside in WebCore instead of
409         WebKit2.
410
411         When moving to WebCore, two renamings have been done.
412
413         1. Rename LayerTreeRenderer to CoordinatedGraphicsScene.
414
415         2. Rename WebCustomFilterProgram and WebCustomFilterOperation to
416         CoordinatedCustomFilterProgram and CoordinatedCustomFilterOperation,
417         respectively.
418
419         No new tests, covered by existing tests.
420
421         * CMakeLists.txt:
422         * Scripts/webkit2/messages.py:
423         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
424         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
425         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
426         * Target.pri:
427         * UIProcess/API/efl/EwkView.cpp:
428         * UIProcess/API/efl/EwkView.h:
429         * UIProcess/API/qt/qquickwebpage.cpp:
430         * UIProcess/API/qt/raw/qrawwebview.cpp:
431         * UIProcess/API/qt/raw/qrawwebview_p.h:
432         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
433         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
434         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
435         * UIProcess/efl/PageClientBase.cpp:
436         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
437         * UIProcess/qt/QtWebPageSGNode.cpp:
438         * UIProcess/qt/QtWebPageSGNode.h:
439         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
440         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
441
442 2013-01-31  Rafael Brandao  <rafael.lobo@openbossa.org>
443
444         [Qt][WK2] Another attempt to fix build after recent WebKit2 changes
445         https://bugs.webkit.org/show_bug.cgi?id=108548
446
447         Reviewed by Anders Carlsson.
448
449         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
450         (CoreIPC::Connection::platformInvalidate):
451         (CoreIPC::Connection::processMessage): Change Deque to Vector and do similar
452         logic as on patch for https://bugs.webkit.org/show_bug.cgi?id=108517
453         (CoreIPC::Connection::open):
454         (CoreIPC::Connection::setShouldCloseConnectionOnProcessTermination):
455         * Platform/qt/WorkQueueQt.cpp: Reflect changes on Qt WorkQueue to increase ref
456         count when the execution is started and decrease it when the work item is deleted,
457         following the logic on https://bugs.webkit.org/show_bug.cgi?id=108544
458         (WorkQueue::WorkItemQt::~WorkItemQt):
459         (WorkQueue::WorkItemQt::execute):
460         (WorkQueue::dispatch):
461         (WorkQueue::dispatchAfterDelay):
462         * UIProcess/WebPageProxy.cpp:
463         (WebKit::WebPageProxy::getPluginPath): This function was moved from WebProcessProxy but
464         mac specific code was not protected properly: https://bugs.webkit.org/show_bug.cgi?id=108407
465
466 2013-01-31  Changhun Kang  <temoochin@company100.net>
467
468         Rename from parentOrHost* to parentOrShadowHost* in Node.h.
469         https://bugs.webkit.org/show_bug.cgi?id=108308
470
471         Reviewed by Dimitri Glazkov.
472
473 2013-01-31  Anders Carlsson  <andersca@apple.com>
474
475         StorageManager should be ref-counted
476         https://bugs.webkit.org/show_bug.cgi?id=108553
477
478         Reviewed by Beth Dakin.
479
480         It's likely we'd want to have the storage manager outlive its context at times, so make it
481         reference counted.
482
483         * UIProcess/Storage/StorageManager.cpp:
484         (WebKit::StorageManager::create):
485         (WebKit):
486         * UIProcess/Storage/StorageManager.h:
487         (StorageManager):
488         * UIProcess/WebContext.cpp:
489         (WebKit::WebContext::WebContext):
490         * UIProcess/WebContext.h:
491         (WebContext):
492
493 2013-01-31  Anders Carlsson  <andersca@apple.com>
494
495         WorkQueue should be a ref-counted class
496         https://bugs.webkit.org/show_bug.cgi?id=108544
497
498         Reviewed by Sam Weinig.
499
500         Make WorkQueue a ref-counted class that's implicitly ref()'d when dispatching a function to it, and then
501         implicitly deref()'d when the function is done executing. This matches the behavior of dispatch queues,
502         and ensures that the WorkQueue object won't go away while dispatched functions are running.
503
504         * Platform/CoreIPC/Connection.cpp:
505         (CoreIPC::Connection::Connection):
506         (CoreIPC::Connection::~Connection):
507         (CoreIPC::Connection::addQueueClient):
508         (CoreIPC::Connection::removeQueueClient):
509         (CoreIPC::Connection::invalidate):
510         (CoreIPC::Connection::sendMessage):
511         (CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
512         (CoreIPC::Connection::connectionDidClose):
513         * Platform/CoreIPC/Connection.h:
514         (Connection):
515         * Platform/CoreIPC/mac/ConnectionMac.cpp:
516         (CoreIPC::createDataAvailableSource):
517         (CoreIPC::Connection::open):
518         (CoreIPC::Connection::initializeDeadNameSource):
519         * Platform/WorkQueue.cpp:
520         (WorkQueue::create):
521         (WorkQueue::WorkQueue):
522         (WorkQueue::~WorkQueue):
523         * Platform/WorkQueue.h:
524         (WorkQueue):
525         * Platform/mac/WorkQueueMac.cpp:
526         (WorkQueue::dispatch):
527         (WorkQueue::dispatchAfterDelay):
528         * Shared/ChildProcess.cpp:
529         (WebKit::didCloseOnConnectionWorkQueue):
530         * UIProcess/Launcher/ProcessLauncher.cpp:
531         (WebKit::processLauncherWorkQueue):
532         (WebKit::ProcessLauncher::ProcessLauncher):
533         * UIProcess/WebProcessProxy.cpp:
534         (WebKit::pluginWorkQueue):
535         (WebKit::WebProcessProxy::getPlugins):
536
537 2013-01-31  Rafael Brandao  <rafael.lobo@openbossa.org>
538
539         [Qt][WK2] Fix build after removal of MessageID.h
540         https://bugs.webkit.org/show_bug.cgi?id=108534
541
542         Reviewed by Anders Carlsson.
543
544         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
545         (CoreIPC::MessageInfo::MessageInfo):
546         (CoreIPC::MessageInfo::setMessageBodyIsOutOfLine):
547         (CoreIPC::MessageInfo::isMessageBodyIsOutOfLine):
548         (MessageInfo):
549         (CoreIPC::Connection::processMessage):
550         (CoreIPC::Connection::sendOutgoingMessage):
551         * Target.pri:
552         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
553         * UIProcess/DrawingAreaProxy.cpp:
554         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
555         * WebProcess/soup/WebSoupRequestManager.cpp:
556
557 2013-01-31  Brady Eidson  <beidson@apple.com>
558
559         Assertion failure in WebResourceLoadScheduler::remove when loading .webarchives
560         <rdar://problem/12888145> and https://bugs.webkit.org/show_bug.cgi?id=108520
561
562         Reviewed by Alexey Proskuryakov.
563
564         * WebProcess/Network/WebResourceLoadScheduler.cpp:
565         (WebKit::WebResourceLoadScheduler::scheduleLoad): Even if it isn't to be scheduled with the
566           NetworkProcess, still add this ResourceLoader to the scheduler's records.
567
568 2013-01-31  Simon Hausmann  <simon.hausmann@digia.com>
569
570         Unreviewed trivial Unix build fix.
571
572         Use Vector<> instead of Deque<> when iterating
573         over m_attachments in the USE(UNIX_DOMAIN_SOCKETS)
574         case.
575
576         * Platform/CoreIPC/ArgumentDecoder.cpp:
577
578 2013-01-30  Brian Weinstein  <bweinstein@apple.com>
579
580         Add a call to the page UI client to determine if a plug-in should load
581         https://bugs.webkit.org/show_bug.cgi?id=108407
582         <rdar://problem/13066332>
583
584         Reviewed by Anders Carlsson.
585
586         This patch adds a client call to the WKPageUIClient to be called to determine
587         whether or not a plug-in should load.
588
589         * UIProcess/API/C/WKPage.h: Add shouldLoadPlugin.
590         * UIProcess/WebPageProxy.cpp:
591         (WebKit::WebPageProxy::getPluginPath): Moved from WebProcessProxy, and added a call to
592             m_uiClient.shouldInstantiatePlugin.
593         * UIProcess/WebPageProxy.h:
594         * UIProcss/WebPageProxy.messages.in: Moved GetPluginPath from WebProcessProxy to WebPageProxy.
595         * UIProcess/WebProcessProxy.cpp:
596         (WebKit::WebProcessProxy::getPluginPath): Moved to WebPageProxy.
597         * UIProcess/WebProcessProxy.h:
598         * UIProcess/WebUIClient.cpp:
599         (WebKit::WebUIClient::shouldInstantiatePlugin): Return that we should load the plug-in if
600             the client function isn't defined, and call the function if it is.
601         * UIProcess/WebUIClient.h:
602         * UIProcess/mac/WebInspectorProxyMac.mm:
603         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Add an entry for the new
604             client function.
605         * WebProcess/WebPage/WebPage.cpp:
606         (WebKit::WebPage::createPlugin): Send the message to the WebPageProxy, not the WebProcessProxy.
607         (WebKit::WebPage::canPluginHandleResponse): Made a member function, so it can call sendSync, and
608             send the message to the WebPageProxy, not the WebProcessProxy.
609         * WebProcess/WebPage/WebPage.h:
610
611 2013-01-31  Anders Carlsson  <andersca@apple.com>
612
613         Use a Vector for IPC attachments
614         https://bugs.webkit.org/show_bug.cgi?id=108517
615
616         Reviewed by Sam Weinig.
617
618         We don't need to use a Deque for attachments - we can just deserialize the attachments backwards instead.
619
620         * Platform/CoreIPC/ArgumentDecoder.cpp:
621         (CoreIPC::ArgumentDecoder::create):
622         (CoreIPC::ArgumentDecoder::ArgumentDecoder):
623         (CoreIPC::ArgumentDecoder::removeAttachment):
624         * Platform/CoreIPC/ArgumentDecoder.h:
625         (ArgumentDecoder):
626         * Platform/CoreIPC/Connection.h:
627         * Platform/CoreIPC/MessageDecoder.cpp:
628         (CoreIPC::MessageDecoder::create):
629         (CoreIPC::MessageDecoder::MessageDecoder):
630         * Platform/CoreIPC/MessageDecoder.h:
631         (MessageDecoder):
632         * Platform/CoreIPC/mac/ConnectionMac.cpp:
633         (CoreIPC::createMessageDecoder):
634
635 2013-01-31  Joseph Pecoraro  <pecoraro@apple.com>
636
637         Disable ENABLE_FULLSCREEN_API on iOS
638         https://bugs.webkit.org/show_bug.cgi?id=108250
639
640         Reviewed by Benjamin Poulain.
641
642         * Configurations/FeatureDefines.xcconfig:
643
644 2013-01-31  Enrica Casucci  <enrica@apple.com>
645
646         WebKit2: provide new bundle APIs to allow bundle clients to be notified of pasteboard access.
647         https://bugs.webkit.org/show_bug.cgi?id=108396.
648         <rdar://problem/12920461>
649
650         Reviewed by Alexey Proskuryakov.
651
652         This patch adds new bundle client API to receive notifications
653         relative the pasteboard activity. There are 2 new API added to
654         InjectedBundleEditorClient, to receive notification before and
655         after the pasteboard content is added and one API to provide
656         additional content to add to the pasteboard.
657         In order to create content to add to the pasteboard, WKWebArchiveRef
658         and WKWebArchiveResourcesRef have been added to the set of API level
659         object.
660         This work is a joint effort with Sam Weinig who contributed the
661         support for WKWebArchiveRef, WKWebArchiveResourcesRef and related
662         files. Sam is the author of the first chunk of changes listed below.
663         
664         * Shared/API/c/WKBase.h:
665         * Shared/API/c/WKSharedAPICast.h:
666         * Shared/API/c/mac/WKWebArchive.cpp: Added.
667         (WKWebArchiveGetTypeID):
668         (WKWebArchiveCreate):
669         (WKWebArchiveCreateWithData):
670         (WKWebArchiveCreateFromRange):
671         (WKWebArchiveCopyMainResource):
672         (WKWebArchiveCopySubresources):
673         (WKWebArchiveCopySubframeArchives):
674         (WKWebArchiveCopyData):
675         * Shared/API/c/mac/WKWebArchive.h: Added.
676         * Shared/API/c/mac/WKWebArchiveResource.cpp: Added.
677         (WKWebArchiveResourceGetTypeID):
678         (WKWebArchiveResourceCreate):
679         (WKWebArchiveResourceCopyData):
680         (WKWebArchiveResourceCopyURL):
681         (WKWebArchiveResourceCopyMIMEType):
682         (WKWebArchiveResourceCopyTextEncoding):
683         * Shared/API/c/mac/WKWebArchiveResource.h: Added.
684         * Shared/APIObject.h:
685         * Shared/WebArchive.cpp: Added.
686         (WebKit::WebArchive::create):
687         (WebKit::WebArchive::WebArchive):
688         (WebKit::WebArchive::~WebArchive):
689         (WebKit::WebArchive::mainResource):
690         (WebKit::WebArchive::subresources):
691         (WebKit::WebArchive::subframeArchives):
692         (WebKit::releaseCFData):
693         (WebKit::WebArchive::data):
694         (WebKit::WebArchive::coreLegacyWebArchive):
695         * Shared/WebArchive.h: Added.
696         (WebKit::WebArchive::type):
697         * Shared/WebArchiveResource.cpp: Added.
698         (WebKit::WebArchiveResource::create):
699         (WebKit::WebArchiveResource::WebArchiveResource):
700         (WebKit::WebArchiveResource::~WebArchiveResource):
701         (WebKit::releaseCFData):
702         (WebKit::WebArchiveResource::data):
703         (WebKit::WebArchiveResource::URL):
704         (WebKit::WebArchiveResource::MIMEType):
705         (WebKit::WebArchiveResource::textEncoding):
706         (WebKit::WebArchiveResource::coreArchiveResource):
707         * Shared/WebArchiveResource.h: Added.
708         (WebKit::WebArchiveResource::type):
709         * WebKit2.xcodeproj/project.pbxproj:
710         
711         * Shared/APIClientTraits.cpp: Added versioning to InjectedBundlePageEditorClient.
712         * Shared/APIClientTraits.h:
713         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
714         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
715         (WebKit::InjectedBundlePageEditorClient::willWriteToPasteboard): Added.
716         (WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange): Added.
717         (WebKit::InjectedBundlePageEditorClient::didWriteToPasteboard): Added.
718         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
719         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
720         (WebKit::WebEditorClient::didWriteSelectionToPasteboard):
721         (WebKit::WebEditorClient::willWriteSelectionToPasteboard):
722         (WebKit::WebEditorClient::getClientPasteboardDataForRange):
723         * WebProcess/WebCoreSupport/WebEditorClient.h:
724
725 2013-01-31  Anders Carlsson  <andersca@apple.com>
726
727         Remove MessageID.h
728         https://bugs.webkit.org/show_bug.cgi?id=108516
729
730         Reviewed by Sam Weinig.
731
732         * Platform/CoreIPC/Connection.cpp:
733         (CoreIPC::Connection::processIncomingMessage):
734         (CoreIPC::Connection::sendOutgoingMessages):
735         (CoreIPC::Connection::dispatchSyncMessage):
736         (CoreIPC::Connection::dispatchMessage):
737         * Platform/CoreIPC/Connection.h:
738         (CoreIPC):
739         (Connection):
740         * Platform/CoreIPC/MessageID.h: Removed.
741         * Platform/CoreIPC/mac/ConnectionMac.cpp:
742         (CoreIPC::Connection::sendOutgoingMessage):
743         (CoreIPC::Connection::receiveSourceEventHandler):
744         * Shared/CoreIPCSupport/WebConnectionMessageKinds.h: Removed.
745         * Shared/CoreIPCSupport/WebContextMessageKinds.h:
746         * UIProcess/DrawingAreaProxy.h:
747         (CoreIPC):
748         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
749         * UIProcess/WebApplicationCacheManagerProxy.h:
750         * UIProcess/WebContext.cpp:
751         (WebKit::WebContext::WebContext):
752         (WebKit::WebContext::didReceiveMessage):
753         (WebKit::WebContext::didReceiveSyncMessage):
754         * UIProcess/WebCookieManagerProxy.h:
755         * UIProcess/WebFrameProxy.h:
756         (CoreIPC):
757         * UIProcess/WebFullScreenManagerProxy.h:
758         (CoreIPC):
759         * UIProcess/WebIconDatabase.h:
760         (CoreIPC):
761         * UIProcess/WebPageProxy.cpp:
762         * UIProcess/WebPageProxy.h:
763         (CoreIPC):
764         * WebKit2.xcodeproj/project.pbxproj:
765         * WebProcess/FullScreen/WebFullScreenManager.cpp:
766         * WebProcess/FullScreen/WebFullScreenManager.h:
767         (CoreIPC):
768         * WebProcess/InjectedBundle/InjectedBundle.cpp:
769         (WebKit::InjectedBundle::postMessage):
770         (WebKit::InjectedBundle::postSynchronousMessage):
771         * WebProcess/InjectedBundle/InjectedBundle.h:
772         (CoreIPC):
773         * WebProcess/WebPage/DrawingArea.h:
774         (CoreIPC):
775         * WebProcess/WebPage/LayerTreeHost.h:
776         (CoreIPC):
777         * WebProcess/WebPage/WebPage.cpp:
778         * WebProcess/WebPage/WebPage.h:
779         (CoreIPC):
780         * WebProcess/WebPage/WebPageGroupProxy.h:
781         (CoreIPC):
782
783 2013-01-31  Mike West  <mkwst@chromium.org>
784
785         Cleanup: Use ScriptExecutionContext::topOrigin when relevant.
786         https://bugs.webkit.org/show_bug.cgi?id=108476
787
788         Reviewed by Anders Carlsson.
789
790         * WebProcess/Plugins/PluginView.cpp:
791         (WebKit::PluginView::storageBlockingStateChanged):
792         (WebKit::PluginView::isPrivateBrowsingEnabled):
793
794 2013-01-31  Anders Carlsson  <andersca@apple.com>
795
796         Get rid of IncomingMessage
797         https://bugs.webkit.org/show_bug.cgi?id=108514
798
799         Reviewed by Sam Weinig.
800
801         * Platform/CoreIPC/Connection.cpp:
802         (Connection::SyncMessageState):
803         (ConnectionAndIncomingMessage):
804         (CoreIPC::Connection::SyncMessageState::~SyncMessageState):
805         (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
806         (CoreIPC::Connection::SyncMessageState::dispatchMessages):
807         (CoreIPC::Connection::waitForMessage):
808         (CoreIPC::Connection::processIncomingMessage):
809         (CoreIPC::Connection::enqueueIncomingMessage):
810         (CoreIPC::Connection::dispatchMessage):
811         (CoreIPC::Connection::dispatchOneMessage):
812         * Platform/CoreIPC/Connection.h:
813         (Connection):
814
815 2013-01-31  Patrick Gansterer  <paroga@webkit.org>
816
817         Remove PLATFORM(WIN_CAIRO) from NetscapePluginX11.cpp
818         https://bugs.webkit.org/show_bug.cgi?id=108439
819
820         Reviewed by Brent Fulgham.
821
822         PLATFORM(WIN_CAIRO) is Windows only, where no X11 exists.
823
824         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
825
826 2013-01-31  Simon Hausmann  <simon.hausmann@digia.com>
827
828         Unreviewed build fix: Remove Web Intents files from
829         the Qt build system.
830
831         * Target.pri:
832
833 2013-01-31  Zan Dobersek  <zdobersek@igalia.com>
834
835         Unreviewed GTK build fix.
836         Removing build targets for Web Intents files that were removed in r141448.
837
838         * GNUmakefile.list.am:
839
840 2013-01-31  Anders Carlsson  <andersca@apple.com>
841
842         Remove Web Intents code from WebKit2
843         https://bugs.webkit.org/show_bug.cgi?id=108506
844
845         Reviewed by Simon Fraser.
846
847         Since nobody builds with Web Intents enabled anymore, and since the code is going to 
848         be removed from WebCore, remove it from WebKit2.
849
850         * Shared/API/c/WKBase.h:
851         * Shared/APIClientTraits.cpp:
852         (WebKit):
853         * Shared/APIObject.h:
854         * Shared/IntentData.cpp: Removed.
855         * Shared/IntentData.h: Removed.
856         * Shared/IntentServiceInfo.cpp: Removed.
857         * Shared/IntentServiceInfo.h: Removed.
858         * Shared/WebIntentServiceInfo.cpp: Removed.
859         * Shared/WebIntentServiceInfo.h: Removed.
860         * UIProcess/API/C/WKAPICast.h:
861         (WebKit):
862         * UIProcess/API/C/WKIntentData.cpp: Removed.
863         * UIProcess/API/C/WKIntentData.h: Removed.
864         * UIProcess/API/C/WKIntentServiceInfo.cpp: Removed.
865         * UIProcess/API/C/WKIntentServiceInfo.h: Removed.
866         * UIProcess/API/C/WKPage.cpp:
867         * UIProcess/API/C/WKPage.h:
868         * UIProcess/WebIntentData.cpp: Removed.
869         * UIProcess/WebIntentData.h: Removed.
870         * UIProcess/WebLoaderClient.cpp:
871         * UIProcess/WebLoaderClient.h:
872         (WebKit):
873         (WebLoaderClient):
874         * UIProcess/WebPageProxy.cpp:
875         * UIProcess/WebPageProxy.h:
876         (WebKit):
877         (WebPageProxy):
878         * UIProcess/WebPageProxy.messages.in:
879         * UIProcess/WebProcessProxy.cpp:
880         * UIProcess/WebProcessProxy.h:
881         (WebProcessProxy):
882         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
883         (WebKit):
884         * WebProcess/InjectedBundle/API/c/WKBundleIntent.cpp: Removed.
885         * WebProcess/InjectedBundle/API/c/WKBundleIntent.h: Removed.
886         * WebProcess/InjectedBundle/API/c/WKBundleIntentRequest.cpp: Removed.
887         * WebProcess/InjectedBundle/API/c/WKBundleIntentRequest.h: Removed.
888         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
889         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
890         * WebProcess/InjectedBundle/InjectedBundleIntent.cpp: Removed.
891         * WebProcess/InjectedBundle/InjectedBundleIntent.h: Removed.
892         * WebProcess/InjectedBundle/InjectedBundleIntentRequest.cpp: Removed.
893         * WebProcess/InjectedBundle/InjectedBundleIntentRequest.h: Removed.
894         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
895         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
896         (WebKit):
897         (InjectedBundlePageLoaderClient):
898         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
899         (WebKit):
900         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
901         (WebFrameLoaderClient):
902         * WebProcess/WebPage/WebFrame.cpp:
903         * WebProcess/WebPage/WebFrame.h:
904         (WebCore):
905         (WebKit):
906         (WebFrame):
907         * WebProcess/WebPage/WebPage.cpp:
908         * WebProcess/WebPage/WebPage.h:
909         (WebCore):
910         (WebKit):
911         (WebPage):
912         * WebProcess/WebPage/WebPage.messages.in:
913         * WebProcess/WebProcess.cpp:
914         * WebProcess/WebProcess.h:
915         (WebCore):
916         (WebProcess):
917         * WebProcess/WebProcess.messages.in:
918
919 2013-01-31  Brady Eidson  <beidson@apple.com>
920
921         Lack of a log level string should not obliterate compiled in logging channel state.
922         https://bugs.webkit.org/show_bug.cgi?id=108502
923
924         Reviewed by Alexey Proskuryakov and Sam Weinig.
925
926         * Platform/mac/Logging.mac.mm:
927         (WebKit::initializeLogChannel): If there's no log level string, leave the channel state alone.
928
929 2013-01-31  Alexey Proskuryakov  <ap@apple.com>
930
931         WebProcess sandbox profile overhaul.
932
933         Reviewed by Sam Weinig.
934
935         Moves some rules together by susbystem for easier maintenance.
936
937         Addresses <rdar://problem/9276393>, <rdar://problem/10844321>, <rdar://problem/12408537>,
938         <rdar://problem/12558524>.
939
940         * WebProcess/com.apple.WebProcess.sb.in:
941
942 2013-01-31  Simon Hausmann  <simon.hausmann@digia.com>
943
944         Unreviewed trivial build fix: Pre C++11 the use of
945         >> in nested templates is ambiguous in the grammar and
946         requires the insertion of a space here. Since these files are
947         not Mac specific we don't require C++11 yet and a space
948         fixes the build.
949
950         * Platform/CoreIPC/Connection.h:
951         (Connection):
952         * Shared/ChildProcessProxy.h:
953         (ChildProcessProxy):
954
955 2013-01-31  Christophe Dumez  <dchris@gmail.com>
956
957         [EFL] Disable Web Intents
958         https://bugs.webkit.org/show_bug.cgi?id=108457
959
960         Reviewed by Alexey Proskuryakov.
961
962         Remove code related to Web Intents from EFL
963         WebKit2.
964
965         * CMakeLists.txt:
966         * PlatformEfl.cmake:
967         * UIProcess/API/efl/EWebKit2.h:
968         * UIProcess/API/efl/EwkViewCallbacks.h:
969         * UIProcess/API/efl/ewk_intent.cpp: Removed.
970         * UIProcess/API/efl/ewk_intent.h: Removed.
971         * UIProcess/API/efl/ewk_intent_private.h: Removed.
972         * UIProcess/API/efl/ewk_intent_service.cpp: Removed.
973         * UIProcess/API/efl/ewk_intent_service.h: Removed.
974         * UIProcess/API/efl/ewk_intent_service_private.h: Removed.
975         * UIProcess/API/efl/ewk_view.cpp:
976         * UIProcess/API/efl/ewk_view.h:
977         * UIProcess/API/efl/tests/resources/intent-request.html: Removed.
978         * UIProcess/API/efl/tests/resources/intent-service.html: Removed.
979         * UIProcess/API/efl/tests/test_ewk2_intents.cpp: Removed.
980         * UIProcess/efl/PageLoadClientEfl.cpp:
981         (WebKit::PageLoadClientEfl::PageLoadClientEfl):
982         * UIProcess/efl/PageLoadClientEfl.h:
983         (PageLoadClientEfl):
984
985 2013-01-31  Alexey Proskuryakov  <ap@apple.com>
986
987         <rdar://problem/12695827> PPT: Make loading file URLs work with a sandboxed NetworkProcess
988
989         Address review comments.
990
991         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
992         * WebProcess/com.apple.WebProcess.sb.in:
993
994 2013-01-31  Anders Carlsson  <andersca@apple.com>
995
996         Stop using OutgoingMessage
997         https://bugs.webkit.org/show_bug.cgi?id=108495
998
999         Reviewed by Sam Weinig.
1000
1001         * Platform/CoreIPC/Connection.cpp:
1002         (CoreIPC::Connection::sendMessage):
1003         (CoreIPC::Connection::sendOutgoingMessages):
1004         * Platform/CoreIPC/Connection.h:
1005         (Connection):
1006         * Shared/ChildProcessProxy.cpp:
1007         (WebKit::ChildProcessProxy::~ChildProcessProxy):
1008         (WebKit::ChildProcessProxy::sendMessage):
1009         (WebKit::ChildProcessProxy::didFinishLaunching):
1010         * Shared/ChildProcessProxy.h:
1011         (ChildProcessProxy):
1012
1013 2013-01-31  Simon Hausmann  <simon.hausmann@digia.com>
1014
1015         [Qt] Make it possible to compile WebKit2 Qt related files without access to internal WK2 C++ API
1016         https://bugs.webkit.org/show_bug.cgi?id=108472
1017
1018         Reviewed by Andreas Kling.
1019
1020         Add a new module to the qmake build system that represents the part of the WebKit2 Qt integration
1021         that doesn't depend on WebKit2 internals.
1022
1023         Changed qwebnavigationhistory.cpp to not use any internal headers and compile it as part of the
1024         internals-free module.
1025
1026         * Target.pri:
1027         * UIProcess/API/qt/qwebnavigationhistory.cpp:
1028         * WebKit2.pro:
1029         * WebKit2QML.pri: Added.
1030
1031 2013-01-31  Simon Hausmann  <simon.hausmann@digia.com>
1032
1033         Unreviewed trivial build fix: Add missing virtual destructor to
1034         LayerTreeRendererClient. Otherwise the build with -Werror breaks, which
1035         complains (rightly so) that we're deleting a sub-class where the super class
1036         doesn't have a virtual destructor.
1037
1038         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
1039         (WebKit::LayerTreeRendererClient::~LayerTreeRendererClient):
1040
1041 2013-01-31  Seulgi Kim  <seulgikim@company100.net>
1042
1043         Coordinated Graphics: view the debug border/repaint count of the non composited layer.
1044         https://bugs.webkit.org/show_bug.cgi?id=108401
1045
1046         Reviewed by Noam Rosenthal.
1047
1048         Make non-compositing layer draw debug border and show repaint counter
1049         accroding to settings.
1050
1051         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1052         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1053
1054 2013-01-31  Paweł Forysiuk  <tuxator@o2.pl>
1055
1056         InjectedBundle is being built even with --disable-webkit2
1057         https://bugs.webkit.org/show_bug.cgi?id=108364
1058
1059         Reviewed by Gustavo Noronha Silva.
1060
1061         * GNUmakefile.am: Wrap Injected bundle with ENABLE_WEBKIT2 condition
1062
1063 2013-01-31  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1064
1065         [EFL][WK2] RequestManagerClientEfl, DownloadManagerEfl and ContextHistoryClientEfl should be based on C API
1066         https://bugs.webkit.org/show_bug.cgi?id=107685
1067
1068         Reviewed by Benjamin Poulain.
1069
1070         RequestManagerClientEfl, DownloadManagerEfl and ContextHistoryClientEfl
1071         should be based on C API so that API layering is not violated.
1072
1073         * UIProcess/API/efl/ewk_context.cpp:
1074         (EwkContext::EwkContext):
1075         * UIProcess/efl/ContextHistoryClientEfl.cpp:
1076         (WebKit::ContextHistoryClientEfl::ContextHistoryClientEfl):
1077         (WebKit::ContextHistoryClientEfl::~ContextHistoryClientEfl):
1078         * UIProcess/efl/ContextHistoryClientEfl.h:
1079         (WebKit::ContextHistoryClientEfl::create):
1080         (ContextHistoryClientEfl):
1081         * UIProcess/efl/DownloadManagerEfl.cpp:
1082         (WebKit::DownloadManagerEfl::DownloadManagerEfl):
1083         (WebKit::DownloadManagerEfl::~DownloadManagerEfl):
1084         * UIProcess/efl/DownloadManagerEfl.h:
1085         (WebKit::DownloadManagerEfl::create):
1086         (DownloadManagerEfl):
1087         * UIProcess/efl/RequestManagerClientEfl.cpp:
1088         (WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
1089         * UIProcess/efl/RequestManagerClientEfl.h:
1090         (WebKit::RequestManagerClientEfl::create):
1091         (RequestManagerClientEfl):
1092
1093 2013-01-31  Sheriff Bot  <webkit.review.bot@gmail.com>
1094
1095         Unreviewed, rolling out r141110.
1096         http://trac.webkit.org/changeset/141110
1097         https://bugs.webkit.org/show_bug.cgi?id=108349
1098
1099         This patch broke WK2-EFL unit tests (Requested by grzegorz on
1100         #webkit).
1101
1102         * UIProcess/efl/TextCheckerEfl.cpp:
1103         * WebProcess/WebCoreSupport/WebEditorClient.h:
1104         * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
1105
1106 2013-01-31  Jae Hyun Park  <jae.park@company100.net>
1107
1108         Coordinated Graphics : Remove WebCoordinatedSurface dependency from CoordinatedSurface
1109         https://bugs.webkit.org/show_bug.cgi?id=108259
1110
1111         Reviewed by Noam Rosenthal.
1112
1113         This is a preparation patch for Threaded Coordinated Graphics.
1114
1115         WebCoordinatedSurface dependency should be removed from
1116         CoordinatedSurface so as to share CoordinatedSurface between
1117         WebCoordinatedSurface and CoordinatedSurface of WebKit1, which will be
1118         implemented for Threaded Coordinated Graphics.
1119
1120         This patch introduces CoordinatedSurface::Factory, which is a function
1121         pointer that creates CoordinatedSurfaces. CoordinatedLayerTreeHost sets
1122         static CoordinatedSurface::Factory member variable. Classes that use
1123         CoordinatedSurface, which are CoordinatedImageBacking and UpdateAtlas,
1124         create CoordinatedSurfaces by calling CoordinatedSurface::create, which
1125         will call the function set by CoordinatedLayerTreeHost.
1126
1127         This way, we can remove the WebCoordinatedSurface dependency from
1128         CoordinatedSurface and be able to share the code in Threaded Coordinated
1129         Graphics.
1130
1131         No new tests. No change in behavior.
1132
1133         * CMakeLists.txt:
1134         * Shared/CoordinatedGraphics/CoordinatedSurface.cpp: Added.
1135         (WebKit):
1136         (WebKit::CoordinatedSurface::setFactory):
1137         (WebKit::CoordinatedSurface::create):
1138         * Shared/CoordinatedGraphics/CoordinatedSurface.h:
1139         (CoordinatedSurface):
1140         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
1141         * Target.pri:
1142         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1143         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1144         (WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface):
1145         (WebKit):
1146         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1147
1148 2013-01-30  Tim Horton  <timothy_horton@apple.com>
1149
1150         Unreviewed build fix after http://trac.webkit.org/changeset/141372.
1151
1152         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1153         (WebKit::PDFPlugin::performDictionaryLookupAtLocation):
1154
1155 2013-01-30  Jae Hyun Park  <jae.park@company100.net>
1156
1157         Coordinated Graphics : Remove CoordinatedLayerTreeHostProxy dependency from LayerTreeRenderer
1158         https://bugs.webkit.org/show_bug.cgi?id=108164
1159
1160         Reviewed by Benjamin Poulain.
1161
1162         This is a preparation patch for Threaded Coordinated Graphics.
1163
1164         LayerTreeRenderer should not depend on CoordinatedLayerTreeHostProxy so that it
1165         can be moved to WebCore.  This patch introduces LayerTreeRendererClient which
1166         is implemented in CoordinatedLayerTreeHostProxy. LayerTreeRenderer uses this
1167         client, instead of using CoordinatedLayerTreeHostProxy directly.
1168
1169         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1170         (CoordinatedLayerTreeHostProxy):
1171         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
1172         (WebKit::LayerTreeRenderer::LayerTreeRenderer):
1173         (WebKit::LayerTreeRenderer::animationFrameReady):
1174         (WebKit::LayerTreeRenderer::updateViewport):
1175         (WebKit::LayerTreeRenderer::renderNextFrame):
1176         (WebKit::LayerTreeRenderer::purgeBackingStores):
1177         (WebKit::LayerTreeRenderer::detach):
1178         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
1179         (WebKit):
1180         (LayerTreeRendererClient):
1181         (LayerTreeRenderer):
1182
1183 2013-01-30  Tim Horton  <timothy_horton@apple.com>
1184
1185         PDFPlugin: Should respond to three-finger tap for dictionary definitions
1186         https://bugs.webkit.org/show_bug.cgi?id=108418
1187         <rdar://problem/13121409>
1188
1189         Reviewed by Simon Fraser.
1190
1191         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add default implementation of performDictionaryLookupAtLocation.
1192         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add getSelectionForWordAtPoint and searchInDictionaryWithSelection.
1193         * WebProcess/Plugins/PDF/PDFPlugin.h: Add performDictionaryLookupAtLocation.
1194         * WebProcess/Plugins/PDF/PDFPlugin.mm: Grab a PDFSelection representing the word encompassing the given point, and
1195         throw up a dictionary popover.
1196         (WebKit::PDFPlugin::performDictionaryLookupAtLocation):
1197         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:  Add default implementation of performDictionaryLookupAtLocation.
1198         * WebProcess/Plugins/Plugin.h:  Add performDictionaryLookupAtLocation.
1199         * WebProcess/Plugins/PluginProxy.h: Add default implementation of performDictionaryLookupAtLocation.
1200         * WebProcess/Plugins/PluginView.cpp: 
1201         (WebKit::PluginView::performDictionaryLookupAtLocation): Forward performDictionaryLookupAtLocation to the plugin.
1202         * WebProcess/Plugins/PluginView.h: Add performDictionaryLookupAtLocation.
1203         * WebProcess/WebPage/mac/WebPageMac.mm:
1204         (WebKit::WebPage::performDictionaryLookupAtLocation): Intercept performDictionaryLookupAtLocation, and give
1205         the main-frame plugin (if it exists) a chance to handle it.
1206
1207 2013-01-30  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1208
1209         [WK2] Cleanup MessageID parameter after r141332
1210         https://bugs.webkit.org/show_bug.cgi?id=108419
1211
1212         Unreviewed to fix build breaks.
1213
1214         r141332 didn't remove MessageID parameter on some features.
1215         (battery, vibration, coordinate graphics, network info and so on)
1216
1217         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1218         (CoordinatedLayerTreeHostProxy):
1219         * UIProcess/DrawingAreaProxyImpl.cpp:
1220         (WebKit::DrawingAreaProxyImpl::didReceiveCoordinatedLayerTreeHostProxyMessage):
1221         * UIProcess/WebBatteryManagerProxy.h:
1222         (WebBatteryManagerProxy):
1223         * UIProcess/WebNetworkInfoManagerProxy.h:
1224         (WebNetworkInfoManagerProxy):
1225         * UIProcess/WebPageProxy.cpp:
1226         (WebKit::WebPageProxy::didReceiveMessage):
1227         * UIProcess/WebVibrationProxy.h:
1228         (WebVibrationProxy):
1229         * UIProcess/soup/WebSoupRequestManagerProxy.h:
1230         (WebSoupRequestManagerProxy):
1231         * WebProcess/Battery/WebBatteryManager.h:
1232         (WebBatteryManager):
1233         * WebProcess/NetworkInfo/WebNetworkInfoManager.h:
1234         (WebNetworkInfoManager):
1235         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1236         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1237         (WebKit::DrawingAreaImpl::didReceiveCoordinatedLayerTreeHostMessage):
1238         * WebProcess/WebPage/WebPage.cpp:
1239         (WebKit::WebPage::didReceiveMessage):
1240         * WebProcess/soup/WebSoupRequestManager.h:
1241         (WebSoupRequestManager):
1242
1243 2013-01-30  Anders Carlsson  <andersca@apple.com>
1244
1245         Remove MessageID from MessageSender
1246         https://bugs.webkit.org/show_bug.cgi?id=108413
1247
1248         Reviewed by Andreas Kling.
1249
1250         This is another step towards eliminating MessageID.
1251
1252         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1253         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
1254         (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage):
1255         * NetworkProcess/NetworkConnectionToWebProcess.h:
1256         (NetworkConnectionToWebProcess):
1257         * NetworkProcess/NetworkProcess.cpp:
1258         (WebKit::NetworkProcess::didReceiveMessage):
1259         (WebKit::NetworkProcess::didReceiveSyncMessage):
1260         * NetworkProcess/NetworkProcess.h:
1261         (NetworkProcess):
1262         * Platform/CoreIPC/Connection.cpp:
1263         (CoreIPC::Connection::processIncomingMessage):
1264         (CoreIPC::Connection::dispatchSyncMessage):
1265         (CoreIPC::Connection::dispatchMessage):
1266         * Platform/CoreIPC/Connection.h:
1267         (QueueClient):
1268         (CoreIPC::Connection::waitForAndDispatchImmediately):
1269         * Platform/CoreIPC/MessageReceiver.h:
1270         (MessageReceiver):
1271         (CoreIPC::MessageReceiver::didReceiveSyncMessage):
1272         * Platform/CoreIPC/MessageReceiverMap.cpp:
1273         (CoreIPC::MessageReceiverMap::dispatchMessage):
1274         (CoreIPC::MessageReceiverMap::dispatchSyncMessage):
1275         * Platform/CoreIPC/MessageReceiverMap.h:
1276         (MessageReceiverMap):
1277         * PluginProcess/PluginProcess.cpp:
1278         (WebKit::PluginProcess::didReceiveMessage):
1279         * PluginProcess/PluginProcess.h:
1280         (PluginProcess):
1281         * PluginProcess/WebProcessConnection.cpp:
1282         (WebKit::WebProcessConnection::didReceiveMessage):
1283         (WebKit::WebProcessConnection::didReceiveSyncMessage):
1284         * PluginProcess/WebProcessConnection.h:
1285         (WebProcessConnection):
1286         * Scripts/webkit2/messages.py:
1287         (forward_declarations_and_headers):
1288         (generate_message_handler):
1289         * Scripts/webkit2/messages_unittest.py:
1290         * Shared/Authentication/AuthenticationManager.cpp:
1291         (WebKit::AuthenticationManager::didReceiveMessage):
1292         * Shared/Authentication/AuthenticationManager.h:
1293         (AuthenticationManager):
1294         * Shared/ChildProcessProxy.cpp:
1295         (WebKit::ChildProcessProxy::sendMessage):
1296         * Shared/ChildProcessProxy.h:
1297         (ChildProcessProxy):
1298         (WebKit::ChildProcessProxy::send):
1299         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
1300         (CustomProtocolManager):
1301         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
1302         (WebKit::CustomProtocolManager::didReceiveMessage):
1303         * Shared/Plugins/NPRemoteObjectMap.cpp:
1304         (WebKit::NPRemoteObjectMap::didReceiveSyncMessage):
1305         * Shared/Plugins/NPRemoteObjectMap.h:
1306         (NPRemoteObjectMap):
1307         * Shared/WebConnection.cpp:
1308         (WebKit::WebConnection::didReceiveMessage):
1309         * Shared/WebConnection.h:
1310         (WebConnection):
1311         * Shared/mac/SecItemShim.cpp:
1312         (WebKit::SecItemShim::didReceiveMessageOnConnectionWorkQueue):
1313         * Shared/mac/SecItemShim.h:
1314         (SecItemShim):
1315         * SharedWorkerProcess/SharedWorkerProcess.cpp:
1316         (WebKit::SharedWorkerProcess::didReceiveMessage):
1317         * SharedWorkerProcess/SharedWorkerProcess.h:
1318         (SharedWorkerProcess):
1319         * UIProcess/Downloads/DownloadProxy.cpp:
1320         (WebKit::DownloadProxy::didReceiveMessage):
1321         (WebKit::DownloadProxy::didReceiveSyncMessage):
1322         * UIProcess/Downloads/DownloadProxy.h:
1323         (DownloadProxy):
1324         * UIProcess/DrawingAreaProxy.cpp:
1325         (WebKit::DrawingAreaProxy::didReceiveCoordinatedLayerTreeHostProxyMessage):
1326         * UIProcess/DrawingAreaProxy.h:
1327         (DrawingAreaProxy):
1328         * UIProcess/DrawingAreaProxyImpl.cpp:
1329         (WebKit::DrawingAreaProxyImpl::didReceiveCoordinatedLayerTreeHostProxyMessage):
1330         * UIProcess/DrawingAreaProxyImpl.h:
1331         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
1332         (CustomProtocolManagerProxy):
1333         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
1334         (WebKit::CustomProtocolManagerProxy::didReceiveMessage):
1335         * UIProcess/Network/NetworkProcessProxy.cpp:
1336         (WebKit::NetworkProcessProxy::didReceiveMessage):
1337         (WebKit::NetworkProcessProxy::didReceiveSyncMessage):
1338         * UIProcess/Network/NetworkProcessProxy.h:
1339         (NetworkProcessProxy):
1340         * UIProcess/Notifications/WebNotificationManagerProxy.h:
1341         (WebNotificationManagerProxy):
1342         * UIProcess/Plugins/PluginProcessProxy.cpp:
1343         (WebKit::PluginProcessProxy::didReceiveMessage):
1344         * UIProcess/Plugins/PluginProcessProxy.h:
1345         (PluginProcessProxy):
1346         * UIProcess/SharedWorkers/SharedWorkerProcessProxy.cpp:
1347         (WebKit::SharedWorkerProcessProxy::didReceiveMessage):
1348         * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h:
1349         (SharedWorkerProcessProxy):
1350         * UIProcess/WebApplicationCacheManagerProxy.cpp:
1351         (WebKit::WebApplicationCacheManagerProxy::didReceiveMessage):
1352         * UIProcess/WebApplicationCacheManagerProxy.h:
1353         (WebApplicationCacheManagerProxy):
1354         * UIProcess/WebContext.cpp:
1355         (WebKit::WebContext::dispatchMessage):
1356         (WebKit::WebContext::dispatchSyncMessage):
1357         (WebKit::WebContext::didReceiveMessage):
1358         (WebKit::WebContext::didReceiveSyncMessage):
1359         * UIProcess/WebContext.h:
1360         (WebContext):
1361         * UIProcess/WebCookieManagerProxy.cpp:
1362         (WebKit::WebCookieManagerProxy::didReceiveMessage):
1363         * UIProcess/WebCookieManagerProxy.h:
1364         (WebCookieManagerProxy):
1365         * UIProcess/WebDatabaseManagerProxy.cpp:
1366         (WebKit::WebDatabaseManagerProxy::didReceiveMessage):
1367         * UIProcess/WebDatabaseManagerProxy.h:
1368         (WebDatabaseManagerProxy):
1369         * UIProcess/WebFullScreenManagerProxy.cpp:
1370         (WebKit::WebFullScreenManagerProxy::didReceiveMessage):
1371         (WebKit::WebFullScreenManagerProxy::didReceiveSyncMessage):
1372         * UIProcess/WebFullScreenManagerProxy.h:
1373         (WebFullScreenManagerProxy):
1374         * UIProcess/WebGeolocationManagerProxy.h:
1375         (WebGeolocationManagerProxy):
1376         * UIProcess/WebIconDatabase.h:
1377         (WebIconDatabase):
1378         * UIProcess/WebKeyValueStorageManagerProxy.h:
1379         (WebKeyValueStorageManagerProxy):
1380         * UIProcess/WebMediaCacheManagerProxy.h:
1381         (WebMediaCacheManagerProxy):
1382         * UIProcess/WebPageProxy.cpp:
1383         (WebKit::WebPageProxy::didReceiveMessage):
1384         (WebKit::WebPageProxy::didReceiveSyncMessage):
1385         * UIProcess/WebPageProxy.h:
1386         (WebPageProxy):
1387         * UIProcess/WebProcessProxy.cpp:
1388         (WebKit::WebProcessProxy::didReceiveMessage):
1389         (WebKit::WebProcessProxy::didReceiveSyncMessage):
1390         (WebKit::WebProcessProxy::didReceiveMessageOnConnectionWorkQueue):
1391         * UIProcess/WebProcessProxy.h:
1392         (WebProcessProxy):
1393         * UIProcess/WebResourceCacheManagerProxy.h:
1394         (WebResourceCacheManagerProxy):
1395         * UIProcess/mac/RemoteLayerTreeHost.h:
1396         (RemoteLayerTreeHost):
1397         * UIProcess/mac/RemoteLayerTreeHost.mm:
1398         (WebKit::RemoteLayerTreeHost::didReceiveMessage):
1399         * UIProcess/mac/SecItemShimProxy.cpp:
1400         (WebKit::SecItemShimProxy::didReceiveMessageOnConnectionWorkQueue):
1401         * UIProcess/mac/SecItemShimProxy.h:
1402         (SecItemShimProxy):
1403         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
1404         (WebKit::WebApplicationCacheManager::didReceiveMessage):
1405         * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
1406         (WebApplicationCacheManager):
1407         * WebProcess/Cookies/WebCookieManager.cpp:
1408         (WebKit::WebCookieManager::didReceiveMessage):
1409         * WebProcess/Cookies/WebCookieManager.h:
1410         (WebCookieManager):
1411         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1412         (WebKit::WebFullScreenManager::didReceiveMessage):
1413         * WebProcess/FullScreen/WebFullScreenManager.h:
1414         (WebFullScreenManager):
1415         * WebProcess/Geolocation/WebGeolocationManager.h:
1416         (WebGeolocationManager):
1417         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
1418         (WebIconDatabaseProxy):
1419         * WebProcess/MediaCache/WebMediaCacheManager.h:
1420         (WebMediaCacheManager):
1421         * WebProcess/Network/NetworkProcessConnection.cpp:
1422         (WebKit::NetworkProcessConnection::didReceiveMessage):
1423         (WebKit::NetworkProcessConnection::didReceiveSyncMessage):
1424         * WebProcess/Network/NetworkProcessConnection.h:
1425         (NetworkProcessConnection):
1426         * WebProcess/Notifications/WebNotificationManager.h:
1427         (WebNotificationManager):
1428         * WebProcess/Plugins/PluginProcessConnection.cpp:
1429         (WebKit::PluginProcessConnection::didReceiveMessage):
1430         (WebKit::PluginProcessConnection::didReceiveSyncMessage):
1431         * WebProcess/Plugins/PluginProcessConnection.h:
1432         (PluginProcessConnection):
1433         * WebProcess/ResourceCache/WebResourceCacheManager.h:
1434         (WebResourceCacheManager):
1435         * WebProcess/Storage/WebKeyValueStorageManager.h:
1436         (WebKeyValueStorageManager):
1437         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1438         (WebKit::WebDatabaseManager::didReceiveMessage):
1439         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
1440         (WebDatabaseManager):
1441         * WebProcess/WebPage/DrawingArea.h:
1442         (DrawingArea):
1443         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1444         (WebKit::DrawingAreaImpl::didReceiveCoordinatedLayerTreeHostMessage):
1445         * WebProcess/WebPage/DrawingAreaImpl.h:
1446         (DrawingAreaImpl):
1447         * WebProcess/WebPage/EventDispatcher.cpp:
1448         (WebKit::EventDispatcher::didReceiveMessageOnConnectionWorkQueue):
1449         * WebProcess/WebPage/EventDispatcher.h:
1450         (EventDispatcher):
1451         * WebProcess/WebPage/LayerTreeHost.h:
1452         (LayerTreeHost):
1453         * WebProcess/WebPage/WebPage.cpp:
1454         (WebKit::WebPage::didReceiveMessage):
1455         (WebKit::WebPage::didReceiveSyncMessage):
1456         * WebProcess/WebPage/WebPage.h:
1457         (WebPage):
1458         * WebProcess/WebPage/WebPageGroupProxy.h:
1459         (WebPageGroupProxy):
1460         * WebProcess/WebProcess.cpp:
1461         (WebKit::WebProcess::didReceiveSyncMessage):
1462         (WebKit::WebProcess::didReceiveMessage):
1463         (WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue):
1464         * WebProcess/WebProcess.h:
1465         (WebProcess):
1466
1467 2013-01-30  Tim Horton  <timothy_horton@apple.com>
1468
1469         PDFPlugin: Update scrollbars if PDFLayerController's display mode changes
1470         https://bugs.webkit.org/show_bug.cgi?id=108412
1471         <rdar://problem/13002261>
1472
1473         Reviewed by Simon Fraser.
1474
1475         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add pdfLayerController:didChangeDisplayMode:
1476         * WebProcess/Plugins/PDF/PDFPlugin.h: Add notifyDisplayModeChanged().
1477         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1478         (-[WKPDFLayerControllerDelegate pdfLayerController:didChangeDisplayMode:]): Forward didChangeDisplayMode to notifyDisplayModeChanged.
1479         (WebKit::PDFPlugin::notifyDisplayModeChanged): Update content size and scrollbar size when display mode changes.
1480
1481 2013-01-30  Alexey Proskuryakov  <ap@apple.com>
1482
1483         <rdar://problem/12695827> PPT: Make loading file URLs work with a sandboxed NetworkProcess
1484
1485         Reviewed by Sam Weinig.
1486
1487         * DerivedSources.make: Preprocess a .sb.in file to build the profile.
1488
1489         * NetworkProcess/mac/NetworkProcessMac.mm:
1490         Don't prevent entering the sandbox. Override sandbox path, because service
1491         gets a differnt one by default.
1492
1493         * WebKit2.xcodeproj/project.pbxproj:
1494         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: Added.
1495
1496 2013-01-30  Huang Dongsung  <luxtella@company100.net>
1497
1498         Coordinated Graphics: LayerTreeRenderer manages the surface of UpdateAtlas.
1499         https://bugs.webkit.org/show_bug.cgi?id=107224
1500
1501         Reviewed by Benjamin Poulain.
1502
1503         Currently, CoordinatedLayerTreeHostProxy manages the surface of UpdateAtlas, but
1504         all other resources are managed by LayerTreeRenderer. This patch matches the
1505         surface of UpdateAtlas to other resources.
1506
1507         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
1508         (WebKit::CoordinatedLayerTreeHostProxy::updateTileForLayer):
1509         (WebKit::CoordinatedLayerTreeHostProxy::createUpdateAtlas):
1510         (WebKit::CoordinatedLayerTreeHostProxy::removeUpdateAtlas):
1511         (WebKit::CoordinatedLayerTreeHostProxy::purgeBackingStores):
1512         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1513         (CoordinatedLayerTreeHostProxy):
1514         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
1515         (WebKit::LayerTreeRenderer::updateTile):
1516         (WebKit::LayerTreeRenderer::createUpdateAtlas):
1517         (WebKit):
1518         (WebKit::LayerTreeRenderer::removeUpdateAtlas):
1519         (WebKit::LayerTreeRenderer::purgeGLResources):
1520         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
1521         (TileUpdate):
1522         (WebKit::LayerTreeRenderer::TileUpdate::TileUpdate):
1523         (LayerTreeRenderer):
1524
1525 2013-01-30  Anders Carlsson  <andersca@apple.com>
1526
1527         Remove MessageID parameter from generated message receivers
1528         https://bugs.webkit.org/show_bug.cgi?id=108379
1529
1530         Reviewed by Beth Dakin.
1531
1532         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1533         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
1534         (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage):
1535         * NetworkProcess/NetworkConnectionToWebProcess.h:
1536         (NetworkConnectionToWebProcess):
1537         * NetworkProcess/NetworkProcess.cpp:
1538         (WebKit::NetworkProcess::didReceiveMessage):
1539         * NetworkProcess/NetworkProcess.h:
1540         (NetworkProcess):
1541         * PluginProcess/PluginControllerProxy.h:
1542         (PluginControllerProxy):
1543         * PluginProcess/PluginProcess.cpp:
1544         (WebKit::PluginProcess::didReceiveMessage):
1545         * PluginProcess/PluginProcess.h:
1546         (PluginProcess):
1547         * PluginProcess/WebProcessConnection.cpp:
1548         (WebKit::WebProcessConnection::didReceiveMessage):
1549         (WebKit::WebProcessConnection::didReceiveSyncMessage):
1550         * PluginProcess/WebProcessConnection.h:
1551         (WebProcessConnection):
1552         * Scripts/webkit2/messages.py:
1553         (generate_message_handler):
1554         * Scripts/webkit2/messages_unittest.py:
1555         * Shared/Authentication/AuthenticationManager.cpp:
1556         (WebKit::AuthenticationManager::didReceiveMessage):
1557         * Shared/Authentication/AuthenticationManager.h:
1558         (AuthenticationManager):
1559         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
1560         (CustomProtocolManager):
1561         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
1562         (WebKit::CustomProtocolManager::didReceiveMessage):
1563         * Shared/Plugins/NPObjectMessageReceiver.h:
1564         (NPObjectMessageReceiver):
1565         * Shared/Plugins/NPRemoteObjectMap.cpp:
1566         (WebKit::NPRemoteObjectMap::didReceiveSyncMessage):
1567         * Shared/WebConnection.cpp:
1568         (WebKit::WebConnection::didReceiveMessage):
1569         * Shared/WebConnection.h:
1570         (WebConnection):
1571         * Shared/mac/SecItemShim.cpp:
1572         (WebKit::SecItemShim::didReceiveMessageOnConnectionWorkQueue):
1573         * Shared/mac/SecItemShim.h:
1574         (SecItemShim):
1575         * SharedWorkerProcess/SharedWorkerProcess.cpp:
1576         (WebKit::SharedWorkerProcess::didReceiveMessage):
1577         * SharedWorkerProcess/SharedWorkerProcess.h:
1578         (SharedWorkerProcess):
1579         * UIProcess/Downloads/DownloadProxy.cpp:
1580         (WebKit::DownloadProxy::didReceiveMessage):
1581         (WebKit::DownloadProxy::didReceiveSyncMessage):
1582         * UIProcess/Downloads/DownloadProxy.h:
1583         (DownloadProxy):
1584         * UIProcess/DrawingAreaProxy.h:
1585         (DrawingAreaProxy):
1586         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
1587         (CustomProtocolManagerProxy):
1588         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
1589         (WebKit::CustomProtocolManagerProxy::didReceiveMessage):
1590         * UIProcess/Network/NetworkProcessProxy.cpp:
1591         (WebKit::NetworkProcessProxy::didReceiveMessage):
1592         * UIProcess/Network/NetworkProcessProxy.h:
1593         (NetworkProcessProxy):
1594         * UIProcess/Plugins/PluginProcessProxy.cpp:
1595         (WebKit::PluginProcessProxy::didReceiveMessage):
1596         * UIProcess/Plugins/PluginProcessProxy.h:
1597         (PluginProcessProxy):
1598         * UIProcess/SharedWorkers/SharedWorkerProcessProxy.cpp:
1599         (WebKit::SharedWorkerProcessProxy::didReceiveMessage):
1600         * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h:
1601         (SharedWorkerProcessProxy):
1602         * UIProcess/WebApplicationCacheManagerProxy.cpp:
1603         (WebKit::WebApplicationCacheManagerProxy::didReceiveMessage):
1604         * UIProcess/WebApplicationCacheManagerProxy.h:
1605         (WebApplicationCacheManagerProxy):
1606         * UIProcess/WebContext.cpp:
1607         (WebKit::WebContext::didReceiveMessage):
1608         (WebKit::WebContext::didReceiveSyncMessage):
1609         * UIProcess/WebContext.h:
1610         (WebContext):
1611         * UIProcess/WebCookieManagerProxy.cpp:
1612         (WebKit::WebCookieManagerProxy::didReceiveMessage):
1613         * UIProcess/WebCookieManagerProxy.h:
1614         (WebCookieManagerProxy):
1615         * UIProcess/WebDatabaseManagerProxy.cpp:
1616         (WebKit::WebDatabaseManagerProxy::didReceiveMessage):
1617         * UIProcess/WebDatabaseManagerProxy.h:
1618         (WebDatabaseManagerProxy):
1619         * UIProcess/WebFullScreenManagerProxy.cpp:
1620         (WebKit::WebFullScreenManagerProxy::didReceiveMessage):
1621         (WebKit::WebFullScreenManagerProxy::didReceiveSyncMessage):
1622         * UIProcess/WebFullScreenManagerProxy.h:
1623         (WebFullScreenManagerProxy):
1624         * UIProcess/WebInspectorProxy.h:
1625         (WebInspectorProxy):
1626         * UIProcess/WebPageProxy.cpp:
1627         (WebKit::WebPageProxy::didReceiveMessage):
1628         (WebKit::WebPageProxy::didReceiveSyncMessage):
1629         * UIProcess/WebPageProxy.h:
1630         (WebPageProxy):
1631         * UIProcess/WebProcessProxy.cpp:
1632         (WebKit::WebProcessProxy::didReceiveMessage):
1633         (WebKit::WebProcessProxy::didReceiveSyncMessage):
1634         (WebKit::WebProcessProxy::didReceiveMessageOnConnectionWorkQueue):
1635         * UIProcess/WebProcessProxy.h:
1636         (WebProcessProxy):
1637         * UIProcess/mac/RemoteLayerTreeHost.h:
1638         (RemoteLayerTreeHost):
1639         * UIProcess/mac/RemoteLayerTreeHost.mm:
1640         (WebKit::RemoteLayerTreeHost::didReceiveMessage):
1641         * UIProcess/mac/SecItemShimProxy.cpp:
1642         (WebKit::SecItemShimProxy::didReceiveMessageOnConnectionWorkQueue):
1643         * UIProcess/mac/SecItemShimProxy.h:
1644         (SecItemShimProxy):
1645         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
1646         (WebKit::WebApplicationCacheManager::didReceiveMessage):
1647         * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
1648         (WebApplicationCacheManager):
1649         * WebProcess/Cookies/WebCookieManager.cpp:
1650         (WebKit::WebCookieManager::didReceiveMessage):
1651         * WebProcess/Cookies/WebCookieManager.h:
1652         (WebCookieManager):
1653         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1654         (WebKit::WebFullScreenManager::didReceiveMessage):
1655         * WebProcess/FullScreen/WebFullScreenManager.h:
1656         (WebFullScreenManager):
1657         * WebProcess/Network/NetworkProcessConnection.cpp:
1658         (WebKit::NetworkProcessConnection::didReceiveMessage):
1659         (WebKit::NetworkProcessConnection::didReceiveSyncMessage):
1660         * WebProcess/Network/WebResourceLoader.h:
1661         (WebResourceLoader):
1662         * WebProcess/Plugins/PluginProcessConnection.cpp:
1663         (WebKit::PluginProcessConnection::didReceiveMessage):
1664         (WebKit::PluginProcessConnection::didReceiveSyncMessage):
1665         * WebProcess/Plugins/PluginProcessConnection.h:
1666         (PluginProcessConnection):
1667         * WebProcess/Plugins/PluginProxy.h:
1668         (PluginProxy):
1669         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1670         (WebKit::WebDatabaseManager::didReceiveMessage):
1671         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
1672         (WebDatabaseManager):
1673         * WebProcess/WebPage/DrawingArea.h:
1674         (DrawingArea):
1675         * WebProcess/WebPage/EventDispatcher.cpp:
1676         (WebKit::EventDispatcher::didReceiveMessageOnConnectionWorkQueue):
1677         * WebProcess/WebPage/EventDispatcher.h:
1678         (EventDispatcher):
1679         * WebProcess/WebPage/WebInspector.h:
1680         (WebInspector):
1681         * WebProcess/WebPage/WebPage.cpp:
1682         (WebKit::WebPage::didReceiveMessage):
1683         (WebKit::WebPage::didReceiveSyncMessage):
1684         * WebProcess/WebPage/WebPage.h:
1685         (WebPage):
1686         * WebProcess/WebProcess.cpp:
1687         (WebKit::WebProcess::didReceiveMessage):
1688         (WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue):
1689         * WebProcess/WebProcess.h:
1690         (WebProcess):
1691
1692 2013-01-30  Christophe Dumez  <dchris@gmail.com>
1693
1694         [WK2][UNIX] g_spawn_sync() generates warning in PluginProcessProxy::scanPlugin()
1695         https://bugs.webkit.org/show_bug.cgi?id=108371
1696
1697         Reviewed by Martin Robinson.
1698
1699         g_spawn_sync() was sometimes displaying a warning about the SIGCHLD
1700         signal disposition not being set to SIG_DFL, despite the fix in r133755.
1701         The reason was that the code was only setting the disposition to SIG_DFL
1702         if the previous disposition was SIG_IGN.
1703
1704         In this patch, we set the SIGCHLD signal disposition to SIG_DFL, no
1705         matter what its previous disposition was. Also, the signal disposition
1706         is now restored to its previous state after the call to g_spawn_sync()
1707         to avoid side effects. Finally, we now use SIGCHLD instead of SIDCLD
1708         since this is the more compatible POSIX name.
1709
1710         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
1711         (WebKit::spawnProcessSync):
1712         (WebKit):
1713         (WebKit::PluginProcessProxy::scanPlugin):
1714
1715 2013-01-30  Huang Dongsung  <luxtella@company100.net>
1716
1717         [EFL][Qt][WK2] We should consider a page scale factor in WebCore instead of our own scale factor.
1718         https://bugs.webkit.org/show_bug.cgi?id=105978
1719
1720         Reviewed by Simon Fraser.
1721
1722         Currently, PageViewportController sends a page scale factor to Coordinated
1723         Graphics System regardless of the page scale factor in WebCore. This patch makes
1724         Coordinated Graphics System use the page scale factor in WebCore to match other
1725         ports.
1726
1727         When it is needed to change a page scale, PageViewportController sends the scale
1728         to Page in Web Process via WebPageProxy::scalePage. When the page scale in
1729         WebCore is changed, CoordinatedGraphicsLayer gets notified via
1730         deviceOrPageScaleFactorChanged callback. CoordinatedGraphicsLayer uses the page
1731         scale factor like previous our own scale factor.
1732
1733         We set true to applyDeviceScaleFactorInCompositor and
1734         ApplyPageScaleFactorInCompositor in Settings like chromium, because
1735         TiledBackingStore that is a backing store of each GraphicsLayer applies the
1736         scale to our raster graphics engines instead of applying the scale to the local
1737         transform of each render object.
1738
1739         Thank Kenneth Rohde Christiansen for implementing the base patch of this patch.
1740
1741         No new tests. Covered by existing tests.
1742
1743         * UIProcess/API/qt/qquickwebview.cpp:
1744         (QQuickWebViewLegacyPrivate::updateViewportSize):
1745         * UIProcess/API/qt/raw/qrawwebview.cpp:
1746         (QRawWebView::setSize):
1747         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
1748         (WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy):
1749         (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
1750             Does not receive a pageScaleFactor argument because
1751             PageViewportController sends a page scale factor to Page.
1752             However, this method still receives a scroll position because we
1753             enable delegates scrolling.
1754         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1755         (CoordinatedLayerTreeHostProxy):
1756         * UIProcess/DrawingAreaProxy.h:
1757         (WebKit::DrawingAreaProxy::setVisibleContentsRect):
1758         * UIProcess/DrawingAreaProxyImpl.cpp:
1759         (WebKit::DrawingAreaProxyImpl::setVisibleContentsRect):
1760         * UIProcess/DrawingAreaProxyImpl.h:
1761         * UIProcess/PageViewportController.cpp:
1762         (WebKit::PageViewportController::didRenderFrame):
1763         (WebKit::PageViewportController::didChangeContentsVisibility):
1764         (WebKit::PageViewportController::syncVisibleContents):
1765         (WebKit::PageViewportController::applyScaleAfterRenderingContents):
1766         (WebKit::PageViewportController::applyPositionAfterRenderingContents):
1767         * UIProcess/efl/PageClientLegacyImpl.cpp:
1768         (WebKit::PageClientLegacyImpl::updateViewportSize):
1769         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
1770         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
1771         (WebCore::CoordinatedGraphicsLayer::deviceOrPageScaleFactorChanged):
1772         (WebCore::CoordinatedGraphicsLayer::effectiveContentsScale):
1773         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
1774         (CoordinatedGraphicsLayer):
1775         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1776         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1777         (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
1778         (WebKit::CoordinatedLayerTreeHost::deviceScaleFactor):
1779         (WebKit):
1780         (WebKit::CoordinatedLayerTreeHost::pageScaleFactor):
1781         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
1782         (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
1783         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1784         (CoordinatedLayerTreeHost):
1785         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in:
1786         * WebProcess/WebPage/WebPage.cpp:
1787         (WebKit::WebPage::setUseFixedLayout):
1788
1789 2013-01-30  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1790
1791         [Qt] Fix Win build after r141177
1792         https://bugs.webkit.org/show_bug.cgi?id=108325
1793
1794         Reviewed by Anders Carlsson.
1795
1796         * Platform/CoreIPC/win/ConnectionWin.cpp:
1797         (CoreIPC::Connection::readEventHandler):
1798         (CoreIPC::Connection::sendOutgoingMessage):
1799
1800 2013-01-30  Thiago Marcos P. Santos  <thiago.santos@intel.com>
1801
1802         REGRESSION (r141051): Broke plugin support on non-Mac WebKit2 Ports
1803         https://bugs.webkit.org/show_bug.cgi?id=108182
1804
1805         Reviewed by Sam Weinig.
1806
1807         Send the plugin path to the PluginProcess as a parameter.
1808
1809         * PluginProcess/qt/PluginProcessMainQt.cpp:
1810         (WebKit::PluginProcessMain):
1811         * PluginProcess/unix/PluginProcessMainUnix.cpp:
1812         (WebKit::PluginProcessMainUnix):
1813         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
1814         (WebKit::ProcessLauncher::launchProcess):
1815         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1816         (WebKit::ProcessLauncher::launchProcess):
1817         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
1818         (WebKit::ProcessLauncher::launchProcess):
1819         * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
1820         (WebKit::PluginProcessProxy::platformInitializeLaunchOptions):
1821         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
1822         (WebKit::PluginProcessProxy::platformInitializeLaunchOptions):
1823
1824 2013-01-30  Christophe Dumez  <christophe.dumez@intel.com>
1825
1826         [EFL][WK2] Use C API inside ewk_window_features
1827         https://bugs.webkit.org/show_bug.cgi?id=107924
1828
1829         Reviewed by Sam Weinig.
1830
1831         Use C API inside ewk_window_features instead of accessing
1832         internal C++ classes directly, to avoid violating API
1833         layering.
1834
1835         * UIProcess/API/efl/EwkView.cpp:
1836         (EwkView::createNewPage):
1837         * UIProcess/API/efl/EwkView.h:
1838         (EwkView):
1839         * UIProcess/API/efl/ewk_window_features.cpp:
1840         (EwkWindowFeatures::EwkWindowFeatures):
1841         (getWindowFeatureValue):
1842         (EwkWindowFeatures::getWindowFeatureBoolValue):
1843         (EwkWindowFeatures::getWindowFeatureDoubleValue):
1844         (ewk_window_features_geometry_get):
1845         * UIProcess/API/efl/ewk_window_features_private.h:
1846         (EwkWindowFeatures::create):
1847         (EwkWindowFeatures::geometry):
1848         (EwkWindowFeatures::setGeometry):
1849         (EwkWindowFeatures):
1850         * UIProcess/efl/PageUIClientEfl.cpp:
1851         (WebKit::PageUIClientEfl::createNewPage):
1852
1853 2013-01-30  Zeno Albisser  <zeno@webkit.org>
1854
1855         [Qt] Fix Qt/Mac build after r141024 and r141037
1856         https://bugs.webkit.org/show_bug.cgi?id=108318
1857
1858         Reviewed by Kentaro Hara.
1859
1860         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1861         (CoreIPC::Connection::platformInvalidate):
1862             Replace nullptr with 0 to allow compiling without C++11 support.
1863
1864 2013-01-30  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1865
1866         [EFL][Qt][WebGL] Avoid deleting an uncreated canvas.
1867         https://bugs.webkit.org/show_bug.cgi?id=106878
1868
1869         Reviewed by Benjamin Poulain.
1870
1871         setContentsToCanvas is responsible for marking canvas for creation or deletion.
1872         The issue here is that the canvas is marked for deletion even though it has not
1873         been created. This causes an assert in LayerTreeRenderer::destroyCanvas.
1874         This patch adds a seperate check to ensure that CoordinatedGraphicsLayer
1875         tries to issue a request for canvas deletion only after request for canvas
1876         creation has been handled.
1877
1878         New test: fast/canvas/webgl/canvas-resize-crash.html
1879
1880         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
1881         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
1882         (WebCore::CoordinatedGraphicsLayer::setContentsToCanvas):
1883         (WebCore::CoordinatedGraphicsLayer::destroyCanvasIfNeeded):
1884         (WebCore::CoordinatedGraphicsLayer::createCanvasIfNeeded):
1885         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
1886         (CoordinatedGraphicsLayer):
1887         (WebCore::CoordinatedGraphicsLayer::fixedToViewport):
1888
1889 2013-01-30  Zan Dobersek  <zdobersek@igalia.com>
1890
1891         Unreviewed GTK build fix.
1892
1893         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: Include GraphicsLayerTextureMapper.h
1894         as a forwarding header from WebCore.
1895
1896 2013-01-30  Huang Dongsung  <luxtella@company100.net>
1897
1898         Coordinated Graphics: Remove m_pendingSyncBackingStores in LayerTreeRenderer.
1899         https://bugs.webkit.org/show_bug.cgi?id=107099
1900
1901         Reviewed by Noam Rosenthal.
1902
1903         Instead of queuing the setting of backing stores in LayerTreeRenderer,
1904         and then setting them directly to TextureMapperLayer, we allow
1905         GraphicsLayerTextureMapper's existing queuing mechanism to handle that.
1906         Instead of a m_pendingSyncBackingStores queue, we have a m_backingStores
1907         queue which can be applied much more easily to the layer tree.
1908
1909         In addition, LayerTreeRenderer::purgeGLResources() does not call
1910         TextureMapperLayer::clearBackingStoresRecursive() because
1911         TextureMapperLayer will be destructed soon.
1912
1913         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
1914         (WebKit::LayerTreeRenderer::deleteLayer):
1915         (WebKit::LayerTreeRenderer::createBackingStoreIfNeeded):
1916         (WebKit::LayerTreeRenderer::removeBackingStoreIfNeeded):
1917         (WebKit::LayerTreeRenderer::resetBackingStoreSizeToLayerSize):
1918         (WebKit::LayerTreeRenderer::createTile):
1919         (WebKit::LayerTreeRenderer::removeTile):
1920         (WebKit::LayerTreeRenderer::updateTile):
1921         (WebKit::LayerTreeRenderer::commitPendingBackingStoreOperations):
1922         (WebKit::LayerTreeRenderer::purgeGLResources):
1923         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
1924
1925 2013-01-29  Anders Carlsson  <andersca@apple.com>
1926
1927         Update the expected generated message results
1928         https://bugs.webkit.org/show_bug.cgi?id=108293
1929
1930         Reviewed by Beth Dakin.
1931
1932         * Scripts/webkit2/messages.py:
1933         (generate_messages_header):
1934         * Scripts/webkit2/messages_unittest.py:
1935
1936 2013-01-29  Sam Weinig  <sam@webkit.org>
1937
1938         Replace unnecessary ArgumentDecoder member functions with decode overloads
1939         https://bugs.webkit.org/show_bug.cgi?id=102013
1940
1941         Reviewed by Anders Carlsson.
1942
1943         * Platform/CoreIPC/ArgumentCoders.cpp:
1944         (CoreIPC::::decode):
1945         * Platform/CoreIPC/ArgumentCoders.h:
1946         * Platform/CoreIPC/ArgumentDecoder.cpp:
1947         (CoreIPC::ArgumentDecoder::decodeVariableLengthByteArray):
1948         (CoreIPC::ArgumentDecoder::decode):
1949         * Platform/CoreIPC/ArgumentDecoder.h:
1950         (ArgumentDecoder):
1951         (CoreIPC::ArgumentDecoder::decodeEnum):
1952         (CoreIPC):
1953         * Platform/CoreIPC/Connection.cpp:
1954         (CoreIPC::Connection::dispatchSyncMessage):
1955         * Platform/CoreIPC/MessageDecoder.cpp:
1956         (CoreIPC::MessageDecoder::MessageDecoder):
1957         * Platform/mac/SharedMemoryMac.cpp:
1958         (WebKit::SharedMemory::Handle::decode):
1959         * Platform/win/SharedMemoryWin.cpp:
1960         (WebKit::SharedMemory::Handle::decode):
1961         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1962         (CoreIPC::::decode):
1963         (CoreIPC::decodeTimingFunction):
1964         * Shared/DictionaryPopupInfo.cpp:
1965         (WebKit::DictionaryPopupInfo::decode):
1966         * Shared/UserMessageCoders.h:
1967         (WebKit::UserMessageDecoder::baseDecode):
1968         * Shared/cf/ArgumentCodersCF.cpp:
1969         (CoreIPC::decode):
1970         * Shared/mac/ArgumentCodersMac.mm:
1971         (CoreIPC::decode):
1972         * Shared/mac/ObjCObjectGraphCoders.mm:
1973         (WebKit::ObjCObjectGraphDecoder::baseDecode):
1974         * Shared/mac/SandboxExtensionMac.mm:
1975         (WebKit::SandboxExtension::HandleArray::decode):
1976         * Shared/mac/SecItemRequestData.cpp:
1977         (WebKit::SecItemRequestData::decode):
1978         * Shared/mac/SecItemResponseData.cpp:
1979         (WebKit::SecItemResponseData::decode):
1980         * Shared/qt/ArgumentCodersQt.cpp:
1981         (CoreIPC::::decode):
1982         * Shared/qt/QtNetworkReplyData.cpp:
1983         (WebKit::QtNetworkReplyData::decode):
1984         * WebProcess/WebPage/DecoderAdapter.cpp:
1985         (WebKit::DecoderAdapter::decodeBool):
1986         (WebKit::DecoderAdapter::decodeUInt16):
1987         (WebKit::DecoderAdapter::decodeUInt32):
1988         (WebKit::DecoderAdapter::decodeUInt64):
1989         (WebKit::DecoderAdapter::decodeInt32):
1990         (WebKit::DecoderAdapter::decodeInt64):
1991         (WebKit::DecoderAdapter::decodeFloat):
1992         (WebKit::DecoderAdapter::decodeDouble):
1993
1994 2013-01-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1995
1996         [WK2] Adjust missing MessageID removals to fix build breaks
1997         https://bugs.webkit.org/show_bug.cgi?id=108276
1998
1999         Unreviewed to fix build breaks.
2000
2001         Some MessageID removals wasn't adjusted into ConnectionUnix.cpp and coordinated graphics.
2002
2003         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
2004         (CoreIPC::MessageInfo::MessageInfo):
2005         (CoreIPC::MessageInfo::setMessageBodyIsOutOfLine):
2006         (CoreIPC::MessageInfo::isMessageBodyIsOutOfLine):
2007         (CoreIPC::Connection::processMessage):
2008         (CoreIPC::Connection::sendOutgoingMessage):
2009         * UIProcess/WebPageProxy.cpp:
2010         (WebKit::WebPageProxy::didReceiveMessage):
2011         * UIProcess/WebProcessProxy.cpp:
2012         * WebProcess/WebPage/WebPage.cpp:
2013         (WebKit::WebPage::didReceiveMessage):
2014
2015 2013-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2016
2017         Unreviewed, rolling out r140983.
2018         http://trac.webkit.org/changeset/140983
2019         https://bugs.webkit.org/show_bug.cgi?id=108277
2020
2021         Unfortunately, this API has one last client (Requested by
2022         abarth on #webkit).
2023
2024         * Configurations/FeatureDefines.xcconfig:
2025
2026 2013-01-29  Anders Carlsson  <andersca@apple.com>
2027
2028         Remove MessageID parameter from Connection::sendMessage
2029         https://bugs.webkit.org/show_bug.cgi?id=108269
2030
2031         Reviewed by Sam Weinig.
2032
2033         * Platform/CoreIPC/Connection.cpp:
2034         (CoreIPC::Connection::sendMessage):
2035         (CoreIPC::Connection::sendSyncReply):
2036         (CoreIPC::Connection::sendSyncMessage):
2037         (CoreIPC::Connection::sendSyncMessageFromSecondaryThread):
2038         * Platform/CoreIPC/Connection.h:
2039         (Connection):
2040         (CoreIPC::Connection::send):
2041         (CoreIPC::Connection::sendSync):
2042         * Platform/CoreIPC/MessageSender.h:
2043         (CoreIPC::MessageSender::send):
2044         (CoreIPC::MessageSender::sendMessage):
2045         * Platform/CoreIPC/mac/ConnectionMac.cpp:
2046         (CoreIPC::Connection::open):
2047         * Shared/ChildProcessProxy.cpp:
2048         (WebKit::ChildProcessProxy::sendMessage):
2049         (WebKit::ChildProcessProxy::didFinishLaunching):
2050         * Shared/WebConnection.cpp:
2051         (WebKit::WebConnection::postMessage):
2052         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2053         (WebKit::InjectedBundle::postMessage):
2054         (WebKit::InjectedBundle::postSynchronousMessage):
2055
2056 2013-01-29  Anders Carlsson  <andersca@apple.com>
2057
2058         Stop generating the message kind enum
2059         https://bugs.webkit.org/show_bug.cgi?id=108258
2060
2061         Reviewed by Beth Dakin.
2062
2063         * Platform/CoreIPC/Connection.h:
2064         (CoreIPC::Connection::send):
2065         (CoreIPC::Connection::sendSync):
2066         (CoreIPC::Connection::waitForAndDispatchImmediately):
2067         * Platform/CoreIPC/MessageSender.h:
2068         (CoreIPC::MessageSender::send):
2069         * Scripts/webkit2/messages.py:
2070         (surround_in_condition):
2071         (message_to_struct_declaration):
2072         (generate_messages_header):
2073         * Scripts/webkit2/messages_unittest.py:
2074         * Scripts/webkit2/model.py:
2075         (Message.__init__):
2076         * Shared/ChildProcessProxy.h:
2077         (WebKit::ChildProcessProxy::send):
2078         * Shared/WebConnection.cpp:
2079         (WebKit::WebConnection::postMessage):
2080
2081 2013-01-29  Kiran Muppala  <cmuppala@apple.com>
2082
2083         Fix erroneous semicolon causing build failure: if statement has empty body [-Werror,-Wempty-body]
2084         https://bugs.webkit.org/show_bug.cgi?id=108241
2085
2086         Reviewed by Anders Carlsson.
2087
2088         * UIProcess/WebProcessProxy.cpp:
2089         (WebKit::WebProcessProxy::addExistingWebPage): Remove erroneous
2090         semicolon following the if condition.
2091
2092 2013-01-29  Anders Carlsson  <andersca@apple.com>
2093
2094         Remove almost everything from MessageID
2095         https://bugs.webkit.org/show_bug.cgi?id=108244
2096
2097         Reviewed by Beth Dakin.
2098
2099         * Platform/CoreIPC/MessageID.h:
2100         (CoreIPC::MessageID::MessageID):
2101         * Platform/CoreIPC/mac/ConnectionMac.cpp:
2102         (CoreIPC):
2103         (CoreIPC::Connection::sendOutgoingMessage):
2104         (CoreIPC::createMessageDecoder):
2105         (CoreIPC::Connection::receiveSourceEventHandler):
2106
2107 2013-01-29  Anders Carlsson  <andersca@apple.com>
2108
2109         Get rid of MessageID::is()
2110         https://bugs.webkit.org/show_bug.cgi?id=108234
2111
2112         Reviewed by Beth Dakin.
2113
2114         Add explicit message receiver name equality checks instead of using MessageID::is.
2115
2116         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2117         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
2118         (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage):
2119         * Platform/CoreIPC/MessageID.h:
2120         * PluginProcess/WebProcessConnection.cpp:
2121         (WebKit::WebProcessConnection::didReceiveMessage):
2122         (WebKit::WebProcessConnection::didReceiveSyncMessage):
2123         * Shared/mac/SecItemShim.cpp:
2124         (WebKit::SecItemShim::didReceiveMessageOnConnectionWorkQueue):
2125         * UIProcess/Network/NetworkProcessProxy.cpp:
2126         (WebKit::NetworkProcessProxy::didReceiveMessage):
2127         * UIProcess/WebContext.cpp:
2128         (WebKit::WebContext::didReceiveMessage):
2129         (WebKit::WebContext::didReceiveSyncMessage):
2130         * UIProcess/WebPageProxy.cpp:
2131         (WebKit::WebPageProxy::didReceiveMessage):
2132         (WebKit::WebPageProxy::didReceiveSyncMessage):
2133         * UIProcess/WebProcessProxy.cpp:
2134         (WebKit::WebProcessProxy::didReceiveMessage):
2135         (WebKit::WebProcessProxy::didReceiveSyncMessage):
2136         (WebKit::WebProcessProxy::didReceiveMessageOnConnectionWorkQueue):
2137         * UIProcess/mac/SecItemShimProxy.cpp:
2138         (WebKit::SecItemShimProxy::didReceiveMessageOnConnectionWorkQueue):
2139         * WebProcess/Network/NetworkProcessConnection.cpp:
2140         (WebKit::NetworkProcessConnection::didReceiveMessage):
2141         (WebKit::NetworkProcessConnection::didReceiveSyncMessage):
2142         * WebProcess/Plugins/PluginProcessConnection.cpp:
2143         (WebKit::PluginProcessConnection::didReceiveSyncMessage):
2144         * WebProcess/WebPage/EventDispatcher.cpp:
2145         (WebKit::EventDispatcher::didReceiveMessageOnConnectionWorkQueue):
2146         * WebProcess/WebPage/WebPage.cpp:
2147         (WebKit::WebPage::didReceiveMessage):
2148         * WebProcess/WebProcess.cpp:
2149         (WebKit::WebProcess::didReceiveMessage):
2150         (WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue):
2151
2152 2012-11-28  Jer Noble  <jer.noble@apple.com>
2153
2154         Allow clients to ask for the WebView/WKView placeholder view when in full screen mode.
2155         https://bugs.webkit.org/show_bug.cgi?id=103558
2156         <rdar://problem/12763112>
2157
2158         Reviewed by Benjamin Poulain.
2159
2160         Clients may want to behave differently when their WebView/WKView has been swapped out by a placeholder
2161         view when in full screen mode.  Add a simple accessor for the existing placeholder view to
2162         WKFullScreenWindowController and WKView.
2163
2164         * UIProcess/API/mac/WKView.mm:
2165         (-[WKView fullScreenPlaceholderView]): Added simple accessor.
2166         * UIProcess/API/mac/WKViewPrivate.h:
2167         * UIProcess/mac/WKFullScreenWindowController.h:
2168         * UIProcess/mac/WKFullScreenWindowController.mm:
2169         (-[WKFullScreenWindowController webViewPlaceholder]): Added simple accessor.
2170
2171 2013-01-29  Huang Dongsung  <luxtella@company100.net>
2172
2173         [WK2] Call LayerTreeHost::deviceOrPageScaleFactorChanged() when a device or page scale factor is changed.
2174         https://bugs.webkit.org/show_bug.cgi?id=107802
2175
2176         Reviewed by Simon Fraser.
2177
2178         Currently, LayerTreeHostMac and *GTK call deviceOrPageScaleFactorChanged()
2179         of the non compositing GraphicsLayer when a device scale factor is changed.
2180
2181         There are two problems.
2182         1. We don't notify LayerTreeHost when a page scale factor is changed.
2183         2. When using TiledCoreAnimationDrawingAreaProxy, LayerTreeHostMac does
2184         not receive the device scale factor changed callback.
2185
2186         So this patch changes three points.
2187         1. Rename from deviceScaleFactorDidChange() to deviceOrPageScaleFactorChanged()
2188         in LayerTreeHost.
2189         2. WebPage::setDeviceScaleFactor() calls LayerTreeHost::deviceScaleFactorDidChange()
2190         because of dealing with TiledCoreAnimationDrawingAreaProxy.
2191         3. WebPage::pageScaleFactor() calls LayerTreeHost::deviceScaleFactorDidChange()
2192         to call deviceOrPageScaleFactorChanged() of the non compositing GraphicsLayer.
2193
2194         Unfortunately, I couldn't think of a way to test this in an automated fashion.
2195
2196         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2197         (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
2198         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2199         (WebKit::DrawingAreaImpl::updateBackingStoreState):
2200             Don't call LayerTreeHost::deviceScaleFactorDidChange() because this
2201             method calls WebPage::setDeviceScaleFactor() and then
2202             LayerTreeHost::deviceScaleFactorDidChange() is called.
2203         * WebProcess/WebPage/LayerTreeHost.h:
2204         (LayerTreeHost):
2205         * WebProcess/WebPage/WebPage.cpp:
2206         (WebKit::WebPage::scalePage):
2207         (WebKit::WebPage::setDeviceScaleFactor):
2208         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2209         (WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged):
2210         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2211         (LayerTreeHostGtk):
2212         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
2213         (LayerTreeHostMac):
2214         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
2215         (WebKit::LayerTreeHostMac::deviceOrPageScaleFactorChanged):
2216
2217 2013-01-29  Anders Carlsson  <andersca@apple.com>
2218
2219         Get rid of MessageID::get()
2220         https://bugs.webkit.org/show_bug.cgi?id=108235
2221
2222         Reviewed by Beth Dakin.
2223
2224         Just check for the message receiver name and message name explicitly instead.
2225
2226         * Platform/CoreIPC/MessageID.h:
2227         (CoreIPC::MessageID::is):
2228         * Shared/CoreIPCSupport/WebContextMessageKinds.h:
2229         (WebContextLegacyMessage::messageReceiverName):
2230         (WebContextLegacyMessage):
2231         (WebContextLegacyMessage::postMessageMessageName):
2232         (WebContextLegacyMessage::postSynchronousMessageMessageName):
2233         * UIProcess/WebContext.cpp:
2234         (WebKit::WebContext::didReceiveMessage):
2235         (WebKit::WebContext::didReceiveSyncMessage):
2236
2237 2013-01-29  Kiran Muppala  <cmuppala@apple.com>
2238
2239         Add support for enabling process suppression in WebProcesses with no visible pages
2240         https://bugs.webkit.org/show_bug.cgi?id=108054
2241
2242         Reviewed by Anders Carlsson.
2243
2244         Provide a preference to enable process suppression in WebProcesses with
2245         no visible pages even if the application is not completely occluded.
2246         This provides more opportunities for process suppression to take effect.
2247
2248         Replace the messaging of application occlusion status from UI process to
2249         ChildProcesses with messages that indicate the current required process
2250         suppression state.  WebProcessProxy should determine if the process is
2251         eligible for process suppression based on both application occlusion
2252         and page visibility.  When either of these parameters changes,
2253         the proxy should message the child process of the updated process
2254         suppression state.
2255
2256         * NetworkProcess/NetworkProcess.messages.in: Rename
2257         SetApplicationIsOccluded to SetProcessSuppressionEnabled.
2258         * PluginProcess/PluginProcess.messages.in: Ditto.
2259         * Shared/ChildProcess.h: 
2260         (WebKit::ChildProcess::processSuppressionEnabled): Rename
2261         applicationIsOccluded.
2262         * Shared/WebPreferencesStore.h: Add a new preference
2263         pageVisibilityBasedProcessSuppressionEnabled, to enabled/disable
2264         process suppression of WebProcesses when all pages are hidden.
2265         * Shared/mac/ChildProcessMac.mm:
2266         (WebKit::ChildProcess::setProcessSuppressionEnabled): Rename
2267         setApplicationIsOccluded.
2268         (WebKit::ChildProcess::platformInitialize): Replace call to
2269         setApplicationIsOccluded with setProcessSuppressionEnabled.
2270         * SharedWorkerProcess/SharedWorkerProcess.messages.in: Rename
2271         SetApplicationIsOccluded to SetProcessSuppressionEnabled.
2272         * UIProcess/API/C/WKPreferences.cpp:
2273         (WKPreferencesSetPageVisibilityBasedProcessSuppressionEnabled):
2274         (WKPreferencesGetPageVisibilityBasedProcessSuppressionEnabled):
2275         * UIProcess/API/C/WKPreferencesPrivate.h:
2276         * UIProcess/Network/NetworkProcessProxy.cpp:
2277         (WebKit::NetworkProcessProxy::didFinishLaunching): Use setter
2278         to update process suppression state instead of messaging directly.
2279         Use WebContext::canEnableProcessSuppressionForNetworkProcess() helper
2280         method to determine if process suppression should be enabled.
2281         * UIProcess/Network/NetworkProcessProxy.h: Rename
2282         setApplicationIsOccluded to setProcessSuppresionEnabled.
2283         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
2284         (WebKit::NetworkProcessProxy::setProcessSuppressionEnabled): Ditto.
2285         * UIProcess/Plugins/PluginProcessManager.h: Ditto.
2286         * UIProcess/Plugins/PluginProcessProxy.cpp:
2287         (WebKit::PluginProcessProxy::didFinishLaunching): Use setter
2288         to update process suppression state instead of messaging directly.
2289         Use WebContext::canEnableProcessSuppressionForGlobalChildProcesses()
2290         helper method to determine if process suppression should be enabled.
2291         * UIProcess/Plugins/PluginProcessProxy.h: Rename
2292         setApplicationIsOccluded to setProcessSuppresionEnabled.
2293         * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
2294         (WebKit::PluginProcessManager::setProcessSuppressionEnabled): Ditto.
2295         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2296         (WebKit::PluginProcessProxy::setProcessSuppressionEnabled): Ditto.
2297         * UIProcess/SharedWorkers/SharedWorkerProcessManager.h: Ditto.
2298         * UIProcess/SharedWorkers/SharedWorkerProcessProxy.cpp:
2299         (WebKit::SharedWorkerProcessProxy::didFinishLaunching): Use setter
2300         to update process suppression state instead of messaging directly.
2301         Use WebContext::canEnableProcessSuppressionForGlobalChildProcesses()
2302         helper method to determine if process suppression should be enabled.
2303         * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h: Rename
2304         setApplicationIsOccluded to setProcessSuppresionEnabled.
2305         * UIProcess/SharedWorkers/mac/SharedWorkerProcessManagerMac.mm:
2306         (WebKit::SharedWorkerProcessManager::setProcessSuppressionEnabled):
2307         Ditto.
2308         * UIProcess/SharedWorkers/mac/SharedWorkerProcessProxyMac.mm:
2309         (WebKit::SharedWorkerProcessProxy::setProcessSuppressionEnabled): Ditto.
2310         * UIProcess/WebContext.h: Replace applicationIsOccluded() getter with
2311         helper methods to determine if a child process can have process
2312         suppression enabled.
2313         * UIProcess/WebPageProxy.cpp:
2314         (WebKit::WebPageProxy::viewStateDidChange): Notify WebProcessProxy of
2315         page visibility change.
2316         (WebKit::WebPageProxy::preferencesDidChange): Notify WebProcessProxy of
2317         change in preferences.
2318         * UIProcess/WebProcessProxy.cpp:
2319         (WebKit::WebProcessProxy::WebProcessProxy): Initialize member variable
2320         tracking process suppression state to false.
2321         (WebKit::WebProcessProxy::createWebPage): Update set of pages which can
2322         be process suppressed and the resulting process suppression state for
2323         the child process.
2324         (WebKit::WebProcessProxy::addExistingWebPage): Ditto.
2325         (WebKit::WebProcessProxy::removeWebPage): Ditto.
2326         (WebKit::WebProcessProxy::pageVisibilityChanged): Ditto.
2327         (WebKit::WebProcessProxy::pagePreferencesChanged): Ditto.
2328         (WebKit::WebProcessProxy::didFinishLaunching): Call
2329         updateProcessSuppressionState().
2330         * UIProcess/WebProcessProxy.h:
2331         * UIProcess/mac/WebContextMac.mm:
2332         (WebKit::updateProcessSuppressionStateOfGlobalChildProcesses): Use new
2333         helper method canEnableProcessSuppressionForGlobalChildProcesses() to
2334         determine if process suppression should be enabled.
2335         (WebKit::applicationOcclusionStateChanged): Update renamed methods
2336         and variables.
2337         (WebKit::enableOcclusionNotifications): Move OmitProcessSuppression
2338         user default check into canEnableProcessSuppression methods.
2339         (WebKit::omitProcessSuppression):
2340         (WebKit::WebContext::updateProcessSuppressionStateOfChildProcesses):
2341         Use new helper method canEnableProcessSuppressionForNetworkProcess() to
2342         determine if process suppression should be enabled for NetworkProcess.
2343         Let WebProcess update process suppression state based on application
2344         occlusion state and page visibility.
2345         (WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess):
2346         (WebKit::WebContext::canEnableProcessSuppressionForWebProcess):
2347         (WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses):
2348         (WebKit::WebContext::processSuppressionEnabledChanged): Reevaluate if
2349         process suppression is enabled for all contexts and update process
2350         suppression state of global child processes.
2351         * UIProcess/mac/WebProcessProxyMac.mm:
2352         (WebKit::WebProcessProxy::pageIsProcessSuppressible):
2353         (WebKit::WebProcessProxy::allPagesAreProcessSuppressible):
2354         (WebKit::WebProcessProxy::updateProcessSuppressionState):
2355         * WebProcess/WebProcess.messages.in:
2356
2357 2013-01-29  Anders Carlsson  <andersca@apple.com>
2358
2359         Start using the message flag in MessageEncoder/MessageDecoder
2360         https://bugs.webkit.org/show_bug.cgi?id=108227
2361
2362         Reviewed by Beth Dakin.
2363
2364         Stop using the flags in MessageID and store the flags directly in the message instead.
2365         This is another step towards eliminating MessageID.
2366
2367         * Platform/CoreIPC/Connection.cpp:
2368         (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
2369         (CoreIPC::Connection::createSyncMessageEncoder):
2370         (CoreIPC::Connection::sendMessage):
2371         (CoreIPC::Connection::sendSyncMessage):
2372         (CoreIPC::Connection::sendSyncMessageFromSecondaryThread):
2373         (CoreIPC::Connection::dispatchSyncMessage):
2374         (CoreIPC::Connection::dispatchMessage):
2375         * Platform/CoreIPC/Connection.h:
2376         * Platform/CoreIPC/MessageDecoder.cpp:
2377         (CoreIPC::MessageDecoder::MessageDecoder):
2378         (CoreIPC::MessageDecoder::isSyncMessage):
2379         (CoreIPC):
2380         (CoreIPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply):
2381         * Platform/CoreIPC/MessageDecoder.h:
2382         (MessageDecoder):
2383         * Platform/CoreIPC/MessageEncoder.cpp:
2384         (CoreIPC):
2385         (CoreIPC::MessageEncoder::MessageEncoder):
2386         (CoreIPC::MessageEncoder::~MessageEncoder):
2387         (CoreIPC::MessageEncoder::setIsSyncMessage):
2388         (CoreIPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply):
2389         * Platform/CoreIPC/MessageEncoder.h:
2390         (MessageEncoder):
2391         * Platform/CoreIPC/MessageFlags.h: Copied from Source/WebKit2/Platform/CoreIPC/MessageEncoder.h.
2392         (CoreIPC):
2393         * Platform/CoreIPC/MessageID.h:
2394         * WebKit2.xcodeproj/project.pbxproj:
2395
2396 2013-01-29  Anders Carlsson  <andersca@apple.com>
2397
2398         Encode/decode message send flags in the message
2399         https://bugs.webkit.org/show_bug.cgi?id=108208
2400
2401         Reviewed by Beth Dakin.
2402
2403         This is another step towards getting rid of MessageID.
2404
2405         * Platform/CoreIPC/ArgumentDecoder.cpp:
2406         (CoreIPC::ArgumentDecoder::decodeUInt8):
2407         (CoreIPC):
2408         * Platform/CoreIPC/ArgumentDecoder.h:
2409         (ArgumentDecoder):
2410         (CoreIPC::ArgumentDecoder::decode):
2411         (CoreIPC):
2412         * Platform/CoreIPC/ArgumentEncoder.cpp:
2413         (CoreIPC::ArgumentEncoder::encode):
2414         (CoreIPC):
2415         * Platform/CoreIPC/ArgumentEncoder.h:
2416         (ArgumentEncoder):
2417         * Platform/CoreIPC/Connection.cpp:
2418         (CoreIPC::Connection::sendMessage):
2419         * Platform/CoreIPC/MessageDecoder.cpp:
2420         (CoreIPC::MessageDecoder::MessageDecoder):
2421         * Platform/CoreIPC/MessageDecoder.h:
2422         (CoreIPC::MessageDecoder::messageSendFlags):
2423         (MessageDecoder):
2424         * Platform/CoreIPC/MessageEncoder.cpp:
2425         (CoreIPC):
2426         (CoreIPC::MessageEncoder::MessageEncoder):
2427         (CoreIPC::MessageEncoder::~MessageEncoder):
2428         (CoreIPC::MessageEncoder::setMessageSendFlags):
2429         * Platform/CoreIPC/MessageEncoder.h:
2430         (MessageEncoder):
2431         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
2432         (CoreIPC):
2433
2434 2013-01-29  Mario Sanchez Prada  <mario.prada@samsung.com>
2435
2436         [GTK] Missing build flags when building with Harfbuzz
2437         https://bugs.webkit.org/show_bug.cgi?id=108174
2438
2439         Reviewed by Martin Robinson.
2440
2441         Add FREETYPE_CFLAGS and FREETYPE_LIBS to makefiles so -lharfbuzz
2442         parameter will be added to linking lines when needed.
2443
2444         * GNUmakefile.am: Added FREETYPE_CFLAGS and FREETYPE_LIBS.
2445         * UIProcess/API/gtk/tests/GNUmakefile.am: Ditto.
2446
2447 2013-01-29  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2448
2449         [EFL] Unified text checker implementation.
2450         https://bugs.webkit.org/show_bug.cgi?id=107682
2451
2452         Reviewed by Anders Carlsson.
2453
2454         * UIProcess/efl/TextCheckerEfl.cpp:
2455         (WebKit):
2456         (WebKit::TextChecker::checkTextOfParagraph):
2457         Allow to check spelling for multiple words,
2458         their misspelling location and length are saved to the vector.
2459
2460         * WebProcess/WebCoreSupport/WebEditorClient.h:
2461         * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
2462         (WebKit::WebEditorClient::checkTextOfParagraph):
2463         (WebKit):
2464         As spelling implementation is exposed to UIProcess,
2465         send a meesage to UIProcess to call TextChecker::checkTextOfParagraph.
2466
2467 2013-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2468
2469         [GTK] Add API to prefetch DNS of a given hostname to WebKit2 GTK+ API
2470         https://bugs.webkit.org/show_bug.cgi?id=99695
2471
2472         Reviewed by Anders Carlsson.
2473
2474         * UIProcess/API/gtk/WebKitWebContext.cpp:
2475         (webkit_web_context_prefetch_dns): Public method to resolve the
2476         domain name in advance for the given hostname.
2477         * UIProcess/API/gtk/WebKitWebContext.h:
2478         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add
2479         webkit_web_context_prefetch_dns.
2480         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
2481         (webkitWebExtensionDidReceiveMessage): Parse PrefetchDNS message
2482         and call WebCore::prefetchDNS() with the given hostname.
2483         (didReceiveMessage): Call webkitWebExtensionDidReceiveMessage().
2484         (webkitWebExtensionCreate): Add implementation for
2485         didReceiveMessage callback.
2486
2487 2013-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2488
2489         [GTK] Implement resources API using injected bundle
2490         https://bugs.webkit.org/show_bug.cgi?id=107457
2491
2492         Reviewed by Sam Weinig.
2493
2494         The ResourceLoaderClient was removed from the UI process in
2495         r140285, and most of the GTK+ API depends on resources. This patch
2496         implements the same API using the ResourceLoaderClient from
2497         injected bundle. It fixes the resources unit tests, as well as
2498         other 14 unit tests that are timing out because they depend on
2499         resource API.
2500
2501         * GNUmakefile.list.am: Add new files to compilation.
2502         * Shared/UserMessageCoders.h:
2503         (WebKit::UserMessageEncoder::baseEncode): Add support for encoding
2504         WebURLResponse and WebError objects in user messages.
2505         (WebKit::UserMessageDecoder::baseDecode): Add support for decoding
2506         WebURLResponse and WebError objects from user messages.
2507         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp: Added.
2508         (didReceiveWebViewMessageFromInjectedBundle): Handle messages sent
2509         to the WebView. For now it hanldes all the sresource loader client
2510         messages.
2511         (didReceiveMessageFromInjectedBundle): Handle messages received
2512         from injected bundle.
2513         (attachInjectedBundleClientToContext): Initialize the injected
2514         bundle client.
2515         * UIProcess/API/gtk/WebKitInjectedBundleClient.h: Added.
2516         * UIProcess/API/gtk/WebKitWebContext.cpp:
2517         (_WebKitWebContextPrivate): Add a HashMap to map page IDs to
2518         WebKitWebViews.
2519         (createDefaultWebContext): Call
2520         attachInjectedBundleClientToContext() to intialize the injected
2521         bundle client.
2522         (webkitWebContextCreatePageForWebView): Use
2523         webkitWebViewBaseCreateWebPage() to create and initialize a new
2524         WebPageProxy and map the newly created page with the given
2525         WebKitWebView.
2526         (webkitWebContextWebViewDestroyed): Called when the given
2527         WebKitWebView is being destroyed to remove it from the views map.
2528         (webkitWebContextGetWebViewForPage): Returns the WebKitWebView
2529         associated to the given page ID.
2530         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
2531         * UIProcess/API/gtk/WebKitWebView.cpp:
2532         (webkitWebViewConstructed): Use
2533         webkitWebContextCreatePageForWebView() instead of
2534         webkitWebViewBaseCreateWebPage() directly.
2535         (webkitWebViewDispose): Call webkitWebContextWebViewDestroyed() to
2536         notify the context.
2537         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
2538         (didInitiateLoadForResource): Send a message to the UI process
2539         with the callback parameters encoded.
2540         (willSendRequestForFrame): Ditto.
2541         (didReceiveResponseForResource): Ditto.
2542         (didReceiveContentLengthForResource): Ditto.
2543         (didFinishLoadForResource): Ditto.
2544         (didFailLoadForResource): Ditto.
2545         (webkitWebPageCreate): Initialize the
2546         WKBundlePageResourceLoadClient.
2547
2548 2013-01-29  Laszlo Gombos  <l.gombos@samsung.com>
2549
2550         [Qt] Remove misspelled ENABLE(SPEECH_INPUT) guard
2551         https://bugs.webkit.org/show_bug.cgi?id=105683
2552
2553         Reviewed by Simon Hausmann.
2554
2555         The ENABLE(SPEECH_INPUT) guard is only used in one location
2556         in the source tree and as such it is always 0.
2557
2558         I believe that this guard is a left over and is not needed any more
2559         as the code guarded is not guarded anywhere else.
2560
2561         * WebProcess/qt/WebProcessQt.cpp:
2562         (WebKit::WebProcess::platformInitializeWebProcess):
2563
2564 2013-01-29  Zan Dobersek  <zdobersek@igalia.com>
2565
2566         Unreviewed build fix after r141024.
2567         Adding new files to the build.
2568
2569         * GNUmakefile.am:
2570         * GNUmakefile.list.am:
2571
2572 2013-01-29  Jinwoo Song  <jinwoo7.song@samsung.com>
2573
2574         [WK2] Fix unused parameter build warning
2575         https://bugs.webkit.org/show_bug.cgi?id=108156
2576
2577         Reviewed by Kentaro Hara.
2578
2579         Comment out the unused parameters to fix the build warnings.
2580
2581         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2582         * WebProcess/Plugins/PluginProxy.h:
2583
2584 2013-01-28  Jae Hyun Park  <jae.park@company100.net>
2585
2586         [Qt] Build fix
2587         https://bugs.webkit.org/show_bug.cgi?id=108142
2588
2589         Reviewed by Gyuyoung Kim.
2590
2591         Build fix. Though StorageManager was added to WK2 in r141024,
2592         it is not added to Target.pri for qt port.
2593
2594         * Target.pri:
2595
2596 2013-01-28  Huang Dongsung  <luxtella@company100.net>
2597
2598         Coordinated Graphics: Refactor code related to debug border and repaint count.
2599         https://bugs.webkit.org/show_bug.cgi?id=107910
2600
2601         Reviewed by Noam Rosenthal.
2602
2603         There are two big changes:
2604         1. CoordinatedGraphicsLayer sends debugging visuals to UI Process.
2605         2. When updating a backing store, increment a repaint count.
2606
2607         In addition, we don't use QT_WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS
2608         environment. EFL, GTK and QT will use WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS
2609         after http://webkit.org/b/107198.
2610
2611         * Shared/CoordinatedGraphics/CoordinatedLayerInfo.h:
2612         (WebKit::CoordinatedLayerInfo::CoordinatedLayerInfo):
2613         (CoordinatedLayerInfo):
2614         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
2615         (WebKit::CoordinatedBackingStore::removeAllTiles):
2616         (WebKit::CoordinatedBackingStore::updateTile):
2617         (WebKit::CoordinatedBackingStore::texture):
2618         (WebKit::CoordinatedBackingStore::paintTilesToTextureMapper):
2619         (WebKit::CoordinatedBackingStore::adjustedTransformForRect):
2620         (WebKit::CoordinatedBackingStore::paintToTextureMapper):
2621         (WebKit):
2622         (WebKit::CoordinatedBackingStore::drawBorder):
2623             Override TextureMapperPlatformLayer::drawBorder() to draw the border
2624             for each tile.
2625         (WebKit::CoordinatedBackingStore::drawRepaintCounter):
2626         (WebKit::CoordinatedBackingStore::commitTileOperations):
2627         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
2628         (WebKit::CoordinatedBackingStoreTile::CoordinatedBackingStoreTile):
2629         (CoordinatedBackingStoreTile):
2630         (CoordinatedBackingStore):
2631         (WebKit::CoordinatedBackingStore::rect):
2632         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
2633         (WebKit::CoordinatedLayerTreeHostProxy::setLayerRepaintCount):
2634         (WebKit):
2635         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
2636         (CoordinatedLayerTreeHostProxy):
2637         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
2638         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
2639         (WebKit::LayerTreeRenderer::setLayerRepaintCount):
2640         (WebKit):
2641         (WebKit::LayerTreeRenderer::setLayerState):
2642         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
2643         (LayerTreeRenderer):
2644         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2645         (WebCore::CoordinatedGraphicsLayer::setShowDebugBorder):
2646         (WebCore):
2647         (WebCore::CoordinatedGraphicsLayer::setShowRepaintCounter):
2648         (WebCore::CoordinatedGraphicsLayer::syncLayerState):
2649         (WebCore::CoordinatedGraphicsLayer::setDebugBorder):
2650         (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintEnd):
2651         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
2652         (CoordinatedGraphicsLayerClient):
2653         (CoordinatedGraphicsLayer):
2654         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2655         (WebKit::CoordinatedLayerTreeHost::setLayerRepaintCount):
2656         (WebKit):
2657         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2658
2659 2013-01-28  Sam Weinig  <sam@webkit.org>
2660
2661         Remove support from ArgumentEncoder for deprecated encode functions
2662         https://bugs.webkit.org/show_bug.cgi?id=108155
2663
2664         Reviewed by Dan Bernstein.
2665
2666         * Platform/CoreIPC/ArgumentEncoder.h:
2667         (CoreIPC::ArgumentEncoder::encode):
2668
2669 2013-01-28  Sam Weinig  <sam@webkit.org>
2670
2671         Disable default use of the Plug-in XPCService until we can
2672         figure out how to deal with the 32-bit one.
2673
2674         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2675         (WebKit::shouldUseXPC):
2676         (WebKit::PluginProcessProxy::platformInitializeLaunchOptions):
2677
2678 2013-01-28  Sam Weinig  <sam@webkit.org>
2679
2680         Plug-ins should initialize their sandbox at creation time
2681         https://bugs.webkit.org/show_bug.cgi?id=108098
2682
2683         Reviewed by Anders Carlsson.
2684
2685         Add the ability to add string key/value pairs to process creation parameters
2686         to allow the plugin process to get passed the plugin path which in turn allows
2687         the plugin to initialize its sandbox at the correct time.
2688
2689         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/NetworkServiceMain.Development.mm:
2690         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm:
2691         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
2692         (NetworkServiceInitializer):
2693         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
2694         (WebKit::PluginProcessMainDelegate::getExtraData):
2695         (PluginProcessMainDelegate):
2696         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32/PluginService.32.Main.mm:
2697         * PluginProcess/EntryPoint/mac/XPCService/PluginService.64/PluginService.64.Main.mm:
2698         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/PluginService.Development.Main.mm:
2699         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
2700         (WebKit):
2701         (PluginServiceInitializerDelegate):
2702         (WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
2703         (WebKit::PluginServiceInitializerDelegate::getExtraData):
2704         (PluginServiceInitializer):
2705         * PluginProcess/PluginProcess.cpp:
2706         (WebKit::PluginProcess::initializeProcess):
2707         (WebKit::PluginProcess::initializePluginProcess):
2708         (WebKit::PluginProcess::initializeProcessName):
2709         (WebKit::PluginProcess::initializeSandbox):
2710         * PluginProcess/PluginProcess.h:
2711         * PluginProcess/mac/PluginProcessMac.mm:
2712         (WebKit::PluginProcess::platformInitializePluginProcess):
2713         (WebKit::PluginProcess::platformInitializeProcess):
2714         (WebKit::PluginProcess::initializeProcessName):
2715         (WebKit::PluginProcess::initializeSandbox):
2716         * Shared/ChildProcess.h:
2717         (ChildProcessInitializationParameters):
2718         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.h:
2719         (ChildProcessMainDelegate):
2720         (WebKit::ChildProcessMain):
2721         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm:
2722         (WebKit::ChildProcessMainDelegate::getExtraData):
2723         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.Development.h:
2724         (WebKit::XPCServiceEventHandler):
2725         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.h:
2726         (WebKit::XPCServiceEventHandler):
2727         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: Added.
2728         (XPCServiceInitializerDelegate):
2729         (WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
2730         (WebKit::XPCServiceInitializer):
2731         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm: Added.
2732         (WebKit::XPCServiceInitializerDelegate::~XPCServiceInitializerDelegate):
2733         (WebKit::XPCServiceInitializerDelegate::getConnectionIdentifier):
2734         (WebKit::XPCServiceInitializerDelegate::getClientIdentifier):
2735         (WebKit::XPCServiceInitializerDelegate::getClientProcessName):
2736         (WebKit::XPCServiceInitializerDelegate::getExtraData):
2737         * Shared/Plugins/PluginProcessCreationParameters.cpp:
2738         (WebKit::PluginProcessCreationParameters::encode):
2739         (WebKit::PluginProcessCreationParameters::decode):
2740         * Shared/Plugins/PluginProcessCreationParameters.h:
2741         (PluginProcessCreationParameters):
2742         * UIProcess/Launcher/ProcessLauncher.h:
2743         (LaunchOptions):
2744         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2745         (WebKit::connectToService):
2746         (WebKit::connectToReExecService):
2747         (WebKit::createService):
2748         (WebKit::createProcess):
2749         (WebKit::ProcessLauncher::launchProcess):
2750         * UIProcess/Plugins/PluginProcessProxy.cpp:
2751         (WebKit::PluginProcessProxy::didFinishLaunching):
2752         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2753         (WebKit::PluginProcessProxy::platformInitializeLaunchOptions):
2754         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
2755         * WebKit2.xcodeproj/project.pbxproj:
2756         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/WebContentServiceMain.Development.mm:
2757         * WebProcess/EntryPoint/mac/XPCService/WebContentService/WebContentServiceMain.mm:
2758         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
2759         (WebContentServiceInitializer):
2760
2761 2013-01-28  Kiran Muppala  <cmuppala@apple.com>
2762
2763         Add window occlusion criteria to determine page visibility on Mac
2764         https://bugs.webkit.org/show_bug.cgi?id=107494
2765
2766         Reviewed by Simon Fraser.
2767
2768         * UIProcess/API/mac/PageClientImpl.mm:
2769         (WebKit::PageClientImpl::isViewVisible): Add window occlusion check.
2770         * UIProcess/API/mac/WKView.mm:
2771         (-[WKView dealloc]): Remove self from the all views vector.
2772         (-[WKView addWindowObserversForWindow:]): Register observer for
2773         NSWindowWillOrderOffScreenNotification.
2774         (-[WKView removeWindowObservers]): Unregister observer for
2775         NSWindowWillOrderOffScreenNotification.
2776         (-[WKView viewWillMoveToWindow:]): Disable occlusion notifications.
2777         (-[WKView viewDidMoveToWindow]): Enable occlusion notifications.
2778         (-[WKView _windowWillOrderOffScreen:]): Disable occlusion notifications.
2779         (-[WKView _windowDidOrderOnScreen:]): Enable occlusion notifications.
2780         This notification ensures that occlusion notifications are registered
2781         correctly even if the NSWindow object is assigned a window number after
2782         the viewDidMoveToWindow notification has been received.  This occurs
2783         for instance during application launch.
2784         (-[WKView _setIsWindowOccluded:]):
2785         (-[WKView _enableWindowOcclusionNotifications]):
2786         (-[WKView _disableWindowOcclusionNotifications]):
2787         (windowBecameVisible):
2788         (windowBecameOccluded):
2789         (+[WKView _registerWindowOcclusionNotificationHandlers]):
2790         (+[WKView _unregisterWindowOcclusionNotificationHandlers]):
2791         (+[WKView _allViews]):
2792         (-[WKView _isWindowOccluded]):
2793         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Add
2794         self to the all views vector.
2795         * UIProcess/API/mac/WKViewInternal.h:
2796
2797 2013-01-28  Huang Dongsung  <luxtella@company100.net>
2798
2799         [TexMap] Enable debug borders and repaint counter via Settings.
2800         https://bugs.webkit.org/show_bug.cgi?id=107198
2801
2802         Reviewed by Benjamin Poulain.
2803
2804         Currently, if the environment variable WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS
2805         is set to 1, only CoordinatedBacking shows debug borders and repaint counter.
2806
2807         This patch makes the environment variable change Settings.
2808
2809         In addition, Qt uses WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS instead of
2810         QT_WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS from now.
2811
2812         After Bug 105787, all backing stores and platform layers in TextureMapper can
2813         show debug borders and repaint counter.
2814
2815         * UIProcess/API/efl/EwkView.cpp:
2816         (EwkView::EwkView):
2817         * UIProcess/API/gtk/WebKitSettings.cpp:
2818         (webKitSettingsSetProperty):
2819         * UIProcess/API/qt/qquickwebview.cpp:
2820         (QQuickWebViewPrivate::initialize):
2821
2822 2013-01-28  Anders Carlsson  <andersca@apple.com>
2823
2824         Move Mach port handling from WorkQueue to Connection
2825         https://bugs.webkit.org/show_bug.cgi?id=108140
2826
2827         Reviewed by Sam Weinig.
2828
2829         Instead of having WorkQueue know about Mach port sources, just fold that
2830         functionality directly into Connection. This lets us get rid of the generic source
2831         handling from WorkQueue.
2832
2833         * Platform/CoreIPC/Connection.h:
2834         (Connection):
2835         * Platform/CoreIPC/mac/ConnectionMac.cpp:
2836         (CoreIPC::Connection::platformInvalidate):
2837         (CoreIPC::createDataAvailableSource):
2838         (CoreIPC):
2839         (CoreIPC::Connection::open):
2840         (CoreIPC::Connection::initializeDeadNameSource):
2841         * Platform/WorkQueue.h:
2842         (WorkQueue::dispatchQueue):
2843         (WorkQueue):
2844         * Platform/mac/WorkQueueMac.cpp:
2845         (WorkQueue::platformInvalidate):
2846
2847 2013-01-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2848
2849         Add StorageManager class to cmake ports
2850
2851         Unreviewed build fix. Though StorageManager was added to WK2 in r141024,
2852         it is not added to cmake ports(EFL).
2853
2854         * CMakeLists.txt:
2855         * PlatformEfl.cmake:
2856
2857 2013-01-28  Sam Weinig  <sam@webkit.org>
2858
2859         <rdar://problem/13098777>
2860         Add (allow mach-lookup (global-name "com.apple.tccd.system"))
2861
2862         Reviewed by Maciej Stachowiak.
2863
2864         * WebProcess/com.apple.WebProcess.sb.in:
2865
2866 2013-01-28  Brady Eidson  <beidson@apple.com>
2867
2868         WebKit2 should notify the client if the NetworkProcess crashes.
2869         <rdar://problem/13090513> and https://bugs.webkit.org/show_bug.cgi?id=108126
2870
2871         Reviewed by Sam Weinig.
2872
2873         Add new client callback to the ContextClient:
2874         * UIProcess/API/C/WKContext.h:
2875         * UIProcess/WebContextClient.cpp:
2876         (WebKit::WebContextClient::networkProcessDidCrash):
2877         * UIProcess/WebContextClient.h:
2878
2879         Call out to the client when the NetworkProcess crashes:
2880         * UIProcess/WebContext.cpp:
2881         (WebKit::WebContext::networkProcessCrashed):
2882         * UIProcess/WebContext.h:
2883
2884         * UIProcess/Network/NetworkProcessProxy.cpp:
2885         (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
2886
2887 2013-01-28  Pratik Solanki  <psolanki@apple.com>
2888
2889         PLATFORM(IOS) should come before __MAC_OS_X_VERSION_MIN_REQUIRED
2890         https://bugs.webkit.org/show_bug.cgi?id=108101
2891
2892         Reviewed by Benjamin Poulain.
2893
2894         Since iOS does not define __MAC_OS_X_VERSION_MIN_REQUIRED, any usage of
2895         __MAC_OS_X_VERSION_MIN_REQUIRED should be after a PLATFORM(IOS) check.
2896
2897         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2898         (InitWebCoreSystemInterface):
2899
2900 2013-01-28  Anders Carlsson  <andersca@apple.com>
2901
2902         Add StorageManager class
2903         https://bugs.webkit.org/show_bug.cgi?id=108127
2904
2905         Reviewed by Sam Weinig.
2906
2907         The StorageManager will be in charge of handling access to local and session storage
2908         in the UI process.
2909
2910         * UIProcess/Storage/StorageManager.cpp: Added.
2911         * UIProcess/Storage/StorageManager.h: Added.
2912         * WebKit2.xcodeproj/project.pbxproj:
2913
2914 2013-01-28  Anders Carlsson  <andersca@apple.com>
2915
2916         More work on UI side local storage
2917         https://bugs.webkit.org/show_bug.cgi?id=108119
2918
2919         Reviewed by Beth Dakin.
2920
2921         * WebKit2.xcodeproj/project.pbxproj:
2922         * WebProcess/Storage/StorageNamespaceProxy.cpp:
2923         (WebKit::StorageNamespaceProxy::createSessionStorageNamespace):
2924         Rename create to createSessionStorageNamespace and make it take a WebPage.
2925
2926         (WebKit::StorageNamespaceProxy::StorageNamespaceProxy):
2927         Add WebPage parameter.
2928     
2929         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2930         (WebKit::WebPlatformStrategies::sessionStorageNamespace):
2931         Add an #ifdef for enabling UI side storage.
2932         
2933         * WebProcess/WebPage/WebFrame.cpp:
2934         (WebKit::WebFrame::page):
2935         Call new WebPage::fromCorePage helper.
2936
2937         * WebProcess/WebPage/WebPage.cpp:
2938         (WebKit::WebPage::fromCorePage):
2939         Add new function for getting a WebPage from a WebCore::Page.
2940
2941 2013-01-28  Joseph Pecoraro  <pecoraro@apple.com>
2942
2943         Improve PageVisibility API with enums
2944         https://bugs.webkit.org/show_bug.cgi?id=107364
2945
2946         Reviewed by Sam Weinig.
2947
2948         * Shared/API/c/WKPageVisibilityTypes.h: Added.
2949         * Shared/API/c/WKSharedAPICast.h:
2950         (WebKit::toPageVisibilityState):
2951         Create an enum for page visibility APIs and a conversion function
2952         for the WK2 values to WebCore values.
2953
2954         * Target.pri:
2955         * GNUmakefile.list.am:
2956         * WebKit2.xcodeproj/project.pbxproj:
2957         Add WKPageVisibilityTypes.h to the build as a private export.
2958
2959         * UIProcess/API/C/WKPage.h:
2960         * UIProcess/API/C/WKPage.cpp:
2961         (WKPageSetVisibilityState):
2962         * UIProcess/WebPageProxy.h:
2963         * UIProcess/WebPageProxy.cpp:
2964         (WebKit::WebPageProxy::setVisibilityState):
2965         UIProcess API to set visibility state. WebPageProxy already
2966         had m_visibilityState, so update that when setter is used.
2967
2968         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2969         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2970         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2971         * WebProcess/InjectedBundle/InjectedBundle.h:
2972         Remove the old SPI for WebKitTestRunner. Tests now use the C API.
2973
2974         * WebProcess/WebPage/WebPage.h:
2975         * WebProcess/WebPage/WebPage.cpp:
2976         (WebKit::WebPage::setVisibilityState):
2977         * WebProcess/WebPage/WebPage.messages.in:
2978         Update the existing WebPage API to use uint32_t, which matches
2979         other enum message types.
2980
2981 2013-01-28  Christophe Dumez  <christophe.dumez@intel.com>
2982
2983         [EFL][WK2] Use C API inside ewk_download_job
2984         https://bugs.webkit.org/show_bug.cgi?id=107810
2985
2986         Reviewed by Anders Carlsson.
2987
2988         Use C API inside ewk_download_job instead of accessing internal C++
2989         classes directly, to avoid violating API layering.
2990
2991         * UIProcess/API/C/WKDownload.cpp:
2992         (WKDownloadGetID): Add C API to get the download ID as we need it to
2993         support our public API and it seems like a useful addition.
2994         * UIProcess/API/C/WKDownload.h:
2995         * UIProcess/API/efl/ewk_download_job.cpp:
2996         (EwkDownloadJob::EwkDownloadJob):
2997         (EwkDownloadJob::id):
2998         (EwkDownloadJob::request):
2999         (EwkDownloadJob::cancel):
3000         * UIProcess/API/efl/ewk_download_job_private.h:
3001         (EwkDownloadJob::create):
3002         (EwkDownloadJob):
3003         * UIProcess/efl/DownloadManagerEfl.cpp:
3004         (WebKit::DownloadManagerEfl::decideDestinationWithSuggestedFilename):
3005         (WebKit::DownloadManagerEfl::didReceiveResponse):
3006         (WebKit::DownloadManagerEfl::didCreateDestination):
3007         (WebKit::DownloadManagerEfl::didReceiveData):
3008         (WebKit::DownloadManagerEfl::didFail):
3009         (WebKit::DownloadManagerEfl::didCancel):
3010         (WebKit::DownloadManagerEfl::didFinish):
3011         (WebKit::DownloadManagerEfl::registerDownloadJob): Rename
3012         registerDownload() to registerDownloadJob() for consistency with
3013         unregisterDownloadJob().
3014         (WebKit::DownloadManagerEfl::ewkDownloadJob): Rename downloadJob() to
3015         ewkDownloadJob() for clarity since it returns a EwkDownload object.
3016         Also take a WKDownloadRef in argument instead of an identifier since
3017         all the callers have a WKDownloadRef and it makes their code simpler.
3018         Finally, make the getter non-const since it returns a non-const pointer.
3019         (WebKit::DownloadManagerEfl::unregisterDownloadJob): Take a
3020         WKDownloadRef in argument instead of an identifier since all the
3021         callers have a WKDownloadRef and it makes their code simpler.
3022         * UIProcess/efl/DownloadManagerEfl.h:
3023         (DownloadManagerEfl):
3024         * UIProcess/efl/PageClientBase.cpp:
3025         (WebKit::PageClientBase::handleDownloadRequest):
3026
3027 2013-01-28  Tim Horton  <timothy_horton@apple.com>
3028
3029         PDFPlugin: getMainResourceDataOfFrame should return PDFPlugin's data so that Save... works
3030         https://bugs.webkit.org/show_bug.cgi?id=108060
3031         <rdar://problem/13075454>
3032
3033         Reviewed by Sam Weinig.
3034
3035         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Implement getResourceData.
3036         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
3037         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm: Implement getResourceData, returning the accumulated
3038         data if it exists and has finished loading.
3039         (WebKit::SimplePDFPlugin::getResourceData):
3040         * WebProcess/Plugins/Plugin.h: Add getResourceData, which hands out a raw pointer/size pair
3041         to the plugin's "main resource" data.
3042         * WebProcess/Plugins/PluginProxy.h: Implement getResourceData.
3043         * WebProcess/Plugins/PluginView.cpp:
3044         (WebKit::PluginView::getResourceData): Forward getResourceData through to the plugin.
3045         * WebProcess/Plugins/PluginView.h:
3046         * WebProcess/WebPage/WebPage.cpp:
3047         (WebKit::WebPage::getMainResourceDataOfFrame): If the requested frame is backed by a PluginDocument,
3048         attempt to ask the PluginView for its resource data.
3049
3050 2013-01-28  Tim Horton  <timothy_horton@apple.com>
3051
3052         [wk2] WKView's intrinsicContentSize should only report a flexible width if the content width is less than the minimum width
3053         https://bugs.webkit.org/show_bug.cgi?id=108056
3054
3055         Reviewed by Simon Fraser.
3056
3057         We're currently reporting a flexible width if the intrinsic
3058         content size is less than *or equal* to the minimum layout
3059         width. This is wrong and causes ping-ponging between flexible
3060         and inflexible width in cases where autolayout fits our
3061         view to exactly the intrinsic content size. It should be strictly
3062         less than instead.
3063
3064         * UIProcess/API/mac/WKView.mm:
3065         (-[WKView _setIntrinsicContentSize:]):
3066
3067 2013-01-28  Anders Carlsson  <andersca@apple.com>
3068
3069         Add StorageStrategy member functions to WebKit2
3070         https://bugs.webkit.org/show_bug.cgi?id=108105
3071
3072         Reviewed by Tim Horton.
3073
3074         Add default implementations that just chain up to the base class for now.
3075
3076         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3077         (WebKit::WebPlatformStrategies::localStorageNamespace):
3078         (WebKit::WebPlatformStrategies::sessionStorageNamespace):
3079         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3080         (WebPlatformStrategies):
3081
3082 2013-01-28  Adam Barth  <abarth@webkit.org>
3083
3084         Remove webkitNotifications.createHTMLNotification
3085         https://bugs.webkit.org/show_bug.cgi?id=107598
3086
3087         Reviewed by Benjamin Poulain.
3088
3089         * Configurations/FeatureDefines.xcconfig:
3090
3091 2013-01-28  Andy Estes  <aestes@apple.com>
3092
3093         Fix non-fat builds by excluding PluginService.32 as a target dependency for WebKit2.
3094
3095         * WebKit2.xcodeproj/project.pbxproj:
3096
3097 2013-01-28  Renata Hodovan  <reni@webkit.org>
3098
3099         [Qt][Win][WK2] Build fix after r140957.
3100
3101         Rubber-stamped by Csaba Osztrogonác.
3102
3103         <sys/wait.h> is only needed and available on linux therefore it's moved into an ifdef block.
3104
3105         * WebProcess/qt/WebProcessMainQt.cpp:
3106
3107 2013-01-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3108
3109         [EFL][WK2] Use C API inside ewk_url_response
3110         https://bugs.webkit.org/show_bug.cgi?id=107826
3111
3112         Reviewed by Andreas Kling.
3113
3114         * Shared/API/c/WKURLResponse.cpp:
3115         (WKURLResponseGetExpectedContentsLength):
3116         * Shared/API/c/WKURLResponse.h:
3117
3118             Add new WK2 C API to get the expected contents length.
3119
3120         * UIProcess/API/efl/ewk_url_response.cpp:
3121         (EwkUrlResponse::EwkUrlResponse):
3122         (EwkUrlResponse::httpStatusCode):
3123         (EwkUrlResponse::contentLength):
3124         * UIProcess/API/efl/ewk_url_response_private.h:
3125         (EwkUrlResponse::create):
3126         (EwkUrlResponse):
3127
3128             Change the methods to not call WebCore methods.
3129
3130 2013-01-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3131
3132         [WK2][EFL] Remove unneeded private methods
3133         https://bugs.webkit.org/show_bug.cgi?id=107693
3134
3135         Reviewed by Andreas Kling.
3136
3137         Care has been taken to verify that the wrappers can
3138         never be null when called.
3139
3140         * UIProcess/API/efl/EwkViewImpl.cpp:
3141         (EwkViewImpl::displayTimerFired):
3142         (EwkViewImpl::createGLSurface):
3143         * UIProcess/API/efl/EwkViewImpl.h:
3144         (EwkViewImpl):
3145
3146 2013-01-28  Renata Hodovan  <reni@webkit.org>
3147
3148         [WK2] Putting QtWebProcess into a chrooted sandbox
3149         https://bugs.webkit.org/show_bug.cgi?id=90005
3150
3151         Reviewed by Anders Carlsson and Zoltan Herczeg.
3152
3153         This new feature makes possible to run WebProcess inside a chroot. In this case UIProcess calls the
3154         internal SandboxProcess binary what makes up an environment for WebProcess inside the sandbox and runs the WebProcess.
3155         SandboxProcess first creates two needed device files (random and urandom), mounts filesystems (proc and shared memory),
3156         then links run-time dependencies of WebProcess. After this, SandboxProcess moves to a new pid namespace (cloning with
3157         CLONE_NEWPID flag). Then after an other cloning (with CLONE_FS flag) we share our filesystem with our children. This is
3158         needed because we want to call chroot() function from here and jail our child (WebProcess) too. This will be performed
3159         when WebProcess sends a request for it via an socketpair. If sandboxing is done, SandboxProcess exits.
3160         Since chroot() system call needs sudoer rights SandboxProcess binary should have set its suid flag. However we can reduce
3161         its capabilites. First we restrict the capabilities of the process and the number of its possible resources. Furthermore
3162         we fallback to the nobody or the real user.
3163
3164         * Configurations/FeatureDefines.xcconfig:
3165         * SandboxProcess.pro: Added.
3166         * Shared/linux/SandboxProcess/SandboxEnvironmentLinux.cpp: Added.
3167         (launchChangeRootHelper):
3168         (setEnvironmentVariablesForChangeRootHelper):
3169         (prepareAndStartChangeRootHelper):
3170         (setCapabilities):
3171         (dropPrivileges):
3172         (fileExists):
3173         (directoryPermissions):
3174         (createDirectory):
3175         (createDirectoryPath):
3176         (createDeviceFiles):
3177         (mountFileSystems):
3178         (linkFile):
3179         (linkDirectory):
3180         (collectRunTimeDependencies):
3181         (setupXauthorityForNobodyUser):
3182         (initSandbox):
3183         (restrictCapabilities):
3184         (moveToNewPidNamespace):
3185         (run):
3186         (main):
3187         * Shared/linux/SandboxProcess/SandboxEnvironmentLinux.h: Added.
3188         * Shared/linux/SandboxProcess/StringOperations.cpp: Added.
3189         (stringCopy):
3190         (stringConcat):
3191         (stringAppend):
3192         * Shared/linux/SandboxProcess/StringOperations.h: Added.
3193         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3194         (WebKit::ProcessLauncher::launchProcess):
3195         * WebKit2.pri:
3196         * WebProcess.pro:
3197         * WebProcess/qt/WebProcessMainQt.cpp:
3198         (WebKit):
3199         (WebKit::chrootMe):
3200         (WebKit::WebProcessMainQt):
3201
3202 2013-01-28  Christophe Dumez  <christophe.dumez@intel.com>
3203
3204         [EFL][WK2] Rely more on C API in ewk_favicon_database
3205         https://bugs.webkit.org/show_bug.cgi?id=108035
3206
3207         Reviewed by Benjamin Poulain.
3208
3209         Rely less on internal C++ API in ewk_favicon_database and use C API
3210         instead of avoid breaking API layering.
3211
3212         * PlatformEfl.cmake:
3213         * UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp: Added.
3214         (WKIconDatabaseTryGetCairoSurfaceForURL): Add C API for getting the
3215         favicon for a given page URL as a cairo_surface_t*.
3216         * UIProcess/API/C/cairo/WKIconDatabaseCairo.h: Added.
3217         * UIProcess/API/efl/ewk_favicon_database.cpp:
3218         (EwkFaviconDatabase::didChangeIconForPageURL):
3219         (EwkFaviconDatabase::getIconSurfaceSynchronously):
3220         (EwkFaviconDatabase::iconDataReadyForPageURL):
3221
3222 2013-01-27  Alexey Proskuryakov  <ap@apple.com>
3223
3224         Fix location of sandbox profiles in built products
3225         https://bugs.webkit.org/show_bug.cgi?id=108026
3226
3227         Reviewed by Sam Weinig.
3228
3229         * WebKit2.xcodeproj/project.pbxproj: Sandbox profiles go into WebKit2 framework resources.
3230
3231 2013-01-27  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3232
3233         Fixing atomicIncrement implementation for Windows by dropping support before XP SP2.
3234         https://bugs.webkit.org/show_bug.cgi?id=106740
3235
3236         Reviewed by Benjamin Poulain.
3237
3238         * config.h:
3239
3240 2013-01-27  Sam Weinig  <sam@webkit.org>
3241
3242         Add support for launching WebKit2 plugins using XPC
3243         https://bugs.webkit.org/show_bug.cgi?id=108040
3244
3245         Reviewed by Dan Bernstein.
3246
3247         * Configurations/PluginService.32.xcconfig: Copied from Source/WebKit2/Configurations/WebContentService.xcconfig.
3248         * Configurations/PluginService.64.xcconfig: Copied from Source/WebKit2/Configurations/WebContentService.xcconfig.
3249         * Configurations/PluginService.Development.xcconfig: Copied from Source/WebKit2/Configurations/WebContentService.xcconfig.
3250         Add configurations.
3251
3252         * PluginProcess/EntryPoint/mac/XPCService: Added.
3253         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32: Added.
3254         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32/Info.plist: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist.
3255         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32/PluginService.32.Main.mm: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm.
3256         * PluginProcess/EntryPoint/mac/XPCService/PluginService.64: Added.
3257         * PluginProcess/EntryPoint/mac/XPCService/PluginService.64/Info.plist: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist.
3258         * PluginProcess/EntryPoint/mac/XPCService/PluginService.64/PluginService.64.Main.mm: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm.
3259         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development: Added.
3260         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist: Added.
3261         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/PluginService.Development.Main.mm: Added.
3262         (main):
3263         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm.
3264         (initializePluginService):
3265         Add entry points.
3266
3267         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3268         (WebKit::serviceName):
3269         Add plugin process service names and move into correct #ifdef.
3270
3271         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3272         (WebKit::shouldUseXPC):
3273         (WebKit::PluginProcessProxy::platformInitializeLaunchOptions):
3274         Opt into xpc using the same rules as the WebProcess.
3275
3276         * WebKit2.xcodeproj/project.pbxproj:
3277         Add files.
3278
3279 2013-01-26  Alexey Proskuryakov  <ap@apple.com>
3280
3281         Use shared ChildProcess code to enter plug-in sandbox.
3282
3283         Reviewed by Sam Weinig.
3284
3285         There is one known behavior change from this refactoring: getpwuid_r is used
3286         instead of NSHomeDirectory for home directory, mathcing other client processes.
3287
3288         * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::enterSandbox):
3289         * PluginProcess/PluginProcess.h:
3290         PluginProcess prevents ChildProcess attempt to enter the sandbox immediately on
3291         launch for now, because we don't have a sandbox profile directory path yet.
3292         It now keeps a copy of ChildProcessInitializationParameters, so that
3293         ChildProcess::initializeSandbox() could be called later.
3294
3295         * PluginProcess/mac/PluginProcessMac.mm:
3296         (WebKit::PluginProcess::platformInitializeProcess): Store a copy of ChildProcessInitializationParameters
3297         for later.
3298         (WebKit::loadSandboxProfile): Build a sandbox profile from a common prefix and
3299         a plugin-specific part.
3300         (WebKit::PluginProcess::platformInitializePluginProcess): We can enter the sandbox now.
3301         (WebKit::PluginProcess::enterSandbox): Prepare SandboxInitializationParameters,
3302         and call ChildProcess::initializeSandbox().
3303
3304         * Shared/mac/ChildProcessMac.mm:
3305         (WebKit::ChildProcess::initializeSandbox): Actually handle system directory suffix
3306         from parameters.
3307
3308         * WebKit2.xcodeproj/project.pbxproj:
3309         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.h: Removed.
3310         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: Removed.
3311
3312 2013-01-26  Sam Weinig  <sam@webkit.org>
3313
3314         Add support for running the networking process as an XPCService
3315         https://bugs.webkit.org/show_bug.cgi?id=108025
3316
3317         Reviewed by Dan Bernstein.
3318
3319         * Configurations/NetworkService.Development.xcconfig: Copied from Source/WebKit2/Configurations/WebContentService.Development.xcconfig.
3320         * Configurations/NetworkService.xcconfig: Copied from Source/WebKit2/Configurations/WebContentService.xcconfig.
3321         Add configurations.
3322
3323         * NetworkProcess/EntryPoint/mac/XPCService: Added.
3324         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService: Added.
3325         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development: Added.
3326         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist.
3327         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/NetworkServiceMain.Development.mm: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/WebContentServiceMain.Development.mm.
3328         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist.
3329         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/WebContentServiceMain.mm.
3330         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm.
3331         (initializeNetworkService):
3332         Add entry points.
3333
3334         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3335         (WebKit::serviceName):
3336         (WebKit::connectToServiceForDevelopment):
3337         (WebKit::createServiceForDevelopment):
3338         (WebKit::createService):
3339         (WebKit::createProcess):
3340         (WebKit::ProcessLauncher::launchProcess):
3341         Rework service creation to work for arbitrary services.
3342
3343         * UIProcess/Network/NetworkProcessProxy.cpp:
3344         (WebKit::NetworkProcessProxy::~NetworkProcessProxy):
3345         (WebKit::NetworkProcessProxy::getLaunchOptions):
3346         * UIProcess/Network/NetworkProcessProxy.h:
3347         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
3348         (WebKit::shouldUseXPC):
3349         (WebKit::NetworkProcessProxy::platformGetLaunchOptions):
3350         Opt into xpc using the same rules as the WebProcess.
3351
3352         * WebKit2.xcodeproj/project.pbxproj:
3353         Update files.
3354
3355         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
3356         (initializeWebContentService):
3357         Fix the comment to refer to the shim correctly.
3358
3359 2013-01-26  Sam Weinig  <sam@webkit.org>
3360
3361         Simplify environment creation in XPC service re-exec
3362         https://bugs.webkit.org/show_bug.cgi?id=108017
3363
3364         Reviewed by Dan Bernstein.
3365
3366         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.Development.h:
3367         (WebKit::XPCServiceEventHandler):
3368         There is no need to copy these strings.
3369
3370 2013-01-26  Alexey Proskuryakov  <ap@apple.com>
3371
3372         Remove code for handling NetworkProcess authentication challenges in WebProcess
3373         https://bugs.webkit.org/show_bug.cgi?id=108003
3374
3375         Reviewed by Sam Weinig.
3376
3377         * DerivedSources.make:
3378         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3379         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
3380         * WebKit2.xcodeproj/project.pbxproj:
3381         * NetworkProcess/NetworkResourceLoader.messages.in: Removed. We no longer have
3382         an messages to NetworkResourceLoader.
3383
3384         * Shared/WebCoreArgumentCoders.cpp:
3385         (CoreIPC::::encode):
3386         (CoreIPC::::decode):
3387         There is no longer an identifier inside AuthenticationChallenge.
3388
3389         * NetworkProcess/NetworkResourceLoader.cpp:
3390         (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
3391         (WebKit::NetworkResourceLoader::didCancelAuthenticationChallenge):
3392         * NetworkProcess/NetworkResourceLoader.h:
3393         Removed code for receiving authentication responses from WebProcess. Removed
3394         m_currentAuthenticationChallenge - AuthenticationMAnager now keeps track of that.
3395
3396         * WebProcess/Network/WebResourceLoader.cpp:
3397         * WebProcess/Network/WebResourceLoader.h:
3398         * WebProcess/Network/WebResourceLoader.messages.in:
3399         Removed code for handling authentication challenges. They are now sent directly to
3400         UI Process. The only thing WebProcess still does is decide whether is can authenticate
3401         against a particular authentication space.
3402
3403 2013-01-26  Sam Weinig  <sam@webkit.org>
3404
3405         Fix the development build.
3406
3407         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.Development.h:
3408         (WebKit::XPCServiceEventHandler):
3409         Use the right stringizer.
3410
3411 2013-01-26  Sam Weinig  <sam@webkit.org>
3412
3413         Refactor XPCService initialization to make it easier to add more services
3414         https://bugs.webkit.org/show_bug.cgi?id=108015
3415
3416         Reviewed by Dan Bernstein.
3417
3418         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.Development.h: Added.
3419         (WebKit::XPCServiceEventHandler):
3420         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.h: Added.
3421         (WebKit::XPCServiceEventHandler):
3422         Move bootstrapping to Shared (like we have for the legacy process). For now, we use
3423         a macro to define the actual initialization point function to use, in the future, we
3424         could consider alternatives, such as getting the function name from the bundle.
3425
3426         * WebKit2.xcodeproj/project.pbxproj:
3427         Update files.
3428
3429         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/WebContentServiceMain.Development.mm:
3430         * WebProcess/EntryPoint/mac/XPCService/WebContentService/WebContentServiceMain.mm:
3431         Simplify to use the new XPCServiceBootstrapper.
3432
3433         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: Copied from Source/WebKit2/WebProcess/mac/WebProcessServiceEntryPoints.mm.
3434         (initializeWebContentService):
3435         * WebProcess/mac/WebProcessServiceEntryPoints.h: Removed.
3436         * WebProcess/mac/WebProcessServiceEntryPoints.mm: Removed.
3437         Move the entry point to where it belongs and extract the bootstrapping parts.
3438
3439 2013-01-26  Adenilson Cavalcanti  <cavalcantii@gmail.com>
3440
3441         [Qt]Qt build fix
3442         https://bugs.webkit.org/show_bug.cgi?id=108013
3443
3444         Changes on process initialization classes broke webkit building with Qt5. This
3445         patch fix it.
3446
3447         Reviewed by Sam Weinig.
3448
3449         * PluginProcess/qt/PluginProcessMainQt.cpp:
3450
3451 2013-01-26  Sam Weinig  <sam@webkit.org>
3452
3453         Hoist command line parsing into ChildProcessMain
3454         https://bugs.webkit.org/show_bug.cgi?id=108010
3455
3456         Reviewed by Dan Bernstein.
3457
3458         * NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm:
3459         (NetworkProcessMain):
3460         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
3461         (PluginProcessMain):
3462         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.h:
3463         (WebKit::ChildProcessMain):
3464         * SharedWorkerProcess/EntryPoint/mac/LegacyProcess/SharedWorkerProcessMain.mm:
3465         (SharedWorkerProcessMain):
3466         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
3467         (WebContentProcessMain):
3468
3469 2013-01-26  Sam Weinig  <sam@webkit.org>
3470
3471         Move LegacyProcess entry points into new EntryPoint directories
3472         https://bugs.webkit.org/show_bug.cgi?id=108008
3473
3474         Reviewed by Anders Carlsson.
3475
3476