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