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