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