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