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