[EFL][WK2] Add an option to build WebKit2.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-12-22  Ryuan Choi <ryuan.choi@samsung.com>, Tomasz Morawski <t.morawski@samsung.com>
2
3         [EFL][WK2] Add an option to build WebKit2.
4         https://bugs.webkit.org/show_bug.cgi?id=61999
5
6         Reviewed by Eric Seidel.
7
8         Add build script for WebKit2 on EFL port.
9
10         * CMakeLists.txt:
11         * PlatformEfl.cmake: Added.
12
13 2011-12-21  Eunmi Lee  <eunmi15.lee@samsung.com>
14
15         [EFL][WK2] Add efl port's ewk_view files
16         https://bugs.webkit.org/show_bug.cgi?id=61915
17
18         Reviewed by Eric Seidel.
19
20         This is the initial version of WebKit2 EFL port's ewk_view.
21         The ewk_view is Evas_Object to show the rendered web contents.
22
23         * UIProcess/API/efl/ewk_view.cpp: Added.
24         (_ewk_view_smart_changed):
25         (_ewk_view_smart_focus_in):
26         (_ewk_view_smart_focus_out):
27         (_ewk_view_smart_mouse_wheel):
28         (_ewk_view_smart_mouse_down):
29         (_ewk_view_smart_mouse_up):
30         (_ewk_view_smart_mouse_move):
31         (_ewk_view_smart_key_down):
32         (_ewk_view_smart_key_up):
33         (_ewk_view_on_focus_in):
34         (_ewk_view_on_focus_out):
35         (_ewk_view_on_mouse_wheel):
36         (_ewk_view_on_mouse_down):
37         (_ewk_view_on_mouse_up):
38         (_ewk_view_on_mouse_move):
39         (_ewk_view_on_key_down):
40         (_ewk_view_on_key_up):
41         (_ewk_view_priv_new):
42         (_ewk_view_priv_del):
43         (_ewk_view_smart_add):
44         (_ewk_view_smart_del):
45         (_ewk_view_smart_resize):
46         (_ewk_view_smart_move):
47         (_ewk_view_smart_calculate):
48         (_ewk_view_smart_show):
49         (_ewk_view_smart_hide):
50         (ewk_view_smart_class_init):
51         (_ewk_view_smart_class_new):
52         (ewk_view_add):
53         (ewk_view_page_get):
54         * UIProcess/API/efl/ewk_view.h: Added.
55
56 2011-12-21  Timothy Hatcher  <timothy@apple.com>
57
58         Web Inspector: suppress incremental rendering and use application chrome mode
59
60         https://webkit.org/b/75026
61
62         Reviewed by Joseph Pecoraro.
63
64         * UIProcess/WebInspectorProxy.cpp:
65         (WebKit::createInspectorPageGroup): Set suppress incremental rendering and use application chrome mode.
66
67 2011-12-21  Sam Weinig  <sam@webkit.org>
68
69         Cleanup up clients when deallocating WebKit2 API objects
70         https://bugs.webkit.org/show_bug.cgi?id=75014
71
72         Reviewed by Adam Roben.
73
74         * UIProcess/API/mac/WKBrowsingContextController.mm:
75         (-[WKBrowsingContextController dealloc]):
76         * UIProcess/API/mac/WKConnection.mm:
77         (-[WKConnection dealloc]):
78         Clear clients on dealloc.
79
80 2011-12-21  Rafael Brandao  <rafael.lobo@openbossa.org>
81
82         [Qt][WK2] Add tests for favicon and fix icon url decoding issue
83         https://bugs.webkit.org/show_bug.cgi?id=74967
84
85         Reviewed by Simon Hausmann.
86
87         * UIProcess/API/qt/qwebiconimageprovider.cpp: We already receive the url
88         without the percent encoding and we should access WebIconDatabase with
89         an encoded url. Added a test to cover this behavior.
90         (QWebIconImageProvider::requestImage):
91         * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: Added.
92         * UIProcess/API/qt/tests/qmltests/common/favicon.html: Added.
93         * UIProcess/API/qt/tests/qmltests/common/favicon.png: Added.
94         * UIProcess/API/qt/tests/qmltests/common/favicon2.html: Added.
95         * UIProcess/API/qt/tests/qmltests/common/small-favicon.png: Added.
96         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
97
98 2011-12-21  Sam Weinig  <sam@webkit.org>
99
100         Exception thrown when running WKBrowsingContextLoadDelegateTest.SimpleLoad test
101         https://bugs.webkit.org/show_bug.cgi?id=75012
102
103         Reviewed by Adam Roben.
104
105         * UIProcess/API/mac/WKProcessGroup.mm:
106         (-[WKProcessGroup dealloc]):
107         Clear the WKContext's connection client.
108
109 2011-12-21  Michael Brüning  <michael.bruning@nokia.com>
110
111         [Qt][WK2] Fix tst_QQuickWebView::scrollRequest() API test
112         https://bugs.webkit.org/show_bug.cgi?id=73994
113
114         Reviewed by Kenneth Rohde Christiansen.
115
116         Added a viewport meta tag so that the view is actually scrollable and
117         does not get scaled to not be scrollable. Corrected the style
118         definition for the <div> tag. Removed unneeded text in div
119
120         Rolled back changes some of the changes from the previous patch
121         (r102453) because they weren't necessary.
122
123         * UIProcess/API/qt/tests/html/scroll.html:
124         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
125         (tst_QQuickWebView::scrollRequest): Partially rolled back changes.
126
127 2011-12-21  Jessie Berlin  <jberlin@apple.com>
128
129         Windows build fix.
130
131         Replace all instances of "WebPropupMenuProxy" with "WebPopupMenuProxy".
132
133         * UIProcess/win/WebPopupMenuProxyWin.cpp:
134         (WebKit::WebPopupMenuProxyWin::showPopupMenu):
135         (WebKit::WebPopupMenuProxyWin::setFocusedIndex):
136
137 2011-12-20  Anders Carlsson  <andersca@apple.com>
138
139         Add ScrollableArea::contentsResized and have it call the scroll animator
140         https://bugs.webkit.org/show_bug.cgi?id=74966
141
142         Reviewed by Sam Weinig.
143
144         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
145         (WebKit::BuiltInPDFView::scrollbarStyleChanged):
146
147 2011-12-20  Anders Carlsson  <andersca@apple.com>
148
149         Try to fix the Windows build.
150
151         * UIProcess/win/WebPopupMenuProxyWin.cpp:
152         (WebKit::WebPopupMenuProxyWin::showPopupMenu):
153         (WebKit::WebPopupMenuProxyWin::setFocusedIndex):
154
155 2011-12-20  Simon Hausmann  <simon.hausmann@nokia.com>
156
157         [Qt][WK2] Remove statusBarMessageChanged
158         https://bugs.webkit.org/show_bug.cgi?id=74405
159
160         Reviewed by Tor Arne Vestbø.
161
162         Removing support for window.status updates from the public
163         QML API. See bug for details.
164
165         * UIProcess/API/qt/qquickwebview_p.h:
166         * UIProcess/qt/QtWebPageUIClient.cpp:
167         (QtWebPageUIClient::QtWebPageUIClient):
168         * UIProcess/qt/QtWebPageUIClient.h:
169
170 2011-12-20  Anders Carlsson  <andersca@apple.com>
171
172         Add ScrollableArea wrappers for a bunch of ScrollAnimator member functions
173         https://bugs.webkit.org/show_bug.cgi?id=74951
174
175         Reviewed by Sam Weinig.
176
177         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
178         (WebKit::BuiltInPDFView::paint):
179         (WebKit::BuiltInPDFView::handleMouseEvent):
180         (WebKit::BuiltInPDFView::handleMouseEnterEvent):
181         (WebKit::BuiltInPDFView::handleMouseLeaveEvent):
182
183 2011-12-20  Brent Fulgham  <bfulgham@webkit.org>
184
185         [WinCairo] Unreviewed build fix.
186
187         * win/WebKit2CFLite.def: Add missing export declaration.
188
189 2011-12-20  Simon Hausmann  <simon.hausmann@nokia.com>
190
191         [Qt] Build fix for gcc used on WK2 build bot.
192
193         * UIProcess/qt/QtWebPagePolicyClient.cpp:
194         (QtWebPagePolicyClient::decidePolicyForNavigationAction): Don't do case:
195         with values outside the range of the type. Instead switch() on the int instead.
196
197 2011-12-20  Rafael Brandao  <rafael.lobo@openbossa.org>
198
199         [Qt] Extend QQuickWebview::navigationRequested API
200         https://bugs.webkit.org/show_bug.cgi?id=73818
201
202         Reviewed by Simon Hausmann.
203
204         Added url of the originating frame on QWebNavigationRequest,
205         accessible via 'request.originatingUrl' on QML. Download action
206         was moved to experimental, so in order to use it you should set
207         'request.action = WebViewExperimental.DownloadRequest' on QML.
208
209         * UIProcess/API/qt/qquickwebview_p.h:
210         * UIProcess/API/qt/qwebnavigationrequest.cpp:
211         (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
212         (QWebNavigationRequest::QWebNavigationRequest):
213         (QWebNavigationRequest::originatingUrl):
214         * UIProcess/API/qt/qwebnavigationrequest_p.h:
215         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
216         Tests were modified a bit to reuse urls and also added a test case to check
217         originating url once a request is done.
218         * UIProcess/qt/QtWebPagePolicyClient.cpp:
219         (QtWebPagePolicyClient::decidePolicyForNavigationAction):
220         * UIProcess/qt/QtWebPagePolicyClient.h:
221
222 2011-12-20  Balazs Kelemen  <kbalazs@webkit.org>
223
224         [Qt] WK2 Debugging quirks need some improvement
225         https://bugs.webkit.org/show_bug.cgi?id=74859
226
227         Reviewed by Simon Hausmann.
228
229         Improvements added to make debugging WebKit2 more
230         confortable and efficient:
231         1. Unify debugging quirks. From now all of them are controlled
232         by the QT_WEBKIT2_DEBUG environment variable.
233         2. Disable crash handlers for WebKitTestRunner if debugging quirks
234         are used to make it possible to use postmortem debugging via core dumps
235         which is extremely useful for debugging bugs triggered by layout tests.
236         3. Disable test timeout for WebKitTestRunner if debugging quirks
237         are used because that makes debugging impossible.
238
239         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
240         (WebKit::QtWebProcess::setupChildProcess):
241         * WebProcess/qt/WebProcessMainQt.cpp:
242         (WebKit::WebProcessMainQt):
243
244 2011-12-20  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
245
246         [Qt][WK2]REGRESSION(r103310): It broke tst_QQuickWebView::loadNonexistentFileUrl() API test
247         https://bugs.webkit.org/show_bug.cgi?id=74923
248
249         Rubber-stamped by Csaba Osztrogonác.
250
251         Fixing API usage after http://trac.webkit.org/changeset/103310.
252
253         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
254         (tst_QQuickWebView::loadNonexistentFileUrl):
255
256 2011-12-20  Simon Hausmann  <simon.hausmann@nokia.com>
257
258         [Qt] Favicon support should work with multiple web contexts
259         https://bugs.webkit.org/show_bug.cgi?id=74922
260
261         Reviewed by Tor Arne Vestbø.
262
263         * UIProcess/API/qt/qquickwebview.cpp:
264         (QQuickWebViewPrivate::initialize): Remove unnecessary use of QtWebContext::defaultContext(). There is
265         already a member variable "context" which is the correct one.
266         (QQuickWebViewPrivate::setIcon): Ditto.
267         * UIProcess/API/qt/qwebiconimageprovider.cpp:
268         (QWebIconImageProvider::requestImage): Extract the context id from the image id and use it to
269         query the correct icon database.
270         * UIProcess/qt/QtWebContext.cpp: Provide a mapping from id to qtwebcontext.
271         (WebKit::generateContextID):
272         (WebKit::QtWebContext::QtWebContext):
273         (WebKit::QtWebContext::~QtWebContext):
274         (WebKit::QtWebContext::contextByID):
275         (WebKit::QtWebContext::initialize):
276         * UIProcess/qt/QtWebContext.h:
277         (WebKit::QtWebContext::context):
278         (WebKit::QtWebContext::contextID):
279         * UIProcess/qt/QtWebIconDatabaseClient.cpp:
280         (QtWebIconDatabaseClient::QtWebIconDatabaseClient):
281         (QtWebIconDatabaseClient::requestIconForPageURL): Store the context id in the icon url.
282         * UIProcess/qt/QtWebIconDatabaseClient.h:
283
284 2011-12-20  Rafael Brandao  <rafael.lobo@openbossa.org>
285
286         [Qt][WK2] Implement favicon support
287         https://bugs.webkit.org/show_bug.cgi?id=71082
288
289         Reviewed by Simon Hausmann.
290
291         Added attribute to QQuickWebView named "icon" that should be used
292         as source for QQuickImage in order to display it. All images
293         pointing to it will refresh when the icon is ready. We also use IDs
294         to make it possible to handle different icons for the same page URL
295         at different times (i.e. dynamically changing favicon).
296
297         IconDatabase storage lies on UIProcess and the synchronous call for
298         the icon that happens on WebIconDatabase won't need to send any message
299         to WebProcess. The part of IconDatabase on WebProcess handles the download
300         of the resource whenever it is needed. Then the content downloaded is sent
301         through IPC to the actual database, on UIProcess.
302
303         * Target.pri:
304         * UIProcess/API/qt/qquickwebview.cpp:
305         (QQuickWebViewPrivate::initialize):
306         (QQuickWebViewPrivate::_q_onIconChangedForPageURL):
307         (QQuickWebViewPrivate::setIcon):
308         (QQuickWebView::icon):
309         * UIProcess/API/qt/qquickwebview_p.h:
310         * UIProcess/API/qt/qquickwebview_p_p.h:
311         * UIProcess/API/qt/qwebiconimageprovider.cpp: Added.
312         (QWebIconImageProvider::QWebIconImageProvider):
313         (QWebIconImageProvider::~QWebIconImageProvider):
314         (QWebIconImageProvider::requestImage):
315         * UIProcess/API/qt/qwebiconimageprovider_p.h: Added.
316         * UIProcess/WebContext.h:
317         * UIProcess/WebIconDatabase.cpp:
318         (WebKit::WebIconDatabase::synchronousIconURLForPageURL):
319         (WebKit::WebIconDatabase::imageForPageURL): Added iconSize parameter
320         and a default value for it to not break the old usage. The support for
321         multiple sizes of favicons is still missing on WebCore.
322         * UIProcess/WebIconDatabase.h:
323         * UIProcess/qt/QtWebContext.cpp:
324         (WebKit::QtWebContext::initialize):
325         * UIProcess/qt/QtWebContext.h:
326         (WebKit::QtWebContext::iconDatabase):
327         * UIProcess/qt/QtWebIconDatabaseClient.cpp: Added.
328         (toQtWebIconDatabaseClient):
329         (QtWebIconDatabaseClient::QtWebIconDatabaseClient):
330         (QtWebIconDatabaseClient::~QtWebIconDatabaseClient):
331         (QtWebIconDatabaseClient::didChangeIconForPageURL):
332         (QtWebIconDatabaseClient::iconImageForPageURL):
333         (QtWebIconDatabaseClient::iconURLHashForPageURL):
334         (QtWebIconDatabaseClient::requestIconForPageURL):
335         (QtWebIconDatabaseClient::retainIconForPageURL):
336         (QtWebIconDatabaseClient::releaseIconForPageURL):
337         * UIProcess/qt/QtWebIconDatabaseClient.h: Added.
338         * UIProcess/qt/QtWebPageLoadClient.cpp:
339         (QtWebPageLoadClient::didStartProgress):
340
341 2011-12-20  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
342
343         [Qt] Improve QQuickWebView error handling API
344         https://bugs.webkit.org/show_bug.cgi?id=73815
345
346         Reviewed by Simon Hausmann.
347
348         Modifying loadFail signal to include the error description
349         and changing the ErrorType enum to ErrorDomain, to stay aligned
350         with ResourceError API itself.
351
352         * UIProcess/API/qt/qquickwebview_p.h:
353         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml:
354         * UIProcess/qt/QtWebPageLoadClient.cpp:
355         (QtWebPageLoadClient::dispatchLoadFailed):
356
357 2011-12-19  Sam Weinig  <sam@webkit.org>
358
359         Add support for scrollLineDown: and scrollLineUp: NSResponder selectors
360         https://bugs.webkit.org/show_bug.cgi?id=74907
361
362         Reviewed by Dan Bernstein.
363
364         * UIProcess/API/mac/WKView.mm:
365         Add implementations for scrollLineDown: and scrollLineUp: using our
366         fun macros.
367
368 2011-12-19  Sam Weinig  <sam@webkit.org>
369
370         More PlatformEvent cleanup
371         https://bugs.webkit.org/show_bug.cgi?id=74831
372
373         Reviewed by Dan Bernstein.
374
375         * WebProcess/WebPage/WebPage.cpp:
376         (WebKit::handleContextMenuEvent):
377         Update to use new names, access style.
378
379 2011-12-16  Jon Lee  <jonlee@apple.com>
380
381         [WK2] Extend show notification API to include the source page
382         https://bugs.webkit.org/show_bug.cgi?id=74751
383         <rdar://problem/10514541>
384
385         Reviewed by John Sullivan.
386
387         We add the source page that dispatched the notification in the API for convenience. In order to include the page,
388         we move the show() message sent by WebNotificationManager from WebNotificationManagerProxy to WebPageProxy.
389
390         * WebProcess/Notifications/WebNotificationManager.cpp:
391         (WebKit::WebNotificationManager::show): We aim the message at WebPageProxy instead of WebNotificationManagerProxy.
392
393         * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Remove the show() message.
394         * UIProcess/WebPageProxy.messages.in: Add a showNotification() message.
395
396         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
397         (WebKit::WebNotificationManagerProxy::show): This function is now called from the WebPageProxy.
398         * UIProcess/Notifications/WebNotificationManagerProxy.h:
399
400         * UIProcess/API/C/WKNotificationProvider.h:
401         * UIProcess/Notifications/WebNotificationProvider.cpp:
402         (WebKit::WebNotificationProvider::show):
403         * UIProcess/Notifications/WebNotificationProvider.h:
404         * UIProcess/WebPageProxy.cpp:
405         (WebKit::WebPageProxy::showNotification):
406         * UIProcess/WebPageProxy.h:
407
408 2011-12-19  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
409
410         [Qt][WK2] QWebDownloadItems are leaking
411         https://bugs.webkit.org/show_bug.cgi?id=74618
412
413         Reviewed by Kenneth Rohde Christiansen.
414
415         QWebDownloadItems are leaking when WebProcess raises a
416         download failure before sending didReceiveResponse back to UIProcess.
417         This can happen when QtFileDownloader fails in determineFilename(), for instance.
418         It happens when QtDownloadManager::downloadFailed() is reached
419         and has an "empty" downloadItem, which means we never got to
420         QtDownloadManager::downloadReceivedResponse(). At this point
421         QQuickWebView::downloadRequested() signal hasn't been emitted and
422         the downloadItem will have null parent. Therefore, it will leak
423         unless we delete it ourselves.
424
425         * UIProcess/qt/QtDownloadManager.cpp:
426         (WebKit::QtDownloadManager::downloadFailed):
427
428 2011-12-19  Anders Carlsson  <andersca@apple.com>
429
430         Send gesture events through the event dispatcher and scrolling coordinator
431         https://bugs.webkit.org/show_bug.cgi?id=74879
432
433         Reviewed by Andreas Kling.
434
435         * UIProcess/WebPageProxy.cpp:
436         (WebKit::WebPageProxy::handleGestureEvent):
437         Use the EventDispatcher message.
438
439         * WebProcess/WebPage/EventDispatcher.cpp:
440         (WebKit::EventDispatcher::gestureEvent):
441         Try to send the event to the scrolling coordinator first before dispatching it on the main thread.
442
443         (WebKit::EventDispatcher::dispatchGestureEvent):
444         Just call through to the WebPageProxy.
445
446         * WebProcess/WebPage/EventDispatcher.h:
447         * WebProcess/WebPage/EventDispatcher.messages.in:
448         * WebProcess/WebPage/WebPage.h:
449         * WebProcess/WebPage/WebPage.messages.in:
450         Move the GestureEvent message from WebPage to EventDispatcher.
451
452 2011-12-19  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
453
454         [Qt] Setting QWebPreferences affect multiple WebViews
455         https://bugs.webkit.org/show_bug.cgi?id=71559
456
457         Reviewed by Kenneth Rohde Christiansen.
458
459         The QWebPreferences are per WebView, but the actual implementation
460         in WebKit2 make them per page group. Currently we share only one
461         page group between all the views, so if we set preferences
462         to one WebView the preferences are shared between them all, generating
463         unexpected behavior. This patch fixes this by making each WebView have
464         its own page group.
465
466         * UIProcess/API/qt/qquickwebview.cpp:
467         (QQuickWebViewPrivate::QQuickWebViewPrivate):
468         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
469
470 2011-12-19  Eric Carlson  <eric.carlson@apple.com>
471
472         Enable <track> for Mac build
473         https://bugs.webkit.org/show_bug.cgi?id=74838
474
475         Reviewed by Darin Adler.
476
477         * Configurations/FeatureDefines.xcconfig:
478
479 2011-12-19  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
480
481         [Qt] [WK2] Fix build error due to unused variables
482         https://bugs.webkit.org/show_bug.cgi?id=74862
483
484         Reviewed by Kenneth Rohde Christiansen.
485
486         * UIProcess/qt/QtWebPageEventHandler.cpp:
487         (QtWebPageEventHandler::inputMethodEvent):
488
489 2011-12-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
490
491         [Qt] Add methods for setting, cancelling and confirming the composition
492
493         Reviewed by Simon Hausmann.
494
495         * UIProcess/WebPageProxy.h:
496         * UIProcess/qt/WebPageProxyQt.cpp:
497         (WebKit::WebPageProxy::setComposition):
498         (WebKit::WebPageProxy::confirmComposition):
499         (WebKit::WebPageProxy::cancelComposition):
500         * WebProcess/WebPage/WebPage.h:
501         * WebProcess/WebPage/WebPage.messages.in:
502         * WebProcess/WebPage/qt/WebPageQt.cpp:
503         (WebKit::targetFrameForEditing):
504         (WebKit::WebPage::confirmComposition):
505         (WebKit::WebPage::setComposition):
506         (WebKit::WebPage::cancelComposition):
507
508 2011-12-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
509
510         First stab at upstreaming our virtual keyboard code
511
512         Reviewed by Simon Hausmann.
513
514         Add basic implementation of inputMethodEvent
515
516         * UIProcess/qt/QtWebPageEventHandler.cpp:
517         (QtWebPageEventHandler::handleEvent):
518         (QtWebPageEventHandler::inputMethodEvent):
519         * UIProcess/qt/QtWebPageEventHandler.h:
520
521 2011-12-19  Simon Hausmann  <simon.hausmann@nokia.com>
522
523         [Qt][WK2] Add support for modal event loop processing for WTR
524         https://bugs.webkit.org/show_bug.cgi?id=74852
525
526         Reviewed by Kenneth Rohde Christiansen.
527
528         Add support for nested event loops, used by WebPage::runModal().
529
530         * Platform/qt/RunLoopQt.cpp:
531         (RunLoop::run):
532         (RunLoop::stop):
533
534 2011-12-18  Sam Weinig  <sam@webkit.org>
535
536         Another attempt to fix the windows build.
537
538         * Platform/win/WorkQueueWin.cpp:
539         (WorkQueue::performWorkOnRegisteredWorkThread):
540         (WorkQueue::dispatch):
541
542 2011-12-18  Sam Weinig  <sam@webkit.org>
543
544         Try to fix the windows build.
545
546         * Platform/win/WorkQueueWin.cpp:
547         (WorkQueue::performWorkOnRegisteredWorkThread):
548
549 2011-12-18  Sam Weinig  <sam@webkit.org>
550
551         Remove now unused WorkItem.h
552         https://bugs.webkit.org/show_bug.cgi?id=74818
553
554         Reviewed by Andreas Kling.
555
556         * GNUmakefile.am:
557         * Platform/CoreIPC/Connection.cpp:
558         * Platform/RunLoop.cpp:
559         * Platform/RunLoop.h:
560         * Platform/WorkItem.h: Removed.
561         * Platform/gtk/RunLoopGtk.cpp:
562         * Platform/mac/RunLoopMac.mm:
563         * Platform/mac/WorkQueueMac.cpp:
564         (WorkQueue::platformInvalidate):
565         * Platform/qt/RunLoopQt.cpp:
566         * Platform/win/RunLoopWin.cpp:
567         * Target.pri:
568         * UIProcess/ResponsivenessTimer.cpp:
569         * WebKit2.xcodeproj/project.pbxproj:
570         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
571         * win/WebKit2.vcproj:
572
573 2011-12-18  Anders Carlsson  <andersca@apple.com>
574
575         Set the main frame view scroll position asynchronously
576         https://bugs.webkit.org/show_bug.cgi?id=74823
577
578         Reviewed by Sam Weinig.
579
580         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
581         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
582         Don't make the background red.
583
584 2011-12-18  Sam Weinig  <sam@webkit.org>
585
586         Move timestamp down from PlatformEvent subclasses to the base class
587         https://bugs.webkit.org/show_bug.cgi?id=74805
588
589         Reviewed by Anders Carlsson.
590
591         * Shared/WebEventConversion.cpp:
592         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
593         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
594         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
595         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
596         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
597
598 2011-12-18  Anders Carlsson  <andersca@apple.com>
599
600         Add a scrolling thread to the scrolling coordinator
601         https://bugs.webkit.org/show_bug.cgi?id=74814
602
603         Reviewed by Andreas Kling.
604
605         Check if the scrolling coordinator can handle the wheel event before dispatching it
606         to the main thread.
607
608         * WebProcess/WebPage/EventDispatcher.cpp:
609         (WebKit::EventDispatcher::wheelEvent):
610
611 2011-12-18  Anders Carlsson  <andersca@apple.com>
612
613         EventDispatcher should keep track of all scrolling coordinators
614         https://bugs.webkit.org/show_bug.cgi?id=74810
615
616         Reviewed by Andreas Kling.
617
618         * WebProcess/WebPage/EventDispatcher.cpp:
619         (WebKit::EventDispatcher::addScrollingCoordinatorForPage):
620         Get the scrolling coordinator from the WebCore page and add it to the map.
621
622         (WebKit::EventDispatcher::removeScrollingCoordinatorForPage):
623         Remove the scrolling coordinator from the map.
624
625         (WebKit::EventDispatcher::sendDidHandleEvent):
626         Add a new helper function, currently unused.
627
628         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
629         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
630         Add the scrolling coordinator.
631
632         (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
633         Remove the scrolling coordinator.
634
635         * WebProcess/WebProcess.h:
636         (WebKit::WebProcess::eventDispatcher):
637         Add a getter.
638
639 2011-12-16  Anders Carlsson  <andersca@apple.com>
640
641         Move everyone off of WorkItem
642         https://bugs.webkit.org/show_bug.cgi?id=74773
643
644         Reviewed by Darin Adler.
645
646         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
647         (CoreIPC::Connection::open):
648         (CoreIPC::Connection::setShouldCloseConnectionOnProcessTermination):
649         * Platform/CoreIPC/win/ConnectionWin.cpp:
650         (CoreIPC::Connection::open):
651         * Platform/RunLoop.cpp:
652         (RunLoop::performWork):
653         (RunLoop::dispatch):
654         * Platform/RunLoop.h:
655         * Platform/WorkQueue.cpp:
656         * Platform/WorkQueue.h:
657         (WorkQueue::WorkItemWin::function):
658         * Platform/gtk/WorkQueueGtk.cpp:
659         (WorkQueue::EventSource::EventSource):
660         (WorkQueue::EventSource::executeEventSource):
661         (WorkQueue::registerEventSourceHandler):
662         (WorkQueue::dispatchOnSource):
663         (WorkQueue::dispatch):
664         (WorkQueue::dispatchAfterDelay):
665         (WorkQueue::dispatchOnTermination):
666         * Platform/mac/WorkQueueMac.cpp:
667         (WorkQueue::executeFunction):
668         (WorkQueue::dispatch):
669         (WorkQueue::dispatchAfterDelay):
670         * Platform/qt/WorkQueueQt.cpp:
671         (WorkQueue::WorkItemQt::WorkItemQt):
672         (WorkQueue::WorkItemQt::~WorkItemQt):
673         (WorkQueue::WorkItemQt::execute):
674         (WorkQueue::registerSocketEventHandler):
675         (WorkQueue::dispatch):
676         (WorkQueue::dispatchAfterDelay):
677         (WorkQueue::dispatchOnTermination):
678         * Platform/win/RunLoopWin.cpp:
679         (RunLoop::wakeUp):
680         * Platform/win/WorkQueueWin.cpp:
681         (WorkQueue::WorkItemWin::WorkItemWin):
682         (WorkQueue::WorkItemWin::create):
683         (WorkQueue::HandleWorkItem::HandleWorkItem):
684         (WorkQueue::HandleWorkItem::createByAdoptingHandle):
685         (WorkQueue::registerHandle):
686         (WorkQueue::dispatch):
687         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
688         (WebKit::ProcessLauncher::launchProcess):
689         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
690         (WebKit::ProcessLauncher::launchProcess):
691         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
692         (WebKit::ProcessLauncher::launchProcess):
693         * WebProcess/mac/CoreIPCClientRunLoop.mm:
694         (WebKit::callOnCoreIPCClientRunLoopAndWait):
695
696 2011-12-17  Sam Weinig  <sam@webkit.org>
697
698         Make PlatformTouchEvent inherit from PlatformEvent
699         https://bugs.webkit.org/show_bug.cgi?id=74777
700
701         Reviewed by Andreas Kling.
702
703         * Shared/WebEventConversion.cpp:
704         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
705         Add PlatformEvent prefix to enum types.
706
707 2011-12-16  Anders Carlsson  <andersca@apple.com>
708
709         Convert more WorkItems over to WTF::Functions
710         https://bugs.webkit.org/show_bug.cgi?id=74770
711
712         Reviewed by Andreas Kling.
713
714         * Platform/WorkQueue.cpp:
715         (WorkQueue::dispatchAfterDelay):
716         * Platform/WorkQueue.h:
717         * Shared/ChildProcess.cpp:
718         (WebKit::ChildProcess::didCloseOnConnectionWorkQueue):
719         * UIProcess/Launcher/ThreadLauncher.cpp:
720         (WebKit::ThreadLauncher::launchThread):
721         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
722         (WebKit::ProcessLauncher::launchProcess):
723         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
724         (WebKit::NetscapePlugin::pluginThreadAsyncCall):
725         * WebProcess/Plugins/PluginView.cpp:
726         (WebKit::derefPluginView):
727         (WebKit::PluginView::unprotectPluginFromDestruction):
728
729 2011-12-16  Mark Hahnenberg  <mhahnenberg@apple.com>
730
731         Windows test fix
732
733         Unreviewed test fix. All Windows tests were crashing when objects who were pointing to 
734         static data members across DLL boundaries were getting garbage in their pointers.
735
736         * win/WebKit2.def:
737
738 2011-12-16  Ryosuke Niwa  <rniwa@webkit.org>
739
740         Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step
741         https://bugs.webkit.org/show_bug.cgi?id=74748
742
743         Reviewed by Eric Seidel.
744
745         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
746         (WebKit::WebEditorClient::registerUndoStep):
747         (WebKit::WebEditorClient::registerRedoStep):
748         * WebProcess/WebCoreSupport/WebEditorClient.h:
749
750 2011-12-16  Anders Carlsson  <andersca@apple.com>
751
752         Add a pretty dumb tile cache to WebTileCacheLayer
753         https://bugs.webkit.org/show_bug.cgi?id=74753
754
755         Reviewed by Simon Fraser.
756
757         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
758         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
759         Always do a layout here, to prevent an ASSERT(!needsLayout()) when painting.
760
761 2011-12-16  Anders Carlsson  <andersca@apple.com>
762
763         TiledCoreAnimationDrawingArea should enable the scrolling coordinator
764         https://bugs.webkit.org/show_bug.cgi?id=74724
765
766         Reviewed by Adam Roben.
767
768         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
769         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
770
771 2011-12-16  Sam Weinig  <sam@webkit.org>
772
773         Give PlatformEvents a base class
774         https://bugs.webkit.org/show_bug.cgi?id=74685
775
776         Reviewed by Anders Carlsson.
777
778         Add a base class for PlatformMouseEvent, PlatformKeyboardEvent, PlatformWheelEvent
779         and PlatformGestureEvent and move Type enumeration and modifiers down to it.
780
781         * Shared/WebEventConversion.cpp:
782         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
783         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
784         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
785         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
786         * WebKit2.xcodeproj/project.pbxproj:
787         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
788         (WebKit::WebEditorClient::handleKeyboardEvent):
789         * WebProcess/WebPage/WebPage.cpp:
790         (WebKit::handleMouseEvent):
791         (WebKit::WebPage::setInitialFocus):
792         (WebKit::WebPage::handleEditingKeyboardEvent):
793         (WebKit::WebPage::dragEnded):
794         * WebProcess/WebPage/mac/WebPageMac.mm:
795         (WebKit::WebPage::executeKeypressCommandsInternal):
796         (WebKit::WebPage::handleEditingKeyboardEvent):
797
798 2011-12-16  Ryosuke Niwa  <rniwa@webkit.org>
799
800         Only EditCommandComposition should implement unapply and reapply
801         https://bugs.webkit.org/show_bug.cgi?id=74490
802
803         Reviewed by Eric Seidel.
804
805         Renamed WebEditCommand to WebUndoStep and made necessary changes.
806         Everything on WebProcess side should have the correct name now.
807
808         Names in the proxy and UIProcess are to be updated in a follow up.
809
810         * CMakeLists.txt:
811         * GNUmakefile.am:
812         * Target.pri:
813         * WebKit2.xcodeproj/project.pbxproj:
814         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
815         (WebKit::WebEditorClient::registerCommandForUndo):
816         (WebKit::WebEditorClient::registerCommandForRedo):
817         * WebProcess/WebCoreSupport/WebEditorClient.h:
818         * WebProcess/WebPage/WebEditCommand.cpp: Removed.
819         * WebProcess/WebPage/WebEditCommand.h: Removed.
820         * WebProcess/WebPage/WebPage.cpp:
821         (WebKit::WebPage::webUndoStep):
822         (WebKit::WebPage::addWebUndoStep):
823         (WebKit::WebPage::removeWebEditCommand):
824         (WebKit::WebPage::unapplyEditCommand):
825         (WebKit::WebPage::reapplyEditCommand):
826         * WebProcess/WebPage/WebPage.h:
827         * WebProcess/WebPage/WebUndoStep.cpp: Copied from Source/WebKit2/WebProcess/WebPage/WebEditCommand.cpp.
828         (WebKit::generateUndoStep):
829         (WebKit::WebUndoStep::create):
830         * WebProcess/WebPage/WebUndoStep.h: Copied from Source/WebKit2/WebProcess/WebPage/WebEditCommand.h.
831         (WebKit::WebUndoStep::entry):
832         (WebKit::WebUndoStep::entryID):
833         (WebKit::WebUndoStep::WebUndoStep):
834         * win/WebKit2.vcproj:
835
836 2011-12-16  Simon Hausmann  <simon.hausmann@nokia.com>
837
838         [Qt] Eliminate dependency to QUndoStack
839         https://bugs.webkit.org/show_bug.cgi?id=74691
840
841         Reviewed by Kenneth Rohde Christiansen.
842
843         Replaced the QUndoStack with two vectors. When calling unapply()
844         on the edit command proxy, it will automatically re-register itself
845         in the redo stack.
846
847         * UIProcess/qt/QtWebUndoController.cpp:
848         (QtWebUndoController::registerEditCommand):
849         (QtWebUndoController::clearAllEditCommands):
850         (QtWebUndoController::canUndoRedo):
851         (QtWebUndoController::executeUndoRedo):
852         * UIProcess/qt/QtWebUndoController.h:
853
854 2011-12-16  Rafael Brandao  <rafael.lobo@openbossa.org>
855
856         [Qt][WK2] Move webView.page into experimental
857         https://bugs.webkit.org/show_bug.cgi?id=74406
858
859         Reviewed by Simon Hausmann.
860
861         * UIProcess/API/qt/qquickwebview.cpp:
862         (QQuickWebViewExperimental::page):
863         * UIProcess/API/qt/qquickwebview_p.h:
864         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
865         (tst_QQuickWebView::accessPage):
866
867 2011-12-16  Mark Hahnenberg  <mhahnenberg@apple.com>
868
869         De-virtualize destructors
870         https://bugs.webkit.org/show_bug.cgi?id=74331
871
872         Reviewed by Geoffrey Garen.
873
874         * WebProcess/Plugins/Netscape/JSNPMethod.cpp: Add trivial destructor assert.
875         * WebProcess/Plugins/Netscape/JSNPObject.cpp: Add static destroy.
876         (WebKit::JSNPObject::destroy):
877         * WebProcess/Plugins/Netscape/JSNPObject.h:
878         * win/WebKit2.def: Add/remove necessary symbols.
879         * win/WebKit2CFLite.def: Ditto.
880
881 2011-12-16  Carlos Garcia Campos  <cgarcia@igalia.com>
882
883         [GTK] Use bit field for bool members of WebKitWindowPropertiesPrivate
884         https://bugs.webkit.org/show_bug.cgi?id=74713
885
886         Reviewed by Gustavo Noronha Silva.
887
888         Most of the members are bools, so it reduces the memory footprint.
889
890         * UIProcess/API/gtk/WebKitWindowProperties.cpp:
891
892 2011-12-16  Carlos Garcia Campos  <cgarcia@igalia.com>
893
894         [GTK] Window frame should be 0x0 when the toplevel window is not visible
895         https://bugs.webkit.org/show_bug.cgi?id=74709
896
897         Reviewed by Gustavo Noronha Silva.
898
899         * UIProcess/API/gtk/WebKitUIClient.cpp:
900         (getWindowFrame): Check also whether the toplevel is visible
901         before getting its size and position.
902
903 2011-12-16  Michael Bruning  <michael.bruning@nokia.com>
904
905         [qt][wk2] Viewport info panel shows wrong current scale
906         https://bugs.webkit.org/show_bug.cgi?id=74613
907
908         Reviewed by Kenneth Rohde Christiansen.
909
910         * UIProcess/API/qt/qwebviewportinfo.cpp:
911         (QWebViewportInfo::currentScale): Added division by devicePixelRatio. Also
912         added emission of currenScaleUpdated signal when the viewport constraints
913         have been updated.
914         (QWebViewportInfo::didUpdateViewportConstraints):
915         * UIProcess/API/qt/qwebviewportinfo_p.h: Changed return type of
916         currentScale to QVariant as it depends on the viewport interaction engine
917         now.
918         * UIProcess/qt/QtViewportInteractionEngine.cpp:
919         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary): Changed
920         to use currentCSSScale for getting the current css scale.
921         (WebKit::QtViewportInteractionEngine::currentCSSScale): Added.
922         * UIProcess/qt/QtViewportInteractionEngine.h: Added method currentCSSScale.
923
924 2011-12-15  Martin Robinson  <mrobinson@igalia.com>
925
926         Fix 'make dist' in preparation for the GTK+ release.
927
928         * GNUmakefile.am: Add missing header.
929
930 2011-12-15  Anders Carlsson  <andersca@apple.com>
931
932         Add support for accelerated compositing to the tiled Core Animation drawing area
933         https://bugs.webkit.org/show_bug.cgi?id=74675
934
935         Reviewed by Andreas Kling.
936
937         Add a layer flush scheduler and get rid of the content layer since WebCore will manage that for us.
938
939         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
940         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
941         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
942         (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
943         (WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplay):
944         (WebKit::TiledCoreAnimationDrawingArea::scroll):
945         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
946         (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync):
947         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
948         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
949
950 2011-12-15  Sheriff Bot  <webkit.review.bot@gmail.com>
951
952         Unreviewed, rolling out r102652 and r102717.
953         http://trac.webkit.org/changeset/102652
954         http://trac.webkit.org/changeset/102717
955         https://bugs.webkit.org/show_bug.cgi?id=74674
956
957         Broke too many webs. (Requested by kling on #webkit).
958
959         * UIProcess/API/mac/WKView.mm:
960         (-[WKView _updateWindowAndViewFrames]):
961         * UIProcess/WebPageProxy.h:
962         * UIProcess/mac/WebPageProxyMac.mm:
963         (WebKit::WebPageProxy::windowAndViewFramesChanged):
964         * WebProcess/Plugins/PluginView.cpp:
965         (WebKit::PluginView::windowAndViewFramesChanged):
966         * WebProcess/Plugins/PluginView.h:
967         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
968         (WebKit::WebChromeClient::windowRect):
969         * WebProcess/WebPage/WebPage.cpp:
970         (WebKit::WebPage::windowAndViewFramesChanged):
971         * WebProcess/WebPage/WebPage.h:
972         (WebKit::WebPage::windowFrameInScreenCoordinates):
973         (WebKit::WebPage::viewFrameInWindowCoordinates):
974         (WebKit::WebPage::accessibilityPosition):
975         * WebProcess/WebPage/WebPage.messages.in:
976         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
977         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
978
979 2011-12-15  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
980
981         [GTK] New API test for WindowProperties fails
982         https://bugs.webkit.org/show_bug.cgi?id=74630
983
984         Reviewed by Martin Robinson.
985
986         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
987         (WindowProperties::viewReadyToShow): assert each member to make
988         assertion error messages more useful, and avoid asserting x and y,
989         since we are getting bad values from WebCore, for some reason.
990         (testWebViewWindowProperties): use smaller values that fit inside the
991         800x600 screen used by the bots.
992
993 2011-12-15  Anders Carlsson  <andersca@apple.com>
994
995         EventDispatcher should handle wheel events on the connection queue
996         https://bugs.webkit.org/show_bug.cgi?id=74627
997
998         Reviewed by Andreas Kling.
999
1000         Send wheel events to the EventDispatcher, which handles them on the connection work queue, and
1001         immediately bounces them to the main thread (for now).
1002
1003         * UIProcess/WebPageProxy.cpp:
1004         (WebKit::WebPageProxy::handleWheelEvent):
1005         (WebKit::WebPageProxy::didReceiveEvent):
1006         * WebProcess/WebPage/EventDispatcher.cpp:
1007         (WebKit::EventDispatcher::wheelEvent):
1008         (WebKit::EventDispatcher::dispatchWheelEvent):
1009         * WebProcess/WebPage/EventDispatcher.h:
1010         * WebProcess/WebPage/EventDispatcher.messages.in:
1011         * WebProcess/WebPage/WebPage.h:
1012
1013 2011-12-15  Jon Lee  <jonlee@apple.com>
1014
1015         [WK2] Extend WebNotification to include its origin
1016         https://bugs.webkit.org/show_bug.cgi?id=74615
1017         <rdar://problem/10587164>
1018
1019         Reviewed by Sam Weinig.
1020
1021         * Shared/API/c/WKSecurityOrigin.h: Expose API that converts the security origin to database
1022         identifier.
1023         * Shared/API/c/WKSecurityOrigin.cpp:
1024         (WKSecurityOriginCopyDatabaseIdentifier):
1025
1026         * UIProcess/Notifications/WebNotification.h: Extend WebNotification to include the origin.
1027         (WebKit::WebNotification::create):
1028         (WebKit::WebNotification::origin):
1029         * UIProcess/Notifications/WebNotification.cpp: Remove unneeded encode() and decode() functions.
1030         (WebKit::WebNotification::WebNotification):
1031
1032         * UIProcess/API/C/WKNotification.h: Expose WebNotification's origin().
1033         * UIProcess/API/C/WKNotification.cpp:
1034         (WKNotificationGetSecurityOrigin):
1035
1036         * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Update show() to include the
1037         origin of the notification.
1038         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
1039         (WebKit::WebNotificationManagerProxy::show):
1040         * UIProcess/Notifications/WebNotificationManagerProxy.h:
1041         * WebProcess/Notifications/WebNotificationManager.cpp:
1042         (WebKit::WebNotificationManager::show): Pass the notification's exec context's origin as
1043         identifier.
1044
1045 2011-12-15  Rafael Brandao  <rafael.lobo@openbossa.org>
1046
1047         [Qt][WK2] Add test for download policy on navigation request
1048         https://bugs.webkit.org/show_bug.cgi?id=74541
1049
1050         Reviewed by Tor Arne Vestbø.
1051
1052         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
1053         * UIProcess/API/qt/tests/qmltests/WebView/tst_download.qml: Make it wait for a
1054         downloadFinished signal to finish the test.
1055
1056 2011-12-15  Anders Carlsson  <andersca@apple.com>
1057
1058         Move WorkQueue Mach handlers over to WTF::Function
1059         https://bugs.webkit.org/show_bug.cgi?id=74620
1060
1061         Reviewed by Sam Weinig.
1062
1063         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1064         (CoreIPC::Connection::open):
1065         (CoreIPC::Connection::initializeDeadNameSource):
1066         * Platform/WorkQueue.h:
1067         * Platform/mac/WorkQueueMac.cpp:
1068         (WorkQueue::EventSource::EventSource):
1069         (WorkQueue::EventSource::eventHandler):
1070         (WorkQueue::registerMachPortEventHandler):
1071
1072 2011-12-14  Anders Carlsson  <andersca@apple.com>
1073
1074         Add WTF::Function to wtf/Forward.h
1075         https://bugs.webkit.org/show_bug.cgi?id=74576
1076
1077         Reviewed by Adam Roben.
1078
1079         * Platform/RunLoop.h:
1080         * Platform/WorkQueue.h:
1081         Remove forward declarations and just include wtf/Forward.h.
1082
1083 2011-12-15  Rafael Brandao  <rafael.lobo@openbossa.org>
1084
1085         [Qt][WK2] Move WebPreferences into experimental
1086         https://bugs.webkit.org/show_bug.cgi?id=74404
1087
1088         Reviewed by Tor Arne Vestbø.
1089
1090         * UIProcess/API/qt/qquickwebview.cpp:
1091         (QQuickWebViewExperimental::preferences):
1092         * UIProcess/API/qt/qquickwebview_p.h:
1093         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
1094         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
1095
1096 2011-12-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1097
1098         [GTK] Add WebKitWindowProperties to WebKit2 GTK+ API
1099         https://bugs.webkit.org/show_bug.cgi?id=74595
1100
1101         Reviewed by Gustavo Noronha Silva.
1102
1103         * GNUmakefile.am: Add new files to compilation.
1104         * UIProcess/API/gtk/WebKitUIClient.cpp:
1105         (createNewPage): Pass the dictionary containing the window
1106         features to webkitWebViewCreateNewPage().
1107         (toolbarsAreVisible): Return
1108         WebKitWindowProperties:toolbar-visible.
1109         (setToolbarsAreVisible): Set
1110         WebKitWindowProperties:toolbar-visible.
1111         (menuBarIsVisible): Return WebKitWindowProperties:menu-visible.
1112         (setMenuBarIsVisible): Set WebKitWindowProperties:menu-visible.
1113         (statusBarIsVisible): Return
1114         WebKitWindowProperties:status-visible.
1115         (setStatusBarIsVisible): Set
1116         WebKitWindowProperties:status-visible.
1117         (isResizable): Return WebKitWindowProperties:resizable.
1118         (setIsResizable): Set WebKitWindowProperties:resizable.
1119         (getWindowFrame): Return WebKitWindowProperties:geometry.
1120         (setWindowFrame): Set WebKitWindowProperties:geometry.
1121         (webkitUIClientAttachUIClientToPage): Initialize the UI client for
1122         the given page.
1123         * UIProcess/API/gtk/WebKitWebView.cpp:
1124         (webkit_web_view_init): Create a WebKitWindowProperties object for
1125         the view.
1126         (webkit_web_view_class_init):
1127         (webkitWebViewCreateNewPage): Update the WebKitWindowProperties
1128         object using the window features dictionary.
1129         (webkit_web_view_get_window_properties): Return the
1130         WebKitWindowProperties object of the view.
1131         * UIProcess/API/gtk/WebKitWebView.h:
1132         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1133         * UIProcess/API/gtk/WebKitWindowProperties.cpp: Added.
1134         (webkitWindowPropertiesFinalize):
1135         (webkitWindowPropertiesGetProperty):
1136         (webkitWindowPropertiesSetProperty):
1137         (webkit_window_properties_class_init):
1138         (webkit_window_properties_init):
1139         (webkitWindowPropertiesCreate): Create a new
1140         WebKitWindowProperties object.
1141         (webkitWindowPropertiesSetGeometry):
1142         (webkitWindowPropertiesSetToolbarVisible):
1143         (webkitWindowPropertiesSetMenubarVisible):
1144         (webkitWindowPropertiesSetStatusbarVisible):
1145         (webkitWindowPropertiesSetLocationbarVisible):
1146         (webkitWindowPropertiesSetScrollbarsVisible):
1147         (webkitWindowPropertiesSetResizable):
1148         (webkitWindowPropertiesSetFullscreen):
1149         (webkitWindowPropertiesUpdateFromWKWindowFeatures): Parse the
1150         window features dictionary and update the WebKitWindowProperties
1151         object accordingly.
1152         (webkit_window_properties_get_geometry):
1153         (webkit_window_properties_get_toolbar_visible):
1154         (webkit_window_properties_get_statusbar_visible):
1155         (webkit_window_properties_get_scrollbars_visible):
1156         (webkit_window_properties_get_menubar_visible):
1157         (webkit_window_properties_get_locationbar_visible):
1158         (webkit_window_properties_get_resizable):
1159         (webkit_window_properties_get_fullscreen):
1160         * UIProcess/API/gtk/WebKitWindowProperties.h: Added.
1161         * UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h: Copied from Source/WebKit2/UIProcess/API/gtk/WebKitWebViewPrivate.h.
1162         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
1163         WebKitWindowProperties.
1164         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
1165         * UIProcess/API/gtk/docs/webkit2gtk.types: Add
1166         webkit_window_properties_get_type.
1167         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
1168         (WindowProperties::windowPropertiesNotifyCallback):
1169         (WindowProperties::viewReadyToShow):
1170         (WindowProperties::viewCreate):
1171         (WindowProperties::setExpectedWindowProperties):
1172         (testWebViewWindowProperties):
1173         (beforeAll):
1174         * UIProcess/API/gtk/webkit2.h: Include WebKitWindowProperties.h.
1175         * UIProcess/WebUIClient.cpp:
1176         (WebKit::WebUIClient::createNewPage): Add also "locationBarVisible"
1177         to the window features dictionary.
1178
1179 2011-12-15  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1180
1181         [Qt] [WK2] Remove QtWebPageProxy
1182         https://bugs.webkit.org/show_bug.cgi?id=74540
1183
1184         Reviewed by Kenneth Rohde Christiansen.
1185
1186         Move WebPageProxy* to QQuickWebViewPrivate. The remaining functions in
1187         QtWebPageProxy were simple wrappers to WebKit functionality (text zoom, page zoom
1188         and user agent setting). Since those wrappers are unused, they were removed. The
1189         signal in the class was also unused.
1190
1191         This patch also remove the code from WebContextMenuProxyQt, it was remains of a
1192         previous QMenu-based implementation. We want to rewrite this code for QML anyway,
1193         so I reverted to an empty state.
1194
1195         Farewell, QtWebPageProxy!
1196
1197         * Target.pri:
1198         * UIProcess/API/qt/qquickwebpage.cpp:
1199         * UIProcess/API/qt/qquickwebpage_p.h:
1200         * UIProcess/API/qt/qquickwebview.cpp:
1201         (QQuickWebViewPrivate::~QQuickWebViewPrivate):
1202         (QQuickWebViewPrivate::initialize):
1203         (QQuickWebViewPrivate::processDidCrash):
1204         (QQuickWebViewPrivate::createDrawingAreaProxy):
1205         (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
1206         (QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged):
1207         (QQuickWebViewPrivate::_q_onVisibleChanged):
1208         (QQuickWebViewPrivate::updateViewportSize):
1209         (QQuickWebViewPrivate::computeViewportConstraints):
1210         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
1211         (QQuickWebViewPrivate::setNavigatorQtObjectEnabled):
1212         (QQuickWebViewExperimental::postMessage):
1213         (QQuickWebView::load):
1214         (QQuickWebView::goBack):
1215         (QQuickWebView::goForward):
1216         (QQuickWebView::stop):
1217         (QQuickWebView::reload):
1218         (QQuickWebView::url):
1219         (QQuickWebView::canGoBack):
1220         (QQuickWebView::canGoForward):
1221         (QQuickWebView::loading):
1222         (QQuickWebView::canReload):
1223         (QQuickWebView::title):
1224         (QQuickWebView::pageRef):
1225         (QQuickWebView::loadHtml):
1226         * UIProcess/API/qt/qquickwebview_p.h:
1227         * UIProcess/API/qt/qquickwebview_p_p.h:
1228         * UIProcess/API/qt/qwebnavigationhistory_p_p.h:
1229         * UIProcess/API/qt/qwebpreferences.cpp:
1230         (QWebPreferencesPrivate::preferencesRef):
1231         * UIProcess/PageClient.h:
1232         * UIProcess/qt/QtPageClient.cpp:
1233         (QtPageClient::QtPageClient):
1234         (QtPageClient::initialize):
1235         (QtPageClient::createPopupMenuProxy):
1236         (QtPageClient::createContextMenuProxy):
1237         * UIProcess/qt/QtPageClient.h:
1238         * UIProcess/qt/QtWebPageProxy.cpp: Removed.
1239         * UIProcess/qt/QtWebPageProxy.h: Removed.
1240         * UIProcess/qt/WebContextMenuProxyQt.cpp:
1241         (WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt):
1242         (WebKit::WebContextMenuProxyQt::create):
1243         (WebKit::WebContextMenuProxyQt::showContextMenu):
1244         (WebKit::WebContextMenuProxyQt::hideContextMenu):
1245         * UIProcess/qt/WebContextMenuProxyQt.h:
1246
1247 2011-12-15  Simon Hausmann  <simon.hausmann@nokia.com>
1248
1249         [WK2] Eliminate unnecessary GTK/QT ifdefs for shared memory implementation
1250         https://bugs.webkit.org/show_bug.cgi?id=74602
1251
1252         Reviewed by Kenneth Rohde Christiansen.
1253
1254         For shared memory Qt was using shm_open, Gtk was using files in /tmp. There
1255         is no reason to obfuscate the code with #ifdefs or let Gtk use an inferior
1256         method of opening shared memory. So this patch makes SharedMemoryUnix.cpp
1257         truly Qt and Gtk independent.
1258
1259         * Platform/unix/SharedMemoryUnix.cpp:
1260         (WebKit::SharedMemory::create):
1261
1262 2011-12-15  Simon Hausmann  <simon.hausmann@nokia.com>
1263
1264         [Qt] Cleanup: Remove unnecessary const_cast
1265
1266         Reviewed by Kenneth Christiansen.
1267
1268         * UIProcess/API/qt/qquickwebview.cpp:
1269         (QQuickWebView::preferences):
1270
1271 2011-12-15  Michael Brüning  <michael.bruning@nokia.com>
1272
1273         [QT][WK2]Add (experimental) viewport info view to Minibrowser/qt.
1274         https://bugs.webkit.org/show_bug.cgi?id=72893
1275
1276         Reviewed by Kenneth Rohde Christiansen.
1277
1278         This patch extends QQuickWebViewExperimental by a property named
1279         viewportInfo, which contains the viewport scalability and
1280         layout and contents size information. This property is exposed to
1281         QML through the experimental extension for QQuickWebView.
1282
1283         * Target.pri:
1284         * UIProcess/API/qt/qquickwebview.cpp:
1285         (QQuickWebViewPrivate::didChangeContentsSize):
1286         (QQuickWebViewPrivate::computeViewportConstraints):
1287         (QQuickWebViewPrivate::PostTransitionState::apply): Added applying
1288         contentsSize to viewportInfo.
1289         (QQuickWebViewExperimental::QQuickWebViewExperimental):
1290         (QQuickWebViewExperimental::viewportInfo):
1291         * UIProcess/API/qt/qquickwebview_p.h:
1292         * UIProcess/API/qt/qquickwebview_p_p.h: Moved PostTransitionState::apply
1293         to qquickwebview.cpp. Added friend QWebViewportInfo.
1294         * UIProcess/API/qt/qwebviewportinfo.cpp: Added.
1295         (QWebViewportInfo::QWebViewportInfo):
1296         (QWebViewportInfo::~QWebViewportInfo):
1297         (QWebViewportInfo::contentsSize):
1298         (QWebViewportInfo::currentScale):
1299         (QWebViewportInfo::devicePixelRatio):
1300         (QWebViewportInfo::initialScale):
1301         (QWebViewportInfo::minimumScale):
1302         (QWebViewportInfo::maximumScale):
1303         (QWebViewportInfo::isScalable):
1304         (QWebViewportInfo::layoutSize):
1305         (QWebViewportInfo::didUpdateContentsSize):
1306         (QWebViewportInfo::didUpdateCurrentScale):
1307         (QWebViewportInfo::didUpdateViewportConstraints):
1308         * UIProcess/API/qt/qwebviewportinfo_p.h: Added.
1309         * UIProcess/qt/QtViewportInteractionEngine.h:
1310         (WebKit::QtViewportInteractionEngine::Constraints::Constraints): Added layoutSize.
1311         (WebKit::QtViewportInteractionEngine::constraints): Added property to access m_contraints.
1312
1313 2011-12-15  Simon Hausmann  <simon.hausmann@nokia.com>
1314
1315         [WK2] WebPage::m_useFixedLayout variable unininitialized
1316         https://bugs.webkit.org/show_bug.cgi?id=74596
1317
1318         Reviewed by Kenneth Rohde Christiansen.
1319
1320         * WebProcess/WebPage/WebPage.cpp:
1321         (WebKit::WebPage::WebPage): Avoid uninitialized use through
1322         initialization in the constructor.
1323
1324 2011-12-15  Alexander Færøy  <ahf@0x90.dk>
1325
1326         [Qt] r102849 broke the Qt build on Mac OS X.
1327         https://bugs.webkit.org/show_bug.cgi?id=74594
1328
1329         Reviewed by Simon Hausmann.
1330
1331         The __APPLE__ macro is defined on all standard OS X compilers, which
1332         leads to various CoreGraphics headers to be included in the Qt build.
1333
1334         * config.h:
1335
1336 2011-12-14  Jing Zhao  <jingzhao@chromium.org>
1337
1338         Opening two popup menus by dispatchEvent() makes problems.
1339         https://bugs.webkit.org/show_bug.cgi?id=73304
1340
1341         Reviewed by Kent Tamura.
1342
1343         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1344         (WebKit::WebChromeClient::hasOpenedPopup): Not implemented.
1345         * WebProcess/WebCoreSupport/WebChromeClient.h: Overrides hasOpenedPopup().
1346
1347 2011-12-14  Sam Weinig  <weinig@apple.com>
1348
1349         Remove whitespace from InheritedPropertySheets attributes in
1350         vsprops files to appease the Visual Studio project migrator.
1351
1352         Reviewed by Adam Roben.
1353
1354         * win/WebKit2Debug.vsprops:
1355         * win/WebKit2DebugAll.vsprops:
1356         * win/WebKit2DebugCairoCFLite.vsprops:
1357         * win/WebKit2Production.vsprops:
1358         * win/WebKit2Release.vsprops:
1359         * win/WebKit2ReleaseCairoCFLite.vsprops:
1360         * win/WebKit2WebProcessDebug.vsprops:
1361         * win/WebKit2WebProcessDebugAll.vsprops:
1362         * win/WebKit2WebProcessDebugCairoCFLite.vsprops:
1363         * win/WebKit2WebProcessProduction.vsprops:
1364         * win/WebKit2WebProcessRelease.vsprops:
1365         * win/WebKit2WebProcessReleaseCairoCFLite.vsprops:
1366
1367 2011-12-14  Anders Carlsson  <andersca@apple.com>
1368
1369         Add WorkQueue::dispatch and RunLoop::dispatch which both take WTF::Function objects
1370         https://bugs.webkit.org/show_bug.cgi?id=74574
1371
1372         Reviewed by Sam Weinig.
1373
1374         * Platform/CoreIPC/Connection.cpp:
1375         (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
1376         (CoreIPC::Connection::addQueueClient):
1377         (CoreIPC::Connection::removeQueueClient):
1378         (CoreIPC::Connection::invalidate):
1379         (CoreIPC::Connection::sendMessage):
1380         (CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
1381         (CoreIPC::Connection::connectionDidClose):
1382         (CoreIPC::Connection::enqueueIncomingMessage):
1383         Switch over to dispatch.
1384
1385         * Platform/RunLoop.cpp:
1386         (RunLoop::dispatch):
1387         Create a FunctionWorkItem and call scheduleWork.
1388
1389         * Platform/RunLoop.h:
1390         Add dispatch.
1391
1392         * Platform/WorkItem.h:
1393         (FunctionWorkItem::FunctionWorkItem):
1394         (FunctionWorkItem::execute):
1395         (WorkItem::create):
1396         Add a helper work item that wraps a WTF::Function.
1397
1398         * Platform/WorkQueue.cpp:
1399         (WorkQueue::dispatch):
1400         Create a FunctionWorkItem and call scheduleWork.
1401
1402         * Platform/WorkQueue.h:
1403         Add dispatch.
1404
1405         * UIProcess/Launcher/ProcessLauncher.cpp:
1406         (WebKit::ProcessLauncher::ProcessLauncher):
1407         Switch over to dispatch.
1408
1409 2011-12-14  Hajime Morrita  <morrita@chromium.org>
1410
1411         JS_INLINE and WTF_INLINE should be visible from WebCore
1412         https://bugs.webkit.org/show_bug.cgi?id=73191
1413
1414         Reviewed by Kevin Ollivier.
1415
1416         Removed macro definitions which is now provided by Platform.h
1417
1418         * config.h:
1419
1420 2011-12-14  Alexey Proskuryakov  <ap@apple.com>
1421
1422         [Mac] Sandbox violation opening AppleSNBFBUserClient
1423         https://bugs.webkit.org/show_bug.cgi?id=74560
1424         <rdar://problem/10410896>
1425
1426         Reviewed by Darin Adler.
1427
1428         * WebProcess/com.apple.WebProcess.sb: Just allow it.
1429
1430 2011-12-13  Jon Lee  <jonlee@apple.com>
1431
1432         Enable notifications on Mac.
1433
1434         Reviewed by Sam Weinig.
1435
1436         * Configurations/FeatureDefines.xcconfig:
1437
1438 2011-12-14  Mark Rowe  <mrowe@apple.com>
1439
1440         <rdar://problem/10573872> NPN_GetValueForURL returns wrong value for NPNURLVProxy
1441
1442         Reviewed by Anders Carlsson.
1443
1444         * PluginProcess/PluginControllerProxy.cpp:
1445         (WebKit::PluginControllerProxy::proxiesForURL): Fix a copy-paste error.
1446
1447 2011-12-14  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1448
1449         [Qt] [WK2] Move QWebPreferences out of QtWebPageProxy
1450         https://bugs.webkit.org/show_bug.cgi?id=74525
1451
1452         Reviewed by Luiz Agostini.
1453
1454         This patch also uses internal WebKit API to set the Accelerate Compositing
1455         directly instead of going thru QWebPreferencesPrivate. The previous approach was
1456         always causing the QWebPreferences to be created making the "lazy initialization"
1457         useless.
1458
1459         * UIProcess/API/qt/qquickwebview.cpp:
1460         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1461         (QQuickWebViewPrivate::initialize):
1462         (QQuickWebViewPrivate::navigatorQtObjectEnabled):
1463         (QQuickWebViewPrivate::setNavigatorQtObjectEnabled):
1464         (QQuickWebViewExperimental::postMessage):
1465         (QQuickWebView::preferences):
1466         * UIProcess/API/qt/qquickwebview_p_p.h:
1467         * UIProcess/API/qt/qwebpreferences.cpp:
1468         (QWebPreferencesPrivate::createPreferences):
1469         (QWebPreferencesPrivate::testAttribute):
1470         (QWebPreferencesPrivate::setAttribute):
1471         (QWebPreferences::navigatorQtObjectEnabled):
1472         (QWebPreferences::setNavigatorQtObjectEnabled):
1473         (QWebPreferencesPrivate::preferencesRef):
1474         * UIProcess/API/qt/qwebpreferences_p_p.h:
1475         * UIProcess/qt/QtWebPageProxy.cpp:
1476         (QtWebPageProxy::QtWebPageProxy):
1477         * UIProcess/qt/QtWebPageProxy.h:
1478
1479 2011-12-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1480
1481         [GTK] Page size should be 0,0 when view widget is not realized
1482         https://bugs.webkit.org/show_bug.cgi?id=74523
1483
1484         Reviewed by Martin Robinson.
1485
1486         We currently return 1,1 because GTK+ initializes widget allocation
1487         as -1,-1,1,1.
1488
1489         * UIProcess/API/gtk/PageClientImpl.cpp:
1490         (WebKit::PageClientImpl::viewSize): Check whether widget is
1491         realized and return IntSize() in that case.
1492
1493 2011-12-14  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1494
1495         [Qt] [WK2] Move download handling out of QtWebPageProxy
1496         https://bugs.webkit.org/show_bug.cgi?id=74506
1497
1498         Reviewed by Kenneth Rohde Christiansen.
1499
1500         Also moves the creation of QtWebContext out of QtWebPageProxy.
1501
1502         * UIProcess/API/qt/qquickwebview.cpp:
1503         (QQuickWebViewPrivate::initialize):
1504         (QQuickWebViewPrivate::handleDownloadRequest):
1505         (QQuickWebViewPrivate::_q_onReceivedResponseFromDownload):
1506         * UIProcess/API/qt/qquickwebview_p.h:
1507         * UIProcess/API/qt/qquickwebview_p_p.h:
1508         * UIProcess/API/qt/qwebdownloaditem_p.h:
1509         * UIProcess/qt/QtPageClient.cpp:
1510         (QtPageClient::handleDownloadRequest):
1511         * UIProcess/qt/QtPageClient.h:
1512         * UIProcess/qt/QtWebPageProxy.cpp:
1513         (QtWebPageProxy::QtWebPageProxy):
1514         * UIProcess/qt/QtWebPageProxy.h:
1515
1516 2011-12-14  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1517
1518         [Qt] [WK2] Move QWebNavigationHistory to QQuickWebView
1519         https://bugs.webkit.org/show_bug.cgi?id=74442
1520
1521         Reviewed by Simon Hausmann.
1522
1523         QWebNavigationHistory used QtWebPageProxy to be QObject parent of the inner models,
1524         this patch change that to use OwnPtr instead. When creating the history object we pass
1525         only the WKPageRef and let it get the backForwardList.
1526
1527         * UIProcess/API/qt/qquickwebview.cpp:
1528         (QQuickWebViewPrivate::initialize):
1529         (QQuickWebViewPrivate::didChangeBackForwardList):
1530         (QQuickWebViewExperimental::navigationHistory):
1531         (QQuickWebViewExperimental::goForwardTo):
1532         (QQuickWebViewExperimental::goBackTo):
1533         * UIProcess/API/qt/qquickwebview_p_p.h:
1534         * UIProcess/API/qt/qwebnavigationhistory.cpp:
1535         (QWebNavigationListModelPrivate::createWebNavigationModel):
1536         (QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate):
1537         (QWebNavigationHistoryPrivate::createHistory):
1538         (QWebNavigationHistoryPrivate::goBackTo):
1539         (QWebNavigationHistoryPrivate::goForwardTo):
1540         (QWebNavigationListModel::QWebNavigationListModel):
1541         (QWebNavigationHistory::backItems):
1542         (QWebNavigationHistory::forwardItems):
1543         * UIProcess/API/qt/qwebnavigationhistory_p.h:
1544         * UIProcess/API/qt/qwebnavigationhistory_p_p.h:
1545         * UIProcess/qt/QtWebPageProxy.cpp:
1546         (QtWebPageProxy::QtWebPageProxy):
1547         * UIProcess/qt/QtWebPageProxy.h:
1548
1549 2011-12-14  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1550
1551         [Qt][WK2] Remove DrawingArea and QtWebPageEventHandler code from QtWebPageProxy
1552         https://bugs.webkit.org/show_bug.cgi?id=74414
1553
1554         Reviewed by Simon Hausmann.
1555
1556         This also moves QtWebPageEventHandler to inside QQuickWebPagePrivate, to avoid
1557         the WebPage having a backpointer to the QQuickWebView.
1558
1559         * Target.pri:
1560         * UIProcess/API/qt/qquickwebpage.cpp:
1561         (QQuickWebPage::geometryChanged):
1562         (QQuickWebPage::event):
1563         (QQuickWebPagePrivate::QQuickWebPagePrivate):
1564         (QQuickWebPagePrivate::initialize):
1565         (QQuickWebPagePrivate::setDrawingAreaSize):
1566         (QQuickWebPagePrivate::paintToCurrentGLContext):
1567         (QQuickWebPagePrivate::resetPaintNode):
1568         * UIProcess/API/qt/qquickwebpage_p.h:
1569         * UIProcess/API/qt/qquickwebpage_p_p.h:
1570         * UIProcess/API/qt/qquickwebview.cpp:
1571         (QQuickWebViewPrivate::initialize):
1572         (QQuickWebViewPrivate::initializeDesktop):
1573         (QQuickWebViewPrivate::initializeTouch):
1574         (QQuickWebViewPrivate::_q_resume):
1575         (QQuickWebViewPrivate::processDidCrash):
1576         (QQuickWebViewPrivate::didRelaunchProcess):
1577         (QQuickWebViewPrivate::createDrawingAreaProxy):
1578         (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
1579         (QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged):
1580         (QQuickWebViewPrivate::updateViewportSize):
1581         * UIProcess/API/qt/qquickwebview_p_p.h:
1582         * UIProcess/qt/QtPageClient.cpp:
1583         (QtPageClient::createDrawingAreaProxy):
1584         * UIProcess/qt/QtPageClient.h:
1585         (QtPageClient::findStringInCustomRepresentation):
1586         (QtPageClient::countStringMatchesInCustomRepresentation):
1587         * UIProcess/qt/QtWebPageEventHandler.cpp:
1588         (QtWebPageEventHandler::QtWebPageEventHandler):
1589         (QtWebPageEventHandler::startDrag):
1590         * UIProcess/qt/QtWebPageEventHandler.h:
1591         * UIProcess/qt/QtWebPageProxy.cpp:
1592         (QtWebPageProxy::init):
1593         * UIProcess/qt/QtWebPageProxy.h:
1594
1595 2011-12-13  Gustavo Noronha Silva  <gns@gnome.org>
1596
1597         Unreviewed build fix.
1598
1599         * GNUmakefile.am: make sure we do not derreference the target link
1600         if it already exists, and replace it with the new one instead,
1601         otherwise we end up with a gtk link inside
1602         Source/WebKit2/UIProcess/API/gtk, which causes the documentation
1603         build to produce warnings, and make the build fail.
1604
1605 2011-12-13  Andreas Kling  <kling@webkit.org>
1606
1607         REGRESSION (r102652): New window opens with zero size at produbanco.com
1608         <http://webkit.org/b/74418> and <rdar://problem/10565998>
1609
1610         Reviewed by Anders Carlsson.
1611
1612         Don't use the cached window frame if it's empty (meaning we haven't received
1613         a WindowAndViewFramesChanged message yet.) Instead use the synchronous
1614         GetWindowFrame (WP->UIP) message.
1615
1616         This situation occurs when opening a new window via window.open(), in which
1617         WebCore::createWindow() will query the windowRect() on the new window.
1618
1619         I spent a long time trying to write a layout test for this but couldn't come
1620         up with something reliable. The windowRect() is non-empty before we get a
1621         chance to run JS in/on the new window, and we can't check against the
1622         requested geometry since it varies depending on whether the window manager
1623         has shown the new window yet.
1624
1625         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1626         (WebKit::WebChromeClient::windowRect):
1627
1628 2011-12-13  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1629
1630         [Qt][WK2] Make QtPageClient dispatch directly to WebView when possible
1631         https://bugs.webkit.org/show_bug.cgi?id=74407
1632
1633         Reviewed by Simon Hausmann.
1634
1635         * UIProcess/API/qt/qquickwebview.cpp:
1636         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1637         (QQuickWebViewPrivate::~QQuickWebViewPrivate):
1638         (QQuickWebViewPrivate::initialize):
1639         (QQuickWebViewPrivate::pageDidRequestScroll):
1640         (QQuickWebViewPrivate::processDidCrash):
1641         (QQuickWebViewPrivate::didRelaunchProcess):
1642         (QQuickWebViewPrivate::viewSize):
1643         (QQuickWebViewPrivate::didReceiveMessageFromNavigatorQtObject):
1644         (QQuickWebViewExperimental::QQuickWebViewExperimental):
1645         (QQuickWebView::QQuickWebView):
1646         * UIProcess/API/qt/qquickwebview_p_p.h:
1647         * UIProcess/qt/QtPageClient.cpp:
1648         (QtPageClient::QtPageClient):
1649         (QtPageClient::setViewNeedsDisplay):
1650         (QtPageClient::pageDidRequestScroll):
1651         (QtPageClient::processDidCrash):
1652         (QtPageClient::didRelaunchProcess):
1653         (QtPageClient::didChangeContentsSize):
1654         (QtPageClient::didChangeViewportProperties):
1655         (QtPageClient::createPopupMenuProxy):
1656         (QtPageClient::didReceiveMessageFromNavigatorQtObject):
1657         (QtPageClient::viewSize):
1658         (QtPageClient::isViewFocused):
1659         (QtPageClient::isViewVisible):
1660         * UIProcess/qt/QtPageClient.h:
1661         (QtPageClient::initialize):
1662         * UIProcess/qt/QtWebPageProxy.cpp:
1663         (QtWebPageProxy::QtWebPageProxy):
1664         * UIProcess/qt/QtWebPageProxy.h:
1665
1666 2011-12-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1667
1668         [GTK] Add support for javascript dialogs in WebKit2 GTK+ API
1669         https://bugs.webkit.org/show_bug.cgi?id=71362
1670
1671         Reviewed by Martin Robinson.
1672
1673         * UIProcess/API/gtk/WebKitUIClient.cpp:
1674         (runJavaScriptAlert): Call webkitWebViewRunJavaScriptAlert().
1675         (runJavaScriptConfirm): Call webkitWebViewRunJavaScriptConfirm().
1676         (runJavaScriptPrompt): Call webkitWebViewRunJavaScriptPrompt().
1677         (webkitUIClientAttachUIClientToPage): Add implementation for
1678         runJavaScriptAlert, runJavaScriptConfirm and runJavaScriptPrompt
1679         callbacks.
1680         * UIProcess/API/gtk/WebKitWebView.cpp:
1681         (webkitWebViewCreateJavaScriptDialog):  Helper function to create
1682         javascript dialogs.
1683         (webkitWebViewScriptAlert): Default implementation of signal
1684         WebKitWebView::script-alert that shows a message dialog.
1685         (webkitWebViewScriptConfirm): Default implementation of signal
1686         WebKitWebView::script-confirm that shows a question dialog.
1687         (webkitWebViewScriptPrompt): Default implementation of signal
1688         WebKitWebView::script-prompt that shows a question dialog with a
1689         text entry.
1690         (webkit_web_view_class_init):
1691         (webkitWebViewRunJavaScriptAlert): Emit WebKitWebView::script-alert.
1692         (webkitWebViewRunJavaScriptConfirm): Emit WebKitWebView::script-confirm.
1693         (webkitWebViewRunJavaScriptPrompt): Emit WebKitWebView::script-prompt.
1694         * UIProcess/API/gtk/WebKitWebView.h:
1695         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1696         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
1697         (testWebViewJavaScriptDialogs):
1698         (beforeAll):
1699         * UIProcess/API/gtk/webkit2marshal.list:
1700
1701 2011-12-13  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1702
1703         [Qt] Make sure that touch events result in the page view gaining focus
1704
1705         Reviewed by Simon Hausmann.
1706
1707         * UIProcess/API/qt/qquickwebpage.cpp:
1708         (QQuickWebPage::touchEvent): Force active focus.
1709         * UIProcess/API/qt/qquickwebview.cpp:
1710         * UIProcess/API/qt/qquickwebview_p.h: Remove ::touchEvent override.
1711
1712 2011-12-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1713
1714         [GTK] Initial UI client implementation for WebKit2 GTK +API
1715         https://bugs.webkit.org/show_bug.cgi?id=69753
1716
1717         Reviewed by Martin Robinson.
1718
1719         * GNUmakefile.am: Add new files to compilation.
1720         * UIProcess/API/gtk/WebKitUIClient.cpp: Added.
1721         (createNewPage): Call webkitWebViewCreateNewPage.
1722         (showPage): Call webkitWebViewReadyToShowPage.
1723         (closePage): Call webkitWebViewClosePage.
1724         (webkitUIClientAttachUIClientToPage): Initialize UI client and
1725         attach it to the given page.
1726         (webkit_ui_client_init):
1727         (webkit_ui_client_class_init):
1728         * UIProcess/API/gtk/WebKitUIClient.h: Added.
1729         * UIProcess/API/gtk/WebKitWebView.cpp:
1730         (webkitWebViewCreate): Default implementation of signal
1731         WebKitWebView::create that simply returns NULL.
1732         (webkitWebViewConstructed): Create the default UI client.
1733         (webkitWebViewAccumulatorObjectHandled):
1734         (webkit_web_view_class_init):
1735         (webkitWebViewCreateNewPage): Emit create signal.
1736         (webkitWebViewReadyToShowPage): Emit ready-to-show signal.
1737         (webkitWebViewClosePage): Emit close signal.
1738         * UIProcess/API/gtk/WebKitWebView.h:
1739         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1740         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
1741         (testWebViewCreateReadyClose):
1742         (beforeAll):
1743         * UIProcess/API/gtk/webkit2marshal.list:
1744
1745 2011-12-13  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1746
1747         [Qt][WK2] Move load & navigation related functions out of QtWebPageProxy
1748         https://bugs.webkit.org/show_bug.cgi?id=74395
1749
1750         Reviewed by Simon Hausmann.
1751
1752         * Target.pri:
1753         * UIProcess/API/qt/qquickwebview.cpp:
1754         (QQuickWebViewPrivate::_q_onVisibleChanged):
1755         (QQuickWebViewPrivate::updateViewportSize):
1756         (QQuickWebViewPrivate::computeViewportConstraints):
1757         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
1758         (QQuickWebViewPrivate::webPageProxy):
1759         (QQuickWebView::load):
1760         (QQuickWebView::goBack):
1761         (QQuickWebView::goForward):
1762         (QQuickWebView::stop):
1763         (QQuickWebView::reload):
1764         (QQuickWebView::url):
1765         (QQuickWebView::canGoBack):
1766         (QQuickWebView::canGoForward):
1767         (QQuickWebView::loading):
1768         (QQuickWebView::canReload):
1769         (QQuickWebView::title):
1770         (QQuickWebView::loadHtml):
1771         * UIProcess/API/qt/qquickwebview_p_p.h:
1772         * UIProcess/qt/QtWebPageProxy.cpp:
1773         (QtWebPageProxy::didReceiveMessageFromNavigatorQtObject):
1774         * UIProcess/qt/QtWebPageProxy.h:
1775
1776 2011-12-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1777
1778         Unreviewed. Fix GTK+ build after r102640.
1779
1780         * GNUmakefile.am: Add DownloadProxy sources again.
1781
1782 2011-12-12  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1783
1784         [Qt][WK2] Move undo & edit command PageClient callbacks into QtWebUndoController
1785         https://bugs.webkit.org/show_bug.cgi?id=74364
1786
1787         Reviewed by Simon Hausmann.
1788
1789         The four callbacks in PageClient related to Undo depend only on the QUndoStack. So we
1790         move their handling to a QtWebUndoController (owned by QQuickWebViewPrivate). This also
1791         make QtWebUndoCommand an implementation detail.
1792
1793         * Target.pri:
1794         * UIProcess/API/qt/qquickwebview.cpp:
1795         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1796         * UIProcess/API/qt/qquickwebview_p_p.h:
1797         * UIProcess/qt/QtPageClient.cpp:
1798         (QtPageClient::registerEditCommand):
1799         (QtPageClient::clearAllEditCommands):
1800         (QtPageClient::canUndoRedo):
1801         (QtPageClient::executeUndoRedo):
1802         * UIProcess/qt/QtPageClient.h:
1803         (QtPageClient::initialize):
1804         * UIProcess/qt/QtWebPageProxy.cpp:
1805         * UIProcess/qt/QtWebPageProxy.h:
1806         * UIProcess/qt/QtWebUndoController.cpp: Renamed from Source/WebKit2/UIProcess/qt/QtWebUndoCommand.cpp.
1807         (QtWebUndoCommand::inUndoRedo):
1808         (QtWebUndoCommand::QtWebUndoCommand):
1809         (QtWebUndoCommand::~QtWebUndoCommand):
1810         (QtWebUndoCommand::redo):
1811         (QtWebUndoCommand::undo):
1812         (QtWebUndoController::QtWebUndoController):
1813         (QtWebUndoController::registerEditCommand):
1814         (QtWebUndoController::clearAllEditCommands):
1815         (QtWebUndoController::canUndoRedo):
1816         (QtWebUndoController::executeUndoRedo):
1817         * UIProcess/qt/QtWebUndoController.h: Renamed from Source/WebKit2/UIProcess/qt/QtWebUndoCommand.h.
1818
1819 2011-12-12  Andreas Kling  <kling@webkit.org>
1820
1821         Resizing Cappuccino is very laggy on WebKit since Safari 5.1
1822         <http://webkit.org/b/71354> and <rdar://problem/10565998>
1823
1824         Reviewed by Anders Carlsson.
1825
1826         On Mac, we already cache the window rect through the WindowAndViewFramesChanged
1827         message, so simply return that in WebChromeClient::windowRect() instead of
1828         sending a synchronous query to the UIProcess.
1829
1830         Changed WindowAndViewFramesChanged to pass FloatRect/FloatPoint rather than
1831         IntRect/IntPoint to match the ChromeClient::windowRect() return type.
1832
1833         * UIProcess/API/mac/WKView.mm:
1834         (-[WKView _updateWindowAndViewFrames]):
1835         * UIProcess/WebPageProxy.cpp:
1836         (WebKit::WebPageProxy::setWindowFrame):
1837         * UIProcess/WebPageProxy.h:
1838         * UIProcess/mac/WebPageProxyMac.mm:
1839         (WebKit::WebPageProxy::windowAndViewFramesChanged):
1840         * WebProcess/Plugins/PluginView.cpp:
1841         (WebKit::PluginView::windowAndViewFramesChanged):
1842         * WebProcess/Plugins/PluginView.h:
1843         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1844         (WebKit::WebChromeClient::windowRect):
1845         * WebProcess/WebPage/WebPage.cpp:
1846         (WebKit::WebPage::windowAndViewFramesChanged):
1847         * WebProcess/WebPage/WebPage.h:
1848         (WebKit::WebPage::windowFrameInScreenCoordinates):
1849         (WebKit::WebPage::viewFrameInWindowCoordinates):
1850         (WebKit::WebPage::accessibilityPosition):
1851         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
1852         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
1853
1854 2011-12-12  Anders Carlsson  <andersca@apple.com>
1855
1856         Add EventDispatcher class to WebKit2
1857         https://bugs.webkit.org/show_bug.cgi?id=74344
1858
1859         Reviewed by Sam Weinig.
1860
1861         The EventDispatcher is a singleton which will be in charge of dispatching events to WebPage objects.
1862
1863         * DerivedSources.make:
1864         * DerivedSources.pri:
1865         * GNUmakefile.am:
1866         * Target.pri:
1867         * WebKit2.xcodeproj/project.pbxproj:
1868         * win/WebKit2.vcproj:
1869         Add new files.
1870
1871         * Platform/CoreIPC/MessageID.h:
1872         Add EventDispatcher.
1873
1874         * WebProcess/WebConnectionToUIProcess.cpp:
1875         (WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess):
1876         (WebKit::WebConnectionToUIProcess::invalidate):
1877         * WebProcess/WebConnectionToUIProcess.h:
1878         WebConnectionToUIProcess doesn't need to be a QueueClient. Also, move the call to open into WebProcess since
1879         we don't want to add queue clients after the connection has been opened.
1880
1881         * WebProcess/WebPage/EventDispatcher.cpp: Added.
1882         (WebKit::EventDispatcher::EventDispatcher):
1883         (WebKit::EventDispatcher::~EventDispatcher):
1884         (WebKit::EventDispatcher::didReceiveMessageOnConnectionWorkQueue):
1885         (WebKit::EventDispatcher::wheelEvent):
1886         * WebProcess/WebPage/EventDispatcher.h:
1887         * WebProcess/WebPage/EventDispatcher.messages.in: Added.
1888         Add new stub files.
1889
1890         * WebProcess/WebProcess.cpp:
1891         (WebKit::WebProcess::initialize):
1892         Add the event dispatcher as a queue client.
1893
1894         * WebProcess/WebProcess.h:
1895         Add an EventDispatcher member variable to the web process.
1896
1897 2011-12-12  Sam Weinig  <sam@webkit.org>
1898
1899         Prefix internal methods in Objective-C API files with an underscore
1900         https://bugs.webkit.org/show_bug.cgi?id=74363
1901
1902         Reviewed by Dan Bernstein.
1903
1904         * UIProcess/API/mac/WKBrowsingContextController.mm:
1905         (-[WKBrowsingContextController _pageRef]):
1906         (-[WKBrowsingContextController loadRequest:]):
1907         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
1908         (-[WKBrowsingContextController stopLoading]):
1909         (-[WKBrowsingContextController reload]):
1910         (-[WKBrowsingContextController reloadFromOrigin]):
1911         (-[WKBrowsingContextController goForward]):
1912         (-[WKBrowsingContextController canGoForward]):
1913         (-[WKBrowsingContextController goBack]):
1914         (-[WKBrowsingContextController canGoBack]):
1915         (-[WKBrowsingContextController activeURL]):
1916         (-[WKBrowsingContextController provisionalURL]):
1917         (-[WKBrowsingContextController committedURL]):
1918         (-[WKBrowsingContextController title]):
1919         (-[WKBrowsingContextController textZoom]):
1920         (-[WKBrowsingContextController setTextZoom:]):
1921         (-[WKBrowsingContextController pageZoom]):
1922         (-[WKBrowsingContextController setPageZoom:]):
1923         (-[WKBrowsingContextController setPaginationMode:]):
1924         (-[WKBrowsingContextController paginationMode]):
1925         (-[WKBrowsingContextController setPageLength:]):
1926         (-[WKBrowsingContextController pageLength]):
1927         (-[WKBrowsingContextController setGapBetweenPages:]):
1928         (-[WKBrowsingContextController gapBetweenPages]):
1929         (-[WKBrowsingContextController pageCount]):
1930         (-[WKBrowsingContextController _initWithPageRef:]):
1931         * UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
1932         * UIProcess/API/mac/WKBrowsingContextGroup.mm:
1933         (-[WKBrowsingContextGroup allowsJavaScript]):
1934         (-[WKBrowsingContextGroup setAllowsJavaScript:]):
1935         (-[WKBrowsingContextGroup allowsPlugIns]):
1936         (-[WKBrowsingContextGroup setAllowsPlugIns:]):
1937         (-[WKBrowsingContextGroup _pageGroupRef]):
1938         * UIProcess/API/mac/WKBrowsingContextGroupInternal.h:
1939         * UIProcess/API/mac/WKConnection.mm:
1940         (-[WKConnection _initWithConnectionRef:]):
1941         * UIProcess/API/mac/WKConnectionInternal.h:
1942         * UIProcess/API/mac/WKProcessGroup.mm:
1943         (didCreateConnection):
1944         (-[WKProcessGroup _contextRef]):
1945         * UIProcess/API/mac/WKProcessGroupInternal.h:
1946         * UIProcess/API/mac/WKView.mm:
1947         (-[WKView initWithFrame:processGroup:browsingContextGroup:]):
1948         (-[WKView browsingContextController]):
1949
1950 2011-12-12  Ryosuke Niwa  <rniwa@webkit.org>
1951
1952         WebKit code shouldn't be calling applyCommand directly
1953         https://bugs.webkit.org/show_bug.cgi?id=74337
1954
1955         Reviewed by Darin Adler.
1956
1957         * WebProcess/WebPage/WebPage.cpp:
1958         (WebKit::WebPage::replaceSelectionWithText):
1959
1960 2011-12-12  Sam Weinig  <sam@webkit.org>
1961
1962         Remove unused getter on WKConnection.
1963
1964         Reviewed by Dan Bernstein.
1965
1966         * UIProcess/API/mac/WKConnection.mm:
1967
1968 2011-12-12  Brady Eidson  <beidson@apple.com>
1969
1970         Page cache should support pages with plugins.
1971         <rdar://problem/5190122> and https://bugs.webkit.org/show_bug.cgi?id=13634
1972
1973         Expose a WebKit2 preference for the page cache supporting plugins (on by default).
1974
1975         Reviewed by Anders Carlsson.
1976
1977         * Shared/WebPreferencesStore.h:
1978
1979         * UIProcess/API/C/WKPreferences.cpp:
1980         (WKPreferencesSetPageCacheSupportsPlugins):
1981         (WKPreferencesGetPageCacheSupportsPlugins):
1982         * UIProcess/API/C/WKPreferencesPrivate.h:
1983
1984         * WebProcess/WebPage/WebPage.cpp:
1985         (WebKit::WebPage::updatePreferences):
1986
1987 2011-12-12  Sam Weinig  <sam@webkit.org>
1988
1989         Add WKConnection objective-c wrapper around WKConnectionRef
1990         <rdar://problem/10446092>
1991         https://bugs.webkit.org/show_bug.cgi?id=74324
1992
1993         Reviewed by Anders Carlsson.
1994
1995         * UIProcess/API/mac/WKConnection.h: Added.
1996         * UIProcess/API/mac/WKConnection.mm: Added.
1997         (-[WKConnection dealloc]):
1998         (-[WKConnection connectionRef]):
1999         (-[WKConnection delegate]):
2000         (-[WKConnection setDelegate:]):
2001         (didReceiveMessage):
2002         (didClose):
2003         (setUpClient):
2004         (-[WKConnection initWithConnectionRef:]):
2005         * UIProcess/API/mac/WKConnectionInternal.h: Added.
2006         Added new class.
2007
2008         * UIProcess/API/mac/WKProcessGroup.h:
2009         * UIProcess/API/mac/WKProcessGroup.mm:
2010         (didCreateConnection):
2011         (setUpConnectionClient):
2012         (-[WKProcessGroup initWithInjectedBundleURL:]):
2013         (-[WKProcessGroup delegate]):
2014         (-[WKProcessGroup setDelegate:]):
2015         Add WKProcessGroupDelegate to inform the user of when connections are established.
2016
2017         * WebKit2.xcodeproj/project.pbxproj:
2018         Add new files.
2019
2020 2011-12-12  Anders Carlsson  <andersca@apple.com>
2021
2022         Rename QueueClient::willProcessMessageOnClientRunLoop
2023         https://bugs.webkit.org/show_bug.cgi?id=74325
2024
2025         Reviewed by Sam Weinig.
2026
2027         Rename the QueueClient willProcessMessageOnClientRunLoop function to didReceiveMessageOnConnectionWorkQueue
2028         and give it an out parameter to indicate whether the message was handled or not. This makes it more clear that
2029         the function is expected to handle the message.
2030
2031         * Platform/CoreIPC/Connection.cpp:
2032         (CoreIPC::Connection::processIncomingMessage):
2033         * Platform/CoreIPC/Connection.h:
2034         * Scripts/webkit2/messages.py:
2035         (async_case_statement):
2036         * Scripts/webkit2/messages_unittest.py:
2037         * WebProcess/WebConnectionToUIProcess.cpp:
2038         (WebKit::WebConnectionToUIProcess::didReceiveMessageOnConnectionWorkQueue):
2039         * WebProcess/WebConnectionToUIProcess.h:
2040         * WebProcess/WebProcess.cpp:
2041         (WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue):
2042         * WebProcess/WebProcess.h:
2043
2044 2011-12-12  Alexis Menard  <alexis.menard@openbossa.org>
2045
2046         Unreviewed cleanup fix.
2047
2048         Add missing files from https://bugs.webkit.org/show_bug.cgi?id=73016
2049
2050         Also remove the files that should be removed.
2051
2052         * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml: Added.
2053         * UIProcess/qt/qwkhistory.cpp: Removed.
2054         * UIProcess/qt/qwkhistory.h: Removed.
2055         * UIProcess/qt/qwkhistory_p.h: Removed.
2056
2057 2011-12-12  Michael Bruning  <michael.bruning@nokia.com>
2058
2059         [qt][wk2] Postpone scroll effects when page transition is ongoing.
2060         https://bugs.webkit.org/show_bug.cgi?id=74177
2061
2062         Reviewed by Kenneth Rohde Christiansen.
2063
2064         * UIProcess/API/qt/qquickwebview.cpp:
2065         (QQuickWebViewPrivate::scrollPositionRequested):
2066         * UIProcess/API/qt/qquickwebview_p_p.h:
2067         (QQuickWebViewPrivate::PostTransitionState::apply):
2068
2069 2011-12-12  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2070
2071         [Qt][WK2] Remove dead code from QtWebPageProxy
2072         https://bugs.webkit.org/show_bug.cgi?id=74296
2073
2074         Reviewed by Andreas Kling.
2075
2076         * UIProcess/qt/QtWebPageProxy.cpp:
2077         * UIProcess/qt/QtWebPageProxy.h:
2078
2079 2011-12-12  Simon Hausmann  <simon.hausmann@nokia.com>
2080
2081         Unreviewed build fix.
2082
2083         Add missing files from https://bugs.webkit.org/show_bug.cgi?id=73016
2084
2085         * UIProcess/API/qt/qwebnavigationhistory.cpp: Added.
2086         (QWebNavigationListModelPrivate::QWebNavigationListModelPrivate):
2087         (QWebNavigationListModelPrivate::createWebNavigationModel):
2088         (QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate):
2089         (QWebNavigationHistoryPrivate::createHistory):
2090         (QWebNavigationHistoryPrivate::reset):
2091         (QWebNavigationHistoryPrivate::goBackTo):
2092         (QWebNavigationHistoryPrivate::goForwardTo):
2093         (QWebNavigationListModel::QWebNavigationListModel):
2094         (QWebNavigationListModel::~QWebNavigationListModel):
2095         (QWebNavigationListModel::rowCount):
2096         (QWebNavigationListModel::data):
2097         (QWebNavigationHistory::QWebNavigationHistory):
2098         (QWebNavigationHistory::~QWebNavigationHistory):
2099         (QWebNavigationHistory::backItems):
2100         (QWebNavigationHistory::forwardItems):
2101         * UIProcess/API/qt/qwebnavigationhistory_p.h: Added.
2102         * UIProcess/API/qt/qwebnavigationhistory_p_p.h: Added.
2103
2104 2011-12-12  Simon Hausmann  <simon.hausmann@nokia.com>
2105
2106         [Qt] Move postMessage/messageReceived APIS to experimental
2107
2108         Reviewed by Tor Arne Vestbø.
2109
2110         * UIProcess/API/qt/qquickwebview.cpp:
2111         (QQuickWebViewPrivate::setPageProxy):
2112         (QQuickWebViewExperimental::QQuickWebViewExperimental):
2113         (QQuickWebViewExperimental::postMessage):
2114         * UIProcess/API/qt/qquickwebview_p.h:
2115         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
2116
2117 2011-12-12  Alexis Menard  <alexis.menard@openbossa.org>
2118
2119         [Qt][WK2] History is not accessible in QML.
2120         https://bugs.webkit.org/show_bug.cgi?id=73016
2121
2122         Reviewed by Simon Hausmann.
2123
2124         Remove the old qwkhistory and create QWebNavigationHistory which is QML
2125         friendly with data models you can plug to a view in QML
2126
2127         * Target.pri:
2128         * UIProcess/API/qt/qquickwebview.cpp:
2129         (QQuickWebViewPrivate::didChangeBackForwardList):
2130         (QQuickWebViewExperimental::navigationHistory):
2131         (QQuickWebViewExperimental::goForwardTo):
2132         (QQuickWebViewExperimental::goBackTo):
2133         * UIProcess/API/qt/qquickwebview_p.h:
2134         * UIProcess/API/qt/qquickwebview_p_p.h:
2135         * UIProcess/API/qt/qwebnavigationhistory.cpp: Added.
2136         (QWebNavigationListModelPrivate::QWebNavigationListModelPrivate):
2137         (QWebNavigationListModelPrivate::createWebNavigationModel):
2138         (QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate):
2139         (QWebNavigationHistoryPrivate::createHistory):
2140         (QWebNavigationHistoryPrivate::reset):
2141         (QWebNavigationHistoryPrivate::goBackTo):
2142         (QWebNavigationHistoryPrivate::goForwardTo):
2143         (QWebNavigationListModel::QWebNavigationListModel):
2144         (QWebNavigationListModel::~QWebNavigationListModel):
2145         (QWebNavigationListModel::rowCount):
2146         (QWebNavigationListModel::data):
2147         (QWebNavigationHistory::QWebNavigationHistory):
2148         (QWebNavigationHistory::~QWebNavigationHistory):
2149         (QWebNavigationHistory::backItems):
2150         (QWebNavigationHistory::forwardItems):
2151         * UIProcess/API/qt/qwebnavigationhistory_p.h: Added.
2152         * UIProcess/API/qt/qwebnavigationhistory_p_p.h: Renamed from Source/WebKit2/UIProcess/qt/qwkhistory_p.h.
2153         * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml: Added.
2154         * UIProcess/qt/QtWebPageLoadClient.cpp:
2155         (QtWebPageLoadClient::QtWebPageLoadClient):
2156         (QtWebPageLoadClient::didChangeBackForwardList):
2157         * UIProcess/qt/QtWebPageLoadClient.h:
2158         * UIProcess/qt/QtWebPageProxy.cpp:
2159         (QtWebPageProxy::QtWebPageProxy):
2160         (QtWebPageProxy::~QtWebPageProxy):
2161         (QtWebPageProxy::goBackTo):
2162         (QtWebPageProxy::goForwardTo):
2163         (QtWebPageProxy::navigationHistory):
2164         * UIProcess/qt/QtWebPageProxy.h:
2165         * UIProcess/qt/qwkhistory.cpp: Removed.
2166         * UIProcess/qt/qwkhistory.h: Removed.
2167
2168 2011-12-09  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2169
2170         [Qt][WK2] Move startDrag implementation to QtWebPageEventHandler
2171         https://bugs.webkit.org/show_bug.cgi?id=73145
2172
2173         Reviewed by Simon Hausmann.
2174
2175         Move QtWebPageProxy::startDrag to QtWebPageEventHandler::startDrag
2176         and call it straight from QtPageClient.
2177
2178         * UIProcess/API/qt/qquickwebview.cpp:
2179         (QQuickWebViewPrivate::QQuickWebViewPrivate):
2180         * UIProcess/qt/QtWebPageEventHandler.cpp:
2181         (dragOperationToDropAction):
2182         (dragOperationToDropActions):
2183         (dropActionToDragOperation):
2184         Now these functions are static inline and not part of QtWebPageEventHandler
2185         anymore.
2186
2187         (QtWebPageEventHandler::QtWebPageEventHandler):
2188         (QtWebPageEventHandler::startDrag):
2189         * UIProcess/qt/QtWebPageEventHandler.h:
2190         * UIProcess/qt/QtWebPageProxy.cpp:
2191         (QtWebPageProxy::startDrag): removed.
2192
2193 2011-12-12  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2194
2195         [Qt] [WK2] Support customizing popup menus with QML
2196         https://bugs.webkit.org/show_bug.cgi?id=73560
2197
2198         Reviewed by Tor Arne Vestbø.
2199
2200         Add a new property 'itemSelector' to WebView (experimental for now) that contains
2201         the QML component used when it needs to spawn a popup menu. For example, <select>
2202         HTML tag may trigger a popup menu.
2203
2204         When loaded the component will have the 'model' available in its context with two
2205         properties: 'elementRect', describing the position of the element which spawned
2206         the item selector, and 'items', which is a model ready to be used by ListView. The
2207         'model' also have methods to accept/reject the selection.
2208
2209         Option groups are available as a property for each row in the 'items' model. This
2210         can be used together with ListView to create sections, as demonstrated in the
2211         MiniBrowser. QML tests were added as well.
2212
2213         The existing Desktop version is removed since after the Qt5 refactoring isn't
2214         working correctly. Once Qt have its own QML components for popup, we hope to use
2215         it as a default if no other popupMenu is specified.
2216
2217         * Target.pri:
2218         * UIProcess/API/qt/qquickwebview.cpp:
2219         (QQuickWebViewPrivate::QQuickWebViewPrivate):
2220         (QQuickWebViewExperimental::itemSelector):
2221         (QQuickWebViewExperimental::setItemSelector):
2222         * UIProcess/API/qt/qquickwebview_p.h:
2223         * UIProcess/API/qt/qquickwebview_p_p.h:
2224         (QQuickWebViewPrivate::get):
2225         * UIProcess/API/qt/tests/qmltests/WebView/tst_itemSelector.qml: Added.
2226         * UIProcess/API/qt/tests/qmltests/common/select.html: Added.
2227         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
2228         * UIProcess/qt/QtPageClient.cpp:
2229         * UIProcess/qt/QtWebPageProxy.cpp:
2230         (QtWebPageProxy::createPopupMenuProxy):
2231         * UIProcess/qt/WebPopupMenuProxyQt.cpp:
2232         (WebKit::PopupMenuItemModel::rowCount):
2233         (WebKit::PopupMenuItemModel::Item::Item):
2234         (WebKit::ItemSelectorContextObject::elementRect):
2235         (WebKit::ItemSelectorContextObject::items):
2236         (WebKit::ItemSelectorContextObject::reject):
2237         (WebKit::ItemSelectorContextObject::ItemSelectorContextObject):
2238         (WebKit::ItemSelectorContextObject::accept):
2239         (WebKit::createRoleNamesHash):
2240         (WebKit::PopupMenuItemModel::PopupMenuItemModel):
2241         (WebKit::PopupMenuItemModel::data):
2242         (WebKit::PopupMenuItemModel::select):
2243         (WebKit::PopupMenuItemModel::selectedOriginalIndex):
2244         (WebKit::PopupMenuItemModel::buildItems):
2245         (WebKit::WebPopupMenuProxyQt::WebPopupMenuProxyQt):
2246         (WebKit::WebPopupMenuProxyQt::showPopupMenu):
2247         (WebKit::WebPopupMenuProxyQt::hidePopupMenu):
2248         (WebKit::WebPopupMenuProxyQt::selectIndex):
2249         (WebKit::WebPopupMenuProxyQt::createItem):
2250         (WebKit::WebPopupMenuProxyQt::createContext):
2251         (WebKit::WebPopupMenuProxyQt::notifyValueChanged):
2252         * UIProcess/qt/WebPopupMenuProxyQt.h:
2253         (WebKit::WebPopupMenuProxyQt::create):
2254         * UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp: Removed.
2255         * UIProcess/qt/WebPopupMenuProxyQtDesktop.h: Removed.
2256
2257 2011-12-11  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
2258
2259         [Qt] QQuickWebView missing titleChanged signal tests
2260         https://bugs.webkit.org/show_bug.cgi?id=73923
2261
2262         Reviewed by Simon Hausmann.
2263
2264         Added tests for QQuickWebView tilteChanged signal.
2265
2266         * UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml: Added.
2267         * UIProcess/API/qt/tests/qmltests/common/test3.html: Added.
2268         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
2269
2270 2011-12-11  Anders Carlsson  <andersca@apple.com>
2271
2272         Crash when trying to garbage collect JavaScript objects
2273         https://bugs.webkit.org/show_bug.cgi?id=74259
2274         <rdar://problem/10556188>
2275
2276         Reviewed by Sam Weinig.
2277
2278         * UIProcess/WebContext.cpp:
2279         (WebKit::WebContext::garbageCollectJavaScriptObjects):
2280         Use sendToAllProcesses which is more correct and also handles m_process being null.
2281
2282 2011-12-11  Andreas Kling  <kling@webkit.org>
2283
2284         WK2/NetscapePlugin: Incorrect mouse event coordinates when frameScaleFactor != 1.
2285         <http://webkit.org/b/74209> and <rdar://problem/10438197>
2286
2287         Reviewed by Anders Carlsson.
2288
2289         * Shared/WebEvent.h:
2290         * Shared/WebMouseEvent.cpp:
2291
2292             Remove the WebMouseEvent "copy" constructor that applied a scale factor
2293             to the coordinates of an existing event.
2294
2295         * WebProcess/Plugins/PluginView.cpp:
2296         (WebKit::PluginView::handleEvent):
2297
2298             Pass the WebMouseEvent through to the plugin unmodified.
2299
2300         (WebKit::PluginView::viewGeometryDidChange):
2301
2302             Plumb a complex translate+scale transform through to the plugin, so coordinate
2303             space transformations in will behave correctly with scale factors other than 1.
2304
2305 2011-12-10  Sam Weinig  <sam@webkit.org>
2306
2307         Try to fix the windows build.
2308
2309         * win/WebKit2.vcproj:
2310
2311 2011-12-10  Alexis Menard  <alexis.menard@openbossa.org>
2312
2313         Unreviewed build fix for Qt.
2314
2315         Build error introduced by r102484.
2316
2317         * Target.pri:
2318
2319 2011-12-09  Mark Rowe  <mrowe@apple.com>
2320
2321         Fix the Snow Leopard build some more.
2322
2323         Move the #if to a location where it will do some good.
2324
2325         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
2326
2327 2011-12-09  Mark Rowe  <mrowe@apple.com>
2328
2329         Fix the Snow Leopard build.
2330
2331         Wrap some code that is only applicable to Lion and newer in the appropriate #if's.
2332         
2333         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
2334         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
2335         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2336         (WebKit::ProcessLauncher::launchProcess):
2337
2338 2011-12-09  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2339
2340         [Qt] request parameter of QQuickWebView::navigationRequested is not a registered type
2341         https://bugs.webkit.org/show_bug.cgi?id=73826
2342
2343         Reviewed by Tor Arne Vestbø.
2344
2345         Adding QWebNavigationRequest by moving NavigationRequest out of QtWebPagePolicyClient.
2346
2347         * Target.pri:
2348         * UIProcess/API/qt/qquickwebview_p.h:
2349         * UIProcess/API/qt/qwebnavigationrequest.cpp: Added.
2350         (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
2351         (QWebNavigationRequestPrivate::~QWebNavigationRequestPrivate):
2352         (QWebNavigationRequest::QWebNavigationRequest):
2353         (QWebNavigationRequest::~QWebNavigationRequest):
2354         (QWebNavigationRequest::setAction):
2355         (QWebNavigationRequest::url):
2356         (QWebNavigationRequest::button):
2357         (QWebNavigationRequest::modifiers):
2358         (QWebNavigationRequest::action):
2359         * UIProcess/API/qt/qwebnavigationrequest_p.h: Added.
2360         * UIProcess/qt/QtWebPagePolicyClient.cpp:
2361         (QtWebPagePolicyClient::decidePolicyForNavigationAction):
2362         (QtWebPagePolicyClient::decidePolicyForResponse):
2363
2364 2011-12-09  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2365
2366         [Qt][WK2] Unskip API tests
2367         https://bugs.webkit.org/show_bug.cgi?id=74180
2368
2369         Reviewed by Tor Arne Vestbø.
2370
2371         Unskip API tests for geolocation and javascript dialogs.
2372
2373         * UIProcess/API/qt/tests/qmltests/WebView/tst_geopermission.qml:
2374         * UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:
2375
2376 2011-12-07  Mark Rowe  <mrowe@apple.com>
2377
2378         <http://webkit.org/b/74061> WebProcess and PluginProcess should inherit environment
2379         variables provided in LC_DYLD_ENVIRONMENT of main executable binary.
2380
2381         Reviewed by Darin Adler.
2382
2383         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h: Added.
2384         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm: Added.
2385         (WebKit::DynamicLinkerEnvironmentExtractor::DynamicLinkerEnvironmentExtractor):
2386         (WebKit::DynamicLinkerEnvironmentExtractor::processEnvironmentVariable): Parse out the name
2387         and value from the environment string and add an entry to our variable map if the variable
2388         is one that dyld would respect in LC_DYLD_ENVIRONMENT.
2389         (WebKit::DynamicLinkerEnvironmentExtractor::processLoadCommand): Look for a LC_DYLD_ENVIRONMENT
2390         load command and extract any environment string that we find within.
2391         (WebKit::DynamicLinkerEnvironmentExtractor::processLoadCommands): Iterate over each
2392         load command in the Mach-O file.
2393         (WebKit::DynamicLinkerEnvironmentExtractor::processSingleArchitecture): Determine whether
2394         the Mach-O file is of the correct architecture, and if so then process the load commands
2395         found within.
2396         (WebKit::DynamicLinkerEnvironmentExtractor::processFatFile): Process each architecture of the
2397         Mach-O file in turn.
2398         (WebKit::DynamicLinkerEnvironmentExtractor::getExtractedEnvironmentVariables): Add our
2399         extracted variables to the passed-in EnvironmentVariables object. We skip adding any
2400         variables that already exist so as to allow variables passed in the environment to override
2401         those that we extract from the executable file.
2402         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2403         (WebKit::ProcessLauncher::launchProcess): Extract the environment variables from the
2404         main binary and add them to the launch environment of our subprocess.
2405         * WebKit2.xcodeproj/project.pbxproj:
2406
2407 2011-12-09  Sam Weinig  <sam@webkit.org>
2408
2409         Add WKView implementation for quickLookPreviewItemsAtWindowLocation.
2410         <rdar://problem/10472505>
2411
2412         Reviewed by Dan Bernstein.
2413
2414         * UIProcess/API/mac/WKView.mm:
2415         (-[WKView quickLookPreviewItemsAtWindowLocation:]):
2416
2417 2011-12-09  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2418
2419         [Qt] Open shared memory files with shm_open.
2420         https://bugs.webkit.org/show_bug.cgi?id=74078
2421
2422         Original patch by Kimmo Kinnunen
2423
2424         Reviewed by Kenneth Rohde Christiansen.
2425
2426         Open shared memory files with shm_open. This uses mount point that is
2427         intended to host shared memory files. Typically this is /dev/shm.
2428
2429         This fixes crashes when filesystem that hosts QDir::temp() is full.
2430
2431         This is also more well-defined with respect to question whether SHM
2432         writes to temp dir would cause unintended wear if hosted on flash drives.
2433
2434         This also fixes performance problems regarding QDir::temp() and
2435         mkostemp(), both of which appear to be long operations.
2436
2437         * Platform/unix/SharedMemoryUnix.cpp:
2438         (WebKit::SharedMemory::create):
2439
2440 2011-12-09  Hugo Parente Lima  <hugo.lima@openbossa.org>
2441
2442         [Qt] Click's count is limited to three continuous clicks.
2443         https://bugs.webkit.org/show_bug.cgi?id=45666
2444
2445         Reviewed by Kenneth Rohde Christiansen.
2446
2447         Make Qt recognize "infinite" continuous mouse clicks.
2448         handleMouseDoubleClickEvent merged into handleMousePressEvent.
2449
2450         * UIProcess/qt/QtWebPageEventHandler.cpp:
2451         (QtWebPageEventHandler::QtWebPageEventHandler):
2452         (QtWebPageEventHandler::handleEvent):
2453         (QtWebPageEventHandler::handleMousePressEvent):
2454         (QtWebPageEventHandler::timerEvent):
2455         * UIProcess/qt/QtWebPageEventHandler.h:
2456
2457 2011-12-09  Sam Weinig  <sam@webkit.org>
2458
2459         Expose a WKConnectionRef which represents the connection to/from the WebProcess/UIProcess
2460         https://bugs.webkit.org/show_bug.cgi?id=74218
2461
2462         Reviewed by Anders Carlsson.
2463
2464         Test: WebKit2.WKConnectionTest in TestWebKitAPI
2465
2466         * Shared/WebConnection.cpp:
2467         (WebKit::WebConnection::forwardDidReceiveMessageToClient):
2468         * Shared/WebConnection.h:
2469         Add helper for connection subclasses to dispatch to the client.
2470
2471         * UIProcess/WebConnectionToWebProcess.cpp:
2472         (WebKit::WebConnectionToWebProcess::didReceiveMessage):
2473         Handle postMessage messages from the WebProcess.
2474
2475         * UIProcess/WebContext.cpp:
2476         (WebKit::WebContext::processDidFinishLaunching):
2477         Dispatch the notification that a connection to the WebProcess has
2478         been established.
2479
2480         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2481         (WKBundleGetApplicationConnection):
2482         * WebProcess/InjectedBundle/API/c/WKBundle.h:
2483         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2484         (WebKit::InjectedBundle::webConnectionToUIProcess):
2485         * WebProcess/InjectedBundle/InjectedBundle.h:
2486         (WebKit::WebProcess::webConnectionToUIProcess):
2487         Add accessor to get the connection to the UIProcess from
2488         the bundle.
2489
2490         * WebProcess/WebConnectionToUIProcess.cpp:
2491         (WebKit::WebConnectionToUIProcess::didReceiveMessage):
2492         Handle postMessage messages from the UIProcess.
2493         * WebProcess/WebProcess.h:
2494
2495 2011-12-08  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2496
2497         [Qt] Update WebGraphicLayer's child content scale in all child binding method.
2498         https://bugs.webkit.org/show_bug.cgi?id=74101
2499
2500         Reviewed by Noam Rosenthal.
2501
2502         setChildren is currently the only method propagating the parent layer's content
2503         scale to its children. This need to be done for addChild* as well.
2504
2505         This fixes the overlay layer not being rendered with the right scale when created
2506         until the contents scale is modified again.
2507
2508         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
2509         (WebCore::WebGraphicsLayer::setChildren):
2510         (WebCore::WebGraphicsLayer::addChild):
2511         (WebCore::WebGraphicsLayer::addChildAtIndex):
2512         (WebCore::WebGraphicsLayer::addChildAbove):
2513         (WebCore::WebGraphicsLayer::addChildBelow):
2514         (WebCore::WebGraphicsLayer::replaceChild):
2515
2516 2011-12-09  Michael Brüning  <michael.bruning@nokia.com>
2517
2518         [Qt][WK2] Fix tst_QQuickWebView::scrollRequest() API test
2519         https://bugs.webkit.org/show_bug.cgi?id=73994
2520
2521         Reviewed by Kenneth Rohde Christiansen.
2522
2523         * UIProcess/API/qt/tests/html/scroll.html: Corrected html and
2524         added some coloring.
2525         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2526         (tst_QQuickWebView::scrollRequest): Corrected calculation
2527         of expected value.
2528
2529 2011-12-09  Simon Hausmann  <simon.hausmann@nokia.com>
2530
2531         [Qt] Fix compilation with newly separated Qt 5 QtQuick module
2532         https://bugs.webkit.org/show_bug.cgi?id=73990
2533
2534         Reviewed by Kenneth Rohde Christiansen, tweaked by Csaba Osztrogonác.
2535
2536         Fix QtQuick includes after move from QtDeclarative to QtQuick.
2537
2538         * UIProcess/API/qt/qquickwebpage.cpp:
2539         * UIProcess/API/qt/qquickwebpage_p.h:
2540         * UIProcess/API/qt/qquickwebview.cpp:
2541         * UIProcess/API/qt/qquickwebview_p.h:
2542         * UIProcess/API/qt/tests/tests.pri: Tests need symbols from QtQuick, so link library.
2543         * UIProcess/API/qt/tests/testwindow.h:
2544         * UIProcess/qt/QtDialogRunner.cpp:
2545         * UIProcess/qt/QtSGTileNode.cpp:
2546         * UIProcess/qt/QtSGTileNode.h:
2547         * UIProcess/qt/QtSGUpdateQueue.cpp:
2548         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2549         * UIProcess/qt/QtWebPageProxy.cpp:
2550         * UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
2551
2552 2011-12-09  Nayan Kumar K  <nayankk@motorola.com>
2553
2554         [WebKit2][gtk] Re-enable running TestWebKitSettings
2555         https://bugs.webkit.org/show_bug.cgi?id=70135
2556
2557         Reviewed by Martin Robinson.
2558
2559         Re-enable running TestWebKitSettings which was skipped as part
2560         of https://bugs.webkit.org/show_bug.cgi?id=70129 due to the
2561         bug https://bugs.webkit.org/show_bug.cgi?id=70127.
2562
2563         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
2564         (testWebKitSettings): Run testWebKitSettings.
2565         (testWebKitSettingsNewWithSettings): Run testWebKitSettingsNewWithSettings.
2566
2567 2011-12-08  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
2568
2569         [Qt] [WK2] Webkit should release TextureMapper GL objects if page paint node is deallocated.
2570         https://bugs.webkit.org/show_bug.cgi?id=73591
2571
2572         Reviewed by Noam Rosenthal.
2573
2574         Implement deallocation of TextureMapper GL objects when QQuickWebPage paint node deallocated.
2575         Also adds purging GraphicsLayer backing stores on WebProcess side in order to force repainting
2576         when page becomes visible and painting resumes and fixes incorrect initialization of view 
2577         visibility state.
2578
2579         * UIProcess/API/qt/qquickwebpage.cpp:
2580         (QQuickWebPagePrivate::resetPaintNode):
2581         * UIProcess/API/qt/qquickwebview.cpp:
2582         (QQuickWebViewPrivate::QQuickWebViewPrivate):
2583         * UIProcess/API/qt/tests/html/direct-image-compositing.html: Added.
2584         * UIProcess/API/qt/tests/html/resources/simple_image.png: Added.
2585         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2586         (tst_QQuickWebView::showWebView):
2587         (tst_QQuickWebView::removeFromCanvas):
2588         * UIProcess/DrawingAreaProxy.h:
2589         (WebKit::DrawingAreaProxy::layerTreeHostProxy):
2590         * UIProcess/LayerTreeHostProxy.h:
2591         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2592         (WebKit::LayerTreeHostProxy::purgeGLResources):
2593         * UIProcess/qt/QtWebPageProxy.cpp:
2594         (QtWebPageProxy::purgeGLResources):
2595         * UIProcess/qt/QtWebPageProxy.h:
2596         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
2597         (WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
2598         (WebCore::WebGraphicsLayer::purgeBackingStores):
2599         (WebCore::WebGraphicsLayer::recreateBackingStoreIfNeeded):
2600         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
2601         * WebProcess/WebPage/LayerTreeHost.h:
2602         (WebKit::LayerTreeHost::purgeBackingStores):
2603         * WebProcess/WebPage/LayerTreeHost.messages.in:
2604         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
2605         (WebKit::LayerTreeHostQt::LayerTreeHostQt):
2606         (WebKit::LayerTreeHostQt::flushPendingLayerChanges):
2607         (WebKit::LayerTreeHostQt::purgeBackingStores):
2608         (WebKit::LayerTreeHostQt::recreateBackingStoreIfNeeded):
2609         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
2610
2611 2011-12-08  Simon Fraser  <simon.fraser@apple.com>
2612
2613         Forced compositing mode breaks display of full-page PDFs in WK2
2614         https://bugs.webkit.org/show_bug.cgi?id=74122
2615         <rdar://problem/9550059>
2616
2617         Reviewed by Dan Bernstein.
2618         
2619         Full page PDFs are displayed in WK2 in a subview of the WKView. However,
2620         when the WKView is forced to use accelerated compositing, the layer obscures
2621         the PDF subview.
2622         
2623         To fix this we have to drop out of compositing mode when the WKView is showing
2624         a custom representation.
2625
2626         * UIProcess/API/mac/WKView.mm:
2627         (-[WKView _setPageHasCustomRepresentation:]): Tell the drawing area that the view
2628         gained or lost a custom representation.
2629         * UIProcess/DrawingAreaProxy.h:
2630         (WebKit::DrawingAreaProxy::pageCustomRepresentationChanged):
2631         * UIProcess/DrawingAreaProxyImpl.h:
2632         * UIProcess/DrawingAreaProxyImpl.cpp:
2633         (WebKit::DrawingAreaProxyImpl::pageCustomRepresentationChanged): Send a messgae to the web process
2634         to indicate that the custom representation changed.
2635         * WebProcess/WebPage/DrawingArea.h:
2636         (WebKit::DrawingArea::pageCustomRepresentationChanged):
2637         * WebProcess/WebPage/DrawingArea.messages.in:
2638         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2639         (WebKit::DrawingAreaImpl::pageCustomRepresentationChanged): Enter or exit compositing mode
2640         as appropriate when we gain or lost a custom represenetation.
2641         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
2642         * WebProcess/WebPage/DrawingAreaImpl.h:
2643
2644 2011-12-08  Jer Noble  <jer.noble@apple.com>
2645
2646         HiDPI: Switching a video element to full screen in HiDPI mode doesn't fit the screen correctly
2647         https://bugs.webkit.org/show_bug.cgi?id=74119
2648         rdar://problem/10356869
2649
2650         Reviewed by Darin Adler.
2651
2652         Use the Lion-only -[NSWindow convertRectToScreen:] function to convert between window 
2653         coordinates and screen coordinates.
2654
2655         * UIProcess/mac/WKFullScreenWindowController.mm:
2656         (-[WKFullScreenWindowController enterFullScreen:]):
2657
2658 2011-12-08  Csaba Osztrogonác  <ossy@webkit.org>
2659
2660         [Qt][WK2] Unreviewed buildfix after r102352.
2661
2662         * DerivedSources.pri:
2663
2664 2011-12-06  Jon Lee  <jonlee@apple.com>
2665
2666         [WK2] Add permissions support (73960)
2667         https://bugs.webkit.org/show_bug.cgi?id=73960
2668         <rdar://problem/10357008>
2669
2670         Reviewed by Darin Adler.
2671
2672         * DerivedSources.make: Moved notification files to its own directory. Need to add that path.
2673         * WebKit2.xcodeproj/project.pbxproj: New header and impl files.
2674         * Target.pri: Ditto.
2675         * GNUmakefile.am: Ditto.
2676         * win/WebKit2.vcproj: Ditto.
2677         * win/WebKit2Common.vsprops: Add path to Notifications directory.
2678
2679         Implement permission functions, which go through permission request manager.
2680
2681         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
2682         (WebKit::WebNotificationClient::requestPermission):
2683         (WebKit::WebNotificationClient::cancelRequestsForPermission):
2684         (WebKit::WebNotificationClient::checkPermission):
2685
2686         New NotificationPermissionRequestManager to make and cancel permission requests, and to retrieve current
2687         policy.
2688
2689         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: Added.
2690         (WebKit::generateRequestID):
2691         (WebKit::NotificationPermissionRequestManager::create):
2692         (WebKit::NotificationPermissionRequestManager::NotificationPermissionRequestManager):
2693         (WebKit::NotificationPermissionRequestManager::startRequest): Keep track of the provided callback once
2694         policy decision is made.
2695         (WebKit::NotificationPermissionRequestManager::cancelRequest):
2696         (WebKit::NotificationPermissionRequestManager::permissionLevel): Retrieve level through a synchronous
2697         message to the proxy.
2698         (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision): Invoke the callback.
2699         * WebProcess/Notifications/NotificationPermissionRequestManager.h: Added.
2700         (WebKit::isRequestIDValid): Make sure any provided request IDs are valid.
2701
2702         Added new NotificationPermissionRequest class.
2703
2704         * UIProcess/Notifications/NotificationPermissionRequest.cpp: Added.
2705         (WebKit::NotificationPermissionRequest::create):
2706         (WebKit::NotificationPermissionRequest::NotificationPermissionRequest):
2707         (WebKit::NotificationPermissionRequest::allow): Notify manager of decision.
2708         (WebKit::NotificationPermissionRequest::deny): Ditto.
2709         (WebKit::NotificationPermissionRequest::invalidate): Disassociate with manager.
2710         (WebKit::NotificationPermissionRequest::type):
2711         * UIProcess/Notifications/NotificationPermissionRequest.h: Added.
2712
2713         WKAPI support for NotificationPermissionRequest:
2714
2715         * Shared/API/c/WKBase.h:
2716         * Shared/APIObject.h:
2717         * UIProcess/API/C/WKAPICast.h:
2718         * UIProcess/API/C/WKNotificationPermissionRequest.cpp: Added.
2719         (WKNotificationPermissionRequestGetTypeID):
2720         (WKNotificationPermissionRequestAllow):
2721         (WKNotificationPermissionRequestDeny):
2722         * UIProcess/API/C/WKNotificationPermissionRequest.h: Added.
2723
2724         Other additions to WK API:
2725
2726         * UIProcess/API/C/WKNotificationProvider.h: Added new callback for WKNotificationProviders, to return policy
2727         for a given security origin.
2728         * UIProcess/API/C/WKPage.h: Added new callback to WKPageUIClient to ask user to decide on policy.
2729
2730         New NotificationPermissionRequestManagerProxy to create requests.
2731
2732         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp: Added.
2733         (WebKit::NotificationPermissionRequestManagerProxy::NotificationPermissionRequestManagerProxy):
2734         (WebKit::NotificationPermissionRequestManagerProxy::invalidateRequests):
2735         (WebKit::NotificationPermissionRequestManagerProxy::createRequest):
2736         (WebKit::NotificationPermissionRequestManagerProxy::didReceiveNotificationPermissionDecision):
2737         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h: Added.
2738
2739         Added new message to notification manager: NotificationPermissionLevel, to retrieve policy. The current
2740         JS API retrieves the permission synchronously, so the message needs to be sent synchronously also.
2741
2742         * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Moved from Source/WebKit2/UIProcess/WebNotificationManagerProxy.messages.in.
2743         * UIProcess/Notifications/WebNotificationProvider.cpp: Moved from Source/WebKit2/UIProcess/WebNotificationProvider.cpp.
2744         (WebKit::WebNotificationProvider::policyForNotificationPermissionAtOrigin): Added.
2745         * UIProcess/Notifications/WebNotificationProvider.h: Moved from Source/WebKit2/UIProcess/WebNotificationProvider.h.
2746         * UIProcess/WebProcessProxy.cpp:
2747         (WebKit::WebProcessProxy::didReceiveSyncMessage): Boilerplate to forward messages to notification manager.
2748
2749         * UIProcess/Notifications/WebNotificationManagerProxy.cpp: Moved from Source/WebKit2/UIProcess/WebNotificationManagerProxy.cpp.
2750         (WebKit::WebNotificationManagerProxy::create):
2751         (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy):
2752         (WebKit::WebNotificationManagerProxy::invalidate):
2753         (WebKit::WebNotificationManagerProxy::initializeProvider):
2754         (WebKit::WebNotificationManagerProxy::didReceiveMessage):
2755         (WebKit::WebNotificationManagerProxy::didReceiveSyncMessage):
2756         (WebKit::WebNotificationManagerProxy::show):
2757         (WebKit::WebNotificationManagerProxy::cancel):
2758         (WebKit::WebNotificationManagerProxy::didDestroyNotification):
2759         (WebKit::WebNotificationManagerProxy::notificationPermissionLevel): Retrieve the policy from the provider.
2760         (WebKit::WebNotificationManagerProxy::providerDidShowNotification):
2761         (WebKit::WebNotificationManagerProxy::providerDidClickNotification):
2762         (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):
2763         * UIProcess/Notifications/WebNotificationManagerProxy.h: Moved from Source/WebKit2/UIProcess/WebNotificationManagerProxy.h.
2764         (WebKit::WebNotificationManagerProxy::clearContext):
2765         (WebKit::WebNotificationManagerProxy::type):
2766
2767         Added NotificationPermissionRequestManagerProxy to WebPageProxy, to allow a request for permission to
2768         go through to the UI client. Added new message to WebPageProxy, RequestNotificationPermission.
2769
2770         * UIProcess/WebPageProxy.cpp:
2771         (WebKit::WebPageProxy::WebPageProxy):
2772         (WebKit::WebPageProxy::close): Invalidate pending requests.
2773         (WebKit::WebPageProxy::processDidCrash): Ditto.
2774         (WebKit::WebPageProxy::requestNotificationPermission): Forward request to UI client.
2775         * UIProcess/WebPageProxy.h:
2776         * UIProcess/WebPageProxy.messages.in:
2777
2778         * UIProcess/WebUIClient.cpp:
2779         (WebKit::WebUIClient::decidePolicyForNotificationPermissionRequest):
2780         * UIProcess/WebUIClient.h:
2781
2782         Added new message DidReceiveNotificationPermissionDecision. The WebPage forwards the message to the
2783         permission request manager.
2784
2785         * WebProcess/WebPage/WebPage.messages.in: Added new message DidReceiveNotificationPermissionDecision
2786         * WebProcess/WebPage/WebPage.cpp:
2787         (WebKit::WebPage::notificationPermissionRequestManager): Create manager on request.
2788         (WebKit::WebPage::didReceiveNotificationPermissionDecision):
2789         * WebProcess/WebPage/WebPage.h:
2790
2791         Moving files to Notifications/ subdirectory.
2792
2793         * UIProcess/Notifications/WebNotification.cpp: Moved from Source/WebKit2/UIProcess/WebNotification.cpp.
2794         * UIProcess/Notifications/WebNotification.h: Moved from Source/WebKit2/UIProcess/WebNotification.h.
2795
2796 2011-12-08  Nayan Kumar K  <nayankk@motorola.com>
2797
2798         [WebKit2] Initialize threading in UI process.
2799         https://bugs.webkit.org/show_bug.cgi?id=70127
2800
2801         Reviewed by Anders Carlsson.
2802
2803         * CMakeLists.txt:
2804         * GNUmakefile.am:
2805         * Shared/APIObject.cpp: Added.
2806         (WebKit::APIObject::APIObject):
2807         * Shared/APIObject.h:
2808         * Target.pri:
2809         * WebKit2.xcodeproj/project.pbxproj:
2810         * win/WebKit2.vcproj:
2811
2812 2011-12-08  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
2813
2814         [Qt] [WK2] Directly composited images doesn't render
2815         https://bugs.webkit.org/show_bug.cgi?id=74058
2816
2817         Reviewed by Noam Rosenthal.
2818
2819         Attach image to WebGraphicsLayer even if layerTreeTileClient is not set
2820         and create/assign remote image tiles later during sync.
2821
2822         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
2823         (WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
2824         (WebCore::WebGraphicsLayer::setContentsToImage):
2825         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
2826
2827 2011-12-08  Simon Hausmann  <simon.hausmann@nokia.com>
2828
2829         REGRESSION(r102334): Various Qt WK2 layout tests crash
2830
2831         Reviewed by Tor Arne Vestbø.
2832
2833         * WebProcess/WebPage/WebPage.cpp:
2834         (WebKit::WebPage::editorState): Add missing null pointer check for the editable
2835         element (scope) before calling innerText.
2836
2837 2011-12-08  Simon Hausmann  <simon.hausmann@nokia.com>
2838
2839         [Qt] WebKitTestRunner crashes with debug builds
2840         https://bugs.webkit.org/show_bug.cgi?id=74090
2841
2842         Reviewed by Tor Arne Vestbø.
2843
2844         Export private C++ API style platformInitialize function needed
2845         by low-level WTR.
2846
2847         * UIProcess/API/qt/qquickwebview.cpp:
2848         (QQuickWebView::platformInitialize):
2849         * UIProcess/API/qt/qquickwebview_p.h:
2850
2851 2011-12-07  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2852
2853         [Qt] Fix non-animated pinch-zoom scale commit.
2854         https://bugs.webkit.org/show_bug.cgi?id=74007
2855
2856         Reviewed by Kenneth Rohde Christiansen.
2857
2858         The update deferrer object was only destroyed at the end of the animation
2859         and wouldn't be if the pinch-zoom was ended within legal bounds.
2860         This patch also makes sure that the deferrer isn't destroyed and re-created
2861         once the animation is started if it was already there.
2862
2863         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2864         (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
2865         (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
2866         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
2867         (WebKit::QtViewportInteractionEngine::pinchGestureEnded):
2868         * UIProcess/qt/QtViewportInteractionEngine.h:
2869
2870 2011-12-08  Simon Hausmann  <simon.hausmann@nokia.com>
2871
2872         REGRESSION(r101683): QQuickWebView doesn't work with OpenGL/ES 2.0
2873         https://bugs.webkit.org/show_bug.cgi?id=74077
2874
2875         Reviewed by Kenneth Rohde Christiansen.
2876
2877         Replace Desktop OpenGL idiom of using gl_Vertex with a simple vertex attribute
2878         that's tied to the same register 0 (by being the first in the array).
2879
2880         * UIProcess/API/qt/qquickwebpage.cpp:
2881         (PageProxyMaterialShader::attributeNames): Define "vertex" attribute, which is
2882         bound to register 0, which is the current vertex.
2883         (PageProxyMaterialShader::vertexShader): Use the vertex attribute instead of the
2884         built-in gl_Vertex, which is only present in Desktop GL.
2885
2886 2011-12-07  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2887
2888         [Qt] Fix the memory leak of AC layer update message contents on the UI process.
2889         https://bugs.webkit.org/show_bug.cgi?id=74012
2890
2891         Reviewed by Noam Rosenthal.
2892
2893         Since the messages didn't have a virtual destructor, the destructor
2894         of child class members wouldn't be called and would cause the all tile
2895         update buffers, contained in a QImage, to be leaked as well.
2896
2897         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2898         (WebKit::LayerTreeMessageToRenderer::~LayerTreeMessageToRenderer):
2899
2900 2011-12-08  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2901
2902         Upsteam the Qt changes to the EditorState
2903         https://bugs.webkit.org/show_bug.cgi?id=74080
2904
2905         Reviewed by Simon Hausmann.
2906
2907         We are not doing the serialization manually due to it not being a POD
2908         structure anymore in the case of Qt.
2909
2910         * GNUmakefile.am:
2911         * Shared/EditorState.h:
2912         (WebKit::EditorState::EditorState):
2913         * Target.pri:
2914         * WebKit2.xcodeproj/project.pbxproj:
2915         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2916         (WebKit::WebEditorClient::respondToChangedSelection):
2917         * WebProcess/WebPage/WebPage.cpp:
2918         (WebKit::WebPage::editorState):
2919         * win/WebKit2.vcproj:
2920
2921 2011-12-08  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
2922
2923         [Qt] cleanup qmlplugin
2924         https://bugs.webkit.org/show_bug.cgi?id=73834
2925
2926         Reviewed by Tor Arne Vestbø.
2927
2928         Removed empty folder qmlplugin.
2929
2930         * UIProcess/API/qt/qmlplugin: Removed.
2931
2932 2011-12-08  Sheriff Bot  <webkit.review.bot@gmail.com>
2933
2934         Unreviewed, rolling out r102323.
2935         http://trac.webkit.org/changeset/102323
2936         https://bugs.webkit.org/show_bug.cgi?id=74069
2937
2938         Caused Chromium and GTK build failure (Requested by bashi on
2939         #webkit).
2940
2941         * win/WebKit2.def:
2942         * win/WebKit2CFLite.def:
2943
2944 2011-12-08  Fady Samuel  <fsamuel@chromium.org>
2945
2946         Move scalePageBy from eventSender to window.internals
2947         https://bugs.webkit.org/show_bug.cgi?id=64512
2948
2949         Reviewed by Simon Fraser.
2950
2951         * win/WebKit2.def:
2952         * win/WebKit2CFLite.def:
2953
2954 2011-12-07  Mark Rowe  <mrowe@apple.com>
2955
2956         Fix the 32-bit build.
2957
2958         Ignore some warnings that only occur in 32-bit.
2959
2960         * PluginProcess/mac/PluginProcessShim.mm:
2961         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
2962         (WebKit::NetscapePluginModule::tryLoad):
2963
2964 2011-12-07  Balazs Kelemen  <kbalazs@webkit.org>
2965
2966         ShareableBitmapGtk.cpp has no reason to exist
2967         https://bugs.webkit.org/show_bug.cgi?id=74011
2968
2969         Reviewed by Martin Robinson.
2970
2971         Remove this file since the real implementation is
2972         exists in ShareableBitmapCairo.cpp.
2973
2974         * Shared/gtk/ShareableBitmapGtk.cpp: Removed.
2975
2976 2011-12-07  Mary Wu  <mary.wu@torchmobile.com.cn>
2977
2978         Change function name InitializeLoggingChannelsIfNecessary to follow coding style guideline
2979         https://bugs.webkit.org/show_bug.cgi?id=73986
2980
2981         Reviewed by Kenneth Rohde Christiansen.
2982
2983         * UIProcess/WebContext.cpp:
2984         (WebKit::WebContext::WebContext):
2985         * WebProcess/WebProcess.cpp:
2986         (WebKit::WebProcess::WebProcess):
2987
2988 2011-12-07  Zalan Bujtas  <zbujtas@gmail.com>
2989
2990         [Qt][WK2] Enable page cache.
2991         https://bugs.webkit.org/show_bug.cgi?id=73938
2992
2993         Enable WebCore's page cache for Qt port by setting its capacity to 20. This is temporary 
2994         and will be replaced by a computed value based on CacheMode. See bug#73918.
2995
2996         Reviewed by Simon Hausmann.
2997
2998         * WebProcess/qt/WebProcessQt.cpp:
2999         (WebKit::WebProcess::platformSetCacheModel):
3000
3001 2011-12-06  Andy Estes  <aestes@apple.com>
3002
3003         REGRESSION (r101838): Crash in LayerTreeHostCA::initialize() when accelerated drawing is enabled
3004         https://bugs.webkit.org/show_bug.cgi?id=73955
3005
3006         Reviewed by Anders Carlsson.
3007
3008         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
3009         (WebKit::LayerTreeHostCA::initialize): m_webPage->drawingArea() will be
3010         null here if we are initializing the layer tree host in DrawingArea's
3011         ctor (as is the case when accelerated drawing is enabled), before
3012         WebPage has set its m_drawingArea pointer. Since the layer tree cannot
3013         have been frozen at this point, it's safe to enable layer flush
3014         scheduling if drawingArea() is null.
3015
3016 2011-12-06  Alexander Færøy  <alexander.faeroy@nokia.com>
3017
3018         [Qt] Fix assertion in QtViewportInteractionEngine.cpp:468
3019         https://bugs.webkit.org/show_bug.cgi?id=73914
3020
3021         Reviewed by Kenneth Rohde Christiansen.
3022
3023         m_suspendCount should always be zero when a pinch gesture is started.
3024
3025         * UIProcess/qt/QtViewportInteractionEngine.cpp:
3026         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
3027
3028 2011-12-06  Simon Fraser  <simon.fraser@apple.com>
3029
3030         UI process crashes if the Web Process crashes on launch
3031         https://bugs.webkit.org/show_bug.cgi?id=73943
3032
3033         Reviewed by Sam Weinig.
3034         
3035         When the Web Process crashes on launch, the WebConnectionToWebProcess
3036         object was getting deleted inside of didClose. Add a protector to
3037         prevent this.
3038
3039         * UIProcess/WebConnectionToWebProcess.cpp:
3040         (WebKit::WebConnectionToWebProcess::didClose):
3041
3042 2011-12-06  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3043
3044         [Qt] Fix page overlay rendering with AC.
3045         https://bugs.webkit.org/show_bug.cgi?id=73935
3046
3047         Reviewed by Noam Rosenthal.
3048
3049         The inspector node highlight would display old highlights as well
3050         since the overlay is normally rendered right after the page on top
3051         of the same graphics context.
3052
3053         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
3054         (WebKit::LayerTreeHostQt::paintContents):
3055
3056 2011-12-06  Michael Brüning  <michael.bruning@nokia.com>
3057
3058         [qt][wk2] Tests of QQuickWebView assert in debug builds when destroying QQuickWebViewPrivate 
3059         https://bugs.webkit.org/show_bug.cgi?id=73907 
3060
3061         Reviewed by Kenneth Rohde Christiansen.
3062
3063         * UIProcess/API/qt/qquickwebview.cpp: Disconnect signals from
3064         QtViewportInteractionEngine in ~QQuickWebViewPrivate.
3065         (QQuickWebViewPrivate::~QQuickWebViewPrivate):
3066         * UIProcess/API/qt/qquickwebview_p_p.h: Remove empty inline implementation of ~QQuickWebViewPrivate.
3067
3068 2011-12-06  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3069
3070         [Qt] Add initial support for focusing when entering edit mode.
3071
3072         Reviewed by Simon Hausmann.
3073
3074         Next step would be to properly upstream our EditorState code.
3075
3076         * UIProcess/PageClient.h:
3077         * UIProcess/WebPageProxy.cpp:
3078         (WebKit::WebPageProxy::focusEditableArea):
3079         * UIProcess/WebPageProxy.h:
3080         * UIProcess/WebPageProxy.messages.in:
3081         * UIProcess/qt/QtPageClient.cpp:
3082         (QtPageClient::focusEditableArea):
3083         * UIProcess/qt/QtPageClient.h:
3084         * UIProcess/qt/QtViewportInteractionEngine.cpp:
3085         (WebKit::QtViewportInteractionEngine::itemCoordFromCSS):
3086         (WebKit::QtViewportInteractionEngine::itemRectFromCSS):
3087         (WebKit::QtViewportInteractionEngine::focusEditableArea):
3088         (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
3089         * UIProcess/qt/QtViewportInteractionEngine.h:
3090         * UIProcess/qt/QtWebPageEventHandler.cpp:
3091         (QtWebPageEventHandler::focusEditableArea):
3092         * UIProcess/qt/QtWebPageEventHandler.h:
3093         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3094         (WebKit::WebEditorClient::respondToChangedSelection):
3095         (WebKit::WebEditorClient::setInputMethodState):
3096
3097 2011-12-06  Alexander Færøy  <alexander.faeroy@nokia.com>
3098
3099         [Qt] Fix assertion in QtWebPageEventHandler.cpp
3100         https://bugs.webkit.org/show_bug.cgi?id=73908
3101
3102         Reviewed by Kenneth Rohde Christiansen.
3103
3104         * UIProcess/qt/QtViewportInteractionEngine.cpp:
3105         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
3106
3107 2011-12-05  Igor Oliveira  <igor.oliveira@openbossa.org>
3108
3109         [Qt][WK2] Frame is not being showed in the screen when frameLoadCompleted is called
3110         https://bugs.webkit.org/show_bug.cgi?id=73850
3111
3112         WebKit2 has a mechanism to prevent  the composited layer tree of the outgoing page 
3113         from being torn down or updated until the incoming page has layout. However, for simple 
3114         pages, when the frame is loaded the page is not rendered in the screen.
3115
3116         This patch fixes this bug calling LayerTreeHostQt::scheduleLayerFlush when m_layerFlushSchedulingEnabled
3117         is true.
3118
3119         Reviewed by Noam Rosenthal.
3120
3121         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
3122         (WebKit::LayerTreeHostQt::setLayerFlushSchedulingEnabled):
3123
3124 2011-12-05  Chris Fleizach  <cfleizach@apple.com>
3125
3126         AX: WK2: AX hierarchy is not restored after web process crash
3127         https://bugs.webkit.org/show_bug.cgi?id=73870
3128
3129         The accessibility tokens that need to be sent between UI and Web process
3130         were not being sent by the UI process -> the web process when the web
3131         process crashed.
3132
3133         Reviewed by Darin Adler.
3134
3135         * UIProcess/API/mac/WKView.mm:
3136         (-[WKView viewDidMoveToWindow]):
3137         (-[WKView _accessibilityRegisterUIProcessTokens]):
3138         (-[WKView _didRelaunchProcess]):
3139
3140 2011-12-05  Alexey Proskuryakov  <ap@apple.com>
3141
3142         REGRESSION: Full keyboard access doesn't work if enabled before Safari started
3143         https://bugs.webkit.org/show_bug.cgi?id=73864
3144
3145         Reviewed by Darin Adler.
3146
3147         * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Actually use the
3148         parameter passed at process creation.
3149
3150 2011-12-05  Anders Carlsson  <andersca@apple.com>
3151
3152         Make LayerFlushSchedulerClient::flushLayers indicate whether the flush was successful or not
3153         https://bugs.webkit.org/show_bug.cgi?id=73862
3154
3155         Reviewed by Andy Estes.
3156
3157         Change LayerTreeHostCAMac::flushLayers to always return true and remove the call to LayerFlushScheduler::invalidate.
3158
3159         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
3160         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
3161         (WebKit::LayerTreeHostCAMac::flushLayers):
3162         (WebKit::LayerTreeHostCAMac::didPerformScheduledLayerFlush):
3163
3164 2011-12-05  Michael Brüning  <michael.bruning@nokia.com>
3165
3166         [Qt] Rename QQuickWebView::canStop property to just loading 
3167         https://bugs.webkit.org/show_bug.cgi?id=73813
3168
3169         Reviewed by Kenneth Rohde Christiansen.
3170
3171         Renamed canStop property of QQuickWebView and QtWebPageProxy
3172         to loading and updated tests.
3173
3174         * UIProcess/API/qt/qquickwebview.cpp:
3175         (QQuickWebView::loading):
3176         * UIProcess/API/qt/qquickwebview_p.h:
3177         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3178         (tst_QQuickWebView::navigationStatusAtStartup):
3179         (LoadStartedCatcher::onLoadStarted):
3180         (tst_QQuickWebView::stopEnabledAfterLoadStarted):
3181         * UIProcess/qt/QtWebPageProxy.cpp:
3182         (QtWebPageProxy::loading):
3183         * UIProcess/qt/QtWebPageProxy.h:
3184
3185 2011-12-03  Jer Noble  <jer.noble@apple.com>
3186
3187         <video> elements should disable the system and display sleep when playing on OS X.
3188         https://bugs.webkit.org/show_bug.cgi?id=73730
3189         <rdar://problem/9502155>
3190
3191         Reviewed by Alexey Proskuryakov.
3192
3193         Allow the WebProcess to make connections to the PowerManagement control mach server.
3194
3195         * WebProcess/com.apple.WebProcess.sb:
3196
3197 2011-12-04  Sam Weinig  <sam@webkit.org>
3198
3199         Move code for connections to/from the UIProcess/WebProcess into WebConnection subclasses
3200         https://bugs.webkit.org/show_bug.cgi?id=73779
3201
3202         Reviewed by Anders Carlsson.
3203
3204         To allow for API objects representing the connection going to/from the UIProcess/WebProcess,
3205         this patch separates out the connections into WebConnection subclasses.  It does not yet
3206         expose a way to access these connections, and is therefore not yet testable.
3207
3208         * GNUmakefile.am:
3209         * Target.pri:
3210         * WebKit2.xcodeproj/project.pbxproj:
3211         * win/WebKit2.vcproj:
3212         Add new files.
3213
3214         * Platform/CoreIPC/MessageID.h:
3215         * Shared/CoreIPCSupport/WebConnectionMessageKinds.h: Added.
3216         Add a new message type for communicating between WebConnections.
3217
3218         * Shared/ChildProcess.h:
3219         Make helper public so that WebConnectionToWebProcess can use it.
3220
3221         * UIProcess/WebConnectionToWebProcess.cpp: Added.
3222         (WebKit::WebConnectionToWebProcess::create):
3223         (WebKit::WebConnectionToWebProcess::WebConnectionToWebProcess):
3224         (WebKit::WebConnectionToWebProcess::invalidate):
3225         (WebKit::WebConnectionToWebProcess::postMessage):
3226         (WebKit::WebConnectionToWebProcess::didReceiveMessage):
3227         (WebKit::WebConnectionToWebProcess::didReceiveSyncMessage):
3228         (WebKit::WebConnectionToWebProcess::didClose):
3229         (WebKit::WebConnectionToWebProcess::didReceiveInvalidMessage):
3230         (WebKit::WebConnectionToWebProcess::syncMessageSendTimedOut):
3231         (WebKit::WebConnectionToWebProcess::windowsToReceiveSentMessagesWhileWaitingForSyncReply):
3232         * UIProcess/WebConnectionToWebProcess.h: Added.
3233         (WebKit::WebConnectionToWebProcess::connection):
3234         * UIProcess/WebProcessProxy.cpp:
3235         (WebKit::WebProcessProxy::sendMessage):
3236         (WebKit::WebProcessProxy::didReceiveInvalidMessage):
3237         (WebKit::WebProcessProxy::didFinishLaunching):
3238         * UIProcess/WebProcessProxy.h:
3239         (WebKit::WebProcessProxy::connection):
3240         (WebKit::WebProcessProxy::webConnection):
3241         (WebKit::WebProcessProxy::sendSync):
3242         Thread connection code through WebConnectionToWebProcess.
3243
3244         * WebProcess/WebConnectionToUIProcess.cpp: Added.
3245         (WebKit::WebConnectionToUIProcess::create):
3246         (WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess):
3247         (WebKit::WebConnectionToUIProcess::invalidate):
3248         (WebKit::WebConnectionToUIProcess::postMessage):
3249         (WebKit::WebConnectionToUIProcess::didReceiveMessage):
3250         (WebKit::WebConnectionToUIProcess::didReceiveSyncMessage):
3251         (WebKit::WebConnectionToUIProcess::didClose):
3252         (WebKit::WebConnectionToUIProcess::didReceiveInvalidMessage):
3253         (WebKit::WebConnectionToUIProcess::syncMessageSendTimedOut):
3254         (WebKit::WebConnectionToUIProcess::windowsToReceiveSentMessagesWhileWaitingForSyncReply):
3255         (WebKit::WebConnectionToUIProcess::willProcessMessageOnClientRunLoop):
3256         * WebProcess/WebConnectionToUIProcess.h: Added.
3257         (WebKit::WebConnectionToUIProcess::connection):
3258         * WebProcess/WebProcess.cpp:
3259         (WebKit::WebProcess::initialize):
3260         (WebKit::WebProcess::addVisitedLink):
3261         (WebKit::WebProcess::shouldTerminate):
3262         (WebKit::WebProcess::terminate):
3263         (WebKit::WebProcess::removeWebFrame):
3264         (WebKit::WebProcess::getSitesWithPluginData):
3265         (WebKit::WebProcess::clearPluginSiteData):
3266         (WebKit::WebProcess::getWebCoreStatistics):
3267         * WebProcess/WebProcess.h:
3268         (WebKit::WebProcess::connection):
3269         Thread connection code through WebConnectionToUIProcess.
3270
3271 2011-12-05  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3272
3273         [Qt] Remove viewModeChanged() from QQuickWebView
3274         https://bugs.webkit.org/show_bug.cgi?id=73828
3275
3276         Reviewed by Kenneth Rohde Christiansen.
3277
3278         * UIProcess/API/qt/qquickwebview_p.h: viewModeChanged is not used
3279         and we should not expose it.
3280
3281 2011-12-05  Eric Carlson  <eric.carlson@apple.com>
3282
3283         WebKit2 part of: Add WebKit preferences for text track settings
3284         https://bugs.webkit.org/show_bug.cgi?id=73721
3285
3286         Reviewed by John Sullivan.
3287
3288         * Shared/WebPreferencesStore.h: Declared shouldDisplaySubtitles, shouldDisplayCaptions, and
3289         shouldDisplayTextDescriptions properties with macros. All default to false.
3290
3291         * UIProcess/API/C/WKPreferences.cpp:
3292         (WKPreferencesSetShouldDisplaySubtitles): Added.
3293         (WKPreferencesGetShouldDisplaySubtitles): Ditto.
3294         (WKPreferencesSetShouldDisplayCaptions): Ditto.
3295         (WKPreferencesGetShouldDisplayCaptions): Ditto.
3296         (WKPreferencesSetShouldDisplayTextDescriptions): Ditto.
3297         (WKPreferencesGetShouldDisplayTextDescriptions): Ditto.
3298         * UIProcess/API/C/WKPreferences.h:
3299
3300         * WebProcess/WebPage/WebPage.cpp:
3301         (WebKit::WebPage::updatePreferences): Updates WebCore settings from WebKit2 prefs.
3302
3303 2011-12-04  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
3304
3305         [Qt] cleanup qmltests.pro
3306         https://bugs.webkit.org/show_bug.cgi?id=73718
3307
3308         Reviewed by Simon Hausmann.
3309
3310         Removed unused file WebView/tst_loadZeroSizeView.qml and reordered file list.
3311
3312         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
3313
3314 2011-12-04  Philippe Normand  <pnormand@igalia.com>
3315
3316         [WK2][GTK] enable-fullscreen WebSettings
3317         https://bugs.webkit.org/show_bug.cgi?id=73774
3318
3319         Reviewed by Martin Robinson.
3320
3321         * UIProcess/API/gtk/WebKitSettings.cpp:
3322         (webKitSettingsSetProperty):
3323         (webKitSettingsGetProperty):
3324         (webkit_settings_class_init):
3325         (webkit_settings_set_enable_fullscreen):
3326         (webkit_settings_get_enable_fullscreen):
3327         * UIProcess/API/gtk/WebKitSettings.h:
3328         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
3329         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
3330         (testWebKitSettings):
3331
3332 2011-12-02  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
3333
3334         [Qt] [WK2] MiniBrowser --touch asserts in debug build
3335         https://bugs.webkit.org/show_bug.cgi?id=73697
3336
3337         Reviewed by Eric Seidel.
3338
3339         Add missing guard to QtViewportInteractionEngine::itemSizeChanged().
3340
3341         * UIProcess/qt/QtViewportInteractionEngine.cpp:
3342         (WebKit::QtViewportInteractionEngine::itemSizeChanged):
3343
3344 2011-12-02  Fady Samuel  <fsamuel@chromium.org>
3345
3346         When page scaling is in use position:fixed has incorrect results
3347         https://bugs.webkit.org/show_bug.cgi?id=68617
3348
3349         Reviewed by Simon Fraser.
3350
3351         * win/WebKit2.def:
3352         * win/WebKit2CFLite.def:
3353
3354 2011-12-02  Alexey Proskuryakov  <ap@apple.com>
3355
3356         Update sandbox rules
3357         https://bugs.webkit.org/show_bug.cgi?id=73675
3358         <rdar://problem/9276430>
3359
3360         Reviewed by Sam Weinig.
3361
3362         * WebProcess/com.apple.WebProcess.sb:
3363
3364 2011-12-02  Andy Estes  <aestes@apple.com>
3365
3366         WebKit2: Freeze the state of the layer tree until frame load completion if incremental rendering is suppressed
3367         https://bugs.webkit.org/show_bug.cgi?id=73641
3368
3369         Reviewed by Darin Adler.
3370
3371         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3372         (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout): Do not
3373         un-freeze the layer tree state if incremental rendering is suppressed.
3374         * WebProcess/WebPage/DrawingArea.h:
3375         (WebKit::DrawingArea::layerTreeStateIsFrozen): Add a getter for
3376         m_layerTreeStateIsFrozen.
3377         * WebProcess/WebPage/DrawingAreaImpl.h:
3378         (WebKit::DrawingAreaImpl::layerTreeStateIsFrozen): Ditto.
3379         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
3380         (WebKit::LayerTreeHostCA::initialize): WebFrameLoaderClient might have
3381         tried to freeze the state of the layer tree before the layer tree host
3382         was created. When creating the layer tree host, only schedule a layer
3383         flush if the layer tree state isn't frozen.
3384
3385 2011-12-02  Nayan Kumar K  <nayankk@motorola.com>
3386
3387         [WebKit2][gtk] Add 'enable-dns-prefetching' property to WebKitSettings
3388         https://bugs.webkit.org/show_bug.cgi?id=73414
3389
3390         Reviewed by Martin Robinson.
3391
3392         * UIProcess/API/gtk/WebKitSettings.cpp:
3393         (webKitSettingsSetProperty): Add new set function.
3394         (webKitSettingsGetProperty): Add new get function.
3395         (webkit_settings_class_init): Register new property.
3396         (webkit_settings_get_enable_dns_prefetching): API to get 'enable-dns-prefetching' property.
3397         (webkit_settings_set_enable_dns_prefetching): API to set 'enable-dns-prefetching' property.
3398         * UIProcess/API/gtk/WebKitSettings.h: Expose new public API's.
3399         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new APIs to gtk-doc sections file.
3400         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
3401         (testWebKitSettings): Add new tests.
3402
3403 2011-12-02  Andras Becsi  <andras.becsi@nokia.com>
3404
3405         [Qt][WK2] Set event timestamps on custom input events
3406
3407         Reviewed by Simon Hausmann.
3408
3409         Since r101791 WebEventFactoryQt uses input event timestamps for WebEvents,
3410         thus set the timestamp on the custom events as well.
3411
3412         * UIProcess/qt/QtWebPageEventHandler.cpp:
3413         (QtWebPageEventHandler::handleHoverLeaveEvent):
3414         (QtWebPageEventHandler::handleHoverMoveEvent):
3415         * UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
3416         (WebKit::WebPopupMenuProxyQtDesktop::showPopupMenu):
3417
3418 2011-12-02  Andras Becsi  <andras.becsi@nokia.com>
3419
3420         [Qt] [WK2] Use input event timestamps in WebEvents if available
3421         https://bugs.webkit.org/show_bug.cgi?id=73647
3422
3423         Reviewed by Simon Hausmann.
3424
3425         Qt5 input events already have a native timestamp, use this timestamp
3426         in WebEventFactory instead of WTF::currentTime if it is available.
3427
3428         * Shared/qt/WebEventFactoryQt.cpp:
3429         (WebKit::currentTimeForEvent):
3430         (WebKit::WebEventFactory::createWebMouseEvent):
3431         (WebKit::WebEventFactory::createWebWheelEvent):
3432         (WebKit::WebEventFactory::createWebKeyboardEvent):
3433         (WebKit::WebEventFactory::createWebTouchEvent):
3434         * Shared/qt/WebEventFactoryQt.h:
3435
3436 2011-12-02  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3437
3438         [Qt][WK2] Split the QtWebPageProxy into PageClient and QtPageProxy
3439         https://bugs.webkit.org/show_bug.cgi?id=66668
3440
3441         Reviewed by Simon Hausmann.
3442
3443         Split QtPageClient out of QtWebPageProxy.
3444         This client will live in QQuickWebViewPrivate and communicate directly
3445         with QtWebPageProxy and QtWebPageEventHandler. The functions that need
3446         anything else than these entities will need to call the proper implementation
3447         through QtWebPageProxy itself.
3448         With this we have a clear separation between PageClient and PageProxy, having
3449         two well defined and separated entities for hooking our clients with our API layer (QtWebPageProxy)
3450         and for hooking the WebPageProxy with our client implementations (QtPageClient).
3451         As a positive side-effect we have a cleaner QtWebPageProxy.
3452
3453         * Target.pri:
3454         * UIProcess/API/qt/qquickwebview.cpp:
3455         (QQuickWebViewPrivate::QQuickWebViewPrivate):
3456         * UIProcess/API/qt/qquickwebview_p_p.h:
3457         * UIProcess/qt/QtPageClient.cpp: Added.
3458         (QtPageClient::QtPageClient):
3459         (QtPageClient::~QtPageClient):
3460         (QtPageClient::createDrawingAreaProxy):
3461         (QtPageClient::setViewNeedsDisplay):
3462         (QtPageClient::pageDidRequestScroll):
3463         (QtPageClient::processDidCrash):
3464         (QtPageClient::didRelaunchProcess):
3465         (QtPageClient::didChangeContentsSize):
3466         (QtPageClient::didChangeViewportProperties):
3467         (QtPageClient::startDrag):
3468         (QtPageClient::handleDownloadRequest):
3469         (QtPageClient::setCursor):
3470         (QtPageClient::setCursorHiddenUntilMouseMoves):
3471         (QtPageClient::toolTipChanged):
3472         (QtPageClient::registerEditCommand):
3473         (QtPageClient::clearAllEditCommands):
3474         (QtPageClient::canUndoRedo):
3475         (QtPageClient::executeUndoRedo):
3476         (QtPageClient::convertToDeviceSpace):
3477         (QtPageClient::convertToUserSpace):
3478         (QtPageClient::screenToWindow):
3479         (QtPageClient::windowToScreen):
3480         (QtPageClient::createPopupMenuProxy):
3481         (QtPageClient::createContextMenuProxy):
3482         (QtPageClient::flashBackingStoreUpdates):
3483         (QtPageClient::didFindZoomableArea):
3484         (QtPageClient::didReceiveMessageFromNavigatorQtObject):
3485         (QtPageClient::doneWithTouchEvent):
3486         (QtPageClient::displayView):
3487         (QtPageClient::scrollView):
3488         (QtPageClient::viewSize):
3489         (QtPageClient::isViewWindowActive):
3490         (QtPageClient::isViewFocused):
3491         (QtPageClient::isViewVisible):
3492         (QtPageClient::isViewInWindow):
3493         (QtPageClient::enterAcceleratedCompositingMode):
3494         (QtPageClient::exitAcceleratedCompositingMode):
3495         * UIProcess/qt/QtPageClient.h: Added.
3496         (QtPageClient::pageClosed):
3497         (QtPageClient::doneWithKeyEvent):
3498         (QtPageClient::setFindIndicator):
3499         (QtPageClient::didCommitLoadForMainFrame):
3500         (QtPageClient::didFinishLoadingDataForCustomRepresentation):
3501         (QtPageClient::customRepresentationZoomFactor):
3502         (QtPageClient::setCustomRepresentationZoomFactor):
3503         (QtPageClient::didChangeScrollbarsForMainFrame):
3504         (QtPageClient::findStringInCustomRepresentation):
3505         (QtPageClient::countStringMatchesInCustomRepresentation):
3506         (QtPageClient::setEventHandler):
3507         (QtPageClient::setPageProxy):
3508         * UIProcess/qt/QtWebPageProxy.cpp:
3509         (QtWebPageProxy::QtWebPageProxy):
3510         * UIProcess/qt/QtWebPageProxy.h:
3511
3512 2011-12-02  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3513
3514         [Qt] Do not apply the transition state before we are unsuspended
3515
3516         Reviewed by Simon Hausmann.
3517
3518         Also remove an accessor in the private, which is unneeded as
3519         everything in the private class is supposed to be public or
3520         only used by the private itself.
3521
3522         * UIProcess/API/qt/qquickwebview.cpp:
3523         (QQuickWebViewPrivate::QQuickWebViewPrivate):
3524         (QQuickWebViewPrivate::loadDidCommit):
3525         (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):