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