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