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