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