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