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