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