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