[Qt] Update Qt bridge after changes to QMetaMethod
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2012-05-04  Kent Hansen <kent.hansen@nokia.com>
2
3         [Qt] Update Qt bridge after changes to QMetaMethod
4         https://bugs.webkit.org/show_bug.cgi?id=85478
5
6         Reviewed by Tor Arne Vestbø.
7
8         QMetaMethod::signature() has been renamed to methodSignature() and
9         returns a QByteArray.
10
11         The new function QMetaMethod::name() gives direct access to a
12         method's name. returnType(), parameterCount(), and parameterType()
13         give direct access to type information.
14
15         Ported the custom QtConnectionObject meta-object to revision 7;
16         revision 6 and below aren't supported (and don't compile) with Qt5.
17
18         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
19         (gatherAPI):
20
21 2012-05-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
22
23         [Qt] Don't pass viewport-create function to quick_test_main.
24         https://bugs.webkit.org/show_bug.cgi?id=85478
25
26         Reviewed by Csaba Osztrogonác.
27
28         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
29         (main):
30
31 2012-05-04  Csaba Osztrogonác  <ossy@webkit.org>
32
33         [Qt] Buildfix for newer Qt5
34         https://bugs.webkit.org/show_bug.cgi?id=85478
35
36         Reviewed by Tor Arne Vestbø.
37
38         * Shared/qt/ProcessExecutablePathQt.cpp:
39         (WebKit::executablePath):
40         * UIProcess/API/qt/qwebiconimageprovider_p.h:
41
42 2012-05-03  Alexis Menard  <alexis.menard@openbossa.org>
43
44         [Qt] Enable fullscreen API for WebKit2.
45         https://bugs.webkit.org/show_bug.cgi?id=85498
46
47         Reviewed by Simon Hausmann.
48
49         Enable the fullscreen API for Qt port. It is only
50         supported on WebKit2. It adds experimental settings
51         to enable it and also add two experimental signals so
52         the API user can react when the fullscreen is requested
53         (e.g hide the urlbar of a browser and change the state
54         of the window to be fullscreen).
55
56         * UIProcess/API/qt/qquickwebview.cpp:
57         (QQuickWebViewPrivate::initialize):
58         * UIProcess/API/qt/qquickwebview_p.h:
59         * UIProcess/API/qt/qwebpreferences.cpp:
60         (QWebPreferencesPrivate::testAttribute):
61         (QWebPreferencesPrivate::setAttribute):
62         (QWebPreferences::fullScreenEnabled):
63         (QWebPreferences::setFullScreenEnabled):
64         * UIProcess/API/qt/qwebpreferences_p.h:
65         * UIProcess/API/qt/qwebpreferences_p_p.h:
66         * UIProcess/WebFullScreenManagerProxy.h:
67         (WebKit):
68         * UIProcess/qt/WebFullScreenManagerProxyQt.cpp:
69         (WebKit::WebFullScreenManagerProxy::enterFullScreen):
70         (WebKit::WebFullScreenManagerProxy::exitFullScreen):
71
72 2012-05-04  Simon Hausmann  <simon.hausmann@nokia.com>
73
74         [Qt] Images are scaled badly in WebKit2
75         https://bugs.webkit.org/show_bug.cgi?id=85610
76
77         Reviewed by Jocelyn Turcotte.
78
79         Enable smooth pixmap transforms for WK2 bitmaps.
80
81         * Shared/qt/ShareableBitmapQt.cpp:
82         (WebKit::ShareableBitmap::createGraphicsContext):
83
84 2012-05-03  Ojan Vafai  <ojan@chromium.org>
85
86         Histogram total allocated bytes in the arena in addition to the render tree size
87         https://bugs.webkit.org/show_bug.cgi?id=85537
88
89         Reviewed by Eric Seidel.
90
91         * WebProcess/WebPage/WebPage.cpp:
92         (WebKit::WebPage::renderTreeSize):
93
94 2012-05-03  Raphael Kubo da Costa  <rakuco@webkit.org>
95
96         [CMake] Rewrite FindCairo.cmake.
97         https://bugs.webkit.org/show_bug.cgi?id=84895
98
99         Reviewed by Daniel Bates.
100
101         The old approach relied on pkg-config for finding Cairo (which
102         introduced a dependency on pkg-config that could be avoided), used
103         the LibFindMacros code that we should probably remove in the
104         future and did not use the FindPackageHandleStandardArguments
105         module.
106
107         Change all that by rewriting the module.
108         - Use the pkg-config output optionally instead of requiring it
109         like LibFindMacros did.
110         - Remove the implicit dependency on FreeType which often found it
111         the wrong way via pkg-config and without considering
112         CMAKE_PREFIX_PATH.
113         - Retrieve the Cairo version by looking at cairo-version.h instead
114         of relying on pkg-config. It requires some additional code for
115         checking if the desired version has been found, but that will not
116         be needed once we start depending on CMake 2.8.3 or later.
117
118         The only downside is that FPHSA sets <UPPERCASED_NAME>_FOUND
119         instead of <Name>_FOUND, and to keep things consistent
120         Cairo_LIBRARIES and Cairo_INCLUDE_DIRS have become CAIRO_LIBRARIES
121         and CAIRO_INCLUDE_DIRS.
122
123         * PlatformEfl.cmake: Use CAIRO_FOO instead of Cairo_FOO.
124
125 2012-05-03  Tobias Netzel  <tobias.netzel@googlemail.com>
126
127         Bugs in WebFullScreenController
128         https://bugs.webkit.org/show_bug.cgi?id=85388
129
130         Reviewed by Alexey Proskuryakov.
131
132         Leopard specific fixes:
133         NSWindow doesn't respond to isOnActiveSpace so find out first.
134         Values passed to SetSystemUIMode were swapped.
135
136         * UIProcess/mac/WKFullScreenWindowController.mm:
137         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]):
138         (-[WKFullScreenWindowController _updateMenuAndDockForFullScreen]):
139
140 2012-04-18  Jon Honeycutt  <jhoneycutt@apple.com>
141
142         WebFrameLoaderClient::dispatchWillSendSubmitEvent() needs to be
143         implemented for WebKit2
144         https://bugs.webkit.org/show_bug.cgi?id=84304
145
146         Reviewed by Jessie Berlin.
147
148         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
149         Declare willSendSubmitEvent on WKBundlePageFormClient.
150
151         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
152         (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
153         From the String pair vector, create a map from control name to value.
154         Call the client's willSendSubmitEvent.
155
156         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
157         Declare willSendSubmitEvent.
158
159         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
160         (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
161         Call the injected bundle form client's willSendSubmitEvent.
162
163         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
164         Un-stub willSendSubmitEvent.
165
166         * Shared/APIClientTraits.cpp:
167         (WebKit):
168         Set the interface sizes for WKBundlePageFormClient; version 1 includes
169         willSendSubmitEvent.
170
171         * Shared/APIClientTraits.h:
172         Declare a specialization for WKBundlePageFormClient.
173
174         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
175         Bump the WKBundlePageFormClient version number.
176
177 2012-05-03  Fady Samuel  <fsamuel@chromium.org>
178
179         Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
180         https://bugs.webkit.org/show_bug.cgi?id=70609
181
182         Reviewed by Kenneth Rohde Christiansen.
183
184         * UIProcess/API/qt/qwebviewportinfo.cpp:
185         (QWebViewportInfo::layoutSize):
186         * WebProcess/WebPage/WebPage.cpp:
187         (WebKit::WebPage::sendViewportAttributesChanged):
188         (WebKit::WebPage::viewportConfigurationAsText):
189
190 2012-05-03  Michael Brüning  <michael.bruning@nokia.com>
191
192         [Qt][WK2] Also update Qt::ImEnabled flag when updating the input method.
193         https://bugs.webkit.org/show_bug.cgi?id=85495
194
195         Reviewed by Simon Hausmann.
196
197         QInputMethod only issues a new inputMethodQuery if the Qt::ImEnabled
198         flag got updated as well.
199
200         * UIProcess/qt/QtWebPageEventHandler.cpp:
201         (WebKit::QtWebPageEventHandler::updateTextInputState):
202         (WebKit::QtWebPageEventHandler::doneWithGestureEvent):
203
204 2012-05-03  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
205
206         [Qt] Tap-highlight blinks when activated.
207         https://bugs.webkit.org/show_bug.cgi?id=85481
208
209         Reviewed by Kenneth Rohde Christiansen.
210
211         Set the opacity on the page-overlay the first time it is requested to be drawn. Otherwiser
212         it will start fully opaque before fading in.
213
214         * WebProcess/WebPage/PageOverlay.cpp:
215         (WebKit::PageOverlay::setNeedsDisplay):
216
217 2012-05-03  Kenneth Rohde Christiansen  <kenneth@webkit.org>
218
219         Document the QML WebViewExperimental API devicePixelRatio.
220
221         Rubberstamped by Simon Hausmann.
222
223         * UIProcess/API/qt/qquickwebview.cpp:
224
225 2012-05-03  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
226
227         [Qt] Allow the web process and WTR to be paused on startup
228
229         Makes it easier to debug the web process or run-webkit-tests -2, as you
230         have ample time to attach gdb to the process.
231
232         Reviewed by Simon Hausmann.
233
234         * WebProcess/qt/WebProcessMainQt.cpp:
235         (WebKit::WebProcessMainQt):
236         * qt/MainQt.cpp:
237         (main):
238
239 2012-05-03  Alexander Færøy  <ahf@0x90.dk>
240
241         Rename deviceDPI to devicePixelRatio
242         https://bugs.webkit.org/show_bug.cgi?id=85049
243
244         Reviewed by Kenneth Rohde Christiansen.
245
246         This patch fixes an API test regression from r115948 in
247         tst_QQuickWebView::scrollRequest() by setting the device pixel ratio
248         for the test WebView to 1.5.
249
250         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
251         (tst_QQuickWebView::newWebView):
252
253 2012-05-03  Stephanie Lewis  <slewis@apple.com>
254
255         https://bugs.webkit.org/show_bug.cgi?id=85450 unbounded growth of JSDOMWindowShells loading pages in the same window
256         <rdar://problem/11320059> REGRESSION (r115083): PLT3 shows linear memory growth and gets slower with each run
257
258         Reviewed by Brady Eidson.
259
260         The API added for DOMWindowExtension, didCreateGlobalObjectForFrame, would create a global object
261         for every world, even those that did not need the callback.  This had the side effect of creating a
262         JSDOMWindowShell that the associated world didn't necessarily know to clean up.  Instead of creating
263         unnecessary objects change the API to globalObjectIsAvailableForFrame and do not pass the global object
264         in the API.  The object can be accessed later by those worlds which require it.
265
266         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
267         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
268         (WebKit::InjectedBundlePageLoaderClient::globalObjectIsAvailableForFrame): rename API and remove globalObject parameter
269         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
270         (InjectedBundlePageLoaderClient): ditto
271         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
272         (WebKit::WebFrameLoaderClient::dispatchGlobalObjectAvailable): ditto
273
274 2012-05-02  Alexander Færøy  <ahf@0x90.dk>
275
276         Rename deviceDPI to devicePixelRatio
277         https://bugs.webkit.org/show_bug.cgi?id=85049
278
279         Reviewed by Kenneth Rohde Christiansen.
280
281         Add experimental QML API to set and get the device pixel ratio.
282
283         * Shared/WebPreferencesStore.h:
284         (WebKit):
285         * UIProcess/API/qt/qquickwebview.cpp:
286         (QQuickWebViewFlickablePrivate::updateViewportSize):
287         (QQuickWebViewExperimental::devicePixelRatio):
288         (QQuickWebViewExperimental::setDevicePixelRatio):
289         * UIProcess/API/qt/qquickwebview_p.h:
290         * WebProcess/WebPage/WebPage.cpp:
291         (WebKit::WebPage::sendViewportAttributesChanged):
292         (WebKit::WebPage::updatePreferences):
293
294 2012-05-02  Jon Lee  <jonlee@apple.com>
295
296         Migrate permission functions to Notification from NotificationCenter
297         https://bugs.webkit.org/show_bug.cgi?id=80485
298         <rdar://problem/10965458>
299
300         Reviewed by Jian Li.
301
302         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
303         (WebKit::NotificationPermissionRequestManager::startRequest): Add version to support both kinds of
304         callbacks.
305         (WebKit::NotificationPermissionRequestManager::cancelRequest):
306         (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
307         * WebProcess/Notifications/NotificationPermissionRequestManager.h: Add another map for new callback type.
308         (NotificationPermissionRequestManager):
309         * WebProcess/Notifications/WebNotificationManager.cpp:
310         (WebKit::WebNotificationManager::show): Add #ifdef to use replaceId() or tag() depending on which feature
311         has been enabled. In the case where both are enabled, we prefer tag() since that is in the latest spec.
312         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
313         (WebKit::WebNotificationClient::requestPermission):
314         * WebProcess/WebCoreSupport/WebNotificationClient.h: Implement both client functions to request permissions.
315
316 2012-05-02  Sheriff Bot  <webkit.review.bot@gmail.com>
317
318         Unreviewed, rolling out r115907.
319         http://trac.webkit.org/changeset/115907
320         https://bugs.webkit.org/show_bug.cgi?id=85458
321
322         It broke all viewport tests on Qt and on GTK (Requested by
323         Ossy on #webkit).
324
325         * UIProcess/API/qt/qwebviewportinfo.cpp:
326         (QWebViewportInfo::layoutSize):
327         * WebProcess/WebPage/WebPage.cpp:
328         (WebKit::WebPage::sendViewportAttributesChanged):
329         (WebKit::WebPage::viewportConfigurationAsText):
330
331 2012-05-02  Eric Seidel  <eric@webkit.org>
332
333         Sort ENABLE_ defines in FeatureDefines.xcconfig files to make them easier to compare with one another (and easier to autogenerate)
334         https://bugs.webkit.org/show_bug.cgi?id=85433
335
336         Reviewed by Adam Barth.
337
338         I have a script which can autogenerate these xcconfig files as well as the
339         vsprops files (and soon the Chromium, cmake, gnumake and qmake) feature lists
340         from a central feature list file.
341         In preparation for posting such a tool, I'm re-sorting these xcconfig files to be
342         alphabetically ordered (currently they're close, but not quite).
343         There is also at least one inconsistency between these files (CSS_LEGACY_PREFIXES) which
344         I will fix in a second pass.  I will also sort the FEATURE_DEFINES = line in a follow-up patch.
345
346         * Configurations/FeatureDefines.xcconfig:
347
348 2012-04-18  Jon Honeycutt  <jhoneycutt@apple.com>
349
350         FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
351         information about the form being submitted
352         https://bugs.webkit.org/show_bug.cgi?id=84297
353
354         Reviewed by Andy Estes.
355
356         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
357         (WebFrameLoaderClient):
358         Updated method declaration.
359
360         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
361         (WebFrameLoaderClient::willSendSubmitEvent):
362         Stubbed.
363
364 2012-05-01  Jon Honeycutt  <jhoneycutt@apple.com>
365
366         Make Page::setDefersLoading() have a call count so that each time
367         loading is deferred, it must be balanced with a call to resume.
368         https://bugs.webkit.org/show_bug.cgi?id=84522
369
370         Reviewed by Andy Estes.
371
372         * Shared/WebPreferencesStore.h:
373         Use the macro to declare the new preference.
374
375         * WebProcess/WebPage/WebPage.cpp:
376         (WebKit::WebPage::updatePreferences):
377         Set the setting from the WebPreferencesStore's value.
378
379 2012-05-02  Ojan Vafai  <ojan@chromium.org>
380
381         Add a histogram for rendertree size
382         https://bugs.webkit.org/show_bug.cgi?id=85226
383
384         Reviewed by Eric Seidel.
385
386         * WebProcess/WebPage/WebPage.cpp:
387         (WebKit::WebPage::renderTreeSize):
388         Move the renderTreeSize code into Page.cpp, so it can be reused.
389
390 2012-05-02  Anders Carlsson  <andersca@apple.com>
391
392         PDF page does not show up when opened in the background
393         https://bugs.webkit.org/show_bug.cgi?id=85427
394         <rdar://problem/11259951>
395
396         Reviewed by Sam Weinig.
397
398         Ensure that the accelerated hosting view is always the bottom view so it won't obscure subviews that are before it.
399
400         * UIProcess/API/mac/WKView.mm:
401         (-[WKView _enterAcceleratedCompositingMode:]):
402
403 2012-05-02  Fady Samuel  <fsamuel@chromium.org>
404
405         Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
406         https://bugs.webkit.org/show_bug.cgi?id=70609
407
408         Reviewed by Kenneth Rohde Christiansen.
409
410         * UIProcess/API/qt/qwebviewportinfo.cpp:
411         (QWebViewportInfo::layoutSize):
412         * WebProcess/WebPage/WebPage.cpp:
413         (WebKit::WebPage::viewportConfigurationAsText):
414
415 2012-05-02  Emil A Eklund  <eae@chromium.org>
416
417         Fix usage of layout types in platform code
418         https://bugs.webkit.org/show_bug.cgi?id=85392
419
420         Reviewed by Eric Seidel.
421
422         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
423         (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
424         Use enclosingIntRect to convert visible rect for transform results to
425         line up with device pixels.
426         
427         * WebProcess/WebPage/WebPage.cpp:
428         (WebKit::WebPage::editorState):
429         Use pixelSnapped rect for editor rect calculation as it represents a
430         device coordinate.
431
432 2012-05-02  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
433
434         Revert r115191 - "Make the web view's url property follow the active url"
435
436         It uncovered/caused issues in the icon-implementation that can't be
437         easily fixed, so rolling out instead.
438
439         https://bugs.webkit.org/show_bug.cgi?id=77554
440
441         Rubber-stamped by Simon Hausmann.
442
443         * UIProcess/API/qt/qquickwebview.cpp:
444         (QQuickWebViewPrivate::onComponentComplete):
445         (QQuickWebView::reload):
446         (QQuickWebView::url):
447         (QQuickWebView::setUrl):
448         (QQuickWebView::loadHtml):
449         * UIProcess/API/qt/qquickwebview_p.h:
450         * UIProcess/API/qt/qquickwebview_p_p.h:
451         (QQuickWebViewPrivate):
452         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
453         * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
454         * UIProcess/API/qt/tests/qmltests/WebView.pro:
455         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
456         * UIProcess/API/qt/tests/qmltests/common/link.html: Removed.
457         * UIProcess/API/qt/tests/qmltests/common/redirect.html: Removed.
458         * UIProcess/WebPageProxy.cpp:
459         (WebKit::WebPageProxy::activeURL):
460         * UIProcess/qt/QtWebPageLoadClient.cpp:
461         (WebKit::QtWebPageLoadClient::QtWebPageLoadClient):
462         (WebKit::QtWebPageLoadClient::didCommitLoad):
463         (WebKit::QtWebPageLoadClient::didSameDocumentNavigation):
464         (WebKit::QtWebPageLoadClient::dispatchLoadFailed):
465         (WebKit::QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame):
466         (WebKit::QtWebPageLoadClient::didFailLoadWithErrorForFrame):
467         * UIProcess/qt/QtWebPageLoadClient.h:
468         (QtWebPageLoadClient):
469
470 2012-05-02  Anders Carlsson  <andersca@apple.com>
471
472         When viewing a PDF, the Safari Status Bar shows other text
473         https://bugs.webkit.org/show_bug.cgi?id=85395
474         <rdar://problem/11297250>
475
476         Reviewed by Beth Dakin.
477
478         Set the layer contents placement for the WKView so that its layer will get masksToBounds set.
479
480         * UIProcess/API/mac/WKView.mm:
481         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
482
483 2012-05-02  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
484
485         Unreviewed. Build fix for Qt port on mac.
486
487         * UIProcess/API/qt/qwebnavigationhistory_p.h:
488
489 2012-05-02  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
490
491         Make ShareableSurface's ref-counting thread-safe
492
493         Fixes assert when threaded rendering is enabled for the Qt scene-graph.
494
495         https://bugs.webkit.org/show_bug.cgi?id=85381
496
497         Reviewed by Noam Rosenthal.
498
499         * Shared/ShareableSurface.h:
500
501 2012-05-02  No'am Rosenthal  <noam.rosenthal@nokia.com>
502
503         [Texmap] Enable css filters in TextureMapperGL
504         https://bugs.webkit.org/show_bug.cgi?id=75778
505
506         Add the plumbing in the ui-side compositing code in Qt to support filters.
507         Serialize the filter operations for a layer when it's changed.
508
509         Reviewed by Jocelyn Turcotte.
510
511         * Shared/WebCoreArgumentCoders.cpp:
512         (CoreIPC):
513         (CoreIPC::::encode):
514         (CoreIPC::::decode):
515         * Shared/WebCoreArgumentCoders.h:
516         (WebCore):
517         * UIProcess/LayerTreeHostProxy.cpp:
518         (WebKit):
519         (WebKit::LayerTreeHostProxy::setCompositingLayerFilters):
520         * UIProcess/LayerTreeHostProxy.h:
521         (LayerTreeHostProxy):
522         * UIProcess/LayerTreeHostProxy.messages.in:
523         * UIProcess/WebLayerTreeRenderer.cpp:
524         (WebKit):
525         (WebKit::WebLayerTreeRenderer::setLayerFilters):
526         * UIProcess/WebLayerTreeRenderer.h:
527         (WebLayerTreeRenderer):
528         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
529         (WebCore):
530         (WebCore::WebGraphicsLayer::didChangeFilters):
531         (WebCore::WebGraphicsLayer::setFilters):
532         (WebCore::WebGraphicsLayer::syncFilters):
533         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
534         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
535         (WebGraphicsLayerClient):
536         (WebGraphicsLayer):
537         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
538         (WebKit):
539         (WebKit::LayerTreeHostQt::syncLayerFilters):
540         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
541         (LayerTreeHostQt):
542
543 2012-05-02  Simon Hausmann  <simon.hausmann@nokia.com>
544
545         [Qt] Fix vkb showing incorrect flags/keys when content changes
546
547         Reviewed by Tor Arne Vestbø.
548
549         When the editor state changes we have to inform the input method about changed
550         properties so that it can issue a new input method query. Otherwise it may use old values
551         from other QQuickItems or other incorrectly initialized data.
552
553         Also use isActiveFocus() instead of hasFocus() to detect whether we're actively focused.
554         This is also what QQuick uses internally to determine whether it can make calls to the input method
555         or not.
556
557         * UIProcess/qt/QtWebPageEventHandler.cpp:
558         (WebKit::QtWebPageEventHandler::inputPanelVisibleChanged):
559         (WebKit::QtWebPageEventHandler::updateTextInputState):
560         (WebKit::QtWebPageEventHandler::doneWithGestureEvent):
561
562 2012-05-02  Kenneth Rohde Christiansen  <kenneth@webkit.org>
563
564         [Qt] Add initial QML documentation
565         https://bugs.webkit.org/show_bug.cgi?id=85370
566
567         Reviewed by Simon Hausmann.
568
569         Add initial documentation which also serves as an example on how it
570         should be done.
571
572         * UIProcess/API/qt/qquickwebview.cpp:
573         * UIProcess/API/qt/qwebloadrequest.cpp:
574
575 2012-05-02  Zalan Bujtas  <zbujtas@gmail.com>
576
577         [Qt][WK2] Remove redundant updateViewportArguments() call from HTMLBodyElement::didNotifyDescendantInseretions()
578         https://bugs.webkit.org/show_bug.cgi?id=84241
579
580         Reviewed by Kenneth Rohde Christiansen.
581
582         Add ASSERT to ensure at least one viewport argument change call is dispatched to WebPage per main frame.
583
584         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
585         (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout):
586
587 2012-05-02  Lars Knudsen  <lars.knudsen@nokia.com>
588
589         [Qt] Make DeviceMotion and DeviceOrientation work with WebKit2
590         https://bugs.webkit.org/show_bug.cgi?id=64595
591
592         Reviewed by Kenneth Rohde Christiansen.
593
594         Adding support for DeviceOrientation in WK2 WebPage
595
596         * Target.pri:
597         * WebProcess/WebPage/WebPage.cpp:
598         (WebKit::WebPage::WebPage):
599
600 2012-05-02  Zalan Bujtas  <zbujtas@gmail.com>
601
602         [Qt][WK2] Minibrowser's progress bar should reset when WebProcess crashes while loading.
603         https://bugs.webkit.org/show_bug.cgi?id=84445
604
605         Reviewed by Jocelyn Turcotte.
606
607         Progress value needs resetting, when WebProcess crashes.
608         This patch moves crash logic for loading to QtWebPageLoadClient. It
609         also simplifies the callback function names in QtWebPageLoadClient, as they
610         all valid only for main frames.
611
612         * UIProcess/API/qt/qquickwebview.cpp:
613         (QQuickWebViewPrivate::QQuickWebViewPrivate):
614         (QQuickWebViewPrivate::processDidCrash):
615         (QQuickWebViewFlickablePrivate::loadDidSucceed):
616         * UIProcess/API/qt/qquickwebview_p_p.h:
617         (QQuickWebViewPrivate::didChangeViewportProperties):
618         (QQuickWebViewPrivate):
619         * UIProcess/qt/QtWebPageLoadClient.cpp:
620         (WebKit::QtWebPageLoadClient::QtWebPageLoadClient):
621         (WebKit::QtWebPageLoadClient::completeLoadWhenProcessDidCrashIfNeeded):
622         (WebKit):
623         (WebKit::QtWebPageLoadClient::didStartProvisionalLoad):
624         (WebKit::QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoad):
625         (WebKit::QtWebPageLoadClient::didCommitLoad):
626         (WebKit::QtWebPageLoadClient::didSameDocumentNavigation):
627         (WebKit::QtWebPageLoadClient::didReceiveTitle):
628         (WebKit::QtWebPageLoadClient::didFirstVisuallyNonEmptyLayout):
629         (WebKit::QtWebPageLoadClient::didStartProvisionalLoadForFrame):
630         (WebKit::QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoadForFrame):
631         (WebKit::QtWebPageLoadClient::didCommitLoadForFrame):
632         (WebKit::QtWebPageLoadClient::didSameDocumentNavigationForFrame):
633         (WebKit::QtWebPageLoadClient::didReceiveTitleForFrame):
634         (WebKit::QtWebPageLoadClient::didFirstVisuallyNonEmptyLayoutForFrame):
635         * UIProcess/qt/QtWebPageLoadClient.h:
636         (WebKit):
637         (QtWebPageLoadClient):
638
639 2012-05-02  Simon Hausmann  <simon.hausmann@nokia.com>
640
641         [Qt] QQuickWebView does not allow for input from virtual keyboard
642         https://bugs.webkit.org/show_bug.cgi?id=85350
643
644         Reviewed by Kenneth Christiansen.
645
646         It is necessary to set the ItemAcceptsInputMethod flag on the QQuickWebView if we have editable
647         content, in order for the input method to recognize that we can handle input method events.
648
649         Analyzed by Michael Brüning.
650
651         * UIProcess/API/qt/qquickwebview.cpp: Add simple hook for executing JS as private C++ API.
652         (JSCallbackClosure):
653         (javaScriptCallback):
654         (QQuickWebView::runJavaScriptInMainFrame):
655         * UIProcess/API/qt/qquickwebview_p.h:
656         * UIProcess/API/qt/tests/html/inputmethod.html: Added.
657         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
658         (tst_QQuickWebView):
659         (tst_QQuickWebView::runJavaScript): Simple helper for running JS.
660         (tst_QQuickWebView::inputMethod): Added simple test for ItemAcceptsInputMethod toggling.
661         * UIProcess/qt/QtWebPageEventHandler.cpp:
662         (WebKit::QtWebPageEventHandler::updateTextInputState): Set ItemAcceptsInputMethod as soon as we
663         have editable content.
664
665 2012-05-01  Anders Carlsson  <andersca@apple.com>
666
667         inspectorReallyUsesWebKitUserInterface should be more robust against missing files
668         https://bugs.webkit.org/show_bug.cgi?id=85327
669         <rdar://problem/11332864>
670
671         Reviewed by Timothy Hatcher.
672
673         * UIProcess/mac/WebInspectorProxyMac.mm:
674         (WebKit::inspectorReallyUsesWebKitUserInterface):
675         * WebProcess/WebPage/mac/WebInspectorMac.mm:
676         (WebKit::inspectorReallyUsesWebKitUserInterface):
677
678 2012-05-01  Jeffrey Pfau  <jpfau@apple.com>
679
680         <rdar://problem/10422318> Support for web content filter delegate for filtering https content
681         https://bugs.webkit.org/show_bug.cgi?id=85300
682
683         Reviewed by Alexey Proskuryakov.
684
685         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
686         (InitWebCoreSystemInterface):
687
688 2012-05-01  Ryosuke Niwa  <rniwa@webkit.org>
689
690         *Command.h files shouldn't be exported to WebKit layer
691         https://bugs.webkit.org/show_bug.cgi?id=74778
692
693         Reviewed by Eric Seidel.
694
695         * WebProcess/WebPage/WebPage.cpp:
696
697 2012-05-01  Anders Carlsson  <andersca@apple.com>
698
699         Use the new barrier function in TiledCoreAnimationDrawingArea::forceRepaintAsync
700         https://bugs.webkit.org/show_bug.cgi?id=85313
701         <rdar://problem/10996039>
702
703         Reviewed by Sam Weinig.
704
705         Use the new dispatchAfterEnsuringUpdatedScrollPosition function in forceRepaintAsync to
706         ensure that the scroll position is up to date.
707
708         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
709         (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
710
711 2012-05-01  Kenneth Rohde Christiansen  <kenneth@webkit.org>
712
713         [Qt] Add an experimental extension to set the min. contents width
714         https://bugs.webkit.org/show_bug.cgi?id=85281
715
716         Reviewed by Antonio Gomes.
717
718         Add the experimental property preferredMinimumContentsWidth: which
719         can be used to set the minimum contents width when not overriden by
720         the page itself.
721
722         Default value is set to 0, which defines normal [desktop] behaviour.
723
724         * Shared/WebPreferencesStore.h:
725         (WebKit):
726         * UIProcess/API/qt/qquickwebview.cpp:
727         (QQuickWebViewExperimental::preferredMinimumContentsWidth):
728         (QQuickWebViewExperimental::setPreferredMinimumContentsWidth):
729         * UIProcess/API/qt/qquickwebview_p.h:
730
731 2012-05-01  Kenneth Rohde Christiansen  <kenneth@webkit.org>
732
733         [Qt] Stop repeating timers which should only fire once
734         https://bugs.webkit.org/show_bug.cgi?id=85277
735
736         Reviewed by Antonio Gomes.
737
738         The TapGestureRecognizer uses QBasicTimers which are
739         repeating timers, so stop then when they fire.
740
741         * UIProcess/qt/QtTapGestureRecognizer.cpp:
742         (WebKit::QtTapGestureRecognizer::highlightTimeout):
743         (WebKit::QtTapGestureRecognizer::singleTapTimeout):
744         (WebKit::QtTapGestureRecognizer::tapAndHoldTimeout):
745
746 2012-04-30  Anders Carlsson  <andersca@apple.com>
747
748         Crash when opening plug-ins in background tabs
749         https://bugs.webkit.org/show_bug.cgi?id=85255
750         <rdar://problem/11344053>
751
752         Reviewed by Dan Bernstein.
753         
754         * PluginProcess/mac/PluginControllerProxyMac.mm:
755         (WebKit::PluginControllerProxy::setLayerHostingMode):
756         m_layerHostingContext can be null for plug-ins that don't use the Core Animation drawing model, so check for that.
757
758 2012-04-30  Yael Aharon  <yael.aharon@nokia.com>
759
760         [Qt][WK2] Fixed layers are shaking when zoom level is not 1.0 due to a rounding error.
761         https://bugs.webkit.org/show_bug.cgi?id=84306
762
763         Reviewed by Noam Rosenthal.
764
765         When zooming, we need to be careful about how to convert the visible rect from float to int.
766         Using toAlignedRect can produce inconsistent width and height when we are scrolling.
767         This patch carefully modifies each piece of the visible rect, to avoid such rounding errors.
768         In addition, the TransformationMatrix we use for painting, needs to be adjusted for the same rounding error.
769
770         * UIProcess/API/qt/qquickwebview.cpp:
771         (QQuickWebViewPrivate::visibleContentsRect):
772         (QQuickWebViewFlickablePrivate::_q_contentViewportChanged):
773         * UIProcess/DrawingAreaProxy.h:
774         (WebCore):
775         (WebKit::DrawingAreaProxy::setVisibleContentsRect):
776         * UIProcess/DrawingAreaProxyImpl.cpp:
777         (WebKit::DrawingAreaProxyImpl::setVisibleContentsRect):
778         * UIProcess/DrawingAreaProxyImpl.h:
779         (DrawingAreaProxyImpl):
780         * UIProcess/LayerTreeHostProxy.cpp:
781         (WebKit::LayerTreeHostProxy::setVisibleContentsRect):
782         * UIProcess/LayerTreeHostProxy.h:
783         (LayerTreeHostProxy):
784         * UIProcess/WebLayerTreeRenderer.cpp:
785         (WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
786         (WebKit::WebLayerTreeRenderer::setVisibleContentsRect):
787         * UIProcess/WebLayerTreeRenderer.h:
788         (WebLayerTreeRenderer):
789
790 2012-04-30  Anders Carlsson  <andersca@apple.com>
791
792         ScrollingCoordinator::requestScrollPositionUpdate should not update the main frame scroll position
793         https://bugs.webkit.org/show_bug.cgi?id=85240
794         <rdar://problem/11286609>
795
796         Reviewed by Sam Weinig.
797
798         The find machinery should cope with asynchronous scroll position updates.
799
800         * WebProcess/WebPage/FindController.cpp:
801         (WebKit::FindController::updateFindUIAfterPageScroll):
802         Split the code that handles updating the find indicator and find overlay out into a separate function.
803
804         (WebKit::FindController::findString):
805         Call updateFindUIAfterPageScroll once we know that the scroll position has been updated.
806
807 2012-04-30  Anders Carlsson  <andersca@apple.com>
808
809         Add a way to asynchronously call a function once the scroll position of a page has been updated
810         https://bugs.webkit.org/show_bug.cgi?id=85237
811
812         Reviewed by Sam Weinig.
813
814         Add DrawingArea::dispatchAfterEnsuringUpdatedScrollPosition, which will call the given function object after
815         making sure that the scroll position has been updated correctly. This is important for TiledCoreAnimationDrawingArea,
816         which updates the scrolling position asynchronously.
817
818         * WebProcess/WebPage/DrawingArea.cpp:
819         (WebKit::DrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
820         Since scroll position updates are synchronous by default, just call function directly.
821
822         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
823         (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
824         Commit the layer tree state and then use ScrollingThread::dispatchBarrier to make sure that the function is called when any
825         scroll position changes have been made. If possible, freeze the layer tree to make sure that the update is atomic.
826
827 2012-04-30  Anders Carlsson  <andersca@apple.com>
828
829         Fix ALL the build failures!
830
831         * UIProcess/API/mac/WKView.mm:
832         (-[WKView WebKit::]):
833         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
834         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
835
836 2012-04-30  Anders Carlsson  <andersca@apple.com>
837
838         Build fix.
839
840         * Shared/DrawingAreaInfo.h:
841
842 2012-04-30  Emil A Eklund  <eae@chromium.org>
843
844         [gtk, qt, chromium, win] Fix usage of LayoutUnits and rounding in platform code
845         https://bugs.webkit.org/show_bug.cgi?id=85222
846
847         Reviewed by Eric Seidel.
848
849         Update platform code to use the pixel snapped values for painting rects
850         to line up with device pixels and change platform specific hit testing
851         code to use roundedPoint as hit testing is still mostly done on integer
852         bounds.
853
854         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
855         (WebKit::WebPopupMenu::setUpPlatformData):
856
857 2012-04-30  Anders Carlsson  <andersca@apple.com>
858
859         Put all of TiledCoreAnimationDrawingArea in #if ENABLE(THREADED_SCROLLING)
860         https://bugs.webkit.org/show_bug.cgi?id=85232
861
862         Reviewed by Sam Weinig.
863
864         Stop pretending that TiledCoreAnimationDrawingArea works without threaded scrolling.
865
866         * WebProcess/WebPage/DrawingArea.cpp:
867         (WebKit::DrawingArea::create):
868         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
869         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
870         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
871         (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
872         (WebKit::dispatchBackToMainThread):
873         (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
874         (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
875         (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
876         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
877
878 2012-04-30  Benjamin Poulain  <benjamin@webkit.org>
879
880         Add String::startsWith() and endsWith() for string literals
881         https://bugs.webkit.org/show_bug.cgi?id=85154
882
883         Reviewed by Darin Adler.
884
885         Update WebKit2 to use String::endsWith(UChar).
886
887         * UIProcess/Plugins/PluginInfoStore.cpp:
888         (WebKit::pathExtension):
889
890 2012-04-30  Alexey Proskuryakov  <ap@apple.com>
891
892         Validate keypress command names
893         https://bugs.webkit.org/show_bug.cgi?id=85204
894         <rdar://problem/11249368>
895
896         Reviewed by Darin Adler.
897
898         * UIProcess/API/mac/WKView.mm:
899         (-[WKView doCommandBySelector:]):
900         (-[WKView insertText:replacementRange:]):
901         * UIProcess/WebPageProxy.h:
902         (WebKit::WebPageProxy::registerKeypressCommandName):
903         (WebKit::WebPageProxy::isValidKeypressCommandName):
904         * UIProcess/mac/WebPageProxyMac.mm:
905         (WebKit::WebPageProxy::executeSavedCommandBySelector):
906
907 2012-04-30  Mario Sanchez Prada  <msanchez@igalia.com>
908
909         [GTK] Implement WebUIClient's runOpenPanel in WebKit2GTK+
910         https://bugs.webkit.org/show_bug.cgi?id=78491
911
912         Reviewed by Martin Robinson.
913
914         Add a new public class to the API, WebKitFileChooserRequest, to be
915         emitted along with a new WebKitWebView::run-file-chooser signal to
916         let client applications to provide their own file chooser dialog
917         when the use interacts with HTML Input elements of type 'file'.
918
919         * GNUmakefile.am: Added new source files and headers.
920         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp: Added.
921         (_WebKitFileChooserRequestPrivate):
922         (webkit_file_chooser_request_init):
923         (webkitFileChooserRequestFinalize):
924         (webkitFileChooserRequestGetProperty):
925         (webkit_file_chooser_request_class_init):
926         (webkitFileChooserRequestCreate):
927         (webkit_file_chooser_request_get_mime_types):
928         (webkit_file_chooser_request_get_mime_types_filter):
929         (webkit_file_chooser_request_get_select_multiple):
930         (webkit_file_chooser_request_select_files):
931         (webkit_file_chooser_request_get_selected_files):
932         (webkit_file_chooser_request_cancel):
933         * UIProcess/API/gtk/WebKitFileChooserRequest.h: Added.
934         (_WebKitFileChooserRequest):
935         (_WebKitFileChooserRequestClass):
936         * UIProcess/API/gtk/WebKitFileChooserRequestPrivate.h: Added,
937         containing the prototype of webkitFileChooserRequestCreate.
938
939         Provide private API to make a file chooser request from the
940         WebView, and provide a default handler for it.
941
942         * UIProcess/API/gtk/WebKitWebView.cpp:
943         (fileChooserDialogResponseCallback): Handler for the 'response'
944         signal for the GtkFileChooserDialog used in the default
945         handler. It will call to webkit_file_chooser_request_select_files
946         or webkit_file_chooser_request_cancel as needed.
947         (webkitWebViewRunFileChooser): Default handler for the new
948         'run-file-chooser' signal. It will create a GtkFileChooserDialog,
949         connect to the 'response' signal and show it.
950         (webkit_web_view_class_init): Connect the 'run-file-chooser'
951         signal to the default handler, webkitWebViewRunFileChooser.
952         (webkitWebViewRunFileChooserRequest):
953         * UIProcess/API/gtk/WebKitWebView.h:
954         (_WebKitWebViewClass): Added prototype for the handler of the new
955         'run-file-chooser' signal.
956         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Added prototype for
957         private new function webkitWebViewRunFileChooserRequest.
958
959         Provide an implementation for runOpenPanel in WebKitUIClient.
960
961         * UIProcess/API/gtk/WebKitUIClient.cpp:
962         (runOpenPanel): New, implements runOpenPanel by creating an
963         instance of WebKitFileChooserRequest and asking the WebView to
964         emit the 'run-file-chooser' signal with it.
965         (attachUIClientToView): Reference the new runOpenPanel function.
966
967         Added the new publich header to the main header.
968
969         * UIProcess/API/gtk/webkit2.h: Added WebKitFileChooserRequest.h.
970
971         New unit tests for the new WebKitFileChooserRequest API. Also,
972         extended the WebViewTest class to allow simulating mouse clicks.
973
974         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
975         (checkMimeTypeForFilter): New, checks whether a GtkFileFilter
976         filters a given MIME type, as specified by RFC 2046.
977         (testWebViewFileChooserRequest): New unit test.
978         (beforeAll): Add the new unit test as an UIClientTest.
979
980         * UIProcess/API/gtk/tests/WebViewTest.cpp:
981         (WebViewTest::clickMouseButton): New public function to simulate a
982         mouse click through GdkEvents, as the combination of a 'press' and
983         a 'release' event. Used from the new unit test to simulate the
984         user pressing in the button rendered for a HTML Input element.
985         (WebViewTest::executeMouseButtonEvent): New private function to
986         simulate a mouse event through GdkEvents.
987         * UIProcess/API/gtk/tests/WebViewTest.h:
988
989         Updated documentation related files with the new API.
990
991         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new API.
992         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Added new section.
993         * UIProcess/API/gtk/docs/webkit2gtk.types: Added get_type function.
994
995 2012-04-28  Yury Semikhatsky  <yurys@chromium.org>
996
997         Unreviewed. Added new exported symbols after r115553.
998
999         * win/WebKit2.def:
1000         * win/WebKit2CFLite.def:
1001
1002 2012-04-27  Geoffrey Garen  <ggaren@apple.com>
1003
1004         Made WeakSet::allocate() static and removed its JSGlobalData argument
1005         https://bugs.webkit.org/show_bug.cgi?id=85128
1006
1007         Reviewed by Anders Carlsson.
1008
1009         Mechanically removed JSGlobalData arguments from PassWeak<T> and Weak<T> allocation.
1010
1011         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1012         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
1013
1014 2012-04-27  Yael Aharon  <yael.aharon@nokia.com>
1015
1016         [Qt][WK2] Don't call syncRemoteContents from WebLayerTreeRenderer::paintToCurrentGLContext
1017         https://bugs.webkit.org/show_bug.cgi?id=85088
1018
1019         Reviewed by Noam Rosenthal.
1020
1021         Remove the call to syncRemoteContents from WebLayerTreeRenderer::paintToCurrentGLContext,
1022         since it was moved to QQuickWebPage::updatePaintNode.
1023         To make sure that we always sync before painting, this patch also calls page->update()
1024         when the viewport changes.
1025
1026         * UIProcess/API/qt/qquickwebview.cpp:
1027         (QQuickWebViewFlickablePrivate::_q_contentViewportChanged):
1028         * UIProcess/WebLayerTreeRenderer.cpp:
1029         (WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
1030
1031 2012-04-27  Gavin Peters  <gavinp@chromium.org>
1032
1033         Add new ENABLE_LINK_PRERENDER define to control the Prerendering API
1034         https://bugs.webkit.org/show_bug.cgi?id=84871
1035
1036         Reviewed by Adam Barth.
1037
1038         Prerendering is currently covered by the ENABLE_LINK_PREFETCH macro, but the new Prerendering
1039         API separates it from prefetching.  Having separate include guards lets ports enable prefetching,
1040         a relatively easy change, without needing to build the infrastructure for prerendering, which
1041         is considerably more complicated.
1042
1043 2012-04-27  Yael Aharon  <yael.aharon@nokia.com>
1044
1045         [Qt][WK2] setVisibleContentsRect is not thread safe
1046         https://bugs.webkit.org/show_bug.cgi?id=85060
1047
1048         Reviewed by Noam Rosenthal.
1049
1050         Don't call WebLayerTreeRenderer::setVisibleContentsRect directly. Use bind() instead.
1051
1052         * UIProcess/LayerTreeHostProxy.cpp:
1053         (WebKit::LayerTreeHostProxy::setVisibleContentsRect):
1054
1055 2012-04-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1056
1057         [SOUP] Add a way to register custom uri schemes in WebKit2
1058         https://bugs.webkit.org/show_bug.cgi?id=84130
1059
1060         Reviewed by Martin Robinson.
1061
1062         * GNUmakefile.am: Add new files to compilation.
1063         * Platform/CoreIPC/MessageID.h: Add
1064         MessageClassWebSoupRequestManager and
1065         MessageClassWebSoupRequestManagerProxy message types to identify
1066         WebSoupRequestManager messages.
1067         * Shared/API/c/WKBase.h: Include WKBaseSoup.h when building with
1068         soup network backend.
1069         * Shared/API/c/soup/WKBaseSoup.h: Added.
1070         * Shared/APIObject.h: Add SoupRequestManager type when using soup.
1071         * UIProcess/API/C/WKAPICast.h: Include WKAPICastSoup.h when
1072         building with soup network backend.
1073         * UIProcess/API/C/soup/WKAPICastSoup.h: Added.
1074         (WebKit): Map WKSoupRequestManagerRef to
1075         WebSoupRequestManagerProxy.
1076         * UIProcess/API/C/soup/WKContextSoup.cpp: Added.
1077         (WKContextGetSoupRequestManager): Return WKSoupRequestManagerRef
1078         associated to the context.
1079         * UIProcess/API/C/soup/WKContextSoup.h: Added.
1080         * UIProcess/API/C/soup/WKSoupRequestManager.cpp: Added.
1081         (WKSoupRequestManagerGetTypeID): Return the
1082         WebSoupRequestManagerProxy API type.
1083         (WKSoupRequestManagerSetClient): Set the WKSoupRequestManagerClient.
1084         (WKSoupRequestManagerRegisterURIScheme): Call
1085         WebSoupRequestManagerProxy::registerURIScheme().
1086         (WKSoupRequestManagerHandleURIRequest): Call
1087         WebSoupRequestManagerProxy::handleURIRequest().
1088         * UIProcess/API/C/soup/WKSoupRequestManager.h: Added.
1089         * UIProcess/WebContext.cpp:
1090         (WebKit::WebContext::WebContext): Initialize
1091         m_soupRequestManagerProxy when using soup.
1092         (WebKit::WebContext::~WebContext): Invalidate and clear the
1093         m_soupRequestManagerProxy when using soup.
1094         (WebKit::WebContext::disconnectProcess): Invalidate the
1095         m_soupRequestManagerProxy when using soup.
1096         (WebKit::WebContext::didReceiveMessage): Forward the message to
1097         m_soupRequestManagerProxy if it's a
1098         MessageClassWebSoupRequestManagerProxy message.
1099         * UIProcess/WebContext.h:
1100         (WebKit::WebContext::soupRequestManagerProxy): Return
1101         m_soupRequestManagerProxy.
1102         * UIProcess/WebProcessProxy.cpp:
1103         (WebKit::WebProcessProxy::didReceiveMessage): Forward message to
1104         the web context if it's a MessageClassWebSoupRequestManagerProxy
1105         message.
1106         * UIProcess/soup/WebSoupRequestManagerClient.cpp: Added.
1107         (WebKit::WebSoupRequestManagerClient::didReceiveURIRequest): Call
1108         didReceiveURIRequest callback if it has an implementation.
1109         * UIProcess/soup/WebSoupRequestManagerClient.h: Added.
1110         * UIProcess/soup/WebSoupRequestManagerProxy.cpp: Added.
1111         (WebKit::WebSoupRequestManagerProxy::create): Create a new
1112         WebSoupRequestManagerProxy.
1113         (WebKit::WebSoupRequestManagerProxy::WebSoupRequestManagerProxy):
1114         (WebKit::WebSoupRequestManagerProxy::~WebSoupRequestManagerProxy):
1115         (WebKit::WebSoupRequestManagerProxy::invalidate):
1116         (WebKit::WebSoupRequestManagerProxy::initializeClient):
1117         (WebKit::WebSoupRequestManagerProxy::didReceiveMessage):
1118         (WebKit::WebSoupRequestManagerProxy::registerURIScheme): Send
1119         RegisterURIScheme message to the WebProcess to register the given
1120         URI scheme.
1121         (WebKit::WebSoupRequestManagerProxy::handleURIRequest): Send
1122         HandleURIRequest message to the WebProcess with the given data and
1123         data type.
1124         (WebKit::WebSoupRequestManagerProxy::didReceiveURIRequest): Call
1125         didReceiveURIRequest callback to allow the user to handle the
1126         request.
1127         * UIProcess/soup/WebSoupRequestManagerProxy.h: Added.
1128         * UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Added.
1129         * WebProcess/WebProcess.cpp:
1130         (WebKit::WebProcess::WebProcess): Initialize m_soupRequestManager
1131         when using soup.
1132         (WebKit::WebProcess::didReceiveMessage): Forward the message to
1133         m_soupRequestManager if it's a MessageClassWebSoupRequestManager
1134         message.
1135         * WebProcess/WebProcess.h:
1136         (WebKit::WebProcess::soupRequestManager): Return m_soupRequestManager.
1137         * WebProcess/soup/WebKitSoupRequestGeneric.cpp: Added.
1138         (webkitSoupRequestGenericFinalize):
1139         (webkit_soup_request_generic_init):
1140         (webkitSoupRequestGenericSendAsync): Create a GSimpleAsyncResult
1141         to handle the request and pass it to the WebSoupRequestManager.
1142         (webkitSoupRequestGenericSendFinish): Finish the async operation
1143         started by webkitSoupRequestGenericSendAsync() and return the
1144         contents of the request as returned by WebSoupRequestManager.
1145         (webkitSoupRequestGenericGetContentLength): Get the request
1146         contents length.
1147         (webkitSoupRequestGenericGetContentType): Get the request mime
1148         type.
1149         (webkit_soup_request_generic_class_init):
1150         (webkitSoupRequestGenericSetContentLength): Set the request
1151         contents length.
1152         (webkitSoupRequestGenericSetContentType): Set the request mime
1153         type.
1154         * WebProcess/soup/WebKitSoupRequestGeneric.h: Added.
1155         * WebProcess/soup/WebSoupRequestManager.cpp: Added.
1156         (WebKit::generateSoupRequestID): Helper function to generate a
1157         unique request identifier.
1158         (WebKit::WebSoupRequestManager::WebSoupRequestManager):
1159         (WebKit::WebSoupRequestManager::~WebSoupRequestManager):
1160         (WebKit::WebSoupRequestManager::didReceiveMessage):
1161         (WebKit::WebSoupRequestManager::registerURIScheme): Add the scheme
1162         to the schemes array and add a new WebKitSoupRequestGeneric
1163         feature with the new scheme list to the SoupRequester feature.
1164         (WebKit::WebSoupRequestManager::handleURIRequest): Complete the
1165         async operation by creating a GInputStream with the request data,
1166         or setting an error in case of failure.
1167         (WebKit::WebSoupRequestManager::send): Send DidReceiveURIRequest
1168         message to the UI process.
1169         (WebKit::WebSoupRequestManager::finish): Return the GInputStream
1170         containing the request data.
1171         * WebProcess/soup/WebSoupRequestManager.h: Added.
1172         * WebProcess/soup/WebSoupRequestManager.messages.in: Added.
1173
1174 2012-04-26  No'am Rosenthal  <noam.rosenthal@nokia.com>
1175
1176         [Qt][WK2] A GraphicsSurface instance is created with every update
1177         https://bugs.webkit.org/show_bug.cgi?id=85014
1178
1179         Reviewed by Kenneth Rohde Christiansen.
1180
1181         Keep a copy of the GraphicsSurface in the UI process, and reuse it for
1182         subsequent updates. This ensure that the texture and other data associated
1183         with the GraphicsSurface does not need to be reconstructed.
1184
1185         * Shared/ShareableSurface.h:
1186         (Handle):
1187         (WebKit::ShareableSurface::Handle::graphicsSurfaceToken):
1188         * UIProcess/LayerTreeHostProxy.cpp:
1189         (WebKit::LayerTreeHostProxy::updateTileForLayer):
1190         * UIProcess/LayerTreeHostProxy.h:
1191         (LayerTreeHostProxy):
1192
1193 2012-04-26  Martin Robinson  <mrobinson@igalia.com>
1194
1195         [Cairo] Wrap cairo surfaces in a class when storing native images
1196         https://bugs.webkit.org/show_bug.cgi?id=83611
1197
1198         Reviewed by Alejandro G. Castro.
1199
1200         * Shared/gtk/ArgumentCodersGtk.cpp: Updated to reflect the addition of NativeImageCairo.
1201
1202 2012-04-26  Jon Lee  <jonlee@apple.com>
1203
1204         [WK2] AlternativeTextClient leaks when the page is destroyed
1205         https://bugs.webkit.org/show_bug.cgi?id=84307
1206         <rdar://problem/11328431>
1207
1208         Reviewed by Enrica Casucci.
1209
1210         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: Implement pageDestroyed(), as in EditorClient.
1211         (WebAlternativeTextClient):
1212         * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
1213         (WebKit::WebAlternativeTextClient::pageDestroyed): Deletes itself.
1214
1215 2012-04-26  Jer Noble  <jer.noble@apple.com>
1216
1217         Full Screen mode does not preserve CALayer ordering after exiting.
1218         https://bugs.webkit.org/show_bug.cgi?id=83931
1219
1220         Reviewed by Eric Carlson.
1221
1222         Further corrections to r114567. When swapping view for otherView, give the correct
1223         relative view to -[NSView addSubview:positioned:relativeTo:].
1224
1225         * UIProcess/mac/WKFullScreenWindowController.mm:
1226         (-[WKFullScreenWindowController _swapView:with:]):
1227
1228 2012-04-25  Jer Noble  <jer.noble@apple.com>
1229
1230         Placeholder view is immediately removed from hosting window upon entering full screen.
1231         https://bugs.webkit.org/show_bug.cgi?id=84916
1232
1233         Reviewed by Darin Adler.
1234
1235         Correct a mistake added in r114567.  When swapping view for otherView, add otherView and 
1236         remove view (rather than adding otherView and removing otherView).
1237
1238         * UIProcess/mac/WKFullScreenWindowController.mm:
1239         (-[WKFullScreenWindowController _swapView:with:]):
1240
1241 2012-04-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1242
1243         [GTK] Build and run TestWebKitAPI WebKit2 unit tests
1244         https://bugs.webkit.org/show_bug.cgi?id=84446
1245
1246         Reviewed by Philippe Normand.
1247
1248         * UIProcess/API/C/WKNativeEvent.h: Define WKNativeEventPtr as
1249         GdkEvent for the GTK+ port.
1250
1251 2012-04-26  Andras Becsi  <andras.becsi@nokia.com>
1252
1253         [Qt][WK2] Tap highlight should have a delay not to interfere with panning
1254         https://bugs.webkit.org/show_bug.cgi?id=84948
1255
1256         Reviewed by Kenneth Rohde Christiansen.
1257
1258         Start the tap highlight animation after a slight delay so that pan
1259         gestures do not result in flashing highlight rects which slow down
1260         flicking, especially during continuous pan gestures.
1261
1262         * UIProcess/qt/QtTapGestureRecognizer.cpp:
1263         (WebKit::QtTapGestureRecognizer::update):
1264         (WebKit::QtTapGestureRecognizer::highlightTimeout):
1265         (WebKit):
1266         (WebKit::QtTapGestureRecognizer::reset):
1267         (WebKit::QtTapGestureRecognizer::timerEvent):
1268         * UIProcess/qt/QtTapGestureRecognizer.h:
1269         (QtTapGestureRecognizer):
1270         * UIProcess/qt/QtWebPageEventHandler.cpp:
1271         (WebKit::QtWebPageEventHandler::doneWithTouchEvent):
1272
1273 2012-04-26  Lars Knudsen  <lars.knudsen@nokia.com>
1274
1275         Make it possible to use accelerated compositing for page overlay fading
1276         https://bugs.webkit.org/show_bug.cgi?id=82336
1277
1278         Reviewed by Noam Rosenthal.
1279
1280         Page overlay fading will use AC where possible.  Otherwise, it will
1281         fall back to the previous method of redrawing each frame in the animation.
1282
1283         * WebProcess/WebPage/DrawingArea.h:
1284         (WebKit::DrawingArea::setPageOverlayOpacity):
1285         (DrawingArea):
1286         (WebKit::DrawingArea::pageOverlayShouldApplyFadeWhenPainting):
1287         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1288         (WebKit::DrawingAreaImpl::setPageOverlayOpacity):
1289         (WebKit):
1290         (WebKit::DrawingAreaImpl::pageOverlayShouldApplyFadeWhenPainting):
1291         * WebProcess/WebPage/DrawingAreaImpl.h:
1292         (DrawingAreaImpl):
1293         * WebProcess/WebPage/LayerTreeHost.h:
1294         (WebKit::LayerTreeHost::setPageOverlayOpacity):
1295         (WebKit::LayerTreeHost::pageOverlayShouldApplyFadeWhenPainting):
1296         * WebProcess/WebPage/PageOverlay.cpp:
1297         (WebKit::PageOverlay::PageOverlay):
1298         (WebKit::PageOverlay::setPage):
1299         (WebKit::PageOverlay::fadeAnimationTimerFired):
1300         * WebProcess/WebPage/PageOverlay.h:
1301         * WebProcess/WebPage/TapHighlightController.cpp:
1302         (WebKit::TapHighlightController::drawRect):
1303         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
1304         (WebKit::LayerTreeHostQt::setPageOverlayOpacity):
1305         (WebKit):
1306         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
1307         (LayerTreeHostQt):
1308         (WebKit::LayerTreeHostQt::pageOverlayShouldApplyFadeWhenPainting):
1309
1310 2012-04-26  Alexander Færøy  <ahf@0x90.dk>
1311
1312         [Qt] r115300 broke the Qt build on Mac OS X.
1313
1314         This patch adds guards around the createPluginContainer and
1315         windowedPluginGeometryDidChange member functions in WebPageProxy.
1316
1317         Unreviewed build fix.
1318
1319         * UIProcess/qt/WebPageProxyQt.cpp:
1320         (WebKit):
1321
1322 2012-04-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1323
1324         [GTK][WebKit2] Initial windowed plugins implementation
1325         https://bugs.webkit.org/show_bug.cgi?id=61065
1326
1327         Reviewed by Philippe Normand.
1328
1329         * PluginProcess/PluginControllerProxy.cpp:
1330         (WebKit::PluginControllerProxy::createPluginContainer):
1331         (WebKit::PluginControllerProxy::windowedPluginGeometryDidChange):
1332         * PluginProcess/PluginControllerProxy.h:
1333         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1334         (webkitWebViewBaseContainerAdd): Implement GtkContainer::add().
1335         (webkitWebViewBaseContainerRemove): Implement GtkContainer::remove().
1336         (webkitWebViewBaseContainerForall): Implement GtkContainer::forall().
1337         (webkitWebViewBaseChildMoveResize): Set a new geometry for a child widget.
1338         (webkitWebViewBaseChildAllocate): Allocate a child widget.
1339         (resizeWebKitWebViewBaseFromAllocation): Allocate child widgets.
1340         (webkit_web_view_base_class_init):
1341         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Add webkitWebViewBaseSizeAllocate().
1342         * UIProcess/WebPageProxy.h:
1343         * UIProcess/WebPageProxy.messages.in: Add createPluginContainer
1344         and windowedPluginGeometryDidChange messages.
1345         * UIProcess/gtk/WebPageProxyGtk.cpp:
1346         (WebKit::pluginWindowMap):
1347         (WebKit::pluginContainerPlugRemoved): Remove the socket from the
1348         hash map when its plug is removed.
1349         (WebKit::WebPageProxy::createPluginContainer): Create a GtkSocket
1350         as container widget for windowed plugins.
1351         (WebKit::WebPageProxy::windowedPluginGeometryDidChange): Call
1352         webkitWebViewBaseSizeAllocate() to update the plugin widget
1353         geometry.
1354         * UIProcess/qt/WebPageProxyQt.cpp:
1355         (WebKit::WebPageProxy::createPluginContainer):
1356         (WebKit::WebPageProxy::windowedPluginGeometryDidChange):
1357         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1358         (WebKit::NetscapePlugin::NetscapePlugin):
1359         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1360         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1361         (WebKit::socketPlugRemovedCallback): Return TRUE to avoid the
1362         socket to be destroyed, since we need to reuse it.
1363         (WebKit::NetscapePlugin::platformPostInitializeWindowed): Ask the
1364         ui process to create a plugin container.
1365         (WebKit::NetscapePlugin::platformPostInitializeWindowless):
1366         (WebKit::NetscapePlugin::platformPostInitialize):
1367         (WebKit::NetscapePlugin::platformGeometryDidChange): For windowed
1368         plugins notify the ui process that the plugin geometry has
1369         changed.
1370         (WebKit::NetscapePlugin::platformPaint): Do nothing for windowed
1371         plugins, the caller already calls callSetWindow().
1372         * WebProcess/Plugins/PluginController.h:
1373         * WebProcess/Plugins/PluginProxy.cpp:
1374         (WebKit::PluginProxy::createPluginContainer):
1375         (WebKit::PluginProxy::windowedPluginGeometryDidChange):
1376         * WebProcess/Plugins/PluginProxy.h:
1377         * WebProcess/Plugins/PluginProxy.messages.in:
1378         * WebProcess/Plugins/PluginView.cpp:
1379         (WebKit::PluginView::createPluginContainer):
1380         (WebKit::PluginView::windowedPluginGeometryDidChange):
1381         * WebProcess/Plugins/PluginView.h:
1382
1383 2012-04-26  Chris Fleizach2  <cfleizach@apple.com>
1384
1385         CrashTracer: [USER] 157 crashes in WebProcess at com.apple.WebCore: WebCore::AccessibilityRenderObject::isAttachment const + 29
1386         https://bugs.webkit.org/show_bug.cgi?id=84463
1387
1388         Reviewed by Darin Adler.
1389
1390         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
1391         (WebKit):
1392
1393 2012-04-25  Benjamin Poulain  <benjamin@webkit.org>
1394
1395         Add a version of StringImpl::find() without offset
1396         https://bugs.webkit.org/show_bug.cgi?id=83968
1397
1398         Update the symbols files.
1399
1400         * win/WebKit2.def:
1401         * win/WebKit2CFLite.def:
1402
1403 2012-04-25  Mark Hahnenberg  <mhahnenberg@apple.com>
1404
1405         WebCore shouldn't call collectAllGarbage directly
1406         https://bugs.webkit.org/show_bug.cgi?id=84897
1407
1408         Reviewed by Geoffrey Garen.
1409
1410         * WebProcess/WebProcess.cpp:
1411         (WebKit::WebProcess::didClose): Changed to call garbageCollectSoon. This is the 
1412         function that causes us to do so much collection on page navigation.
1413
1414 2012-04-25  Beth Dakin  <bdakin@apple.com>
1415
1416         https://bugs.webkit.org/show_bug.cgi?id=84909
1417         Background tabs are fuzzy until repaint when deviceScaleFactor > 1
1418         -and corresponding-
1419         <rdar://problem/11312064>
1420
1421         Rubber-stamped by Darin Adler.
1422
1423         Re-order the parameters of paintBitmapContext to match paintImage.
1424         * Platform/cg/CGUtilities.cpp:
1425         (WebKit::paintBitmapContext):
1426         * Platform/cg/CGUtilities.h:
1427         (WebKit):
1428         * UIProcess/mac/BackingStoreMac.mm:
1429         (WebKit::BackingStore::resetScrolledRect):
1430         (WebKit::BackingStore::paint):
1431         (WebKit::BackingStore::backingStoreContext):
1432
1433 2012-04-25  Beth Dakin  <bdakin@apple.com>
1434
1435         https://bugs.webkit.org/show_bug.cgi?id=84909
1436         Background tabs are fuzzy until repaint when deviceScaleFactor > 1
1437         -and corresponding-
1438         <rdar://problem/11312064>
1439
1440         Reviewed by Darin Adler.
1441
1442         BackingStoreMac paints into a Bitmap instead of a CGLayer when there is no 
1443         containing window. That bitmap is used for the initial paint when a background tab 
1444         first comes to he foreground, so it needs to be HiDPI-aware.  
1445
1446         paintBitmapContext() now takes a scale factor that it passes along to paintImage 
1447         rather than hardcoding a scale factor of 1 for paintImage.
1448         * Platform/cg/CGUtilities.cpp:
1449         (WebKit::paintBitmapContext):
1450         * Platform/cg/CGUtilities.h:
1451         (WebKit):
1452
1453         When these functions fall into the bitmap case, they need to adopt the device 
1454         scale factor, which means they need to scale in size by the scale factor, and also 
1455         scale their context. 
1456         * UIProcess/mac/BackingStoreMac.mm:
1457         (WebKit::BackingStore::resetScrolledRect):
1458         (WebKit::BackingStore::paint):
1459         (WebKit::BackingStore::backingStoreContext):
1460
1461 2012-04-25  Enrica Casucci  <enrica@apple.com>
1462
1463         REGRESSION (r110494): Dragging images from Safari to Finder results in .webloc rather than image file
1464         https://bugs.webkit.org/show_bug.cgi?id=84878
1465         <rdar://problem/11155407>
1466         
1467         In WebKit2, it could happen to try to start the drag twice, given the asynchronous nature
1468         of the communication between the UI process and the WebProcess.
1469         We need to guarantee that we don't do that, otherwise on OS X the pasteboard ownership
1470         gets changed which affects the promised file types.
1471         The fix for the problem is in WebCore and we can now remove the guard on _setDragImage.
1472
1473         Reviewed by Alexey Proskuryakov.
1474
1475         * UIProcess/API/mac/WKView.mm:
1476         (-[WKView mouseDown:]):
1477         (-[WKView _setDragImage:at:linkDrag:]):
1478
1479 2012-04-18  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1480
1481         [Qt] Make the web view's url property follow the active url
1482
1483         https://bugs.webkit.org/show_bug.cgi?id=77554
1484
1485         The url property of the webview now reflects the 'active' url of the
1486         page, which maps to either the currently loading url, in the case of
1487         an ongoing load, or the result of a load, even when the load failed.
1488
1489         In practice this means that setting the url though QML, or navigating
1490         to a new url in the page by e.g clicking, will both instantly change
1491         the url-property of the webview to the target url. This differs from
1492         earlier behavior, where we would update the url when the load
1493         committed.
1494
1495         An optional argument is added to loadHtml(), to allow setting
1496         the unreachable url when providing replacement content for failed
1497         loads.
1498
1499         A slight change in the activeUrl() implementation is also done,
1500         where we now favour the url of an pending API request, even when
1501         we don't have a mainframe yet.
1502
1503         Finally, the location bar in the minibrowser is updated to behave
1504         a bit more like normal browsers in terms of when the url will change
1505         and how active focus is handled.
1506
1507         Reviewed by Simon Hausmann.
1508
1509         * UIProcess/API/qt/qquickwebview.cpp:
1510         (QQuickWebViewPrivate::onComponentComplete):
1511         (QQuickWebView::reload):
1512         (QQuickWebView::url):
1513         (QQuickWebView::setUrl):
1514         (QQuickWebView::loadHtml):
1515         * UIProcess/API/qt/qquickwebview_p.h:
1516         * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
1517         * UIProcess/API/qt/tests/qmltests/WebView.pro:
1518         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
1519         * UIProcess/API/qt/tests/qmltests/common/link.html: Added.
1520         * UIProcess/API/qt/tests/qmltests/common/redirect.html: Added.
1521         * UIProcess/WebPageProxy.cpp:
1522         (WebKit::WebPageProxy::activeURL):
1523         * UIProcess/qt/QtWebPageLoadClient.cpp:
1524         (QtWebPageLoadClient::QtWebPageLoadClient):
1525         (QtWebPageLoadClient::didStartProvisionalLoadForFrame):
1526         (QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoadForFrame):
1527         (QtWebPageLoadClient::didCommitLoadForFrame):
1528         (QtWebPageLoadClient::dispatchLoadFailed):
1529         (QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame):
1530         (QtWebPageLoadClient::didFailLoadWithErrorForFrame):
1531         * UIProcess/qt/QtWebPageLoadClient.h:
1532         (QtWebPageLoadClient):
1533
1534 2012-04-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1535
1536         [Qt] Zoom back can overscroll document edges.
1537         https://bugs.webkit.org/show_bug.cgi?id=84851
1538
1539         Reviewed by Kenneth Rohde Christiansen.
1540
1541         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1542         (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
1543
1544 2012-04-18  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1545
1546         [Qt] Make the web view's url property follow the active url
1547
1548         https://bugs.webkit.org/show_bug.cgi?id=77554
1549
1550         The url property of the webview now reflects the 'active' url of the
1551         page, which maps to either the currently loading url, in the case of
1552         an ongoing load, or the result of a load, even when the load failed.
1553
1554         In practice this means that setting the url though QML, or navigating
1555         to a new url in the page by e.g clicking, will both instantly change
1556         the url-property of the webview to the target url. This differs from
1557         earlier behavior, where we would update the url when the load
1558         committed.
1559
1560         An optional argument is added to loadHtml(), to allow setting
1561         the unreachable url when providing replacement content for failed
1562         loads.
1563
1564         A slight change in the activeUrl() implementation is also done,
1565         where we now favour the url of an pending API request, even when
1566         we don't have a mainframe yet.
1567
1568         Finally, the location bar in the minibrowser is updated to behave
1569         a bit more like normal browsers in terms of when the url will change
1570         and how active focus is handled.
1571
1572         Reviewed by Simon Hausmann.
1573
1574         * UIProcess/API/qt/qquickwebview.cpp:
1575         (QQuickWebViewPrivate::onComponentComplete):
1576         (QQuickWebView::reload):
1577         (QQuickWebView::url):
1578         (QQuickWebView::setUrl):
1579         (QQuickWebView::loadHtml):
1580         * UIProcess/API/qt/qquickwebview_p.h:
1581         * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
1582         * UIProcess/API/qt/tests/qmltests/WebView.pro:
1583         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
1584         * UIProcess/API/qt/tests/qmltests/common/link.html: Added.
1585         * UIProcess/API/qt/tests/qmltests/common/redirect.html: Added.
1586         * UIProcess/WebPageProxy.cpp:
1587         (WebKit::WebPageProxy::activeURL):
1588         * UIProcess/qt/QtWebPageLoadClient.cpp:
1589         (QtWebPageLoadClient::QtWebPageLoadClient):
1590         (QtWebPageLoadClient::didStartProvisionalLoadForFrame):
1591         (QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoadForFrame):
1592         (QtWebPageLoadClient::didCommitLoadForFrame):
1593         (QtWebPageLoadClient::dispatchLoadFailed):
1594         (QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame):
1595         (QtWebPageLoadClient::didFailLoadWithErrorForFrame):
1596         * UIProcess/qt/QtWebPageLoadClient.h:
1597         (QtWebPageLoadClient):
1598
1599 2012-04-24  Enrica Casucci  <enrica@apple.com>
1600
1601         REGRESSION (r109022) Safari not placing service data on pasteboard.
1602         https://bugs.webkit.org/show_bug.cgi?id=84766
1603         <rdar://problem/11085756>
1604         
1605         The support for OS X services requires that the write operations to
1606         the pasteboard occur synchronously. This behavior was changed with r109022.
1607         This change removes the original synchronous call to the WebProcess to perform
1608         the pasteboard write that had become asynchronous after r109022.
1609         It implements instead a synchronous call to retrive the content to be placed
1610         in the pasteboard.
1611
1612         Reviewed by Alexey Proskuryakov.
1613
1614         * UIProcess/API/mac/WKView.mm:
1615         (-[WKView writeSelectionToPasteboard:types:]): Uses new methods.
1616         * UIProcess/WebPageProxy.h:
1617         * UIProcess/mac/WebPageProxyMac.mm: Removed writeSelectionToPasteboard.
1618         (WebKit::WebPageProxy::getStringSelectionForPasteboard): Added.
1619         (WebKit::WebPageProxy::getBufferSelectionForPasteboard): Added.
1620         * WebProcess/WebPage/WebPage.h: Added support for the new messages and
1621         removed old message.
1622         * WebProcess/WebPage/WebPage.messages.in: Ditto.
1623         * WebProcess/WebPage/mac/WebPageMac.mm: Ditto.
1624         (WebKit::WebPage::readSelectionFromPasteboard): Added.
1625         (WebKit::WebPage::getBufferSelectionForPasteboard): Added.
1626
1627 2012-04-24  Brady Eidson  <beidson@apple.com>
1628
1629         Fix Windows build.
1630
1631         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h:
1632         (~InjectedBundleDOMWindowExtension): VS doesn't like OVERRIDE on d'tor's
1633
1634 2012-04-24  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
1635
1636         [Qt] Unreviewed build fix after r115083
1637
1638         * WebProcess/qt/QtBuiltinBundlePage.cpp:
1639         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
1640
1641 2012-04-24  Brady Eidson  <beidson@apple.com>
1642
1643         <rdar://problem/10120155> and https://bugs.webkit.org/show_bug.cgi?id=82664
1644          Need DOMWindow mechanism to supplement UserScripts for page cache notifications
1645
1646         Reviewed by Sam Weinig.
1647         
1648         - Adds a new API object WKBundleDOMWindowExtension
1649         - Exposes callbacks about the lifetime of DOMWindowExtensions through BundlePageLoaderClient
1650
1651         Add new API casts:
1652         * Shared/API/c/WKBase.h:
1653         * Shared/APIClientTraits.cpp:
1654         * Shared/APIObject.h:
1655         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
1656
1657         Add API for the new DOMWindowExtension object:
1658         * WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp: Added.
1659         (WKBundleDOMWindowExtensionGetTypeID):
1660         (WKBundleDOMWindowExtensionCreate):
1661         (WKBundleDOMWindowExtensionGetFrame):
1662         (WKBundleDOMWindowExtensionGetScriptWorld):
1663         * WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.h: Added.
1664
1665         Add implementation for that API which wraps the WebCore::DOMWindowExtension:
1666         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp: Added.
1667         (WebKit::allExtensions):
1668         (WebKit::InjectedBundleDOMWindowExtension::create):
1669         (WebKit::InjectedBundleDOMWindowExtension::get):
1670         (WebKit::InjectedBundleDOMWindowExtension::InjectedBundleDOMWindowExtension):
1671         (WebKit::InjectedBundleDOMWindowExtension::~InjectedBundleDOMWindowExtension):
1672         (WebKit::InjectedBundleDOMWindowExtension::frame):
1673         (WebKit::InjectedBundleDOMWindowExtension::world):
1674         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h: Added.
1675         (InjectedBundleDOMWindowExtension):
1676         (WebKit::InjectedBundleDOMWindowExtension::type):
1677
1678         Add new BundlePageLoaderClient methods:
1679         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1680         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1681         (WebKit::InjectedBundlePageLoaderClient::didCreateGlobalObjectForFrame):
1682         (WebKit::InjectedBundlePageLoaderClient::willDisconnectDOMWindowExtensionFromGlobalObject):
1683         (WebKit::InjectedBundlePageLoaderClient::didReconnectDOMWindowExtensionToGlobalObject):
1684         (WebKit::InjectedBundlePageLoaderClient::willDestroyGlobalObjectForDOMWindowExtension):
1685         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1686         (InjectedBundlePageLoaderClient):
1687
1688         Implement the 4 new callbacks from WebCore which notify the BundlePageLoaderClient:
1689         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1690         (WebKit::WebFrameLoaderClient::dispatchGlobalObjectAvailable):
1691         (WebKit::WebFrameLoaderClient::dispatchWillDisconnectDOMWindowExtensionFromGlobalObject):
1692         (WebKit::WebFrameLoaderClient::dispatchDidReconnectDOMWindowExtensionToGlobalObject):
1693         (WebKit::WebFrameLoaderClient::dispatchWillDestroyGlobalObjectForDOMWindowExtension):
1694         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1695
1696         Project Files:
1697         * CMakeLists.txt:
1698         * GNUmakefile.am:
1699         * Target.pri:
1700         * WebKit2.xcodeproj/project.pbxproj:
1701         * win/WebKit2.vcproj:
1702
1703 2012-04-24  Andras Becsi  <andras.becsi@nokia.com>
1704
1705         [Qt][WK2] Implement axis locking on the WebView for pan gestures
1706         https://bugs.webkit.org/show_bug.cgi?id=84350
1707
1708         Reviewed by Kenneth Rohde Christiansen.
1709
1710         If a pan gesture has sufficient velocity along one axis the WebView
1711         should automatically lock the page movement to that axis.
1712         This locking should be maintained until the ongoing pan gesture ends.
1713
1714         This patch implements a simple axis locker which adjusts the positions
1715         sent to the Flickable to the initial reference position according to the
1716         direction an velocity information it gathered from incoming touch events.
1717
1718         The FlickableAxisLocker makes use of the velocity information of the touch point
1719         if available, else an approximate velocity of the incoming event is
1720         calculated.
1721
1722         * UIProcess/API/qt/qquickwebview.cpp:
1723         (QQuickWebViewPrivate::FlickableAxisLocker::FlickableAxisLocker):
1724         (QQuickWebViewPrivate::FlickableAxisLocker::touchVelocity):
1725         (QQuickWebViewPrivate::FlickableAxisLocker::update):
1726         (QQuickWebViewPrivate::FlickableAxisLocker::setReferencePosition):
1727         (QQuickWebViewPrivate::FlickableAxisLocker::reset):
1728         (QQuickWebViewPrivate::FlickableAxisLocker::adjust):
1729         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1730         (QQuickWebView::touchEvent):
1731         (QQuickWebView::handleFlickableMousePress):
1732         (QQuickWebView::handleFlickableMouseMove):
1733         (QQuickWebView::handleFlickableMouseRelease):
1734         * UIProcess/API/qt/qquickwebview_p_p.h:
1735         (QQuickWebViewPrivate):
1736
1737 2012-04-24  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1738
1739         [Qt] Tap-to zoom should navigate when appropiate
1740         https://bugs.webkit.org/show_bug.cgi?id=84602
1741
1742         Reviewed by Simon Hausmann.
1743
1744         When a zoomable area is returned and has the same zoom-level as the current, 
1745         examine if the using this target would expose currently unexposed parts of
1746         the zoom-target. If it does, pan to that area instead of zooming back.
1747
1748         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1749         (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
1750
1751 2012-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1752
1753         [GTK] Add WebKitCookieManager::changed signal to WebKit2 GTK+ API
1754         https://bugs.webkit.org/show_bug.cgi?id=82598
1755
1756         Reviewed by Philippe Normand.
1757
1758         * UIProcess/API/gtk/WebKitCookieManager.cpp:
1759         (webkitCookieManagerFinalize): Stop observing cookie changes.
1760         (webkit_cookie_manager_class_init): Add
1761         WebKitCookieManager::changed signal.
1762         (cookiesDidChange): Emit WebKitCookieManager::changed signal.
1763         (webkitCookieManagerCreate): Implement WKCookieManagerClient and
1764         start observing cookie changes.
1765         * UIProcess/API/gtk/tests/TestCookieManager.cpp:
1766         (testCookieManagerCookiesChanged):
1767         (beforeAll):
1768
1769 2012-04-24  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1770
1771         [Qt] Restore x-position when restoring previous zoom-level.
1772         https://bugs.webkit.org/show_bug.cgi?id=84591
1773
1774         Reviewed by Simon Hausmann.
1775
1776         Tap-to-zoom fits content to width, therefore it is essentional that
1777         the content is refitted to width when zooming out.
1778
1779         This patch pairs horizontal position and scale on the zoom-out stack.
1780
1781         Additionally it fixes a problem with not detecting zoom-out properly
1782         due to floating point errors.
1783
1784         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1785         (WebKit::fuzzyCompare):
1786         (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
1787         * UIProcess/qt/QtViewportInteractionEngine.h:
1788         (WebKit::QtViewportInteractionEngine::ScaleStackItem::ScaleStackItem):
1789         (QtViewportInteractionEngine):
1790
1791 2012-04-24  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1792
1793         [Qt] Incomplete interaction-engine reset.
1794         https://bugs.webkit.org/show_bug.cgi?id=84594
1795
1796         Reviewed by Simon Hausmann.
1797
1798         Reset a few values forgotten in the reset function.
1799
1800         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1801         (WebKit::QtViewportInteractionEngine::reset):
1802
1803 2012-04-23  Andreas Kling  <kling@webkit.org>
1804
1805         [Mac] WebProcess should empty cache on a background thread/block.
1806         <http://webkit.org/b/84619>
1807         <rdar://problem/10668689>
1808
1809         Reviewed by Anders Carlsson.
1810
1811         Move the removeAllCachedResponses call to a dispatch queue and wait for it on exit.
1812
1813         * WebProcess/WebProcess.cpp:
1814         (WebKit::WebProcess::WebProcess):
1815         * WebProcess/WebProcess.h:
1816         (WebProcess):
1817         * WebProcess/mac/WebProcessMac.mm:
1818         (WebKit::WebProcess::platformClearResourceCaches):
1819         (WebKit::WebProcess::platformTerminate):
1820
1821 2012-04-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1822
1823         [Qt][WK2] Convert touch-point area.
1824         https://bugs.webkit.org/show_bug.cgi?id=84434
1825
1826         Reviewed by Kenneth Rohde Christiansen.
1827
1828         Missed WebKit2 conversion in commit r106470.
1829
1830         * Shared/qt/WebEventFactoryQt.cpp:
1831         (WebKit::WebEventFactory::createWebTouchEvent):
1832
1833 2012-04-23  Balazs Kelemen  <kbalazs@webkit.org>
1834
1835         [Qt] Add desktop zooming support for QQuickWebView
1836         https://bugs.webkit.org/show_bug.cgi?id=82337
1837
1838         Reviewed by Simon Hausmann.
1839
1840         Add private C++ API for programmatic zooming.
1841         This is important on desktop where we don't
1842         have any way to zoom currently.
1843
1844         * UIProcess/API/qt/qquickwebview.cpp:
1845         (QQuickWebViewLegacyPrivate::zoomFactor):
1846         (QQuickWebViewLegacyPrivate::setZoomFactor):
1847         (QQuickWebView::zoomFactor):
1848         (QQuickWebView::setZoomFactor):
1849         * UIProcess/API/qt/qquickwebview_p.h:
1850         * UIProcess/API/qt/qquickwebview_p_p.h:
1851         (QQuickWebViewPrivate::zoomFactor):
1852         (QQuickWebViewPrivate::setZoomFactor):
1853         (QQuickWebViewPrivate):
1854         (QQuickWebViewLegacyPrivate):
1855
1856 2012-04-23  Zalan Bujtas  <zbujtas@gmail.com>
1857
1858         [Qt][WK2] Move non-api classes to WebKit namespace at WebKit2/UiProcess/qt
1859         https://bugs.webkit.org/show_bug.cgi?id=84528
1860
1861         Reviewed by Simon Hausmann.
1862
1863         Fix namespace usage in non-api classes for Qt.
1864
1865         * UIProcess/API/qt/qquickwebpage.cpp:
1866         * UIProcess/API/qt/qquickwebpage_p.h:
1867         (WebKit):
1868         * UIProcess/API/qt/qquickwebpage_p_p.h:
1869         (WebKit):
1870         (QQuickWebPagePrivate):
1871         * UIProcess/API/qt/qquickwebview.cpp:
1872         * UIProcess/API/qt/qquickwebview_p.h:
1873         (WebKit):
1874         * UIProcess/API/qt/qquickwebview_p_p.h:
1875         (WebKit):
1876         (QQuickWebViewPrivate::viewportInteractionEngine):
1877         (QQuickWebViewPrivate):
1878         (QQuickWebViewFlickablePrivate::viewportInteractionEngine):
1879         (QQuickWebViewFlickablePrivate):
1880         * UIProcess/API/qt/qwebdownloaditem_p.h:
1881         (WebKit):
1882         * UIProcess/API/qt/qwebviewportinfo.cpp:
1883         * UIProcess/qt/LayerBackingStore.cpp:
1884         * UIProcess/qt/LayerBackingStore.h:
1885         (WebKit):
1886         * UIProcess/qt/QtDialogRunner.cpp:
1887         (WebKit):
1888         * UIProcess/qt/QtDialogRunner.h:
1889         (WebKit):
1890         * UIProcess/qt/QtDownloadManager.cpp:
1891         * UIProcess/qt/QtDownloadManager.h:
1892         (WebKit):
1893         * UIProcess/qt/QtGestureRecognizer.cpp:
1894         * UIProcess/qt/QtGestureRecognizer.h:
1895         (WebKit):
1896         * UIProcess/qt/QtPageClient.cpp:
1897         (WebKit):
1898         * UIProcess/qt/QtPageClient.h:
1899         (WebKit):
1900         (QtPageClient):
1901         * UIProcess/qt/QtPanGestureRecognizer.cpp:
1902         * UIProcess/qt/QtPanGestureRecognizer.h:
1903         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
1904         * UIProcess/qt/QtPinchGestureRecognizer.h:
1905         * UIProcess/qt/QtTapGestureRecognizer.h:
1906         (WebKit):
1907         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1908         * UIProcess/qt/QtViewportInteractionEngine.h:
1909         * UIProcess/qt/QtWebContext.cpp:
1910         * UIProcess/qt/QtWebContext.h:
1911         * UIProcess/qt/QtWebError.cpp:
1912         (WebKit):
1913         * UIProcess/qt/QtWebError.h:
1914         (WebKit):
1915         * UIProcess/qt/QtWebIconDatabaseClient.cpp:
1916         (WebKit):
1917         * UIProcess/qt/QtWebIconDatabaseClient.h:
1918         (WTF):
1919         (WebKit):
1920         (QtWebIconDatabaseClient):
1921         * UIProcess/qt/QtWebPageEventHandler.cpp:
1922         (WebKit):
1923         * UIProcess/qt/QtWebPageEventHandler.h:
1924         (WebCore):
1925         (WebKit):
1926         * UIProcess/qt/QtWebPageLoadClient.cpp:
1927         (WebKit):
1928         * UIProcess/qt/QtWebPageLoadClient.h:
1929         (WebKit):
1930         * UIProcess/qt/QtWebPagePolicyClient.cpp:
1931         (WebKit):
1932         * UIProcess/qt/QtWebPagePolicyClient.h:
1933         (WebKit):
1934         * UIProcess/qt/QtWebPageSGNode.cpp:
1935         * UIProcess/qt/QtWebPageSGNode.h:
1936         (WebKit):
1937         * UIProcess/qt/QtWebPageUIClient.cpp:
1938         * UIProcess/qt/QtWebPageUIClient.h:
1939         (WebKit):
1940         * UIProcess/qt/QtWebUndoController.cpp:
1941         (WebKit):
1942         * UIProcess/qt/QtWebUndoController.h:
1943         (WebKit):
1944         * UIProcess/qt/WebContextMenuProxyQt.cpp:
1945         * UIProcess/qt/WebContextQt.cpp:
1946         * UIProcess/qt/WebFullScreenManagerProxyQt.cpp:
1947         * UIProcess/qt/WebGeolocationProviderQt.cpp:
1948         (WebKit):
1949         * UIProcess/qt/WebGeolocationProviderQt.h:
1950         (WebKit):
1951         * UIProcess/qt/WebPopupMenuProxyQt.cpp:
1952         (WebKit):
1953         * UIProcess/qt/WebPopupMenuProxyQt.h:
1954
1955 2012-04-23  Kent Tamura  <tkent@chromium.org>
1956
1957         Add test function to get placeholder string
1958         https://bugs.webkit.org/show_bug.cgi?id=84536
1959
1960         Reviewed by Ryosuke Niwa.
1961
1962         * win/WebKit2.def: Expose HTMLNames::inputTag,
1963         HTMLTextFormControlElement::placeholderShouldBeVisible(), and
1964         Node::textContent.
1965         * win/WebKit2CFLite.def: ditto.
1966
1967 2012-04-22  Sriram Neelakandan  <sriram.neelakandan@gmail.com>
1968
1969         [Gtk] Added MOZ_X11 build flag for TARGET_X11
1970         [Qt]  Added MOZ_X11 build flag for !embedded
1971         https://bugs.webkit.org/show_bug.cgi?id=40785
1972
1973         Reviewed by Anders Carlsson.
1974
1975         * GNUmakefile.am:
1976         * Target.pri:
1977
1978 2012-04-22  Jon Lee  <jonlee@apple.com>
1979
1980         Remove notifications support on Mac Lion.
1981         https://bugs.webkit.org/show_bug.cgi?id=84554
1982         <rdar://problem/11297128>
1983
1984         Reviewed by Sam Weinig.
1985
1986         * Configurations/FeatureDefines.xcconfig:
1987
1988 2012-04-22  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1989
1990         [Qt] Multi-level tap-to-zoom.
1991         https://bugs.webkit.org/show_bug.cgi?id=84456
1992
1993         Reviewed by Kenneth Rohde Christiansen.
1994         
1995         Replace tap-to-zoomed flag with a stack of progressively higher zoom levels, 
1996         and zoom out to last zoom-level when attempting to zoom to current level.
1997         
1998         Additionally detect a series of tap-to-zoom gestures on the same level and 
1999         continue to zoom out.
2000
2001         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2002         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
2003         (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
2004         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
2005         * UIProcess/qt/QtViewportInteractionEngine.h:
2006         (QtViewportInteractionEngine):
2007
2008 2012-04-20  Jon Lee  <jonlee@apple.com>
2009
2010         Add Notification constructor
2011         https://bugs.webkit.org/show_bug.cgi?id=80477
2012         <rdar://problem/10912431>
2013
2014         Reviewed by Jian Li.
2015
2016         * WebProcess/Notifications/WebNotificationManager.cpp:
2017         (WebKit::WebNotificationManager::show): If the notification doesn't get shown,
2018         we should return false, since it will not go through a setPendingActivity cycle.
2019         (WebKit::WebNotificationManager::clearNotifications): When clearing notifications,
2020         finalize them so that they can be cleaned up by the GC.
2021
2022 2012-04-20  Timothy Hatcher  <timothy@apple.com>
2023
2024         Make the Web Inspector be the first responder when opening docked.
2025
2026         <rdar://problem/11294217>
2027
2028         Reviewed by Brian Weinstein.
2029
2030         * UIProcess/mac/WebInspectorProxyMac.mm:
2031         (WebKit::WebInspectorProxy::platformAttach): Call makeFirstResponder: on
2032         the window and pass the Inspector's WKView.
2033
2034 2012-04-06  Jer Noble  <jer.noble@apple.com>
2035
2036         apple.com top navigation bar appears inside video during full screen exit animation
2037         https://bugs.webkit.org/show_bug.cgi?id=83095
2038
2039         Reviewed by Eric Carlson.
2040
2041         Add new WebCore symbols needed by DumpRenderTree to exported symbol list.
2042
2043         * win/WebKit2.def:
2044         * win/WebKit2CFLite.def:
2045
2046 2012-04-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2047
2048         [GTK] Ignore resources while replacing content in WebKit2 GTK+ API
2049         https://bugs.webkit.org/show_bug.cgi?id=79777
2050
2051         Reviewed by Philippe Normand.
2052
2053         * UIProcess/API/gtk/WebKitResourceLoadClient.cpp:
2054         (didSendRequestForResource): Return early if resources is Null.
2055         (didReceiveResponseForResource): Ditto.
2056         (didReceiveContentLengthForResource): Ditto.
2057         (didFinishLoadForResource): Ditto.
2058         (didFailLoadForResource): Ditto.
2059         * UIProcess/API/gtk/WebKitWebView.cpp:
2060         (webkitWebViewLoadChanged): Clear resources before checking
2061         whether we are replacing content.
2062         (webkitWebViewIsReplacingContentOrDidReplaceContent): Helper
2063         function to check whether view is replacing content or current
2064         content is replaced.
2065         (webkitWebViewResourceLoadStarted): Do not create resources when
2066         replacing content.
2067         (webkitWebViewGetLoadingWebResource): Ignore when replacing
2068         content. Also add an assert when getting a loading resources to
2069         make sure we only return Null when replacing content.
2070         (webkitWebViewRemoveLoadingWebResource): Ditto.
2071         (webkitWebViewResourceLoadFinished): Ditto.
2072         * UIProcess/API/gtk/tests/TestResources.cpp:
2073         (replacedContentResourceLoadStartedCallback):
2074         (testWebViewResourcesReplacedContent):
2075         (beforeAll):
2076
2077 2012-04-19  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
2078
2079         [Qt] ASSERT(m_thread == currentThread()) on Mac when threaded rendering is enabled for the Qt scenegraph
2080         https://bugs.webkit.org/show_bug.cgi?id=84278
2081
2082         Reviewed by Noam Rosenthal.
2083
2084         Delete the whole layer tree on UI side when paint node is deleted and force resync of the layers when
2085         page becomes visible again.
2086
2087         * UIProcess/LayerTreeHostProxy.cpp:
2088         (WebKit::LayerTreeHostProxy::purgeBackingStores):
2089         * UIProcess/WebLayerTreeRenderer.cpp:
2090         (WebKit::WebLayerTreeRenderer::WebLayerTreeRenderer):
2091         (WebKit::WebLayerTreeRenderer::purgeGLResources):
2092         (WebKit::WebLayerTreeRenderer::appendUpdate):
2093         (WebKit::WebLayerTreeRenderer::setActive):
2094         (WebKit):
2095         * UIProcess/WebLayerTreeRenderer.h:
2096         (WebLayerTreeRenderer):
2097         * UIProcess/qt/QtWebPageSGNode.cpp:
2098         (WebKit::ContentsSGNode::ContentsSGNode):
2099         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
2100         (WebCore::WebGraphicsLayer::purgeBackingStores):
2101
2102 2012-04-19  Vivek Galatage  <vivekgalatage@gmail.com>
2103
2104         DevTools: assertion failure upon devtools window reopen.
2105         https://bugs.webkit.org/show_bug.cgi?id=53493
2106
2107         Reviewed by Pavel Feldman.
2108
2109         The pointers pointed to by WebInspector must be reset explicitly
2110         in WebInspector::didClose() method
2111
2112         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2113         (WebKit::WebInspectorClient::closeInspectorFrontend):
2114         * WebProcess/WebPage/WebInspector.cpp:
2115         (WebKit::WebInspector::didClose):
2116
2117 2012-04-19  Zalan Bujtas  <zbujtas@gmail.com>
2118
2119         [Qt][WK2] Zoom out on the second double click does not always scale right.
2120         https://bugs.webkit.org/show_bug.cgi?id=84332
2121
2122         Reviewed by Simon Hausmann.
2123
2124         Zoom out to the minimum scale value instead of the fixed 1.
2125
2126         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2127         (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
2128
2129 2012-04-18  Jer Noble  <jer.noble@apple.com>
2130
2131         Full Screen mode does not preserve CALayer ordering after exiting.
2132         https://bugs.webkit.org/show_bug.cgi?id=83931
2133
2134         Reviewed by Eric Carlson.
2135
2136         When swapping the placeholder and web views, use -[NSView addSubview:positioned:relativeTo:]
2137         instead of -[NSView replaceSubview:with:], as the latter does not preserve the relative order
2138         of the view's backing CALayers.
2139
2140         * UIProcess/mac/WKFullScreenWindowController.mm:
2141         (-[WKFullScreenWindowController _swapView:with:]):
2142
2143 2012-04-18  Alexey Proskuryakov  <ap@apple.com>
2144
2145         [WK2] Sandbox violations prevent attaching files to gmail messages
2146         https://bugs.webkit.org/show_bug.cgi?id=84263
2147         <rdar://problem/11248260>
2148
2149         Reviewed by Oliver Hunt.
2150
2151         * WebProcess/WebCoreSupport/WebDragClient.cpp: (WebKit::WebDragClient::willPerformDragDestinationAction):
2152         Prepare to the possibility that file data will be read. This needs to happen on every drop
2153         with files, not just after event dispatch.
2154
2155         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mayPerformUploadDragDestinationAction):
2156         * WebProcess/WebPage/WebPage.h:
2157         Renamed performUploadDragDestinationAction to mayPerformUploadDragDestinationAction. We don't
2158         know if an upload will actually happen, it's up to JavaScript code to decide.
2159
2160 2012-04-18  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2161
2162         Clean-up WheelEvent Conversion.
2163         https://bugs.webkit.org/show_bug.cgi?id=84243
2164
2165         Reviewed by Simon Hausmann.
2166
2167         * Shared/qt/WebEventFactoryQt.cpp:
2168         (WebKit::WebEventFactory::createWebWheelEvent):
2169         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2170         (WebKit::QtViewportInteractionEngine::wheelEvent):
2171
2172 2012-04-18  Zalan Bujtas  <zbujtas@gmail.com>
2173
2174         [Qt][WK2] Minibrowser asserts on startup at QtViewportInteractionEngine::ensureContentWithinViewportBoundary()
2175         https://bugs.webkit.org/show_bug.cgi?id=84172
2176
2177         Reviewed by Simon Hausmann.
2178
2179         After the viewport computing refactor, ensureContentWithinViewportBoundary() can be called
2180         with resumed page. QtViewportInteractionEngine::ensureContentWithinViewportBoundary()
2181         functionality does not necessarily require the page to be suspended. It's the caller's context
2182         that determines whether the page needs to be suspended, so it's the caller's responsibility
2183         to enforce the ASSERT().
2184         Remove the invalid ASSERT on m_suspendCount at QtViewportInteractionEngine::ensureContentWithinViewportBoundary()
2185
2186         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2187         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
2188
2189 2012-04-17  Alexey Proskuryakov  <ap@apple.com>
2190
2191         [Mac] USPS Shipping label prints without barcode
2192         https://bugs.webkit.org/show_bug.cgi?id=84099
2193         <rdar://problem/11133877>
2194
2195         Reviewed by Sam Weinig.
2196
2197         Use PDFDocuemnt instead of CGPDFDocument when printing PDFs, because PDFKit knows
2198         how to draw PDF buttons, and CG does not.
2199
2200         * Shared/mac/PDFKitImports.h: Added.
2201         * Shared/mac/PDFKitImports.mm: Added.
2202         * UIProcess/API/mac/WKPrintingView.mm:
2203         Moved code for dealing with dynamically loaded PDFKit from WKPrintingView, as we
2204         now also need it elsewhere.
2205
2206         * WebKit2.xcodeproj/project.pbxproj: Added
2207         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp: Rebamed to .mm.
2208
2209         * WebProcess/Plugins/PDF/BuiltInPDFView.h: Changed m_pdfDocument to PDFDocument.
2210
2211         * WebProcess/Plugins/PDF/BuiltInPDFView.mm: Copied from Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp.
2212         (WebKit::BuiltInPDFView::pdfDocumentDidLoad):
2213         (WebKit::BuiltInPDFView::calculateSizes):
2214         (WebKit::BuiltInPDFView::paintContent):
2215         Changed m_pdfDocument to PDFDocument, and updated for the changes. We still use
2216         CGPDF when drawing to screen though, because that doesn't affect USPS.
2217
2218         * WebProcess/Plugins/Plugin.h: (WebKit::Plugin::pdfDocumentForPrinting): Updated
2219         the type, and changed ifsed from CG to MAC, as we're now fully dependent on Cocoa.
2220
2221         * WebProcess/Plugins/PluginView.h: (WebKit::PluginView::pdfDocumentForPrinting):
2222         Ditto.
2223
2224         * WebProcess/WebPage/WebPage.cpp:
2225         (WebKit::WebPage::pdfDocumentForPrintingFrame):
2226         (WebKit::WebPage::beginPrinting):
2227         (WebKit::WebPage::computePagesForPrinting):
2228         (WebKit::WebPage::drawRectToPDF):
2229         (WebKit::WebPage::drawPagesToPDF):
2230         * WebProcess/WebPage/WebPage.h:
2231         Moved PDF document printing code to WebPageMac.mm, as it's now Objective C.
2232
2233         * WebProcess/WebPage/mac/WebPageMac.mm:
2234         (WebKit::WebPage::computePagesForPrintingPDFDocument):
2235         (WebKit::roundCGFloat):
2236         (WebKit::drawPDFPage): While moving, also fixed a logic error in calculating the box
2237         (it used to intersect with an empty box).
2238         (WebKit::WebPage::drawRectToPDFFromPDFDocument):
2239         (WebKit::WebPage::drawPagesToPDFFromPDFDocument):
2240
2241 2012-04-17  Anders Carlsson  <andersca@apple.com>
2242
2243         Need a client callback for when the user tires to interact with an already unresponsive page
2244         https://bugs.webkit.org/show_bug.cgi?id=84201
2245         <rdar://problem/11140862>
2246
2247         Reviewed by Andreas Kling.
2248
2249         Add a interactionOccurredWhileProcessUnresponsive callback that's called when the unresponsiveness timer
2250         fires while it's already unresponsive.
2251
2252         * UIProcess/API/C/WKPage.h:
2253         * UIProcess/ResponsivenessTimer.cpp:
2254         (WebKit):
2255         (WebKit::ResponsivenessTimer::timerFired):
2256         (WebKit::ResponsivenessTimer::start):
2257         * UIProcess/ResponsivenessTimer.h:
2258         (Client):
2259         * UIProcess/WebLoaderClient.cpp:
2260         (WebKit::WebLoaderClient::processDidBecomeUnresponsive):
2261         (WebKit):
2262         (WebKit::WebLoaderClient::interactionOccurredWhileProcessUnresponsive):
2263         * UIProcess/WebLoaderClient.h:
2264         (WebLoaderClient):
2265         * UIProcess/WebPageProxy.cpp:
2266         (WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive):
2267         (WebKit):
2268         * UIProcess/WebPageProxy.h:
2269         (WebPageProxy):
2270         * UIProcess/WebProcessProxy.cpp:
2271         (WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive):
2272         (WebKit):
2273         * UIProcess/WebProcessProxy.h:
2274         (WebProcessProxy):
2275
2276 2012-04-17  Anders Carlsson  <andersca@apple.com>
2277
2278         Make sure that the layer hosting mode is kept up to date if it changes before the plug-in is initialized
2279         https://bugs.webkit.org/show_bug.cgi?id=84180
2280         <rdar://problem/11265113>
2281
2282         Reviewed by Andreas Kling.
2283
2284         * WebProcess/Plugins/PluginView.cpp:
2285         (WebKit::PluginView::setLayerHostingMode):
2286
2287 2012-04-17  Jer Noble  <jer.noble@apple.com>
2288
2289         Exiting full screen video brings the wrong Safari window to the foreground
2290         https://bugs.webkit.org/show_bug.cgi?id=83936
2291
2292         Reviewed by Adele Peterson.
2293
2294         Tell the original webView's window to makeKeyAndOrderFront once the exit
2295         animation completes.
2296
2297         * UIProcess/mac/WKFullScreenWindowController.mm:
2298         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2299
2300 2012-04-17  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2301
2302         [EFL][WK2] Fix build break when FULLSCREEN_API is enabled.
2303         https://bugs.webkit.org/show_bug.cgi?id=84142
2304
2305         Reviewed by Martin Robinson.
2306
2307         Create a cpp file needed to build EFL port with FULLSCREEN_API.
2308
2309         * PlatformEfl.cmake: Added WebFullScreenManagerProxyEfl.cpp to build list.
2310         * UIProcess/WebFullScreenManagerProxy.h:
2311         (WebKit):
2312         * UIProcess/efl/WebFullScreenManagerProxyEfl.cpp: Added.
2313         (WebKit):
2314         (WebKit::WebFullScreenManagerProxy::invalidate):
2315         (WebKit::WebFullScreenManagerProxy::close):
2316         (WebKit::WebFullScreenManagerProxy::isFullScreen):
2317         (WebKit::WebFullScreenManagerProxy::enterFullScreen):
2318         (WebKit::WebFullScreenManagerProxy::exitFullScreen):
2319         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
2320         (WebKit::WebFullScreenManagerProxy::beganExitFullScreen):
2321
2322 2012-04-17  Andras Becsi  <andras.becsi@nokia.com>
2323
2324         [Qt][WK2] Refactor the gesture recognizers
2325         https://bugs.webkit.org/show_bug.cgi?id=83044
2326
2327         Reviewed by Kenneth Rohde Christiansen and Simon Hausmann.
2328
2329         This patch implements a simple decision tree in the web page event handler
2330         on the basis of how many active touch points the current touch event has.
2331
2332         Active touch points are pressed, moved or stationary and the number of these
2333         fully determine which gesture recognizer should be updated, cancelled or
2334         finished.
2335
2336         This new structure makes the internal states of the pinch and pan gesture
2337         recognizers independent from the event type, thus makes it possible to handle
2338         the transitions between these gestures in one centralized place which reduces
2339         code duplication and complexity and fixes some issues regarding incorrectly
2340         handled transitions.
2341
2342         * UIProcess/qt/QtPanGestureRecognizer.cpp:
2343         (WebKit::QtPanGestureRecognizer::update):
2344         (WebKit::QtPanGestureRecognizer::finish):
2345         (WebKit):
2346         (WebKit::QtPanGestureRecognizer::cancel):
2347         * UIProcess/qt/QtPanGestureRecognizer.h:
2348         (QtPanGestureRecognizer):
2349         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
2350         (WebKit):
2351         (WebKit::QtPinchGestureRecognizer::update):
2352         (WebKit::QtPinchGestureRecognizer::finish):
2353         * UIProcess/qt/QtPinchGestureRecognizer.h:
2354         (QtPinchGestureRecognizer):
2355         * UIProcess/qt/QtTapGestureRecognizer.cpp:
2356         (WebKit::QtTapGestureRecognizer::withinDistance):
2357         (WebKit::QtTapGestureRecognizer::update):
2358         (WebKit::QtTapGestureRecognizer::cancel):
2359         (WebKit):
2360         (WebKit::QtTapGestureRecognizer::singleTapTimeout):
2361         (WebKit::QtTapGestureRecognizer::tapAndHoldTimeout):
2362         (WebKit::QtTapGestureRecognizer::reset):
2363         * UIProcess/qt/QtTapGestureRecognizer.h:
2364         (QtTapGestureRecognizer):
2365         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2366         (WebKit):
2367         * UIProcess/qt/QtViewportInteractionEngine.h:
2368         (QtViewportInteractionEngine):
2369         * UIProcess/qt/QtWebPageEventHandler.cpp:
2370         (QtWebPageEventHandler::resetGestureRecognizers):
2371         (QtWebPageEventHandler::doneWithTouchEvent):
2372
2373 2012-04-17  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2374
2375         REGRESSION(r113172) Wheel events are scrolling inversed.
2376         https://bugs.webkit.org/show_bug.cgi?id=84156
2377
2378         Reviewed by Simon Hausmann.
2379
2380         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2381         (WebKit::QtViewportInteractionEngine::wheelEvent):
2382
2383 2012-04-17  Balazs Kelemen  <kbalazs@webkit.org>
2384
2385         [Qt] Unreviewed ARM build fix
2386
2387         * PluginProcess/qt/PluginProcessMainQt.cpp:
2388         (WebKit::PluginProcessMain): Export this function.
2389
2390 2012-04-17  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2391
2392         [Qt] Zoom out on second double-tap.
2393         https://bugs.webkit.org/show_bug.cgi?id=84145
2394
2395         Reviewed by Simon Hausmann.
2396
2397         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2398         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
2399         (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
2400         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
2401         * UIProcess/qt/QtViewportInteractionEngine.h:
2402         (QtViewportInteractionEngine):
2403
2404 2012-04-17  Mariusz Grzegorczyk  <mariusz.g@samsung.com>
2405
2406         [EFL][WK2] Fix build break when CONTEXT_MENUS is disabled.
2407         https://bugs.webkit.org/show_bug.cgi?id=83285
2408
2409         Reviewed by Ryosuke Niwa.
2410
2411         Surround code related to context menu with ENABLE(CONTEXT_MENUS) macro.
2412         Add dummy functions for public API implementation related to context menu.
2413
2414         * Shared/API/c/WKContextMenuItem.cpp:
2415         (WKContextMenuItemGetTypeID):
2416         (WKContextMenuItemCreateAsAction):
2417         (WKContextMenuItemCreateAsCheckableAction):
2418         (WKContextMenuItemCreateAsSubmenu):
2419         (WKContextMenuItemSeparatorItem):
2420         (WKContextMenuItemGetTag):
2421         (WKContextMenuItemGetType):
2422         (WKContextMenuItemCopyTitle):
2423         (WKContextMenuItemGetEnabled):
2424         (WKContextMenuItemGetChecked):
2425         (WKContextMenuCopySubmenuItems):
2426         (WKContextMenuItemGetUserData):
2427         (WKContextMenuItemSetUserData):
2428         * Shared/WebContextMenuItem.cpp:
2429         * Shared/WebContextMenuItem.h:
2430         * Shared/WebContextMenuItemData.cpp:
2431         * Shared/WebContextMenuItemData.h:
2432         * UIProcess/API/C/WKPage.cpp:
2433         (WKPageSetPageContextMenuClient):
2434         * UIProcess/WebPageContextMenuClient.cpp:
2435         * UIProcess/WebPageContextMenuClient.h:
2436         * UIProcess/WebPageProxy.cpp:
2437         (WebKit):
2438         * UIProcess/WebPageProxy.h:
2439         (WebPageProxy):
2440         * UIProcess/WebPageProxy.messages.in:
2441         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2442         (WKBundlePageSetContextMenuClient):
2443         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
2444         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
2445         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2446         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
2447         * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
2448         * WebProcess/WebPage/WebContextMenu.cpp:
2449         * WebProcess/WebPage/WebContextMenu.h:
2450         * WebProcess/WebPage/WebPage.cpp:
2451         (WebKit::WebPage::WebPage):
2452         (WebKit):
2453         (WebKit::handleMouseEvent):
2454         (WebKit::WebPage::mouseEvent):
2455         * WebProcess/WebPage/WebPage.h:
2456         (WebPage):
2457         * WebProcess/WebPage/WebPage.messages.in:
2458
2459 2012-04-16  Ryuan Choi  <ryuan.choi@samsung.com>
2460
2461         [EFL][WK2] Add missing files to build webkit2/Efl.
2462         https://bugs.webkit.org/show_bug.cgi?id=76139
2463
2464         Reviewed by Ryosuke Niwa.
2465
2466         Add missing files needed to build webkit2/Efl.
2467
2468         * Shared/efl/PlatformCertificateInfo.h: Added.
2469         (WebKit):
2470         (PlatformCertificateInfo):
2471         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
2472         (WebKit::PlatformCertificateInfo::encode):
2473         (WebKit::PlatformCertificateInfo::decode):
2474         * UIProcess/Launcher/efl/ThreadLauncherEfl.cpp: Added.
2475         (WebKit):
2476         (WebKit::ThreadLauncher::createWebThread):
2477
2478 2012-04-16  Brady Eidson  <beidson@apple.com>
2479
2480         Followup to http://trac.webkit.org/changeset/114323
2481
2482         For more correctness, actually include an autorelease pool instead of cleverly trying to avoid its use.
2483
2484         Reviewed by Mark Rowe.
2485
2486         * PluginProcess/mac/PluginProcessMainMac.mm:
2487         (WebKit::PluginProcessMain): 
2488
2489 2012-04-16  Brady Eidson  <beidson@apple.com>
2490
2491         <rdar://problem/11238965> Leak in Plugin Process when launched 32-bit
2492
2493         Reviewed by Jessie Berlin.
2494
2495         * PluginProcess/mac/PluginProcessMainMac.mm:
2496         (WebKit::PluginProcessMain): alloc/init an NSDictionary then release it, instead of leaking an autoreleased one.
2497
2498 2012-04-16  Anders Carlsson  <andersca@apple.com>
2499
2500         Nightly Back/Forward no longer calls plug-in's NPP_NewStream
2501         https://bugs.webkit.org/show_bug.cgi?id=83805
2502         <rdar://problem/11238748>
2503
2504         Reviewed by Simon Fraser.
2505
2506         When a page with a full-frame plug-in is restored from the page cache, it needs to re-fetch the plug-in stream.
2507
2508         Fix this by breaking the assumption that a plug-in will always get its data from WebCore if it's a full-frame plug-in;
2509         instead it only get its data from WebCore if it's a full-frame plug-in that's not being restored from the page cache.
2510         
2511         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2512         (WebKit::NetscapePlugin::NetscapePlugin):
2513         Rename m_loadManually to m_shouldUseManualLoader.
2514
2515         (WebKit::NetscapePlugin::initialize):
2516         Get the mode from parameters.isFullFramePlugin instead.
2517
2518         (WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
2519         (WebKit::NetscapePlugin::manualStreamDidReceiveData):
2520         (WebKit::NetscapePlugin::manualStreamDidFinishLoading):
2521         (WebKit::NetscapePlugin::manualStreamDidFail):
2522         Rename m_loadManually to m_shouldUseManualLoader.
2523
2524         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2525         Rename m_loadManually to m_shouldUseManualLoader.
2526
2527         * WebProcess/Plugins/Plugin.cpp:
2528         (WebKit::Plugin::Parameters::encode):
2529         (WebKit::Plugin::Parameters::decode):
2530         * WebProcess/Plugins/Plugin.h:
2531         (Parameters):
2532         Add an extra isFullFramePlugin parameter, and rename loadManually to shouldUseManualLoader.
2533
2534         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2535         (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
2536         Initialize m_frameCameFromPageCache.
2537
2538         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
2539         Set m_frameCameFromPageCache to true.
2540
2541         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2542         Set m_frameCameFromPageCache to false.
2543
2544         (WebKit::WebFrameLoaderClient::createPlugin):
2545         Initialize isFullFramePlugin and shouldUseManualLoader.
2546
2547 2012-04-16  Alexey Proskuryakov  <ap@apple.com>
2548
2549         EndPrinting message should be sent synchronously when printing was initiated from DOM.
2550         https://bugs.webkit.org/show_bug.cgi?id=84049
2551         <rdar://problem/11096575>
2552
2553         Reviewed by Oliver Hunt.
2554
2555         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::printFrame): When printing is
2556         initiated by WebProcess, all messages from UI process are sent synchronously to
2557         avoid being queued, and so should EndPrinting.
2558
2559 2012-04-16  Brady Eidson  <beidson@apple.com>
2560
2561         <rdar://problem/11249336> and https://bugs.webkit.org/show_bug.cgi?id=84050
2562         WebKit2 back/forward items in the page cache are never removed when the page is closed
2563
2564         Reviewed by Jessie Berlin and unofficially reviewed by Jon Lee.
2565
2566         Individual WebBackForwardListProxy's had no idea which items are associated with them.
2567         This adds that association and makes sure the proxy removes all associated items from the PageCache when it closes.
2568
2569         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2570         (WebKit::WebBackForwardListProxy::removeItem): Remove the item from the PageCache in case it was in it.
2571         (WebKit::WebBackForwardListProxy::addItem): Add the item ID to this back/forward list's set of associated IDs.
2572         (WebKit::WebBackForwardListProxy::close): Remove each associated item from the PageCache.
2573         * WebProcess/WebPage/WebBackForwardListProxy.h:
2574
2575 2012-04-16  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2576
2577          [EFL][WK2] Fix build break in PageClientImpl.cpp.
2578          https://bugs.webkit.org/show_bug.cgi?=id=84034
2579
2580          Reviewed by Kenneth Rohde Christiansen.
2581
2582          Fixes typo in didChangeViewportProperites definition.
2583
2584          * UIProcess/API/efl/PageClientImpl.cpp:
2585          (WebKit::PageClientImpl::didChangeViewportProperties):
2586
2587 2012-04-16  Yael Aharon  <yael.aharon@nokia.com>
2588
2589         [Qt][WK2] Fixed elements position is wrong after zooming.
2590         https://bugs.webkit.org/show_bug.cgi?id=83981
2591
2592         Reviewed by Kenneth Rohde Christiansen.
2593
2594         Turn on the flag setFixedElementsLayoutRelativeToFrame. This causes fixed elements position to be calculated based on
2595         visibleWidth and visibleHeight. When zoom level grows, the visibleWidth and visibleHeight become smaller.
2596
2597         * WebProcess/WebPage/WebPage.cpp:
2598         (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
2599
2600 2012-04-16  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2601
2602         [Qt] Clean up how the interaction engine is making use of ViewportAttributes
2603         https://bugs.webkit.org/show_bug.cgi?id=83895
2604
2605         Reviewed by Simon Hausmann.
2606
2607         Refactor how the interaction engine is using the ViewportAttributes
2608         and get rid of the Contraints subclass.
2609
2610         Push the ViewportAttributes through to the QQuickWebViewPrivate class
2611         and add some default values in the case the Legacy view is used.
2612
2613         * UIProcess/API/qt/qquickwebview.cpp:
2614         (QQuickWebViewLegacyPrivate::QQuickWebViewLegacyPrivate):
2615         (QQuickWebViewFlickablePrivate::didChangeViewportProperties):
2616         * UIProcess/API/qt/qquickwebview_p_p.h:
2617         (QQuickWebViewPrivate):
2618         * UIProcess/API/qt/qwebviewportinfo.cpp:
2619         (QWebViewportInfo::QWebViewportInfo):
2620         (QWebViewportInfo::~QWebViewportInfo):
2621         (QWebViewportInfo::currentScale):
2622         (QWebViewportInfo::devicePixelRatio):
2623         (QWebViewportInfo::initialScale):
2624         (QWebViewportInfo::minimumScale):
2625         (QWebViewportInfo::maximumScale):
2626         (QWebViewportInfo::isScalable):
2627         (QWebViewportInfo::layoutSize):
2628         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2629         (WebKit::QtViewportInteractionEngine::cssScaleFromItem):
2630         (WebKit::QtViewportInteractionEngine::itemScaleFromCSS):
2631         (WebKit::QtViewportInteractionEngine::itemCoordFromCSS):
2632         (WebKit::QtViewportInteractionEngine::innerBoundedCSSScale):
2633         (WebKit::QtViewportInteractionEngine::outerBoundedCSSScale):
2634         (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
2635         (WebKit::QtViewportInteractionEngine::setCSSScaleBounds):
2636         (WebKit::QtViewportInteractionEngine::setCSSScale):
2637         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
2638         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
2639         (WebKit::QtViewportInteractionEngine::pinchGestureEnded):
2640         * UIProcess/qt/QtViewportInteractionEngine.h:
2641         (QtViewportInteractionEngine):
2642         (WebKit::QtViewportInteractionEngine::hadUserInteraction):
2643         (WebKit::QtViewportInteractionEngine::setAllowsUserScaling):
2644         (WebKit::QtViewportInteractionEngine::setContentToDevicePixelRatio):
2645
2646 2012-04-15  Carlos Garcia Campos  <cgarcia@igalia.com>
2647
2648         [GTK] Use GRefPtr to delete the default web context in WebKit2 GTK+
2649         https://bugs.webkit.org/show_bug.cgi?id=83752
2650
2651         Reviewed by Martin Robinson.
2652
2653         * UIProcess/API/gtk/WebKitWebContext.cpp:
2654         (createDefaultWebContext):
2655
2656 2012-04-13  Jer Noble  <jer.noble@apple.com>
2657
2658         Video at apple.com gets standard controls in addition to custom controls after returning from full screen
2659         https://bugs.webkit.org/show_bug.cgi?id=83939
2660
2661         Reviewed by Eric Carlson.
2662
2663         So that the media controls don't show up momentarily during full screen animations, call setAnimatingFullScreen(true)
2664         before calling will{Enter,Exit}FullScreen(), so that the CSS rule for full screen animation will be in effect
2665         immediately.
2666
2667         Similarly, call setAnimatingFullScreen(false) after calling did{Enter,Exit}FullScreen, so that the full screen media
2668         controls don't momentarily appear at the end of an animation.
2669
2670         * UIProcess/mac/WKFullScreenWindowController.mm:
2671         (-[WKFullScreenWindowController enterFullScreen:]):
2672         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
2673         (-[WKFullScreenWindowController exitFullScreen]):
2674         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2675
2676 2012-04-13  Anders Carlsson  <andersca@apple.com>
2677
2678         Make sure that we're using the right compiler for generating derived sources.
2679
2680         Rubber-stamped by Dan Bernstein.
2681
2682         * WebKit2.xcodeproj/project.pbxproj:
2683
2684 2012-04-13  Anders Carlsson  <andersca@apple.com>
2685
2686         Include the error if we fail to initialize the web process sandbox
2687         https://bugs.webkit.org/show_bug.cgi?id=83927
2688
2689         Reviewed by Alexey Proskuryakov.
2690
2691         * WebProcess/mac/WebProcessMac.mm:
2692         (WebKit::initializeSandbox):
2693
2694 2012-04-13  Brady Eidson  <beidson@apple.com>
2695
2696         <rdar://problem/11176921> and https://bugs.webkit.org/show_bug.cgi?id=83600
2697         Need WebKit2 API to notify whether history loads are in the page cache
2698
2699         - Add a new WKBundlePageLoaderClient callback allowing the bundle to be notified
2700           of back/forward navigations (and deny them if it chooses)
2701         - Add a new API to WKBundleBackForwardListItem to probe if the item is in the page cache.
2702
2703         Reviewed by Darin Adler.
2704
2705         Add the new WKBundleBackForwardListItem API:
2706         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
2707         (WKBundleBackForwardListItemIsInPageCache):
2708         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h:
2709         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
2710         (WebKit::InjectedBundleBackForwardListItem::isInPageCache):
2711
2712         Update the UI page loader client to allow for a user data object to be passed from the bundle:
2713         * UIProcess/API/C/WKPage.h:
2714         * UIProcess/WebLoaderClient.cpp:
2715         (WebKit::WebLoaderClient::shouldGoToBackForwardListItem): Update a comment typo.
2716         (WebKit::WebLoaderClient::willGoToBackForwardListItem): Update for the user data field.
2717         * UIProcess/WebLoaderClient.h:
2718         * UIProcess/WebPageProxy.cpp:
2719         (WebKit::WebPageProxy::willGoToBackForwardListItem):
2720         * UIProcess/WebPageProxy.h:
2721         * UIProcess/WebPageProxy.messages.in:
2722
2723         Add the new callback to the bundle loader client:
2724         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: 
2725         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2726         (WebKit::InjectedBundlePageLoaderClient::shouldGoToBackForwardListItem):
2727         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2728         (InjectedBundlePageLoaderClient):
2729
2730         Call the bundle client before doing anything else, possibly canceling the navigation:
2731         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2732         (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
2733
2734         * WebProcess/qt/QtBuiltinBundlePage.cpp:
2735         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage) Adopt new bundle client interface.
2736
2737 2012-04-13  Dinu Jacob  <dinu.jacob@nokia.com>
2738
2739         [Qt][WK2] Title in MiniBrowser is not updated for a page with no title
2740         https://bugs.webkit.org/show_bug.cgi?id=82483
2741
2742         Reviewed by Noam Rosenthal.
2743
2744         This fixes API tests broken by r113715.
2745
2746         * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
2747         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
2748         * UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml:
2749
2750 2012-04-13  Sheriff Bot  <webkit.review.bot@gmail.com>
2751
2752         Unreviewed, rolling out r113714.
2753         http://trac.webkit.org/changeset/113714
2754         https://bugs.webkit.org/show_bug.cgi?id=83887
2755
2756         It is behaving strange on the bots and needs more
2757         investigation. (Requested by jeez_ on #webkit).
2758
2759         * UIProcess/qt/QtPageClient.cpp:
2760         (QtPageClient::isViewWindowActive):
2761
2762 2012-04-12  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2763
2764         [Qt] Use QQuickFlickable::setPixelAligned instead of doing pixel-alignment when rendering.
2765         https://bugs.webkit.org/show_bug.cgi?id=83770
2766
2767         Reviewed by Kenneth Rohde Christiansen.
2768
2769         - Do the alignment on the highest level as possible: the QQuickFlickable content item
2770           position. It already supports this with setPixelAligned which rounds the content item's position.
2771         - Also move the setClip(true) to the common constructor as this constructor is currently only used by WTR.
2772         - Remove setFlags(QQuickItem::ItemClipsChildrenToShape) as it is redundant with setClip(true).
2773
2774         * UIProcess/API/qt/qquickwebview.cpp:
2775         (QQuickWebViewPrivate::QQuickWebViewPrivate):
2776         (QQuickWebView::QQuickWebView):
2777
2778 2012-04-12  Alexey Proskuryakov  <ap@apple.com>
2779
2780         Preprocessing text files with modern clang treats double slashes in comments
2781         https://bugs.webkit.org/show_bug.cgi?id=83827
2782
2783         Reviewed by Mark Rowe.
2784
2785         * DerivedSources.make: Pass appropriate flags to both llvm and gcc.
2786
2787 2012-04-12  Brent Fulgham  <bfulgham@webkit.org>
2788
2789         [WinCairo] Build fix after Windows export definition file change.
2790
2791         * win/WebKit2CFLite.def: This file needs to be kept in sync with
2792         WebKit2.def (aside from the WebKitInterface exports.)
2793
2794 2012-04-12  Bear Travis  <betravis@adobe.com>
2795
2796         [CSS Exclusions] Add flag to enable / disable exclusions at runtime
2797         https://bugs.webkit.org/show_bug.cgi?id=83313
2798
2799         Reviewed by Ryosuke Niwa.
2800
2801         Adding windows symbols
2802
2803         * win/WebKit2.def:
2804         * win/WebKit2CFLite.def:
2805
2806 2012-04-12  Yael Aharon  <yael.aharon@nokia.com>
2807
2808         [Qt][WK2] Nested fixed elements scroll too fast
2809         https://bugs.webkit.org/show_bug.cgi?id=83720
2810
2811         Reviewed by Noam Rosenthal.
2812
2813         Set the fixedToViewport flag on the fixed position layers and adjust to
2814         the new function name for setting scrollPositionDelta.
2815
2816         * UIProcess/WebLayerTreeRenderer.cpp:
2817         (WebKit::WebLayerTreeRenderer::adjustPositionForFixedLayers):
2818         (WebKit::WebLayerTreeRenderer::setLayerState):
2819
2820 2012-04-12  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2821
2822         Move viewport meta handling to the web process side
2823         https://bugs.webkit.org/show_bug.cgi?id=83771
2824
2825         Reviewed by Simon Hausmann.
2826
2827         Instead of computing the viewport attributes on both sides,
2828         we now do everything on the web process side, and just send
2829         over the computed result.
2830
2831         * Scripts/webkit2/messages.py:
2832         (struct_or_class):
2833         (headers_for_type):
2834         * Shared/WebCoreArgumentCoders.cpp:
2835         (CoreIPC::::encode):
2836         (CoreIPC::::decode):
2837         * Shared/WebCoreArgumentCoders.h:
2838         (WebCore):
2839         * UIProcess/API/efl/PageClientImpl.cpp:
2840         (WebKit::PageClientImpl::didChangeViewportProperties):
2841         * UIProcess/API/efl/PageClientImpl.h:
2842         (PageClientImpl):
2843         * UIProcess/API/gtk/PageClientImpl.cpp:
2844         (WebKit::PageClientImpl::didChangeViewportProperties):
2845         * UIProcess/API/gtk/PageClientImpl.h:
2846         (PageClientImpl):
2847         * UIProcess/API/mac/PageClientImpl.h:
2848         (PageClientImpl):
2849         * UIProcess/API/mac/PageClientImpl.mm:
2850         (WebKit::PageClientImpl::didChangeViewportProperties):
2851         * UIProcess/API/qt/qquickwebview.cpp:
2852         (QQuickWebViewPrivate::didRelaunchProcess):
2853         (QQuickWebViewFlickablePrivate::didChangeViewportProperties):
2854         (QQuickWebViewFlickablePrivate::updateViewportSize):
2855         * UIProcess/API/qt/qquickwebview_p_p.h:
2856         (QQuickWebViewPrivate::didChangeViewportProperties):
2857         (QQuickWebViewPrivate):
2858         (QQuickWebViewFlickablePrivate):
2859         * UIProcess/PageClient.h:
2860         (WebCore):
2861         (PageClient):
2862         * UIProcess/WebPageProxy.cpp:
2863         (WebKit::WebPageProxy::didChangeViewportProperties):
2864         * UIProcess/WebPageProxy.h:
2865         (WebCore):
2866         (WebPageProxy):
2867         * UIProcess/WebPageProxy.messages.in:
2868         * UIProcess/qt/QtPageClient.cpp:
2869         (QtPageClient::didChangeViewportProperties):
2870         * UIProcess/qt/QtPageClient.h:
2871         (QtPageClient):
2872         * UIProcess/win/WebView.cpp:
2873         (WebKit::WebView::didChangeViewportProperties):
2874         * UIProcess/win/WebView.h:
2875         (WebView):
2876         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2877         (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
2878         (WebKit):
2879         * WebProcess/WebPage/WebPage.cpp:
2880         (WebKit::WebPage::sendViewportAttributesChanged):
2881         (WebKit):
2882         (WebKit::WebPage::setViewportSize):
2883         * WebProcess/WebPage/WebPage.h:
2884         (WebPage):
2885
2886 2012-04-12  Zalan Bujtas  <zbujtas@gmail.com>
2887
2888         [Qt][WK2] Zoom gesture with double tap crashes on iframe when main frame has scroll offset.
2889         https://bugs.webkit.org/show_bug.cgi?id=83428
2890
2891         Reviewed by Kenneth Rohde Christiansen.
2892
2893         When delegate scrolling is on, the frame view needs to ignore scrolling offset when converting
2894         coordinates. It is already done at ScrollView base class and this patch copies the logic to the
2895         FrameView subclass.
2896         Also make sure that TouchAdjustment's findBest*() functions' return value are not ignored by the caller.
2897
2898         * WebProcess/WebPage/WebPage.cpp:
2899         (WebKit::WebPage::highlightPotentialActivation):
2900         (WebKit::WebPage::findZoomableAreaForPoint):
2901
2902 2012-04-11  Andy Estes  <aestes@apple.com>
2903
2904         Remove an autorelease pool made redundant by r113923.
2905         https://bugs.webkit.org/show_bug.cgi?id=83730
2906
2907         Reviewed by Dan Bernstein.
2908         
2909         Remove flushLayer()'s autorelease pool, since one now exists in the
2910         call frame above it (in LayerFlushScheduler::runLoopObserverCallback()).
2911
2912         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
2913         (WebKit::LayerTreeHostCAMac::flushLayers):
2914
2915 2012-04-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2916
2917         [GTK] Initial cookies API for WebKit2 GTK+ API
2918         https://bugs.webkit.org/show_bug.cgi?id=82441
2919
2920         Reviewed by Gustavo Noronha Silva.
2921
2922         * GNUmakefile.am: Add new files to compilation.
2923         * UIProcess/API/gtk/WebKitCookieManager.cpp: Added.
2924         (webkit_cookie_manager_init):
2925         (webkitCookieManagerFinalize):
2926         (webkit_cookie_manager_class_init):
2927         (webkitCookieManagerCreate): Create a new WebKitCookieManager for
2928         the given WKCookieManagerRef.
2929         (webkit_cookie_manager_set_accept_policy): Set the cookie
2930         acceptance policy.
2931         (webkitCookieManagerGetAcceptPolicyCallback): Callback called by
2932         the C API when the cookie acceptance policy has been received.
2933         (webkit_cookie_manager_get_accept_policy): Asynchronously get the
2934         cookie acceptance policy.
2935         (webkit_cookie_manager_get_accept_policy_finish): Finish async
2936         operation started by webkit_cookie_manager_get_accept_policy()
2937         returning the cookie acceptance policy.
2938         (webkitCookieManagerGetDomainsWithCookiesCallback): Callback
2939         called by the C API when the list of hostnames with cookies has
2940         been received.
2941         (webkit_cookie_manager_get_domains_with_cookies): Asynchronously
2942         get the list of domains with cookies.
2943         (webkit_cookie_manager_get_domains_with_cookies_finish): Finish
2944         async operation started by
2945         webkit_cookie_manager_get_domains_with_cookies() returning the
2946         list of domains.
2947         (webkit_cookie_manager_delete_cookies_for_domain): Delete all
2948         cookies for the given domain.
2949         (webkit_cookie_manager_delete_all_cookies): Delete all cookies.
2950         * UIProcess/API/gtk/WebKitCookieManager.h: Added.
2951         * UIProcess/API/gtk/WebKitCookieManagerPrivate.h: Added.
2952         * UIProcess/API/gtk/WebKitWebContext.cpp:
2953         (webkit_web_context_get_cookie_manager): Get the
2954         WebKitCookieManager associated with the web context.
2955         * UIProcess/API/gtk/WebKitWebContext.h:
2956         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new chapter for
2957         WebKitCookieManager.
2958         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
2959         * UIProcess/API/gtk/docs/webkit2gtk.types: Add
2960         webkit_cookie_manager_get_type.
2961         * UIProcess/API/gtk/tests/GNUmakefile.am:
2962         * UIProcess/API/gtk/tests/TestCookieManager.cpp: Added.
2963         (testCookieManagerAcceptPolicy):
2964         (testCookieManagerDeleteCookies):
2965         (serverCallback):
2966         (beforeAll):
2967         (afterAll):
2968         * UIProcess/API/gtk/webkit2.h: Include WebKitCookieManager.h.
2969
2970 2012-04-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2971
2972         [Qt] InspectorServer: Add an API level auto test
2973         https://bugs.webkit.org/show_bug.cgi?id=83594
2974
2975         Reviewed by Kenneth Rohde Christiansen.
2976
2977         This tests InspectorServer and WebSocketServer.
2978
2979         * UIProcess/API/qt/tests/inspectorserver/inspectorserver.pro: Added.
2980         * UIProcess/API/qt/tests/inspectorserver/tst_inspectorserver.cpp: Added.
2981         (tst_InspectorServer):
2982         (tst_InspectorServer::tst_InspectorServer):
2983         (tst_InspectorServer::prepareWebViewComponent):
2984         (tst_InspectorServer::newWebView):
2985         (tst_InspectorServer::init):
2986         (tst_InspectorServer::cleanup):
2987         (tst_InspectorServer::webView):
2988         (tst_InspectorServer::fetchPageList):
2989         (tst_InspectorServer::testPageList): This tests that pages with developerExtrasEnabled appear available for inspection.
2990         (tst_InspectorServer::testRemoteDebuggingMessage): This tests a web socket connection using a raw inspector command.
2991         (tst_InspectorServer::openRemoteDebuggingSession): This tests the whole pipeline by starting a remote inspection session.
2992         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2993         (tst_QQuickWebView):
2994         (tst_QQuickWebView::prepareWebViewComponent):
2995         * UIProcess/API/qt/tests/tests.pri:
2996         * UIProcess/API/qt/tests/util.cpp:
2997         (LoadStartedCatcher::LoadStartedCatcher):
2998         (LoadStartedCatcher::onLoadingChanged):
2999         * UIProcess/API/qt/tests/util.h:
3000         (LoadStartedCatcher):
3001
3002 2012-04-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3003
3004         [Qt] InspectorServer: Improve the JSON page list's parameter names
3005         https://bugs.webkit.org/show_bug.cgi?id=83592
3006
3007         Reviewed by Simon Hausmann.
3008
3009         - Add "id" that would be needed to build the URL when using local front-end resources
3010           (and will be used by tests)
3011         - Rename description to "title", the description contains both the title and URL on the final list
3012         - Rename inspectorLocation to "inspectorUrl" to match with the url parameter.
3013
3014         * UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp:
3015         (WebKit::WebInspectorServer::buildPageList):
3016         * qt/Resources/inspectorPageIndex.html:
3017
3018 2012-04-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3019
3020         [Qt] Fix issues when using the WebView as ShaderEffectSource
3021         https://bugs.webkit.org/show_bug.cgi?id=83587
3022
3023         Reviewed by Noam Rosenthal.
3024
3025         Qt is going to mirror the projection matrix when the shader effect source
3026         is grabbed. Detect that the matrix is mirrored and pass on this information
3027         to TextureMapper so that it can do the same.
3028
3029         * UIProcess/WebLayerTreeRenderer.cpp:
3030         (WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
3031         * UIProcess/WebLayerTreeRenderer.h:
3032         (WebLayerTreeRenderer):
3033         * UIProcess/qt/QtWebPageSGNode.cpp:
3034         (WebKit::ContentsSGNode::render):
3035
3036 2012-04-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3037
3038         [Qt] Remove unnecessary rendering code
3039         https://bugs.webkit.org/show_bug.cgi?id=83591
3040
3041         Reviewed by Noam Rosenthal.
3042
3043         - Remove code that isn't needed since the introduction of WebLayerTreeRenderer
3044         - Remove TextureMapper::bindSurface(0) calls following beginPainting, which calls it itself.
3045
3046         * UIProcess/API/qt/qquickwebpage.cpp:
3047         (QQuickWebPagePrivate::paint):
3048         * UIProcess/API/qt/qquickwebpage_p_p.h:
3049         (QQuickWebPagePrivate):
3050         * UIProcess/DrawingAreaProxy.h:
3051         * UIProcess/DrawingAreaProxyImpl.cpp:
3052         * UIProcess/DrawingAreaProxyImpl.h:
3053         (DrawingAreaProxyImpl):
3054         * UIProcess/LayerTreeHostProxy.cpp:
3055         * UIProcess/LayerTreeHostProxy.h:
3056         (LayerTreeHostProxy):
3057         * UIProcess/WebLayerTreeRenderer.cpp:
3058         (WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
3059         (WebKit::WebLayerTreeRenderer::paintToGraphicsContext):
3060
3061 2012-04-10  Carlos Garcia Campos  <cgarcia@igalia.com>
3062
3063         Unreviewed. Fix make distcheck issues.
3064
3065         * GNUmakefile.am: Add missing header file.
3066
3067 2012-04-10  Mark Rowe  <mrowe@apple.com>
3068
3069         <rdar://problem/10583749> WebKit2 should log to both ASL and stderr
3070
3071         Replace direct calls to fprintf stderr with calls to WTFLogAlways.
3072
3073         Reviewed by Sam Weinig.
3074
3075         * PluginProcess/mac/PluginProcessMainMac.mm:
3076         (WebKit::PluginProcessMain):
3077         * UIProcess/WebProcessProxy.cpp:
3078         (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):
3079         (WebKit::WebProcessProxy::didReceiveInvalidMessage):
3080         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
3081         (WebKit::InjectedBundle::load):
3082         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
3083         (readSandboxProfile):
3084         (WKN_EnterSandbox):
3085         * WebProcess/mac/WebProcessMac.mm:
3086         (WebKit::initializeSandbox):
3087         * WebProcess/mac/WebProcessMainMac.mm:
3088         (WebKit::WebProcessMain):
3089
3090 2012-04-10  Yael Aharon  <yael.aharon@nokia.com>
3091
3092         Unreviewed build fix after r113791.
3093
3094         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3095         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
3096
3097 2012-04-10  Yael Aharon  <yael.aharon@nokia.com>
3098
3099         Initial support for fixed position elements in Qt WebKit2
3100         https://bugs.webkit.org/show_bug.cgi?id=81786
3101
3102         Reviewed by Noam Rosenthal.
3103
3104         Turn on the flag acceleratedCompositingForFixedPositionEnabled when using fixed layout.
3105         As we scroll, we keep track of the delta in scroll position between the UI and web processes,
3106         and adjust the position of all the fixed layers by that delta.
3107         When WebLayerTreeRenderer receives a new scroll position from the web process, it keeps it as pending,
3108         and commit the new scroll position in flushLayerChanges.
3109         This patch does not address scrolling overshoot and it does not fix the wrong positioning
3110         that occurs when we zoom. These issues will be addressed in future patches.
3111
3112         * Shared/WebLayerTreeInfo.h:
3113         * UIProcess/API/qt/qquickwebpage.cpp:
3114         (QQuickWebPagePrivate::updateSize):
3115         * UIProcess/LayerTreeHostProxy.cpp:
3116         (WebKit::LayerTreeHostProxy::setContentsSize):
3117         (WebKit):
3118         (WebKit::LayerTreeHostProxy::renderNextFrame):
3119         (WebKit::LayerTreeHostProxy::didChangeScrollPosition):
3120         * UIProcess/LayerTreeHostProxy.h:
3121         (LayerTreeHostProxy):
3122         * UIProcess/LayerTreeHostProxy.messages.in:
3123         * UIProcess/WebLayerTreeRenderer.cpp:
3124         (WebKit::boundedScrollPosition):
3125         (WebKit):
3126         (WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
3127         (WebKit::WebLayerTreeRenderer::setContentsSize):
3128         (WebKit::WebLayerTreeRenderer::adjustPositionForFixedLayers):
3129         (WebKit::WebLayerTreeRenderer::didChangeScrollPosition):
3130         (WebKit::WebLayerTreeRenderer::syncLayerParameters):
3131         (WebKit::WebLayerTreeRenderer::deleteLayer):
3132         (WebKit::WebLayerTreeRenderer::flushLayerChanges):
3133         * UIProcess/WebLayerTreeRenderer.h:
3134         (WebLayerTreeRenderer):
3135         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3136         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
3137         (WebCore::WebGraphicsLayer::syncCompositingState):
3138         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
3139         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
3140         (WebGraphicsLayerClient):
3141         (WebCore::WebGraphicsLayer::fixedToViewport):
3142         (WebCore::WebGraphicsLayer::setFixedToViewport):
3143         (WebGraphicsLayer):
3144         * WebProcess/WebPage/WebPage.cpp:
3145         (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
3146         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
3147         (WebKit::LayerTreeHostQt::LayerTreeHostQt):
3148         (WebKit::LayerTreeHostQt::didSyncCompositingStateForLayer):
3149         (WebKit::updateOffsetFromViewportForSelf):
3150         (WebKit):
3151         (WebKit::updateOffsetFromViewportForLayer):
3152         (WebKit::LayerTreeHostQt::syncFixedLayers):
3153         (WebKit::LayerTreeHostQt::setVisibleContentsRect):
3154         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
3155         (LayerTreeHostQt):
3156
3157 2012-04-10  Anders Carlsson  <andersca@apple.com>
3158
3159         Fix fast/images/exif-orientation.html WebKitTestRunner failure
3160         https://bugs.webkit.org/show_bug.cgi?id=83627
3161
3162         Reviewed by Sam Weinig.
3163
3164         Handle overriding the WebKitShouldRespectImageOrientation preference.
3165
3166         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3167         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3168
3169 2012-04-10  No'am Rosenthal  <noam.rosenthal@nokia.com>
3170
3171         [Qt][WK2] Manage graphics buffers in the web process
3172         https://bugs.webkit.org/show_bug.cgi?id=78675
3173
3174         Added ShareableSurface, a class allowing the use of GPU-enabled
3175         surfaces for bitmap transfer between the web and UI processes.
3176         Since GraphicsSurfaces may not always be available, ShareableSurface
3177         uses a standard ShareableBitmap as a fallback backend.
3178
3179         The necessary plumbing was added in WebKit2 for passing updates via
3180         ShareableSurfaces instead of ShareableBitmaps. SurfaceUpdateInfo was
3181         added, as to not make UpdateInfo more complicated.
3182
3183         Reviewed by Kenneth Rohde Christiansen.
3184
3185         * Shared/ShareableSurface.cpp: Added.
3186         * Shared/ShareableSurface.h: Added.
3187         * Shared/SurfaceUpdateInfo.cpp: Added.
3188         * Shared/SurfaceUpdateInfo.h: Added.
3189         * Target.pri:
3190         * UIProcess/LayerTreeHostProxy.cpp:
3191         (WebKit::LayerTreeHostProxy::createTileForLayer):
3192         (WebKit::LayerTreeHostProxy::updateTileForLayer):
3193         * UIProcess/LayerTreeHostProxy.h:
3194         (LayerTreeHostProxy):
3195         * UIProcess/LayerTreeHostProxy.messages.in:
3196         * UIProcess/WebLayerTreeRenderer.cpp:
3197         (WebKit::WebLayerTreeRenderer::updateTile):
3198         * UIProcess/WebLayerTreeRenderer.h:
3199         (TileUpdate):
3200         (WebKit::WebLayerTreeRenderer::TileUpdate::TileUpdate):
3201         * UIProcess/qt/LayerBackingStore.cpp:
3202         (WebKit::LayerBackingStoreTile::swapBuffers):
3203         (WebKit::LayerBackingStoreTile::setBackBuffer):
3204         (WebKit::LayerBackingStore::updateTile):
3205         * UIProcess/qt/LayerBackingStore.h:
3206         (LayerBackingStoreTile):
3207         (LayerBackingStore):
3208         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3209         (WebCore::WebGraphicsLayer::beginContentUpdate):
3210         (WebCore::WebGraphicsLayer::createTile):
3211         (WebCore::WebGraphicsLayer::updateTile):
3212         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
3213         (WebGraphicsLayerClient):
3214         (WebGraphicsLayer):
3215         * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
3216         (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
3217         * WebProcess/WebPage/TiledBackingStoreRemoteTile.h:
3218         (WebKit):
3219         (TiledBackingStoreRemoteTileClient):
3220         * WebProcess/WebPage/UpdateAtlas.cpp:
3221         (WebKit::UpdateAtlas::UpdateAtlas):
3222         (WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer):
3223         * WebProcess/WebPage/UpdateAtlas.h:
3224         (WebKit::UpdateAtlas::surface):
3225         (WebKit::UpdateAtlas::size):
3226         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
3227         (WebKit::LayerTreeHostQt::createTile):
3228         (WebKit::LayerTreeHostQt::updateTile):
3229         (WebKit::LayerTreeHostQt::beginContentUpdate):
3230         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
3231         (LayerTreeHostQt):
3232
3233 2012-04-10  Patrick Gansterer  <paroga@webkit.org>
3234
3235         [CMake] Enable USE_FOLDERS property
3236         https://bugs.webkit.org/show_bug.cgi?id=83571
3237
3238         Reviewed by Daniel Bates.
3239
3240         Setting the FOLDER property on targets gives more structure 
3241         to the generated Visual Studio solutions.
3242         This does not affect other CMake generators.
3243
3244         * CMakeLists.txt:
3245
3246 2012-04-10  Dinu Jacob  <dinu.jacob@nokia.com>
3247
3248         [Qt][WK2] Assertion failure on loading new page after panning/zooming
3249         https://bugs.webkit.org/show_bug.cgi?id=83049
3250
3251         Reviewed by Kenneth Rohde Christiansen.
3252
3253         When handling contents size change, set the visible content rectangle immediately,
3254         instead of animating to it.
3255
3256         * UIProcess/qt/QtViewportInteractionEngine.cpp:
3257         (WebKit::QtViewportInteractionEngine::itemSizeChanged):
3258
3259 2012-04-10  Dinu Jacob  <dinu.jacob@nokia.com>
3260
3261         [Qt][WK2] Title in MiniBrowser is not updated for a page with no title
3262         https://bugs.webkit.org/show_bug.cgi?id=82483
3263
3264         Reviewed by Kenneth Rohde Christiansen.
3265
3266         titleChanged signal is not emitted on comitting a new load.
3267
3268         * UIProcess/API/qt/tests/html/basic_page.html:
3269         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3270         (tst_QQuickWebView):
3271         (tst_QQuickWebView::titleUpdate):
3272         * UIProcess/qt/QtWebPageLoadClient.cpp:
3273         (QtWebPageLoadClient::didCommitLoadForFrame):
3274
3275 2012-04-10  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3276
3277         [Qt][WK2] Implement PageClient::isViewWindowActive()
3278         https://bugs.webkit.org/show_bug.cgi?id=81143
3279
3280         Reviewed by Kenneth Rohde Christiansen.
3281
3282         This patch implements PageClient::isViewWindowActive()
3283         now that QQuickCanvas::isActive() is available (from QWindow).
3284
3285         * UIProcess/qt/QtPageClient.cpp:
3286         (QtPageClient::isViewWindowActive):
3287
3288 2012-04-10  Philippe Normand <pnormand@igalia.com> and Carlos Garcia Campos  <cgarcia@igalia.com>
3289
3290         [WK2][GTK] FullScreen signals
3291         https://bugs.webkit.org/show_bug.cgi?id=76166
3292
3293         Reviewed by Gustavo Noronha Silva.
3294
3295         * GNUmakefile.am: Add new files to compilation.
3296         * UIProcess/API/C/gtk/WKFullScreenClientGtk.cpp:
3297         (WKViewSetFullScreenClientGtk): Initialize WebKitWebViewBase
3298         fullscreen client.
3299         * UIProcess/API/C/gtk/WKFullScreenClientGtk.h:
3300         * UIProcess/API/gtk/WebKitFullscreenClient.cpp: Added.
3301         (willEnterFullScreen): Call webkitWebViewEnterFullScreen().
3302         (willExitFullScreen): Call webkitWebViewLeaveFullScreen().
3303         (attachFullScreenClientToView): Initialize FullScreenClient adding
3304         implementations for willEnterFullScreen and willExitFullScreen callbacks.
3305         * UIProcess/API/gtk/WebKitFullscreenClient.h: Added.
3306         * UIProcess/API/gtk/WebKitPrivate.h:
3307         * UIProcess/API/gtk/WebKitWebView.cpp:
3308         (webkitWebViewConstructed): Attach fullscreen client to view.
3309         (webkit_web_view_class_init): Add WebKitWebView::enter-fullscreen
3310         and WebKitWebView::leave-fullscreen signals.
3311         (webkitWebViewEnterFullScreen): Emit
3312         WebKitWebView::enter-fullscreen signal.
3313         (webkitWebViewLeaveFullScreen): Emit
3314         WebKitWebView::leave-fullscreen signal.
3315         * UIProcess/API/gtk/WebKitWebView.h:
3316         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3317         (webkitWebViewBaseKeyPressEvent): Only return early when leaving
3318         fullscreen, otherwise let the view process the key pressed.
3319         (webkitWebViewBaseEnterFullScreen): Return early if
3320         willEnterFullScreen callback is handled and returns false.
3321         (webkitWebViewBaseExitFullScreen): Return early if
3322         willExitFullScreen callback is handled and returns false.
3323         (webkitWebViewBaseInitializeFullScreenClient): Initialize the
3324         fullscreen client.
3325         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
3326         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
3327         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
3328         (testWebViewFullScreen):
3329         (beforeAll):
3330         * UIProcess/API/gtk/tests/WebViewTest.cpp:
3331         (WebViewTest::keyStroke): Helper function to synthesize key
3332         press/release events.
3333         * UIProcess/API/gtk/tests/WebViewTest.h:
3334         * UIProcess/API/gtk/webkit2marshal.list:
3335         * UIProcess/gtk/WebFullScreenClientGtk.cpp:
3336         (WebKit::WebFullScreenClientGtk::willEnterFullScreen): Call
3337         willEnterFullScreen callback if defined.
3338         (WebKit::WebFullScreenClientGtk::willExitFullScreen): Call
3339         willExitFullScreen callback if defined.
3340         * UIProcess/gtk/WebFullScreenClientGtk.h:
3341
3342 2012-04-10  Patrick Gansterer  <paroga@webkit.org>
3343
3344         [CMake] Add missing source files to build system
3345
3346         * CMakeLists.txt:
3347
3348 2012-04-09  No'am Rosenthal  <noam.rosenthal@nokia.com>
3349
3350         [WK2] Enable using a single ShareableBitmap for multiple updates
3351         https://bugs.webkit.org/show_bug.cgi?id=83424
3352
3353         Reviewed by Kenneth Rohde Christiansen.
3354
3355         Enabled creating a GraphicsContext that references a rect inside ShareableBitmap.
3356         Added bitmapOffset to UpdateInfo, to allow updates to reference an offset inside the bitmap.
3357         Added UpdateAtlas, a class that manages available rects in a larger ShareableBitmap.
3358
3359         In this iteration, UpdateAtlas has a simple behavior where a rect inside the bitmap is
3360         either available or used. When the buffers are swapped, all used buffers become available
3361         again. A future enhancement might allow triple-buffering, where available rects can be
3362         updated while other rects from the same atlas are in use.
3363
3364         Added the necessary plumbing to allow Qt's UI-side compositing to take advantage of
3365         UpdateAtlas. LayerTreeHostQt creates an atlas per type of bitmap (i.e. one opaque and one
3366         alpha-enabled atlas). When a tile wants to update and there's no available scratch-buffer,
3367         the update would be postponed to the next frame, creating a tiling-artifact in low memory
3368         situations.
3369
3370         * Shared/UpdateInfo.cpp:
3371         (WebKit::UpdateInfo::encode):
3372         (WebKit::UpdateInfo::decode):
3373         * Shared/UpdateInfo.h:
3374         (UpdateInfo):
3375         * Target.pri:
3376         * UIProcess/LayerTreeHostProxy.cpp:
3377         (WebKit::LayerTreeHostProxy::updateTileForLayer):
3378         * UIProcess/WebLayerTreeRenderer.cpp:
3379         (WebKit::WebLayerTreeRenderer::syncLayerParameters):
3380         (WebKit::WebLayerTreeRenderer::updateTile):
3381         (WebKit::WebLayerTreeRenderer::createImage):
3382         * UIProcess/WebLayerTreeRenderer.h:
3383         (TileUpdate):
3384         (WebKit::WebLayerTreeRenderer::TileUpdate::TileUpdate):
3385         (WebLayerTreeRenderer):
3386         * UIProcess/qt/LayerBackingStore.cpp:
3387         (WebKit::LayerBackingStoreTile::swapBuffers):
3388         (WebKit::LayerBackingStoreTile::setBackBuffer):
3389         (WebKit::LayerBackingStore::createTile):
3390         * UIProcess/qt/LayerBackingStore.h:
3391         (LayerBackingStoreTile):
3392         (LayerBackingStore):
3393         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3394         (WebCore::WebGraphicsLayer::tiledBackingStoreBackgroundColor):
3395         (WebCore::WebGraphicsLayer::beginContentUpdate):
3396         (WebCore):
3397         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
3398         (WebGraphicsLayerClient):
3399         (WebGraphicsLayer):
3400         * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
3401         (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
3402         * WebProcess/WebPage/TiledBackingStoreRemoteTile.h:
3403         (TiledBackingStoreRemoteTileClient):
3404         * WebProcess/WebPage/UpdateAtlas.cpp: Added.
3405         (WebKit):
3406         (WebKit::UpdateAtlas::UpdateAtlas):
3407         (WebKit::nextPowerOfTwo):
3408         (WebKit::UpdateAtlas::buildLayoutIfNeeded):
3409         (WebKit::UpdateAtlas::findAvailableIndex):
3410         (WebKit::UpdateAtlas::didSwapBuffers):
3411         (WebKit::UpdateAtlas::acquireScratchBuffer):
3412         (WebKit::UpdateAtlas::offsetForIndex):
3413         * WebProcess/WebPage/UpdateAtlas.h: Added.
3414         (WebCore):
3415         (WebKit):
3416         (UpdateAtlas):
3417         (WebKit::UpdateAtlas::bitmap):
3418         (WebKit::UpdateAtlas::size):
3419         (WebKit::UpdateAtlas::flags):
3420         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
3421         (WebKit::LayerTreeHostQt::adoptImageBackingStore):
3422         (WebKit::LayerTreeHostQt::renderNextFrame):
3423         (WebKit::LayerTreeHostQt::purgeBackingStores):
3424         (WebKit):
3425         (WebKit::LayerTreeHostQt::getAtlas):
3426         (WebKit::LayerTreeHostQt::beginContentUpdate):
3427         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
3428         (LayerTreeHostQt):
3429
3430 2012-04-09  No'am Rosenthal  <noam.rosenthal@nokia.com>
3431
3432         [Qt][WK2] Sync the layer's state and the layer's children separately
3433         https://bugs.webkit.org/show_bug.cgi?id=82534
3434
3435         Reviewed by Kenneth Rohde Christiansen.
3436
3437         Switched the WebLayerInfo struct, which includes a single layer's state,
3438         to use only POD types that can be serialized via SimpleArgumentCoder.
3439         To allow POD-serialization, we serialize the children IDs in a seperate
3440         message (SetLayerChildren), and only when the tree layout has actually
3441         been modified.
3442
3443         * Shared/WebLayerTreeInfo.cpp:
3444         (WebKit::WebLayerInfo::encode):
3445         (WebKit::WebLayerInfo::decode):
3446         * Shared/WebLayerTreeInfo.h:
3447         (WebKit::WebLayerInfo::WebLayerInfo):
3448         * UIProcess/LayerTreeHostProxy.cpp:
3449         (WebKit::LayerTreeHostProxy::setCompositingLayerState):
3450         (WebKit):
3451         (WebKit::LayerTreeHostProxy::setCompositingLayerChildren):
3452         * UIProcess/LayerTreeHostProxy.h:
3453         (LayerTreeHostProxy):
3454         * UIProcess/LayerTreeHostProxy.messages.in:
3455         * UIProcess/WebLayerTreeRenderer.cpp:
3456         (WebKit::WebLayerTreeRenderer::setLayerChildren):
3457         (WebKit):
3458         (WebKit::WebLayerTreeRenderer::setLayerState):
3459         * UIProcess/WebLayerTreeRenderer.h:
3460         (WebLayerTreeRenderer):
3461         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3462         (WebCore::WebGraphicsLayer::didChangeLayerState):
3463         (WebCore):
3464         (WebCore::WebGraphicsLayer::didChangeChildren):
3465         (WebCore::WebGraphicsLayer::didChangeGeometry):
3466         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
3467         (WebCore::WebGraphicsLayer::setChildren):
3468         (WebCore::WebGraphicsLayer::addChild):
3469         (WebCore::WebGraphicsLayer::addChildAtIndex):
3470         (WebCore::WebGraphicsLayer::addChildAbove):
3471         (WebCore::WebGraphicsLayer::addChildBelow):
3472         (WebCore::WebGraphicsLayer::replaceChild):
3473         (WebCore::WebGraphicsLayer::removeFromParent):
3474         (WebCore::WebGraphicsLayer::setDrawsContent):
3475         (WebCore::WebGraphicsLayer::setContentsOpaque):
3476         (WebCore::WebGraphicsLayer::setBackfaceVisibility):
3477         (WebCore::WebGraphicsLayer::setOpacity):
3478         (WebCore::WebGraphicsLayer::setContentsRect):
3479         (WebCore::WebGraphicsLayer::setContentsToImage):
3480         (WebCore::WebGraphicsLayer::setMaskLayer):
3481         (WebCore::WebGraphicsLayer::setReplicatedByLayer):
3482         (WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
3483         (WebCore::WebGraphicsLayer::id):
3484         (WebCore::WebGraphicsLayer::syncChildren):
3485         (WebCore::WebGraphicsLayer::syncLayerState):
3486         (WebCore::WebGraphicsLayer::syncImageBackingStore):
3487         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
3488         (WebCore::WebGraphicsLayer::setRootLayer):
3489         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
3490         (WebGraphicsLayerClient):
3491         (WebGraphicsLayer):
3492         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
3493         (WebKit::LayerTreeHostQt::syncLayerState):
3494         (WebKit):
3495