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