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