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