Expose new load-with-userData API to Objective-C
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-05-17  Sam Weinig  <sam@webkit.org>
2
3         Expose new load-with-userData API to Objective-C
4         https://bugs.webkit.org/show_bug.cgi?id=116335
5
6         Reviewed by Anders Carlsson.
7
8         - Adds loadRequest:userData:, loadFileURL:restrictToFilesWithin:userData:, loadHTMLString:baseURL:userData:
9           loadData:MIMEType:textEncodingName:baseURL:, and loadData:MIMEType:textEncodingName:baseURL:userData.
10         - Adds a WKObjCTypeWrapperRef (which is a ObjCObjectGraph under the covers) to allow the userData to be unwrapped
11           in the injected bundles willLoadURLRequest and willLoadDataRequest C-SPI callbacks.
12
13         * Shared/API/c/WKBase.h:
14         * Shared/API/c/WKSharedAPICast.h:
15         * Shared/API/c/mac/WKBaseMac.h: Added.
16         * Shared/API/c/mac/WKObjCTypeWrapperRef.h: Added.
17         * Shared/API/c/mac/WKObjCTypeWrapperRef.mm: Added.
18         (WKObjCTypeWrapperGetTypeID):
19         (WKObjCTypeWrapperCreate):
20         (WKObjCTypeWrapperGetObject):
21         * UIProcess/API/mac/WKBrowsingContextController.h:
22         * UIProcess/API/mac/WKBrowsingContextController.mm:
23         (+[WKBrowsingContextController registerSchemeForCustomProtocol:]):
24         (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]):
25         (-[WKBrowsingContextController loadRequest:]):
26         (-[WKBrowsingContextController loadRequest:userData:]):
27         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
28         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:userData:]):
29         (-[WKBrowsingContextController loadHTMLString:baseURL:]):
30         (-[WKBrowsingContextController loadHTMLString:baseURL:userData:]):
31         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:]):
32         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
33         * WebKit2.xcodeproj/project.pbxproj:
34
35 2013-05-17  Sam Weinig  <sam@webkit.org>
36
37         Add WKPageLoadData and WKPageLoadDataWithUserData SPI to support loading arbitrary data blobs
38         https://bugs.webkit.org/show_bug.cgi?id=116325
39
40         Reviewed by Simon Fraser.
41
42         * UIProcess/API/C/WKPage.cpp:
43         (WKPageLoadData):
44         (WKPageLoadDataWithUserData):
45         Add new SPI.
46
47         * UIProcess/API/C/WKPage.h:
48         * UIProcess/WebPageProxy.cpp:
49         (WebKit::WebPageProxy::loadData):
50         * UIProcess/WebPageProxy.h:
51         Pipe through to the WebProcess.
52
53         * WebProcess/WebPage/WebPage.h:
54         * WebProcess/WebPage/WebPage.messages.in:
55         * WebProcess/WebPage/WebPage.cpp:
56         (WebKit::WebPage::loadDataImpl):
57         (WebKit::WebPage::loadData):
58         (WebKit::WebPage::loadHTMLString):
59         (WebKit::WebPage::loadAlternateHTMLString):
60         (WebKit::WebPage::loadPlainTextString):
61         (WebKit::WebPage::loadWebArchiveData):
62         Rename existing loadData function to loadDataImpl (I hate it) to avoid overload conflict
63         from IPC magic.
64
65
66 2013-05-17  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
67
68         [EFL][WK2] Fix sub menu initialization in ewk_context_menu_item
69         https://bugs.webkit.org/show_bug.cgi?id=116321
70
71         Reviewed by Christophe Dumez.
72
73         During sub menu creation, after initializing m_parentMenu, parentMenu
74         pointer became null which may cause segfaults. This patch fixes it by
75         using m_parentMenu.
76
77         * UIProcess/API/efl/ewk_context_menu_item.cpp:
78         (EwkContextMenuItem::EwkContextMenuItem):
79
80 2013-05-17  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
81
82         [EFL][WK2] Support sub menu in ewk context menus
83         https://bugs.webkit.org/show_bug.cgi?id=114729
84
85         Reviewed by Christophe Dumez.
86
87         Added submenu support in EwkContextMenu and an API function to receive
88         Ewk_Context_Menu from submenu context menu item. A test case was added
89         for new API function.
90         EwkContextMenu is now an EwkObject allowing multiple instances of submenu
91         to be used in different submenu type context menu items.
92
93         * UIProcess/API/efl/ewk_context_menu_item.cpp:
94         (EwkContextMenuItem::EwkContextMenuItem):
95         (ewk_context_menu_item_new):
96         (ewk_context_menu_item_parent_menu_get):
97         (ewk_context_menu_item_submenu_get):
98         * UIProcess/API/efl/ewk_context_menu_item.h:
99         * UIProcess/API/efl/ewk_context_menu_item_private.h:
100         (EwkContextMenuItem::create):
101         (EwkContextMenuItem::parentMenu):
102         (EwkContextMenuItem::subMenu):
103         (EwkContextMenuItem):
104         * UIProcess/API/efl/ewk_context_menu_private.h:
105         (EwkContextMenu::ewkView):
106         (EwkContextMenu):
107         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
108         (showContextMenu):
109
110 2013-05-17  Zoltan Arvai  <zarvai@inf.u-szeged.hu>, Ádám Kallai  <kadam@inf.u-szeged.hu>
111
112         [Qt] Unreviewed build fix.
113
114         Add missing Qt specific initializer for willLoadURLRequest and willLoadDataRequest.
115
116         * WebProcess/qt/QtBuiltinBundlePage.cpp:
117         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
118
119 2013-05-16  Beth Dakin  <bdakin@apple.com>
120
121         Remove WKBundlePageGetHeaderLayer/Footer SPI
122         https://bugs.webkit.org/show_bug.cgi?id=116254
123
124         Reviewed by Benjamin Poulain.
125
126         We should remove the Remove WKBundlePageGetHeaderLayer/Footer SPI. It was only 
127         recently added and have been replaced by WKBundlePageSetHeaderBanner/Footer.
128
129         * WebKit2.xcodeproj/project.pbxproj:
130         * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.h: Removed.
131         * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.mm: Removed.
132         * WebProcess/WebPage/WebPage.h:
133         (WebPage):
134         * WebProcess/WebPage/mac/WebPageMac.mm:
135         (WebKit):
136         (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):
137
138 2013-05-14  Sam Weinig  <sam@webkit.org>
139
140         Add variants of the loading APIs that take user data and a way for the injected bundle to find out about them
141         https://bugs.webkit.org/show_bug.cgi?id=116132
142
143         Reviewed by Anders Carlsson.
144
145         Adds "WithUserData" versions of all the load APIs and two new WKBundlePageLoaderClient functions,
146         willLoadURLRequest and willLoadDataRequest to let the bundle access them.
147
148         Adds WebKit2WillLoadTest.* API tests.
149
150         * UIProcess/API/C/WKPage.cpp:
151         (WKPageLoadURLWithUserData):
152         (WKPageLoadURLRequestWithUserData):
153         (WKPageLoadFile):
154         (WKPageLoadFileWithUserData):
155         (WKPageLoadHTMLStringWithUserData):
156         (WKPageLoadAlternateHTMLStringWithUserData):
157         (WKPageLoadPlainTextStringWithUserData):
158         (WKPageLoadWebArchiveDataWithUserData):
159         * UIProcess/API/C/WKPage.h:
160         * UIProcess/WebPageProxy.cpp:
161         * UIProcess/WebPageProxy.h:
162         (WebPageProxy):
163         * WebKit2.xcodeproj/project.pbxproj:
164         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
165         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
166         (WebKit::InjectedBundlePageLoaderClient::willLoadURLRequest):
167         (WebKit::InjectedBundlePageLoaderClient::willLoadDataRequest):
168         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
169         (WebCore):
170         (InjectedBundlePageLoaderClient):
171         * WebProcess/WebPage/WebPage.cpp:
172         * WebProcess/WebPage/WebPage.h:
173         * WebProcess/WebPage/WebPage.messages.in:
174
175 2013-05-16  Manuel Rego Casasnovas  <rego@igalia.com>
176
177         [GTK] Fix memory leak in WebKitBackForwardList
178         https://bugs.webkit.org/show_bug.cgi?id=116222
179
180         Reviewed by Carlos Garcia Campos.
181
182         Due to the use of leakRef() the ImmutableArray is not being released
183         automatically. Adding a local variable in the methods to make sure that
184         the ImmutableArray is freed.
185
186         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
187         (webkit_back_forward_list_get_back_list_with_limit): Add local variable
188         RefPtr and pass the ImmutableArray to
189         WebKitBackForwardList::webkitBackForwardListCreateList() using
190         RefPtr::get().
191         (webkit_back_forward_list_get_forward_list_with_limit): Ditto.
192
193 2013-05-16  Commit Queue  <commit-queue@webkit.org>
194
195         Unreviewed, rolling out r150034.
196         http://trac.webkit.org/changeset/150034
197         https://bugs.webkit.org/show_bug.cgi?id=116257
198
199         This work around doesn't work due to another bug NSUndoManager
200         has (Requested by rniwa on #webkit).
201
202         * UIProcess/API/mac/PageClientImpl.mm:
203         (WebKit::PageClientImpl::registerEditCommand):
204
205 2013-05-16  Tim Horton  <timothy_horton@apple.com>
206
207         PDFPlugins don't load when plugins are disabled, but they should
208         https://bugs.webkit.org/show_bug.cgi?id=75790
209         <rdar://problem/11650197>
210
211         Reviewed by Anders Carlsson.
212
213         Support loading "application" plug-ins even if plug-ins are explicitly disabled.
214
215         Make PDFPlugin and SimplePDFPlugin "application" plug-ins, so they can
216         be loaded even if plug-ins are disabled.
217
218         * Platform/CoreIPC/HandleMessage.h:
219         (CoreIPC::callMemberFunction):
220         Add a 5-argument, 3-reply version of callMemberFunction.
221
222         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
223         (WebKit::NetscapePluginModule::getPluginInfo):
224         NPAPI plug-ins are not application plug-ins.
225
226         * Shared/WebCoreArgumentCoders.cpp:
227         (CoreIPC::::encode):
228         (CoreIPC::::decode):
229         Encode/decode the new isApplicationPlugin field on PluginInfo.
230
231         * UIProcess/Plugins/PluginInfoStore.cpp:
232         (WebKit::PluginInfoStore::findPluginForMIMEType):
233         (WebKit::PluginInfoStore::findPluginForExtension):
234         (WebKit::PluginInfoStore::findPlugin):
235         * UIProcess/Plugins/PluginInfoStore.h:
236         (PluginInfoStore):
237         Give PluginInfoStore's findPlugin method and its private helper
238         methods an argument allowing them to only match application plug-ins.
239
240         (WebKit::WebPageProxy::findPlugin):
241         * UIProcess/WebPageProxy.h:
242         (WebPageProxy):
243         * UIProcess/WebPageProxy.messages.in:
244         Add an argument allowing findPlugin to restrict its search to only application plug-ins.
245
246         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
247         (WebKit::WebFrameLoaderClient::objectContentType):
248         Previously, this caller depended on pluginData() returning null if
249         plug-ins were disabled. Since that is no longer the case, we have to
250         check if we can use plug-ins, and otherwise ignore non-application-plug-ins.
251
252         * WebProcess/WebPage/WebPage.cpp:
253         (WebKit::WebPage::createPlugin):
254         When going to search for a plug-in, ask subframeLoader whether or not
255         it's OK to use ordinary non-application plug-ins, and pass that information
256         on to the UIProcess when performing the search.
257
258         (WebKit::WebPage::canPluginHandleResponse): Ditto.
259         (WebKit::WebPage::canShowMIMEType):
260         Ensure that canShowMIMEType returns true if we have an application plug-in
261         that can display a particular MIME type, even if we're not allowed to load plug-ins.
262
263 2013-05-16  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
264
265         [EFL][WK2] Make Ewk_Context_Menu Ewk_Object
266         https://bugs.webkit.org/show_bug.cgi?id=116097
267
268         Reviewed by Gyuyoung Kim.
269
270         Changed Ewk_Context_Menu to be an Ewk_Object so pointer to menu
271         object can be shared between different modules.
272
273         * UIProcess/API/efl/EwkView.cpp:
274         (EwkView::showContextMenu):
275         * UIProcess/API/efl/EwkView.h:
276         (EwkView):
277         * UIProcess/API/efl/ewk_context_menu.cpp:
278         (EwkContextMenu::appendItem):
279         (EwkContextMenu::removeItem):
280         (ewk_context_menu_new):
281         (ewk_context_menu_new_with_items):
282         (ewk_context_menu_item_append):
283         (ewk_context_menu_item_remove):
284         (ewk_context_menu_hide):
285         (ewk_context_menu_items_get):
286         (ewk_context_menu_item_select):
287         * UIProcess/API/efl/ewk_context_menu_item.cpp:
288         (EwkContextMenuItem::EwkContextMenuItem):
289         (ewk_context_menu_item_new_with_submenu):
290         * UIProcess/API/efl/ewk_context_menu_item_private.h:
291         (EwkContextMenuItem):
292         * UIProcess/API/efl/ewk_context_menu_private.h:
293         (EwkContextMenu):
294         (EwkContextMenu::create):
295         * UIProcess/API/efl/ewk_defines.h:
296
297 2013-05-16  Andreas Kling  <akling@apple.com>
298
299         Page::chrome() should return a reference.
300         <http://webkit.org/b/116185>
301
302         Reviewed by Anders Carlsson.
303
304 2013-05-16  Brady Eidson  <beidson@apple.com>
305
306         svg/as-image/img-zoom-svg-stylesheet.html crashes with NetworkProcess enabled.
307         <rdar://problem/13837408> and https://bugs.webkit.org/show_bug.cgi?id=115917
308
309         Reviewed by Sam Weinig.
310
311         * NetworkProcess/SchedulableLoader.cpp:
312         (WebKit::SchedulableLoader::SchedulableLoader): ASSERT that either there’s a frame and page ID, or
313           that the client cannot be asked for credentials.
314
315         * WebProcess/Network/WebResourceLoadScheduler.cpp:
316         (WebKit::WebResourceLoadScheduler::scheduleLoad): Only cast the FrameLoaderClient and get WebFrame/WebPage
317           if that is actually possible. Set the clientCredentialPolicy based on whether or not WebFrame/WebPage are
318           available since they are needed to ask the UIProcess for credentials. ASSERT that either there’s both
319           a frame and page ID or that the client won’t be asked for credentials.
320
321 2013-05-16  Timothy Hatcher  <timothy@apple.com>
322
323         Make the Find Banner in Safari work again with the docked Web Inspector.
324
325         https://webkit.org/b/116182
326         rdar://problem/13857423
327
328         Reviewed by Benjamin Poulain.
329
330         * UIProcess/mac/WebInspectorProxyMac.mm:
331         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
332         (WebKit::WebInspectorProxy::platformDetach):
333         Preserve the top position of the inspected view so banners in Safari still work.
334
335 2013-05-16  Tim Horton  <timothy_horton@apple.com>
336
337         [wk2] didGetImageForFindMatch can return a null image
338         https://bugs.webkit.org/show_bug.cgi?id=116251
339         <rdar://problem/13277246>
340
341         Reviewed by Simon Fraser.
342
343         Don't send didGetImageForFindMatch if we didn't get an image for
344         the find match, which can happen if the selection is not visible.
345
346         * WebProcess/WebPage/FindController.cpp:
347         (WebKit::FindController::getImageForFindMatch):
348
349 2013-05-16  Tim Horton  <timothy_horton@apple.com>
350
351         [wk2] Minimum layout width is lost if the WebProcess crashes
352         https://bugs.webkit.org/show_bug.cgi?id=116202
353         <rdar://problem/13202320>
354
355         Reviewed by Darin Adler.
356
357         Send the minimum layout width to the WebProcess upon initialization,
358         so that crashed-and-restarted WebProcesses have the correct width.
359
360         * Shared/WebPageCreationParameters.cpp:
361         (WebKit::WebPageCreationParameters::encode):
362         (WebKit::WebPageCreationParameters::decode):
363         * Shared/WebPageCreationParameters.h:
364         (WebPageCreationParameters):
365         Add minimumLayoutWidth WebPage creation parameter.
366
367         * UIProcess/WebPageProxy.cpp:
368         (WebKit::WebPageProxy::creationParameters):
369         Send the current minimumLayoutWidth to the WebPage when it's created.
370
371         (WebKit::WebPageProxy::setMinimumLayoutWidth):
372         Store minimumLayoutWidth changes that come in while the WebProcess is
373         not valid, so that the correct width is sent once it is restarted.
374
375         * WebProcess/WebPage/WebPage.cpp:
376         (WebKit::WebPage::WebPage):
377         Set minimumLayoutWidth to the value provided by our creation parameters.
378
379 2013-05-16  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
380
381         [Win] Unreviewed buildfix after r150161.
382
383         'Unknown' in HTTPRequest.cpp is ambiguous symbol with MSVC,
384         because it is also defined in MS SDK 7.1 winioctl.h.
385
386         * UIProcess/InspectorServer/HTTPRequest.cpp:
387         (WebKit::HTTPRequest::HTTPRequest):
388
389 2013-05-16  Andras Becsi  <andras.becsi@digia.com>
390
391         [WK2] PluginInformation.cpp fails to build because of missing ENABLE(NETSCAPE_PLUGIN_API) guard
392         https://bugs.webkit.org/show_bug.cgi?id=116018
393
394         Rubber-stamped by Jocelyn Turcotte.
395
396         * Shared/Plugins/Netscape/PluginInformation.cpp:
397         (WebKit::getPluginModuleInformation):
398
399 2013-05-15  Simon Cooper  <scooper@apple.com>
400
401         Enable printing in plugins
402         https://bugs.webkit.org/show_bug.cgi?id=116201
403         <rdar://problem/12347902>
404
405         Reviewed by Alexey Proskuryakov.
406
407         Add the printing entitlement so that legacy printing drivers can
408         customize the print panel. Update the printing rules and enable them
409         for the plugins.
410
411         * Configurations/PluginService.entitlements:
412         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
413         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
414         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
415         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
416
417 2013-05-15  Anders Carlsson  <andersca@apple.com>
418
419         Move HTTPRequest class to WebKit2
420         https://bugs.webkit.org/show_bug.cgi?id=116192
421
422         Reviewed by Darin Adler.
423
424         Move HTTPRequest to WebKit2 and put it in the WebKit namespace.
425
426         * CMakeLists.txt:
427         * GNUmakefile.list.am:
428         * Target.pri:
429         * UIProcess/InspectorServer/HTTPRequest.cpp: Renamed from Source/WebCore/platform/network/HTTPRequest.cpp.
430         * UIProcess/InspectorServer/HTTPRequest.h: Renamed from Source/WebCore/platform/network/HTTPRequest.h.
431         * UIProcess/InspectorServer/WebInspectorServer.cpp:
432         * UIProcess/InspectorServer/WebInspectorServer.h:
433         (WebInspectorServer):
434         * UIProcess/InspectorServer/WebSocketServerClient.h:
435         (WebKit::WebSocketServerClient::didReceiveUnrecognizedHTTPRequest):
436         (WebKit::WebSocketServerClient::didReceiveWebSocketUpgradeHTTPRequest):
437         (WebKit::WebSocketServerClient::didEstablishWebSocketConnection):
438         * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
439         * UIProcess/InspectorServer/WebSocketServerConnection.h:
440         (WebKit):
441         (WebSocketServerConnection):
442
443 2013-05-15  Arnaud Renevier  <a.renevier@sisa.samsung.com>
444
445         [GTK] [WebKit2] enable displaying console.log messages to system console
446         https://bugs.webkit.org/show_bug.cgi?id=115578
447
448         Reviewed by Martin Robinson.
449
450         Add a setting to enable/disable displaying of page messages to system
451         console. Property is called enable-write-console-messages-to-stdout.
452         Getter API function is
453         webkit_settings_get_enable_write_console_messages_to_stdout
454         Setter API function is
455         webkit_settings_set_enable_write_console_messages_to_stdout
456
457         * UIProcess/API/gtk/WebKitSettings.cpp:
458         (webKitSettingsSetProperty):
459         (webKitSettingsGetProperty):
460         (webkit_settings_class_init):
461         (webkit_settings_get_enable_write_console_messages_to_stdout):
462         (webkit_settings_set_enable_write_console_messages_to_stdout):
463         * UIProcess/API/gtk/WebKitSettings.h:
464         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
465         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
466         (testWebKitSettings):
467
468 2013-05-08  Gavin Barraclough  <barraclough@apple.com>
469
470         Process suppression should throttle scripted animations
471         https://bugs.webkit.org/show_bug.cgi?id=115812
472
473         Reviewed by Simon Fraser.
474
475         <rdar://problem/13799726>
476
477         * WebProcess/WebPage/WebPage.cpp:
478         (WebKit::WebPage::setThrottled):
479         (WebKit):
480         * WebProcess/WebPage/WebPage.h:
481         (WebPage):
482             - Added setThrottled, forwards to WebCore::Page.
483         * WebProcess/WebProcess.cpp:
484         (WebKit):
485         (WebKit::WebProcess::setProcessSuppressionEnabled):
486         * WebProcess/WebProcess.h:
487         (WebProcess):
488             - Intercept calls to setProcessSuppressionEnabled, also mark all pages as being throttled.
489
490 2013-05-15  Anders Carlsson  <andersca@apple.com>
491
492         WKPageGetPluginInformationDisplayNameKey doesn't return the right key
493         https://bugs.webkit.org/show_bug.cgi?id=116188
494
495         Reviewed by Andreas Kling.
496
497         * UIProcess/API/C/WKPage.cpp:
498         (WKPageGetPluginInformationDisplayNameKey):
499
500 2013-05-15  Alexey Proskuryakov  <ap@apple.com>
501
502         More fixing after WebProcessShim renaming in r149074.
503
504         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
505         (WebContentServiceInitializer): Updated a comment to mention the shim by its new name.
506
507 2013-05-15  Alexey Proskuryakov  <ap@apple.com>
508
509         <rdar://problem/13902706> Lion: com.apple.tsm.uiserver sandbox error in Console when
510         launching Safari
511
512         Reviewed by Anders Carlsson.
513
514         * WebProcess/com.apple.WebProcess.sb.in: Silence the violation.
515
516 2013-05-13  Anders Carlsson  <andersca@apple.com>
517
518         Frame::editor() should return a reference
519         https://bugs.webkit.org/show_bug.cgi?id=116037
520
521         Reviewed by Darin Adler.
522
523         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
524         (WebKit::WebContextMenuClient::searchWithGoogle):
525         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
526         (WebKit::WebEditorClient::updateGlobalSelection):
527         * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
528         (WebKit::WebEditorClient::handleInputMethodKeydown):
529         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
530         (WebKit::WebEditorClient::executePendingEditorCommands):
531         (WebKit::WebEditorClient::handleKeyboardEvent):
532         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
533         (WebKit::WebContextMenuClient::searchWithGoogle):
534         (WebKit::WebContextMenuClient::searchWithSpotlight):
535         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
536         (WebKit::changeWordCase):
537         * WebProcess/WebPage/WebFrame.cpp:
538         (WebKit::WebFrame::selectionAsString):
539         (WebKit::WebFrame::setTextDirection):
540         * WebProcess/WebPage/WebPage.cpp:
541         (WebKit::WebPage::editorState):
542         (WebKit::WebPage::executeEditingCommand):
543         (WebKit::WebPage::isEditingCommandEnabled):
544         (WebKit::WebPage::validateCommand):
545         (WebKit::WebPage::handleEditingKeyboardEvent):
546         (WebKit::WebPage::advanceToNextMisspelling):
547         (WebKit::WebPage::uppercaseWord):
548         (WebKit::WebPage::lowercaseWord):
549         (WebKit::WebPage::capitalizeWord):
550         (WebKit::WebPage::replaceSelectionWithText):
551         (WebKit::WebPage::handleAlternativeTextUIResult):
552         (WebKit::WebPage::setCompositionForTesting):
553         (WebKit::WebPage::hasCompositionForTesting):
554         (WebKit::WebPage::confirmCompositionForTesting):
555         (WebKit::WebPage::setComposition):
556         (WebKit::WebPage::cancelComposition):
557         * WebProcess/WebPage/efl/WebPageEfl.cpp:
558         (WebKit::WebPage::confirmComposition):
559         (WebKit::WebPage::setComposition):
560         (WebKit::WebPage::cancelComposition):
561         * WebProcess/WebPage/mac/WebPageMac.mm:
562         (WebKit::WebPage::executeKeypressCommandsInternal):
563         (WebKit::WebPage::handleEditingKeyboardEvent):
564         (WebKit::WebPage::setComposition):
565         (WebKit::WebPage::confirmComposition):
566         (WebKit::WebPage::cancelComposition):
567         (WebKit::WebPage::insertText):
568         (WebKit::WebPage::insertDictatedText):
569         (WebKit::WebPage::getMarkedRange):
570         (WebKit::WebPage::firstRectForCharacterRange):
571         (WebKit::WebPage::readSelectionFromPasteboard):
572         (WebKit::WebPage::getStringSelectionForPasteboard):
573         (WebKit::WebPage::getDataSelectionForPasteboard):
574
575 2013-05-15  Anders Carlsson  <andersca@apple.com>
576
577         Need a way for NPAPI plug-ins to open preference panes
578         https://bugs.webkit.org/show_bug.cgi?id=116173
579         <rdar://problem/13503848>
580
581         Reviewed by Sam Weinig.
582
583         * PluginProcess/PluginControllerProxy.h:
584         Add openPluginPreferencePane().
585
586         * PluginProcess/mac/PluginControllerProxyMac.mm:
587         (WebKit::PluginControllerProxy::openPluginPreferencePane):
588         Send OpenPluginPreferencePane to the UI process.
589
590         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
591         (WebKit::NetscapePluginModule::getPluginInfo):
592         Get the preference pane path.
593         
594         * Shared/Plugins/PluginModuleInfo.h:
595         Add preferencePanePath member variable.
596
597         * UIProcess/Plugins/PluginProcessProxy.h:
598         Add openPluginPreferencePane message handler.
599
600         * UIProcess/Plugins/PluginProcessProxy.messages.in:
601         ADd OpenPluginPreferencePane message.
602
603         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
604         (WebKit::PluginProcessProxy::openPluginPreferencePane):
605         Get the path to the preference pane and use LS to open it.
606
607         * WebKit2.xcodeproj/project.pbxproj:
608         Add new files.
609
610         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
611         (WebKit::NPN_GetValue):
612         Handle WKNVPlugInContainer.
613
614         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
615         Add WKNVPlugInContainer member variable.
616
617         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
618         (WebKit::NetscapePlugin::openPluginPreferencePane):
619         Call through to the plug-in controller.
620
621         (WebKit::NetscapePlugin::plugInContainer):
622         Create a WKNPAPIPlugInContainer object if necessary.
623
624         (WebKit::NetscapePlugin::platformDestroy):
625         Invalidate the WKNPAPIPlugInContainer object.
626
627         * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.h:
628         New file with the protocol definition.
629
630         * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.mm:
631         (-[WKNPAPIPlugInContainer dealloc]):
632         Assert that the plug-in is null (that we've been invalidated).
633
634         (-[WKNPAPIPlugInContainer _invalidate]):
635         Set the plug-in to null.
636
637         (-[WKNPAPIPlugInContainer openPlugInPreferencePane]):
638         Call through to the plug-in.
639
640         * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainerInternal.h:
641         New file with the interface declaration for the object that implements the protocol.
642
643         * WebProcess/Plugins/PluginController.h:
644         Add openPluginPreferencePane member function.
645
646         * WebProcess/Plugins/PluginView.cpp:
647         (WebKit::PluginView::openPluginPreferencePane):
648         Add stub; this should never be called since we always go through the UI process.
649
650 2013-05-15  Alexey Proskuryakov  <ap@apple.com>
651
652         [WK2][Mac] Split resetTextInputState into two functions
653         https://bugs.webkit.org/show_bug.cgi?id=116174
654
655         Reviewed by Anders Carlsson.
656
657         Splitting resetTextInputState into resetSecureInputState and
658         notifyInputContextAboutDiscardedComposition, paving the way for a fix where these
659         won't be happening simultaneously.
660
661         * UIProcess/API/mac/PageClientImpl.h:
662         * UIProcess/API/mac/PageClientImpl.mm:
663         (WebKit::PageClientImpl::resetSecureInputState):
664         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
665         * UIProcess/API/mac/WKView.mm:
666         (-[WKView resignFirstResponder]):
667         (-[WKView _resetSecureInputState]):
668         (-[WKView _notifyInputContextAboutDiscardedComposition]):
669         * UIProcess/API/mac/WKViewInternal.h:
670         * UIProcess/PageClient.h:
671         * UIProcess/WebPageProxy.cpp:
672         (WebKit::WebPageProxy::didCommitLoadForFrame):
673
674 2013-05-15  Carlos Garcia Campos  <cgarcia@igalia.com>
675
676         [GTK] Add padding to all public class structs for future expansion without breaking ABI
677         https://bugs.webkit.org/show_bug.cgi?id=112565
678
679         Reviewed by Anders Carlsson.
680
681         Use 4 pointers for most of the classes that are unlikely to grow
682         and 8 for WebKitWebView and WebKitWebContext.
683
684         * UIProcess/API/gtk/WebKitBackForwardList.h:
685         (_WebKitBackForwardListClass):
686         * UIProcess/API/gtk/WebKitBackForwardListItem.h:
687         (_WebKitBackForwardListItemClass):
688         * UIProcess/API/gtk/WebKitContextMenu.h:
689         (_WebKitContextMenuClass):
690         * UIProcess/API/gtk/WebKitContextMenuItem.h:
691         (_WebKitContextMenuItemClass):
692         * UIProcess/API/gtk/WebKitCookieManager.h:
693         (_WebKitCookieManagerClass):
694         * UIProcess/API/gtk/WebKitDownload.h:
695         (_WebKitDownloadClass):
696         * UIProcess/API/gtk/WebKitFaviconDatabase.h:
697         (_WebKitFaviconDatabaseClass):
698         * UIProcess/API/gtk/WebKitFileChooserRequest.h:
699         (_WebKitFileChooserRequestClass):
700         * UIProcess/API/gtk/WebKitFindController.h:
701         (_WebKitFindControllerClass):
702         * UIProcess/API/gtk/WebKitFormSubmissionRequest.h:
703         (_WebKitFormSubmissionRequestClass):
704         * UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h:
705         (_WebKitGeolocationPermissionRequestClass):
706         * UIProcess/API/gtk/WebKitHitTestResult.h:
707         (_WebKitHitTestResultClass):
708         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
709         (_WebKitNavigationPolicyDecisionClass):
710         * UIProcess/API/gtk/WebKitPlugin.h:
711         (_WebKitPluginClass):
712         * UIProcess/API/gtk/WebKitPolicyDecision.h:
713         (_WebKitPolicyDecisionClass):
714         * UIProcess/API/gtk/WebKitPrintOperation.h:
715         (_WebKitPrintOperationClass):
716         * UIProcess/API/gtk/WebKitResponsePolicyDecision.h:
717         (_WebKitResponsePolicyDecisionClass):
718         * UIProcess/API/gtk/WebKitSecurityManager.h:
719         (_WebKitSecurityManagerClass):
720         * UIProcess/API/gtk/WebKitSettings.h:
721         (_WebKitSettingsClass):
722         * UIProcess/API/gtk/WebKitURIRequest.h:
723         (_WebKitURIRequestClass):
724         * UIProcess/API/gtk/WebKitURIResponse.h:
725         (_WebKitURIResponseClass):
726         * UIProcess/API/gtk/WebKitURISchemeRequest.h:
727         (_WebKitURISchemeRequestClass):
728         * UIProcess/API/gtk/WebKitWebContext.h:
729         (_WebKitWebContextClass):
730         * UIProcess/API/gtk/WebKitWebInspector.h:
731         (_WebKitWebInspectorClass):
732         * UIProcess/API/gtk/WebKitWebResource.h:
733         (_WebKitWebResourceClass):
734         * UIProcess/API/gtk/WebKitWebView.h:
735         (_WebKitWebViewClass):
736         * UIProcess/API/gtk/WebKitWebViewBase.h:
737         (_WebKitWebViewBaseClass):
738         * UIProcess/API/gtk/WebKitWebViewGroup.h:
739         (_WebKitWebViewGroupClass):
740         * UIProcess/API/gtk/WebKitWindowProperties.h:
741         (_WebKitWindowPropertiesClass):
742
743 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
744
745         Remove WTF_USE_PLATFORM_STRATEGIES
746         https://bugs.webkit.org/show_bug.cgi?id=114431
747
748         Reviewed by Darin Adler.
749
750         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
751         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
752         * WebProcess/WebProcess.cpp:
753         (WebKit::WebProcess::WebProcess):
754
755 2013-05-14  Simon Cooper  <scooper@apple.com>
756
757         Add a preference that can disable the fake SYSV SHM shim
758         https://bugs.webkit.org/show_bug.cgi?id=116127
759         <rdar://problem/13810524>
760
761         Reviewed by Alexey Proskuryakov.
762
763         * PluginProcess/mac/PluginProcessShim.mm:
764         (WebKit::shim_disabled):
765         (WebKit::shim_shmdt):
766         (WebKit::shim_shmat):
767         (WebKit::shim_shmget):
768         (WebKit::shim_shmctl):
769
770 2013-05-14  Tim Horton  <timothy_horton@apple.com>
771
772         [wk2] Not updating tiled backing coverage when main frame scrollability changes
773         https://bugs.webkit.org/show_bug.cgi?id=116123
774         <rdar://problem/13836559>
775
776         Reviewed by Simon Fraser.
777
778         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
779         (TiledCoreAnimationDrawingArea):
780         Add updateMainFrameClipsToExposedRect.
781
782         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
783         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
784         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
785         Remove m_clipsToExposedRect. We don't actually need it.
786
787         (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
788         Call updateMainFrameClipsToExposedRect so that we can always update
789         tiled backing coverage and can factor out our calls to setClipsToExposedRect.
790
791         (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
792         Factor out setClipsToExposedRect calls to here, and also call
793         FrameView::adjustTiledBackingCoverage so that the FrameView's tiled
794         backing is informed to allow overdraw in the UI-process-scrolling case.
795
796         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
797         Use updateMainFrameClipsToExposedRect.
798
799 2013-05-14  Alexey Proskuryakov  <ap@apple.com>
800
801         [Mac] Add a testing shim for secure event input functions
802         https://bugs.webkit.org/show_bug.cgi?id=116122
803
804         Reviewed by Mark Rowe.
805
806         Moved DyldInterpose.h to WebCore, as we now use it there too.
807
808         * PluginProcess/mac/PluginProcessShim.mm:
809         * Shared/mac/CookieStorageShimLibrary.cpp:
810         * Shared/mac/DyldInterpose.h: Removed.
811         * WebKit2.xcodeproj/project.pbxproj:
812         * WebProcess/mac/SecItemShimLibrary.mm:
813
814 2013-05-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
815
816         [Win] REGRESSION(r149944): mmap is not available on Windows
817         https://bugs.webkit.org/show_bug.cgi?id=116015
818
819         Reviewed by Anders Carlsson.
820
821         Use fastAlloc/fastFree for platforms other than OS(DARWIN) where
822         using mmap is not necessary and maybe not available.
823
824         * Platform/CoreIPC/ArgumentEncoder.cpp:
825         (CoreIPC::allocBuffer):
826         (CoreIPC::freeBuffer):
827         (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
828         (CoreIPC::ArgumentEncoder::grow):
829
830 2013-05-14  Zan Dobersek  <zdobersek@igalia.com>
831
832         [GTK] Move generated ColorData.cpp, WebKitFontFamilyNames.(cpp|h) build targets into libPlatform
833         https://bugs.webkit.org/show_bug.cgi?id=115921
834
835         Reviewed by Gustavo Noronha Silva.
836
837         * GNUmakefile.am: Add platform_cppflags to the list of libwebkit2gtk CPPFLAGS.
838
839 2013-05-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
840
841         [WK2][Win] Fix ASSERT(DeleteTimerQueueTimer...)
842         https://bugs.webkit.org/show_bug.cgi?id=116039
843
844         Reviewed by Benjamin Poulain.
845
846         According to the documentation, DeleteTimerQueueTimer can be expected to return
847         false with an ERROR_IO_PENDING error when called from the timer's callback.
848
849         * Platform/win/WorkQueueWin.cpp:
850         (WorkQueue::timerCallback):
851
852 2013-05-14  Alexey Proskuryakov  <ap@apple.com>
853
854         Remove unused "type" field from DictionaryPopupInfo
855         https://bugs.webkit.org/show_bug.cgi?id=116011
856
857         Reviewed by Darin Adler.
858
859         It is unused, and furthermore, PDFPlugin sets it incorrectly anyway.
860
861         * Shared/DictionaryPopupInfo.cpp:
862         (WebKit::DictionaryPopupInfo::encode):
863         (WebKit::DictionaryPopupInfo::decode):
864         * Shared/DictionaryPopupInfo.h:
865         * WebProcess/Plugins/PDF/PDFPlugin.mm:
866         (WebKit::PDFPlugin::showDefinitionForAttributedString):
867         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
868         (WebKit::WebContextMenuClient::lookUpInDictionary):
869         * WebProcess/WebPage/WebPage.h:
870         * WebProcess/WebPage/mac/WebPageMac.mm:
871         (WebKit::WebPage::performDictionaryLookupAtLocation):
872         (WebKit::WebPage::performDictionaryLookupForSelection):
873         (WebKit::WebPage::performDictionaryLookupForRange):
874
875 2013-05-14  Michael Brüning  <michael.bruning@digia.com>
876
877         [WK2] Make WebPageProxy use deviceScaleFactor() in creationParameters().
878         https://bugs.webkit.org/show_bug.cgi?id=110218
879
880         Reviewed by Darin Adler.
881
882         Make the WebPageProxy::creationParameters use the accessor
883         deviceScaleFactor() instead of using m_intrinsicDeviceScaleFactor
884         directly. This will restore the custom device scale factor when
885         reattaching to the WebProcess after a crash.
886
887         Moreover, it will enable the Qt and ELF ports to use the
888         existing C API for overriding the device scale factor instead
889         of using the WebPageProxy directly or adding new C API to set
890         the intrinsic device scale factor.
891
892         * UIProcess/API/efl/EwkView.cpp:
893         (EwkView::setDeviceScaleFactor):
894         * UIProcess/API/qt/qquickwebpage.cpp:
895         (QQuickWebPage::updatePaintNode):
896         * UIProcess/WebPageProxy.cpp:
897         (WebKit::WebPageProxy::creationParameters):
898
899 2013-05-13  Alex Christensen  <achristensen@apple.com>
900
901         Added testRunner.setPrinting.
902         https://bugs.webkit.org/show_bug.cgi?id=42693
903         rdar://problem/8213845
904
905         Reviewed by Darin Adler.
906
907         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
908         (WKBundlePageCopyRenderTreeExternalRepresentationForPrinting): Added.
909         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
910         Added WKBundlePageCopyRenderTreeExternalRepresentationForPrinting declaration.
911         * WebProcess/WebPage/WebPage.cpp:
912         (WebKit::WebPage::renderTreeExternalRepresentationForPrinting): Added.
913         * WebProcess/WebPage/WebPage.h:
914         Added renderTreeExternalRepresentationForPrinting declaration.
915
916 2013-05-13  Timothy Hatcher  <timothy@apple.com>
917
918         Add support for updating the Web Inspector toolbar height.
919
920         https://bugs.webkit.org/show_bug.cgi?id=115996
921
922         Reviewed by Joseph Pecoraro and Benjamin Poulain.
923
924         * UIProcess/WebInspectorProxy.h:
925         (WebKit::WebInspectorProxy::setToolbarHeight):
926         (WebInspectorProxy):
927         * UIProcess/WebInspectorProxy.messages.in:
928         * UIProcess/efl/WebInspectorProxyEfl.cpp:
929         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
930         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
931         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
932         (WebKit):
933         * UIProcess/mac/WebInspectorProxyMac.mm:
934         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
935         * UIProcess/qt/WebInspectorProxyQt.cpp:
936         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
937         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
938         (WebKit::WebInspectorFrontendClient::setToolbarHeight):
939         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
940         (WebInspectorFrontendClient):
941         * WebProcess/WebPage/WebInspector.cpp:
942         (WebKit::WebInspector::setToolbarHeight):
943         * WebProcess/WebPage/WebInspector.h:
944
945 2013-05-13  Ryosuke Niwa  <rniwa@webkit.org>
946
947         Sometimes NSUndoManager can get into an inconsistent state
948         https://bugs.webkit.org/show_bug.cgi?id=116050
949
950         Reviewed by Enrica Casucci.
951
952         Always group undo items to work around a bug in NSUndoManager that manifests
953         when we call removeAllActionsWithTarget.
954
955         * UIProcess/API/mac/PageClientImpl.mm:
956         (WebKit::PageClientImpl::registerEditCommand):
957
958 2013-05-13  Anders Carlsson  <andersca@apple.com>
959
960         [WK2] Crash in WebKit::StorageAreaMap::didSetItem()
961         https://bugs.webkit.org/show_bug.cgi?id=116026
962
963         Reviewed by Andreas Kling.
964
965         Make sure that we ignore any leftover messages from the UI process after we've reset
966         the storage map. Achieve this by keeping a seed count in the StorageAreaMap object that's incremented
967         everytime the map is reset. Associate every storage area change with the seed and ignore any incoming 
968         notification messages from the UI process if the seeds are different.
969
970         * Platform/CoreIPC/HandleMessage.h:
971         (CoreIPC):
972         (CoreIPC::callMemberFunction):
973         * UIProcess/Storage/StorageManager.cpp:
974         (WebKit::StorageManager::getValues):
975         (WebKit::StorageManager::setItem):
976         (WebKit::StorageManager::removeItem):
977         (WebKit::StorageManager::clear):
978         * UIProcess/Storage/StorageManager.h:
979         (StorageManager):
980         * UIProcess/Storage/StorageManager.messages.in:
981         * WebProcess/Storage/StorageAreaMap.cpp:
982         (WebKit::StorageAreaMap::StorageAreaMap):
983         (WebKit::StorageAreaMap::setItem):
984         (WebKit::StorageAreaMap::removeItem):
985         (WebKit::StorageAreaMap::clear):
986         (WebKit::StorageAreaMap::resetValues):
987         (WebKit::StorageAreaMap::loadValuesIfNeeded):
988         (WebKit::StorageAreaMap::didGetValues):
989         (WebKit::StorageAreaMap::didSetItem):
990         (WebKit::StorageAreaMap::didRemoveItem):
991         (WebKit::StorageAreaMap::didClear):
992         (WebKit::StorageAreaMap::applyChange):
993         * WebProcess/Storage/StorageAreaMap.h:
994         (StorageAreaMap):
995         * WebProcess/Storage/StorageAreaMap.messages.in:
996
997 2013-05-13  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
998
999         [WK2][CoordinatedGraphics] Avoid dispensable calls to WebView::updateViewportSize()
1000         https://bugs.webkit.org/show_bug.cgi?id=116045
1001
1002         Reviewed by Darin Adler.
1003
1004         * UIProcess/CoordinatedGraphics/WebView.cpp:
1005         (WebKit::WebView::setSize):
1006
1007 2013-05-13  Jon Lee  <jonlee@apple.com>
1008
1009         [WK2] Notification manager removal should not be tied to termination of web processes
1010         https://bugs.webkit.org/show_bug.cgi?id=116038
1011         <rdar://problem/10968680>
1012
1013         Reviewed by Ryosuke Niwa.
1014
1015         WebNotificationManagerProxy incorrectly removes the manager when web processes close.
1016         Since it is a supplemental on the web context, the manager should only be removed
1017         when the context is destroyed.
1018
1019         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
1020         * UIProcess/Notifications/WebNotificationManagerProxy.h: Remove implementation of
1021         processDidClose().
1022
1023 2013-05-13  Martin Robinson  <mrobinson@igalia.com>
1024
1025         [GTK] [WebKit2] Use a template file for generated GObject enum files
1026         https://bugs.webkit.org/show_bug.cgi?id=115867
1027
1028         Reviewed by Carlos Garcia Campos.
1029
1030         * GNUmakefile.am: Use a template file instead of specifying portions of the file on the command-line.
1031         * UIProcess/API/gtk/WebKitEnumTypes.cpp.template: Added.
1032         * UIProcess/API/gtk/WebKitEnumTypes.h.template: Added.
1033         * UIProcess/API/gtk/WebKitFindController.cpp: We can no longer rely on WebKitEnumTypes.h to pull in WebKitWebView.h.
1034
1035 2013-05-13  Noam Rosenthal  <noam@webkit.org>
1036
1037         [CoordGfx] requestAnimationFrame performance issues
1038         https://bugs.webkit.org/show_bug.cgi?id=112345
1039
1040         Reviewed by Jocelyn Turcotte.
1041
1042         Changed the logic of requestAnimationFrame in Coordinated Graphics.
1043         We don't send any IPC messages for requestAnimationFrame. Instead, we do one of two things:
1044         - If there is already a frame pending in the UI process, do nothing, as the animations would
1045           be serviced when the frame is returned to the web process.
1046         - If there is no frame pending, we schedule a flush, making sure that that flush occurs at 
1047           least 1/60 seconds after the last animation service, so that we don't get an infinite loop
1048           of flushes.
1049
1050         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
1051         (WebKit::CoordinatedLayerTreeHostProxy::requestAnimationFrame):
1052         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1053         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1054         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1055         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
1056         (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
1057         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1058         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in:
1059
1060 2013-05-13  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
1061
1062         [WK2][CoordinatedGraphics] WKView needs API for handling opacity
1063         https://bugs.webkit.org/show_bug.cgi?id=116032
1064
1065         Reviewed by Kenneth Rohde Christiansen.
1066
1067         Add WKViewSetOpacity and WKViewOpacity APIs and use them in
1068         WebView.cpp.
1069
1070         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
1071         (WKViewSetOpacity):
1072         (WKViewOpacity):
1073         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
1074         * UIProcess/CoordinatedGraphics/WebView.cpp:
1075         (WebKit::WebView::WebView):
1076         (WebKit::WebView::paintToCurrentGLContext):
1077         * UIProcess/CoordinatedGraphics/WebView.h:
1078         (WebKit::WebView::setOpacity):
1079         (WebKit::WebView::opacity):
1080         (WebView):
1081
1082 2013-05-13  Zan Dobersek  <zdobersek@igalia.com>
1083
1084         [GTK] Use WebCore layer archives for TestWebCore, WebKitPluginProcess
1085         https://bugs.webkit.org/show_bug.cgi?id=115918
1086
1087         Reviewed by Gustavo Noronha Silva.
1088
1089         Due to layer violations and circular dependencies the WebKitPluginProcess requires for the
1090         libraries containing the built code of the intertwining Platform and WebCore layers to be
1091         specified multiple times when linking. This can be avoided by packing the two layers' archives
1092         into one big archive, named after the WebCore layer due to no clear boundary between it and the
1093         Platform layer. The big archive can then be specified only once when linking, simplifying the code
1094         and suppressing all the layering violations so they do not cause build problems.
1095
1096         First the libtool libraries that the WebCore layer (as required by the WebKitPluginProcess) depends on
1097         are specified. These are then used as dependencies for the archive creation rule as well as the list
1098         from which the archive file paths are constructed and then used to dump the member files from these archives.
1099         The member files are then added to the big archive. The latter is added to the list of libraries the
1100         WebKitPluginProcess requires to successfully link.
1101
1102         * GNUmakefile.am:
1103
1104 2013-05-13  Zalan Bujtas  <zalan@apple.com>
1105
1106         WebProcess consuming very high CPU on linkedin.com
1107         https://bugs.webkit.org/show_bug.cgi?id=115601
1108
1109         Reviewed by Andreas Kling.
1110
1111         Disable WEB_TIMING_MINIMAL.
1112         Turn off window.performance and performance.now(). Some JS frameworks expect
1113         additional Web Timing APIs, when performance.now() is available.
1114
1115         * Configurations/FeatureDefines.xcconfig:
1116
1117 2013-05-12  Anders Carlsson  <andersca@apple.com>
1118
1119         Stop including UnusedParam.h
1120         https://bugs.webkit.org/show_bug.cgi?id=116003
1121
1122         Reviewed by Sam Weinig.
1123
1124         UnusedParam.h is empty now so there's no need to include it anymore.
1125
1126         * UIProcess/API/C/WKContext.cpp:
1127         * UIProcess/API/C/WKInspector.cpp:
1128         * UIProcess/API/C/WKPage.cpp:
1129         * UIProcess/API/efl/ewk_text_checker.cpp:
1130         * UIProcess/API/efl/ewk_view.cpp:
1131         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
1132         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1133         * UIProcess/mac/WKFullScreenWindowController.mm:
1134         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1135         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
1136
1137 2013-05-12  Andreas Kling  <akling@apple.com>
1138
1139         Unload event listeners should prevent Safari from insta-killing the web process on last tab close.
1140         <http://webkit.org/b/115988>
1141         <rdar://problem/13870943>
1142
1143         Reviewed by Anders Carlsson.
1144
1145         Let WebCore control the UI process's suppression of the sudden termination mechanism.
1146         This is implemented by having WebChromeClient push Enable/DisableSuddenTermination messages
1147         over to the UI process where the appropriate NSProcessInfo calls are made.
1148
1149         We also use this information when deciding whether to insta-kill a web process when its last
1150         page is closed. This mechanism is re-usable in WebCore to protect against sudden termination
1151         by the UI process.
1152
1153         * UIProcess/WebProcessProxy.cpp:
1154         (WebKit::WebProcessProxy::WebProcessProxy):
1155         (WebKit::WebProcessProxy::removeWebPage):
1156         (WebKit::WebProcessProxy::enableSuddenTermination):
1157         (WebKit::WebProcessProxy::disableSuddenTermination):
1158         * UIProcess/WebProcessProxy.h:
1159         (WebProcessProxy):
1160         * UIProcess/WebProcessProxy.messages.in:
1161         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1162         (WebKit::WebChromeClient::enableSuddenTermination):
1163         (WebKit::WebChromeClient::disableSuddenTermination):
1164         * WebProcess/WebCoreSupport/WebChromeClient.h:
1165         (WebChromeClient):
1166
1167 2013-05-12  Alexey Proskuryakov  <ap@apple.com>
1168
1169         <rdar://problem/13402976> Sandbox violations in com.nvidia.OpenGL on Lion.
1170
1171         Reviewed by Dan Bernstein.
1172
1173         * WebProcess/com.apple.WebProcess.sb.in: Silence the violations (on Lion only).
1174
1175 2013-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1176
1177         [GTK] Remove unnecessary GTK_CHECK_VERSION #ifdefs
1178         https://bugs.webkit.org/show_bug.cgi?id=115914
1179
1180         Reviewed by Martin Robinson.
1181
1182         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1183         (webkitWebViewBaseRealize):
1184
1185 2013-05-12  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
1186
1187         Unreviewed build fix after r149944.
1188
1189         * Platform/CoreIPC/ArgumentEncoder.cpp: Include <sys/mman.h> for mmap(2).
1190
1191 2013-05-11  Anders Carlsson  <andersca@apple.com>
1192
1193         Don't pass malloced pointers as out-of-line data when sending Mach messages
1194         https://bugs.webkit.org/show_bug.cgi?id=115970
1195         <rdar://problem/13144680>
1196
1197         Reviewed by Sam Weinig.
1198
1199         Give ArgumentEncoder an inline buffer of 512 bytes. If we need more than that, use mmap to allocate data
1200         since that gives us fresh zero-filled memory that we can safely share.
1201
1202         * Platform/CoreIPC/ArgumentEncoder.cpp:
1203         (CoreIPC::ArgumentEncoder::ArgumentEncoder):
1204         Set up the buffer pointers to point to the inline buffer.
1205
1206         (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
1207         Unmap the buffer if necessary.
1208
1209         (CoreIPC::ArgumentEncoder::grow):
1210         Grow the allocation exponentially, rounded up to the nearest page. This is a simplification from the
1211         current strategy, but most messages are either tiny in which case they will fit inside the inline buffer,
1212         or big in which case we'll end up doing less allocations + memory copying.
1213
1214         * Platform/CoreIPC/ArgumentEncoder.h:
1215         (ArgumentEncoder):
1216
1217 2013-05-11  Zan Dobersek  <zdobersek@igalia.com>
1218
1219         Unreviewed GTK build fix after r149904.
1220
1221         * GNUmakefile.list.am: Adding missing build targets.
1222
1223 2013-05-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1224
1225         Unreviewed, Fix WK2 EFL build after r149904.
1226
1227         Add new PluginInformation.cpp file to CMake.
1228
1229         * CMakeLists.txt:
1230
1231 2013-05-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1232
1233         Unreviewed, fix WK2 EFL build after r149904.
1234
1235         Add new WKPluginInformation.cpp file to CMake.
1236
1237         * CMakeLists.txt:
1238
1239 2013-05-11  Andreas Kling  <akling@apple.com>
1240
1241         When possible, terminate web processes immediately when closing their last page.
1242         <http://webkit.org/b/115964>
1243         <rdar://problem/13869266>
1244
1245         Reviewed by Geoffrey Garen.
1246
1247         When we're using a network process, there's no need for the UI process to wait for web processes
1248         to clear resource caches and terminate nicely.
1249
1250         We can just kill them off right away in WebProcessProxy::removeWebPage() when the last page is closed.
1251
1252         * UIProcess/WebProcessProxy.cpp:
1253         (WebKit::WebProcessProxy::removeWebPage):
1254
1255             Terminate the child process immediately if possible.
1256
1257         * UIProcess/WebProcessProxy.h:
1258         (WebKit::WebProcessProxy::canTerminateChildProcess):
1259         (WebKit::WebProcessProxy::shouldTerminate):
1260
1261             Broke out the logic from the shouldTerminate() IPC message handler into a separate function
1262             so we can call it from removeWebPage().
1263
1264 2013-05-11  Anders Carlsson  <andersca@apple.com>
1265
1266         Crash when terminating a process that has not been fully launched
1267         https://bugs.webkit.org/show_bug.cgi?id=115962
1268         <rdar://problem/13660916>
1269
1270         Reviewed by Andreas Kling.
1271
1272         Handle terminating a process that has not been fully launched.
1273
1274         * UIProcess/Launcher/ProcessLauncher.cpp:
1275         (WebKit::ProcessLauncher::didFinishLaunchingProcess):
1276         If we have been invalidated, dispose the connection identifier.
1277
1278         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1279         (WebKit::ProcessLauncher::terminateProcess):
1280         If we're still launching the process, invalidate so the client won't get an unexpected
1281         didFinishLaunching callback.
1282
1283         * UIProcess/WebProcessProxy.cpp:
1284         (WebKit::WebProcessProxy::requestTermination):
1285         Check if webConnection() is null before calling it. (It will be null if the process isn't fully launched).
1286
1287 2013-05-10  Brian J. Burg  <burg@cs.washington.edu>
1288
1289         Web Inspector: Implement WK2 version of WebInspectorFrontendClient::save
1290         https://bugs.webkit.org/show_bug.cgi?id=115564
1291
1292         Reviewed by Benjamin Poulain.
1293
1294         Implement InspectorFrontendHost's save() and append() methods for
1295         Mac WebKit2. Add canSave() for all ports.
1296
1297         * UIProcess/WebInspectorProxy.cpp:
1298         (WebKit::WebInspectorProxy::save):
1299         (WebKit):
1300         (WebKit::WebInspectorProxy::append):
1301         * UIProcess/WebInspectorProxy.h:
1302         (WebInspectorProxy):
1303         * UIProcess/WebInspectorProxy.messages.in:
1304         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1305         (WebKit::WebInspectorProxy::platformSave):
1306         (WebKit):
1307         (WebKit::WebInspectorProxy::platformAppend):
1308         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1309         (WebKit::WebInspectorProxy::platformSave):
1310         (WebKit):
1311         (WebKit::WebInspectorProxy::platformAppend):
1312         * UIProcess/mac/WebInspectorProxyMac.mm:
1313         (WebKit::WebInspectorProxy::platformSave):
1314         (WebKit):
1315         (WebKit::WebInspectorProxy::platformAppend):
1316         * UIProcess/qt/WebInspectorProxyQt.cpp:
1317         (WebKit::WebInspectorProxy::platformSave):
1318         (WebKit):
1319         (WebKit::WebInspectorProxy::platformAppend):
1320         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
1321         (WebKit::WebInspectorFrontendClient::canSave):
1322         (WebKit):
1323         (WebKit::WebInspectorFrontendClient::save):
1324         (WebKit::WebInspectorFrontendClient::append):
1325         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
1326         (WebInspectorFrontendClient):
1327         * WebProcess/WebPage/WebInspector.cpp:
1328         (WebKit::WebInspector::save):
1329         (WebKit):
1330         (WebKit::WebInspector::append):
1331         (WebKit::WebInspector::didSave):
1332         (WebKit::WebInspector::didAppend):
1333         * WebProcess/WebPage/WebInspector.h:
1334         (WebInspector):
1335         * WebProcess/WebPage/WebInspector.messages.in:
1336         * WebProcess/WebPage/efl/WebInspectorEfl.cpp:
1337         (WebKit::WebInspector::canSave):
1338         (WebKit):
1339         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
1340         (WebKit::WebInspector::canSave):
1341         (WebKit):
1342         * WebProcess/WebPage/mac/WebInspectorMac.mm:
1343         (WebKit::WebInspector::canSave):
1344         (WebKit):
1345         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
1346         (WebKit::WebInspector::canSave):
1347         (WebKit):
1348
1349 2013-05-10  Remy Demarest  <rdemarest@apple.com>
1350
1351         Copy WKPluginInformation.h header to the WebKit2 Framework private headers.
1352         https://bugs.webkit.org/show_bug.cgi?id=115940
1353
1354         Reviewed by Darin Adler.
1355
1356         * WebKit2.xcodeproj/project.pbxproj:
1357         Move WKPluginInformation.h file from the framework's Project Headers to
1358         Private Headers.
1359
1360 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1361
1362         [Qt][Mac] Unreviewed. Roll out the fix attempt in r149912.
1363
1364         * Target.pri:
1365
1366 2013-05-10  Simon Cooper  <scooper@apple.com>
1367
1368         Fix AppleConnect issues for WiFi interfaces
1369         <rdar://problem/13776227&13776240&13776281>
1370         https://bugs.webkit.org/show_bug.cgi?id=115932
1371
1372         Reviewed by Alexey Proskuryakov.
1373
1374         Add support for WiFi interfaces for the AppleConnect plugin.
1375         Remove the FIXME.
1376
1377         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
1378
1379 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1380
1381         [Qt][Mac] Unreviewed speculative build fix after r149904.
1382
1383         * Target.pri:
1384
1385 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1386
1387         [Qt] Unreviewed buildfix after r149904.
1388
1389         * Target.pri:
1390
1391 2013-05-09  Sam Weinig  <sam@webkit.org>
1392
1393         Unify plug-in information dictionaries
1394         <rdar://problem/13852080>
1395         https://bugs.webkit.org/show_bug.cgi?id=115891
1396
1397         Reviewed by Anders Carlsson.
1398
1399         This unifies the plug-in information dictionaries vended by WKContextCopyPlugInInfoForBundleIdentifier
1400         and WKContextGetInfoForInstalledPlugIns with those from the WKPageLoaderClient and WKPageUIClient.
1401
1402         All the old keys will continue to work, but have been deprecated in favor of new keys defined in 
1403         WKPluginInformation.h
1404
1405         * Shared/API/c/WKPluginInformation.cpp: Added.
1406         * Shared/API/c/WKPluginInformation.h: Added.
1407         Export new keys as SPI.
1408
1409         * Shared/Plugins/Netscape/PluginInformation.h: Added.
1410         * Shared/Plugins/Netscape/PluginInformation.cpp: Added.
1411         (WebKit::pluginInformationBundleIdentifierKey):
1412         (WebKit::pluginInformationBundleVersionKey):
1413         (WebKit::pluginInformationPathKey):
1414         (WebKit::pluginInformationDisplayNameKey):
1415         (WebKit::pluginInformationDefaultLoadPolicyKey):
1416         (WebKit::pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
1417         (WebKit::pluginInformationHasSandboxProfileKey):
1418         (WebKit::pluginInformationFrameURLKey):
1419         (WebKit::pluginInformationMIMETypeKey):
1420         (WebKit::pluginInformationPageURLKey):
1421         (WebKit::pluginInformationPluginspageAttributeURLKey):
1422         (WebKit::pluginInformationPluginURLKey):
1423         Add new keys.
1424
1425         (WebKit::pluginModuleInformation):
1426         (WebKit::createPluginInformationDictionary):
1427         Add creation functions to simplify multiple sites.
1428
1429         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm: Added.
1430         (WebKit::platformPluginModuleInformation):
1431         Add platform specific data to the dictionary.
1432
1433         * UIProcess/API/C/WKPage.cpp:
1434         (WKPageGetPluginInformationBundleIdentifierKey):
1435         (WKPageGetPluginInformationBundleVersionKey):
1436         (WKPageGetPluginInformationDisplayNameKey):
1437         (WKPageGetPluginInformationFrameURLKey):
1438         (WKPageGetPluginInformationMIMETypeKey):
1439         (WKPageGetPluginInformationPageURLKey):
1440         (WKPageGetPluginInformationPluginspageAttributeURLKey):
1441         (WKPageGetPluginInformationPluginURLKey):
1442         * UIProcess/API/C/WKPage.h:
1443         Deprecate the old keys.
1444
1445         * UIProcess/API/C/mac/WKContextPrivateMac.h:
1446         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
1447         (WKContextCopyPlugInInfoForBundleIdentifier):
1448         (WKContextGetInfoForInstalledPlugIns):
1449         Simplify by using the new createPluginInformationDictionary functions.
1450
1451         (WKPlugInInfoPathKey):
1452         (WKPlugInInfoBundleIdentifierKey):
1453         (WKPlugInInfoVersionKey):
1454         (WKPlugInInfoLoadPolicyKey):
1455         (WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey):
1456         (WKPlugInInfoIsSandboxedKey):
1457         Deprecate the old keys.
1458
1459         * UIProcess/WebLoaderClient.cpp:
1460         (WebKit::WebLoaderClient::didFailToInitializePlugin):
1461         (WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
1462         (WebKit::WebLoaderClient::pluginLoadPolicy):
1463         * UIProcess/WebLoaderClient.h:
1464         * UIProcess/WebUIClient.cpp:
1465         (WebKit::WebUIClient::unavailablePluginButtonClicked):
1466         * UIProcess/WebUIClient.h:
1467         Optimize for the most recent callback type which takes a dictionary,
1468         and pull out the necessary bits from it for deprecated callbacks as necessary.
1469
1470         * UIProcess/WebPageProxy.h:
1471         * UIProcess/WebPageProxy.cpp:
1472         (WebKit::WebPageProxy::findPlugin):
1473         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
1474         (WebKit::WebPageProxy::didFailToInitializePlugin):
1475         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
1476         Use createPluginInformationDictionary() consistently, to get consistent results for callbacks.
1477
1478         * WebKit2.xcodeproj/project.pbxproj:
1479         Add new files.
1480
1481 2013-05-10  Brian J. Burg  <burg@cs.washington.edu>
1482
1483         Web Inspector: implement runOpenPanel callback for WebKit2 inspector
1484         https://bugs.webkit.org/show_bug.cgi?id=115865
1485
1486         Reviewed by Sam Weinig.
1487
1488         * UIProcess/WebInspectorProxy.h:
1489         (WebKit::WebInspectorProxy::inspectorWindow):
1490         Add an accessor for m_inspectorWindow.
1491
1492         * UIProcess/mac/WebInspectorProxyMac.mm:
1493         (WebKit::runOpenPanel):
1494         Show the open panel dialog when requested.
1495
1496         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1497         Register the callback when the inspector page is created.
1498
1499 2013-05-10  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
1500
1501         [WK2][CoordinatedGraphics] WKViewSetThemePath is EFL specific
1502         https://bugs.webkit.org/show_bug.cgi?id=115928
1503
1504         Reviewed by Kenneth Rohde Christiansen.
1505
1506         WKViewSetThemePath was moved to WKViewEfl.h since it is EFL specific.
1507
1508         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
1509         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
1510         * UIProcess/API/C/efl/WKViewEfl.cpp:
1511         (WKViewSetThemePath):
1512         * UIProcess/API/C/efl/WKViewEfl.h:
1513         * UIProcess/CoordinatedGraphics/WebView.cpp:
1514         * UIProcess/CoordinatedGraphics/WebView.h:
1515         (WebView):
1516         * UIProcess/efl/ViewClientEfl.cpp:
1517         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1518         * UIProcess/efl/WebViewEfl.cpp:
1519         (WebKit::WebViewEfl::setThemePath):
1520         * UIProcess/efl/WebViewEfl.h:
1521         (WebViewEfl):
1522
1523 2013-05-10  Jer Noble  <jer.noble@apple.com>
1524
1525         REGRESSION (r149439): Video turns blank upon entering full screen for the first time
1526         https://bugs.webkit.org/show_bug.cgi?id=115617
1527
1528         Reviewed by Eric Carlson.
1529
1530         Partially revert the change introduced in r149439 for OS X 10.8 and previous. On these
1531         platforms, create a window with a NSZeroSize initial frame, which fixes the "blank"
1532         first-full screen behavior.
1533
1534         * UIProcess/API/mac/WKView.mm:
1535         (-[WKView createFullScreenWindow]):
1536
1537 2013-05-10  Zan Dobersek  <zdobersek@igalia.com>
1538
1539         [WK2] Make the WebSoupRequestManager a supplement to the WebProcess
1540         https://bugs.webkit.org/show_bug.cgi?id=115717
1541
1542         Reviewed by Andreas Kling.
1543
1544         WebSoupRequestManager should inherit from WebProcessSupplement and should be used as such
1545         by the WebProcess. This removes the need for the m_soupRequestManager member variable in
1546         the WebProcess class and brings the WebSoupRequestManager in line with other manager classes
1547         of which instances are controlled by the WebProcess class.
1548
1549         * WebProcess/WebProcess.cpp:
1550         (WebKit::WebProcess::WebProcess): Add  the WebSoupRequestManager as a supplement.
1551         * WebProcess/WebProcess.h:
1552         (WebProcess): Remove the m_soupRequestManager member variable and its getter method.
1553         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
1554         (webkitSoupRequestGenericSendAsync): Access the WebSoupRequestManager as a supplement.
1555         (webkitSoupRequestGenericSendFinish): Ditto.
1556         * WebProcess/soup/WebProcessSoup.cpp:
1557         (WebKit::WebProcess::platformInitializeWebProcess): Access the WebSoupRequestManager as a supplement.
1558         * WebProcess/soup/WebSoupRequestManager.cpp:
1559         (WebKit::WebSoupRequestManager::supplementName): Specify the supplement's name.
1560         * WebProcess/soup/WebSoupRequestManager.h:
1561         (WebSoupRequestManager): Inherit from the WebProcessSupplement interface.
1562
1563 2013-05-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1564
1565         [GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
1566         https://bugs.webkit.org/show_bug.cgi?id=115904
1567
1568         Reviewed by Martin Robinson.
1569
1570         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
1571         (startTestServerMonitor):
1572         * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:
1573         (startTestServerMonitor):
1574
1575 2013-05-09  Anders Carlsson  <andersca@apple.com>
1576
1577         Fix build.
1578
1579         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
1580
1581 2013-05-09  Anders Carlsson  <andersca@apple.com>
1582
1583         Enable UI process storage
1584         https://bugs.webkit.org/show_bug.cgi?id=115879
1585         <rdar://problem/12239765>
1586
1587         Reviewed by Beth Dakin.
1588
1589         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1590         Flip the switch.
1591
1592 2013-05-09  Anders Carlsson  <andersca@apple.com>
1593
1594         Remove extra spaces between right angle brackets in template declarations
1595         https://bugs.webkit.org/show_bug.cgi?id=115877
1596
1597         Reviewed by Beth Dakin.
1598
1599         C++11 doesn't require spaces between right angle brackets so remove all of them.
1600
1601         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1602         (WebKit::NetworkBlobRegistry::registerBlobURL):
1603         (WebKit::NetworkBlobRegistry::sandboxExtensions):
1604         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
1605         (NetworkBlobRegistry):
1606         * NetworkProcess/HostRecord.h:
1607         (HostRecord):
1608         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1609         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
1610         (WebKit::NetworkConnectionToWebProcess::didClose):
1611         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
1612         * NetworkProcess/NetworkConnectionToWebProcess.h:
1613         (NetworkConnectionToWebProcess):
1614         * NetworkProcess/NetworkProcess.h:
1615         (NetworkProcess):
1616         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
1617         (WebKit::NetworkResourceLoadScheduler::servePendingRequests):
1618         (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
1619         * NetworkProcess/NetworkResourceLoadScheduler.h:
1620         * NetworkProcess/SchedulableLoader.cpp:
1621         (WebKit::SchedulableLoader::SchedulableLoader):
1622         * NetworkProcess/SchedulableLoader.h:
1623         (SchedulableLoader):
1624         * Platform/CoreIPC/ArgumentCoders.h:
1625         * Platform/CoreIPC/Connection.cpp:
1626         (Connection::SyncMessageState):
1627         (CoreIPC::Connection::waitForMessage):
1628         (CoreIPC::Connection::processIncomingMessage):
1629         * Platform/CoreIPC/Connection.h:
1630         (Connection):
1631         * Platform/WorkQueue.h:
1632         (WorkQueue):
1633         * PluginProcess/PluginProcess.h:
1634         (PluginProcess):
1635         * Scripts/webkit2/messages_unittest.py:
1636         (CoreIPC):
1637         * Shared/BlockingResponseMap.h:
1638         (BlockingResponseMap):
1639         * Shared/ChildProcessProxy.h:
1640         (ChildProcessProxy):
1641         * Shared/ImmutableArray.cpp:
1642         (WebKit::ImmutableArray::ImmutableArray):
1643         * Shared/ImmutableArray.h:
1644         (WebKit::ImmutableArray::adopt):
1645         (ImmutableArray):
1646         * Shared/ImmutableDictionary.cpp:
1647         (WebKit::ImmutableDictionary::keys):
1648         * Shared/ImmutableDictionary.h:
1649         (ImmutableDictionary):
1650         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
1651         (CustomProtocolManager):
1652         * Shared/SecurityOriginData.cpp:
1653         (WebKit::performAPICallbackWithSecurityOriginDataVector):
1654         * Shared/SessionState.cpp:
1655         * Shared/StatisticsData.h:
1656         (StatisticsData):
1657         * Shared/UserMessageCoders.h:
1658         (WebKit::UserMessageDecoder::baseDecode):
1659         * Shared/WebArchive.cpp:
1660         (WebKit::WebArchive::WebArchive):
1661         (WebKit::WebArchive::subresources):
1662         (WebKit::WebArchive::subframeArchives):
1663         * Shared/WebContextMenuItem.cpp:
1664         (WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
1665         * Shared/WebOpenPanelParameters.cpp:
1666         (WebKit::WebOpenPanelParameters::acceptMIMETypes):
1667         (WebKit::WebOpenPanelParameters::selectedFileNames):
1668         * Shared/mac/ArgumentCodersMac.mm:
1669         (CoreIPC::encode):
1670         * SharedWorkerProcess/SharedWorkerProcess.h:
1671         (SharedWorkerProcess):
1672         * UIProcess/API/mac/WKPrintingView.h:
1673         (WebFrameProxy):
1674         * UIProcess/API/mac/WKPrintingView.mm:
1675         (-[WKPrintingView _drawPreview:]):
1676         * UIProcess/API/mac/WKView.mm:
1677         (WebKit):
1678         * UIProcess/Downloads/DownloadProxyMap.cpp:
1679         (WebKit::DownloadProxyMap::processDidClose):
1680         * UIProcess/Downloads/DownloadProxyMap.h:
1681         (DownloadProxyMap):
1682         * UIProcess/GeolocationPermissionRequestManagerProxy.h:
1683         (GeolocationPermissionRequestManagerProxy):
1684         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
1685         (DynamicLinkerEnvironmentExtractor):
1686         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
1687         (CustomProtocolManagerProxy):
1688         * UIProcess/Network/NetworkProcessProxy.h:
1689         (NetworkProcessProxy):
1690         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h:
1691         (NotificationPermissionRequestManagerProxy):
1692         * UIProcess/Notifications/WebNotificationManagerProxy.h:
1693         (WebNotificationManagerProxy):
1694         * UIProcess/Plugins/PluginProcessManager.h:
1695         (PluginProcessManager):
1696         * UIProcess/Plugins/PluginProcessProxy.h:
1697         (PluginProcessProxy):
1698         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1699         (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
1700         * UIProcess/Plugins/WebPluginSiteDataManager.h:
1701         (WebPluginSiteDataManager):
1702         * UIProcess/SharedWorkers/SharedWorkerProcessManager.h:
1703         (SharedWorkerProcessManager):
1704         * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h:
1705         (SharedWorkerProcessProxy):
1706         * UIProcess/StatisticsRequest.cpp:
1707         (WebKit::StatisticsRequest::completedRequest):
1708         * UIProcess/Storage/StorageManager.cpp:
1709         (StorageManager::StorageArea):
1710         (WebKit::StorageManager::StorageArea::dispatchEvents):
1711         (StorageManager::SessionStorageNamespace):
1712         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
1713         (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
1714         (WebKit::StorageManager::createLocalStorageMap):
1715         (WebKit::StorageManager::createSessionStorageMap):
1716         (WebKit::StorageManager::destroyStorageMap):
1717         (WebKit::StorageManager::invalidateConnectionInternal):
1718         (WebKit::StorageManager::findStorageArea):
1719         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
1720         * UIProcess/Storage/StorageManager.h:
1721         (StorageManager):
1722         * UIProcess/WebApplicationCacheManagerProxy.h:
1723         (WebApplicationCacheManagerProxy):
1724         * UIProcess/WebBackForwardList.cpp:
1725         (WebKit::WebBackForwardList::addItem):
1726         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
1727         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
1728         (WebKit::WebBackForwardList::clear):
1729         * UIProcess/WebBackForwardList.h:
1730         (WebKit):
1731         * UIProcess/WebContext.cpp:
1732         (WebKit::WebContext::createNewWebProcess):
1733         (WebKit::WebContext::enableProcessTermination):
1734         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
1735         * UIProcess/WebContext.h:
1736         (WebContext):
1737         * UIProcess/WebCookieManagerProxy.cpp:
1738         (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
1739         * UIProcess/WebCookieManagerProxy.h:
1740         (WebCookieManagerProxy):
1741         * UIProcess/WebDatabaseManagerProxy.cpp:
1742         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
1743         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
1744         * UIProcess/WebDatabaseManagerProxy.h:
1745         (WebDatabaseManagerProxy):
1746         * UIProcess/WebFormClient.cpp:
1747         (WebKit::WebFormClient::willSubmitForm):
1748         * UIProcess/WebFormClient.h:
1749         (WebFormClient):
1750         * UIProcess/WebKeyValueStorageManagerProxy.h:
1751         (WebKeyValueStorageManagerProxy):
1752         * UIProcess/WebLoaderClient.cpp:
1753         (WebKit::WebLoaderClient::didChangeBackForwardList):
1754         * UIProcess/WebLoaderClient.h:
1755         (WebLoaderClient):
1756         * UIProcess/WebMediaCacheManagerProxy.cpp:
1757         (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
1758         * UIProcess/WebMediaCacheManagerProxy.h:
1759         (WebMediaCacheManagerProxy):
1760         * UIProcess/WebPageContextMenuClient.cpp:
1761         (WebKit::WebPageContextMenuClient::showContextMenu):
1762         * UIProcess/WebPageProxy.cpp:
1763         (ExceededDatabaseQuotaRecords):
1764         (WebKit::WebPageProxy::relatedPages):
1765         (WebKit::WebPageProxy::didChangeBackForwardList):
1766         (WebKit::WebPageProxy::handleWheelEvent):
1767         (WebKit::WebPageProxy::processNextQueuedWheelEvent):
1768         (WebKit::WebPageProxy::findStringMatches):
1769         (WebKit::WebPageProxy::willSubmitForm):
1770         (WebKit::WebPageProxy::pluginInformationDictionary):
1771         (WebKit::WebPageProxy::didFindStringMatches):
1772         (WebKit::WebPageProxy::didReceiveEvent):
1773         * UIProcess/WebPageProxy.h:
1774         (WebPageProxy):
1775         * UIProcess/WebPageProxy.messages.in:
1776         * UIProcess/WebProcessProxy.cpp:
1777         (WebKit::WebProcessProxy::disconnect):
1778         (WebKit::WebProcessProxy::didClose):
1779         (WebKit::WebProcessProxy::didBecomeUnresponsive):
1780         (WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive):
1781         (WebKit::WebProcessProxy::didBecomeResponsive):
1782         (WebKit::WebProcessProxy::disconnectFramesFromPage):
1783         (WebKit::WebProcessProxy::frameCountInPage):
1784         * UIProcess/WebProcessProxy.h:
1785         (WebProcessProxy):
1786         * UIProcess/WebResourceCacheManagerProxy.h:
1787         (WebResourceCacheManagerProxy):
1788         * UIProcess/mac/WebContextMenuProxyMac.mm:
1789         (WebKit::populateNSMenu):
1790         (WebKit::nsMenuItemVector):
1791         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
1792         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
1793         * WebProcess/Geolocation/WebGeolocationManager.cpp:
1794         (WebKit::WebGeolocationManager::didChangePosition):
1795         (WebKit::WebGeolocationManager::didFailToDeterminePosition):
1796         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
1797         (WebIconDatabaseProxy):
1798         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
1799         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1800         (WebKit::InjectedBundle::originsWithApplicationCache):
1801         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
1802         (WebKit::InjectedBundleBackForwardListItem::children):
1803         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
1804         (WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange):
1805         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
1806         (InjectedBundlePageEditorClient):
1807         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1808         (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
1809         (WebKit::InjectedBundlePageFormClient::willSubmitForm):
1810         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
1811         (InjectedBundlePageFormClient):
1812         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1813         (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
1814         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1815         (WebKit::WebResourceLoadScheduler::internallyFailedLoadTimerFired):
1816         (WebKit::WebResourceLoadScheduler::networkProcessCrashed):
1817         * WebProcess/Network/WebResourceLoadScheduler.h:
1818         (WebResourceLoadScheduler):
1819         * WebProcess/Notifications/NotificationPermissionRequestManager.h:
1820         (NotificationPermissionRequestManager):
1821         * WebProcess/Notifications/WebNotificationManager.h:
1822         (WebNotificationManager):
1823         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1824         (WebKit::NPRuntimeObjectMap::invalidate):
1825         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
1826         (NPRuntimeObjectMap):
1827         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1828         (WebKit::NetscapePlugin::stopAllStreams):
1829         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1830         (NetscapePlugin):
1831         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1832         (NetscapePluginStream):
1833         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
1834         (getAllScriptsInPDFDocument):
1835         (WebKit::SimplePDFPlugin::runScriptsInPDFDocument):
1836         * WebProcess/Plugins/PluginProcessConnectionManager.h:
1837         (PluginProcessConnectionManager):
1838         * WebProcess/Plugins/PluginView.cpp:
1839         (WebKit::PluginView::cancelAllStreams):
1840         * WebProcess/Plugins/PluginView.h:
1841         (PluginView):
1842         * WebProcess/Storage/StorageAreaMap.cpp:
1843         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
1844         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
1845         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1846         (WebKit::StorageNamespaceImpl::storageArea):
1847         * WebProcess/Storage/StorageNamespaceImpl.h:
1848         (StorageNamespaceImpl):
1849         * WebProcess/Storage/WebKeyValueStorageManager.cpp:
1850         (WebKit::keyValueStorageOriginIdentifiers):
1851         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1852         (WebKit::WebDatabaseManager::getDatabasesByOrigin):
1853         (WebKit::WebDatabaseManager::getDatabaseOrigins):
1854         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1855         (WebKit::WebEditorClient::getClientPasteboardDataForRange):
1856         * WebProcess/WebCoreSupport/WebEditorClient.h:
1857         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1858         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
1859         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1860         (WebKit::WebEditorClient::documentFragmentFromAttributedString):
1861         * WebProcess/WebPage/EventDispatcher.h:
1862         (EventDispatcher):
1863         * WebProcess/WebPage/FindController.cpp:
1864         (WebKit::FindController::findStringMatches):
1865         * WebProcess/WebPage/FindController.h:
1866         (FindController):
1867         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1868         (WebKit):
1869         * WebProcess/WebPage/WebFrame.cpp:
1870         (WebKit::WebFrame::childFrames):
1871         * WebProcess/WebPage/WebPage.cpp:
1872         (WebKit::WebPage::trackedRepaintRects):
1873         * WebProcess/WebPage/WebPage.h:
1874         (WebKit):
1875         (WebPage):
1876         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
1877         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1878         (TiledCoreAnimationDrawingArea):
1879         * WebProcess/WebProcess.cpp:
1880         (WebKit::WebProcess::visitedLinkStateChanged):
1881         (WebKit::WebProcess::allVisitedLinkStateChanged):
1882         (WebKit::WebProcess::focusedWebPage):
1883         (WebKit::WebProcess::createWebPage):
1884         (WebKit::WebProcess::didClose):
1885         (WebKit::WebProcess::webPageGroup):
1886         (WebKit::addCaseFoldedCharacters):
1887         (WebKit::getWebCoreMemoryCacheStatistics):
1888         (WebKit::WebProcess::setTextCheckerState):
1889         * WebProcess/WebProcess.h:
1890         (WebProcess):
1891
1892 2013-05-09  Anders Carlsson  <andersca@apple.com>
1893
1894         Implement WebPlatformStrategies::transientLocalStorageNamespace
1895         https://bugs.webkit.org/show_bug.cgi?id=115876
1896         <rdar://problem/13852871>
1897
1898         Reviewed by Beth Dakin.
1899
1900         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1901         (WebKit::WebPlatformStrategies::transientLocalStorageNamespace):
1902         Return a session storage namespace for a random page when UI process storage is enabled,
1903         otherwise call the base class implementation.
1904
1905 2013-05-09  Anders Carlsson  <andersca@apple.com>
1906
1907         Use explicit qualifiers for names in the std:: namespace
1908         https://bugs.webkit.org/show_bug.cgi?id=115868
1909
1910         Reviewed by Andreas Kling.
1911
1912         * Shared/mac/ArgumentCodersMac.mm:
1913         (CoreIPC::encode):
1914         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
1915         (WKPluginSiteDataManagerClearAllSiteData):
1916         * UIProcess/Plugins/PluginInfoStore.cpp:
1917         (WebKit::PluginInfoStore::findPluginForExtension):
1918         * UIProcess/WebFrameProxy.cpp:
1919         * UIProcess/WebProcessProxy.cpp:
1920         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1921         (WebKit::parsePostBuffer):
1922         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1923         (WebKit::NetscapePlugin::loadURL):
1924         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1925         (WebKit::NetscapePluginStream::deliverDataToPlugin):
1926         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
1927         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1928         * WebProcess/WebPage/FindController.cpp:
1929         (WebKit::FindController::countStringMatches):
1930         (WebKit::FindController::updateFindUIAfterPageScroll):
1931         * WebProcess/WebPage/WebPage.cpp:
1932         * WebProcess/WebPage/mac/WebPageMac.mm:
1933         (WebKit::drawPDFPage):
1934         * WebProcess/mac/WebProcessMac.mm:
1935
1936 2013-05-09  Max Feil  <mfeil@rim.com>
1937
1938         shouldUsePluginDocument() needs to be respected when a document is created
1939         https://bugs.webkit.org/show_bug.cgi?id=110308
1940
1941         Reviewed by Rob Buis.
1942
1943         Renaming shouldUsePluginDocument() to shouldAlwaysUsePluginDocument()
1944         for clarity.
1945
1946         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1947         (WebKit::WebFrameLoaderClient::shouldAlwaysUsePluginDocument):
1948         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1949         (WebFrameLoaderClient):
1950
1951 2013-05-09  Timothy Hatcher  <timothy@apple.com>
1952
1953         Make dragging off a tab in Safari with a docked Inspector reattach the Inspector.
1954
1955         https://webkit.org/b/115832
1956         rdar://problem/13605661
1957
1958         Reviewed by Benjamin Poulain.
1959
1960         * UIProcess/mac/WebInspectorProxyMac.mm:
1961         (WebKit::WebInspectorProxy::platformBringToFront):
1962         If the Web Inspector is no longer in the same window as the inspected view,
1963         then we need to reopen the Inspector to get it attached to the right window.
1964
1965 2013-05-08  Anders Carlsson  <andersca@apple.com>
1966
1967         Fix a typo in a comment.
1968
1969         Rubber-stamped by Darin Adler.
1970
1971         * WebProcess/WebProcess.cpp:
1972         (WebKit::WebProcess::initializeConnection):
1973
1974 2013-05-08  Anders Carlsson  <andersca@apple.com>
1975
1976         Remove bogus StorageAreaMap assertions
1977         https://bugs.webkit.org/show_bug.cgi?id=115838
1978
1979         Reviewed by Sam Weinig.
1980
1981         It is possible for didGetValues, and didClear to be called even if m_hasPendingClear is false so remove the assertions.
1982
1983         * WebProcess/Storage/StorageAreaMap.cpp:
1984         (WebKit::StorageAreaMap::didGetValues):
1985         (WebKit::StorageAreaMap::didClear):
1986
1987 2013-05-08  Anders Carlsson  <andersca@apple.com>
1988
1989         Handle incoming clear operations
1990         https://bugs.webkit.org/show_bug.cgi?id=115829
1991
1992         Reviewed by Sam Weinig.
1993
1994         Handle clear by building up a new storage map with our pending changes.
1995
1996         * WebProcess/Storage/StorageAreaMap.cpp:
1997         (WebKit::StorageAreaMap::applyChange):
1998
1999 2013-05-08  Anders Carlsson  <andersca@apple.com>
2000
2001         Don't apply changes while we're clearing the database
2002         https://bugs.webkit.org/show_bug.cgi?id=115826
2003
2004         Reviewed by Darin Adler.
2005
2006         * UIProcess/Storage/LocalStorageDatabase.cpp:
2007         (WebKit::LocalStorageDatabase::openDatabase):
2008         Only call didOpenDatabaseWithOrigin if we actually did open the database.
2009
2010         (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
2011         Create the database if needed.
2012
2013         * UIProcess/Storage/StorageManager.cpp:
2014         (WebKit::StorageManager::getValues):
2015         Send back a DidGetValues message.
2016
2017         * WebProcess/Storage/StorageAreaMap.cpp:
2018         (WebKit::StorageAreaMap::StorageAreaMap):
2019         Initialize m_hasPendingClear.
2020
2021         (WebKit::StorageAreaMap::clear):
2022         Set m_hasPendingClear to true.
2023
2024         (WebKit::StorageAreaMap::resetValues):
2025         Set m_hasPendingClear back to false.
2026
2027         (WebKit::StorageAreaMap::loadValuesIfNeeded):
2028         Set m_hasPendingClear to true so we'll ignore any changes that are already part of the returned items.
2029
2030         (WebKit::StorageAreaMap::didGetValues):
2031         Set m_hasPendingClear back to false.
2032
2033         (WebKit::StorageAreaMap::didClear):
2034         Set m_hasPendingClear back to false.
2035
2036         (WebKit::StorageAreaMap::applyChange):
2037         Don't apply the change if m_hasPendingClear is true.
2038
2039         * WebProcess/Storage/StorageAreaMap.messages.in:
2040         Add DidGetValues message.
2041
2042 2013-05-08  Andy Estes  <aestes@apple.com>
2043
2044         [WebKit2] REGRESSION (Custom Protocols): Reproducible crash when navigating to URL with an invalid scheme
2045         https://bugs.webkit.org/show_bug.cgi?id=115790
2046
2047         Reviewed by Alexey Proskuryakov.
2048
2049         NSMutableSet does not support adding or removing nil objects, and
2050         WTF::HashSet does not support adding, removing, or checking for null
2051         WTF::Strings.
2052
2053         For the NSMutableSet case, make sure that we don't try to add or remove
2054         nil NSStrings.
2055
2056         For the WTF::HashSet case, NSURL will return a nil NSString if we ask
2057         it for its scheme when it is invalid, which we will convert to a null
2058         WTF::String. Don't try to check if our HashSet of registered schemes
2059         contains a null String.
2060
2061         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
2062         (WebKit::CustomProtocolManager::registerScheme): Assert that the scheme
2063         isn't null. We reject null schemes at the WKBrowsingContextController level.
2064         (WebKit::CustomProtocolManager::unregisterScheme): Ditto.
2065         (WebKit::CustomProtocolManager::supportsScheme): If scheme is null, return false.
2066         * UIProcess/API/mac/WKBrowsingContextController.mm:
2067         (+[WKBrowsingContextController registerSchemeForCustomProtocol:]): Do not register a nil scheme.
2068         (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]): Ditto.
2069
2070 2013-05-08  Anders Carlsson  <andersca@apple.com>
2071
2072         Apply remote changes to storage maps locally
2073         https://bugs.webkit.org/show_bug.cgi?id=115825
2074
2075         Reviewed by Beth Dakin.
2076
2077         * WebProcess/Storage/StorageAreaMap.cpp:
2078         (WebKit::StorageAreaMap::resetValues):
2079         Clear the pending values map.
2080
2081         (WebKit::StorageAreaMap::didSetItem):
2082         If we failed to set the item, forget everything we know about this storage map.
2083         Otherwise, remove the pending item.
2084
2085         (WebKit::StorageAreaMap::didRemoveItem):
2086         Remove the pending item.
2087
2088         (WebKit::StorageAreaMap::shouldApplyChangeForKey):
2089         Helper function that returns whether a change for a given key should be applied.
2090
2091         (WebKit::StorageAreaMap::applyChange):
2092         Apply the change. Currently only adds and removes are handled.
2093
2094         (WebKit::StorageAreaMap::dispatchStorageEvent):
2095         Apply the change locally as well if needed.
2096
2097         * WebProcess/Storage/StorageAreaMap.h:
2098
2099 2013-05-08  Anders Carlsson  <andersca@apple.com>
2100
2101         Assert at compile time that we don't pass Objective-C object pointers to adoptCF
2102         https://bugs.webkit.org/show_bug.cgi?id=115823
2103
2104         Reviewed by Geoffrey Garen.
2105
2106         Fix adoptNS/adoptCF mismatches. For the adopt(leakRef()) case we'd ideally want a static_pointer_cast overload for RetainPtr,
2107         but this will do for now.
2108         
2109         * Shared/mac/ArgumentCodersMac.mm:
2110         (CoreIPC::decode):
2111
2112 2013-05-08  Sam Weinig  <sam@webkit.org>
2113
2114         Add SPI to determine if a plugin is sandboxed
2115         https://bugs.webkit.org/show_bug.cgi?id=115810
2116
2117         Reviewed by Anders Carlsson.
2118
2119         * PluginProcess/mac/PluginProcessMac.mm:
2120         (WebKit::PluginProcess::initializeSandbox):
2121         * Shared/Plugins/mac/PluginSandboxProfile.h: Added.
2122         * Shared/Plugins/mac/PluginSandboxProfile.mm: Added.
2123         (WebKit::pluginSandboxProfileDefaultDirectory):
2124         (WebKit::pluginSandboxProfileDirectories):
2125         (WebKit::pluginSandboxProfileName):
2126         (WebKit::pluginSandboxCommonProfile):
2127         (WebKit::pluginSandboxProfileForDirectory):
2128         (WebKit::pluginSandboxProfile):
2129         (WebKit::pluginHasSandboxProfileForDirectory):
2130         (WebKit::pluginHasSandboxProfile):
2131         Move sandbox code to its own file and refactor to use cocoa. Also adds pluginHasSandboxProfile function
2132         which uses the newly refactored code.
2133
2134         * UIProcess/API/C/mac/WKContextPrivateMac.h:
2135         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
2136         (WKPlugInInfoIsSandboxedKey):
2137         (createInfoDictionary):
2138         Add WKPlugInInfoIsSandboxedKey.
2139
2140         * WebKit2.xcodeproj/project.pbxproj:
2141         Add new files.
2142
2143 2013-05-08  Anders Carlsson  <andersca@apple.com>
2144
2145         Safari unexpectedly quits with invalid message from the web process with message ID 0x323002f (WebPageProxy.DecidePolicyForNavigationAction)
2146         https://bugs.webkit.org/show_bug.cgi?id=115814
2147         <rdar://problem/12331258>
2148
2149         Reviewed by Andreas Kling.
2150
2151         To ensure that any asynchronous messages are delivered to the UI process before
2152         synchronous messages (except when doing so would lead to a deadlock), Call
2153         setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage on the UI process connections.
2154
2155         * WebProcess/WebProcess.cpp:
2156         (WebKit::WebProcess::initializeConnection):
2157
2158 2013-05-08  Tim Horton  <timothy_horton@apple.com>
2159
2160         Coalesce WKView visibleRect changes
2161         https://bugs.webkit.org/show_bug.cgi?id=115792
2162         <rdar://problem/13776842>
2163
2164         Reviewed by Simon Fraser.
2165
2166         The system can call renewGState much more often than we actually want
2167         to update the WebProcess' notion of the exposed rect. Most importantly,
2168         within an autolayout pass it is called many times, and often sees
2169         [WKView visibleRect] be an intermediate value which will never be
2170         flushed to the screen. We only care about the final value, so we should
2171         wait until AppKit has finished - with a zero-delay timer - to inform the
2172         WebProcess of exposed rect changes.
2173
2174         * UIProcess/WebPageProxy.cpp:
2175         (WebKit::WebPageProxy::WebPageProxy):
2176         Add exposedRectChangedTimer.
2177         (WebKit::WebPageProxy::close):
2178         Cancel exposedRectChangedTimer when tearing down the WebPageProxy.
2179         * UIProcess/WebPageProxy.h:
2180         (WebPageProxy):
2181         Add exposedRectChangedTimerFired, the timer itself, and two rects:
2182         the most recent exposed rect from the WKView, and the last one we actually
2183         sent across to the WebProcess.
2184         * UIProcess/mac/WebPageProxyMac.mm:
2185         (WebKit::WebPageProxy::viewExposedRectChanged):
2186         Instead of immediately sending exposed rect changes to the WebProcess,
2187         start a zero-delay timer to do so.
2188         (WebKit::WebPageProxy::exposedRectChangedTimerFired):
2189         Once the zero-delay timer fires, send the new exposed rect to the WebProcess.
2190
2191 2013-05-08  Alexey Proskuryakov  <ap@apple.com>
2192
2193         <rdar://problem/13776220> 13A451: PluginProcess(2225) deny file-read-data ~/Library/InputManagers
2194         <rdar://problem/13642510> PluginProcess logs sandbox violations initializing TextServices
2195
2196         Reviewed by Anders Carlsson.
2197
2198         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Allow more
2199         TextServices and NSInputManager directories.
2200
2201 2013-05-08  Anders Carlsson  <andersca@apple.com>
2202
2203         Remove BinarySemaphoreWin.cpp.
2204
2205         Rubber-stamped by Beth Dakin.
2206
2207         BinarySemaphoreWin has been moved to WTF, but the original was never removed.
2208
2209         * Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Removed.
2210
2211 2013-05-08  Zan Dobersek  <zdobersek@igalia.com>
2212
2213         [WK2] Make the WebNetworkInfoManager a supplement to the WebProcess
2214         https://bugs.webkit.org/show_bug.cgi?id=115716
2215
2216         Reviewed by Andreas Kling.
2217
2218         WebNetworkInfoManager should inherit from WebProcessSupplement and should be used
2219         as such by the WebProcess. This removes the need for the m_networkInfoManager member
2220         variable in the WebProcess class and brings the WebNetworkInfoManager in line with
2221         other manager classes of which instances are controlled by the WebProcess class.
2222
2223         * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp:
2224         (WebKit::WebNetworkInfoManager::supplementName): Specify the supplement's name.
2225         (WebKit):
2226         * WebProcess/NetworkInfo/WebNetworkInfoManager.h:
2227         (WebKit): Alphabetically reorder the two forwarding declarations.
2228         (WebNetworkInfoManager): Inherit from the WebProcessSupplement interface.
2229         * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp:
2230         (WebKit::WebNetworkInfoClient::bandwidth): Access the WebNetworkInfoManager as a supplement.
2231         (WebKit::WebNetworkInfoClient::metered): Ditto.
2232         (WebKit::WebNetworkInfoClient::startUpdating): Ditto.
2233         (WebKit::WebNetworkInfoClient::stopUpdating): Ditto.
2234         (WebKit::WebNetworkInfoClient::networkInfoControllerDestroyed): Ditto.
2235         * WebProcess/WebProcess.cpp:
2236         (WebKit::WebProcess::WebProcess): Add the WebNetworkInfoManager instance as a supplement.
2237         * WebProcess/WebProcess.h:
2238         (WebProcess): Remove the m_networkInfoManager member variable and its getter method.
2239
2240 2013-05-08  Zan Dobersek  <zdobersek@igalia.com>
2241
2242         [WK2] Make the WebBatteryManager a supplement to the WebProcess
2243         https://bugs.webkit.org/show_bug.cgi?id=115715
2244
2245         Reviewed by Andreas Kling.
2246
2247         WebBatteryManager should inherit from WebProcessSupplement and should be used as such
2248         by the WebProcess. This removes the need for the m_batteryManager member variable in
2249         the WebProcess class and brings the WebBatteryManager in line with other manager classes
2250         of which instances are controlled by the WebProcess class.
2251
2252         * WebProcess/Battery/WebBatteryManager.cpp:
2253         (WebKit::WebBatteryManager::supplementName): Specify the supplement's name.
2254         (WebKit):
2255         * WebProcess/Battery/WebBatteryManager.h:
2256         (WebBatteryManager): Inherit from the WebProcessSupplement interface.
2257         * WebProcess/WebCoreSupport/WebBatteryClient.cpp:
2258         (WebKit::WebBatteryClient::startUpdating): Access the WebBatteryManager as a supplement.
2259         (WebKit::WebBatteryClient::stopUpdating): Ditto.
2260         (WebKit::WebBatteryClient::batteryControllerDestroyed): Ditto.
2261         * WebProcess/WebProcess.cpp:
2262         (WebKit::WebProcess::WebProcess): Add the WebBatteryManager instance as a supplement.
2263         * WebProcess/WebProcess.h:
2264         (WebProcess): Remove the m_batteryManager member variable and its getter method.
2265
2266 2013-05-06  Darin Adler  <darin@apple.com>
2267
2268         Use adoptCF and adoptNS in more places
2269         https://bugs.webkit.org/show_bug.cgi?id=115657
2270
2271         Reviewed by Sam Weinig.
2272
2273         * Shared/Downloads/cfnet/DownloadCFNet.cpp:
2274         (WebKit::Download::useCredential):
2275         (WebKit::Download::start):
2276         (WebKit::Download::startWithHandle):
2277         (WebKit::Download::cancel):
2278         (WebKit::Download::didDecideDestination):
2279         Use adoptCF and adoptNS.
2280
2281 2013-05-06  Sam Weinig  <sam@webkit.org>
2282
2283         Add SPI to get an array of all the installed plug-ins
2284         https://bugs.webkit.org/show_bug.cgi?id=115688
2285
2286         Reviewed by Anders Carlsson.
2287
2288         * UIProcess/API/C/mac/WKContextPrivateMac.h:
2289         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
2290         (createInfoDictionary):
2291         Extract creation of info dictionary into helper.
2292         (WKContextCopyPlugInInfoForBundleIdentifier):
2293         Modified to use the new helper.
2294         (WKContextGetInfoForInstalledPlugIns):
2295         Added.
2296
2297 2013-05-07  Anders Carlsson  <andersca@apple.com>
2298
2299         Clean up KeyframeValueList and related classes
2300         https://bugs.webkit.org/show_bug.cgi?id=115738
2301
2302         Reviewed by Simon Fraser.
2303
2304         Update for WebCore changes.
2305
2306         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2307         (CoreIPC::::decode):
2308
2309 2013-05-07  Anders Carlsson  <andersca@apple.com>
2310
2311         Add and remove databases and origins from the database tracker
2312         https://bugs.webkit.org/show_bug.cgi?id=115752
2313
2314         Reviewed by Andreas Kling.
2315
2316         * UIProcess/Storage/LocalStorageDatabase.cpp:
2317         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
2318         Rename m_databaseFilename to m_databasePath.
2319
2320         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
2321         Rename m_databaseFilename to m_databasePath.
2322
2323         * UIProcess/Storage/LocalStorageDatabase.h:
2324         Rename m_databaseFilename to m_databasePath.
2325
2326         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2327         (WebKit::LocalStorageDatabaseTracker::databasePath):
2328         Rename databaseFilename to databasePath.
2329
2330         (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
2331         Call addDatabaseWithOriginIdentifier.
2332
2333         (WebKit::LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin):
2334         Call removeDatabaseWithOriginIdentifier.
2335
2336         (WebKit::LocalStorageDatabaseTracker::trackerDatabasePath):
2337         Call databasePath instead of databaseFile.
2338
2339         (WebKit::LocalStorageDatabaseTracker::openTrackerDatabase):
2340         Bail if the database is already open.
2341
2342         (WebKit::LocalStorageDatabaseTracker::updateTrackerDatabaseFromLocalStorageDatabaseFiles):
2343         Call addDatabaseWithOriginIdentifier if this is an origin we don't know about.
2344
2345         (WebKit::LocalStorageDatabaseTracker::addDatabaseWithOriginIdentifier):
2346         Add the database to the Origins table.
2347
2348         (WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):
2349         remove the database from the Origins table and delete it.
2350
2351         (WebKit::LocalStorageDatabaseTracker::pathForDatabaseWithOriginIdentifier):
2352         Helper function that looks up a database path given its identifier.
2353         
2354         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2355         Rename databaseFile to databasePath.
2356
2357 2013-05-07  Anders Carlsson  <andersca@apple.com>
2358
2359         The storage database tracker should know when databases come and go
2360         https://bugs.webkit.org/show_bug.cgi?id=115748
2361
2362         Reviewed by Andreas Kling.
2363
2364         * UIProcess/Storage/LocalStorageDatabase.cpp:
2365         (WebKit::LocalStorageDatabase::openDatabase):
2366         If we've opened the database successfully, call LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin.
2367
2368         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
2369         Remove a FIXME; we run all storage related things on the same thread.
2370
2371         (WebKit::LocalStorageDatabase::close):
2372         Close the database. If it's empty, call LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin.
2373
2374         (WebKit::LocalStorageDatabase::databaseIsEmpty):
2375         Helper function for determining whether a database is empty.
2376         
2377         * UIProcess/Storage/LocalStorageDatabase.h:
2378         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2379         (WebKit::LocalStorageDatabaseTracker::databaseFilename):
2380         Add ".localstorage" to the filename.
2381
2382         (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
2383         (WebKit::LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin):
2384         Add empty stubs.
2385
2386 2013-05-07  Brady Eidson  <beidson@apple.com>
2387
2388         Add JoinExistingSession to the Networking XPC.
2389         <rdar://problem/12902288> and https://bugs.webkit.org/show_bug.cgi?id=114991
2390
2391         Reviewed by Sam Weinig.
2392
2393         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist:
2394         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist:
2395
2396 2013-05-07  Anders Carlsson  <andersca@apple.com>
2397
2398         REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
2399         https://bugs.webkit.org/show_bug.cgi?id=115711
2400
2401         Reviewed by Andreas Kling.
2402
2403         Handle setting the local storage directory more than once.
2404
2405         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2406         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
2407         Close the database (if necessary) and clear the origins map before importing the origin identifiers.
2408
2409 2013-05-07  Antoine Quint  <graouts@apple.com>
2410
2411         Re-establish autostart timeout extension on user interaction
2412         https://bugs.webkit.org/show_bug.cgi?id=113232
2413
2414         Change WebProcess::pluginDidReceiveUserInteraction to use a tuple of
2415         (pluginOrigin, pageOrigin, mimeType) arguments like the other similar
2416         WebProcess methods and gather these arguments from the PlugInView's
2417         plug-in element.
2418
2419         Reviewed by Dean Jackson.
2420
2421         * WebProcess/Plugins/PluginView.cpp:
2422         (WebKit::PluginView::pluginDidReceiveUserInteraction):
2423         Cast the m_pluginElement to a HTMLPlugInImageElement so we can obtain the
2424         tuple of (pluginOrigin, pageOrigin, mimeType) to pass to pluginDidReceiveUserInteraction().
2425
2426         * WebProcess/WebProcess.cpp:
2427         (WebKit::WebProcess::plugInDidReceiveUserInteraction):
2428         * WebProcess/WebProcess.h:
2429         (WebProcess):
2430         Update method signature to a tuple of (pluginOrigin, pageOrigin, mimeType)
2431         and obtain the plug-in origin hash from that.
2432
2433 2013-05-07  Anders Carlsson  <andersca@apple.com>
2434
2435         Each local storage database should know its origin
2436         https://bugs.webkit.org/show_bug.cgi?id=115737
2437
2438         Reviewed by Andreas Kling.
2439
2440         Store the security origin in a member variable. It'll be used to communicate database state changes to the tracker.
2441
2442         * UIProcess/Storage/LocalStorageDatabase.cpp:
2443         (WebKit::LocalStorageDatabase::create):
2444         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
2445         * UIProcess/Storage/LocalStorageDatabase.h:
2446         (LocalStorageDatabase):
2447
2448 2013-05-07  Brady Eidson  <beidson@apple.com>
2449
2450         Remove some unnecessary soft linking in NetworkProcess. (Take 2)
2451         <rdar://problem/13821779> and https://bugs.webkit.org/show_bug.cgi?id=115683
2452
2453         Reviewed by Dean Jackson and owned by Andreas Kling.
2454
2455         As a followup to r149651, include the private headers conditionally.
2456         Also, fix a bug introduced with r149651 (bool vs CFBooleanRef).
2457
2458         * NetworkProcess/mac/DiskCacheMonitor.mm:
2459         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2460         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
2461
2462 2013-05-07  Jinwoo Song  <jinwoo7.song@samsung.com>
2463
2464         [EFL][WK2] Add ewk APIs for setting and getting user agent
2465         https://bugs.webkit.org/show_bug.cgi?id=114429
2466
2467         Reviewed by Andreas Kling.
2468
2469         Provide ewk_view_user_agent_get/set APIs which wraps WK APIs.
2470
2471         * UIProcess/API/efl/EwkView.cpp:
2472         (EwkView::EwkView):
2473         (EwkView::setUserAgent):
2474         * UIProcess/API/efl/EwkView.h:
2475         (EwkView::userAgent):
2476         (EwkView):
2477         * UIProcess/API/efl/ewk_view.cpp:
2478         (ewk_view_user_agent_get):
2479         (ewk_view_user_agent_set):
2480         * UIProcess/API/efl/ewk_view.h:
2481         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2482         (TEST_F):
2483
2484 2013-05-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2485
2486         HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
2487         https://bugs.webkit.org/show_bug.cgi?id=115646
2488
2489         Reviewed by Darin Adler.
2490
2491         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2492         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
2493         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
2494         (WebKit::NetworkResourceLoadScheduler::hostForURL):
2495         * Shared/ImmutableDictionary.h:
2496         (WebKit::ImmutableDictionary::get):
2497         * UIProcess/Storage/StorageManager.cpp:
2498         (WebKit::StorageManager::createSessionStorageMap):
2499         (WebKit::StorageManager::cloneSessionStorageNamespaceInternal):
2500         (WebKit::StorageManager::findStorageArea):
2501         * UIProcess/WebContext.h:
2502         (WebKit::WebContext::supplement):
2503         * UIProcess/WebProcessProxy.cpp:
2504         (WebKit::WebProcessProxy::webBackForwardItem):
2505         (WebKit::WebProcessProxy::webFrame):
2506         * UIProcess/efl/DownloadManagerEfl.cpp:
2507         (WebKit::DownloadManagerEfl::ewkDownloadJob):
2508         * WebProcess/Network/WebResourceLoadScheduler.h:
2509         (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier):
2510         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2511         (WebKit::NetscapePlugin::streamFromID):
2512         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2513         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
2514         * WebProcess/Plugins/PluginView.cpp:
2515         (WebKit::PluginView::cancelStreamLoad):
2516         * WebProcess/WebPage/EventDispatcher.cpp:
2517         (WebKit::EventDispatcher::wheelEvent):
2518         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2519         (WebKit::WebBackForwardListProxy::itemForID):
2520         (WebKit::WebBackForwardListProxy::itemAtIndex):
2521         * WebProcess/WebPage/WebPage.cpp:
2522         (WebKit::WebPage::webUndoStep):
2523         (WebKit::WebPage::didFinishCheckingText):
2524         (WebKit::WebPage::didCancelCheckingText):
2525         * WebProcess/WebProcess.cpp:
2526         (WebKit::WebProcess::webPage):
2527         (WebKit::WebProcess::webPageGroup):
2528             Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
2529
2530 2013-05-06  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2531
2532         [Qt] Unreviewed buildfix after r149637.
2533
2534         * Target.pri:
2535
2536 2013-05-06  Ryosuke Niwa  <rniwa@webkit.org>
2537
2538         REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
2539         https://bugs.webkit.org/show_bug.cgi?id=115711    
2540
2541         Rubber-stamped by Anders Carlsson.
2542
2543         Temporarily removed the assertion. Andres is going to investigate it tomorrow.
2544
2545         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2546         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
2547
2548 2013-05-06  Darin Adler  <darin@apple.com>
2549
2550         Use OwnPtr instead of deleteAllValues in KeyframeValueList
2551         https://bugs.webkit.org/show_bug.cgi?id=115652
2552
2553         Reviewed by Simon Fraser.
2554
2555         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2556         (CoreIPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Added adoptPtr
2557         next to new when calling KeyframeValueList::insert.
2558
2559 2013-05-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2560
2561         Unreviewed, build fix on EFL port
2562
2563         * CMakeLists.txt: Add LocalStorageDatabaseTracker.cpp
2564
2565 2013-05-06  Philippe Normand  <pnormand@igalia.com>
2566
2567         Unreviewed, GTK build fix after r149637.
2568
2569         * GNUmakefile.list.am: Add LocalStorageDatabaseTracker sources to
2570         the build.
2571
2572 2013-05-06  Brady Eidson  <beidson@apple.com>
2573
2574         Remove some unnecessary soft linking in NetworkProcess.
2575         <rdar://problem/13821779> and https://bugs.webkit.org/show_bug.cgi?id=115683
2576
2577         Reviewed by Sam Weinig.
2578
2579         Replace some unneeded soft linking with forward declarations.
2580
2581         * NetworkProcess/mac/DiskCacheMonitor.mm:
2582         (WebKit::DiskCacheMonitor::DiskCacheMonitor):
2583         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2584         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse):
2585         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
2586
2587 2013-05-06  Anders Carlsson  <andersca@apple.com>
2588
2589         More work on LocalStorageDatabaseTracker
2590         https://bugs.webkit.org/show_bug.cgi?id=115680
2591
2592         Reviewed by Andreas Kling.
2593
2594         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2595         (WebKit::LocalStorageDatabaseTracker::databaseFilename):
2596         Call the new databaseFilename that takes a string.
2597
2598         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
2599         Assert that we don't call this more than once. Dispatch a call to import origin identifiers.
2600
2601         (WebKit::LocalStorageDatabaseTracker::trackerDatabasePath):
2602         New helper function that returns the tracker database path.
2603
2604         (WebKit::LocalStorageDatabaseTracker::openTrackerDatabase):
2605         Open the database and create the Origins table if needed.
2606
2607         (WebKit::LocalStorageDatabaseTracker::importOriginIdentifiers):
2608         Open the database and import the origin identifiers from it, then synchronize it with whatever files are on disk.
2609
2610         (WebKit::LocalStorageDatabaseTracker::updateTrackerDatabaseFromLocalStorageDatabaseFiles):
2611         Bring the tracker database up to date from the database files on disk.
2612
2613         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2614         (LocalStorageDatabaseTracker):
2615
2616 2013-05-06  Alexey Proskuryakov  <ap@apple.com>
2617
2618         <rdar://problem/13479806> [Mac] Pass information about open pages to LaunchServices
2619         https://bugs.webkit.org/show_bug.cgi?id=115665
2620
2621         Reviewed by Darin Adler.
2622
2623         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didCommitLoad): Moved repeated
2624         check for frame->isMainFrame() to the top, matching oter similar functions.
2625         Call updateActivePages().
2626
2627         * WebProcess/WebProcess.cpp:
2628         (WebKit::WebProcess::networkProcessConnectionClosed): Removed an obsolete FIXME.
2629         (WebKit::WebProcess::updateActivePages): Empty implementation for platforms
2630         that don't need to do anything here.
2631
2632         * WebProcess/WebProcess.h: Added updateActivePages().
2633
2634         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::updateActivePages):
2635         Collect user visible origins of pages in the process and pass them to LS.
2636
2637 2013-05-06  Mark Rowe  <mrowe@apple.com>
2638
2639         <rdar://problem/13775921> Switch off a deprecated API.
2640
2641         Reviewed by Oliver Hunt.
2642
2643         * Shared/mac/ChildProcessMac.mm:
2644         (WebKit::ChildProcess::setProcessSuppressionEnabled): When disabling process suppression,
2645         begin an activity that doesn't disable idle sleep, sudden termination or automatic termination.
2646         When enabling process suppression, end the activity.
2647
2648 2013-05-06  Anders Carlsson  <andersca@apple.com>
2649
2650         Move local storage directory handling to LocalStorageDatabaseTracker
2651         https://bugs.webkit.org/show_bug.cgi?id=115676
2652
2653         Reviewed by Andreas Kling.
2654
2655         * UIProcess/Storage/LocalStorageDatabase.cpp:
2656         (WebKit::LocalStorageDatabase::create):
2657         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
2658         * UIProcess/Storage/LocalStorageDatabase.h:
2659         (WebCore):
2660         (LocalStorageDatabase):
2661         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2662         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory):
2663         (WebKit):
2664         (WebKit::LocalStorageDatabaseTracker::databaseFilename):
2665         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
2666         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2667         (WebCore):
2668         (LocalStorageDatabaseTracker):
2669         * UIProcess/Storage/StorageManager.cpp:
2670         (WebKit::StorageManager::StorageArea::StorageArea):
2671         (WebKit::StorageManager::setLocalStorageDirectory):
2672         * UIProcess/Storage/StorageManager.h:
2673         (StorageManager):
2674
2675 2013-05-06  Manuel Rego Casasnovas  <rego@igalia.com>
2676
2677         [GTK] Add webkit_uri_scheme_request_finish_error
2678         https://bugs.webkit.org/show_bug.cgi?id=94316
2679
2680         Reviewed by Anders Carlsson.
2681
2682         This new method will allow to finish WebKitURISchemeRequest with a
2683         GError that will be passed to the WebKitWebView through the
2684         "load-failed" signal.
2685
2686         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
2687         (webkit_uri_scheme_request_finish_error): Implement new method using
2688         WebSoupRequestManagerProxy::didFailURIRequest().
2689         * UIProcess/API/gtk/WebKitURISchemeRequest.h: Add new method header.
2690         * UIProcess/API/gtk/WebKitWebContext.cpp: Include the usage of the new
2691         method in the code example at webkit_web_context_register_uri_scheme()
2692         documentation.
2693         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the new
2694         method.
2695         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
2696         (loadFailedCallback): Set m_error to monitor it from the tests.
2697         (LoadTrackingTest::loadURI): Clear m_error before each load.
2698         (LoadTrackingTest::loadHtml): Ditto.
2699         (LoadTrackingTest::loadPlainText): Ditto.
2700         (LoadTrackingTest::loadRequest): Ditto.
2701         (LoadTrackingTest::reload): Ditto.
2702         (LoadTrackingTest::goBack): Ditto.
2703         (LoadTrackingTest::goForward): Ditto.
2704         * UIProcess/API/gtk/tests/LoadTrackingTest.h: Add new member m_error.
2705         * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
2706         (testWebContextURIScheme): Modify test to check the behavior of the new
2707         method.
2708         * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
2709         (WebKit::WebSoupRequestManagerProxy::didFailURIRequest):
2710         (WebKit): Implement new method using
2711         WebSoupRequestManager::DidFailURIRequest().
2712         * UIProcess/soup/WebSoupRequestManagerProxy.h:
2713         (WebSoupRequestManagerProxy): Add new method header.
2714         * WebProcess/soup/WebSoupRequestManager.cpp:
2715         (WebKit):
2716         (WebKit::WebSoupRequestManager::didFailURIRequest): Implement new method
2717         setting the error and completing the request.
2718         * WebProcess/soup/WebSoupRequestManager.h:
2719         (WebSoupRequestManager): Add new method header.
2720         * WebProcess/soup/WebSoupRequestManager.messages.in: Add new method
2721         signature.
2722
2723 2013-05-06  Anders Carlsson  <andersca@apple.com>
2724
2725         Every LocalStorageDatabase should know about its tracker
2726         https://bugs.webkit.org/show_bug.cgi?id=115673
2727
2728         Reviewed by Andreas Kling.
2729
2730         * UIProcess/Storage/LocalStorageDatabase.cpp:
2731         (WebKit::LocalStorageDatabase::create):
2732         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
2733         * UIProcess/Storage/LocalStorageDatabase.h:
2734         * UIProcess/Storage/StorageManager.cpp:
2735         (WebKit::StorageManager::StorageArea::StorageArea):
2736
2737 2013-05-06  Anders Carlsson  <andersca@apple.com>
2738
2739         Add LocalStorageDatabaseTracker class
2740         https://bugs.webkit.org/show_bug.cgi?id=115671
2741
2742         Reviewed by Andreas Kling.
2743
2744         Somewhat unsurprisingly, this class will be used for tracking local storage databases.
2745
2746         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: Added.
2747         (WebKit::LocalStorageDatabaseTracker::create):
2748         (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
2749         (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
2750         * UIProcess/Storage/LocalStorageDatabaseTracker.h: Added.
2751         (LocalStorageDatabaseTracker):
2752         
2753         * UIProcess/Storage/StorageManager.cpp:
2754         (WebKit::StorageManager::StorageManager):
2755         Create a local storage database tracker.
2756
2757         * WebKit2.xcodeproj/project.pbxproj:
2758         Add new files.
2759
2760 2013-05-06  Anders Carlsson  <andersca@apple.com>
2761
2762         Handle closing the local storage database
2763         https://bugs.webkit.org/show_bug.cgi?id=115669
2764
2765         Reviewed by Beth Dakin.
2766
2767         * UIProcess/Storage/LocalStorageDatabase.cpp:
2768         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
2769         Initialize m_isClosed.
2770     
2771         (WebKit::LocalStorageDatabase::~LocalStorageDatabase):
2772         Assert that m_isClosed is false.
2773
2774         (WebKit::LocalStorageDatabase::close):
2775         Set m_isClosed to true and write any pending changes to disk.
2776
2777         (WebKit::LocalStorageDatabase::updateDatabase):
2778         Compute the changed items and pass them to updateDatabaseWithChangedItems.
2779
2780         (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
2781         Split out the code that actually writes to the database from updateDatabase and into this function.
2782
2783         * UIProcess/Storage/LocalStorageDatabase.h:
2784         * UIProcess/Storage/StorageManager.cpp:
2785         (WebKit::StorageManager::StorageArea::~StorageArea):
2786         Call close().
2787
2788 2013-05-06  Zan Dobersek  <zdobersek@igalia.com>
2789
2790         [WK2] Make the WebNetworkInfoManagerProxy a supplement to the WebContext
2791         https://bugs.webkit.org/show_bug.cgi?id=115654
2792
2793         Reviewed by Andreas Kling.
2794
2795         Rather than holding a RefPtr to the WebNetworkInfoManagerProxy object in WebContext, change the WebNetworkInfoManagerProxy
2796         to implement the WebContextSupplement interface and handle the object as such in WebContext, simplifying its
2797         construction and cleanup, removing the specific RefPtr member variable and its correlating getter method.
2798
2799         * UIProcess/API/C/WKContext.cpp:
2800         (WKContextGetNetworkInfoManager): Retrieve the WebNetworkInfoManagerProxy object from the suppplements of the WebContext.
2801         * UIProcess/WebContext.cpp:
2802         (WebKit::WebContext::WebContext): Add the WebNetworkInfoManagerProxy object as a supplement instead of assigning it to
2803         the now-removed member variable.
2804         (WebKit::WebContext::~WebContext): No need for the specific cleanup, the equivalent is achieved when iterating through the
2805         supplements vector.
2806         (WebKit::WebContext::disconnectProcess): Ditto.
2807         * UIProcess/WebContext.h:
2808         (WebContext): Remove the WebNetworkInfoManagerProxy RefPtr member variable and its getter method.
2809         * UIProcess/WebNetworkInfoManagerProxy.cpp:
2810         (WebKit::WebNetworkInfoManagerProxy::supplementName): Specift the supplement's name.
2811         (WebKit::WebNetworkInfoManagerProxy::WebNetworkInfoManagerProxy): Initialize as a WebContextSupplement.
2812         (WebKit::WebNetworkInfoManagerProxy::providerDidChangeNetworkInformation): Adjust to use the context() method instead of
2813         accessing the private m_context directly.
2814         (WebKit::WebNetworkInfoManagerProxy::contextDestroyed): Stop updating when invoked.
2815         (WebKit::WebNetworkInfoManagerProxy::processDidClose): Ditto.
2816         (WebKit::WebNetworkInfoManagerProxy::refWebContextSupplement): Call APIObject::ref.
2817         (WebKit::WebNetworkInfoManagerProxy::derefWebContextSupplement): Call APIObject::deref.
2818         * UIProcess/WebNetworkInfoManagerProxy.h:
2819         (WebNetworkInfoManagerProxy): Inherit from WebContextSupplement, declare the newly-inherited methods.
2820
2821 2013-05-06  Alexey Proskuryakov  <ap@apple.com>
2822
2823         <rdar://problem/13479806> [Mac] Pass plug-in bundle ID to LaunchServices
2824         https://bugs.webkit.org/show_bug.cgi?id=115483
2825
2826         Reviewed by Darin Adler.
2827
2828         * PluginProcess/PluginProcess.h: Added m_pluginBundleIdentifier. We now need it
2829         in multiple places, so it's easier to pre-compute it.
2830
2831         * PluginProcess/mac/PluginProcessMac.mm:
2832         (WebKit::loadSandboxProfileForDirectory): Changed to use precomputed bundle ID.
2833         (WebKit::loadSandboxProfile): Ditto.
2834         (WebKit::PluginProcess::platformInitializeProcess): Pre-compute bundle ID.
2835         (WebKit::PluginProcess::initializeProcessName): Pass it to LaunchServices.
2836         (WebKit::PluginProcess::initializeSandbox): Pass precomputed bundle ID instead of
2837         a path.
2838
2839 2013-05-06  Anders Carlsson  <andersca@apple.com>
2840
2841         Handle removeItem and clear in LocalStorageDatabase
2842         https://bugs.webkit.org/show_bug.cgi?id=115664
2843
2844         Reviewed by Darin Adler.
2845
2846         * UIProcess/Storage/LocalStorageDatabase.cpp:
2847         (WebKit::LocalStorageDatabase::removeItem):
2848         Call itemDidChange with a null value, indicating that we want to remove this item.
2849
2850         (WebKit::LocalStorageDatabase::clear):
2851         Clear items, set m_shouldClearItems and schedule a database update.
2852
2853         (WebKit::LocalStorageDatabase::updateDatabase):
2854         If m_shouldClearItems is true, clear all items.
2855
2856         * UIProcess/Storage/StorageManager.cpp:
2857         (WebKit::StorageManager::StorageArea::removeItem):
2858         Call through to the local storage database.
2859
2860         (WebKit::StorageManager::StorageArea::clear):
2861         Ditto.
2862
2863 2013-05-06  Anders Carlsson  <andersca@apple.com>
2864
2865         Write storage changes to disk
2866         https://bugs.webkit.org/show_bug.cgi?id=115660
2867
2868         Reviewed by Andreas Kling.
2869
2870         * UIProcess/Storage/LocalStorageDatabase.cpp:
2871         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
2872         Initialize new member variables.
2873
2874         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
2875         Disable database threading checks.
2876
2877         (WebKit::LocalStorageDatabase::importItems):
2878         Only import the items once.
2879
2880         (WebKit::LocalStorageDatabase::setItem):
2881         Call itemDidChange.
2882
2883         (WebKit::LocalStorageDatabase::itemDidChange):
2884         Record the change and schedule a database update.
2885
2886         (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
2887         Use WorkQueue::dispatchAfterDelay to schedule a datbase update.
2888
2889         (WebKit::LocalStorageDatabase::updateDatabase):
2890         Write changes to disk. If there are more than 100 pending items, only write the first 100 and then schedule
2891         another database update for the remaining items.
2892
2893         * UIProcess/Storage/LocalStorageDatabase.h:
2894         Add new member variables.
2895
2896         * UIProcess/Storage/StorageManager.cpp:
2897         (WebKit::StorageManager::StorageArea::setItem):
2898         Call LocalStorageDatabase::setItem.
2899
2900 2013-05-06  Zan Dobersek  <zdobersek@igalia.com>
2901
2902         [WK2] Make the WebBatteryManagerProxy a supplement to the WebContext
2903         https://bugs.webkit.org/show_bug.cgi?id=115625
2904
2905         Reviewed by Andreas Kling.
2906
2907         Rather than holding a RefPtr to the WebBatteryManagerProxy object in WebContext, change the WebBatteryManagerProxy
2908         to implement the WebContextSupplement interface and handle the object as such in WebContext, simplifying its
2909         construction and cleanup, removing the specific RefPtr member variable and its correlating getter method.
2910
2911         * UIProcess/API/C/WKContext.cpp:
2912         (WKContextGetBatteryManager): Retrieve the WebBatteryManagerProxy object from the supplements of the WebContext.
2913         * UIProcess/WebBatteryManagerProxy.cpp:
2914         (WebKit::WebBatteryManagerProxy::supplementName): Specify the supplement's name.
2915         (WebKit::WebBatteryManagerProxy::WebBatteryManagerProxy): Initialize as a WebContextSupplementable.
2916         (WebKit::WebBatteryManagerProxy::providerDidChangeBatteryStatus): Adjust to use the context() method instead of accessing
2917         the private m_context directly.
2918         (WebKit::WebBatteryManagerProxy::providerUpdateBatteryStatus): Ditto.
2919         (WebKit::WebBatteryManagerProxy::contextDestroyed): Stop updating when invoked.
2920         (WebKit::WebBatteryManagerProxy::processDidClose): Ditto.
2921         (WebKit::WebBatteryManagerProxy::refWebContextSupplement): Call APIObject::ref.
2922         (WebKit::WebBatteryManagerProxy::derefWebContextSupplement): Call APIObject::deref.
2923         (WebKit::WebBatteryManagerProxy::startUpdating): Fire up the provider if not yet updating.
2924         (WebKit::WebBatteryManagerProxy::stopUpdating): Wind down the provider if updating.
2925         * UIProcess/WebBatteryManagerProxy.h:
2926         (WebBatteryManagerProxy): Inherit from WebContextSupplement, declare the newly-inherited methods.
2927         * UIProcess/WebContext.cpp:
2928         (WebKit::WebContext::WebContext): Add the WebBatteryManagerProxy object as a supplement instead of assigning it to
2929         the now-removed member variable.
2930         (WebKit::WebContext::~WebContext): No need for the specific cleanup, the equivalent is achieved when iterating through the
2931         supplements vector.
2932         (WebKit::WebContext::disconnectProcess): Ditto.
2933         * UIProcess/WebContext.h:
2934         (WebContext): Remove the WebBatteryManagerProxy RefPtr member variable and its getter method.
2935
2936 2013-05-06  Antoine Quint  <graouts@apple.com>
2937
2938         Manage the presentation of the snapshotted plug-in using JavaScript
2939         https://bugs.webkit.org/show_bug.cgi?id=115548
2940
2941         Reviewed by Dean Jackson.
2942
2943         Expose a new plugInExtraScript method to support the injection of
2944         a JS file from the chrome client to customize the rendering of a
2945         snapshotted plug-in's shadow tree. Additionally, it is expected
2946         the chrome client will want to provide localized strings taking
2947         into account the snapshotted plug-in's mime-type, so we're adding
2948         this as a parameter to both plugInStartLabelTitle and
2949         plugInStartLabelSubtitle methods.
2950
2951         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2952         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2953         (WebKit::InjectedBundlePageUIClient::plugInStartLabelTitle):
2954         (WebKit::InjectedBundlePageUIClient::plugInStartLabelSubtitle):
2955         (WebKit::InjectedBundlePageUIClient::plugInExtraScript):
2956         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
2957         (InjectedBundlePageUIClient):
2958         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2959         (WebKit::WebChromeClient::plugInStartLabelTitle):
2960         (WebKit::WebChromeClient::plugInStartLabelSubtitle):
2961         (WebKit::WebChromeClient::plugInExtraScript):
2962         * WebProcess/WebCoreSupport/WebChromeClient.h:
2963         (WebChromeClient):
2964
2965 2013-05-05  Chris Fleizach  <cfleizach@apple.com>
2966
2967         WEB SPEECH: deny file-read-data /Library/Speech/Synthesizers
2968         https://bugs.webkit.org/show_bug.cgi?id=115621
2969
2970         Reviewed by Alexey Proskuryakov.
2971
2972         Allow access to the location where 3rd party speech synthesizers are stored.
2973
2974         * WebProcess/com.apple.WebProcess.sb.in:
2975
2976 2013-05-05  Tim Horton  <timothy_horton@apple.com>
2977
2978         [wk2] Page Overlays: deviceScaleFactor doesn't update when the display changes
2979         https://bugs.webkit.org/show_bug.cgi?id=115577
2980         <rdar://problem/13762583>
2981
2982         Reviewed by Darin Adler.
2983
2984         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2985         (WebKit::TiledCoreAnimationDrawingArea::setDeviceScaleFactor):
2986         Invalidate the page overlay layers' device scale factor when
2987         TiledCoreAnimationDrawingArea is notified that it has changed.
2988
2989 2013-05-05  Anders Carlsson  <andersca@apple.com>
2990
2991         Remove the Vector::append overload that takes a Vector
2992         https://bugs.webkit.org/show_bug.cgi?id=115535
2993
2994         Reviewed by Andreas Kling.
2995
2996         Use Vector::appendVector instead.
2997
2998         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
2999         (WebKit::NetworkBlobRegistry::registerBlobURL):
3000         * NetworkProcess/SchedulableLoader.cpp:
3001         (WebKit::SchedulableLoader::SchedulableLoader):
3002         * Platform/CoreIPC/Connection.cpp:
3003         (CoreIPC::Connection::SyncMessageState::dispatchMessages):
3004         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
3005         (WebKit::PluginInfoStore::pluginsDirectories):
3006
3007 2013-05-04  Sam Weinig  <sam@webkit.org>
3008
3009         Fix * placement in a few functions as noticed by Mark Rowe.
3010
3011         Rubber-stamped by Dan Bernstein.
3012
3013         * WebProcess/WebPage/PageBanner.h:
3014         (PageBanner):
3015         * WebProcess/WebPage/mac/PageBannerMac.mm:
3016         (WebKit::PageBanner::create):
3017         (WebKit::PageBanner::PageBanner):
3018
3019 2013-05-04  Sam Weinig  <sam@webkit.org>
3020
3021         REGRESSION(r148312): Crash when calling WKPageClose(page) followed by WKPageTerminate(page)
3022         <rdar://problem/13702008>
3023         https://bugs.webkit.org/show_bug.cgi?id=115607
3024
3025         Reviewed by Benjamin Poulain.
3026
3027         API Test: WebKit2.CloseThenTerminate
3028
3029         * UIProcess/WebPageProxy.cpp:
3030         (WebKit::WebPageProxy::resetStateAfterProcessExited):
3031         Don't try to reset the state if the page is closed, it won't work and its not worth it.
3032
3033 2013-05-04  Beth Dakin  <bdakin@apple.com>
3034
3035         https://bugs.webkit.org/show_bug.cgi?id=115574
3036         Crash using new WKBundlePageSetHeaderBanner() API to set a banner to null
3037
3038         Reviewed by Darin Adler.
3039
3040         Don't call addToPage() on a null banner.
3041         * WebProcess/WebPage/WebPage.cpp:
3042         (WebKit::WebPage::setHeaderPageBanner):
3043         (WebKit::WebPage::setFooterPageBanner):
3044
3045 2013-05-03  Alexey Proskuryakov  <ap@apple.com>
3046
3047         <rdar://problem/13806836> Tweak sandbox profile.
3048
3049         Reviewed by Dan Bernstein.
3050
3051         * WebProcess/com.apple.WebProcess.sb.in:
3052
3053 2013-05-03  Tim Horton  <timothy_horton@apple.com>
3054
3055         PDFPlugin: Changes being made to active annotation aren't saved when the PDF is exported
3056         https://bugs.webkit.org/show_bug.cgi?id=115544
3057         <rdar://problem/13801789>
3058
3059         Reviewed by Alexey Proskuryakov.
3060
3061         Commit changes to the active annotation (if there is one) before
3062         returning the live PDF data, so that said changes are represented
3063         in the exported or printed output.
3064
3065         * WebProcess/Plugins/PDF/PDFPlugin.h: Override liveData.
3066         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3067         (WebKit::PDFPlugin::liveData): Commit the active annotation if there is one.
3068         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
3069         (SimplePDFPlugin): Make liveData virtual.
3070
3071 2013-05-03  Tim Horton  <timothy_horton@apple.com>
3072
3073         Web process crashes at WebPage::determinePrimarySnapshottedPlugInTimerFired + 8
3074         https://bugs.webkit.org/show_bug.cgi?id=115056
3075         <rdar://problem/13719543>
3076
3077         Reviewed by Simon Fraser.
3078
3079         Null-check m_page. In theory, we shouldn't get here, because we stop
3080         the timer at the only point where m_page is cleared, but crash logs say
3081         we're still crashing here.
3082
3083         * WebProcess/WebPage/WebPage.cpp:
3084         (WebKit::WebPage::determinePrimarySnapshottedPlugInTimerFired):
3085
3086 2013-05-03  Tim Horton  <timothy_horton@apple.com>
3087
3088         Remove some "what" comments from FindController
3089         https://bugs.webkit.org/show_bug.cgi?id=115546
3090
3091         Reviewed by Andreas Kling.
3092
3093         * WebProcess/WebPage/FindController.cpp:
3094         (WebKit::FindController::countStringMatches):
3095         (WebKit::FindController::updateFindUIAfterPageScroll):
3096         (WebKit::FindController::willMoveToWebPage):
3097         (WebKit::FindController::mouseEvent):
3098         Remove or reword some comments.
3099
3100 2013-05-02  Andy Estes  <aestes@apple.com>
3101
3102         [WK2][CustomProtocols] NSURLProtocolClient methods should be dispatched on NSURLConnection's resource loader run loop
3103         https://bugs.webkit.org/show_bug.cgi?id=115539
3104
3105         Reviewed by Alexey Proskuryakov.
3106
3107         It turns out that calling NSURLProtocolClient methods from a different
3108         thread than the one running the NSURLConnection run loop is unsafe.
3109         Although I can't capture it reliably in a test case, doing so can
3110         sometimes result in a load timing out because the call to
3111         -[NSURLProtocolClient URLProtocolDidFinishLoading:] was ignored by
3112         NSURLConnection.
3113
3114         Fix this by dispatching these methods on the NSURLConnection resource
3115         load run loop. This matches where NSURLProtocolClient methods are
3116         dispatched by typical NSURLProtocol implementations, and in my testing
3117         this solves the timeout issue.
3118
3119         * Shared/Network/CustomProtocols/CustomProtocolManager.h: Declare
3120         dispatchOnResourceLoaderRunLoop().
3121         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
3122         Declare +[NSURLConnection resourceLoaderRunLoop] on a category of
3123         NSURLConnection. Also include the header that declares it if it's present.
3124         (WebKit::CustomProtocolManager::didFailWithError): Call the
3125         NSURLProtocolClient method via dispatchOnResourceLoaderRunLoop().
3126         (WebKit::CustomProtocolManager::didLoadData): Ditto.
3127         (WebKit::CustomProtocolManager::didReceiveResponse): Ditto.
3128         (WebKit::CustomProtocolManager::didFinishLoading): Ditto.
3129         (WebKit::CustomProtocolManager::dispatchOnResourceLoaderRunLoop):
3130         Dispatch a block on the NSURLConnection resource loader run loop and
3131         then wake up the run loop.
3132
3133 2013-05-02  Brady Eidson  <beidson@apple.com>
3134
3135         REGRESSION (149389) Main resources converted to downloads are immediately cancelled.
3136         <rdar://problem/13795795> and https://bugs.webkit.org/show_bug.cgi?id=115530
3137
3138         Reviewed by Alexey Proskuryakov.
3139
3140         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3141         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Call didConvertHandleToDownload
3142           on the NetworkResourceLoader.
3143
3144         * NetworkProcess/NetworkResourceLoader.cpp:
3145         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
3146         (WebKit::NetworkResourceLoader::didConvertHandleToDownload): Set m_handleConvertedToDownload to true.
3147         (WebKit::NetworkResourceLoader::abort): Only cancel the handle if m_handleConvertedToDownload is false.
3148         * NetworkProcess/NetworkResourceLoader.h:
3149
3150 2013-05-02  Alexey Proskuryakov  <ap@apple.com>
3151
3152         <rdar://problem/13740375> Non-ASCII downloaded file names are garbled when using NetworkProcess
3153         https://bugs.webkit.org/show_bug.cgi?id=115520
3154
3155         Reviewed by Darin Adler.
3156
3157         * Shared/mac/WebCoreArgumentCodersMac.mm:
3158         (CoreIPC::::encodePlatformData):
3159         (CoreIPC::::decodePlatformData):
3160         Send the encoding fallback array over IPC, so that it's present when NetworkProcess does its loading.
3161
3162 2013-05-01  Alexey Proskuryakov  <ap@apple.com>
3163
3164         REGRESSION (r149422): -[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]
3165         broken when second argument is nil
3166         https://bugs.webkit.org/show_bug.cgi?id=115505
3167         <rdar://problem/13787297>
3168
3169         Reviewed by Darin Adler.
3170
3171         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile): Pass a URL string
3172         to assumeReadAccessToBaseURL, as this is what it takes.
3173
3174 2013-05-01  Ryosuke Niwa  <rniwa@webkit.org>
3175
3176         [Mac] WebKit doesn't enable or disable autocorrections when system preferences are changed
3177         https://bugs.webkit.org/show_bug.cgi?id=115463
3178
3179         Reviewed by Darin Adler.
3180
3181         Observe the default notification center and propagate the changes to TextCheckerState and
3182         to all WebProcesses when system preferences are updated.
3183
3184         * UIProcess/TextChecker.h:
3185         * UIProcess/WebContext.h:
3186         * UIProcess/mac/TextCheckerMac.mm:
3187         (WebKit::shouldAutomaticTextReplacementBeEnabled):
3188         (WebKit::shouldAutomaticSpellingCorrectionBeEnabled):
3189         (WebKit::shouldAutomaticQuoteSubstitutionBeEnabled):
3190         (WebKit::shouldAutomaticDashSubstitutionBeEnabled):
3191         (WebKit::initializeState):
3192         (WebKit::TextChecker::didChangeAutomaticTextReplacementEnabled):
3193         (WebKit::TextChecker::didChangeAutomaticSpellingCorrectionEnabled):
3194         (WebKit::TextChecker::didChangeAutomaticQuoteSubstitutionEnabled):
3195         (WebKit::TextChecker::didChangeAutomaticDashSubstitutionEnabled):
3196         * UIProcess/mac/WebContextMac.mm:
3197         (WebKit::WebContext::registerNotificationObservers):
3198         (WebKit::WebContext::unregisterNotificationObservers):
3199
3200 2013-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
3201
3202         [GTK] Fix build break after r149449
3203         https://bugs.webkit.org/show_bug.cgi?id=115500
3204
3205         Reviewed by Gustavo Noronha Silva.
3206
3207         Unreviewed GTK build fix
3208
3209         * GNUmakefile.list.am: Added LocalStorageDatabase.[cpp|h] to the list of
3210         sources.
3211
3212 2013-05-01  Martin Robinson  <mrobinson@igalia.com>
3213
3214         [GTK] [WebKit2] Documentation for webkit_web_view_run_javascript should indicate what happens when JavaScript is disabled
3215         https://bugs.webkit.org/show_bug.cgi?id=115492
3216
3217         Reviewed by Xan Lopez.
3218
3219         * UIProcess/API/gtk/WebKitWebView.cpp: Clarify the documentation.
3220
3221 2013-05-01  Tim Horton  <timothy_horton@apple.com>
3222
3223         Move knowledge of PDF/PostScript MIME types into MIMETypeRegistry
3224         https://bugs.webkit.org/show_bug.cgi?id=115487
3225
3226         Reviewed by Darin Adler.
3227
3228         * UIProcess/WebContext.cpp:
3229         * UIProcess/WebContext.h:
3230         Remove pdfAndPostScriptMIMETypes.
3231
3232         * UIProcess/WebFrameProxy.cpp:
3233         (WebKit::WebFrameProxy::canShowMIMEType): Move PDF bits to WebPageProxy.
3234         (WebKit::WebFrameProxy::isDisplayingPDFDocument):
3235         Make use of WebCore's newfound knowledge of PDF and PostScript MIME types,
3236         so we don't have to duplicate it unnecessarily in WebKit2.
3237
3238         * UIProcess/WebPageProxy.cpp:
3239         (WebKit::WebPageProxy::canShowMIMEType):
3240         Add code which used to be in WebFrameProxy::canShowMIMEType, and adapt it
3241         to use WebCore's knowledge of PDF and PostScript MIME types.
3242
3243         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
3244         (WebKit::SimplePDFPlugin::pluginInfo):
3245         We previously supported the "text/pdf" MIME type for PDFViewController,
3246         so SimplePDFPlugin and PDFPlugin should support it as well.
3247
3248         * WebProcess/WebPage/WebPage.cpp:
3249         (WebKit::WebPage::createPlugin):
3250         Adopt MIMETypeRegistry::isPDFOrPostScriptMIMEType.
3251
3252         * WebProcess/WebPage/WebPage.h:
3253         (WebPage):
3254         Remove pdfAndPostScriptMIMETypes.
3255
3256         * WebProcess/WebPage/mac/WebPageMac.mm:
3257         (WebKit::WebPage::platformPreferencesDidChange):
3258         Adopt getPDFAndPostScriptMIMETypes instead of duplicating the list in WebKit2.
3259
3260 2013-05-01  Anders Carlsson  <andersca@apple.com>
3261
3262         Implement LocalStorageDatabase::importItems
3263         https://bugs.webkit.org/show_bug.cgi?id=115493
3264
3265         Reviewed by Andreas Kling.
3266
3267         Fetch items and insert them in the storage map.
3268         * UIProcess/Storage/LocalStorageDatabase.cpp:
3269         (WebKit::LocalStorageDatabase::importItems):
3270
3271 2013-05-01  Anders Carlsson  <andersca@apple.com>
3272
3273         Begin work on loading items from the local storage database
3274         https://bugs.webkit.org/show_bug.cgi?id=115489
3275
3276         Reviewed by Andreas Kling.
3277
3278         Some of the LocalStorageDatabase code is originally from WebCore,
3279         but has been simplified due to the fact that we don't need to load
3280         database data asynchronously since we're already running on a non-main thread.
3281
3282         * UIProcess/Storage/LocalStorageDatabase.cpp:
3283         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
3284         (WebKit::LocalStorageDatabase::openDatabase):
3285         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
3286         (WebKit::LocalStorageDatabase::migrateItemTableIfNeeded):
3287         (WebKit::LocalStorageDatabase::importItems):
3288
3289         * UIProcess/Storage/LocalStorageDatabase.h:
3290         (WebKit::StorageManager::StorageArea::setItem):
3291         (WebKit::StorageManager::StorageArea::removeItem):
3292         (WebKit::StorageManager::StorageArea::clear):
3293         (WebKit::StorageManager::StorageArea::items):
3294         Call importItemsFromDatabase().
3295         
3296         (WebKit::StorageManager::StorageArea::importItemsFromDatabase):
3297         Ask the database to import the items.
3298
3299 2013-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
3300
3301         [EFL] Unreviewed buildfix after r149449.
3302
3303         * CMakeLists.txt:
3304
3305 2013-05-01  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3306
3307         [Qt] Unreviewed buildfix after r149449.
3308
3309         * Target.pri:
3310
3311 2013-05-01  Anders Carlsson  <andersca@apple.com>
3312
3313         Add LocalStorageDatabase class
3314         https://bugs.webkit.org/show_bug.cgi?id=115486
3315
3316         Reviewed by Sam Weinig.
3317
3318         The LocalStorageDatabase class will persist local storage data to disk.
3319
3320         * UIProcess/Storage/LocalStorageDatabase.cpp:
3321         * UIProcess/Storage/LocalStorageDatabase.h: Added.
3322
3323         * UIProcess/Storage/StorageManager.cpp:
3324         (StorageManager::StorageArea):
3325         (WebKit::StorageManager::LocalStorageNamespace::storageManager):
3326         Add getter.
3327
3328         (StorageManager::LocalStorageNamespace):
3329         (WebKit::StorageManager::StorageArea::StorageArea):
3330         If this is a local storage area, create a LocalStorageDatabase.
3331
3332         (WebKit::StorageManager::LocalStorageNamespace::databaseFilename):
3333         Helper function for getting the name of the database for the given origin.
3334
3335         * WebKit2.xcodeproj/project.pbxproj:
3336         Add new files.
3337
3338 2013-05-01  Alexey Proskuryakov  <ap@apple.com>
3339
3340         <rdar://problem/13781156> Launching NetworkProcess broken on some OS versions.
3341
3342         Reviewed by Anders Carlsson.
3343
3344         Adapt to LaunchServices changes.
3345
3346         * Shared/mac/ChildProcessMac.mm:
3347         (WebKit::ChildProcess::setApplicationIsDaemon):
3348
3349 2013-05-01  Martin Robinson  <mrobinson@igalia.com>
3350
3351         [GTK] [WebKit2] Add a setting to control whether or not accelerated 2D canvas is enabled
3352         https://bugs.webkit.org/show_bug.cgi?id=114394
3353
3354         Reviewed by Anders Carlsson.
3355
3356         Add a setting to control accelerated 2D canvas, which determines whether
3357         or not to consider rendering HTML canvas with hardware acceleration.
3358
3359         * UIProcess/API/gtk/WebKitSettings.cpp:
3360         (webKitSettingsSetProperty): Added support for enable-accelerated-2d-canvas property.
3361         (webKitSettingsGetProperty): Added support for enable-accelerated-2d-canvas property.
3362         (webkit_settings_class_init): Added support for enable-accelerated-2d-canvas property.
3363         (webkit_settings_get_enable_accelerated_2d_canvas): Added.
3364         (webkit_settings_set_enable_accelerated_2d_canvas): Added.
3365         * UIProcess/API/gtk/WebKitSettings.h: New methods.
3366         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new methods to the documentation.
3367         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
3368         (testWebKitSettings): Added a simple test for the setting.
3369
3370 2013-04-30  Jer Noble  <jer.noble@apple.com>
3371
3372         Entering full screen mode shows desktop linen instead of WKView the first time.
3373         https://bugs.webkit.org/show_bug.cgi?id=115433
3374         <rdar://problem/13774540>
3375
3376         Reviewed by Eric Carlson.
3377
3378         For certain types of windows created by subclasses of WKView, the window in question fails to paint
3379         when created with a zero-size rect. Create the window with an initial size of the active screen frame
3380         as that is the likely destination size.
3381
3382         * UIProcess/API/mac/WKView.mm:
3383         (-[WKView createFullScreenWindow]):
3384
3385 2013-05-01  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3386
3387         [Qt][Win] Fix build after r149416.
3388         https://bugs.webkit.org/show_bug.cgi?id=115474
3389
3390         Reviewed by Anders Carlsson.
3391
3392         * Platform/CoreIPC/Connection.h:
3393         (Connection):
3394         * Platform/CoreIPC/win/ConnectionWin.cpp:
3395         (CoreIPC::Connection::dispatchSentMessagesUntil):
3396
3397 2013-05-01  Sergio Villar Senin  <svillar@igalia.com>
3398
3399         Unreviewed GTK build fix after r149417.
3400
3401         * GNUmakefile.list.am: Added PageBanner.[cpp|h] to the list of
3402         sources.
3403
3404 2013-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
3405
3406         [EFL] Unreviewed buildfix after r149416 and r149417.
3407
3408         Unreviewed build fix.
3409
3410         * CMakeLists.txt:
3411
3412 2013-05-01  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3413
3414         [Qt] Unreviewed buildfix after r149416 and r149417.
3415
3416         * Target.pri:
3417
3418 2013-04-30  Dongwoo Joshua Im  <dw.im@samsung.com>
3419
3420         [EFL] Unreviewed, EFL build fix after r149416
3421         https://bugs.webkit.org/show_bug.cgi?id=115467
3422
3423         Unreviewed build fix.
3424
3425         * CMakeLists.txt: Remove non-existing file, BinarySemaphore.cpp, from the list.
3426
3427 2013-04-30  Simon Cooper  <scooper@apple.com>
3428
3429         ipc-posix-shm backwards compatibility 
3430         https://bugs.webkit.org/show_bug.cgi?id=115448
3431         <rdar://problem/13743037>
3432
3433         Reviewed by Alexey Proskuryakov.
3434
3435         Add compatibility for older ipc-posix-shm operations, but prefer the
3436         newer names when writing profiles.
3437
3438         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3439
3440 2013-04-30  Philippe Normand  <pnormand@igalia.com>
3441
3442         Unreviewed, GTK build fix after r149416.
3443
3444         * GNUmakefile.list.am: Remove references to non-existant
3445         BinarySemaphore module.
3446
3447 2013-04-28  Alexey Proskuryakov  <ap@apple.com>
3448
3449         <rdar://problem/13574729> Implement file path restrictions in WebKit Objective C API
3450         https://bugs.webkit.org/show_bug.cgi?id=115321
3451
3452         Reviewed by Darin Adler.
3453
3454         * UIProcess/API/C/WKPage.cpp:
3455         * UIProcess/API/C/WKPage.h: 
3456         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile):
3457         * UIProcess/WebPageProxy.h:
3458         Added and implemented a C API to load a file while only opening sandbox for
3459         a specific directory.
3460
3461         * UIProcess/API/mac/WKBrowsingContextController.h: Fixed a typo in a comment.
3462
3463         * UIProcess/API/mac/WKBrowsingContextController.mm:
3464         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
3465         Respect allowedDirectory argument. Updated the function to raise an exception for
3466         incorrect input, as decribed in header file.
3467
3468 2013-04-29  Sam Weinig  <sam@webkit.org>
3469
3470         Add API to allow WebKit2 banners to get mouse events
3471         https://bugs.webkit.org/show_bug.cgi?id=115395
3472
3473         Reviewed by Beth Dakin.
3474
3475         * Shared/API/c/WKBase.h:
3476         * Shared/APIObject.h:
3477         Add banner type.
3478
3479         * WebKit2.xcodeproj/project.pbxproj:
3480         Add files.
3481
3482         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
3483         Add conversion.
3484
3485         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3486         (WKBundlePageSetTopOverhangImage):
3487         (WKBundlePageSetBottomOverhangImage):
3488         Fix parameter names to be consistent.
3489
3490         (WKBundlePageSetHeaderBanner):
3491         (WKBundlePageSetFooterBanner):
3492         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3493         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.cpp: Added.
3494         (WKBundlePageBannerGetTypeID):
3495         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h: Added.
3496         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.h: Added.
3497         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm: Added.
3498         (PageBannerClientImpl):
3499         (PageBannerClientImpl::create):
3500         (PageBannerClientImpl::PageBannerClientImpl):
3501         (PageBannerClientImpl::pageBannerDestroyed):
3502         (PageBannerClientImpl::mouseEvent):
3503         (WKBundlePageBannerCreateBannerWithCALayer):
3504         (WKBundlePageBannerGetLayer):
3505         Add banner API.
3506
3507         * WebProcess/WebPage/PageBanner.h: Added.
3508         * WebProcess/WebPage/PageBanner.cpp: Added.
3509         (WebKit::PageBanner::~PageBanner):
3510         (WebKit::PageBanner::addToPage):
3511         (WebKit::PageBanner::detachFromPage):
3512         (WebKit::PageBanner::didChangeDeviceScaleFactor):
3513         (WebKit::PageBanner::mouseEvent):
3514         Add non-mac implementations.
3515
3516         * WebProcess/WebPage/WebPage.cpp:
3517         (WebKit::WebPage::~WebPage):
3518         (WebKit::WebPage::setHeaderPageBanner):
3519         (WebKit::WebPage::headerPageBanner):
3520         (WebKit::WebPage::setFooterPageBanner):
3521         (WebKit::WebPage::footerPageBanner):
3522         (WebKit::WebPage::mouseEvent):
3523         (WebKit::WebPage::mouseEventSyncForTesting):
3524         * WebProcess/WebPage/WebPage.h:
3525         Add banner setter/getters and give the banners a chance to handle mouse events.
3526
3527         * WebProcess/WebPage/mac/PageBannerMac.mm: Added.
3528         (WebKit::PageBanner::create):
3529         (WebKit::PageBanner::PageBanner):
3530         (WebKit::PageBanner::addToPage):
3531         (WebKit::PageBanner::detachFromPage):
3532         (WebKit::PageBanner::didChangeDeviceScaleFactor):
3533         (WebKit::PageBanner::mouseEvent):
3534         (WebKit::PageBanner::layer):
3535         Add Mac implementation.
3536
3537         * WebProcess/WebPage/mac/WebPageMac.mm:
3538         (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):
3539         Notify banners when the device scale changes.
3540
3541 2013-04-30  Anders Carlsson  <andersca@apple.com>
3542
3543         Remove the WebKit2 BinarySemaphore class
3544         https://bugs.webkit.org/show_bug.cgi?id=115458
3545
3546         Reviewed by Benjamin Poulain.
3547
3548         Remove the WK2 specific BinarySemaphore class and use the one from WTF.
3549
3550         * Platform/CoreIPC/BinarySemaphore.cpp: Removed.
3551         * Platform/CoreIPC/BinarySemaphore.h: Removed.
3552         * Platform/CoreIPC/Connection.cpp:
3553         * Platform/CoreIPC/Connection.h:
3554         * WebKit2.xcodeproj/project.pbxproj:
3555
3556 2013-04-30  Alexey Proskuryakov  <ap@apple.com>
3557
3558         <rdar://problem/13757475> WebProcess deny ipc-posix-shm-read-data CFPBS:A2:
3559
3560         Reviewed by Anders Carlsson.
3561
3562         * WebProcess/com.apple.WebProcess.sb.in: Allow pbs shared memory.
3563
3564 2013-04-30  Alexey Proskuryakov  <ap@apple.com>
3565
3566         [Mac] Don't open window server connection in network process
3567         https://bugs.webkit.org/show_bug.cgi?id=115446
3568
3569         Reviewed by Anders Carlsson.
3570
3571         * NetworkProcess/NetworkProcess.cpp:
3572         (WebKit::NetworkProcess::initializeProcess):
3573         * NetworkProcess/NetworkProcess.h:
3574         * NetworkProcess/mac/NetworkProcessMac.mm:
3575         (WebKit::NetworkProcess::initializeProcess):
3576         (WebKit::NetworkProcess::initializeProcessName):
3577         Instead of shutting down a connection after setting process name, just prevent
3578         it from being created.
3579
3580         * Shared/ChildProcess.h:
3581         * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::setApplicationIsDaemon):
3582         Expose a function for client processes to call if they don't run an NSApplication
3583         run loop.
3584
3585         * OfflineStorageProcess/OfflineStorageProcess.cpp:
3586         (WebKit::OfflineStorageProcess::initializeProcess):
3587         * OfflineStorageProcess/OfflineStorageProcess.h:
3588         * OfflineStorageProcess/mac/OfflineStorageProcessMac.mm:
3589         (WebKit::OfflineStorageProcess::initializeProcess):
3590         (WebKit::OfflineStorageProcess::initializeProcessName):
3591         * SharedWorkerProcess/SharedWorkerProcess.cpp:
3592         (WebKit::SharedWorkerProcess::initializeProcess):
3593         (WebKit::SharedWorkerProcess::initializeProcessName):
3594         * SharedWorkerProcess/SharedWorkerProcess.h:
3595         * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm:
3596         (WebKit::SharedWorkerProcess::initializeProcess):
3597         (WebKit::SharedWorkerProcess::initializeProcessName):
3598         Match NetworkProcess for consistency.
3599
3600         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::initializeProcessName):
3601         Don't null check UI process name. First, it can't be null, and second, some other
3602         processes already don't have this check.
3603
3604 2013-04-30  Tim Horton  <timothy_horton@apple.com>
3605
3606         Disable deprecation warnings around some NSProcessInfo API.
3607
3608         Rubber-stamped by Brady Eidson.
3609
3610         * Shared/mac/ChildProcessMac.mm:
3611         (WebKit::ChildProcess::setProcessSuppressionEnabled):
3612
3613 2013-04-30  Brady Eidson  <beidson@apple.com>
3614
3615         [WK2] Threads get stuck in NetworkProcess when canceling loads in WebProcess.
3616         <rdar://problem/13757687> and https://bugs.webkit.org/show_bug.cgi?id=115319
3617
3618         Written and reviewed by both Alexey Proskuryakov and Brady Eidson.
3619
3620         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3621         (WebKit::NetworkConnectionToWebProcess::didClose): Call abort() on all loaders
3622           instead of connectionToWebProcessDidClose()
3623         (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): Instead of removing
3624           the loader from the scheduler, call abort() which will also end up removing it.
3625
3626         * NetworkProcess/SchedulableLoader.h: Add a virtual abort() call.
3627
3628         * NetworkProcess/NetworkResourceLoader.cpp:
3629         (WebKit::NetworkResourceLoader::sendAbortingOnFailure): Added a messageFlags argument so 
3630           callers can pass DispatchMessageEvenWhenWaitingForSyncReply.
3631         (WebKit::NetworkResourceLoader::abort): Combined "abortInProgressLoad" and "cleanup" to
3632           be a general purpose "cancel"
3633         (WebKit::NetworkResourceLoader::didReceiveBuffer):
3634         (WebKit::NetworkResourceLoader::willSendRequestAsync):
3635         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
3636         * NetworkProcess/NetworkResourceLoader.h:
3637
3638         * NetworkProcess/SyncNetworkResourceLoader.cpp:
3639         (WebKit::SyncNetworkResourceLoader::abort):
3640         * NetworkProcess/SyncNetworkResourceLoader.h:
3641
3642         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3643         (WebKit::WebResourceLoadScheduler::remove): Remove an obsolete/incorrect comment.
3644
3645         * WebProcess/Network/WebResourceLoader.cpp:
3646         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Add comment stressing
3647           the importance of this null check so it's not removed again.
3648
3649 2013-04-30  Carlos Garcia Campos  <cgarcia@igalia.com>
3650
3651         [WK2][GTK] MiniBrowser won't play video in <embed> tag
3652         https://bugs.webkit.org/show_bug.cgi?id=113107
3653
3654         Reviewed by Anders Carlsson.
3655
3656         The wrong clip region is used for windowed plugins, because it's
3657         translated to window frame coords again.
3658
3659         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
3660         (WebKit::NetscapePlugin::platformGeometryDidChange): Do not move
3661         the current clip region.
3662
3663 2013-04-30  Timothy Hatcher  <timothy@apple.com>
3664
3665         Make the Inspector dock to right button work in the WebKit nightlies on Safari 6.0.4.
3666
3667         https://webkit.org/b/115428
3668
3669         Reviewed by Joseph Pecoraro.
3670
3671         * UIProcess/mac/WebInspectorProxyMac.mm:
3672         (WebKit::WebInspectorProxy::createInspectorWindow): Reduce the required Safari version.
3673         (WebKit::WebInspectorProxy::platformDetach): Simplify the frame restoring code so it
3674         works on Safari 6.0.4.
3675
3676 2013-04-30  Artur Moryc  <a.moryc@samsung.com>
3677
3678         [WK2][EFL] Spelling marker disappears while selection is being changed
3679         https://bugs.webkit.org/show_bug.cgi?id=115165
3680
3681         Reviewed by Anders Carlsson.
3682
3683         The marker for a misspelled word disappears while the cursor is being navigated along the word.
3684
3685         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3686         (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
3687
3688 2013-04-30  Zalan Bujtas  <zalan@apple.com>
3689
3690         Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/
3691         https://bugs.webkit.org/show_bug.cgi?id=111244
3692
3693         Reviewed by David Kilzer.
3694         
3695         Enable performance.now() as a minimal subset of Web Timing API. 
3696         It returns DOMHighResTimeStamp, a monotonically increasing value representing the 
3697         number of milliseconds from the start of the navigation of the current document.
3698         JS libraries use this API to check against the requestAnimationFrame() timestamp.
3699
3700         * Configurations/FeatureDefines.xcconfig:
3701
3702 2013-04-29  Chris Fleizach  <cfleizach@apple.com>
3703
3704         WEB SPEECH: need to identify the default voice per language
3705         https://bugs.webkit.org/show_bug.cgi?id=115366
3706
3707         Reviewed by Tim Horton.
3708
3709         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3710         (InitWebCoreSystemInterface):
3711
3712 2013-04-29  Benjamin Poulain  <benjamin@webkit.org>
3713
3714         [WK2] Streamline the use of strings in WebProcess::getWebCoreStatistics
3715         https://bugs.webkit.org/show_bug.cgi?id=115315
3716
3717         Reviewed by Geoffrey Garen.
3718
3719         Remove a couple of unjustified DEFINE_STATIC_LOCAL.
3720         Use ASCIILiteral when allocating new String.
3721
3722         * WebProcess/WebProcess.cpp:
3723         (WebKit::getWebCoreMemoryCacheStatistics):
3724         (WebKit::WebProcess::getWebCoreStatistics):
3725
3726 2013-04-29  Anders Carlsson  <andersca@apple.com>
3727
3728         Remove StorageTracker::originsLoaded
3729         https://bugs.webkit.org/show_bug.cgi?id=115382
3730
3731         Reviewed by Sam Weinig.
3732
3733         Add m_didFinishLoadingOrigins.
3734
3735         * WebProcess/Storage/WebKeyValueStorageManager.cpp:
3736         (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
3737         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
3738         (WebKit::WebKeyValueStorageManager::didFinishLoadingOrigins):
3739         * WebProcess/Storage/WebKeyValueStorageManager.h:
3740         (WebKeyValueStorageManager):
3741
3742 2013-04-29  Chris Fleizach  <cfleizach@apple.com>
3743
3744         WEB SPEECH Update seatbelt profile to work with speech synthesis
3745         https://bugs.webkit.org/show_bug.cgi?id=115368
3746
3747         Reviewed by Alexey Proskuryakov.
3748
3749         * WebProcess/com.apple.WebProcess.sb.in:
3750
3751 2013-04-28  Beth Dakin  <bdakin@apple.com>
3752
3753         Need a LayoutMilestone to fire when we have done our first paint after suppressing 
3754         incremental layout
3755         https://bugs.webkit.org/show_bug.cgi?id=115330
3756         -and corresponding-
3757         <rdar://problem/12722365>
3758
3759         Reviewed by Simon Fraser.
3760
3761         Two new millstones.
3762         * Shared/API/c/WKPageLoadTypes.h:
3763         * Shared/API/c/WKSharedAPICast.h:
3764         (WebKit::toWKLayoutMilestones):
3765         (WebKit::toLayoutMilestones):
3766
3767         This null-check is necessary now since this code ends up running at 
3768         WebFrame::init() time while we're setting up the Document. 
3769         setVisualUpdatesAllowed(true) has always been called as a part of that process, 
3770         and now the updateLayout(), ends up calling this code too, but we don't actually 
3771         have a mainFrame yet since it's still being created.
3772         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3773         (WebKit::findLargestFrameInFrameSet):
3774
3775 2013-04-29  Brady Eidson  <beidson@apple.com>
3776
3777         REGRESSION: We see authentication challenge sheets for favicon requests.
3778         <rdar://problem/13753470> and https://bugs.webkit.org/show_bug.cgi?id=115288
3779
3780         Reviewed by Alexey Proskuryakov.
3781
3782         Have NetworkResourceLoadParameters remember the ClientCredentialPolicy:
3783         * Shared/Network/NetworkResourceLoadParameters.cpp:
3784         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
3785         (WebKit::NetworkResourceLoadParameters::encode):
3786         (WebKit::NetworkResourceLoadParameters::decode):
3787         * Shared/Network/NetworkResourceLoadParameters.h:
3788
3789         Pass along the ClientCredentialPolicy to the NetworkProcess:
3790         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3791         (WebKit::WebResourceLoadScheduler::scheduleLoad):
3792         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3793         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
3794         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3795
3796         Have the SchedulableLoader remember the ClientCredentialPolicy:
3797         * NetworkProcess/SchedulableLoader.cpp:
3798         (WebKit::SchedulableLoader::SchedulableLoader):
3799         * NetworkProcess/SchedulableLoader.h:
3800         (WebKit::SchedulableLoader::clientCredentialPolicy):
3801
3802         Don’t message for credentials if the ClientCredentialPolicy forbids it:
3803         * NetworkProcess/NetworkResourceLoader.cpp:
3804         (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
3805         * NetworkProcess/NetworkResourceLoader.h:
3806
3807         Update for the new loadResourceSynchronously signature (which is still a no-op on the NetworkProcess side):
3808         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
3809         (WebKit::NetworkProcessPlatformStrategies::loadResourceSynchronously):
3810         * NetworkProcess/NetworkProcessPlatformStrategies.h:
3811
3812 2013-04-29  Jer Noble  <jer.noble@apple.com>
3813
3814         Unreviewed build fix. Point the Network process towards its own version of SecItemShim.dyld.
3815
3816         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist:
3817
3818 2013-04-29  Alexey Proskuryakov  <ap@apple.com>
3819
3820         Threads get stuck in NetworkProcess when canceling loads
3821         https://bugs.webkit.org/show_bug.cgi?id=115319
3822
3823         Backing out part of the fix, as it's causing crashes.
3824
3825         * WebProcess/Network/WebResourceLoader.cpp:
3826         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
3827
3828 2013-04-29  Noam Rosenthal  <noam@webkit.org>
3829
3830         Get rid of "non-composited contents" in CoordinatedLayerTreeHost
3831         https://bugs.webkit.org/show_bug.cgi?id=110355
3832
3833         Reviewed by Jocelyn Turcotte.
3834
3835         Instead of using a special non-composited contents layer, we let RenderLayerCompositor create
3836         a proper GraphicsLayer for that content.
3837         CoordinatedLayerTreeHost now needs to find the main contents layer for the purpose of setting
3838         the trajectory vector and applying the cover rect.
3839
3840         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3841         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
3842         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
3843             Don't create the non-composited layer, instead keep a raw pointer to the root
3844             compositing layer created by the WebCore compositor.
3845
3846         (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplay):
3847         (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplayInRect):
3848         (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
3849         (WebKit::CoordinatedLayerTreeHost::sizeDidChange):
3850         (WebKit::CoordinatedLayerTreeHost::paintContents):
3851         (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
3852         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
3853             Remove non-composited layer specialization.
3854
3855 2013-04-29  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3856
3857         [Qt] Build fix. Enabling c++11 for Qt WK2 after r149259.
3858         https://bugs.webkit.org/show_bug.cgi?id=115345
3859
3860         Reviewed by Anders Carlsson.
3861
3862         * WebKit2.pri:
3863
3864 2013-04-29  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
3865
3866         [WK2][EFL] Skip cancel fullscreen request if not made from FullScreen API
3867         https://bugs.webkit.org/show_bug.cgi?id=108201
3868
3869         Reviewed by Andreas Kling.
3870
3871         Adds a check on WebFullScreenManagerProxyEfl whether fullscreen mode was
3872         set from FullScreen API or not, so it can skip cancelling fullscreen
3873         request if fullscreen mode was set by application, preventing
3874         WebProcess' FullScreenManager from crashing.
3875
3876         EFL unit test available: ewk_view_cancel_full_screen_request.
3877
3878         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
3879         (WKViewExitFullScreen):
3880         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
3881         WKViewExitFullScreen now returns a bool, indicating whether the
3882         operation has succeeded or not.
3883
3884         * UIProcess/API/efl/ewk_view.cpp:
3885         (ewk_view_fullscreen_exit):
3886         Skip request if not in fullscreen mode.
3887
3888         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
3889         (TEST_F):
3890         Added ewk_view_cancel_full_screen_request unit test.
3891
3892         * UIProcess/CoordinatedGraphics/WebView.cpp:
3893         (WebKit::WebView::exitFullScreen):
3894         * UIProcess/CoordinatedGraphics/WebView.h:
3895         (WebView):
3896         exitFullScreen now returns a bool, indicating whether the operation has
3897         succeeded or not.
3898
3899         * UIProcess/WebFullScreenManagerProxy.cpp:
3900         (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
3901         * UIProcess/WebFullScreenManagerProxy.h:
3902         (WebFullScreenManagerProxy):
3903         * UIProcess/efl/WebFullScreenManagerProxyEfl.cpp:
3904         (WebKit::WebFullScreenManagerProxy::isFullScreen):
3905         (WebKit::WebFullScreenManagerProxy::enterFullScreen):
3906         (WebKit::WebFullScreenManagerProxy::exitFullScreen):
3907         Added m_hasRequestedFullScreen boolean flag to EFL port. Used to
3908         indicate if fullscreen mode is enabled, as well as sanity checks on both
3909         {enter,exit}FullScreen functions.
3910
3911 2013-04-29  Anders Carlsson  <andersca@apple.com>
3912
3913         Stop using range-based for syntax
3914         https://bugs.webkit.org/show_bug.cgi?id=115356
3915
3916         Reviewed by Andreas Kling.
3917
3918         * PluginProcess/WebProcessConnection.cpp:
3919         (WebKit::WebProcessConnection::didClose):
3920
3921 2013-04-29  Sergio Correia  <sergio.correia@openbossa.org>
3922
3923         [EFL][WK2]: WebProcessMain: hide call to ecore_x_shutdown() under guard
3924         https://bugs.webkit.org/show_bug.cgi?id=115295
3925
3926         Reviewed by Andreas Kling.
3927
3928         Since the mentioned function is declared in a header that is included
3929         conditionally depending on HAVE_ECORE_X being defined.
3930
3931         * WebProcess/efl/WebProcessMainEfl.cpp:
3932         (WebKit::WebProcessMainEfl):
3933
3934 2013-04-29  Jinwoo Song  <jinwoo7.song@samsung.com>
3935
3936         [WK2] Remove build warnings by -Wunused-parameter
3937         https://bugs.webkit.org/show_bug.cgi?id=115344
3938
3939         Reviewed by Noam Rosenthal.
3940
3941         Fix build warnigs -Wunused-parameter.
3942
3943         * UIProcess/CoordinatedGraphics/WebView.cpp:
3944         (WebKit::WebView::createContextMenuProxy):
3945         * UIProcess/DrawingAreaProxy.h:
3946         (WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate):
3947         * UIProcess/WebPageProxy.cpp:
3948         (WebKit::WebPageProxy::connectionWillClose):
3949
3950 2013-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3951
3952         Unreviewed. Fix make distcheck.
3953
3954         * GNUmakefile.list.am: Add missing header files to compilation.
3955
3956 2013-04-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3957
3958         Unreviewed fix build break on EFL port since r149259.
3959
3960         In EFL port, there is a non-compatible code when compiling based on C++11. This is a trivial build fix.
3961
3962         I got a confirm from Sam about landing a trivial build fix patch without sign-off from
3963         WK2 owner.
3964
3965         * UIProcess/API/efl/EwkViewCallbacks.h:
3966
3967 2013-04-28  Dean Jackson  <dino@apple.com>
3968
3969         [Mac] Disable canvas backing store scaling (HIGH_DPI_CANVAS)
3970         https://bugs.webkit.org/show_bug.cgi?id=115310
3971
3972         Reviewed by Simon Fraser.
3973
3974         Remove ENABLE_HIGH_DPI_CANVAS_macosx.
3975
3976         * Configurations/FeatureDefines.xcconfig:
3977
3978 2013-04-28  Sam Weinig  <sam@webkit.org>
3979
3980         [WebKit2] Adopt new API for detecting window occlusion
3981         https://bugs.webkit.org/show_bug.cgi?id=115334
3982
3983         Reviewed by Simon Fraser.
3984
3985         Switch off of WKSI for window occlusion and use the new NSWindowDidChangeOcclusionState notification
3986         instead.
3987
3988         * UIProcess/API/mac/WKView.mm:
3989         (-[WKView dealloc]):
3990         (-[WKView addWindowObserversForWindow:]):
3991         (-[WKView removeWindowObservers]):
3992         (-[WKView viewWillMoveToWindow:]):
3993         (-[WKView viewDidMoveToWindow]):
3994         (-[WKView _windowDidOrderOnScreen:]):
3995         (-[WKView _windowDidChangeOcclusionState:]):
3996         (-[WKView _setIsWindowOccluded:]):
3997         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
3998         (-[WKView windowOcclusionDetectionEnabled]):
3999         (-[WKView setWindowOcclusionDetectionEnabled:]):
4000         Only compile occlusion detection code where supported and remove calls to register/deregister
4001         for detection callbacks, now that NSWindow will handle that for us. We also no longer need to
4002         track all the WKViews, as that was only required to lookup the view that matched the window number
4003         returned from the occlusion callback.
4004
4005 2013-04-26  Anders Carlsson  <andersca@apple.com>
4006
4007         Use OwnPtr<PluginControllerProxy> for storing plug-in controllers in WebProcessConnection
4008         https://bugs.webkit.org/show_bug.cgi?id=115259
4009
4010         Reviewed by Andreas Kling.
4011
4012         * PluginProcess/WebProcessConnection.cpp:
4013         (WebKit::WebProcessConnection::addPluginControllerProxy):
4014         (WebKit::WebProcessConnection::removePluginControllerProxy):
4015         (WebKit::WebProcessConnection::didClose):
4016         * PluginProcess/WebProcessConnection.h:
4017         (WebProcessConnection):
4018
4019 2013-04-27  Jessie Berlin  <jberlin@apple.com>
4020
4021         Build fix.
4022
4023         * NetworkProcess/NetworkResourceLoader.cpp:
4024         (WebKit::NetworkResourceLoader::didReceiveBuffer):
4025         Do not declare another variable with the same name.
4026
4027 2013-04-27  Darin Adler  <darin@apple.com>
4028
4029         Move from constructor and member function adoptCF/NS to free function adoptCF/NS.
4030         https://bugs.webkit.org/show_bug.cgi?id=115307
4031
4032         Reviewed by Geoffrey Garen.
4033
4034         This change was done by a global replace followed by compiling and inspecting for
4035         cases that needed to be tweaked by hand.
4036
4037         * Platform/cg/CGUtilities.cpp:
4038         (WebKit::paintBitmapContext):
4039         * Platform/mac/ModuleMac.mm:
4040         (WebKit::Module::load):
4041         (WebKit::Module::platformFunctionPointer):
4042         * PluginProcess/mac/PluginProcessMac.mm:
4043         (WebKit::PluginProcess::initializeSandbox):
4044         * Shared/API/c/mac/WKURLRequestNS.mm:
4045         (WKURLRequestCreateWithNSURLRequest):
4046         * Shared/API/c/mac/WKURLResponseNS.mm:
4047         (WKURLResponseCreateWithNSURLResponse):
4048         * Shared/Downloads/mac/DownloadMac.mm:
4049         (WebKit::Download::start):
4050         (WebKit::Download::startWithHandle):
4051         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h:
4052         (WebKit::ChildProcessMain):
4053         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
4054         (WebKit::getPluginArchitecture):
4055         (WebKit::contentsOfPropertyListAtURL):
4056         (WebKit::getMIMETypesFromPluginBundle):
4057         (WebKit::getStringListResource):
4058         (WebKit::NetscapePluginModule::getPluginInfo):
4059         * Shared/ShareableResource.cpp:
4060         (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
4061         * Shared/cf/ArgumentCodersCF.cpp:
4062         (CoreIPC::decode):
4063         (CoreIPC::encode):
4064         * Shared/cg/ShareableBitmapCG.cpp:
4065         (WebKit::ShareableBitmap::createGraphicsContext):
4066         (WebKit::ShareableBitmap::makeCGImageCopy):
4067         (WebKit::ShareableBitmap::makeCGImage):
4068         (WebKit::ShareableBitmap::createCGImage):
4069         * Shared/mac/ArgumentCodersMac.mm:
4070         (CoreIPC::decode):
4071         * Shared/mac/PlatformCertificateInfo.mm:
4072         (WebKit::PlatformCertificateInfo::dump):
4073         * Shared/mac/WebCoreArgumentCodersMac.mm:
4074         (CoreIPC::::encodePlatformData):
4075         (CoreIPC::::decodePlatformData):
4076         * UIProcess/API/mac/FindIndicatorWindow.mm:
4077         (WebKit::FindIndicatorWindow::setFindIndicator):
4078         (WebKit::FindIndicatorWindow::startFadeOutTimerFired):
4079         * UIProcess/API/mac/PDFViewController.mm:
4080         (-[WKPDFView initWithFrame:PDFViewController:]):
4081         (WebKit::PDFViewController::PDFViewController):
4082         (WebKit::convertPostScriptDataSourceToPDF):
4083         (WebKit::PDFViewController::setPDFDocumentData):
4084         * UIProcess/API/mac/PageClientImpl.mm:
4085         (WebKit::PageClientImpl::PageClientImpl):
4086         (WebKit::PageClientImpl::registerEditCommand):
4087         (WebKit::PageClientImpl::setDragImage):
4088         * UIProcess/API/mac/WKBrowsingContextController.mm:
4089         (didFailProvisionalLoadWithErrorForFrame):
4090         (didFailLoadWithErrorForFrame):
4091         * UIProcess/API/mac/WKConnection.mm:
4092         (didReceiveMessage):
4093         * UIProcess/API/mac/WKPrintingView.mm:
4094         (-[WKPrintingView drawRect:]):
4095         * UIProcess/API/mac/WKView.mm:
4096         (-[WKView browsingContextController]):
4097         (-[WKView _setAcceleratedCompositingModeRootLayer:]):
4098         (-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]):
4099         (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
4100         (-[WKView fullScreenWindowController]):
4101         (-[WKView _executeSavedCommandBySelector:]):
4102         (-[WKView printOperationWithPrintInfo:forFrame:]):
4103         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
4104         (WebKit::createProcess):
4105         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
4106         (WebKit::PluginInfoStore::pluginPathsInDirectory):
4107         (WebKit::PluginInfoStore::getMIMETypeForExtension):
4108         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
4109         (WebKit::PluginProcessProxy::beginModal):
4110         * UIProcess/cf/WebBackForwardListCF.cpp:
4111         (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
4112         * UIProcess/cf/WebPageProxyCF.cpp:
4113         (WebKit::WebPageProxy::sessionStateData):
4114         (WebKit::WebPageProxy::restoreFromSessionStateData):
4115         (WebKit::WebPageProxy::saveRecentSearches):
4116         (WebKit::WebPageProxy::loadRecentSearches):