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