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