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