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