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