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