Unreviewed, rolling out r109255.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2012-03-01  Nikolas Zimmermann  <nzimmermann@rim.com>
2
3         Unreviewed, rolling out r109255.
4         http://trac.webkit.org/changeset/109255
5         https://bugs.webkit.org/show_bug.cgi?id=79932
6
7         Breaks rounded rects with dashed strokes in SVG
8
9         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
10         (InitWebCoreSystemInterface):
11
12 2012-03-01  Sergio Villar Senin  <svillar@igalia.com>
13
14         [WK2] [GTK] [libsoup] SoupSession should use system CA
15         https://bugs.webkit.org/show_bug.cgi?id=79657
16
17         Reviewed by Martin Robinson.
18
19         SoupSession sould use system CA list to validate SSL
20         certificates. Do not use strict certificate validation though as
21         we want clients to decide whether or not accept/decline invalid
22         certificates (API to be added later).
23
24         No new tests required as current behaviour does not change at all
25         as we continue to accept invalid certificates by default.
26
27         * WebProcess/gtk/WebProcessMainGtk.cpp:
28         (WebKit::WebProcessMainGtk):
29
30 2012-03-01  Carlos Garcia Campos  <cgarcia@igalia.com>
31
32         Unreviewed. Fix WebKit2 GTK+ build.
33
34         * UIProcess/API/gtk/WebKitDefines.h:
35         * UIProcess/API/gtk/WebKitWebView.h:
36
37 2012-02-29  Simon Hausmann  <simon.hausmann@nokia.com>
38
39         [Qt][WK2] QQuickWebView::event should lookup faster which events QQuickWebPage can handle
40         https://bugs.webkit.org/show_bug.cgi?id=78047
41
42         Reviewed by Kenneth Rohde Christiansen.
43
44         Replaced double-dispatch of events with direct forwarding of events from QQuickWebView::*Event to
45         QtWebPageEventHandler::handle*Event.
46
47         * UIProcess/API/qt/qquickwebview.cpp:
48         (QQuickWebView::keyPressEvent):
49         (QQuickWebView::keyReleaseEvent):
50         (QQuickWebView::inputMethodEvent):
51         (QQuickWebView::focusInEvent):
52         (QQuickWebView::focusOutEvent):
53         (QQuickWebView::touchEvent):
54         (QQuickWebView::mousePressEvent):
55         (QQuickWebView::mouseMoveEvent):
56         (QQuickWebView::mouseReleaseEvent):
57         (QQuickWebView::mouseDoubleClickEvent):
58         (QQuickWebView::wheelEvent):
59         (QQuickWebView::hoverEnterEvent):
60         (QQuickWebView::hoverMoveEvent):
61         (QQuickWebView::hoverLeaveEvent):
62         (QQuickWebView::dragMoveEvent):
63         (QQuickWebView::dragEnterEvent):
64         (QQuickWebView::dragLeaveEvent):
65         (QQuickWebView::dropEvent):
66         (QQuickWebView::event):
67         * UIProcess/qt/QtWebPageEventHandler.cpp:
68         (QtWebPageEventHandler::handleMouseMoveEvent):
69         (QtWebPageEventHandler::handleMousePressEvent):
70         (QtWebPageEventHandler::handleMouseReleaseEvent):
71         (QtWebPageEventHandler::handleWheelEvent):
72         (QtWebPageEventHandler::handleHoverLeaveEvent):
73         (QtWebPageEventHandler::handleHoverMoveEvent):
74         (QtWebPageEventHandler::handleDragEnterEvent):
75         (QtWebPageEventHandler::handleDragLeaveEvent):
76         (QtWebPageEventHandler::handleDragMoveEvent):
77         (QtWebPageEventHandler::handleDropEvent):
78         (QtWebPageEventHandler::handleKeyPressEvent):
79         (QtWebPageEventHandler::handleKeyReleaseEvent):
80         (QtWebPageEventHandler::handleFocusInEvent):
81         (QtWebPageEventHandler::handleFocusOutEvent):
82         (QtWebPageEventHandler::handleInputMethodEvent):
83         (QtWebPageEventHandler::handleTouchEvent):
84         * UIProcess/qt/QtWebPageEventHandler.h:
85         (QtWebPageEventHandler):
86
87 2012-03-01  Csaba Osztrogonác  <ossy@webkit.org>
88
89         [Qt][WK2] Unreviewed buildfix after r109277.
90
91         * WebProcess/qt/QtBuiltinBundlePage.cpp:
92         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
93
94 2012-02-29  No'am Rosenthal  <noam.rosenthal@nokia.com>
95
96         [Qt][WK2] Get rid of the #ifdef mess in LayerTreeHost[Proxy]
97         https://bugs.webkit.org/show_bug.cgi?id=79501
98
99         Use a new UI_SIDE_COMPOSITING flag instead of the several #ifdef flags we currently use.
100
101         Reviewed by Kenneth Rohde Christiansen.
102
103         * Shared/WebLayerTreeInfo.cpp:
104         * Shared/WebLayerTreeInfo.h:
105         * UIProcess/DrawingAreaProxy.cpp:
106         (WebKit):
107         * UIProcess/DrawingAreaProxy.h:
108         (DrawingAreaProxy):
109         * UIProcess/DrawingAreaProxyImpl.cpp:
110         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
111         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
112         (WebKit):
113         * UIProcess/DrawingAreaProxyImpl.h:
114         (DrawingAreaProxyImpl):
115         * UIProcess/LayerTreeHostProxy.h:
116         (LayerTreeHostProxy):
117         * UIProcess/WebPageProxy.cpp:
118         (WebKit::WebPageProxy::didReceiveMessage):
119         * UIProcess/qt/LayerBackingStore.cpp:
120         * UIProcess/qt/LayerBackingStore.h:
121         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
122         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
123         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
124         * WebProcess/WebPage/DrawingArea.h:
125         (DrawingArea):
126         * WebProcess/WebPage/DrawingAreaImpl.cpp:
127         (WebKit):
128         * WebProcess/WebPage/DrawingAreaImpl.h:
129         (DrawingAreaImpl):
130         * WebProcess/WebPage/LayerTreeHost.cpp:
131         (WebKit::LayerTreeHost::create):
132         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
133         (WebKit::LayerTreeHostQt::purgeBackingStores):
134         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
135         (LayerTreeHostQt):
136
137 2012-02-28  Brian Weinstein  <bweinstein@apple.com>
138
139         WebKit2: didNewFirstVisuallyNonEmptyLayout should be sent to injected bundle
140         https://bugs.webkit.org/show_bug.cgi?id=79849
141         
142         Tell the injected bundle about didNewFirstVisuallyNonEmptyLayout (we currently
143         just tell the UI process).
144
145         Reviewed by Beth Dakin.
146
147         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add didNewFirstVisuallyNonEmptyLayout to version 1.
148         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
149         (WebKit::InjectedBundlePageLoaderClient::didNewFirstVisuallyNonEmptyLayout): Call through to the
150             client.
151         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
152         (InjectedBundlePageLoaderClient):
153         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
154         (WebKit::WebFrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout): Tell the injected
155             bundle.
156
157 2012-02-29  Tim Horton  <timothy_horton@apple.com>
158
159         Make use of CG rounded-rect primitives
160         https://bugs.webkit.org/show_bug.cgi?id=79932
161         <rdar://problem/9274953>
162
163         Reviewed by Simon Fraser.
164
165         Add wkCGPathAddRoundedRect.
166
167         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
168         (InitWebCoreSystemInterface):
169
170 2012-02-29  Andy Estes  <aestes@apple.com>
171
172         CFURLDownloadScheduleWithCurrentMessageQueue only exists on Windows
173         https://bugs.webkit.org/show_bug.cgi?id=79936
174
175         Reviewed by Brady Eidson.
176
177         CFURLDownloadScheduleWithCurrentMessageQueue only exists on Windows
178         platforms. Non-Windows platforms that use CFNetwork-based downloads
179         should omit this call.
180
181         * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
182         (WebKit::Download::start):
183
184 2012-02-29  Rafael Brandao  <rafael.lobo@openbossa.org>
185
186         [Qt][WK2] We should not add NetscapeBrowserFuncs.cpp as header
187         https://bugs.webkit.org/show_bug.cgi?id=79847
188
189         Reviewed by Alexey Proskuryakov.
190
191         * Target.pri: Fix typo, so we can add ".h" file instead.
192
193 2012-02-29  Sam Weinig  <sam@webkit.org>
194
195         When invoking Lookup while zoomed in, the highlighted word renders out of line
196         <rdar://problem/10812527>
197
198         Reviewed by Simon Fraser.
199
200         * WebProcess/WebPage/mac/WebPageMac.mm:
201         (WebKit::WebPage::performDictionaryLookupForRange):
202         Make sure to scale the ascent when determining the origin for the overlay.
203
204 2012-02-29  Carlos Garcia Campos  <cgarcia@igalia.com>
205
206         [GTK] Use text or page zoom factor in WebKitWebView depending on zoom-text-only
207         https://bugs.webkit.org/show_bug.cgi?id=75252
208
209         Reviewed by Gustavo Noronha Silva.
210
211         * UIProcess/API/gtk/WebKitWebView.cpp:
212         (zoomTextOnlyChanged): Update text/page zoom factor when
213         zoom-text-only setting changes.
214         (webkitWebViewSetSettings): Helper function to set the settings
215         object for the web view, initializing the settings for the page
216         and connecting to notify::zoom-text-only signal.
217         (webkitWebViewConstructed): Use webkitWebViewSetSettings().
218         (webkit_web_view_set_settings): Use webkitWebViewSetSettings() and
219         disconnect from the notify::zoom-text-only signal of the previous
220         settings object.
221         (webkit_web_view_set_zoom_level): Set text/page zoom factor
222         depending on WebKitSettings:zoom-text-only property.
223         (webkit_web_view_get_zoom_level): Get text/page zoom factor
224         depending on WebKitSettings:zoom-text-only property.
225         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
226         (testWebViewZoomLevel):
227
228 2012-02-29  Carlos Garcia Campos  <cgarcia@igalia.com>
229
230         [GTK] Add zoom-text-only setting to WebKit2 GTK+ API
231         https://bugs.webkit.org/show_bug.cgi?id=75249
232
233         Reviewed by Gustavo Noronha Silva.
234
235         To set whether zoom level of web view should affect only the text
236         or all page contents. It's disabled by default.
237
238         * UIProcess/API/gtk/WebKitSettings.cpp:
239         (webKitSettingsSetProperty):
240         (webKitSettingsGetProperty):
241         (webkit_settings_class_init): Add WebKitSettings:zoom-text-only
242         property.
243         (webkit_settings_set_zoom_text_only): Set
244         WebKitSettings:zoom-text-only.
245         (webkit_settings_get_zoom_text_only): Get
246         WebKitSettings:zoom-text-only.
247         * UIProcess/API/gtk/WebKitSettings.h:
248         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new
249         symbols.
250         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
251         (testWebKitSettings):
252
253 2012-02-29  Sergio Villar Senin  <svillar@igalia.com>
254
255         DidFindString should be emitted even if FindOptionsShowOverlay is not enabled
256         https://bugs.webkit.org/show_bug.cgi?id=76522
257
258         Reviewed by Darin Adler.
259
260         DidFindString message should be issued always even if neither
261         FindOptionsShowOverlay or FindOptionsShowHighlight are
262         provided. The difference is that if any of those flags are present
263         the find operation will look for all the appearances of the text
264         in the web view, otherwise it will just look and report the next
265         occurrence.
266
267         This patch removes the temporary workaround added in r109222 to
268         the WebKitFindController unit tests.
269
270         * UIProcess/API/gtk/tests/TestWebKitFindController.cpp:
271         * WebProcess/WebPage/FindController.cpp:
272         (WebKit::FindController::findString):
273
274 2012-01-19  Sergio Villar Senin  <svillar@igalia.com>
275
276         [GTK] [WK2] Add Find API
277         https://bugs.webkit.org/show_bug.cgi?id=76070
278
279         Reviewed by Martin Robinson.
280
281         This patch adds a new public find API for the Gtk+ WK2 port. It
282         defines a new object called WebKitFindController owned by each
283         WebKitWebView. Clients will use this new object to search strings
284         in the WebKitWebView.
285
286         Changes include also documentation and unit tests for the new
287         public API.
288
289         * GNUmakefile.am:
290         * UIProcess/API/gtk/WebKitDefines.h:
291         * UIProcess/API/gtk/WebKitFindController.cpp: Added.
292         (didFindString): implementation of the WKPage Find interface.
293         (didFailToFindString): Ditto.
294         (didCountStringMatches): Ditto.
295         (webkit_find_controller_init):
296         (getWKPageFromWebKitWebView):
297         (webkitFindControllerConstructed):
298         (webkitFindControllerGetProperty):
299         (webkitFindControllerSetProperty):
300         (webkitFindControllerFinalize):
301         (webkit_find_controller_class_init):
302         (webkit_find_controller_get_search_text):
303         (webkit_find_controller_get_options):
304         (webkit_find_controller_get_max_match_count):
305         (webkit_find_controller_get_web_view):
306         (webKitFindControllerPerform):
307         (webKitFindControllerSetSearchData):
308         (webkit_find_controller_search): asynchronously looks for the
309         search string in the WebKitWebView.
310         (webkit_find_controller_search_finish): unhighlights text matches.
311         (webkit_find_controller_search_next):
312         (webkit_find_controller_search_previous):
313         (webkit_find_controller_count_matches): asynchronously counts the
314         number of matches of the search string in the WebKitWebView.
315         * UIProcess/API/gtk/WebKitFindController.h: Added.
316         * UIProcess/API/gtk/WebKitPrivate.h:
317         * UIProcess/API/gtk/WebKitWebView.cpp:
318         (webkit_web_view_get_find_controller): returns the
319         WebKitFindController instance owned by the WebKitWebView.
320         * UIProcess/API/gtk/WebKitWebView.h:
321         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
322         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
323         * UIProcess/API/gtk/docs/webkit2gtk.types:
324         * UIProcess/API/gtk/tests/GNUmakefile.am:
325         * UIProcess/API/gtk/tests/TestWebKitFindController.cpp: Added.
326         (testFindControllerTextFound):
327         (testFindControllerTextNotFound):
328         (testFindControllerMatchCount):
329         (testFindControllerMaxMatchCount):
330         (testFindControllerNext):
331         (testFindControllerPrevious):
332         (testFindControllerCountedMatches):
333         (testFindControllerOptions):
334         (testFindControllerInstance):
335         (testFindControllerGetters):
336         (testFindControllerHide):
337         (beforeAll):
338         (afterAll):
339         * UIProcess/API/gtk/webkit2.h:
340
341 2012-02-28  Simon Fraser  <simon.fraser@apple.com>
342
343         Update WebKitSystemInterface.
344
345         Reviewed by Sam Weinig.
346
347         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
348         (InitWebCoreSystemInterface):
349
350 2012-02-28  Hugo Parente Lima  <hugo.lima@openbossa.org>
351
352         All mouse events after a right click are ignored when they came from WebkitTestRunner
353         https://bugs.webkit.org/show_bug.cgi?id=77350
354
355         Reviewed by Chang Shu.
356
357         Never ignore mouse events when using sync events, even if the context menu is being
358         show but the Ui did replied the ShowContextMenu event with a ContextMenuHidden.
359
360         * WebProcess/WebPage/WebPage.cpp:
361         (WebKit::WebPage::mouseEventSyncForTesting):
362
363 2012-02-28  Alexey Proskuryakov  <ap@apple.com>
364
365         More build fix.
366
367         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: Check for build platform
368         properly.
369
370 2012-02-28  Alexey Proskuryakov  <ap@apple.com>
371
372         Build fix.
373
374         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue):
375         Check for build platform properly.
376
377 2012-02-28  Enrica Casucci  <enrica@apple.com>
378
379         More Pasteboard code cleanup.
380         https://bugs.webkit.org/show_bug.cgi?id=79816
381
382         Removing the last references to NSPasteboard.
383         
384         Reviewed by Alexey Proskuryakov.
385
386         * WebProcess/WebCoreSupport/WebEditorClient.h:
387         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
388         (WebKit::WebEditorClient::setInsertionPasteboard):
389
390 2012-02-28  Alexey Proskuryakov  <ap@apple.com>
391
392         [Mac] Add an experimental SPI for plug-ins to enter sandbox
393         https://bugs.webkit.org/show_bug.cgi?id=79709
394
395         Reviewed by Anders Carlsson.
396
397         * PluginProcess/PluginProcess.h: (WebKit::PluginProcess::pluginPath): Exposed plugin path.
398
399         * PluginProcess/mac/com.apple.WebKit.PluginProcess.sb: Added.
400
401         * WebKit2.xcodeproj/project.pbxproj: Added new files.
402
403         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Exposed
404         a function to access sandboxing functions when available.
405
406         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.h: Added.
407         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: Added.
408
409 2012-02-28  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
410
411         [Qt] Allow read/write to the WebView.url property
412         https://bugs.webkit.org/show_bug.cgi?id=77554
413
414         Reviewed by Tor Arne Vestbø.
415
416         Change QML API WebView.url to read/write to reflect either the url requested by the user.
417         Also removed WebView.load(url). Defers setting url (loading page) until onComponentComplete is triggered. 
418         Fixed c++ and qml tests to reflect the new API.
419
420         * Target.pri:
421         * UIProcess/API/qt/qquickwebview.cpp:
422         (QQuickWebViewPrivate::QQuickWebViewPrivate):
423         (QQuickWebViewPrivate::onComponentComplete):
424         (QQuickWebView::setUrl):
425         * UIProcess/API/qt/qquickwebview_p_p.h:
426         (QQuickWebViewPrivate):
427         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
428         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml:
429         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
430         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
431         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
432         * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
433         * UIProcess/API/qt/tests/qmltests/WebView/tst_download.qml:
434         * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml:
435         * UIProcess/API/qt/tests/qmltests/WebView/tst_geopermission.qml:
436         * UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:
437         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml:
438         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgress.qml:
439         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgressSignal.qml:
440         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
441         * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml:
442         * UIProcess/API/qt/tests/qmltests/WebView/tst_origin.qml:
443         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
444         * UIProcess/API/qt/tests/qmltests/WebView/tst_properties.qml:
445         * UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml:
446         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
447         (tst_QQuickWebView::loadEmptyPageViewHidden):
448         (tst_QQuickWebView::loadNonexistentFileUrl):
449
450 2012-02-28  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
451
452         [Qt] Signal and property cleanup in QQuickWebView
453         https://bugs.webkit.org/show_bug.cgi?id=78820
454
455         Reviewed by Noam Rosenthal.
456
457         - Remove parameters from property change notify signals:
458           titleChanged, urlChanged, iconChanged, loadProgressChanged
459         - Rename the parameters of linkHovered to prevent shadoing properties of WebView
460         - Rename navigationStateChanged to navigationHistoryChanged
461
462         * UIProcess/API/qt/qquickwebview.cpp:
463         (QQuickWebViewPrivate::QQuickWebViewPrivate):
464         (QQuickWebViewPrivate::initialize):
465         (QQuickWebViewPrivate::_q_onUrlChanged):
466         (QQuickWebViewPrivate::setIcon):
467         * UIProcess/API/qt/qquickwebview_p.h:
468         * UIProcess/API/qt/qquickwebview_p_p.h:
469         (QQuickWebViewPrivate):
470         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
471         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
472         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
473         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
474         (tst_QQuickWebView::loadProgress):
475         * UIProcess/qt/QtWebPageLoadClient.cpp:
476         (QtWebPageLoadClient::didCommitLoadForFrame):
477         (QtWebPageLoadClient::didSameDocumentNavigationForFrame):
478         (QtWebPageLoadClient::didReceiveTitleForFrame):
479         (QtWebPageLoadClient::setLoadProgress):
480         * UIProcess/qt/QtWebPageLoadClient.h:
481         (QtWebPageLoadClient):
482
483 2012-02-28  Mario Sanchez Prada  <msanchez@igalia.com>
484
485         [GTK] Add GMainLoop and GMainContext to be handled by GRefPtr
486         https://bugs.webkit.org/show_bug.cgi?id=79496
487
488         Reviewed by Martin Robinson.
489
490         Updated places where raw pointers to GMainLoop and GMainContext
491         were being used, replacing them with GRefPtr-based code.
492
493         * Platform/WorkQueue.h:
494         (WorkQueue):
495         * Platform/gtk/WorkQueueGtk.cpp:
496         (WorkQueue::platformInitialize):
497         (WorkQueue::platformInvalidate):
498         (WorkQueue::workQueueThreadBody):
499         (WorkQueue::registerEventSourceHandler):
500         (WorkQueue::dispatchOnSource):
501         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
502         (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
503         (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
504         (WebKit::WebPopupMenuProxyGtk::shutdownRunLoop):
505         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
506         (WebPopupMenuProxyGtk):
507
508 2012-02-28  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
509
510         [Qt] Initialize QtWebContext as much as we can in its constructor.
511         https://bugs.webkit.org/show_bug.cgi?id=79809
512
513         Reviewed by Tor Arne Vestbø.
514
515         The icon database wouldn't be initialized on the QtWebContext while in WebKitTestRunner
516         since it doesn't call the initialize method on it after creating it.
517         Remove the initialize method, move the download manager and icon database initialization
518         in the constructor and call initializeContextInjectedBundleClient directly in
519         defaultContext to prevent overriding WKTR's injected bundle client.
520
521         * UIProcess/qt/QtWebContext.cpp:
522         (WebKit::QtWebContext::QtWebContext):
523         (WebKit::QtWebContext::defaultContext):
524         * UIProcess/qt/QtWebContext.h:
525         (QtWebContext):
526
527 2012-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>
528
529         [GTK] Inconsistent state of WebKitWebView when replacing content in WebKit2
530         https://bugs.webkit.org/show_bug.cgi?id=79775
531
532         Reviewed by Martin Robinson.
533
534         Use an enum instead of a boolean to track the status of a
535         replace_content() load operation. We need to know when the load of
536         the replace content actually starts to not ignore valid load
537         events of a previous ongoing load operation.
538
539         * UIProcess/API/gtk/WebKitWebView.cpp:
540         (webkitWebViewLoadChanged): Transit to new replace content state
541         when replacing content depending on the load event.
542         (webkitWebViewLoadFailed): Ignore load failed events when
543         replacing content.
544         (webkitWebViewSetEstimatedLoadProgress): Ignore load progress when
545         replacing content.
546         (webkit_web_view_replace_content): Set replace content status to
547         WillReplaceContent.
548         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
549         (replaceContentLoadCallback):
550         (testWebViewReplaceContent):
551         * UIProcess/API/gtk/tests/WebViewTest.cpp:
552         (titleChanged):
553         (WebViewTest::waitUntilTitleChanged): Convenient method to wait
554         until title changes. Use with replaceConent() since load events
555         are not emitted when replacing content.
556         * UIProcess/API/gtk/tests/WebViewTest.h:
557
558 2012-02-27  Anders Carlsson  <andersca@apple.com>
559
560         Add basic page overlay support to TiledCoreAnimationDrawingArea
561         https://bugs.webkit.org/show_bug.cgi?id=79716
562         <rdar://problem/10923079>
563
564         Reviewed by Sam Weinig.
565
566         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
567         Make TiledCoreAnimationDrawingArea a GraphicsLayerClient.
568
569         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
570         (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
571         Create the page overlay layer.
572
573         (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
574         Destroy the page overlay layer.
575
576         (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
577         Mark the page overlay layer as needing display.
578
579         (WebKit::TiledCoreAnimationDrawingArea::notifyAnimationStarted):
580         (WebKit::TiledCoreAnimationDrawingArea::notifySyncRequired):
581         Add empty GraphisLayerClient member function implementations.
582
583         (WebKit::TiledCoreAnimationDrawingArea::paintContents):
584         Ask the page overlay to paint itself.
585
586         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
587         Flush the page overlay layer.
588         
589         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
590         Resize the page overlay layer.
591
592         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
593         If we have a page overlay layer, add it as a sublayer of the root layer.
594
595         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
596         Create the page overlay layer and add it as a sublayer of the root layer.
597
598         (WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer):
599         Remove the page overlay layer and destroy it.
600
601 2012-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>
602
603         [GTK] Remove virtual methods of WebKitDownload signals in WebKit2 GTK+ API
604         https://bugs.webkit.org/show_bug.cgi?id=79804
605
606         Reviewed by Martin Robinson.
607
608         That comes from the first patch that followed the approach of the
609         first LoaderClient implementation. With current implementation
610         download signals, except decide-destination, don't need to be
611         true_handled, and they won't have a default handler
612         implementation. Also the download object is not supposed to be
613         inheritable, since instances are created privately by the
614         WebContext, so it's not possible to override the virtual methods
615         in derived classes.
616
617         * UIProcess/API/gtk/WebKitDownload.cpp:
618         (webkit_download_class_init):
619         (webkitDownloadNotifyProgress):
620         (webkitDownloadFailed):
621         (webkitDownloadFinished):
622         * UIProcess/API/gtk/WebKitDownload.h:
623         (_WebKitDownloadClass):
624         * UIProcess/API/gtk/webkit2marshal.list:
625
626 2012-02-28  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
627
628         [Qt] Fix build for WK2, do not use enum type if values can be outside the enum
629         https://bugs.webkit.org/show_bug.cgi?id=79800
630
631         Reviewed by Csaba Osztrogonác.
632
633         We have two different enums called NavigationRequestAction. If we use one of them
634         to store the variables, compilers can rightfully warn about comparison with
635         values from other enums.
636
637         We might revisit the strategy of exposing different enumerations in experimental,
638         but for now, fallback to using int for the 'action' property in
639         QWebNavigationRequest.
640
641         * UIProcess/API/qt/qwebnavigationrequest.cpp:
642         (QWebNavigationRequestPrivate):
643         (QWebNavigationRequest::setAction):
644         (QWebNavigationRequest::action):
645         * UIProcess/API/qt/qwebnavigationrequest_p.h:
646         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
647
648 2012-02-27  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
649
650         [Qt] API changes to QWebNavigationRequest
651         https://bugs.webkit.org/show_bug.cgi?id=78821
652
653         Reviewed by Kenneth Rohde Christiansen.
654
655         Changes discussed in API review at Szeged: rename 'button' to 'mouseButton',
656         rename 'modifiers' to 'keyboardModifiers', remove 'originatingUrl' and
657         use the enum type for 'action'.
658
659         * UIProcess/API/qt/qwebnavigationrequest.cpp:
660         (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
661         (QWebNavigationRequestPrivate):
662         (QWebNavigationRequest::QWebNavigationRequest):
663         (QWebNavigationRequest::setAction):
664         (QWebNavigationRequest::mouseButton):
665         (QWebNavigationRequest::keyboardModifiers):
666         (QWebNavigationRequest::action):
667         * UIProcess/API/qt/qwebnavigationrequest_p.h:
668         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
669         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
670         * UIProcess/qt/QtWebPagePolicyClient.cpp:
671         (QtWebPagePolicyClient::decidePolicyForNavigationAction):
672         * UIProcess/qt/QtWebPagePolicyClient.h:
673         (QtWebPagePolicyClient):
674
675 2012-02-28  Shinya Kawanaka  <shinyak@chromium.org>
676
677         Element should be able to have multiple shadow roots.
678         https://bugs.webkit.org/show_bug.cgi?id=77931
679
680         Reviewed by Hajime Morita.
681
682         * win/WebKit2.def:
683         * win/WebKit2CFLite.def:
684
685 2012-02-28  Hugo Parente Lima  <hugo.lima@openbossa.org>
686
687         [Qt][WK2] Use movementStarted/Ended signals instead of movingChanged on QtViewportInterationEngine
688         https://bugs.webkit.org/show_bug.cgi?id=79521
689
690         Reviewed by Kenneth Rohde Christiansen.
691
692         movingChanged() signal is emitted many times, so the use of movementStarted() and
693         movementEnded() is a better choice.
694
695         * UIProcess/qt/QtFlickProvider.cpp:
696         (QtFlickProvider::QtFlickProvider):
697         * UIProcess/qt/QtFlickProvider.h:
698         (QtFlickProvider):
699         * UIProcess/qt/QtViewportInteractionEngine.cpp:
700         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
701         * UIProcess/qt/QtViewportInteractionEngine.h:
702         (QtViewportInteractionEngine):
703
704 2012-02-27  Shinya Kawanaka  <shinyak@chromium.org>
705
706         Element::removeShadowRoot() and setShadowRoot() should be moved into ShadowTree.
707         https://bugs.webkit.org/show_bug.cgi?id=78313
708
709         Reviewed by Hajime Morita.
710
711         * win/WebKit2.def:
712         * win/WebKit2CFLite.def:
713
714 2012-02-27  Brady Eidson  <beidson@apple.com>
715
716         <rdar://problem/10924993> and https://bugs.webkit.org/show_bug.cgi?id=79725
717         <a ping> doesn't work in WebKit2
718
719         Reviewed by Alexey Proskuryakov.
720
721         * WebProcess/WebPage/WebPage.cpp:
722         (WebKit::WebPage::updatePreferences): Push the WK2 <a ping> setting to WebCore::Settings.
723
724 2012-02-27  Enrica Casucci  <enrica@apple.com>
725
726         WebKit2: implement platform strategy to access Pasteboard in the UI process.
727         https://bugs.webkit.org/show_bug.cgi?id=79253
728         <rdar://problem/9971876>
729
730         Reviewed by Alexey Proskuryakov.
731
732         * UIProcess/WebContext.h:
733         * UIProcess/WebContext.messages.in: Added messages to access NSPasteboard
734         in the UI process.
735         * UIProcess/mac/WebContextMac.mm: Added methods corresponding to the
736         new messages.
737         (WebKit::WebContext::getPasteboardTypes):
738         (WebKit::WebContext::getPasteboardPathnamesForType):
739         (WebKit::WebContext::getPasteboardStringForType):
740         (WebKit::WebContext::getPasteboardBufferForType):
741         (WebKit::WebContext::pasteboardCopy):
742         (WebKit::WebContext::getPasteboardChangeCount):
743         (WebKit::WebContext::getPasteboardUniqueName):
744         (WebKit::WebContext::getPasteboardColor):
745         (WebKit::WebContext::setPasteboardTypes):
746         (WebKit::WebContext::setPasteboardPathnamesForType):
747         (WebKit::WebContext::setPasteboardStringForType):
748         (WebKit::WebContext::setPasteboardBufferForType):
749         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: New implementation of the PasteboardStrategy using message exchange
750         with the UI process.
751         (WebKit::WebPlatformStrategies::getTypes):
752         (WebKit::WebPlatformStrategies::bufferForType):
753         (WebKit::WebPlatformStrategies::getPathnamesForType):
754         (WebKit::WebPlatformStrategies::stringForType):
755         (WebKit::WebPlatformStrategies::copy):
756         (WebKit::WebPlatformStrategies::changeCount):
757         (WebKit::WebPlatformStrategies::uniqueName):
758         (WebKit::WebPlatformStrategies::color):
759         (WebKit::WebPlatformStrategies::setTypes):
760         (WebKit::WebPlatformStrategies::setBufferForType):
761         (WebKit::WebPlatformStrategies::setPathnamesForType):
762         (WebKit::WebPlatformStrategies::setStringForType):
763
764 2012-02-27  Dan Bernstein  <mitz@apple.com>
765
766         <rdar://problem/9557598> REGRESSION (WebKit2): Non-activating links sometimes don’t work
767         https://bugs.webkit.org/show_bug.cgi?id=79607
768
769         Reviewed by Adele Peterson.
770
771         Test: TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm
772
773         This was caused by not mapping the mouse event coordinates from window coordinates to
774         document coordinates.
775
776         * WebProcess/WebPage/mac/WebPageMac.mm:
777         (WebKit::WebPage::performDictionaryLookupAtLocation): Convert the point to main frame
778         coordinates when performing the hit test.
779         (WebKit::WebPage::shouldDelayWindowOrderingEvent): Convert the point to the main or focused
780         frame coordinates when perfomring the hit test.
781         (WebKit::WebPage::acceptsFirstMouse): Ditto.
782
783 2012-02-27  Timothy Hatcher  <timothy@apple.com>
784
785         Add WKInspector API to know when the Web Inspector is the frontmost window.
786
787         Also makes the Safari Develop menu items work when the Web Inspector is frontmost.
788
789         https://webkit.org/b/79649
790
791         Reviewed by John Sullivan.
792
793         * UIProcess/API/C/WKInspector.cpp:
794         (WKInspectorIsFront): Added. Call WebInspectorProxy::isFront.
795         * UIProcess/API/C/WKInspector.h:
796         * UIProcess/WebInspectorProxy.cpp:
797         (WebKit::WebInspectorProxy::isFront): Added. Call platformIsFront.
798         * UIProcess/WebInspectorProxy.h:
799         * UIProcess/efl/WebInspectorEfl.cpp:
800         (WebKit::WebInspectorProxy::platformIsFront): Added stub.
801         * UIProcess/gtk/WebInspectorGtk.cpp:
802         (WebKit::WebInspectorProxy::platformIsFront): Added stub.
803         * UIProcess/mac/WebInspectorProxyMac.mm:
804         (-[WKWebInspectorProxyObjCAdapter showWebInspector:]): Added. Makes the Develop menu items in Safari work when
805         the Web Inspector window is front.
806         (-[WKWebInspectorProxyObjCAdapter showErrorConsole:]): Added. Ditto.
807         (-[WKWebInspectorProxyObjCAdapter showResources:]): Added. Ditto.
808         (-[WKWebInspectorProxyObjCAdapter viewSource:]): Added. Ditto.
809         (-[WKWebInspectorProxyObjCAdapter toggleDebuggingJavaScript:]): Added. Ditto.
810         (-[WKWebInspectorProxyObjCAdapter toggleProfilingJavaScript:]): Added. Ditto.
811         (-[WKWebInspectorProxyObjCAdapter validateUserInterfaceItem:]): Added. Update the menu item titles.
812         (WebKit::WebInspectorProxy::platformIsFront): Added. Return if visible and the window is main.
813         * UIProcess/qt/WebInspectorProxyQt.cpp:
814         (WebKit::WebInspectorProxy::platformIsFront): Added stub.
815         * UIProcess/win/WebInspectorProxyWin.cpp:
816         (WebKit::WebInspectorProxy::platformIsFront): Added stub.
817
818 2012-02-26  YoungTaeck Song  <youngtaeck.song@samsung.com>
819
820         [EFL][WK2] Add InjectedBundleEfl.cpp
821         https://bugs.webkit.org/show_bug.cgi?id=75463
822
823         Reviewed by Andreas Kling.
824
825         Add first version of InjectedBundleEfl.cpp including load() and placeholder for activateMacFontAscentHack().
826
827         * WebProcess/InjectedBundle/InjectedBundle.h:
828         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
829         (WebKit::InjectedBundle::load):
830         (WebKit::InjectedBundle::activateMacFontAscentHack):
831
832 2012-02-26  Shinya Kawanaka  <shinyak@chromium.org>
833
834         Rename ShadowRootList to ShadowTree.
835         https://bugs.webkit.org/show_bug.cgi?id=79342
836
837         Reviewed by Hajime Morita.
838
839         * win/WebKit2.def:
840         * win/WebKit2CFLite.def:
841
842 2012-02-26  Hajime Morrita  <morrita@chromium.org>
843
844         Move ChromeClient::showContextMenu() to ContextMenuClient
845         https://bugs.webkit.org/show_bug.cgi?id=79427
846
847         Reviewed by Adam Barth.
848
849         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
850         * WebProcess/WebCoreSupport/WebChromeClient.h:
851         (WebChromeClient):
852         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
853         (WebKit):
854         (WebKit::WebContextMenuClient::showContextMenu): Moved from WebChromeClient
855         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
856         (WebContextMenuClient):
857         * WebProcess/WebPage/WebPage.cpp:
858         (WebKit::handleContextMenuEvent):
859         (WebKit::handleMouseEvent):
860         (WebKit::WebPage::mouseEvent):
861         (WebKit::WebPage::mouseEventSyncForTesting):
862
863 2012-02-26  Huang Dongsung  <luxtella@company100.net>
864
865         Use Functional instead of a MessageQueue for messages to the LayerTreeHostProxy
866         renderer.
867         https://bugs.webkit.org/show_bug.cgi?id=79478
868
869         This makes a lot of the broilerplate code for message-passing unnecessary, and
870         results in a much more succinct implementation.
871
872         Reviewed by Noam Rosenthal.
873
874         * UIProcess/LayerTreeHostProxy.h:
875         (WebKit):
876         (LayerTreeHostProxy):
877         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
878         (WebKit):
879         (WebKit::LayerTreeHostProxy::updateTile):
880         (WebKit::LayerTreeHostProxy::createImage):
881         (WebKit::LayerTreeHostProxy::syncRemoteContent):
882         (WebKit::LayerTreeHostProxy::dispatchUpdate):
883         (WebKit::LayerTreeHostProxy::createTileForLayer):
884         (WebKit::LayerTreeHostProxy::updateTileForLayer):
885         (WebKit::LayerTreeHostProxy::removeTileForLayer):
886         (WebKit::LayerTreeHostProxy::deleteCompositingLayer):
887         (WebKit::LayerTreeHostProxy::setRootCompositingLayer):
888         (WebKit::LayerTreeHostProxy::syncCompositingLayerState):
889         (WebKit::LayerTreeHostProxy::didRenderFrame):
890         (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
891         (WebKit::LayerTreeHostProxy::destroyDirectlyCompositedImage):
892
893 2012-02-26  Filip Pizlo  <fpizlo@apple.com>
894
895         Build fix for SL.
896
897         * Platform/mac/RemoteLayerClient.mm:
898         (WebKit::RemoteLayerClient::RemoteLayerClient):
899
900 2012-02-26  Sam Weinig  <sam@webkit.org>
901
902         Encapsulate uses of WKSI to setup a remote layer into a new RemoteLayerClient class
903         https://bugs.webkit.org/show_bug.cgi?id=79612
904
905         Reviewed by Anders Carlsson.
906
907         * Platform/mac/RemoteLayerClient.h: 
908         * Platform/mac/RemoteLayerClient.mm: 
909         (WebKit::RemoteLayerClient::create):
910         (WebKit::RemoteLayerClient::RemoteLayerClient):
911         (WebKit::RemoteLayerClient::~RemoteLayerClient):
912         (WebKit::RemoteLayerClient::clientID):
913         (WebKit::RemoteLayerClient::invalidate):
914         New class that encapsulates calls to WKSI WKCARemoteLayerClient*. For platforms
915         where the use of WKSI is not necessary, due to CARemoteLayerClient being available,
916         stop using WKSI.
917
918         * PluginProcess/PluginControllerProxy.cpp:
919         * PluginProcess/PluginControllerProxy.h:
920         * PluginProcess/mac/PluginControllerProxyMac.mm:
921         (WebKit::PluginControllerProxy::platformInitialize):
922         (WebKit::PluginControllerProxy::platformDestroy):
923         (WebKit::PluginControllerProxy::remoteLayerClientID):
924         (WebKit::PluginControllerProxy::platformGeometryDidChange):
925         * WebKit2.xcodeproj/project.pbxproj:
926         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
927         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
928         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
929         (WebKit::WebFullScreenManagerMac::disposeOfLayerClient):
930         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
931         (LayerTreeHostCAMac):
932         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
933         (WebKit::LayerTreeHostCAMac::platformInitialize):
934         (WebKit::LayerTreeHostCAMac::invalidate):
935         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
936         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
937         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
938         Switch to using RemoteLayerClient.
939
940         * UIProcess/mac/WebContextMac.mm:
941         (WebKit::WebContext::platformInitializeWebProcess):
942         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
943         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
944         Use CARemoteLayerServer directly if available.
945
946 2012-02-25  Anders Carlsson  <andersca@apple.com>
947
948         Address review feedback from Andreas Kling.
949
950         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
951         (WebKit::NetscapePlugin::platformHandleMouseEvent):
952
953 2012-02-25  Anders Carlsson  <andersca@apple.com>
954
955         Mouse tracking incorrect in Silverlight when using multi monitor with offset arrangement
956         https://bugs.webkit.org/show_bug.cgi?id=79589
957         <rdar://problem/9719592>
958
959         Reviewed by Sam Weinig.
960
961         In the Carbon event model, mouse event coordinates are flipped relative to the first screen,
962         whereas the coordinates we get from the WebMouseEvent are flipped relative to the screen where
963         the containing WKView is on.
964
965         Instead of passing the global coordinates to NPP_HandleEvent, convert them to the flipped screen coordinate
966         system that the plug-in expects.
967
968         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
969         (WebKit::NetscapePlugin::platformHandleMouseEvent):
970
971 2012-02-25  Sheriff Bot  <webkit.review.bot@gmail.com>
972
973         Unreviewed, rolling out r108900.
974         http://trac.webkit.org/changeset/108900
975         https://bugs.webkit.org/show_bug.cgi?id=79587
976
977         broke some API tests, will investigate and re-commit
978         (Requested by noamr on #webkit).
979
980         * UIProcess/API/qt/qquickwebpage.cpp:
981         (computeEffectiveOpacity):
982         (QQuickWebPagePrivate::paintToCurrentGLContext):
983         (PageProxyNode::changedStates):
984         (PageProxyNode::render):
985         * UIProcess/API/qt/qquickwebpage_p_p.h:
986         (QQuickWebPagePrivate):
987
988 2012-02-25  No'am Rosenthal  <noam.rosenthal@nokia.com>
989
990         [Qt] Use the existing inheritedOpacity/matrix properties of QSGNode
991         https://bugs.webkit.org/show_bug.cgi?id=79543
992
993         Use QSGNode::inheritedOpacity() and QSGNode::matrix().
994         Also, remove flags from changedStates() that we don't actually touch.
995
996         Reviewed by Kenneth Rohde Christiansen.
997
998         * UIProcess/API/qt/qquickwebpage.cpp:
999         (QQuickWebPagePrivate::paintToCurrentGLContext):
1000         (PageProxyNode::changedStates):
1001         (PageProxyNode::render):
1002         * UIProcess/API/qt/qquickwebpage_p_p.h:
1003         (QQuickWebPagePrivate):
1004
1005 2012-02-25  Sheriff Bot  <webkit.review.bot@gmail.com>
1006
1007         Unreviewed, rolling out r108816.
1008         http://trac.webkit.org/changeset/108816
1009         https://bugs.webkit.org/show_bug.cgi?id=79562
1010
1011         It made many tests crash and timeout on Qt-WK2 (Requested by
1012         ossy__ on #webkit).
1013
1014         * UIProcess/API/qt/qquickwebview.cpp:
1015         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1016         (QQuickWebViewPrivate::initialize):
1017         (QQuickWebViewPrivate::setIcon):
1018         * UIProcess/API/qt/qquickwebview_p.h:
1019         * UIProcess/API/qt/qquickwebview_p_p.h:
1020         (QQuickWebViewPrivate):
1021         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
1022         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
1023         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
1024         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
1025         (tst_QQuickWebView::loadProgress):
1026         * UIProcess/qt/QtWebPageLoadClient.cpp:
1027         (QtWebPageLoadClient::didCommitLoadForFrame):
1028         (QtWebPageLoadClient::didSameDocumentNavigationForFrame):
1029         (QtWebPageLoadClient::didReceiveTitleForFrame):
1030         (QtWebPageLoadClient::setLoadProgress):
1031         * UIProcess/qt/QtWebPageLoadClient.h:
1032         (QtWebPageLoadClient):
1033
1034 2012-02-24  Andy Estes  <aestes@apple.com>
1035
1036         REGRESSION (r108730): Webkit nightlies fails to start due to WKPreferencesGetSuppressIncrementalRendering renaming
1037         https://bugs.webkit.org/show_bug.cgi?id=79515
1038
1039         Reviewed by Alexey Proskuryakov.
1040
1041         Some versions of Safari contain call sites to two functions in WebKit2
1042         that were removed in r108730. Restore these two functions so that these
1043         versions of Safari can be used with WebKit nightly builds.
1044
1045         * UIProcess/API/C/WKPreferences.cpp:
1046         (WKPreferencesSetSuppressIncrementalRendering):
1047         (WKPreferencesGetSuppressIncrementalRendering):
1048         * UIProcess/API/C/WKPreferences.h:
1049
1050 2012-02-24  Jessie Berlin  <jberlin@apple.com>
1051
1052         requestPermission callback not invoked if the WebProcess doesn't have to ask the UI Process
1053         about the permission level.
1054         https://bugs.webkit.org/show_bug.cgi?id=79494
1055
1056         Reviewed by Jon Honeycutt.
1057
1058         Invoke the callback in the case where the permission level is known and no message is sent
1059         to the UI Process.
1060
1061         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
1062         (WebKit::NotificationPermissionRequestManager::startRequest):
1063
1064 2012-02-24  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1065
1066         [Qt] Signal and property cleanup in QQuickWebView
1067         https://bugs.webkit.org/show_bug.cgi?id=78820
1068
1069         Reviewed by Simon Hausmann.
1070
1071         - Remove parameters from property change notify signals:
1072           titleChanged, urlChanged, iconChanged, loadProgressChanged
1073         - Rename the parameters of linkHovered to prevent shadoing properties of WebView
1074         - Rename navigationStateChanged to navigationHistoryChanged
1075
1076         * UIProcess/API/qt/qquickwebview.cpp:
1077         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1078         (QQuickWebViewPrivate::initialize):
1079         (QQuickWebViewPrivate::_q_onUrlChanged):
1080         (QQuickWebViewPrivate::setIcon):
1081         * UIProcess/API/qt/qquickwebview_p.h:
1082         * UIProcess/API/qt/qquickwebview_p_p.h:
1083         (QQuickWebViewPrivate):
1084         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
1085         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
1086         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
1087         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
1088         (tst_QQuickWebView::loadProgress):
1089         * UIProcess/qt/QtWebPageLoadClient.cpp:
1090         (QtWebPageLoadClient::didCommitLoadForFrame):
1091         (QtWebPageLoadClient::didSameDocumentNavigationForFrame):
1092         (QtWebPageLoadClient::didReceiveTitleForFrame):
1093         (QtWebPageLoadClient::setLoadProgress):
1094         * UIProcess/qt/QtWebPageLoadClient.h:
1095         (QtWebPageLoadClient):
1096
1097 2012-02-24  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1098
1099         [Qt] API: Unify the loading properties and signals.
1100         https://bugs.webkit.org/show_bug.cgi?id=79486
1101
1102         Reviewed by Simon Hausmann.
1103
1104         - Remove the canReload signal, instead assume that calling reload in those cases
1105           won't have any effect.
1106         - Replace loadStarted, loadSucceeded and loadFailed by a single signal: loadingChanged.
1107           The signal carries an argument with a status and error codes giving the intended context.
1108         - Use loadingChanged as the notification signal for the property "loading" instead of
1109           navigationStateChanged.
1110
1111         Also update all API tests to use the new loading signals and add some utility functions
1112         to track the loading since the new API aims to be more adapted to declarative logic
1113         and the auto tests are using an imperative logic.
1114
1115         * Target.pri:
1116         * UIProcess/API/qt/qquickwebview.cpp:
1117         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1118         (QQuickWebViewPrivate::loadDidSucceed):
1119         (QQuickWebViewPrivate::didChangeLoadingState):
1120         (QQuickWebViewPrivate::processDidCrash):
1121         (QQuickWebViewPrivate::didRelaunchProcess):
1122         * UIProcess/API/qt/qquickwebview_p.h:
1123         * UIProcess/API/qt/qquickwebview_p_p.h:
1124         (QQuickWebViewPrivate):
1125         * UIProcess/API/qt/qwebloadrequest.cpp: Added.
1126         (QWebLoadRequestPrivate):
1127         (QWebLoadRequestPrivate::QWebLoadRequestPrivate):
1128         (QWebLoadRequest::QWebLoadRequest):
1129         (QWebLoadRequest::~QWebLoadRequest):
1130         (QWebLoadRequest::url):
1131         (QWebLoadRequest::status):
1132         (QWebLoadRequest::errorString):
1133         (QWebLoadRequest::errorDomain):
1134         (QWebLoadRequest::errorCode):
1135         * UIProcess/API/qt/qwebloadrequest_p.h: Added.
1136         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
1137         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml:
1138         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
1139         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
1140         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
1141         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
1142         * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml:
1143         * UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:
1144         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml:
1145         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadHtml.qml:
1146         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgress.qml:
1147         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgressSignal.qml:
1148         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
1149         * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml:
1150         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
1151         * UIProcess/API/qt/tests/qmltests/WebView/tst_properties.qml:
1152         * UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml:
1153         * UIProcess/API/qt/tests/qmltests/common/TestWebView.qml: Added.
1154         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
1155         (tst_QQuickWebView::navigationStatusAtStartup):
1156         (LoadStartedCatcher::LoadStartedCatcher):
1157         (LoadStartedCatcher::onLoadingChanged):
1158         (tst_QQuickWebView::stopEnabledAfterLoadStarted):
1159         (tst_QQuickWebView::loadEmptyPageViewHidden):
1160         (tst_QQuickWebView::loadNonexistentFileUrl):
1161         (tst_QQuickWebView::backAndForward):
1162         (tst_QQuickWebView::reload):
1163         (tst_QQuickWebView::stop):
1164         (tst_QQuickWebView::loadProgress):
1165         (tst_QQuickWebView::showWebView):
1166         (tst_QQuickWebView::multipleWebViewWindows):
1167         (tst_QQuickWebView::multipleWebViews):
1168         (tst_QQuickWebView::scrollRequest):
1169         * UIProcess/API/qt/tests/util.cpp:
1170         (LoadSpy):
1171         (LoadSpy::LoadSpy):
1172         (LoadSpy::onLoadingChanged):
1173         (waitForLoadSucceeded):
1174         (waitForLoadFailed):
1175         * UIProcess/API/qt/tests/util.h:
1176         * UIProcess/qt/QtWebError.h:
1177         * UIProcess/qt/QtWebPageLoadClient.cpp:
1178         (QtWebPageLoadClient::didStartProvisionalLoadForFrame):
1179         (QtWebPageLoadClient::dispatchLoadFailed):
1180         * UIProcess/qt/QtWebPageLoadClient.h:
1181         (QtWebPageLoadClient):
1182
1183 2012-02-24  Simon Hausmann  <simon.hausmann@nokia.com>
1184
1185         Unreviewed, rolling out r108798.
1186         http://trac.webkit.org/changeset/108798
1187         https://bugs.webkit.org/show_bug.cgi?id=78047
1188
1189         Broke too many Qt WK2 tests.
1190
1191         * UIProcess/API/qt/qquickwebview.cpp:
1192         (QQuickWebView::keyPressEvent):
1193         (QQuickWebView::keyReleaseEvent):
1194         (QQuickWebView::inputMethodEvent):
1195         (QQuickWebView::focusInEvent):
1196         (QQuickWebView::focusOutEvent):
1197         (QQuickWebView::touchEvent):
1198         (QQuickWebView::mousePressEvent):
1199         (QQuickWebView::mouseMoveEvent):
1200         (QQuickWebView::mouseReleaseEvent):
1201         (QQuickWebView::mouseDoubleClickEvent):
1202         (QQuickWebView::wheelEvent):
1203         (QQuickWebView::hoverEnterEvent):
1204         (QQuickWebView::hoverMoveEvent):
1205         (QQuickWebView::hoverLeaveEvent):
1206         (QQuickWebView::dragMoveEvent):
1207         (QQuickWebView::dragEnterEvent):
1208         (QQuickWebView::dragLeaveEvent):
1209         (QQuickWebView::dropEvent):
1210         (QQuickWebView::event):
1211         * UIProcess/qt/QtWebPageEventHandler.cpp:
1212         (QtWebPageEventHandler::handleEvent):
1213         (QtWebPageEventHandler::handleMouseMoveEvent):
1214         (QtWebPageEventHandler::handleMousePressEvent):
1215         (QtWebPageEventHandler::handleMouseReleaseEvent):
1216         (QtWebPageEventHandler::handleWheelEvent):
1217         (QtWebPageEventHandler::handleHoverLeaveEvent):
1218         (QtWebPageEventHandler::handleHoverMoveEvent):
1219         (QtWebPageEventHandler::handleDragEnterEvent):
1220         (QtWebPageEventHandler::handleDragLeaveEvent):
1221         (QtWebPageEventHandler::handleDragMoveEvent):
1222         (QtWebPageEventHandler::handleDropEvent):
1223         (QtWebPageEventHandler::handleKeyPressEvent):
1224         (QtWebPageEventHandler::handleKeyReleaseEvent):
1225         (QtWebPageEventHandler::handleFocusInEvent):
1226         (QtWebPageEventHandler::handleFocusOutEvent):
1227         (QtWebPageEventHandler::inputMethodEvent):
1228         (QtWebPageEventHandler::touchEvent):
1229         * UIProcess/qt/QtWebPageEventHandler.h:
1230         (QtWebPageEventHandler):
1231
1232 2012-02-24  Simon Hausmann  <simon.hausmann@nokia.com>
1233
1234         [Qt][WK2] QQuickWebView::event should lookup faster which events QQuickWebPage can handle
1235         https://bugs.webkit.org/show_bug.cgi?id=78047
1236
1237         Reviewed by Kenneth Rohde Christiansen.
1238
1239         Replaced double-dispatch of events with direct forwarding of events from QQuickWebView::*Event to
1240         QtWebPageEventHandler::handle*Event.
1241
1242         * UIProcess/API/qt/qquickwebview.cpp:
1243         (QQuickWebView::keyPressEvent):
1244         (QQuickWebView::keyReleaseEvent):
1245         (QQuickWebView::inputMethodEvent):
1246         (QQuickWebView::focusInEvent):
1247         (QQuickWebView::focusOutEvent):
1248         (QQuickWebView::touchEvent):
1249         (QQuickWebView::mousePressEvent):
1250         (QQuickWebView::mouseMoveEvent):
1251         (QQuickWebView::mouseReleaseEvent):
1252         (QQuickWebView::mouseDoubleClickEvent):
1253         (QQuickWebView::wheelEvent):
1254         (QQuickWebView::hoverEnterEvent):
1255         (QQuickWebView::hoverMoveEvent):
1256         (QQuickWebView::hoverLeaveEvent):
1257         (QQuickWebView::dragMoveEvent):
1258         (QQuickWebView::dragEnterEvent):
1259         (QQuickWebView::dragLeaveEvent):
1260         (QQuickWebView::dropEvent):
1261         (QQuickWebView::event):
1262         * UIProcess/qt/QtWebPageEventHandler.cpp:
1263         (QtWebPageEventHandler::handleMouseMoveEvent):
1264         (QtWebPageEventHandler::handleMousePressEvent):
1265         (QtWebPageEventHandler::handleMouseReleaseEvent):
1266         (QtWebPageEventHandler::handleWheelEvent):
1267         (QtWebPageEventHandler::handleHoverLeaveEvent):
1268         (QtWebPageEventHandler::handleHoverMoveEvent):
1269         (QtWebPageEventHandler::handleDragEnterEvent):
1270         (QtWebPageEventHandler::handleDragLeaveEvent):
1271         (QtWebPageEventHandler::handleDragMoveEvent):
1272         (QtWebPageEventHandler::handleDropEvent):
1273         (QtWebPageEventHandler::handleKeyPressEvent):
1274         (QtWebPageEventHandler::handleKeyReleaseEvent):
1275         (QtWebPageEventHandler::handleFocusInEvent):
1276         (QtWebPageEventHandler::handleFocusOutEvent):
1277         (QtWebPageEventHandler::handleInputMethodEvent):
1278         (QtWebPageEventHandler::handleTouchEvent):
1279         * UIProcess/qt/QtWebPageEventHandler.h:
1280         (QtWebPageEventHandler):
1281
1282 2012-02-24  Simon Hausmann  <simon.hausmann@nokia.com>
1283
1284         [Qt] Use private QSGRenderNode in QQuickWebView for improved Qt Scene Graph integration
1285         https://bugs.webkit.org/show_bug.cgi?id=79022
1286
1287         Reviewed by Csaba Osztrogonác.
1288
1289         * Target.pri:
1290         * UIProcess/API/qt/qquickwebpage.cpp:
1291         (PageProxyNode::PageProxyNode):
1292         (PageProxyNode::changedStates):
1293         (PageProxyNode::render):
1294         (PageProxyNode):
1295
1296 2012-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1297
1298         [GTK] Encode/decode Null ResourceResponse objects in WebKit2
1299         https://bugs.webkit.org/show_bug.cgi?id=79471
1300
1301         Reviewed by Philippe Normand.
1302
1303         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
1304         (CoreIPC::::encode): Check whether ResourceResponse is Null before
1305         encoding it.
1306         (CoreIPC::::decode): Check whether response is Null and create a
1307         Null ResourceResponse object in such case.
1308
1309 2012-02-24  Shinya Kawanaka  <shinyak@chromium.org>
1310
1311         SpellCheckRequest needs to know the context where the spellcheck happened.
1312         https://bugs.webkit.org/show_bug.cgi?id=79320
1313
1314         Reviewed by Hajime Morita.
1315
1316         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1317         (WebKit::WebEditorClient::requestCheckingOfString):
1318         * WebProcess/WebCoreSupport/WebEditorClient.h:
1319
1320 2012-02-23  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1321
1322         [Qt] Tiling: Improve the method names dealing with moving and scaling.
1323
1324         Rubberstamped by Simon Hausmann.
1325
1326         * UIProcess/API/qt/qquickwebview.cpp:
1327         (QQuickWebViewLegacyPrivate::updateViewportSize):
1328         (QQuickWebViewFlickablePrivate::onComponentComplete):
1329         (QQuickWebViewFlickablePrivate::updateViewportSize):
1330         (QQuickWebViewFlickablePrivate::_q_commitScaleChange):
1331         (QQuickWebViewPrivate::_q_commitPositionChange):
1332         (QQuickWebViewFlickablePrivate::_q_resume):
1333         * UIProcess/API/qt/qquickwebview_p.h:
1334         * UIProcess/API/qt/qquickwebview_p_p.h:
1335         (QQuickWebViewPrivate):
1336         (QQuickWebViewPrivate::_q_commitScaleChange):
1337         (QQuickWebViewFlickablePrivate):
1338         * UIProcess/DrawingAreaProxy.h:
1339         (WebKit::DrawingAreaProxy::setVisibleContentsRectForScaling):
1340         (WebKit::DrawingAreaProxy::setVisibleContentsRectForPanning):
1341         * UIProcess/DrawingAreaProxyImpl.cpp:
1342         (WebKit::DrawingAreaProxyImpl::setVisibleContentsRectForScaling):
1343         (WebKit::DrawingAreaProxyImpl::setVisibleContentsRectForPanning):
1344         * UIProcess/DrawingAreaProxyImpl.h:
1345         (DrawingAreaProxyImpl):
1346         * UIProcess/LayerTreeHostProxy.h:
1347         (LayerTreeHostProxy):
1348         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
1349         (WebKit::LayerTreeHostProxy::setVisibleContentsRectForPanning):
1350         (WebKit::LayerTreeHostProxy::setVisibleContentsRectForScaling):
1351         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1352         (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
1353         (WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate):
1354         (WebKit::QtViewportInteractionEngine::wheelEvent):
1355         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
1356         * UIProcess/qt/QtViewportInteractionEngine.h:
1357         (QtViewportInteractionEngine):
1358         * WebProcess/WebPage/LayerTreeHost.h:
1359         (WebKit::LayerTreeHost::setVisibleContentsRectForScaling):
1360         (WebKit::LayerTreeHost::setVisibleContentsRectForPanning):
1361         (WebKit::LayerTreeHost::setVisibleContentsRectForLayer):
1362         * WebProcess/WebPage/LayerTreeHost.messages.in:
1363         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
1364         (WebKit::LayerTreeHostQt::setVisibleContentsRectForScaling):
1365         (WebKit::LayerTreeHostQt::setVisibleContentsRectForPanning):
1366         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
1367         (LayerTreeHostQt):
1368
1369 2012-02-24  Sergio Villar Senin  <svillar@igalia.com>
1370
1371         [WK2] [GTK] Destructor not invoked in EditorClientFrameDestructionObserver
1372         https://bugs.webkit.org/show_bug.cgi?id=79466
1373
1374         Reviewed by Philippe Normand.
1375
1376         Explicitly cast the observer before deleting it instead of just
1377         deleting a generic pointer. We must to that in order to get the
1378         destructor of the object properly called.
1379
1380         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1381         (WebKit::EditorClientFrameDestructionObserver::destroyOnClosureFinalization):
1382
1383 2012-02-23  Andy Estes  <aestes@apple.com>
1384
1385         Rename [setS|s]uppressIncrementalRendering to [setS|s]uppressesIncrementalRendering and make it WebPreferences API.
1386         https://bugs.webkit.org/show_bug.cgi?id=79433
1387
1388         Reviewed by Dan Bernstein.
1389
1390         * Shared/WebPreferencesStore.h:
1391         (WebKit):
1392         * UIProcess/API/C/WKPreferences.cpp:
1393         (WKPreferencesSetSuppressesIncrementalRendering):
1394         (WKPreferencesGetSuppressesIncrementalRendering):
1395         * UIProcess/API/C/WKPreferences.h:
1396         * UIProcess/WebInspectorProxy.cpp:
1397         (WebKit::createInspectorPageGroup):
1398         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1399         (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout):
1400         * WebProcess/WebPage/WebPage.cpp:
1401         (WebKit::WebPage::updatePreferences):
1402
1403 2012-02-23  Mario Sanchez Prada  <msanchez@igalia.com>
1404
1405         [GTK] Wrong signal name on emission in WebKitWindowProperties.cpp
1406         https://bugs.webkit.org/show_bug.cgi?id=79352
1407
1408         Reviewed by Philippe Normand.
1409
1410         Emit the signal 'resizable' instead of 'resizable-visible'.
1411
1412         * UIProcess/API/gtk/WebKitWindowProperties.cpp:
1413         (webkitWindowPropertiesSetResizable): Use right signal name.
1414
1415 2012-02-23  Anders Carlsson  <andersca@apple.com>
1416
1417         Flush layer changes after layout when resizing web page
1418         https://bugs.webkit.org/show_bug.cgi?id=79399
1419         <rdar://problem/10920157>
1420
1421         Reviewed by Andreas Kling.
1422
1423         Flush layer changes after layout, otherwise the scrollbars won't be updated
1424         until sometime later which looks bad.
1425
1426         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1427         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
1428
1429 2012-02-23  Daniel Bates  <dbates@webkit.org>
1430
1431         Add missing "Reviewed by" line to change log entry for changeset r108631
1432         (https://bugs.webkit.org/show_bug.cgi?id=79252)
1433
1434         The patch landed in changeset r108631 was reviewed by Martin Robinson.
1435
1436         * ChangeLog:
1437
1438 2012-02-23  Patrick Gansterer  <paroga@webkit.org>
1439
1440         [CMake] Add WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS macro
1441         https://bugs.webkit.org/show_bug.cgi?id=79371
1442
1443         Reviewed by Daniel Bates.
1444
1445         * CMakeLists.txt:
1446
1447 2012-02-23  Simon Hausmann  <simon.hausmann@nokia.com>
1448
1449         [Qt] Add support for touch cancellation
1450         https://bugs.webkit.org/show_bug.cgi?id=79348
1451
1452         Reviewed by Kenneth Rohde Christiansen.
1453
1454         Convert and forward incoming touch cancellation events
1455         to the web process.
1456
1457         * Shared/qt/WebEventFactoryQt.cpp:
1458         (WebKit::webEventTypeForEvent):
1459         (WebKit::WebEventFactory::createWebTouchEvent):
1460         * UIProcess/API/qt/qquickwebview.cpp:
1461         (QQuickWebView::event):
1462         * UIProcess/qt/QtWebPageEventHandler.cpp:
1463         (QtWebPageEventHandler::handleEvent):
1464
1465 2012-02-23  Brent Fulgham  <bfulgham@webkit.org>
1466
1467         [WinCairo] Build fix after r108428.
1468
1469         * win/WebKit2CFLite.def: Add missing export declaration.
1470
1471 2012-02-23  Simon Hausmann  <simon.hausmann@nokia.com>
1472
1473         Unreviewed test fix after r108614: Adjust public API after changes.
1474
1475         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
1476
1477 2012-02-23  Simon Hausmann  <simon.hausmann@nokia.com>
1478
1479         [Qt] Build fix. Qt WebKit2 can not be compiled due to QtWebPageEventHandler.
1480         https://bugs.webkit.org/show_bug.cgi?id=79335
1481
1482         Reviewed by Kenneth Rohde Christiansen.
1483
1484         In the upcoming Qt 5 builds the convenient setInputMethodHints method on QQuickItem
1485         will be removed. There's no need for us to use it, we can implement passing the hints
1486         to the input method right away in our re-implementation of inputMethodQuery, which works
1487         with old and newer Qt 5 builds.
1488
1489         * UIProcess/API/qt/qquickwebview.cpp:
1490         (QQuickWebView::inputMethodQuery):
1491         * UIProcess/qt/QtWebPageEventHandler.cpp:
1492         (QtWebPageEventHandler::updateTextInputState):
1493
1494 2012-02-23  Sergio Villar Senin  <svillar@igalia.com>
1495
1496         [WK2][GTK] WebProcess SIGSEVs due to incorrect clipboard handling
1497         https://bugs.webkit.org/show_bug.cgi?id=79252
1498
1499         Reviewed by Martin Robinson.
1500
1501         Do not execute clipboard callbacks after the Frame associated with
1502         it is destroyed.
1503
1504         This change is already covered by the TestWebViewEditor unit tests
1505         (among others), they hang (because WebProcess dies) without this
1506         patch in Debug builds.
1507
1508         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1509         (EditorClientFrameDestructionObserver):
1510         (WebKit::EditorClientFrameDestructionObserver::EditorClientFrameDestructionObserver):
1511         (WebKit::EditorClientFrameDestructionObserver::frameDestroyed):
1512         (WebKit::EditorClientFrameDestructionObserver::destroyOnClosureFinalization):
1513         (WebKit):
1514         (WebKit::WebEditorClient::setSelectionPrimaryClipboardIfNeeded):
1515
1516 2012-02-23  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1517
1518         [Qt] Page doesn't get repainted while panning is in progress
1519         https://bugs.webkit.org/show_bug.cgi?id=78602
1520
1521         Reviewed by Simon Hausmann.
1522
1523         The tiling code needed the current visibleContentsRect in order to be
1524         able to create tiles, so we now make sure it gets it. We also needed
1525         to make sure to set the trajectory vector while panning and while the
1526         flicking engine was animating kinetic scrolling.
1527
1528         * UIProcess/API/qt/qquickwebview.cpp:
1529         (QQuickWebViewFlickablePrivate::_q_updateVisibleContentRectAndScale):
1530         (QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged):
1531         * UIProcess/DrawingAreaProxy.h:
1532         (WebKit::DrawingAreaProxy::setVisibleContentRectTrajectoryVector):
1533         * UIProcess/DrawingAreaProxyImpl.cpp:
1534         (WebKit::DrawingAreaProxyImpl::setVisibleContentRectTrajectoryVector):
1535         * UIProcess/DrawingAreaProxyImpl.h:
1536         (DrawingAreaProxyImpl):
1537         * UIProcess/LayerTreeHostProxy.h:
1538         (LayerTreeHostProxy):
1539         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
1540         (WebKit::LayerTreeHostProxy::setVisibleContentRectTrajectoryVector):
1541         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1542         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
1543         (WebKit::QtViewportInteractionEngine::flickableMovingStateChanged):
1544         (WebKit):
1545         (WebKit::QtViewportInteractionEngine::panMoveStarted):
1546         (WebKit::QtViewportInteractionEngine::panMoveEnded):
1547         (WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate):
1548         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
1549         * UIProcess/qt/QtViewportInteractionEngine.h:
1550         (QtViewportInteractionEngine):
1551         * WebProcess/WebPage/LayerTreeHost.h:
1552         (WebKit::LayerTreeHost::setVisibleContentRectTrajectoryVector):
1553         * WebProcess/WebPage/LayerTreeHost.messages.in:
1554         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
1555         (WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
1556         (WebKit::LayerTreeHostQt::setVisibleContentRectTrajectoryVector):
1557         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
1558         (LayerTreeHostQt):
1559
1560 2012-02-23  Patrick Gansterer  <paroga@webkit.org>
1561
1562         [CMAKE][WK2] Cleanup WebKit2/CMakeLists.txt.
1563         https://bugs.webkit.org/show_bug.cgi?id=76122
1564
1565         Reviewed by Eric Seidel.
1566
1567         * CMakeLists.txt: Removed hardcoded WTF_USE_JSC preprocessor definition.
1568
1569 2012-02-23  Simon Hausmann  <simon.hausmann@nokia.com>
1570
1571         [WK2] Trivial build fix after r108615.
1572
1573         * WebProcess/WebPage/WebPage.cpp:
1574         (WebKit::WebPage::WebPage):
1575
1576 2012-02-22  Michael Tyutyunik  <michael.tyutyunik@nokia.com>
1577
1578         [Qt][WK2] navigationType is missing in new API
1579         https://bugs.webkit.org/show_bug.cgi?id=78867
1580
1581         Reviewed by Simon Hausmann.
1582
1583         In QtWebPagePolicyClient::decidePolicyForNavigationAction()
1584         navigationType argument is dropped by mistake. Adding it back
1585         and make it available through NavigationRequest.
1586
1587         * UIProcess/API/qt/qquickwebview_p.h:
1588         * UIProcess/API/qt/qwebnavigationrequest.cpp:
1589         (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
1590         (QWebNavigationRequestPrivate):
1591         (QWebNavigationRequest::QWebNavigationRequest):
1592         (QWebNavigationRequest::navigationType):
1593         * UIProcess/API/qt/qwebnavigationrequest_p.h:
1594         * UIProcess/qt/QtWebPagePolicyClient.cpp:
1595         (QtWebPagePolicyClient::decidePolicyForNavigationAction):
1596         (toQuickWebViewNavigationType):
1597         * UIProcess/qt/QtWebPagePolicyClient.h:
1598         (QtWebPagePolicyClient):
1599
1600 2012-02-22  Anders Carlsson  <andersca@apple.com>
1601
1602         Implement TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange
1603         https://bugs.webkit.org/show_bug.cgi?id=79297
1604         <rdar://problem/10748510>
1605
1606         Reviewed by Beth Dakin.
1607
1608         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1609         (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
1610         Send a message to the web process.
1611
1612         * WebProcess/WebPage/DrawingArea.h:
1613         (WebKit::DrawingArea::setDeviceScaleFactor):
1614         Add empty stub.
1615
1616         * WebProcess/WebPage/DrawingArea.messages.in:
1617         Add SetDeviceScaleFactor message.
1618
1619         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1620         (WebKit::TiledCoreAnimationDrawingArea::setDeviceScaleFactor):
1621         Call WebPage::setDeviceScaleFactor.
1622
1623 2012-02-22  Brady Eidson  <beidson@apple.com>
1624
1625         <rdar://problem/10406044> and https://bugs.webkit.org/show_bug.cgi?id=79279
1626         Synchronous ShouldGoToBackForwardListItem causes lots of WebProcess hangs
1627
1628         Reviewed by Anders Carlsson.
1629
1630         Anytime the WebProcess sends a sync message up to the UI Process a hang can ensue.
1631         
1632         In the case of shouldGoToBackForwardListItem it seems many clients want a back/forward
1633         notification but don't actually want to make a policy decision.
1634
1635         Making it an asynchronous notification instead of a synchronous policy call will remove the
1636         possibility of a hang here.
1637
1638         If clients later decide it is important to have a policy here we should implement a form of
1639         shouldGoToBackForwardListItem in the bundle loader client.
1640
1641         Add a notification "willGoToBackForwardListItem" to the WKPageLoaderClient:
1642         * UIProcess/API/C/WKPage.h:
1643
1644         * UIProcess/WebPageProxy.cpp:
1645         (WebKit::WebPageProxy::initializeLoaderClient): Tell the WebProcess whether it should be
1646           sending the shouldGoToBackForwardListItem or willGoToBackForwardListItem form of this message.
1647         (WebKit::WebPageProxy::shouldGoToBackForwardListItem): 
1648         (WebKit::WebPageProxy::willGoToBackForwardListItem):
1649         * UIProcess/WebPageProxy.h:
1650         * UIProcess/WebPageProxy.messages.in: Add an asynchronous WillGoToBackForwardListItem message
1651
1652         Store a flag in the WebProcess - Sent from the UIProcess - to tell the FrameLoaderClient which form 
1653         of the callback should be used:
1654         * WebProcess/WebPage/WebPage.cpp:
1655         (WebKit::WebPage::WebPage):
1656         * WebProcess/WebPage/WebPage.h:
1657         (WebKit::WebPage::willGoToBackForwardItemCallbackEnabled):
1658         (WebKit::WebPage::setWillGoToBackForwardItemCallbackEnabled):
1659         * WebProcess/WebPage/WebPage.messages.in:
1660
1661         * UIProcess/WebLoaderClient.cpp:
1662         (WebKit::WebLoaderClient::shouldGoToBackForwardListItem): Only consider calling this for
1663           version 0 clients.
1664         (WebKit::WebLoaderClient::willGoToBackForwardListItem): Later clients get this callback.
1665         * UIProcess/WebLoaderClient.h:
1666         (WebLoaderClient):
1667         
1668         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1669         (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem): Send either the synchronous "should" message
1670           or the asynchronous "will" message depending on which the WebProcess was last told that the
1671           UIProcess expects. There is an edge case where the wrong one might be sent because the WebProcess
1672           hasn't received the message about a change in the WKPageLoaderClient yet but that's probably okay;
1673           It seems unlikely that a UIProcess client would ever rapidly change between v0 and other versions
1674           of the loader client and the UIProcess of WebKit2 is equipped to handle that case if it comes up.
1675
1676 2012-02-16  Jon Lee  <jonlee@apple.com>
1677
1678         [WK2] Clearing notifications does not clean up internal state
1679         https://bugs.webkit.org/show_bug.cgi?id=78861
1680         <rdar://problem/10881167>
1681
1682         Reviewed by Anders Carlsson.
1683
1684         * WebProcess/Notifications/WebNotificationManager.cpp:
1685         (WebKit::WebNotificationManager::clearNotifications): This function was missing removing the notification
1686         entries from the other maps.
1687         (WebKit::WebNotificationManager::didDestroyNotification): When the notification is destroyed, it should
1688         also be removed from the context map.
1689         (WebKit::WebNotificationManager::didCloseNotifications): Refactor to pull out the code that removes
1690         a provided notification from the context map.
1691         (WebKit::WebNotificationManager::removeNotificationFromContextMap): Find the notification in the map, and
1692         remove it. If the map is empty, get rid of the entry.
1693         * WebProcess/Notifications/WebNotificationManager.h:
1694         (WebNotificationManager):
1695
1696 2012-02-22  Jon Lee  <jonlee@apple.com>
1697
1698         Code cleanup in WebNotificationManager (79285)
1699         https://bugs.webkit.org/show_bug.cgi?id=79285
1700         <rdar://problem/10914522>
1701
1702         Reviewed by Anders Carlsson.
1703
1704         * WebProcess/Notifications/WebNotificationManager.cpp:
1705         (WebKit::WebNotificationManager::show): Simplify adding a blank vector to the map using .add(),
1706         similar to what is found in WebNotificationClient.mm in WebKit 1.
1707
1708 2012-02-21  Ryosuke Niwa  <rniwa@webkit.org>
1709
1710         Remove the remaining uses of CSSStyleDeclaration in Editor
1711         https://bugs.webkit.org/show_bug.cgi?id=78939
1712
1713         Reviewed by Enrica Casucci.
1714
1715         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1716         (WebKit::WebEditorClient::shouldApplyStyle):
1717         * WebProcess/WebCoreSupport/WebEditorClient.h:
1718         (WebEditorClient):
1719
1720 2012-02-22  Martin Robinson  <mrobinson@igalia.com>
1721
1722         [GTK] Clean build is broken when using make -j
1723         https://bugs.webkit.org/show_bug.cgi?id=76388
1724
1725         * GNUmakefile.am: Add some WebKit2 sources to global sources lists
1726         so that we can refer to them in separate GNUmakefiles.
1727
1728 2012-02-22  Antaryami Pandia  <antaryami.pandia@motorola.com>
1729
1730         [GTK][WK2] Add WebGL WebSetting.
1731         https://bugs.webkit.org/show_bug.cgi?id=79217
1732
1733         Reviewed by Martin Robinson.
1734
1735         Add a WebSetting to enable/disable Webgl.
1736
1737         * UIProcess/API/gtk/WebKitSettings.cpp:
1738         (webKitSettingsSetProperty):
1739         (webKitSettingsGetProperty):
1740         (webkit_settings_class_init):
1741         (webkit_settings_set_enable_webaudio):
1742         (webkit_settings_get_enable_webgl):
1743         (webkit_settings_set_enable_webgl):
1744         * UIProcess/API/gtk/WebKitSettings.h:
1745         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1746         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
1747         (testWebKitSettings):
1748
1749 2012-02-22  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1750
1751         [Qt] Disregard previous backing store as soon as possible
1752         https://bugs.webkit.org/show_bug.cgi?id=79232
1753
1754         Reviewed by Simon Hausmann and No'am Rosenthal.
1755
1756         Between creating the new backing store and painting the content,
1757         we do not want to drop the previous one as that might result in
1758         briefly seeing flickering as the old tiles may be dropped before
1759         something replaces them.
1760
1761         But we do need to drop it at some point and we need to make sure
1762         to not spike the memory usage before of this.
1763
1764         What we now do, is to store the previous backing store as before,
1765         but drop all tiles which are not visible and then drop it as soon
1766         as the visible rect (which might change due if followed by a quick
1767         panning) has been fully covered by tiles.
1768
1769         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
1770         (WebCore::WebGraphicsLayer::setContentsScale):
1771         (WebCore::WebGraphicsLayer::updateContentBuffers):
1772
1773 2012-02-22  Michael Brüning  <michael.bruning@nokia.com>
1774
1775         [Qt][WK2] Implement proxy authentication handling.
1776         https://bugs.webkit.org/show_bug.cgi?id=78792
1777
1778         Reviewed by Simon Hausmann.
1779
1780         This patch corrects two bugs with the previous implementation:
1781         1. The signal proxyAuthenticationRequired was not connected to a
1782            slot.
1783         2. The slot onProxyAuthenticationRequired had the wrong parameters. 
1784
1785         * WebProcess/qt/QtNetworkAccessManager.cpp:
1786         (WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
1787         (WebKit::QtNetworkAccessManager::onProxyAuthenticationRequired):
1788         * WebProcess/qt/QtNetworkAccessManager.h: Added include.
1789         (QtNetworkAccessManager):
1790
1791 2012-02-22  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1792
1793         Merge setVisibleRectTrajectoryVector and adjustVisibleRect to
1794         the more descriptive coverWithTilesIfNeeded
1795         https://bugs.webkit.org/show_bug.cgi?id=79230
1796
1797         Reviewed by Simon Hausmann.
1798
1799         Replace use by coverWithTilesIfNeeded().
1800
1801         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
1802         (WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector):
1803         (WebCore::WebGraphicsLayer::adjustVisibleRect):
1804         (WebCore::WebGraphicsLayer::computeTransformedVisibleRect):
1805
1806 2012-02-22  Zalan Bujtas  <zbujtas@gmail.com>
1807
1808         [Qt][WK2] Add frame flattening setting to QWebPreferences.
1809         https://bugs.webkit.org/show_bug.cgi?id=79099
1810
1811         Reviewed by Simon Hausmann.
1812
1813         Frame flattening is enabled by default for Qt WebKit2.
1814
1815         * UIProcess/API/qt/qquickwebview.cpp:
1816         (QQuickWebViewPrivate::initialize):
1817         * UIProcess/API/qt/qwebpreferences.cpp:
1818         (QWebPreferencesPrivate::testAttribute):
1819         (QWebPreferencesPrivate::setAttribute):
1820         (QWebPreferences::setNavigatorQtObjectEnabled):
1821         (QWebPreferences::frameFlatteningEnabled):
1822         (QWebPreferences::setFrameFlatteningEnabled):
1823         * UIProcess/API/qt/qwebpreferences_p.h:
1824
1825 2012-02-22  Ryosuke Niwa  <rniwa@webkit.org>
1826
1827         Remove the remaining uses of CSSStyleDeclaration in Editor
1828         https://bugs.webkit.org/show_bug.cgi?id=78939
1829
1830         Reviewed by Enrica Casucci.
1831
1832         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1833         (WebKit::WebEditorClient::shouldApplyStyle):
1834         * WebProcess/WebCoreSupport/WebEditorClient.h:
1835         (WebEditorClient):
1836
1837 2012-02-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1838
1839         [GTK] Null ResourceErrors are encoded/decoded as empty ResourceErrors
1840         https://bugs.webkit.org/show_bug.cgi?id=79120
1841
1842         Reviewed by Martin Robinson.
1843
1844         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
1845         (CoreIPC::::encode): Encode a boolean to indicate whether it's a
1846         Null error.
1847         (CoreIPC::::decode): Check whether the error is Null and do not
1848         continue decoding in such case.
1849
1850 2012-02-21  No'am Rosenthal  <noam.rosenthal@nokia.com>
1851
1852         [Qt][WK2] Draw tiles of previous contents-scale for opaque layers if they don't intersect with previous tiles
1853         https://bugs.webkit.org/show_bug.cgi?id=78962
1854
1855         Only avoid painting old-scale tiles in semi-transparent situtations if the old
1856         tiles intersect with existing tiles.
1857
1858         Reviewed by Kenneth Rohde Christiansen.
1859
1860         * UIProcess/qt/LayerBackingStore.cpp:
1861         (WebKit::LayerBackingStore::paintToTextureMapper):
1862
1863 2012-02-21  No'am Rosenthal  <noam.rosenthal@nokia.com>
1864
1865         [Qt] Previous web page appears outside content rect
1866         https://bugs.webkit.org/show_bug.cgi?id=78816
1867
1868         Apply a clip on painted tiles if some of the tiles fall outside of the target rect.
1869
1870         Reviewed by Kenneth Rohde Christiansen.
1871
1872         * UIProcess/qt/LayerBackingStore.cpp:
1873         (WebKit::LayerBackingStore::paintToTextureMapper):
1874
1875 2012-02-21  No'am Rosenthal  <noam.rosenthal@nokia.com>
1876
1877         [Qt][WK2] Accelerated animations don't work on Mac
1878         https://bugs.webkit.org/show_bug.cgi?id=78963
1879
1880         Problem came from using a non-RunLoop timer.
1881         Remove the unused viewportUpdateTimer, and use the existing animationTimer instead.
1882         Use a continuous timer that we only stop when animations stop.
1883
1884         Reviewed by Kenneth Rohde Christiansen.
1885
1886         * UIProcess/LayerTreeHostProxy.h:
1887         (LayerTreeHostProxy):
1888         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
1889         (WebKit::LayerTreeHostProxy::LayerTreeHostProxy):
1890         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
1891         (WebKit):
1892         (WebKit::LayerTreeHostProxy::syncAnimations):
1893
1894 2012-02-21  Sam Weinig  <sam@webkit.org>
1895
1896         Attempt to fix the Snow Leopard build.
1897
1898         * Configurations/Base.xcconfig:
1899
1900 2012-02-21  Sam Weinig  <sam@webkit.org>
1901
1902         Use libc++ when building with Clang on Mac
1903         https://bugs.webkit.org/show_bug.cgi?id=78981
1904
1905         Reviewed by Dan Bernstein.
1906
1907         * Configurations/Base.xcconfig:
1908
1909 2012-02-21  Andras Becsi  <andras.becsi@nokia.com>
1910
1911         [Qt][WK2] Get rid of the dependency to QtWidgets
1912         https://bugs.webkit.org/show_bug.cgi?id=76276
1913
1914         Reviewed by Simon Hausmann.
1915
1916         * Target.pri:
1917         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
1918         (main):
1919         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
1920         * UIProcess/API/qt/tests/tests.pri:
1921         * UIProcess/API/qt/tests/util.h:
1922
1923 2012-02-20  Martin Robinson  <mrobinson@igalia.com>
1924
1925         [UNIX] Plugin information fields are not interpreted as UTF-8
1926         https://bugs.webkit.org/show_bug.cgi?id=78635
1927
1928         Reviewed by Gustavo Noronha Silva.
1929
1930         Interpret plugin metadata as UTF8 aways. This matches the behavior
1931         of Chromium and the Totem plugin.
1932
1933         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
1934         (WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin): Use String::fromUTF8.
1935
1936 2012-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1937
1938         [GTK] Adding SOUP_TYPE_PROXY_RESOLVER_DEFAULT feature to soup session makes WebProcess to hang
1939         https://bugs.webkit.org/show_bug.cgi?id=79036
1940
1941         Reviewed by Martin Robinson.
1942
1943         This looks like a bug in gobject. Initializing the WebProcess
1944         before creating the soup session seems to fix the problem. It's
1945         actually a workaround, but initializing the WebProcess as sson as
1946         possible it's a good idea in any case.
1947
1948         * WebProcess/gtk/WebProcessMainGtk.cpp:
1949         (WebKit::WebProcessMainGtk):
1950
1951 2012-02-20  Michael Brüning  <michael.bruning@nokia.com>
1952
1953         [Qt][WK2] Implement proxy authentication handling.
1954         https://bugs.webkit.org/show_bug.cgi?id=78792
1955
1956         Reviewed by Simon Hausmann.
1957
1958         This patch implements the proxy authentication handling
1959         for the Qt port in a similar matter to the http authentication
1960         implementation.
1961
1962         Since there is a need to pass the proxy port, which is of type uint16_t,
1963         from the WebProcess to the UIProcess, an encoder and a decoder for
1964         this type was added because it did not exist.
1965         
1966         The message that was added to the WebPageProxy is called synchronously
1967         as this is needed by the implementation of the network access manager
1968         and has also been implemented this way already for the http 
1969         authentication.
1970
1971         * Platform/CoreIPC/ArgumentDecoder.cpp:
1972         (CoreIPC::ArgumentDecoder::decodeUInt16):
1973         (CoreIPC):
1974         * Platform/CoreIPC/ArgumentDecoder.h:
1975         (ArgumentDecoder):
1976         (CoreIPC::ArgumentDecoder::decode):
1977         (CoreIPC):
1978         * Platform/CoreIPC/ArgumentEncoder.cpp:
1979         (CoreIPC::ArgumentEncoder::encodeUInt16):
1980         (CoreIPC):
1981         * Platform/CoreIPC/ArgumentEncoder.h:
1982         (ArgumentEncoder):
1983         (CoreIPC::ArgumentEncoder::encode):
1984         (CoreIPC):
1985         * UIProcess/API/qt/qquickwebview.cpp:
1986         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1987         (QQuickWebViewPrivate::handleProxyAuthenticationRequiredRequest):
1988         (QQuickWebViewExperimental::proxyAuthenticationDialog):
1989         (QQuickWebViewExperimental::setProxyAuthenticationDialog):
1990         * UIProcess/API/qt/qquickwebview_p.h:
1991         * UIProcess/API/qt/qquickwebview_p_p.h:
1992         (QQuickWebViewPrivate):
1993         * UIProcess/PageClient.h:
1994         (PageClient):
1995         * UIProcess/WebPageProxy.cpp:
1996         (WebKit::WebPageProxy::proxyAuthenticationRequiredRequest):
1997         (WebKit):
1998         * UIProcess/WebPageProxy.h:
1999         (WebPageProxy):
2000         * UIProcess/WebPageProxy.messages.in:
2001         * UIProcess/qt/QtDialogRunner.cpp:
2002         (ProxyAuthenticationDialogContextObject):
2003         (ProxyAuthenticationDialogContextObject::ProxyAuthenticationDialogContextObject):
2004         (ProxyAuthenticationDialogContextObject::hostname):
2005         (ProxyAuthenticationDialogContextObject::port):
2006         (ProxyAuthenticationDialogContextObject::prefilledUsername):
2007         (ProxyAuthenticationDialogContextObject::accept):
2008         (ProxyAuthenticationDialogContextObject::reject):
2009         (QtDialogRunner::initForProxyAuthentication):
2010         * UIProcess/qt/QtDialogRunner.h:
2011         (QtDialogRunner):
2012         * UIProcess/qt/QtPageClient.cpp:
2013         (QtPageClient::handleProxyAuthenticationRequiredRequest):
2014         * UIProcess/qt/QtPageClient.h:
2015         (QtPageClient):
2016         * WebProcess/WebPage/DecoderAdapter.cpp:
2017         (WebKit::DecoderAdapter::decodeUInt16):
2018         (WebKit):
2019         * WebProcess/WebPage/DecoderAdapter.h:
2020         (DecoderAdapter):
2021         * WebProcess/WebPage/EncoderAdapter.cpp:
2022         (WebKit::EncoderAdapter::encodeUInt16):
2023         (WebKit):
2024         * WebProcess/WebPage/EncoderAdapter.h:
2025         (EncoderAdapter):
2026         * WebProcess/qt/QtNetworkAccessManager.cpp:
2027         (WebKit::QtNetworkAccessManager::onProxyAuthenticationRequired):
2028         (WebKit):
2029         * WebProcess/qt/QtNetworkAccessManager.h:
2030         (QtNetworkAccessManager):
2031
2032 2012-02-20  Patrick Gansterer  <paroga@webkit.org>
2033
2034         [CMake] Update and sort list of source files.
2035
2036         * CMakeLists.txt:
2037
2038 2012-02-20  Martin Robinson  <mrobinson@igalia.com>
2039
2040         Fix WebKit2GTK+ for 'make distcheck'.
2041
2042         Instead of conditionally including WebKit2 GNUmakefiles, always
2043         include them and conditionally activate the final targets.
2044
2045         * GNUmakefile.am:
2046         * UIProcess/API/gtk/tests/GNUmakefile.am:
2047
2048 2012-02-20  Martin Robinson  <mrobinson@igalia.com>
2049
2050         [GTK][WK2] WebKit2 does not build if gtk-unix-printing-3.0 is not available
2051         https://bugs.webkit.org/show_bug.cgi?id=79011
2052
2053         Fix the build when gtk-unix-printing-3.0 is not present.
2054
2055         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2056         (webkitPrintOperationRunDialog):
2057         (webkitPrintOperationRunDialogForFrame):
2058         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2059         (WebKit::WebPrintOperationGtk::create):
2060
2061 2012-02-18  Dan Bernstein  <mitz@apple.com>
2062
2063         <rdar://problem/10891801> BackingStore::scroll() unnecessarily copies pixels around
2064         https://bugs.webkit.org/show_bug.cgi?id=78976
2065
2066         Reviewed by Anders Carlsson.
2067
2068         Rather than move pixels in the backing store in response to scrolling, we can maintain a
2069         mapping, for the most recently scrolled rect, from backing store coordinates to view
2070         client coordinates.
2071
2072         * UIProcess/BackingStore.h:
2073         * UIProcess/mac/BackingStoreMac.mm:
2074         (WebKit::BackingStore::performWithScrolledRectTransform): Added. Given a block to be
2075         performed on a rect, divides the rect into parts such that for each part the mapping from
2076         backing store coordinates to client coordinates is a (uniform) translation, and performs
2077         the block on that part, passing it the translation that applies to the part.
2078         (WebKit::BackingStore::resetScrolledRect): Added. Copies everything in the scrolled rect
2079         back to where it should be under the identity map, and resets the scrolled rect and offset.
2080         (WebKit::BackingStore::paint): Changed to call through performWithScrolledRectTransform().
2081         (WebKit::BackingStore::incorporateUpdate): Ditto.
2082         (WebKit::BackingStore::scroll): Now instead of copying pixels, just updates the scrolled
2083         rect and offset.
2084
2085 2012-02-17  No'am Rosenthal  <noam.rosenthal@nokia.com>
2086
2087         [Qt][WK2] Allow opaque tiles
2088         https://bugs.webkit.org/show_bug.cgi?id=78809
2089
2090         Apply the SupportsAlpha flag only when the buffers actually have alpha.
2091
2092         Reviewed by Kenneth Rohde Christiansen.
2093
2094         * Shared/ShareableBitmap.h:
2095         (ShareableBitmap):
2096         * Shared/qt/ShareableBitmapQt.cpp:
2097         * UIProcess/qt/LayerBackingStore.cpp:
2098         (WebKit::LayerBackingStoreTile::swapBuffers):
2099
2100 2012-02-17  Adam Roben  <aroben@apple.com>
2101
2102         Clang build fix after r108119
2103
2104         * WebProcess/WebProcess.cpp:
2105         (WebKit::randomCrashThread): Annotate this function with NO_RETURN_DUE_TO_CRASH.
2106
2107 2012-02-17  Kalev Lember  <kalevlember@gmail.com>
2108
2109         Remove unused parameters from WTF threading API
2110         https://bugs.webkit.org/show_bug.cgi?id=78389
2111
2112         Reviewed by Adam Roben.
2113
2114         waitForThreadCompletion() had an out param 'void **result' to get the
2115         'void *' returned by ThreadFunction. However, the implementation in
2116         ThreadingWin.cpp ignored the out param, not filling it in. This had
2117         led to a situation where none of the client code made use of the param
2118         and just ignored it.
2119
2120         To clean this up, the patch changes the signature of ThreadFunction to
2121         return void instead of void* and drops the the unused 'void **result'
2122         parameter from waitForThreadCompletion. Also, all client code is
2123         updated for the API change.
2124
2125         As mentioned in https://bugs.webkit.org/show_bug.cgi?id=78389 , even
2126         though the change only affects internal API, Safari is using it
2127         directly and we'll need to keep the old versions around for ABI
2128         compatibility. For this, the patch adds compatibility wrappers with
2129         the old ABI.
2130
2131         * Platform/WorkQueue.h:
2132         (WorkQueue):
2133         * Platform/gtk/WorkQueueGtk.cpp:
2134         (WorkQueue::startWorkQueueThread):
2135         * UIProcess/Launcher/mac/ThreadLauncherMac.mm:
2136         (WebKit::webThreadBody):
2137         * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
2138         (WebKit::webThreadBody):
2139         * UIProcess/Launcher/win/ThreadLauncherWin.cpp:
2140         (WebKit::webThreadBody):
2141         * WebProcess/WebProcess.cpp:
2142         (WebKit::randomCrashThread):
2143         * win/WebKit2.def:
2144         * win/WebKit2CFLite.def:
2145
2146 2012-02-17  Mihnea Ovidenie  <mihnea@adobe.com>
2147
2148         CSS regions enabled by default
2149         https://bugs.webkit.org/show_bug.cgi?id=78525
2150
2151         Reviewed by David Hyatt.
2152
2153         Add a runtime preference to enable/disable regions functionality at runtime(WebKitCSSRegionsEnabled).
2154         CSSRegions are still enabled by default.
2155         In DRT, use layoutTestController.overridePreference("WebKitCSSRegionsEnabled", "0") to disable the css regions functionality.
2156
2157         * Shared/WebPreferencesStore.h:
2158         (WebKit):
2159         * UIProcess/API/C/WKPreferences.cpp:
2160         (WKPreferencesSetCSSRegionsEnabled):
2161         (WKPreferencesGetCSSRegionsEnabled):
2162         * UIProcess/API/C/WKPreferencesPrivate.h:
2163         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2164         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2165         * WebProcess/WebPage/WebPage.cpp:
2166         (WebKit::WebPage::updatePreferences):
2167
2168 2012-02-17  Enrica Casucci  <enrica@apple.com>
2169
2170         Refactor DragData class to use PlatformStrategies in the Mac implementation.
2171         https://bugs.webkit.org/show_bug.cgi?id=78768
2172
2173         Reviewed by Darin Adler.
2174
2175         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added color() method.
2176         (WebKit::WebPlatformStrategies::color):
2177         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2178
2179 2012-02-17  Martin Robinson  <mrobinson@igalia.com>
2180
2181         Fix some warnings encountered during the GTK+ build
2182         https://bugs.webkit.org/show_bug.cgi?id=78911
2183
2184         Reviewed by Xan Lopez.
2185
2186         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
2187         (attachLoaderClientToView): Initialize a new member of the loader client struct.
2188
2189 2012-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2190
2191         [GTK] Allow printing scaled pages in WebKit2 for printers that don't support it
2192         https://bugs.webkit.org/show_bug.cgi?id=78823
2193
2194         Reviewed by Gustavo Noronha Silva.
2195
2196         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2197         (webkitPrintOperationRunDialogUnix): Enable scale option in print
2198         dialog.
2199         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2200         (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize
2201         manual scale to 1.
2202         (WebKit::WebPrintOperationGtk::rotatePageIfNeeded): Renamed and
2203         moved the needs rotate check here as an early return.
2204         (WebKit::WebPrintOperationGtk::prepareContextToDraw): Scale the
2205         page according to the manual scale factor.
2206         (WebKit::WebPrintOperationGtk::renderPage): Move rotatePage to
2207         prepareContextToDraw.
2208         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
2209
2210 2012-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2211
2212         [GTK] Allow printing multiple copies in WebKit2 for printers that don't support it
2213         https://bugs.webkit.org/show_bug.cgi?id=78805
2214
2215         Reviewed by Gustavo Noronha Silva.
2216
2217         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2218         (webkitPrintOperationRunDialogUnix): Enable multiple copies and
2219         collate options in print dialog.
2220         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2221         (WebKit::PrintPagesData::PrintPagesData): Initialize number of
2222         collated and uncolated copies done and total.
2223         (WebKit::PrintPagesData::collatedCopiesLeft): Helper function that
2224         returns the number of collated copies left to do.
2225         (WebKit::PrintPagesData::uncollatedCopiesLeft): Helper function
2226         that returns the number of uncollated copies left to do.
2227         (WebKit::PrintPagesData::copiesLeft): Helper function
2228         that returns the number of collated or uncollated copies left to
2229         do.
2230         (WebKit::PrintPagesData::incrementPageSequence): Do not finish the
2231         print if there are uncollated copies left, and do not increment
2232         sheet number if there are collated copies left.
2233         (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize
2234         m_manualCopies to 1 and m_manualCollateCopies to false.
2235         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
2236
2237 2012-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2238
2239         [GTK] Allow printing pages in reverse order in WebKit2 for printers that don't support it
2240         https://bugs.webkit.org/show_bug.cgi?id=78799
2241
2242         Reviewed by Gustavo Noronha Silva.
2243
2244         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2245         (webkitPrintOperationRunDialogUnix): Enable printing in reverse
2246         order option in print dialog.
2247         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2248         (WebKit::PrintPagesData::PrintPagesData): Initialize sheetNumber
2249         and lastPagePosition depending on whether printing is in reverse
2250         order or not.
2251         (WebKit::PrintPagesData::incrementPageSequence): Use a negative
2252         increment step when printing in reverse order. Fix page
2253         incrementing when printing only odd/even pages broken in previous
2254         commit due to merge conflicts.
2255         (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize
2256         reverse printing to false.
2257         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
2258
2259 2012-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2260
2261         [GTK] Allow printing only odd/even pages in WebKit2 for printers that don't support it
2262         https://bugs.webkit.org/show_bug.cgi?id=78793
2263
2264         Reviewed by Gustavo Noronha Silva.
2265
2266         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2267         (webkitPrintOperationRunDialogUnix): Enable print odd/even pages
2268         option in print dialog.
2269         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
2270         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2271         (WebKit::PrintPagesData::PrintPagesData): Add lastPagePosition and
2272         initialize it depending on the page set.
2273         (WebKit::PrintPagesData::incrementPageSequence): Use 2 step
2274         increment when printing only odd/even pages.
2275         (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize
2276         m_manualPageSet to GTK_PAGE_SET_ALL.
2277
2278 2012-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2279
2280         [GTK] Allow printing multiple pages per sheet in WebKit2 for printers that don't support it
2281         https://bugs.webkit.org/show_bug.cgi?id=78715
2282
2283         Reviewed by Gustavo Noronha Silva.
2284
2285         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2286         (webkitPrintOperationRunDialogUnix): Enable multiple pages per
2287         sheet options in print dialog.
2288         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2289         (WebKit::PrintPagesData::PrintPagesData): Initialize sheetNumber
2290         and numberOfSheets. Move pagePosition to WebPrintOperationGtk.
2291         (WebKit::PrintPagesData::incrementPageSequence): Increment current
2292         sheet and page position.
2293         (WebKit::WebPrintOperationGtk::WebPrintOperationGtk):
2294         (WebKit::WebPrintOperationGtk::currentPageIsFirstPageOfSheet):
2295         Helper function to check whether current pages is the first one of
2296         the current sheet.
2297         (WebKit::WebPrintOperationGtk::currentPageIsLastPageOfSheet):
2298         Helper function to check whether current pages is the last one of
2299         the current sheet.
2300         (WebKit::WebPrintOperationGtk::getRowsAndColumnsOfPagesPerSheet):
2301         Returns the number of rows and columns of pages per sheet.
2302         (WebKit::WebPrintOperationGtk::getPositionOfPageInSheet): Returns
2303         the row and column number of the current page in the current sheet.
2304         (WebKit::WebPrintOperationGtk::prepareContextToDraw): Translate,
2305         scale and rotate accordingly to render every page in the right
2306         place of the sheet.
2307         (WebKit::WebPrintOperationGtk::renderPage): Call
2308         prepareContextToDraw() before drawing the page.
2309         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
2310         (WebKit::WebPrintOperationGtk::setNumberOfPagesToPrint):
2311         (WebKit::WebPrintOperationGtk::pagePosition):
2312         (WebKit::WebPrintOperationGtk::setPagePosition):
2313         (WebKit::WebPrintOperationGtk::numberUp):
2314         (WebKit::WebPrintOperationGtk::numberUpLayout):
2315
2316 2012-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2317
2318         [GTK] Rename WebKitPrintOperation::done signal to ::finished in WebKit2
2319         https://bugs.webkit.org/show_bug.cgi?id=78893
2320
2321         Reviewed by Gustavo Noronha Silva.
2322
2323         And it's not emitted anynmore when the print dialog has been
2324         cancelled. Since it's not possible to know whether the print
2325         dialog was cancelled or not, the enum WebKitPrintOperationResponse
2326         has been added, with Print and Cancel values, and it's used as
2327         return value of webkit_print_operation_run_dialog().
2328
2329         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2330         (webkit_print_operation_class_init): Rename done as finished.
2331         (webkitPrintOperationRunDialogUnix): Return a
2332         WebKitPrintOperationResponse instead of bool.
2333         (webkitPrintOperationRunDialogWin32): Ditto.
2334         (drawPagesForPrintingCompleted): Emit finished instead of done.
2335         (webkitPrintOperationRunDialogForFrame): Do not emit finished if
2336         the dialog was cancelled and return a WebKitPrintOperationResponse.
2337         (webkit_print_operation_run_dialog): Return
2338         WebKitPrintOperationResponse.
2339         * UIProcess/API/gtk/WebKitPrintOperation.h: Add
2340         WebKitPrintOperationResponse enum.
2341         * UIProcess/API/gtk/WebKitPrintOperationPrivate.h:
2342         * UIProcess/API/gtk/WebKitWebView.cpp:
2343         (webkitWebViewPrintFrame): Check whether the dialog has been
2344         cancelled or not and connect to finish when the print operation is
2345         in progress to release the print operation object when printing
2346         finishes.
2347         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add
2348         WebKitPrintOperationResponse symbol.
2349         * UIProcess/API/gtk/tests/TestPrinting.cpp:
2350         (testPrintOperationPrintFinished): Use finished instead of done.
2351         (testPrintOperationPrint): Ditto.
2352
2353 2012-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2354
2355         [GTK] Add webkit_print_operation_print() to WebKit2 GTK+ API
2356         https://bugs.webkit.org/show_bug.cgi?id=76536
2357
2358         Reviewed by Gustavo Noronha Silva.
2359
2360         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2361         (webkitPrintOperationPrintPagesForFrame): Helper function to call
2362         WebPageProxy::drawPagesForPrinting using the given
2363         GtkPrintSettings and GtkPageSetup.
2364         (webkitPrintOperationRunDialogForFrame): Use
2365         webkitPrintOperationPrintPagesForFrame().
2366         (webkit_print_operation_print): Print directly using current
2367         GtkPrintSettings and GtkPageSetup without showing the print
2368         dialog.
2369         * UIProcess/API/gtk/WebKitPrintOperation.h:
2370         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
2371         * UIProcess/API/gtk/tests/GNUmakefile.am:
2372         * UIProcess/API/gtk/tests/TestPrinting.cpp:
2373         (testPrintOperationPrintLoadChanged):
2374         (testPrintOperationPrintDone):
2375         (testPrintOperationPrintPrinter):
2376         (testPrintOperationPrint):
2377         (beforeAll):
2378         (afterAll):
2379
2380 2012-02-17  No'am Rosenthal  <noam.rosenthal@nokia.com>
2381
2382         [Qt][WK2] Allow partial updates
2383         https://bugs.webkit.org/show_bug.cgi?id=78824
2384
2385         Instead of using UpdateInfo to fill the entire tile's texture, we use it as a patch that
2386         contains only the dirty rectangle of the current paint. This requires a lot less memory
2387         for small updates, for example when typing a text in an input field.
2388         This shows a significant reduction in overhead when testing on Mac with Instruments.
2389
2390         Reviewed by Simon Hausmann.
2391
2392         * UIProcess/qt/LayerBackingStore.cpp:
2393         (WebKit::LayerBackingStoreTile::swapBuffers):
2394         (WebKit::LayerBackingStoreTile::setBackBuffer):
2395         (WebKit):
2396         (WebKit::LayerBackingStore::updateTile):
2397         * UIProcess/qt/LayerBackingStore.h:
2398         (LayerBackingStoreTile):
2399         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2400         (WebKit::LayerTreeHostProxy::updateTileForLayer):
2401         * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
2402         (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
2403
2404 2012-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2405
2406         [GTK] Make sure print operation object is alive until printing finishes in WebKit2
2407         https://bugs.webkit.org/show_bug.cgi?id=78829
2408
2409         Reviewed by Martin Robinson.
2410
2411         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2412         (drawPagesForPrintingCompleted): Adopt the WebKitPrintOperation
2413         reference so that it's released when the callback finishes.
2414         (webkitPrintOperationRunDialogForFrame): Pass a reference of
2415         WebKitPrintOperation to the printing callback.
2416
2417 2012-02-15  Geoffrey Garen  <ggaren@apple.com>
2418
2419         Made Weak<T> single-owner, adding PassWeak<T>
2420         https://bugs.webkit.org/show_bug.cgi?id=78740
2421
2422         Reviewed by Sam Weinig.
2423
2424         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2425         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject): Use raw pointer and
2426         PassWeak<T>, as required by our new hash map API.
2427
2428 2012-02-16  Sergio Villar Senin  <svillar@igalia.com>
2429
2430         [soup] Move important SoupSession feature initialization to WebCore
2431         https://bugs.webkit.org/show_bug.cgi?id=68602
2432
2433         Reviewed by Martin Robinson.
2434
2435         Moved content sniffer and decoder initialization from the
2436         WebProcess to WebCore because network stuff will not work as
2437         expected without them.
2438
2439         No new tests required as we're just moving stuff from the
2440         WebProcess to WebCore.
2441
2442         * WebProcess/gtk/WebProcessMainGtk.cpp:
2443         (WebKit::WebProcessMainGtk):
2444
2445 2012-02-16  Philippe Normand  <pnormand@igalia.com>
2446
2447         Unreviewed, rolling out r107941.
2448         http://trac.webkit.org/changeset/107941
2449         https://bugs.webkit.org/show_bug.cgi?id=68602
2450
2451         Broke 23 http tests on GTK
2452
2453         * WebProcess/gtk/WebProcessMainGtk.cpp:
2454         (WebKit::WebProcessMainGtk):
2455
2456 2012-02-16  No'am Rosenthal  <noam.rosenthal@nokia.com>
2457
2458         [Texmap] Improve the way we deal with BGRA extension
2459         https://bugs.webkit.org/show_bug.cgi?id=78822
2460
2461         Get rid of swizzling in the web process. Instead, we moved swizzling back to
2462         TextureMapperGL, as we're moving towards a setup where textures are uploaded
2463         in the web process.
2464
2465         Reviewed by Kenneth Rohde Christiansen.
2466
2467         * UIProcess/qt/LayerBackingStore.cpp:
2468         (WebKit::LayerBackingStoreTile::swapBuffers):
2469         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2470         (WebKit::LayerTreeHostProxy::createImage):
2471         * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
2472         (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
2473         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
2474         (WebKit::LayerTreeHostQt::adoptImageBackingStore):
2475
2476 2012-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2477
2478         Unreviewed. Fix WebKit2 GTK+ build after r107947.
2479
2480         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2481         (webkitPrintOperationRunDialogForFrame):
2482
2483 2012-02-16  Alexander Færøy  <ahf@0x90.dk>
2484
2485         [Qt] Fix linking in debug builds on Mac OS X
2486         https://bugs.webkit.org/show_bug.cgi?id=78811
2487
2488         Reviewed by Kenneth Rohde Christiansen.
2489
2490         * UIProcess/API/qt/tests/bytearraytestdata.h:
2491
2492 2012-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2493
2494         [GTK] Page content is incorrectly translated whenh rendering pages for printing in WebKit2
2495         https://bugs.webkit.org/show_bug.cgi?id=78712
2496
2497         Reviewed by Martin Robinson.
2498
2499         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2500         (WebKit::WebPrintOperationGtk::enumeratePrintersFunction):
2501         Simplify the code to select the printer.
2502         (WebKit::WebPrintOperationGtk::renderPage): Call cairo_save()
2503         before rendering the page and cairo_restore() when page has been
2504         rendered.
2505
2506 2012-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2507
2508         [GTK] Add WebKitPrintOperation to WebKit2 GTK+ API
2509         https://bugs.webkit.org/show_bug.cgi?id=76448
2510
2511         Reviewed by Martin Robinson.
2512
2513         * GNUmakefile.am: Add new files to compilation.
2514         * UIProcess/API/gtk/WebKitDefines.h:
2515         * UIProcess/API/gtk/WebKitPrintOperation.cpp: Added.
2516         (webViewDestroyed): Delete the print operation when the view
2517         widget associated is destroyed.
2518         (webkitPrintOperationConstructed): Connect to destroy signal of
2519         associated web view.
2520         (webkitPrintOperationGetProperty):
2521         (webkitPrintOperationSetProperty):
2522         (webkit_print_operation_init):
2523         (webkit_print_operation_class_init):
2524         (webkitPrintOperationRunDialogUnix): Use GtkPrintUnixDialog to
2525         show the printing dialog in UNIX platforms.
2526         (webkitPrintOperationRunDialogWin32): Empty, not implemented yet.
2527         (drawPagesForPrintingCompleted): Callback called when printing
2528         operation has finished in the web process.
2529         (webkitPrintOperationRunDialogForFrame): Run the printing dialog
2530         and start printing the given frame.
2531         (webkit_print_operation_new): Create a new print operation for the
2532         given web view.
2533         (webkit_print_operation_get_print_settings):
2534         (webkit_print_operation_set_print_settings):
2535         (webkit_print_operation_get_page_setup):
2536         (webkit_print_operation_set_page_setup):
2537         (webkit_print_operation_run_dialog): Run the print dialog to print
2538         the web view main frame.
2539         * UIProcess/API/gtk/WebKitPrintOperation.h: Added.
2540         * UIProcess/API/gtk/WebKitPrintOperationPrivate.h: Added.
2541         * UIProcess/API/gtk/WebKitUIClient.cpp:
2542         (printFrame): Call webkitWebViewPrintFrame.
2543         (attachUIClientToView): Add implementation for
2544         printFrame callback.
2545         * UIProcess/API/gtk/WebKitWebView.cpp:
2546         (webkit_web_view_class_init): Add WebKitWebView::print-requested
2547         signal.
2548         (webkitWebViewPrintFrame): Emit print-requested and show the print
2549         dialog to print the frame when not signal is not handled by user.
2550         * UIProcess/API/gtk/WebKitWebView.h:
2551         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
2552         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
2553         WebKitPrintOperation.
2554         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
2555         * UIProcess/API/gtk/tests/GNUmakefile.am:
2556         * UIProcess/API/gtk/tests/TestPrinting.cpp: Added.
2557         (testPrintOperationPrintSettings):
2558         (webViewPrintRequestedCallback):
2559         (testWebViewPrintRequested):
2560         (beforeAll):
2561         (afterAll):
2562         * UIProcess/API/gtk/webkit2.h: Include WebKitPrintOperation.h.
2563
2564 2012-02-16  Simon Hausmann  <simon.hausmann@nokia.com>
2565
2566         [Gtk][Efl][Qt] Move OpenGLShims out of cairo/ subdirectory
2567         https://bugs.webkit.org/show_bug.cgi?id=78800
2568
2569         Reviewed by Kenneth Rohde Christiansen.
2570
2571         * UIProcess/qt/LayerTreeHostProxyQt.cpp: Adjust to changed OpenGLShims.h
2572         location - no more cairo prefix needed.
2573
2574 2012-02-16  No'am Rosenthal  <noam.rosenthal@nokia.com>
2575
2576         [Qt][WK2] Allow opaque tiles
2577         https://bugs.webkit.org/show_bug.cgi?id=78809
2578
2579         Set the supportsAlpha flag for TiledBackingStore when the layer has contentsOpaque enabled.
2580         Use the flag for ShareableBitmaps created by TiledBackingStore.
2581
2582         For now this will not have impact on performance/memory, because we allocate the same type
2583         of buffers for opaque and transparent tiles.
2584
2585         Reviewed by Kenneth Rohde Christiansen.
2586
2587         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
2588         (WebCore::WebGraphicsLayer::setContentsOpaque):
2589         (WebCore::WebGraphicsLayer::setContentsScale):
2590         (WebCore::WebGraphicsLayer::createBackingStore):
2591         (WebCore):
2592         (WebCore::WebGraphicsLayer::updateContentBuffers):
2593         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
2594         (WebGraphicsLayer):
2595         * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
2596         (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
2597
2598 2012-02-16  Sergio Villar Senin  <svillar@igalia.com>
2599
2600         [soup] Move important SoupSession feature initialization to WebCore
2601         https://bugs.webkit.org/show_bug.cgi?id=68602
2602
2603         Reviewed by Martin Robinson.
2604
2605         Moved content sniffer and decoder initialization from the
2606         WebProcess to WebCore because network stuff will not work as
2607         expected without them.
2608
2609         No new tests required as we're just moving stuff from the
2610         WebProcess to WebCore.
2611
2612         * WebProcess/gtk/WebProcessMainGtk.cpp:
2613         (WebKit::WebProcessMainGtk):
2614
2615 2012-02-16  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2616
2617         [Qt][WK2] Split QWebPermissionRequest into QWebSecurityOrigin
2618         https://bugs.webkit.org/show_bug.cgi?id=73215
2619
2620         Reviewed by Kenneth Rohde Christiansen.
2621
2622         Introducing a new class to expose security origin information
2623         (port/scheme/etc), useful for inspecting the origin of permission
2624         requests.
2625
2626         * Target.pri:
2627         * UIProcess/API/qt/qtwebsecurityorigin.cpp: Added.
2628         (QtWebSecurityOrigin::QtWebSecurityOrigin):
2629         (QtWebSecurityOrigin::~QtWebSecurityOrigin):
2630         (QtWebSecurityOrigin::host):
2631         (QtWebSecurityOrigin::scheme):
2632         (QtWebSecurityOrigin::path):
2633         (QtWebSecurityOrigin::port):
2634         (QtWebSecurityOrigin::setHost):
2635         (QtWebSecurityOrigin::setScheme):
2636         (QtWebSecurityOrigin::setPath):
2637         (QtWebSecurityOrigin::setPort):
2638         * UIProcess/API/qt/qtwebsecurityorigin_p.h: Added.
2639         * UIProcess/API/qt/tests/qmltests/WebView/tst_origin.qml: Added.
2640         * UIProcess/API/qt/qwebpermissionrequest.cpp:
2641         (QWebPermissionRequestPrivate::QWebPermissionRequestPrivate):
2642         (QWebPermissionRequest::securityOrigin):
2643         * UIProcess/API/qt/qwebpermissionrequest_p.h:
2644         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
2645
2646 2012-02-16  Patrick Gansterer  <paroga@webkit.org>
2647
2648         [CMake] Add missing include directories.
2649
2650         * CMakeLists.txt:
2651
2652 2012-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2653
2654         [GTK] Document that local paths in html loaded with loadHTML might cause the web process to terminate
2655         https://bugs.webkit.org/show_bug.cgi?id=78719
2656
2657         Reviewed by Martin Robinson.
2658
2659         * UIProcess/API/gtk/WebKitWebView.cpp:
2660
2661 2012-02-15  Anders Carlsson  <andersca@apple.com>
2662
2663         Add TiledCoreAnimationDrawingArea::forceRepaint
2664         https://bugs.webkit.org/show_bug.cgi?id=78749
2665         <rdar://problem/10866221>
2666
2667         Reviewed by Sam Weinig.
2668
2669         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2670         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2671         (WebKit::TiledCoreAnimationDrawingArea::forceRepaint):
2672         Force a repaint and synchronize the layer tree to the UI process.
2673
2674 2012-02-15  Enrica Casucci  <enrica@apple.com>
2675
2676         Refactor ClipboardMac class to use PlatformStrategies.
2677         https://bugs.webkit.org/show_bug.cgi?id=78554
2678
2679         Reviewed by Anders Carlsson.
2680
2681         * WebProcess/WebCoreSupport/WebDragClient.h: Changed method signature to reference
2682         the pasteboard by name.
2683         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added new methods.
2684         (WebKit::WebPlatformStrategies::changeCount):
2685         (WebKit::WebPlatformStrategies::uniqueName):
2686         * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Ditto.
2687         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2688         (WebKit::WebDragClient::declareAndWriteDragImage): Changed method signature to reference
2689         the pasteboard by name.
2690
2691 2012-02-15  Sadrul Habib Chowdhury  <sadrul@chromium.org>
2692
2693         Notify ChromeClient when touch-event handlers are installed/removed.
2694         https://bugs.webkit.org/show_bug.cgi?id=77440
2695
2696         Reviewed by Darin Fisher and Ryosuke Niwa.
2697
2698         * UIProcess/WebPageProxy.h:
2699         (WebKit::WebPageProxy::numTouchEventHandlersChanged):
2700         * WebProcess/WebCoreSupport/WebChromeClient.h:
2701
2702 2012-02-15  Patrick Gansterer  <paroga@webkit.org>
2703
2704         [CMake] Move RunLoop to WebCore/platform
2705         https://bugs.webkit.org/show_bug.cgi?id=78504
2706
2707         Reviewed by Adam Roben.
2708
2709         * CMakeLists.txt: Remove RunLoop.cpp from list of souces.
2710
2711 2012-02-14  Simon Hausmann  <simon.hausmann@nokia.com>
2712
2713         [Qt] Eliminate first set of QtWidgets dependencies from WebCore
2714         https://bugs.webkit.org/show_bug.cgi?id=78611
2715
2716         Reviewed by Kenneth Rohde Christiansen.
2717
2718         * UIProcess/qt/QtWebPageEventHandler.cpp: Add missing QCursor include
2719         to fix compilation.
2720
2721 2012-02-15  Roland Steiner  <rolandsteiner@chromium.org>
2722
2723         <style scoped>: Allow <style scoped> as a direct child of a ShadowRoot
2724         https://bugs.webkit.org/show_bug.cgi?id=77853
2725
2726         numberOfScopedHTMLStyleChildren got moved from Element into Node.
2727
2728         Reviewed by Dimitri Glazkov.
2729
2730         * win/WebKit2.def:
2731         * win/WebKit2CFLite.def:
2732
2733 2012-02-15  No'am Rosenthal  <noam.rosenthal@nokia.com>
2734
2735         [Texmap] Divide TextureMapperNode.cpp to 3 files.
2736         https://bugs.webkit.org/show_bug.cgi?id=76660
2737
2738         Rename TextureMapperNode to TextureMapperLayer.
2739
2740         Reviewed by Kenneth Rohde Christiansen.
2741
2742         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2743         (WebKit::LayerTreeHostProxy::createLayer):
2744         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
2745         (WebKit::LayerTreeHostProxy::paintToGraphicsContext):
2746         (WebKit::LayerTreeHostProxy::getBackingStore):
2747         (WebKit::LayerTreeHostProxy::ensureRootLayer):
2748         (WebKit::LayerTreeHostProxy::purgeGLResources):
2749
2750 2012-02-14  Anders Carlsson  <andersca@apple.com>
2751
2752         Swipe gestures don't work if main frame has a horizontal scrollbar
2753         https://bugs.webkit.org/show_bug.cgi?id=78650
2754         <rdar://problem/10864993>
2755
2756         Reviewed by Sam Weinig.
2757
2758         * WebProcess/WebPage/EventDispatcher.cpp:
2759         (WebKit::EventDispatcher::wheelEvent):
2760         ScrollingTree::tryToHandleWheelEvent now returns a tri-state enum so handle the extra case.
2761
2762         (WebKit::EventDispatcher::sendDidReceiveEvent):
2763         Rename this now that it takes a parameter indicating whether the event was handled or not.
2764
2765 2012-02-14  Brian Weinstein  <bweinstein@apple.com>
2766
2767         Web Inspector: Add the ability to show the resources panel on launch
2768         https://bugs.webkit.org/show_bug.cgi?id=78641
2769         
2770         Add WebKit2 API for the ability to show the resources panel. This calls down
2771         from the WK API all the way to InspectorFrontendClientLocal::showResources.
2772
2773         Reviewed by Timothy Hatcher.
2774
2775         * UIProcess/API/C/WKInspector.cpp:
2776         (WKInspectorShowResources): Call WebInspectorProxy::showResources.
2777         * UIProcess/API/C/WKInspector.h:
2778         * UIProcess/WebInspectorProxy.cpp:
2779         (WebKit::WebInspectorProxy::showResources): Send a message to the web process.
2780         * UIProcess/WebInspectorProxy.h:
2781         * WebProcess/WebPage/WebInspector.cpp:
2782         (WebKit::WebInspector::showResources): Call InspectorFrontendClientLocal::showResources.
2783         * WebProcess/WebPage/WebInspector.h:
2784         * WebProcess/WebPage/WebInspector.messages.in: Add a ShowResources message.
2785
2786 2012-02-14  Matt Lilek  <mrl@apple.com>
2787
2788         Don't ENABLE_DASHBOARD_SUPPORT unconditionally on all Mac platforms
2789         https://bugs.webkit.org/show_bug.cgi?id=78629
2790
2791         Reviewed by David Kilzer.
2792
2793         * Configurations/FeatureDefines.xcconfig:
2794
2795 2012-02-13  Raphael Kubo da Costa  <kubo@profusion.mobi>
2796
2797         [CMake] Merge WebKitEfl.cmake into FindEFL.cmake.
2798         https://bugs.webkit.org/show_bug.cgi?id=78566
2799
2800         Reviewed by Daniel Bates.
2801
2802         * PlatformEfl.cmake: Do not include WebKitEfl.cmake.
2803
2804 2012-02-14  No'am Rosenthal  <noam.rosenthal@nokia.com>
2805
2806         [Qt][Texmap] Refactor backing-store code in TextureMapper
2807         https://bugs.webkit.org/show_bug.cgi?id=78305
2808
2809         Move the backing-store code to LayerTreeBackingStore, implementing the virtual functions
2810         in TextureMapperBackingStore.
2811         We save the double-buffered tile in the backing-store, and then convert them to regular
2812         tiles in updateContents, based on the order of painting.
2813         Use TextureMapperCompositedImage for images instead of saving our own composited image
2814         registry.
2815
2816         Reviewed by Kenneth Rohde Christiansen.
2817
2818         * Target.pri:
2819         * UIProcess/LayerTreeHostProxy.h:
2820         (WebKit):
2821         (LayerTreeHostProxy):
2822         * UIProcess/qt/LayerBackingStore.cpp: Added.
2823         * UIProcess/qt/LayerBackingStore.h: Added.
2824         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2825         (WebKit::LayerTreeHostProxy::createLayer):
2826         (WebKit::LayerTreeHostProxy::syncLayerParameters):
2827         (WebKit::LayerTreeHostProxy::getBackingStore):
2828         (WebKit::LayerTreeHostProxy::createTile):
2829         (WebKit::LayerTreeHostProxy::removeTile):
2830         (WebKit::LayerTreeHostProxy::updateTile):
2831         (WebKit::LayerTreeHostProxy::createImage):
2832         (WebKit::LayerTreeHostProxy::assignImageToLayer):
2833         (WebKit::LayerTreeHostProxy::purgeGLResources):
2834         * WebProcess.pro:
2835
2836
2837 2012-02-14  Shinya Kawanaka  <shinyak@google.com>
2838
2839         Use youngestShadowRoot and oldestShadowRoot instead of Element::shadowRoot().
2840         https://bugs.webkit.org/show_bug.cgi?id=78455
2841
2842         Reviewed by Hajime Morita.
2843
2844         Exports necesarry symbols.
2845
2846         * win/WebKit2.def:
2847         * win/WebKit2CFLite.def:
2848
2849 2012-02-14  Alexey Proskuryakov  <ap@apple.com>
2850
2851         [Mac][Win][WK2] Switch to RFC 6455 protocol for WebSockets
2852         https://bugs.webkit.org/show_bug.cgi?id=78541
2853         <rdar://problem/10036695>
2854
2855         Reviewed by Kent Tamura.
2856
2857         * Shared/WebPreferencesStore.h: (WebKit): Changed default value of the preference.
2858
2859 2012-02-13  W. James MacLean  <wjmaclean@chromium.org>
2860
2861         [chromium] Remove obsolete zoom animation pathway.
2862         https://bugs.webkit.org/show_bug.cgi?id=78359
2863
2864         Reviewed by James Robinson.
2865
2866         This patch removes dead code from the previous incarnation of zoom animation for chromium.
2867
2868         WebProcess/Plugins/PDF/BuiltInPDFView.h:
2869         (BuiltInPDFView):
2870
2871 2012-02-13  Enrica Casucci  <enrica@apple.com>
2872
2873         Refactor Mac platform implementation of the Pasteboard class to use Platform Strategies.
2874         https://bugs.webkit.org/show_bug.cgi?id=78282
2875
2876         This patch removes any accesss to the NSPasteboard object from the Pasteboard class which
2877         now makes use of a new pasteboardStrategy object that is implemented both in WebKit and
2878         WebKit2. The actual access to NSPasteboard is now performed inside the PlatformPasteboard
2879         class. Currently both WebKit and WebKit2 use the same implementation of the PasteboardStrategy
2880         interface but this one more step in the direction of removing access to NSPasteboard from
2881         the WebProcess.
2882         As part of the refactoring the I've reduced to a minimum the use of OBJ-C classes.
2883
2884         Reviewed by Anders Carlsson.
2885
2886         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added implementation of PasteboardStrategy
2887         interface.
2888         (WebKit::WebPlatformStrategies::createPasteboardStrategy):
2889         (WebKit::WebPlatformStrategies::getTypes):
2890         (WebKit::WebPlatformStrategies::bufferForType):
2891         (WebKit::WebPlatformStrategies::getPathnamesForType):
2892         (WebKit::WebPlatformStrategies::stringForType):
2893         (WebKit::WebPlatformStrategies::copy):
2894         (WebKit::WebPlatformStrategies::setTypes):
2895         (WebKit::WebPlatformStrategies::setBufferForType):
2896         (WebKit::WebPlatformStrategies::setPathnamesForType):
2897         (WebKit::WebPlatformStrategies::setStringForType):
2898         * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Added PasteboardStrategy.
2899
2900 2012-02-13  Anders Carlsson  <andersca@apple.com>
2901
2902         The scrolling tree needs to know about the back forward state of the page
2903         https://bugs.webkit.org/show_bug.cgi?id=78523
2904         <rdar://problem/10756548>
2905
2906         Reviewed by Sam Weinig.
2907
2908         Pass the back/forward state in the WheelEvent message. This is pretty hacky but works well.
2909
2910         * Platform/CoreIPC/HandleMessage.h:
2911         (CoreIPC):
2912         (CoreIPC::callMemberFunction):
2913         * UIProcess/WebPageProxy.cpp:
2914         (WebKit::WebPageProxy::handleWheelEvent):
2915         (WebKit::WebPageProxy::didReceiveEvent):
2916         * WebProcess/WebPage/EventDispatcher.cpp:
2917         (WebKit::EventDispatcher::wheelEvent):
2918         * WebProcess/WebPage/EventDispatcher.h:
2919         (EventDispatcher):
2920         * WebProcess/WebPage/EventDispatcher.messages.in:
2921
2922 2012-02-13  Dan Bernstein  <mitz@apple.com>
2923
2924         WebKit2 build emits a warning about not stripping code-signed PluginProcess.app when copying it into the framework
2925         https://bugs.webkit.org/show_bug.cgi?id=78451
2926
2927         Reviewed by Sam Weinig.
2928
2929         * Configurations/Base.xcconfig: Set COPY_PHASE_STRIP to NO.
2930
2931 2012-02-13  Sam Weinig  <sam@webkit.org>
2932
2933         Windows build fix.
2934
2935         * UIProcess/win/WebPopupMenuProxyWin.cpp:
2936         (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
2937
2938 2012-02-13  Zalan Bujtas  <zbujtas@gmail.com>
2939
2940         Manage ShareableBitmap object lifecycle properly, when QImage is created
2941         using the shared data.
2942         https://bugs.webkit.org/show_bug.cgi?id=77546
2943
2944         Reviewed by Simon Hausmann.
2945
2946         * Shared/ShareableBitmap.h:
2947         (ShareableBitmap):
2948         * Shared/qt/ShareableBitmapQt.cpp:
2949         (WebKit::ShareableBitmap::createQImage):
2950         (WebKit):
2951         (WebKit::ShareableBitmap::releaseSharedMemoryData):
2952
2953 2012-02-06  Raphael Kubo da Costa  <kubo@profusion.mobi>
2954
2955         [EFL] Drop support for the Curl network backend.
2956         https://bugs.webkit.org/show_bug.cgi?id=77874
2957
2958         Reviewed by Eric Seidel.
2959
2960         Nobody seems to be maintaining the Curl backend in WebCore, the
2961         EFL port developers all seem to be using the Soup backend and the
2962         port itself has many features which are only implemented for the
2963         latter.
2964
2965         * PlatformEfl.cmake: Unconditionally build the glib/soup source
2966         files and unconditionally add the required include directories and
2967         libraries.
2968         * WebProcess/efl/WebProcessMainEfl.cpp:
2969         (WebKit::WebProcessMainEfl): Remove USE(SOUP) check.
2970
2971 2012-02-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2972
2973         Unreviewed, rolling out r107435.
2974         http://trac.webkit.org/changeset/107435
2975         https://bugs.webkit.org/show_bug.cgi?id=78410
2976
2977         It broke the Qt build (Requested by Ossy on #webkit).
2978
2979         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2980         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2981         (WebPlatformStrategies):
2982
2983 2012-02-10  Brian Weinstein  <bweinstein@apple.com>
2984
2985         Web Inspector: Add the ability to jump to the source for a given frame
2986         https://bugs.webkit.org/show_bug.cgi?id=78396
2987         
2988         Add WebKit2 API for the ability to show the source of a frame in the web inspector. This calls down
2989         from the WK API all the way to InspectorFrontendClientLocal::showMainResourceForFrame.
2990
2991         Reviewed by Tim Hatcher.
2992
2993         * UIProcess/API/C/WKInspector.cpp:
2994         (WKInspectorShowMainResourceForFrame): Call WebInspectorProxy::showMainResourceForFrame.
2995         * UIProcess/API/C/WKInspector.h:
2996
2997         * UIProcess/WebInspectorProxy.cpp:
2998         (WebKit::WebInspectorProxy::showMainResourceForFrame): Send a message to the web process, passing
2999             the frame ID of the frame we want to show the main resource of.
3000         * UIProcess/WebInspectorProxy.h:
3001
3002         * WebProcess/WebPage/WebInspector.cpp:
3003         (WebKit::WebInspector::showMainResourceForFrame): Get the WebFrame for the frame we want to show the
3004             main resource of from its ID. If we found a frame, call InspectorFrontendClientLocal::showMainResourceForFrame.
3005         * WebProcess/WebPage/WebInspector.h:
3006         
3007         * WebProcess/WebPage/WebInspector.messages.in: Add a new message.
3008
3009 2012-02-10  Adam Klein  <adamk@chromium.org>
3010
3011         Enable MUTATION_OBSERVERS by default on all platforms
3012         https://bugs.webkit.org/show_bug.cgi?id=78196
3013
3014         Reviewed by Ojan Vafai.
3015
3016         * Configurations/FeatureDefines.xcconfig:
3017
3018 2012-02-10  Enrica Casucci  <enrica@apple.com>
3019
3020         Refactor Mac platform implementation of the Pasteboard class to use Platform Strategies.
3021         https://bugs.webkit.org/show_bug.cgi?id=78282
3022
3023         This patch removes any accesss to the NSPasteboard object from the Pasteboard class which
3024         now makes use of a new pasteboardStrategy object that is implemented both in WebKit and
3025         WebKit2. The actual access to NSPasteboard is now performed inside the PlatformPasteboard
3026         class. Currently both WebKit and WebKit2 use the same implementation of the PasteboardStrategy
3027         interface but this one more step in the direction of removing access to NSPasteboard from
3028         the WebProcess.
3029         As part of the refactoring the I've reduced to a minimum the use of OBJ-C classes.
3030         
3031         Reviewed by Anders Carlsson.
3032
3033         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added implementation of PasteboardStrategy
3034         interface.
3035         (WebKit::WebPlatformStrategies::createPasteboardStrategy):
3036         (WebKit::WebPlatformStrategies::getTypes):
3037         (WebKit::WebPlatformStrategies::bufferForType):
3038         (WebKit::WebPlatformStrategies::getPathnamesForType):
3039         (WebKit::WebPlatformStrategies::stringForType):
3040         (WebKit::WebPlatformStrategies::copy):
3041         (WebKit::WebPlatformStrategies::setTypes):
3042         (WebKit::WebPlatformStrategies::setBufferForType):
3043         (WebKit::WebPlatformStrategies::setPathnamesForType):
3044         (WebKit::WebPlatformStrategies::setStringForType):
3045         * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Added PasteboardStrategy.
3046
3047 2012-02-09  Timothy Hatcher  <timothy@apple.com>
3048
3049         Prevent attaching when inspecting the Web Inspector.
3050
3051         Also adds some comments about keeping in sync with InspectorFrontendClientLocal::canAttachWindow
3052         and why there are two implementations of the same function.
3053
3054         https://webkit.org/b/78304
3055
3056         Reviewed by Brian Weinstein.
3057
3058         * UIProcess/WebInspectorProxy.cpp:
3059         (WebKit::WebInspectorProxy::canAttach): Prevent attaching when the page is an inspector page.
3060         Added comments about InspectorFrontendClientLocal::canAttachWindow.
3061         * UIProcess/WebInspectorProxy.h:
3062         (WebInspectorProxy): Added comment about keeping in sync with InspectorFrontendClientLocal.
3063
3064 2012-02-09  Alexey Proskuryakov  <ap@apple.com>
3065
3066         Managed network proxy settings are not used in WebProcess
3067         https://bugs.webkit.org/show_bug.cgi?id=78288
3068         <rdar://problem/9962116>
3069
3070         Reviewed by Anders Carlsson.
3071
3072         * WebProcess/com.apple.WebProcess.sb: Allow reading managed preferences.
3073
3074 2012-02-09  Alexey Proskuryakov  <ap@apple.com>
3075
3076         ASSERTION FAILED: checkURLReceivedFromWebProcess(originalURL) loading a local file, if the WebProcess crashed
3077         https://bugs.webkit.org/show_bug.cgi?id=70845
3078         <rdar://problem/10269985>
3079
3080         Reviewed by Anders Carlsson.
3081
3082         This also fixes some case where WebProcess did not get a sandbox extension after a crash.
3083
3084         * UIProcess/WebPageProxy.cpp:
3085         (WebKit::WebPageProxy::reattachToWebProcessWithItem): We no longer need to pass a sandbox
3086         extension here, we're now passing it at b/f navigation bottleneck.
3087         (WebKit::WebPageProxy::reload): Pass a sandbox extension - reload may mean reloading an error
3088         page after a crash, so WebProcess may no longer have the extension.
3089         (WebKit::WebPageProxy::goForward): We no longer need to pass a sandbox extension here,
3090         we're now passing it at b/f navigation bottleneck. Also, fixed a bug where we first null checked
3091         a WebBackForwardListItem pointer, and then used it anyway.
3092         (WebKit::WebPageProxy::goBack): Ditto.
3093         (WebKit::WebPageProxy::goToBackForwardItem): Ditto.
3094         (WebKit::WebPageProxy::backForwardGoToItem): This is the bottleneck. We get here both for UI
3095         actions like pressing the Back button, and for window.history.go() navigations. JS navigations
3096         previously didn't open up the sandbox. URLs in UI process b/f list are trusted, so it's
3097         always OK to grant a sandbox extension if one of them is a file: one.
3098
3099         * UIProcess/WebPageProxy.h: backForwardGoToItem() now returns a sandbox extension handle.
3100
3101         * UIProcess/WebPageProxy.messages.in: Ditto.
3102
3103         * UIProcess/WebProcessProxy.cpp:
3104         (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess): If a URL is in UI process b/f
3105         list, then it has been already vetted as something the Web process knows about. No need to
3106         crash if it actually attempts going there.
3107         (WebKit::WebProcessProxy::didReceiveInvalidMessage): Removed a useless comment (we have tons
3108         of fprintfs besides this one). Fixed log message syntax.
3109
3110         * UIProcess/cf/WebPageProxyCF.cpp: (WebKit::WebPageProxy::restoreFromSessionStateData):
3111         We no longer need to pass a sandbox extension here, we're now passing it at b/f navigation
3112         bottleneck. 
3113
3114         * WebProcess/WebPage/WebBackForwardListProxy.cpp: (WebKit::WebBackForwardListProxy::goToItem):
3115         We now get an extension here, when telling UI process that we're navigating to a b/f list item.
3116
3117         * WebProcess/WebPage/WebPage.cpp:
3118         (WebKit::WebPage::reload): Use the extension we're getting.
3119         (WebKit::WebPage::goForward): Don't use one we're not getting.
3120         (WebKit::WebPage::goBack): Ditto.
3121         (WebKit::WebPage::goToBackForwardItem): Ditto.
3122         (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem): Ditto.
3123
3124         * WebProcess/WebPage/WebPage.h: Adjusted signatures accordingly.
3125
3126         * WebProcess/WebPage/WebPage.messages.in: Ditto.
3127
3128 2012-02-09  Matthew Delaney  <mdelaney@apple.com>
3129
3130         HiDPI: WebKit2's drag images are blurry
3131         https://bugs.webkit.org/show_bug.cgi?id=67779
3132
3133         Use the proper deviceScaleFactor() instead of accessing _intrinsicDeviceScaleFactor
3134
3135         Reviewed by Beth Dakin.
3136
3137         * UIProcess/API/mac/WKView.mm:
3138         (-[WKView _setDragImage:at:linkDrag:]):
3139
3140 2012-02-09  Alexey Proskuryakov  <ap@apple.com>
3141
3142         [WK2] Allow reading some debug-only preference files
3143         https://bugs.webkit.org/show_bug.cgi?id=78255
3144         <rdar://problem/9382382>
3145         <rdar://problem/10830558>
3146
3147         Reviewed by Dan Bernstein.
3148
3149         * WebProcess/com.apple.WebProcess.sb:
3150
3151 2012-02-09  Matthew Delaney  <mdelaney@apple.com>
3152
3153         HiDPI: WebKit2's link-dragging images are blurry
3154         https://bugs.webkit.org/show_bug.cgi?id=67779
3155
3156         Reviewed by Beth Dakin.
3157
3158         Teach startDrag about the deviceScaleFactor so that it creates
3159         an appropriately scaled bitmap image to ship over.
3160         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3161         (WebKit::WebDragClient::startDrag):
3162         (WebKit::convertImageToBitmap):
3163
3164         Have setDragImage assume that it's receiving a bitmap image scaled
3165         up by the deviceScaleFactor that it sees.
3166         * UIProcess/API/mac/WKView.mm:
3167         (-[WKView _setDragImage:at:linkDrag:]):
3168
3169 2012-02-09  Carlos Garcia Campos  <cgarcia@igalia.com>
3170
3171         [GTK] Add WebKitWebView::mouse-target-changed signal to WebKit2 GTK+ API
3172         https://bugs.webkit.org/show_bug.cgi?id=78097
3173
3174         Reviewed by Martin Robinson.
3175
3176         * GNUmakefile.am: Add new files to compilation.
3177         * UIProcess/API/gtk/WebKitHitTestResult.cpp: Added.
3178         (webkitHitTestResultFinalize):
3179         (webkitHitTestResultGetProperty):
3180         (webkitHitTestResultSetProperty):
3181         (webkit_hit_test_result_init):
3182         (webkit_hit_test_result_class_init):
3183         (webkitHitTestResultCreate): Create a new WebKitHitTestResult for
3184         the given WKHitTestResult.
3185         (stringIsEqualToCString): Helper function to compare String and
3186         CString considering String::isEmpty() == CString.isNull().
3187         (webkitHitTestResultCompare): Helper function to check whether a
3188         WebKitHitTestResult contains the same information than the given
3189         WKHitTestResult.
3190         (webkit_hit_test_result_get_context):
3191         (webkit_hit_test_result_context_is_link):
3192         (webkit_hit_test_result_context_is_image):
3193         (webkit_hit_test_result_context_is_media):
3194         (webkit_hit_test_result_get_link_uri):
3195         (webkit_hit_test_result_get_link_title):
3196         (webkit_hit_test_result_get_link_label):
3197         (webkit_hit_test_result_get_image_uri):
3198         (webkit_hit_test_result_get_media_uri):
3199         * UIProcess/API/gtk/WebKitHitTestResult.h: Added.
3200         * UIProcess/API/gtk/WebKitHitTestResultPrivate.h:
3201         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
3202         (webkitNavigationPolicyDecisionCreate): Use
3203         wkEventModifiersToGdkModifiers.
3204         * UIProcess/API/gtk/WebKitPrivate.cpp:
3205         (wkEventModifiersToGdkModifiers): Moved from
3206         WebKitNavigationPolicyDecision and renamed to wkEventModifiersToGdkModifiers.
3207         * UIProcess/API/gtk/WebKitPrivate.h:
3208         * UIProcess/API/gtk/WebKitUIClient.cpp:
3209         (mouseDidMoveOverElement): UI client callback that calls
3210         webkitWebViewMouseTargetChanged().
3211         (attachUIClientToView): Add implementation for callback
3212         mouseDidMoveOverElement.
3213         * UIProcess/API/gtk/WebKitWebView.cpp:
3214         (webkit_web_view_class_init): Add
3215         WebKitWebView::mouse-target-changed signal.
3216         (webkitWebViewMouseTargetChanged): Emit
3217         WebKitWebView::mouse-target-changed signal.
3218         * UIProcess/API/gtk/WebKitWebView.h:
3219         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
3220         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
3221         WebKitHitTestResult.
3222         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
3223         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
3224         (testWebViewMouseTarget):
3225         (beforeAll):
3226         * UIProcess/API/gtk/tests/WebViewTest.cpp:
3227         (WebViewTest::WebViewTest):
3228         (WebViewTest::~WebViewTest):
3229         (parentWindowMapped):
3230         (WebViewTest::showInWindowAndWaitUntilMapped): Method to add the
3231         view into a popup window and show it running the main loop until
3232         the window is mapped.
3233         (WebViewTest::mouseMoveTo): Method to synthesize a
3234         GDK_MOTION_EVENT on the given coordinates and using the given
3235         modifiers.
3236         * UIProcess/API/gtk/tests/WebViewTest.h:
3237         * UIProcess/API/gtk/webkit2.h: Include WebKitHitTestResult.h.
3238         * UIProcess/API/gtk/webkit2marshal.list:
3239
3240 2012-02-07  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3241
3242         [Qt] Fetch the visible rect from LayerTreeHost instead of keeping a copy in each layer.
3243         https://bugs.webkit.org/show_bug.cgi?id=78009
3244
3245         Reviewed by Noam Rosenthal.
3246
3247         Since WebGraphicsLayers are now accessed directly from LayerTreeHost, they don't
3248         need to keep the visible rect to pass it down their child layers anymore.
3249
3250         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3251         (WebCore::WebGraphicsLayer::setContentsScale):
3252         (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
3253         (WebCore::WebGraphicsLayer::adjustVisibleRect):
3254         (WebCore):
3255         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
3256         (WebGraphicsLayerClient):
3257         (WebGraphicsLayer):
3258         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
3259         (WebKit::LayerTreeHostQt::registerLayer):
3260         (WebKit::LayerTreeHostQt::visibleContentsRect):
3261         (WebKit):
3262         (WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
3263         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
3264         (LayerTreeHostQt):
3265
3266 2012-02-09  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3267
3268         [Qt] Control the lifetime of TiledBackingStores in WebGraphicsLayer.
3269         https://bugs.webkit.org/show_bug.cgi?id=78005
3270
3271         Reviewed by Noam Rosenthal.
3272
3273         This makes sure that no empty tiles are generated for layers without contents and that
3274         no interaction is made with the TiledBackingStore until we got a WebGraphicsLayerClient.
3275
3276         - Create the main TiledBackingStore only when the layer has drawsContent and has no
3277           directly composited image
3278         - Removed recreateBackingStoreIfNeeded and do the (re)creation of the backing stores
3279           in updateContentBuffers
3280         - Call purgeBackingStores on registered layers instead of passing it down the layer tree
3281
3282         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3283         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
3284         (WebCore::WebGraphicsLayer::~WebGraphicsLayer):
3285         (WebCore::WebGraphicsLayer::setDrawsContent):
3286         (WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
3287         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
3288         (WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector):
3289         (WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
3290         (WebCore::WebGraphicsLayer::updateContentBuffers):
3291         (WebCore::WebGraphicsLayer::purgeBackingStores):
3292         (WebCore::WebGraphicsLayer::setWebGraphicsLayerClient):
3293         (WebCore::WebGraphicsLayer::computeTransformedVisibleRect):
3294         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
3295         (WebGraphicsLayer):
3296         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
3297         (WebKit::LayerTreeHostQt::LayerTreeHostQt):
3298         (WebKit::LayerTreeHostQt::flushPendingLayerChanges):
3299         (WebKit):
3300         (WebKit::LayerTreeHostQt::purgeBackingStores):
3301         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
3302         (LayerTreeHostQt):
3303
3304 2012-02-08  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3305
3306         [Qt] Remove WebGraphicsLayer::updateTileBuffersRecursively
3307         https://bugs.webkit.org/show_bug.cgi?id=78105
3308
3309         Reviewed by Kenneth Rohde Christiansen.
3310
3311         The method is unused.
3312
3313         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3314         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
3315         (WebGraphicsLayer):
3316
3317 2012-02-08  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3318
3319         [Qt] Register individual WebGraphicsLayers to LayerTreeHost instead of handling the tree as a whole.
3320         https://bugs.webkit.org/show_bug.cgi?id=77976
3321
3322         Reviewed by Kenneth Rohde Christiansen.
3323
3324         The LayerTreeHost association had to be maintained between re-parented layers and it would be
3325         impossible to know if the layer would be disconnected from the LayerTreeHost only for reparenting
3326         or disconnected for good (in other words, that the LayerTreeHost could be deleted meanwhile).
3327
3328         Instead, this patch assumes that graphics layers will only be in contact with one instance of
3329         LayerTreeHost, and that this association can be kept until either the graphics layer or the layer
3330         tree host gets deleted.
3331
3332         The registered layers are kept in a set and the visible rect and scales are passed directly
3333         to layers instead of down the tree, through the root layer.
3334
3335         This also fixes the !m_layerInfo.imageBackingStoreID ASSERT that was popping in unit tests.
3336
3337         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3338         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
3339         (WebCore::WebGraphicsLayer::~WebGraphicsLayer):
3340         (WebCore::WebGraphicsLayer::setChildren):
3341         (WebCore::WebGraphicsLayer::addChild):
3342         (WebCore::WebGraphicsLayer::addChildAtIndex):
3343         (WebCore::WebGraphicsLayer::addChildAbove):
3344         (WebCore::WebGraphicsLayer::addChildBelow):
3345         (WebCore::WebGraphicsLayer::replaceChild):
3346         (WebCore::WebGraphicsLayer::removeFromParent):
3347         (WebCore::WebGraphicsLayer::setContentsToImage):
3348         (WebCore::WebGraphicsLayer::setMaskLayer):
3349         (WebCore::WebGraphicsLayer::setReplicatedByLayer):
3350         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
3351         (WebCore::WebGraphicsLayer::setVisibleContentRectAndScale):
3352         (WebCore::WebGraphicsLayer::tiledBackingStoreUpdatesAllowed):
3353         (WebCore::WebGraphicsLayer::createTile):
3354         (WebCore::WebGraphicsLayer::updateTile):
3355         (WebCore::WebGraphicsLayer::removeTile):
3356         (WebCore::WebGraphicsLayer::updateContentBuffers):
3357         (WebCore::WebGraphicsLayer::purgeBackingStores):
3358         (WebCore::WebGraphicsLayer::setWebGraphicsLayerClient):
3359         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
3360         (WebCore):
3361         (WebGraphicsLayerClient):
3362         (WebGraphicsLayer):
3363         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
3364         (WebKit::LayerTreeHostQt::~LayerTreeHostQt):
3365         (WebKit::LayerTreeHostQt::LayerTreeHostQt):
3366         (WebKit::LayerTreeHostQt::attachLayer):
3367         (WebKit):
3368         (WebKit::LayerTreeHostQt::detachLayer):
3369         (WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
3370         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
3371         (LayerTreeHostQt):
3372
3373 2012-02-07  Andras Becsi  <andras.becsi@nokia.com>
3374
3375         [Qt][WK2] WebView should use Flickable instead of QScroller to handle positioning
3376         https://bugs.webkit.org/show_bug.cgi?id=76275
3377
3378         Reviewed by Simon Hausmann and Kenneth Rohde Christiansen.
3379
3380         The current WebView implementation uses QScroller to manage positioning but other
3381         similar items in QML (ie. ListView, GridView) use Flickable as their base class.
3382         Since QScroller will be dropped from Qt5 this patch removes the QScroller code
3383         and redirects pan gestures to a dynamically created encapsulated Flickable instance
3384         (QtFlickProvider) which handles the positioning.
3385
3386         This implementation only uses public QML API and does not depend on declarative-private.
3387         It propagates a small subset of the Flickable API as the public API of the WebView.
3388         This minimalistic API is accessible via the experimental extension and makes it possible
3389         in QML to place additional items (such as toolbars, scroll indicators and floating menus)
3390         aroud the page.
3391         These items can use anchoring and binding for positioning on the flickable contentItem.
3392
3393         The patch depends however on the automatic touch->mouse event synthetization of Qt5.
3394         The touch events sent to the flickProvider are translated to mouse events automatically
3395         as long as the Flickable does not handle touch events directly.
3396
3397         After this change QtWebKit2 does no longer depend on QtWidgets and this dependency can be
3398         removed in a follow-up patch.
3399
3400         * Target.pri: Added QtFlickProvider source.
3401         * UIProcess/API/qt/qquickwebpage.cpp:
3402         (QQuickWebPagePrivate::paintToCurrentGLContext):
3403         (QQuickWebPage::transformToItem):
3404         (QQuickWebPagePrivate::updateSize):
3405         * UIProcess/API/qt/qquickwebview.cpp:
3406         (QQuickWebViewPrivate::QQuickWebViewPrivate):
3407         (QQuickWebViewPrivate::pageItemPos):
3408         (QQuickWebViewFlickablePrivate::pageItemPos):
3409         (QQuickWebViewFlickablePrivate::updateContentsSize):
3410         (QQuickWebViewFlickablePrivate::onComponentComplete):
3411         (QQuickWebViewFlickablePrivate::updateViewportSize):
3412         (QQuickWebViewExperimental::flickableData):
3413         (QQuickWebViewExperimental::contentItem):
3414         (QQuickWebViewExperimental::contentWidth):
3415         (QQuickWebViewExperimental::setContentWidth):
3416         (QQuickWebViewExperimental::contentHeight):
3417         (QQuickWebViewExperimental::setContentHeight):
3418         (QQuickWebViewExperimental::contentX):
3419         (QQuickWebViewExperimental::setContentX):
3420         (QQuickWebViewExperimental::contentY):
3421         (QQuickWebViewExperimental::setContentY):
3422         (QQuickWebView::pageItemPos):
3423         (QQuickWebView::updateContentsSize):
3424         * UIProcess/API/qt/qquickwebview_p.h:
3425         * UIProcess/API/qt/qquickwebview_p_p.h:
3426         (QQuickWebViewPrivate):
3427         (QQuickWebViewPrivate::updateContentsSize):
3428         (QQuickWebViewFlickablePrivate):
3429         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3430         (tst_QQuickWebView::scrollRequest):
3431         * UIProcess/qt/QtFlickProvider.cpp: Added.
3432         (QtFlickProvider::QtFlickProvider):
3433         (QtFlickProvider::handleTouchFlickEvent):
3434         (QtFlickProvider::contentItem):
3435         (QtFlickProvider::flickableData):
3436         (QtFlickProvider::contentPos):
3437         (QtFlickProvider::setContentPos):
3438         (QtFlickProvider::viewportSize):
3439         (QtFlickProvider::setViewportSize):
3440         (QtFlickProvider::returnToBounds):
3441         (QtFlickProvider::cancelFlick):
3442         (QtFlickProvider::isMoving):
3443         (QtFlickProvider::isDragging):
3444         (QtFlickProvider::isFlicking):
3445         (QtFlickProvider::contentWidth):
3446         (QtFlickProvider::setContentWidth):
3447         (QtFlickProvider::contentHeight):
3448         (QtFlickProvider::setContentHeight):
3449         (QtFlickProvider::contentX):
3450         (QtFlickProvider::setContentX):
3451         (QtFlickProvider::contentY):
3452         (QtFlickProvider::setContentY):
3453         * UIProcess/qt/QtFlickProvider.h: Added.
3454         (QtFlickProvider):
3455         * UIProcess/qt/QtPanGestureRecognizer.cpp:
3456         (WebKit::QtPanGestureRecognizer::recognize):
3457         * UIProcess/qt/QtPanGestureRecognizer.h:
3458         (QtPanGestureRecognizer):
3459         * UIProcess/qt/QtViewportInteractionEngine.cpp:
3460         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
3461         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
3462         (WebKit::QtViewportInteractionEngine::scrollStateChanged):
3463         (WebKit):
3464         (WebKit::QtViewportInteractionEngine::wheelEvent):
3465         (WebKit::QtViewportInteractionEngine::reset):
3466         (WebKit::QtViewportInteractionEngine::applyConstraints):
3467         (WebKit::QtViewportInteractionEngine::scrollAnimationActive):
3468         (WebKit::QtViewportInteractionEngine::panGestureActive):
3469         (WebKit::QtViewportInteractionEngine::panGestureStarted):
3470         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
3471         (WebKit::QtViewportInteractionEngine::panGestureCancelled):
3472         (WebKit::QtViewportInteractionEngine::panGestureEnded):
3473         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
3474         (WebKit::QtViewportInteractionEngine::scaleContent):
3475         * UIProcess/qt/QtViewportInteractionEngine.h:
3476         (QtViewportInteractionEngine):
3477         * UIProcess/qt/QtWebPageEventHandler.cpp:
3478         (QtWebPageEventHandler::doneWithTouchEvent):
3479
3480 2012-02-08  Keunsoon Lee  <keunsoon.lee@samsung.com>
3481
3482         [WK2][EFL] creating dummy class derived from ResourceHandleClient for Efl download module.
3483         https://bugs.webkit.org/show_bug.cgi?id=76171
3484
3485         Reviewed by Andreas Kling.
3486
3487         FileDownloaderEfl is a practical class to operate file download.
3488         It communicates with Download class to start download
3489         and to notify downloading states to user(e.g. client application).
3490         Besides FileDownloaderEfl derives from ResourceHandleClient
3491         and receives chunked data from ResourceHandle directly
3492         or redirects data flow which is started from MainResourceLoader