efb1dc029489efc01898c64890155db6712e3190
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2012-01-23  Simon Fraser  <simon.fraser@apple.com>
2
3         Show layer borders for scrollbar layers
4         https://bugs.webkit.org/show_bug.cgi?id=76888
5
6         Reviewed by Beth Dakin.
7         
8         Update for new signatures of GraphicsLayerClient::showDebugBorders()
9         and GraphicsLayerClient::showRepaintCounter().
10
11         * UIProcess/LayerTreeHostProxy.h:
12         (WebKit::LayerTreeHostProxy::showDebugBorders):
13         (WebKit::LayerTreeHostProxy::showRepaintCounter):
14         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
15         (WebKit::LayerTreeHostCA::showDebugBorders):
16         (WebKit::LayerTreeHostCA::showRepaintCounter):
17         * WebProcess/WebPage/ca/LayerTreeHostCA.h:
18         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
19
20 2012-01-24  David Levin  <levin@chromium.org>
21
22         [windows] Convert usage of GetDC to HWndDC Part 3.
23         https://bugs.webkit.org/show_bug.cgi?id=76889
24
25         Reviewed by Adam Roben.
26
27         * UIProcess/win/WebPopupMenuProxyWin.cpp:
28         (WebKit::WebPopupMenuProxyWin::paint): Fix a dc leak and use the dellayed allocation.
29
30 2012-01-24  Sergio Villar Senin  <svillar@igalia.com>
31
32         [WK2] [GTK] TestDownloads hitting an assertion in Debug builds
33         https://bugs.webkit.org/show_bug.cgi?id=76915
34
35         Reviewed by Martin Robinson.
36
37         No new tests required as it fixes some assertions in a unit test.
38
39         * WebProcess/Downloads/soup/DownloadSoup.cpp:
40         (WebKit::Download::start):
41         (WebKit::Download::startWithHandle):
42
43 2012-01-24  No'am Rosenthal  <noam.rosenthal@nokia.com>
44
45         [Qt][WK2] Qt's cross-process AC copies images excessively when updating tiles.
46         https://bugs.webkit.org/show_bug.cgi?id=76877
47
48         Reviewed by Kenneth Rohde Christiansen.
49
50         Instead of copying QImages, pass a reference to the ShareableBitmap that was originally
51         created by the web process. Also, swizzle the image's RGB in the web process, before it's
52         transferred to the UI process.
53
54         Data flow before change:
55         (Web Process) Render to image -> IPC -> (UI Process) Copy (render queue) -> Copy Swizzled RGB -> Upload
56
57         Data flow after change:
58         (Web Process) Render to image -> swizzle RGB -> IPC -> (UI Process) -> Upload
59
60         * Shared/ShareableBitmap.h:
61         * Shared/qt/ShareableBitmapQt.cpp:
62         (WebKit::ShareableBitmap::swizzleRGB):
63         * UIProcess/LayerTreeHostProxy.h:
64         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
65         (WebKit::LayerTreeHostProxy::updateTile):
66         (WebKit::LayerTreeHostProxy::createImage):
67         (WebKit::LayerTreeHostProxy::syncRemoteContent):
68         (WebKit::LayerTreeHostProxy::updateTileForLayer):
69         (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
70         (WebKit::LayerTreeHostProxy::purgeGLResources):
71         * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
72         (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
73         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
74         (WebKit::LayerTreeHostQt::adoptImageBackingStore):
75
76 2012-01-24  Rafael Brandao  <rafael.lobo@openbossa.org>
77
78         [Qt][WK2] QtWebIconDatabaseClient leaves a dangling pointer on WebIconDatabase after its destruction
79         https://bugs.webkit.org/show_bug.cgi?id=76399
80
81         Reviewed by Simon Hausmann.
82
83         Due a circular dependency between WebContext and WebProcessProxy, WebContext it not
84         being destroyed, neither WebIconDatabase. As QtWebIconDatabaseClient's life time is the same
85         as QtWebContext and this one is being destroyed, the remaining reference to our client
86         on WebIconDatabase should be cleaned upon its destruction.
87
88         * UIProcess/qt/QtWebIconDatabaseClient.cpp:
89         (QtWebIconDatabaseClient::QtWebIconDatabaseClient):
90         (QtWebIconDatabaseClient::~QtWebIconDatabaseClient): Clear client pointer on WebIconDatabase.
91         * UIProcess/qt/QtWebIconDatabaseClient.h: Make this client hold a reference to WebIconDatabase.
92
93 2012-01-24  Zeno Albisser  <zeno@webkit.org>
94
95         [Qt][WK2] Add test for application URL schemes.
96         https://bugs.webkit.org/show_bug.cgi?id=74933
97
98         Add a test that checks handling of url strings.
99         Add a test that verifies replies in case of multiple
100         available application url schemes.
101
102         Reviewed by Kenneth Rohde Christiansen.
103
104         * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
105
106 2012-01-24  Carlos Garcia Campos  <cgarcia@igalia.com>
107
108         [GTK] Fix /webkit2/WebKitWebView/reload after r105688
109         https://bugs.webkit.org/show_bug.cgi?id=76898
110
111         Reviewed by Alejandro G. Castro.
112
113         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
114         (LoadTrackingTest::reload): Add reload method that clears events
115         and initializes progress.
116         * UIProcess/API/gtk/tests/LoadTrackingTest.h:
117         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
118         (testWebViewReload): Use LoadTrackingTest::reload() instead of
119         webkit_web_view_reload().
120
121 2012-01-24  Simon Hausmann  <simon.hausmann@nokia.com>
122
123         Some qmake build files must include Qt5's "quick" module.
124         https://bugs.webkit.org/show_bug.cgi?id=76671
125
126         Unreviewed build fix.
127
128         * UIProcess/API/qt/tests/tests.pri:
129
130 2012-01-24  Zeno Albisser  <zeno@webkit.org>
131
132         [Qt][WK2] Application URL schemes cause asserts when using debug.
133         https://bugs.webkit.org/show_bug.cgi?id=76700
134
135         Instances of QtNetworkRequestData / QtNetworkReplyData are meant
136         to be used for transfering data over IPC. To allow transferring
137         instances of these classes over IPC they need to be copyable,
138         and it must be possible to create such instances on the stack.
139         Because classes that inherit from RefCounted always need to be
140         used in connection with RefPtr, QtNetworkRequestData and
141         QtNetworkReplyData cannot inherit directly from RefCounted.
142
143         Deleting an object that inherits from RefCounted, without
144         the proper sequence of ref()/deref() being called by it's
145         RefPtr, causes asserts when running a debug version.
146
147         Reviewed by Simon Hausmann.
148
149         * Shared/qt/QtNetworkReplyData.h:
150         (WebKit::QtRefCountedNetworkReplyData::data):
151         * Shared/qt/QtNetworkRequestData.cpp:
152         (WebKit::QtRefCountedNetworkRequestData::QtRefCountedNetworkRequestData):
153         * Shared/qt/QtNetworkRequestData.h:
154         (WebKit::QtRefCountedNetworkRequestData::data):
155         * Target.pri:
156         * UIProcess/API/qt/qquicknetworkreply.cpp:
157         (QQuickNetworkReply::QQuickNetworkReply):
158         (QQuickNetworkReply::contentType):
159         (QQuickNetworkReply::setContentType):
160         (QQuickNetworkReply::operation):
161         (QQuickNetworkReply::setOperation):
162         (QQuickNetworkReply::contentDisposition):
163         (QQuickNetworkReply::setContentDisposition):
164         (QQuickNetworkReply::location):
165         (QQuickNetworkReply::setLocation):
166         (QQuickNetworkReply::lastModified):
167         (QQuickNetworkReply::setLastModified):
168         (QQuickNetworkReply::cookie):
169         (QQuickNetworkReply::setCookie):
170         (QQuickNetworkReply::userAgent):
171         (QQuickNetworkReply::setUserAgent):
172         (QQuickNetworkReply::server):
173         (QQuickNetworkReply::setServer):
174         (QQuickNetworkReply::data):
175         (QQuickNetworkReply::setData):
176         (QQuickNetworkReply::send):
177         (QQuickNetworkReply::networkRequestData):
178         (QQuickNetworkReply::setNetworkRequestData):
179         (QQuickNetworkReply::networkReplyData):
180         * UIProcess/API/qt/qquicknetworkreply_p.h:
181         * UIProcess/API/qt/qquicknetworkrequest.cpp:
182         (QQuickNetworkRequest::QQuickNetworkRequest):
183         (QQuickNetworkRequest::setNetworkRequestData):
184         (QQuickNetworkRequest::url):
185         * UIProcess/API/qt/qquicknetworkrequest_p.h:
186         * UIProcess/API/qt/qquickwebview.cpp:
187         (QQuickWebViewExperimental::invokeApplicationSchemeHandler):
188         * UIProcess/API/qt/qquickwebview_p.h:
189         * UIProcess/WebPageProxy.h:
190         * UIProcess/qt/QtPageClient.cpp:
191         (QtPageClient::handleApplicationSchemeRequest):
192         * UIProcess/qt/QtPageClient.h:
193         * UIProcess/qt/WebPageProxyQt.cpp:
194         (WebKit::WebPageProxy::resolveApplicationSchemeRequest):
195         (WebKit::WebPageProxy::sendApplicationSchemeReply):
196         * WebProcess/qt/QtNetworkReply.cpp:
197         (WebKit::QtNetworkReply::setData):
198         (WebKit::QtNetworkReply::readData):
199
200 2012-01-24  Carlos Garcia Campos  <cgarcia@igalia.com>
201
202         [GTK] Implement DownloadClient in WebKit2 GTK+ API
203         https://bugs.webkit.org/show_bug.cgi?id=72952
204
205         Reviewed by Martin Robinson.
206
207         * GNUmakefile.am: Add new files to compilation.
208         * UIProcess/API/gtk/WebKitDownloadClient.cpp: Added.
209         (didStart): Call webkitWebContextDownloadStarted().
210         (didReceiveResponse): Call webkitDownloadSetResponse() with the
211         received response.
212         (didReceiveData): Call webkitDownloadNotifyProgress().
213         (decideDestinationWithSuggestedFilename): Call
214         webkitDownloadDecideDestinationWithSuggestedFilename().
215         (didCreateDestination): Call webkitDownloadDestinationCreated().
216         (didFail): Call webkitDownloadFailed() or
217         webkitDownloadCancelled() if the download was cancelled before
218         failing.
219         (didCancel): Call webkitDownloadCancelled().
220         (didFinish): Call webkitDownloadFinished().
221         (attachDownloadClientToContext): Add
222         implementation for download client callbacks.
223         * UIProcess/API/gtk/WebKitDownloadClient.h: Added.
224         * UIProcess/API/gtk/WebKitError.cpp:
225         (webkit_download_error_quark): Add quark for download errors.
226         * UIProcess/API/gtk/WebKitError.h:
227         * UIProcess/API/gtk/WebKitWebContext.cpp:
228         (webkit_web_context_class_init): Add download-started signal.
229         (createDefaultWebContext): Initialize the download client.
230         (downloadsMap): HashMap containing download objects for all
231         ongoing download operations.
232         (webkit_web_context_download_uri): Start a new download for the
233         given URI.
234         (webkitWebContextGetOrCreateDownload): Helper function to create a
235         new download object or return the existing one from the downloads map.
236         (webkitWebContextRemoveDownload): Remove the download object from
237         the downloads map.
238         (webkitWebContextDownloadStarted): Emit
239         WebKitWebContext::download-started for the given download object.
240         * UIProcess/API/gtk/WebKitWebContext.h:
241         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
242         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
243         * UIProcess/API/gtk/tests/GNUmakefile.am: Add new test for downloads.
244         * UIProcess/API/gtk/tests/TestDownloads.cpp: Added.
245         (getWebKit1TestResoucesDir):
246         (testDownloadLocalFile):
247         (testDownloadLocalFileError):
248         (serverCallback):
249         (testDownloadRemoteFile):
250         (testDownloadRemoteFileError):
251         (beforeAll):
252         (afterAll):
253
254 2012-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
255
256         [GTK] Add WebKitDownload to WebKit2 GTK+ API
257         https://bugs.webkit.org/show_bug.cgi?id=72949
258
259         Reviewed by Martin Robinson.
260
261         * GNUmakefile.am: Add new files to compilation.
262         * UIProcess/API/gtk/WebKitDownload.cpp: Added.
263         (webkitDownloadFinalize):
264         (webkitDownloadGetProperty):
265         (webkitDownloadDecideDestination):
266         (webkit_download_init):
267         (webkit_download_class_init):
268         (webkitDownloadCreate): Create a new WebKitDownload for a given
269         WKDownloadRef.
270         (webkitDownloadSetResponse): Set the network response of the
271         download.
272         (webkitDownloadIsCancelled): Whether the download has been
273         cancelled by the user.
274         (webkitDownloadNotifyProgress): Emit notify::estimated-progress if
275         needed.
276         (webkitDownloadFailed): Emit WebKitDownload::failed with the given
277         error.
278         (webkitDownloadCancelled): Emit WebKitDownload::failed with
279         cancelled error.
280         (webkitDownloadFinished): Emit WebKitDownload::finished.
281         (webkitDownloadDecideDestinationWithSuggestedFilename): Emit
282         WebKitDownload::decide-destination.
283         (webkitDownloadDestinationCreated): Emit
284         WebKitDownload::created-destination.
285         (webkit_download_get_destination): Return the destination URI of
286         the download.
287         (webkit_download_set_destination): Set the destination URI of the
288         download.
289         (webkit_download_get_response): Return the response received by
290         the server.
291         (webkit_download_cancel): Cancel the download.
292         (webkit_download_get_estimated_progress): Return the estimated
293         progress.
294         (webkit_download_get_elapsed_time): Return the time elapsed since
295         the download started.
296         * UIProcess/API/gtk/WebKitDownload.h: Added.
297         * UIProcess/API/gtk/WebKitDownloadPrivate.h: Added.
298         * UIProcess/API/gtk/WebKitPrivate.h:
299         * UIProcess/API/gtk/WebKitURIResponse.cpp:
300         (webkitURIResponseGetResourceResponse):
301         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
302         * UIProcess/API/gtk/docs/webkit2gtk.types: Add
303         webkit_download_get_type().
304         * UIProcess/API/gtk/webkit2.h: Include WebKitDownload.h.
305         * UIProcess/API/gtk/webkit2marshal.list:
306
307 2012-01-23  Geoffrey Garen  <ggaren@apple.com>
308
309         JSValue::toString() should return a JSString* instead of a UString
310         https://bugs.webkit.org/show_bug.cgi?id=76861
311
312         Reviewed by Gavin Barraclough.
313
314         Mechanical changes to call value() after calling toString(), to
315         convert from "JS string" (JSString*) to "C++ string" (UString), since
316         toString() no longer returns a "C++ string".
317
318         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
319         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
320
321 2012-01-23  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
322
323         [Qt][WK2] QQuickWebView is initializing touch mode twice while being constructed
324         https://bugs.webkit.org/show_bug.cgi?id=76859
325
326         Reviewed by Kenneth Rohde Christiansen.
327
328         Removing d->initializeTouch() from QQuickWebView::QQuickWebView()
329         since in QQuickWebViewPrivate::initialize() there is a call for
330         setUseTraditionalDesktopBehaviour(false), which will call initializeTouch.
331
332         * UIProcess/API/qt/qquickwebview.cpp:
333         (QQuickWebView::QQuickWebView):
334
335 2012-01-23  Martin Robinson  <mrobinson@igalia.com>
336
337         [GTK][WK2] Make the LoadTracking and WebView test fixtures more flexible
338         https://bugs.webkit.org/show_bug.cgi?id=76755
339
340         Reviewed by Alejandro G. Castro.
341
342         Always clear the loading events when loading new content in the load tracking
343         test. In the WebView test correctly handle loading HTML with a URL that isn't
344         "about:blank."
345
346         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
347         (LoadTrackingTest::loadURI): Reset the class state when starting a new load.
348         (LoadTrackingTest::loadHtml): Ditto.
349         (LoadTrackingTest::loadPlainText): Ditto.
350         (LoadTrackingTest::loadRequest): Ditto.
351         * UIProcess/API/gtk/tests/LoadTrackingTest.h: Added new method definitions.
352         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
353         (assertNormalLoadHappened): No longer clear loading events. The fixture handles that now.
354         (testLoadHtml): Update to reflect new method name.
355         (testLoadPlainText): Ditto.
356         (testLoadRequest): Ditto.
357         (testWebViewReload): Ditto.
358         * UIProcess/API/gtk/tests/WebViewTest.cpp:
359         (WebViewTest::loadHtml): Properly interpret the baseURL parameter.
360         * UIProcess/API/gtk/tests/WebViewTest.h: Make loading methods virtual.
361
362 2012-01-23  Alexander Færøy  <alexander.faeroy@nokia.com>
363
364         [Qt] Implement SSL error handling QML API.
365         https://bugs.webkit.org/show_bug.cgi?id=76793
366
367         Reviewed by Simon Hausmann.
368
369         This patch implements support for accepting or rejecting invalid SSL
370         certificates from the QML API.
371
372         * UIProcess/API/qt/qquickwebview.cpp:
373         (QQuickWebViewPrivate::QQuickWebViewPrivate):
374         (QQuickWebViewPrivate::handleCertificateVerificationRequest):
375         (QQuickWebViewExperimental::certificateVerificationDialog):
376         (QQuickWebViewExperimental::setCertificateVerificationDialog):
377         * UIProcess/API/qt/qquickwebview_p.h:
378         * UIProcess/API/qt/qquickwebview_p_p.h:
379         * UIProcess/PageClient.h:
380         * UIProcess/WebPageProxy.cpp:
381         (WebKit::WebPageProxy::certificateVerificationRequest):
382         * UIProcess/WebPageProxy.h:
383         * UIProcess/WebPageProxy.messages.in:
384         * UIProcess/qt/QtDialogRunner.cpp:
385         (CertificateVerificationDialogContextObject::CertificateVerificationDialogContextObject):
386         (CertificateVerificationDialogContextObject::hostname):
387         (CertificateVerificationDialogContextObject::accept):
388         (CertificateVerificationDialogContextObject::reject):
389         (QtDialogRunner::initForCertificateVerification):
390         * UIProcess/qt/QtDialogRunner.h:
391         * UIProcess/qt/QtPageClient.cpp:
392         (QtPageClient::handleCertificateVerificationRequest):
393         * UIProcess/qt/QtPageClient.h:
394         * WebProcess/qt/QtNetworkAccessManager.cpp:
395         (WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
396         (WebKit::QtNetworkAccessManager::onSslErrors):
397         * WebProcess/qt/QtNetworkAccessManager.h:
398
399 2012-01-23  David Levin  <levin@chromium.org>
400
401         [windows] Convert usages of GetDC to HWndDC Part 2.
402         https://bugs.webkit.org/show_bug.cgi?id=76750
403
404         Reviewed by Adam Roben.
405
406         * Shared/win/ShareableBitmapWin.cpp:
407         (WebKit::ShareableBitmap::windowsContext): Fix incorrect usage of OwnPtr<HDC> which
408         would do a DeleteDC instead of a ReleaseDC.
409
410 2012-01-23  David Levin  <levin@chromium.org>
411
412         [windows] Convert usages of GetDC to HWndDC Part 1.
413         https://bugs.webkit.org/show_bug.cgi?id=76744
414
415         Reviewed by Adam Roben.
416
417         * UIProcess/win/WebView.cpp:
418         (WebKit::WebView::flashBackingStoreUpdates): Typical conversion.
419
420 2012-01-21  Timothy Hatcher  <timothy@apple.com>
421
422         Make WebKit2 remember the height of the Web Inspector when it is docked.
423
424         https://webkit.org/b/76769
425
426         Reviewed by Dan Bernstein.
427
428         * Shared/WebPreferencesStore.h: Added InspectorAttachedHeight.
429         * UIProcess/WebInspectorProxy.cpp:
430         (WebKit::WebInspectorProxy::setAttachedWindowHeight): Call WebPreferencesStore::setInspectorAttachedHeight.
431         * UIProcess/mac/WebInspectorProxyMac.mm:
432         (WebKit::WebInspectorProxy::platformAttach): Set the height of the inspector's WKView to inspectorAttachedHeight.
433         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Remove unneeded setNeedsDisplay: calls.
434
435 2012-01-20  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
436
437         [Qt] [WK2] Division by zero error in QtViewportInteractionEngine::setItemRectVisible
438         https://bugs.webkit.org/show_bug.cgi?id=76674
439
440         Reviewed by Kenneth Rohde Christiansen.
441
442         Make sure that itemRect is not empty.
443
444         * UIProcess/qt/QtViewportInteractionEngine.cpp:
445         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
446
447 2012-01-20  Steve Falkenburg  <sfalken@apple.com>
448
449         Reviewed by Alexey Proskuryakov.
450
451         Drag/drop of a file into a WebView on Windows needs to allow access to that file
452         https://bugs.webkit.org/show_bug.cgi?id=76753
453         <rdar://problem/10731719>
454         
455         The Windows drag/drop code path was missing the code to open a file read exception.
456
457         Added code to match the Mac version, while allowing directories and multiple files to
458         also be dragged (matching our previous behavior).
459
460         * UIProcess/win/WebView.cpp:
461         (WebKit::maybeCreateSandboxExtensionFromDragData): Added.
462         (WebKit::WebView::Drop): Add a universal read exception if we're dragging a file into a WebView to open it.
463
464 2012-01-20  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
465
466         [Qt] Trigger forcing accelerated compositing from the UI process side.
467         https://bugs.webkit.org/show_bug.cgi?id=76296
468
469         Reviewed by Noam Rosenthal.
470
471         Some messages can be sent from the web view to the LayerTreeHost before
472         accelerated compositing is entered on the web process and signaled back.
473         By letting the UI process decide if AC has to be forced, we can create
474         the LayerTreeHostProxy earlier to send messages to the web process while
475         AC is being entered there.
476
477         This patch also fixes the flow of DidRenderFrame and RenderNextFrame messages
478         by setting the m_waitingForUIProcess flag properly and only send the
479         RenderNextFrame once the painting thread on the UI process is ready to paint.
480
481         This fixes the first visible content rect message not being received when
482         loading pages from the disk.
483
484         * Shared/WebPreferencesStore.h:
485         * UIProcess/API/qt/qquickwebview.cpp:
486         (QQuickWebViewPrivate::initialize):
487         * UIProcess/DrawingAreaProxyImpl.cpp:
488         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
489         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
490         (WebKit::LayerTreeHostProxy::flushLayerChanges):
491         (WebKit::LayerTreeHostProxy::didRenderFrame):
492         * WebProcess/WebPage/DrawingAreaImpl.cpp:
493         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
494         * WebProcess/WebPage/WebPage.cpp:
495         (WebKit::WebPage::updatePreferences):
496         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
497         (WebKit::LayerTreeHostQt::performScheduledLayerFlush):
498         * WebProcess/WebPage/qt/WebPageQt.cpp:
499         (WebKit::WebPage::platformInitialize):
500
501 2012-01-20  Sheriff Bot  <webkit.review.bot@gmail.com>
502
503         Unreviewed, rolling out r105497.
504         http://trac.webkit.org/changeset/105497
505         https://bugs.webkit.org/show_bug.cgi?id=76696
506
507         Leaking in Qt layout tests and timing out in GTK API tests.
508         (Requested by jturcotte on #webkit).
509
510         * Shared/WebPreferencesStore.h:
511         * UIProcess/API/qt/qquickwebview.cpp:
512         (QQuickWebViewPrivate::initialize):
513         * UIProcess/DrawingAreaProxyImpl.cpp:
514         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
515         * WebProcess/WebPage/DrawingAreaImpl.cpp:
516         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
517         * WebProcess/WebPage/WebPage.cpp:
518         (WebKit::WebPage::updatePreferences):
519         * WebProcess/WebPage/qt/WebPageQt.cpp:
520         (WebKit::WebPage::platformInitialize):
521
522 2012-01-20  Mario Sanchez Prada  <msanchez@igalia.com>
523
524         [GTK] Expose accessibility hierarchy in WebKit2 to ATK/AT-SPI based ATs
525         https://bugs.webkit.org/show_bug.cgi?id=72589
526
527         Reviewed by Martin Robinson.
528
529         Expose the accessibility hierarchy in the multi-process
530         architecture of WK2 through AtkSocket and AtkPlug.
531
532         Make the WebView widget return an AtkSocket when calling to
533         gtk_widget_get_accessible().
534
535         * GNUmakefile.am: Add new files.
536         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
537         (webkit_web_view_base_init):
538         (webkitWebViewBaseGetAccessible):
539         (webkit_web_view_base_class_init):
540         * UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp: Added.
541         (webkitWebViewBaseAccessibleWidgetFinalize):
542         (webkitWebViewBaseAccessibleWidgetDestroyed):
543         (webkitWebViewBaseAccessibleInitialize):
544         (webkitWebViewBaseAccessibleRefStateSet):
545         (webkitWebViewBaseAccessibleGetIndexInParent):
546         (webkit_web_view_base_accessible_init):
547         (webkit_web_view_base_accessible_class_init):
548         (webkitWebViewBaseAccessibleNew):
549         * UIProcess/API/gtk/WebKitWebViewBaseAccessible.h: Added.
550
551         Make the WebPage create an AtkPlug on its initialization and
552         sending the ID of that plug to the UI process, so it can embed the
553         plug in the socket.
554
555         Also, take care of all the needed wrapping around the WebCore's
556         accessibility objects, exposing them in the UI process's
557         accessibility hierarchy thanks to the socket-plug connection.
558
559         * UIProcess/WebPageProxy.h:
560         (WebKit::WebPageProxy::accessibilityPlugID):
561         * UIProcess/WebPageProxy.messages.in:
562         * UIProcess/gtk/WebPageProxyGtk.cpp:
563         (WebKit::WebPageProxy::bindAccessibilityTree):
564         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
565         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
566         * WebProcess/WebPage/WebPage.cpp:
567         (WebKit::WebPage::WebPage):
568         * WebProcess/WebPage/gtk/WebPageAccessibilityObject.cpp: Added.
569         (accessibilityRootObjectWrapper):
570         (webPageAccessibilityObjectInitialize):
571         (webPageAccessibilityObjectGetIndexInParent):
572         (webPageAccessibilityObjectGetNChildren):
573         (webPageAccessibilityObjectRefChild):
574         (web_page_accessibility_object_init):
575         (web_page_accessibility_object_class_init):
576         (webPageAccessibilityObjectNew):
577         (webPageAccessibilityObjectRefresh):
578         * WebProcess/WebPage/gtk/WebPageAccessibilityObject.h: Added.
579         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
580         (WebKit::WebPage::platformInitialize):
581         (WebKit::WebPage::updateAccessibilityTree):
582
583         New unit test for checking accessibility support in WK2GTK.
584
585         * UIProcess/API/gtk/tests/AccessibilityTestServer.cpp: Added.
586         (loadChangedCallback): Notify the parent process (the test)
587         when ready.
588         (main):
589         * UIProcess/API/gtk/tests/GNUmakefile.am:
590         * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp: Added.
591         (stopTestServer):
592         (sigAbortHandler):
593         (testServerMonitorThreadFunc):
594         (startTestServerMonitor):
595         (startTestServer):
596         (checkAtspiAccessible):
597         (findTestServerApplication):
598         (testAtspiBasicHierarchy):
599         (beforeAll):
600         (afterAll):
601
602 2012-01-19  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
603
604         [Qt] Public API watch dog auto test.
605         https://bugs.webkit.org/show_bug.cgi?id=73922
606
607         Reviewed by Simon Hausmann.
608
609         This test aims to prevent unintended/unapproved
610         modifications to the public QML API.
611
612         * UIProcess/API/qt/tests/publicapi/publicapi.pro: Added.
613         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: Added.
614         (isCheckedEnum):
615         (isCheckedClass):
616         (checkKnownType):
617         (gatherAPI):
618         (tst_publicapi::publicAPI):
619
620 2012-01-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
621
622         [Qt] Trigger forcing accelerated compositing from the UI process side.
623         https://bugs.webkit.org/show_bug.cgi?id=76296
624
625         Reviewed by Noam Rosenthal.
626
627         Some messages can be sent from the web view to the LayerTreeHost before
628         accelerated compositing is entered on the web process and signaled back.
629         By letting the UI process decide if AC has to be forced, we can create
630         the LayerTreeHostProxy earlier to send messages to the web process while
631         AC is being entered there.
632
633         This fixes the first visible content rect message not being received when
634         loading pages from the disk.
635
636         * Shared/WebPreferencesStore.h:
637         * UIProcess/API/qt/qquickwebview.cpp:
638         (QQuickWebViewPrivate::initialize):
639         * UIProcess/DrawingAreaProxyImpl.cpp:
640         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
641         * WebProcess/WebPage/DrawingAreaImpl.cpp:
642         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
643         * WebProcess/WebPage/WebPage.cpp:
644         (WebKit::WebPage::updatePreferences):
645         * WebProcess/WebPage/qt/WebPageQt.cpp:
646         (WebKit::WebPage::platformInitialize):
647
648 2012-01-20  Alexandru Chiculita  <achicu@adobe.com>
649
650         CSS Shaders: Add a Settings flag to enable/disable CSS Shaders at runtime
651         https://bugs.webkit.org/show_bug.cgi?id=76444
652
653         Reviewed by Nikolas Zimmermann.
654
655         * Shared/WebPreferencesStore.h:
656         * UIProcess/API/C/WKPreferences.cpp:
657         (WKPreferencesSetCSSCustomFilterEnabled):
658         (WKPreferencesGetCSSCustomFilterEnabled):
659         * UIProcess/API/C/WKPreferencesPrivate.h:
660         * WebProcess/WebPage/WebPage.cpp:
661         (WebKit::WebPage::updatePreferences):
662
663 2012-01-19  Sam Weinig  <sam@webkit.org>
664
665         Replace improper #import with an #include.
666
667         * UIProcess/Plugins/PluginProcessProxy.cpp:
668         Fixes warnings.
669
670 2012-01-18  Sam Weinig  <sam@webkit.org>
671
672         Move RunLoop to WebCore/platform
673         https://bugs.webkit.org/show_bug.cgi?id=76471
674
675         Reviewed by Anders Carlsson.
676
677         * GNUmakefile.am:
678         * Platform/CoreIPC/Connection.cpp:
679         * Platform/CoreIPC/Connection.h:
680         * Platform/CoreIPC/mac/ConnectionMac.cpp:
681         * PluginProcess/PluginControllerProxy.h:
682         * PluginProcess/PluginProcess.cpp:
683         * PluginProcess/PluginProcess.h:
684         * PluginProcess/WebProcessConnection.cpp:
685         * PluginProcess/mac/PluginProcessMainMac.mm:
686         * PluginProcess/qt/PluginProcessMainQt.cpp:
687         * Shared/ChildProcess.cpp:
688         * Shared/ChildProcess.h:
689         * Target.pri:
690         * UIProcess/API/mac/FindIndicatorWindow.h:
691         * UIProcess/API/mac/WKView.mm:
692         * UIProcess/DrawingAreaProxyImpl.h:
693         * UIProcess/Launcher/ThreadLauncher.cpp:
694         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
695         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
696         * UIProcess/Launcher/mac/ThreadLauncherMac.mm:
697         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
698         * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
699         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
700         * UIProcess/Launcher/win/ThreadLauncherWin.cpp:
701         * UIProcess/LayerTreeHostProxy.h:
702         * UIProcess/Plugins/PluginProcessProxy.cpp:
703         * UIProcess/ResponsivenessTimer.cpp:
704         * UIProcess/ResponsivenessTimer.h:
705         * UIProcess/TiledDrawingAreaProxy.h:
706         * UIProcess/VisitedLinkProvider.h:
707         * UIProcess/WebConnectionToWebProcess.cpp:
708         * UIProcess/WebConnectionToWebProcess.h:
709         * UIProcess/WebContext.cpp:
710         * UIProcess/win/WebView.cpp:
711         * WebKit2.xcodeproj/project.pbxproj:
712         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
713         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
714         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
715         * WebProcess/Plugins/PluginView.h:
716         * WebProcess/WebConnectionToUIProcess.cpp:
717         * WebProcess/WebConnectionToUIProcess.h:
718         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
719         * WebProcess/WebPage/DrawingAreaImpl.h:
720         * WebProcess/WebPage/EventDispatcher.cpp:
721         * WebProcess/WebPage/PageOverlay.h:
722         * WebProcess/WebPage/WebPage.cpp:
723         * WebProcess/WebPage/WebPage.h:
724         * WebProcess/WebProcess.cpp:
725         * WebProcess/WebProcess.h:
726         (WebKit::WebProcess::runLoop):
727         * WebProcess/gtk/WebProcessMainGtk.cpp:
728         * WebProcess/mac/WebProcessMainMac.mm:
729         * WebProcess/qt/WebProcessMainQt.cpp:
730         * WebProcess/win/WebProcessMainWin.cpp:
731         * win/WebKit2.vcproj:
732         Remove RunLoop code and update #includes.
733
734 2012-01-18  Ada Chan  <adachan@apple.com>
735
736         Need a WebKit2 API for setting media volume
737         https://bugs.webkit.org/show_bug.cgi?id=76560
738
739         Reviewed by Dan Bernstein.
740
741         * Shared/WebPageCreationParameters.cpp:
742         (WebKit::WebPageCreationParameters::encode): Encode the mediaVolume parameter.
743         (WebKit::WebPageCreationParameters::decode): Decode the mediaVolume parameter.
744         * Shared/WebPageCreationParameters.h:
745         * UIProcess/API/C/WKPage.cpp:
746         (WKPageSetMediaVolume): Call WebPageProxy::setMediaVolume().
747         * UIProcess/API/C/WKPagePrivate.h:
748         * UIProcess/WebPageProxy.cpp:
749         (WebKit::WebPageProxy::WebPageProxy): Initialize new data member m_mediaVolume.
750         (WebKit::WebPageProxy::setMediaVolume): Bail if the volume hasn't changed. Update m_mediaVolume 
751         and bail if the page is no longer valid.  Otherwise, send a WebPage::SetMediaVolume message to 
752         the web process.
753         (WebKit::WebPageProxy::creationParameters): Add media volume to the creation parameters.
754         * UIProcess/WebPageProxy.h:
755         * WebProcess/WebPage/WebPage.cpp:
756         (WebKit::WebPage::WebPage): Initialize media volume from the WebPageCreationParameters.
757         (WebKit::WebPage::setMediaVolume): Call Page::setMediaVolume().
758         * WebProcess/WebPage/WebPage.h:
759         * WebProcess/WebPage/WebPage.messages.in: Add the SetMediaVolume message.
760
761 2012-01-19  Carlos Garcia Campos  <cgarcia@igalia.com>
762
763         [GTK] WebKit2 GTK+ API public headers are not installed
764         https://bugs.webkit.org/show_bug.cgi?id=76626
765
766         Reviewed by Martin Robinson.
767
768         * GNUmakefile.am: Rename webkit2gtk_headers as
769         libwebkit2gtkinclude_HEADERS to match libwebkit2gtkincludedir so
770         that headers are installed during make install.
771
772 2012-01-19  Carlos Garcia Campos  <cgarcia@igalia.com>
773
774         [GTK] Add print-backgrounds setting to WebKit2 GTK+ API
775         https://bugs.webkit.org/show_bug.cgi?id=76616
776
777         Reviewed by Martin Robinson.
778
779         * UIProcess/API/gtk/WebKitSettings.cpp:
780         (webKitSettingsSetProperty):
781         (webKitSettingsGetProperty):
782         (webkit_settings_class_init):
783         (webkit_settings_get_print_backgrounds):
784         (webkit_settings_set_print_backgrounds):
785         * UIProcess/API/gtk/WebKitSettings.h:
786         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
787         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
788         (testWebKitSettings):
789
790 2012-01-18  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
791
792         [Qt] Handle the layers visible rect calculation on the web process.
793         https://bugs.webkit.org/show_bug.cgi?id=74720
794
795         Reviewed by Noam Rosenthal.
796
797         The layers now get their visible rect on the web process through the
798         root layer when the UI process call setVisibleContentRectAndScale,
799         previously only used for the non-composited content layer.
800         The rect is then carried down the layers in the tree which apply it the inverse
801         of their transform before handing it to their tiled backing store.
802
803         This ensures that new layers get a proper visible rect right on creation,
804         and also that simultaneous visible rect and scale changes are applied synchronously.
805
806         This patch also uses clampedBoundsOfProjectedQuad instead of mapRect
807         to transform the visible rect correctly for 3D transformed layers.
808
809         * UIProcess/API/qt/qquickwebview.cpp:
810         (QQuickWebViewPrivate::initializeDesktop):
811         (QQuickWebViewPrivate::initializeTouch):
812         (QQuickWebViewPrivate::updateDesktopViewportSize):
813         (QQuickWebViewPrivate::updateTouchViewportSize):
814         (QQuickWebView::geometryChanged):
815         Make sure that the visible rect is updated for the desktop view as well.
816         * UIProcess/API/qt/qquickwebview_p_p.h:
817         * UIProcess/LayerTreeHostProxy.h:
818         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
819         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
820         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
821         (WebCore::WebGraphicsLayer::setChildren):
822         (WebCore::WebGraphicsLayer::addChild):
823         (WebCore::WebGraphicsLayer::addChildAtIndex):
824         (WebCore::WebGraphicsLayer::addChildAbove):
825         (WebCore::WebGraphicsLayer::addChildBelow):
826         (WebCore::WebGraphicsLayer::replaceChild):
827         (WebCore::WebGraphicsLayer::setMaskLayer):
828         (WebCore::WebGraphicsLayer::syncCompositingState):
829         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
830         (WebCore::WebGraphicsLayer::setVisibleContentRectAndScale):
831         (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
832         (WebCore::WebGraphicsLayer::computeTransformedVisibleRect):
833         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
834         * WebProcess/WebPage/LayerTreeHost.messages.in:
835         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
836         (WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
837         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
838
839 2012-01-18  Jon Lee  <jonlee@apple.com>
840
841         Another build fix for r105364.
842
843         * WebProcess/mac/WebProcessMac.mm:
844         (WebKit::WebProcess::platformInitializeWebProcess): Missing #if.
845
846 2012-01-18  Jon Lee  <jonlee@apple.com>
847
848         Build fix for r105364. Unreviewed.
849
850         * WebProcess/Notifications/WebNotificationManager.cpp: Wrap methods in #if ENABLE(NOTIFICATIONS)
851         (WebKit::WebNotificationManager::initialize):
852         (WebKit::WebNotificationManager::didUpdateNotificationDecision):
853         (WebKit::WebNotificationManager::didRemoveNotificationDecisions):
854         (WebKit::WebNotificationManager::policyForOrigin):
855
856 2012-01-18  Jon Lee  <jonlee@apple.com>
857
858         [WK2] Sync call for notifications permissions causes flashes on gmail.com
859         https://bugs.webkit.org/show_bug.cgi?id=76570
860         <rdar://problem/10647155>
861
862         Reviewed by Anders Carlsson and Sam Weinig.
863
864         The website code figures out the permission level for its security origin by making a JS call (called
865         checkPermission()) that is synchronous. The way this was implemented was to make a synchronous call from
866         the WebNotificationManager to its proxy. That call goes to the WK API layer to find the policy, and
867         returns that policy back to the JS.
868
869         The synchronous nature of this call causes the white flash to appear in certain cases.
870
871         To fix this, the checkPermission() call is handled all within the web process, instead of going up into
872         the UI process. To do this, the web process initializes the WebNotificationManager with a copy of the
873         notification permissions. Any time the WK client makes a change to the permissions, that gets sent down
874         asynchronously, and the cached copy in WebNotificationManager gets updated.
875
876         A page's settings may disable notifications altogether. Before, this would have been handled by the WK
877         client, since retrieving the permissions were also handled there. Now that the lookup happens in the web
878         process, we need to add that setting in WebCore.
879
880         == Update notification permissions to use the security origin's string representation, rather than its
881         database identifier.
882
883         * UIProcess/Notifications/WebNotification.cpp:
884         (WebKit::WebNotification::WebNotification):
885         * UIProcess/Notifications/WebNotification.h:
886         (WebKit::WebNotification::create):
887         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
888         (WebKit::WebNotificationManagerProxy::show): Registering the provider with the manager is handled in
889         initialize() now.
890         (WebKit::WebNotificationManagerProxy::cancel): Registering the provider with the manager is handled in
891         initialize() now.
892         * UIProcess/Notifications/WebNotificationManagerProxy.h:
893         * UIProcess/WebPageProxy.cpp:
894         (WebKit::WebPageProxy::requestNotificationPermission):
895         (WebKit::WebPageProxy::showNotification):
896         * UIProcess/WebPageProxy.h:
897
898         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
899         (WebKit::NotificationPermissionRequestManager::startRequest): Only start the request if notifications
900         are enabled.
901         * WebProcess/Notifications/WebNotificationManager.cpp:
902         (WebKit::WebNotificationManager::show): Only show notification is they are enabled.
903         (WebKit::WebNotificationManager::cancel): Only cancel if notifications are enabled.
904
905         == Remove synchronous message to get policy for a given origin. Instead, use the cached copy in
906         WebNotificationManager.
907
908         * WebProcess/Notifications/WebNotificationManager.h:
909         * WebProcess/Notifications/WebNotificationManager.cpp:
910         (WebKit::WebNotificationManager::policyForOrigin): Looks for the permission in the cached copy.
911         If it doesn't exist, return NotificationPresenter::PermissionNotAllowed.
912         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
913         (WebKit::NotificationPermissionRequestManager::permissionLevel): Update permissionLevel to use
914         policyForOrigin().
915
916         Remove old WK API function to get the policy. Because this function was the only synchronous message,
917         we remove the sync-message-related functions also. Also, add in some #includes that might have been
918         omitted in prior patches.
919
920         * UIProcess/API/C/WKNotificationProvider.h:
921         * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Remove NotificationPermissionLevel.
922         * UIProcess/Notifications/WebNotificationManagerProxy.h:
923         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
924
925         * UIProcess/Notifications/WebNotificationProvider.h: Remove policyForNotificationPermissionAtOrigin().
926         * UIProcess/Notifications/WebNotificationProvider.cpp:
927
928         * UIProcess/WebProcessProxy.cpp:
929         (WebKit::WebProcessProxy::didReceiveSyncMessage): Remove conditional to forward sync messages to the
930         notification manager proxy.
931
932         == Mechanism for client to update the permissions copy in WebNotificationManager.
933
934         * WebProcess/Notifications/WebNotificationManager.messages.in: Add new messages
935         didUpdateNotificationDecision and didRemoveNotificationDecisions.
936         * WebProcess/Notifications/WebNotificationManager.h:
937         * WebProcess/Notifications/WebNotificationManager.cpp:
938         (WebKit::WebNotificationManager::initialize):
939         (WebKit::WebNotificationManager::didUpdateNotificationDecision): Update the entry.
940         (WebKit::WebNotificationManager::didRemoveNotificationDecisions): Remove the entry.
941
942         * UIProcess/Notifications/WebNotificationManagerProxy.h:
943         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
944         (WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
945         (WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies): Convert the array of
946         origins to remove, and send it to the WebNotificationManager.
947
948         * UIProcess/API/C/WKNotificationManager.h: Expose these update functions as WK API.
949         * UIProcess/API/C/WKNotificationManager.cpp:
950         (WKNotificationManagerProviderDidUpdateNotificationPolicy):
951         (WKNotificationManagerProviderDidRemoveNotificationPolicies):
952
953         == Initialize WebNotificationManager with permissions. Initialize WebPage with notifications enabled bit
954         from settings.
955
956         * Shared/WebProcessCreationParameters.h: Add map of notification permissions as part of the
957         parameters.
958         * Shared/WebProcessCreationParameters.cpp:
959         (WebKit::WebProcessCreationParameters::encode):
960         (WebKit::WebProcessCreationParameters::decode):
961
962         * UIProcess/Notifications/WebNotificationProvider.h: Retrieve copy of existing notification permissions.
963         * UIProcess/Notifications/WebNotificationProvider.cpp:
964         * UIProcess/API/C/WKNotificationProvider.h: Add WK API to get a copy of the permissions.
965
966         * UIProcess/Notifications/WebNotificationManagerProxy.h: Add populateCopyOfNotificationPermissions().
967         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
968         (WebKit::WebNotificationManagerProxy::initializeProvider): Add the manager at the time of initialization.
969         Similar calls in show() and cancel() are removed in following patch.
970         (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions): Clear the existing copy.
971         Populate with origin string, and whether that origin is allowed to post. If no decision has been made
972         by the user, then there should be no item in this dictionary.
973
974         * UIProcess/WebContext.cpp:
975         (WebKit::WebContext::ensureWebProcess): When the web process is initialized, we get a copy of the
976         permissions, and send it to the web process to initialize the notification manager.
977         * WebProcess/mac/WebProcessMac.mm:
978         (WebKit::WebProcess::platformInitializeWebProcess): Initialize the notification manager.
979
980         * WebProcess/Notifications/WebNotificationManager.h:
981         * WebProcess/Notifications/WebNotificationManager.cpp:
982         (WebKit::WebNotificationManager::initialize): Initialize the permissions copy.
983
984         * WebProcess/WebPage/WebPage.cpp:
985         (WebKit::WebPage::updatePreferences): Set notifications enabled bit from settings.
986
987         == Expose toString() method from WebCore::SecurityOrigin. Work is also towards bug 74956.
988
989         * Shared/API/c/WKSecurityOrigin.h: Refactor WKSecurityOriginCreateFromIdentifier to
990         WKSecurityOriginCreateFromDatabaseIdentifier and add WKSecurityOriginCreateFromString function.
991         * Shared/API/c/WKSecurityOrigin.cpp:
992         (WKSecurityOriginCreateFromString):
993         (WKSecurityOriginCreateFromDatabaseIdentifier):
994         (WKSecurityOriginCopyToString):
995
996         Refactor WebSecurityOrigin::create() to WebSecurityOrigin::createFromDatabaseIdentifier()
997         and add WebSecurityOrigin::createFromString().
998
999         * Shared/WebSecurityOrigin.h:
1000         (WebKit::WebSecurityOrigin::createFromString):
1001         (WebKit::WebSecurityOrigin::createFromDatabaseIdentifier):
1002         (WebKit::WebSecurityOrigin::toString): Added function.
1003         
1004         Refactor with renamed createFromDatabaseIdentifier() method.
1005         
1006         * UIProcess/WebDatabaseManagerProxy.cpp:
1007         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
1008         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
1009         (WebKit::WebDatabaseManagerProxy::didModifyOrigin):
1010         (WebKit::WebDatabaseManagerProxy::didModifyDatabase):
1011         * UIProcess/WebPageProxy.cpp:
1012         (WebKit::WebPageProxy::exceededDatabaseQuota):
1013         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
1014
1015         == Add WK API calls to change notificationsEnabled bit in WebCore::Settings.
1016
1017         * Shared/WebPreferencesStore.h:
1018         * UIProcess/API/C/WKPreferences.cpp:
1019         (WKPreferencesSetNotificationsEnabled):
1020         (WKPreferencesGetNotificationsEnabled):
1021         * UIProcess/API/C/WKPreferences.h:
1022
1023 2012-01-18  Anders Carlsson  <andersca@apple.com>
1024
1025         REGRESSION (r88886): Tabs restore blank when running Safari with a nightly build for the first time
1026         https://bugs.webkit.org/show_bug.cgi?id=76587
1027         <rdar://problem/9739135>
1028
1029         Reviewed by Sam Weinig.
1030
1031         * UIProcess/cf/WebPageProxyCF.cpp:
1032         Change CurrentSessionStateDataVersion back to 2.
1033
1034         * WebProcess/WebPage/DecoderAdapter.cpp:
1035         (WebKit::DecoderAdapter::decodeString):
1036         * WebProcess/WebPage/EncoderAdapter.cpp:
1037         (WebKit::EncoderAdapter::encodeString):
1038         Backport the CoreIPC string encoding and decoding functions that were in place prior to r88886.
1039
1040 2012-01-17  Alexey Proskuryakov  <ap@apple.com>
1041
1042         [Mac] Add a flag telling plug-in if it can enter sandbox
1043         https://bugs.webkit.org/show_bug.cgi?id=76467
1044
1045         Reviewed by Anders Carlsson.
1046
1047         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1048         (WebKit::NPN_GetValue): Added a private flag.
1049
1050 2012-01-18  Eric Carlson  <eric.carlson@apple.com>
1051
1052         Provide access to user's list of preferred languages
1053         https://bugs.webkit.org/show_bug.cgi?id=76138
1054
1055         Reviewed by Alexey Proskuryakov.
1056
1057         * Shared/WebProcessCreationParameters.cpp:
1058         (WebKit::WebProcessCreationParameters::encode): Encode the languages array.
1059         (WebKit::WebProcessCreationParameters::decode): Decode the languages array.
1060         * Shared/WebProcessCreationParameters.h:
1061
1062         * UIProcess/WebContext.cpp:
1063         (WebKit::WebContext::languageChanged): Override the WebProcess userPreferredLanguages.
1064         (WebKit::WebContext::ensureWebProcess): Initialize parameters.languages.
1065
1066         * WebProcess/WebProcess.cpp:
1067         (WebKit::WebProcess::initializeWebProcess): Override user languages array.
1068         (WebKit::WebProcess::userPreferredLanguagesChanged): Ditto.
1069         * WebProcess/WebProcess.h:
1070         * WebProcess/WebProcess.messages.in: Define UserPreferredLanguagesChanged.
1071
1072         * win/WebKit2.def: Export the new functions.
1073         * win/WebKit2CFLite.def: Ditto.
1074
1075 2012-01-18  Luciano Wolf  <luciano.wolf@openbossa.org>
1076
1077         [Qt][WK2] Broken build with undefined reference to shm_open and shm_unlink
1078         https://bugs.webkit.org/show_bug.cgi?id=76538
1079
1080         Reviewed by Tor Arne Vestbø.
1081
1082         The -lrt parameter was coming before -lWebKit2 during linkage.
1083
1084         Moved rt lib inclusion from Source/api.pri to WebKit2.pri as it should be aware
1085         of its own dependencies instead of letting WebKit guess about. Letting
1086         it on api.pri can lead to a wrong parameter's order during linker phase.
1087         Ubuntu 11.10 was giving errors about SharedMemory (shm_open and
1088         shm_unlink undefined symbols).
1089
1090         The issue was fixed with the help of Aloisio Almeida and Lauro Venancio.
1091
1092         * WebKit2.pri:
1093
1094 2012-01-18  Carlos Garnacho  <carlosg@gnome.org>
1095
1096         [GTK] Listen to GDK_SCROLL_MASK
1097         https://bugs.webkit.org/show_bug.cgi?id=76529
1098
1099         Set GDK_SCROLL_MASK explicitly, as WebKitWebViewBase does handle
1100         scroll events, scrolling currently works because GTK+ happens 
1101         to send such events to widgets listening to GDK_BUTTON_PRESS_MASK,
1102         but this isn't the intended behavior, so it's subject to change.
1103
1104         Reviewed by Martin Robinson.
1105
1106         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1107         (webkitWebViewBaseRealize):
1108
1109 2012-01-18  Andras Becsi  <andras.becsi@nokia.com>
1110
1111         [Qt][WK2] Fix the debug build.
1112
1113         Unreviewed.
1114
1115         * UIProcess/qt/QtWebPageEventHandler.cpp:
1116         (setInputPanelVisible): Remove assertion from non-member function.
1117
1118 2012-01-12  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1119
1120         [Qt] Zoom in to the focused node only when vkb starts becoming visible
1121         https://bugs.webkit.org/show_bug.cgi?id=76174
1122
1123         Reviewed by Simon Hausmann.
1124
1125         Remove the old code which always zoomed in when something got focus,
1126         even via JavaScript, and replaced it with code checking the state of
1127         the Qt input panel.
1128
1129         Also make sure that we do not zoom in or request the input panel if
1130         the item is not focused.
1131
1132         * UIProcess/PageClient.h:
1133         * UIProcess/WebPageProxy.cpp:
1134         * UIProcess/WebPageProxy.h:
1135         * UIProcess/WebPageProxy.messages.in:
1136         * UIProcess/qt/QtPageClient.cpp:
1137         * UIProcess/qt/QtPageClient.h:
1138         * UIProcess/qt/QtWebPageEventHandler.cpp:
1139         (QtWebPageEventHandler::QtWebPageEventHandler):
1140         (QtWebPageEventHandler::~QtWebPageEventHandler):
1141         (QtWebPageEventHandler::inputPanelVisibleChanged):
1142         * UIProcess/qt/QtWebPageEventHandler.h:
1143         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1144         (WebKit::WebEditorClient::respondToChangedSelection):
1145
1146 2012-01-18  Shinya Kawanaka  <shinyak@google.com>
1147
1148         Move ShadowContentElement from dom/ to html/ and make ShadowContentElement subclass of HTMLElement.
1149         https://bugs.webkit.org/show_bug.cgi?id=76241
1150
1151         Reviewed by Dimitri Glazkov.
1152
1153         * win/WebKit2.def: Exposed necessary symbols.
1154         * win/WebKit2CFLite.def: ditto.
1155
1156 2012-01-17  Hajime Morrita  <morrita@chromium.org>
1157
1158         [Internals] Should be able to access corresponding Document object.
1159         https://bugs.webkit.org/show_bug.cgi?id=76425
1160
1161         Reviewed by Adam Barth.
1162
1163         * win/WebKit2.def: Added exporting symbols.
1164         * win/WebKit2CFLite.def: Added exporting symbols.
1165
1166 2012-01-17  Matthew Delaney  <mdelaney@apple.com>
1167
1168         On post-Lion releases, preserve the Lion behavior where WebKit explicitly calls -setGeometryFlipped on the hosting layer for applications that were linked on Lion or earlier.
1169         <rdar://problem/10692025>
1170
1171         Reviewed by Simon Fraser.
1172
1173         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: Init new function.
1174         (InitWebCoreSystemInterface):
1175
1176 2012-01-17  Sam Weinig  <sam@webkit.org>
1177
1178         Rename quickLookPreviewItemsAtWindowLocation: to quickLookWithEvent:
1179         <rdar://problem/10688913>
1180
1181         Reviewed by Anders Carlsson.
1182
1183         * UIProcess/API/mac/WKView.mm:
1184         (-[WKView quickLookWithEvent:]):
1185
1186 2012-01-17  Sam Weinig  <sam@webkit.org>
1187
1188         Add helper macro for forward declaring objective-c classes
1189         https://bugs.webkit.org/show_bug.cgi?id=76485
1190
1191         Reviewed by Anders Carlsson.
1192
1193         * WebProcess/WebCoreSupport/WebDragClient.h:
1194         Deploy OBJC_CLASS for a little code reduction.
1195
1196         * config.h:
1197         Remove duplicate copy of OBJC_CLASS.
1198
1199 2012-01-17  Martin Robinson  <mrobinson@igalia.com>
1200
1201         [GTK] [WK2] WebKitPrivate should include the entire WebKit2 C API
1202         https://bugs.webkit.org/show_bug.cgi?id=76345
1203
1204         Reviewed by Gustavo Noronha Silva.
1205
1206         Isolate all of the WebKit2 C API includes into WebKitPrivate.h and no longer
1207         include anything other than WebKit2.h for the C API.
1208
1209         * UIProcess/API/gtk/WebKitBackForwardList.cpp: Use WebKitPrivate.h now.
1210         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Ditto.
1211         * UIProcess/API/gtk/WebKitPrivate.h: Add WebKit2.h, WKAPICast.h and WKRetainPtr.h includes.
1212         * UIProcess/API/gtk/WebKitSettings.cpp: Use WebKitPrivate.h.
1213         * UIProcess/API/gtk/WebKitUIClient.cpp: Ditto.
1214         * UIProcess/API/gtk/WebKitWebContext.cpp: Ditto.
1215         * UIProcess/API/gtk/WebKitWebView.cpp: Ditto.
1216         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto.
1217         * UIProcess/API/gtk/WebKitWindowProperties.cpp: Ditto.
1218
1219 2012-01-17  Alexander Færøy  <alexander.faeroy@nokia.com>
1220
1221         [Qt] Implement HTTP authentication QML API
1222         https://bugs.webkit.org/show_bug.cgi?id=75535
1223
1224         Reviewed by Kenneth Rohde Christiansen.
1225
1226         This patch implements the QML API for handling HTTP authentication.
1227         The implementation uses a syncronous message between the WebProcess
1228         and the UIProcess which is called when the authenticationRequired
1229         signal is emitted from QNAM.
1230
1231         Based in part upon patch by Peter Hartmann.
1232
1233         * UIProcess/API/qt/qquickwebview.cpp:
1234         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1235         (QQuickWebViewPrivate::handleAuthenticationRequiredRequest):
1236         (QQuickWebViewExperimental::authenticationDialog):
1237         (QQuickWebViewExperimental::setAuthenticationDialog):
1238         * UIProcess/API/qt/qquickwebview_p.h:
1239         * UIProcess/API/qt/qquickwebview_p_p.h:
1240         * UIProcess/PageClient.h:
1241         * UIProcess/WebPageProxy.cpp:
1242         (WebKit::WebPageProxy::authenticationRequiredRequest):
1243         * UIProcess/WebPageProxy.h:
1244         * UIProcess/WebPageProxy.messages.in:
1245         * UIProcess/qt/QtDialogRunner.cpp:
1246         (AuthenticationDialogContextObject::AuthenticationDialogContextObject):
1247         (AuthenticationDialogContextObject::hostname):
1248         (AuthenticationDialogContextObject::realm):
1249         (AuthenticationDialogContextObject::prefilledUsername):
1250         (AuthenticationDialogContextObject::accept):
1251         (AuthenticationDialogContextObject::reject):
1252         (QtDialogRunner::initForAuthentication):
1253         * UIProcess/qt/QtDialogRunner.h:
1254         (QtDialogRunner::username):
1255         (QtDialogRunner::password):
1256         (QtDialogRunner::onAuthenticationAccepted):
1257         * UIProcess/qt/QtPageClient.cpp:
1258         (QtPageClient::handleAuthenticationRequiredRequest):
1259         * UIProcess/qt/QtPageClient.h:
1260         * WebProcess/qt/QtNetworkAccessManager.cpp:
1261         (WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
1262         (WebKit::QtNetworkAccessManager::onAuthenticationRequired):
1263         * WebProcess/qt/QtNetworkAccessManager.h:
1264
1265 2012-01-16  Dan Bernstein  <mitz@apple.com>
1266
1267         <rdar://problem/10702758> REGRESSION: Every Safari Reader WKView leaks
1268
1269         Reviewed by John Sullivan and Ada Chan.
1270
1271         * UIProcess/API/mac/WKView.mm:
1272         (-[WKView viewDidMoveToWindow]): Since this method can be called multiple times in a row
1273         while [self window] is non-nil, check if there isn’t already an event monitor before adding
1274         a new one.
1275
1276 2012-01-16  Anders Carlsson  <andersca@apple.com>
1277
1278         Crash when calling SecItemAdd with a null result pointer
1279         https://bugs.webkit.org/show_bug.cgi?id=76407
1280         <rdar://problem/10696087>
1281
1282         Reviewed by Brady Eidson.
1283
1284         Add null check.
1285
1286         * WebProcess/mac/SecItemShimMethods.mm:
1287         (WebKit::webSecItemAdd):
1288
1289 2012-01-16  Jon Lee  <jonlee@apple.com>
1290
1291         Build fix for r105086.
1292
1293         * Configurations/FeatureDefines.xcconfig:
1294
1295 2012-01-16  Zeno Albisser  <zeno@webkit.org>
1296
1297         [Qt] Fix QT_VERSION related warnings when building on Mac OS X
1298         https://bugs.webkit.org/show_bug.cgi?id=76340
1299
1300         This bug was caused by r104826.
1301         As was already mentioned for https://bugs.webkit.org/show_bug.cgi?id=57239
1302         we should not use "using namespace WebCore" in header files,
1303         because it might cause ambiguous references.
1304         This patch reverts the changes from r104826 and r104981
1305         and removes the "using namespace WebCore" statement from
1306         two header files.
1307
1308         Reviewed by Tor Arne Vestbø.
1309
1310         * Shared/WebLayerTreeInfo.h:
1311         (WebKit::WebLayerUpdateInfo::WebLayerUpdateInfo):
1312         (WebKit::WebLayerAnimation::WebLayerAnimation):
1313         * UIProcess/LayerTreeHostProxy.h:
1314         (WebKit::LayerTreeHostProxy::layerByID):
1315         (WebKit::LayerTreeHostProxy::rootLayer):
1316         (WebKit::LayerTreeHostProxy::notifyAnimationStarted):
1317         (WebKit::LayerTreeHostProxy::notifySyncRequired):
1318         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
1319         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
1320         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
1321
1322 2012-01-16  Alexander Færøy  <alexander.faeroy@nokia.com>
1323
1324         [Qt] Remove references to PagePointer in the FrameNetworkingContext
1325         https://bugs.webkit.org/show_bug.cgi?id=76342
1326
1327         Reviewed by Simon Hausmann.
1328
1329         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1330         (WebKit::WebFrameLoaderClient::createNetworkingContext):
1331         * WebProcess/qt/QtNetworkAccessManager.cpp:
1332         (WebKit::QtNetworkAccessManager::obtainOriginatingWebPage):
1333         * WebProcess/qt/QtNetworkAccessManager.h:
1334
1335 2012-01-14  Dan Bernstein  <mitz@apple.com>
1336
1337         <rdar://problem/10696295> Crash in WebProcess at com.apple.CFNetwork: URLCredentialStorage::CreateCurrentPersistentCredentials + 298
1338
1339         Reviewed by Anders Carlsson.
1340
1341         * WebProcess/mac/SecItemShimMethods.mm:
1342         (WebKit::initializeSecItemShim): Removed an early return that was accidentally added in r105008.
1343
1344 2012-01-13  Anders Carlsson  <andersca@apple.com>
1345
1346         Delay updating the root compositing layer if the layer tree state is frozen
1347         https://bugs.webkit.org/show_bug.cgi?id=76316
1348
1349         Reviewed by Dan Bernstein.
1350
1351         When the layer tree is frozen, stash the root layer in m_pendingRootCompositingLayer and set it in flushLayers.
1352
1353         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1354         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1355         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
1356         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1357
1358 2012-01-13  Anders Carlsson  <andersca@apple.com>
1359
1360         Implement TiledCoreAnimationDrawingArea::setLayerTreeStateIsFrozen
1361         https://bugs.webkit.org/show_bug.cgi?id=76308
1362
1363         Reviewed by Sam Weinig.
1364
1365         Keep track of whether the layer tree state is frozen and suspend/resume the layer flush scheduler accordingly.
1366
1367         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1368         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1369         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
1370         (WebKit::TiledCoreAnimationDrawingArea::setLayerTreeStateIsFrozen):
1371         (WebKit::TiledCoreAnimationDrawingArea::layerTreeStateIsFrozen):
1372         (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync):
1373         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1374
1375 2012-01-13  Anders Carlsson  <andersca@apple.com>
1376
1377         Disable implicit animations when setting the root compositing layer
1378         https://bugs.webkit.org/show_bug.cgi?id=76304
1379
1380         Reviewed by Sam Weinig.
1381
1382         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1383         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
1384
1385 2012-01-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1386
1387         TextureMapper: Extract layer transform logic to a LayerTransform class.
1388         https://bugs.webkit.org/show_bug.cgi?id=76291
1389
1390         Reviewed by Noam Rosenthal.
1391
1392         Move the paint call before the visible rect collection to make sure that
1393         transforms are computed. This will increase the delay for the visible rects
1394         to get to the WebProcess until we move this calculation out of the UI Process.
1395         This fixes an assert triggering in LayerTransform::combineTransforms.
1396
1397         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
1398         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
1399
1400 2012-01-13  Brent Fulgham  <bfulgham@webkit.org>
1401
1402         [WinCairo] Build correction.
1403
1404         * Shared/WebGraphicsContext.h: Use proper include path for RefPtrCairo.h.
1405
1406 2012-01-12  Martin Robinson  <mrobinson@igalia.com>
1407
1408         [GTK] [WebKit2] WebKitURIRequest and WebKitURIResponse should wrap the corresponding WebCore classes
1409         https://bugs.webkit.org/show_bug.cgi?id=74478
1410
1411         Reviewed by Gustavo Noronha Silva.
1412
1413         Have WebKitURIRequest wrap a ResourceRquesst and WebKitURIResponse wrap a ResourceResponse.
1414         They are the WebCore types they are meant to represent and we will need to expose more
1415         information from them in the future to make them useful. Later we can have ResourceResponse
1416         generate a SoupMessage lazily if necessary.
1417
1418         * GNUmakefile.am:
1419         * UIProcess/API/gtk/WebKitURIRequest.cpp:
1420         (webkit_uri_request_class_init): Remove the set property vmethod.
1421         (webkit_uri_request_new): The URI property is no longer settable.
1422         (webkitURIRequestCreateForResourceRequest): Added this private constructor.
1423         (webkit_uri_request_get_uri): Now we just get the URI directly from the ResourceRequest.
1424         * UIProcess/API/gtk/WebKitURIResponse.cpp:
1425         (webkit_uri_response_class_init): Remove the set property vmethod.
1426         (webkit_uri_response_get_uri): Get the URI directly from the ResourceReponse.
1427         (webkit_uri_response_get_status_code): Get the status code directly from the ResourceResponse.
1428         (webkit_uri_response_get_content_length): Get the content length directly from the ResourceResponse.
1429         (webkitURIResponseCreateForResourceResponse): Added this private constructor.
1430         * UIProcess/API/gtk/WebKitURIResponsePrivate.h: Removed unnecessary methods.
1431
1432 2012-01-12  No'am Rosenthal  <noam.rosenthal@nokia.com>
1433
1434         [Qt][WK2] WebProcesses crashes when composited reflections/masks are present
1435         https://bugs.webkit.org/show_bug.cgi?id=75883
1436
1437         Reviewed by Kenneth Rohde Christiansen.
1438
1439         Make sure masks and replica layers can access layerTreeTileClient. Let masks
1440         have the right contents/visible rect so that they can render content tiles.
1441         Default the mask's size to be the layer's size.
1442
1443         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
1444         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
1445         (WebCore::WebGraphicsLayer::setSize):
1446         (WebCore::WebGraphicsLayer::setMaskLayer):
1447         (WebCore::WebGraphicsLayer::setReplicatedByLayer):
1448         (WebCore::WebGraphicsLayer::syncCompositingState):
1449         (WebCore::WebGraphicsLayer::setContentsScale):
1450         (WebCore::WebGraphicsLayer::setVisibleContentRect):
1451         (WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
1452         (WebCore::WebGraphicsLayer::updateTileBuffersRecursively):
1453         (WebCore::WebGraphicsLayer::layerTreeTileClient):
1454         (WebCore::WebGraphicsLayer::purgeBackingStores):
1455         (WebCore::WebGraphicsLayer::recreateBackingStoreIfNeeded):
1456         (WebCore::WebGraphicsLayer::setLayerTreeTileClient):
1457         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
1458         (WebCore::WebGraphicsLayer::maskTarget):
1459         (WebCore::WebGraphicsLayer::setMaskTarget):
1460
1461 2012-01-12  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1462
1463         [Qt] Set the input method hints on the QtQuick item
1464         https://bugs.webkit.org/show_bug.cgi?id=76169
1465
1466         Reviewed by Simon Hausmann.
1467
1468         Set the input method hints given the HTMLElement type and state.
1469
1470         * Shared/EditorState.cpp:
1471         (WebKit::EditorState::encode):
1472         (WebKit::EditorState::decode):
1473         * Shared/EditorState.h:
1474         (WebKit::EditorState::EditorState):
1475         * UIProcess/qt/QtWebPageEventHandler.cpp:
1476         (QtWebPageEventHandler::updateTextInputState):
1477         * WebProcess/WebPage/WebPage.cpp:
1478         (WebKit::WebPage::editorState):
1479
1480 2012-01-12  Eunmi Lee  <eunmi15.lee@samsung.com>
1481
1482         [EFL][WK2] Update and show ewk_view with updated webpage.
1483         https://bugs.webkit.org/show_bug.cgi?id=76023
1484
1485         Reviewed by Andreas Kling.
1486
1487         Update ewk_view with BackingStore image which is rendered webpage
1488         image by WebProcess, and show updated image's area when
1489         PageClientImpl::setViewNeedsDisplay() is called.
1490         The ewk_view_display() function is used to display updated area of
1491         evas_object_image and the ewk_view_image_data_set() function is used
1492         to set evas_object_image's data with rendered webpage.
1493
1494         * UIProcess/API/efl/PageClientImpl.cpp:
1495         (WebKit::PageClientImpl::setViewNeedsDisplay):
1496         * UIProcess/API/efl/ewk_private.h: Added.
1497         * UIProcess/API/efl/ewk_view.cpp:
1498         (ewk_view_add):
1499         (ewk_view_display):
1500         (ewk_view_image_data_set):
1501         * UIProcess/cairo/BackingStoreCairo.cpp:
1502         (WebKit::BackingStore::incorporateUpdate):
1503
1504 2012-01-12  Ryuan Choi  <ryuan.choi@samsung.com>
1505
1506         [EFL][WK2] Network is not available when SOUP is enabled.
1507         https://bugs.webkit.org/show_bug.cgi?id=76112
1508
1509         Reviewed by Andreas Kling.
1510
1511         ecore_main_loop_glib_integrate should be called to use glib based library
1512         such as SOUP.
1513
1514         * WebProcess/efl/WebProcessMainEfl.cpp:
1515         (WebKit::WebProcessMainEfl):
1516
1517 2012-01-12  Ryuan Choi  <ryuan.choi@samsung.com>
1518
1519         [EFL][WK2] Add PLATFORM(EFL) in SharedMemory.h, WebProcessStore.h, WebEditorClient.cpp
1520         https://bugs.webkit.org/show_bug.cgi?id=76115
1521
1522         Reviewed by Andreas Kling.
1523
1524         This patch added PLATFORM(EFL) guard in SharedMemory.h to use UNIX_DOMAIN_SOCKETS
1525         and WebProcessStore.h to have font family preference
1526         and WebEditorClient.cpp to use platform specific handleKeyboardEvent(),
1527         handleInputMethodKeydown()
1528
1529         * Platform/SharedMemory.h:
1530         * Shared/WebPreferencesStore.h:
1531         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1532
1533 2012-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1534
1535         [GTK] Web process should use the same locale than UI process
1536         https://bugs.webkit.org/show_bug.cgi?id=76054
1537
1538         Reviewed by Gustavo Noronha Silva.
1539
1540         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1541         (WebKit::childSetupFunction): Make child process use the same
1542         locale than its parent.
1543
1544 2012-01-11  Ryuan Choi  <ryuan.choi@samsung.com>
1545
1546         [WK2] Share cairo specific codes with EFL port.
1547         https://bugs.webkit.org/show_bug.cgi?id=75457
1548
1549         Reviewed by Brent Fulgham.
1550
1551         Change PLATFORM(GTK) to USE(CAIRO) in WebGraphicsContext{h,cpp} to share
1552         with EFL port.
1553
1554         * Shared/WebGraphicsContext.cpp:
1555         (WebKit::WebGraphicsContext::WebGraphicsContext):
1556         * Shared/WebGraphicsContext.h:
1557
1558 2012-01-11  Beth Dakin  <bdakin@apple.com>
1559
1560         https://bugs.webkit.org/show_bug.cgi?id=75904
1561         WebKit 1: Scrollbar uiStateTransitionProgress requires tracking the mouse all 
1562         the time
1563         -and corresponding-
1564         <rdar://problem/10498816>
1565
1566         Reviewed by Darin Adler.
1567
1568         This patch gets rid of the optional parameter called onlyUpdateScrollbars for 
1569         WebCore::EventHandler::mouseMoved() and instead moves that functionality into 
1570         its own function called passMouseMovedEventToScrollbars().
1571         * WebProcess/WebPage/WebPage.cpp:
1572         (WebKit::handleMouseEvent):
1573
1574 2012-01-11  Brent Fulgham  <bfulgham@webkit.org>
1575
1576         WinCairo build correction.
1577
1578         * UIProcess/WebPageProxy.h: Don't define viewWidget for WinCairo port.
1579
1580 2012-01-11  Anders Carlsson  <andersca@apple.com>
1581
1582         Webpages flash white when switching between windows
1583         https://bugs.webkit.org/show_bug.cgi?id=76080
1584         <rdar://problem/9893565>
1585
1586         Reviewed by Dan Bernstein.
1587
1588         Introduce a _windowHasValidBackingStore boolean and only paint the background (white or clear)
1589         * UIProcess/API/mac/WKView.mm:
1590         (-[WKView setFrameSize:]):
1591         Set _windowHasValidBackingStore to false if the new size is different from the old size.
1592
1593         (-[WKView viewDidMoveToWindow]):
1594         Set _windowHasValidBackingStore to false.
1595
1596         (-[WKView _windowDidMiniaturize:]):
1597         Set _windowHasValidBackingStore to false.
1598
1599         (-[WKView _windowDidChangeBackingProperties:]):
1600         Set _windowHasValidBackingStore to false.
1601
1602         (-[WKView drawRect:]):
1603         Only call drawPageBackground if _windowHasValidBackingStore is false. Set it to true after painting.
1604
1605 2012-01-11  Anders Carlsson  <andersca@apple.com>
1606
1607         Fix the Mac GCC build.
1608
1609         Work around the fact that GCC doesn't work very well with Blocks and C++ objets.
1610
1611         * UIProcess/mac/WebProcessProxyMac.mm:
1612         (WebKit::dispatchFunctionOnQueue):
1613         (WebKit::WebProcessProxy::secItemRequest):
1614         (WebKit::WebProcessProxy::secKeychainItemRequest):
1615
1616 2012-01-11  No'am Rosenthal  <noam.rosenthal@nokia.com>
1617
1618         [Qt][WK2] Directly-composited images sometimes appear with a wrong geometry
1619         https://bugs.webkit.org/show_bug.cgi?id=75882
1620
1621         Reviewed by Simon Hausmann.
1622
1623         When assigning a directly composited image to a TextureMapperNode in WebKit2, we take
1624         contentsRect() onto account. However, contentsRect() might be changed after the image
1625         is already assigned.
1626         We have to reassign the image when contentsRect() changes. This is a pretty cheap
1627         operation, since the image is already converted to a texture and we simply change the
1628         geometric values.
1629
1630         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
1631         (WebKit::LayerTreeHostProxy::syncLayerParameters):
1632         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
1633         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
1634
1635 2012-01-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1636
1637         [Qt] Add the editor rect to the EditorState
1638         https://bugs.webkit.org/show_bug.cgi?id=76053
1639
1640         Reviewed by Simon Hausmann.
1641
1642         Also rename some members to match the new Qt naming scheme.
1643
1644         * Shared/EditorState.cpp:
1645         (WebKit::EditorState::encode):
1646         (WebKit::EditorState::decode):
1647         * Shared/EditorState.h:
1648         * UIProcess/API/qt/qquickwebview.cpp:
1649         (QQuickWebView::inputMethodQuery):
1650         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1651         (WebKit::WebEditorClient::respondToChangedSelection):
1652         * WebProcess/WebPage/WebPage.cpp:
1653         (WebKit::WebPage::editorState):
1654
1655 2012-01-11  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
1656
1657         [GTK] Linking of big binaries should be serialized to avoid thrashing
1658         https://bugs.webkit.org/show_bug.cgi?id=75977
1659
1660         Reviewed by Martin Robinson.
1661
1662         Added artificial dependencies so that libwebkitgtk is always
1663         linked first, libwebkit2gtk second, and WebKitPluginProcess
1664         last. Automake unfortunately replaces the whole rule used to build
1665         the libraries if the actual name is used to add the dependency, so
1666         we use helper variables to work around that.
1667
1668         * GNUmakefile.am:
1669
1670 2012-01-11  Ryuan Choi  <ryuan.choi@samsung.com>
1671
1672         [EFL][WK2] Rename viewObject to viewWidget
1673         https://bugs.webkit.org/show_bug.cgi?id=75947
1674
1675         Reviewed by Martin Robinson.
1676
1677         Rename viewObject to viewWidget for the EFL port to use WidgetBackingStore
1678         which calls viewWidget().
1679
1680         * UIProcess/API/efl/PageClientImpl.cpp:
1681         (WebKit::PageClientImpl::PageClientImpl):
1682         (WebKit::PageClientImpl::setViewNeedsDisplay):
1683         (WebKit::PageClientImpl::viewSize):
1684         * UIProcess/API/efl/PageClientImpl.h:
1685         (WebKit::PageClientImpl::create):
1686         (WebKit::PageClientImpl::viewWidget):
1687         * UIProcess/WebPageProxy.h:
1688         * UIProcess/efl/WebPageProxyEfl.cpp:
1689         (WebKit::WebPageProxy::viewWidget):
1690
1691 2012-01-10  Mark Rowe  <mrowe@apple.com>
1692
1693         REGRESSION (r104377): All pages print blank on Snow Leopard
1694         <http://webkit.org/b/75879> / <rdar://problem/10674335>
1695
1696         We need to explicitly load PDFKit.framework before using PDFDocument and friends.
1697         On SnowLeopard the framework is not necessarily loaded by anything else before we
1698         print, which would lead to us failing to allocate the PDFDocument that we use for
1699         drawing the content from the web process.
1700
1701         Reviewed by Dan Bernstein.
1702
1703         * UIProcess/API/mac/WKPrintingView.mm:
1704         (pdfKitFrameworkPath): Construct the path to the PDFKit framework.
1705         (classFromPDFKit): Ensure that the PDFKit framework is loaded, and then retrieve the
1706         given class from it.
1707         (pdfAnnotationLinkClass): ASSERT that we found the class.
1708         (pdfDocumentClass): Ditto.
1709
1710 2012-01-10  Chris Marrin  <cmarrin@apple.com>
1711
1712         Wrapped allowedCompositingTriggers in ACCELERATED_COMPOSITING ifdef to make non-accelerated builds work
1713
1714         Unreviewed.
1715
1716         * WebProcess/WebCoreSupport/WebChromeClient.h:
1717
1718 2012-01-10  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
1719
1720         [Qt][WK2]REGRESSION(r102435): It made tst_QQuickWebView::show() crash
1721         https://bugs.webkit.org/show_bug.cgi?id=74176
1722
1723         Reviewed by Noam Rosenthal.
1724
1725         Check texture mapper exists already in ensureRootLayer to avoid recrecation.
1726         Check if root layer was deleted already in purgeGLResources.
1727         Added multipleWebViewWindows and multipleWebViews API tests.
1728
1729         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
1730         (tst_QQuickWebView::multipleWebViewWindows):
1731         (tst_QQuickWebView::multipleWebViews):
1732         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
1733         (WebKit::LayerTreeHostProxy::ensureRootLayer):
1734         (WebKit::LayerTreeHostProxy::purgeGLResources):
1735
1736 2012-01-10  Ryosuke Niwa  <rniwa@webkit.org>
1737
1738         Snow Leopard build fix.
1739
1740         * UIProcess/API/mac/PageClientImpl.h:
1741         * UIProcess/API/mac/PageClientImpl.mm:
1742
1743 2012-01-10  Anders Carlsson  <andersca@apple.com>
1744
1745         Hang opening movie that requires authentication
1746         https://bugs.webkit.org/show_bug.cgi?id=75989
1747
1748         Reviewed by Sam Weinig.
1749
1750         Change the way the keychain calls are processed to avoid deadlocks:
1751
1752         1. When a keychain call is made, the web process sends an asynchronous request message to the UI process,
1753            avoiding the need to bounce calls to the main thread (since CoreIPC only allows sending
1754            synchronous messages from the main thread). Incidentally, this fixes <rdar://problem/9428041>.
1755         2. The Web Process now waits on the calling thread, (for a condition variable to be signalled) for a reply message.
1756         3. The UI process handles the incoming message request message on the connection work queue and uses
1757            dispatch_async to a global dispatch queue where the keychain call is made.
1758            We use a global queue to prevent the connection work queue from blocking on the call.
1759         4. The UI process then sends an asynchronous reply message back to the web process. This message is sent from
1760            the global dispatch queue.
1761         5. The Web Process handles the reply message on the connection queue, adds the reply to a map and signals
1762            the condition variable that the web process is waiting on and the thread that made the keychain call
1763            can resume execution.
1764
1765         * Shared/mac/SecItemRequestData.cpp:
1766         (WebKit::SecItemRequestData::SecItemRequestData):
1767         (WebKit::SecItemRequestData::encode):
1768         (WebKit::SecItemRequestData::decode):
1769         * Shared/mac/SecItemRequestData.h:
1770         (WebKit::SecItemRequestData::type):
1771         Add a type to SecItemRequestData and encode/decode it.
1772
1773         * Shared/mac/SecItemResponseData.h:
1774         (WebKit::SecItemResponseData::resultObject):
1775         Make this return a reference so we can call leakRef() on it.
1776
1777         * Shared/mac/SecKeychainItemRequestData.cpp:
1778         (WebKit::SecKeychainItemRequestData::SecKeychainItemRequestData):
1779         (WebKit::SecKeychainItemRequestData::~SecKeychainItemRequestData):
1780         (WebKit::SecKeychainItemRequestData::attributeList):
1781         (WebKit::SecKeychainItemRequestData::encode):
1782         (WebKit::SecKeychainItemRequestData::decode):
1783         * Shared/mac/SecKeychainItemRequestData.h:
1784         (WebKit::SecKeychainItemRequestData::type):
1785         Add a type, and put the OwnPtr and OwnArrayPtr in a RefCounted struct so we can
1786         correctly copy this object.
1787
1788         * UIProcess/WebConnectionToWebProcess.cpp:
1789         (WebKit::WebConnectionToWebProcess::WebConnectionToWebProcess):
1790         Don't open the connection here, the WebProcessProxy object needs to add itself as a queue client before opening.
1791     
1792         * UIProcess/WebProcessProxy.cpp:
1793         (WebKit::WebProcessProxy::disconnect):
1794         Remove the WebProcessProxy object from the list of connection queue clients.
1795
1796         (WebKit::WebProcessProxy::didReceiveMessageOnConnectionWorkQueue):
1797         Call didReceiveWebProcessProxyMessageOnConnectionWorkQueue.
1798
1799         (WebKit::WebProcessProxy::didFinishLaunching):
1800         Add the WebProcessProxy as a queue client and open the connection.
1801
1802         * UIProcess/WebProcessProxy.h:
1803         WebProcessProxy should inherit from CoreIPC::Connection::QueueClient. Replace all individual keychain
1804         handler functions with two generic functions, secItemRequest and secKeychainItemRequest.
1805     
1806         * UIProcess/WebProcessProxy.messages.in:
1807         Replace individual keychain messages with SecItemRequest and SecKeychainItemRequest messages.
1808
1809         * UIProcess/mac/WebProcessProxyMac.mm:
1810         (WebKit::handleSecItemRequest):
1811         Call the right SecItem function depending on the request type and send back the result.
1812
1813         (WebKit::WebProcessProxy::secItemRequest):
1814         Dispatch handleSecItemRequest on a global dispatch queue.
1815
1816         (WebKit::handleSecKeychainItemRequest):
1817         Call the right SecKeychainItem function depending on the request type and send back the result.
1818         
1819         (WebKit::WebProcessProxy::secKeychainItemRequest):
1820         Dispatch handleSecKeychainItemRequest on a global dispatch queue.
1821         
1822         * WebKit2.xcodeproj/project.pbxproj:
1823         Update for added/removed files.
1824
1825         * WebProcess/WebProcess.h:
1826         Add secItemResponse and secKeychainItemResponse message handlers.
1827
1828         * WebProcess/WebProcess.messages.in:
1829         Add SecItemResponse and SecKeychainItemResponse messages.
1830
1831         * WebProcess/mac/CoreIPCClientRunLoop.h:
1832         * WebProcess/mac/CoreIPCClientRunLoop.mm:
1833         This is no longer needed.
1834
1835         * WebProcess/mac/KeychainItemShimMethods.h:
1836         * WebProcess/mac/KeychainItemShimMethods.mm:
1837         (WebKit::managedAttributeLists):
1838         Make this an atomically initialized static.
1839
1840         (WebKit::managedAttributeListsMutex):
1841         Add an atomically initialized mutex.
1842
1843         (WebKit::allocateAttributeListContents):
1844         Use the managedAttributeListsMutex to make this function callable from any thread.
1845
1846         (WebKit::managedKeychainItemContents):
1847         Make this an atomically initialized static.
1848         
1849         (WebKit::managedKeychainItemContentsMutex):
1850         Add an atomically initialized mutex.
1851
1852         (WebKit::allocateKeychainItemContentData):
1853         Use the managedAttributeListsMutex to make this function callable from any thread.
1854
1855         (WebKit::webFreeAttributeListContent):
1856         Use locking so this can be called from any thread.
1857
1858         (WebKit::webFreeKeychainItemContent):
1859         Ditto.
1860
1861         (WebKit::responseMap):
1862         Add responseMap thread-safe singleton for holding incoming responses.
1863
1864         (WebKit::generateSecKeychainItemRequestID):
1865         Return a unique item request id, using OSAtomicIncrement64Barrier for atomicity.
1866
1867         (WebKit::didReceiveSecKeychainItemResponse):
1868         Pass the response over the response map.
1869
1870         (WebKit::sendSeqKeychainItemRequest):
1871         Send a request message and wait for a response using ResponseMap::waitForResponse.
1872
1873         (WebKit::webSecKeychainItemCopyContent):
1874         Send a request using sendSeqKeychainItemRequest.
1875
1876         (WebKit::webSecKeychainItemCreateFromContent):
1877         Ditto.
1878
1879         (WebKit::webSecKeychainItemModifyContent):
1880         Ditto.
1881
1882         * WebProcess/mac/KeychainShimResponseMap.h:
1883         New thread-safe helper class that stores a map of responses and lets client wait for a response
1884         with a given ID.
1885
1886         (KeychainShimResponseMap::waitForResponse):
1887         Wait until the response is available in the hash map, then return it.
1888
1889         (KeychainShimResponseMap::didReceiveResponse):
1890         Add the response to the hash map and signal the condition variable.
1891
1892         * WebProcess/mac/SecItemShimMethods.h:
1893         * WebProcess/mac/SecItemShimMethods.mm:
1894         (WebKit::responseMap):
1895         Add responseMap thread-safe singleton for holding incoming responses.
1896
1897         (WebKit::generateSecItemRequestID):
1898         Return a unique item request id, using OSAtomicIncrement64Barrier for atomicity.
1899
1900         (WebKit::didReceiveSecItemResponse):
1901         Pass the response over the response map.
1902
1903         (WebKit::sendSeqItemRequest):
1904         Send a request message and wait for a response using ResponseMap::waitForResponse.
1905
1906         (WebKit::webSecItemCopyMatching):
1907         Send a request using sendSeqItemRequest.
1908
1909         (WebKit::webSecItemAdd):
1910         Ditto.
1911
1912         (WebKit::webSecItemUpdate):
1913         Ditto.
1914
1915         (WebKit::webSecItemDelete):
1916         Ditto.
1917
1918         * WebProcess/mac/WebProcessMac.mm:
1919         (WebKit::WebProcess::secItemResponse):
1920         Call didReceiveSecItemResponse.
1921
1922         (WebKit::WebProcess::secKeychainItemResponse):
1923         Call didReceiveSecKeychainItemResponse.
1924
1925 2012-01-10  Anders Carlsson  <andersca@apple.com>
1926
1927         DispatchOnConnectionQueue messages should have a Connection parameter
1928         https://bugs.webkit.org/show_bug.cgi?id=75986
1929
1930         Reviewed by Adam Roben.
1931
1932         Message handlers for messages with the DispatchOnConnectionQueue should have a CoreIPC::Connection
1933         parameter, making it easier to send messages back over that connection.
1934
1935         * Platform/CoreIPC/HandleMessage.h:
1936         (CoreIPC::callMemberFunction):
1937         (CoreIPC::handleMessageOnConnectionQueue):
1938         * Scripts/webkit2/messages.py:
1939         (async_case_statement):
1940         (generate_message_handler):
1941         * Scripts/webkit2/messages_unittest.py:
1942         * WebProcess/WebPage/EventDispatcher.cpp:
1943         (WebKit::EventDispatcher::wheelEvent):
1944         (WebKit::EventDispatcher::gestureEvent):
1945         * WebProcess/WebPage/EventDispatcher.h:
1946         * WebProcess/WebProcess.cpp:
1947         (WebKit::WebProcess::pluginProcessCrashed):
1948         * WebProcess/WebProcess.h:
1949
1950 2012-01-10  Chris Marrin  <cmarrin@apple.com>
1951
1952         Turn off the FilterTrigger in WebKit and WebKit2
1953         https://bugs.webkit.org/show_bug.cgi?id=75914
1954
1955         Reviewed by Simon Fraser.
1956
1957         Implement allowedCompositingTriggers to turn on all compositing triggers except FilterTrigger.
1958
1959         * WebProcess/WebCoreSupport/WebChromeClient.h:
1960         (WebKit::WebChromeClient::allowedCompositingTriggers):
1961
1962 2012-01-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1963
1964         Unreviewed potential Mac WK2 build fix.
1965
1966         * UIProcess/PageClient.h: forward declare WebGestureEvent.
1967
1968 2012-01-10  Csaba Osztrogonác  <ossy@webkit.org>
1969
1970         Unreviewed, rolling out an accidental commit r104569.
1971
1972         * Shared/EditorState.cpp:
1973         (WebKit::EditorState::encode):
1974         (WebKit::EditorState::decode):
1975         * Shared/EditorState.h:
1976         * UIProcess/API/qt/qquickwebview.cpp:
1977         (QQuickWebView::inputMethodQuery):
1978         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1979         (WebKit::WebEditorClient::respondToChangedSelection):
1980         * WebProcess/WebPage/WebPage.cpp:
1981         (WebKit::WebPage::editorState):
1982
1983 2012-01-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1984
1985         Unreviewed potential Mac WK2 build fix.
1986
1987         * UIProcess/API/mac/PageClientImpl.h:
1988         * UIProcess/API/mac/PageClientImpl.mm:
1989         (WebKit::PageClientImpl::doneWithGestureEvent):
1990
1991 2012-01-10  Rafael Brandao  <rafael.lobo@openbossa.org>
1992
1993         [Qt][WK2] Add font-related API tests for QWebPreferences
1994         https://bugs.webkit.org/show_bug.cgi?id=75739
1995
1996         Reviewed by Zoltan Herczeg.
1997
1998         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
1999         * UIProcess/API/qt/tests/qmltests/common/font-preferences.html: Added.
2000
2001 2012-01-10  Simon Hausmann  <simon.hausmann@nokia.com>
2002
2003         [Qt] Fix failing WK2 layout tests after r104557
2004
2005         Reviewed by Kenneth Rohde Christiansen.
2006
2007         * UIProcess/WebPageProxy.cpp:
2008         (WebKit::WebPageProxy::didReceiveEvent): Add missing break to not
2009         handle mouseDown as gesture event.
2010
2011 2012-01-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2012
2013         Unreviewed buildfix.
2014
2015         * UIProcess/WebPageProxy.h:
2016
2017 2012-01-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2018
2019         Implement the input panel request/close handling
2020
2021         Reviewed by Simon Hausmann.
2022
2023         With the current patch we only request the input panel as a
2024         response to a user tap. Close requests, on the other hand,
2025         is always respected.
2026
2027         As multiple show/hide requests can happen while processing
2028         the tap gesture, input panel visibility changes are postponed
2029         until the tap gesture ends.
2030
2031         The input panel will become visible if the WebCore editor is
2032         in canEdit mode and thus work for content-editable, meaning
2033         that it won't close the input panel if you click on a link
2034         (eg. editCommand) while in content-editable mode.
2035
2036         * UIProcess/PageClient.h:
2037         * UIProcess/WebPageProxy.cpp:
2038         (WebKit::WebPageProxy::handleGestureEvent):
2039         (WebKit::WebPageProxy::editorStateChanged):
2040         (WebKit::WebPageProxy::didReceiveEvent):
2041
2042             Add a new doneWithGestureEvent method to the PageClient
2043             as well as add a updateTextInputState similar to that of mac.
2044
2045         * UIProcess/WebPageProxy.h:
2046         * UIProcess/qt/QtPageClient.cpp:
2047         (QtPageClient::updateTextInputState):
2048         (QtPageClient::doneWithGestureEvent):
2049
2050             Propagate the new events to the Qt EventHandler.
2051
2052         * UIProcess/qt/QtPageClient.h:
2053         * UIProcess/qt/QtWebPageEventHandler.cpp:
2054         * UIProcess/qt/QtWebPageEventHandler.h:
2055         (QtWebPageEventHandler::QtWebPageEventHandler):
2056         (QtWebPageEventHandler::handleSingleTapEvent):
2057         (setInputPanelVisible):
2058         (QtWebPageEventHandler::updateTextInputState):
2059         (QtWebPageEventHandler::doneWithGestureEvent):
2060
2061             Handle postponing of the input method visibility change
2062             and the actual showing/hiding.
2063
2064 2012-01-10  Eunmi Lee  <eunmi15.lee@samsung.com>
2065
2066         [EFL][WK2] Remove codes to move and resize the clip.
2067         https://bugs.webkit.org/show_bug.cgi?id=75428
2068
2069         Reviewed by Andreas Kling.
2070
2071         Remove codes to move and resize the clip because clip is not used now.
2072         We have to show whole area of evas_object_image so we don't have to
2073         clip any area.
2074         In the WebKit1 Efl, the clip is used to clip the area to show during
2075         weak zoom, so we can use codes to manipulate the clip when we want to
2076         implement weak zoom for WebKit2 Efl.
2077
2078         * UIProcess/API/efl/ewk_view.cpp:
2079         (_ewk_view_smart_calculate):
2080
2081 2012-01-09  Andras Becsi  <andras.becsi@nokia.com>
2082
2083         [Qt][WK2] Pinch zoom should affect the page size
2084         https://bugs.webkit.org/show_bug.cgi?id=74601
2085
2086         Reviewed by Kenneth Rohde Christiansen.
2087
2088         The current implementation uses the scale property of the QQuickWebPage
2089         to scale the page in response to pinch gestures.
2090         However for layout and anchoring to work correctly in QML, pinching needs
2091         to change the page size.
2092         This patch applies the pinch scale to the page size and to the transformation
2093         matrix of the drawing area.
2094         Thus the page item's coordinate system is no longer a direct representation
2095         of the WebCore::Page coordinate system and it is no longer suitable as
2096         an inertial frame of reference for input events. The event propagation had
2097         to be moved to the QQuickWebView and the positions translated to content
2098         coordinates when NativeWebEvents are created.
2099         Re-landing with fixed event delivery for the test infrastructure.
2100
2101         * Shared/NativeWebMouseEvent.h:
2102         * Shared/NativeWebTouchEvent.h:
2103         * Shared/NativeWebWheelEvent.h:
2104         * Shared/qt/NativeWebMouseEventQt.cpp:
2105         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2106         * Shared/qt/NativeWebTouchEventQt.cpp:
2107         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
2108         * Shared/qt/NativeWebWheelEventQt.cpp:
2109         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
2110         * Shared/qt/WebEventFactoryQt.cpp:
2111         (WebKit::WebEventFactory::createWebMouseEvent):
2112         (WebKit::WebEventFactory::createWebWheelEvent):
2113         (WebKit::WebEventFactory::createWebTouchEvent):
2114         * Shared/qt/WebEventFactoryQt.h:
2115         * UIProcess/API/qt/qquickwebpage.cpp:
2116         (QQuickWebPage::geometryChanged):
2117         (QQuickWebPagePrivate::QQuickWebPagePrivate):
2118         (QQuickWebPagePrivate::paintToCurrentGLContext):
2119         (QQuickWebPage::usesTraditionalDesktopBehaviour):
2120         (QQuickWebPage::setUsesTraditionalDesktopBehaviour):
2121         (QQuickWebPage::eventHandler):
2122         (QQuickWebPage::setContentSize):
2123         (QQuickWebPage::contentSize):
2124         (QQuickWebPage::setContentScale):
2125         (QQuickWebPage::contentScale):
2126         (QQuickWebPage::transformFromItem):
2127         (QQuickWebPage::transformToItem):
2128         (QQuickWebPagePrivate::updateSize):
2129         * UIProcess/API/qt/qquickwebpage_p.h:
2130         * UIProcess/API/qt/qquickwebpage_p_p.h:
2131         * UIProcess/API/qt/qquickwebview.cpp:
2132         (QQuickWebViewPrivate::enableMouseEvents):
2133         (QQuickWebViewPrivate::disableMouseEvents):
2134         (QQuickWebViewPrivate::loadDidCommit):
2135         (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
2136         (QQuickWebViewPrivate::didChangeContentsSize):
2137         (QQuickWebViewPrivate::didChangeViewportProperties):
2138         (QQuickWebViewPrivate::pageDidRequestScroll):
2139         (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
2140         (QQuickWebViewPrivate::PostTransitionState::apply):
2141         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
2142         (QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour):
2143         (QQuickWebViewExperimental::useTraditionalDesktopBehaviour):
2144         (QQuickWebView::mapToWebContent):
2145         (QQuickWebView::mapRectToWebContent):
2146         (QQuickWebView::mapFromWebContent):
2147         (QQuickWebView::mapRectFromWebContent):
2148         (QQuickWebView::geometryChanged):
2149         (QQuickWebView::keyPressEvent):
2150         (QQuickWebView::keyReleaseEvent):
2151         (QQuickWebView::inputMethodEvent):
2152         (QQuickWebView::focusInEvent):
2153         (QQuickWebView::focusOutEvent):
2154         (QQuickWebView::touchEvent):
2155         (QQuickWebView::mousePressEvent):
2156         (QQuickWebView::mouseMoveEvent):
2157         (QQuickWebView::mouseReleaseEvent):
2158         (QQuickWebView::mouseDoubleClickEvent):
2159         (QQuickWebView::wheelEvent):
2160         (QQuickWebView::hoverEnterEvent):
2161         (QQuickWebView::hoverMoveEvent):
2162         (QQuickWebView::hoverLeaveEvent):
2163         (QQuickWebView::dragMoveEvent):
2164         (QQuickWebView::dragEnterEvent):
2165         (QQuickWebView::dragLeaveEvent):
2166         (QQuickWebView::dropEvent):
2167         (QQuickWebView::event):
2168         * UIProcess/API/qt/qquickwebview_p.h:
2169         * UIProcess/API/qt/qquickwebview_p_p.h:
2170         * UIProcess/API/qt/qwebviewportinfo.cpp:
2171         (QWebViewportInfo::contentsSize):
2172         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2173         (tst_QQuickWebView::scrollRequest):
2174         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
2175         (WebKit::QtPinchGestureRecognizer::recognize):
2176         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2177         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
2178         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
2179         (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
2180         (WebKit::QtViewportInteractionEngine::event):
2181         (WebKit::QtViewportInteractionEngine::wheelEvent):
2182         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
2183         (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
2184         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
2185         (WebKit::QtViewportInteractionEngine::applyConstraints):
2186         (WebKit::QtViewportInteractionEngine::currentCSSScale):
2187         (WebKit::QtViewportInteractionEngine::panGestureStarted):
2188         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
2189         (WebKit::QtViewportInteractionEngine::panGestureEnded):
2190         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
2191         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
2192         (WebKit::QtViewportInteractionEngine::scaleContent):
2193         * UIProcess/qt/QtViewportInteractionEngine.h:
2194         * UIProcess/qt/QtWebPageEventHandler.cpp:
2195         (QtWebPageEventHandler::handleEvent):
2196         (QtWebPageEventHandler::handleMouseMoveEvent):
2197         (QtWebPageEventHandler::handleMousePressEvent):
2198         (QtWebPageEventHandler::handleMouseReleaseEvent):
2199         (QtWebPageEventHandler::handleWheelEvent):
2200         (QtWebPageEventHandler::handleHoverLeaveEvent):
2201         (QtWebPageEventHandler::handleHoverMoveEvent):
2202         (QtWebPageEventHandler::handleDragEnterEvent):
2203         (QtWebPageEventHandler::handleDragMoveEvent):
2204         (QtWebPageEventHandler::handleDropEvent):
2205         (QtWebPageEventHandler::handleSingleTapEvent):
2206         (QtWebPageEventHandler::handleDoubleTapEvent):
2207         (QtWebPageEventHandler::touchEvent):
2208         * UIProcess/qt/QtWebPageEventHandler.h:
2209
2210 2012-01-09  Eunmi Lee  <eunmi15.lee@samsung.com>
2211
2212         [EFL][WK2] Set color_set function to the clipped smart class.
2213         https://bugs.webkit.org/show_bug.cgi?id=75286
2214
2215         Reviewed by Andreas Kling.
2216
2217         Set _ewk_view_smart_color_set() function to the clipped smart class's color_set,
2218         so application can set webpage's background color using evas_object_color_set() API.
2219
2220         * UIProcess/API/efl/ewk_view.cpp:
2221         (_ewk_view_smart_color_set):
2222         (ewk_view_smart_class_init):
2223
2224 2012-01-08  Dan Bernstein  <mitz@apple.com>
2225
2226         REGRESSION (r103859): WKViews leak
2227         https://bugs.webkit.org/show_bug.cgi?id=75805
2228
2229         The flags changed event monitor added in r103859 was retaining the WKView (as it references
2230         self in the handler block), causing it to leak.
2231
2232         * UIProcess/API/mac/WKView.mm:
2233         (-[WKView dealloc]): Moved call to remove the flags changed event monitor from here...
2234         (-[WKView viewDidMoveToWindow]): ...to here. Moved call to add the flags changed event
2235         monitor to here from...
2236         (-[WKView initWithFrame:contextRef:pageGroupRef:]): ...here.
2237
2238 2012-01-06  Mark Rowe  <mrowe@apple.com>
2239
2240         REGRESSION (WebKit2): Save as PDF no longer generates links to URLs
2241         <http://webkit.org/b/65076> / <rdar://problem/9606246>
2242
2243         WebKit2 printing works by having the web process render the page content to a PDF. The PDF
2244         data is then shipped to the UI process which will render it in to the printing graphics context.
2245         Links were being lost because the API used to do the rendering of the PDF in to the printing
2246         graphics context, CGContextDrawPDFPage, did not preserve the links that were present in the
2247         PDF content received from the web process.
2248
2249         To fix this we switch to using PDFKit for drawing the PDF in to the printing graphics context.
2250         PDFKit provides the ability for us to iterate over the links in the PDF content ourselves and
2251         add links in to the printing graphics context.
2252
2253         Reviewed by Alexey Proskuryakov.
2254
2255         * UIProcess/API/mac/WKPrintingView.h:
2256         * UIProcess/API/mac/WKPrintingView.mm:
2257         (pdfAnnotationLinkClass): Look up the PDFAnnotationLink class from PDFKit as WebKit2 loads PDFKit lazily.
2258         (pdfDocumentClass): Ditto.
2259         (-[WKPrintingView _drawPDFDocument:page:atPoint:]): Switch to using the PDFKit equivalents of several types.
2260         Iterate over the annotations present in the PDFPage, calling CGPDFContextSetURLForRect for each PDFAnnotationLink
2261         that we find.
2262         (-[WKPrintingView _drawPreview:]): Create an NSData to feed to PDFDocument.
2263         (-[WKPrintingView drawRect:]): Ditto.
2264         * WebKit2Prefix.h: Add the usual workaround to make Objective-C exceptions compile when C++ exception handling is disabled.
2265
2266 2012-01-06  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
2267
2268         [Qt] [WK2] Minibrowser leaks memory ~6-7Mb per reload
2269         https://bugs.webkit.org/show_bug.cgi?id=75746
2270
2271         Reset WebGraphicsLayer::m_layerTreeTileClient of all dependent 
2272         layers from ~LayerTreeHostQt(). This replaces r103760 which
2273         causes leaks of GraphicsLayerTextureMapper objects on UI side. 
2274
2275         Reviewed by Noam Rosenthal.
2276
2277         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
2278         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
2279         (WebCore::WebGraphicsLayer::setLayerTreeTileClient):
2280         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
2281         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
2282         (WebKit::LayerTreeHostQt::~LayerTreeHostQt):
2283
2284 2012-01-06  Alexey Proskuryakov  <ap@apple.com>
2285
2286         [Mac] Thread verifier assertions when printing
2287         https://bugs.webkit.org/show_bug.cgi?id=75738
2288
2289         Reviewed by Sam Weinig.
2290
2291         * UIProcess/API/mac/WKPrintingView.mm:
2292         (-[WKPrintingView dealloc]): Dealloc in main thread, so that WebFrameProxy doesn't get
2293         deref'ed from a secondary one.
2294         (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): This method calls out to client,
2295         which only expects that on main thread.
2296         (-[WKPrintingView knowsPageRange:]): Call _adjustPrintingMarginsForHeaderAndFooter on main
2297         thread.
2298
2299 2012-01-06  Alexey Proskuryakov  <ap@apple.com>
2300
2301         Need to allow SCNetworkReachability service in sandbox profile
2302         https://bugs.webkit.org/show_bug.cgi?id=75724
2303         <rdar://problem/10652415>
2304
2305         Reviewed by Mark Rowe.
2306
2307         * WebProcess/com.apple.WebProcess.sb:
2308
2309 2012-01-06  Benjamin Poulain  <bpoulain@apple.com>
2310
2311         [Mac] Sort the resources of WebKit2.xcodeproj
2312         https://bugs.webkit.org/show_bug.cgi?id=75636
2313
2314         Reviewed by Andreas Kling.
2315
2316         * WebKit2.xcodeproj/project.pbxproj:
2317
2318 2012-01-06  Rafael Brandao  <rafael.lobo@openbossa.org>
2319
2320         [Qt][WK2] QQuickWebView breaks when an empty url is loaded
2321         https://bugs.webkit.org/show_bug.cgi?id=75445
2322
2323         Reviewed by Tor Arne Vestbø.
2324
2325         * UIProcess/API/qt/qquickwebview.cpp:
2326         (QQuickWebView::load):
2327         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml: Check if a request to load
2328         an empty url is ignored. 'about:blank' should be used instead to load an empty page.
2329         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
2330
2331 2012-01-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2332
2333         [Qt] Move listing of include paths and libs to pri files in sources
2334
2335         Includepaths are sometimes modified by non-Qt contributors so keeping
2336         them in files inside Sources makes it more likely that they are updated
2337         along with project files for the other ports.
2338
2339         Using pri files instead of prf files for this also has the benefit that
2340         the include() from the main target file can be parsed and followed by
2341         Qt Creator -- something that does not work with load().
2342
2343         Dependency from a target to a library through the WEBKIT variable are
2344         handled through forwarding-files in Tools/qmake/mkspecs/modules, which
2345         set the source root of the module and include the right pri file.
2346
2347         Ideally we'd use the variant of include() that takes an optional
2348         namespace to read the variables into, or the fromfile() function,
2349         but both of these add an overhead of about 40% on the total qmake
2350         runtime, due to making a deep copy of all the variables in the
2351         project or re-reading all the prf files from scratch.
2352
2353         Reviewed by Simon Hausmann.
2354         Reviewed by Ossy.
2355
2356         * Target.pri:
2357         * WebKit2.pri: Renamed from Tools/qmake/mkspecs/features/webkit2.prf.
2358
2359 2012-01-06  Zeno Albisser  <zeno@webkit.org>
2360
2361         [Qt][WK2] Add test for application URL schemes.
2362         https://bugs.webkit.org/show_bug.cgi?id=74933
2363
2364         Reviewed by Kenneth Rohde Christiansen.
2365
2366         * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml: Added.
2367         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
2368
2369 2012-01-05  Dan Bernstein  <mitz@apple.com>
2370
2371         <rdar://problem/10633760> Update copyright strings
2372
2373         Reviewed by Mark Rowe.
2374
2375         * Info.plist:
2376         * PluginProcess/Info.plist:
2377         * WebProcess/Info.plist:
2378
2379 2012-01-05  Anders Carlsson  <andersca@apple.com>
2380
2381         Crash when trying to invalidate the NPRuntimeObjectMap for a plug-in in a subframe
2382         https://bugs.webkit.org/show_bug.cgi?id=75667
2383         <rdar://problem/10389454>
2384
2385         Reviewed by Kevin Decker.
2386
2387         NPRuntimeObjectMap::invalidate is called whenever a plug-in view is destroyed. If invalidate is called for an object map
2388         whose plug-in has a null frame, we'd crash.
2389
2390         The plug-in will have a null frame if the plug-in view is destroyed because its containing frame has been removed from the document,
2391         and if the plug-in view is being destroyed asynchronously due to the plug-in itself calling JavaScript that will remove the frame
2392         (see PluginView::unprotectPluginFromDestruction).
2393
2394         The reason NPRuntimeObjectMap::invalidate will crash when the frame is null is because we were trying to access the frame's global
2395         object, causing a null dereference. The reason we were trying to get at the frame's global object was to create a Strong handle to
2396         a JSNPObject so we could stick the object in a vector so we could later iterate over the vector elements and call invalidate() on
2397         each JSNPObject which will end up releasing the underlying NPObject.
2398
2399         However, it turns out that we don't need to stick the JSNPObject in a vector; we can just get the underlying NPObject directly and
2400         stick that in a vector and then iterate over the NPObjects, releasing them.
2401
2402         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2403         (WebKit::NPRuntimeObjectMap::invalidate):
2404
2405 2012-01-05  Alexey Proskuryakov  <ap@apple.com>
2406
2407         REGRESSION (r98912-r99538): Crash in WebKit::WebFrameLoaderClient::didDetectXSS
2408         https://bugs.webkit.org/show_bug.cgi?id=75578
2409
2410         Reviewed by Daniel Bates.
2411
2412         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2413         (WebKit::InjectedBundlePageLoaderClient::didDetectXSSForFrame):
2414         Check for a correct struct member existence.
2415
2416 2012-01-05  Alexey Proskuryakov  <ap@apple.com>
2417
2418         WK2: Safari fails to open a PostScript file in Preview from context menu
2419         https://bugs.webkit.org/show_bug.cgi?id=75643
2420         <rdar://problem/9823430>
2421
2422         Reviewed by Dan Bernstein.
2423
2424         * UIProcess/API/mac/PDFViewController.mm: (WebKit::PDFViewController::setPDFDocumentData):
2425         Append ".pdf" to file name when converting data, as suggested file name is created for
2426         original MIME type.
2427
2428 2012-01-05  Zeno Albisser  <zeno@webkit.org>
2429
2430         [Qt][WK2] Implement custom URL schemes defined in QML.
2431         https://bugs.webkit.org/show_bug.cgi?id=74931
2432
2433         Allow creation of custom UrlSchemeDelegates from QML.
2434         A UrlSchemeDelegate contains a handler signal that is triggered
2435         when a url matching the defined scheme is requested.
2436         To allow for this a derivation of QNetworkAccessManager
2437         is necessary.
2438         The request is then handled in QML/JS and a reply
2439         is sent back from the UIProcess to the WebProcess.
2440
2441         Reviewed by Kenneth Rohde Christiansen.
2442
2443         * Shared/qt/QtNetworkReplyData.cpp: Added.
2444         (WebKit::QtNetworkReplyData::QtNetworkReplyData):
2445         (WebKit::QtNetworkReplyData::encode):
2446         (WebKit::QtNetworkReplyData::decode):
2447         * Shared/qt/QtNetworkReplyData.h: Added.
2448         * Shared/qt/QtNetworkRequestData.cpp: Added.
2449         (WebKit::QtNetworkRequestData::QtNetworkRequestData):
2450         (WebKit::QtNetworkRequestData::encode):
2451         (WebKit::QtNetworkRequestData::decode):
2452         * Shared/qt/QtNetworkRequestData.h: Added.
2453         * Target.pri:
2454         * UIProcess/API/qt/qquicknetworkreply.cpp: Added.
2455         (QQuickNetworkReply::QQuickNetworkReply):
2456         (QQuickNetworkReply::contentType):
2457         (QQuickNetworkReply::setContentType):
2458         (QQuickNetworkReply::operation):
2459         (QQuickNetworkReply::setOperation):
2460         (QQuickNetworkReply::contentDisposition):
2461         (QQuickNetworkReply::setContentDisposition):
2462         (QQuickNetworkReply::location):
2463         (QQuickNetworkReply::setLocation):
2464         (QQuickNetworkReply::lastModified):
2465         (QQuickNetworkReply::setLastModified):
2466         (QQuickNetworkReply::cookie):
2467         (QQuickNetworkReply::setCookie):
2468         (QQuickNetworkReply::userAgent):
2469         (QQuickNetworkReply::setUserAgent):
2470         (QQuickNetworkReply::server):
2471         (QQuickNetworkReply::setServer):
2472         (QQuickNetworkReply::data):
2473         (QQuickNetworkReply::setData):
2474         (QQuickNetworkReply::send):
2475         (QQuickNetworkReply::networkRequestData):
2476         (QQuickNetworkReply::setNetworkRequestData):
2477         (QQuickNetworkReply::networkReplyData):
2478         * UIProcess/API/qt/qquicknetworkreply_p.h: Added.
2479         * UIProcess/API/qt/qquicknetworkrequest_p.h: Added.
2480         * UIProcess/API/qt/qquickurlschemedelegate.cpp: Added.
2481         (QQuickUrlSchemeDelegate::QQuickUrlSchemeDelegate):
2482         (QQuickUrlSchemeDelegate::scheme):
2483         (QQuickUrlSchemeDelegate::setScheme):
2484         (QQuickUrlSchemeDelegate::request):
2485         (QQuickUrlSchemeDelegate::reply):
2486         * UIProcess/API/qt/qquickurlschemedelegate_p.h: Added.
2487         * UIProcess/API/qt/qquickwebview.cpp:
2488         (QQuickWebViewExperimental::QQuickWebViewExperimental):
2489         (QQuickWebViewExperimental::schemeDelegates_At):
2490         (QQuickWebViewExperimental::schemeDelegates_Append):
2491         (QQuickWebViewExperimental::schemeDelegates_Count):
2492         (QQuickWebViewExperimental::schemeDelegates_Clear):
2493         (QQuickWebViewExperimental::schemeDelegates):
2494         (QQuickWebViewExperimental::invokeApplicationSchemeHandler):
2495         (QQuickWebViewExperimental::sendApplicationSchemeReply):
2496         * UIProcess/API/qt/qquickwebview_p.h:
2497         * UIProcess/WebPageProxy.h:
2498         * UIProcess/WebPageProxy.messages.in:
2499         * UIProcess/qt/QtPageClient.cpp:
2500         (QtPageClient::handleApplicationSchemeRequest):
2501         * UIProcess/qt/QtPageClient.h:
2502         * UIProcess/qt/WebPageProxyQt.cpp:
2503         (WebKit::WebPageProxy::registerApplicationScheme):
2504         (WebKit::WebPageProxy::resolveApplicationSchemeRequest):
2505         (WebKit::WebPageProxy::sendApplicationSchemeReply):
2506         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2507         (WebKit::WebFrameLoaderClient::createNetworkingContext):
2508         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
2509         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
2510         * WebProcess/WebPage/WebPage.h:
2511         * WebProcess/WebPage/WebPage.messages.in:
2512         * WebProcess/WebPage/qt/WebPageQt.cpp:
2513         (WebKit::WebPage::registerApplicationScheme):
2514         (WebKit::WebPage::receivedApplicationSchemeRequest):
2515         (WebKit::WebPage::applicationSchemeReply):
2516         * WebProcess/qt/QtNetworkAccessManager.cpp: Added.
2517         (WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
2518         (WebKit::QtNetworkAccessManager::obtainOriginatingWebPage):
2519         (WebKit::QtNetworkAccessManager::createRequest):
2520         (WebKit::QtNetworkAccessManager::registerApplicationScheme):
2521         * WebProcess/qt/QtNetworkAccessManager.h: Added.
2522         * WebProcess/qt/QtNetworkReply.cpp: Added.
2523         (WebKit::QtNetworkReply::QtNetworkReply):
2524         (WebKit::QtNetworkReply::setData):
2525         (WebKit::QtNetworkReply::setReplyData):
2526         (WebKit::QtNetworkReply::readData):
2527         (WebKit::QtNetworkReply::bytesAvailable):
2528         (WebKit::QtNetworkReply::setHeader):
2529         (WebKit::QtNetworkReply::abort):
2530         (WebKit::QtNetworkReply::close):
2531         (WebKit::QtNetworkReply::setReadBufferSize):
2532         (WebKit::QtNetworkReply::canReadLine):
2533         (WebKit::QtNetworkReply::finalize):
2534         * WebProcess/qt/QtNetworkReply.h: Added.
2535         * WebProcess/qt/WebProcessQt.cpp:
2536         (WebKit::WebProcess::platformInitializeWebProcess):
2537
2538 2012-01-05  Fady Samuel  <fsamuel@chromium.org>
2539
2540         Move scalePageBy from eventSender to window.internals
2541         https://bugs.webkit.org/show_bug.cgi?id=64512
2542
2543         Reviewed by Simon Fraser.
2544
2545         * win/WebKit2.def:
2546         * win/WebKit2CFLite.def:
2547
2548 2012-01-05  Alexander Færøy  <alexander.faeroy@nokia.com>
2549
2550         Pass WebFrame instead of WebCore::Frame to the WebKit2 specific FrameNetworkingContext
2551         https://bugs.webkit.org/show_bug.cgi?id=75550
2552
2553         Make the WebKit2 FrameNetworkingContext implementation store the
2554         WebFrame instead of the WebCore::Frame as this is needed for the Qt
2555         port to implement a.o. HTTP autentication and SSL support.
2556
2557         As the WebFrameNetworkingContext is partly shared across all WebKit2 ports,
2558         all port specific files have been modified.
2559
2560         For the Qt implementation of FrameNetworkingContext, we also set a
2561         property to the originatingObject for the page ID. We also switch to
2562         using an OwnPtr instead of a raw C++ pointer for the
2563         m_originatingObject member.
2564
2565         Based on original patch by Peter Hartmann.
2566
2567         Reviewed by Kenneth Rohde Christiansen.
2568
2569         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2570         (WebKit::WebFrameLoaderClient::createNetworkingContext):
2571         * WebProcess/WebCoreSupport/efl/WebFrameNetworkingContext.h:
2572         (WebFrameNetworkingContext::create):
2573         (WebFrameNetworkingContext::WebFrameNetworkingContext):
2574         * WebProcess/WebCoreSupport/gtk/WebFrameNetworkingContext.h:
2575         (WebFrameNetworkingContext::create):
2576         (WebFrameNetworkingContext::WebFrameNetworkingContext):
2577         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
2578         (WebKit::WebFrameNetworkingContext::create):
2579         (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext):
2580         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
2581         (WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext):
2582         (WebCore::WebFrameNetworkingContext::~WebFrameNetworkingContext):
2583         (WebCore::WebFrameNetworkingContext::create):
2584         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
2585         * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h:
2586         (WebFrameNetworkingContext::create):
2587         (WebFrameNetworkingContext::WebFrameNetworkingContext):
2588
2589 2012-01-05  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2590
2591         [Qt] Implement QQuickWebView::inputMethodQuery
2592
2593         Reviewed by Simon Hausmann.
2594
2595         Implement the current Qt5 queries of inputMethodQuery.
2596
2597         * UIProcess/API/qt/qquickwebview.cpp:
2598         (QQuickWebView::inputMethodQuery):
2599         * UIProcess/API/qt/qquickwebview_p.h:
2600
2601 2012-01-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2602
2603         [GTK] Add methods to get/set the WebView zoom level to WebKit2 GTK+ API
2604         https://bugs.webkit.org/show_bug.cgi?id=75248
2605
2606         Reviewed by Gustavo Noronha Silva.
2607
2608         It uses the page zoom factor unconditionally for now.
2609
2610         * UIProcess/API/gtk/WebKitWebView.cpp:
2611         (webkitWebViewSetProperty):
2612         (webkitWebViewGetProperty):
2613         (webkit_web_view_class_init): Add WebKitWebView:zoom-level
2614         property.
2615         (webkit_web_view_set_zoom_level): Set current zoom level.
2616         (webkit_web_view_get_zoom_level): Get current zoom level.
2617         * UIProcess/API/gtk/WebKitWebView.h:
2618         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
2619         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2620         (testWebViewZoomLevel):
2621         (beforeAll):
2622
2623 2012-01-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2624
2625         [GTK] Rename webkit_web_view_load_alternate_html as webkit_web_view_replace_content in WebKit2 GTK+
2626         https://bugs.webkit.org/show_bug.cgi?id=75433
2627
2628         Reviewed by Martin Robinson.
2629
2630         * UIProcess/API/gtk/WebKitWebView.cpp:
2631         (webkitWebViewLoadFail): Use webkit_web_view_replace_content().
2632         (webkitWebViewLoadChanged): Do not emit load-changed signal when
2633         replacing content.
2634         (webkitWebViewLoadFailed): Do not emit load-failed signal when
2635         replacing content.
2636         (webkitWebViewSetEstimatedLoadProgress): Do not emit
2637         notify::estimated-load-progress signal when replacing content.
2638         (webkit_web_view_replace_content):
2639         * UIProcess/API/gtk/WebKitWebView.h:
2640         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
2641         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
2642         (beforeAll):
2643         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2644         (replaceContentTitleChangedCallback):
2645         (replaceContentLoadCallback):
2646         (testWebViewReplaceContent):
2647         (beforeAll):
2648         * UIProcess/API/gtk/tests/WebViewTest.cpp:
2649         (WebViewTest::replaceContent):
2650         * UIProcess/API/gtk/tests/WebViewTest.h:
2651
2652 2012-01-05  Keunsoon Lee  <keunsoon.lee@samsung.com>
2653
2654         [WK2][EFL] creating dummy functions for Download class on Efl port.
2655         https://bugs.webkit.org/show_bug.cgi?id=75246
2656
2657         dummy functions for Download class on Efl port
2658
2659         Reviewed by Hajime Morita.
2660
2661         * PlatformEfl.cmake: add new file to compile
2662         * WebProcess/Downloads/efl: Added.
2663         * WebProcess/Downloads/efl/DownloadEfl.cpp: Added.
2664         (WebKit::Download::start):
2665         (WebKit::Download::startWithHandle):
2666         (WebKit::Download::cancel):
2667         (WebKit::Download::platformInvalidate):
2668         (WebKit::Download::didDecideDestination):
2669         (WebKit::Download::platformDidFinish):
2670         (WebKit::Download::receivedCredential):
2671         (WebKit::Download::receivedRequestToContinueWithoutCredential):
2672         (WebKit::Download::receivedCancellation):
2673         (WebKit::Download::useCredential):
2674         (WebKit::Download::continueWithoutCredential):
2675         (WebKit::Download::cancelAuthenticationChallenge):
2676
2677 2012-01-04  Dan Bernstein  <mitz@apple.com>
2678
2679         Allow WebProcess to launch a client process and become its first WebProcess.
2680
2681         This is the WebKit2 part of fixing <http://webkit.org/b/75444> Debugging WebProcess requires running a UI process first and waiting to attach
2682
2683         Reviewed by Anders Carlsson.
2684
2685         * PluginProcess/mac/PluginProcessMainMac.mm:
2686         (WebKit::PluginProcessMain): Added a newline to stderr output.
2687         * UIProcess/Launcher/mac/EnvironmentVariables.cpp:
2688         (WebKit::EnvironmentVariables::preexistingProcessServiceNameKey): Added. Returns the name
2689         of the environment variable that optionally tells a UI processs to look for a preexisting
2690         web process instead of launching a new one.
2691         (WebKit::EnvironmentVariables::preexistingProcessTypeKey): Added. Returns the name of the
2692         environment variable that tells a UI process the type of the preexisting web process
2693         indicated by the other variable.
2694         * UIProcess/Launcher/mac/EnvironmentVariables.h:
2695         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2696         (WebKit::ProcessLauncher::launchProcess): Changed to look for a preexisting web process if
2697         the aforementioned environment variables are set and the preexisting process has not been
2698         used yet.
2699         * WebProcess/mac/WebProcessMainMac.mm:
2700         (WebKit::WebProcessMain): Changed to look for the -client-executable command-line option,
2701         and if present, launch the specified executable, setting variables in its environment that
2702         tell it to use this preexisting web process, then wait for it to send a send right to its
2703         listening port.
2704
2705 2012-01-04  Alexey Proskuryakov  <ap@apple.com>
2706
2707         First sentence is missing or clipped when printing a inline PDF
2708         https://bugs.webkit.org/show_bug.cgi?id=75514
2709         <rdar://problem/10640680>
2710
2711         Reviewed by Dan Bernstein.
2712
2713         * UIProcess/WebPageProxy.cpp:
2714         (WebKit::WebPageProxy::headerHeight):
2715         (WebKit::WebPageProxy::footerHeight):
2716         (WebKit::WebPageProxy::drawHeader):
2717         (WebKit::WebPageProxy::drawFooter):
2718         Do not ask the client about headers and footers when printing a PDF.
2719
2720 2012-01-04  Alexander Færøy  <alexander.faeroy@nokia.com>
2721
2722         [Qt] Fix test regressions after r104025
2723         https://bugs.webkit.org/show_bug.cgi?id=75545
2724
2725         Reviewed by Kenneth Rohde Christiansen.
2726
2727         * WebProcess/WebPage/WebPage.cpp:
2728         (WebKit::WebPage::editorState):
2729
2730 2012-01-04  Andras Becsi  <andras.becsi@nokia.com>
2731
2732         REGRESSION(r104028): Broke editing tests and event coordinates in desktop behaviour
2733         https://bugs.webkit.org/show_bug.cgi?id=75542
2734
2735
2736         [Qt][WK2] Pinch zoom should affect the page size
2737         https://bugs.webkit.org/show_bug.cgi?id=74601
2738
2739         Unreviewed roll-out.
2740
2741         * Shared/NativeWebMouseEvent.h:
2742         * Shared/NativeWebTouchEvent.h:
2743         * Shared/NativeWebWheelEvent.h:
2744         * Shared/qt/NativeWebMouseEventQt.cpp:
2745         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2746         * Shared/qt/NativeWebTouchEventQt.cpp:
2747         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
2748         * Shared/qt/NativeWebWheelEventQt.cpp:
2749         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
2750         * Shared/qt/WebEventFactoryQt.cpp:
2751         (WebKit::WebEventFactory::createWebMouseEvent):
2752         (WebKit::WebEventFactory::createWebWheelEvent):
2753         (WebKit::WebEventFactory::createWebTouchEvent):
2754         * Shared/qt/WebEventFactoryQt.h:
2755         * UIProcess/API/qt/qquickwebpage.cpp:
2756         (QQuickWebPage::keyPressEvent):
2757         (QQuickWebPage::keyReleaseEvent):
2758         (QQuickWebPage::inputMethodEvent):
2759         (QQuickWebPage::focusInEvent):
2760         (QQuickWebPage::focusOutEvent):
2761         (QQuickWebPage::mousePressEvent):
2762         (QQuickWebPage::mouseMoveEvent):
2763         (QQuickWebPage::mouseReleaseEvent):
2764         (QQuickWebPage::mouseDoubleClickEvent):
2765         (QQuickWebPage::wheelEvent):
2766         (QQuickWebPage::hoverEnterEvent):
2767         (QQuickWebPage::hoverMoveEvent):
2768         (QQuickWebPage::hoverLeaveEvent):
2769         (QQuickWebPage::dragMoveEvent):
2770         (QQuickWebPage::dragEnterEvent):
2771         (QQuickWebPage::dragLeaveEvent):
2772         (QQuickWebPage::dropEvent):
2773         (QQuickWebPage::geometryChanged):
2774         (QQuickWebPage::event):
2775         (QQuickWebPage::touchEvent):
2776         (QQuickWebPagePrivate::QQuickWebPagePrivate):
2777         (QQuickWebPagePrivate::paintToCurrentGLContext):
2778         * UIProcess/API/qt/qquickwebpage_p.h:
2779         * UIProcess/API/qt/qquickwebpage_p_p.h:
2780         * UIProcess/API/qt/qquickwebview.cpp:
2781         (QQuickWebViewPrivate::enableMouseEvents):
2782         (QQuickWebViewPrivate::disableMouseEvents):
2783         (QQuickWebViewPrivate::loadDidCommit):
2784         (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
2785         (QQuickWebViewPrivate::didChangeContentsSize):
2786         (QQuickWebViewPrivate::didChangeViewportProperties):
2787         (QQuickWebViewPrivate::pageDidRequestScroll):
2788         (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
2789         (QQuickWebViewPrivate::PostTransitionState::apply):
2790         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
2791         (QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour):
2792         (QQuickWebViewExperimental::useTraditionalDesktopBehaviour):
2793         (QQuickWebView::geometryChanged):
2794         (QQuickWebView::focusInEvent):
2795         (QQuickWebView::focusOutEvent):
2796         * UIProcess/API/qt/qquickwebview_p.h:
2797         * UIProcess/API/qt/qquickwebview_p_p.h:
2798         * UIProcess/API/qt/qwebviewportinfo.cpp:
2799         (QWebViewportInfo::contentsSize):
2800         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2801         (tst_QQuickWebView::scrollRequest):
2802         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
2803         (WebKit::QtPinchGestureRecognizer::recognize):
2804         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2805         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
2806         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
2807         (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
2808         (WebKit::QtViewportInteractionEngine::event):
2809         (WebKit::QtViewportInteractionEngine::wheelEvent):
2810         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
2811         (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
2812         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
2813         (WebKit::QtViewportInteractionEngine::applyConstraints):
2814         (WebKit::QtViewportInteractionEngine::currentCSSScale):
2815         (WebKit::QtViewportInteractionEngine::panGestureStarted):
2816         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
2817         (WebKit::QtViewportInteractionEngine::panGestureEnded):
2818         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
2819         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
2820         (WebKit::QtViewportInteractionEngine::scaleContent):
2821         * UIProcess/qt/QtViewportInteractionEngine.h:
2822         * UIProcess/qt/QtWebPageEventHandler.cpp:
2823         (QtWebPageEventHandler::handleEvent):
2824         (QtWebPageEventHandler::handleMouseMoveEvent):
2825         (QtWebPageEventHandler::handleMousePressEvent):
2826         (QtWebPageEventHandler::handleMouseReleaseEvent):
2827         (QtWebPageEventHandler::handleWheelEvent):
2828         (QtWebPageEventHandler::handleHoverLeaveEvent):
2829         (QtWebPageEventHandler::handleHoverMoveEvent):
2830         (QtWebPageEventHandler::handleDragEnterEvent):
2831         (QtWebPageEventHandler::handleDragMoveEvent):
2832         (QtWebPageEventHandler::handleDropEvent):
2833         (QtWebPageEventHandler::handleSingleTapEvent):
2834         (QtWebPageEventHandler::handleDoubleTapEvent):
2835         (QtWebPageEventHandler::touchEvent):
2836         * UIProcess/qt/QtWebPageEventHandler.h:
2837
2838 2012-01-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2839
2840         [Qt] Introduce new qmake variable 'WEBKIT' for signaling dependencies
2841
2842         The custom qmake variable 'WEBKIT' is used for signaling that a
2843         target depends in some way on other subproject of the WebKit
2844         project. For now this is limited to the set of intermediate
2845         libraries: wtf, javascriptcore, webcore, and webkit2.
2846
2847         This replaces the previous convension of using load(foo) for
2848         just include paths, and CONFIG += foo to also link against foo.
2849
2850         Adding a dependency results in additional include paths being
2851         available, and potentially linking to the library. This is
2852         decided by the build system based on conditions such as what
2853         kind of target is being built and the general build config.
2854
2855         An advantage to his approach is that it simplifies the individual
2856         foo.prf files, for example by allowing us to use INCLUDEPATH +=
2857         and LIBS += as normal instead of prepending.
2858
2859         Reviewed by Simon Hausmann.
2860
2861         * Target.pri:
2862         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
2863
2864 2012-01-03  Andras Becsi  <andras.becsi@nokia.com>
2865
2866         [Qt][WK2] Pinch zoom should affect the page size
2867         https://bugs.webkit.org/show_bug.cgi?id=74601
2868
2869         Reviewed by Kenneth Rohde Christiansen and Simon Hausmann.
2870
2871         The current implementation uses the scale property of the QQuickWebPage
2872         to scale the page in response to pinch gestures.
2873         However for layout and anchoring to work correctly in QML, pinching needs
2874         to change the page size.
2875         This patch applies the pinch scale to the page size and to the transformation
2876         matrix of the drawing area.
2877         Thus the page item's coordinate system is no longer a direct representation
2878         of the WebCore::Page coordinate system and it is no longer suitable as
2879         an inertial frame of reference for input events. The event propagation had
2880         to be moved to the QQuickWebView and the positions translated to content
2881         coordinates when NativeWebEvents are created.
2882
2883         * Shared/NativeWebMouseEvent.h:
2884         * Shared/NativeWebTouchEvent.h:
2885         * Shared/NativeWebWheelEvent.h:
2886         * Shared/qt/NativeWebMouseEventQt.cpp:
2887         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2888         * Shared/qt/NativeWebTouchEventQt.cpp:
2889         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
2890         * Shared/qt/NativeWebWheelEventQt.cpp:
2891         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
2892         * Shared/qt/WebEventFactoryQt.cpp:
2893         (WebKit::WebEventFactory::createWebMouseEvent):
2894         (WebKit::WebEventFactory::createWebWheelEvent):
2895         (WebKit::WebEventFactory::createWebTouchEvent):
2896         * Shared/qt/WebEventFactoryQt.h:
2897         * UIProcess/API/qt/qquickwebpage.cpp:
2898         (QQuickWebPage::geometryChanged):
2899         (QQuickWebPagePrivate::QQuickWebPagePrivate):
2900         (QQuickWebPagePrivate::paintToCurrentGLContext):
2901         (QQuickWebPage::usesTraditionalDesktopBehaviour):
2902         (QQuickWebPage::setUsesTraditionalDesktopBehaviour):
2903         (QQuickWebPage::eventHandler):
2904         (QQuickWebPage::setContentSize):
2905         (QQuickWebPage::contentSize):
2906         (QQuickWebPage::setContentScale):
2907         (QQuickWebPage::contentScale):
2908         (QQuickWebPage::transformFromItem):
2909         (QQuickWebPage::transformToItem):
2910         (QQuickWebPagePrivate::updateSize):
2911         * UIProcess/API/qt/qquickwebpage_p.h:
2912         * UIProcess/API/qt/qquickwebpage_p_p.h:
2913         * UIProcess/API/qt/qquickwebview.cpp:
2914         (QQuickWebViewPrivate::enableMouseEvents):
2915         (QQuickWebViewPrivate::disableMouseEvents):
2916         (QQuickWebViewPrivate::loadDidCommit):
2917         (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
2918         (QQuickWebViewPrivate::didChangeContentsSize):
2919         (QQuickWebViewPrivate::didChangeViewportProperties):
2920         (QQuickWebViewPrivate::pageDidRequestScroll):
2921         (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
2922         (QQuickWebViewPrivate::PostTransitionState::apply):
2923         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
2924         (QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour):
2925         (QQuickWebViewExperimental::useTraditionalDesktopBehaviour):
2926         (QQuickWebView::mapToWebContent):
2927         (QQuickWebView::mapRectToWebContent):
2928         (QQuickWebView::mapFromWebContent):
2929         (QQuickWebView::mapRectFromWebContent):
2930         (QQuickWebView::geometryChanged):
2931         (QQuickWebView::keyPressEvent):
2932         (QQuickWebView::keyReleaseEvent):
2933         (QQuickWebView::inputMethodEvent):
2934         (QQuickWebView::focusInEvent):
2935         (QQuickWebView::focusOutEvent):
2936         (QQuickWebView::touchEvent):
2937         (QQuickWebView::mousePressEvent):
2938         (QQuickWebView::mouseMoveEvent):
2939         (QQuickWebView::mouseReleaseEvent):
2940         (QQuickWebView::mouseDoubleClickEvent):
2941         (QQuickWebView::wheelEvent):
2942         (QQuickWebView::hoverEnterEvent):
2943         (QQuickWebView::hoverMoveEvent):
2944         (QQuickWebView::hoverLeaveEvent):
2945         (QQuickWebView::dragMoveEvent):
2946         (QQuickWebView::dragEnterEvent):
2947         (QQuickWebView::dragLeaveEvent):
2948         (QQuickWebView::dropEvent):
2949         (QQuickWebView::event):
2950         * UIProcess/API/qt/qquickwebview_p.h:
2951         * UIProcess/API/qt/qquickwebview_p_p.h:
2952         * UIProcess/API/qt/qwebviewportinfo.cpp:
2953         (QWebViewportInfo::contentsSize):
2954         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2955         (tst_QQuickWebView::scrollRequest):
2956         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
2957         (WebKit::QtPinchGestureRecognizer::recognize):
2958         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2959         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
2960         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
2961         (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
2962         (WebKit::QtViewportInteractionEngine::event):
2963         (WebKit::QtViewportInteractionEngine::wheelEvent):
2964         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
2965         (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
2966         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
2967         (WebKit::QtViewportInteractionEngine::applyConstraints):
2968         (WebKit::QtViewportInteractionEngine::currentCSSScale):
2969         (WebKit::QtViewportInteractionEngine::panGestureStarted):
2970         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
2971         (WebKit::QtViewportInteractionEngine::panGestureEnded):
2972         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
2973         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
2974         (WebKit::QtViewportInteractionEngine::scaleContent):
2975         * UIProcess/qt/QtViewportInteractionEngine.h:
2976         * UIProcess/qt/QtWebPageEventHandler.cpp:
2977         (QtWebPageEventHandler::handleEvent):
2978         (QtWebPageEventHandler::handleMouseMoveEvent):
2979         (QtWebPageEventHandler::handleMousePressEvent):
2980         (QtWebPageEventHandler::handleMouseReleaseEvent):
2981         (QtWebPageEventHandler::handleWheelEvent):
2982         (QtWebPageEventHandler::handleHoverLeaveEvent):
2983         (QtWebPageEventHandler::handleHoverMoveEvent):
2984         (QtWebPageEventHandler::handleDragEnterEvent):
2985         (QtWebPageEventHandler::handleDragMoveEvent):
2986         (QtWebPageEventHandler::handleDropEvent):
2987         (QtWebPageEventHandler::handleSingleTapEvent):
2988         (QtWebPageEventHandler::handleDoubleTapEvent):
2989         (QtWebPageEventHandler::touchEvent):
2990         * UIProcess/qt/QtWebPageEventHandler.h:
2991
2992 2012-01-03  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2993
2994         [Qt] Clean up Qt specific part of editorState()
2995
2996         Reviewed by Simon Hausmann.
2997
2998         Use unsigned instead of int.
2999         No need to clone the range as we don't modify it.
3000         Support selections which include a composition.
3001         If we are not in editable content make sure to use the document element
3002         as the scope for calculating the positions and lengths.
3003         Remove compositionStart/Length as there cannot be a selection and
3004         composition at the same time.
3005
3006         Only tested manually as we don't have everything in place yet
3007         to properly test this.
3008
3009         * Shared/EditorState.h:
3010         * WebProcess/WebPage/WebPage.cpp:
3011         (WebKit::WebPage::editorState):
3012
3013 2012-01-04  Mihnea Ovidenie  <mihnea@adobe.com>
3014
3015         [Mac]Fix build after changeset 103997
3016         https://bugs.webkit.org/show_bug.cgi?id=75530
3017
3018         Reviewed by Andreas Kling.
3019
3020         * UIProcess/API/mac/WKView.mm:
3021
3022 2012-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
3023
3024         [GTK] Scrollbars are drawn behind the window resize grip
3025         https://bugs.webkit.org/show_bug.cgi?id=75384
3026
3027         Reviewed by Martin Robinson.
3028
3029         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3030         (webkitWebViewBaseNotifyResizerSizeForWindow): Get the size of the
3031         main window resize grip and send it to the page proxy if it
3032         overlaps with the view.
3033         (toplevelWindowResizeGripVisibilityChanged): Call
3034         webkitWebViewBaseNotifyResizerSizeForWindow().
3035         (webkitWebViewBaseRealize): Get the toplevel window and connect to
3036         notify::resize-grip-visible signal.
3037         (webkitWebViewBaseSizeAllocate): Call
3038         webkitWebViewBaseNotifyResizerSizeForWindow().
3039
3040 2012-01-03  Jon Lee  <jonlee@apple.com>
3041
3042         Leak of WebNotificationClient when page is destroyed
3043         https://bugs.webkit.org/show_bug.cgi?id=74980
3044         <rdar://problem/10611231>
3045
3046         Reviewed by Mark Rowe.
3047
3048         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
3049         (WebKit::WebNotificationClient::notificationControllerDestroyed): Delete the instance.
3050         * WebProcess/WebCoreSupport/WebNotificationClient.h:
3051
3052 2012-01-03  Sam Weinig  <sam@webkit.org>
3053
3054         Remove unnecessary forward declaration of Function
3055         https://bugs.webkit.org/show_bug.cgi?id=75485
3056
3057         Reviewed by Dan Bernstein.
3058
3059         * Platform/WorkQueue.h:
3060
3061 2012-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
3062
3063         [GTK] Simplify loader client WebKit2 GTK+ API
3064         https://bugs.webkit.org/show_bug.cgi?id=74605
3065
3066         Reviewed by Gustavo Noronha Silva.
3067
3068         Remove WebKitWebLoaderClient from public API keeping it as a
3069         private object. Loading API has been reduced to two signals in
3070         WebKitWebView.
3071
3072         * GNUmakefile.am: Remove WebKitWebLoaderClientPrivate.h.
3073         * UIProcess/API/gtk/WebKitDefines.h: Remove forward delcarations
3074         that are no longer needed.
3075         * UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
3076         (didStartProvisionalLoadForFrame): Emit
3077         WebKitWebView::load-changed signal with Started event.
3078         (didReceiveServerRedirectForProvisionalLoadForFrame): Emit
3079         WebKitWebView::load-changed signal with Redirected event.
3080         (didFailProvisionalLoadWithErrorForFrame): Emit
3081         WebKitWebView::load-failed signal with Started event.
3082         (didCommitLoadForFrame): Emit WebKitWebView::load-changed signal
3083         with Committed event.
3084         (didFinishLoadForFrame): Emit WebKitWebView::load-changed signal
3085         with Finished event.
3086         (didFailLoadWithErrorForFrame): Emit WebKitWebView::load-failed
3087         signal with Committed event.
3088         (webkit_web_loader_client_init):
3089         (webkit_web_loader_client_class_init):
3090         * UIProcess/API/gtk/WebKitWebLoaderClient.h: Remove public API and
3091         move private API here.
3092         * UIProcess/API/gtk/WebKitWebLoaderClientPrivate.h: Removed.
3093         * UIProcess/API/gtk/WebKitWebView.cpp:
3094         (webkitWebViewLoadFail): Default implementation of
3095         WebKitWebView::load-failed signal to show a custom error page.
3096         (webkit_web_view_class_init): Add load-changed and load-failed
3097         signals.
3098         (webkitWebViewLoadChanged): Emit WebKitWebView::load-changed with
3099         the given event.
3100         (webkitWebViewLoadFailed): Emit WebKitWebView::load-failed signal
3101         with the given event, failing uri and error.
3102         * UIProcess/API/gtk/WebKitWebView.h:
3103         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
3104         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Remove loader
3105         client section.
3106         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Remove loader
3107         client symbols.
3108         * UIProcess/API/gtk/docs/webkit2gtk.types: Remove
3109         webkit_web_loader_client_get_type.
3110         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
3111         (loadChangedCallback):
3112         (loadFailedCallback):
3113         (LoadTrackingTest::LoadTrackingTest):
3114         (LoadTrackingTest::~LoadTrackingTest):
3115         (LoadTrackingTest::provisionalLoadStarted):
3116         (LoadTrackingTest::provisionalLoadReceivedServerRedirect):
3117         (LoadTrackingTest::provisionalLoadFailed):
3118         (LoadTrackingTest::loadCommitted):
3119         (LoadTrackingTest::loadFinished):
3120         (LoadTrackingTest::loadFailed):
3121         * UIProcess/API/gtk/tests/LoadTrackingTest.h:
3122         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
3123         (testLoadingError):
3124         (LoadStopTrackingTest::loadCommitted):
3125         (LoadStopTrackingTest::loadFailed):
3126         (testLoadCancelled):
3127         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
3128         (beforeAll):
3129         * UIProcess/API/gtk/webkit2.h: Remove loader client header.
3130         * UIProcess/API/gtk/webkit2marshal.list:
3131
3132 2012-01-03  Rafael Brandao  <rafael.lobo@openbossa.org>
3133
3134         [Qt][WK2] tst_favIconLoad.qml crashes on debug mode
3135         https://bugs.webkit.org/show_bug.cgi?id=75448
3136
3137         Reviewed by Kenneth Rohde Christiansen.
3138
3139         * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: Loads
3140         "about:blank" instead of an empty url between tests to clean favicon.
3141
3142 2012-01-02  Dan Bernstein  <mitz@apple.com>
3143
3144         Fixed a typo I made in r103871.
3145
3146         Fixes <http://webkit.org/b/75450> Inline PDF doesn't preview correctly when attempting to print its frame
3147
3148         * WebProcess/WebPage/WebPage.cpp:
3149         (WebKit::WebPage::drawRectToPDF): Changed USE(GC) to USE(CG).
3150
3151 2012-01-02  Andy Estes  <aestes@apple.com>
3152
3153         Fix the Windows build (again).
3154
3155         * Platform/CoreIPC/Connection.h:
3156
3157 2012-01-02  Sam Weinig  <sam@webkit.org>
3158
3159         Fix windows build.
3160
3161         * Platform/CoreIPC/Connection.h:
3162         * Platform/CoreIPC/win/ConnectionWin.cpp:
3163         * Platform/RunLoop.h:
3164         Missing declarations/includes of BinarySemaphore.
3165
3166 2012-01-02  Sam Weinig  <sam@webkit.org>
3167
3168         Move dispatchSentMessagesUntil out of the RunLoop class.
3169         https://bugs.webkit.org/show_bug.cgi?id=75320
3170
3171         Reviewed by Dan Bernstein.
3172
3173         * Platform/CoreIPC/Connection.cpp:
3174         (CoreIPC::Connection::SyncMessageState::waitWhileDispatchingSentWin32Messages):
3175         * Platform/CoreIPC/Connection.h:
3176         * Platform/CoreIPC/win/ConnectionWin.cpp:
3177         (CoreIPC::Connection::dispatchSentMessagesUntil):
3178         * Platform/win/RunLoopWin.cpp:
3179
3180 2012-01-02  Dan Bernstein  <mitz@apple.com>
3181
3182         Build fix.
3183
3184         * Platform/CoreIPC/mac/ConnectionMac.cpp:
3185         * Platform/mac/SharedMemoryMac.cpp:
3186
3187 2012-01-02  Nikolas Zimmermann  <nzimmermann@rim.com>
3188
3189         Not reviewed. Fix build on Lion, by including mach_error.h in two places that need it.
3190
3191         * PluginProcess/mac/PluginProcessMainMac.mm:
3192         * WebProcess/mac/WebProcessMainMac.mm:
3193
3194 2012-01-01  Dan Bernstein  <mitz@apple.com>
3195
3196         EnvironmentUtilities::stripValuesEndingWithString enters an infinite loop if the search value
3197         occurs a component other than the first.
3198
3199         Reviewed by Anders Carlsson.
3200
3201         * Platform/unix/EnvironmentUtilities.cpp:
3202         (WebKit::EnvironmentUtilities::stripValuesEndingWithString): Changed to start the search for
3203         the next colon after the current colon.
3204
3205 2012-01-01  Dan Bernstein  <mitz@apple.com>
3206
3207         Improved reproting of kernel return codes.
3208
3209         Reviewed by Anders Carlsson.
3210
3211         * Platform/CoreIPC/mac/ConnectionMac.cpp:
3212         (CoreIPC::Connection::exceptionSourceEventHandler): Added the error string to the log message.
3213         * Platform/mac/SharedMemoryMac.cpp:
3214         (WebKit::SharedMemory::create): Ditto.
3215         * PluginProcess/mac/PluginProcessMainMac.mm:
3216         (WebKit::PluginProcessMain): Ditto. Also changed to log to stderr.
3217         * WebProcess/mac/WebProcessMainMac.mm:
3218         (WebKit::WebProcessMain): Ditto.
3219
3220 2011-12-31  Dan Bernstein  <mitz@apple.com>
3221
3222         Continue trying to fix the ASSERT-enabled Windows build after r103858.
3223
3224         * WebProcess/WebPage/WebPage.cpp:
3225         (WebKit::WebPage::drawRectToPDF):
3226         (WebKit::WebPage::drawPagesToPDF):
3227
3228 2011-12-31  Dan Bernstein  <mitz@apple.com>
3229
3230         Start trying to fix the Windows build after r103858.
3231
3232         * WebProcess/WebPage/WebPage.cpp:
3233         (WebKit::drawPDFPage):
3234
3235 2011-12-31  Dan Bernstein  <mitz@apple.com>
3236
3237         <rdar://problem/10463059> Cannot print USPS shipping labels
3238         http://webkit.org/b/72801
3239
3240         Reviewed by Anders Carlsson and Alexey Proskuryakov.
3241
3242         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
3243         (appendValuesInPDFNameSubtreeToVector): Copied from WebKit/mac/WebView/WebPDFDocumentExtras.mm.
3244         (getAllValuesInPDFNameTree): Ditto.
3245         (getAllScriptsInPDFDocument): Copied allScriptsInPDFDocument() from WebPDFDocumentExtras.mm
3246         and changed it to append to a Vector<RetainPtr<CFStringRef> >.
3247         (WebKit::BuiltInPDFView::create): Changed to take a WebFrame* rather than a Page*.
3248         (WebKit::BuiltInPDFView::BuiltInPDFView): Ditto. Updated initializer accordingly.
3249         (WebKit::BuiltInPDFView::pdfDocumentDidLoad): Copied and adapted code from
3250         -[WebPDFRepresentation finishedLoadingWithDataSource:] to run scripts from the PDF with a
3251         Doc object as the this object.
3252         (WebKit::BuiltInPDFView::initialize): Adapted for the change from having a Page* to having
3253         a WebFrame*.
3254         (WebKit::BuiltInPDFView::destroy): Ditto.
3255         (WebKit::BuiltInPDFView::isActive): Ditto.
3256         (WebKit::jsPDFDocInitialize): Added. Refs the BuiltInPDFView which is the private object for
3257         this Doc.
3258         (WebKit::jsPDFDocFinalize): Added. Derefs the BuiltInPDFView for this Doc.
3259         (WebKit::BuiltInPDFView::jsPDFDocPrint): Added. Calls WebCore::Chrome::print().
3260         (WebKit::BuiltInPDFView::makeJSPDFDoc): Copied from WebKit/mac/WebView/WebJSPDFDoc.mm and
3261         modified to use this BuiltInPDFView as the private object of the Doc being made.
3262         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
3263         (WebKit::BuiltInPDFView::disconnectFromPage): Adapted for the change from having a Page* to
3264         having a WebFrame*.
3265         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3266         (WebKit::WebFrameLoaderClient::createPlugin): Pass the WebFrame to WebPage::createPlugin().
3267         * WebProcess/WebPage/WebPage.cpp:
3268         (WebKit::WebPage::createPlugin): Added a WebFrame* parameter, which is used when creating
3269         a BuiltInPDFView.
3270         * WebProcess/WebPage/WebPage.h:
3271
3272 2011-12-31  Dan Bernstein  <mitz@apple.com>
3273
3274         <rdar://problem/8553040> REGRESSION (WebKit2): Safari status text doesn't change when you change the modifier keys without moving the mouse
3275         https://bugs.webkit.org/show_bug.cgi?id=75404
3276
3277         Reviewed by Jon Honeycutt.
3278
3279         * UIProcess/API/mac/WKView.mm:
3280         (-[WKView dealloc]): Remove the flags changed event monitor.
3281         (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): Added. Similarly to
3282         -[WebHTMLView _postFlagsChangedEvent:], creates a mouse moved event and passes it to
3283         -mouseMoved:.
3284         (-[WKView initWithFrame:contextRef:pageGroupRef:]): Create a local event monitor for flags
3285         changed events.
3286
3287 2011-12-31  Dan Bernstein  <mitz@apple.com>
3288
3289         <rdar://problem/8750356> REGRESSION (WebKit2): Printing a subframe containing a PDF prints the on-screen view instead of the entire PDF document
3290         <http://webkit.org/b/75232>
3291
3292         Reviewed by Alexey Proskuryakov.
3293
3294         * UIProcess/API/C/WKPage.cpp:
3295         (WKPageDrawPagesToPDF): Added WKPrintInfo parameter, which is passed through as a PrintInfo
3296         to the WebPageProxy.
3297         * UIProcess/API/C/WKPagePrivate.h:
3298         * UIProcess/API/mac/WKPrintingView.mm:
3299         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Changed to pass the PrintInfo
3300         down to WebPageProxy::drawPagesToPDF.
3301         (-[WKPrintingView _drawPreview:]): Changed to pass the PrintInfo down to
3302         WebPageProxy::drawRectToPDF.
3303         * UIProcess/API/mac/WKView.mm:
3304         (-[WKView canChangeFrameLayout:]): Changed to use WebFrameProxy::isDisplayingPDFDocument, which
3305         works for subframes as well.
3306         (-[WKView printOperationWithPrintInfo:forFrame:]): Added a FIXME.
3307         * UIProcess/WebFrameProxy.cpp:
3308         (WebKit::WebFrameProxy::isDisplayingPDFDocument): Added.
3309         * UIProcess/WebFrameProxy.h:
3310         * UIProcess/WebPageProxy.cpp:
3311         (WebKit::WebPageProxy::drawRectToPDF): Added a PrintInfo parameter, which is passed through to
3312         the Web process.
3313         (WebKit::WebPageProxy::drawPagesToPDF): Ditto.
3314         * UIProcess/WebPageProxy.h:
3315         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
3316         Added an override of pdfDocumentForPrinting() which returns the PDFDocument.
3317         * WebProcess/Plugins/Plugin.h:
3318         (WebKit::Plugin::pdfDocumentForPrinting): Added. This base class implementation returns 0.
3319         * WebProcess/Plugins/PluginView.h:
3320         (WebKit::PluginView::pdfDocumentForPrinting): Added. Calls through to the Plugin.
3321         * WebProcess/WebPage/WebPage.cpp:
3322         (WebKit::pdfDocumentForPrintingFrame): Added this helper function. If the frame is displaying
3323         a plug-in document, allows the plug-in to provide a PDF document for printing.
3324         (WebKit::WebPage::beginPrinting): Added an early return if the frame provides a PDF document
3325         for printing.
3326         (WebKit::WebPage::computePagesForPrinting): If the frame provides a PDF document for printing,
3327         create for each page in the PDF document a page rect with the size available for printing.
3328         (WebKit::drawPDFPage): Added this helper function, which draws a page from the PDF document
3329         into one of the aforementioned page rects. It rotates the PDF page 90 degrees if necessary to
3330         better match the aspect ratio of the paper, then it centers it on the paper. This matches the
3331         behavior of a PDFView when printed with default settings.
3332         (WebKit::WebPage::drawRectToPDF): If the frame provides a PDF document for printing, draw the
3333         PDF pages falling within the requested rect.
3334         (WebKit::WebPage::drawPagesToPDF): If the frame provides a PDF document for printing, draw
3335         the requested pages.
3336         * WebProcess/WebPage/WebPage.h:
3337         * WebProcess/WebPage/WebPage.messages.in: Added a PrintInfo parameter to DrawRectToPDF and
3338         DrawPagesToPDF.
3339
3340 2011-12-30  Dan Bernstein  <mitz@apple.com>
3341
3342         EnvironmentUtilities::stripValuesEndingWithString fails when the variable ends with the search value
3343         https://bugs.webkit.org/show_bug.cgi?id=75389
3344
3345         Reviewed by Anders Carlsson.
3346
3347         * Platform/unix/EnvironmentUtilities.cpp:
3348         (WebKit::EnvironmentUtilities::stripValuesEndingWithString): Fixed an off-by-1 error when
3349         examining the character after the match.
3350
3351 2011-12-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3352
3353         [Qt] Remove unused m_signalListeners from WorkQueue
3354         https://bugs.webkit.org/show_bug.cgi?id=75354
3355
3356         Reviewed by Andreas Kling.
3357
3358         This is unused since r76507.
3359
3360         * Platform/WorkQueue.h:
3361         * Platform/qt/WorkQueueQt.cpp:
3362         (WorkQueue::platformInvalidate):
3363
3364 2011-12-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3365
3366         [GTK] Context menu is hidden right after showing it when first menu item is not disabled
3367         https://bugs.webkit.org/show_bug.cgi?id=75357
3368
3369         Reviewed by Martin Robinson.
3370
3371         The problem is that we are passing GDK_CURRENT_TIME (which is 0)
3372         to gtk_popup_menu, because the events are async and
3373         gtk_get_current_event is NULL when calling gtk_menu_popup. GtkMenu
3374         has a timeout to decide whether the press-release was fast enough
3375         and ignore the button release event in that case. That way, a
3376         normal right click shows the menu while a long press hides the
3377         menu when the button is released. So, we need to know the real time
3378         when the right button was pressed and pass it to gtk_popup_menu.
3379
3380         * UIProcess/WebPageProxy.h: Make
3381         currentlyProcessedMouseDownEvent() public.
3382         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
3383         (WebKit::WebContextMenuProxyGtk::showContextMenu): Use
3384         WebPageProxy::currentlyProcessedMouseDownEvent() to get the
3385         current mouse event and pass its button number and time to
3386         gtk_popup_menu.
3387
3388 2011-12-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3389
3390         [GTK] Fix several conding style issues in WebKit2 GTK+ code
3391         https://bugs.webkit.org/show_bug.cgi?id=75339
3392
3393         Reviewed by Martin Robinson.
3394
3395         In addition to the WebKit coding style, code in UIProcess/API/gtk
3396         should follow style and conventions described here
3397         http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
3398
3399         * UIProcess/API/gtk/WebKitSettings.cpp: Remove trailing whitespaces.
3400         (webkit_settings_class_init): Remove trailing whitespaces, fix
3401         indentation issues in API doc comments, add missing trailing to
3402         some properties.
3403         (webkit_settings_set_enable_fullscreen): Move the code after
3404         get_enable_fullscreen() for consistency.
3405         * UIProcess/API/gtk/WebKitSettings.h: Remove trailing
3406         whitespaces. Fix * placement and line up parameters.
3407         * UIProcess/API/gtk/WebKitWebView.cpp: Remove several empty lines.
3408         (webkit_web_view_class_init): Mark property nicks and blurbs for translation.
3409         (webkitWebViewSetTitle): Remove trailing whitespaces.
3410         * UIProcess/API/gtk/WebKitWebView.h: Line up parameters.
3411         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Use the angle-bracket
3412         form for including file from WebCore and wtf. Use GRefPtr for
3413         GtkIMContext and bool instead of gboolean. Use the placement new
3414         syntax for private struct instead of new/delete.
3415         (webkitWebViewBaseRealize):
3416         (webkitWebViewBaseFinalize):
3417         (webkit_web_view_base_init):
3418         (webkitWebViewBaseFocusInEvent):
3419         (webkitWebViewBaseFocusOutEvent):
3420         (webkitWebViewBaseKeyPressEvent): Remove trailing whitespaces.
3421         (webkitWebViewBaseKeyReleaseEvent):
3422         (webkit_web_view_base_class_init):
3423         (webkitWebViewBaseGetIMContext):
3424
3425 2011-12-28  Balazs Kelemen  <kbalazs@webkit.org>
3426
3427         [Qt][WK2] Crash in ~WebGraphicsLayer when running fast/multicol/pagination-* tests
3428         https://bugs.webkit.org/show_bug.cgi?id=75000
3429
3430         Reviewed by Noam Rosenthal.
3431
3432         Don't adopt a tile client that belongs to a parent layer.
3433         This is unnecessary and also unsafe because we can live
3434         through that client.
3435
3436         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3437         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
3438
3439 2011-12-27  Dan Bernstein  <mitz@apple.com>
3440
3441         [mac] Stop using bootstrap_look_up2
3442         https://bugs.webkit.org/show_bug.cgi?id=75280
3443
3444         Reviewed by Mark Rowe.
3445
3446         * PluginProcess/mac/PluginProcessMainMac.mm:
3447         (WebKit::PluginProcessMain): Changed to use bootstrap_look_up() instead of
3448         bootstrap_look_up2().
3449         * WebProcess/mac/WebProcessMainMac.mm:
3450         (WebKit::WebProcessMain): Ditto.
3451
3452 2011-12-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3453
3454         [Qt] Make the inputMethodEvent set or confirm the composition
3455         https://bugs.webkit.org/show_bug.cgi?id=75256
3456
3457         Reviewed by Chang Shu.
3458
3459         * UIProcess/qt/QtWebPageEventHandler.cpp:
3460         (QtWebPageEventHandler::inputMethodEvent):
3461
3462 2011-12-26  Mark Rowe  <mrowe@apple.com>
3463
3464         <http://webkit.org/b/75196> REGRESSION(r103643): Command-clicking a link no longer opens a new tab.
3465
3466         r103643 contained some botched copy-paste code that caused the state of the Command key
3467         to be lost when translating from a WebKit2 event to a WebCore event.
3468
3469         Reviewed by Dan Bernstein.
3470
3471         * Shared/WebEventConversion.cpp:
3472         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): Test for the correct modifier.
3473         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): Ditto.
3474         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent): Ditto.
3475         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent): Ditto.
3476         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent): Ditto.
3477
3478 2011-12-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3479
3480         Fix a crash in WebProcess when starting a download not initiated by a WebPage
3481         https://bugs.webkit.org/show_bug.cgi?id=75225
3482
3483         Reviewed by Darin Adler.
3484
3485         * WebProcess/WebProcess.cpp:
3486         (WebKit::WebProcess::downloadRequest): Check initiatingPage is not
3487         NULL before using it.
3488
3489 2011-12-25  Dan Bernstein  <mitz@apple.com>
3490
3491         Find indicators overlap when a match spans multiple text boxes
3492         https://bugs.webkit.org/show_bug.cgi?id=75220
3493
3494         Reviewed by Darin Adler.
3495
3496         * UIProcess/FindIndicator.cpp:
3497         (WebKit::findIndicatorsForTextRectsOverlap): Added this helper function that checks for
3498         pairwise intersections between all indicator rects.
3499         (WebKit::FindIndicator::FindIndicator): Changed to use a single rect (the union of all text
3500         rects) if any two indicator rects would otherwise overlap. This is similar to what Safari
3501         does, and it eliminates overlapping rects for adjacent text boxes. In rare cases (such as when
3502         a match spans two lines and adjacent text boxes on one of those lines) it results in a find
3503         indicator that is too large and obscures some non-match text.
3504         * UIProcess/FindIndicator.h:
3505
3506 2011-12-21  Sam Weinig  <sam@webkit.org>
3507
3508         Start extracting platform specific bits out of PlatformEvents
3509         https://bugs.webkit.org/show_bug.cgi?id=75063
3510
3511         Reviewed by Anders Carlsson.
3512
3513         * Shared/WebEventConversion.cpp:
3514         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
3515         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
3516         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
3517         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
3518         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
3519         * UIProcess/API/mac/WKView.mm:
3520         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3521         (InitWebCoreSystemInterface):
3522
3523 2011-12-22  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3524
3525         [Qt] [WK2] Use HashMap instead of Vector in the builtin bundle
3526         https://bugs.webkit.org/show_bug.cgi?id=75112
3527
3528         Reviewed by Andreas Kling.
3529
3530         Fix my own FIXME now that HashMap have support to hold OwnPtr as value.
3531
3532         * WebProcess/qt/QtBuiltinBundle.cpp:
3533         (WebKit::QtBuiltinBundle::didCreatePage):
3534         (WebKit::QtBuiltinBundle::willDestroyPage):
3535         (WebKit::QtBuiltinBundle::handleMessageToNavigatorQtObject):
3536         (WebKit::QtBuiltinBundle::handleSetNavigatorQtObjectEnabled):
3537         * WebProcess/qt/QtBuiltinBundle.h:
3538
3539 2011-12-22  Anders Carlsson  <andersca@apple.com>
3540
3541         Remove the last of the WebKit2 display throttling
3542         https://bugs.webkit.org/show_bug.cgi?id=75109
3543
3544         Reviewed by Adam Roben.
3545
3546         The code to do display throttling in WebKit2 is complex and doesn't really help us except
3547         on an old benchmark that's no longer representative of real-world behavior; let's rip it out instead.
3548
3549         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3550         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
3551         (WebKit::DrawingAreaImpl::displayTimerFired):
3552         (WebKit::DrawingAreaImpl::display):
3553         * WebProcess/WebPage/DrawingAreaImpl.h:
3554         * WebProcess/WebPage/WebPage.cpp:
3555         (WebKit::WebPage::wheelEvent):
3556         (WebKit::WebPage::wheelEventSyncForTesting):
3557
3558 2011-12-22  Anders Carlsson  <andersca@apple.com>
3559
3560         Get rid of didStartAnimatedScroll and didCompleteAnimatedScroll
3561         https://bugs.webkit.org/show_bug.cgi?id=75107
3562
3563         Reviewed by Adam Roben.
3564
3565         This is another step towards removing the display throttling in WebKit2.
3566
3567         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3568         (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
3569         * WebProcess/WebCoreSupport/WebChromeClient.h:
3570
3571 2011-12-22  Anders Carlsson  <andersca@apple.com>
3572
3573         Remove didStartRubberBand and didCompleteRubberBand callbacks
3574         https://bugs.webkit.org/show_bug.cgi?id=75102
3575
3576         Reviewed by Adam Roben.
3577
3578         The code to do display throttling in WebKit2 is complex and doesn't really help us except
3579         on an old benchmark that's no longer representative of real-world behavior; let's rip it out instead.
3580
3581         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3582         * WebProcess/WebCoreSupport/WebChromeClient.h:
3583
3584 2011-12-22  Ryuan Choi <ryuan.choi@samsung.com>, Tomasz Morawski <t.morawski@samsung.com>
3585
3586         [EFL][WK2] Add an option to build WebKit2.
3587         https://bugs.webkit.org/show_bug.cgi?id=61999
3588
3589         Reviewed by Eric Seidel.
3590
3591         Add build script for WebKit2 on EFL port.
3592
3593         * CMakeLists.txt:
3594         * PlatformEfl.cmake: Added.
3595
3596 2011-12-21  Eunmi Lee  <eunmi15.lee@samsung.com>
3597
3598         [EFL][WK2] Add efl port's ewk_view files
3599         https://bugs.webkit.org/show_bug.cgi?id=61915
3600
3601         Reviewed by Eric Seidel.
3602
3603         This is the initial version of WebKit2 EFL port's ewk_view.
3604         The ewk_view is Evas_Object to show the rendered web contents.
3605
3606         * UIProcess/API/efl/ewk_view.cpp: Added.
3607         (_ewk_view_smart_changed):
3608         (_ewk_view_smart_focus_in):
3609         (_ewk_view_smart_focus_out):
3610         (_ewk_view_smart_mouse_wheel):
3611         (_ewk_view_smart_mouse_down):
3612         (_ewk_view_smart_mouse_up):
3613         (_ewk_view_smart_mouse_move):
3614         (_ewk_view_smart_key_down):
3615         (_ewk_view_smart_key_up):
3616         (_ewk_view_on_focus_in):
3617         (_ewk_view_on_focus_out):
3618         (_ewk_view_on_mouse_wheel):
3619         (_ewk_view_on_mouse_down):
3620         (_ewk_view_on_mouse_up):
3621         (_ewk_view_on_mouse_move):
3622         (_ewk_view_on_key_down):
3623         (_ewk_view_on_key_up):
3624         (_ewk_view_priv_new):
3625         (_ewk_view_priv_del):
3626         (_ewk_view_smart_add):
3627         (_ewk_view_smart_del):
3628         (_ewk_view_smart_resize):
3629         (_ewk_view_smart_move):
3630         (_ewk_view_smart_calculate):
3631         (_ewk_view_smart_show):
3632         (_ewk_view_smart_hide):
3633         (ewk_view_smart_class_init):
3634         (_ewk_view_smart_class_new):
3635         (ewk_view_add):
3636         (ewk_view_page_get):
3637         * UIProcess/API/efl/ewk_view.h: Added.
3638
3639 2011-12-21  Timothy Hatcher  <timothy@apple.com>
3640
3641         Web Inspector: suppress incremental rendering and use application chrome mode
3642
3643         https://webkit.org/b/75026
3644
3645         Reviewed by Joseph Pecoraro.
3646
3647         * UIProcess/WebInspectorProxy.cpp:
3648         (WebKit::createInspectorPageGroup): Set suppress incremental rendering and use application chrome mode.
3649
3650 2011-12-21  Sam Weinig  <sam@webkit.org>
3651
3652         Cleanup up clients when deallocating WebKit2 API objects
3653         https://bugs.webkit.org/show_bug.cgi?id=75014
3654
3655         Reviewed by Adam Roben.
3656
3657         * UIProcess/API/mac/WKBrowsingContextController.mm:
3658         (-[WKBrowsingContextController dealloc]):
3659         * UIProcess/API/mac/WKConnection.mm:
3660         (-[WKConnection dealloc]):
3661         Clear clients on dealloc.
3662
3663 2011-12-21  Rafael Brandao  <rafael.lobo@openbossa.org>
3664
3665         [Qt][WK2] Add tests for favicon and fix icon url decoding issue
3666         https://bugs.webkit.org/show_bug.cgi?id=74967
3667
3668         Reviewed by Simon Hausmann.
3669
3670         * UIProcess/API/qt/qwebiconimageprovider.cpp: We already receive the url
3671         without the percent encoding and we should access WebIconDatabase with
3672         an encoded url. Added a test to cover this behavior.
3673         (QWebIconImageProvider::requestImage):
3674         * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: Added.
3675         * UIProcess/API/qt/tests/qmltests/common/favicon.html: Added.
3676         * UIProcess/API/qt/tests/qmltests/common/favicon.png: Added.
3677         * UIProcess/API/qt/tests/qmltests/common/favicon2.html: Added.
3678         * UIProcess/API/qt/tests/qmltests/common/small-favicon.png: Added.
3679         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
3680
3681 2011-12-21  Sam Weinig  <sam@webkit.org>
3682
3683         Exception thrown when running WKBrowsingContextLoadDelegateTest.SimpleLoad test
3684         https://bugs.webkit.org/show_bug.cgi?id=75012
3685
3686         Reviewed by Adam Roben.
3687
3688         * UIProcess/API/mac/WKProcessGroup.mm:
3689         (-[WKProcessGroup dealloc]):
3690         Clear the WKContext's connection client.
3691
3692 2011-12-21  Michael Brüning  <michael.bruning@nokia.com>
3693
3694         [Qt][WK2] Fix tst_QQuickWebView::scrollRequest() API test
3695         https://bugs.webkit.org/show_bug.cgi?id=73994
3696
3697         Reviewed by Kenneth Rohde Christiansen.
3698
3699         Added a viewport meta tag so that the view is actually scrollable and
3700         does not get scaled to not be scrollable. Corrected the style
3701         definition for the <div> tag. Removed unneeded text in div
3702
3703         Rolled back changes some of the changes from the previous patch
3704         (r102453) because they weren't necessary.
3705
3706         * UIProcess/API/qt/tests/html/scroll.html:
3707         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3708         (tst_QQuickWebView::scrollRequest): Partially rolled back changes.
3709
3710 2011-12-21  Jessie Berlin  <jberlin@apple.com>
3711
3712         Windows build fix.
3713
3714         Replace all instances of "WebPropupMenuProxy" with "WebPopupMenuProxy".
3715
3716         * UIProcess/win/WebPopupMenuProxyWin.cpp:
3717         (WebKit::WebPopupMenuProxyWin::showPopupMenu):
3718         (WebKit::WebPopupMenuProxyWin::setFocusedIndex):
3719
3720 2011-12-20  Anders Carlsson  <andersca@apple.com>
3721
3722         Add ScrollableArea::contentsResized and have it call the scroll animator
3723         https://bugs.webkit.org/show_bug.cgi?id=74966
3724
3725         Reviewed by Sam Weinig.
3726
3727         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
3728         (WebKit::BuiltInPDFView::scrollbarStyleChanged):
3729
3730 2011-12-20  Anders Carlsson  <andersca@apple.com>
3731
3732         Try to fix the Windows build.
3733
3734         * UIProcess/win/WebPopupMenuProxyWin.cpp:
3735         (WebKit::WebPopupMenuProxyWin::showPopupMenu):
3736         (WebKit::WebPopupMenuProxyWin::setFocusedIndex):
3737
3738 2011-12-20  Simon Hausmann  <simon.hausmann@nokia.com>
3739
3740         [Qt][WK2] Remove statusBarMessageChanged
3741         https://bugs.webkit.org/show_bug.cgi?id=74405
3742
3743         Reviewed by Tor Arne Vestbø.
3744
3745         Removing support for window.status updates from the public
3746         QML API. See bug for details.
3747
3748         * UIProcess/API/qt/qquickwebview_p.h:
3749         * UIProcess/qt/QtWebPageUIClient.cpp:
3750         (QtWebPageUIClient::QtWebPageUIClient):
3751         * UIProcess/qt/QtWebPageUIClient.h:
3752
3753 2011-12-20  Anders Carlsson  <andersca@apple.com>
3754
3755         Add ScrollableArea wrappers for a bunch of ScrollAnimator member functions
3756         https://bugs.webkit.org/show_bug.cgi?id=74951
3757
3758         Reviewed by Sam Weinig.
3759
3760         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
3761         (WebKit::BuiltInPDFView::paint):
3762         (WebKit::BuiltInPDFView::handleMouseEvent):
3763         (WebKit::BuiltInPDFView::handleMouseEnterEvent):
3764         (WebKit::BuiltInPDFView::handleMouseLeaveEvent):
3765
3766 2011-12-20  Brent Fulgham  <bfulgham@webkit.org>
3767
3768         [WinCairo] Unreviewed build fix.
3769
3770         * win/WebKit2CFLite.def: Add missing export declaration.
3771
3772 2011-12-20  Simon Hausmann  <simon.hausmann@nokia.com>
3773
3774         [Qt] Build fix for gcc used on WK2 build bot.
3775
3776         * UIProcess/qt/QtWebPagePolicyClient.cpp:
3777         (QtWebPagePolicyClient::decidePolicyForNavigationAction): Don't do case:
3778         with values outside the range of the type. Instead switch() on the int instead.
3779
3780 2011-12-20  Rafael Brandao  <rafael.lobo@openbossa.org>
3781
3782         [Qt] Extend QQuickWebview::navigationRequested API
3783         https://bugs.webkit.org/show_bug.cgi?id=73818
3784
3785         Reviewed by Simon Hausmann.
3786
3787         Added url of the originating frame on QWebNavigationRequest,
3788         accessible via 'request.originatingUrl' on QML. Download action
3789         was moved to experimental, so in order to use it you should set
3790         'request.action = WebViewExperimental.DownloadRequest' on QML.
3791
3792         * UIProcess/API/qt/qquickwebview_p.h:
3793         * UIProcess/API/qt/qwebnavigationrequest.cpp:
3794         (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
3795         (QWebNavigationRequest::QWebNavigationRequest):
3796         (QWebNavigationRequest::originatingUrl):
3797         * UIProcess/API/qt/qwebnavigationrequest_p.h:
3798         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
3799         Tests were modified a bit to reuse urls and also added a test case to check
3800         originating url once a request is done.
3801         * UIProcess/qt/QtWebPagePolicyClient.cpp:
3802         (QtWebPagePolicyClient::decidePolicyForNavigationAction):
3803         * UIProcess/qt/QtWebPagePolicyClient.h:
3804
3805 2011-12-20  Balazs Kelemen  <kbalazs@webkit.org>
3806
3807         [Qt] WK2 Debugging quirks need some improvement
3808         https://bugs.webkit.org/show_bug.cgi?id=74859
3809
3810         Reviewed by Simon Hausmann.
3811
3812         Improvements added to make debugging WebKit2 more
3813         confortable and efficient:
3814         1. Unify debugging quirks. From now all of them are controlled
3815         by the QT_WEBKIT2_DEBUG environment variable.
3816         2. Disable crash handlers for WebKitTestRunner if debugging quirks
3817         are used to make it possible to use postmortem debugging via core dumps
3818         which is extremely useful for debugging bugs triggered by layout tests.
3819         3. Disable test timeout for WebKitTestRunner if debugging quirks
3820         are used because that makes debugging impossible.
3821
3822         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3823         (WebKit::QtWebProcess::setupChildProcess):
3824         * WebProcess/qt/WebProcessMainQt.cpp:
3825         (WebKit::WebProcessMainQt):
3826
3827 2011-12-20  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3828
3829         [Qt][WK2]REGRESSION(r103310): It broke tst_QQuickWebView::loadNonexistentFileUrl() API test
3830         https://bugs.webkit.org/show_bug.cgi?id=74923
3831
3832         Rubber-stamped by Csaba Osztrogonác.
3833
3834         Fixing API usage after http://trac.webkit.org/changeset/103310.
3835
3836         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3837         (tst_QQuickWebView::loadNonexistentFileUrl):
3838
3839 2011-12-20  Simon Hausmann  <simon.hausmann@nokia.com>
3840
3841         [Qt] Favicon support should work with multiple web contexts
3842         https://bugs.webkit.org/show_bug.cgi?id=74922
3843
3844         Reviewed by Tor Arne Vestbø.
3845
3846         * UIProcess/API/qt/qquickwebview.cpp:
3847         (QQuickWebViewPrivate::initialize): Remove unnecessary use of QtWebContext::defaultContext(). There is
3848         already a member variable "context" which is the correct one.
3849         (QQuickWebViewPrivate::setIcon): Ditto.
3850         * UIProcess/API/qt/qwebiconimageprovider.cpp:
3851         (QWebIconImageProvider::requestImage): Extract the context id from the image id and use it to
3852         query the correct icon database.
3853         * UIProcess/qt/QtWebContext.cpp: Provide a mapping from id to qtwebcontext.
3854         (WebKit::generateContextID):
3855         (WebKit::QtWebContext::QtWebContext):
3856         (WebKit::QtWebContext::~QtWebContext):
3857         (WebKit::QtWebContext::contextByID):
3858         (WebKit::QtWebContext::initialize):
3859         * UIProcess/qt/QtWebContext.h:
3860         (WebKit::QtWebContext::context):
3861         (WebKit::QtWebContext::contextID):
3862         * UIProcess/qt/QtWebIconDatabaseClient.cpp:
3863         (QtWebIconDatabaseClient::QtWebIconDatabaseClient):
3864         (QtWebIconDatabaseClient::requestIconForPageURL): Store the context id in the icon url.
3865         * UIProcess/qt/QtWebIconDatabaseClient.h:
3866
3867 2011-12-20  Rafael Brandao  <rafael.lobo@openbossa.org>
3868
3869         [Qt][WK2] Implement favicon support
3870         https://bugs.webkit.org/show_bug.cgi?id=71082
3871
3872         Reviewed by Simon Hausmann.
3873
3874         Added attribute to QQuickWebView named "icon" that should be used
3875         as source for QQuickImage in order to display it. All images
3876         pointing to it will refresh when the icon is ready. We also use IDs
3877         to make it possible to handle different icons for the same page URL
3878         at different times (i.e. dynamically changing favicon).
3879
3880         IconDatabase storage lies on UIProcess and the synchronous call for
3881         the icon that happens on WebIconDatabase won't need to send any message
3882         to WebProcess. The part of IconDatabase on WebProcess handles the download
3883         of the resource whenever it is needed. Then the content downloaded is sent
3884         through IPC to the actual database, on UIProcess.
3885
3886         * Target.pri:
3887         * UIProcess/API/qt/qquickwebview.cpp:
3888         (QQuickWebViewPrivate::initialize):
3889         (QQuickWebViewPrivate::_q_onIconChangedForPageURL):
3890         (QQuickWebViewPrivate::setIcon):
3891         (QQuickWebView::icon):
3892         * UIProcess/API/qt/qquickwebview_p.h:
3893         * UIProcess/API/qt/qquickwebview_p_p.h:
3894         * UIProcess/API/qt/qwebiconimageprovider.cpp: Added.
3895         (QWebIconImageProvider::QWebIconImageProvider):
3896         (QWebIconImageProvider::~QWebIconImageProvider):
3897         (QWebIconImageProvider::requestImage):
3898         * UIProcess/API/qt/qwebiconimageprovider_p.h: Added.
3899         * UIProcess/WebContext.h:
3900         * UIProcess/WebIconDatabase.cpp:
3901         (WebKit::WebIconDatabase::synchronousIconURLForPageURL):
3902         (WebKit::WebIconDatabase::imageForPageURL): Added iconSize parameter
3903         and a default value for it to not break the old usage. The support for
3904         multiple sizes of favicons is still missing on WebCore.
3905         * UIProcess/WebIconDatabase.h:
3906         * UIProcess/qt/QtWebContext.cpp:
3907         (WebKit::QtWebContext::initialize):
3908         * UIProcess/qt/QtWebContext.h:
3909         (WebKit::QtWebContext::iconDatabase):
3910         * UIProcess/qt/QtWebIconDatabaseClient.cpp: Added.
3911         (toQtWebIconDatabaseClient):
3912         (QtWebIconDatabaseClient::QtWebIconDatabaseClient):
3913         (QtWebIconDatabaseClient::~QtWebIconDatabaseClient):
3914         (QtWebIconDatabaseClient::didChangeIconForPageURL):
3915         (QtWebIconDatabaseClient::iconImageForPageURL):
3916         (QtWebIconDatabaseClient::iconURLHashForPageURL):
3917         (QtWebIconDatabaseClient::requestIconForPageURL):
3918         (QtWebIconDatabaseClient::retainIconForPageURL):
3919         (QtWebIconDatabaseClient::releaseIconForPageURL):
3920         * UIProcess/qt/QtWebIconDatabaseClient.h: Added.
3921         * UIProcess/qt/QtWebPageLoadClient.cpp:
3922         (QtWebPageLoadClient::didStartProgress):
3923
3924 2011-12-20  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3925
3926         [Qt] Improve QQuickWebView error handling API
3927         https://bugs.webkit.org/show_bug.cgi?id=73815
3928
3929         Reviewed by Simon Hausmann.
3930
3931         Modifying loadFail signal to include the error description
3932         and changing the ErrorType enum to ErrorDomain, to stay aligned
3933         with ResourceError API itself.
3934
3935         * UIProcess/API/qt/qquickwebview_p.h:
3936         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml:
3937         * UIProcess/qt/QtWebPageLoadClient.cpp:
3938         (QtWebPageLoadClient::dispatchLoadFailed):
3939
3940 2011-12-19  Sam Weinig  <sam@webkit.org>
3941
3942         Add support for scrollLineDown: and scrollLineUp: NSResponder selectors
3943         https://bugs.webkit.org/show_bug.cgi?id=74907
3944
3945         Reviewed by Dan Bernstein.
3946
3947         * UIProcess/API/mac/WKView.mm:
3948         Add implementations for scrollLineDown: and scrollLineUp: using our
3949         fun macros.
3950
3951 2011-12-19  Sam Weinig  <sam@webkit.org>
3952
3953         More PlatformEvent cleanup
3954         https://bugs.webkit.org/show_bug.cgi?id=74831
3955
3956         Reviewed by Dan Bernstein.
3957
3958         * WebProcess/WebPage/WebPage.cpp:
3959         (WebKit::handleContextMenuEvent):
3960         Update to use new names, access style.
3961
3962 2011-12-16  Jon Lee  <jonlee@apple.com>
3963
3964         [WK2] Extend show notification API to include the source page
3965         https://bugs.webkit.org/show_bug.cgi?id=74751
3966         <rdar://problem/10514541>
3967
3968         Reviewed by John Sullivan.
3969
3970         We add the source page that dispatched the notification in the API for convenience. In order to include the page,
3971         we move the show() message sent by WebNotificationManager from WebNotificationManagerProxy to WebPageProxy.
3972
3973         * WebProcess/Notifications/WebNotificationManager.cpp:
3974         (WebKit::WebNotificationManager::show): We aim the message at WebPageProxy instead of WebNotificationManagerProxy.
3975
3976         * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Remove the show() message.
3977         * UIProcess/WebPageProxy.messages.in: Add a showNotification() message.
3978
3979         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
3980         (WebKit::WebNotificationManagerProxy::show): This function is now called from the WebPageProxy.
3981         * UIProcess/Notifications/WebNotificationManagerProxy.h:
3982
3983         * UIProcess/API/C/WKNotificationProvider.h:
3984         * UIProcess/Notifications/WebNotificationProvider.cpp:
3985         (WebKit::WebNotificationProvider::show):
3986         * UIProcess/Notifications/WebNotificationProvider.h:
3987         * UIProcess/WebPageProxy.cpp:
3988         (WebKit::WebPageProxy::showNotification):
3989         * UIProcess/WebPageProxy.h:
3990
3991 2011-12-19  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3992
3993         [Qt][WK2] QWebDownloadItems are leaking
3994         https://bugs.webkit.org/show_bug.cgi?id=74618
3995
3996         Reviewed by Kenneth Rohde Christiansen.
3997
3998         QWebDownloadItems are leaking when WebProcess raises a
3999         download failure before sending didReceiveResponse back to UIProcess.
4000         This can happen when QtFileDownloader fails in determineFilename(), for instance.
4001         It happens when QtDownloadManager::downloadFailed() is reached
4002         and has an "empty" downloadItem, which means we never got to
4003         QtDownloadManager::downloadReceivedResponse(). At this point
4004         QQuickWebView::downloadRequested() signal hasn't been emitted and
4005         the downloadItem will have null parent. Therefore, it will leak
4006         unless we delete it ourselves.
4007
4008         * UIProcess/qt/QtDownloadManager.cpp:
4009         (WebKit::QtDownloadManager::downloadFailed):
4010
4011 2011-12-19  Anders Carlsson  <andersca@apple.com>
4012
4013         Send gesture events through the event dispatcher and scrolling coordinator
4014         https://bugs.webkit.org/show_bug.cgi?id=74879
4015
4016         Reviewed by Andreas Kling.
4017
4018         * UIProcess/WebPageProxy.cpp:
4019         (WebKit::WebPageProxy::handleGestureEvent):
4020         Use the EventDispatcher message.
4021
4022         * WebProcess/WebPage/EventDispatcher.cpp:
4023         (WebKit::EventDispatcher::gestureEvent):
4024         Try to send the event to the scrolling coordinator first before dispatching it on the main thread.
4025
4026         (WebKit::EventDispatcher::dispatchGestureEvent):
4027         Just call through to the WebPageProxy.
4028
4029         * WebProcess/WebPage/EventDispatcher.h:
4030         * WebProcess/WebPage/EventDispatcher.messages.in:
4031         * WebProcess/WebPage/WebPage.h:
4032         * WebProcess/WebPage/WebPage.messages.in:
4033         Move the GestureEvent message from WebPage to EventDispatcher.
4034
4035 2011-12-19  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
4036
4037         [Qt] Setting QWebPreferences affect multiple WebViews
4038         https://bugs.webkit.org/show_bug.cgi?id=71559
4039
4040         Reviewed by Kenneth Rohde Christiansen.
4041
4042         The QWebPreferences are per WebView, but the actual implementation
4043         in WebKit2 make them per page group. Currently we share only one
4044         page group between all the views, so if we set preferences
4045         to one WebView the preferences are shared between them all, generating
4046         unexpected behavior. This patch fixes this by making each WebView have
4047         its own page group.
4048
4049         * UIProcess/API/qt/qquickwebview.cpp:
4050         (QQuickWebViewPrivate::QQuickWebViewPrivate):
4051         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
4052
4053 2011-12-19  Eric Carlson  <eric.carlson@apple.com>
4054
4055         Enable <track> for Mac build
4056         https://bugs.webkit.org/show_bug.cgi?id=74838
4057
4058         Reviewed by Darin Adler.
4059
4060         * Configurations/FeatureDefines.xcconfig:
4061
4062 2011-12-19  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
4063
4064         [Qt] [WK2] Fix build error due to unused variables
4065         https://bugs.webkit.org/show_bug.cgi?id=74862
4066