50bcbdf6861179de3844db6c7ab6b0c512104a7b
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-05-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2
3         [EFL][WK2] Remove unneeded WebCore namespace use in ewk
4         https://bugs.webkit.org/show_bug.cgi?id=116707
5
6         Reviewed by Christophe Dumez.
7
8         * UIProcess/API/efl/ewk_security_origin.cpp: Remove "using namespace WebCore".
9         * UIProcess/API/efl/ewk_text_checker.cpp: ditto.
10
11 2013-05-26  Jon Lee  <jonlee@apple.com>
12
13         [WK2] Notifications clobber each other with multiple processes
14         https://bugs.webkit.org/show_bug.cgi?id=116428
15         <rdar://problem/13935191>
16
17         Reviewed by Darin Adler.
18
19         With multiple processes, the notification IDs, when passed up to the UI process, can clobber
20         each other. To fix this, we need to maintain a global map of notification IDs. This map is
21         keyed by its own unique notification ID, and maps to a pair containing the web page ID and that
22         web page's ID for the notification.
23
24         Now that we maintain groups of notifications based on the web page, we no longer send IPC messages
25         from WebNotificationManager to WebNotificationManagerProxy; instead we send messages to the
26         WebPageProxy. This removes the need for WebNotificationManagerProxy to be a message receiver.
27
28         When a page closes, all of the web notifications are cleared out. However, by the time the
29         WebPage::close() is called, the connection between WebPage and WebPageProxy is destroyed. Since
30         the WebPage is told to close from the UI process anyway, we clear out the notifications separately,
31         instead of waiting for a message from the WebPage.
32
33         * UIProcess/Notifications/WebNotificationManagerProxy.h: Update to take into account the
34         notification's web page. Remove inheritance of CoreIPC::MessageReceiver. Expose the original message
35         handlers as public functions, since they will be called from WebPageProxy. Add a new map that
36         associates a global ID with a notification ID that came from a web page.
37             There are now two flavors of clearNotifications(). One clears out all notifications associated
38         with a web page. This is called when the page is closed. The other clears out a subset of
39         notifications associated with a web page. This is called when notifications associated with a sub-frame
40         is closed.
41         * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Removed. All messages from
42         the web process go to WebPageProxy now.
43
44         * UIProcess/Notifications/WebNotificationManagerProxy.cpp: Update to take into account the
45         notification's web page.
46
47         (WebKit::generateGlobalNotificationID): The manager proxy now maintains its own global notification
48         ID generator.
49         (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy): The proxy is no longer a
50         message receiver. Remove code that registers it as such.
51
52         (WebKit::WebNotificationManagerProxy::show): Refactor to differentiate between the notification ID
53         that came from the web process, and the global notification ID the proxy maintains. Add the mapping
54         from the global ID to the (web page ID, notification ID) pair.
55         (WebKit::WebNotificationManagerProxy::cancel): Refactor to take into consideration the web page.
56         (WebKit::WebNotificationManagerProxy::didDestroyNotification): Refactor to take into consideration
57         the web page. Fixes a leak where we did not remove the item from the maps. This function is called
58         from the web process, when the ScriptExecutionContext is destroyed, so we remove it from our maps
59         before we pass the message along to the provider.
60
61         Helper functions that evaluate when a given notification in the map matches the desired parameters.
62         (WebKit::pageIDsMatch): The notification is associated with the provided page.
63         (WebKit::pageAndNotificationIDsMatch): The notification is associated with the provided page and is
64         contained within the list of provided notifications.
65
66         (WebKit::WebNotificationManagerProxy::clearNotifications): Changed to only remove notifications
67         associated with the provided web page, and could include a specific list of notifications. This latter
68         situation occurs if notifications were associated with an iframe, and that iframe was removed.
69         There is an O(n) walk that could be make more efficient using another hash map, but that's overhead
70         for a map that should be small in size anyway.
71
72         (WebKit::WebNotificationManagerProxy::providerDidShowNotification): Refactor to take into
73         consideration the web page.
74         (WebKit::WebNotificationManagerProxy::providerDidClickNotification): Refactor to take into
75         consideration the web page.
76         (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): Now we need to comb through
77         the list of global IDs and put them in buckets based on the notification's web pages. After that
78         is done we can send the DidCloseNotifications() to those pages' processes. There is a possible
79         extra optimization here where we group based on the page's process instead, to reduce the number
80         of messages sent to processes.
81
82         * UIProcess/WebPageProxy.cpp:
83         (WebKit::WebPageProxy::close): When a web page is closed, we clear the notifications associated
84         with the page.
85         (WebKit::WebPageProxy::cancelNotification): Forward call to WebNotificationManagerProxy.
86         (WebKit::WebPageProxy::clearNotifications): Ditto.
87         (WebKit::WebPageProxy::didDestroyNotification): Ditto.
88         * UIProcess/WebPageProxy.h:
89         * UIProcess/WebPageProxy.messages.in:
90
91         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
92         * WebProcess/Notifications/WebNotificationManager.cpp:
93         (WebKit::WebNotificationManager::cancel):
94         (WebKit::WebNotificationManager::clearNotifications):
95         (WebKit::WebNotificationManager::didDestroyNotification):
96         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: Remove extraneous include.
97
98         * CMakeLists.txt: Remove WebNotificationManagerProxy.messages.in and related files.
99         * DerivedSources.pri: Ditto.
100         * DerivedSources.make: Ditto.
101         * GNUmakefile.list.am: Ditto.
102         * WebKit2.xcodeproj/project.pbxproj: Ditto.
103
104 2013-05-27  Tim Horton  <timothy_horton@apple.com>
105
106         Unreviewed build fix take 2.
107
108         * WebProcess/Plugins/PDF/PDFPlugin.mm:
109
110 2013-05-27  Tim Horton  <timothy_horton@apple.com>
111
112         Unreviewed build fix.
113
114         * WebProcess/Plugins/PDF/PDFPlugin.mm:
115
116 2013-05-27  Tim Horton  <timothy_horton@apple.com>
117
118         PDFPlugin: Main-frame PDFPlugin Accessibility
119         https://bugs.webkit.org/show_bug.cgi?id=116563
120         <rdar://problem/13458534>
121
122         Reviewed by Sam Weinig.
123
124         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
125         Forward-declare a variety of accessibility methods.
126
127         * WebProcess/Plugins/PDF/PDFPlugin.h:
128         Add convertFromPDFViewToScreen, boundsOnScreen, accessibilityObject, and
129         storage for our accessibility wrapper.
130         * WebProcess/Plugins/PDF/PDFPlugin.mm:
131         Add WKPDFPluginAccessibilityObject.
132
133         (-[WKPDFPluginAccessibilityObject accessibilityIsIgnored]):
134         We want to be included in the accessibility tree.
135
136         (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]):
137         (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:forParameter:]):
138         Grab values for accessibility attributes from the relevant sources
139         (mostly from PDFLayerController).
140
141         (-[WKPDFPluginAccessibilityObject readingModel]): Ditto.
142         (-[WKPDFPluginAccessibilityObject accessibilityAttributeNames]):
143         (-[WKPDFPluginAccessibilityObject accessibilityParameterizedAttributeNames]):
144         (-[WKPDFPluginAccessibilityObject accessibilityActionNames]):
145         Return the set of accessibility attributes, actions, and parameterized
146         attributes that we support.
147
148         (-[WKPDFPluginAccessibilityObject accessibilityIsAttributeSettable:]):
149         (-[WKPDFPluginAccessibilityObject accessibilitySetValue:forAttribute:]):
150         Forward some other accessibility methods to PDFLayerController.
151
152         (-[WKPDFPluginAccessibilityObject accessibilityFocusedUIElement]):
153         (-[WKPDFPluginAccessibilityObject accessibilityHitTest:]):
154         We have no children, so if a hit test makes it to us, it's ours.
155
156         (WebKit::PDFPlugin::PDFPlugin):
157         Make a WKPDFPluginAccessibilityObject and hook it up.
158         [FIXME: this could use some de-crapifying]
159
160         (WebKit::PDFPlugin::convertFromPluginToPDFView):
161         Transform a point from plugin space to PDFLayerController space.
162
163         (WebKit::PDFPlugin::convertFromPDFViewToRootView):
164         (WebKit::PDFPlugin::convertFromPDFViewToScreen): Added.
165         (WebKit::PDFPlugin::boundsOnScreen):
166         Return the PDFPlugin's frame in screen coordinates.
167
168         (WebKit::PDFPlugin::accessibilityObject):
169         Return our accessibility wrapper.
170
171         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
172         * WebProcess/Plugins/Plugin.h:
173         (WebKit::Plugin::accessibilityObject):
174         * WebProcess/Plugins/PluginView.cpp:
175         (WebKit::PluginView::accessibilityObject):
176         * WebProcess/Plugins/PluginView.h:
177         Add accessibilityObject(), to acquire accessibility wrappers from plugins.
178
179         * WebProcess/WebPage/WebPage.h:
180         (WebPage): Add accessibilityObjectForMainFramePlugin();
181         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
182         (-[WKAccessibilityWebPageObject accessibilityRootObjectWrapper]):
183         If the main frame has a PluginDocument that has an accessibilityObject,
184         use that one instead of the WebPage's.
185
186         * WebProcess/WebPage/mac/WebPageMac.mm:
187         (WebKit::WebPage::accessibilityObjectForMainFramePlugin):
188         Return the accessibilityObject from the main-frame PluginDocument, if
189         there is one.
190
191 2013-05-27  Marcelo Lira  <marcelo.lira@openbossa.org>
192
193         [WK2][CoordinatedGraphics] Misuse of DrawingAreaProxy::setVisibleContentsRect() in WebView::updateViewportSize()
194         https://bugs.webkit.org/show_bug.cgi?id=116688
195
196         Reviewed by Noam Rosenthal.
197
198         Visible contents area passed to DrawingAreaProxy::setVisibleContentsRect()
199         must be calculated including the page scale factor and avoid crossing the
200         boundaries of the page contents size. In other words the DrawingArea
201         must know the actual dimensions of what it being drawn. If the
202         DrawingArea thinks the visible rectangle is bigger than it is, the
203         contents will be drawn pixelated and blurry.
204
205         * UIProcess/CoordinatedGraphics/WebView.cpp:
206         (WebKit::WebView::didChangeContentsSize):
207         (WebKit::WebView::updateViewportSize):
208         (WebKit::WebView::visibleContentsSize):
209         (WebKit):
210         * UIProcess/CoordinatedGraphics/WebView.h:
211         (WebKit::WebView::contentsSize):
212         (WebView):
213
214 2013-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
215
216         [GTK] WebKitWebView child widgets are not rendered with recent GTK+
217         https://bugs.webkit.org/show_bug.cgi?id=116794
218
219         Reviewed by Xan Lopez.
220
221         Since rev d22fd7223c75f4720ddb982c659efb0d8d7543c4 of GTK+ expose
222         events are not propagated to child GdkWindows anymore, and child
223         widgets are rendered via gtk_container_propagate_draw(). Since all
224         our children have its own GdkWindow (auth widget, inspector view
225         and windowed plugins) we don't propagate the draw signal making
226         them invisible with current GTK+.
227
228         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
229         (webkitWebViewBaseDraw): Chain up to the parent draw(), so it's
230         propagated to the children. This shouldn't have any effect in
231         previous versions of GTK+ because gtk_container_propagate_draw()
232         returned early when the child widget had its own GdkWindow.
233
234 2013-05-27  Xan Lopez  <xlopez@igalia.com>
235
236         Reset all clients on WebPage close
237         https://bugs.webkit.org/show_bug.cgi?id=112334
238
239         Reviewed by Anders Carlsson.
240
241         We do not reset the clients on WebPage::close(), so there's a
242         small chance that someone will try to access them after that. This
243         won't work and will generally cause runtime warnings, crashes or
244         other issues. Reset them all to null to prevent this situation.
245
246         * WebProcess/WebPage/WebPage.cpp:
247         (WebKit::WebPage::close):
248
249 2013-05-27  Manuel Rego Casasnovas  <rego@igalia.com>
250
251         [GTK] Notify WebProcess in WebKitURISchemeRequest when we fail to read the user InputStream
252         https://bugs.webkit.org/show_bug.cgi?id=114347
253
254         Reviewed by Carlos Garcia Campos.
255
256         While processing a WebKitURISchemeRequest if there is any error reading
257         the InputStream provided by the user (for example the stream is already
258         closed) we have to notify the WebProcess that the request has failed.
259
260         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
261         (webkitURISchemeRequestReadCallback): Get the error from
262         g_input_stream_read_finish() and use it to call
263         webkit_uri_scheme_request_finish_error() in order to finish the failing
264         WebKitURISchemeRequest properly.
265         * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
266         (testWebContextURIScheme): Modify test to check the new situation using
267         an already closed InputStream.
268
269 2013-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
270
271         Unreviewed. Fix make distcheck.
272
273         * GNUmakefile.list.am: Add missing header file.
274
275 2013-05-26  Changhun Kang  <temoochin@company100.net>
276
277         The public WK header file should not include WKAPICast.h
278         https://bugs.webkit.org/show_bug.cgi?id=115230
279
280         Reviewed by Darin Adler.
281
282         Otherwise, WebKit internal headers are exposed.
283         No new tests. No change in behavior.
284         * UIProcess/API/C/soup/WKSoupRequestManager.h:
285         * UIProcess/soup/WebSoupRequestManagerClient.h:
286
287 2013-05-26  Andreas Kling  <akling@apple.com>
288
289         FocusController::setFocusedNode() should be setFocusedElement().
290         <http://webkit.org/b/116780>
291
292         Reviewed by Antti Koivisto.
293
294         * WebProcess/Plugins/PluginView.cpp:
295         (WebKit::PluginView::focusPluginElement):
296
297 2013-05-25  Andreas Kling  <akling@apple.com>
298
299         PluginDocument::pluginNode() should be pluginElement() instead.
300         <http://webkit.org/b/116774>
301
302         Reviewed by Anders Carlsson.
303
304         * WebProcess/WebPage/WebPage.cpp:
305         (WebKit::WebPage::focusedPluginViewForFrame):
306
307 2013-05-25  Simon Fraser  <simon.fraser@apple.com>
308
309         Unprefix Page Visibility API
310         https://bugs.webkit.org/show_bug.cgi?id=102340
311
312         Reviewed by Tim Horton.
313         
314         Renaming of the "preview" state to "unloaded".
315
316         * Shared/API/c/WKPageVisibilityTypes.h:
317         * Shared/API/c/WKSharedAPICast.h:
318         (WebKit::toPageVisibilityState):
319
320 2013-05-25  Andreas Kling  <akling@apple.com>
321
322         Move Node::isMouseFocusable() to Element.
323         <http://webkit.org/b/116762>
324
325         Reviewed by Anders Carlsson.
326
327         * WebProcess/WebPage/WebPage.cpp:
328         (WebKit::WebPage::highlightPotentialActivation):
329
330             Check that the potentially activated Node is an Element before asking if it's mouse-focusable.
331
332 2013-05-25  Andreas Kling  <akling@apple.com>
333
334         REGRESSION: WebProcess is terminated when all Safari windows are closed.
335         <rdar://problem/13990901>
336         <http://webkit.org/b/116766>
337
338         Reviewed by Alexey Proskuryakov.
339
340         When closing the last page, only disconnect the web process if we're using a network process.
341         Otherwise there might be session state in the web process getting lost.
342
343         * UIProcess/WebProcessProxy.cpp:
344         (WebKit::WebProcessProxy::removeWebPage):
345
346 2013-05-25  Santosh Mahto  <santosh.ma@samsung.com>
347
348         WebFrameProxy::didFailLoad clears frame title for no apparent reason
349         https://bugs.webkit.org/show_bug.cgi?id=116655
350
351         Reviewed by Alexey Proskuryakov.
352
353         * UIProcess/WebFrameProxy.cpp:
354         (WebKit::WebFrameProxy::didFailLoad):
355
356 2013-05-24  Seokju Kwon  <seokju.kwon@gmail.com>
357
358         [Qt][GTK] Build fix after r150669
359         https://bugs.webkit.org/show_bug.cgi?id=116751
360
361         Reviewed by Christophe Dumez.
362
363         * GNUmakefile.list.am:
364         * Target.pri:
365         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
366         (WebKit::WebEditorClient::getEditorCommandsForKeyEvent):
367
368 2013-05-24  Seokju Kwon  <seokju.kwon@gmail.com>
369
370         [EFL] Build fix after r150669
371         https://bugs.webkit.org/show_bug.cgi?id=116750
372
373         Reviewed by Anders Carlsson.
374
375         * CMakeLists.txt:
376         * WebProcess/Battery/WebBatteryManager.cpp:
377         (WebKit::WebBatteryManager::registerWebPage):
378         (WebKit::WebBatteryManager::unregisterWebPage):
379         * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp:
380         (WebKit::WebNetworkInfoManager::registerWebPage):
381         (WebKit::WebNetworkInfoManager::unregisterWebPage):
382         (WebKit::WebNetworkInfoManager::bandwidth):
383         (WebKit::WebNetworkInfoManager::metered):
384         * WebProcess/WebCoreSupport/WebVibrationClient.cpp:
385         (WebKit::WebVibrationClient::vibrate):
386         (WebKit::WebVibrationClient::cancelVibration):
387         * WebProcess/soup/WebSoupRequestManager.cpp:
388         (WebKit::WebSoupRequestManager::didReceiveURIRequestData):
389         (WebKit::WebSoupRequestManager::send):
390
391 2013-05-24  Anders Carlsson  <andersca@apple.com>
392
393         MessageSender shouldn't be a class template
394         https://bugs.webkit.org/show_bug.cgi?id=116743
395
396         Reviewed by Andreas Kling.
397
398         Change MessageSender to be a proper abstract base class. Subclasses of MessageSender must
399         implement messageSenderConnection() as well as messageSenderDestinationID().
400
401         This reduces code size and will allow us to be more flexible with MessageSender in the future.
402
403         * NetworkProcess/NetworkResourceLoader.cpp:
404         (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
405         (WebKit::NetworkResourceLoader::messageSenderConnection):
406         (WebKit):
407         (WebKit::NetworkResourceLoader::messageSenderDestinationID):
408         * NetworkProcess/NetworkResourceLoader.h:
409         (NetworkResourceLoader):
410         * NetworkProcess/mac/DiskCacheMonitor.h:
411         (DiskCacheMonitor):
412         * NetworkProcess/mac/DiskCacheMonitor.mm:
413         (WebKit::DiskCacheMonitor::messageSenderConnection):
414         (WebKit::DiskCacheMonitor::messageSenderDestinationID):
415         (WebKit):
416         * Platform/CoreIPC/MessageSender.h:
417         (CoreIPC):
418         (MessageSender):
419         (CoreIPC::MessageSender::send):
420         (CoreIPC::MessageSender::sendSync):
421         * Shared/ChildProcess.cpp:
422         (WebKit::ChildProcess::messageSenderConnection):
423         (WebKit):
424         (WebKit::ChildProcess::messageSenderDestinationID):
425         * Shared/ChildProcess.h:
426         (ChildProcess):
427         * Shared/Downloads/Download.cpp:
428         (WebKit::Download::messageSenderConnection):
429         (WebKit):
430         (WebKit::Download::messageSenderDestinationID):
431         * Shared/Downloads/Download.h:
432         (Download):
433         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
434         (WebKit::CustomProtocolManager::initialize):
435         * Shared/WebConnection.h:
436         (WebConnection):
437         * Shared/mac/SecItemShim.cpp:
438         (WebKit::sendSecItemRequest):
439         * UIProcess/WebConnectionToWebProcess.cpp:
440         (WebKit::WebConnectionToWebProcess::hasValidConnection):
441         (WebKit::WebConnectionToWebProcess::messageSenderConnection):
442         (WebKit::WebConnectionToWebProcess::messageSenderDestinationID):
443         * UIProcess/WebConnectionToWebProcess.h:
444         (WebConnectionToWebProcess):
445         * WebKit2.xcodeproj/project.pbxproj:
446         * WebProcess/Geolocation/WebGeolocationManager.cpp:
447         (WebKit::WebGeolocationManager::registerWebPage):
448         (WebKit::WebGeolocationManager::unregisterWebPage):
449         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
450         (WebKit::WebIconDatabaseProxy::retainIconForPageURL):
451         (WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
452         (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
453         (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
454         (WebKit::WebIconDatabaseProxy::setIconURLForPageURL):
455         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
456         * WebProcess/InjectedBundle/InjectedBundle.cpp:
457         (WebKit::InjectedBundle::postMessage):
458         (WebKit::InjectedBundle::postSynchronousMessage):
459         * WebProcess/Network/WebResourceLoader.cpp:
460         (WebKit::WebResourceLoader::messageSenderConnection):
461         (WebKit::WebResourceLoader::messageSenderDestinationID):
462         * WebProcess/Network/WebResourceLoader.h:
463         (WebResourceLoader):
464         * WebProcess/Notifications/WebNotificationManager.cpp:
465         (WebKit::WebNotificationManager::show):
466         (WebKit::WebNotificationManager::cancel):
467         (WebKit::WebNotificationManager::clearNotifications):
468         (WebKit::WebNotificationManager::didDestroyNotification):
469         * WebProcess/Plugins/PDF/PDFPlugin.mm:
470         (WebKit::PDFPlugin::writeItemsToPasteboard):
471         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
472         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
473         * WebProcess/Storage/StorageAreaMap.cpp:
474         (WebKit::StorageAreaMap::StorageAreaMap):
475         (WebKit::StorageAreaMap::~StorageAreaMap):
476         (WebKit::StorageAreaMap::setItem):
477         (WebKit::StorageAreaMap::removeItem):
478         (WebKit::StorageAreaMap::clear):
479         (WebKit::StorageAreaMap::loadValuesIfNeeded):
480         * WebProcess/WebConnectionToUIProcess.cpp:
481         (WebKit::WebConnectionToUIProcess::hasValidConnection):
482         (WebKit::WebConnectionToUIProcess::messageSenderConnection):
483         (WebKit::WebConnectionToUIProcess::messageSenderDestinationID):
484         * WebProcess/WebConnectionToUIProcess.h:
485         (WebConnectionToUIProcess):
486         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
487         (WebKit::WebChromeClient::windowRect):
488         (WebKit::WebChromeClient::focusedFrameChanged):
489         (WebKit::WebChromeClient::createWindow):
490         (WebKit::WebChromeClient::toolbarsVisible):
491         (WebKit::WebChromeClient::statusbarVisible):
492         (WebKit::WebChromeClient::menubarVisible):
493         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
494         (WebKit::WebChromeClient::runJavaScriptAlert):
495         (WebKit::WebChromeClient::runJavaScriptConfirm):
496         (WebKit::WebChromeClient::runJavaScriptPrompt):
497         (WebKit::WebChromeClient::shouldInterruptJavaScript):
498         (WebKit::WebChromeClient::exceededDatabaseQuota):
499         * WebProcess/WebCoreSupport/WebColorChooser.cpp:
500         (WebKit::WebColorChooser::WebColorChooser):
501         (WebKit::WebColorChooser::setSelectedColor):
502         (WebKit::WebColorChooser::endChooser):
503         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
504         (WebKit::WebFrameLoaderClient::dispatchDidReceiveIcon):
505         (WebKit::WebFrameLoaderClient::updateGlobalHistory):
506         (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
507         (WebKit::WebFrameLoaderClient::setTitle):
508         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
509         (WebKit::WebPlatformStrategies::populatePluginCache):
510         (WebKit::WebPlatformStrategies::getTypes):
511         (WebKit::WebPlatformStrategies::bufferForType):
512         (WebKit::WebPlatformStrategies::getPathnamesForType):
513         (WebKit::WebPlatformStrategies::stringForType):
514         (WebKit::WebPlatformStrategies::copy):
515         (WebKit::WebPlatformStrategies::changeCount):
516         (WebKit::WebPlatformStrategies::uniqueName):
517         (WebKit::WebPlatformStrategies::color):
518         (WebKit::WebPlatformStrategies::url):
519         (WebKit::WebPlatformStrategies::addTypes):
520         (WebKit::WebPlatformStrategies::setTypes):
521         (WebKit::WebPlatformStrategies::setBufferForType):
522         (WebKit::WebPlatformStrategies::setPathnamesForType):
523         (WebKit::WebPlatformStrategies::setStringForType):
524         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
525         (WebKit::WebPopupMenu::show):
526         (WebKit::WebPopupMenu::hide):
527         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
528         (WebKit::WebSearchPopupMenu::saveRecentSearches):
529         (WebKit::WebSearchPopupMenu::loadRecentSearches):
530         * WebProcess/WebPage/EventDispatcher.cpp:
531         (WebKit::EventDispatcher::sendDidReceiveEvent):
532         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
533         (WebKit::updateBackForwardItem):
534         (WebKit::WebBackForwardListProxy::itemAtIndex):
535         (WebKit::WebBackForwardListProxy::backListCount):
536         (WebKit::WebBackForwardListProxy::forwardListCount):
537         * WebProcess/WebPage/WebInspector.cpp:
538         (WebKit::WebInspector::createInspectorPage):
539         (WebKit::WebInspector::didClose):
540         (WebKit::WebInspector::bringToFront):
541         (WebKit::WebInspector::inspectedURLChanged):
542         (WebKit::WebInspector::save):
543         (WebKit::WebInspector::append):
544         (WebKit::WebInspector::attachBottom):
545         (WebKit::WebInspector::attachRight):
546         (WebKit::WebInspector::detach):
547         (WebKit::WebInspector::setAttachedWindowHeight):
548         (WebKit::WebInspector::setAttachedWindowWidth):
549         (WebKit::WebInspector::setToolbarHeight):
550         (WebKit::WebInspector::updateDockingAvailability):
551         (WebKit::WebInspector::sendMessageToRemoteFrontend):
552         * WebProcess/WebPage/WebPage.cpp:
553         (WebKit::WebPage::messageSenderConnection):
554         (WebKit):
555         (WebKit::WebPage::messageSenderDestinationID):
556         * WebProcess/WebPage/WebPage.h:
557         (WebPage):
558         * WebProcess/WebPage/mac/WebPageMac.mm:
559         (WebKit::WebPage::executeKeypressCommandsInternal):
560         (WebKit::WebPage::handleEditingKeyboardEvent):
561         * WebProcess/WebProcess.cpp:
562         (WebKit::WebProcess::ensureNetworkProcessConnection):
563         (WebKit::WebProcess::shouldTerminate):
564
565 2013-05-24  Tim Horton  <timothy_horton@apple.com>
566
567         Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
568         https://bugs.webkit.org/show_bug.cgi?id=116744
569         <rdar://problem/13973514>
570
571         Reviewed by Simon Fraser.
572
573         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
574         (WebKit::TiledCoreAnimationDrawingArea::resumePainting):
575         Force WebCore to repaint animated images when painting is resumed.
576
577 2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
578
579         Remove custom code for webkitAudioContext global constructor getter
580         https://bugs.webkit.org/show_bug.cgi?id=116530
581
582         Reviewed by Geoffrey Garen.
583
584         Use RuntimeEnabledFeatures instead of WebCore Settings to toggle Web Audio support.
585
586         * WebProcess/InjectedBundle/InjectedBundle.cpp:
587         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
588         * WebProcess/WebPage/WebPage.cpp:
589         (WebKit::WebPage::updatePreferences):
590
591 2013-05-24  Thomas Deniau  <deniau@apple.com>
592
593         Add more lines to the context during Dictionary lookups
594         https://bugs.webkit.org/show_bug.cgi?id=115256
595
596         Reviewed by Ryosuke Niwa.
597
598         * WebProcess/WebPage/mac/WebPageMac.mm:
599         (WebKit::WebPage::performDictionaryLookupAtLocation):
600         Instead of using the current paragraph as the context (which stops at
601         line breaks), get a few lines before and after the point, so that the
602         context contains at least four lines in each direction.
603         This way the Dictionary will be able to look up things that extend past
604         the current line.
605
606 2013-05-24  Anders Carlsson  <andersca@apple.com>
607
608         Intermittent crash when typing in Address Bar
609         https://bugs.webkit.org/show_bug.cgi?id=116728
610         <rdar://problem/13976781>
611
612         Reviewed by Sam Weinig.
613
614         If a web process connection has been removed from the storage manager because we disconnected it
615         since there were no more active pages associated with the web process, we'll fail to find it here
616         so just return early instead of crashing.
617
618         * UIProcess/Storage/StorageManager.cpp:
619         (WebKit::StorageManager::destroyStorageMap):
620
621 2013-05-24  Andreas Kling  <akling@apple.com>
622
623         Typing in Safari's unified field causes unnecessary web content repaints.
624         <http://webkit.org/b/116703>
625
626         Reviewed by Andy Estes.
627
628         * WebProcess/WebPage/FindController.cpp:
629         (WebKit::FindController::countStringMatches):
630
631             Call WebCore::Page::countMatchesForText() instead of markAllMatchesForText(). If the search string
632             is found inside the page content, the renderer containing that text will no longer be repainted.
633
634 2013-05-23  Ryuan Choi  <ryuan.choi@samsung.com>
635
636         [WK2][EFL][QT] Build break after r150610
637         https://bugs.webkit.org/show_bug.cgi?id=116699
638
639         Reviewed by Csaba Osztrogonác.
640
641         * UIProcess/WebPageProxy.cpp:
642         (WebKit::WebPageProxy::findPlugin): Initialized pluginProcessSandboxPolicy.
643
644 2013-05-23  Anders Carlsson  <andersca@apple.com>
645
646         Shim Flash plug-in to allow its updater to run
647         https://bugs.webkit.org/show_bug.cgi?id=116692
648         <rdar://problem/13938510>
649
650         Reviewed by Sam Weinig.
651
652         * PluginProcess/PluginProcess.h:
653         * PluginProcess/mac/PluginProcessMac.mm:
654         (WebKit::replacedNSConcreteTask_launch):
655         (WebKit::initializeCocoaOverrides):
656         Patch -[NSConcreteTask launch] to call PluginProcess::launchProcess.
657
658         (WebKit::PluginProcess::launchProcess):
659         Send a LaunchProcess message to the UI process.
660
661         * UIProcess/Plugins/PluginProcessProxy.cpp:
662         * UIProcess/Plugins/PluginProcessProxy.h:
663         Remove PluginProcessProxy::didReceiveMessage.
664
665         (PluginProcessProxy):
666         * UIProcess/Plugins/PluginProcessProxy.messages.in:
667         Add LaunchProcess message and remove LegacyReceiver attribute.
668
669         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
670         (WebKit::isFlashUpdater):
671         Helper function to determine whether the process is the flash updater.
672
673         (WebKit::shouldLaunchProcess):
674         Return whether we should launch this process.
675
676         (WebKit::PluginProcessProxy::launchProcess):
677         Determine if we should launch this process and then do so.
678
679 2013-05-23  Anders Carlsson  <andersca@apple.com>
680
681         Don't run all plug-ins unsandboxed
682         https://bugs.webkit.org/show_bug.cgi?id=116690
683         <rdar://problem/13975569>
684
685         Reviewed by Jessie Berlin.
686
687         Remove debugging code.
688
689         * UIProcess/WebPageProxy.cpp:
690         (WebKit::WebPageProxy::findPlugin):
691
692 2013-05-23  Anders Carlsson  <andersca@apple.com>
693
694         Crash in convertMainResourceLoadToDownload when downloading file by option-return
695         https://bugs.webkit.org/show_bug.cgi?id=116451
696
697         Reviewed by Andreas Kling.
698
699         If the main resource loader is null, create a new download instead since there's no existing loader to convert.
700
701         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
702         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
703         * WebProcess/WebPage/WebFrame.cpp:
704         (WebKit::WebFrame::convertMainResourceLoadToDownload):
705
706 2013-05-22  Alexey Proskuryakov  <ap@apple.com>
707
708         <rdar://problem/13849260> Sandbox violations reading .CFUserTextEncoding
709
710         Reviewed by Dan Bernstein.
711
712         * WebProcess/com.apple.WebProcess.sb.in: Allow this.
713
714 2013-05-23  Gavin Barraclough  <barraclough@apple.com>
715
716         Move posix_spawn onto a zero delay timer
717         https://bugs.webkit.org/show_bug.cgi?id=116682
718
719         Reviewed by Anders Carlson.
720
721         <rdar://problem/13973468>
722
723         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
724         (ReexecInfo):
725             - struct to hold info from the XPC message.
726         (WebKit::reexec):
727             - moved call to posix_spawn out to this helper.
728         (WebKit::reexecCallBack):
729             - calls reexec.
730         (WebKit::XPCServiceEventHandler):
731             - removed call to posix_spawn; schedule a call to reexecCallBack.
732
733 2013-05-23  Csaba Osztrogonác  <ossy@webkit.org>
734
735         [cmake] Fix generating-forwarding-headers rule after r150460
736         https://bugs.webkit.org/show_bug.cgi?id=116659
737
738         Reviewed by Christophe Dumez.
739
740         * CMakeLists.txt: Typo fix.
741
742 2013-05-23  Anton Obzhirov  <a.obzhirov@samsung.com>
743
744         [GTK] Remote Web Inspector sometimes won't serve any content
745         https://bugs.webkit.org/show_bug.cgi?id=116225
746
747         Reviewed by Gustavo Noronha Silva.
748
749         Added an option to use environment variable to set up path to
750         inspector server files. Implementation is similar to InspectorClientGtk
751         implementation.
752
753         * UIProcess/InspectorServer/WebInspectorServer.h:
754         (WebInspectorServer):
755         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
756         (WebKit::WebInspectorServer::platformResourceForPath):
757         (WebKit::WebInspectorServer::inspectorServerFilesPath):
758         (WebKit):
759
760 2013-05-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
761
762         [EFL][WK2] Use WK2 C API in ewk_view_pagination_mode_set|get
763         https://bugs.webkit.org/show_bug.cgi?id=116657
764
765         Reviewed by Christophe Dumez.
766
767         WKPageGet|SetPaginationMode APIs is present in WK2 C APIs. So, we need to use them for
768         ewk_view_pagination_mode_set|get.
769
770         Besides we don't need to use WebCore namespace anymore.
771
772         * UIProcess/API/efl/ewk_view.cpp:
773         (ewk_view_pagination_mode_set):
774         (ewk_view_pagination_mode_get):
775
776 2013-05-23  Roland Takacs  <rtakacs@inf.u-szeged.hu>
777
778         Support frame instrumentation for coordinated graphics
779         https://bugs.webkit.org/show_bug.cgi?id=115260
780
781         Reviewed by Andreas Kling.
782
783         Enabled supportsFrameInstrumentation on ports that use coordinated graphics
784         by calling didBeginFrame().
785
786         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
787         (WebKit::WebInspectorClient::supportsFrameInstrumentation):
788         (WebKit):
789         * WebProcess/WebCoreSupport/WebInspectorClient.h:
790         (WebInspectorClient):
791         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
792         (WebKit::CoordinatedLayerTreeHost::syncDisplayState):
793
794 2013-05-22  Dean Jackson  <dino@apple.com>
795
796         Don't snapshot plugins that can't be snapshotted
797         https://bugs.webkit.org/show_bug.cgi?id=116490
798
799         Reviewed by Tim Horton.
800
801         Some plugins, such as QuickTime, don't support snapshotting. We're
802         planning on another way to capture snapshots, but in the meantime make
803         sure that they don't fail to initialise because they were told to
804         not use accelerated rendering.
805
806         Expose a new message on the plugins so that they can tell the PluginView
807         if they support snapshotting or not.
808
809         * PluginProcess/PluginControllerProxy.cpp:
810         (WebKit::PluginControllerProxy::supportsSnapshotting): New method.
811         * PluginProcess/PluginControllerProxy.h: Ditto.
812         * PluginProcess/PluginControllerProxy.messages.in: Message signature.
813
814         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add supportsSnapshotting.
815         * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Ditto.
816         * WebProcess/Plugins/Plugin.h: Ditto - pure virtual here.
817
818         * WebProcess/Plugins/PluginProxy.cpp:
819         (WebKit::PluginProxy::supportsSnapshotting): Send the message to the plugin process and return the results.
820         * WebProcess/Plugins/PluginProxy.h:
821
822         * WebProcess/Plugins/PluginView.cpp:
823         (WebKit::PluginView::didInitializePlugin): If the snapshotting plugin has a layer, make
824             sure to add it to the tree.
825         (WebKit::PluginView::isAcceleratedCompositingEnabled): Snapshotting plugins can use
826             accelerated compositing, just like normal plugins.
827         (WebKit::PluginView::pluginSnapshotTimerFired): If the plugin doesn't allow snapshotting,
828             immediately restart it.
829
830 2013-05-22  Anders Carlsson  <andersca@apple.com>
831
832         Fix crash when closing a page that's trying to access session storage
833         https://bugs.webkit.org/show_bug.cgi?id=116634
834         <rdar://problem/13904054>
835
836         Reviewed by Geoffrey Garen.
837
838         It is possible for the StorageManager to get messages from a web page that has already been closed by the UI process.
839         If that happens, just ignore the messages.
840
841         * UIProcess/Storage/StorageManager.cpp:
842         (WebKit::StorageManager::createSessionStorageMap):
843         (WebKit::StorageManager::getValues):
844         (WebKit::StorageManager::setItem):
845         (WebKit::StorageManager::removeItem):
846         (WebKit::StorageManager::clear):
847         (WebKit::StorageManager::destroySessionStorageNamespaceInternal):
848
849 2013-05-22  Alexey Proskuryakov  <ap@apple.com>
850
851         Crashes in NetworkProcess due to incorrect private browsing session tracking
852         https://bugs.webkit.org/show_bug.cgi?id=116628
853
854         Reviewed by Brady Eidson.
855
856         The current API for private browsing makes it extremely difficult to track sessions.
857         Private browsing is enabled via WKPreferences, but the session is shared, so it
858         has to be maintained while there is any chance that any page group anywhere still
859         needs it.
860
861         This patch fixes some of the issues, but ultimately, I think that we'll just need
862         to deprecate and replace the API.
863
864         * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::storageSession):
865         There are valid scenarios where privateBrowsingEnabled is true, but there is no
866         private browsing session. Handle that without crashing, although this unfortunately
867         means that it will be harder to spot logic errors when using a wrong session.
868         (WebKit::NetworkConnectionToWebProcess::registerBlobURL): Removed an obsolete FIXME.
869
870         * NetworkProcess/mac/RemoteNetworkingContext.h: Changed privateBrowsingSession()
871         to return a pointer, as no caller could know when it was safe to call it.
872
873         * NetworkProcess/mac/RemoteNetworkingContext.mm:
874         (WebKit::RemoteNetworkingContext::storageSession): Handle the case where private
875         browsing session is unexpectedly missing without crashing.
876         (WebKit::RemoteNetworkingContext::privateBrowsingSession): Changed to return a pointer.
877
878         * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureNetworkProcess):
879         Actually initialize privateBrowsingEnabled creation parameter. It would be very
880         difficult to figure out 100% reliably whether NetworkProcess needs a private browsing
881         session with the current API, but for existing clients, looking at
882         m_privateBrowsingEnterCount is good enough. Certainly better than not initializing.
883
884         * WebProcess/InjectedBundle/InjectedBundle.cpp:
885         (WebKit::InjectedBundle::setPrivateBrowsingEnabled): Added a FIXME.
886
887 2013-05-22  Tim Horton  <timothy_horton@apple.com>
888
889         [wk2] Should be able to make tiled WKViews clip to the view's exposed rect without using autolayout
890         https://bugs.webkit.org/show_bug.cgi?id=116625
891         <rdar://problem/13962816>
892
893         Reviewed by Anders Carlsson.
894
895         The two modes are not dependent; it should be possible to enable
896         clips-to-exposed-rect without using autolayout. This enables apps to
897         make very large tiled WKViews that don't create tiles for the whole
898         area of the view (and also disables scrolling, since that is currently
899         incompatible with clipping to the exposed rect).
900
901         * UIProcess/API/mac/WKView.mm:
902         (-[WKView setFrameSize:]):
903         (-[WKView _updateWindowAndViewFrames]):
904         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
905         (-[WKView enableFrameSizeUpdates]):
906         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
907         Rename _expandsToFitContentViaAutoLayout to _clipsToVisibleRect for accuracy.
908
909         (-[WKView setMinimumWidthForAutoLayout:]):
910         Factor clips-to-sisible-rect toggle out into setShouldClipToVisibleRect.
911
912         (-[WKView shouldClipToVisibleRect]):
913         (-[WKView setShouldClipToVisibleRect:]):
914         Allow setting clips-to-visible-rect without autolayout.
915
916         * UIProcess/API/mac/WKViewPrivate.h:
917         Add shouldClipToVisibleRect property.
918
919 2013-05-22  Alexey Proskuryakov  <ap@apple.com>
920
921         Remove unused private browsing override support
922         <rdar://problem/11969491>
923
924         Rubber-stamped by Sam Weinig.
925
926         Private browsing override is unused, and it complicates tracking of private
927         browsing sessions in UI process (in fact, it doesn't plug into this tracking at all,
928         so we would just assert if we used the API).
929
930         * Shared/WebPageCreationParameters.cpp:
931         (WebKit::WebPageCreationParameters::encode):
932         (WebKit::WebPageCreationParameters::decode):
933         * Shared/WebPageCreationParameters.h:
934         * UIProcess/API/C/WKPage.cpp:
935         * UIProcess/API/C/WKPagePrivate.h:
936         * UIProcess/WebPageProxy.cpp:
937         (WebKit::WebPageProxy::WebPageProxy):
938         (WebKit::WebPageProxy::creationParameters):
939         * UIProcess/WebPageProxy.h:
940         * WebProcess/WebPage/WebPage.cpp:
941         (WebKit::WebPage::WebPage):
942         (WebKit::WebPage::updatePreferences):
943         * WebProcess/WebPage/WebPage.h:
944         * WebProcess/WebPage/WebPage.messages.in:
945
946 2013-05-22  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
947
948         [EFL][WK2] Change Ewk_Context_Menu_Item's parent menu to raw pointer
949         https://bugs.webkit.org/show_bug.cgi?id=116549
950
951         Reviewed by Christophe Dumez.
952
953         A context menu item should have only a pointer to parent menu instead
954         of owning parent menu.
955
956         * UIProcess/API/efl/ewk_context_menu_item.cpp:
957         (EwkContextMenuItem::EwkContextMenuItem):
958         * UIProcess/API/efl/ewk_context_menu_item_private.h:
959         (EwkContextMenuItem::create):
960         (EwkContextMenuItem::parentMenu):
961         (EwkContextMenuItem):
962
963 2013-05-22  Csaba Osztrogonác  <ossy@webkit.org>
964
965         [Qt][WK2] Unreviewed buildfix after r150484.
966
967         * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
968         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
969
970 2013-05-21  Andreas Kling  <akling@apple.com>
971
972         REGRESSION(r150491): WebKit2.CloseThenTerminate asserting below WebContext::disconnectProcess().
973         <http://webkit.org/b/116588>
974
975         Reviewed by Sam Weinig.
976
977         Do an early return from WebProcessProxy::requestTermination() if there is no child process
978         connection to terminate.
979
980         * UIProcess/WebProcessProxy.cpp:
981         (WebKit::WebProcessProxy::requestTermination):
982
983 2013-05-21  Mark Rowe  <mrowe@apple.com>
984
985         <rdar://problem/13915556> Sluggish scrolling in web content
986
987         Reviewed by Gavin Barraclough.
988
989         * Shared/mac/ChildProcessMac.mm:
990         (WebKit::ChildProcess::setProcessSuppressionEnabled): When process suppression is disabled, low latency is important.
991
992 2013-05-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
993
994         Fix build break after r150484
995
996         Unreviewed, fix build break on EFL, GTK.
997
998         * UIProcess/Plugins/PluginInfoStore.cpp:
999         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
1000         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
1001         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
1002
1003 2013-05-21  Andreas Kling  <akling@apple.com>
1004
1005         PPT: Closing tab that is hung or chewing 100% CPU leaves abandoned WebProcess.
1006         <http://webkit.org/b/116464>
1007         <rdar://problem/10103795>
1008
1009         Reviewed by Anders Carlsson.
1010
1011         Simplify the web process sacrifice ritual. Instead of murderizing the process when its last tab closes,
1012         just shut down the CoreIPC connection from the UI process. The web process, upon noticing this,
1013         will start a 10 second watchdog timer, and if it hasn't shut down by the time it fires, well, it'll shut down.
1014
1015         (WebKit::WebProcessProxy::removeWebPage):
1016
1017             When the last page is removed from a WebProcessProxy, disconnect the process so that it'll die off
1018             eventually, even if the WebPage::Close message never gets properly handled.
1019
1020         * Shared/ChildProcessProxy.h:
1021         * Shared/ChildProcessProxy.cpp:
1022         (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded):
1023
1024             Added a helper to abort any in-progress launch of a new web process. Otherwise we'll have a race
1025             where the exiting web process may get re-used for a new tab.
1026
1027         * UIProcess/WebProcessProxy.h:
1028         * UIProcess/WebProcessProxy.cpp:
1029         (WebKit::WebProcessProxy::WebProcessProxy):
1030         (WebKit::WebProcessProxy::enableSuddenTermination):
1031         (WebKit::WebProcessProxy::disableSuddenTermination):
1032
1033             Remove WebProcessProxy's sudden termination counter. The web process will do what it needs in
1034             response to the WebPage::Close message. We still forward these calls to NSProcessInfo on Mac though.
1035
1036 2013-05-21  Anders Carlsson  <andersca@apple.com>
1037
1038         Fix build.
1039
1040         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1041         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1042         Stop using lambdas :(
1043
1044 2013-05-21  Anders Carlsson  <andersca@apple.com>
1045
1046         Provide an API to run sandboxed plug-ins outside of their sandbox
1047         https://bugs.webkit.org/show_bug.cgi?id=116578
1048
1049         Reviewed by Andreas Kling.
1050
1051         * Platform/CoreIPC/HandleMessage.h:
1052         (CoreIPC::callMemberFunction):
1053         Add new overload.
1054
1055         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
1056         (WebKit::PluginProcessMainDelegate::getExtraInitializationData):
1057         Handle "disable-sandbox".
1058
1059         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
1060         (WebKit::PluginServiceInitializerDelegate::getExtraInitializationData):
1061         Handle "disable-sandbox".
1062         
1063         * PluginProcess/PluginProcess.h:
1064         Move Type to PluginProcessAttributes and remove hash traits for type.
1065         
1066         * PluginProcess/mac/PluginProcessMac.mm:
1067         (WebKit::PluginProcess::platformInitializePluginProcess):
1068         Update for new type name.
1069
1070         (WebKit::PluginProcess::initializeSandbox):
1071         Return early if the sandbox is disabled.
1072
1073         * Shared/Plugins/Netscape/PluginInformation.cpp:
1074         (WebKit::getPluginModuleInformation):
1075         PluginInfoStore::policyForPlugin has been renamed to PluginInfoStore::defaultLoadPolicyForPlugin.
1076
1077         * Shared/Plugins/PluginModuleInfo.h:
1078         Add PluginModuleLoadUnsandboxed.
1079
1080         * Shared/Plugins/PluginProcessAttributes.h: Added.
1081         Add new header with various plug-in process attributes.
1082
1083         * Shared/Plugins/PluginProcessCreationParameters.h:
1084         Change type enum.
1085
1086         * UIProcess/API/C/WKAPICast.h:
1087         (WebKit::toWKPluginLoadPolicy):
1088         (WebKit::toPluginModuleLoadPolicy):
1089         Handle the unsandboxed enum.
1090
1091         * UIProcess/API/C/WKPage.h:
1092         Add kWKPluginLoadPolicyLoadUnsandboxed.
1093
1094         * UIProcess/Plugins/PluginInfoStore.h:
1095         Rename policyForPlugin to defaultLoadPolicyForPlugin.
1096
1097         * UIProcess/Plugins/PluginProcessManager.cpp:
1098         (WebKit::PluginProcessManager::pluginProcessToken):
1099         Add new helper function for getting a token given plug-in attributes.
1100
1101         (WebKit::PluginProcessManager::getPluginProcessConnection):
1102         This now takes a pluginProcessToken.
1103
1104         (WebKit::PluginProcessManager::getSitesWithData):
1105         Make sure to call pluginProcessToken.
1106
1107         (WebKit::PluginProcessManager::clearSiteData):
1108         Ditto.
1109
1110         (WebKit::PluginProcessManager::getOrCreatePluginProcess):
1111         This now takes a token.
1112
1113         * UIProcess/Plugins/PluginProcessProxy.cpp:
1114         (WebKit::PluginProcessProxy::create):
1115         (WebKit::PluginProcessProxy::PluginProcessProxy):
1116         Pass the PluginProcessAttributes as well as the plug-in process token.
1117
1118         (WebKit::PluginProcessProxy::getLaunchOptions):
1119         Pass the plug-in process attributes to platformGetLaunchOptions.
1120
1121         (WebKit::PluginProcessProxy::didClose):
1122         Pass the token to PluginProcessCrashed.
1123
1124         (WebKit::PluginProcessProxy::didFinishLaunching):
1125         Update for type change.
1126
1127         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
1128         (WebKit::shouldBlockPlugin):
1129         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
1130         Rename policyForPlugin to defaultLoadPolicyForPlugin.
1131
1132         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1133         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
1134         Set the "disable-sandbox" data if needed.
1135
1136         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
1137         (WebKit::PluginProcessProxy::openPluginPreferencePane):
1138         Get the module info from m_pluginProcessAttributes.
1139
1140         * UIProcess/WebPageProxy.cpp:
1141         (WebKit::WebPageProxy::findPlugin):
1142         This now returns a token.
1143
1144         * UIProcess/WebPageProxy.messages.in:
1145         FindPlugin now returns a token instead of the path.
1146
1147         * UIProcess/WebProcessProxy.cpp:
1148         (WebKit::WebProcessProxy::getPluginProcessConnection):
1149         Pass the token to the plug-in process manager.
1150
1151         * UIProcess/WebProcessProxy.messages.in:
1152         This now takes a token.
1153
1154         * WebKit2.xcodeproj/project.pbxproj:
1155         Add new files.
1156
1157         * WebProcess/Plugins/PluginProcessConnection.cpp:
1158         (WebKit::PluginProcessConnection::PluginProcessConnection):
1159         This now takes a token.
1160
1161         * WebProcess/Plugins/PluginProcessConnection.h:
1162         (WebKit::PluginProcessConnection::create):
1163         (WebKit::PluginProcessConnection::pluginProcessToken):
1164         Create this with a token instead of a path and process type.
1165
1166         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1167         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1168         This now takes a token.
1169
1170         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
1171         Ditto.
1172
1173         * WebProcess/Plugins/PluginProcessConnectionManager.messages.in:
1174         PluginProcessCrashed now takes a token.
1175
1176         * WebProcess/Plugins/PluginProxy.cpp:
1177         (WebKit::PluginProxy::create):
1178         (WebKit::PluginProxy::PluginProxy):
1179         These now take tokens.
1180
1181         (WebKit::PluginProxy::initialize):
1182         Pass the token when getting the connection.
1183
1184         * WebProcess/WebPage/WebPage.cpp:
1185         (WebKit::WebPage::createPlugin):
1186         Get the token from the UI process and pass it to the PluginProxy.
1187
1188         (WebKit::WebPage::canPluginHandleResponse):
1189         Update now that FindPlugin returns a token.
1190
1191 2013-05-21  Martin Robinson  <mrobinson@igalia.com>
1192
1193         [GTK] [CMake] Add support for building WebKit2
1194         https://bugs.webkit.org/show_bug.cgi?id=116372
1195
1196         Reviewed by Gustavo Noronha Silva.
1197
1198         * CMakeLists.txt: Add common directories to the common include list and remove UIProcess/PageViewportController.cpp
1199         from the source list since it should only be compiled for WebKitEFL. Instead of taking explicit forwarding-header
1200         dependencies accept a list of "tacked-on" dependencies for WebKit2. This allows GTK+ to specify its extra fake
1201         installed header step.
1202         * PlatformEfl.cmake: Remove common include directories and add UIProcess/PageViewportController.cpp to the source
1203         list. Fix up forwarding header dependencies now.
1204         * PlatformGTK.cmake: Added.
1205         * config.h: First check whether this is a CMake build and then fall back to the autotools header.
1206
1207 2013-05-21  Zan Dobersek  <zdobersek@igalia.com>
1208
1209         [GTK] Compile everything in C++11 mode
1210         https://bugs.webkit.org/show_bug.cgi?id=116452
1211
1212         Reviewed by Anders Carlsson.
1213
1214         * GNUmakefile.am: Remove the -std=c++11 flags from the various CPPFLAGS lists, the mode is now specified
1215         by default for all the C++ source code in SetupCompilerFlags.m4.
1216
1217 2013-05-21  Jessie Berlin  <jberlin@apple.com>
1218
1219         Expose a way to know when forms are added to a page or when form controls are added to a form
1220         in the injected bundle
1221         https://bugs.webkit.org/show_bug.cgi?id=116334
1222
1223         Reviewed by Alexey Proskuryakov.
1224
1225         Add shouldNotifyOnFormChanges and didAssociateFormControls to the WKBundlePageFormClient.
1226
1227         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1228         Add the new callbacks as part of version 2 of the WKBundlePageFormClient.
1229
1230         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1231         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
1232         Pass the message along to the client if the client has a handler.
1233         (WebKit::InjectedBundlePageFormClient::shouldNotifyOnFormChanges):
1234         Ditto.
1235         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
1236
1237         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1238         (WebKit::WebChromeClient::didAssociateFormControls):
1239         Tell the injected bundle form client for the page.
1240         (WebKit::WebChromeClient::shouldNotifyOnFormChanges):
1241         Ditto.
1242         * WebProcess/WebCoreSupport/WebChromeClient.h:
1243
1244 2013-05-21  Michael Brüning  <michael.bruning@digia.com>
1245
1246         [Qt][WK2] Fix Mountain Lion builds after r150277.
1247         https://bugs.webkit.org/show_bug.cgi?id=116467
1248
1249         Reviewed by Jocelyn Turcotte.
1250
1251         * Shared/API/c/WKBase.h:
1252
1253 2013-05-20  Lucas Forschler  <lforschler@apple.com>
1254
1255     Rollout r150398.
1256
1257 2013-05-20  Zan Dobersek  <zdobersek@igalia.com>
1258
1259         [GTK] Fix concatenations of string literals that are not C++11-compliant
1260         https://bugs.webkit.org/show_bug.cgi?id=116449
1261
1262         Reviewed by Martin Robinson.
1263
1264         Fix the problematic concatenations of string literals so they are compilable under the C++11 standard. This
1265         is simply a matter of separating the string and the string literal that are being concatenated with a space.
1266
1267         * UIProcess/API/gtk/tests/TestPrinting.cpp:
1268         (testPrintOperationPrint):
1269         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
1270         (methodCallCallback):
1271
1272 2013-05-20  Commit Queue  <commit-queue@webkit.org>
1273
1274         Unreviewed, rolling out r150384.
1275         http://trac.webkit.org/changeset/150384
1276         https://bugs.webkit.org/show_bug.cgi?id=116513
1277
1278         Not ready for primetime. (Requested by kling on #webkit).
1279
1280         * UIProcess/WebProcessProxy.cpp:
1281         (WebKit::WebProcessProxy::WebProcessProxy):
1282         (WebKit::WebProcessProxy::removeWebPage):
1283         * UIProcess/WebProcessProxy.h:
1284         (WebProcessProxy):
1285
1286 2013-05-20  Martin Robinson  <mrobinson@igalia.com>
1287
1288         Remove SharedMemoryGtk.cpp
1289         https://bugs.webkit.org/show_bug.cgi?id=116457
1290
1291         Reviewed by Andreas Kling.
1292
1293         * Platform/gtk/SharedMemoryGtk.cpp: Removed.
1294
1295 2013-05-20  Jessie Berlin  <jberlin@apple.com>
1296
1297         Expose a way to know when forms are added to a page or when form controls are added to a form
1298         in the injected bundle
1299         https://bugs.webkit.org/show_bug.cgi?id=116334
1300
1301         Reviewed by Alexey Proskuryakov.
1302
1303         Add shouldNotifyOnFormChanges and didAssociateFormControls to the WKBundlePageFormClient.
1304
1305         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1306         Add the new callbacks as part of version 2 of the WKBundlePageFormClient.
1307
1308         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1309         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
1310         Pass the message along to the client if the client has a handler.
1311         (WebKit::InjectedBundlePageFormClient::shouldNotifyOnFormChanges):
1312         Ditto.
1313         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
1314
1315         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1316         (WebKit::WebChromeClient::didAssociateFormControls):
1317         Tell the injected bundle form client for the page.
1318         (WebKit::WebChromeClient::shouldNotifyOnFormChanges):
1319         Ditto.
1320         * WebProcess/WebCoreSupport/WebChromeClient.h:
1321
1322 2013-05-20  Tim Horton  <timothy_horton@apple.com>
1323
1324         Clients should have a way to extend rendering suppression
1325         https://bugs.webkit.org/show_bug.cgi?id=116463
1326         <rdar://problem/13738496>
1327
1328         Reviewed by Andy Estes.
1329
1330         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1331         (WKBundlePageExtendIncrementalRenderingSuppression): Added.
1332         (WKBundlePageStopExtendingIncrementalRenderingSuppression): Added.
1333         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1334         These only have any effect if SuppressesIncrementalRendering is also enabled.
1335
1336         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1337         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1338         Inform the FrameView if there are any outstanding rendering suppression tokens.
1339
1340         * WebProcess/WebPage/WebPage.cpp:
1341         (WebKit::WebPage::WebPage):
1342         (WebKit::WebPage::extendIncrementalRenderingSuppression):
1343         Return the next available rendering suppression token.
1344         Add it to the list of active tokens.
1345         Inform the FrameView that we want to suppress rendering.
1346
1347         (WebKit::WebPage::stopExtendingIncrementalRenderingSuppression):
1348         Remove the given token from the list of active tokens.
1349         Un-suppress rendering if appropriate.
1350
1351         * WebProcess/WebPage/WebPage.h:
1352         (WebKit::WebPage::shouldExtendIncrementalRenderingSuppression):
1353         Return if there are any active rendering suppression tokens.
1354
1355 2013-05-20  Andreas Kling  <akling@apple.com>
1356
1357         PPT: Closing tab that is hung or chewing 100% CPU leaves abandoned WebProcess.
1358         <http://webkit.org/b/116464>
1359         <rdar://problem/10103795>
1360
1361         Reviewed by Anders Carlsson.
1362
1363         Give the web process a 10 second chance to exit nicely after closing the last tab belonging to it.
1364         This code only runs if there was something on the page (e.g an unload/beforeunload event handler)
1365         preventing the UI process from killing it right away.
1366
1367         * UIProcess/WebProcessProxy.cpp:
1368         (WebKit::WebProcessProxy::WebProcessProxy):
1369         (WebKit::WebProcessProxy::removeWebPage):
1370         (WebKit::WebProcessProxy::forcefulTerminationTimerFired):
1371         * UIProcess/WebProcessProxy.h:
1372         (WebProcessProxy):
1373
1374 2013-05-20  Anders Carlsson  <andersca@apple.com>
1375
1376         Add helper function for converting a KeyedCodingValue to a CFTypeRef
1377         https://bugs.webkit.org/show_bug.cgi?id=116461
1378
1379         Reviewed by Tim Horton.
1380
1381         * Shared/cf/KeyedCodingValueCF.cpp: Added.
1382         * Shared/cf/KeyedCodingValueCF.h: Added.
1383
1384         * WebKit2.xcodeproj/project.pbxproj:
1385
1386 2013-05-20  Anders Carlsson  <andersca@apple.com>
1387
1388         Begin stubbing out a new KeyedEncoder class
1389         https://bugs.webkit.org/show_bug.cgi?id=116456
1390
1391         Reviewed by Sam Weinig.
1392
1393         This class (and it's coming counterpart, KeyedDecoder) will be used for serializing
1394         object graphs to a tree-like structure of dictionaries. It is up to individual ports to
1395         serialize them further (for example, on Mac they could be serialized to CFPropertyList objects).
1396         
1397         This will be used for serializing session storage state but I hope that it can be used for serializing
1398         back forward state in the future as our current implementation of back forward state serialization
1399         is fragile and depends on our IPC layer's binary encoding(!).
1400         
1401         * Shared/KeyedCodingValue.h: Added.
1402         * Shared/KeyedEncoder.cpp: Added.
1403         * Shared/KeyedEncoder.h: Added.
1404
1405         * WebKit2.xcodeproj/project.pbxproj:
1406
1407 2013-05-19  Sam Weinig  <sam@webkit.org>
1408
1409         Bump WKBundlePageLoaderClient version number so as not to break some clients
1410         https://bugs.webkit.org/show_bug.cgi?id=116426
1411
1412         Reviewed by Anders Carlsson.
1413
1414         * Shared/APIClientTraits.cpp:
1415         (WebKit):
1416         * Shared/APIClientTraits.h:
1417         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1418
1419 2013-05-19  Anders Carlsson  <andersca@apple.com>
1420
1421         Remove link prerendering code
1422         https://bugs.webkit.org/show_bug.cgi?id=116415
1423
1424         Reviewed by Darin Adler.
1425
1426         This code was only used by Chromium and is dead now.
1427
1428         * Configurations/FeatureDefines.xcconfig:
1429
1430 2013-05-18  Anders Carlsson  <andersca@apple.com>
1431
1432         Simplify the StorageArea setter functions
1433         https://bugs.webkit.org/show_bug.cgi?id=116402
1434
1435         Reviewed by Sam Weinig.
1436
1437         Remove security checking code that lives in Storage now.
1438
1439         * WebProcess/Storage/StorageAreaImpl.cpp:
1440         (WebKit::StorageAreaImpl::setItem):
1441         (WebKit::StorageAreaImpl::removeItem):
1442         (WebKit::StorageAreaImpl::clear):
1443         * WebProcess/Storage/StorageAreaImpl.h:
1444
1445 2013-05-18  Sam Weinig  <sam@webkit.org>
1446
1447         Fix some builds.
1448
1449         * UIProcess/API/mac/WKTypeRefWrapper.mm:
1450
1451 2013-05-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1452
1453         REGRESSION(r150305): WebKit2 build broken with INDEXED_DATABASE enabled
1454         https://bugs.webkit.org/show_bug.cgi?id=116389
1455
1456         Reviewed by Martin Robinson.
1457
1458         There's no longer WebKeyValueStorageManager in the web process
1459         after r150305.
1460
1461         * WebProcess/WebPage/WebPageGroupProxy.cpp:
1462         (WebKit::WebPageGroupProxy::WebPageGroupProxy):
1463
1464 2013-05-17  Sam Weinig  <sam@webkit.org>
1465
1466         Add a way to pass WebKit2 WKTypeRefs in Objective-C style user data messages
1467         https://bugs.webkit.org/show_bug.cgi?id=116345
1468
1469         Reviewed by Anders Carlsson.
1470
1471         In order to efficiently send a WKImageRef to another process when using the
1472         Objective-C WKConnection (or other user data messages), we need a way to encode
1473         WKTypeRefs in the objective-c object graph. Thus was born WKTypeRefWrapper.
1474
1475         * Shared/mac/ObjCObjectGraphCoders.mm:
1476         (WebKit::typeFromObject):
1477         (WebKit::WebContextObjCObjectGraphEncoderImpl::encode):
1478         (WebKit::WebContextObjCObjectGraphDecoderImpl::decode):
1479         (WebKit::InjectedBundleObjCObjectGraphEncoderImpl::encode):
1480         (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode):
1481         * UIProcess/API/mac/WKTypeRefWrapper.h: Added.
1482         * UIProcess/API/mac/WKTypeRefWrapper.mm: Added.
1483         (-[WKTypeRefWrapper initWithObject:]):
1484         (-[WKTypeRefWrapper object]):
1485         * WebKit2.xcodeproj/project.pbxproj:
1486
1487 2013-05-18  Anders Carlsson  <andersca@apple.com>
1488
1489         Simplify StorageArea getter functions
1490         https://bugs.webkit.org/show_bug.cgi?id=116399
1491
1492         Reviewed by Sam Weinig.
1493
1494         Remove security and private browsing checks.
1495
1496         * WebProcess/Storage/StorageAreaImpl.cpp:
1497         (WebKit::StorageAreaImpl::key):
1498         (WebKit::StorageAreaImpl::item):
1499         (WebKit::StorageAreaImpl::contains):
1500         * WebProcess/Storage/StorageAreaImpl.h:
1501
1502 2013-05-18  Patrick Gansterer  <paroga@webkit.org>
1503
1504         [CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME
1505         https://bugs.webkit.org/show_bug.cgi?id=114554
1506
1507         Reviewed by Gyuyoung Kim.
1508
1509         Using variables as target names is very uncommon in CMake.
1510         The usual way to specify the name of the resulting binary
1511         is to set the OUTPUT_NAME target property.
1512
1513         * CMakeLists.txt:
1514         * PlatformEfl.cmake:
1515         * efl/ewebkit2.pc.in:
1516
1517 2013-05-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1518
1519         [GTK] Move GTK port off legacy clipboard
1520         https://bugs.webkit.org/show_bug.cgi?id=116221
1521
1522         Reviewed by Martin Robinson.
1523
1524         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Remove ClipboardGtk.h
1525         include.
1526         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
1527         (WebKit::WebDragClient::startDrag): Get the DataObjectGtk from the
1528         Pasteboard associated to the given Clipboard.
1529
1530 2013-05-18  Jinwoo Song  <jinwoo7.song@samsung.com>
1531
1532         [EFL][WK2] Refactor ewk_view_custom_encoding_set/get API
1533         https://bugs.webkit.org/show_bug.cgi?id=116386
1534
1535         Reviewed by Christophe Dumez.
1536
1537         Refactor the API to handle 'const char*' parameter in right way and
1538         enable the unit test which was disabled in r136230 as there is no assertion now.
1539
1540         * UIProcess/API/efl/EwkView.cpp:
1541         (EwkView::setCustomTextEncodingName):
1542         * UIProcess/API/efl/EwkView.h:
1543         (EwkView::customTextEncodingName):
1544         (EwkView):
1545         * UIProcess/API/efl/ewk_view.cpp:
1546         (ewk_view_custom_encoding_set):
1547         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1548         (TEST_F):
1549
1550 2013-05-18  Csaba Osztrogonác  <ossy@webkit.org>
1551
1552         [CMake] Unreviewed speculative build fix after r150305 and r150306.
1553
1554         * CMakeLists.txt:
1555
1556 2013-05-18  Csaba Osztrogonác  <ossy@webkit.org>
1557
1558         [Qt][WK2] Unreviewed build fix after r150305 and r150306.
1559
1560         * DerivedSources.pri:
1561         * Target.pri:
1562
1563 2013-05-18  Zan Dobersek  <zdobersek@igalia.com>
1564
1565         Unreviewed build fix for the GTK port after r150305 and r150306.
1566
1567         * GNUmakefile.list.am:
1568
1569 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
1570
1571         <rdar://problem/13819878> Disable SharedWorker when in multiple web process model
1572         https://bugs.webkit.org/show_bug.cgi?id=116359
1573
1574         The condition was accidentally negated, fixing.
1575
1576         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1577         (WebKit::WebPlatformStrategies::isAvailable):
1578
1579 2013-05-17  Gavin Barraclough  <barraclough@apple.com>
1580
1581         Only allow 1 WebProcess to hold a PageCache
1582         https://bugs.webkit.org/show_bug.cgi?id=116368
1583         <rdar://problem/13392600>
1584
1585         Reviewed by Geoff Garen & Anders Carlson.
1586
1587         * UIProcess/WebContext.cpp:
1588         (WebKit::WebContext::WebContext):
1589         (WebKit::WebContext::processDidSaveToPageCache):
1590         (WebKit):
1591         (WebKit::WebContext::disconnectProcess):
1592         * UIProcess/WebContext.h:
1593             - Added m_processWithPageCache, only allow one process to keep a PageCache.
1594         (WebContext):
1595         * UIProcess/WebPageProxy.cpp:
1596         (WebKit::WebPageProxy::didSaveToPageCache):
1597         (WebKit):
1598         * UIProcess/WebPageProxy.h:
1599         (WebPageProxy):
1600         * UIProcess/WebPageProxy.messages.in:
1601             - Forward didSaveToPageCache to the WebProcessProxy.
1602         * UIProcess/WebProcessProxy.cpp:
1603         (WebKit::WebProcessProxy::addBackForwardItem):
1604         (WebKit::WebProcessProxy::didSaveToPageCache):
1605         (WebKit):
1606         (WebKit::WebProcessProxy::releasePageCache):
1607             - Forward releasePageCache to the WebProcess.
1608             - Forward didSaveToPageCache to the WebContext.
1609         * UIProcess/WebProcessProxy.h:
1610         (WebProcessProxy):
1611         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1612         (WebKit::WebFrameLoaderClient::didSaveToPageCache):
1613             - Forward didSaveToPageCache to the WebPageProxy.
1614         * WebProcess/WebProcess.cpp:
1615         (WebKit::WebProcess::releasePageCache):
1616         (WebKit):
1617         * WebProcess/WebProcess.h:
1618         (WebProcess):
1619         * WebProcess/WebProcess.messages.in:
1620             - Added 'ReleasePageCache' to instruct a web process to drop any cached pages.
1621
1622 2013-05-17  Anders Carlsson  <andersca@apple.com>
1623
1624         Share code between WebKit1 and WebKit2 StorageArea subclasses
1625         https://bugs.webkit.org/show_bug.cgi?id=116367
1626
1627         Reviewed by Andreas Kling.
1628
1629         * WebProcess/Storage/StorageAreaImpl.cpp:
1630         (WebKit::StorageAreaImpl::length):
1631         Remove code that's now in Storage::length.
1632
1633         (WebKit::StorageAreaImpl::storageType):
1634         Make this a virtual member function.
1635
1636         * WebProcess/Storage/StorageAreaImpl.h:
1637
1638 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
1639
1640         <rdar://problem/13819878> Disable SharedWorker when in multiple web process model
1641         https://bugs.webkit.org/show_bug.cgi?id=116359
1642
1643         Reviewed by Anders Carlsson.
1644
1645         Implement SharedWorkerStrategy::isAvailable.
1646
1647         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1648         (WebKit::WebPlatformStrategies::isAvailable):
1649         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1650
1651 2013-05-17  Beth Dakin  <bdakin@apple.com>
1652
1653         Headers and footers will sometimes disappear and re-appear during page loads
1654         https://bugs.webkit.org/show_bug.cgi?id=116336
1655         -and corresponding-
1656         <rdar://problem/13886753>
1657
1658         Reviewed by Simon Fraser.
1659
1660         This patch changes the WebCore-level API that WebKit uses to create a banner. 
1661         Specifically this patch removes FrameView::setWantsLayerForHeader(), which created 
1662         and returned a layer. Instead, WK2 will call Page::addHeaderWithHeight(). When the 
1663         layer has been created, it will call back into WK2 via ChromeClient. This will 
1664         allow WebCore to re-create the header/footer layers as needed whenever the 
1665         FrameView/RenderLayerCompositor have been destroyed and recreated.
1666
1667         Send the layers over to PageBanner.
1668         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1669         (WebKit::WebChromeClient::didAddHeaderLayer):
1670         (WebKit::WebChromeClient::didAddFooterLayer):
1671         * WebProcess/WebCoreSupport/WebChromeClient.h:
1672         (WebChromeClient):
1673
1674         PageBanner::addToPage() now does much less work since it can’t get the parent 
1675         layer right away. The work that is used to do once it had the parent layer is now 
1676         performed in didAddParentLayer()
1677         * WebProcess/WebPage/PageBanner.cpp:
1678         (WebKit::PageBanner::didAddParentLayer):
1679         * WebProcess/WebPage/PageBanner.h:
1680         * WebProcess/WebPage/mac/PageBannerMac.mm:
1681         (WebKit::PageBanner::addToPage):
1682         (WebKit::PageBanner::didAddParentLayer):
1683
1684 2013-05-17  Anders Carlsson  <andersca@apple.com>
1685
1686         Rename WebKeyValueStorageManagerProxy to WebKeyValueStorageManager
1687         https://bugs.webkit.org/show_bug.cgi?id=116361
1688
1689         Reviewed by Andreas Kling.
1690
1691         There's nothing proxy about this class anymore!
1692
1693         * UIProcess/API/C/WKAPICast.h:
1694         * UIProcess/API/C/WKContext.cpp:
1695         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1696         * UIProcess/WebKeyValueStorageManager.cpp: Renamed from Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp.
1697         * UIProcess/WebKeyValueStorageManager.h: Renamed from Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h.
1698         * WebKit2.xcodeproj/project.pbxproj:
1699
1700 2013-05-17  Anders Carlsson  <andersca@apple.com>
1701
1702         Remove dead local storage code
1703         https://bugs.webkit.org/show_bug.cgi?id=116360
1704
1705         Reviewed by Beth Dakin.
1706
1707         Storage is all handled in the UI process now so we no longer need a WebKeyValueStorageManager in the web process.
1708
1709         * DerivedSources.make:
1710         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
1711         (WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy):
1712         (WebKit):
1713         (WebKit::didGetKeyValueStorageOrigins):
1714         (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
1715         * UIProcess/WebKeyValueStorageManagerProxy.h:
1716         (WebKeyValueStorageManagerProxy):
1717         * UIProcess/WebKeyValueStorageManagerProxy.messages.in: Removed.
1718         * WebKit2.xcodeproj/project.pbxproj:
1719         * WebProcess/Storage/WebKeyValueStorageManager.cpp: Removed.
1720         * WebProcess/Storage/WebKeyValueStorageManager.h: Removed.
1721         * WebProcess/Storage/WebKeyValueStorageManager.messages.in: Removed.
1722         * WebProcess/WebPage/WebPage.cpp:
1723         (WebKit::WebPage::updatePreferences):
1724         * WebProcess/WebProcess.cpp:
1725         (WebKit::WebProcess::WebProcess):
1726
1727 2013-05-17  Anders Carlsson  <andersca@apple.com>
1728
1729         Use the UI process storage manager for deleting local storage data
1730         https://bugs.webkit.org/show_bug.cgi?id=116358
1731         <rdar://problem/13852829>
1732
1733         Reviewed by Andreas Kling.
1734
1735         * Shared/WebSecurityOrigin.h:
1736         (WebKit::WebSecurityOrigin::protocol):
1737         (WebKit::WebSecurityOrigin::host):
1738         (WebKit::WebSecurityOrigin::databaseIdentifier):
1739         (WebKit::WebSecurityOrigin::toString):
1740         Remove unneeded consts.
1741
1742         (WebKit::WebSecurityOrigin::securityOrigin):
1743         Add getter.
1744
1745         * UIProcess/Storage/LocalStorageDatabase.cpp:
1746         (WebKit::LocalStorageDatabase::close):
1747         deleteEmptyDatabaseWithOrigin has been renamed to deleteDatabaseWithOrigin.
1748
1749         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1750         (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin):
1751         Rename since this is no longer used only for empty databases.
1752
1753         (WebKit::LocalStorageDatabaseTracker::deleteAllDatabases):
1754         Loop over the tracker database and delete all database files.
1755
1756         * UIProcess/Storage/StorageManager.cpp:
1757         (WebKit::StorageManager::StorageArea::clear):
1758         Clear the map, close the database and tell all event listeners to reset their caches.
1759
1760         (WebKit::StorageManager::LocalStorageNamespace::clearStorageAreasMatchingOrigin):
1761         Loop over all storage areas and call clear on those matching the security origin.
1762
1763         (WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas):
1764         Loop over all storage areas and call clear on them.
1765         
1766         (WebKit::StorageManager::deleteEntriesForOrigin):
1767         Dispatch deleteEntriesForOriginInternal on the work queue.
1768
1769         (WebKit::StorageManager::deleteAllEntries):
1770         Dispatch deleteAllEntriesInternal on the work queue.
1771
1772         (WebKit::StorageManager::deleteEntriesForOriginInternal):
1773         Call clearStorageAreasMatchingOrigin on all local storage namespaces and then delete the database.
1774
1775         (WebKit::StorageManager::deleteAllEntriesInternal):
1776         Call clearAllStorageAreas on all local storage namespaces and then delete all databases.
1777
1778         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
1779         (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
1780         Call out to the storage manager.
1781
1782         (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
1783         Ditto.
1784
1785         * WebProcess/Storage/StorageAreaMap.cpp:
1786         (WebKit::StorageAreaMap::clearCache):
1787         Call resetValues which will null out the storage map.
1788
1789         * WebProcess/Storage/StorageAreaMap.messages.in:
1790         Add ClearCache message.
1791
1792 2013-05-17  Anders Carlsson  <andersca@apple.com>
1793
1794         Only import local storage items from the database once
1795         https://bugs.webkit.org/show_bug.cgi?id=116354
1796
1797         Reviewed by Andreas Kling.
1798
1799         We import items from the database over and over, when we only want to do it once. Use a 
1800         boolean flag to guard against doing it more than once. 
1801         
1802         Also, rename importItemsFromDatabase to openDatabaseAndImportItemsIfNeeded since it now
1803         also opens the database (even if it doesn't need to import anything). This is preparation for an
1804         upcoming patch where the database will be closed when it's cleared.
1805
1806         * UIProcess/Storage/StorageManager.cpp:
1807         (StorageManager::StorageArea):
1808         (WebKit::StorageManager::StorageArea::StorageArea):
1809         (WebKit::StorageManager::StorageArea::setItem):
1810         (WebKit::StorageManager::StorageArea::removeItem):
1811         (WebKit::StorageManager::StorageArea::clear):
1812         (WebKit::StorageManager::StorageArea::items):
1813         (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
1814
1815 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
1816
1817         <rdar://problem/13869765> Lion: Crashes in islcCanLoadInputMethodFromBundleID.
1818
1819         Reviewed by Anders Carlsson.
1820
1821         * WebProcess/com.apple.WebProcess.sb.in: Allow text input directories.
1822
1823 2013-05-17  Anders Carlsson  <andersca@apple.com>
1824
1825         WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process
1826         https://bugs.webkit.org/show_bug.cgi?id=116346
1827         <rdar://problem/13852829>
1828
1829         Reviewed by Andreas Kling.
1830
1831         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1832         (WebKit::LocalStorageDatabaseTracker::origins):
1833         New helper function to return all the tracked origins.
1834
1835         * UIProcess/Storage/StorageManager.cpp:
1836         (WebKit::StorageManager::StorageManager):
1837         Initialize the UTF-8 encoding.
1838
1839         (WebKit::StorageManager::getOrigins):
1840         Call getOriginsInternal on our queue.
1841
1842         (WebKit::callCallbackFunction):
1843         Helper function for calling the callback function.
1844
1845         (WebKit::StorageManager::getOriginsInternal):
1846         Get the origins and make sure we call the callback with the given function dispatcher.
1847
1848         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
1849         (WebKit::didGetKeyValueStorageOriginsCallback):
1850         Construct the array of WebSecurityOrigin objects and call the callback.
1851
1852         (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
1853         Call StorageManager::getOrigins.
1854
1855 2013-05-16  Alexey Proskuryakov  <ap@apple.com>
1856
1857         Text input is largely broken when there are subframes loading
1858         http://bugs.webkit.org/show_bug.cgi?id=59121
1859         <rdar://problem/9320468>
1860
1861         Reviewed by Darin Adler.
1862
1863         * UIProcess/PageClient.h:
1864         * UIProcess/API/mac/PageClientImpl.h:
1865         * UIProcess/API/mac/PageClientImpl.mm:
1866         (WebKit::PageClientImpl::updateSecureInputState): Separated secure input state
1867         updating into a separate function. Removed updateTextInputState, we don't need
1868         to go through PageClient to implement its behavior at all.
1869         (WebKit::PageClientImpl::dismissDictionaryLookupPanel): Added a FIXME.
1870
1871         * UIProcess/API/mac/WKView.mm:
1872         * UIProcess/API/mac/WKViewInternal.h:
1873         Removed _updateTextInputStateIncludingSecureInputState.
1874
1875         * UIProcess/WebPageProxy.h: Added m_temporarilyClosedComposition, which helps
1876         to figure out that WebCore decided to close a composition. The issue is that WebCore
1877         would first send an EditorState with hasComposition set to false, and with
1878         shouldIgnoreCompositionSelectionChange set to true, at which time we forget the
1879         previous m_editorState, but can't make any decisions based on this transient state.
1880         We should find a way to simplify this (maybe not send these updates with
1881         shouldIgnoreCompositionSelectionChange at all?)
1882
1883         * UIProcess/WebPageProxy.cpp:
1884         (WebKit::WebPageProxy::WebPageProxy): Initialize m_temporarilyClosedComposition.
1885         (WebKit::WebPageProxy::didCommitLoadForFrame): Removed the code to kill a composition
1886         when any frame commits a load, which made no sense (along with surrounding code,
1887         which will unfortunately survive longer).
1888         (WebKit::WebPageProxy::editorStateChanged): Implemented state updating here,
1889         we don't need to go to WKView.mm to implement this logic. Figure out when WebCore
1890         discards a composition, and notify input methods about this.
1891         (WebKit::WebPageProxy::resetStateAfterProcessExited): Reset m_temporarilyClosedComposition.
1892         Added some FIXMEs.
1893
1894 2013-05-17  Manuel Rego Casasnovas  <rego@igalia.com>
1895
1896         [WK2] Add support for selectTrailingWhitespaceEnabled setting
1897         https://bugs.webkit.org/show_bug.cgi?id=112426
1898
1899         Reviewed by Ryosuke Niwa.
1900
1901         * Shared/WebPreferencesStore.h:
1902         (WebKit): Add macro for selectTrailingWhitespaceEnabled.
1903         * UIProcess/API/C/WKPreferences.cpp:
1904         (WKPreferencesSetSelectTrailingWhitespaceEnabled):
1905         (WKPreferencesGetSelectTrailingWhitespaceEnabled): Implement methods
1906         using the new setting.
1907         * UIProcess/API/C/WKPreferencesPrivate.h: Add new methods headers.
1908         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1909         (WebKit::WebEditorClient::isSelectTrailingWhitespaceEnabled): Implement
1910         method delegating in WebPage.
1911         * WebProcess/WebPage/WebPage.cpp:
1912         (WebKit::WebPage::updatePreferences): Set
1913         selectTrailingWhitespaceEnabled setting.
1914         (WebKit::WebPage::setSmartInsertDeleteEnabled): Set
1915         selectTrailingWhitespaceEnabled as they are mutually exclusive.
1916         (WebKit):
1917         (WebKit::WebPage::isSelectTrailingWhitespaceEnabled): Implement method
1918         using settings.
1919         (WebKit::WebPage::setSelectTrailingWhitespaceEnabled): Implement method
1920         using settings and set smartInsertDeleteEnabled as they are mutually
1921         exclusive.
1922         * WebProcess/WebPage/WebPage.h:
1923         (WebPage): Add new methods headers.
1924
1925 2013-05-17  Brady Eidson  <beidson@apple.com>
1926
1927         Fix crash introduced by http://trac.webkit.org/changeset/150282
1928         Followup to https://bugs.webkit.org/show_bug.cgi?id=116253
1929
1930         Reviewed by Andreas Kling.
1931
1932         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1933         (WebKit::WebChromeClient::focusedFrameChanged): Frame might be null.
1934
1935 2013-05-17  Brady Eidson  <beidson@apple.com>
1936
1937         Replace WebFrameLoaderClient static_casts with a function that might return null.
1938         https://bugs.webkit.org/show_bug.cgi?id=116253
1939
1940         The general approach here is:
1941         1 - Introduce a toWebFrameLoaderClient() function to convert FrameLoaderClients, and that may return null.
1942         2 - Adopt toWebFrameLoaderClient() everywhere we used to do a direct static_cast<WebFrameLoaderClient*>
1943         3 - In functions that already support a "return 0" scenario, a failed cast results in a return 0.
1944         4 - In other functions that assume no failure to get the WebFrameLoaderClient, add an ASSERT.
1945
1946         Reviewed by Alexey Proskuryakov.
1947
1948         Add the utility function to cast:
1949         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1950         (WebKit::toWebFrameLoaderClient):
1951
1952         Adopt it everywhere:
1953         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
1954         (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
1955
1956         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1957         (WebKit::InjectedBundleNodeHandle::documentFrame):
1958         (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
1959         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
1960
1961         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1962         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1963
1964         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
1965         (WebKit::InjectedBundleDOMWindowExtension::frame):
1966
1967         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
1968         (WebKit::InjectedBundleHitTestResult::frame):
1969         (WebKit::InjectedBundleHitTestResult::targetFrame):
1970
1971         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1972         (WebKit::WebResourceLoadScheduler::scheduleLoad):
1973
1974         * WebProcess/Plugins/PluginView.cpp:
1975         (WebKit::webPage):
1976         (WebKit::PluginView::performFrameLoadURLRequest):
1977
1978         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1979         (WebKit::WebChromeClient::focusedNodeChanged):
1980         (WebKit::WebChromeClient::focusedFrameChanged):
1981         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
1982         (WebKit::WebChromeClient::runJavaScriptAlert):
1983         (WebKit::WebChromeClient::runJavaScriptConfirm):
1984         (WebKit::WebChromeClient::runJavaScriptPrompt):
1985         (WebKit::WebChromeClient::print):
1986         (WebKit::WebChromeClient::exceededDatabaseQuota):
1987         (WebKit::WebChromeClient::runOpenPanel):
1988
1989         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1990         (WebKit::WebEditorClient::textFieldDidBeginEditing):
1991         (WebKit::WebEditorClient::textFieldDidEndEditing):
1992         (WebKit::WebEditorClient::textDidChangeInTextField):
1993         (WebKit::WebEditorClient::textDidChangeInTextArea):
1994         (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
1995         (WebKit::WebEditorClient::textWillBeDeletedInTextField):
1996
1997         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1998         (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
1999         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
2000
2001         * WebProcess/WebPage/WebFrame.cpp:
2002         (WebKit::WebFrame::contentsAsString):
2003         (WebKit::WebFrame::parentFrame):
2004         (WebKit::WebFrame::childFrames):
2005         (WebKit::WebFrame::frameForContext):
2006         (WebKit::WebFrameFilter::shouldIncludeSubframe):
2007
2008         * WebProcess/WebPage/WebPage.cpp:
2009         (WebKit::WebPage::mainFrameHasCustomRepresentation):
2010
2011 2013-05-17  Sam Weinig  <sam@webkit.org>
2012
2013         Expose new load-with-userData API to Objective-C
2014         https://bugs.webkit.org/show_bug.cgi?id=116335
2015
2016         Reviewed by Anders Carlsson.
2017
2018         - Adds loadRequest:userData:, loadFileURL:restrictToFilesWithin:userData:, loadHTMLString:baseURL:userData:
2019           loadData:MIMEType:textEncodingName:baseURL:, and loadData:MIMEType:textEncodingName:baseURL:userData.
2020         - Adds a WKObjCTypeWrapperRef (which is a ObjCObjectGraph under the covers) to allow the userData to be unwrapped
2021           in the injected bundles willLoadURLRequest and willLoadDataRequest C-SPI callbacks.
2022
2023         * Shared/API/c/WKBase.h:
2024         * Shared/API/c/WKSharedAPICast.h:
2025         * Shared/API/c/mac/WKBaseMac.h: Added.
2026         * Shared/API/c/mac/WKObjCTypeWrapperRef.h: Added.
2027         * Shared/API/c/mac/WKObjCTypeWrapperRef.mm: Added.
2028         (WKObjCTypeWrapperGetTypeID):
2029         (WKObjCTypeWrapperCreate):
2030         (WKObjCTypeWrapperGetObject):
2031         * UIProcess/API/mac/WKBrowsingContextController.h:
2032         * UIProcess/API/mac/WKBrowsingContextController.mm:
2033         (+[WKBrowsingContextController registerSchemeForCustomProtocol:]):
2034         (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]):
2035         (-[WKBrowsingContextController loadRequest:]):
2036         (-[WKBrowsingContextController loadRequest:userData:]):
2037         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
2038         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:userData:]):
2039         (-[WKBrowsingContextController loadHTMLString:baseURL:]):
2040         (-[WKBrowsingContextController loadHTMLString:baseURL:userData:]):
2041         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:]):
2042         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
2043         * WebKit2.xcodeproj/project.pbxproj:
2044
2045 2013-05-17  Sam Weinig  <sam@webkit.org>
2046
2047         Add WKPageLoadData and WKPageLoadDataWithUserData SPI to support loading arbitrary data blobs
2048         https://bugs.webkit.org/show_bug.cgi?id=116325
2049
2050         Reviewed by Simon Fraser.
2051
2052         * UIProcess/API/C/WKPage.cpp:
2053         (WKPageLoadData):
2054         (WKPageLoadDataWithUserData):
2055         Add new SPI.
2056
2057         * UIProcess/API/C/WKPage.h:
2058         * UIProcess/WebPageProxy.cpp:
2059         (WebKit::WebPageProxy::loadData):
2060         * UIProcess/WebPageProxy.h:
2061         Pipe through to the WebProcess.
2062
2063         * WebProcess/WebPage/WebPage.h:
2064         * WebProcess/WebPage/WebPage.messages.in:
2065         * WebProcess/WebPage/WebPage.cpp:
2066         (WebKit::WebPage::loadDataImpl):
2067         (WebKit::WebPage::loadData):
2068         (WebKit::WebPage::loadHTMLString):
2069         (WebKit::WebPage::loadAlternateHTMLString):
2070         (WebKit::WebPage::loadPlainTextString):
2071         (WebKit::WebPage::loadWebArchiveData):
2072         Rename existing loadData function to loadDataImpl (I hate it) to avoid overload conflict
2073         from IPC magic.
2074
2075
2076 2013-05-17  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2077
2078         [EFL][WK2] Fix sub menu initialization in ewk_context_menu_item
2079         https://bugs.webkit.org/show_bug.cgi?id=116321
2080
2081         Reviewed by Christophe Dumez.
2082
2083         During sub menu creation, after initializing m_parentMenu, parentMenu
2084         pointer became null which may cause segfaults. This patch fixes it by
2085         using m_parentMenu.
2086
2087         * UIProcess/API/efl/ewk_context_menu_item.cpp:
2088         (EwkContextMenuItem::EwkContextMenuItem):
2089
2090 2013-05-17  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2091
2092         [EFL][WK2] Support sub menu in ewk context menus
2093         https://bugs.webkit.org/show_bug.cgi?id=114729
2094
2095         Reviewed by Christophe Dumez.
2096
2097         Added submenu support in EwkContextMenu and an API function to receive
2098         Ewk_Context_Menu from submenu context menu item. A test case was added
2099         for new API function.
2100         EwkContextMenu is now an EwkObject allowing multiple instances of submenu
2101         to be used in different submenu type context menu items.
2102
2103         * UIProcess/API/efl/ewk_context_menu_item.cpp:
2104         (EwkContextMenuItem::EwkContextMenuItem):
2105         (ewk_context_menu_item_new):
2106         (ewk_context_menu_item_parent_menu_get):
2107         (ewk_context_menu_item_submenu_get):
2108         * UIProcess/API/efl/ewk_context_menu_item.h:
2109         * UIProcess/API/efl/ewk_context_menu_item_private.h:
2110         (EwkContextMenuItem::create):
2111         (EwkContextMenuItem::parentMenu):
2112         (EwkContextMenuItem::subMenu):
2113         (EwkContextMenuItem):
2114         * UIProcess/API/efl/ewk_context_menu_private.h:
2115         (EwkContextMenu::ewkView):
2116         (EwkContextMenu):
2117         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
2118         (showContextMenu):
2119
2120 2013-05-17  Zoltan Arvai  <zarvai@inf.u-szeged.hu>, Ádám Kallai  <kadam@inf.u-szeged.hu>
2121
2122         [Qt] Unreviewed build fix.
2123
2124         Add missing Qt specific initializer for willLoadURLRequest and willLoadDataRequest.
2125
2126         * WebProcess/qt/QtBuiltinBundlePage.cpp:
2127         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
2128
2129 2013-05-16  Beth Dakin  <bdakin@apple.com>
2130
2131         Remove WKBundlePageGetHeaderLayer/Footer SPI
2132         https://bugs.webkit.org/show_bug.cgi?id=116254
2133
2134         Reviewed by Benjamin Poulain.
2135
2136         We should remove the Remove WKBundlePageGetHeaderLayer/Footer SPI. It was only 
2137         recently added and have been replaced by WKBundlePageSetHeaderBanner/Footer.
2138
2139         * WebKit2.xcodeproj/project.pbxproj:
2140         * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.h: Removed.
2141         * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.mm: Removed.
2142         * WebProcess/WebPage/WebPage.h:
2143         (WebPage):
2144         * WebProcess/WebPage/mac/WebPageMac.mm:
2145         (WebKit):
2146         (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):
2147
2148 2013-05-14  Sam Weinig  <sam@webkit.org>
2149
2150         Add variants of the loading APIs that take user data and a way for the injected bundle to find out about them
2151         https://bugs.webkit.org/show_bug.cgi?id=116132
2152
2153         Reviewed by Anders Carlsson.
2154
2155         Adds "WithUserData" versions of all the load APIs and two new WKBundlePageLoaderClient functions,
2156         willLoadURLRequest and willLoadDataRequest to let the bundle access them.
2157
2158         Adds WebKit2WillLoadTest.* API tests.
2159
2160         * UIProcess/API/C/WKPage.cpp:
2161         (WKPageLoadURLWithUserData):
2162         (WKPageLoadURLRequestWithUserData):
2163         (WKPageLoadFile):
2164         (WKPageLoadFileWithUserData):
2165         (WKPageLoadHTMLStringWithUserData):
2166         (WKPageLoadAlternateHTMLStringWithUserData):
2167         (WKPageLoadPlainTextStringWithUserData):
2168         (WKPageLoadWebArchiveDataWithUserData):
2169         * UIProcess/API/C/WKPage.h:
2170         * UIProcess/WebPageProxy.cpp:
2171         * UIProcess/WebPageProxy.h:
2172         (WebPageProxy):
2173         * WebKit2.xcodeproj/project.pbxproj:
2174         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2175         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2176         (WebKit::InjectedBundlePageLoaderClient::willLoadURLRequest):
2177         (WebKit::InjectedBundlePageLoaderClient::willLoadDataRequest):
2178         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2179         (WebCore):
2180         (InjectedBundlePageLoaderClient):
2181         * WebProcess/WebPage/WebPage.cpp:
2182         * WebProcess/WebPage/WebPage.h:
2183         * WebProcess/WebPage/WebPage.messages.in:
2184
2185 2013-05-16  Manuel Rego Casasnovas  <rego@igalia.com>
2186
2187         [GTK] Fix memory leak in WebKitBackForwardList
2188         https://bugs.webkit.org/show_bug.cgi?id=116222
2189
2190         Reviewed by Carlos Garcia Campos.
2191
2192         Due to the use of leakRef() the ImmutableArray is not being released
2193         automatically. Adding a local variable in the methods to make sure that
2194         the ImmutableArray is freed.
2195
2196         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
2197         (webkit_back_forward_list_get_back_list_with_limit): Add local variable
2198         RefPtr and pass the ImmutableArray to
2199         WebKitBackForwardList::webkitBackForwardListCreateList() using
2200         RefPtr::get().
2201         (webkit_back_forward_list_get_forward_list_with_limit): Ditto.
2202
2203 2013-05-16  Commit Queue  <commit-queue@webkit.org>
2204
2205         Unreviewed, rolling out r150034.
2206         http://trac.webkit.org/changeset/150034
2207         https://bugs.webkit.org/show_bug.cgi?id=116257
2208
2209         This work around doesn't work due to another bug NSUndoManager
2210         has (Requested by rniwa on #webkit).
2211
2212         * UIProcess/API/mac/PageClientImpl.mm:
2213         (WebKit::PageClientImpl::registerEditCommand):
2214
2215 2013-05-16  Tim Horton  <timothy_horton@apple.com>
2216
2217         PDFPlugins don't load when plugins are disabled, but they should
2218         https://bugs.webkit.org/show_bug.cgi?id=75790
2219         <rdar://problem/11650197>
2220
2221         Reviewed by Anders Carlsson.
2222
2223         Support loading "application" plug-ins even if plug-ins are explicitly disabled.
2224
2225         Make PDFPlugin and SimplePDFPlugin "application" plug-ins, so they can
2226         be loaded even if plug-ins are disabled.
2227
2228         * Platform/CoreIPC/HandleMessage.h:
2229         (CoreIPC::callMemberFunction):
2230         Add a 5-argument, 3-reply version of callMemberFunction.
2231
2232         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2233         (WebKit::NetscapePluginModule::getPluginInfo):
2234         NPAPI plug-ins are not application plug-ins.
2235
2236         * Shared/WebCoreArgumentCoders.cpp:
2237         (CoreIPC::::encode):
2238         (CoreIPC::::decode):
2239         Encode/decode the new isApplicationPlugin field on PluginInfo.
2240
2241         * UIProcess/Plugins/PluginInfoStore.cpp:
2242         (WebKit::PluginInfoStore::findPluginForMIMEType):
2243         (WebKit::PluginInfoStore::findPluginForExtension):
2244         (WebKit::PluginInfoStore::findPlugin):
2245         * UIProcess/Plugins/PluginInfoStore.h:
2246         (PluginInfoStore):
2247         Give PluginInfoStore's findPlugin method and its private helper
2248         methods an argument allowing them to only match application plug-ins.
2249
2250         (WebKit::WebPageProxy::findPlugin):
2251         * UIProcess/WebPageProxy.h:
2252         (WebPageProxy):
2253         * UIProcess/WebPageProxy.messages.in:
2254         Add an argument allowing findPlugin to restrict its search to only application plug-ins.
2255
2256         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2257         (WebKit::WebFrameLoaderClient::objectContentType):
2258         Previously, this caller depended on pluginData() returning null if
2259         plug-ins were disabled. Since that is no longer the case, we have to
2260         check if we can use plug-ins, and otherwise ignore non-application-plug-ins.
2261
2262         * WebProcess/WebPage/WebPage.cpp:
2263         (WebKit::WebPage::createPlugin):
2264         When going to search for a plug-in, ask subframeLoader whether or not
2265         it's OK to use ordinary non-application plug-ins, and pass that information
2266         on to the UIProcess when performing the search.
2267
2268         (WebKit::WebPage::canPluginHandleResponse): Ditto.
2269         (WebKit::WebPage::canShowMIMEType):
2270         Ensure that canShowMIMEType returns true if we have an application plug-in
2271         that can display a particular MIME type, even if we're not allowed to load plug-ins.
2272
2273 2013-05-16  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2274
2275         [EFL][WK2] Make Ewk_Context_Menu Ewk_Object
2276         https://bugs.webkit.org/show_bug.cgi?id=116097
2277
2278         Reviewed by Gyuyoung Kim.
2279
2280         Changed Ewk_Context_Menu to be an Ewk_Object so pointer to menu
2281         object can be shared between different modules.
2282
2283         * UIProcess/API/efl/EwkView.cpp:
2284         (EwkView::showContextMenu):
2285         * UIProcess/API/efl/EwkView.h:
2286         (EwkView):
2287         * UIProcess/API/efl/ewk_context_menu.cpp:
2288         (EwkContextMenu::appendItem):
2289         (EwkContextMenu::removeItem):
2290         (ewk_context_menu_new):
2291         (ewk_context_menu_new_with_items):
2292         (ewk_context_menu_item_append):
2293         (ewk_context_menu_item_remove):
2294         (ewk_context_menu_hide):
2295         (ewk_context_menu_items_get):
2296         (ewk_context_menu_item_select):
2297         * UIProcess/API/efl/ewk_context_menu_item.cpp:
2298         (EwkContextMenuItem::EwkContextMenuItem):
2299         (ewk_context_menu_item_new_with_submenu):
2300         * UIProcess/API/efl/ewk_context_menu_item_private.h:
2301         (EwkContextMenuItem):
2302         * UIProcess/API/efl/ewk_context_menu_private.h:
2303         (EwkContextMenu):
2304         (EwkContextMenu::create):
2305         * UIProcess/API/efl/ewk_defines.h:
2306
2307 2013-05-16  Andreas Kling  <akling@apple.com>
2308
2309         Page::chrome() should return a reference.
2310         <http://webkit.org/b/116185>
2311
2312         Reviewed by Anders Carlsson.
2313
2314 2013-05-16  Brady Eidson  <beidson@apple.com>
2315
2316         svg/as-image/img-zoom-svg-stylesheet.html crashes with NetworkProcess enabled.
2317         <rdar://problem/13837408> and https://bugs.webkit.org/show_bug.cgi?id=115917
2318
2319         Reviewed by Sam Weinig.
2320
2321         * NetworkProcess/SchedulableLoader.cpp:
2322         (WebKit::SchedulableLoader::SchedulableLoader): ASSERT that either there’s a frame and page ID, or
2323           that the client cannot be asked for credentials.
2324
2325         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2326         (WebKit::WebResourceLoadScheduler::scheduleLoad): Only cast the FrameLoaderClient and get WebFrame/WebPage
2327           if that is actually possible. Set the clientCredentialPolicy based on whether or not WebFrame/WebPage are
2328           available since they are needed to ask the UIProcess for credentials. ASSERT that either there’s both
2329           a frame and page ID or that the client won’t be asked for credentials.
2330
2331 2013-05-16  Timothy Hatcher  <timothy@apple.com>
2332
2333         Make the Find Banner in Safari work again with the docked Web Inspector.
2334
2335         https://webkit.org/b/116182
2336         rdar://problem/13857423
2337
2338         Reviewed by Benjamin Poulain.
2339
2340         * UIProcess/mac/WebInspectorProxyMac.mm:
2341         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
2342         (WebKit::WebInspectorProxy::platformDetach):
2343         Preserve the top position of the inspected view so banners in Safari still work.
2344
2345 2013-05-16  Tim Horton  <timothy_horton@apple.com>
2346
2347         [wk2] didGetImageForFindMatch can return a null image
2348         https://bugs.webkit.org/show_bug.cgi?id=116251
2349         <rdar://problem/13277246>
2350
2351         Reviewed by Simon Fraser.
2352
2353         Don't send didGetImageForFindMatch if we didn't get an image for
2354         the find match, which can happen if the selection is not visible.
2355
2356         * WebProcess/WebPage/FindController.cpp:
2357         (WebKit::FindController::getImageForFindMatch):
2358
2359 2013-05-16  Tim Horton  <timothy_horton@apple.com>
2360
2361         [wk2] Minimum layout width is lost if the WebProcess crashes
2362         https://bugs.webkit.org/show_bug.cgi?id=116202
2363         <rdar://problem/13202320>
2364
2365         Reviewed by Darin Adler.
2366
2367         Send the minimum layout width to the WebProcess upon initialization,
2368         so that crashed-and-restarted WebProcesses have the correct width.
2369
2370         * Shared/WebPageCreationParameters.cpp:
2371         (WebKit::WebPageCreationParameters::encode):
2372         (WebKit::WebPageCreationParameters::decode):
2373         * Shared/WebPageCreationParameters.h:
2374         (WebPageCreationParameters):
2375         Add minimumLayoutWidth WebPage creation parameter.
2376
2377         * UIProcess/WebPageProxy.cpp:
2378         (WebKit::WebPageProxy::creationParameters):
2379         Send the current minimumLayoutWidth to the WebPage when it's created.
2380
2381         (WebKit::WebPageProxy::setMinimumLayoutWidth):
2382         Store minimumLayoutWidth changes that come in while the WebProcess is
2383         not valid, so that the correct width is sent once it is restarted.
2384
2385         * WebProcess/WebPage/WebPage.cpp:
2386         (WebKit::WebPage::WebPage):
2387         Set minimumLayoutWidth to the value provided by our creation parameters.
2388
2389 2013-05-16  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2390
2391         [Win] Unreviewed buildfix after r150161.
2392
2393         'Unknown' in HTTPRequest.cpp is ambiguous symbol with MSVC,
2394         because it is also defined in MS SDK 7.1 winioctl.h.
2395
2396         * UIProcess/InspectorServer/HTTPRequest.cpp:
2397         (WebKit::HTTPRequest::HTTPRequest):
2398
2399 2013-05-16  Andras Becsi  <andras.becsi@digia.com>
2400
2401         [WK2] PluginInformation.cpp fails to build because of missing ENABLE(NETSCAPE_PLUGIN_API) guard
2402         https://bugs.webkit.org/show_bug.cgi?id=116018
2403
2404         Rubber-stamped by Jocelyn Turcotte.
2405
2406         * Shared/Plugins/Netscape/PluginInformation.cpp:
2407         (WebKit::getPluginModuleInformation):
2408
2409 2013-05-15  Simon Cooper  <scooper@apple.com>
2410
2411         Enable printing in plugins
2412         https://bugs.webkit.org/show_bug.cgi?id=116201
2413         <rdar://problem/12347902>
2414
2415         Reviewed by Alexey Proskuryakov.
2416
2417         Add the printing entitlement so that legacy printing drivers can
2418         customize the print panel. Update the printing rules and enable them
2419         for the plugins.
2420
2421         * Configurations/PluginService.entitlements:
2422         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2423         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
2424         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
2425         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
2426
2427 2013-05-15  Anders Carlsson  <andersca@apple.com>
2428
2429         Move HTTPRequest class to WebKit2
2430         https://bugs.webkit.org/show_bug.cgi?id=116192
2431
2432         Reviewed by Darin Adler.
2433
2434         Move HTTPRequest to WebKit2 and put it in the WebKit namespace.
2435
2436         * CMakeLists.txt:
2437         * GNUmakefile.list.am:
2438         * Target.pri:
2439         * UIProcess/InspectorServer/HTTPRequest.cpp: Renamed from Source/WebCore/platform/network/HTTPRequest.cpp.
2440         * UIProcess/InspectorServer/HTTPRequest.h: Renamed from Source/WebCore/platform/network/HTTPRequest.h.
2441         * UIProcess/InspectorServer/WebInspectorServer.cpp:
2442         * UIProcess/InspectorServer/WebInspectorServer.h:
2443         (WebInspectorServer):
2444         * UIProcess/InspectorServer/WebSocketServerClient.h:
2445         (WebKit::WebSocketServerClient::didReceiveUnrecognizedHTTPRequest):
2446         (WebKit::WebSocketServerClient::didReceiveWebSocketUpgradeHTTPRequest):
2447         (WebKit::WebSocketServerClient::didEstablishWebSocketConnection):
2448         * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
2449         * UIProcess/InspectorServer/WebSocketServerConnection.h:
2450         (WebKit):
2451         (WebSocketServerConnection):
2452
2453 2013-05-15  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2454
2455         [GTK] [WebKit2] enable displaying console.log messages to system console
2456         https://bugs.webkit.org/show_bug.cgi?id=115578
2457
2458         Reviewed by Martin Robinson.
2459
2460         Add a setting to enable/disable displaying of page messages to system
2461         console. Property is called enable-write-console-messages-to-stdout.
2462         Getter API function is
2463         webkit_settings_get_enable_write_console_messages_to_stdout
2464         Setter API function is
2465         webkit_settings_set_enable_write_console_messages_to_stdout
2466
2467         * UIProcess/API/gtk/WebKitSettings.cpp:
2468         (webKitSettingsSetProperty):
2469         (webKitSettingsGetProperty):
2470         (webkit_settings_class_init):
2471         (webkit_settings_get_enable_write_console_messages_to_stdout):
2472         (webkit_settings_set_enable_write_console_messages_to_stdout):
2473         * UIProcess/API/gtk/WebKitSettings.h:
2474         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
2475         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
2476         (testWebKitSettings):
2477
2478 2013-05-08  Gavin Barraclough  <barraclough@apple.com>
2479
2480         Process suppression should throttle scripted animations
2481         https://bugs.webkit.org/show_bug.cgi?id=115812
2482
2483         Reviewed by Simon Fraser.
2484
2485         <rdar://problem/13799726>
2486
2487         * WebProcess/WebPage/WebPage.cpp:
2488         (WebKit::WebPage::setThrottled):
2489         (WebKit):
2490         * WebProcess/WebPage/WebPage.h:
2491         (WebPage):
2492             - Added setThrottled, forwards to WebCore::Page.
2493         * WebProcess/WebProcess.cpp:
2494         (WebKit):
2495         (WebKit::WebProcess::setProcessSuppressionEnabled):
2496         * WebProcess/WebProcess.h:
2497         (WebProcess):
2498             - Intercept calls to setProcessSuppressionEnabled, also mark all pages as being throttled.
2499
2500 2013-05-15  Anders Carlsson  <andersca@apple.com>
2501
2502         WKPageGetPluginInformationDisplayNameKey doesn't return the right key
2503         https://bugs.webkit.org/show_bug.cgi?id=116188
2504
2505         Reviewed by Andreas Kling.
2506
2507         * UIProcess/API/C/WKPage.cpp:
2508         (WKPageGetPluginInformationDisplayNameKey):
2509
2510 2013-05-15  Alexey Proskuryakov  <ap@apple.com>
2511
2512         More fixing after WebProcessShim renaming in r149074.
2513
2514         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
2515         (WebContentServiceInitializer): Updated a comment to mention the shim by its new name.
2516
2517 2013-05-15  Alexey Proskuryakov  <ap@apple.com>
2518
2519         <rdar://problem/13902706> Lion: com.apple.tsm.uiserver sandbox error in Console when
2520         launching Safari
2521
2522         Reviewed by Anders Carlsson.
2523
2524         * WebProcess/com.apple.WebProcess.sb.in: Silence the violation.
2525
2526 2013-05-13  Anders Carlsson  <andersca@apple.com>
2527
2528         Frame::editor() should return a reference
2529         https://bugs.webkit.org/show_bug.cgi?id=116037
2530
2531         Reviewed by Darin Adler.
2532
2533         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2534         (WebKit::WebContextMenuClient::searchWithGoogle):
2535         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2536         (WebKit::WebEditorClient::updateGlobalSelection):
2537         * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
2538         (WebKit::WebEditorClient::handleInputMethodKeydown):
2539         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
2540         (WebKit::WebEditorClient::executePendingEditorCommands):
2541         (WebKit::WebEditorClient::handleKeyboardEvent):
2542         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2543         (WebKit::WebContextMenuClient::searchWithGoogle):
2544         (WebKit::WebContextMenuClient::searchWithSpotlight):
2545         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2546         (WebKit::changeWordCase):
2547         * WebProcess/WebPage/WebFrame.cpp:
2548         (WebKit::WebFrame::selectionAsString):
2549         (WebKit::WebFrame::setTextDirection):
2550         * WebProcess/WebPage/WebPage.cpp:
2551         (WebKit::WebPage::editorState):
2552         (WebKit::WebPage::executeEditingCommand):
2553         (WebKit::WebPage::isEditingCommandEnabled):
2554         (WebKit::WebPage::validateCommand):
2555         (WebKit::WebPage::handleEditingKeyboardEvent):
2556         (WebKit::WebPage::advanceToNextMisspelling):
2557         (WebKit::WebPage::uppercaseWord):
2558         (WebKit::WebPage::lowercaseWord):
2559         (WebKit::WebPage::capitalizeWord):
2560         (WebKit::WebPage::replaceSelectionWithText):
2561         (WebKit::WebPage::handleAlternativeTextUIResult):
2562         (WebKit::WebPage::setCompositionForTesting):
2563         (WebKit::WebPage::hasCompositionForTesting):
2564         (WebKit::WebPage::confirmCompositionForTesting):
2565         (WebKit::WebPage::setComposition):
2566         (WebKit::WebPage::cancelComposition):
2567         * WebProcess/WebPage/efl/WebPageEfl.cpp:
2568         (WebKit::WebPage::confirmComposition):
2569         (WebKit::WebPage::setComposition):
2570         (WebKit::WebPage::cancelComposition):
2571         * WebProcess/WebPage/mac/WebPageMac.mm:
2572         (WebKit::WebPage::executeKeypressCommandsInternal):
2573         (WebKit::WebPage::handleEditingKeyboardEvent):
2574         (WebKit::WebPage::setComposition):
2575         (WebKit::WebPage::confirmComposition):
2576         (WebKit::WebPage::cancelComposition):
2577         (WebKit::WebPage::insertText):
2578         (WebKit::WebPage::insertDictatedText):
2579         (WebKit::WebPage::getMarkedRange):
2580         (WebKit::WebPage::firstRectForCharacterRange):
2581         (WebKit::WebPage::readSelectionFromPasteboard):
2582         (WebKit::WebPage::getStringSelectionForPasteboard):
2583         (WebKit::WebPage::getDataSelectionForPasteboard):
2584
2585 2013-05-15  Anders Carlsson  <andersca@apple.com>
2586
2587         Need a way for NPAPI plug-ins to open preference panes
2588         https://bugs.webkit.org/show_bug.cgi?id=116173
2589         <rdar://problem/13503848>
2590
2591         Reviewed by Sam Weinig.
2592
2593         * PluginProcess/PluginControllerProxy.h:
2594         Add openPluginPreferencePane().
2595
2596         * PluginProcess/mac/PluginControllerProxyMac.mm:
2597         (WebKit::PluginControllerProxy::openPluginPreferencePane):
2598         Send OpenPluginPreferencePane to the UI process.
2599
2600         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2601         (WebKit::NetscapePluginModule::getPluginInfo):
2602         Get the preference pane path.
2603         
2604         * Shared/Plugins/PluginModuleInfo.h:
2605         Add preferencePanePath member variable.
2606
2607         * UIProcess/Plugins/PluginProcessProxy.h:
2608         Add openPluginPreferencePane message handler.
2609
2610         * UIProcess/Plugins/PluginProcessProxy.messages.in:
2611         ADd OpenPluginPreferencePane message.
2612
2613         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2614         (WebKit::PluginProcessProxy::openPluginPreferencePane):
2615         Get the path to the preference pane and use LS to open it.
2616
2617         * WebKit2.xcodeproj/project.pbxproj:
2618         Add new files.
2619
2620         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2621         (WebKit::NPN_GetValue):
2622         Handle WKNVPlugInContainer.
2623
2624         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2625         Add WKNVPlugInContainer member variable.
2626
2627         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2628         (WebKit::NetscapePlugin::openPluginPreferencePane):
2629         Call through to the plug-in controller.
2630
2631         (WebKit::NetscapePlugin::plugInContainer):
2632         Create a WKNPAPIPlugInContainer object if necessary.
2633
2634         (WebKit::NetscapePlugin::platformDestroy):
2635         Invalidate the WKNPAPIPlugInContainer object.
2636
2637         * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.h:
2638         New file with the protocol definition.
2639
2640         * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.mm:
2641         (-[WKNPAPIPlugInContainer dealloc]):
2642         Assert that the plug-in is null (that we've been invalidated).
2643
2644         (-[WKNPAPIPlugInContainer _invalidate]):
2645         Set the plug-in to null.
2646
2647         (-[WKNPAPIPlugInContainer openPlugInPreferencePane]):
2648         Call through to the plug-in.
2649
2650         * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainerInternal.h:
2651         New file with the interface declaration for the object that implements the protocol.
2652
2653         * WebProcess/Plugins/PluginController.h:
2654         Add openPluginPreferencePane member function.
2655
2656         * WebProcess/Plugins/PluginView.cpp:
2657         (WebKit::PluginView::openPluginPreferencePane):
2658         Add stub; this should never be called since we always go through the UI process.
2659
2660 2013-05-15  Alexey Proskuryakov  <ap@apple.com>
2661
2662         [WK2][Mac] Split resetTextInputState into two functions
2663         https://bugs.webkit.org/show_bug.cgi?id=116174
2664
2665         Reviewed by Anders Carlsson.
2666
2667         Splitting resetTextInputState into resetSecureInputState and
2668         notifyInputContextAboutDiscardedComposition, paving the way for a fix where these
2669         won't be happening simultaneously.
2670
2671         * UIProcess/API/mac/PageClientImpl.h:
2672         * UIProcess/API/mac/PageClientImpl.mm:
2673         (WebKit::PageClientImpl::resetSecureInputState):
2674         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
2675         * UIProcess/API/mac/WKView.mm:
2676         (-[WKView resignFirstResponder]):
2677         (-[WKView _resetSecureInputState]):
2678         (-[WKView _notifyInputContextAboutDiscardedComposition]):
2679         * UIProcess/API/mac/WKViewInternal.h:
2680         * UIProcess/PageClient.h:
2681         * UIProcess/WebPageProxy.cpp:
2682         (WebKit::WebPageProxy::didCommitLoadForFrame):
2683
2684 2013-05-15  Carlos Garcia Campos  <cgarcia@igalia.com>
2685
2686         [GTK] Add padding to all public class structs for future expansion without breaking ABI
2687         https://bugs.webkit.org/show_bug.cgi?id=112565
2688
2689         Reviewed by Anders Carlsson.
2690
2691         Use 4 pointers for most of the classes that are unlikely to grow
2692         and 8 for WebKitWebView and WebKitWebContext.
2693
2694         * UIProcess/API/gtk/WebKitBackForwardList.h:
2695         (_WebKitBackForwardListClass):
2696         * UIProcess/API/gtk/WebKitBackForwardListItem.h:
2697         (_WebKitBackForwardListItemClass):
2698         * UIProcess/API/gtk/WebKitContextMenu.h:
2699         (_WebKitContextMenuClass):
2700         * UIProcess/API/gtk/WebKitContextMenuItem.h:
2701         (_WebKitContextMenuItemClass):
2702         * UIProcess/API/gtk/WebKitCookieManager.h:
2703         (_WebKitCookieManagerClass):
2704         * UIProcess/API/gtk/WebKitDownload.h:
2705         (_WebKitDownloadClass):
2706         * UIProcess/API/gtk/WebKitFaviconDatabase.h:
2707         (_WebKitFaviconDatabaseClass):
2708         * UIProcess/API/gtk/WebKitFileChooserRequest.h:
2709         (_WebKitFileChooserRequestClass):
2710         * UIProcess/API/gtk/WebKitFindController.h:
2711         (_WebKitFindControllerClass):
2712         * UIProcess/API/gtk/WebKitFormSubmissionRequest.h:
2713         (_WebKitFormSubmissionRequestClass):
2714         * UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h:
2715         (_WebKitGeolocationPermissionRequestClass):
2716         * UIProcess/API/gtk/WebKitHitTestResult.h:
2717         (_WebKitHitTestResultClass):
2718         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
2719         (_WebKitNavigationPolicyDecisionClass):
2720         * UIProcess/API/gtk/WebKitPlugin.h:
2721         (_WebKitPluginClass):
2722         * UIProcess/API/gtk/WebKitPolicyDecision.h:
2723         (_WebKitPolicyDecisionClass):
2724         * UIProcess/API/gtk/WebKitPrintOperation.h:
2725         (_WebKitPrintOperationClass):
2726         * UIProcess/API/gtk/WebKitResponsePolicyDecision.h:
2727         (_WebKitResponsePolicyDecisionClass):
2728         * UIProcess/API/gtk/WebKitSecurityManager.h:
2729         (_WebKitSecurityManagerClass):
2730         * UIProcess/API/gtk/WebKitSettings.h:
2731         (_WebKitSettingsClass):
2732         * UIProcess/API/gtk/WebKitURIRequest.h:
2733         (_WebKitURIRequestClass):
2734         * UIProcess/API/gtk/WebKitURIResponse.h:
2735         (_WebKitURIResponseClass):
2736         * UIProcess/API/gtk/WebKitURISchemeRequest.h:
2737         (_WebKitURISchemeRequestClass):
2738         * UIProcess/API/gtk/WebKitWebContext.h:
2739         (_WebKitWebContextClass):
2740         * UIProcess/API/gtk/WebKitWebInspector.h:
2741         (_WebKitWebInspectorClass):
2742         * UIProcess/API/gtk/WebKitWebResource.h:
2743         (_WebKitWebResourceClass):
2744         * UIProcess/API/gtk/WebKitWebView.h:
2745         (_WebKitWebViewClass):
2746         * UIProcess/API/gtk/WebKitWebViewBase.h:
2747         (_WebKitWebViewBaseClass):
2748         * UIProcess/API/gtk/WebKitWebViewGroup.h:
2749         (_WebKitWebViewGroupClass):
2750         * UIProcess/API/gtk/WebKitWindowProperties.h:
2751         (_WebKitWindowPropertiesClass):
2752
2753 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2754
2755         Remove WTF_USE_PLATFORM_STRATEGIES
2756         https://bugs.webkit.org/show_bug.cgi?id=114431
2757
2758         Reviewed by Darin Adler.
2759
2760         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2761         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2762         * WebProcess/WebProcess.cpp:
2763         (WebKit::WebProcess::WebProcess):
2764
2765 2013-05-14  Simon Cooper  <scooper@apple.com>
2766
2767         Add a preference that can disable the fake SYSV SHM shim
2768         https://bugs.webkit.org/show_bug.cgi?id=116127
2769         <rdar://problem/13810524>
2770
2771         Reviewed by Alexey Proskuryakov.
2772
2773         * PluginProcess/mac/PluginProcessShim.mm:
2774         (WebKit::shim_disabled):
2775         (WebKit::shim_shmdt):
2776         (WebKit::shim_shmat):
2777         (WebKit::shim_shmget):
2778         (WebKit::shim_shmctl):
2779
2780 2013-05-14  Tim Horton  <timothy_horton@apple.com>
2781
2782         [wk2] Not updating tiled backing coverage when main frame scrollability changes
2783         https://bugs.webkit.org/show_bug.cgi?id=116123
2784         <rdar://problem/13836559>
2785
2786         Reviewed by Simon Fraser.
2787
2788         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2789         (TiledCoreAnimationDrawingArea):
2790         Add updateMainFrameClipsToExposedRect.
2791
2792         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2793         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2794         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2795         Remove m_clipsToExposedRect. We don't actually need it.
2796
2797         (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
2798         Call updateMainFrameClipsToExposedRect so that we can always update
2799         tiled backing coverage and can factor out our calls to setClipsToExposedRect.
2800
2801         (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
2802         Factor out setClipsToExposedRect calls to here, and also call
2803         FrameView::adjustTiledBackingCoverage so that the FrameView's tiled
2804         backing is informed to allow overdraw in the UI-process-scrolling case.
2805
2806         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
2807         Use updateMainFrameClipsToExposedRect.
2808
2809 2013-05-14  Alexey Proskuryakov  <ap@apple.com>
2810
2811         [Mac] Add a testing shim for secure event input functions
2812         https://bugs.webkit.org/show_bug.cgi?id=116122
2813
2814         Reviewed by Mark Rowe.
2815
2816         Moved DyldInterpose.h to WebCore, as we now use it there too.
2817
2818         * PluginProcess/mac/PluginProcessShim.mm:
2819         * Shared/mac/CookieStorageShimLibrary.cpp:
2820         * Shared/mac/DyldInterpose.h: Removed.
2821         * WebKit2.xcodeproj/project.pbxproj:
2822         * WebProcess/mac/SecItemShimLibrary.mm:
2823
2824 2013-05-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
2825
2826         [Win] REGRESSION(r149944): mmap is not available on Windows
2827         https://bugs.webkit.org/show_bug.cgi?id=116015
2828
2829         Reviewed by Anders Carlsson.
2830
2831         Use fastAlloc/fastFree for platforms other than OS(DARWIN) where
2832         using mmap is not necessary and maybe not available.
2833
2834         * Platform/CoreIPC/ArgumentEncoder.cpp:
2835         (CoreIPC::allocBuffer):
2836         (CoreIPC::freeBuffer):
2837         (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
2838         (CoreIPC::ArgumentEncoder::grow):
2839
2840 2013-05-14  Zan Dobersek  <zdobersek@igalia.com>
2841
2842         [GTK] Move generated ColorData.cpp, WebKitFontFamilyNames.(cpp|h) build targets into libPlatform
2843         https://bugs.webkit.org/show_bug.cgi?id=115921
2844
2845         Reviewed by Gustavo Noronha Silva.
2846
2847         * GNUmakefile.am: Add platform_cppflags to the list of libwebkit2gtk CPPFLAGS.
2848
2849 2013-05-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
2850
2851         [WK2][Win] Fix ASSERT(DeleteTimerQueueTimer...)
2852         https://bugs.webkit.org/show_bug.cgi?id=116039
2853
2854         Reviewed by Benjamin Poulain.
2855
2856         According to the documentation, DeleteTimerQueueTimer can be expected to return
2857         false with an ERROR_IO_PENDING error when called from the timer's callback.
2858
2859         * Platform/win/WorkQueueWin.cpp:
2860         (WorkQueue::timerCallback):
2861
2862 2013-05-14  Alexey Proskuryakov  <ap@apple.com>
2863
2864         Remove unused "type" field from DictionaryPopupInfo
2865         https://bugs.webkit.org/show_bug.cgi?id=116011
2866
2867         Reviewed by Darin Adler.
2868
2869         It is unused, and furthermore, PDFPlugin sets it incorrectly anyway.
2870
2871         * Shared/DictionaryPopupInfo.cpp:
2872         (WebKit::DictionaryPopupInfo::encode):
2873         (WebKit::DictionaryPopupInfo::decode):
2874         * Shared/DictionaryPopupInfo.h:
2875         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2876         (WebKit::PDFPlugin::showDefinitionForAttributedString):
2877         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2878         (WebKit::WebContextMenuClient::lookUpInDictionary):
2879         * WebProcess/WebPage/WebPage.h:
2880         * WebProcess/WebPage/mac/WebPageMac.mm:
2881         (WebKit::WebPage::performDictionaryLookupAtLocation):
2882         (WebKit::WebPage::performDictionaryLookupForSelection):
2883         (WebKit::WebPage::performDictionaryLookupForRange):
2884
2885 2013-05-14  Michael Brüning  <michael.bruning@digia.com>
2886
2887         [WK2] Make WebPageProxy use deviceScaleFactor() in creationParameters().
2888         https://bugs.webkit.org/show_bug.cgi?id=110218
2889
2890         Reviewed by Darin Adler.
2891
2892         Make the WebPageProxy::creationParameters use the accessor
2893         deviceScaleFactor() instead of using m_intrinsicDeviceScaleFactor
2894         directly. This will restore the custom device scale factor when
2895         reattaching to the WebProcess after a crash.
2896
2897         Moreover, it will enable the Qt and ELF ports to use the
2898         existing C API for overriding the device scale factor instead
2899         of using the WebPageProxy directly or adding new C API to set
2900         the intrinsic device scale factor.
2901
2902         * UIProcess/API/efl/EwkView.cpp:
2903         (EwkView::setDeviceScaleFactor):
2904         * UIProcess/API/qt/qquickwebpage.cpp:
2905         (QQuickWebPage::updatePaintNode):
2906         * UIProcess/WebPageProxy.cpp:
2907         (WebKit::WebPageProxy::creationParameters):
2908
2909 2013-05-13  Alex Christensen  <achristensen@apple.com>
2910
2911         Added testRunner.setPrinting.
2912         https://bugs.webkit.org/show_bug.cgi?id=42693
2913         rdar://problem/8213845
2914
2915         Reviewed by Darin Adler.
2916
2917         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2918         (WKBundlePageCopyRenderTreeExternalRepresentationForPrinting): Added.
2919         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2920         Added WKBundlePageCopyRenderTreeExternalRepresentationForPrinting declaration.
2921         * WebProcess/WebPage/WebPage.cpp:
2922         (WebKit::WebPage::renderTreeExternalRepresentationForPrinting): Added.
2923         * WebProcess/WebPage/WebPage.h:
2924         Added renderTreeExternalRepresentationForPrinting declaration.
2925
2926 2013-05-13  Timothy Hatcher  <timothy@apple.com>
2927
2928         Add support for updating the Web Inspector toolbar height.
2929
2930         https://bugs.webkit.org/show_bug.cgi?id=115996
2931
2932         Reviewed by Joseph Pecoraro and Benjamin Poulain.
2933
2934         * UIProcess/WebInspectorProxy.h:
2935         (WebKit::WebInspectorProxy::setToolbarHeight):
2936         (WebInspectorProxy):
2937         * UIProcess/WebInspectorProxy.messages.in:
2938         * UIProcess/efl/WebInspectorProxyEfl.cpp:
2939         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
2940         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2941         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
2942         (WebKit):
2943         * UIProcess/mac/WebInspectorProxyMac.mm:
2944         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
2945         * UIProcess/qt/WebInspectorProxyQt.cpp:
2946         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
2947         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2948         (WebKit::WebInspectorFrontendClient::setToolbarHeight):
2949         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
2950         (WebInspectorFrontendClient):
2951         * WebProcess/WebPage/WebInspector.cpp:
2952         (WebKit::WebInspector::setToolbarHeight):
2953         * WebProcess/WebPage/WebInspector.h:
2954
2955 2013-05-13  Ryosuke Niwa  <rniwa@webkit.org>
2956
2957         Sometimes NSUndoManager can get into an inconsistent state
2958         https://bugs.webkit.org/show_bug.cgi?id=116050
2959
2960         Reviewed by Enrica Casucci.
2961
2962         Always group undo items to work around a bug in NSUndoManager that manifests
2963         when we call removeAllActionsWithTarget.
2964
2965         * UIProcess/API/mac/PageClientImpl.mm:
2966         (WebKit::PageClientImpl::registerEditCommand):
2967
2968 2013-05-13  Anders Carlsson  <andersca@apple.com>
2969
2970         [WK2] Crash in WebKit::StorageAreaMap::didSetItem()
2971         https://bugs.webkit.org/show_bug.cgi?id=116026
2972
2973         Reviewed by Andreas Kling.
2974
2975         Make sure that we ignore any leftover messages from the UI process after we've reset
2976         the storage map. Achieve this by keeping a seed count in the StorageAreaMap object that's incremented
2977         everytime the map is reset. Associate every storage area change with the seed and ignore any incoming 
2978         notification messages from the UI process if the seeds are different.
2979
2980         * Platform/CoreIPC/HandleMessage.h:
2981         (CoreIPC):
2982         (CoreIPC::callMemberFunction):
2983         * UIProcess/Storage/StorageManager.cpp:
2984         (WebKit::StorageManager::getValues):
2985         (WebKit::StorageManager::setItem):
2986         (WebKit::StorageManager::removeItem):
2987         (WebKit::StorageManager::clear):
2988         * UIProcess/Storage/StorageManager.h:
2989         (StorageManager):
2990         * UIProcess/Storage/StorageManager.messages.in:
2991         * WebProcess/Storage/StorageAreaMap.cpp:
2992         (WebKit::StorageAreaMap::StorageAreaMap):
2993         (WebKit::StorageAreaMap::setItem):
2994         (WebKit::StorageAreaMap::removeItem):
2995         (WebKit::StorageAreaMap::clear):
2996         (WebKit::StorageAreaMap::resetValues):
2997         (WebKit::StorageAreaMap::loadValuesIfNeeded):
2998         (WebKit::StorageAreaMap::didGetValues):
2999         (WebKit::StorageAreaMap::didSetItem):
3000         (WebKit::StorageAreaMap::didRemoveItem):
3001         (WebKit::StorageAreaMap::didClear):
3002         (WebKit::StorageAreaMap::applyChange):
3003         * WebProcess/Storage/StorageAreaMap.h:
3004         (StorageAreaMap):
3005         * WebProcess/Storage/StorageAreaMap.messages.in:
3006
3007 2013-05-13  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3008
3009         [WK2][CoordinatedGraphics] Avoid dispensable calls to WebView::updateViewportSize()
3010         https://bugs.webkit.org/show_bug.cgi?id=116045
3011
3012         Reviewed by Darin Adler.
3013
3014         * UIProcess/CoordinatedGraphics/WebView.cpp:
3015         (WebKit::WebView::setSize):
3016
3017 2013-05-13  Jon Lee  <jonlee@apple.com>
3018
3019         [WK2] Notification manager removal should not be tied to termination of web processes
3020         https://bugs.webkit.org/show_bug.cgi?id=116038
3021         <rdar://problem/10968680>
3022
3023         Reviewed by Ryosuke Niwa.
3024
3025         WebNotificationManagerProxy incorrectly removes the manager when web processes close.
3026         Since it is a supplemental on the web context, the manager should only be removed
3027         when the context is destroyed.
3028
3029         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
3030         * UIProcess/Notifications/WebNotificationManagerProxy.h: Remove implementation of
3031         processDidClose().
3032
3033 2013-05-13  Martin Robinson  <mrobinson@igalia.com>
3034
3035         [GTK] [WebKit2] Use a template file for generated GObject enum files
3036         https://bugs.webkit.org/show_bug.cgi?id=115867
3037
3038         Reviewed by Carlos Garcia Campos.
3039
3040         * GNUmakefile.am: Use a template file instead of specifying portions of the file on the command-line.
3041         * UIProcess/API/gtk/WebKitEnumTypes.cpp.template: Added.
3042         * UIProcess/API/gtk/WebKitEnumTypes.h.template: Added.
3043         * UIProcess/API/gtk/WebKitFindController.cpp: We can no longer rely on WebKitEnumTypes.h to pull in WebKitWebView.h.
3044
3045 2013-05-13  Noam Rosenthal  <noam@webkit.org>
3046
3047         [CoordGfx] requestAnimationFrame performance issues
3048         https://bugs.webkit.org/show_bug.cgi?id=112345
3049
3050         Reviewed by Jocelyn Turcotte.
3051
3052         Changed the logic of requestAnimationFrame in Coordinated Graphics.
3053         We don't send any IPC messages for requestAnimationFrame. Instead, we do one of two things:
3054         - If there is already a frame pending in the UI process, do nothing, as the animations would
3055           be serviced when the frame is returned to the web process.
3056         - If there is no frame pending, we schedule a flush, making sure that that flush occurs at 
3057           least 1/60 seconds after the last animation service, so that we don't get an infinite loop
3058           of flushes.
3059
3060         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
3061         (WebKit::CoordinatedLayerTreeHostProxy::requestAnimationFrame):
3062         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
3063         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3064         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
3065         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
3066         (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
3067         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
3068         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in:
3069
3070 2013-05-13  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3071
3072         [WK2][CoordinatedGraphics] WKView needs API for handling opacity
3073         https://bugs.webkit.org/show_bug.cgi?id=116032
3074
3075         Reviewed by Kenneth Rohde Christiansen.
3076
3077         Add WKViewSetOpacity and WKViewOpacity APIs and use them in
3078         WebView.cpp.
3079
3080         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
3081         (WKViewSetOpacity):
3082         (WKViewOpacity):
3083         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
3084         * UIProcess/CoordinatedGraphics/WebView.cpp:
3085         (WebKit::WebView::WebView):
3086         (WebKit::WebView::paintToCurrentGLContext):
3087         * UIProcess/CoordinatedGraphics/WebView.h:
3088         (WebKit::WebView::setOpacity):
3089         (WebKit::WebView::opacity):
3090         (WebView):
3091
3092 2013-05-13  Zan Dobersek  <zdobersek@igalia.com>
3093
3094         [GTK] Use WebCore layer archives for TestWebCore, WebKitPluginProcess
3095         https://bugs.webkit.org/show_bug.cgi?id=115918
3096
3097         Reviewed by Gustavo Noronha Silva.
3098
3099         Due to layer violations and circular dependencies the WebKitPluginProcess requires for the
3100         libraries containing the built code of the intertwining Platform and WebCore layers to be
3101         specified multiple times when linking. This can be avoided by packing the two layers' archives
3102         into one big archive, named after the WebCore layer due to no clear boundary between it and the
3103         Platform layer. The big archive can then be specified only once when linking, simplifying the code
3104         and suppressing all the layering violations so they do not cause build problems.
3105
3106         First the libtool libraries that the WebCore layer (as required by the WebKitPluginProcess) depends on
3107         are specified. These are then used as dependencies for the archive creation rule as well as the list
3108         from which the archive file paths are constructed and then used to dump the member files from these archives.
3109         The member files are then added to the big archive. The latter is added to the list of libraries the
3110         WebKitPluginProcess requires to successfully link.
3111
3112         * GNUmakefile.am:
3113
3114 2013-05-13  Zalan Bujtas  <zalan@apple.com>
3115
3116         WebProcess consuming very high CPU on linkedin.com
3117         https://bugs.webkit.org/show_bug.cgi?id=115601
3118
3119         Reviewed by Andreas Kling.
3120
3121         Disable WEB_TIMING_MINIMAL.
3122         Turn off window.performance and performance.now(). Some JS frameworks expect
3123         additional Web Timing APIs, when performance.now() is available.
3124
3125         * Configurations/FeatureDefines.xcconfig:
3126
3127 2013-05-12  Anders Carlsson  <andersca@apple.com>
3128
3129         Stop including UnusedParam.h
3130         https://bugs.webkit.org/show_bug.cgi?id=116003
3131
3132         Reviewed by Sam Weinig.
3133
3134         UnusedParam.h is empty now so there's no need to include it anymore.
3135
3136         * UIProcess/API/C/WKContext.cpp:
3137         * UIProcess/API/C/WKInspector.cpp:
3138         * UIProcess/API/C/WKPage.cpp:
3139         * UIProcess/API/efl/ewk_text_checker.cpp:
3140         * UIProcess/API/efl/ewk_view.cpp:
3141         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
3142         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
3143         * UIProcess/mac/WKFullScreenWindowController.mm:
3144         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3145         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
3146
3147 2013-05-12  Andreas Kling  <akling@apple.com>
3148
3149         Unload event listeners should prevent Safari from insta-killing the web process on last tab close.
3150         <http://webkit.org/b/115988>
3151         <rdar://problem/13870943>
3152
3153         Reviewed by Anders Carlsson.
3154
3155         Let WebCore control the UI process's suppression of the sudden termination mechanism.
3156         This is implemented by having WebChromeClient push Enable/DisableSuddenTermination messages
3157         over to the UI process where the appropriate NSProcessInfo calls are made.
3158
3159         We also use this information when deciding whether to insta-kill a web process when its last
3160         page is closed. This mechanism is re-usable in WebCore to protect against sudden termination
3161         by the UI process.
3162
3163         * UIProcess/WebProcessProxy.cpp:
3164         (WebKit::WebProcessProxy::WebProcessProxy):
3165         (WebKit::WebProcessProxy::removeWebPage):
3166         (WebKit::WebProcessProxy::enableSuddenTermination):
3167         (WebKit::WebProcessProxy::disableSuddenTermination):
3168         * UIProcess/WebProcessProxy.h:
3169         (WebProcessProxy):
3170         * UIProcess/WebProcessProxy.messages.in:
3171         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3172         (WebKit::WebChromeClient::enableSuddenTermination):
3173         (WebKit::WebChromeClient::disableSuddenTermination):
3174         * WebProcess/WebCoreSupport/WebChromeClient.h:
3175         (WebChromeClient):
3176
3177 2013-05-12  Alexey Proskuryakov  <ap@apple.com>
3178
3179         <rdar://problem/13402976> Sandbox violations in com.nvidia.OpenGL on Lion.
3180
3181         Reviewed by Dan Bernstein.
3182
3183         * WebProcess/com.apple.WebProcess.sb.in: Silence the violations (on Lion only).
3184
3185 2013-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3186
3187         [GTK] Remove unnecessary GTK_CHECK_VERSION #ifdefs
3188         https://bugs.webkit.org/show_bug.cgi?id=115914
3189
3190         Reviewed by Martin Robinson.
3191
3192         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3193         (webkitWebViewBaseRealize):
3194
3195 2013-05-12  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
3196
3197         Unreviewed build fix after r149944.
3198
3199         * Platform/CoreIPC/ArgumentEncoder.cpp: Include <sys/mman.h> for mmap(2).
3200
3201 2013-05-11  Anders Carlsson  <andersca@apple.com>
3202
3203         Don't pass malloced pointers as out-of-line data when sending Mach messages
3204         https://bugs.webkit.org/show_bug.cgi?id=115970
3205         <rdar://problem/13144680>
3206
3207         Reviewed by Sam Weinig.
3208
3209         Give ArgumentEncoder an inline buffer of 512 bytes. If we need more than that, use mmap to allocate data
3210         since that gives us fresh zero-filled memory that we can safely share.
3211
3212         * Platform/CoreIPC/ArgumentEncoder.cpp:
3213         (CoreIPC::ArgumentEncoder::ArgumentEncoder):
3214         Set up the buffer pointers to point to the inline buffer.
3215
3216         (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
3217         Unmap the buffer if necessary.
3218
3219         (CoreIPC::ArgumentEncoder::grow):
3220         Grow the allocation exponentially, rounded up to the nearest page. This is a simplification from the
3221         current strategy, but most messages are either tiny in which case they will fit inside the inline buffer,
3222         or big in which case we'll end up doing less allocations + memory copying.
3223
3224         * Platform/CoreIPC/ArgumentEncoder.h:
3225         (ArgumentEncoder):
3226
3227 2013-05-11  Zan Dobersek  <zdobersek@igalia.com>
3228
3229         Unreviewed GTK build fix after r149904.
3230
3231         * GNUmakefile.list.am: Adding missing build targets.
3232
3233 2013-05-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3234
3235         Unreviewed, Fix WK2 EFL build after r149904.
3236
3237         Add new PluginInformation.cpp file to CMake.
3238
3239         * CMakeLists.txt:
3240
3241 2013-05-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3242
3243         Unreviewed, fix WK2 EFL build after r149904.
3244
3245         Add new WKPluginInformation.cpp file to CMake.
3246
3247         * CMakeLists.txt:
3248
3249 2013-05-11  Andreas Kling  <akling@apple.com>
3250
3251         When possible, terminate web processes immediately when closing their last page.
3252         <http://webkit.org/b/115964>
3253         <rdar://problem/13869266>
3254
3255         Reviewed by Geoffrey Garen.
3256
3257         When we're using a network process, there's no need for the UI process to wait for web processes
3258         to clear resource caches and terminate nicely.
3259
3260         We can just kill them off right away in WebProcessProxy::removeWebPage() when the last page is closed.
3261
3262         * UIProcess/WebProcessProxy.cpp:
3263         (WebKit::WebProcessProxy::removeWebPage):
3264
3265             Terminate the child process immediately if possible.
3266
3267         * UIProcess/WebProcessProxy.h:
3268         (WebKit::WebProcessProxy::canTerminateChildProcess):
3269         (WebKit::WebProcessProxy::shouldTerminate):
3270
3271             Broke out the logic from the shouldTerminate() IPC message handler into a separate function
3272             so we can call it from removeWebPage().
3273
3274 2013-05-11  Anders Carlsson  <andersca@apple.com>
3275
3276         Crash when terminating a process that has not been fully launched
3277         https://bugs.webkit.org/show_bug.cgi?id=115962
3278         <rdar://problem/13660916>
3279
3280         Reviewed by Andreas Kling.
3281
3282         Handle terminating a process that has not been fully launched.
3283
3284         * UIProcess/Launcher/ProcessLauncher.cpp:
3285         (WebKit::ProcessLauncher::didFinishLaunchingProcess):
3286         If we have been invalidated, dispose the connection identifier.
3287
3288         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3289         (WebKit::ProcessLauncher::terminateProcess):
3290         If we're still launching the process, invalidate so the client won't get an unexpected
3291         didFinishLaunching callback.
3292
3293         * UIProcess/WebProcessProxy.cpp:
3294         (WebKit::WebProcessProxy::requestTermination):
3295         Check if webConnection() is null before calling it. (It will be null if the process isn't fully launched).
3296
3297 2013-05-10  Brian J. Burg  <burg@cs.washington.edu>
3298
3299         Web Inspector: Implement WK2 version of WebInspectorFrontendClient::save
3300         https://bugs.webkit.org/show_bug.cgi?id=115564
3301
3302         Reviewed by Benjamin Poulain.
3303
3304         Implement InspectorFrontendHost's save() and append() methods for
3305         Mac WebKit2. Add canSave() for all ports.
3306
3307         * UIProcess/WebInspectorProxy.cpp:
3308         (WebKit::WebInspectorProxy::save):
3309         (WebKit):
3310         (WebKit::WebInspectorProxy::append):
3311         * UIProcess/WebInspectorProxy.h:
3312         (WebInspectorProxy):
3313         * UIProcess/WebInspectorProxy.messages.in:
3314         * UIProcess/efl/WebInspectorProxyEfl.cpp:
3315         (WebKit::WebInspectorProxy::platformSave):
3316         (WebKit):
3317         (WebKit::WebInspectorProxy::platformAppend):
3318         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3319         (WebKit::WebInspectorProxy::platformSave):
3320         (WebKit):
3321         (WebKit::WebInspectorProxy::platformAppend):
3322         * UIProcess/mac/WebInspectorProxyMac.mm:
3323         (WebKit::WebInspectorProxy::platformSave):
3324         (WebKit):
3325         (WebKit::WebInspectorProxy::platformAppend):
3326         * UIProcess/qt/WebInspectorProxyQt.cpp:
3327         (WebKit::WebInspectorProxy::platformSave):
3328         (WebKit):
3329         (WebKit::WebInspectorProxy::platformAppend):
3330         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3331         (WebKit::WebInspectorFrontendClient::canSave):
3332         (WebKit):
3333         (WebKit::WebInspectorFrontendClient::save):
3334         (WebKit::WebInspectorFrontendClient::append):
3335         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
3336         (WebInspectorFrontendClient):
3337         * WebProcess/WebPage/WebInspector.cpp:
3338         (WebKit::WebInspector::save):
3339         (WebKit):
3340         (WebKit::WebInspector::append):
3341         (WebKit::WebInspector::didSave):
3342         (WebKit::WebInspector::didAppend):
3343         * WebProcess/WebPage/WebInspector.h:
3344         (WebInspector):
3345         * WebProcess/WebPage/WebInspector.messages.in:
3346         * WebProcess/WebPage/efl/WebInspectorEfl.cpp:
3347         (WebKit::WebInspector::canSave):
3348         (WebKit):
3349         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
3350         (WebKit::WebInspector::canSave):
3351         (WebKit):
3352         * WebProcess/WebPage/mac/WebInspectorMac.mm:
3353         (WebKit::WebInspector::canSave):
3354         (WebKit):
3355         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
3356         (WebKit::WebInspector::canSave):
3357         (WebKit):
3358
3359 2013-05-10  Remy Demarest  <rdemarest@apple.com>
3360
3361         Copy WKPluginInformation.h header to the WebKit2 Framework private headers.
3362         https://bugs.webkit.org/show_bug.cgi?id=115940
3363
3364         Reviewed by Darin Adler.
3365
3366         * WebKit2.xcodeproj/project.pbxproj:
3367         Move WKPluginInformation.h file from the framework's Project Headers to
3368         Private Headers.
3369
3370 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3371
3372         [Qt][Mac] Unreviewed. Roll out the fix attempt in r149912.
3373
3374         * Target.pri:
3375
3376 2013-05-10  Simon Cooper  <scooper@apple.com>
3377
3378         Fix AppleConnect issues for WiFi interfaces
3379         <rdar://problem/13776227&13776240&13776281>
3380         https://bugs.webkit.org/show_bug.cgi?id=115932
3381
3382         Reviewed by Alexey Proskuryakov.
3383
3384         Add support for WiFi interfaces for the AppleConnect plugin.
3385         Remove the FIXME.
3386
3387         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
3388
3389 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3390
3391         [Qt][Mac] Unreviewed speculative build fix after r149904.
3392
3393         * Target.pri:
3394
3395 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3396
3397         [Qt] Unreviewed buildfix after r149904.
3398
3399         * Target.pri:
3400
3401 2013-05-09  Sam Weinig  <sam@webkit.org>
3402
3403         Unify plug-in information dictionaries
3404         <rdar://problem/13852080>
3405         https://bugs.webkit.org/show_bug.cgi?id=115891
3406
3407         Reviewed by Anders Carlsson.
3408
3409         This unifies the plug-in information dictionaries vended by WKContextCopyPlugInInfoForBundleIdentifier
3410         and WKContextGetInfoForInstalledPlugIns with those from the WKPageLoaderClient and WKPageUIClient.
3411
3412         All the old keys will continue to work, but have been deprecated in favor of new keys defined in 
3413         WKPluginInformation.h
3414
3415         * Shared/API/c/WKPluginInformation.cpp: Added.
3416         * Shared/API/c/WKPluginInformation.h: Added.
3417         Export new keys as SPI.
3418
3419         * Shared/Plugins/Netscape/PluginInformation.h: Added.
3420         * Shared/Plugins/Netscape/PluginInformation.cpp: Added.
3421         (WebKit::pluginInformationBundleIdentifierKey):
3422         (WebKit::pluginInformationBundleVersionKey):
3423         (WebKit::pluginInformationPathKey):
3424         (WebKit::pluginInformationDisplayNameKey):
3425         (WebKit::pluginInformationDefaultLoadPolicyKey):
3426         (WebKit::pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
3427         (WebKit::pluginInformationHasSandboxProfileKey):
3428         (WebKit::pluginInformationFrameURLKey):
3429         (WebKit::pluginInformationMIMETypeKey):
3430         (WebKit::pluginInformationPageURLKey):
3431         (WebKit::pluginInformationPluginspageAttributeURLKey):
3432         (WebKit::pluginInformationPluginURLKey):
3433         Add new keys.
3434
3435         (WebKit::pluginModuleInformation):
3436         (WebKit::createPluginInformationDictionary):
3437         Add creation functions to simplify multiple sites.
3438
3439         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm: Added.
3440         (WebKit::platformPluginModuleInformation):
3441         Add platform specific data to the dictionary.
3442
3443         * UIProcess/API/C/WKPage.cpp:
3444         (WKPageGetPluginInformationBundleIdentifierKey):
3445         (WKPageGetPluginInformationBundleVersionKey):
3446         (WKPageGetPluginInformationDisplayNameKey):
3447         (WKPageGetPluginInformationFrameURLKey):
3448         (WKPageGetPluginInformationMIMETypeKey):
3449         (WKPageGetPluginInformationPageURLKey):
3450         (WKPageGetPluginInformationPluginspageAttributeURLKey):
3451         (WKPageGetPluginInformationPluginURLKey):
3452         * UIProcess/API/C/WKPage.h:
3453         Deprecate the old keys.
3454
3455         * UIProcess/API/C/mac/WKContextPrivateMac.h:
3456         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3457         (WKContextCopyPlugInInfoForBundleIdentifier):
3458         (WKContextGetInfoForInstalledPlugIns):
3459         Simplify by using the new createPluginInformationDictionary functions.
3460
3461         (WKPlugInInfoPathKey):
3462         (WKPlugInInfoBundleIdentifierKey):
3463         (WKPlugInInfoVersionKey):
3464         (WKPlugInInfoLoadPolicyKey):
3465         (WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey):
3466         (WKPlugInInfoIsSandboxedKey):
3467         Deprecate the old keys.
3468
3469         * UIProcess/WebLoaderClient.cpp:
3470         (WebKit::WebLoaderClient::didFailToInitializePlugin):
3471         (WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
3472         (WebKit::WebLoaderClient::pluginLoadPolicy):
3473         * UIProcess/WebLoaderClient.h:
3474         * UIProcess/WebUIClient.cpp:
3475         (WebKit::WebUIClient::unavailablePluginButtonClicked):
3476         * UIProcess/WebUIClient.h:
3477         Optimize for the most recent callback type which takes a dictionary,
3478         and pull out the necessary bits from it for deprecated callbacks as necessary.
3479
3480         * UIProcess/WebPageProxy.h:
3481         * UIProcess/WebPageProxy.cpp:
3482         (WebKit::WebPageProxy::findPlugin):
3483         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
3484         (WebKit::WebPageProxy::didFailToInitializePlugin):
3485         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
3486         Use createPluginInformationDictionary() consistently, to get consistent results for callbacks.
3487
3488         * WebKit2.xcodeproj/project.pbxproj:
3489         Add new files.
3490
3491 2013-05-10  Brian J. Burg  <burg@cs.washington.edu>
3492
3493         Web Inspector: implement runOpenPanel callback for WebKit2 inspector
3494         https://bugs.webkit.org/show_bug.cgi?id=115865
3495
3496         Reviewed by Sam Weinig.
3497
3498         * UIProcess/WebInspectorProxy.h:
3499         (WebKit::WebInspectorProxy::inspectorWindow):
3500         Add an accessor for m_inspectorWindow.
3501
3502         * UIProcess/mac/WebInspectorProxyMac.mm:
3503         (WebKit::runOpenPanel):
3504         Show the open panel dialog when requested.
3505
3506         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3507         Register the callback when the inspector page is created.
3508
3509 2013-05-10  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3510
3511         [WK2][CoordinatedGraphics] WKViewSetThemePath is EFL specific
3512         https://bugs.webkit.org/show_bug.cgi?id=115928
3513
3514         Reviewed by Kenneth Rohde Christiansen.
3515
3516         WKViewSetThemePath was moved to WKViewEfl.h since it is EFL specific.
3517
3518         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
3519         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
3520         * UIProcess/API/C/efl/WKViewEfl.cpp:
3521         (WKViewSetThemePath):
3522         * UIProcess/API/C/efl/WKViewEfl.h:
3523         * UIProcess/CoordinatedGraphics/WebView.cpp:
3524         * UIProcess/CoordinatedGraphics/WebView.h:
3525         (WebView):
3526         * UIProcess/efl/ViewClientEfl.cpp:
3527         * UIProcess/efl/WebInspectorProxyEfl.cpp:
3528         * UIProcess/efl/WebViewEfl.cpp:
3529         (WebKit::WebViewEfl::setThemePath):
3530         * UIProcess/efl/WebViewEfl.h:
3531         (WebViewEfl):
3532
3533 2013-05-10  Jer Noble  <jer.noble@apple.com>
3534
3535         REGRESSION (r149439): Video turns blank upon entering full screen for the first time
3536         https://bugs.webkit.org/show_bug.cgi?id=115617
3537
3538         Reviewed by Eric Carlson.
3539
3540         Partially revert the change introduced in r149439 for OS X 10.8 and previous. On these
3541         platforms, create a window with a NSZeroSize initial frame, which fixes the "blank"
3542         first-full screen behavior.
3543
3544         * UIProcess/API/mac/WKView.mm:
3545         (-[WKView createFullScreenWindow]):
3546
3547 2013-05-10  Zan Dobersek  <zdobersek@igalia.com>
3548
3549         [WK2] Make the WebSoupRequestManager a supplement to the WebProcess
3550         https://bugs.webkit.org/show_bug.cgi?id=115717
3551
3552         Reviewed by Andreas Kling.
3553
3554         WebSoupRequestManager should inherit from WebProcessSupplement and should be used as such
3555         by the WebProcess. This removes the need for the m_soupRequestManager member variable in
3556         the WebProcess class and brings the WebSoupRequestManager in line with other manager classes
3557         of which instances are controlled by the WebProcess class.
3558
3559         * WebProcess/WebProcess.cpp:
3560         (WebKit::WebProcess::WebProcess): Add  the WebSoupRequestManager as a supplement.
3561         * WebProcess/WebProcess.h:
3562         (WebProcess): Remove the m_soupRequestManager member variable and its getter method.
3563         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
3564         (webkitSoupRequestGenericSendAsync): Access the WebSoupRequestManager as a supplement.
3565         (webkitSoupRequestGenericSendFinish): Ditto.
3566         * WebProcess/soup/WebProcessSoup.cpp:
3567         (WebKit::WebProcess::platformInitializeWebProcess): Access the WebSoupRequestManager as a supplement.
3568         * WebProcess/soup/WebSoupRequestManager.cpp:
3569         (WebKit::WebSoupRequestManager::supplementName): Specify the supplement's name.
3570         * WebProcess/soup/WebSoupRequestManager.h:
3571         (WebSoupRequestManager): Inherit from the WebProcessSupplement interface.
3572
3573 2013-05-10  Carlos Garcia Campos  <cgarcia@igalia.com>
3574
3575         [GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
3576         https://bugs.webkit.org/show_bug.cgi?id=115904
3577
3578         Reviewed by Martin Robinson.
3579
3580         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
3581         (startTestServerMonitor):
3582         * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:
3583         (startTestServerMonitor):
3584
3585 2013-05-09  Anders Carlsson  <andersca@apple.com>
3586
3587         Fix build.
3588
3589         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
3590
3591 2013-05-09  Anders Carlsson  <andersca@apple.com>
3592
3593         Enable UI process storage
3594         https://bugs.webkit.org/show_bug.cgi?id=115879
3595         <rdar://problem/12239765>
3596
3597         Reviewed by Beth Dakin.
3598
3599         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3600         Flip the switch.
3601
3602 2013-05-09  Anders Carlsson  <andersca@apple.com>
3603
3604         Remove extra spaces between right angle brackets in template declarations
3605         https://bugs.webkit.org/show_bug.cgi?id=115877
3606
3607         Reviewed by Beth Dakin.
3608
3609         C++11 doesn't require spaces between right angle brackets so remove all of them.
3610
3611         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
3612         (WebKit::NetworkBlobRegistry::registerBlobURL):
3613         (WebKit::NetworkBlobRegistry::sandboxExtensions):
3614         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
3615         (NetworkBlobRegistry):
3616         * NetworkProcess/HostRecord.h:
3617         (HostRecord):
3618         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3619         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
3620         (WebKit::NetworkConnectionToWebProcess::didClose):
3621         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
3622         * NetworkProcess/NetworkConnectionToWebProcess.h:
3623         (NetworkConnectionToWebProcess):
3624         * NetworkProcess/NetworkProcess.h:
3625         (NetworkProcess):
3626         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
3627         (WebKit::NetworkResourceLoadScheduler::servePendingRequests):
3628         (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
3629         * NetworkProcess/NetworkResourceLoadScheduler.h:
3630         * NetworkProcess/SchedulableLoader.cpp:
3631         (WebKit::SchedulableLoader::SchedulableLoader):
3632         * NetworkProcess/SchedulableLoader.h:
3633         (SchedulableLoader):
3634         * Platform/CoreIPC/ArgumentCoders.h:
3635         * Platform/CoreIPC/Connection.cpp:
3636         (Connection::SyncMessageState):
3637         (CoreIPC::Connection::waitForMessage):
3638         (CoreIPC::Connection::processIncomingMessage):
3639         * Platform/CoreIPC/Connection.h:
3640         (Connection):
3641         * Platform/WorkQueue.h:
3642         (WorkQueue):
3643         * PluginProcess/PluginProcess.h:
3644         (PluginProcess):
3645         * Scripts/webkit2/messages_unittest.py:
3646         (CoreIPC):
3647         * Shared/BlockingResponseMap.h:
3648         (BlockingResponseMap):
3649         * Shared/ChildProcessProxy.h:
3650         (ChildProcessProxy):
3651         * Shared/ImmutableArray.cpp:
3652         (WebKit::ImmutableArray::ImmutableArray):
3653         * Shared/ImmutableArray.h:
3654         (WebKit::ImmutableArray::adopt):
3655         (ImmutableArray):
3656         * Shared/ImmutableDictionary.cpp:
3657         (WebKit::ImmutableDictionary::keys):
3658         * Shared/ImmutableDictionary.h:
3659         (ImmutableDictionary):
3660         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
3661         (CustomProtocolManager):
3662         * Shared/SecurityOriginData.cpp:
3663         (WebKit::performAPICallbackWithSecurityOriginDataVector):
3664         * Shared/SessionState.cpp:
3665         * Shared/StatisticsData.h:
3666         (StatisticsData):
3667         * Shared/UserMessageCoders.h:
3668         (WebKit::UserMessageDecoder::baseDecode):
3669         * Shared/WebArchive.cpp:
3670         (WebKit::WebArchive::WebArchive):
3671         (WebKit::WebArchive::subresources):
3672         (WebKit::WebArchive::subframeArchives):
3673         * Shared/WebContextMenuItem.cpp:
3674         (WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
3675         * Shared/WebOpenPanelParameters.cpp:
3676         (WebKit::WebOpenPanelParameters::acceptMIMETypes):
3677         (WebKit::WebOpenPanelParameters::selectedFileNames):
3678         * Shared/mac/ArgumentCodersMac.mm:
3679         (CoreIPC::encode):
3680         * SharedWorkerProcess/SharedWorkerProcess.h:
3681         (SharedWorkerProcess):
3682         * UIProcess/API/mac/WKPrintingView.h:
3683         (WebFrameProxy):
3684         * UIProcess/API/mac/WKPrintingView.mm:
3685         (-[WKPrintingView _drawPreview:]):
3686         * UIProcess/API/mac/WKView.mm:
3687         (WebKit):
3688         * UIProcess/Downloads/DownloadProxyMap.cpp:
3689         (WebKit::DownloadProxyMap::processDidClose):
3690         * UIProcess/Downloads/DownloadProxyMap.h:
3691         (DownloadProxyMap):
3692         * UIProcess/GeolocationPermissionRequestManagerProxy.h:
3693         (GeolocationPermissionRequestManagerProxy):
3694         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
3695         (DynamicLinkerEnvironmentExtractor):
3696         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
3697         (CustomProtocolManagerProxy):
3698         * UIProcess/Network/NetworkProcessProxy.h:
3699         (NetworkProcessProxy):
3700         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h:
3701         (NotificationPermissionRequestManagerProxy):
3702         * UIProcess/Notifications/WebNotificationManagerProxy.h:
3703         (WebNotificationManagerProxy):
3704         * UIProcess/Plugins/PluginProcessManager.h:
3705         (PluginProcessManager):
3706         * UIProcess/Plugins/PluginProcessProxy.h:
3707         (PluginProcessProxy):
3708         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
3709         (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
3710         * UIProcess/Plugins/WebPluginSiteDataManager.h:
3711         (WebPluginSiteDataManager):
3712         * UIProcess/SharedWorkers/SharedWorkerProcessManager.h:
3713         (SharedWorkerProcessManager):
3714         * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h:
3715         (SharedWorkerProcessProxy):
3716         * UIProcess/StatisticsRequest.cpp:
3717         (WebKit::StatisticsRequest::completedRequest):
3718         * UIProcess/Storage/StorageManager.cpp:
3719         (StorageManager::StorageArea):
3720         (WebKit::StorageManager::StorageArea::dispatchEvents):
3721         (StorageManager::SessionStorageNamespace):
3722         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
3723         (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
3724         (WebKit::StorageManager::createLocalStorageMap):
3725         (WebKit::StorageManager::createSessionStorageMap):
3726         (WebKit::StorageManager::destroyStorageMap):
3727         (WebKit::StorageManager::invalidateConnectionInternal):
3728         (WebKit::StorageManager::findStorageArea):
3729         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
3730         * UIProcess/Storage/StorageManager.h:
3731         (StorageManager):
3732         * UIProcess/WebApplicationCacheManagerProxy.h:
3733         (WebApplicationCacheManagerProxy):
3734         * UIProcess/WebBackForwardList.cpp:
3735         (WebKit::WebBackForwardList::addItem):
3736         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
3737         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
3738         (WebKit::WebBackForwardList::clear):
3739         * UIProcess/WebBackForwardList.h:
3740         (WebKit):
3741         * UIProcess/WebContext.cpp:
3742         (WebKit::WebContext::createNewWebProcess):
3743         (WebKit::WebContext::enableProcessTermination):
3744         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
3745         * UIProcess/WebContext.h:
3746         (WebContext):
3747         * UIProcess/WebCookieManagerProxy.cpp:
3748         (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
3749         * UIProcess/WebCookieManagerProxy.h:
3750         (WebCookieManagerProxy):
3751         * UIProcess/WebDatabaseManagerProxy.cpp:
3752         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
3753         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
3754         * UIProcess/WebDatabaseManagerProxy.h:
3755         (WebDatabaseManagerProxy):
3756         * UIProcess/WebFormClient.cpp:
3757         (WebKit::WebFormClient::willSubmitForm):
3758         * UIProcess/WebFormClient.h:
3759         (WebFormClient):
3760         * UIProcess/WebKeyValueStorageManagerProxy.h:
3761         (WebKeyValueStorageManagerProxy):
3762         * UIProcess/WebLoaderClient.cpp:
3763         (WebKit::WebLoaderClient::didChangeBackForwardList):
3764         * UIProcess/WebLoaderClient.h:
3765         (WebLoaderClient):
3766         * UIProcess/WebMediaCacheManagerProxy.cpp:
3767         (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
3768         * UIProcess/WebMediaCacheManagerProxy.h:
3769         (WebMediaCacheManagerProxy):
3770         * UIProcess/WebPageContextMenuClient.cpp:
3771         (WebKit::WebPageContextMenuClient::showContextMenu):
3772         * UIProcess/WebPageProxy.cpp:
3773         (ExceededDatabaseQuotaRecords):
3774         (WebKit::WebPageProxy::relatedPages):
3775         (WebKit::WebPageProxy::didChangeBackForwardList):
3776         (WebKit::WebPageProxy::handleWheelEvent):
3777         (WebKit::WebPageProxy::processNextQueuedWheelEvent):
3778         (WebKit::WebPageProxy::findStringMatches):
3779         (WebKit::WebPageProxy::willSubmitForm):
3780         (WebKit::WebPageProxy::pluginInformationDictionary):
3781         (WebKit::WebPageProxy::didFindStringMatches):
3782         (WebKit::WebPageProxy::didReceiveEvent):
3783         * UIProcess/WebPageProxy.h:
3784         (WebPageProxy):
3785         * UIProcess/WebPageProxy.messages.in:
3786         * UIProcess/WebProcessProxy.cpp:
3787         (WebKit::WebProcessProxy::disconnect):
3788         (WebKit::WebProcessProxy::didClose):
3789         (WebKit::WebProcessProxy::didBecomeUnresponsive):
3790         (WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive):
3791         (WebKit::WebProcessProxy::didBecomeResponsive):
3792         (WebKit::WebProcessProxy::disconnectFramesFromPage):
3793         (WebKit::WebProcessProxy::frameCountInPage):
3794         * UIProcess/WebProcessProxy.h:
3795         (WebProcessProxy):
3796         * UIProcess/WebResourceCacheManagerProxy.h:
3797         (WebResourceCacheManagerProxy):
3798         * UIProcess/mac/WebContextMenuProxyMac.mm:
3799         (WebKit::populateNSMenu):
3800         (WebKit::nsMenuItemVector):
3801         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
3802         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
3803         * WebProcess/Geolocation/WebGeolocationManager.cpp:
3804         (WebKit::WebGeolocationManager::didChangePosition):
3805         (WebKit::WebGeolocationManager::didFailToDeterminePosition):
3806         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
3807         (WebIconDatabaseProxy):
3808         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
3809         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3810         (WebKit::InjectedBundle::originsWithApplicationCache):
3811         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
3812         (WebKit::InjectedBundleBackForwardListItem::children):
3813         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
3814         (WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange):
3815         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
3816         (InjectedBundlePageEditorClient):
3817         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
3818         (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
3819         (WebKit::InjectedBundlePageFormClient::willSubmitForm):
3820         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
3821         (InjectedBundlePageFormClient):
3822         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3823         (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
3824         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3825         (WebKit::WebResourceLoadScheduler::internallyFailedLoadTimerFired):
3826         (WebKit::WebResourceLoadScheduler::networkProcessCrashed):
3827         * WebProcess/Network/WebResourceLoadScheduler.h:
3828         (WebResourceLoadScheduler):
3829         * WebProcess/Notifications/NotificationPermissionRequestManager.h:
3830         (NotificationPermissionRequestManager):
3831         * WebProcess/Notifications/WebNotificationManager.h:
3832         (WebNotificationManager):
3833         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
3834         (WebKit::NPRuntimeObjectMap::invalidate):
3835         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
3836         (NPRuntimeObjectMap):
3837         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3838         (WebKit::NetscapePlugin::stopAllStreams):
3839         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3840         (NetscapePlugin):
3841         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
3842         (NetscapePluginStream):
3843         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
3844         (getAllScriptsInPDFDocument):
3845         (WebKit::SimplePDFPlugin::runScriptsInPDFDocument):
3846         * WebProcess/Plugins/PluginProcessConnectionManager.h:
3847         (PluginProcessConnectionManager):
3848         * WebProcess/Plugins/PluginView.cpp:
3849         (WebKit::PluginView::cancelAllStreams):
3850         * WebProcess/Plugins/PluginView.h:
3851         (PluginView):
3852         * WebProcess/Storage/StorageAreaMap.cpp:
3853         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
3854         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
3855         * WebProcess/Storage/StorageNamespaceImpl.cpp:
3856         (WebKit::StorageNamespaceImpl::storageArea):
3857         * WebProcess/Storage/StorageNamespaceImpl.h:
3858         (StorageNamespaceImpl):
3859         * WebProcess/Storage/WebKeyValueStorageManager.cpp:
3860         (WebKit::keyValueStorageOriginIdentifiers):
3861         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
3862         (WebKit::WebDatabaseManager::getDatabasesByOrigin):
3863         (WebKit::WebDatabaseManager::getDatabaseOrigins):
3864         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3865         (WebKit::WebEditorClient::getClientPasteboardDataForRange):
3866         * WebProcess/WebCoreSupport/WebEditorClient.h:
3867         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3868         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
3869         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3870         (WebKit::WebEditorClient::documentFragmentFromAttributedString):
3871         * WebProcess/WebPage/EventDispatcher.h:
3872         (EventDispatcher):
3873         * WebProcess/WebPage/FindController.cpp:
3874         (WebKit::FindController::findStringMatches):
3875         * WebProcess/WebPage/FindController.h:
3876         (FindController):
3877         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3878         (WebKit):
3879         * WebProcess/WebPage/WebFrame.cpp:
3880         (WebKit::WebFrame::childFrames):
3881         * WebProcess/WebPage/WebPage.cpp:
3882         (WebKit::WebPage::trackedRepaintRects):
3883         * WebProcess/WebPage/WebPage.h:
3884         (WebKit):
3885         (WebPage):
3886         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
3887         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3888         (TiledCoreAnimationDrawingArea):
3889         * WebProcess/WebProcess.cpp:
3890         (WebKit::WebProcess::visitedLinkStateChanged):
3891         (WebKit::WebProcess::allVisitedLinkStateChanged):
3892         (WebKit::WebProcess::focusedWebPage):
3893         (WebKit::WebProcess::createWebPage):
3894         (WebKit::WebProcess::didClose):
3895         (WebKit::WebProcess::webPageGroup):
3896         (WebKit::addCaseFoldedCharacters):
3897         (WebKit::getWebCoreMemoryCacheStatistics):
3898         (WebKit::WebProcess::setTextCheckerState):
3899         * WebProcess/WebProcess.h:
3900         (WebProcess):
3901
3902 2013-05-09  Anders Carlsson  <andersca@apple.com>
3903
3904         Implement WebPlatformStrategies::transientLocalStorageNamespace
3905         https://bugs.webkit.org/show_bug.cgi?id=115876
3906         <rdar://problem/13852871>
3907
3908         Reviewed by Beth Dakin.
3909
3910         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3911         (WebKit::WebPlatformStrategies::transientLocalStorageNamespace):
3912         Return a session storage namespace for a random page when UI process storage is enabled,
3913         otherwise call the base class implementation.
3914
3915 2013-05-09  Anders Carlsson  <andersca@apple.com>
3916
3917         Use explicit qualifiers for names in the std:: namespace
3918         https://bugs.webkit.org/show_bug.cgi?id=115868
3919
3920         Reviewed by Andreas Kling.
3921
3922         * Shared/mac/ArgumentCodersMac.mm:
3923         (CoreIPC::encode):
3924         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
3925         (WKPluginSiteDataManagerClearAllSiteData):
3926         * UIProcess/Plugins/PluginInfoStore.cpp:
3927         (WebKit::PluginInfoStore::findPluginForExtension):
3928         * UIProcess/WebFrameProxy.cpp:
3929         * UIProcess/WebProcessProxy.cpp:
3930         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3931         (WebKit::parsePostBuffer):
3932         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3933         (WebKit::NetscapePlugin::loadURL):
3934         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
3935         (WebKit::NetscapePluginStream::deliverDataToPlugin):
3936         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
3937         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3938         * WebProcess/WebPage/FindController.cpp:
3939         (WebKit::FindController::countStringMatches):
3940         (WebKit::FindController::updateFindUIAfterPageScroll):
3941         * WebProcess/WebPage/WebPage.cpp:
3942         * WebProcess/WebPage/mac/WebPageMac.mm:
3943         (WebKit::drawPDFPage):
3944         * WebProcess/mac/WebProcessMac.mm:
3945
3946 2013-05-09  Max Feil  <mfeil@rim.com>
3947
3948         shouldUsePluginDocument() needs to be respected when a document is created
3949         https://bugs.webkit.org/show_bug.cgi?id=110308
3950
3951         Reviewed by Rob Buis.
3952
3953         Renaming shouldUsePluginDocument() to shouldAlwaysUsePluginDocument()
3954         for clarity.
3955
3956         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3957         (WebKit::WebFrameLoaderClient::shouldAlwaysUsePluginDocument):
3958         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3959         (WebFrameLoaderClient):
3960
3961 2013-05-09  Timothy Hatcher  <timothy@apple.com>
3962
3963         Make dragging off a tab in Safari with a docked Inspector reattach the Inspector.
3964
3965         https://webkit.org/b/115832
3966         rdar://problem/13605661
3967
3968         Reviewed by Benjamin Poulain.
3969
3970         * UIProcess/mac/WebInspectorProxyMac.mm:
3971         (WebKit::WebInspectorProxy::platformBringToFront):
3972         If the Web Inspector is no longer in the same window as the inspected view,
3973         then we need to reopen the Inspector to get it attached to the right window.
3974
3975 2013-05-08  Anders Carlsson  <andersca@apple.com>
3976
3977         Fix a typo in a comment.
3978
3979         Rubber-stamped by Darin Adler.
3980
3981         * WebProcess/WebProcess.cpp:
3982         (WebKit::WebProcess::initializeConnection):
3983
3984 2013-05-08  Anders Carlsson  <andersca@apple.com>
3985
3986         Remove bogus StorageAreaMap assertions
3987         https://bugs.webkit.org/show_bug.cgi?id=115838
3988
3989         Reviewed by Sam Weinig.
3990
3991         It is possible for didGetValues, and didClear to be called even if m_hasPendingClear is false so remove the assertions.
3992
3993         * WebProcess/Storage/StorageAreaMap.cpp:
3994         (WebKit::StorageAreaMap::didGetValues):
3995         (WebKit::StorageAreaMap::didClear):
3996
3997 2013-05-08  Anders Carlsson  <andersca@apple.com>
3998
3999         Handle incoming clear operations
4000         https://bugs.webkit.org/show_bug.cgi?id=115829
4001
4002         Reviewed by Sam Weinig.
4003
4004         Handle clear by building up a new storage map with our pending changes.
4005
4006         * WebProcess/Storage/StorageAreaMap.cpp:
4007         (WebKit::StorageAreaMap::applyChange):
4008
4009 2013-05-08  Anders Carlsson  <andersca@apple.com>
4010
4011         Don't apply changes while we're clearing the database
4012         https://bugs.webkit.org/show_bug.cgi?id=115826
4013
4014         Reviewed by Darin Adler.
4015
4016         * UIProcess/Storage/LocalStorageDatabase.cpp:
4017         (WebKit::LocalStorageDatabase::openDatabase):
4018         Only call didOpenDatabaseWithOrigin if we actually did open the database.
4019
4020         (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
4021         Create the database if needed.
4022
4023         * UIProcess/Storage/StorageManager.cpp:
4024         (WebKit::StorageManager::getValues):
4025         Send back a DidGetValues message.
4026
4027         * WebProcess/Storage/StorageAreaMap.cpp:
4028         (WebKit::StorageAreaMap::StorageAreaMap):
4029         Initialize m_hasPendingClear.
4030
4031         (WebKit::StorageAreaMap::clear):
4032         Set m_hasPendingClear to true.
4033
4034         (WebKit::StorageAreaMap::resetValues):
4035         Set m_hasPendingClear back to false.
4036
4037         (WebKit::StorageAreaMap::loadValuesIfNeeded):
4038         Set m_hasPendingClear to true so we'll ignore any changes that are already part of the returned items.
4039
4040         (WebKit::StorageAreaMap::didGetValues):
4041         Set m_hasPendingClear back to false.
4042
4043         (WebKit::StorageAreaMap::didClear):
4044         Set m_hasPendingClear back to false.
4045
4046         (WebKit::StorageAreaMap::applyChange):
4047         Don't apply the change if m_hasPendingClear is true.
4048
4049         * WebProcess/Storage/StorageAreaMap.messages.in:
4050         Add DidGetValues message.
4051
4052 2013-05-08  Andy Estes  <aestes@apple.com>
4053
4054         [WebKit2] REGRESSION (Custom Protocols): Reproducible crash when navigating to URL with an invalid scheme
4055         https://bugs.webkit.org/show_bug.cgi?id=115790
4056
4057         Reviewed by Alexey Proskuryakov.
4058
4059         NSMutableSet does not support adding or removing nil objects, and
4060         WTF::HashSet does not support adding, removing, or checking for null
4061         WTF::Strings.
4062
4063         For the NSMutableSet case, make sure that we don't try to add or remove
4064         nil NSStrings.
4065
4066         For the WTF::HashSet case, NSURL will return a nil NSString if we ask
4067         it for its scheme when it is invalid, which we will convert to a null
4068         WTF::String. Don't try to check if our HashSet of registered schemes
4069         contains a null String.
4070
4071         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
4072         (WebKit::CustomProtocolManager::registerScheme): Assert that the scheme
4073         isn't null. We reject null schemes at the WKBrowsingContextController level.
4074         (WebKit::CustomProtocolManager::unregisterScheme): Ditto.
4075         (WebKit::CustomProtocolManager::supportsScheme): If scheme is null, return false.
4076         * UIProcess/API/mac/WKBrowsingContextController.mm:
4077         (+[WKBrowsingContextController registerSchemeForCustomProtocol:]): Do not register a nil scheme.
4078         (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]): Ditto.
4079
4080 2013-05-08  Anders Carlsson  <andersca@apple.com>
4081
4082         Apply remote changes to storage maps locally
4083         https://bugs.webkit.org/show_bug.cgi?id=115825
4084
4085         Reviewed by Beth Dakin.
4086
4087         * WebProcess/Storage/StorageAreaMap.cpp:
4088         (WebKit::StorageAreaMap::resetValues):
4089         Clear the pending values map.
4090
4091         (WebKit::StorageAreaMap::didSetItem):
4092         If we failed to set the item, forget everything we know about this storage map.
4093         Otherwise, remove the pending item.
4094
4095         (WebKit::StorageAreaMap::didRemoveItem):
4096         Remove the pending item.
4097
4098         (WebKit::StorageAreaMap::shouldApplyChangeForKey):
4099         Helper function that returns whether a change for a given key should be applied.
4100
4101         (WebKit::StorageAreaMap::applyChange):
4102         Apply the change. Currently only adds and removes are handled.
4103
4104         (WebKit::StorageAreaMap::dispatchStorageEvent):
4105         Apply the change locally as well if needed.
4106
4107         * WebProcess/Storage/StorageAreaMap.h:
4108
4109 2013-05-08  Anders Carlsson  <andersca@apple.com>
4110
4111         Assert at compile time that we don't pass Objective-C object pointers to adoptCF
4112         https://bugs.webkit.org/show_bug.cgi?id=115823
4113
4114         Reviewed by Geoffrey Garen.
4115
4116         Fix adoptNS/adoptCF mismatches. For the adopt(leakRef()) case we'd ideally want a static_pointer_cast overload for RetainPtr,
4117         but this will do for now.
4118         
4119         * Shared/mac/ArgumentCodersMac.mm:
4120         (CoreIPC::decode):
4121
4122 2013-05-08  Sam Weinig  <sam@webkit.org>
4123
4124    &nbs