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