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