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