Simplify Cocoa platform user agent logic by using string constants instead of functio...
[WebKit-https.git] / Source / WebKit / ChangeLog-2012-10-02
1 2012-10-02  Alexey Proskuryakov  <ap@apple.com>
2
3         <rdar://problem/12407920> Need to keep track of messages posted to injected bundle before creating a page
4         https://bugs.webkit.org/show_bug.cgi?id=98210
5
6         Reviewed by Anders Carlsson.
7
8         Restore the pending message functionality, but only for shared process mode, and
9         under a different name.
10
11         * UIProcess/WebContext.cpp:
12         (WebKit::WebContext::setProcessModel):
13         (WebKit::WebContext::createNewWebProcess):
14         (WebKit::WebContext::postMessageToInjectedBundle):
15         * UIProcess/WebContext.h:
16
17 2012-10-02  Adrian Perez de Castro  <aperez@igalia.com>
18
19         Unix plugin process: xErrorString does not need to be defined in release builds
20         https://bugs.webkit.org/show_bug.cgi?id=98174
21
22         Reviewed by Alexey Proskuryakov.
23
24         The static xErrorString variable is used only for logging purposes,
25         so it causes a warning when doing relese builds (or, in general,
26         when logging is enabled). This disables building in the string
27         when LOG_DISABLED is defined.
28
29         Also, made the more constant by changing the "const char*" type
30         to "const char[]".
31
32         * PluginProcess/unix/PluginProcessMainUnix.cpp:
33         (WebKit):
34
35 2012-10-02  Anders Carlsson  <andersca@apple.com>
36
37         Fix crash in WebGeolocationManager constructor.
38
39         Defer adding the location manager until there actually is a connection.
40
41         * WebProcess/Geolocation/WebGeolocationManager.cpp:
42         (WebKit::WebGeolocationManager::WebGeolocationManager):
43         (WebKit::WebGeolocationManager::registerWebPage):
44         * WebProcess/Geolocation/WebGeolocationManager.h:
45         (WebGeolocationManager):
46
47 2012-10-02  Anders Carlsson  <andersca@apple.com>
48
49         Fix build.
50
51         * WebProcess/Geolocation/WebGeolocationManager.cpp:
52         (WebKit::WebGeolocationManager::WebGeolocationManager):
53
54 2012-10-02  Anders Carlsson  <andersca@apple.com>
55
56         Fix infinite recursion inside WebProcess constructor
57         https://bugs.webkit.org/show_bug.cgi?id=98206
58
59         Reviewed by Brian Weinstein.
60
61         Don't call WebProcess::shared from the WebGeolocationManager constructor since it is invoked from the WebProcess constructor.
62
63         * WebProcess/Geolocation/WebGeolocationManager.cpp:
64         (WebKit::WebGeolocationManager::WebGeolocationManager):
65
66 2012-10-02  Hugo Parente Lima  <hugo.lima@openbossa.org>
67
68         [WK2] Move some tiled backing store/viewport functions from Qt to generic WebKit2 sources
69         https://bugs.webkit.org/show_bug.cgi?id=98199
70
71         Reviewed by Noam Rosenthal.
72
73         Move commitPageTransitionViewport from Qt to WebKit2.
74
75         * UIProcess/WebPageProxy.cpp:
76         (WebKit):
77         (WebKit::WebPageProxy::commitPageTransitionViewport):
78         * UIProcess/qt/WebPageProxyQt.cpp:
79         * WebProcess/WebPage/WebPage.cpp:
80         (WebKit):
81         (WebKit::WebPage::commitPageTransitionViewport):
82         * WebProcess/WebPage/WebPage.h:
83         (WebPage):
84         * WebProcess/WebPage/WebPage.messages.in:
85         * WebProcess/WebPage/qt/WebPageQt.cpp:
86
87 2012-10-02  Anders Carlsson  <andersca@apple.com>
88
89         Build fixes.
90
91         * PluginProcess/mac/PluginProcessMac.mm:
92         (WebKit::beginModal):
93         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
94         (WebKit::PluginProcessProxy::getPluginProcessSerialNumber):
95         (WebKit::PluginProcessProxy::makePluginProcessTheFrontProcess):
96         (WebKit::PluginProcessProxy::makeUIProcessTheFrontProcess):
97         (WebKit::PluginProcessProxy::exitFullscreen):
98
99 2012-10-02  Alexey Proskuryakov  <ap@apple.com>
100
101         <rdar://problem/12407139> WebKit2 should provide API that returns all pages in the same process as a given page
102         https://bugs.webkit.org/show_bug.cgi?id=98193
103
104         Reviewed by Sam Weinig.
105
106         * UIProcess/API/C/WKPage.cpp:
107         (WKPageCopyRelatedPages):
108         * UIProcess/API/C/WKPagePrivate.h:
109         * UIProcess/WebPageProxy.cpp:
110         (WebKit::WebPageProxy::relatedPages):
111         * UIProcess/WebPageProxy.h:
112         * UIProcess/WebProcessProxy.cpp:
113         (WebKit::WebProcessProxy::pages):
114         * UIProcess/WebProcessProxy.h:
115         Added. This should work once a process has crashed, too.
116
117 2012-10-02  Anders Carlsson  <andersca@apple.com>
118
119         Allow LayerTreeHost subclasses to return a custom GraphicsLayerFactory
120         https://bugs.webkit.org/show_bug.cgi?id=98179
121
122         Reviewed by Andreas Kling.
123
124         Implement ChromeClient::graphicsLayerFactory and have it call the DrawingArea's graphicsLayerFactory which
125         for DrawingAreaImpl then calls down to the layer tree host. Make LayerTreeCoordinator implement GraphicsLayerFactory and
126         make it create CoordinatedGraphicsLayers.
127
128         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
129         (WebKit::WebChromeClient::graphicsLayerFactory):
130         (WebKit):
131         * WebProcess/WebCoreSupport/WebChromeClient.h:
132         (WebChromeClient):
133         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
134         (WebKit::LayerTreeCoordinator::createGraphicsLayer):
135         (WebKit):
136         (WebKit::LayerTreeCoordinator::graphicsLayerFactory):
137         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
138         (LayerTreeCoordinator):
139         * WebProcess/WebPage/DrawingArea.h:
140         (WebCore):
141         (WebKit::DrawingArea::graphicsLayerFactory):
142         * WebProcess/WebPage/DrawingAreaImpl.cpp:
143         (WebKit::DrawingAreaImpl::graphicsLayerFactory):
144         (WebKit):
145         * WebProcess/WebPage/DrawingAreaImpl.h:
146         (DrawingAreaImpl):
147         * WebProcess/WebPage/LayerTreeHost.h:
148         (WebCore):
149         (WebKit::LayerTreeHost::graphicsLayerFactory):
150         (LayerTreeHost):
151
152 2012-10-01  Anders Carlsson  <andersca@apple.com>
153
154         Attempt to simplify IPC message dispatching logic in WebKit2
155         https://bugs.webkit.org/show_bug.cgi?id=98097
156
157         Reviewed by Sam Weinig.
158
159         Move the Connection::MessageReceiver class to its own header file. Add a MessageReceiverMap helper class
160         that will be used for dispatching messages based on message class (and eventually destination ID).
161
162         Convert AuthenticationManager and WebGeolocationManager over to this new mechanism.
163
164         * CMakeLists.txt:
165         * GNUmakefile.list.am:
166         Add new files.
167
168         * Platform/CoreIPC/Connection.cpp:
169         (CoreIPC::Connection::dispatchMessage):
170         Check with the message receiver map first before calling Connection::Client::didReceiveMessage.
171
172         * Platform/CoreIPC/Connection.h:
173         (CoreIPC::Connection::addMessageReceiver):
174         Call through to the message receiver map.
175
176         * Platform/CoreIPC/MessageID.h:
177         (CoreIPC::MessageID::messageClass):
178         Rename MessageClassReserved to MessageClassInvalid.
179
180         (MessageID):
181         * Platform/CoreIPC/MessageReceiver.h:
182         Move MessageReceiver from Connection.h to its own file.
183
184         * Platform/CoreIPC/MessageReceiverMap.cpp:
185         New helper class.
186
187         (CoreIPC::MessageReceiverMap::addMessageReceiver):
188         Add the receiver to the map of receivers.
189
190         (CoreIPC::MessageReceiverMap::dispatchMessage):
191         Check if we have any registered receivers for this message class.
192
193         * Platform/CoreIPC/MessageReceiverMap.h:
194         New file.
195
196         * Target.pri:
197         Add new files.
198
199         * WebKit2.xcodeproj/project.pbxproj:
200         Add new files.
201
202         * WebProcess/Authentication/AuthenticationManager.cpp:
203         (WebKit::AuthenticationManager::AuthenticationManager):
204         * WebProcess/Authentication/AuthenticationManager.h:
205         (AuthenticationManager):
206         Register the authentication manager as a message receiver.
207
208         * WebProcess/Geolocation/WebGeolocationManager.cpp:
209         (WebKit::WebGeolocationManager::WebGeolocationManager):
210         * WebProcess/Geolocation/WebGeolocationManager.h:
211         (WebGeolocationManager):
212         Register the geolocation manager as a message receiver.
213
214         * WebProcess/WebProcess.cpp:
215         (WebKit::WebProcess::didReceiveMessage):
216         Remove checks for authentication manager and geolocation manager messages.
217
218         * win/WebKit2.vcproj:
219         Add new files.
220
221 2012-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
222
223         [GTK] Programs/WebKit2APITests/TestCookieManager fails
224         https://bugs.webkit.org/show_bug.cgi?id=98176
225
226         Reviewed by Martin Robinson.
227
228         The problem is that the soup server has a g_assert_not_reached()
229         for unknown paths, but know /favicon.icon might be requested.
230
231         * UIProcess/API/gtk/tests/TestCookieManager.cpp:
232         (serverCallback): Ignore unknown paths.
233
234 2012-10-02  Hugo Parente Lima  <hugo.lima@openbossa.org>
235
236         [WK2] PageViewportControllerClient.h uses WebCore class without declaring them
237         https://bugs.webkit.org/show_bug.cgi?id=98070
238
239         Reviewed by Kenneth Rohde Christiansen.
240
241         This patch just add forward declarations for code correctness.
242
243         * UIProcess/PageViewportControllerClient.h:
244         (WebCore):
245
246 2012-10-02  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
247
248         Fix tst_QQuickWebView::scrollRequest after r130029
249         https://bugs.webkit.org/show_bug.cgi?id=98045
250
251         Reviewed by Simon Hausmann.
252
253         The test needs to show the window and wait for the loadVisuallyCommitted()
254         signal like did in the QML API auto tests.
255
256         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
257         (tst_QQuickWebView::scrollRequest):
258         * UIProcess/API/qt/tests/util.cpp:
259         (waitForViewportReady):
260         * UIProcess/API/qt/tests/util.h:
261
262 2012-10-02  Jinwoo Song  <jinwoo7.song@samsung.com>
263
264         [EFL][WK2] Use correct gtest macro for testing true/false
265         https://bugs.webkit.org/show_bug.cgi?id=98142
266
267         Reviewed by Laszlo Gombos.
268
269         Using EXPECT_EQ(true/false, ...) makes clang trip when it tries to convert
270         true/false to a pointer. Tests should use EXPECT_TRUE/FALSE instead.
271
272         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
273         (showPopupMenu):
274         (TEST_F):
275
276 2012-10-01  Brady Eidson  <beidson@apple.com>
277
278         Remove the Safari 2 -> Safari 3 icon database import code.
279         https://bugs.webkit.org/show_bug.cgi?id=98113
280
281         Reviewed by Maciej Stachowiak.
282
283         Nuke the performImport() IconDatabaseClient method.
284
285         * UIProcess/WebIconDatabase.cpp:
286         (WebKit):
287         * UIProcess/WebIconDatabase.h:
288         (WebIconDatabase):
289
290 2012-10-01  Christophe Dumez  <christophe.dumez@intel.com>
291
292         Fix compilation warnings
293         https://bugs.webkit.org/show_bug.cgi?id=98020
294
295         Reviewed by Gyuyoung Kim.
296
297         Fix compilation warnings related to ewk_view.
298
299         * UIProcess/API/efl/ewk_view.cpp:
300         (_ewk_view_feed_touch_event_using_touch_point_list_of_evas):
301         (_ewk_view_on_touch_down):
302         (_ewk_view_on_touch_up):
303         (_ewk_view_on_touch_move):
304         * UIProcess/API/efl/ewk_view_ui_client.cpp:
305         (exceededDatabaseQuota):
306
307 2012-10-01  Claudio Saavedra  <csaavedra@igalia.com>
308
309         [GTK][WK2] Save the download uri as file metadata
310         https://bugs.webkit.org/show_bug.cgi?id=98043
311
312         Reviewed by Carlos Garcia Campos.
313
314         gio/gvfs can store file metadata, let's use this to
315         store the download uri.
316
317         * WebProcess/Downloads/soup/DownloadSoup.cpp:
318         (WebKit::DownloadClient::didReceiveResponse): Save
319         the download uri as metadata.
320
321 2012-10-01  Andras Becsi  <andras.becsi@digia.com>
322
323         [Qt][WK2] Device pixel ratio lost upon relaunch of the web process
324         https://bugs.webkit.org/show_bug.cgi?id=97908
325
326         Reviewed by Jocelyn Turcotte.
327
328         Use setIntrinsicDeviceScaleFactor instead of setCustomDeviceScaleFactor
329         when setting the device pixel ratio to make the setting permanent.
330
331         * UIProcess/API/qt/qquickwebview.cpp:
332         (QQuickWebViewPrivate::didRelaunchProcess):
333         (QQuickWebViewExperimental::setDevicePixelRatio):
334
335 2012-09-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
336
337         [Qt] Fix viewport QML auto tests after the viewport changes
338         https://bugs.webkit.org/show_bug.cgi?id=97781
339
340         Reviewed by Simon Hausmann.
341
342         Since the viewport controller has to hold any QML-side viewport updates
343         while it applies and render the new requested position, this has the
344         effect of blocking all those tests if the view is not visible (thus
345         disabling the tile rendering completely in the web process).
346         The viewport should be unlocked after the first rendered frame for
347         static contents.
348
349         Fix those tests by forcing the QQuickView to be visible and by making
350         them wait for the first frame rather than the earlier end of provisional load.
351
352         * UIProcess/API/qt/tests/qmltests/WebView/tst_doubleTapToZoom.qml:
353         * UIProcess/API/qt/tests/qmltests/WebView/tst_fitToView.qml:
354         * UIProcess/API/qt/tests/qmltests/WebView/tst_wheelEventHandling.qml:
355         * UIProcess/API/qt/tests/qmltests/common/TestWebView.qml:
356
357 2012-09-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
358
359         [Qt] Add a loadVisuallyCommitted() signal
360         https://bugs.webkit.org/show_bug.cgi?id=97780
361
362         Reviewed by Kenneth Rohde Christiansen.
363
364         This signal is emitted when the first DidRenderFrame message is received from
365         the web process after loadCommitted.
366
367         * UIProcess/API/qt/qquickwebview.cpp:
368         (QQuickWebViewPrivate::QQuickWebViewPrivate):
369         (QQuickWebViewPrivate::loadDidCommit):
370         (QQuickWebViewPrivate::setNeedsDisplay):
371         * UIProcess/API/qt/qquickwebview_p.h:
372         * UIProcess/API/qt/qquickwebview_p_p.h:
373         (QQuickWebViewPrivate):
374
375 2012-09-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
376
377         [Qt] Move Qt-only related methods from WebPageProxy.cpp to WebPageProxyQt.cpp
378
379         Reviewed by Simon Hausmann.
380
381         * UIProcess/WebPageProxy.cpp:
382         * UIProcess/qt/WebPageProxyQt.cpp:
383         (WebKit::WebPageProxy::didFindZoomableArea):
384         (WebKit):
385         (WebKit::WebPageProxy::findZoomableAreaForPoint):
386         (WebKit::WebPageProxy::didReceiveMessageFromNavigatorQtObject):
387         (WebKit::WebPageProxy::authenticationRequiredRequest):
388         (WebKit::WebPageProxy::proxyAuthenticationRequiredRequest):
389         (WebKit::WebPageProxy::certificateVerificationRequest):
390
391 2012-09-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
392
393         [Qt] Decide when to apply a scrolled position to the viewport based on the rect covered by the tiles
394         https://bugs.webkit.org/show_bug.cgi?id=97777
395
396         Reviewed by Kenneth Rohde Christiansen.
397
398         This patch achieves two things:
399         - Apply a short scroll position request directly if we already have rendered tiles
400           at this position.
401         - Since our visible rect request is asynchronous, the next frame might not always
402           be the one covering this position. This will wait for a frame that does to apply it.
403
404         * UIProcess/API/qt/raw/qrawwebview_p_p.h:
405         (QRawWebViewPrivate::didRenderFrame):
406         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
407         (WebKit::LayerTreeCoordinatorProxy::didRenderFrame):
408         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
409         (LayerTreeCoordinatorProxy):
410         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
411         * UIProcess/PageClient.h:
412         (PageClient):
413         * UIProcess/PageViewportController.cpp:
414         (WebKit::PageViewportController::didCommitLoad):
415         (WebKit::PageViewportController::didRenderFrame):
416         (WebKit::PageViewportController::pageDidRequestScroll):
417         * UIProcess/PageViewportController.h:
418         (PageViewportController):
419         * UIProcess/WebPageProxy.h:
420         (WebPageProxy):
421         * UIProcess/qt/QtPageClient.cpp:
422         (WebKit::QtPageClient::didRenderFrame):
423         * UIProcess/qt/QtPageClient.h:
424         (QtPageClient):
425         * UIProcess/qt/WebPageProxyQt.cpp:
426         (WebKit::WebPageProxy::didRenderFrame):
427         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
428         (WebCore::CoordinatedGraphicsLayer::coverRect):
429         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
430         (WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
431
432 2012-09-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
433
434         [Qt] Delay viewport position, scale and contents size updates until tiles are rendered
435         https://bugs.webkit.org/show_bug.cgi?id=97775
436
437         Reviewed by Kenneth Rohde Christiansen.
438
439         A few events from the web process can cause the viewport position or scale to be
440         adjusted in the UI process:
441         - Scroll position request
442         - Viewport attributes (initialScale, minimumScale)
443         - Contents size change
444
445         We previously applied those updates directly to the viewport, which would then in turn
446         produce a corresponding visible rect request to the web process to render the contents
447         at the new position/scale. This could leave the viewport showing the old content, either
448         by scaling the tiles, or by showing checkerboard if no contents was rendered at this
449         position yet. When the web process was done rendering new tiles, the proper tiles
450         were then shown to the user.
451         Since many of these updates happen during page load, all producing an iterative adjustment
452         to the viewport, this could show sharpness and position jitter until the final rendering
453         was done.
454
455         This patch makes those updates go through the PageViewportController first and then to the
456         QQuickWebView rather than the other way around, and keep them pending until the
457         LayerTreeHostProxy reports that the new tiles are ready to be shown. Since the rendering
458         is blocked until the page first layout is done, this apply the modifications to
459         the viewport only once when the first frame is ready to be shown.
460
461         * UIProcess/API/qt/qquickwebview.cpp:
462         * UIProcess/API/qt/qquickwebview_p_p.h:
463         (QQuickWebViewFlickablePrivate):
464         * UIProcess/API/qt/raw/qrawwebview_p_p.h:
465         (QRawWebViewPrivate::didRenderFrame):
466         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
467         (WebKit::LayerTreeCoordinatorProxy::didRenderFrame):
468         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
469         (LayerTreeCoordinatorProxy):
470         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
471         * UIProcess/PageClient.h:
472         (PageClient):
473         * UIProcess/PageViewportController.cpp:
474         (WebKit::PageViewportController::didCommitLoad):
475         (WebKit::PageViewportController::didChangeContentsSize):
476         (WebKit::PageViewportController::didRenderFrame):
477         (WebKit::PageViewportController::initialViewportReady):
478         (WebKit::PageViewportController::pageDidRequestScroll):
479         (WebKit::PageViewportController::didChangeContentsVisibility):
480         (WebKit::PageViewportController::resumeContent):
481         (WebKit::PageViewportController::applyScaleAfterRenderingContents):
482         (WebKit):
483         (WebKit::PageViewportController::applyPositionAfterRenderingContents):
484         (WebKit::PageViewportController::updateMinimumScaleToFit):
485         * UIProcess/PageViewportController.h:
486         (PageViewportController):
487         * UIProcess/PageViewportControllerClient.h:
488         (PageViewportControllerClient):
489         * UIProcess/WebPageProxy.h:
490         (WebPageProxy):
491         * UIProcess/qt/PageViewportControllerClientQt.cpp:
492         (WebKit::PageViewportControllerClientQt::didChangeContentsSize):
493         * UIProcess/qt/PageViewportControllerClientQt.h:
494         (PageViewportControllerClientQt):
495         * UIProcess/qt/QtPageClient.cpp:
496         (WebKit::QtPageClient::didRenderFrame):
497         (WebKit):
498         (WebKit::QtPageClient::didChangeContentsSize):
499         * UIProcess/qt/QtPageClient.h:
500         (QtPageClient):
501         * UIProcess/qt/QtWebPageLoadClient.cpp:
502         (WebKit::QtWebPageLoadClient::didCommitLoad):
503         * UIProcess/qt/WebPageProxyQt.cpp:
504         (WebKit::WebPageProxy::didRenderFrame):
505         (WebKit):
506         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
507         (WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
508
509 2012-09-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
510
511         [Qt] Wait for the UI process before re-enabling rendering during page load
512         https://bugs.webkit.org/show_bug.cgi?id=97773
513
514         Reviewed by Kenneth Rohde Christiansen.
515
516         During page navigation, WebCore might ask asynchronously the UI process to
517         scroll to an anchor or restored history position and the UI process will
518         return the corresponding visible rect to be rendered by the web process.
519
520         To avoid rendering tiles for the invalidated area by the new page layout at
521         the wrong position, we should do an extra message round-trip to the UI
522         process before resuming the rendering.
523         Assuming that all messages are handled in order by both the web and UI process,
524         sending the round-trip request in the web process once we sent all scroll
525         requests, contents size and viewport attributes updates and then handling
526         the round-trip response, we make sure that final visible rect request have
527         been handled already.
528
529         * UIProcess/API/qt/raw/qrawwebview.cpp:
530         (QRawWebViewPrivate::pageTransitionViewportReady):
531         * UIProcess/API/qt/raw/qrawwebview_p_p.h:
532         (QRawWebViewPrivate):
533         * UIProcess/PageClient.h:
534         (PageClient):
535         * UIProcess/PageViewportController.cpp:
536         (WebKit::PageViewportController::pageTransitionViewportReady):
537         (WebKit):
538         * UIProcess/PageViewportController.h:
539         (PageViewportController):
540         * UIProcess/WebPageProxy.h:
541         (WebPageProxy):
542         * UIProcess/WebPageProxy.messages.in:
543         * UIProcess/qt/QtPageClient.cpp:
544         (WebKit::QtPageClient::pageTransitionViewportReady):
545         (WebKit):
546         * UIProcess/qt/QtPageClient.h:
547         (QtPageClient):
548         * UIProcess/qt/WebPageProxyQt.cpp:
549         (WebKit::WebPageProxy::commitPageTransitionViewport):
550         (WebKit):
551         (WebKit::WebPageProxy::pageTransitionViewportReady):
552         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
553         (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
554         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
555         (WebKit::WebFrameLoaderClient::frameLoadCompleted):
556         (WebKit::WebFrameLoaderClient::provisionalLoadStarted):
557         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
558         (WebFrameLoaderClient):
559         * WebProcess/WebPage/WebPage.cpp:
560         (WebKit::WebPage::didStartPageTransition):
561         (WebKit):
562         (WebKit::WebPage::didCompletePageTransition):
563         * WebProcess/WebPage/WebPage.h:
564         (WebPage):
565         * WebProcess/WebPage/WebPage.messages.in:
566         * WebProcess/WebPage/qt/WebPageQt.cpp:
567         (WebKit::WebPage::commitPageTransitionViewport):
568         (WebKit):
569
570 2012-10-01  Alberto Garcia  <agarcia@igalia.com>
571
572         WebPrintOperationGtk destructor should be virtual
573         https://bugs.webkit.org/show_bug.cgi?id=98002
574
575         Reviewed by Carlos Garcia Campos.
576
577         WebPrintOperationGtk is an abstract class which can be deleted
578         using a pointer to itself, yet its destructor is not virtual.
579         Fixes -Wdelete-non-virtual-dtor.
580
581         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
582         (WebPrintOperationGtk):
583
584 2012-09-30  Mario Sanchez Prada  <msanchez@igalia.com>
585
586         [WK2][GTK] Add API to get the favicon for a WebKitWebView
587         https://bugs.webkit.org/show_bug.cgi?id=96477
588
589         Reviewed by Carlos Garcia Campos.
590
591         Provide a new simple API to synchronously try to get the favicon
592         associated with a WebView, if any, and to keep track of changes on
593         it, through a new GObject property.
594
595         * UIProcess/API/gtk/WebKitWebView.cpp:
596         (_WebKitWebViewPrivate):
597         (webkitWebViewIconReadyCallback): Callback to handle the
598         'icon-ready' signal coming from WebKitFaviconDatabase.
599         (webkitWebViewWatchForChangesInFavicon): Connects to the
600         'icon-ready' signal from WebKitFaviconDatabase, to keep track of
601         changes in favicons, that must be related to the current view.
602         (webkitWebViewDisconnectFaviconDatabaseSignalHandlers):
603         Disconnects the handler for 'icon-ready' if needed.
604         (webkitWebViewGetProperty): Updated for the new "favicon" property .
605         (webkitWebViewFinalize): Disconnect the new signal handler.
606         (webkit_web_view_class_init): Definition of the new property.
607         (webkitWebViewEmitLoadChanged): Make sure we will be watching for
608         changes in the favicon from WEBKIT_LOAD_STARTED on.
609         (webkit_web_view_get_favicon): New API funtcion, returning the
610         current favicon for the WebView, if any, or NULL otherwise.
611         * UIProcess/API/gtk/WebKitWebView.h:
612
613         Internally expose a way to try to get the favicon associated to a
614         page URL synchronously, through WebKitFaviconDatabase.
615
616         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
617         (webkitFaviconDatabaseGetFaviconSync): New internal function, it
618         will return either 0 or a valid pointer to a cairo_surface_t.
619         * UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h:
620
621         Add unit tests for checking this new API.
622
623         * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp:
624         (testWebViewFavicon): New unit test.
625         (beforeAll): Add the test to the test suite.
626
627 2012-09-30  Mario Sanchez Prada  <msanchez@igalia.com>
628
629         [WK2][GTK] Fix issues with WebKitFaviconDatabase in debug builds
630         https://bugs.webkit.org/show_bug.cgi?id=97966
631
632         Reviewed by Carlos Garcia Campos.
633
634         Fix failing ASSERTs detected when running the unit tests from
635         TestWebKitFaviconDatabase in debug builds.
636
637         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
638         (webkitFaviconDatabaseDispose): Close IconDatabase here, which is
639         the right place to do it according to GObject documentation.
640         (webkitFaviconDatabaseFinalize): Just destroy the private data
641         structure and chain up to parent class's finalize method.
642         (webkit_favicon_database_class_init): Override dispose method.
643
644         * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp:
645         (webkitFaviconDatabaseFinalizedCallback): Delete files when the
646         WebKitFaviconDatabase is being finalized, since by that time the
647         IconDatabase from WebCore will be already closed.
648         (afterAll): Add a weak reference to WebKitFaviconDatabase and
649         provide a GWeakNotify callback (webkitFaviconDatabaseFinalizedCallback).
650
651 2012-09-29  Byungwoo Lee  <bw80.lee@samsung.com>
652
653         [EFL] Fix build error : Link webkit2 library to ewk2UnitTestInjectedBundleSample.
654         https://bugs.webkit.org/show_bug.cgi?id=97622
655
656         Reviewed by Gyuyoung Kim.
657
658         There is no dependency between ewk2UnitTestInjectedBundleSample and
659         webkit2 library.
660
661         Because of this, on the first build, compiler tries to build
662         injected_bundle_sample.cpp before the forwarding headers are created.
663         This makes build error that the header file 'WebKit2/WKBaseSoup.h'
664         cannot be found.
665
666         To prevent this, webkit2 library is linked to ewk2UnitTestInjectedBundleSample.
667
668         * PlatformEfl.cmake:
669
670 2012-09-28  Mariusz Grzegorczyk  <mariusz.g@samsung.com>
671
672         [WK2][GTK][EFL] Share WebKit2-GTK plugin process implementation with EFL port
673         https://bugs.webkit.org/show_bug.cgi?id=91844
674
675         Reviewed by Simon Hausmann.
676
677         Implement windowless plugin and functions needed to launch PluginProcess.
678
679         * GNUmakefile.am: Change files and folders related to plugin process from gtk to unix.
680         * GNUmakefile.list.am: Change files and folders related to plugin process from gtk to unix.
681         * Platform/Logging.cpp: Add Plugins channel for LOG.
682         (WebKit):
683         (WebKit::getChannelFromName):
684         (WebKit::initializeLogChannelsIfNecessary):
685         * Platform/Logging.h:
686         (WebKit):
687         * PlatformEfl.cmake: Add files needed by plugin process.
688         * PluginProcess/unix/PluginControllerProxyUnix.cpp: Renamed from Source/WebKit2/PluginProcess/gtk/PluginControllerProxyGtk.cpp.
689         (WebKit):
690         (WebKit::PluginControllerProxy::platformInitialize): Add macros for gtk/efl differents.
691         (WebKit::PluginControllerProxy::platformDestroy):
692         (WebKit::PluginControllerProxy::platformGeometryDidChange):
693         * PluginProcess/unix/PluginProcessMainUnix.cpp: Renamed from Source/WebKit2/PluginProcess/gtk/PluginProcessMainGtk.cpp.
694         (WebKit):
695         (WebKit::webkitXError):
696         (WebKit::PluginProcessMainUnix):
697         * PluginProcess/unix/PluginProcessMainUnix.h: Renamed from Source/WebKit2/PluginProcess/gtk/PluginProcessMainGtk.h.
698         (WebKit):
699         * PluginProcess/unix/PluginProcessUnix.cpp: Renamed from Source/WebKit2/PluginProcess/gtk/PluginProcessGtk.cpp.
700         (WebKit):
701         (WebKit::PluginProcess::platformInitialize):
702         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: Renamed from Source/WebKit2/UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp.
703         (WebKit):
704         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
705         (WebKit::PluginProcessProxy::scanPlugin):
706         * UIProcess/efl/WebPageProxyEfl.cpp: Add stubs.
707         (WebKit::WebPageProxy::createPluginContainer):
708         (WebKit):
709         (WebKit::WebPageProxy::windowedPluginGeometryDidChange):
710         * WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp: Renamed from Source/WebKit2/WebProcess/Plugins/Netscape/gtk/PluginProxyGtk.cpp.
711         (WebKit):
712         (WebKit::PluginProxy::needsBackingStore):
713         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Plugin's windowless implementation.
714         (WebKit::getPluginDisplay):
715         (WebKit::x11Screen):
716         (WebKit::displayDepth):
717         (WebKit::rootWindowID):
718         (WebKit::NetscapePlugin::x11HostDisplay):
719         (WebKit::NetscapePlugin::platformPaint):
720         * config.h:
721         * unix/PluginMainUnix.cpp: Renamed from Source/WebKit2/gtk/PluginMainGtk.cpp.
722         (main):
723
724 2012-09-28  Anders Carlsson  <andersca@apple.com>
725
726         Remove Java bridge
727         https://bugs.webkit.org/show_bug.cgi?id=97954
728
729         Reviewed by Sam Weinig.
730
731         The Java bridge is not used by any port; Mac now has a NPAPI Java plug-in.
732
733         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
734         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
735         (WebFrameLoaderClient):
736
737 2012-09-28  Dan Bernstein  <mitz@apple.com>
738
739         <rdar://problem/12398537> WebKit2 lacks API for disabling document.cookie like -[WebView _setCookieEnabled:]
740         https://bugs.webkit.org/show_bug.cgi?id=97939
741
742         Reviewed by Sam Weinig.
743
744         * Shared/WebPreferencesStore.h:
745         (WebKit): Defined CookieEnabled key with a default value of true.
746         * UIProcess/API/C/WKPreferences.cpp:
747         (WKPreferencesSetCookieEnabled): Added this setter.
748         (WKPreferencesGetCookieEnabled): Added this getter.
749         * UIProcess/API/C/WKPreferencesPrivate.h:
750         * WebProcess/WebPage/WebPage.cpp:
751         (WebKit::WebPage::updatePreferences): Added a call to Settings::setCookieEnabled to push the
752         preference into Settings.
753
754 2012-09-28  Sam Weinig  <sam@webkit.org>
755
756         Fix pluralization of Info.plist key.
757
758         Rubber-stamped by Anders Carlsson.
759
760         * WebProcessService/Info.plist:
761         * WebProcessServiceForWebKitDevelopment/Info.plist:
762         It's _MultipleInstances, not _MultipleInstance. :(
763
764 2012-09-28  Anders Carlsson  <andersca@apple.com>
765
766         Pass the correct path length to _NSGetExecutablePath
767         https://bugs.webkit.org/show_bug.cgi?id=97935
768
769         Reviewed by Sam Weinig.
770
771         * WebProcessServiceForWebKitDevelopment/WebProcessServiceForWebKitDevelopmentMain.mm:
772         (WebProcessServiceForWebKitDevelopmentEventHandler):
773         Initialize pathLength before passing it to _NSGetExecutablePath.
774
775 2012-09-28  Alberto Garcia  <agarcia@igalia.com>
776
777         WebKitLoaderClient: add missing initializer.
778         https://bugs.webkit.org/show_bug.cgi?id=97930
779
780         Reviewed by Martin Robinson.
781
782         WKPageLoaderClient is missing the initializer for the didLayout
783         field. Fixes -Wmissing-field-initializers.
784
785         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
786         (attachLoaderClientToView):
787
788 2012-09-28  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
789
790         Code inside FrameLoaderClient::canShowMIMEType() implementations can be shared among different WK ports
791         https://bugs.webkit.org/show_bug.cgi?id=97547
792
793         Reviewed by Adam Barth.
794
795         Newly added WebCore::MIMETypeRegistry::canShowMIMEType() function is used
796         inside WebKit::WebPageProxy::canShowMIMEType() and WKBundlePageCanShowMIMEType().
797
798         * UIProcess/WebPageProxy.cpp:
799         (WebKit::WebPageProxy::canShowMIMEType):
800         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
801         (WKBundlePageCanShowMIMEType):
802
803 2012-09-28  Byungwoo Lee  <bw80.lee@samsung.com>
804
805         [EFL][WK2] {Vibration,Battery,NetworkInfo}Provider should contain WKContextRef instead of proxy.
806         https://bugs.webkit.org/show_bug.cgi?id=97839
807
808         Reviewed by Kenneth Rohde Christiansen.
809
810         VibrationProvider has WKRetainPtr<WKVibrationRef> m_wkVibrationRef
811         which has reference for object WebVibrationProxy.
812         The WebVibrationProxy instance is a member of WebContext who has it
813         as RefPtr<WebVibrationProxy>.
814
815         A member of one class is shared with another class, but there is no
816         relation between the two classes.
817
818         This can become a problem when WebContext is deleted before the
819         VibrationProvider, WebVibrationProxy will be alive without WebContext,
820         because VibrationProvider also has the reference for WebVibrationProxy.
821
822         This is a problem because WebVibrationProxy should be a member of
823         WebContext.
824
825         To prevent this, I changed the VibrationProvider to have
826         WKRetainPtr<WKContextRef> instead of WKRetainPtr<WKVibrationRef>.
827         Same for BatteryProvider and NetworkInfoProvider.
828
829         * UIProcess/API/efl/BatteryProvider.cpp:
830         (BatteryProvider::create):
831         (BatteryProvider::BatteryProvider):
832         (BatteryProvider::didChangeBatteryStatus):
833         * UIProcess/API/efl/BatteryProvider.h:
834         (BatteryProvider):
835         * UIProcess/API/efl/NetworkInfoProvider.cpp:
836         (NetworkInfoProvider::create):
837         (NetworkInfoProvider::NetworkInfoProvider):
838         * UIProcess/API/efl/NetworkInfoProvider.h:
839         (NetworkInfoProvider):
840         * UIProcess/API/efl/VibrationProvider.cpp:
841         (VibrationProvider::create):
842         (VibrationProvider::VibrationProvider):
843         * UIProcess/API/efl/VibrationProvider.h:
844         (VibrationProvider):
845         * UIProcess/API/efl/ewk_context.cpp:
846         (_Ewk_Context::_Ewk_Context):
847
848 2012-09-28  Mario Sanchez Prada  <msanchez@igalia.com>
849
850         [WK2][GTK] Implement new Favicons API
851         https://bugs.webkit.org/show_bug.cgi?id=96476
852
853         Reviewed by Carlos Garcia Campos.
854
855         New object wrapping the internal IconDatabase from WebCore,
856         providing a simple asynchronous API to retrieve the favicon
857         associated to a page URL, and two more functions to simple query
858         the internal database for the URI of the icon associated to a
859         page, if any, and to clear the state of the internal database.
860
861         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp: Added.
862         (_WebKitFaviconDatabasePrivate):
863         (webkit_favicon_database_init):
864         (webkitFaviconDatabaseFinalize):
865         (webkit_favicon_database_class_init):
866         (GetFaviconSurfaceAsyncData): New structure used to pass data
867         across the asynchronous implementation of get_favicon().
868         (GetFaviconSurfaceAsyncData::~GetFaviconSurfaceAsyncData):
869         Disconnects the cancellable if needed.
870         (getIconSurfaceSynchronously): Synchronously returns a pointer to
871         the cairo_surface with the icon's data, if available.
872         (deletePendingIconRequests): Removes the full list of
873         icon requests for a page URL.
874         (processPendingIconsForURI): Process any icon request that
875         might be still pending.
876         (iconDataReadyForPageURLCallback): Called from WebIconDatabase
877         when new data is ready for a favicon.
878         (webkitFaviconDatabaseCreate): Create the WebKitFaviconDatabase
879         object and initializes the API client for WKIconDatabaseClient.
880         (getOrCreatePendingIconRequests): Returns (if available) or
881         creates a new icon request, to be appended to the list of requests
882         for the same page URL.
883         (getIconSurfaceCancelled): Handle the case of a request being
884         cancelled. Must happen on the main thread.
885         (getIconSurfaceCancelledCallback): Callback used with
886         g_cancellable_connect(), which ensure getIconSurfaceCancelled() is
887         called from the main thread.
888         (setErrorForAsyncResult): Helper to set errors in the result.
889         (webkit_favicon_database_error_quark): New function, providint the
890         new error domain for errors of type WebKitFaviconDatabaseError.
891         (webkit_favicon_database_get_favicon): New API function, providing
892         an asynchronous mechanism to query the favicon for a page URL.
893         (webkit_favicon_database_get_favicon_finish): New API function to
894         finish the asyncrhonous request started with get_favicon().
895         (webkit_favicon_database_get_favicon_uri): New API function
896         to easily retrieve, if available, the URI of a favicon.
897         (webkit_favicon_database_clear): New API function to clear the
898         state of the internal icon database.
899         * UIProcess/API/gtk/WebKitFaviconDatabase.h: Added.
900         (_WebKitFaviconDatabase):
901         (_WebKitFaviconDatabaseClass):
902         * UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h: Added to
903         internally expose webkitFaviconDatabaseCreate() to WebKitWebContext.
904         * UIProcess/API/gtk/WebKitPrivate.h: Import WebKit2/WKIconDatabase.h.
905         * GNUmakefile.list.am: Added new files.
906
907         Add a new getter in WebIconDatabase for m_urlImportCompleted.
908
909         * UIProcess/WebIconDatabase.cpp:
910         (WebKit::WebIconDatabase::isUrlImportCompleted): Added this simple
911         getter to allow knowing from WebKitFaviconDatabase whether the
912         initial import has finished, needed for making some decisions.
913         (WebKit):
914         * UIProcess/WebIconDatabase.h:
915         (WebIconDatabase):
916
917         New API in WebKitWebContext to allow obtaining a valid instance of
918         WebKitFaviconDatabase and to set/get the local path to be used.
919
920         * UIProcess/API/gtk/WebKitWebContext.cpp:
921         (_WebKitWebContextPrivate):
922         (webkit_web_context_set_favicon_database_path): New API to allow
923         setting a path for the icon database, other than the default one.
924         (webkit_web_context_get_favicon_database_path): New API to
925         retrieve the path for the icon database currently in use.
926         (webkit_web_context_get_favicon_database): New API to get a valid
927         and properly initialized instance of WebKitFaviconDatabase.
928         * UIProcess/API/gtk/WebKitWebContext.h:
929
930         Make sure we have a default path set for the icon database.
931
932         * UIProcess/gtk/WebContextGtk.cpp:
933         (WebKit::WebContext::platformDefaultIconDatabasePath): Return the
934         default path to be used for the icon database.
935
936         Add unit tests for checking this new API.
937
938         * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp: Added.
939         (serverCallback): Callback for the test server.
940         (testSetDirectory): New unit test, checks the ability to set and
941         get a specific directory path for the icon database.
942         (testClearDatabase): New unit test, checks the ability to clear
943         the data in the icon database.
944         (testGetFavicon): New unit test, checks the ability to get a
945         favicon from the icon database in different situations.
946         (testGetFaviconURI): New unit test, checks the ability to retrieve
947         the URI for the favicon, if any, associated to a web page.
948         (deleteDatabaseFiles): Helper function to remove temporary files.
949         (beforeAll): Initialize the test server and add the unit tests.
950         (afterAll): Delete the test server and clean up.
951
952 2012-09-28  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
953
954         [EFL] Unreviewed test fixes after r129892.
955
956         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
957         (TEST_F): Fix a copy&paste error that changed the test
958         expectations.
959         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
960         (TEST_F): Revert the change here since it was already in the right
961         format before.
962
963 2012-09-28  Jinwoo Song  <jinwoo7.song@samsung.com>
964
965         [EFL][WK2] Some expected and actual parameters in unit tests are reversed
966         https://bugs.webkit.org/show_bug.cgi?id=97624
967
968         Reviewed by Laszlo Gombos.
969
970         According to the gtest guide, ASSERT_XXX, EXPECT_XXX(expected, actual) are recommended
971         but some unit tests do not follow this.(http://code.google.com/p/googletest/wiki/Primer)
972         Google Test's failure messages are optimized for this convention.
973
974         * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp:
975         (TEST_F):
976         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
977         (schemeRequestCallback):
978         (TEST_F):
979         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
980         (TEST_F):
981         * UIProcess/API/efl/tests/test_ewk2_download_job.cpp:
982         (on_download_requested):
983         (on_download_finished):
984         * UIProcess/API/efl/tests/test_ewk2_intents.cpp:
985         (onIntentServiceRegistration):
986         (onIntentReceived):
987         (TEST_F):
988         * UIProcess/API/efl/tests/test_ewk2_refptr_evas_object.cpp:
989         (TEST_F):
990         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
991         (TEST_F):
992         (onFormAboutToBeSubmitted):
993         (checkBasicPopupMenuItem):
994         (showPopupMenu):
995         (showColorPicker):
996
997 2012-09-28  Balazs Kelemen  <kbalazs@webkit.org>
998
999         [Qt] QRawWebView tests are broke after r129545
1000         https://bugs.webkit.org/show_bug.cgi?id=97907
1001
1002         Reviewed by Noam Rosenthal.
1003
1004         The issue here is that we set up the page loader client before initializing the page
1005         so the message we send in WebPageProxy::initializeLoaderClient will be lost since the
1006         page does not exists at the web process side yet. The trivial fix would be to reorder
1007         initialization. In this patch I also moved to the new model of observing layout changes
1008         via WKPageDidLayoutCallback since the old one will be deprecated at some time.
1009
1010         * UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp:
1011         (WebView::WebView):
1012         (WebView::didLayout):
1013
1014 2012-09-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1015
1016         Unreviewed, rolling out r129863.
1017         http://trac.webkit.org/changeset/129863
1018         https://bugs.webkit.org/show_bug.cgi?id=97173
1019
1020         Broken debug WK2 layout test
1021
1022         * PlatformEfl.cmake:
1023         * UIProcess/API/efl/EWebKit2.h:
1024         * UIProcess/API/efl/ewk_context.cpp:
1025         (_Ewk_Context::_Ewk_Context):
1026         (_Ewk_Context::~_Ewk_Context):
1027         * UIProcess/API/efl/ewk_main.cpp:
1028         (ewk_init):
1029         (ewk_shutdown):
1030         * UIProcess/API/efl/ewk_main.h: Added.
1031         * UIProcess/API/efl/ewk_main_private.h: Removed.
1032         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
1033         (EWK2UnitTest::EWK2UnitTestBase::SetUp):
1034         (EWK2UnitTest::EWK2UnitTestBase::TearDown):
1035         * WebProcess/efl/WebProcessMainEfl.cpp:
1036         (WebKit::WebProcessMainEfl):
1037
1038 2012-09-28  Christophe Dumez  <christophe.dumez@intel.com>
1039
1040         [EFL][WK2] exceededDatabaseQuota event is not handled
1041         https://bugs.webkit.org/show_bug.cgi?id=97882
1042
1043         Reviewed by Kenneth Rohde Christiansen.
1044
1045         Handle exceededDatabaseQuota callback from WKPageUIClient so
1046         that we let the browser a chance to decide what to do when
1047         the database quota is reached. If the browser does not handle
1048         this, then we return a realistic default quota (5MB as
1049         recommended by the spec).
1050
1051         * UIProcess/API/efl/ewk_view.cpp:
1052         (ewk_view_database_quota_exceeded):
1053         * UIProcess/API/efl/ewk_view.h:
1054         * UIProcess/API/efl/ewk_view_private.h:
1055         * UIProcess/API/efl/ewk_view_ui_client.cpp:
1056         (exceededDatabaseQuota):
1057         (ewk_view_ui_client_attach):
1058
1059 2012-09-28  Kai Koehne  <kai.koehne@digia.com>
1060
1061         [Qt] Use qInstallMessageHandler() 
1062         https://bugs.webkit.org/show_bug.cgi?id=96648
1063
1064         Reviewed by Jocelyn Turcotte.
1065
1066         qInstallMsgHandler() got deprecated in Qt 5.
1067
1068         * PluginProcess/qt/PluginProcessMainQt.cpp:
1069         (WebKit::messageHandler):
1070         (WebKit::PluginProcessMain):
1071         * UIProcess/API/qt/tests/util.cpp:
1072         (messageHandler):
1073         (suppressDebugOutput):
1074         * qt/MainQt.cpp:
1075         (messageHandler):
1076         (main):
1077
1078 2012-09-28  Byungwoo Lee  <bw80.lee@samsung.com>
1079
1080         [EFL][WK2] Clear provider on destructor of {Vibration,Battery,NetworkInfo}Provider.
1081         https://bugs.webkit.org/show_bug.cgi?id=97528
1082
1083         Reviewed by Kenneth Rohde Christiansen.
1084
1085         Constructor of {Vibration,Battery,NetworkInfo}Provider set provider
1086         but the destructor of the classes doesn't clear provider.
1087         This can make a problem about accessing dangling pointer.
1088
1089         For preventing this problem, clear provider on destructor.
1090
1091         * UIProcess/API/efl/BatteryProvider.cpp:
1092         (BatteryProvider::~BatteryProvider):
1093         * UIProcess/API/efl/NetworkInfoProvider.cpp:
1094         (NetworkInfoProvider::~NetworkInfoProvider):
1095         * UIProcess/API/efl/VibrationProvider.cpp:
1096         (VibrationProvider::~VibrationProvider):
1097
1098 2012-09-28  Christophe Dumez  <christophe.dumez@intel.com>
1099
1100         [EFL][WK2] NetworkInfo provider is not initialized in Ewk_Context
1101         https://bugs.webkit.org/show_bug.cgi?id=97865
1102
1103         Reviewed by Kenneth Rohde Christiansen.
1104
1105         Initialize NetworkInfo provider for EFL port in Ewk_Context
1106         with the other providers.
1107
1108         * UIProcess/API/efl/ewk_context.cpp:
1109         (_Ewk_Context):
1110         (_Ewk_Context::_Ewk_Context):
1111
1112 2012-09-28  Eunmi Lee  <eunmi15.lee@samsung.com>
1113
1114         [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
1115         https://bugs.webkit.org/show_bug.cgi?id=97173
1116
1117         Reviewed by Gyuyoung Kim.
1118
1119         Initialize and shutdown the EFL libraries in the ewk_main.cpp for ui
1120         process and WebProcessMainEfl.cpp for web process.
1121         Additionally, initialization and shutdown are done when ewk_context is
1122         created and deleted, so ewk_{init,shutdown} APIs are changed to
1123         internal function and applications don't have to call them.
1124
1125         * PlatformEfl.cmake:
1126         * UIProcess/API/efl/EWebKit2.h:
1127         * UIProcess/API/efl/ewk_context.cpp:
1128         (_Ewk_Context::_Ewk_Context):
1129         (_Ewk_Context::~_Ewk_Context):
1130         * UIProcess/API/efl/ewk_main.cpp:
1131         (ewk_init):
1132         (ewk_shutdown):
1133         * UIProcess/API/efl/ewk_main.h: Removed.
1134         * UIProcess/API/efl/ewk_main_private.h: Added.
1135         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
1136         (EWK2UnitTest::EWK2UnitTestBase::SetUp):
1137         (EWK2UnitTest::EWK2UnitTestBase::TearDown):
1138         * WebProcess/efl/WebProcessMainEfl.cpp:
1139         (WebKit::WebProcessMainEfl):
1140
1141 2012-09-27  Beth Dakin  <bdakin@apple.com>
1142
1143         https://bugs.webkit.org/show_bug.cgi?id=97823
1144         Need to bump the WKBundlePageLoaderClient version after the addition of didLayout
1145
1146         Reviewed by Brady Eidson.
1147
1148         Bump the version.
1149         * Shared/APIClientTraits.cpp:
1150         (WebKit):
1151         * Shared/APIClientTraits.h:
1152         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1153
1154 2012-09-27  Helder Correia  <helder.correia@nokia.com>
1155
1156         [Cairo] Unnecessary creation of ShareableBitmap's for directly composited images
1157         https://bugs.webkit.org/show_bug.cgi?id=97745
1158
1159         Reviewed by Martin Robinson.
1160
1161         In LayerTreeCoordinator::adoptImageBackingStore(), there is a
1162         PLATFORM(QT) code path to check for identical images, but nothing is
1163         done for Cairo, which results in the occurrence of avoidable resource
1164         allocations.
1165
1166         The issue happens in e.g. http://www.webkit.org/blog-files/leaves/,
1167         where there are many leaves flying around while they're produced out of
1168         only four bitmaps.
1169
1170         This patch uses pointers to cairo_surface_t's as the key to the hashmap
1171         that caches bitmaps. This can be safely done since we own the references.
1172         We artificially increment the surface references in adoptImageBackingStore()
1173         and decrement them in releaseImageBackingStore().
1174
1175         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
1176         (WebKit::LayerTreeCoordinator::adoptImageBackingStore):
1177         (WebKit::LayerTreeCoordinator::releaseImageBackingStore):
1178
1179 2012-09-27  Anders Carlsson  <andersca@apple.com>
1180
1181         Stop using dispatch_get_current_queue
1182         https://bugs.webkit.org/show_bug.cgi?id=97806
1183         <rdar://problem/12379094>
1184
1185         Reviewed by Mark Rowe.
1186
1187         * Platform/mac/WorkQueueMac.cpp:
1188         (WorkQueueAndFunction::WorkQueueAndFunction):
1189         (WorkQueueAndFunction):
1190         (WorkQueue::executeFunction):
1191         (WorkQueue::dispatch):
1192         (WorkQueue::dispatchAfterDelay):
1193         Keep track of the associated work queue so we can get it in WorkQueue::executeFunction.
1194
1195         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1196         (WebKit::setUpTerminationNotificationHandler):
1197         We don't care about which queue the termination notification is delivered on since we only want to call
1198         waitpid on the child pid so we can just use a global queue.
1199
1200         * UIProcess/mac/WebInspectorProxyMac.mm:
1201         (-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]):
1202         Use dispatch_get_main_queue here.
1203
1204 2012-09-27  Mario Sanchez Prada  <msanchez@igalia.com>
1205
1206         [WK2] IconDatabase: Add a way to notify when icon data is available
1207         https://bugs.webkit.org/show_bug.cgi?id=63945
1208
1209         Rubber stamped by Anders Carlsson.
1210
1211         Update version of WKIconDatabaseClient and API traits.
1212
1213         * Shared/APIClientTraits.cpp:
1214         (WebKit):
1215         * Shared/APIClientTraits.h:
1216         * UIProcess/API/C/WKIconDatabase.h:
1217
1218 2012-09-27  Balazs Kelemen  <kbalazs@webkit.org>
1219
1220         [Qt][WK2] REGRESSION(r128980): It broke all QRawWebView API test
1221         https://bugs.webkit.org/show_bug.cgi?id=97561
1222
1223         Reviewed by Noam Rosenthal.
1224
1225         Make sure we always send the very first RenderNextFrame message.
1226         Before r128980 it was working accidentally because in the common
1227         case the web process sent a DeleteCompositingLayer message at some
1228         point before the forced repaint would time out and we was sending
1229         the first RenderNextFrame when reacting to that.
1230
1231         * UIProcess/API/qt/raw/qrawwebview.cpp:
1232         (QRawWebView::setActive): Set the LayerTreeRenderer to active
1233         as well. In the QQuickWebView case it is handled by the QtWebPageSGNode.
1234         (QRawWebView::layerTreeRenderer): Added a convenience getter
1235         for the LayerTreeRenderer.
1236         (QRawWebView::paint):
1237         * UIProcess/API/qt/raw/qrawwebview_p.h:
1238         (WebKit):
1239         * UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp:
1240         (tst_qrawwebview::tst_qrawwebview): Added a call to addQtWebProcessToPath
1241         to make my and the follower users of this test easier.
1242
1243 2012-09-27  Eunmi Lee  <eunmi15.lee@samsung.com>
1244
1245         [EFL][WK2] Process touch events using mouse and multi events of Evas.
1246         https://bugs.webkit.org/show_bug.cgi?id=96906
1247
1248         Reviewed by Kenneth Rohde Christiansen.
1249
1250         Provide default behavior for processing touch events in the ewk_view if
1251         application wants to use it.
1252         We can to process touch events using mouse and multi events because the
1253         Evas creates mouse events for first touch and multi events for second and
1254         third touch. It can be modified when Evas starts to support event type
1255         for touch events.
1256
1257         * UIProcess/API/efl/ewk_view.cpp:
1258         (_Ewk_View_Private_Data):
1259         (_Ewk_View_Private_Data::_Ewk_View_Private_Data):
1260         (_ewk_view_feed_touch_event_using_touch_point_list_of_evas):
1261         (_ewk_view_on_touch_down):
1262         (_ewk_view_on_touch_up):
1263         (_ewk_view_on_touch_move):
1264         (ewk_view_touch_events_enabled_set):
1265         (ewk_view_touch_events_enabled_get):
1266         * UIProcess/API/efl/ewk_view.h:
1267         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
1268         (EWK2UnitTest::EWK2UnitTestBase::mouseDown):
1269         (EWK2UnitTest):
1270         (EWK2UnitTest::EWK2UnitTestBase::mouseUp):
1271         (EWK2UnitTest::EWK2UnitTestBase::mouseMove):
1272         (EWK2UnitTest::EWK2UnitTestBase::multiDown):
1273         (EWK2UnitTest::EWK2UnitTestBase::multiUp):
1274         (EWK2UnitTest::EWK2UnitTestBase::multiMove):
1275         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
1276         (EWK2UnitTestBase):
1277         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1278         (TEST_F):
1279
1280 2012-09-27  Jinwoo Song  <jinwoo7.song@samsung.com>
1281
1282         [EFL][WK2] Add callback functions for WKPageFindClient
1283         https://bugs.webkit.org/show_bug.cgi?id=97431
1284
1285         Reviewed by Laszlo Gombos.
1286
1287         Add didFailToFindString() and didCountStringMatches() for WKPageFindClient's callback functions.
1288         The unit test for didFindString() and didFailToFindString() have beend added. The unit test for
1289         didCountStringMatches() needs a API which wraps the WKPageCountStringMatches but it is not exists yet.
1290         Additionaly, I changed the 'unsinged int' to 'unsigned' in the parameter type and removed unnecessary
1291         type conversion.
1292
1293         * UIProcess/API/efl/ewk_view.cpp:
1294         (ewk_view_text_find):
1295         * UIProcess/API/efl/ewk_view.h:
1296         * UIProcess/API/efl/ewk_view_find_client.cpp:
1297         (didFindString):
1298         (didFailToFindString):
1299         (didCountStringMatches):
1300         (ewk_view_find_client_attach):
1301         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1302         (onTextFound):
1303         (TEST_F):
1304
1305 2012-09-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1306
1307         Unify event handling of middle mouse button.
1308         https://bugs.webkit.org/show_bug.cgi?id=97690
1309
1310         Reviewed by Tony Chang.
1311
1312         Remove Qt and GTK port specific handling of middle mouse button press.
1313
1314         * WebProcess/WebPage/WebPage.cpp:
1315         (WebKit::handleMouseEvent):
1316         * WebProcess/WebPage/WebPage.h:
1317         (WebPage):
1318         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1319         (WebKit):
1320         * WebProcess/WebPage/qt/WebPageQt.cpp:
1321
1322 2012-09-27  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1323
1324         [WK2] Injected bundle API implementation should use toWTFString()
1325         https://bugs.webkit.org/show_bug.cgi?id=97766
1326
1327         Reviewed by Kenneth Rohde Christiansen.
1328
1329         Injected bundle API implementation should call toWTFString() rather than convert
1330         WKStringRef and WKURLRef to their impls and then call string() method directly.
1331         The rational for that are both safety (toWTFString checks the given pointer) and
1332         code readability.
1333
1334         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1335         (WKBundlePostMessage):
1336         (WKBundlePostSynchronousMessage):
1337         (WKBundleOverrideBoolPreferenceForTestRunner):
1338         (WKBundleAddOriginAccessWhitelistEntry):
1339         (WKBundleRemoveOriginAccessWhitelistEntry):
1340         (WKBundleClearApplicationCacheForOrigin):
1341         (WKBundleGetAppCacheUsageForOrigin):
1342         (WKBundleSetApplicationCacheOriginQuota):
1343         (WKBundleResetApplicationCacheOriginQuota):
1344         (WKBundlePageNumberForElementById):
1345         (WKBundleSetUserStyleSheetLocation):
1346         (WKBundleSetWebNotificationPermission):
1347         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1348         (WKBundleFramePauseAnimationOnElementWithId):
1349         (WKBundleFramePauseTransitionOnElementWithId):
1350         (WKBundleFrameAllowsFollowingLink):
1351         (WKBundleFrameCopySuggestedFilenameForResourceWithURL):
1352         (WKBundleFrameCopyMIMETypeForResourceWithURL):
1353         (WKBundleFrameSetTextDirection):
1354         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
1355         (WKBundleInspectorEvaluateScriptForTest):
1356         * WebProcess/InjectedBundle/API/c/WKBundleIntent.cpp:
1357         (WKBundleIntentCreate):
1358         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1359         (WKBundlePageExecuteEditingCommand):
1360         (WKBundlePageIsEditingCommandEnabled):
1361         (WKBundlePageHasLocalDataForURL):
1362         (WKBundlePageFindString):
1363         (WKBundlePageSetComposition):
1364         (WKBundlePageConfirmCompositionWithText):
1365         (WKBundlePageCanShowMIMEType):
1366
1367 2012-09-27  Mario Sanchez Prada  <msanchez@igalia.com>
1368
1369         [WK2] IconDatabase: Add a way to notify when icon data is available
1370         https://bugs.webkit.org/show_bug.cgi?id=63945
1371
1372         Reviewed by Anders Carlsson.
1373
1374         Provide new API to notify the API layer when icon data is
1375         available, and use it from the implementation layer when needed,
1376         that is, either when the data has been loaded from the network or
1377         imported from disk.
1378
1379         Added new callback to WKIconDatabaseClient API.
1380
1381         * UIProcess/API/C/WKIconDatabase.h: Added new callback.
1382         * UIProcess/WebIconDatabaseClient.cpp:
1383         (WebKit::WebIconDatabaseClient::iconDataReadyForPageURL):
1384         Implementation of the new callback at this level in the UI
1385         process, by using its implementation in the API layer if present.
1386         * UIProcess/WebIconDatabaseClient.h:
1387         (WebIconDatabaseClient): Added new callback.
1388
1389         Implemented WebFrameLoaderClient::dispatchDidReceiveIcon, so we
1390         get notified in the UI process when loading a new icon.
1391
1392         * UIProcess/WebIconDatabase.messages.in: Added new message to
1393         notify the UI process: DidReceiveIconForPageURL.
1394         * UIProcess/WebIconDatabase.cpp:
1395         (WebKit::WebIconDatabase::notifyIconDataReadyForPageURL): New
1396         private helper function to notify the API layer both that new icon
1397         data is ready and that the icon has changed.
1398         (WebKit::WebIconDatabase::didReceiveIconForPageURL):
1399         Implementation of the new message added, by calling
1400         notifyIconDataReadyForPageURL() to notify the API layer.
1401         (WebKit::WebIconDatabase::didImportIconDataForPageURL): Call
1402         notifyIconDataReadyForPageURL() from here as well.
1403         * UIProcess/WebIconDatabase.h: Added new prototypes.
1404         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1405         (WebKit::WebFrameLoaderClient::dispatchDidReceiveIcon): Send a
1406         message to the UI process telling a new icon has been received.
1407
1408 2012-09-26  Sam Weinig  <sam@webkit.org>
1409
1410         Fix XPCServices symlink to not be to an absolute path
1411         in the build products directory.
1412
1413         Reviewed by Dan Bernstein.
1414
1415         * WebKit2.xcodeproj/project.pbxproj:
1416
1417 2012-09-26  Anders Carlsson  <andersca@apple.com>
1418
1419         Stop using CFURLCreateDataAndPropertiesFromResource
1420         https://bugs.webkit.org/show_bug.cgi?id=97728
1421         <rdar://problem/12379035>
1422
1423         Reviewed by Tim Horton.
1424
1425         Replace a call to CFURLCreateDataAndPropertiesFromResource with -[NSData initWithContentsOfURL:]
1426         and add the necessary casts to make the compiler happy.
1427
1428         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1429         (WebKit::contentsOfPropertyListAtURL):
1430
1431 2012-09-26  Alexey Proskuryakov  <ap@apple.com>
1432
1433         [WK2] Update WebPageProxy::reattachToWebProcess() for multi-web process mode
1434         https://bugs.webkit.org/show_bug.cgi?id=97726
1435
1436         Reviewed by Anders Carlsson.
1437
1438         * UIProcess/WebContext.cpp:
1439         (WebKit::WebContext::ensureSharedWebProcess): createNewWebProcess() now takes care
1440         of adding the new process to m_processes.
1441         (WebKit::WebContext::createNewWebProcess): Every time we call this function, we need
1442         to add the result to m_processes. Better do it internally to avoid mistakes.
1443         (WebKit::WebContext::warmInitialProcess): Updated for the above.
1444         (WebKit::WebContext::createWebPage): Ditto.
1445         (WebKit::WebContext::relaunchProcessIfNecessary): This function makes no sense in
1446         multi-web process mode. Assert that we didnt get here accidentally.
1447
1448         * UIProcess/WebContext.h: (WebKit::WebContext::sendToAllProcessesRelaunchingThemIfNecessary):
1449         Only call relaunchProcessIfNecessary in single process mode. The functionality that
1450         needs this behavior will be greatly refactored for multi-web process.
1451
1452         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::reattachToWebProcess):
1453         We already know that we need a new process, "relaunch if necessary" is not the
1454         right logic. Also added a few more assertions checking that process state is
1455         as expected.
1456         
1457         * UIProcess/WebResourceCacheManagerProxy.cpp:
1458         (WebKit::WebResourceCacheManagerProxy::getCacheOrigins): Removed relaunchProcessIfNecessary().
1459         It will be called inside sendToAllProcessesRelaunchingThemIfNecessary().
1460
1461         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1462         (WebKit::WebPluginSiteDataManager::getSitesWithData): Ditto.
1463         (WebKit::WebPluginSiteDataManager::clearSiteData): Ditto.
1464
1465 2012-09-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1466
1467         [GTK] Don't use the C API internally in WebKitJavascriptResult
1468         https://bugs.webkit.org/show_bug.cgi?id=96780
1469
1470         Reviewed by Gustavo Noronha Silva.
1471
1472         Using the C++ classes directly instead of the C API wrappers we
1473         avoid a lot of toImpl/toAPI casts, string conversions and
1474         allocations. The code is also a lot simpler and easier to read.
1475
1476         * UIProcess/API/gtk/WebKitJavascriptResult.cpp:
1477         (_WebKitJavascriptResult::_WebKitJavascriptResult):
1478         (webkitJavascriptResultCreate):
1479         * UIProcess/API/gtk/WebKitJavascriptResultPrivate.h:
1480         * UIProcess/API/gtk/WebKitWebView.cpp:
1481         (webkitWebViewRunJavaScriptCallback):
1482
1483 2012-09-26  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1484
1485         [WK2][WTR] Policy client: dumping from decidePolicyForResponse callback
1486         https://bugs.webkit.org/show_bug.cgi?id=97034
1487
1488         Reviewed by Kenneth Rohde Christiansen.
1489
1490         Added suggested filename getter to WKURLResponse interface and also added a property showing whether the response
1491         is attachment.
1492
1493         * Shared/API/c/WKURLResponse.cpp:
1494         (WKURLResponseSuggestedFilename):
1495         (WKURLResponseIsAttachment):
1496         * Shared/API/c/WKURLResponse.h:
1497
1498 2012-09-26  Martin Robinson  <mrobinson@igalia.com>
1499
1500         [GTK] Use XDamage to simplify RedirectedXCompositeWindow
1501         https://bugs.webkit.org/show_bug.cgi?id=97267
1502
1503         Reviewed by Alejandro G. Castro.
1504
1505         Use XDamage to queue redraws of the widget when redirecting accelerated compositing
1506         to an offscreen window. This allows removing a finicky timer-based approach, improves
1507         performance, and allows simplifying things greatly.
1508
1509         * GNUmakefile.am: Add the XDamage CFLAGS and LIBS to the appropriate places.
1510         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1511         (_WebKitWebViewBasePrivate): Remove readyToRenderAcceleratedCompositingResults as
1512         it's no longer necessary.
1513         (webkit_web_view_base_init): Handle the situation where the RedirectedXCompositeWindow
1514         is null.
1515         (webkitWebViewRenderAcceleratedCompositingResults): Ditto.
1516         (resizeWebKitWebViewBaseFromAllocation): Ditto.
1517         (webkitWebViewBaseCreateWebPage): Ditto.
1518         (redirectedWindowDamagedCallback): Added.
1519         * UIProcess/WebPageProxy.h: Remove InvalidateWidget message.
1520         * UIProcess/WebPageProxy.messages.in: Ditto.
1521         * UIProcess/gtk/WebPageProxyGtk.cpp: Ditto.
1522         * WebProcess/WebPage/WebPage.h: Ditto.
1523         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1524         (WebKit::LayerTreeHostGtk::compositeLayersToContext): No longer need to
1525         trigger the invalidateWindow message.
1526         * WebProcess/WebPage/gtk/WebPageGtk.cpp: Ditto.
1527
1528 2012-09-25  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
1529
1530         [DRT][WTR] Support overriding the 'WebKitDisplayImagesKey' preference
1531         https://bugs.webkit.org/show_bug.cgi?id=96883
1532
1533         Reviewed by Kenneth Rohde Christiansen.
1534
1535         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1536         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Add
1537         support for changing
1538         WebPreferencesKey::loadsImagesAutomaticallyKey().
1539
1540 2012-09-25  Dan Bernstein  <mitz@apple.com>
1541
1542         Try to fix non-Mac builds.
1543
1544         * WebProcess/WebPage/WebPage.cpp:
1545         (WebKit::WebPage::updatePreferences):
1546
1547 2012-09-25  Dan Bernstein  <mitz@apple.com>
1548
1549         WebKit2 part of <rdar://problem/11455228> [mac] Stop using screen fonts
1550         https://bugs.webkit.org/show_bug.cgi?id=97620
1551
1552         Reviewed by John Sullivan.
1553
1554         * Shared/WebPreferencesStore.h:
1555         (WebKit): Changed the default value of the screenFontSubstitutionEnabled preference to false.
1556         * Shared/WebProcessCreationParameters.cpp:
1557         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Added an initializer for
1558         the new shouldForceScreenFontSubstitution data member.
1559         (WebKit::WebProcessCreationParameters::encode): Added encoding of shouldForceScreenFontSubstitution.
1560         (WebKit::WebProcessCreationParameters::decode): Added decoding of shouldForceScreenFontSubstitution.
1561         * Shared/WebProcessCreationParameters.h:
1562         (WebProcessCreationParameters): Added shouldForceScreenFontSubstitution boolean data member.
1563         * UIProcess/mac/WebContextMac.mm:
1564         (WebKit::WebContext::platformInitializeWebProcess): Added code to set shouldForceScreenFontSubstitution
1565         in the process creation parameters to the value of the NSFontDefaultScreenFontSubstitutionEnabled user
1566         defaults key.
1567         * WebProcess/WebPage/WebPage.cpp:
1568         (WebKit::WebPage::updatePreferences): Changed to enable screen font substitution also if
1569         shouldForceScreenFontSubstitution() is true.
1570         * WebProcess/WebProcess.h:
1571         (WebKit::WebProcess::shouldForceScreenFontSubstitution): Added this getter.
1572         (WebProcess): Added m_shouldForceScreenFontSubstitution boolean data member.
1573         * WebProcess/mac/WebProcessMac.mm:
1574         (WebKit::WebProcess::platformInitializeWebProcess): Added initialization of
1575         m_shouldForceScreenFontSubstitution from the creation parameters.
1576
1577 2012-09-25  Alexey Proskuryakov  <ap@apple.com>
1578
1579         Get rid of WebContext::m_pendingMessagesToPostToInjectedBundle
1580         https://bugs.webkit.org/show_bug.cgi?id=94368
1581
1582         Reviewed by Anders Carlsson.
1583
1584         It doesn't appear to be of any use.
1585
1586         * UIProcess/WebContext.cpp:
1587         (WebKit::WebContext::createNewWebProcess):
1588         (WebKit::WebContext::postMessageToInjectedBundle):
1589         * UIProcess/WebContext.h:
1590
1591 2012-09-24  Simon Fraser  <simon.fraser@apple.com>
1592
1593         <rdar://problem/12351906> Have DumpRenderTree and WebKitTestRunner crash logs show which test crashed
1594
1595         Reviewed by Mark Rowe.
1596
1597         Use a new WebKitSytemInterface function to add data to crash logs about which 
1598         test was running when the crash happened.
1599
1600         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1601         (InitWebCoreSystemInterface):  Hook up the function pointer for [wk|WK]SetCrashReportApplicationSpecificInformation.
1602
1603 2012-09-25  Beth Dakin  <bdakin@apple.com>
1604
1605         Build fix. I removed this function as a part of 
1606         https://bugs.webkit.org/show_bug.cgi?id=95397 but it is
1607         still needed for nightlies and open source builds.
1608
1609         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1610         (WKBundlePageSetPaintedObjectsCounterThreshold):
1611         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1612
1613 2012-09-25  Beth Dakin  <bdakin@apple.com>
1614
1615         https://bugs.webkit.org/show_bug.cgi?id=95397
1616         Need to merge didFirstVisuallyNonEmptyLayout and 
1617         didNewFirstVisuallyNonEmptyLayout
1618         -and corresponding-
1619         <rdar://problem/10791680>
1620
1621         Reviewed by Sam Weinig.
1622
1623         The new API has two parts. First, the client has to opt into which 
1624         layout milestones they are interested in hearing about using 
1625         WKPageListenForLayoutMilestones or 
1626         WKBundlePageListenForLayoutMilestones(). Then, WebKit will call 
1627         the didLayout(WKLayoutMilestones) callback on the appropriate 
1628         clients when the specified layout milestones have fired. didLayout 
1629         takes the WKLayoutMilestones bit mask, which will indicate which 
1630         milestones have fired since it is possible for two to fire at the 
1631         same time.
1632
1633         Define WKLayoutMilestoneOptions.
1634         * Shared/API/c/WKPageLoadTypes.h:
1635
1636         Define conversions between WKLayoutMilestoneOptions and 
1637         WebCore::LayoutMilestoneOptions
1638         * Shared/API/c/WKSharedAPICast.h:
1639         (WebKit::toWKLayoutMilestoneOptions):
1640         (WebKit):
1641         (WebKit::toLayoutMilestoneOptions):
1642
1643         New API.
1644         * UIProcess/API/C/WKPage.cpp:
1645         (WKPageListenForLayoutMilestones):
1646         * UIProcess/API/C/WKPage.h:
1647         * UIProcess/WebLoaderClient.cpp:
1648         (WebKit::WebLoaderClient::didLayout):
1649         (WebKit):
1650         * UIProcess/WebLoaderClient.h:
1651         (WebLoaderClient):
1652
1653         didFirstLayoutForFrame, didFirstVisuallyNonEmptyLayoutForFrame, 
1654         and didNewFirstVisuallyNonEmptyLayout are now implemented with 
1655         didLayout under the hood. So if those old callbacks have been 
1656         defined, be sure to add the appropriate layout milestones here for 
1657         backwards-compatibility.
1658         * UIProcess/WebPageProxy.cpp:
1659         (WebKit::WebPageProxy::initializeLoaderClient):
1660
1661         New API.
1662         (WebKit::WebPageProxy::listenForLayoutMilestones):
1663         (WebKit):
1664         (WebKit::WebPageProxy::didLayout):
1665         * UIProcess/WebPageProxy.h:
1666         (WebPageProxy):
1667         * UIProcess/WebPageProxy.messages.in:
1668
1669         New API. And remove the now-unnecessary 
1670         WKBundlePageSetPaintedObjectsCounterThreshold. 
1671         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1672         (WKBundlePageListenForLayoutMilestones):
1673         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1674         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1675
1676         New API.
1677         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1678         (WebKit::InjectedBundlePageLoaderClient::didNewFirstVisuallyNonEmptyLayout):
1679         (WebKit):
1680         (WebKit::InjectedBundlePageLoaderClient::didLayout):
1681         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1682         (InjectedBundlePageLoaderClient):
1683
1684         Remove dispatchDidFirstLayout, 
1685         dispatchDidFirstVisuallyNonEmptyLayout, and 
1686         dispatchDidNewFirstVisuallyNonEmptyLayout. They are now replaced 
1687         by dispatchDidLayout(LayoutMilestoneOptions)
1688         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1689         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
1690         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1691         (WebFrameLoaderClient):
1692
1693         didFirstLayoutForFrame, didFirstVisuallyNonEmptyLayoutForFrame, 
1694         and didNewFirstVisuallyNonEmptyLayout are now implemented with 
1695         didLayout under the hood. So if those old callbacks have been 
1696         defined, be sure to add the appropriate layout milestones here for 
1697         backwards-compatibility.
1698         * WebProcess/WebPage/WebPage.cpp:
1699         (WebKit::WebPage::initializeInjectedBundleLoaderClient):
1700         (WebKit):
1701
1702         Call into WebCore to set the layout milestones.
1703         (WebKit::WebPage::listenForLayoutMilestones):
1704         * WebProcess/WebPage/WebPage.h:
1705         (WebPage):
1706         * WebProcess/WebPage/WebPage.messages.in:
1707
1708         Account for the new member of PageLoadClient.
1709         * WebProcess/qt/QtBuiltinBundlePage.cpp:
1710         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
1711
1712 2012-09-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1713
1714         [GTK][EFL] Disk cache is never dumped to disk in WebKit2
1715         https://bugs.webkit.org/show_bug.cgi?id=97583
1716
1717         Reviewed by Martin Robinson.
1718
1719         The problem is that WebProcess::platformTerminate(), where the
1720         cache is currently dumped, is not called when the web process
1721         finishes because the UI process closes the connection. The cache
1722         is created and loaded in the main() so it can also be flushed and
1723         dumped there, so that we also make sure it's always called when
1724         the process finishes normally when the main loop quits.
1725
1726         * WebProcess/efl/WebProcessMainEfl.cpp:
1727         (WebKit::WebProcessMainEfl): Flush and dump the disk cache when
1728         the main loop returns.
1729         * WebProcess/gtk/WebProcessMainGtk.cpp:
1730         (WebKit::WebProcessMainGtk): Ditto.
1731         * WebProcess/soup/WebProcessSoup.cpp:
1732         (WebKit::WebProcess::platformTerminate): Do not flush and dump
1733         the disk cache.
1734
1735 2012-09-25  Benjamin Poulain  <bpoulain@apple.com>
1736
1737         Add missing support for Geolocation tests on WebKit2
1738         https://bugs.webkit.org/show_bug.cgi?id=97518
1739
1740         Reviewed by Sam Weinig.
1741
1742         The existing API for reporting error does not support passing and error message.
1743
1744         The interface UIProcess<->WebProcess is changed to take an error message, the
1745         existing API now pass a null String, and the new function
1746         WKGeolocationManagerProviderDidFailToDeterminePositionWithErrorMessage() provide
1747         the extended support with error message.
1748
1749         * UIProcess/API/C/WKGeolocationManager.cpp:
1750         (WKGeolocationManagerProviderDidFailToDeterminePositionWithErrorMessage):
1751         * UIProcess/API/C/WKGeolocationManager.h:
1752         * UIProcess/WebGeolocationManagerProxy.cpp:
1753         (WebKit::WebGeolocationManagerProxy::providerDidFailToDeterminePosition):
1754         * UIProcess/WebGeolocationManagerProxy.h:
1755         (WebGeolocationManagerProxy):
1756         * WebProcess/Geolocation/WebGeolocationManager.cpp:
1757         (WebKit::WebGeolocationManager::didFailToDeterminePosition):
1758         * WebProcess/Geolocation/WebGeolocationManager.h:
1759         (WebGeolocationManager):
1760         * WebProcess/Geolocation/WebGeolocationManager.messages.in:
1761
1762 2012-09-25  Akash Vaswani  <avaswani@apple.com>
1763
1764         Crash after clicking in plugin at kauaiexplorer.com
1765         <rdar://problem/11525987/> and https://bugs.webkit.org/show_bug.cgi?id=90925
1766
1767         Reviewed by Sam Weinig.
1768
1769         Bug: Clicking the plugin to navigate away from the page caused the browser to crash.
1770              This is because it is possible for a beforeunload handler to destroy the plugin
1771              while it is still needed. In this case the handler set visibility to "none" and
1772              then accessed a property on the plugin script object. This forced a layout
1773              that destroyed the plugin.
1774         Fix: Protecting PluginView objects until they are no longer required.
1775              This was done by adding a RefPtr at the beginning of performURLRequest() 
1776
1777         * WebProcess/Plugins/PluginView.cpp:
1778         (WebKit::PluginView::performURLRequest):
1779
1780 2012-09-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1781
1782         [GTK] Don't kill automatically the web process when the ui process finishes
1783         https://bugs.webkit.org/show_bug.cgi?id=97580
1784
1785         Reviewed by Martin Robinson.
1786
1787         We use prctl(PR_SET_PDEATHSIG, SIGKILL); in linux to make sure the
1788         web process is killed when the UI process finishes. This is not
1789         needed any more since now the web process stops the main loop when
1790         the connection with the UI process is closed in
1791         WebProcess::didClose(). This approach is better because it works
1792         for any platform and makes the web process finish normally from
1793         main().
1794
1795         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1796         (WebKit::childSetupFunction): Don't call prctl(PR_SET_PDEATHSIG,
1797         SIGKILL) in the child process.
1798
1799 2012-09-25  Benjamin Poulain  <benjamin@webkit.org>
1800
1801         Build fix, GeolocationClientMock should not be included by WebProcess InjectedBundle
1802
1803         Unreviewed.
1804
1805         The patch r129252 removes the dependencies on GeolocationClientMock, r129444 removes
1806         GeolocationClientMock from the Mac port. The #include breaks new Mac build.
1807
1808         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1809
1810 2012-09-25  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
1811
1812         [Qt] PageViewportController: Consolidate positionRangeForViewportAtScale and boundPosition
1813         https://bugs.webkit.org/show_bug.cgi?id=97222
1814
1815         Reviewed by Kenneth Rohde Christiansen.
1816
1817         Those methods are used together everywhere, merge them into a single
1818         clampViewportToContents method.
1819
1820         * UIProcess/PageViewportController.cpp:
1821         (WebKit::PageViewportController::innerBoundedViewportScale):
1822         (WebKit::PageViewportController::outerBoundedViewportScale):
1823         (WebKit::PageViewportController::clampViewportToContents):
1824         (WebKit):
1825         (WebKit::PageViewportController::pageDidRequestScroll):
1826         (WebKit::PageViewportController::syncVisibleContents):
1827         * UIProcess/PageViewportController.h:
1828         (PageViewportController):
1829         (WebKit):
1830         * UIProcess/qt/PageViewportControllerClientQt.cpp:
1831         (WebKit::PageViewportControllerClientQt::focusEditableArea):
1832         (WebKit::PageViewportControllerClientQt::zoomToAreaGestureEnded):
1833         (WebKit::PageViewportControllerClientQt::nearestValidVisibleContentsRect):
1834
1835 2012-09-25  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
1836
1837         [Qt] Unify the PageViewportController<->Client interface regarding positions
1838         https://bugs.webkit.org/show_bug.cgi?id=97220
1839
1840         Reviewed by Kenneth Rohde Christiansen.
1841
1842         - Make sure that css units are used for all position arguments
1843         - Make sure that all positions represent the viewport relatively to the contents
1844           rather than the other way around
1845         - Delay clamping the viewport to the contents size in the controller rather than in the client
1846
1847         * UIProcess/API/qt/qquickwebview.cpp:
1848         (QQuickWebViewFlickablePrivate::updateViewportSize):
1849         * UIProcess/PageViewportController.cpp:
1850         (WebKit::PageViewportController::pageDidRequestScroll):
1851         (WebKit::PageViewportController::didChangeViewportSize):
1852         (WebKit::PageViewportController::didChangeContentsVisibility):
1853         (WebKit::PageViewportController::syncVisibleContents):
1854         (WebKit::PageViewportController::positionRangeForViewportAtScale):
1855         * UIProcess/PageViewportController.h:
1856         (PageViewportController):
1857         * UIProcess/PageViewportControllerClient.h:
1858         (PageViewportControllerClient):
1859         * UIProcess/qt/PageViewportControllerClientQt.cpp:
1860         (WebKit::PageViewportControllerClientQt::animateContentRectVisible):
1861         (WebKit::PageViewportControllerClientQt::focusEditableArea):
1862         (WebKit::PageViewportControllerClientQt::zoomToAreaGestureEnded):
1863         (WebKit::PageViewportControllerClientQt::nearestValidVisibleContentsRect):
1864         (WebKit::PageViewportControllerClientQt::setViewportPosition):
1865         (WebKit::PageViewportControllerClientQt::updateViewportController):
1866         * UIProcess/qt/PageViewportControllerClientQt.h:
1867         (PageViewportControllerClientQt):
1868
1869 2012-09-25  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
1870
1871         [Qt] Make sure that desktop pages honour the devicePixelRatio
1872         https://bugs.webkit.org/show_bug.cgi?id=97215
1873
1874         Reviewed by Kenneth Rohde Christiansen.
1875
1876         The desktopWidth given to computeViewportAttributes is expected to be pixel-ratio adjusted already.
1877         We need to make sure that the viewport size is divided by the pixel ratio to prevent
1878         the equivalent of a 1.0 devicePixelRatio to be in effect once viewportSize.width() is larger
1879         than layoutFallbackWidth.
1880
1881         * WebProcess/WebPage/WebPage.cpp:
1882         (WebKit::WebPage::sendViewportAttributesChanged):
1883
1884 2012-09-25  Simon Pena  <spena@igalia.com>
1885
1886         [GTK] Add Undo / Redo method to WebKit2 GTK+ API
1887         https://bugs.webkit.org/show_bug.cgi?id=97553
1888
1889         Reviewed by Martin Robinson.
1890
1891         Add the macros for Undo / Redo support, and include them
1892         in the documentation.
1893
1894         * UIProcess/API/gtk/WebKitEditingCommands.h:
1895         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1896
1897 2012-09-25  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
1898
1899         [Qt] Abstract as much devicePixelRatio logic as possible behind PageViewportController
1900         https://bugs.webkit.org/show_bug.cgi?id=97214
1901
1902         Reviewed by Kenneth Rohde Christiansen.
1903
1904         Currently the client is required to multiply the scales it receives each bime by the
1905         devicePixelRatio. This shouldn't be required since essentially, the only places that the
1906         devicePixelRatio should be in use, is to adjust the layout size, multiply the base scale
1907         and for scale constants.
1908
1909         Other related changes:
1910         - Make sure that the controller and it's client are only exchanging effective scales
1911          (cssScale * devicePixelRatio)
1912         - Remove members duplicating m_rawAttributes values
1913         - Use a separate member for the minimum scale to fit the page, separate from the viewport arguments
1914         - Make sure that the minimum scale to fit is adjusted if the contents size isn't
1915           updated after the viewport attributes changed
1916         - Make the scale conversion functions private to discourage this logic from spreading in the client
1917
1918         * UIProcess/PageViewportController.cpp:
1919         (WebKit::PageViewportController::PageViewportController):
1920         (WebKit::PageViewportController::innerBoundedViewportScale):
1921         (WebKit::PageViewportController::outerBoundedViewportScale):
1922         (WebKit):
1923         (WebKit::PageViewportController::devicePixelRatio):
1924         (WebKit::PageViewportController::didChangeContentsSize):
1925         (WebKit::PageViewportController::didChangeViewportAttributes):
1926         (WebKit::PageViewportController::resumeContent):
1927         (WebKit::PageViewportController::updateMinimumScaleToFit):
1928         * UIProcess/PageViewportController.h:
1929         (PageViewportController):
1930         (WebKit::PageViewportController::minimumContentsScale):
1931         (WebKit::PageViewportController::maximumContentsScale):
1932         (WebKit::PageViewportController::currentContentsScale):
1933         (WebKit::PageViewportController::fromViewportScale):
1934         (WebKit::PageViewportController::toViewportScale):
1935         * UIProcess/qt/PageViewportControllerClientQt.cpp:
1936         (WebKit::PageViewportControllerClientQt::focusEditableArea):
1937         (WebKit::PageViewportControllerClientQt::zoomToAreaGestureEnded):
1938         (WebKit::PageViewportControllerClientQt::nearestValidVisibleContentsRect):
1939         (WebKit::PageViewportControllerClientQt::setContentsRectToNearestValidBounds):
1940         (WebKit::PageViewportControllerClientQt::pinchGestureRequestUpdate):
1941
1942 2012-09-25  Simon Pena  <spena@igalia.com>
1943
1944         [GTK] Fix typo in accessing union field in a GdkEvent in a WebKit2 unit test
1945         https://bugs.webkit.org/show_bug.cgi?id=97564
1946
1947         Reviewed by Martin Robinson.
1948
1949         In the WebViewTest::moveMouseTo method, the wrong field in
1950         a union was being accessed in a GdkEvent: instead of the button
1951         field, we were supposed to act on the motion one. This patch
1952         fixes the typo.
1953
1954         * UIProcess/API/gtk/tests/WebViewTest.cpp:
1955         (WebViewTest::mouseMoveTo):
1956
1957 2012-09-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1958
1959         [GTK] Don't use the C API internally in WebKitFindController
1960         https://bugs.webkit.org/show_bug.cgi?id=96775
1961
1962         Reviewed by Gustavo Noronha Silva.
1963
1964         Using the C++ classes directly instead of the C API wrappers we
1965         avoid a lot of toImpl/toAPI casts, string conversions and
1966         allocations. The code is also a lot simpler and easier to read.
1967
1968         * UIProcess/API/gtk/WebKitFindController.cpp:
1969         (getPage):
1970         (webkitFindControllerConstructed):
1971         (webKitFindControllerPerform):
1972         (webkit_find_controller_search_next):
1973         (webkit_find_controller_search_previous):
1974         (webkit_find_controller_search_finish):
1975
1976 2012-09-25  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
1977
1978         [Qt] Apply the devicePixelRatio as soon as possible
1979         https://bugs.webkit.org/show_bug.cgi?id=97211
1980
1981         Reviewed by Kenneth Rohde Christiansen.
1982
1983         Having to wait for the contents size to apply the devicePixelRatio can
1984         be problematic since the devicePixelRatio affects the layout width, which
1985         then affects the contents size.
1986
1987         Fix the initial issue that this was working around by preventing the
1988         early return if useFixedLayout() is true.
1989
1990         * UIProcess/API/qt/qquickwebview.cpp:
1991         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1992         (QQuickWebViewFlickablePrivate::didChangeContentsSize):
1993         (QQuickWebViewExperimental::devicePixelRatio):
1994         (QQuickWebViewExperimental::setDevicePixelRatio):
1995         * UIProcess/API/qt/qquickwebview_p_p.h:
1996         (QQuickWebViewPrivate::didChangeContentsSize):
1997         (QQuickWebViewPrivate):
1998         * UIProcess/DrawingAreaProxyImpl.cpp:
1999         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
2000
2001 2012-09-25  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
2002
2003         [Qt] Don't render at scale 1.0 when doing a pinch-zoom out
2004         https://bugs.webkit.org/show_bug.cgi?id=97212
2005
2006         Reviewed by Kenneth Rohde Christiansen.
2007
2008         When the user starts pinching this creates extra rendering that is bound to the
2009         page size and can be considerably big, reducing performance and peaking the tile
2010         memory usage.
2011
2012         Fixing this might require a different approach that we could experiment with.
2013
2014         * UIProcess/qt/PageViewportControllerClientQt.cpp:
2015         (WebKit::PageViewportControllerClientQt::animateContentRectVisible):
2016         (WebKit::PageViewportControllerClientQt::pinchGestureRequestUpdate):
2017
2018 2012-09-25  Michael Br√ľning  <michael.bruning@digia.com>
2019
2020         [Qt][WK2] Focus out is not handled properly
2021         https://bugs.webkit.org/show_bug.cgi?id=96997
2022
2023         Reviewed by Simon Hausmann.
2024
2025         Adds a handler for QQuickWebView::itemChange event that is sent to
2026         QQuickItems when their focus has been changed to replace focusOutEvent.
2027
2028         This fixes the problem because the focus has been updated when
2029         itemChange is called, while it is not yet update when focusOutEvent
2030         is called.
2031
2032         * UIProcess/API/qt/qquickwebview.cpp: Removed focusOutEvent.
2033         (QQuickWebView::itemChange): Added in place of focusOutEvent.
2034         * UIProcess/API/qt/qquickwebview_p.h:
2035         * UIProcess/qt/QtWebPageEventHandler.cpp:
2036         (WebKit::QtWebPageEventHandler::handleFocusLost): Renamed from handleFocusOutEvent, parameter removed.
2037         * UIProcess/qt/QtWebPageEventHandler.h:
2038         (QtWebPageEventHandler):
2039
2040 2012-09-25  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2041
2042         [WK2] Supported media MIME types are not included to the list of shown MIME types.
2043         https://bugs.webkit.org/show_bug.cgi?id=97552
2044
2045         Reviewed by Kenneth Rohde Christiansen.
2046
2047         Added supported media MIME types to the list of shown MIME types in order to fix
2048         media tests regression after r129479.
2049
2050         * UIProcess/WebPageProxy.cpp:
2051         (WebKit::WebPageProxy::canShowMIMEType):
2052         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2053         (WKBundlePageCanShowMIMEType):
2054
2055 2012-09-25  KwangYong Choi  <ky0.choi@samsung.com>
2056
2057         [EFL][WK2] Added hideColorPicker test case
2058         https://bugs.webkit.org/show_bug.cgi?id=97522
2059
2060         Reviewed by Kenneth Rohde Christiansen.
2061
2062         Added a test case for removing input element during color picker is shown.
2063
2064         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2065         (setColorPickerColor):
2066         (showColorPicker):
2067         (hideColorPicker):
2068         (TEST_F):
2069
2070 2012-09-25  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2071
2072         [WK2][WTR] WTR bundle client loads binary data as text
2073         https://bugs.webkit.org/show_bug.cgi?id=97532
2074
2075         Reviewed by Kenneth Rohde Christiansen.
2076
2077         Added WKBundlePageCanShowMIMEType() function to WKBundlePage private API.
2078         This function is put to WKBundlePage to keep consistency with WebKit::WebPageProxy::canShowMIMEType().
2079         Actually it does not need anything from page.
2080
2081         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2082         (WKBundlePageCanShowMIMEType):
2083         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2084
2085 2012-09-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2086
2087         [GTK] Don't use the C API internally in WebKitWebView
2088         https://bugs.webkit.org/show_bug.cgi?id=96767
2089
2090         Reviewed by Gustavo Noronha Silva.
2091
2092         Using the C++ classes directly instead of the C API wrappers we
2093         avoid a lot of toImpl/toAPI casts, string conversions and
2094         allocations. The code is also a lot simpler and easier to read.
2095
2096         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
2097         (getContextMenuFromProposedMenu):
2098         * UIProcess/API/gtk/WebKitResourceLoadClient.cpp:
2099         (didInitiateLoadForResource):
2100         * UIProcess/API/gtk/WebKitUIClient.cpp:
2101         (createNewPage):
2102         (runJavaScriptPrompt):
2103         (mouseDidMoveOverElement):
2104         (printFrame):
2105         * UIProcess/API/gtk/WebKitURIRequest.cpp:
2106         (webkitURIRequestCreateForResourceRequest):
2107         (webkitURIRequestGetResourceRequest):
2108         * UIProcess/API/gtk/WebKitURIRequestPrivate.h:
2109         * UIProcess/API/gtk/WebKitWebView.cpp:
2110         (allowModalDialogsChanged):
2111         (zoomTextOnlyChanged):
2112         (webkitWebViewSetSettings):
2113         (webkitWebViewConstructed):
2114         (webkitWebViewUpdateURI):
2115         (webkitWebViewCreateNewPage):
2116         (webkitWebViewRunJavaScriptPrompt):
2117         (webkitWebViewMouseTargetChanged):
2118         (webkitWebViewPrintFrame):
2119         (webkitWebViewResourceLoadStarted):
2120         (webkitWebViewPopulateContextMenu):
2121         (webkit_web_view_load_uri):
2122         (webkit_web_view_load_html):
2123         (webkit_web_view_load_alternate_html):
2124         (webkit_web_view_load_plain_text):
2125         (webkit_web_view_load_request):
2126         (webkit_web_view_reload):
2127         (webkit_web_view_reload_bypass_cache):
2128         (webkit_web_view_stop_loading):
2129         (webkit_web_view_go_back):
2130         (webkit_web_view_can_go_back):
2131         (webkit_web_view_go_forward):
2132         (webkit_web_view_can_go_forward):
2133         (webkit_web_view_get_custom_charset):
2134         (webkit_web_view_set_custom_charset):
2135         (webkit_web_view_go_to_back_forward_list_item):
2136         (webkit_web_view_set_settings):
2137         (webkit_web_view_set_zoom_level):
2138         (webkit_web_view_get_zoom_level):
2139         (webkit_web_view_can_execute_editing_command):
2140         (webkit_web_view_execute_editing_command):
2141         (webkit_web_view_run_javascript):
2142         (webkit_web_view_get_inspector):
2143         (webkit_web_view_can_show_mime_type):
2144         (ViewSaveAsyncData):
2145         (getContentsAsMHTMLDataCallback):
2146         (webkit_web_view_save):
2147         (webkit_web_view_save_finish):
2148         (webkit_web_view_save_to_file):
2149         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2150         (webkitWebViewBaseCreate):
2151         (webkitWebViewBaseCreateWebPage):
2152         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2153         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
2154
2155 2012-09-24  Bo Liu  <boliu@chromium.org>
2156
2157         Reland "Add in-place reload behavior to ImagesEnabled setting" with optimizations
2158         https://bugs.webkit.org/show_bug.cgi?id=97055
2159
2160         Reviewed by Adam Barth.
2161
2162         Relanding 128780, 128676, 128645. Was reverted in 128914 due to
2163         performance regression in Chromium.
2164
2165         New changes in addition to previously reverted patches:
2166
2167         Refactored CachedResource::requestResource, loadResource, and
2168         revalidateResource. Moved CachedResource::load method to end of
2169         requestResource so there is one place where load is called for all
2170         resources.
2171
2172         Added a enum parameter for requestResource and
2173         determineRevalidationPolicy so that FrameLoaderClient::allowImage call
2174         do not need to be called multiple times.
2175
2176         Removed CachedImage::load call in requestImage so it is not called
2177         twice.
2178
2179         Removed unnecessary Frame.h includes in CachedResource and
2180         CachedImage.
2181
2182         Removed dead load() method declaration in CachedImage.
2183
2184         Updated text expectation for two image-permissions tests to reflect
2185         the removed calls to allowImage.
2186
2187         * win/WebKit2.def:
2188
2189 2012-09-24  Sam Weinig  <sam@webkit.org>
2190
2191         WKProcessGroup can't load injected bundle with file URL
2192         <rdar://problem/12322774>
2193         https://bugs.webkit.org/show_bug.cgi?id=97520
2194
2195         Reviewed by Anders Carlsson.
2196
2197         * UIProcess/API/mac/WKProcessGroup.mm:
2198         (-[WKProcessGroup initWithInjectedBundleURL:]):
2199         Fix typo. We need to pass the string as path, not as a URL.
2200
2201 2012-09-24  Sam Weinig  <sam@webkit.org>
2202
2203         Use NSUserDefaults rather than an environment variable to control whether to use an XPC Service for the WebProcess
2204         https://bugs.webkit.org/show_bug.cgi?id=97514
2205
2206         Reviewed by Anders Carlsson.
2207
2208         * GNUmakefile.list.am:
2209         * PlatformEfl.cmake:
2210         * Target.pri:
2211         Add new files.
2212
2213         * UIProcess/Launcher/ProcessLauncher.h:
2214         * UIProcess/WebProcessProxy.cpp:
2215         (WebKit::WebProcessProxy::connect):
2216         Move platform specific launch options to a new function, platformConnect.
2217
2218         * UIProcess/WebProcessProxy.h:
2219         * UIProcess/efl/WebProcessProxyEfl.cpp: Added.
2220         Move Efl specific launch options here.
2221  
2222         (WebKit::WebProcessProxy::platformConnect):
2223         * UIProcess/gtk/WebProcessProxyGtk.cpp: Added.
2224         Add stub.
2225
2226         (WebKit::WebProcessProxy::platformConnect):
2227         * UIProcess/mac/WebProcessProxyMac.mm:
2228         (WebKit::WebProcessProxy::platformConnect):
2229         Move Mac specific launch option setting here, and switch from
2230         using an environment variable to NSUserDefaults.
2231
2232         * UIProcess/qt/WebProcessProxyQt.cpp: Added.
2233         (WebKit::WebProcessProxy::platformConnect):
2234         Add stub.
2235
2236         * UIProcess/win/WebProcessProxyWin.cpp:
2237         (WebKit::WebProcessProxy::platformConnect):
2238         Add stub.
2239
2240 2012-09-24  Laszlo Gombos  <l.gombos@samsung.com>
2241
2242         [GTK][EFL] Remove cairo prefix from include statements
2243         https://bugs.webkit.org/show_bug.cgi?id=97509
2244
2245         Reviewed by Gyuyoung Kim.
2246
2247         Make the build system consistent by always assuming that directory 
2248         that includes the cairo headers is included in the include path.
2249
2250         * UIProcess/cairo/BackingStoreCairo.cpp:
2251         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2252
2253 2012-09-24  Sheriff Bot  <webkit.review.bot@gmail.com>
2254
2255         Unreviewed, rolling out r129388.
2256         http://trac.webkit.org/changeset/129388
2257         https://bugs.webkit.org/show_bug.cgi?id=97477
2258
2259         Caused an assertion in a WebKit2 unit test (Requested by
2260         abarth on #webkit).
2261
2262         * win/WebKit2.def:
2263
2264 2012-09-24  Simon Pena  <spena@igalia.com>
2265
2266         [GTK] Add Select All method to WebKit2 GTK+ API
2267         https://bugs.webkit.org/show_bug.cgi?id=97460
2268
2269         Reviewed by Martin Robinson.
2270
2271         Following the same approach used when added Cut, Copy and Paste,
2272         the Select All method is added to the WebKit2 GTK+ API.
2273
2274         This introduces a new macro in the WebKitEditingCommands,
2275         updates the documentation, and includes a new unit test.
2276
2277         * UIProcess/API/gtk/WebKitEditingCommands.h: Add a new macro for
2278         the Select All command.
2279         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the Select All
2280         command in the documentation.
2281         * UIProcess/API/gtk/tests/TestWebViewEditor.cpp: Cover the new command
2282         with a unit test.
2283         (testWebViewEditorSelectAll):
2284         (beforeAll):
2285
2286 2012-09-24  Bo Liu  <boliu@chromium.org>
2287
2288         Reland "Add in-place reload behavior to ImagesEnabled setting" with optimizations
2289         https://bugs.webkit.org/show_bug.cgi?id=97055
2290
2291         Reviewed by Adam Barth.
2292
2293         Relanding 128780, 128676, 128645. Was reverted in 128914 due to
2294         performance regression in Chromium.
2295
2296         New changes in addition to previously reverted patches:
2297
2298         Refactored CachedResource::requestResource, loadResource, and
2299         revalidateResource. Moved CachedResource::load method to end of
2300         requestResource so there is one place where load is called for all
2301         resources.
2302
2303         Added a enum parameter for requestResource and
2304         determineRevalidationPolicy so that FrameLoaderClient::allowImage call
2305         do not need to be called multiple times.
2306
2307         Removed CachedImage::load call in requestImage so it is not called
2308         twice.
2309
2310         Removed unnecessary Frame.h includes in CachedResource and
2311         CachedImage.
2312
2313         Removed dead load() method declaration in CachedImage.
2314
2315         Updated text expectation for two image-permissions tests to reflect
2316         the removed calls to allowImage.
2317
2318         * win/WebKit2.def:
2319
2320 2012-09-24  Joone Hur  <joone.hur@intel.com>, Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
2321
2322         [GTK] Implement GraphicsLayer using Clutter
2323         https://bugs.webkit.org/show_bug.cgi?id=73767
2324
2325         Reviewed by Martin Robinson.
2326
2327         Fixed link errors by adding Clutter library and header to WebKit2 build.
2328
2329         * GNUmakefile.am:
2330
2331 2012-09-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2332
2333         [GTK] WebKitWebView:is-loading is not updated when the is loaded is started by link clicked navigation action
2334         https://bugs.webkit.org/show_bug.cgi?id=97458
2335
2336         Reviewed by Xan Lopez.
2337
2338         WebKitWebView:is-loading is set to TRUE when the load is started
2339         by using the API. We want to make sure that both URI and
2340         is-loading are updated before load-started is emitted, so we can
2341         update both right before emitting load-started.
2342
2343         * UIProcess/API/gtk/WebKitWebView.cpp:
2344         (webkitWebViewEmitLoadChanged): Update both uri and is-loading
2345         properties before emitting load-changed signal with
2346         WEBKIT_LOAD_STARTED.
2347         (webkit_web_view_load_uri): Don't call
2348         webkitWebViewSetIsLoading().
2349         (webkit_web_view_load_html): Ditto.
2350         (webkit_web_view_load_alternate_html): Ditto.
2351         (webkit_web_view_load_plain_text): Ditto.
2352         (webkit_web_view_load_request): Ditto.
2353         (webkit_web_view_reload): Ditto.
2354         (webkit_web_view_reload_bypass_cache): Ditto.
2355         (webkit_web_view_go_back): Ditto.
2356         (webkit_web_view_go_forward): Ditto.
2357         (webkit_web_view_go_to_back_forward_list_item): Ditto.
2358
2359 2012-09-24  Byungwoo Lee  <bw80.lee@samsung.com>
2360
2361         [EFL][WK2] Change the install path for libewk2UnitTestInjectedBundleSample.so.
2362         https://bugs.webkit.org/show_bug.cgi?id=97302
2363
2364         Reviewed by Gyuyoung Kim.
2365
2366         libewk2UnitTestInjectedBundleSample.so file is created under the
2367         Source directory.
2368         Change install directory for the library to under the build directory.
2369
2370         * PlatformEfl.cmake:
2371         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
2372         (EWK2UnitTest::EWK2UnitTestEnvironment::injectedBundleSample):
2373
2374 2012-09-24  Vivek Galatage  <vivekgalatage@gmail.com>
2375
2376         Web Inspector: implement testing harness for pure protocol tests.
2377         https://bugs.webkit.org/show_bug.cgi?id=90675
2378
2379         Reviewed by Yury Semikhatsky.
2380
2381         Adding the export symbol definitions required on Apple Windows and WinCairo
2382         ports to support Inspector Protocol testing harness.
2383
2384         * win/WebKit2.def:
2385         * win/WebKit2CFLite.def:
2386
2387 2012-09-24  KwangYong Choi  <ky0.choi@samsung.com>
2388
2389         [EFL][WK2] Invalid featuring of INPUT_TYPE_COLOR in test_ewk2_view.
2390         https://bugs.webkit.org/show_bug.cgi?id=97430
2391
2392         Reviewed by Kenneth Rohde Christiansen.
2393
2394         The tests of ewk_view_context_get and ewk_view_feed_touch_event are not related to
2395         INPUT_TYPE_COLOR. These tests should be moved to outside of INPUT_TYPE_COLOR block.
2396
2397         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2398         (TEST_F):
2399
2400 2012-09-23  Seokju Kwon  <seokju.kwon@samsung.com>
2401
2402         [EFL][WK2] Add setting to toggle developer extensions
2403         https://bugs.webkit.org/show_bug.cgi?id=96974
2404
2405         Reviewed by Kenneth Rohde Christiansen.
2406
2407         This is required to allow the user to inspect pages. (Web inspector)
2408
2409         * UIProcess/API/efl/ewk_settings.cpp:
2410         (ewk_settings_developer_extras_enabled_set):
2411         (ewk_settings_developer_extras_enabled_get):
2412         * UIProcess/API/efl/ewk_settings.h:
2413         * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
2414         (TEST_F):
2415
2416 2012-09-23  Byungwoo Lee  <bw80.lee@gmail.com>
2417
2418         Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized.
2419         https://bugs.webkit.org/show_bug.cgi?id=97306
2420
2421         Reviewed by Benjamin Poulain.
2422
2423         Fix build warning about -Wunused-parameter on Connection.cpp,
2424         WKEinaSharedString.cpp, ewk_view_loader_client.cpp, WebPage.cpp by
2425         using ASSERT_UNUSED() macro or removing parameter name.
2426         Fix build warning about -Wuninitialized on WebEventFactory.cpp by
2427         continueing the loop at the default switch case not to use the
2428         uninitialized variable.
2429
2430         * Platform/CoreIPC/Connection.cpp:
2431         (CoreIPC::Connection::waitForSyncReply):
2432         * Shared/efl/WebEventFactory.cpp:
2433         (WebKit::WebEventFactory::createWebTouchEvent):
2434         * UIProcess/API/cpp/efl/WKEinaSharedString.cpp:
2435         (WKEinaSharedString::WKEinaSharedString):
2436         * UIProcess/API/efl/ewk_view_loader_client.cpp:
2437         (didSameDocumentNavigationForFrame):
2438         * WebProcess/WebPage/WebPage.cpp:
2439         (WebKit::WebPage::SandboxExtensionTracker::beginLoad):
2440
2441 2012-09-22  Sam Weinig  <sam@webkit.org>
2442
2443         Install WebProcess XPC services into the right places
2444         https://bugs.webkit.org/show_bug.cgi?id=97385
2445
2446         Reviewed by Anders Carlsson.
2447
2448         * Configurations/WebProcessService.xcconfig:
2449         Update INSTALL_PATH to go into WebKit2.framework/Versions/A/XPCServices.
2450
2451         * Configurations/WebProcessServiceForWebKitDevelopment.xcconfig:
2452         Since this config file is almost identical to WebProcessService.xcconfig,
2453         just #include it and change the one thing that is different, the INFOPLIST_FILE
2454         
2455         * WebKit2.xcodeproj/project.pbxproj:
2456         Follow XPC procedure and copy the services into the right place, WebKit2.framework/Versions/A/XPCServices
2457         in all builds except production builds where it is not necessary. Also add a symlink like everyone else
2458         does.
2459
2460 2012-09-22  Sam Weinig  <sam@webkit.org>
2461
2462         Allow setting a custom path to where the plug-in sandbox profiles are being kept
2463         https://bugs.webkit.org/show_bug.cgi?id=97399
2464
2465         Reviewed by Anders Carlsson.
2466
2467         Add a new default to allow controlling where to look for plug-in sandbox profiles
2468         called "PlugInSandboxProfileDirectoryPath".
2469
2470         * PluginProcess/mac/PluginProcessMac.mm:
2471         (WebKit::initializeSandbox):
2472         Use the passed in sandboxProfileDirectoryPath instead of hard coding /usr/share/sandbox/.
2473
2474         (WebKit::PluginProcess::platformInitialize):
2475         * Shared/Plugins/PluginProcessCreationParameters.cpp:
2476         (WebKit::PluginProcessCreationParameters::encode):
2477         (WebKit::PluginProcessCreationParameters::decode):
2478         * Shared/Plugins/PluginProcessCreationParameters.h:
2479         (PluginProcessCreationParameters):
2480         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2481         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
2482         Grab the sandboxProfileDirectoryPath from standardUserDefaults and pass it to
2483         the plug-in.
2484
2485 2012-09-21  Sam Weinig  <sam@webkit.org>
2486
2487         Fix the Lion and Snow Leopard builds.
2488
2489         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2490         (WebKit::connectToWebProcessServiceForWebKitDevelopment):
2491         (WebKit::createWebProcessServiceForWebKitDevelopment):
2492         (WebKit::createWebProcessService):
2493
2494 2012-09-21  Sam Weinig  <sam@webkit.org>
2495
2496         WebProcess XPC services need have their environment set without disrupting all other XPC services
2497         https://bugs.webkit.org/show_bug.cgi?id=95161
2498
2499         Reviewed by Anders Carlsson.
2500
2501         Replace the WebKit2Service with two new XPC services, the WebProcessService, which is only used
2502         when installed on the system, and the WebProcessServiceForWebKitDevelopment which is used at all
2503         other times. We need both services because XPC can't in general be configured to have a custom
2504         environment at runtime, and thus WebProcessServiceForWebKitDevelopment has the ability to re-exec
2505         itself into a desired state. That capability is rather undesirable for installed usage, where we
2506         don't want to allow arbitrary changes to the environment of the service, which would allow breaking
2507         the App Sandbox.
2508
2509         * Configurations/WebProcessService.xcconfig: Copied from Source/WebKit2/Configurations/WebKit2Service.xcconfig.
2510         * Configurations/WebProcessServiceForWebKitDevelopment.xcconfig: Renamed from Source/WebKit2/Configurations/WebKit2Service.xcconfig.
2511         Add new configuration files.
2512
2513         * Platform/mac/WorkQueueMac.cpp:
2514         (WorkQueue::registerMachPortEventHandler):
2515         (WorkQueue::unregisterMachPortEventHandler):
2516         Add helpful assertions. Without them, we confusingly crash a bit later in HashTable code.
2517
2518         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2519         (WebKit::addDYLDEnvironmentAdditions):
2520         Factor out environment additions to this helper function.
2521
2522         (WebKit::connectToWebProcessServiceForWebKitDevelopment):
2523         (WebKit::createWebProcessServiceForWebKitDevelopment):
2524         Add functionality to setup the webkit development service via re-exec.
2525
2526         (WebKit::createWebProcessService):
2527         Add functionality to connect to the installed WebProcess service.
2528         
2529         (WebKit::createProcess):
2530         Factor out posix_spawn based launching into this helper function.
2531
2532         (WebKit::ProcessLauncher::launchProcess):
2533         Call the correct process creation function based on launch data and install state.
2534
2535         * WebKit2.xcodeproj/project.pbxproj:
2536         Add new files to the project.
2537
2538         * WebProcess/mac/WebProcessServiceEntryPoints.h: Renamed from Source/WebKit2/WebProcess/mac/WebProcessXPCServiceMain.h.
2539         * WebProcess/mac/WebProcessServiceEntryPoints.mm: Renamed from Source/WebKit2/WebProcess/mac/WebProcessXPCServiceMain.mm.
2540         (WebKit::WebProcessServiceEventHandler):
2541         (WebProcessServiceMain):
2542         (InitializeWebProcessForWebProcessServiceForWebKitDevelopment):
2543         Rename to WebProcessServiceEntryPoints since this is now used for both the WebProcessService and the 
2544         WebProcessServiceForWebKitDevelopment.
2545     
2546         * WebProcessService/Info.plist: Copied from Source/WebKit2/WebKit2Service/Info.plist.
2547         * WebProcessService/WebProcessServiceMain.mm: Renamed from Source/WebKit2/WebKit2Service/MainMacService.mm.
2548         Add main for the WebProcessService which just calls into the WebProcessServiceEntryPoints in WebKit2.framework.
2549
2550         * WebProcessServiceForWebKitDevelopment/Info.plist: Renamed from Source/WebKit2/WebKit2Service/Info.plist.
2551         * WebProcessServiceForWebKitDevelopment/WebProcessServiceForWebKitDevelopmentMain.mm: Added.
2552         Add main for the WebProcessServiceForWebKitDevelopment, which can't just call directly into WebProcessServiceEntryPoints
2553         as the framework path might not be set up correctly. This is also where we re-exec ourselves when required.
2554
2555 2012-09-21  Anders Carlsson  <andersca@apple.com>
2556
2557         Fix WebKit2 sandbox profile.
2558
2559         Instead of using #pragmas, just disable all warnings in DerivedSources.make. I suspect
2560         that passing -traditional to the preprocessor disables support for #pragmas but I'm afraid
2561         to change it to something else.
2562
2563         * DerivedSources.make:
2564         * WebProcess/com.apple.WebProcess.sb.in:
2565
2566 2012-09-21  Benjamin Poulain  <bpoulain@apple.com>
2567
2568         fast/dom/Geolocation/disconnected-frame.html test asserts
2569         https://bugs.webkit.org/show_bug.cgi?id=97376
2570
2571         Reviewed by Alexey Proskuryakov.
2572
2573         In GeolocationPermissionRequestManager::cancelRequestForGeolocation, we access an iterator
2574         after its value has been removed from the table.
2575         There are two problems with that:
2576         -The iterator is no longer valid after the container has been modified.
2577         -If it was the last element, the table has been freed and the iterator points to deleted memory.
2578
2579         We solve the issue by keeping a copy of the ID. We could have inverted the order of the calls
2580         but that would make the issue less visible for future change.
2581
2582         Testing covered by fast/dom/Geolocation/disconnected-frame.html.
2583
2584         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
2585         (WebKit::GeolocationPermissionRequestManager::cancelRequestForGeolocation):
2586
2587 2012-09-21  Sam Weinig  <sam@webkit.org>
2588
2589         REGRESSION (r120361) Warnings while preprocessing com.apple.WebProcess.sb.in
2590         https://bugs.webkit.org/show_bug.cgi?id=91079
2591         <rdar://problem/12332660>
2592
2593         Reviewed by Anders Carlsson.
2594
2595         * WebProcess/com.apple.WebProcess.sb.in:
2596         Add pragma to ignore the invalid preprocessor warnings.
2597
2598 2012-09-21  Chris Rogers  <crogers@google.com>
2599
2600         Add Web Audio support for deprecated/legacy APIs
2601         https://bugs.webkit.org/show_bug.cgi?id=97050
2602
2603         Reviewed by Eric Carlson.
2604
2605         * Configurations/FeatureDefines.xcconfig:
2606
2607 2012-09-21  Benjamin Poulain  <bpoulain@apple.com>
2608
2609         [WK2] Add basic testing support for Geolocation
2610         https://bugs.webkit.org/show_bug.cgi?id=97278
2611
2612         Reviewed by Kenneth Rohde Christiansen.
2613
2614         * Shared/API/c/WKNumber.h: Fix an unfortunate copy-paste :)
2615
2616         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2617         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2618         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2619         * WebProcess/InjectedBundle/InjectedBundle.h:
2620         (InjectedBundle):
2621         Remove the code forcing the Geolocation permissions. It was working around the normal
2622         Geolocation code and updating all the GeolocationController, which is a terrible idea.
2623
2624 2012-09-21  Alexey Proskuryakov  <ap@apple.com>
2625
2626         [WK2] Make Web Inspector work in multiple web process mode
2627         https://bugs.webkit.org/show_bug.cgi?id=97354
2628
2629         Reviewed by Timothy Hatcher.
2630
2631         * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2632         Tell WKView that it's related to original page, making inspector page be in the same process.
2633
2634 2012-09-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2635
2636         [GTK] Implement ViewState methods in PageClientImpl in WebKit2
2637         https://bugs.webkit.org/show_bug.cgi?id=97202
2638
2639         Reviewed by Martin Robinson.
2640
2641         Implement isViewWindowActive(), isViewFocused(), isViewVisible()
2642         and isViewInWindow() in PageClientImpl.
2643
2644         * GNUmakefile.list.am: Add new files to compilation.
2645         * UIProcess/API/C/gtk/WKView.cpp:
2646         (WKViewSetFocus): New private method used by WTR to focus the
2647         WebView.
2648         * UIProcess/API/C/gtk/WKViewPrivate.h: Added.
2649         * UIProcess/API/gtk/PageClientImpl.cpp:
2650         (WebKit::PageClientImpl::isViewWindowActive): Return
2651         webkitWebViewBaseIsInWindowActive().
2652         (WebKit::PageClientImpl::isViewFocused): Return
2653         webkitWebViewBaseIsFocused().
2654         (WebKit::PageClientImpl::isViewVisible): Return
2655         webkitWebViewBaseIsVisible().
2656         (WebKit::PageClientImpl::isViewInWindow): Return
2657         webkitWebViewBaseIsInWindow().
2658         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2659         (webkitWebViewBaseNotifyResizerSize): Updated to not receive the
2660         window as parameter since it's now saved in the instance struct.
2661         (toplevelWindowResizeGripVisibilityChanged): Update to
2662         webkitWebViewBaseNotifyResizerSize() API change.
2663         (toplevelWindowFocusInEvent): Update ViewWindowIsActive flag and
2664         notify the WebPageProxy if it changed.
2665         (toplevelWindowFocusOutEvent): Ditto.
2666         (webkitWebViewBaseSetToplevelOnScreenWindow): Set the toplevel
2667         on-screen window where the view is currently added and notify
2668         WebPageProxy if it changed.
2669         (webkitWebViewBaseRealize): Call
2670         webkitWebViewBaseSetToplevelOnScreenWindow() if the view has been
2671         added to an on-screen window.
2672         (webkitWebViewBaseFinalize): Reset the toplevel on-screen window
2673         to make sure all signals are disconnected when the view is
2674         destroyed.
2675         (webkit_web_view_base_init): Remove unneeded initialization.
2676         (resizeWebKitWebViewBaseFromAllocation): Update to
2677         webkitWebViewBaseNotifyResizerSize() API change.
2678         (webkitWebViewBaseMap): Update ViewIsVisible flag and notify
2679         WebPageProxy if it changed.
2680         (webkitWebViewBaseUnmap): Ditto.
2681         (webkitWebViewBaseFocusInEvent): Call webkitWebViewBaseSetFocus()
2682         passing true to focus the view.
2683         (webkitWebViewBaseFocusOutEvent): Call webkitWebViewBaseSetFocus()
2684         passing false to unfocus the view.
2685         (webkitWebViewBaseParentSet): Reset the toplevel on-screen window
2686         if the view is re-parented.
2687         (webkit_web_view_base_class_init): Add implementations for map and
2688         parent-set virtual functions.
2689         (webkitWebViewBaseSetFocus): Update the ViewIsFocused and notify
2690         WebPageProxy if it changed.
2691         (webkitWebViewBaseIsInWindowActive):
2692         (webkitWebViewBaseIsFocused):
2693         (webkitWebViewBaseIsVisible):
2694         (webkitWebViewBaseIsInWindow):
2695         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2696         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2697         (testWebViewMouseTarget): Use a GTK_WINDOW_TOPLEVEL instead of
2698         POPUP for this test to make sure the view receives focus change
2699         events.
2700
2701 2012-09-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2702
2703         [GTK] Add WebKitWebView:is-loading property to WebKit2 GTK+ API
2704         https://bugs.webkit.org/show_bug.cgi?id=97330
2705
2706         Reviewed by Xan Lopez.
2707
2708         WebKitWebView:is-loading property allows to monitor when the view
2709         is loading something without having to deal with load-changed
2710         signal and all the details of the load status. This also allows to
2711         know when a new load is started before it goes to STARTED status.
2712
2713         * UIProcess/API/gtk/WebKitWebView.cpp:
2714         (webkitWebViewGetProperty): Implement getter for is-loading
2715         property.
2716         (webkit_web_view_class_init): Add is-loading property.
2717         (webkitWebViewSetIsLoading): Set whether web view is loading a
2718         page and emit notify signal if the is-loading property has
2719         changed. Also update the active URI when a new load operation has
2720         started.
2721         (webkitWebViewEmitLoadChanged): Set is-loading to FALSE when load
2722         finishes.
2723         (webkitWebViewLoadFailed): Set is-loading to FALSE when load fails.
2724         (webkit_web_view_load_uri): Set is-loading to TRUE.
2725         (webkit_web_view_load_html): Ditto.
2726         (webkit_web_view_load_alternate_html): Ditto.
2727         (webkit_web_view_load_plain_text): Ditto.
2728         (webkit_web_view_load_request): Ditto.
2729         (webkit_web_view_reload): Ditto.
2730         (webkit_web_view_reload_bypass_cache): Ditto.
2731         (webkit_web_view_is_loading): Return whether the view is loading a
2732         page.
2733         (webkit_web_view_go_back): Set is-loading to TRUE.
2734         (webkit_web_view_go_forward): Ditto.
2735         (webkit_web_view_go_to_back_forward_list_item): Ditto.
2736         * UIProcess/API/gtk/WebKitWebView.h:
2737         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
2738         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
2739         (loadChangedCallback):
2740         (loadFailedCallback):
2741         * UIProcess/API/gtk/tests/TestLoaderClient.cpp:
2742         (testWebViewIsLoading):
2743         (beforeAll):
2744
2745 2012-09-20  Eunmi Lee  <eunmi15.lee@samsung.com>
2746
2747         [EFL][WK2] Add API to feed touch event.
2748         https://bugs.webkit.org/show_bug.cgi?id=96903
2749
2750         Reviewed by Kenneth Rohde Christiansen.
2751
2752         The applications will use this API to feed touch event to the view
2753         when they want to generate touch event from their own event processor.
2754         WTR also will use this API to generate touch event with multiple touch
2755         points for passing test cases of touch event in the WebKit2/EFL.
2756
2757         * PlatformEfl.cmake:
2758         * UIProcess/API/efl/EWebKit2.h:
2759         * UIProcess/API/efl/ewk_view.cpp:
2760         (ewk_view_feed_touch_event):
2761         * UIProcess/API/efl/ewk_view.h:
2762         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2763         (TEST_F):
2764
2765 2012-09-20  Patrick Gansterer  <paroga@webkit.org>
2766
2767         Add String::numberToStringFixedWidth()
2768         https://bugs.webkit.org/show_bug.cgi?id=96330
2769
2770         Reviewed by Benjamin Poulain.
2771
2772         * win/WebKit2.def:
2773         * win/WebKit2CFLite.def:
2774
2775 2012-09-17  Jon Lee  <jonlee@apple.com>
2776
2777         Safari 6 notifications' onclick handlers can't call window.open()
2778         https://bugs.webkit.org/show_bug.cgi?id=96959
2779         <rdar://problem/12132427>
2780
2781         Reviewed by Darin Adler.
2782
2783         The click is not being treated as a user gesture when the message is sent to the web process.
2784
2785         * WebProcess/Notifications/WebNotificationManager.cpp:
2786         (WebKit::WebNotificationManager::didClickNotification): Gets called when the user clicks on the
2787         platform notification. Set UserGestureIndicator to show the click event is due to user gesture.
2788
2789 2012-09-20  Eunmi Lee  <eunmi15.lee@samsung.com>
2790
2791         [EFL][WK2] Add APIs to create, delete and get ewk_context.
2792         https://bugs.webkit.org/show_bug.cgi?id=89186
2793
2794         Reviewed by Kenneth Rohde Christiansen.
2795
2796         Provide APIs to create ewk_context with or without injected bundle path
2797         and delete created ewk_context.
2798         Additionally, the ewk_view can be created with ewk_context which is not
2799         default context, so we have to get ewk_context from ewk_view.
2800
2801         * PlatformEfl.cmake:
2802         * UIProcess/API/efl/PageClientImpl.cpp:
2803         (WebKit::PageClientImpl::handleDownloadRequest):
2804         * UIProcess/API/efl/ewk_context.cpp:
2805         (_Ewk_Context):
2806         (_Ewk_Context::_Ewk_Context):
2807         (ewk_context_ref):
2808         (ewk_context_unref):
2809         (ewk_context_new):
2810         (ewk_context_new_with_injected_bundle_path):
2811         * UIProcess/API/efl/ewk_context.h:
2812         * UIProcess/API/efl/ewk_view.cpp:
2813         (_Ewk_View_Private_Data):
2814         (_Ewk_View_Private_Data::_Ewk_View_Private_Data):
2815         (_ewk_view_priv_del):
2816         (_ewk_view_initialize):
2817         (ewk_view_context_get):
2818         * UIProcess/API/efl/ewk_view.h:
2819         * UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp: Added.
2820         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
2821         (EWK2UnitTest::EWK2UnitTestEnvironment::injectedBundleSample):
2822         (EWK2UnitTest):
2823         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
2824         (EWK2UnitTestEnvironment):
2825         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2826         (TEST_F):
2827         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
2828         (TEST_F):
2829         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2830         (TEST_F):
2831
2832 2012-09-20  KwangYong Choi  <ky0.choi@samsung.com>
2833
2834         [EFL][WK2] Implemented color picker API
2835         https://bugs.webkit.org/show_bug.cgi?id=91832
2836
2837         Reviewed by Kenneth Rohde Christiansen.
2838
2839         Add support for color picker API for EFL port in WebKit2.
2840
2841         The external application can implement input picker by overriding
2842         smart class function.
2843
2844         * UIProcess/API/efl/ewk_view.cpp:
2845         (_Ewk_View_Private_Data):
2846         (_Ewk_View_Private_Data::_Ewk_View_Private_Data):
2847         (ewk_view_color_picker_request):
2848         (ewk_view_color_picker_dismiss):
2849         (ewk_view_color_picker_color_set):
2850         * UIProcess/API/efl/ewk_view.h:
2851         * UIProcess/API/efl/ewk_view_private.h:
2852         * UIProcess/API/efl/ewk_view_ui_client.cpp:
2853         (showColorPicker):
2854         (hideColorPicker):
2855         (ewk_view_ui_client_attach):
2856         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2857         (onColorPickerDone):
2858         (setColorPickerColor):
2859         (showColorPicker):
2860         (hideColorPicker):
2861         (TEST_F):
2862
2863 2012-09-20  Balazs Kelemen  <kbalazs@webkit.org>
2864
2865         [CoordinatedGraphics] Don't reset m_shouldSyncFrame in flushPendingLayerChanges
2866         https://bugs.webkit.org/show_bug.cgi?id=97108
2867
2868         Reviewed by Noam Rosenthal.
2869
2870         Stop ignoring if m_shouldSyncFrame has been set between the two
2871         layer flush. It can be set during layout in several situations,
2872         for example when a layer is deleted or changed state. We want to
2873         send the DidRenderFrame message at the next flush in those situations
2874         so the UI process will apply the changes as soon as possible.
2875
2876         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
2877         (WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
2878
2879 2012-09-20  Byungwoo Lee  <bw80.lee@samsung.com>
2880
2881         [EFL][WK2] Check timeout on waitUntilLoadFinished() and waitUntilTitleChangedTo().
2882         https://bugs.webkit.org/show_bug.cgi?id=97081
2883
2884         Reviewed by Gyuyoung Kim.
2885
2886         Add assertion to check timeout on waitUntilLoadFinished() and
2887         waitUntilTitleChangedTo().
2888         Set the default timeout for the functions as 10 seconds.
2889
2890         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
2891         (EWK2UnitTestBase):
2892         * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp:
2893         (TEST_F):
2894         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2895         (TEST_F):
2896         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2897         (TEST_F):
2898
2899 2012-09-20  Jinwoo Song  <jinwoo7.song@samsung.com>
2900
2901         [EFL] Change the log macro names to be more consistent with EINA LOG
2902         https://bugs.webkit.org/show_bug.cgi?id=97158
2903
2904         Reviewed by Kenneth Rohde Christiansen.
2905
2906         Some log macro names in WebKit2 are inconsistent with EINA LOG names
2907         such as WRN/INF not WARN/INFO.
2908
2909           #define WRN(...) EINA_LOG_DOM_WARN(_ewk_log_dom, __VA_ARGS__)
2910           #define INF(...) EINA_LOG_DOM_INFO(_ewk_log_dom, __VA_ARGS__)
2911
2912         This patch changes the such names to be consistent with EINA LOG's names.
2913
2914         * UIProcess/API/efl/ewk_main.cpp:
2915         (ewk_init):
2916         * UIProcess/API/efl/ewk_private.h:
2917         * UIProcess/API/efl/ewk_view.cpp:
2918         (ewk_view_webprocess_crashed):
2919
2920 2012-09-20  Christophe Dumez  <christophe.dumez@intel.com>
2921
2922         [EFL][WK2] Same page navigation does not update view URI
2923         https://bugs.webkit.org/show_bug.cgi?id=97094
2924
2925         Reviewed by Kenneth Rohde Christiansen.
2926
2927         Handle didSameDocumentNavigationForFrame callback in
2928         WKPageLoaderClient in order to update the view URI.
2929         This fixes issues with the view URI not being updated
2930         in case of a same page navigation.
2931
2932         * UIProcess/API/efl/ewk_view_loader_client.cpp:
2933         (didSameDocumentNavigationForFrame):
2934         (ewk_view_loader_client_attach):
2935         * UIProcess/API/efl/ewk_view_private.h:
2936         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
2937         (CallbackDataTimer):
2938         (EWK2UnitTest::CallbackDataTimer::CallbackDataTimer):
2939         (EWK2UnitTest::CallbackDataTimer::~CallbackDataTimer):
2940         (EWK2UnitTest::CallbackDataTimer::isDone):
2941         (EWK2UnitTest::CallbackDataTimer::setDone):
2942         (EWK2UnitTest::CallbackDataTimer::didTimeOut):
2943         (EWK2UnitTest::CallbackDataTimer::setTimedOut):
2944         (EWK2UnitTest):
2945         (CallbackDataExpectedValue):
2946         (EWK2UnitTest::CallbackDataExpectedValue::CallbackDataExpectedValue):
2947         (EWK2UnitTest::CallbackDataExpectedValue::expectedValue):
2948         (EWK2UnitTest::onLoadFinished):
2949         (EWK2UnitTest::timeOutWhileWaitingUntilLoadFinished):
2950         (EWK2UnitTest::EWK2UnitTestBase::waitUntilLoadFinished):
2951         (EWK2UnitTest::onTitleChanged):
2952         (EWK2UnitTest::timeOutWhileWaitingUntilTitleChangedTo):
2953         (EWK2UnitTest::EWK2UnitTestBase::waitUntilTitleChangedTo):
2954         (EWK2UnitTest::onURIChanged):
2955         (EWK2UnitTest::timeOutWhileWaitingUntilURIChangedTo):
2956         (EWK2UnitTest::EWK2UnitTestBase::waitUntilURIChangedTo): Add convenience function to test
2957         framework in order to wait until the view URI changes to a given value.
2958         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
2959         (EWK2UnitTestBase):
2960         * UIProcess/API/efl/tests/resources/same_page_navigation.html: Added.
2961         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2962         (TEST_F): Add corresponding unit test to verify fix and prevent regressions
2963         in the future.
2964
2965 2012-09-19  Dan Bernstein  <mitz@apple.com>
2966
2967         WebKit2 part of adding a setting and API for disabling screen font substitution
2968         https://bugs.webkit.org/show_bug.cgi?id=97168
2969
2970         Reviewed by Tim Horton.
2971
2972         * Shared/WebPreferencesStore.h:
2973         (WebKit): Defined ScreenFontSubstitutionEnabled key with a default value of true.
2974         * UIProcess/API/C/WKPreferences.cpp:
2975         (WKPreferencesSetScreenFontSubstitutionEnabled): Added this setter.
2976         (WKPreferencesGetScreenFontSubstitutionEnabled): Added this getter.
2977         * UIProcess/API/C/WKPreferencesPrivate.h:
2978         * WebProcess/WebPage/WebPage.cpp:
2979         (WebKit::WebPage::updatePreferences): Added a call to Settings::setScreenFontSubstitutionEnabled
2980         to push the preference into Settings.
2981
2982 2012-09-19  Jinwoo Song  <jinwoo7.song@samsung.com>
2983
2984         Fix unused parameter compile warnings in WebKit/WebKit2
2985         https://bugs.webkit.org/show_bug.cgi?id=96742
2986
2987         Reviewed by Gyuyoung Kim.
2988
2989         Fix unused parameter compile warning messages(-Wunused-parameter) in WebKit2 during EFL build.
2990         WebCore's warning messages were fixed in r128570.
2991
2992         * Shared/FontInfo.cpp:
2993         (WebKit::FontInfo::encode):
2994         (WebKit::FontInfo::decode):
2995         * Shared/PlatformPopupMenuData.cpp:
2996         (WebKit::PlatformPopupMenuData::encode):
2997         (WebKit::PlatformPopupMenuData::decode):
2998         * Shared/SandboxExtension.h:
2999         (WebKit::SandboxExtension::createHandleForTemporaryFile):
3000         * Shared/ShareableSurface.cpp:
3001         (WebKit::ShareableSurface::create):
3002         * Shared/WebMemorySampler.cpp:
3003         (WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile):
3004         * UIProcess/API/C/WKPage.cpp:
3005         (WKPageGetContentsAsMHTMLData):
3006         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
3007         (WKPluginSiteDataManagerClearSiteData):
3008         (WKPluginSiteDataManagerClearAllSiteData):
3009         * UIProcess/API/C/WKPreferences.cpp:
3010         (WKPreferencesSetHixie76WebSocketProtocolEnabled):
3011         (WKPreferencesGetHixie76WebSocketProtocolEnabled):
3012         * UIProcess/API/efl/BatteryProvider.cpp:
3013         (startUpdatingCallback):
3014         (stopUpdatingCallback):
3015         * UIProcess/API/efl/PageClientImpl.cpp:
3016         (WebKit::PageClientImpl::doneWithTouchEvent):
3017         * UIProcess/API/efl/VibrationProvider.cpp:
3018         (vibrateCallback):
3019         (cancelVibrationCallback):
3020         * UIProcess/API/efl/ewk_context_download_client.cpp:
3021         (decideDestinationWithSuggestedFilename):
3022         (didCreateDestination):
3023         * UIProcess/API/efl/ewk_view.cpp:
3024         (_ewk_view_on_focus_in):
3025         (_ewk_view_on_focus_out):
3026         (_ewk_view_on_mouse_wheel):
3027         (_ewk_view_on_mouse_down):
3028         (_ewk_view_on_mouse_up):
3029         (_ewk_view_on_mouse_move):
3030         (_ewk_view_on_key_down):
3031         (_ewk_view_on_key_up):
3032         (_ewk_view_smart_move):
3033         (ewk_view_contents_size_changed):
3034         * UIProcess/API/efl/ewk_view_find_client.cpp:
3035         (didFindString):
3036         * UIProcess/API/efl/ewk_view_form_client.cpp:
3037         (willSubmitForm):
3038         * UIProcess/API/efl/ewk_view_loader_client.cpp:
3039         (didReceiveIntentForFrame):
3040         (registerIntentServiceForFrame):
3041         (didFinishLoadForFrame):
3042         (didFailLoadWithErrorForFrame):
3043         (didStartProvisionalLoadForFrame):
3044         (didReceiveServerRedirectForProvisionalLoadForFrame):
3045         (didFailProvisionalLoadWithErrorForFrame):
3046         (didChangeBackForwardList):
3047         * UIProcess/API/efl/ewk_view_policy_client.cpp:
3048         (decidePolicyForNavigationAction):
3049         (decidePolicyForNewWindowAction):
3050         (decidePolicyForResponseCallback):
3051         * UIProcess/DrawingAreaProxy.h:
3052         (WebKit::DrawingAreaProxy::update):
3053         (WebKit::DrawingAreaProxy::didUpdateBackingStoreState):
3054         * UIProcess/DrawingAreaProxyImpl.cpp:
3055         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
3056         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
3057         (WebKit::DrawingAreaProxyImpl::updateAcceleratedCompositingMode):
3058         * UIProcess/FindIndicator.cpp:
3059         (WebKit::FindIndicator::draw):
3060         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
3061         (WebKit::GeolocationPermissionRequestManagerProxy::didReceiveGeolocationPermissionDecision):
3062         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
3063         (WebKit::PluginInfoStore::shouldUsePlugin):
3064         * UIProcess/WebContext.cpp:
3065         (WebKit::WebContext::setHTTPPipeliningEnabled):
3066         * UIProcess/WebFullScreenManagerProxy.cpp:
3067         (WebKit::WebFullScreenManagerProxy::supportsFullScreen):
3068         * UIProcess/WebPageProxy.cpp:
3069         (WebKit::WebPageProxy::sessionStateData):
3070         (WebKit::WebPageProxy::recommendedScrollbarStyleDidChange):
3071         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
3072         * UIProcess/WebProcessProxy.cpp:
3073         (WebKit::WebProcessProxy::createWebPage):
3074         * UIProcess/efl/TextCheckerEfl.cpp:
3075         (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
3076         (WebKit::TextChecker::grammarCheckingEnabledStateChanged):
3077         * UIProcess/efl/WebFullScreenManagerProxyEfl.cpp:
3078         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
3079         (WebKit::WebFullScreenManagerProxy::beganExitFullScreen):
3080         * UIProcess/efl/WebPageProxyEfl.cpp:
3081         (WebKit::WebPageProxy::standardUserAgent):
3082         (WebKit::WebPageProxy::getEditorCommandsForKeyEvent):
3083         * WebProcess/Downloads/soup/DownloadSoup.cpp:
3084         (WebKit::Download::start):
3085         (WebKit::Download::startWithHandle):
3086         (WebKit::Download::didDecideDestination):
3087         (WebKit::Download::receivedCredential):
3088         (WebKit::Download::receivedRequestToContinueWithoutCredential):
3089         (WebKit::Download::receivedCancellation):
3090         * WebProcess/Geolocation/WebGeolocationManager.cpp:
3091         (WebKit::WebGeolocationManager::didChangePosition):
3092         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
3093         (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
3094         (WebKit::WebIconDatabaseProxy::synchronousIconURLForPageURL):
3095         (WebKit::WebIconDatabaseProxy::synchronousIconDataKnownForIconURL):
3096         (WebKit::WebIconDatabaseProxy::synchronousLoadDecisionForIconURL):
3097         (WebKit::WebIconDatabaseProxy::iconDataForIconURL):
3098         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3099         (WKBundleFrameCopyWebArchiveFilteringSubframes):
3100         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3101         (WKAccessibilityRootObject):
3102         (WKAccessibilityFocusedObject):
3103         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3104         (WebKit::InjectedBundle::setGeoLocationPermission):
3105         (WebKit::InjectedBundle::didReceiveMessage):
3106         (WebKit::InjectedBundle::webNotificationID):
3107         * WebProcess/Notifications/WebNotificationManager.cpp:
3108         (WebKit::WebNotificationManager::initialize):
3109         (WebKit::WebNotificationManager::didUpdateNotificationDecision):
3110         (WebKit::WebNotificationManager::didRemoveNotificationDecisions):
3111         (WebKit::WebNotificationManager::policyForOrigin):
3112         (WebKit::WebNotificationManager::notificationIDForTesting):
3113         (WebKit::WebNotificationManager::show):
3114         (WebKit::WebNotificationManager::cancel):
3115         (WebKit::WebNotificationManager::clearNotifications):
3116         (WebKit::WebNotificationManager::didDestroyNotification):
3117         (WebKit::WebNotificationManager::didShowNotification):
3118         (WebKit::WebNotificationManager::didClickNotification):
3119         (WebKit::WebNotificationManager::didCloseNotifications):
3120         * WebProcess/Plugins/PluginView.cpp:
3121         (WebKit::PluginView::paint):
3122         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3123         (WebKit::WebChromeClient::addMessageToConsole):
3124         (WebKit::WebChromeClient::contentsSizeChanged):
3125         (WebKit::WebChromeClient::customHighlightRect):
3126         (WebKit::WebChromeClient::paintCustomHighlight):
3127         (WebKit::WebChromeClient::supportsFullScreenForElement):
3128         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3129         (WebKit::WebContextMenuClient::downloadURL):
3130         * WebProcess/WebCoreSupport/WebDragClient.cpp:
3131         (WebKit::WebDragClient::dragSourceActionMaskForPoint):
3132         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3133         (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
3134         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3135         (WebKit::WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
3136         (WebKit::WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
3137         (WebKit::WebFrameLoaderClient::shouldStopLoadingForHistoryItem):
3138         (WebKit::WebFrameLoaderClient::canShowMIMEType):
3139         (WebKit::WebFrameLoaderClient::canShowMIMETypeAsHTML):
3140         (WebKit::WebFrameLoaderClient::representationExistsForURLScheme):
3141         (WebKit::WebFrameLoaderClient::generatedMIMETypeForURLScheme):
3142         (WebKit::WebFrameLoaderClient::createFrame):
3143         (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
3144         (WebKit::WebFrameLoaderClient::registerForIconNotification):
3145         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3146         (WebKit::WebInspectorClient::drawRect):
3147         * WebProcess/WebPage/DrawingArea.h:
3148         (WebKit::DrawingArea::forceRepaintAsync):
3149         (WebKit::DrawingArea::updateBackingStoreState):
3150         * WebProcess/WebPage/FindController.cpp:
3151         (WebKit::FindController::mouseEvent):
3152         * WebProcess/WebPage/LayerTreeHost.cpp:
3153         (WebKit::LayerTreeHost::create):
3154         * WebProcess/WebPage/LayerTreeHost.h:
3155         (WebKit::LayerTreeHost::forceRepaintAsync):
3156         * WebProcess/WebPage/TapHighlightController.cpp:
3157         (WebKit::TapHighlightController::drawRect):
3158         * WebProcess/WebPage/WebPage.cpp:
3159         (WebKit::WebPage::getWebArchiveOfFrame):
3160         * WebProcess/WebProcess.cpp:
3161         (WebKit::WebProcess::getSitesWithPluginData):
3162         (WebKit::WebProcess::clearPluginSiteData):
3163         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
3164         (webkitSoupRequestGenericSendFinish):
3165         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
3166         (webkitSoupRequestInputStreamReadAsync):
3167         (webkitSoupRequestInputStreamReadFinish):
3168
3169 2012-09-19  Pratik Solanki  <psolanki@apple.com>
3170
3171         Warning in SandboxExtension.h if WEB_PROCESS_SANDBOX is not enabled
3172         https://bugs.webkit.org/show_bug.cgi?id=97137
3173
3174         Reviewed by Benjamin Poulain.
3175
3176         m_size is only used when WEB_PROCESS_SANDBOX is enabled, so move its declaration inside
3177         #if ENABLE(WEB_PROCESS_SANDBOX).
3178
3179         * Shared/SandboxExtension.h:
3180         (HandleArray):
3181
3182 2012-09-19  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
3183
3184         [WTR] Memory leaks in TestRunner::deliverWebIntent()
3185         https://bugs.webkit.org/show_bug.cgi?id=97111
3186
3187         Reviewed by Kenneth Rohde Christiansen.
3188
3189         Fix memory leaks in WKBundleIntentCreate() by adopting strings
3190         created with WKStringCreateWithUTF8CString().
3191
3192         * WebProcess/InjectedBundle/API/c/WKBundleIntent.cpp:
3193         (WKBundleIntentCreate):
3194
3195 2012-09-19  Christophe Dumez  <christophe.dumez@intel.com>
3196
3197         [EFL][WK2] fast/forms/select-writing-direction-natural.html is failing
3198         https://bugs.webkit.org/show_bug.cgi?id=97082
3199
3200         Reviewed by Kenneth Rohde Christiansen.
3201
3202         WebChromeClient::selectItemWritingDirectionIsNatural() now returns
3203         true for EFL-WK2, consistently with EFL-WK1, so that the style
3204         is properly adjusted in RenderMenuList::adjustInnerStyle().
3205
3206         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3207         (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
3208
3209 2012-09-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3210
3211         [GTK] Add API to get/set the security policy of a given URI scheme to WebKit2 GTK+
3212         https://bugs.webkit.org/show_bug.cgi?id=96497
3213
3214         Reviewed by Martin Robinson.
3215
3216         Add WebKitSecurityManager object associated to a WebKitWebContext
3217         to get/set the security policy of a URI scheme.
3218
3219         * GNUmakefile.list.am: Add new files to compilation.
3220         * Shared/WebProcessCreationParameters.cpp:
3221         (WebKit::WebProcessCreationParameters::encode): Encode the list of
3222         schemes to be reigstered as Local, NoAccess, DisplayIsolated and
3223         CORSEnabled.
3224         (WebKit::WebProcessCreationParameters::decode): Decode the list of
3225         schemes to be reigstered as Local, NoAccess, DisplayIsolated and
3226         CORSEnabled.
3227         * Shared/WebProcessCreationParameters.h:
3228         (WebProcessCreationParameters): Add new parameters to be able to
3229         register schemes as Local, NoAccess, DisplayIsolated and
3230         CORSEnabled.
3231         * UIProcess/API/gtk/WebKitSecurityManager.cpp: Added.
3232         (webkit_security_manager_init):
3233         (webkitSecurityManagerFinalize):
3234         (webkit_security_manager_class_init):
3235         (webkitSecurityManagerCreate): Private function to create the
3236         WebKitSecurityManager object associated to the given
3237         WebKitWebContext.
3238         (registerSecurityPolicyForURIScheme):
3239         (checkSecurityPolicyForURIScheme):
3240         (webkit_security_manager_register_uri_scheme_as_local):
3241         (webkit_security_manager_uri_scheme_is_local):
3242         (webkit_security_manager_register_uri_scheme_as_no_access):
3243         (webkit_security_manager_uri_scheme_is_no_access):
3244         (webkit_security_manager_register_uri_scheme_as_display_isolated):
3245         (webkit_security_manager_uri_scheme_is_display_isolated):
3246         (webkit_security_manager_register_uri_scheme_as_secure):
3247         (webkit_security_manager_uri_scheme_is_secure):
3248         (webkit_security_manager_register_uri_scheme_as_cors_enabled):
3249         (webkit_security_manager_uri_scheme_is_cors_enabled):
3250         (webkit_security_manager_register_uri_scheme_as_empty_document):
3251         (webkit_security_manager_uri_scheme_is_empty_document):
3252         * UIProcess/API/gtk/WebKitSecurityManager.h: Added.
3253         * UIProcess/API/gtk/WebKitSecurityManagerPrivate.h: Added.
3254         * UIProcess/API/gtk/WebKitWebContext.cpp:
3255         (webkit_web_context_get_security_manager): Return the
3256         WebKitSecurityManager object, creating it before if it doesn't exist.
3257         * UIProcess/API/gtk/WebKitWebContext.h:
3258         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
3259         WebKitSecurityManager.
3260         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
3261         * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
3262         (testWebContextSecurityPolicy):
3263         (beforeAll):
3264         * UIProcess/API/gtk/webkit2.h: Add WebKitSecurityManager.h.
3265         * UIProcess/WebContext.cpp:
3266         (WebKit::WebContext::createNewWebProcess): Copy new vector
3267         schemes.
3268         (WebKit::WebContext::registerURLSchemeAsLocal): Send a message to
3269         WebProcess to register the given URL scheme as Local.
3270         (WebKit::WebContext::registerURLSchemeAsNoAccess): Send a message
3271         to WebProcess to register the given URL scheme as NoAccess.
3272         (WebKit::WebContext::registerURLSchemeAsDisplayIsolated): Send a
3273         message to WebProcess to register the given URL scheme as
3274         DisplayIsolated.
3275         (WebKit::WebContext::registerURLSchemeAsCORSEnabled): Send a
3276         message to WebProcess to register the given URL scheme as
3277         CORSEnabled.
3278         * UIProcess/WebContext.h:
3279         (WebContext):
3280         * WebProcess/WebProcess.cpp:
3281         (WebKit::WebProcess::registerURLSchemeAsLocal): Register the
3282         given URL scheme as Local in the SchemeRegistry.
3283         (WebKit::WebProcess::registerURLSchemeAsNoAccess): Register the
3284         given URL scheme as NoAccess in the SchemeRegistry.
3285         (WebKit::WebProcess::registerURLSchemeAsDisplayIsolated): Register
3286         the given URL scheme as DisplayIsolated in the SchemeRegistry.
3287         (WebKit::WebProcess::registerURLSchemeAsCORSEnabled): Register the
3288         given URL scheme as CORSEnabled in the SchemeRegistry.
3289         * WebProcess/WebProcess.h:
3290         * WebProcess/WebProcess.messages.in: Add new messages.
3291
3292 2012-09-19  Balazs Kelemen  <kbalazs@webkit.org>
3293
3294         [Texmap] Potential crash in TextureMapperLayer because of referencing deleted mask/replica layer
3295         https://bugs.webkit.org/show_bug.cgi?id=96919
3296
3297         Reviewed by Noam Rosenthal.
3298
3299         Delay syncing deleted layers until flushPendingLayerChanges so the UI side state
3300         will contain all changes related to the deletion of a layer. This saves us from
3301         referencing a deleted layer.
3302
3303         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
3304         (WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
3305         (WebKit::LayerTreeCoordinator::detachLayer):
3306         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
3307         (LayerTreeCoordinator):
3308
3309 2012-09-19  Byungwoo Lee  <bw80.lee@samsung.com>
3310
3311         [EFL][WK2] waitUntilTitleChangedTo() and waitUntilLoadFinished() needs timeout.
3312         https://bugs.webkit.org/show_bug.cgi?id=96910
3313
3314         Reviewed by Kenneth Rohde Christiansen.
3315
3316         Currently, the waitUntilTitleChangedTo() and waitUntilLoadFinished()
3317         functions doesn't handle timeout by itself.
3318         And if there are some failed cases that loading is not finished or
3319         title is not changed to the expected string, test case just stopped
3320         with timeout and there is no more information about this such as line
3321         number.
3322
3323         To handle timeout status more properly, timeout parameter is added to
3324         these functions.
3325
3326         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
3327         (EWK2UnitTest::LoadFinishedData::LoadFinishedData):
3328         (LoadFinishedData):
3329         (EWK2UnitTest::LoadFinishedData::~LoadFinishedData):
3330         (EWK2UnitTest):
3331         (EWK2UnitTest::onLoadFinished):
3332         (EWK2UnitTest::timeOutWhileWaitingUntilLoadFinished):
3333         (EWK2UnitTest::EWK2UnitTestBase::waitUntilLoadFinished):
3334         (EWK2UnitTest::TitleChangedData::TitleChangedData):
3335         (TitleChangedData):
3336         (EWK2UnitTest::TitleChangedData::~TitleChangedData):
3337         (EWK2UnitTest::onTitleChanged):
3338         (EWK2UnitTest::timeOutWhileWaitingUntilTitleChangedTo):
3339         (EWK2UnitTest::EWK2UnitTestBase::waitUntilTitleChangedTo):
3340         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
3341         (EWK2UnitTestBase):
3342
3343 2012-09-18  Byungwoo Lee  <bw80.lee@samsung.com>
3344
3345         [EFL][WK2] Add javascript popup API.
3346         https://bugs.webkit.org/show_bug.cgi?id=95672
3347
3348         Reviewed by Gyuyoung Kim.
3349
3350         Add smart class member function for javascript alert(), confirm() and prompt().
3351
3352         * UIProcess/API/efl/ewk_view.cpp:
3353         (ewk_view_run_javascript_alert):
3354         (ewk_view_run_javascript_confirm):