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