Another EFL build fix.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-04-16  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Another EFL build fix.
4
5         * WebProcess/WebPage/efl/WebPageEfl.cpp:
6
7 2013-04-15  Sam Weinig  <sam@webkit.org>
8
9         Remove more #includes from Frame.h
10         https://bugs.webkit.org/show_bug.cgi?id=114642
11
12         Reviewed by Anders Carlsson.
13
14         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
15         * WebProcess/Plugins/PluginView.cpp:
16         * WebProcess/WebPage/WebFrame.cpp:
17         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
18         * WebProcess/WebPage/mac/WebPageMac.mm:
19         * WebProcess/WebPage/qt/WebPageQt.cpp:
20
21 2013-04-16  Timothy Hatcher  <timothy@apple.com>
22
23         Make resizing the docked Web Inspector stay in sync with the inspected view.
24
25         https://webkit.org/b/114682
26
27         Reviewed by Joseph Pecoraro.
28
29         * UIProcess/mac/WebInspectorProxyMac.mm:
30         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
31         Disable screen updates to make sure the layers for both views resize in sync.
32
33 2013-04-15  Anders Carlsson  <andersca@apple.com>
34
35         Remove unneeded headers from ScriptExecutionContext.h
36         https://bugs.webkit.org/show_bug.cgi?id=114631
37
38         Reviewed by Alexey Proskuryakov.
39
40         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
41         * WebProcess/WebPage/PageOverlay.cpp:
42
43 2013-04-16  Maciej Stachowiak  <mjs@apple.com>
44
45         Remove even yet still more traces of v8
46         https://bugs.webkit.org/show_bug.cgi?id=114693
47
48         Reviewed by Anders Carlsson.
49
50         * Scripts/generate-forwarding-headers.pl: Remove v8 from list of platforms.
51
52 2013-04-16  Alexey Proskuryakov  <ap@apple.com>
53
54         Remove unused AlternativeTextClient::dismissDictationAlternativeUI
55         https://bugs.webkit.org/show_bug.cgi?id=114598
56
57         Reviewed by Ryosuke Niwa.
58
59         * UIProcess/API/mac/PageClientImpl.h:
60         * UIProcess/API/mac/PageClientImpl.mm:
61         (WebKit::PageClientImpl::dictationAlternatives):
62         * UIProcess/PageClient.h:
63         * UIProcess/WebPageProxy.cpp:
64         * UIProcess/WebPageProxy.h:
65         * UIProcess/WebPageProxy.messages.in:
66         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
67         * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
68
69 2013-04-16  Claudio Saavedra  <csaavedra@igalia.com>
70
71         [GTK][WK2] Add API to retrieve a snapshot from a webview
72         https://bugs.webkit.org/show_bug.cgi?id=98270
73
74         Reviewed by Anders Carlsson.
75
76         This adds the GTK+ API necessary to retrieve a snapshot from a
77         webview asynchronously. The API uses the injected bundle
78         internally to get the snapshot from the WebProcess.
79
80         * UIProcess/API/gtk/WebKitError.cpp:
81         (webkit_snapshot_error_quark): Add snapshot API related error
82         quark.
83         * UIProcess/API/gtk/WebKitError.h: Add snapshot error handling.
84         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
85         (didReceiveWebViewMessageFromInjectedBundle): Handle the new
86         "DidGetSnapshot" message.
87         * UIProcess/API/gtk/WebKitPrivate.h: Add SnapshotRegion enum.
88         * UIProcess/API/gtk/WebKitWebView.cpp:
89         (_WebKitWebViewPrivate): Add a map for the snapshot results.
90         (GetSnapshotAsyncData):
91         (webKitWebViewDidReceiveSnapshot):
92         (webKitSnapshotRegionToSnapshotRegion): Helper method for casting
93         the region option enumeration.
94         (generateSnapshotCallbackID): Method to generate unique callback
95         ids.
96         (webkit_web_view_get_snapshot):
97         (webkit_web_view_get_snapshot_finish): New snapshotting API.
98         * UIProcess/API/gtk/WebKitWebView.h: Ditto.
99         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Add the private method
100         to handle a received snapshot.
101         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add the new API
102         bits.
103         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
104         (cairoSurfacesEqual): Add helper to compare cairo_surface_t
105         structs.
106         (testWebViewSnapshot): New test.
107         (beforeAll): Add the new test.
108         * UIProcess/API/gtk/tests/WebViewTest.cpp:
109         (WebViewTest::selectAll): Add method to help test snapshots
110         including selection.
111         * UIProcess/API/gtk/tests/WebViewTest.h: Ditto
112         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
113         (didReceiveMessageToPage): Ditto.
114         (webkitWebExtensionCreate): Register method above.
115         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
116         (webkitWebPageDidReceiveMessage): Add this method. It
117         handles the new message "GetSnapshot".
118         * WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h:
119         Add method above.
120
121 2013-04-16  Timothy Hatcher  <timothy@apple.com>
122
123         Create full rects for the inspector and inspected views when
124         adjusting to an inspected view frame change. 
125
126         This ensures switching dock sides restores the inspected view
127         and inspector to fill the parent's bounds.
128
129         https://webkit.org/b/114666
130         rdar://problem/13660796
131
132         Reviewed by Joseph Pecoraro.
133
134         * UIProcess/mac/WebInspectorProxyMac.mm:
135         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
136
137 2013-04-16  Balazs Kelemen  <kbalazs@webkit.org>
138
139         Initialize logging channels for web processes
140         https://bugs.webkit.org/show_bug.cgi?id=114621
141
142         Reviewed by Sam Weinig.
143
144         Use InitializeWebKit2 for initializing the web and plugin processes.
145         It handles initializing the logging channels and it's better to have
146         shared core for this. For the plugin process now we always create
147         a RunLoop object which is not necessary with the -scanPlugin argument
148         but it shouldn't be a problem.
149
150         * PluginProcess/qt/PluginProcessMainQt.cpp:
151         (WebKit::PluginProcessMain):
152         * PluginProcess/unix/PluginProcessMainUnix.cpp:
153         (WebKit::PluginProcessMainUnix):
154         * WebProcess/efl/WebProcessMainEfl.cpp:
155         (WebKit::WebProcessMainEfl):
156         * WebProcess/gtk/WebProcessMainGtk.cpp:
157         (WebKit::WebProcessMainGtk):
158         * WebProcess/qt/WebProcessMainQt.cpp:
159         (WebKit::WebProcessMainQt):
160
161 2013-04-16  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
162
163         [EFL][WK2] Add an API for getting context menu item's parent menu
164         https://bugs.webkit.org/show_bug.cgi?id=107510
165
166         Reviewed by Kenneth Rohde Christiansen.
167
168         Added parent menu support and API for Ewk_Context_Menu_Item, to
169         allow selecting context menus using Elementary widgets.
170         Context menu unit test updated with new function. 
171
172         * UIProcess/API/efl/ewk_context_menu.cpp:
173         (EwkContextMenu::EwkContextMenu):
174         * UIProcess/API/efl/ewk_context_menu_item.cpp:
175         (EwkContextMenuItem::EwkContextMenuItem):
176         (ewk_context_menu_item_parent_menu_get):
177         * UIProcess/API/efl/ewk_context_menu_item.h:
178         * UIProcess/API/efl/ewk_context_menu_item_private.h:
179         (EwkContextMenuItem::create):
180         (EwkContextMenuItem::parentMenu):
181         (EwkContextMenuItem::setParentMenu):
182         (EwkContextMenuItem):
183         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
184         (showContextMenu):
185
186 2013-04-16  Andreas Kling  <akling@apple.com>
187
188         Fix release builds with !LOG_DISABLED.
189
190         * Platform/mac/Logging.mac.mm:
191
192 2013-04-16  Manuel Rego Casasnovas  <rego@igalia.com>
193
194         [GTK][EFL] Remove deprecated libsoup API usage
195         https://bugs.webkit.org/show_bug.cgi?id=104894
196
197         Reviewed by Philippe Normand.
198
199         Remove LIBSOUP_USE_UNSTABLE_REQUEST_API and only include
200         libsoup/soup.h.
201
202         * WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.h:
203         * WebProcess/efl/WebProcessMainEfl.cpp:
204         * WebProcess/gtk/WebProcessMainGtk.cpp:
205         * WebProcess/soup/WebKitSoupRequestGeneric.h:
206         * WebProcess/soup/WebProcessSoup.cpp:
207         * WebProcess/soup/WebSoupRequestManager.cpp:
208         (WebKit::WebSoupRequestManager::registerURIScheme): Remove requester and
209         use method soup_session_add_feature_by_type().
210
211 2013-04-15  Dean Jackson  <dino@apple.com>
212
213         Plugins that resize might need to be snapshotted.
214         https://bugs.webkit.org/show_bug.cgi?id=102157
215         <rdar://problem/12696259>
216
217         Reviewed by Tim Horton.
218
219         Allow a running plugin to be snapshotted. All this
220         means is that we start the snapshot timer again.
221
222         * WebProcess/Plugins/PluginView.cpp:
223         (WebKit::PluginView::beginSnapshottingRunningPlugin): Restart
224             the timer.
225         * WebProcess/Plugins/PluginView.h: Virtual method declaration.
226
227 2013-04-15  Seokju Kwon  <seokju.kwon@gmail.com>
228
229         [EFL][WK2] build fix after r148434
230         https://bugs.webkit.org/show_bug.cgi?id=114647
231
232         Reviewed by Benjamin Poulain.
233
234         * UIProcess/API/efl/EwkView.cpp:
235         (EwkView::showContextMenu):
236
237 2013-04-15  Jer Noble  <jer.noble@apple.com>
238
239         After switching to another space and back, video races to catch up with audio
240         https://bugs.webkit.org/show_bug.cgi?id=114634
241
242         Reviewed by Tim Horton.
243
244         In Mountain Lion and previous, report that a view is "not visible" when its window
245         is not in the active space. This causes us to notify AVFoundation that its CAImageQueues
246         will not be serviced and results in not having the "catch up" behavior when returning
247         to the browser's space.
248
249         * UIProcess/API/mac/PageClientImpl.mm:
250         (WebKit::PageClientImpl::isViewVisible):
251
252 2013-04-15  Seulgi Kim  <seulgikim@company100.net>
253
254         Schedule rendering at regular interval (60fps)
255         https://bugs.webkit.org/show_bug.cgi?id=114617
256
257         Reviewed by Martin Robinson.
258
259         Schedule rendering reguarly regardless of the time taken to render a
260         frame. Otherwise, next flush delayed by the amount of the rendering
261         time.
262
263         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
264         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
265         (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
266         (WebKit::LayerTreeHostGtk::flushAndRenderLayers):
267         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
268
269 2013-04-15  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
270
271         [EFL][WK2] Use C API in ewk_context_menu
272         https://bugs.webkit.org/show_bug.cgi?id=109698
273
274         Reviewed by Andreas Kling.
275
276         EFL port unlike others does not handle context menus inside WebKit but exposes an API:
277         ewk_context_menu and ewk_context_menu_item, and leaves context menu to application.
278         Currently EFL port's context menu API uses internal C++ classes, while it should use WK2 C API,
279         to avoid violating layering.
280         This patch changes EFL context menu API to use only WK2 C API.
281
282         * UIProcess/API/efl/EwkView.cpp:
283         (EwkView::showContextMenu):
284         * UIProcess/API/efl/EwkView.h:
285         (WebKit):
286         (EwkView):
287         * UIProcess/API/efl/ewk_context_menu.cpp:
288         (EwkContextMenu::EwkContextMenu):
289         (EwkContextMenu::contextMenuItemSelected):
290         (ewk_context_menu_item_select):
291         (getWKTagFromEwkAction):
292         * UIProcess/API/efl/ewk_context_menu_item.cpp:
293         (EwkContextMenuItem::EwkContextMenuItem):
294         (getEwkActionFromWKTag):
295         * UIProcess/API/efl/ewk_context_menu_item.h:
296         * UIProcess/API/efl/ewk_context_menu_item_private.h:
297         (EwkContextMenuItem::create):
298         (EwkContextMenuItem):
299         * UIProcess/API/efl/ewk_context_menu_private.h:
300         (EwkContextMenu::create):
301         (EwkContextMenu):
302         * UIProcess/efl/ContextMenuClientEfl.cpp:
303         (showContextMenu):
304         (hideContextMenu):
305         (ContextMenuClientEfl::ContextMenuClientEfl):
306         * UIProcess/efl/ContextMenuClientEfl.h:
307         (WebKit::ContextMenuClientEfl::view):
308         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
309         (WebKit::WebContextMenuProxyEfl::showContextMenu):
310         (WebKit::WebContextMenuProxyEfl::hideContextMenu):
311         * UIProcess/efl/WebContextMenuProxyEfl.h:
312         (WebContextMenuProxyEfl):
313
314 2013-04-15  Balazs Kelemen  <kbalazs@webkit.org>
315
316         [CoordGfx] Background color should not be part of GraphicsLayerState
317         https://bugs.webkit.org/show_bug.cgi?id=113785
318
319         Reviewed by Andreas Kling.
320
321         Page background is independent from layer state, send it to the UI
322         as soon as possible.
323
324         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
325         (CoreIPC::::encode):
326         (CoreIPC::::decode):
327         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
328         (WebKit::CoordinatedLayerTreeHost::setBackgroundColor):
329
330 2013-04-15  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
331
332         [WK2] Add new callbacks and a function for WebKit2 context menu API
333         https://bugs.webkit.org/show_bug.cgi?id=111552
334
335         Reviewed by Anders Carlsson.
336
337         Add contextMenuHide and contextMenuShow callbacks to WKPageContextMenuClient
338         and WKPageContextMenuSelected API so context menus can be handled outside
339         WebKit. API version of this client was bumped so older client version still
340          can be used
341
342         * Shared/APIClientTraits.cpp:
343         (WebKit):
344         * Shared/APIClientTraits.h:
345         * UIProcess/API/C/WKPage.cpp:
346         (WKPageSelectContextMenuItem):
347         * UIProcess/API/C/WKPage.h:
348         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
349         (attachContextMenuClientToView):
350         * UIProcess/WebPageContextMenuClient.cpp:
351         (WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu):
352         (WebKit::WebPageContextMenuClient::showContextMenu):
353         (WebKit):
354         (WebKit::WebPageContextMenuClient::hideContextMenu):
355         * UIProcess/WebPageContextMenuClient.h:
356         (WebPageContextMenuClient):
357         * UIProcess/WebPageProxy.cpp:
358         (WebKit::WebPageProxy::internalShowContextMenu):
359         * UIProcess/efl/ContextMenuClientEfl.cpp:
360         (ContextMenuClientEfl::ContextMenuClientEfl):
361
362 2013-04-14  Christophe Dumez  <ch.dumez@sisa.samsung.com>
363
364         [EFL][WK2] Regression(r148274): Broke rendering in the browser
365         https://bugs.webkit.org/show_bug.cgi?id=114593
366
367         Reviewed by Anders Carlsson.
368
369         r148274 added a new "didChangeViewportAttributes" callback to
370         WKView but did not hook it up in ViewClientEfl. This patch
371         fixes this and makes rendering work again in the browser.
372
373         * UIProcess/efl/ViewClientEfl.cpp:
374         (WebKit::ViewClientEfl::ViewClientEfl):
375
376 2013-04-14  Andreas Kling  <akling@apple.com>
377
378         Move CSSOM classes to using MutableStylePropertySet over StylePropertySet.
379         <http://webkit.org/b/114581>
380
381         Reviewed by Anders Carlsson.
382
383         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
384         (WebKit::WebEditorClient::shouldApplyStyle):
385
386 2013-04-14  Christophe Dumez  <ch.dumez@sisa.samsung.com>
387
388         Unreviewed build fix for WebKit2 EFL after r148373 due to missing
389         header includes.
390
391         * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp:
392         * UIProcess/efl/InputMethodContextEfl.cpp:
393
394 2013-04-13  Sam Weinig  <sam@webkit.org>
395
396         Add ObjC API for setting initialization data for the WKWebProcessPlugIn
397         https://bugs.webkit.org/show_bug.cgi?id=103846
398
399         Reviewed by Darin Adler.
400
401         * UIProcess/API/mac/WKProcessGroup.h:
402         Adds a new optional processGroupWillCreateConnectionToWebProcessPlugIn: method for the WKProcessGroupDelegate protocol,
403         which allows the user to pass (via an autoreleased return value) initialization data to the web process plugin.
404
405         * UIProcess/API/mac/WKProcessGroup.mm:
406         (getInjectedBundleInitializationUserData):
407         (setUpInectedBundleClient):
408         (-[WKProcessGroup initWithInjectedBundleURL:]):
409         (-[WKProcessGroup dealloc]):
410         Use the existing WKContextInjectedBundleClient infrastructure to pass the initialization data to the bundle
411         via the new ObjCObjectGraph APIObject.
412
413         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
414         Adds webProcessPlugIn:initializeWithObject: to the WKWebProcessPlugIn protocol, replacing webProcessPlugInInitialize:.
415
416         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
417         (WebKit::InjectedBundle::load):
418         Pass the initialization data to the web process plugin.
419
420 2013-04-13  Sam Weinig  <sam@webkit.org>
421
422         Attempt Build Fix.
423
424         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
425
426 2013-04-12  Sam Weinig  <sam@webkit.org>
427
428         Make Frame's ScriptController an OwnPtr and remove the #include
429         https://bugs.webkit.org/show_bug.cgi?id=114105
430
431         Reviewed by Dean Jackson.
432
433         * Shared/WebHitTestResult.cpp:
434         * Shared/WebHitTestResult.h:
435         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
436         * UIProcess/WebContext.h:
437         * UIProcess/WebPageProxy.h:
438         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
439         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
440         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
441         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
442         * WebProcess/Plugins/PDF/PDFPlugin.h:
443         * WebProcess/Plugins/PluginView.cpp:
444         * WebProcess/Storage/StorageAreaImpl.cpp:
445         * WebProcess/Storage/StorageAreaMap.cpp:
446         * WebProcess/WebPage/WebFrame.cpp:
447         * WebProcess/WebPage/WebPage.cpp:
448
449 2013-04-13  Zan Dobersek  <zdobersek@igalia.com>
450
451         Unreviewed GTK build fix after r148311.
452
453         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
454         (resizeWebKitWebViewBaseFromAllocation): Passing IntSize() as the scroll offset
455         argument to the DrawingAreaProxy::setSize method.
456
457 2013-04-12  Gavin Barraclough  <barraclough@apple.com>
458
459         Add private interface to WKView to asynchronously update the drawing area size
460         https://bugs.webkit.org/show_bug.cgi?id=114549
461
462         Reviewed by Simon Fraser.
463
464         This will allow a client using the WKView to resize the contents without blocking waiting for the web process to repaint.
465
466         * UIProcess/API/mac/WKView.mm:
467         (-[WKView _setDrawingAreaSize:]):
468             - if the new size of teh drawing area does not match the frame size, position it according to the contentAnchor.
469         (-[WKView updateLayer]):
470             - Don't let a subsequent frame size change block on a prior async resize.
471         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
472             - resize the drawing area asynchronously, even if frame size udpates are disabled.
473         (-[WKView waitForAsyncDrawingAreaSizeUpdate]):
474             - wait for asynchronous updates to complete.
475
476         * UIProcess/API/mac/WKViewPrivate.h:
477             - declare new methods.
478
479         * UIProcess/DrawingAreaProxy.cpp:
480         (WebKit):
481         * UIProcess/DrawingAreaProxy.h:
482         (DrawingAreaProxy):
483         (WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate):
484         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
485         (TiledCoreAnimationDrawingAreaProxy):
486         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
487         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
488             - pass timeout for waitForPossibleGeometryUpdate as a parameter.
489
490 2013-04-12  Jessie Berlin  <jberlin@apple.com>
491
492         32-bit build fix.
493
494         * UIProcess/API/mac/WKView.mm:
495         (-[WKView setFrameSize:]):
496
497 2013-04-12  Jeffrey Pfau  <jpfau@apple.com>
498
499         Query directly for cache partition names
500         https://bugs.webkit.org/show_bug.cgi?id=114538
501
502         Reviewed by David Kilzer.
503
504         Call back into WebKitSystemInterface to ask it for the cache
505         partition names instead of trying to figure them out.
506
507         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
508         (WebKit::WebResourceCacheManager::getCacheOrigins):
509         (WebKit):
510         (WebKit::WebResourceCacheManager::returnCacheOrigins):
511         * WebProcess/ResourceCache/WebResourceCacheManager.h:
512         (WebResourceCacheManager):
513         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
514         (WebKit::WebResourceCacheManager::cfURLCacheHostNames):
515         (WebKit):
516         (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
517
518 2013-04-12  Gavin Barraclough  <barraclough@apple.com>
519
520         Build fix - too soon!
521
522         * UIProcess/API/mac/WKViewPrivate.h:
523
524 2013-04-12  Gavin Barraclough  <barraclough@apple.com>
525
526         Build fix - too soon!
527
528         * UIProcess/API/mac/WKView.mm:
529         (-[WKView setFrameSize:]):
530
531 2013-04-12  Adenilson Cavalcanti  <cavalcantii@gmail.com>
532
533         [WK2] WebPageProxy loadURL() won't work when called just after terminateProcess()
534         https://bugs.webkit.org/show_bug.cgi?id=110743
535
536         Reviewed by Benjamin Poulain.
537
538         A call to loadURL() just after terminating WebProcess will fail thanks to
539         WebPageProxy being in an undefined state since it is in the middle of its own
540         cleanup after process termination.
541
542         To properly fix this, not only WebPageProxy cleanup should be made
543         at WebProcess termination request, but also WebProcessProxy needs
544         to only return to its caller after terminating the process and
545         closing connections. Otherwise, WebPageProxy can even be able to
546         detect that WebProcess is no longer running, but a call to respawn
547         the process will fail.
548
549         To fix these issues, this patch moves the cleanup code to a shared private function
550         that is used for both the cases i.e. user termination and real crash. WebProcess
551         shutdown is done using a new method that ensures that all cleanup was done before
552         returning.
553
554         A last change introduced in this patch is that for user requested termination,
555         clients are no longer notified of a crash (since it is not a crash).
556
557         * UIProcess/WebPageProxy.cpp:
558         (WebKit::WebPageProxy::terminateProcess):
559         (WebKit::WebPageProxy::processDidCrash):
560         (WebKit):
561         (WebKit::WebPageProxy::resetStateAfterProcessExited):
562         * UIProcess/WebPageProxy.h:
563         (WebPageProxy):
564         * UIProcess/WebProcessProxy.cpp:
565         (WebKit::WebProcessProxy::userRequestedTerminate):
566         (WebKit):
567         * UIProcess/WebProcessProxy.h:
568         (WebProcessProxy):
569
570 2013-04-12  Gavin Barraclough  <barraclough@apple.com>
571
572         Add contentAnchor to WKView
573         http://bugs.webkit.org/show_bug.cgi?id=114469
574         
575         Currently if you call setFrameSize: while frame size updates are disabled, or if the geometry
576         update times out, then the previously rendered page content will be rendered anchored to the
577         top left corner of the frame.
578
579         This is appropriate if the frame is being resized from the bottom right corner. In order to
580         achieve a more desirable appearance if the frame is being resized from another corner we
581         should allow the corner at which the content anchors to be specified.
582
583         Reviewed by Simon Fraser.
584
585         * UIProcess/API/mac/WKView.mm:
586         (-[WKView setFrameSize:]):
587             - If the content anchor has been set, then updating the frame size moves the origin within the layer.
588         (-[WKView _setDrawingAreaSize:]):
589             - Instruct the drawing area to paint at the correct position within the layer.
590         (-[WKView _setAcceleratedCompositingModeRootLayer:]):
591             - If the root layer is cleared this implicitly resets any origin position we had set within it.
592         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
593             - initialize new data members.
594         (-[WKView setContentAnchor:]):
595         (-[WKView contentAnchor]):
596             - Accessor implementation for @property contentAnchor.
597
598         * UIProcess/API/mac/WKViewPrivate.h:
599         (NS_ENUM):
600             - Added WKContentAnchor enum type, and @property contentAnchor.
601
602         * UIProcess/DrawingAreaProxy.cpp:
603         (WebKit::DrawingAreaProxy::setSize):
604             - Don't suppress geometry updates where the layer poistion has changed.
605
606         * UIProcess/DrawingAreaProxy.h:
607         (DrawingAreaProxy):
608             - Added m_layerPosition, layerPosition argument to setSize
609
610         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
611         (TiledCoreAnimationDrawingAreaProxy):
612             - Added m_lastSentLayerPosition
613
614         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
615         (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
616             - Don't suppress geometry updates where the layer poistion has changed.
617
618         (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
619             - Pass layer position in UpdateGeometry message.
620
621         * WebProcess/WebPage/DrawingArea.h:
622         (WebKit::DrawingArea::updateGeometry):
623             - Added layerPosition argument to updateGeometry
624
625         * WebProcess/WebPage/DrawingArea.messages.in:
626             - Added layerPosition argument to updateGeometry
627
628         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
629         (TiledCoreAnimationDrawingArea):
630             - Added layerPosition argument to updateGeometry
631
632         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
633         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
634             - Added layerPosition argument to updateGeometry
635
636 2013-04-12  Commit Queue  <rniwa@webkit.org>
637
638         Unreviewed, rolling out r148296 and r148297.
639         http://trac.webkit.org/changeset/148296
640         http://trac.webkit.org/changeset/148297
641         https://bugs.webkit.org/show_bug.cgi?id=114536
642
643         Needs more thought (Requested by ap on #webkit).
644
645         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
646
647 2013-04-12  Tim Horton  <timothy_horton@apple.com>
648
649         REGRESSION (r138858): GIFs don't start playing when they come out of background tabs
650         https://bugs.webkit.org/show_bug.cgi?id=108864
651         <rdar://problem/13140489>
652
653         Reviewed by Antti Koivisto.
654
655         Don't repaint the world when animations resume; instead, FrameView
656         will cause all animated images to repaint. This line also had no effect for
657         TiledCoreAnimationDrawingArea, which does not implement setNeedsDisplay.
658
659         * WebProcess/WebPage/WebPage.cpp:
660         (WebKit::WebPage::resumeActiveDOMObjectsAndAnimations):
661
662 2013-04-12  Alexey Proskuryakov  <ap@apple.com>
663
664         <rdar://problem/13334446> [Mac] Tweak sandbox profile.
665
666         Apply a post-landing review comment.
667
668         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
669
670 2013-04-12  Alexey Proskuryakov  <ap@apple.com>
671
672         <rdar://problem/13334446> [Mac] Tweak sandbox profile.
673
674         Reviewed by Jessie Berlin.
675
676         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
677
678 2013-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
679
680         [GTK] Split GtkAuthenticationDialog in two widgets
681         https://bugs.webkit.org/show_bug.cgi?id=103644
682
683         Reviewed by Xan Lopez.
684
685         * GNUmakefile.list.am: Add new files to compilation.
686         * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp: Removed.
687         * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.h: Removed.
688         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp: Added.
689         (webkitAuthenticationDialogAuthenticate): Use the
690         AuthenticationChallengeProxy to authenticate and destroy the dialog.
691         (okButtonClicked): Call webkitAuthenticationDialogAuthenticate()
692         with the credential.
693         (cancelButtonClicked): Call
694         webkitAuthenticationDialogAuthenticate() with a NULL credential to
695         continue without credential.
696         (webkitAuthenticationDialogInitialize): Build the UI.
697         (webkitAuthenticationDialogDraw): Draw a background.
698         (webkitAuthenticationDialogMap): Grab default button.
699         (webkitAuthenticationDialogConstructed): Create a GtkStyleContext
700         with the GtkWindow path to draw the widget background like a real
701         dialog.
702         (webkit_authentication_dialog_class_init):
703         (webkitAuthenticationDialogNew): Create a new
704         WebKitAuthenticationDialog widget.
705         * UIProcess/API/gtk/WebKitAuthenticationDialog.h: Added.
706         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
707         * UIProcess/API/gtk/WebKitWebView.cpp:
708         (webkitWebViewHandleAuthenticationChallenge): Create a
709         WebKitAuthenticationDialog widget and pass add it to the
710         container.
711         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
712         (_WebKitWebViewBasePrivate): Updated to use the widget directly.
713         (webkitWebViewChildIsInternalWidget): Ditto.
714         (webkitWebViewBaseAddAuthenticationDialog): Ditto.
715         (webkitWebViewBaseCancelAuthenticationDialog): Ditto.
716         (webkitWebViewBaseContainerRemove): Ditto.
717         (webkitWebViewBaseContainerForall): Ditto.
718         (resizeWebKitWebViewBaseFromAllocation): Ditto.
719         (webkitWebViewBaseFocus): Ditto.
720         (webkitWebViewBaseDestroy): Destroy the auth widget is present.
721         (webkit_web_view_base_class_init): Add implementation for
722         GtkWidgetClass::destroy.
723         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
724
725 2013-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
726
727         [GTK] Web Process crash when the UI process finishes too early
728         https://bugs.webkit.org/show_bug.cgi?id=112729
729
730         Reviewed by Anders Carlsson.
731
732         The problem is when creating the GSocket in the WorkQeue for the
733         socket descriptor. GLib considers a programmer error to create a
734         GSocket providing an invalid socket and finishes the process with
735         g_error(). We are actually providing a valid socket when creating
736         the GSocket, but it can be invalidated by the worker thread while
737         the GSocket is being created. This is because
738         registerEventSourceHandler is called from the main thread and
739         unregisterEventSourceHandler can be called from the worker
740         thread. We are currently registering two event handlers, one to
741         read data from the socket and another one to close the CoreIPC
742         connection when the socket connection is broken. Every event
743         source registered uses its own GSocket (even if the file
744         descriptor is actually the same), so that when the UI process
745         finishes too early, the first event handler can be executed in the
746         worker thread, closing the socket descriptor, while the main
747         thread is creating the GSocket for the second one.
748         We don't really need to use a separate event handler to monitor
749         the connection, because GSocket always notifies when condition is
750         G_IO_HUP and G_IO_ERR even if they haven't been explicitly set in
751         g_socket_create_source(). We can register socket event sources
752         differently, providing also a function to be called when the
753         connection is closed, using a single socket and the same even source.
754
755         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
756         (CoreIPC::Connection::platformInvalidate):
757         (CoreIPC::Connection::open): Register a single socket event
758         handler providing also a function to be called when the connection
759         is closed.
760         * Platform/WorkQueue.h:
761         (WorkQueue):
762         * Platform/gtk/WorkQueueGtk.cpp: The EventSource class has been
763         split, moving everyting specific to socket event source to a
764         derived class SocketEventSource.
765         (WorkQueue::EventSource::EventSource):
766         (WorkQueue::EventSource::performWork):
767         (WorkQueue::EventSource::performWorkOnce):
768         (WorkQueue::EventSource::performWorkOnTermination):
769         (WorkQueue::EventSource::deleteEventSource):
770         (WorkQueue::EventSource):
771         (WorkQueue::SocketEventSource):
772         (WorkQueue::SocketEventSource::SocketEventSource):
773         (WorkQueue::SocketEventSource::cancel):
774         (WorkQueue::SocketEventSource::didClose):
775         (WorkQueue::SocketEventSource::checkCondition):
776         (WorkQueue::SocketEventSource::eventCallback):
777         (WorkQueue::registerSocketEventHandler):
778         (WorkQueue::unregisterSocketEventHandler):
779         (WorkQueue::dispatchOnSource):
780
781 2013-04-12  Alexey Proskuryakov  <ap@apple.com>
782
783         <rdar://problem/13126204> [Mac] Tweak sandbox profile.
784
785         Reviewed by Anders Carlsson.
786
787         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
788         * WebProcess/com.apple.WebProcess.sb.in:
789
790 2013-04-12  Manuel Rego Casasnovas  <rego@igalia.com>
791
792         [GTK][WK2] Add document-loaded signal to WebKitWebPage
793         https://bugs.webkit.org/show_bug.cgi?id=110614
794
795         Reviewed by Carlos Garcia Campos.
796
797         Add a new signal document-loaded to WebKitWebPage that will be emitted
798         when the DOM document has been loaded for the main frame.
799
800         * UIProcess/API/gtk/tests/TestWebExtensions.cpp:
801         (documentLoadedCallback):
802         (testDocumentLoadedSignal):
803         (beforeAll): Add test for document-loaded signal.
804         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
805         (documentLoadedCallback):
806         (pageCreatedCallback):
807         (methodCallCallback): Add new D-Bus signal DocumentLoaded in order to
808         test document-loaded signal.
809         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
810         (webkit_web_page_class_init):
811         (webkitWebPageCreate): Add document-loaded signal and emit it when
812         didFinishDocumentLoadForFrame is called.
813
814 2013-04-12  Hanyee Kim  <choco@company100.net>
815
816         [GTK] Webkit fails to build webkit2gtk-tests-resources.gresource.
817         https://bugs.webkit.org/show_bug.cgi?id=114485
818
819         Reviewed by Martin Robinson.
820
821         Generating webkit2gtk-tests-resources.gresource can be failed due to
822         the non-existing target directory.
823         We need to make target directory before generating it.
824
825         * UIProcess/API/gtk/tests/GNUmakefile.am:
826
827 2013-04-12  Andreas Kling  <akling@apple.com>
828
829         REGRESSION(r145869): Right-click on SWF contents displays the context menu at the wrong place.
830         <http://webkit.org/b/113836>
831         <rdar://problem/13587624>
832
833         Reviewed by Anders "Wesley Crusher" Carlsson.
834
835         Mac plugins expect flipped-Y screen coordinates, while DOM APIs speak in unflipped coordinates,
836         and we were mixing them up in the window frame caching optimization.
837
838         Solve this by having the UIProcess send both flipped and unflipped window frames to the WebProcess.
839         The flipped frame is passed on to plugins, and the unflipped frame is used for window.screenX/Y etc.
840
841         * UIProcess/API/mac/WKView.mm:
842         (-[WKView _updateWindowAndViewFrames]):
843
844             No need to retrieve the window frame here as WebPageProxy::windowAndViewFramesChanged() will
845             always override it anyway.
846
847         * UIProcess/mac/WebPageProxyMac.mm:
848         (WebKit::WebPageProxy::windowAndViewFramesChanged):
849         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
850         (WebKit::WebChromeClient::windowRect):
851         * WebProcess/WebPage/WebPage.cpp:
852         (WebKit::WebPage::windowAndViewFramesChanged):
853         * WebProcess/WebPage/WebPage.h:
854         (WebKit::WebPage::windowFrameInUnflippedScreenCoordinates):
855         * WebProcess/WebPage/WebPage.messages.in:
856
857 2013-04-12  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
858
859         [WK2][EFL] WebView: Add callbacks to the WKViewClient to handle page viewport update
860         https://bugs.webkit.org/show_bug.cgi?id=110463
861
862         Reviewed by Anders Carlsson.
863
864         * UIProcess/efl/ViewClientEfl.h:
865         (ViewClientEfl):
866         * UIProcess/efl/WebView.cpp:
867         (WebKit::WebView::didChangeViewportProperties):
868         * UIProcess/efl/WebViewClient.cpp:
869         (WebKit::WebViewClient::didChangeViewportAttributes):
870         (WebKit):
871         * UIProcess/efl/WebViewClient.h:
872
873             Added didChangeViewportAttributes callback to the WKViewClient to
874             handle page viewport updates.
875
876         * CMakeLists.txt:
877         * Shared/API/c/WKBase.h:
878         * Shared/APIObject.h:
879         * UIProcess/API/C/WKAPICast.h:
880         (WebKit):
881         * UIProcess/API/C/WKViewportAttributes.cpp: Added.
882         (WKViewportAttributesGetTypeID):
883         * UIProcess/API/C/WKViewportAttributes.h: Added.
884         * UIProcess/API/C/efl/WKView.h:
885         * UIProcess/WebViewportAttributes.cpp: Added.
886         (WebKit):
887         (WebKit::WebViewportAttributes::WebViewportAttributes):
888         (WebKit::WebViewportAttributes::~WebViewportAttributes):
889         * UIProcess/WebViewportAttributes.h: Added.
890         (WebKit):
891         (WebViewportAttributes):
892         (WebKit::WebViewportAttributes::create):
893         (WebKit::WebViewportAttributes::originalAttributes):
894         (WebKit::WebViewportAttributes::type):
895
896             Added WKViewportAttributesRef - WK2 C API object that is wrapping 
897             WebCore::ViewportAttributes structure and is passed in didChangeViewportAttributes
898             WKViewClient callback.
899
900         * UIProcess/efl/ViewClientEfl.cpp:
901         (WebKit::ViewClientEfl::didChangeViewportAttributes):
902         (WebKit):
903
904             Added implementaion of didChangeViewportAttributes WKViewClient 
905             callback so that existing EFL WK2 funtionality is kept.
906
907
908 2013-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
909
910         [GTK] The style of visited links doesn't change in WebKit2
911         https://bugs.webkit.org/show_bug.cgi?id=112175
912
913         Reviewed by Benjamin Poulain.
914
915         The problem is that visited links were not tracked by the web
916         process. There's a web process initial parameter to set whether
917         web process should track visited links or not and it's disabled by
918         default.
919
920         * UIProcess/gtk/WebContextGtk.cpp:
921         (WebKit::WebContext::platformInitializeWebProcess): Always set
922         shouldTrackVisitedLinks to true.
923
924 2013-04-11  Tim Horton  <timothy_horton@apple.com>
925
926         REGRESSION (r146956): ASSERTion failure: WebKit::WebProcess::pageWillLeaveWindow
927         https://bugs.webkit.org/show_bug.cgi?id=114481
928         <rdar://problem/13534784>
929
930         Reviewed by Simon Fraser.
931
932         Inform the WebProcess of WebPages which are already in a window when created.
933
934         * WebProcess/WebPage/WebPage.cpp:
935         (WebKit::WebPage::WebPage):
936
937 2013-04-11  Anders Carlsson  <andersca@apple.com>
938
939         Add support for clearing storage areas
940         https://bugs.webkit.org/show_bug.cgi?id=114479
941
942         Reviewed by Beth Dakin.
943
944         * UIProcess/Storage/StorageManager.cpp:
945         (WebKit::StorageManager::StorageArea::StorageArea):
946         Store the quota size so we can recreate the underlying StorageMap when clearing.
947         
948         (WebKit::StorageManager::StorageArea::clear):
949         Create a new storage map and dispatch events.
950
951         (WebKit::StorageManager::clear):
952         Find the right storage area and call clear.
953
954         * UIProcess/Storage/StorageManager.messages.in:
955         Add Clear message.
956
957         * WebProcess/Storage/StorageAreaImpl.cpp:
958         (WebKit::StorageAreaImpl::clear):
959         Call the storage map.
960
961         * WebProcess/Storage/StorageAreaMap.cpp:
962         (WebKit::StorageAreaMap::clear):
963         Reset the cached values and send a clear message.
964
965         (WebKit::StorageAreaMap::resetValues):
966         New helper function.
967
968         (WebKit::StorageAreaMap::didClear):
969         New stub.
970
971         * WebProcess/Storage/StorageAreaMap.messages.in:
972         Add DidClear message.
973
974 2013-04-11  Beth Dakin  <bdakin@apple.com>
975
976         WebKit should set the header and footer layers' contentsScale when the device 
977         scale factor changes
978         https://bugs.webkit.org/show_bug.cgi?id=114471
979         -and corresponding-
980         <rdar://problem/13621288>
981
982         Reviewed by Simon Fraser.
983
984         Update the header and footer contentsScale when the device scale factor has 
985         changed.
986
987         * WebProcess/WebPage/WebPage.cpp:
988         (WebKit::WebPage::setDeviceScaleFactor):
989         * WebProcess/WebPage/WebPage.h:
990         * WebProcess/WebPage/mac/WebPageMac.mm:
991         (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):
992
993 2013-04-11  Anders Carlsson  <andersca@apple.com>
994
995         Implement removing storage area items
996         https://bugs.webkit.org/show_bug.cgi?id=114472
997
998         Reviewed by Beth Dakin.
999
1000         * UIProcess/Storage/StorageManager.cpp:
1001         (StorageManager::StorageArea):
1002         (WebKit::StorageManager::StorageArea::setItem):
1003         Rename connection to sourceConnection.
1004
1005         (WebKit::StorageManager::StorageArea::removeItem):
1006         Remove the item from the map and dispatch events if needed.
1007
1008         (WebKit::StorageManager::removeItem):
1009         Find the right storage area, remove the item and send back a DidRemoveItem message.
1010
1011         * UIProcess/Storage/StorageManager.messages.in:
1012         Add RemoveItem message.
1013
1014         * WebProcess/Storage/StorageAreaImpl.cpp:
1015         (WebKit::StorageAreaImpl::removeItem):
1016         Call StorageAreaMap::removeItem.
1017
1018         * WebProcess/Storage/StorageAreaMap.cpp:
1019         (WebKit::StorageAreaMap::removeItem):
1020         Send a RemoveItem message to the storage manager.
1021         
1022         (WebKit::StorageAreaMap::didRemoveItem):
1023         Add empty stub.
1024
1025         * WebProcess/Storage/StorageAreaMap.messages.in:
1026         Add DidRemoveItem message.
1027
1028 2013-04-11  Tim Horton  <timothy_horton@apple.com>
1029
1030         InjectedBundleNodeHandle::imageForRect doesn't respect device scale factor or highlighting option
1031         https://bugs.webkit.org/show_bug.cgi?id=114466
1032         <rdar://problem/13508513>
1033
1034         Reviewed by Simon Fraser.
1035
1036         Respect the device scale factor when creating the snapshot image.
1037         Clear the snapshot image before drawing into it.
1038         Respect SnapshotOptionsExcludeSelectionHighlighting.
1039
1040         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1041         (WebKit::imageForRect):
1042
1043 2013-04-11  Commit Queue  <rniwa@webkit.org>
1044
1045         Unreviewed, rolling out r148034, r148052, r148097, and
1046         r148194.
1047         http://trac.webkit.org/changeset/148034
1048         http://trac.webkit.org/changeset/148052
1049         http://trac.webkit.org/changeset/148097
1050         http://trac.webkit.org/changeset/148194
1051         https://bugs.webkit.org/show_bug.cgi?id=114463
1052
1053         broke mutiresolution favicons, among other things (Requested
1054         by thorton on #webkit).
1055
1056         * UIProcess/WebIconDatabase.cpp:
1057         (WebKit::WebIconDatabase::setIconDataForIconURL):
1058         * UIProcess/WebIconDatabase.h:
1059         (WebIconDatabase):
1060         * UIProcess/WebIconDatabase.messages.in:
1061         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
1062         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
1063         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1064         (WebKit::PDFPlugin::destroy):
1065
1066 2013-04-11  Anders Carlsson  <andersca@apple.com>
1067
1068         Implement StorageManager::getValues
1069         https://bugs.webkit.org/show_bug.cgi?id=114461
1070
1071         Reviewed by Beth Dakin.
1072
1073         * UIProcess/Storage/StorageManager.cpp:
1074         (WebKit::StorageManager::StorageArea::items):
1075         (WebKit::StorageManager::getValues):
1076         Return the items from the right storage area.
1077
1078 2013-04-11  Anders Carlsson  <andersca@apple.com>
1079
1080         Clean up related storage areas when a connection is destroyed
1081         https://bugs.webkit.org/show_bug.cgi?id=114459
1082
1083         Reviewed by Beth Dakin.
1084
1085         * UIProcess/Storage/StorageManager.cpp:
1086         (WebKit::StorageManager::processWillCloseConnection):
1087         Dispatch invalidateConnectionInternal on the work queue.
1088         
1089         (WebKit::StorageManager::createStorageMap):
1090         (WebKit::StorageManager::destroyStorageMap):
1091         Rename m_storageAreas to m_storageAreasByConnection.
1092
1093         (WebKit::StorageManager::invalidateConnectionInternal):
1094         Go over all known storage areas and remove this connection as a listener.
1095
1096         (WebKit::StorageManager::findStorageArea):
1097         Rename m_storageAreas to m_storageAreasByConnection.
1098
1099         * UIProcess/Storage/StorageManager.h:
1100         Rename m_storageAreas to m_storageAreasByConnection.
1101
1102 2013-04-11  Anders Carlsson  <andersca@apple.com>
1103
1104         Make StorageAreaMap dispatch session storage events
1105         https://bugs.webkit.org/show_bug.cgi?id=114454
1106
1107         Reviewed by Beth Dakin.
1108
1109         * WebProcess/Storage/StorageAreaMap.cpp:
1110         (WebKit::StorageAreaMap::dispatchStorageEvent):
1111         Depending on the storage area type, call dispatchSessionStorageEvent or dispatchLocalStorageEvent.
1112
1113         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
1114         Enumerate all the frames in our page and dispatch the event to the relevant ones.
1115
1116         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
1117         Add empty stub for now.
1118
1119 2013-04-11  Anders Carlsson  <andersca@apple.com>
1120
1121         Implement more logic in StorageAreaMap
1122         https://bugs.webkit.org/show_bug.cgi?id=114451
1123
1124         Reviewed by Alexey Proskuryakov.
1125
1126         * Platform/CoreIPC/HandleMessage.h:
1127         (CoreIPC::callMemberFunction):
1128         Add new overload.
1129
1130         * UIProcess/Storage/StorageManager.cpp:
1131         (WebKit::StorageManager::StorageArea::addListener):
1132         (WebKit::StorageManager::StorageArea::removeListener):
1133         These take storage map IDs.
1134
1135         (WebKit::StorageManager::StorageArea::setItem):
1136         Rename storageAreaID to sourceStorageAreaID.
1137
1138         (WebKit::StorageManager::StorageArea::dispatchEvents):
1139         Remove the code that would not dispatch to the source connection, there may still be storage areas interested in those events.
1140
1141         (WebKit::StorageManager::setItem):
1142         This now takes the source storage area ID.
1143
1144         (WebKit::StorageManager::findStorageArea):
1145         This takes a storage map ID.
1146
1147         * UIProcess/Storage/StorageManager.messages.in:
1148         SetItem now takes the source storage area ID as well.
1149
1150         * WebProcess/Storage/StorageAreaImpl.cpp:
1151         (WebKit::StorageAreaImpl::setItem):
1152         Pass the source frame to StorageAreaMap::setItem.
1153
1154         * WebProcess/Storage/StorageAreaMap.cpp:
1155         (WebKit::StorageAreaMap::StorageAreaMap):
1156         Send CreateStorageMap and add the object as a message receiver.
1157
1158         (WebKit::StorageAreaMap::~StorageAreaMap):
1159         Send DestroyStorageMap and remove the object as a message receiver.
1160
1161         (WebKit::StorageAreaMap::length):
1162         (WebKit::StorageAreaMap::key):
1163         (WebKit::StorageAreaMap::item):
1164         (WebKit::StorageAreaMap::contains):
1165         Load values and forward calls to the storage map.
1166
1167         (WebKit::StorageAreaMap::setItem):
1168         This now takes the source frame as well. Update the local storage map and send a SetItem message.
1169         
1170         (WebKit::StorageAreaMap::loadValuesIfNeeded):
1171         Get the values from the storage manager.
1172
1173         (WebKit::StorageAreaMap::dispatchStorageEvent):
1174         This now takes the source storage area ID.
1175
1176         * WebProcess/Storage/StorageAreaMap.messages.in:
1177         DispatchStorageEvent now takes the source storage area ID.
1178
1179 2013-04-10  Brady Eidson  <beidson@apple.com>
1180
1181         Web/Plugin process deadlock initializing async plugins.
1182         <rdar://problem/13525232> and https://bugs.webkit.org/show_bug.cgi?id=114217
1183
1184         Rubberstamped by Anders Carlsson.
1185
1186         Rollout r147953 and r147968 as we identified other causes for this.
1187
1188         * PluginProcess/WebProcessConnection.cpp:
1189         (WebKit::WebProcessConnection::createPluginAsynchronously):
1190         * WebProcess/Plugins/PluginProxy.messages.in:
1191
1192 2013-04-11  Alexey Proskuryakov  <ap@apple.com>
1193
1194         Remove some ResourceHandle.h includes
1195         https://bugs.webkit.org/show_bug.cgi?id=114416
1196
1197         Reviewed by Ryosuke Niwa.
1198
1199         * WebProcess/Network/NetworkProcessConnection.cpp: Added an include that is now
1200         necessary.
1201
1202 2013-04-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1203
1204         [Qt] EventHandler should handle Space and BackSpace 
1205         https://bugs.webkit.org/show_bug.cgi?id=114428
1206
1207         Reviewed by Jocelyn Turcotte.
1208
1209         Remove our own handling of space and backspace.
1210
1211         * WebProcess/WebPage/qt/WebPageQt.cpp:
1212         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
1213
1214 2013-04-11  Csaba Osztrogonác  <ossy@webkit.org>
1215
1216         Unreviewed Qt buildfixes after r148147, r148148 and r148154.
1217
1218         * DerivedSources.pri:
1219         * Target.pri:
1220
1221 2013-04-10  Zan Dobersek  <zdobersek@igalia.com>
1222
1223         Unreviewed GTK build fix, fixing the WebKit2 build.
1224
1225         * GNUmakefile.list.am:
1226
1227 2013-04-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1228
1229         [WK2] Build warning in didReceiveMessage() generated by messages.py
1230         https://bugs.webkit.org/show_bug.cgi?id=112513
1231
1232         Reviewed by Anders Carlsson.
1233
1234         Legacy receiver makes -Wunused-parameter build warnings. This patch is to fix them.
1235
1236         * Scripts/webkit2/messages.py:
1237         (generate_message_handler):
1238
1239 2013-04-10  Jaehun Lim  <ljaehun.lim@samsung.com>
1240
1241         [CMAKE] Build fix after StorageArea refactoring
1242         https://bugs.webkit.org/show_bug.cgi?id=114398
1243
1244         Unreviewed build fix.
1245
1246         Change StorageAreaImpl.messages.in with StorageAreaMap.messages.in.
1247         Add StorageAreaMap.cpp in CMakeLists.txt.
1248
1249         * CMakeLists.txt:
1250
1251 2013-04-10  Anders Carlsson  <andersca@apple.com>
1252
1253         Make StorageAreaImpl a wrapper around StorageAreaMap
1254         https://bugs.webkit.org/show_bug.cgi?id=114404
1255
1256         Reviewed by Oliver Hunt.
1257
1258         Prepare for moving all the code that deals with local storage values to StorageAreaMap,
1259         and make StorageAreaImpl a dumb wrapper that simply calls through to the map.
1260
1261         * WebProcess/Storage/StorageAreaImpl.cpp:
1262         (WebKit::StorageAreaImpl::create):
1263         (WebKit::StorageAreaImpl::StorageAreaImpl):
1264         (WebKit::StorageAreaImpl::~StorageAreaImpl):
1265         (WebKit::StorageAreaImpl::storageType):
1266         (WebKit::StorageAreaImpl::length):
1267         (WebKit::StorageAreaImpl::key):
1268         (WebKit::StorageAreaImpl::getItem):
1269         (WebKit::StorageAreaImpl::setItem):
1270         (WebKit::StorageAreaImpl::contains):
1271         * WebProcess/Storage/StorageAreaImpl.h:
1272         (WebKit::StorageAreaImpl::storageAreaID):
1273         * WebProcess/Storage/StorageAreaMap.cpp:
1274         (WebKit::generateStorageMapID):
1275         (WebKit::StorageAreaMap::create):
1276         (WebKit::StorageAreaMap::StorageAreaMap):
1277         (WebKit::StorageAreaMap::storageType):
1278         (WebKit::StorageAreaMap::length):
1279         (WebKit::StorageAreaMap::key):
1280         (WebKit::StorageAreaMap::item):
1281         (WebKit::StorageAreaMap::setItem):
1282         (WebKit::StorageAreaMap::contains):
1283         (WebKit::StorageAreaMap::didSetItem):
1284         (WebKit::StorageAreaMap::dispatchStorageEvent):
1285         * WebProcess/Storage/StorageAreaMap.h:
1286         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1287         (WebKit::StorageNamespaceImpl::storageArea):
1288         * WebProcess/Storage/StorageNamespaceImpl.h:
1289         (StorageNamespaceImpl):
1290
1291 2013-04-10  Anders Carlsson  <andersca@apple.com>
1292
1293         Rename StorageManager messages to refer to the StorageMap instead of the StorageArea
1294         https://bugs.webkit.org/show_bug.cgi?id=114401
1295
1296         Reviewed by Ryosuke Niwa.
1297
1298         * UIProcess/Storage/StorageManager.cpp:
1299         (WebKit::StorageManager::createStorageMap):
1300         (WebKit::StorageManager::destroyStorageMap):
1301         (WebKit::StorageManager::setItem):
1302         * UIProcess/Storage/StorageManager.h:
1303         * UIProcess/Storage/StorageManager.messages.in:
1304         * WebProcess/Storage/StorageAreaImpl.cpp:
1305         (WebKit::StorageAreaImpl::StorageAreaImpl):
1306         (WebKit::StorageAreaImpl::~StorageAreaImpl):
1307
1308 2013-04-10  Benjamin Poulain  <bpoulain@apple.com>
1309
1310         Mass remove all the empty directories
1311
1312         Rubberstamped by Ryosuke Niwa.
1313
1314         * Platform/CoreIPC/gtk: Removed.
1315         * Platform/CoreIPC/qt: Removed.
1316         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32: Removed.
1317         * PluginProcess/EntryPoint/mac/XPCService/PluginService.64: Removed.
1318         * PluginProcess/gtk: Removed.
1319         * Shared/API/c/win: Removed.
1320         * Shared/Plugins/Netscape/win: Removed.
1321         * Shared/cg/win: Removed.
1322         * Shared/win: Removed.
1323         * UIProcess/API/C/win: Removed.
1324         * UIProcess/API/gtk/webkit: Removed.
1325         * UIProcess/Launcher/win: Removed.
1326         * UIProcess/Plugins/gtk: Removed.
1327         * UIProcess/Plugins/win: Removed.
1328         * UIProcess/texmap: Removed.
1329         * UIProcess/win: Removed.
1330         * WebProcess/Authentication/mac: Removed.
1331         * WebProcess/Cookies/efl: Removed.
1332         * WebProcess/Cookies/gtk: Removed.
1333         * WebProcess/Downloads/cf/win: Removed.
1334         * WebProcess/Downloads/cfnet: Removed.
1335         * WebProcess/Downloads/curl: Removed.
1336         * WebProcess/Downloads/efl: Removed.
1337         * WebProcess/Downloads/gtk: Removed.
1338         * WebProcess/Downloads/mac: Removed.
1339         * WebProcess/Downloads/qt: Removed.
1340         * WebProcess/Downloads/soup: Removed.
1341         * WebProcess/FullScreen/gtk: Removed.
1342         * WebProcess/FullScreen/mac: Removed.
1343         * WebProcess/FullScreen/qt: Removed.
1344         * WebProcess/FullScreen/win: Removed.
1345         * WebProcess/InjectedBundle/API/c/win: Removed.
1346         * WebProcess/InjectedBundle/win: Removed.
1347         * WebProcess/KeyValueStorage: Removed.
1348         * WebProcess/Network/CustomProtocols/mac: Removed.
1349         * WebProcess/Plugins/Netscape/gtk: Removed.
1350         * WebProcess/Plugins/Netscape/win: Removed.
1351         * WebProcess/WebCoreSupport/win: Removed.
1352         * WebProcess/WebPage/LayerTreeCoordinator: Removed.
1353         * WebProcess/WebPage/ca/mac: Removed.
1354         * WebProcess/WebPage/ca/win: Removed.
1355         * WebProcess/WebPage/win: Removed.
1356         * WebProcess/win: Removed.
1357         * qt/Resources: Removed.
1358
1359 2013-04-10  Jaehun Lim  <ljaehun.lim@samsung.com>
1360
1361         [CMAKE] Build fix after r148147, r148148
1362         https://bugs.webkit.org/show_bug.cgi?id=114395
1363
1364         Unreviewed build fix.
1365
1366         Use StorageAreaImpl, StorageNamespaceImpl instead of StorageAreaProxy, StorageNamespaceProxy.
1367
1368         * CMakeLists.txt:
1369
1370 2013-04-10  Anders Carlsson  <andersca@apple.com>
1371
1372         Add a stubbed out StorageAreaMap class
1373         https://bugs.webkit.org/show_bug.cgi?id=114392
1374
1375         Reviewed by Andreas Kling.
1376
1377         The intention is that StorageAreaMap is going to take over responsibility for storing the storage values in the
1378         web process, as well as dispatching events. A StorageAreaMap will be shared between multiple StorageAreaImpl objects,
1379         for example if multiple frames with the same origin use local storage.
1380
1381         * DerivedSources.make:
1382         * UIProcess/Storage/StorageManager.cpp:
1383         (WebKit::StorageManager::StorageArea::dispatchEvents):
1384         (WebKit::StorageManager::setItem):
1385         * WebKit2.xcodeproj/project.pbxproj:
1386         * WebProcess/Storage/StorageAreaImpl.cpp:
1387         (WebKit::StorageAreaImpl::StorageAreaImpl):
1388         (WebKit::StorageAreaImpl::~StorageAreaImpl):
1389         * WebProcess/Storage/StorageAreaMap.cpp: Added.
1390         (WebKit):
1391         (WebKit::StorageAreaMap::create):
1392         (WebKit::StorageAreaMap::StorageAreaMap):
1393         (WebKit::StorageAreaMap::~StorageAreaMap):
1394         (WebKit::StorageAreaMap::didSetItem):
1395         (WebKit::StorageAreaMap::dispatchStorageEvent):
1396         * WebProcess/Storage/StorageAreaMap.h: Added.
1397         (WebKit):
1398         (StorageAreaMap):
1399         * WebProcess/Storage/StorageAreaMap.messages.in: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaImpl.messages.in.
1400
1401 2013-04-10  Anders Carlsson  <andersca@apple.com>
1402
1403         Rename StorageAreaProxy to StorageAreaImpl.
1404
1405         Rubber-stamped by Beth Dakin.
1406
1407         * DerivedSources.make:
1408         * UIProcess/Storage/StorageManager.cpp:
1409         (WebKit::StorageManager::StorageArea::dispatchEvents):
1410         (WebKit::StorageManager::setItem):
1411         * WebKit2.xcodeproj/project.pbxproj:
1412         * WebProcess/Storage/StorageAreaImpl.cpp: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaProxy.cpp.
1413         * WebProcess/Storage/StorageAreaImpl.h: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaProxy.h.
1414         * WebProcess/Storage/StorageAreaImpl.messages.in: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaProxy.messages.in.
1415         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1416         (WebKit::StorageNamespaceImpl::storageArea):
1417         * WebProcess/Storage/StorageNamespaceImpl.h:
1418         (WebKit):
1419         (StorageNamespaceImpl):
1420
1421 2013-04-10  Anders Carlsson  <andersca@apple.com>
1422
1423         Rename StorageNamespaceProxy to StorageNamespaceImpl.
1424
1425         Rubber-stamped by Beth Dakin.
1426
1427         * WebKit2.xcodeproj/project.pbxproj:
1428         * WebProcess/Storage/StorageAreaProxy.cpp:
1429         (WebKit::StorageAreaProxy::create):
1430         (WebKit::StorageAreaProxy::StorageAreaProxy):
1431         * WebProcess/Storage/StorageAreaProxy.h:
1432         (StorageAreaProxy):
1433         * WebProcess/Storage/StorageNamespaceImpl.cpp: Renamed from Source/WebKit2/WebProcess/Storage/StorageNamespaceProxy.cpp.
1434         * WebProcess/Storage/StorageNamespaceImpl.h: Renamed from Source/WebKit2/WebProcess/Storage/StorageNamespaceProxy.h.
1435         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1436         (WebKit::WebPlatformStrategies::sessionStorageNamespace):
1437
1438 2013-04-10  Tim Horton  <timothy_horton@apple.com>
1439
1440         [wk2] Un-pollute TCADA methods with "PageOverlayLayerMap::iterator end"
1441         https://bugs.webkit.org/show_bug.cgi?id=114387
1442
1443         Reviewed by Simon Fraser.
1444
1445         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1446         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
1447         (WebKit::TiledCoreAnimationDrawingArea::paintContents):
1448         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1449         (WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
1450         (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
1451         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
1452         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
1453
1454 2013-04-10  Tim Horton  <timothy_horton@apple.com>
1455
1456         [wk2] REGRESSION: Find highlight does not update when the view is resized
1457         https://bugs.webkit.org/show_bug.cgi?id=114382
1458         <rdar://problem/13599797>
1459
1460         Reviewed by Simon Fraser.
1461
1462         Invalidate the page overlays from TiledCoreAnimationDrawingArea::updateGeometry.
1463         This will have no effect if the page overlay hasn't previously asked to be painted
1464         (as drawsContent will remain false on the layer).
1465
1466         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1467         (TiledCoreAnimationDrawingArea): Add invalidateAllPageOverlays.
1468         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1469         (WebKit::TiledCoreAnimationDrawingArea::invalidateAllPageOverlays): Factor this out of didChangeScrollOffsetForAnyFrame.
1470         (WebKit::TiledCoreAnimationDrawingArea::didChangeScrollOffsetForAnyFrame): Call invalidateAllPageOverlays.
1471         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): Call invalidateAllPageOverlays.
1472
1473 2013-04-10  Beth Dakin  <bdakin@apple.com>
1474
1475         FindBanner matches are offset when the WKView has a header or footer
1476         https://bugs.webkit.org/show_bug.cgi?id=114314
1477         -and corresponding-
1478         <rdar://problem/13522434>
1479
1480         Reviewed by Simon Fraser.
1481
1482         When calculating the matching rects, also adjust to the scroll offset that is  
1483         relative to the Document.
1484         * WebProcess/WebPage/FindController.cpp:
1485         (WebKit::FindController::rectsForTextMatches):
1486
1487 2013-04-10  Tobias Mueller  <tobiasmue@gnome.org>
1488
1489         Fixed build failure in Plugin.h: FloatPoint was not in namespace WebCore
1490
1491         make[1]: *** Waiting for unfinished jobs....
1492         In file included from Source/WebKit2/PluginProcess/PluginCreationParameters.h:31:0,
1493                          from Source/WebKit2/PluginProcess/PluginCreationParameters.cpp:27:
1494         ./Source/WebKit2/WebProcess/Plugins/Plugin.h:268:58: error: 'FloatPoint' in namespace 'WebCore' does not name a type
1495         ./Source/WebKit2/WebProcess/Plugins/Plugin.h:268:77: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive]
1496         cc1plus: warning: unrecognized command line option "-Wno-c++11-extensions" [enabled by default]
1497         make[1]: *** [Source/WebKit2/PluginProcess/libwebkit2gtk_3_0_la-PluginCreationParameters.lo] Error 1
1498
1499         It now passes that make target.
1500
1501         https://bugs.webkit.org/show_bug.cgi?id=111862
1502
1503         Reviewed by Darin Adler.
1504
1505         * WebProcess/Plugins/Plugin.h:
1506         (WebCore): Added FloatPoint to the WebCore namespace
1507
1508 2013-04-08  Anders Carlsson  <andersca@apple.com>
1509
1510         Remove unneeded headers from FrameLoader.h
1511         https://bugs.webkit.org/show_bug.cgi?id=114223
1512
1513         Reviewed by Geoffrey Garen.
1514
1515         Include HistoryController.h from WebCore.
1516
1517         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
1518         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1519         * WebProcess/WebPage/WebPage.cpp:
1520
1521 2013-04-09  Geoffrey Garen  <ggaren@apple.com>
1522
1523         Removed bitrotted TimeoutChecker code
1524         https://bugs.webkit.org/show_bug.cgi?id=114336
1525
1526         Reviewed by Alexey Proskuryakov.
1527
1528         This mechanism hasn't worked for a while.
1529
1530         MarkL is working on a new version of this feature with a distinct
1531         implementation.
1532
1533         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1534         (WebKit::NPJSObject::construct):
1535         (WebKit::NPJSObject::invoke):
1536         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1537         (WebKit::NPRuntimeObjectMap::evaluate):
1538
1539 2013-04-09  Mark Rowe  <mrowe@apple.com>
1540
1541         <rdar://problem/13617144> WKNavigationData needs to expose the destination of the navigation
1542
1543         Introduce WKNavigationDataCopyNavigationDestinationURL to access the destination of the navigation.
1544
1545         Reviewed by Dan Bernstein.
1546
1547         * UIProcess/API/C/WKNavigationData.cpp:
1548         (WKNavigationDataCopyURL): Add a note about returning the URL from the original request for sake of
1549         backwards-compatibility.
1550         (WKNavigationDataCopyNavigationDestinationURL): Return the URL from our underlying WebNavigationDataStore.
1551         * UIProcess/API/C/WKNavigationData.h:
1552         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1553         (WebKit::WebFrameLoaderClient::updateGlobalHistory): Store the current URL in to the WebNavigationDataStore
1554         object. WKNavigationData can retrieve the value that we were previously storing here via the originalRequest.
1555
1556 2013-04-09  Mark Rowe  <mrowe@apple.com>
1557
1558         <rdar://problem/13617104> WKPageCopySessionState needs to provide more context to the filter callback
1559
1560         Introduce a new value type for WKPageSessionStateFilterCallback that represents the passing
1561         of whole WKBackForwardListItemRefs to the filter callback. This allows clients to consider
1562         more than the original URL of the item when filtering entries from the session state.
1563
1564         Reviewed by Darin Adler.
1565
1566         * UIProcess/API/C/WKPage.cpp:
1567         (WKPageGetSessionBackForwardListItemValueType): Return a static string representing our new value type.
1568         * UIProcess/API/C/WKPage.h:
1569         * UIProcess/cf/WebBackForwardListCF.cpp:
1570         (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Call the filter function with each of the
1571         possible value types in turn, respecting the first false value, if any, that is returned.
1572
1573 2013-04-10  Anton Obzhirov  <a.obzhirov@samsung.com>
1574
1575         [GTK] Add support for Page Visibility
1576         https://bugs.webkit.org/show_bug.cgi?id=97324
1577
1578         Reviewed by Sam Weinig.
1579
1580         Added new unittest to test page visibility using GTK Widget visibility API.
1581
1582         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
1583         (testWebViewPageVisibility):
1584         (beforeAll):
1585         * UIProcess/API/gtk/tests/WebViewTest.cpp:
1586         (WebViewTest::showInWindow):
1587         * UIProcess/API/gtk/tests/WebViewTest.h:
1588
1589 2013-04-10  Zan Dobersek  <zdobersek@igalia.com>
1590
1591         REGRESSION (r146518): WebKit2APITests/TestInspector is failing
1592         https://bugs.webkit.org/show_bug.cgi?id=113281
1593
1594         Reviewed by Darin Adler.
1595
1596         Changes to the WebInspectorProxy opening processing in r146518 caused the change in how the GTK-specific
1597         WebInspectorProxy code operates, specifically the 'bring-to-front' signal is not emitted anymore when opening the
1598         inspector due to the WebInspectorProxy::bringToFront method now only bringing the inspector window to front if it exists
1599         and opening it (and thus unable to bring it to front) otherwise.
1600
1601         Closing of the inspector through the didClose method is now done immediately after sending the WebInspector::Close()
1602         message to the WebProcess rather than waiting for the WebProcess to communicate back the order of closing. Due to this
1603         the relevant code in the test cases had to be changed to not run the loop but rather just check that the closing was
1604         successful.
1605
1606         (InspectorTest::InspectorTest): Remove the initialization of the now redundant m_quitOnBringToFront member variable.
1607         (InspectorTest::bringToFront): Quit the loop without checking the removed member variable.
1608         (InspectorTest::closed): Do not quit the loop as it is not run anymore.
1609         (InspectorTest::showIdle): A helper method that asynchronously calls the webkit_web_inspector_show method, removing some
1610         unnecessary complexity about under what exact circumstances to quit the loop in open-window/bring-to-front callbacks.
1611         (InspectorTest::show): Replaces the showAndWaitUntilFinished method, adding an idle invocation of the showIdle helper
1612         method and running the loop.
1613         (InspectorTest::close): Formerly closeAndWaitUntilClosed, now does not run the loop anymore as there's no need for it.
1614         (testInspectorDefault): Only the window opening event is now expected upon showing the inspector for the first time.
1615         Adjusting callsites to use InspectorTest::show and InspectorTest::close instead of
1616         InspectorTest::showAndWaitUntilFinished and InspectorTest::showAndWaitUntilFinished.
1617         (CustomInspectorTest::destroyWindow): Formerly destroyWindowAndWaitUntilClosed, the closing is not asynchronous anymore
1618         so the loop is not run.
1619         (testInspectorManualAttachDetach): Only the window opening event is now expected upon showing the inspector for the first time.
1620         Adjusting callsites to use InspectorTest::show and InspectorTest::close instead of
1621         InspectorTest::showAndWaitUntilFinished and InspectorTest::showAndWaitUntilFinished.
1622         (testInspectorCustomContainerDestroyed): Adjusting callsites to use InspectorTest::show and CustomInspectorTest::destroyWindow
1623         instead of InspectorTest::showAndWaitUntilFinished and CustomInspectorTest::destroyWindowAndWaitUntilClosed.
1624         * UIProcess/WebInspectorProxy.cpp:
1625         (WebKit::WebInspectorProxy::show): When showing a connected WebInspectorProxy, call the bringToFront method which will
1626         open the inspector if it's not yet visible or bring it to the front otherwise. 
1627
1628 2013-04-10  Zan Dobersek  <zandobersek@gmail.com>
1629
1630         [GTK][WK2] Implement WebInspectorProxy::platformInspectedWindowWidth
1631         https://bugs.webkit.org/show_bug.cgi?id=113498
1632
1633         Reviewed by Martin Robinson.
1634
1635         The method was introduced in r147004.
1636
1637         * UIProcess/API/gtk/tests/TestInspector.cpp: Specify the gMinimumAttachedInspectorWidth variable, reflecting the value
1638         of WebInspectorProxy::minimumAttachedWidth. Use it as the width to which the inspected view should be resized in
1639         InspectorTest::resizeViewAndAttach.
1640         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1641         (WebKit::WebInspectorProxy::platformInspectedWindowHeight): Use the gtk_widget_get_allocated_height method to return the
1642         widget height.
1643         (WebKit::WebInspectorProxy::platformInspectedWindowWidth): Newly implemented, similarly uses the
1644         gtk_widget_get_allocated_width method to return the widget width.
1645
1646 2013-04-09  Antoine Quint  <graouts@apple.com>
1647
1648         WKFrameIsDisplayingMarkupDocument should return true for Web Archives
1649         https://bugs.webkit.org/show_bug.cgi?id=114291
1650
1651         Reviewed by Dean Jackson.
1652
1653         Also return true for the Web Archive MIME type since a Web Archive
1654         is displaying a markup document by nature.
1655
1656         * UIProcess/WebFrameProxy.cpp:
1657         (WebKit::WebFrameProxy::isDisplayingMarkupDocument):
1658
1659 2013-04-09  Anders Carlsson  <andersca@apple.com>
1660
1661         REGRESSION (r147454): Youtube annotation links to new window broken
1662         https://bugs.webkit.org/show_bug.cgi?id=114242
1663         <rdar://problem/13609940>
1664
1665         Reviewed by Beth Dakin.
1666
1667         Set the current user gesture to "DefinitelyProcessingNewUserGesture" if popups are allowed.
1668
1669         * WebProcess/Plugins/PluginView.cpp:
1670         (WebKit::PluginView::performFrameLoadURLRequest):
1671
1672 2013-04-09  Anders Carlsson  <andersca@apple.com>
1673
1674         If we fail to decode a message name, pass the message length as the name
1675         https://bugs.webkit.org/show_bug.cgi?id=114305
1676         <rdar://problem/13605703>
1677
1678         Reviewed by Sam Weinig.
1679
1680         * Platform/CoreIPC/ArgumentDecoder.h:
1681         (CoreIPC::ArgumentDecoder::length):
1682         * Platform/CoreIPC/Connection.cpp:
1683         (CoreIPC::Connection::processIncomingMessage):
1684
1685 2013-04-08  Dean Jackson  <dino@apple.com>
1686
1687         Don't create another plugin process for restarted plugins
1688         https://bugs.webkit.org/show_bug.cgi?id=114233
1689
1690         Reviewed by Geoff Garen.
1691
1692         A snapshotting plugin starts in a separate process from
1693         regular plugins. This can be a little confusing to users
1694         because they might see two plugin processes. We can set
1695         the minimum life and timeout on the snapshotting process
1696         to much smaller values, since the process doesn't need
1697         to live that long. This will reduce some potential
1698         confusion. Also, since there is another plugin process
1699         running real plugins, it should be paged in if it needs
1700         to restart.
1701
1702         There was, however, a bug in the process management. A
1703         restarted plugin received a special PluginProcess::Type,
1704         so that it could cross fade into the page nicely. This
1705         caused it to start a *third* plugin process. Instead
1706         mark a restarted flag directly on the PluginProxy and
1707         revert back to two process types.
1708
1709         * PluginProcess/PluginProcess.h: Remove TypeRestartedProcess.
1710
1711         * UIProcess/Plugins/PluginProcessProxy.cpp: Add two new
1712             timeout values for snapshotting processes.
1713         (WebKit::PluginProcessProxy::didFinishLaunching): Chose which
1714             of the timeout pairs to use.
1715
1716         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
1717         (WebKit::PluginProxy::pluginLayer): Don't look at the process type, instead
1718             look at the process flag to see if we are restarted.
1719         * WebProcess/Plugins/PluginProxy.cpp:
1720         (WebKit::PluginProxy::create): Copy the new flag into constructor.
1721         (WebKit::PluginProxy::PluginProxy): Remember the flag.
1722         * WebProcess/Plugins/PluginProxy.h: Add a new m_restartedProcess flag.
1723
1724         * WebProcess/WebPage/WebPage.cpp:
1725         (WebKit::WebPage::createPlugin): When we are creating the proxy, separate
1726             the concept of snapshotting and restarting.
1727
1728 2013-04-09  Tim Horton  <timothy_horton@apple.com>
1729
1730         [wk2] IconDatabase images should be decoded in the WebProcess
1731         https://bugs.webkit.org/show_bug.cgi?id=112524
1732         <rdar://problem/10133914>
1733
1734         Reviewed by Oliver Hunt.
1735
1736         In the interests of keeping decoding of data coming in from the greater Internet
1737         in the WebProcess, move decoding of favicons from the UIProcess to the WebProcess.
1738
1739         * UIProcess/WebIconDatabase.cpp:
1740         (WebKit::WebIconDatabase::setIconBitmapForIconURL):
1741         Receive a ShareableBitmap handle from the WebProcess instead of a DataReference.
1742         Use the new setIconBitmapForIconURL IconDatabase method.
1743
1744         * UIProcess/WebIconDatabase.h:
1745         (WebIconDatabase):
1746         Rename setIconDataForIconURL to setIconBitmapForIconURL.
1747
1748         * UIProcess/WebIconDatabase.messages.in: Ditto.
1749
1750         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
1751         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
1752         In the WebProcess, decode the incoming icon and draw it into a ShareableBitmap.
1753
1754 2013-04-09  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
1755
1756         [EFL] Declare TEST_THEME_DIR in a single place.
1757         https://bugs.webkit.org/show_bug.cgi?id=114285
1758
1759         Reviewed by Anders Carlsson.
1760
1761         * PlatformEfl.cmake: Remove definition of `TEST_THEME_DIR', which is
1762         now defined in OptionsEfl.cmake.
1763
1764 2013-04-09  Rafael Brandao  <rafael.lobo@openbossa.org>
1765
1766         [CoordinatedGraphics] serviceScriptedAnimations expects time in seconds
1767         https://bugs.webkit.org/show_bug.cgi?id=112582
1768
1769         Reviewed by Andreas Kling.
1770
1771         We've been exposing different time unit for requestAnimationFrame because
1772         of wrong conversion before serviceScriptedAnimations function calls.
1773         Fixed it to use seconds instead of milliseconds.
1774
1775         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1776         (WebKit::CoordinatedLayerTreeHost::syncDisplayState): Remove unnecessary conversion.
1777
1778 2013-04-09  Michael Brüning  <michael.bruning@digia.com>
1779
1780         [Qt][WK2] Remove obsolete QtWebPageFindClient forward declaration from qquickwebview_p.h.
1781         https://bugs.webkit.org/show_bug.cgi?id=114284
1782
1783         Reviewed by Andreas Kling.
1784
1785         The class QtWebPageFindClient was removed in r142073 when the functionality
1786         was folded into QQuickWebViewPrivate.
1787
1788         * UIProcess/API/qt/qquickwebview_p.h:
1789         (WebKit):
1790
1791 2013-04-09  Michael Brüning  <michael.bruning@digia.com>
1792
1793         Fix GTK WebKit2 build after r148005.
1794         https://bugs.webkit.org/show_bug.cgi?id=114270
1795
1796         Reviewed by Andreas Kling.
1797
1798         Fix GTK build break that went through the buildbot undetected.
1799
1800         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
1801         (webkit_file_chooser_request_get_selected_files):
1802
1803 2013-04-09  Michael Brüning  <michael.bruning@digia.com>
1804
1805         [Qt][WK2] Remove direct references to WebPageProxy from QQuickWebPage.
1806         https://bugs.webkit.org/show_bug.cgi?id=112850
1807
1808         Reviewed by Andreas Kling.
1809
1810         Removes direct references to WebPageProxy from QQuickWebPage and prepares the
1811         class for the move to QRawWebView. The access to the device scale factor and
1812         CoordinatedGraphicsScene is provided through QQuickWebViewPrivate, and therefore
1813         accessors to these properties are temporarily added. Eventually, this access will
1814         be provided through QRawWebView when the move is complete.
1815
1816         This also moves the pointer to QtWebPageEventHandler from QQuickWebPagePrivate
1817         to QQuickWebViewPrivate as it is mainly used from there.
1818
1819         * UIProcess/API/qt/qquickwebpage.cpp:
1820         (QQuickWebPagePrivate::QQuickWebPagePrivate):
1821         (QQuickWebPagePrivate::paint):
1822         (QQuickWebPage::updatePaintNode):
1823         * UIProcess/API/qt/qquickwebpage_p.h:
1824         * UIProcess/API/qt/qquickwebpage_p_p.h:
1825         (QQuickWebPagePrivate):
1826         * UIProcess/API/qt/qquickwebview.cpp:
1827         (QQuickWebViewPrivate::initialize):
1828         (QQuickWebViewPrivate::handleMouseEvent):
1829         (QQuickWebViewPrivate::processDidCrash):
1830         (QQuickWebViewPrivate::coordinatedGraphicsScene):
1831         (QQuickWebViewPrivate::deviceScaleFactor):
1832         (QQuickWebViewPrivate::setIntrinsicDeviceScaleFactor):
1833         (QQuickWebViewFlickablePrivate::onComponentComplete):
1834         (QQuickWebView::keyPressEvent):
1835         (QQuickWebView::keyReleaseEvent):
1836         (QQuickWebView::inputMethodEvent):
1837         (QQuickWebView::focusInEvent):
1838         (QQuickWebView::itemChange):
1839         (QQuickWebView::touchEvent):
1840         (QQuickWebView::wheelEvent):
1841         (QQuickWebView::hoverEnterEvent):
1842         (QQuickWebView::hoverMoveEvent):
1843         (QQuickWebView::hoverLeaveEvent):
1844         (QQuickWebView::dragMoveEvent):
1845         (QQuickWebView::dragEnterEvent):
1846         (QQuickWebView::dragLeaveEvent):
1847         (QQuickWebView::dropEvent):
1848         * UIProcess/API/qt/qquickwebview_p_p.h:
1849         (WebCore):
1850         (WebKit):
1851         (QQuickWebViewPrivate):
1852
1853 2013-04-09  Michael Brüning  <michael.bruning@digia.com>
1854
1855         [Qt][WK2] Use C API to enable Navigator Qt Object.
1856         https://bugs.webkit.org/show_bug.cgi?id=112810
1857
1858         Reviewed by Andreas Kling.
1859
1860         Replace the direct reference to the WebPageProxy with use of
1861         C API.
1862
1863         * UIProcess/API/qt/qquickwebview.cpp:
1864         (QQuickWebViewPrivate::setNavigatorQtObjectEnabled):
1865
1866 2013-04-09  Michael Brüning  <michael.bruning@digia.com>
1867
1868         [WK2] Add C API to copy selected files from WebOpenPanelParameters.
1869         https://bugs.webkit.org/show_bug.cgi?id=112339
1870
1871         Reviewed by Andreas Kling.
1872
1873         Replaces the existing WebOpenPanelParameters::selectedFileNames() method
1874         to return a copy of the selected file names and exposes it through the
1875         C API. This is done in order to reduce the direct use of WebKit2 internal
1876         classes. The implementation is very similar to the one in 
1877         WebOpenPanelParameters::acceptMIMETypes().
1878
1879         This also updates the GTK port, which is the other user of selectedFileNames.
1880
1881         * Shared/WebOpenPanelParameters.cpp:
1882         (WebKit::WebOpenPanelParameters::selectedFileNames):
1883         (WebKit):
1884         * Shared/WebOpenPanelParameters.h:
1885         (WebOpenPanelParameters):
1886         * UIProcess/API/C/WKOpenPanelParameters.cpp:
1887         (WKOpenPanelParametersCopySelectedFileNames):
1888         * UIProcess/API/C/WKOpenPanelParameters.h:
1889         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
1890         (webkit_file_chooser_request_get_selected_files):
1891         * UIProcess/qt/QtWebPageUIClient.cpp:
1892         (WebKit::QtWebPageUIClient::runOpenPanel):
1893
1894 2013-04-09  Jinwoo Song  <jinwoo7.song@samsung.com>
1895
1896         [WK2] Remove build warnings for unused parameters
1897         https://bugs.webkit.org/show_bug.cgi?id=114234
1898
1899         Reviewed by Andreas Kling.
1900
1901         Fix build warnings -Wunused-parameter.
1902
1903         * UIProcess/Storage/StorageManager.cpp:
1904         (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
1905         * UIProcess/WebContext.cpp:
1906         (WebKit::WebContext::requestNetworkingStatistics):
1907         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
1908         * WebProcess/Storage/StorageAreaProxy.cpp:
1909         (WebKit::StorageAreaProxy::removeItem):
1910         (WebKit::StorageAreaProxy::clear):
1911         (WebKit::StorageAreaProxy::dispatchSessionStorageEvent):
1912         (WebKit::StorageAreaProxy::dispatchLocalStorageEvent):
1913         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1914         (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay):
1915         * WebProcess/WebPage/WebPage.cpp:
1916         (WebKit::WebPage::didFinishLoad):
1917         * WebProcess/WebProcess.cpp:
1918         (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
1919
1920 2013-04-09  Thiago Marcos P. Santos  <thiago.santos@intel.com>
1921
1922         [WK2] Drop WebProcess capabilities on Linux using seccomp filters
1923         https://bugs.webkit.org/show_bug.cgi?id=89875
1924
1925         Reviewed by Maciej Stachowiak.
1926
1927         Introduce the foundations of the SeccompFilter-based sandbox. The
1928         hardening of the WebProcess (and potentially PluginProcess, etc)
1929         works by a combination of the two things:
1930
1931         - Blocking syscalls that are not used, reducing the size of the attack
1932         surface.
1933         - Trapping sensitive syscalls and delegating the execution of these
1934         syscalls to a separated trusted process subject to a set of policies.
1935
1936         The initial implementation traps the open()-family of syscalls on WebKit
1937         EFL's and Qt's WebProcess, but it could be easily used by any Linux port,
1938         since the code is suppose to be Linux-compliant. The list of syscalls handled
1939         by the broker process should definitely grow as we mature the
1940         implementation. Other syscalls needs to be handled to get this sandbox
1941         fully functional, like unlink(), mkdir(), etc.
1942
1943         The broker process should be initialized as early as possible on the
1944         sandboxed process main() function, because it only does a fork(), which
1945         is cheap on Linux. That also aims to minimize the resident memory footprint
1946         of the broker process.
1947
1948         Opening of files for upload and saving downloads is not supported yet,
1949         since it should be handled to the UIProcess in a similar fashion as
1950         the Mac port does.
1951
1952         * PlatformEfl.cmake:
1953         * Shared/linux/SeccompFilters/OpenSyscall.cpp: Added.
1954         (WebKit):
1955         (WebKit::OpenSyscall::createFromOpenatContext):
1956         (WebKit::OpenSyscall::createFromCreatContext):
1957         (WebKit::OpenSyscall::OpenSyscall):
1958         (WebKit::OpenSyscall::setResult):
1959         (WebKit::OpenSyscall::execute):
1960         (WebKit::OpenSyscall::encode):
1961         (WebKit::OpenSyscall::decode):
1962         (WebKit::OpenSyscallResult::OpenSyscallResult):
1963         (WebKit::OpenSyscallResult::~OpenSyscallResult):
1964         (WebKit::OpenSyscallResult::encode):
1965         (WebKit::OpenSyscallResult::decode):
1966         * Shared/linux/SeccompFilters/OpenSyscall.h: Added.
1967         (CoreIPC):
1968         (WebKit):
1969         (OpenSyscall):
1970         (WebKit::OpenSyscall::setPath):
1971         (WebKit::OpenSyscall::setFlags):
1972         (WebKit::OpenSyscall::setMode):
1973         (OpenSyscallResult):
1974         (WebKit::OpenSyscallResult::fd):
1975         (WebKit::OpenSyscallResult::errorNumber):
1976         * Shared/linux/SeccompFilters/SeccompBroker.cpp: Added.
1977         (WebKit):
1978         (SeccompBrokerClient):
1979         (WebKit::sendMessage):
1980         (WebKit::receiveMessage):
1981         (WebKit::SIGSYSHandler):
1982         (WebKit::registerSIGSYSHandler):
1983         (WebKit::SeccompBrokerClient::shared):
1984         (WebKit::SeccompBrokerClient::SeccompBrokerClient):
1985         (WebKit::SeccompBrokerClient::~SeccompBrokerClient):
1986         (WebKit::SeccompBrokerClient::dispatch):
1987         (WebKit::SeccompBrokerClient::handleIfOpeningOnlineCPUCount):
1988         (WebKit::SeccompBroker::launchProcess):
1989         (WebKit::SeccompBroker::initialize):
1990         (WebKit::SeccompBroker::runLoop):
1991         * Shared/linux/SeccompFilters/SeccompBroker.h: Added.
1992         (WebKit):
1993         (SeccompBroker):
1994         (WebKit::SeccompBroker::setSyscallPolicy):
1995         (WebKit::SeccompBroker::SeccompBroker):
1996         * Shared/linux/SeccompFilters/SeccompFilters.cpp: Added.
1997         (WebKit):
1998         (WebKit::SeccompFilters::SeccompFilters):
1999         (WebKit::SeccompFilters::~SeccompFilters):
2000         (WebKit::SeccompFilters::addRule):
2001         (WebKit::SeccompFilters::initialize):
2002         * Shared/linux/SeccompFilters/SeccompFilters.h: Added.
2003         (WebKit):
2004         (SeccompFilters):
2005         (WebKit::SeccompFilters::context):
2006         (WebKit::SeccompFilters::platformInitialize):
2007         * Shared/linux/SeccompFilters/SigactionSyscall.cpp: Added.
2008         (WebKit):
2009         (WebKit::SigactionSyscall::createFromContext):
2010         * Shared/linux/SeccompFilters/SigactionSyscall.h: Added.
2011         (WebKit):
2012         (SigactionSyscall):
2013         * Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp: Added.
2014         (WebKit):
2015         (WebKit::SigprocmaskSyscall::createFromContext):
2016         * Shared/linux/SeccompFilters/SigprocmaskSyscall.h: Added.
2017         (WebKit):
2018         (SigprocmaskSyscall):
2019         * Shared/linux/SeccompFilters/Syscall.cpp: Added.
2020         (WebKit):
2021         (WebKit::Syscall::createFromContext):
2022         (WebKit::Syscall::createFromDecoder):
2023         (WebKit::Syscall::Syscall):
2024         (WebKit::SyscallResult::createFromDecoder):
2025         (WebKit::SyscallResult::SyscallResult):
2026         * Shared/linux/SeccompFilters/Syscall.h: Added.
2027         (CoreIPC):
2028         (WebKit):
2029         (Syscall):
2030         (WebKit::Syscall::~Syscall):
2031         (WebKit::Syscall::type):
2032         (WebKit::Syscall::setContext):
2033         (WebKit::Syscall::context):
2034         (SyscallResult):
2035         (WebKit::SyscallResult::~SyscallResult):
2036         (WebKit::SyscallResult::type):
2037         * Shared/linux/SeccompFilters/SyscallPolicy.cpp: Added.
2038         (WebKit):
2039         (WebKit::removeTrailingSlash):
2040         (WebKit::SyscallPolicy::hasPermissionForPath):
2041         (WebKit::SyscallPolicy::addFilePermission):
2042         (WebKit::SyscallPolicy::addDirectoryPermission):
2043         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
2044         * Shared/linux/SeccompFilters/SyscallPolicy.h: Added.
2045         (WebKit):
2046         (SyscallPolicy):
2047         * Target.pri:
2048         * WebKit2.pri:
2049         * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp: Added.
2050         (WebKit):
2051         (WebKit::SeccompFiltersWebProcessEfl::SeccompFiltersWebProcessEfl):
2052         (WebKit::SeccompFiltersWebProcessEfl::platformInitialize):
2053         * WebProcess/efl/SeccompFiltersWebProcessEfl.h: Added.
2054         (WebKit):
2055         (SeccompFiltersWebProcessEfl):
2056         * WebProcess/qt/SeccompFiltersWebProcessQt.cpp: Added.
2057         (WebKit):
2058         (WebKit::SeccompFiltersWebProcessQt::SeccompFiltersWebProcessQt):
2059         (WebKit::SeccompFiltersWebProcessQt::platformInitialize):
2060         * WebProcess/qt/SeccompFiltersWebProcessQt.h: Added.
2061         (WebKit):
2062         (SeccompFiltersWebProcessQt):
2063         * WebProcess/qt/WebProcessQt.cpp:
2064         (WebKit::WebProcess::platformInitializeWebProcess):
2065         * WebProcess/soup/WebProcessSoup.cpp:
2066         (WebKit::WebProcess::platformInitializeWebProcess):
2067
2068 2013-04-08  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2069
2070         [WK2][EFL] Mark not implemented methods in TextCheckerEfl.
2071         https://bugs.webkit.org/show_bug.cgi?id=112261
2072
2073         Reviewed by Anders Carlsson.
2074
2075         There's no need to call client's methods in TextCheckerEfl.cpp if they are not
2076         implemented. Mark them as not implemented until we provide proper implementation.
2077
2078         * UIProcess/efl/TextCheckerEfl.cpp:
2079         (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
2080         (WebKit::TextChecker::setGrammarCheckingEnabled):
2081         (WebKit::TextChecker::grammarCheckingEnabledStateChanged):
2082         (WebKit::TextChecker::checkGrammarOfString):
2083         (WebKit::TextChecker::spellingUIIsShowing):
2084         (WebKit::TextChecker::toggleSpellingUIIsShowing):
2085         (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
2086         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2087
2088 2013-04-08  Benjamin Poulain  <benjamin@webkit.org>
2089
2090         Remove HTML Notification
2091         https://bugs.webkit.org/show_bug.cgi?id=114231
2092
2093         Reviewed by Ryosuke Niwa.
2094
2095         * Configurations/FeatureDefines.xcconfig:
2096
2097 2013-04-08  Tim Horton  <timothy_horton@apple.com>
2098
2099         Don't run primary plugin detection if plugin snapshotting is off
2100         https://bugs.webkit.org/show_bug.cgi?id=114222
2101         <rdar://problem/13603988>
2102
2103         Reviewed by Dean Jackson.
2104
2105         * WebProcess/WebPage/WebPage.cpp:
2106         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
2107
2108 2013-04-08  Patrick Gansterer  <paroga@webkit.org>
2109
2110         [WIN] Remove WebKit2 source code
2111         https://bugs.webkit.org/show_bug.cgi?id=114096
2112
2113         Reviewed by Anders Carlsson.
2114
2115         Remove conditional includes for the windows platform.
2116
2117         * Shared/API/c/WKBase.h:
2118         * UIProcess/API/C/WKAPICast.h:
2119
2120 2013-04-08  Geoffrey Garen  <ggaren@apple.com>
2121
2122         Stop #include-ing all of JavaScriptCore in every DOM-related file
2123         https://bugs.webkit.org/show_bug.cgi?id=114220
2124
2125         Reviewed by Sam Weinig.
2126
2127         * Shared/WebCoreArgumentCoders.cpp:
2128         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
2129
2130 2013-04-08  Brady Eidson  <beidson@apple.com>
2131
2132         Web/Plugin process deadlock initializing async plugins.
2133         <rdar://problem/13525232> and https://bugs.webkit.org/show_bug.cgi?id=114217
2134
2135         Reviewed by Anders Carlsson.
2136
2137        The "Async initialization complete" messages probably don't have to be synchronous.
2138
2139         * PluginProcess/WebProcessConnection.cpp:
2140         (WebKit::WebProcessConnection::createPluginAsynchronously): Notify of initialization success/failure asynchronously.
2141         * WebProcess/Plugins/PluginProxy.messages.in: 
2142
2143 2013-04-08  Anders Carlsson  <andersca@apple.com>
2144
2145         Add an async version of ResourceHandle::didReceiveResponse
2146         https://bugs.webkit.org/show_bug.cgi?id=114215
2147
2148         Reviewed by Sam Weinig.
2149
2150         * NetworkProcess/NetworkResourceLoader.cpp:
2151         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2152         Send the message and then call continueDidReceiveResponse.
2153
2154 2013-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2155
2156         [GTK] Build Platform as a separate static library
2157         https://bugs.webkit.org/show_bug.cgi?id=114164
2158
2159         Reviewed by Martin Robinson.
2160
2161         This way we reduce a bit the amount of files compiled twice
2162         because of the plugin process.
2163
2164         * GNUmakefile.am:
2165         * GNUmakefile.list.am:
2166         * Platform/gtk/WorkQueueGtk.cpp: Remove unused header.
2167         * Platform/unix/SharedMemoryUnix.cpp: Ditto.
2168
2169 2013-04-08  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2170
2171         [WK2][EFL] WebView: Add callbacks to the WKViewClient to remove direct access to page viewport controller
2172         https://bugs.webkit.org/show_bug.cgi?id=110741
2173
2174         Reviewed by Anders Carlsson.
2175
2176         Provided WKViewClient with didRequestScroll, didRenderFrame and didCompletePageTransition
2177         callbacks so that direct access from WebView to page viewport controller is avoided.
2178
2179         Implementation of callbacks is also added to keep the current EFL WK2 functionality.
2180
2181         * UIProcess/API/C/efl/WKView.h:
2182         * UIProcess/efl/PageLoadClientEfl.cpp:
2183         (WebKit::PageLoadClientEfl::didCommitLoadForFrame):
2184
2185             Moved here code from deleted WebView::didCommitLoad.
2186
2187         * UIProcess/efl/ViewClientEfl.cpp:
2188         (WebKit::ViewClientEfl::didChangeContentsPosition):
2189         (WebKit):
2190         (WebKit::ViewClientEfl::didRenderFrame):
2191         (WebKit::ViewClientEfl::didCompletePageTransition):
2192         (WebKit::ViewClientEfl::ViewClientEfl):
2193         * UIProcess/efl/ViewClientEfl.h:
2194         (ViewClientEfl):
2195         * UIProcess/efl/WebView.cpp:
2196         (WebKit::WebView::pageDidRequestScroll):
2197         (WebKit::WebView::didRenderFrame):
2198         (WebKit::WebView::pageTransitionViewportReady):
2199         * UIProcess/efl/WebViewClient.cpp:
2200         (WebKit::WebViewClient::didChangeContentsPosition):
2201         (WebKit):
2202         (WebKit::WebViewClient::didRenderFrame):
2203         (WebKit::WebViewClient::didCompletePageTransition):
2204         * UIProcess/efl/WebViewClient.h:
2205         (WebCore):
2206
2207 2013-04-08  Andras Becsi  <andras.becsi@digia.com>
2208
2209         [Qt][WK2] WebView's interactive property is not fully respected
2210         https://bugs.webkit.org/show_bug.cgi?id=113066
2211
2212         Reviewed by Jocelyn Turcotte.
2213
2214         WK2 sign-off by Benjamin Poulain.
2215
2216         The QML WebView inherits the "interactive" property from Flickable
2217         which is true by default, and disables the interaction with the
2218         Flickable if set to false.
2219         Resulting from the design of the WebView panning and flicking is
2220         disabled by Flickable but to be consistent we also need to disable
2221         double-tap gestures and pinch gestures since they would trigger
2222         scale and position changes.
2223
2224         * UIProcess/qt/PageViewportControllerClientQt.cpp:
2225         (WebKit::PageViewportControllerClientQt::pinchGestureStarted):
2226         (WebKit::PageViewportControllerClientQt::pinchGestureRequestUpdate):
2227         (WebKit::PageViewportControllerClientQt::pinchGestureEnded):
2228         * UIProcess/qt/QtWebPageEventHandler.cpp:
2229         (WebKit::QtWebPageEventHandler::handleDoubleTapEvent):
2230
2231 2013-04-07  David Kilzer  <ddkilzer@apple.com>
2232
2233         Remove the rest of SVG_DOM_OBJC_BINDINGS
2234         <http://webkit.org/b/114112>
2235
2236         Reviewed by Geoffrey Garen.
2237
2238         * Configurations/FeatureDefines.xcconfig:
2239         - Remove ENABLE_SVG_DOM_OBJC_BINDINGS macro.
2240
2241 2013-04-06  Geoffrey Garen  <ggaren@apple.com>
2242
2243         Try to fix the WebKit2 build.
2244
2245         * NetworkProcess/NetworkResourceLoader.cpp:
2246         (WebKit):
2247         * NetworkProcess/NetworkResourceLoader.h:
2248         (NetworkResourceLoader): Removed a defunct function.
2249
2250 2013-04-05  Ed Bartosh  <bartosh@gmail.com>
2251
2252         [WK2] --no-tiled-backing-store build fails because FloatPoint is not declared
2253         https://bugs.webkit.org/show_bug.cgi?id=113618
2254
2255         Reviewed by Simon Fraser.
2256
2257         * WebProcess/Plugins/Plugin.h: Forward declared FloatPoint
2258
2259 2013-04-05  Geoffrey Garen  <ggaren@apple.com>
2260
2261         Made USE(JSC) unconditional
2262         https://bugs.webkit.org/show_bug.cgi?id=114058
2263
2264         Reviewed by Anders Carlsson.
2265
2266         * Shared/linux/WebMemorySamplerLinux.cpp:
2267         (WebKit::WebMemorySampler::sampleWebKit):
2268         * config.h:
2269
2270 2013-04-05  Ed Bartosh  <bartosh@gmail.com>
2271
2272         [EFL] --no-tiled-backing-store build fails because of not used #if USE(ACCELERATED_COMPOSITING)
2273         https://bugs.webkit.org/show_bug.cgi?id=113627
2274
2275         Reviewed by Simon Fraser.
2276
2277         Wrapped code with #if USE(ACCELERATED_COMPOSITING) to make it compilable
2278         with --no-tiled-backing-store build option:
2279         * UIProcess/API/C/efl/WKView.cpp:
2280         * UIProcess/API/efl/EvasGLContext.cpp:
2281         * UIProcess/API/efl/EvasGLContext.h:
2282         * UIProcess/API/efl/EvasGLSurface.cpp:
2283         * UIProcess/API/efl/EvasGLSurface.h:
2284         * UIProcess/API/efl/EwkView.cpp:
2285         (EwkView::EwkView):
2286         (EwkView::displayTimerFired):
2287         (EwkView::takeSnapshot):
2288         * UIProcess/API/efl/EwkView.h:
2289         (WebKit):
2290         (EwkView):
2291         * UIProcess/API/efl/SnapshotImageGL.cpp:
2292         * UIProcess/API/efl/SnapshotImageGL.h:
2293         * UIProcess/PageViewportController.cpp:
2294         * UIProcess/PageViewportController.h:
2295         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
2296         * UIProcess/efl/ViewClientEfl.cpp:
2297         (WebKit::ViewClientEfl::didChangeContentsSize):
2298         * UIProcess/efl/WebView.cpp:
2299         (WebKit::WebView::didCommitLoad):
2300         (WebKit::WebView::updateViewportSize):
2301         (WebKit::WebView::didChangeViewportProperties):
2302         (WebKit::WebView::pageDidRequestScroll):
2303         (WebKit::WebView::didRenderFrame):
2304         (WebKit::WebView::pageTransitionViewportReady):
2305
2306 2013-04-05  Ed Bartosh  <bartosh@gmail.com>
2307
2308         [EFL][WK2] --no-tiled-backing-store build fails because of not used #if USE(COORDINATED_GRAPHICS)
2309         https://bugs.webkit.org/show_bug.cgi?id=113629
2310
2311         Reviewed by Simon Fraser.
2312
2313         Wrapped code related to coordinated graphics with #if USE(COORDINATED_GRAPHICS)
2314         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
2315         * UIProcess/efl/WebView.cpp:
2316         (WebKit::WebView::initialize):
2317         (WebKit):
2318         (WebKit::WebView::paintToCairoSurface):
2319         (WebKit::WebView::updateViewportSize):
2320
2321 2013-04-05  Timothy Hatcher  <timothy@apple.com>
2322
2323         Allow the Web Inspector to use WebSQL.
2324
2325         This fixes an exception on load in the Safari Web Inspector.
2326
2327         https://webkit.org/b/114040
2328         rdar://problem/13581422
2329
2330         Reviewed by Anders Carlsson.
2331
2332         * UIProcess/mac/WebInspectorProxyMac.mm:
2333         (WebKit::exceededDatabaseQuota): Added.
2334         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Hook up exceededDatabaseQuota.
2335
2336 2013-04-04  Brady Eidson  <beidson@apple.com>
2337
2338         Add SPI to get a copy of the context menu at a given point.
2339         <rdar://problem/13450908> and https://bugs.webkit.org/show_bug.cgi?id=113958
2340
2341         Reviewed by Andy Estes.
2342
2343         Add the new accessor: 
2344         * WebProcess/WebPage/WebPage.cpp:
2345         (WebKit::WebPage::contextMenuAtPoint):
2346         * WebProcess/WebPage/WebPage.h:
2347
2348         Expose the new SPI:
2349         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2350         (WKBundlePageCopyContextMenuAtPoint):
2351         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2352
2353 2013-04-05  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2354
2355         [WK2][EFL] WebView should own page position and scale factor
2356         https://bugs.webkit.org/show_bug.cgi?id=111075
2357
2358         Reviewed by Andreas Kling.
2359
2360         View content position and content scale factor should belong to WebView
2361         rather than to EwkView as it decreases EwkView usage inside EFL-agnostic
2362         WebView and improves WebView encapsulation.
2363
2364         * UIProcess/API/C/efl/WKView.cpp:
2365         (WKViewGetContentScaleFactor):
2366         (WKViewSetContentScaleFactor):
2367
2368             New WKView API was added to set and get content scale factor.
2369             The view content scale factor is not the same as page scale factor:
2370             it always applies to content but not necessarily applies to the page.
2371             The view content scale factor is calculated by viewport controller
2372             and applies immediately for painting in UI process. Page scale factor
2373             is updated later after the frame is rendered to accomplish the pending
2374             scale change.
2375
2376         (WKViewGetContentPosition):
2377         (WKViewSetContentPosition):
2378
2379             New WKView API was added to set and get content position.
2380             Content position is set in UI units.
2381
2382         * UIProcess/API/C/efl/WKView.h:
2383         * UIProcess/API/efl/EwkView.cpp:
2384         (EwkView::EwkView):
2385         * UIProcess/API/efl/EwkView.h:
2386         (EwkView):
2387         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
2388         (WebKit::PageViewportControllerClientEfl::setViewportPosition):
2389         (WebKit::PageViewportControllerClientEfl::setPageScaleFactor):
2390         * UIProcess/efl/WebView.cpp:
2391         (WebKit::WebView::WebView):
2392         (WebKit::WebView::paintToCairoSurface):
2393         (WebKit::WebView::transformToScene):
2394         (WebKit::WebView::updateViewportSize):
2395         (WebKit::WebView::pageDidRequestScroll):
2396         * UIProcess/efl/WebView.h:
2397         (WebKit::WebView::setContentScaleFactor):
2398         (WebKit::WebView::contentScaleFactor):
2399         (WebView):
2400         (WebKit::WebView::setContentPosition):
2401         (WebKit::WebView::contentPosition):
2402
2403 2013-04-05  Alberto Garcia  <agarcia@igalia.com>
2404
2405         [GTK][WK2] WebKitLoaderClient: add missing initializers
2406         https://bugs.webkit.org/show_bug.cgi?id=112961
2407
2408         Reviewed by Carlos Garcia Campos.
2409
2410         There are two new attributes: pluginLoadPolicy and pluginDidFail.
2411
2412         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
2413         (attachLoaderClientToView):
2414
2415 2013-04-05  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2416
2417         [WK2][EFL] Encapsulate view states set-up within WebView
2418         https://bugs.webkit.org/show_bug.cgi?id=110877
2419
2420         Reviewed by Benjamin Poulain.
2421
2422         View states set-up is encapsulated within WebView. This change
2423         reduces both usage of EwkView inside WebView class and usage of
2424         WebPageProxy inside EwkView class.
2425
2426         New WKView API was added so that EwkView can define whether or not
2427         the view is visible and focused.
2428
2429         * UIProcess/API/C/efl/WKView.cpp:
2430         (WKViewIsFocused):
2431         (WKViewSetIsFocused):
2432         (WKViewIsVisible):
2433         (WKViewSetIsVisible):
2434         * UIProcess/API/C/efl/WKView.h:
2435         * UIProcess/API/efl/EwkView.cpp:
2436         (::handleEvent):
2437         (EwkView::handleEvasObjectShow):
2438         (EwkView::handleEwkViewFocusIn):
2439         (EwkView::handleEwkViewFocusOut):
2440         * UIProcess/API/efl/EwkView.h:
2441         * UIProcess/efl/WebView.cpp:
2442         (WebKit::WebView::WebView):
2443         (WebKit::WebView::setFocused):
2444         (WebKit):
2445         (WebKit::WebView::setVisible):
2446         (WebKit::WebView::isViewFocused):
2447         (WebKit::WebView::isViewVisible):
2448         * UIProcess/efl/WebView.h:
2449         (WebKit::WebView::isFocused):
2450         (WebView):
2451         (WebKit::WebView::isVisible):
2452
2453 2013-04-04  KwangYong Choi  <ky0.choi@samsung.com>
2454
2455         [EFL][WK2] Add support for getting page contents as string
2456         https://bugs.webkit.org/show_bug.cgi?id=106752
2457
2458         Reviewed by Andreas Kling.
2459
2460         Modified ewk_view_page_contents_get() API to get page contents as string.
2461         EWK_PAGE_CONTENTS_TYPE_STRING is added to Ewk_Page_Contents_Type.
2462         Now, we can use both EWK_PAGE_CONTENTS_TYPE_MHTML and EWK_PAGE_CONTENTS_TYPE_STRING
2463         for getting page contents.
2464
2465         * UIProcess/API/efl/ewk_view.cpp:
2466         (Ewk_Page_Contents_Context):
2467         (ewkViewPageContentsAsMHTMLCallback):
2468         (ewkViewPageContentsAsStringCallback):
2469         (ewk_view_page_contents_get):
2470         * UIProcess/API/efl/ewk_view.h:
2471         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2472         (PageContentsAsMHTMLCallback):
2473         (PageContentsAsStringCallback):
2474         (TEST_F):
2475
2476 2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2477
2478         [Cairo] Stop passing raw pointers to BitmapImage::create()
2479         https://bugs.webkit.org/show_bug.cgi?id=113945
2480
2481         Reviewed by Martin Robinson.
2482
2483         Pass a smart pointer in to BitmapImage::create() instead of a raw one
2484         for the cairo surface. The factory method prototype was updated for
2485         cairo in r147643.
2486
2487         * Shared/cairo/ShareableBitmapCairo.cpp:
2488         (WebKit::ShareableBitmap::createImage):
2489
2490 2013-04-03  Dean Jackson  <dino@apple.com>
2491
2492         Expose settings to disable plugin snapshotting autostart and primary detection
2493         https://bugs.webkit.org/show_bug.cgi?id=113918
2494
2495         Reviewed by Tim Horton.
2496
2497         Three new settings: snapshotAllPlugIns, primaryPlugInSnapshotDetectionEnabled and
2498         autostartOriginPlugInSnapshottingEnabled.
2499         These are exposed via WKPreferences (WebKit2 only, since that's the only port actively
2500         using the feature).
2501
2502         * Shared/WebPreferencesStore.h: Add macros for new settings.
2503         * UIProcess/API/C/WKPreferences.cpp: Getters and setters for new settings.
2504         (WKPreferencesSetSnapshotAllPlugIns):
2505         (WKPreferencesGetSnapshotAllPlugIns):
2506         (WKPreferencesSetAutostartOriginPlugInSnapshottingEnabled):
2507         (WKPreferencesGetAutostartOriginPlugInSnapshottingEnabled):
2508         (WKPreferencesSetPrimaryPlugInSnapshotDetectionEnabled):
2509         (WKPreferencesGetPrimaryPlugInSnapshotDetectionEnabled):
2510         * UIProcess/API/C/WKPreferencesPrivate.h:
2511         * WebProcess/WebPage/WebPage.cpp:
2512         (WebKit::WebPage::updatePreferences): Forward settings updates.
2513         (WebKit::WebPage::addPluginView): Don't run primary plugin detection if the setting is false.
2514         (WebKit::WebPage::didFinishLoad): Ditto.
2515
2516 2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2517
2518         [Cairo] Fix canvas drawing of SVG-based patterns and remove NativeImageCairo
2519         https://bugs.webkit.org/show_bug.cgi?id=113929
2520
2521         Reviewed by Martin Robinson.
2522
2523         Update code now that PassNativeImagePtr is now a typedef to PassRefPtr<cairo_surface_t>
2524         instead of NativeImageCairo*.
2525
2526         * Shared/gtk/ArgumentCodersGtk.cpp:
2527         (CoreIPC::decodeImage):
2528         * UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp:
2529         (WKIconDatabaseTryGetCairoSurfaceForURL):
2530         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
2531         (getIconSurfaceSynchronously):
2532
2533 2013-04-04  Sze Howe Koh  <szehowe.koh@gmail.com>
2534
2535         [Qt] docs: Fix module name format
2536         https://bugs.webkit.org/show_bug.cgi?id=113209
2537
2538         Reviewed by Jocelyn Turcotte.
2539
2540         Make QDoc-generated documentation follow the conventions at
2541         http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation
2542
2543         * UIProcess/API/qt/qquickwebview.cpp:
2544
2545 2013-04-04  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2546
2547         [WK2][EFL] WebView should own view size
2548         https://bugs.webkit.org/show_bug.cgi?id=110753
2549
2550         Reviewed by Andreas Kling.
2551
2552         WebView owns view size. WKViewGetSize and WKViewSetSize API
2553         is exposed accordingly. Usage of EFL-specific ewkView inside
2554         toolkit-agnostic WebView class is reduced.
2555
2556         * UIProcess/API/C/efl/WKView.cpp:
2557         (WKViewGetSize):
2558         (WKViewSetSize):
2559         * UIProcess/API/C/efl/WKView.h:
2560         * UIProcess/API/efl/EwkView.cpp:
2561         (EwkView::setDeviceScaleFactor):
2562         (EwkView::size):
2563         (EwkView::deviceSize):
2564         (EwkView::scheduleUpdateDisplay):
2565         (EwkView::handleEvasObjectCalculate):
2566         * UIProcess/API/efl/EwkView.h:
2567         (EwkView):
2568         * UIProcess/efl/WebView.cpp:
2569         (WebKit::WebView::setSize):
2570         (WebKit):
2571         (WebKit::WebView::paintToCurrentGLContext):
2572         (WebKit::WebView::updateViewportSize):
2573         (WebKit::WebView::viewSize):
2574         (WebKit::WebView::dipSize):
2575         * UIProcess/efl/WebView.h:
2576         (WebView):
2577         (WebKit::WebView::size):
2578
2579 2013-04-03  Anders Carlsson  <andersca@apple.com>
2580
2581         Don't try to set the exception port for server connections
2582         https://bugs.webkit.org/show_bug.cgi?id=113910
2583         <rdar://problem/11248925>
2584
2585         Reviewed by Darin Adler.
2586
2587         Treat a SetExceptionPort message to the server connection as an invalid message.
2588
2589         * Platform/CoreIPC/mac/ConnectionMac.cpp:
2590         (CoreIPC::Connection::receiveSourceEventHandler):
2591
2592 2013-04-02  Mark Rowe  <mrowe@apple.com>
2593
2594         <http://webkit.org/b/113898> Eliminate some code duplication by introducing an array of handlers to register / unregister.
2595
2596         Reviewed by Antti Koivisto.
2597
2598         * UIProcess/mac/WebContextMac.mm:
2599         (OcclusionNotificationHandler): Structure containing the notification name, type and handler.
2600         (WebKit::registerOcclusionNotificationHandlers): Register all of the handlers in the array.
2601         (WebKit::unregisterOcclusionNotificationHandlers): Unregister all of the handlers in the array.
2602
2603 2013-04-02  Mark Rowe  <mrowe@apple.com>
2604
2605         Enable process suppression when no windows in the application have drawn recently.
2606         <http://webkit.org/b/113854> / <rdar://problem/13540351>
2607
2608         Reviewed by Darin Adler.
2609
2610         * UIProcess/mac/WebContextMac.mm:
2611         (WebKit::applicationWindowModificationsStarted): Note that modifications are no longer stopped.
2612         (WebKit::applicationWindowModificationsStopped): Note that modifications have stopped.
2613         (WebKit::registerOcclusionNotificationHandlers): Register handlers for the start and stop notifications.
2614         (WebKit::unregisterOcclusionNotificationHandlers): Unregister handlers for the start and stop notifications.
2615         (WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess): Allow suppression if the application is occluded
2616         or the application has not drawn recently.
2617         (WebKit::WebContext::canEnableProcessSuppressionForWebProcess): Ditto.
2618         (WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses): Ditto.
2619
2620 2013-04-03  Dean Jackson  <dino@apple.com>
2621
2622         Cross fade into restarted plugin
2623         https://bugs.webkit.org/show_bug.cgi?id=113868
2624
2625         Reviewed by Tim Horton.
2626
2627         Add a new plugin process type that indicates this is a plugin that
2628         has been restarted from snapshotting. On Apple ports, this allows
2629         us to animate the appearance of the plugin so that it crossfades
2630         with the snapshot. Other ports will have to add their own fading.
2631
2632         * PluginProcess/PluginProcess.h: New Type: TypeRestartedProcess.
2633         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
2634         (WebKit::PluginProxy::pluginLayer): When the plugin's CALayer is created, if it
2635             is a restarted plugin, add an opacity animation to fade it in.
2636         * WebProcess/WebPage/WebPage.cpp:
2637         (WebKit::WebPage::createPlugin): Mark restarted plugins with the new process type.
2638
2639 2013-04-03  Alexey Proskuryakov  <ap@apple.com>
2640
2641         <rdar://problem/13564588> Add a temporary workaround for a build failure.
2642
2643         Fix suggested by Mark Rowe.
2644
2645         * Shared/mac/ChildProcessMac.mm:
2646
2647 2013-04-03  Alexey Proskuryakov  <ap@apple.com>
2648
2649         [WK2] XMLHttpRequest upload events don't work with NetworkProcess
2650         https://bugs.webkit.org/show_bug.cgi?id=113887
2651
2652         Reviewed by Brady Eidson.
2653
2654         Just forward didSendData client call to WebProcess.
2655
2656         * NetworkProcess/NetworkResourceLoader.cpp:
2657         (WebKit::NetworkResourceLoader::didSendData):
2658         (WebKit::NetworkResourceLoader::didCancelAuthenticationChallenge): Tweaked a comment.
2659         * WebProcess/Network/WebResourceLoader.cpp:
2660         (WebKit::WebResourceLoader::didSendData):
2661         * WebProcess/Network/WebResourceLoader.h:
2662         * WebProcess/Network/WebResourceLoader.messages.in:
2663
2664 2013-04-02  Ryosuke Niwa  <rniwa@webkit.org>
2665
2666         Remove code for Mac 10.5 and earlier from WTF and WebKit2
2667         https://bugs.webkit.org/show_bug.cgi?id=113844
2668
2669         Reviewed by Benjamin Poulain.
2670
2671         Removed the code for 10.5 and removed if-def for 10.6.
2672
2673         * Shared/mac/PasteboardTypes.mm:
2674         (WebKit::PasteboardTypes::forEditing):
2675
2676 2013-04-02  Anders Carlsson  <andersca@apple.com>
2677
2678         Be more robust against empty message receiver names in incoming messages
2679         https://bugs.webkit.org/show_bug.cgi?id=113833
2680         <rdar://problem/13284433>
2681
2682         Reviewed by Beth Dakin.
2683
2684         Turns out that we either send or receive messages whose receiver names are empty. This leads to bad things when we try to look
2685         up the message receiver name in a hash map since the empty name is used to represent an empty hash map value.
2686
2687         * Platform/CoreIPC/Connection.cpp:
2688         (CoreIPC::Connection::addWorkQueueMessageReceiverOnConnectionWorkQueue):
2689         Sprinkle assertions.
2690
2691         (CoreIPC::Connection::processIncomingMessage):
2692         If the message receiver name is not valid, make sure to call didReceiveInvalidMessage on the client thread.
2693
2694         (CoreIPC::Connection::dispatchDidReceiveInvalidMessage):
2695         Add new helper function.
2696
2697 2013-04-02  Simon Cooper  <scooper@apple.com>
2698
2699         [Mac][WK2] Don’t let plug-ins use System V shared memory
2700         https://bugs.webkit.org/show_bug.cgi?id=113466
2701         <rdar://problem/13159030>
2702
2703         Reviewed, tweaked and landed by Alexey Proskuryakov.
2704
2705         Instead of allowing plug-ins to request System V shm, give them a
2706         temporary but usable alternative if they try to request it.
2707
2708         * PluginProcess/mac/PluginProcessShim.mm:
2709
2710 2013-04-02  Anders Carlsson  <andersca@apple.com>
2711
2712         Add WKContextSetInvalidMessageFunction
2713         https://bugs.webkit.org/show_bug.cgi?id=113820
2714         <rdar://problem/12679817>
2715
2716         Reviewed by Tim Horton.
2717
2718         * UIProcess/API/C/WKContext.cpp:
2719         (WKContextSetInvalidMessageFunction):
2720         Call WebContext::didReceiveInvalidMessage.
2721
2722         * UIProcess/API/C/WKContextPrivate.h:
2723         * UIProcess/WebContext.cpp:
2724         (WebKit::WebContext::setInvalidMessageCallback):
2725         Set the global variable.
2726
2727         (WebKit::WebContext::didReceiveInvalidMessage):
2728         Construct a message name string and call the invalid message callback.
2729
2730         * UIProcess/WebProcessProxy.cpp:
2731         (WebKit::WebProcessProxy::didReceiveInvalidMessage):
2732         Call WebContext::didReceiveInvalidMessage.
2733
2734 2013-04-02  Alexey Proskuryakov  <ap@apple.com>
2735
2736         [Mac] Remove WKCreateNSURLConnectionDelegateProxy
2737         https://bugs.webkit.org/show_bug.cgi?id=113810
2738
2739         Reviewed by Anders Carlsson.
2740
2741         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2742         (InitWebCoreSystemInterface):
2743
2744 2013-04-02  Alexey Proskuryakov  <ap@apple.com>
2745
2746         <rdar://problem/13551119> [WK2] Crashes in NetworkProcess when canceling loads
2747         https://bugs.webkit.org/show_bug.cgi?id=113803
2748
2749         Reviewed by Darin Adler.
2750
2751         * Shared/Downloads/mac/DownloadMac.mm: (WebKit::Download::startWithHandle):
2752         Just pass nil instead of proxy.
2753
2754 2013-04-02  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2755
2756         [WK2] Remove repeating code in declaration of WK2 API classes
2757         https://bugs.webkit.org/show_bug.cgi?id=112782
2758
2759         Reviewed by Benjamin Poulain.
2760
2761         The following two lines of code had been repeated in every WK2 API
2762         object class:
2763         1) static const Type APIType = SomeAPIType;
2764         2) virtual Type type() const { return APIType; }
2765
2766         This patch introduces template class 'TypedAPIObject' inherited
2767         from WebKit::APIObject and it contains the common functionality. 
2768         So the new pattern is that API object classes are inherited from
2769         TypedAPIObject (rather than from WebKit::APIObject directly) passing
2770         the corresponding API object type as a template parameter.
2771
2772         The existing API object classes are modified accordingly to the
2773         proposed pattern.
2774
2775         * Shared/APIObject.h:
2776         (WebKit):
2777         (TypedAPIObject):
2778         (WebKit::TypedAPIObject::~TypedAPIObject):
2779         (WebKit::TypedAPIObject::TypedAPIObject):
2780         * Shared/ImmutableArray.h:
2781         (ImmutableArray):
2782         * Shared/ImmutableDictionary.h:
2783         (ImmutableDictionary):
2784         * Shared/WebArchive.h:
2785         (WebArchive):
2786         * Shared/WebArchiveResource.h:
2787         (WebArchiveResource):
2788         * Shared/WebBackForwardListItem.h:
2789         (WebBackForwardListItem):
2790         * Shared/WebBatteryStatus.h:
2791         (WebBatteryStatus):
2792         * Shared/WebCertificateInfo.h:
2793         * Shared/WebConnection.h:
2794         (WebConnection):
2795         * Shared/WebContextMenuItem.h:
2796         (WebContextMenuItem):
2797         * Shared/WebData.h:
2798         * Shared/WebError.h:
2799         (WebKit::WebError::errorCode):
2800         * Shared/WebGeolocationPosition.h:
2801         (WebGeolocationPosition):
2802         * Shared/WebGeometry.h:
2803         * Shared/WebGraphicsContext.h:
2804         (WebGraphicsContext):
2805         * Shared/WebHitTestResult.h:
2806         * Shared/WebImage.h:
2807         (WebImage):
2808         * Shared/WebNetworkInfo.h:
2809         (WebNetworkInfo):
2810         * Shared/WebNumber.h:
2811         * Shared/WebOpenPanelParameters.h:
2812         (WebOpenPanelParameters):
2813         * Shared/WebRenderLayer.h:
2814         * Shared/WebRenderObject.h:
2815         * Shared/WebSecurityOrigin.h:
2816         * Shared/WebSerializedScriptValue.h:
2817         (WebSerializedScriptValue):
2818         * Shared/WebString.h:
2819         * Shared/WebURL.h:
2820         * Shared/WebURLRequest.h:
2821         (WebURLRequest):
2822         * Shared/WebURLResponse.h:
2823         (WebURLResponse):
2824         * Shared/WebUserContentURLPattern.h:
2825         * Shared/mac/ObjCObjectGraph.h:
2826         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
2827         (AuthenticationChallengeProxy):
2828         * UIProcess/Authentication/AuthenticationDecisionListener.h:
2829         (AuthenticationDecisionListener):
2830         * UIProcess/Authentication/WebCredential.h:
2831         (WebCredential):
2832         * UIProcess/Authentication/WebProtectionSpace.h:
2833         (WebProtectionSpace):
2834         * UIProcess/Downloads/DownloadProxy.h:
2835         (DownloadProxy):
2836         * UIProcess/GeolocationPermissionRequestProxy.h:
2837         (GeolocationPermissionRequestProxy):
2838         * UIProcess/Notifications/NotificationPermissionRequest.h:
2839         (NotificationPermissionRequest):
2840         * UIProcess/Notifications/WebNotification.h:
2841         (WebNotification):
2842         * UIProcess/Notifications/WebNotificationManagerProxy.h:
2843         (WebNotificationManagerProxy):
2844         * UIProcess/Plugins/WebPluginSiteDataManager.h:
2845         (WebPluginSiteDataManager):
2846         * UIProcess/WebApplicationCacheManagerProxy.h:
2847         (WebApplicationCacheManagerProxy):
2848         * UIProcess/WebBackForwardList.h:
2849         (WebBackForwardList):
2850         * UIProcess/WebBatteryManagerProxy.h:
2851         (WebBatteryManagerProxy):
2852         * UIProcess/WebContext.h:
2853         (WebContext):
2854         * UIProcess/WebCookieManagerProxy.h:
2855         (WebCookieManagerProxy):
2856         * UIProcess/WebDatabaseManagerProxy.h:
2857         (WebDatabaseManagerProxy):
2858         * UIProcess/WebEditCommandProxy.h:
2859         (WebEditCommandProxy):
2860         * UIProcess/WebFrameProxy.h:
2861         (WebFrameProxy):
2862         * UIProcess/WebGeolocationManagerProxy.h:
2863         (WebGeolocationManagerProxy):
2864         * UIProcess/WebGrammarDetail.h:
2865         (WebGrammarDetail):
2866         * UIProcess/WebIconDatabase.h:
2867         (WebIconDatabase):
2868         * UIProcess/WebInspectorProxy.h:
2869         (WebInspectorProxy):
2870         * UIProcess/WebKeyValueStorageManagerProxy.h:
2871         (WebKeyValueStorageManagerProxy):
2872         * UIProcess/WebMediaCacheManagerProxy.h:
2873         (WebMediaCacheManagerProxy):
2874         * UIProcess/WebNavigationData.h:
2875         (WebNavigationData):
2876         * UIProcess/WebNetworkInfoManagerProxy.h:
2877         (WebNetworkInfoManagerProxy):
2878         * UIProcess/WebOpenPanelResultListenerProxy.h:
2879         (WebOpenPanelResultListenerProxy):
2880         * UIProcess/WebPageGroup.h:
2881         (WebPageGroup):
2882         * UIProcess/WebPageProxy.h:
2883         (WebPageProxy):
2884         * UIProcess/WebPreferences.cpp:
2885         (WebKit::WebPreferences::WebPreferences):
2886         * UIProcess/WebPreferences.h:
2887         (WebPreferences):
2888         * UIProcess/WebResourceCacheManagerProxy.h:
2889         (WebResourceCacheManagerProxy):
2890         * UIProcess/WebTextChecker.h:
2891         (WebTextChecker):
2892         * UIProcess/WebVibrationProxy.h:
2893         (WebVibrationProxy):
2894         * UIProcess/efl/WebPopupItemEfl.h:
2895         (WebPopupItemEfl):
2896         * UIProcess/efl/WebView.h:
2897         * UIProcess/soup/WebSoupRequestManagerProxy.h:
2898         (WebSoupRequestManagerProxy):
2899         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
2900         (InjectedBundleNodeHandle):
2901         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
2902         (InjectedBundleRangeHandle):
2903         * WebProcess/InjectedBundle/InjectedBundle.h:
2904         (InjectedBundle):
2905         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
2906         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
2907         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h:
2908         (InjectedBundleDOMWindowExtension):
2909         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
2910         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
2911         (InjectedBundleNavigationAction):
2912         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
2913         (InjectedBundleScriptWorld):
2914         * WebProcess/WebPage/PageOverlay.h:
2915         (PageOverlay):
2916         * WebProcess/WebPage/WebFrame.h:
2917         (WebFrame):
2918         * WebProcess/WebPage/WebInspector.h:
2919         (WebInspector):
2920         * WebProcess/WebPage/WebPage.h:
2921         (WebPage):
2922         * WebProcess/WebPage/WebPageGroupProxy.h:
2923         (WebPageGroupProxy):
2924
2925 2013-04-01  Timothy Hatcher  <timothy@apple.com>
2926
2927         Allow changing Web Inspector dock sides without undocking first.
2928
2929         https://webkit.org/b/113661
2930         rdar://problem/13543127
2931
2932         Reviewed by Joseph Pecoraro.
2933
2934         * UIProcess/WebInspectorProxy.cpp:
2935         (WebKit::WebInspectorProxy::createInspectorPage): Send AttachedBottom and
2936         AttachedRight messages so InspectorFrontendClientLocal knows which side we
2937         are attached.
2938
2939         (WebKit::WebInspectorProxy::canAttach): If we are already attached, allow
2940         attaching again to allow switching sides.
2941
2942 2013-04-01  Anders Carlsson  <andersca@apple.com>
2943
2944         Nor this! (Who reviewed this anyway!)
2945
2946         * WebProcess/Storage/StorageNamespaceProxy.cpp:
2947         (WebKit::StorageNamespaceProxy::storageArea):
2948
2949 2013-04-01  Anders Carlsson  <andersca@apple.com>
2950
2951         Didn't mean to commit this!
2952
2953         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2954
2955 2013-04-01  Alexey Proskuryakov  <ap@apple.com>
2956
2957         https://bugs.webkit.org/show_bug.cgi?id=113721
2958         <rdar://problem/13549181> REGRESSION (r146929): HTTP auth credentials not reused during session
2959
2960         Reviewed by Brady Eidson.
2961
2962         * NetworkProcess/NetworkResourceLoader.h:
2963         * NetworkProcess/NetworkResourceLoader.cpp:
2964         (WebKit::NetworkResourceLoader::shouldUseCredentialStorage): Added an override that
2965         we still need. It's not great, but causes no trouble for NetworkProcess.
2966         (WebKit::NetworkResourceLoader::shouldUseCredentialStorageAsync): Implement in
2967         terms of sync version to avoid duplicating logic.
2968
2969 2013-03-05  Anders Carlsson  <andersca@apple.com>
2970
2971         Apply changes from storage events locally
2972         https://bugs.webkit.org/show_bug.cgi?id=111502
2973
2974         Reviewed by Sam Weinig.
2975
2976         * WebProcess/Storage/StorageAreaProxy.cpp:
2977         (WebKit::StorageAreaProxy::StorageAreaProxy):
2978         Store the security origin as a member variable.
2979
2980         (WebKit::StorageAreaProxy::dispatchStorageEvent):
2981         Set the item and call the appropriate event dispatch function.
2982     
2983         (WebKit::StorageAreaProxy::dispatchSessionStorageEvent):
2984         (WebKit::StorageAreaProxy::dispatchLocalStorageEvent):
2985         Add stubs.
2986
2987         * WebProcess/Storage/StorageAreaProxy.h:
2988
2989 2013-04-01  Alexey Proskuryakov  <ap@apple.com>
2990
2991         <rdar://problem/13490123> Sandbox extension tracking is incorrect when restoring a session
2992         https://bugs.webkit.org/show_bug.cgi?id=113709
2993
2994         Reviewed by Anders Carlsson.
2995
2996         * WebProcess/WebPage/WebPage.cpp:
2997         (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad): Added an assertion
2998         to catch extension tracking logic errors that could result in giving an extension to
2999         non-local pages.
3000         (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad): Just like
3001         below, clearing m_pendingProvisionalSandboxExtension appears incorrect, even though
3002         I am not aware of any scenarios where this happens in practice.
3003         (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad): The load may
3004         be failing exactly because a new one cancels it, so we shouldn't be preventing
3005         the new one from using its extension.
3006
3007 2013-04-01  Brady Eidson  <beidson@apple.com>
3008
3009         SharedMemory release build hardening.
3010         <rdar://problem/13546860> and https://bugs.webkit.org/show_bug.cgi?id=113710
3011
3012         Reviewed by Anders Carlsson.
3013
3014         Successful creation of a memory entry with a size less than the size we requested should be treated
3015         as a failure to create the SharedMemory object.
3016
3017         * Platform/mac/SharedMemoryMac.cpp:
3018         (WebKit::SharedMemory::createFromVMBuffer): Early return if the port we get is bogus for our needs.
3019         (WebKit::SharedMemory::createHandle): Ditto.
3020         (WebKit::SharedMemory::create): Guarantee we pass valid input in to mach_vm_map.
3021
3022 2013-03-30  Csaba Osztrogonác  <ossy@webkit.org>
3023
3024         Unreviewed buildfix after r147260.
3025
3026         * WebProcess/qt/QtBuiltinBundlePage.cpp:
3027         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
3028
3029 2013-03-29  Seokju Kwon  <seokju.kwon@gmail.com>
3030
3031         [EFL] Unreviewed build fix after r147251
3032         https://bugs.webkit.org/show_bug.cgi?id=113631
3033
3034         Unreviewed build fix.
3035
3036         Add NETWORK_PROCESS guard.
3037
3038         * UIProcess/WebResourceCacheManagerProxy.cpp:
3039         (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins):
3040
3041 2013-03-29  Brady Eidson  <beidson@apple.com>
3042
3043         Crash when "willSendRequest" causes the ResourceLoader to be cancelled.
3044         <rdar://problem/13531679> and https://bugs.webkit.org/show_bug.cgi?id=113616
3045
3046         Reviewed by Alexey Proskuryakov.
3047
3048         These callbacks to the WebCore ResourceLoader can cause the WebResourceLoader to be destroyed.
3049         A RefPtr<> protector fixes that.
3050
3051         Additionally we can invalidate the WebResourceLoader to avoid unnecessary callbacks to the NetworkProcess.
3052
3053         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3054         (WebKit::WebResourceLoadScheduler::remove): Call detachFromCoreLoader() on a removed WebResourceLoader.
3055
3056         * WebProcess/Network/WebResourceLoader.cpp:
3057         (WebKit::WebResourceLoader::detachFromCoreLoader): Clear out the ResourceLoader pointer.
3058         (WebKit::WebResourceLoader::willSendRequest): Protect this, and don't message back to the NetworkProcess if its not needed.
3059         (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto
3060         (WebKit::WebResourceLoader::didReceiveResource): Paranoid hardening - Protect this before delivering the data to the WebCore
3061           ResourceLoader, and null check it before delivering the "didFinishLoader" call.
3062         * WebProcess/Network/WebResourceLoader.h:
3063
3064 2013-03-29  Brady Eidson  <beidson@apple.com>
3065
3066         Should never send events to plugins waiting on asynchronous initialization.
3067         <rdar://problem/13538945> and https://bugs.webkit.org/show_bug.cgi?id=113612
3068
3069         Reviewed by Anders Carlsson.
3070
3071         Sending mouse and keyboard events to a plugin in the middle of asynchronous initialization is silly.
3072
3073         A quick audit of the sendSync() messages in PluginProxy suggests the following 8 can just have an early return:
3074
3075         * WebProcess/Plugins/PluginProxy.cpp:
3076         (WebKit::PluginProxy::handleMouseEvent):
3077         (WebKit::PluginProxy::handleWheelEvent):
3078         (WebKit::PluginProxy::handleMouseEnterEvent):
3079         (WebKit::PluginProxy::handleMouseLeaveEvent):
3080         (WebKit::PluginProxy::handleKeyboardEvent):
3081         (WebKit::PluginProxy::handleEditingCommand):
3082         (WebKit::PluginProxy::isEditingCommandEnabled):
3083         (WebKit::PluginProxy::handlesPageScaleFactor):
3084
3085 2013-03-29  Brady Eidson  <beidson@apple.com>
3086
3087         Should never send events to plugins waiting on asynchronous initialization.
3088         <rdar://problem/13538945> and https://bugs.webkit.org/show_bug.cgi?id=113612
3089
3090         Reviewed by Anders Carlsson.
3091
3092         Sending mouse and keyboard events to a plugin in the middle of asynchronous initialization is silly.
3093
3094         A quick audit of the sendSync() messages in PluginProxy suggests the following 8 can just have an early return:
3095
3096         * WebProcess/Plugins/PluginProxy.cpp:
3097         (WebKit::PluginProxy::handleMouseEvent):
3098         (WebKit::PluginProxy::handleWheelEvent):
3099         (WebKit::PluginProxy::handleMouseEnterEvent):
3100         (WebKit::PluginProxy::handleMouseLeaveEvent):
3101         (WebKit::PluginProxy::handleKeyboardEvent):
3102         (WebKit::PluginProxy::handleEditingCommand):
3103         (WebKit::PluginProxy::isEditingCommandEnabled):
3104         (WebKit::PluginProxy::handlesPageScaleFactor):
3105
3106 2013-03-29  Alexey Proskuryakov  <ap@apple.com>
3107
3108         Expose FeatureObserver data to WebKit clients
3109         https://bugs.webkit.org/show_bug.cgi?id=113613
3110
3111         Reviewed by Sam Weinig.
3112
3113         * Shared/APIClientTraits.cpp:
3114         * Shared/APIClientTraits.h:
3115         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3116         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3117         (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
3118         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3119         Added a new injected bundle client call, featuresUsedInPage.
3120
3121         * WebProcess/WebPage/WebPage.cpp:
3122         (WebKit::WebPage::close):
3123         (WebKit::WebPage::didCommitLoad):
3124         (WebKit::WebPage::reportUsedFeatures):
3125         * WebProcess/WebPage/WebPage.h:
3126         Report features used in a page when navigating away, or when closing.
3127
3128 2013-03-29  Brady Eidson  <beidson@apple.com>
3129
3130         Crash when "willSendRequest" causes the ResourceLoader to be cancelled.
3131         <rdar://problem/13531679> and https://bugs.webkit.org/show_bug.cgi?id=113616
3132
3133         Reviewed by Alexey Proskuryakov.
3134
3135         These callbacks to the WebCore ResourceLoader can cause the WebResourceLoader to be destroyed.
3136         A RefPtr<> protector fixes that.
3137
3138         Additionally we can invalidate the WebResourceLoader to avoid unnecessary callbacks to the NetworkProcess.
3139
3140         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3141         (WebKit::WebResourceLoadScheduler::remove): Call detachFromCoreLoader() on a removed WebResourceLoader.
3142
3143         * WebProcess/Network/WebResourceLoader.cpp:
3144         (WebKit::WebResourceLoader::detachFromCoreLoader): Clear out the ResourceLoader pointer.
3145         (WebKit::WebResourceLoader::willSendRequest): Protect this, and don't message back to the NetworkProcess if its not needed.
3146         (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto
3147         (WebKit::WebResourceLoader::didReceiveResource): Paranoid hardening - Protect this before delivering the data to the WebCore
3148           ResourceLoader, and null check it before delivering the "didFinishLoader" call.
3149         * WebProcess/Network/WebResourceLoader.h:
3150
3151 2013-03-29  Brady Eidson  <beidson@apple.com>
3152
3153         Should never send events to plugins waiting on asynchronous initialization.
3154         <rdar://problem/13538945> and https://bugs.webkit.org/show_bug.cgi?id=113612
3155
3156         Reviewed by Anders Carlsson.
3157
3158         Sending mouse and keyboard events to a plugin in the middle of asynchronous initialization is silly.
3159
3160         A quick audit of the sendSync() messages in PluginProxy suggests the following 8 can just have an early return:
3161
3162         * WebProcess/Plugins/PluginProxy.cpp:
3163         (WebKit::PluginProxy::handleMouseEvent):
3164         (WebKit::PluginProxy::handleWheelEvent):
3165         (WebKit::PluginProxy::handleMouseEnterEvent):
3166         (WebKit::PluginProxy::handleMouseLeaveEvent):
3167         (WebKit::PluginProxy::handleKeyboardEvent):
3168         (WebKit::PluginProxy::handleEditingCommand):
3169         (WebKit::PluginProxy::isEditingCommandEnabled):
3170         (WebKit::PluginProxy::handlesPageScaleFactor):
3171
3172 2013-03-29  Brady Eidson  <beidson@apple.com>
3173
3174         "Empty cache..." clears the disk cache from each WebProcess.
3175         <rdar://problem/12456652> and https://bugs.webkit.org/show_bug.cgi?id=113603
3176
3177         Reviewed by Sam Weinig.
3178
3179         * NetworkProcess/NetworkProcess.cpp:
3180         (WebKit::NetworkProcess::NetworkProcess):
3181         (WebKit::NetworkProcess::terminate): Override ChildProcess::terminate to allow us to finish clearing the cache.
3182         * NetworkProcess/NetworkProcess.h:
3183
3184         * NetworkProcess/NetworkProcess.messages.in: Add the ClearCacheForAllOrigins message.
3185
3186         * NetworkProcess/mac/NetworkProcessMac.mm:
3187         (WebKit::NetworkProcess::clearCacheForAllOrigins): Clear the disk cache.
3188         (WebKit::NetworkProcess::platformTerminate): Wait for the clear to complete.
3189
3190         * UIProcess/WebResourceCacheManagerProxy.cpp:
3191         (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins): Message the network process, also.
3192
3193         * WebProcess/mac/WebProcessMac.mm:
3194         (WebKit::WebProcess::platformClearResourceCaches): Don't clear the disk cache if we use the network process.
3195
3196 2013-03-28  Brady Eidson  <beidson@apple.com>
3197
3198         We leak NetworkConnectionToWebProcess objects.
3199         <rdar://problem/13393118> and https://bugs.webkit.org/show_bug.cgi?id=113551
3200
3201         Reviewed by Anders Carlsson.
3202
3203         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3204         (WebKit::NetworkConnectionToWebProcess::didClose): Remove this from the global set
3205           of NetworkConnectionToWebProcess objects.
3206
3207 2013-03-28  Brady Eidson  <beidson@apple.com>
3208
3209         Resources are never revalidated/reloaded if a cached response exists on disk.
3210         <rdar://problem/13479890> and https://bugs.webkit.org/show_bug.cgi?id=113542
3211
3212         Reviewed by Alexey Proskuryakov.
3213
3214         Trying to get a cached resource in didReceiveResponse and then aborting the load
3215         meant we never performed any new loads.
3216
3217         We can check and see if the data is cached data inside didReceiveBuffer, instead.
3218
3219         * NetworkProcess/NetworkResourceLoader.cpp:
3220         (WebKit::NetworkResourceLoader::didReceiveResponse): Don't try for cached resources here.
3221         (WebKit::NetworkResourceLoader::didReceiveData): This callback should never be used.
3222         (WebKit::NetworkResourceLoader::didReceiveBuffer): Try to see if this data objected represents
3223           a file based mmaped buffer.
3224         * NetworkProcess/NetworkResourceLoader.h:
3225
3226         Refactor these utility functions to start from either a CFURLCachedResponse or a SharedBuffer:
3227         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
3228         (CFCachedURLResponseGetMemMappedData):
3229         (CFURLCacheIsMemMappedData):
3230         (WebKit::tryGetShareableHandleFromCFData):
3231         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse):
3232         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
3233
3234 2013-03-28  Tim Horton  <timothy_horton@apple.com>
3235
3236         [wk2] REGRESSION (r125500): WebFrameLoaderClient's active m_pluginView can be zeroed by PluginDocuments leaving the page cache
3237         https://bugs.webkit.org/show_bug.cgi?id=113430
3238         <rdar://problem/12729564>
3239
3240         Reviewed by Brady Eidson.
3241
3242         http://trac.webkit.org/changeset/147152 was wrong, and should have been
3243         (as the ChangeLog stated) testing the argument to redirectDataToPlugin,
3244         not the value of m_pluginView.
3245
3246         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3247         (WebKit::WebFrameLoaderClient::redirectDataToPlugin):
3248
3249 2013-03-28  Tim Horton  <timothy_horton@apple.com>
3250
3251         [wk2] REGRESSION (r125500): WebFrameLoaderClient's active m_pluginView can be zeroed by PluginDocuments leaving the page cache
3252         https://bugs.webkit.org/show_bug.cgi?id=113430
3253         <rdar://problem/12729564>
3254
3255         Reviewed by Brady Eidson.
3256
3257         Ignore redirectDataToPlugin(0), which is only called from PluginDocument::detach(),
3258         and only after r125500. Otherwise, PluginDocuments that are put into the page cache
3259         but leave later can clear a totally different and legitimate PluginView from the
3260         WebFrameLoaderClient, causing data to be lost and PluginDocument loads to stall.
3261
3262         This restores our behavior to the pre-r125500 state, which should be fine, as we
3263         clear WebFrameLoaderClient's m_pluginView when the load fails or finishes. This
3264         matches the changes made in r125500 for every platform other than Chromium and WebKit2.
3265
3266         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3267         (WebKit::WebFrameLoaderClient::redirectDataToPlugin):
3268
3269 2013-03-28  Tim Horton  <timothy_horton@apple.com>
3270
3271         PDFPlugin: shouldUsePDFPlugin can't use pdfLayerControllerClass() because it asserts if it's not available
3272         https://bugs.webkit.org/show_bug.cgi?id=113533
3273         <rdar://problem/13528720>
3274
3275         Reviewed by Simon Fraser.
3276
3277         * WebProcess/WebPage/WebPage.cpp:
3278         * WebProcess/WebPage/mac/WebPageMac.mm:
3279         (WebKit::WebPage::shouldUsePDFPlugin):
3280         Move shouldUsePDFPlugin to WebPageMac, where it belongs, and explicitly look up PDFLayerController
3281         instead of using pdfLayerControllerClass(), which ASSERT()s if it isn't available.
3282
3283 2013-03-28  Brady Eidson  <beidson@apple.com>
3284
3285         Reduce PluginProcess lifetime.
3286         <rdar://problem/12465479> and https://bugs.webkit.org/show_bug.cgi?id=113523
3287
3288         Reviewed by Sam Weinig.
3289
3290         Lower the minimum process lifetime from 30 minutes to 2 minutes.
3291         Lower the "shutdown after last plugin goes away" period from 10 minutes to 1 minute.
3292
3293         * UIProcess/Plugins/PluginProcessProxy.cpp:
3294
3295 2013-03-28  Zan Dobersek  <zdobersek@igalia.com>
3296
3297         [GTK] Build GTK-specific, non-layer-violating source code into WebCore-independent libPlatformGtk.la
3298         https://bugs.webkit.org/show_bug.cgi?id=112546
3299
3300         Reviewed by Martin Robinson.
3301
3302         * GNUmakefile.am: Reference the platform_webcore_cppflags and GTK, libsecret and libsoup dependencies' cflags amongst the
3303         libPlatformGtk2's CPPFLAGS.
3304         * Scripts/generate-forwarding-headers.pl: Remove the Platform framework from the list of the frameworks to be searched
3305         for forwarding headers, it's at the moment not necessary to be included.
3306         * Shared/gtk/ArgumentCodersGtk.cpp: Adjust the forwarding header for GtkVersioning.h that's been moved back under the
3307         WebCore framework.
3308         * Shared/gtk/WebEventFactory.cpp: Ditto.
3309         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto.
3310         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Ditto.
3311
3312 2013-03-27  Tim Horton  <timothy_horton@apple.com>
3313
3314         Unreviewed Qt build fix after http://trac.webkit.org/changeset/147067.
3315
3316         * WebProcess/WebPage/WebPage.cpp:
3317
3318 2013-03-27  Tim Horton  <timothy_horton@apple.com>
3319
3320         PDFPlugin: Enable PDFPlugin only if its dependencies exist on the system
3321         https://bugs.webkit.org/show_bug.cgi?id=113372
3322         <rdar://problem/12685301>
3323
3324         Reviewed by Alexey Proskuryakov.
3325
3326         * Shared/mac/PDFKitImports.h: Wrap in #if PLATFORM(MAC).
3327         * WebProcess/WebPage/WebPage.cpp:
3328         (WebKit::WebPage::createPlugin): Use shouldUsePDFPlugin.
3329         (WebKit::WebPage::shouldUsePDFPlugin): If the PDFPlugin setting is enabled but PDFLayerController is not available, don't use PDFPlugin.
3330         * WebProcess/WebPage/WebPage.h:
3331         (WebPage): Add shouldUsePDFPlugin
3332         * WebProcess/WebPage/mac/WebPageMac.mm:
3333         (WebKit::WebPage::platformPreferencesDidChange): Use shouldUsePDFPlugin.
3334
3335 2013-03-27  Sam Weinig  <sam@webkit.org>
3336
3337         [WebKit2] Need SPI to determine whether a plug-in is blocked
3338         https://bugs.webkit.org/show_bug.cgi?id=113463
3339
3340         Reviewed by Anders Carlsson.
3341
3342         Add new SPI, WKContextCopyPlugInInfoForBundleIdetifier, to get data about a plug-in,
3343         including whether it is blocked by x-protect.
3344
3345         * UIProcess/WebLoaderClient.cpp:
3346         * UIProcess/API/C/WKAPICast.h:
3347         (WebKit::toWKPluginLoadPolicy):
3348         (WebKit::toPluginModuleLoadPolicy):
3349         Move to a shared location.
3350
3351         * UIProcess/API/C/mac/WKContextPrivateMac.h:
3352         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3353         (WKContextIsPlugInUpdateAvailable):
3354         (WKPlugInInfoPathKey):
3355         (WKPlugInInfoBundleIdentifierKey):
3356         (WKPlugInInfoVersionKey):
3357         (WKPlugInInfoLoadPolicyKey):
3358         (WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey):
3359         (WKContextCopyPlugInInfoForBundleIdetifier):
3360         Add new SPI and dictionary keys.
3361
3362         * UIProcess/Plugins/PluginInfoStore.cpp:
3363         (WebKit::PluginInfoStore::findPluginWithBundleIdentifer):
3364         * UIProcess/Plugins/PluginInfoStore.h:
3365         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
3366         (WebKit::PluginInfoStore::findPluginWithBundleIdentifer):
3367         Add function to lookup plug-ins by bundle identifier.
3368
3369 2013-03-27  Beth Dakin  <bdakin@apple.com>
3370
3371         WKBundlePagePrivateMac.h is not being exported
3372         https://bugs.webkit.org/show_bug.cgi?id=113470
3373         -and corresponding-
3374         <rdar://problem/13522909>
3375
3376         Reviewed by Sam Weinig.
3377
3378         Mark it as private instead of project.
3379         * WebKit2.xcodeproj/project.pbxproj:
3380
3381 2013-03-26  Beth Dakin  <bdakin@apple.com>
3382
3383         Need WK2 API to give a WebView a header and footer
3384         https://bugs.webkit.org/show_bug.cgi?id=113352
3385         -and corresponding-
3386         <rdar://problem/13383835>
3387
3388         Reviewed by Simon Fraser.
3389
3390         New API allows setting and getting layers for a header and footer.
3391
3392         * WebKit2.xcodeproj/project.pbxproj:
3393         * WebProcess/InjectedBundle/API/c/mac: Added.
3394         * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.h: Added.
3395         * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.mm: Added.
3396         (WKBundlePageGetHeaderLayer):
3397         (WKBundlePageSetHeaderLayer):
3398         (WKBundlePageGetFooterLayer):
3399         (WKBundlePageSetFooterLayer):
3400         * WebProcess/WebPage/WebPage.h:
3401         (WebPage):
3402         * WebProcess/WebPage/mac/WebPageMac.mm:
3403         (WebKit::WebPage::setTopOverhangImage):
3404         (WebKit::WebPage::setBottomOverhangImage):
3405         (WebKit):
3406         (WebKit::WebPage::getHeaderLayer):
3407         (WebKit::WebPage::setHeaderLayerWithHeight):
3408         (WebKit::WebPage::getFooterLayer):
3409         (WebKit::WebPage::setFooterLayerWithHeight):
3410
3411 2013-03-27  Jer Noble  <jer.noble@apple.com>
3412
3413         Going full screen and cancelling gets system into a weird state
3414         https://bugs.webkit.org/show_bug.cgi?id=113445
3415
3416         Reviewed by Eric Carlson.
3417
3418         Replace an array of BOOL member variables to track full screen state with a single enum, and
3419         add state tracking for the "waiting to enter" and "waiting to exit" states. Use this new,
3420         more specific enum to be more stringent about the state when responding to WebProcess
3421         messages. Also only set the placeholder view's target once in full screen mode.
3422
3423         * UIProcess/mac/WKFullScreenWindowController.h:
3424         * UIProcess/mac/WKFullScreenWindowController.mm:
3425         (-[WKFullScreenWindowController isFullScreen]): Yes when in full screen, entering full screen,
3426             or waiting to enter full screen.
3427         (-[WKFullScreenWindowController cancelOperation:]): Only requestExitFullScreen() if a watchdog
3428             has not already been made active.
3429         (-[WKFullScreenWindowController enterFullScreen:]): Use the new state variable.
3430         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Ditto.
3431         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto. Set the placeholder target.
3432         (-[WKFullScreenWindowController exitFullScreen]): Ditto. Clear the placeholder target.
3433         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Ditto.
3434         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Ditto.
3435         (-[WKFullScreenWindowController performClose:]): Ditto.
3436         (-[WKFullScreenWindowController close]): Ditto.
3437         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Ditto.
3438
3439 2013-03-27  Brady Eidson  <beidson@apple.com>
3440
3441         Blind attempt at fixing the release build.
3442
3443         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
3444         (WebKit::NetworkResourceLoader::willCacheResponseAsync):
3445
3446 2013-03-27  Brady Eidson  <beidson@apple.com>
3447
3448         Mem mapped resource data improvements.
3449         <rdar://problem/13196481> and https://bugs.webkit.org/show_bug.cgi?id=113422
3450
3451         Reviewed by Alexey Proskuryakov (and looked over by Geoff Garen).
3452
3453         Remove timer-based approach support code:
3454         * NetworkProcess/NetworkResourceLoader.cpp:
3455         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
3456         (WebKit::NetworkResourceLoader::abortInProgressLoad):
3457         (WebKit::NetworkResourceLoader::didFinishLoading):
3458         * NetworkProcess/NetworkResourceLoader.h:
3459
3460         Add an object to encapsulate monitoring a resource going in to the disk cache.
3461         It listens for a callback on the cached response indicating it is disk backed
3462         and also sets a timeout so we don't keep the monitor alive and waiting forever.
3463         * NetworkProcess/mac/DiskCacheMonitor.h: Added.
3464         (WebKit::DiskCacheMonitor::destinationID):
3465         (WebKit::DiskCacheMonitor::connectionToWebProcess):
3466         (WebKit::DiskCacheMonitor::resourceRequest):
3467         * NetworkProcess/mac/DiskCacheMonitor.mm: Added.
3468         (CFCachedURLResponseSetBecameFileBackedCallBackBlock):
3469         (WebKit::monitorFileBackingStoreCreation):
3470         (WebKit::DiskCacheMonitor::DiskCachingMonitor):
3471         (WebKit::DiskCacheMonitor::connection):
3472
3473         Refactoring and monitor certain cached responses:
3474         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
3475         (CFCachedURLResponseGetMemMappedData):
3476         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse): Use CFCachedURLResponseGetMemMappedData
3477           to explicitly get an mem-mapped data object.
3478         (WebKit::NetworkResourceLoader::tryGetShareableHandleForResource):
3479         (WebKit::NetworkResourceLoader::willCacheResponseAsync): If the resource is over the minimum
3480           size then set up a disk caching monitor.
3481
3482         * WebKit2.xcodeproj/project.pbxproj:
3483
3484 2013-03-26  Timothy Hatcher  <timothy@apple.com>
3485
3486         Add support for dock-to-right of the Web Inspector in the Mac port.
3487
3488         Unfortunately this requires Safari changes, so it is disabled in the nightly builds.
3489
3490         https://webkit.org/b/113341
3491         rdar://problem/10368152
3492
3493         Reviewed by Joseph Pecoraro.
3494
3495         * Resources/Dock.pdf: Removed.
3496         * Resources/DockBottom.pdf: Added.
3497         * Resources/DockRight.pdf: Added.
3498         * Shared/WebPreferencesStore.h:
3499         * UIProcess/WebInspectorProxy.cpp:
3500         (WebKit::WebInspectorProxy::WebInspectorProxy):
3501         (WebKit::WebInspectorProxy::attachBottom):
3502         (WebKit::WebInspectorProxy::attachRight):
3503         (WebKit::WebInspectorProxy::attach):
3504         (WebKit::WebInspectorProxy::detach):
3505         (WebKit::WebInspectorProxy::setAttachedWindowWidth):
3506         (WebKit::WebInspectorProxy::createInspectorPage):
3507         (WebKit::WebInspectorProxy::canAttach):
3508         * UIProcess/WebInspectorProxy.h: