[Qt] Public API watch dog auto test.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2012-01-19  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2
3         [Qt] Public API watch dog auto test.
4         https://bugs.webkit.org/show_bug.cgi?id=73922
5
6         Reviewed by Simon Hausmann.
7
8         This test aims to prevent unintended/unapproved
9         modifications to the public QML API.
10
11         * UIProcess/API/qt/tests/publicapi/publicapi.pro: Added.
12         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: Added.
13         (isCheckedEnum):
14         (isCheckedClass):
15         (checkKnownType):
16         (gatherAPI):
17         (tst_publicapi::publicAPI):
18
19 2012-01-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
20
21         [Qt] Trigger forcing accelerated compositing from the UI process side.
22         https://bugs.webkit.org/show_bug.cgi?id=76296
23
24         Reviewed by Noam Rosenthal.
25
26         Some messages can be sent from the web view to the LayerTreeHost before
27         accelerated compositing is entered on the web process and signaled back.
28         By letting the UI process decide if AC has to be forced, we can create
29         the LayerTreeHostProxy earlier to send messages to the web process while
30         AC is being entered there.
31
32         This fixes the first visible content rect message not being received when
33         loading pages from the disk.
34
35         * Shared/WebPreferencesStore.h:
36         * UIProcess/API/qt/qquickwebview.cpp:
37         (QQuickWebViewPrivate::initialize):
38         * UIProcess/DrawingAreaProxyImpl.cpp:
39         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
40         * WebProcess/WebPage/DrawingAreaImpl.cpp:
41         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
42         * WebProcess/WebPage/WebPage.cpp:
43         (WebKit::WebPage::updatePreferences):
44         * WebProcess/WebPage/qt/WebPageQt.cpp:
45         (WebKit::WebPage::platformInitialize):
46
47 2012-01-20  Alexandru Chiculita  <achicu@adobe.com>
48
49         CSS Shaders: Add a Settings flag to enable/disable CSS Shaders at runtime
50         https://bugs.webkit.org/show_bug.cgi?id=76444
51
52         Reviewed by Nikolas Zimmermann.
53
54         * Shared/WebPreferencesStore.h:
55         * UIProcess/API/C/WKPreferences.cpp:
56         (WKPreferencesSetCSSCustomFilterEnabled):
57         (WKPreferencesGetCSSCustomFilterEnabled):
58         * UIProcess/API/C/WKPreferencesPrivate.h:
59         * WebProcess/WebPage/WebPage.cpp:
60         (WebKit::WebPage::updatePreferences):
61
62 2012-01-19  Sam Weinig  <sam@webkit.org>
63
64         Replace improper #import with an #include.
65
66         * UIProcess/Plugins/PluginProcessProxy.cpp:
67         Fixes warnings.
68
69 2012-01-18  Sam Weinig  <sam@webkit.org>
70
71         Move RunLoop to WebCore/platform
72         https://bugs.webkit.org/show_bug.cgi?id=76471
73
74         Reviewed by Anders Carlsson.
75
76         * GNUmakefile.am:
77         * Platform/CoreIPC/Connection.cpp:
78         * Platform/CoreIPC/Connection.h:
79         * Platform/CoreIPC/mac/ConnectionMac.cpp:
80         * PluginProcess/PluginControllerProxy.h:
81         * PluginProcess/PluginProcess.cpp:
82         * PluginProcess/PluginProcess.h:
83         * PluginProcess/WebProcessConnection.cpp:
84         * PluginProcess/mac/PluginProcessMainMac.mm:
85         * PluginProcess/qt/PluginProcessMainQt.cpp:
86         * Shared/ChildProcess.cpp:
87         * Shared/ChildProcess.h:
88         * Target.pri:
89         * UIProcess/API/mac/FindIndicatorWindow.h:
90         * UIProcess/API/mac/WKView.mm:
91         * UIProcess/DrawingAreaProxyImpl.h:
92         * UIProcess/Launcher/ThreadLauncher.cpp:
93         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
94         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
95         * UIProcess/Launcher/mac/ThreadLauncherMac.mm:
96         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
97         * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
98         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
99         * UIProcess/Launcher/win/ThreadLauncherWin.cpp:
100         * UIProcess/LayerTreeHostProxy.h:
101         * UIProcess/Plugins/PluginProcessProxy.cpp:
102         * UIProcess/ResponsivenessTimer.cpp:
103         * UIProcess/ResponsivenessTimer.h:
104         * UIProcess/TiledDrawingAreaProxy.h:
105         * UIProcess/VisitedLinkProvider.h:
106         * UIProcess/WebConnectionToWebProcess.cpp:
107         * UIProcess/WebConnectionToWebProcess.h:
108         * UIProcess/WebContext.cpp:
109         * UIProcess/win/WebView.cpp:
110         * WebKit2.xcodeproj/project.pbxproj:
111         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
112         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
113         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
114         * WebProcess/Plugins/PluginView.h:
115         * WebProcess/WebConnectionToUIProcess.cpp:
116         * WebProcess/WebConnectionToUIProcess.h:
117         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
118         * WebProcess/WebPage/DrawingAreaImpl.h:
119         * WebProcess/WebPage/EventDispatcher.cpp:
120         * WebProcess/WebPage/PageOverlay.h:
121         * WebProcess/WebPage/WebPage.cpp:
122         * WebProcess/WebPage/WebPage.h:
123         * WebProcess/WebProcess.cpp:
124         * WebProcess/WebProcess.h:
125         (WebKit::WebProcess::runLoop):
126         * WebProcess/gtk/WebProcessMainGtk.cpp:
127         * WebProcess/mac/WebProcessMainMac.mm:
128         * WebProcess/qt/WebProcessMainQt.cpp:
129         * WebProcess/win/WebProcessMainWin.cpp:
130         * win/WebKit2.vcproj:
131         Remove RunLoop code and update #includes.
132
133 2012-01-18  Ada Chan  <adachan@apple.com>
134
135         Need a WebKit2 API for setting media volume
136         https://bugs.webkit.org/show_bug.cgi?id=76560
137
138         Reviewed by Dan Bernstein.
139
140         * Shared/WebPageCreationParameters.cpp:
141         (WebKit::WebPageCreationParameters::encode): Encode the mediaVolume parameter.
142         (WebKit::WebPageCreationParameters::decode): Decode the mediaVolume parameter.
143         * Shared/WebPageCreationParameters.h:
144         * UIProcess/API/C/WKPage.cpp:
145         (WKPageSetMediaVolume): Call WebPageProxy::setMediaVolume().
146         * UIProcess/API/C/WKPagePrivate.h:
147         * UIProcess/WebPageProxy.cpp:
148         (WebKit::WebPageProxy::WebPageProxy): Initialize new data member m_mediaVolume.
149         (WebKit::WebPageProxy::setMediaVolume): Bail if the volume hasn't changed. Update m_mediaVolume 
150         and bail if the page is no longer valid.  Otherwise, send a WebPage::SetMediaVolume message to 
151         the web process.
152         (WebKit::WebPageProxy::creationParameters): Add media volume to the creation parameters.
153         * UIProcess/WebPageProxy.h:
154         * WebProcess/WebPage/WebPage.cpp:
155         (WebKit::WebPage::WebPage): Initialize media volume from the WebPageCreationParameters.
156         (WebKit::WebPage::setMediaVolume): Call Page::setMediaVolume().
157         * WebProcess/WebPage/WebPage.h:
158         * WebProcess/WebPage/WebPage.messages.in: Add the SetMediaVolume message.
159
160 2012-01-19  Carlos Garcia Campos  <cgarcia@igalia.com>
161
162         [GTK] WebKit2 GTK+ API public headers are not installed
163         https://bugs.webkit.org/show_bug.cgi?id=76626
164
165         Reviewed by Martin Robinson.
166
167         * GNUmakefile.am: Rename webkit2gtk_headers as
168         libwebkit2gtkinclude_HEADERS to match libwebkit2gtkincludedir so
169         that headers are installed during make install.
170
171 2012-01-19  Carlos Garcia Campos  <cgarcia@igalia.com>
172
173         [GTK] Add print-backgrounds setting to WebKit2 GTK+ API
174         https://bugs.webkit.org/show_bug.cgi?id=76616
175
176         Reviewed by Martin Robinson.
177
178         * UIProcess/API/gtk/WebKitSettings.cpp:
179         (webKitSettingsSetProperty):
180         (webKitSettingsGetProperty):
181         (webkit_settings_class_init):
182         (webkit_settings_get_print_backgrounds):
183         (webkit_settings_set_print_backgrounds):
184         * UIProcess/API/gtk/WebKitSettings.h:
185         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
186         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
187         (testWebKitSettings):
188
189 2012-01-18  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
190
191         [Qt] Handle the layers visible rect calculation on the web process.
192         https://bugs.webkit.org/show_bug.cgi?id=74720
193
194         Reviewed by Noam Rosenthal.
195
196         The layers now get their visible rect on the web process through the
197         root layer when the UI process call setVisibleContentRectAndScale,
198         previously only used for the non-composited content layer.
199         The rect is then carried down the layers in the tree which apply it the inverse
200         of their transform before handing it to their tiled backing store.
201
202         This ensures that new layers get a proper visible rect right on creation,
203         and also that simultaneous visible rect and scale changes are applied synchronously.
204
205         This patch also uses clampedBoundsOfProjectedQuad instead of mapRect
206         to transform the visible rect correctly for 3D transformed layers.
207
208         * UIProcess/API/qt/qquickwebview.cpp:
209         (QQuickWebViewPrivate::initializeDesktop):
210         (QQuickWebViewPrivate::initializeTouch):
211         (QQuickWebViewPrivate::updateDesktopViewportSize):
212         (QQuickWebViewPrivate::updateTouchViewportSize):
213         (QQuickWebView::geometryChanged):
214         Make sure that the visible rect is updated for the desktop view as well.
215         * UIProcess/API/qt/qquickwebview_p_p.h:
216         * UIProcess/LayerTreeHostProxy.h:
217         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
218         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
219         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
220         (WebCore::WebGraphicsLayer::setChildren):
221         (WebCore::WebGraphicsLayer::addChild):
222         (WebCore::WebGraphicsLayer::addChildAtIndex):
223         (WebCore::WebGraphicsLayer::addChildAbove):
224         (WebCore::WebGraphicsLayer::addChildBelow):
225         (WebCore::WebGraphicsLayer::replaceChild):
226         (WebCore::WebGraphicsLayer::setMaskLayer):
227         (WebCore::WebGraphicsLayer::syncCompositingState):
228         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
229         (WebCore::WebGraphicsLayer::setVisibleContentRectAndScale):
230         (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
231         (WebCore::WebGraphicsLayer::computeTransformedVisibleRect):
232         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
233         * WebProcess/WebPage/LayerTreeHost.messages.in:
234         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
235         (WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
236         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
237
238 2012-01-18  Jon Lee  <jonlee@apple.com>
239
240         Another build fix for r105364.
241
242         * WebProcess/mac/WebProcessMac.mm:
243         (WebKit::WebProcess::platformInitializeWebProcess): Missing #if.
244
245 2012-01-18  Jon Lee  <jonlee@apple.com>
246
247         Build fix for r105364. Unreviewed.
248
249         * WebProcess/Notifications/WebNotificationManager.cpp: Wrap methods in #if ENABLE(NOTIFICATIONS)
250         (WebKit::WebNotificationManager::initialize):
251         (WebKit::WebNotificationManager::didUpdateNotificationDecision):
252         (WebKit::WebNotificationManager::didRemoveNotificationDecisions):
253         (WebKit::WebNotificationManager::policyForOrigin):
254
255 2012-01-18  Jon Lee  <jonlee@apple.com>
256
257         [WK2] Sync call for notifications permissions causes flashes on gmail.com
258         https://bugs.webkit.org/show_bug.cgi?id=76570
259         <rdar://problem/10647155>
260
261         Reviewed by Anders Carlsson and Sam Weinig.
262
263         The website code figures out the permission level for its security origin by making a JS call (called
264         checkPermission()) that is synchronous. The way this was implemented was to make a synchronous call from
265         the WebNotificationManager to its proxy. That call goes to the WK API layer to find the policy, and
266         returns that policy back to the JS.
267
268         The synchronous nature of this call causes the white flash to appear in certain cases.
269
270         To fix this, the checkPermission() call is handled all within the web process, instead of going up into
271         the UI process. To do this, the web process initializes the WebNotificationManager with a copy of the
272         notification permissions. Any time the WK client makes a change to the permissions, that gets sent down
273         asynchronously, and the cached copy in WebNotificationManager gets updated.
274
275         A page's settings may disable notifications altogether. Before, this would have been handled by the WK
276         client, since retrieving the permissions were also handled there. Now that the lookup happens in the web
277         process, we need to add that setting in WebCore.
278
279         == Update notification permissions to use the security origin's string representation, rather than its
280         database identifier.
281
282         * UIProcess/Notifications/WebNotification.cpp:
283         (WebKit::WebNotification::WebNotification):
284         * UIProcess/Notifications/WebNotification.h:
285         (WebKit::WebNotification::create):
286         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
287         (WebKit::WebNotificationManagerProxy::show): Registering the provider with the manager is handled in
288         initialize() now.
289         (WebKit::WebNotificationManagerProxy::cancel): Registering the provider with the manager is handled in
290         initialize() now.
291         * UIProcess/Notifications/WebNotificationManagerProxy.h:
292         * UIProcess/WebPageProxy.cpp:
293         (WebKit::WebPageProxy::requestNotificationPermission):
294         (WebKit::WebPageProxy::showNotification):
295         * UIProcess/WebPageProxy.h:
296
297         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
298         (WebKit::NotificationPermissionRequestManager::startRequest): Only start the request if notifications
299         are enabled.
300         * WebProcess/Notifications/WebNotificationManager.cpp:
301         (WebKit::WebNotificationManager::show): Only show notification is they are enabled.
302         (WebKit::WebNotificationManager::cancel): Only cancel if notifications are enabled.
303
304         == Remove synchronous message to get policy for a given origin. Instead, use the cached copy in
305         WebNotificationManager.
306
307         * WebProcess/Notifications/WebNotificationManager.h:
308         * WebProcess/Notifications/WebNotificationManager.cpp:
309         (WebKit::WebNotificationManager::policyForOrigin): Looks for the permission in the cached copy.
310         If it doesn't exist, return NotificationPresenter::PermissionNotAllowed.
311         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
312         (WebKit::NotificationPermissionRequestManager::permissionLevel): Update permissionLevel to use
313         policyForOrigin().
314
315         Remove old WK API function to get the policy. Because this function was the only synchronous message,
316         we remove the sync-message-related functions also. Also, add in some #includes that might have been
317         omitted in prior patches.
318
319         * UIProcess/API/C/WKNotificationProvider.h:
320         * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Remove NotificationPermissionLevel.
321         * UIProcess/Notifications/WebNotificationManagerProxy.h:
322         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
323
324         * UIProcess/Notifications/WebNotificationProvider.h: Remove policyForNotificationPermissionAtOrigin().
325         * UIProcess/Notifications/WebNotificationProvider.cpp:
326
327         * UIProcess/WebProcessProxy.cpp:
328         (WebKit::WebProcessProxy::didReceiveSyncMessage): Remove conditional to forward sync messages to the
329         notification manager proxy.
330
331         == Mechanism for client to update the permissions copy in WebNotificationManager.
332
333         * WebProcess/Notifications/WebNotificationManager.messages.in: Add new messages
334         didUpdateNotificationDecision and didRemoveNotificationDecisions.
335         * WebProcess/Notifications/WebNotificationManager.h:
336         * WebProcess/Notifications/WebNotificationManager.cpp:
337         (WebKit::WebNotificationManager::initialize):
338         (WebKit::WebNotificationManager::didUpdateNotificationDecision): Update the entry.
339         (WebKit::WebNotificationManager::didRemoveNotificationDecisions): Remove the entry.
340
341         * UIProcess/Notifications/WebNotificationManagerProxy.h:
342         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
343         (WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
344         (WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies): Convert the array of
345         origins to remove, and send it to the WebNotificationManager.
346
347         * UIProcess/API/C/WKNotificationManager.h: Expose these update functions as WK API.
348         * UIProcess/API/C/WKNotificationManager.cpp:
349         (WKNotificationManagerProviderDidUpdateNotificationPolicy):
350         (WKNotificationManagerProviderDidRemoveNotificationPolicies):
351
352         == Initialize WebNotificationManager with permissions. Initialize WebPage with notifications enabled bit
353         from settings.
354
355         * Shared/WebProcessCreationParameters.h: Add map of notification permissions as part of the
356         parameters.
357         * Shared/WebProcessCreationParameters.cpp:
358         (WebKit::WebProcessCreationParameters::encode):
359         (WebKit::WebProcessCreationParameters::decode):
360
361         * UIProcess/Notifications/WebNotificationProvider.h: Retrieve copy of existing notification permissions.
362         * UIProcess/Notifications/WebNotificationProvider.cpp:
363         * UIProcess/API/C/WKNotificationProvider.h: Add WK API to get a copy of the permissions.
364
365         * UIProcess/Notifications/WebNotificationManagerProxy.h: Add populateCopyOfNotificationPermissions().
366         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
367         (WebKit::WebNotificationManagerProxy::initializeProvider): Add the manager at the time of initialization.
368         Similar calls in show() and cancel() are removed in following patch.
369         (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions): Clear the existing copy.
370         Populate with origin string, and whether that origin is allowed to post. If no decision has been made
371         by the user, then there should be no item in this dictionary.
372
373         * UIProcess/WebContext.cpp:
374         (WebKit::WebContext::ensureWebProcess): When the web process is initialized, we get a copy of the
375         permissions, and send it to the web process to initialize the notification manager.
376         * WebProcess/mac/WebProcessMac.mm:
377         (WebKit::WebProcess::platformInitializeWebProcess): Initialize the notification manager.
378
379         * WebProcess/Notifications/WebNotificationManager.h:
380         * WebProcess/Notifications/WebNotificationManager.cpp:
381         (WebKit::WebNotificationManager::initialize): Initialize the permissions copy.
382
383         * WebProcess/WebPage/WebPage.cpp:
384         (WebKit::WebPage::updatePreferences): Set notifications enabled bit from settings.
385
386         == Expose toString() method from WebCore::SecurityOrigin. Work is also towards bug 74956.
387
388         * Shared/API/c/WKSecurityOrigin.h: Refactor WKSecurityOriginCreateFromIdentifier to
389         WKSecurityOriginCreateFromDatabaseIdentifier and add WKSecurityOriginCreateFromString function.
390         * Shared/API/c/WKSecurityOrigin.cpp:
391         (WKSecurityOriginCreateFromString):
392         (WKSecurityOriginCreateFromDatabaseIdentifier):
393         (WKSecurityOriginCopyToString):
394
395         Refactor WebSecurityOrigin::create() to WebSecurityOrigin::createFromDatabaseIdentifier()
396         and add WebSecurityOrigin::createFromString().
397
398         * Shared/WebSecurityOrigin.h:
399         (WebKit::WebSecurityOrigin::createFromString):
400         (WebKit::WebSecurityOrigin::createFromDatabaseIdentifier):
401         (WebKit::WebSecurityOrigin::toString): Added function.
402         
403         Refactor with renamed createFromDatabaseIdentifier() method.
404         
405         * UIProcess/WebDatabaseManagerProxy.cpp:
406         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
407         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
408         (WebKit::WebDatabaseManagerProxy::didModifyOrigin):
409         (WebKit::WebDatabaseManagerProxy::didModifyDatabase):
410         * UIProcess/WebPageProxy.cpp:
411         (WebKit::WebPageProxy::exceededDatabaseQuota):
412         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
413
414         == Add WK API calls to change notificationsEnabled bit in WebCore::Settings.
415
416         * Shared/WebPreferencesStore.h:
417         * UIProcess/API/C/WKPreferences.cpp:
418         (WKPreferencesSetNotificationsEnabled):
419         (WKPreferencesGetNotificationsEnabled):
420         * UIProcess/API/C/WKPreferences.h:
421
422 2012-01-18  Anders Carlsson  <andersca@apple.com>
423
424         REGRESSION (r88886): Tabs restore blank when running Safari with a nightly build for the first time
425         https://bugs.webkit.org/show_bug.cgi?id=76587
426         <rdar://problem/9739135>
427
428         Reviewed by Sam Weinig.
429
430         * UIProcess/cf/WebPageProxyCF.cpp:
431         Change CurrentSessionStateDataVersion back to 2.
432
433         * WebProcess/WebPage/DecoderAdapter.cpp:
434         (WebKit::DecoderAdapter::decodeString):
435         * WebProcess/WebPage/EncoderAdapter.cpp:
436         (WebKit::EncoderAdapter::encodeString):
437         Backport the CoreIPC string encoding and decoding functions that were in place prior to r88886.
438
439 2012-01-17  Alexey Proskuryakov  <ap@apple.com>
440
441         [Mac] Add a flag telling plug-in if it can enter sandbox
442         https://bugs.webkit.org/show_bug.cgi?id=76467
443
444         Reviewed by Anders Carlsson.
445
446         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
447         (WebKit::NPN_GetValue): Added a private flag.
448
449 2012-01-18  Eric Carlson  <eric.carlson@apple.com>
450
451         Provide access to user's list of preferred languages
452         https://bugs.webkit.org/show_bug.cgi?id=76138
453
454         Reviewed by Alexey Proskuryakov.
455
456         * Shared/WebProcessCreationParameters.cpp:
457         (WebKit::WebProcessCreationParameters::encode): Encode the languages array.
458         (WebKit::WebProcessCreationParameters::decode): Decode the languages array.
459         * Shared/WebProcessCreationParameters.h:
460
461         * UIProcess/WebContext.cpp:
462         (WebKit::WebContext::languageChanged): Override the WebProcess userPreferredLanguages.
463         (WebKit::WebContext::ensureWebProcess): Initialize parameters.languages.
464
465         * WebProcess/WebProcess.cpp:
466         (WebKit::WebProcess::initializeWebProcess): Override user languages array.
467         (WebKit::WebProcess::userPreferredLanguagesChanged): Ditto.
468         * WebProcess/WebProcess.h:
469         * WebProcess/WebProcess.messages.in: Define UserPreferredLanguagesChanged.
470
471         * win/WebKit2.def: Export the new functions.
472         * win/WebKit2CFLite.def: Ditto.
473
474 2012-01-18  Luciano Wolf  <luciano.wolf@openbossa.org>
475
476         [Qt][WK2] Broken build with undefined reference to shm_open and shm_unlink
477         https://bugs.webkit.org/show_bug.cgi?id=76538
478
479         Reviewed by Tor Arne Vestbø.
480
481         The -lrt parameter was coming before -lWebKit2 during linkage.
482
483         Moved rt lib inclusion from Source/api.pri to WebKit2.pri as it should be aware
484         of its own dependencies instead of letting WebKit guess about. Letting
485         it on api.pri can lead to a wrong parameter's order during linker phase.
486         Ubuntu 11.10 was giving errors about SharedMemory (shm_open and
487         shm_unlink undefined symbols).
488
489         The issue was fixed with the help of Aloisio Almeida and Lauro Venancio.
490
491         * WebKit2.pri:
492
493 2012-01-18  Carlos Garnacho  <carlosg@gnome.org>
494
495         [GTK] Listen to GDK_SCROLL_MASK
496         https://bugs.webkit.org/show_bug.cgi?id=76529
497
498         Set GDK_SCROLL_MASK explicitly, as WebKitWebViewBase does handle
499         scroll events, scrolling currently works because GTK+ happens 
500         to send such events to widgets listening to GDK_BUTTON_PRESS_MASK,
501         but this isn't the intended behavior, so it's subject to change.
502
503         Reviewed by Martin Robinson.
504
505         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
506         (webkitWebViewBaseRealize):
507
508 2012-01-18  Andras Becsi  <andras.becsi@nokia.com>
509
510         [Qt][WK2] Fix the debug build.
511
512         Unreviewed.
513
514         * UIProcess/qt/QtWebPageEventHandler.cpp:
515         (setInputPanelVisible): Remove assertion from non-member function.
516
517 2012-01-12  Kenneth Rohde Christiansen  <kenneth@webkit.org>
518
519         [Qt] Zoom in to the focused node only when vkb starts becoming visible
520         https://bugs.webkit.org/show_bug.cgi?id=76174
521
522         Reviewed by Simon Hausmann.
523
524         Remove the old code which always zoomed in when something got focus,
525         even via JavaScript, and replaced it with code checking the state of
526         the Qt input panel.
527
528         Also make sure that we do not zoom in or request the input panel if
529         the item is not focused.
530
531         * UIProcess/PageClient.h:
532         * UIProcess/WebPageProxy.cpp:
533         * UIProcess/WebPageProxy.h:
534         * UIProcess/WebPageProxy.messages.in:
535         * UIProcess/qt/QtPageClient.cpp:
536         * UIProcess/qt/QtPageClient.h:
537         * UIProcess/qt/QtWebPageEventHandler.cpp:
538         (QtWebPageEventHandler::QtWebPageEventHandler):
539         (QtWebPageEventHandler::~QtWebPageEventHandler):
540         (QtWebPageEventHandler::inputPanelVisibleChanged):
541         * UIProcess/qt/QtWebPageEventHandler.h:
542         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
543         (WebKit::WebEditorClient::respondToChangedSelection):
544
545 2012-01-18  Shinya Kawanaka  <shinyak@google.com>
546
547         Move ShadowContentElement from dom/ to html/ and make ShadowContentElement subclass of HTMLElement.
548         https://bugs.webkit.org/show_bug.cgi?id=76241
549
550         Reviewed by Dimitri Glazkov.
551
552         * win/WebKit2.def: Exposed necessary symbols.
553         * win/WebKit2CFLite.def: ditto.
554
555 2012-01-17  Hajime Morrita  <morrita@chromium.org>
556
557         [Internals] Should be able to access corresponding Document object.
558         https://bugs.webkit.org/show_bug.cgi?id=76425
559
560         Reviewed by Adam Barth.
561
562         * win/WebKit2.def: Added exporting symbols.
563         * win/WebKit2CFLite.def: Added exporting symbols.
564
565 2012-01-17  Matthew Delaney  <mdelaney@apple.com>
566
567         On post-Lion releases, preserve the Lion behavior where WebKit explicitly calls -setGeometryFlipped on the hosting layer for applications that were linked on Lion or earlier.
568         <rdar://problem/10692025>
569
570         Reviewed by Simon Fraser.
571
572         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: Init new function.
573         (InitWebCoreSystemInterface):
574
575 2012-01-17  Sam Weinig  <sam@webkit.org>
576
577         Rename quickLookPreviewItemsAtWindowLocation: to quickLookWithEvent:
578         <rdar://problem/10688913>
579
580         Reviewed by Anders Carlsson.
581
582         * UIProcess/API/mac/WKView.mm:
583         (-[WKView quickLookWithEvent:]):
584
585 2012-01-17  Sam Weinig  <sam@webkit.org>
586
587         Add helper macro for forward declaring objective-c classes
588         https://bugs.webkit.org/show_bug.cgi?id=76485
589
590         Reviewed by Anders Carlsson.
591
592         * WebProcess/WebCoreSupport/WebDragClient.h:
593         Deploy OBJC_CLASS for a little code reduction.
594
595         * config.h:
596         Remove duplicate copy of OBJC_CLASS.
597
598 2012-01-17  Martin Robinson  <mrobinson@igalia.com>
599
600         [GTK] [WK2] WebKitPrivate should include the entire WebKit2 C API
601         https://bugs.webkit.org/show_bug.cgi?id=76345
602
603         Reviewed by Gustavo Noronha Silva.
604
605         Isolate all of the WebKit2 C API includes into WebKitPrivate.h and no longer
606         include anything other than WebKit2.h for the C API.
607
608         * UIProcess/API/gtk/WebKitBackForwardList.cpp: Use WebKitPrivate.h now.
609         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Ditto.
610         * UIProcess/API/gtk/WebKitPrivate.h: Add WebKit2.h, WKAPICast.h and WKRetainPtr.h includes.
611         * UIProcess/API/gtk/WebKitSettings.cpp: Use WebKitPrivate.h.
612         * UIProcess/API/gtk/WebKitUIClient.cpp: Ditto.
613         * UIProcess/API/gtk/WebKitWebContext.cpp: Ditto.
614         * UIProcess/API/gtk/WebKitWebView.cpp: Ditto.
615         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto.
616         * UIProcess/API/gtk/WebKitWindowProperties.cpp: Ditto.
617
618 2012-01-17  Alexander Færøy  <alexander.faeroy@nokia.com>
619
620         [Qt] Implement HTTP authentication QML API
621         https://bugs.webkit.org/show_bug.cgi?id=75535
622
623         Reviewed by Kenneth Rohde Christiansen.
624
625         This patch implements the QML API for handling HTTP authentication.
626         The implementation uses a syncronous message between the WebProcess
627         and the UIProcess which is called when the authenticationRequired
628         signal is emitted from QNAM.
629
630         Based in part upon patch by Peter Hartmann.
631
632         * UIProcess/API/qt/qquickwebview.cpp:
633         (QQuickWebViewPrivate::QQuickWebViewPrivate):
634         (QQuickWebViewPrivate::handleAuthenticationRequiredRequest):
635         (QQuickWebViewExperimental::authenticationDialog):
636         (QQuickWebViewExperimental::setAuthenticationDialog):
637         * UIProcess/API/qt/qquickwebview_p.h:
638         * UIProcess/API/qt/qquickwebview_p_p.h:
639         * UIProcess/PageClient.h:
640         * UIProcess/WebPageProxy.cpp:
641         (WebKit::WebPageProxy::authenticationRequiredRequest):
642         * UIProcess/WebPageProxy.h:
643         * UIProcess/WebPageProxy.messages.in:
644         * UIProcess/qt/QtDialogRunner.cpp:
645         (AuthenticationDialogContextObject::AuthenticationDialogContextObject):
646         (AuthenticationDialogContextObject::hostname):
647         (AuthenticationDialogContextObject::realm):
648         (AuthenticationDialogContextObject::prefilledUsername):
649         (AuthenticationDialogContextObject::accept):
650         (AuthenticationDialogContextObject::reject):
651         (QtDialogRunner::initForAuthentication):
652         * UIProcess/qt/QtDialogRunner.h:
653         (QtDialogRunner::username):
654         (QtDialogRunner::password):
655         (QtDialogRunner::onAuthenticationAccepted):
656         * UIProcess/qt/QtPageClient.cpp:
657         (QtPageClient::handleAuthenticationRequiredRequest):
658         * UIProcess/qt/QtPageClient.h:
659         * WebProcess/qt/QtNetworkAccessManager.cpp:
660         (WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
661         (WebKit::QtNetworkAccessManager::onAuthenticationRequired):
662         * WebProcess/qt/QtNetworkAccessManager.h:
663
664 2012-01-16  Dan Bernstein  <mitz@apple.com>
665
666         <rdar://problem/10702758> REGRESSION: Every Safari Reader WKView leaks
667
668         Reviewed by John Sullivan and Ada Chan.
669
670         * UIProcess/API/mac/WKView.mm:
671         (-[WKView viewDidMoveToWindow]): Since this method can be called multiple times in a row
672         while [self window] is non-nil, check if there isn’t already an event monitor before adding
673         a new one.
674
675 2012-01-16  Anders Carlsson  <andersca@apple.com>
676
677         Crash when calling SecItemAdd with a null result pointer
678         https://bugs.webkit.org/show_bug.cgi?id=76407
679         <rdar://problem/10696087>
680
681         Reviewed by Brady Eidson.
682
683         Add null check.
684
685         * WebProcess/mac/SecItemShimMethods.mm:
686         (WebKit::webSecItemAdd):
687
688 2012-01-16  Jon Lee  <jonlee@apple.com>
689
690         Build fix for r105086.
691
692         * Configurations/FeatureDefines.xcconfig:
693
694 2012-01-16  Zeno Albisser  <zeno@webkit.org>
695
696         [Qt] Fix QT_VERSION related warnings when building on Mac OS X
697         https://bugs.webkit.org/show_bug.cgi?id=76340
698
699         This bug was caused by r104826.
700         As was already mentioned for https://bugs.webkit.org/show_bug.cgi?id=57239
701         we should not use "using namespace WebCore" in header files,
702         because it might cause ambiguous references.
703         This patch reverts the changes from r104826 and r104981
704         and removes the "using namespace WebCore" statement from
705         two header files.
706
707         Reviewed by Tor Arne Vestbø.
708
709         * Shared/WebLayerTreeInfo.h:
710         (WebKit::WebLayerUpdateInfo::WebLayerUpdateInfo):
711         (WebKit::WebLayerAnimation::WebLayerAnimation):
712         * UIProcess/LayerTreeHostProxy.h:
713         (WebKit::LayerTreeHostProxy::layerByID):
714         (WebKit::LayerTreeHostProxy::rootLayer):
715         (WebKit::LayerTreeHostProxy::notifyAnimationStarted):
716         (WebKit::LayerTreeHostProxy::notifySyncRequired):
717         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
718         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
719         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
720
721 2012-01-16  Alexander Færøy  <alexander.faeroy@nokia.com>
722
723         [Qt] Remove references to PagePointer in the FrameNetworkingContext
724         https://bugs.webkit.org/show_bug.cgi?id=76342
725
726         Reviewed by Simon Hausmann.
727
728         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
729         (WebKit::WebFrameLoaderClient::createNetworkingContext):
730         * WebProcess/qt/QtNetworkAccessManager.cpp:
731         (WebKit::QtNetworkAccessManager::obtainOriginatingWebPage):
732         * WebProcess/qt/QtNetworkAccessManager.h:
733
734 2012-01-14  Dan Bernstein  <mitz@apple.com>
735
736         <rdar://problem/10696295> Crash in WebProcess at com.apple.CFNetwork: URLCredentialStorage::CreateCurrentPersistentCredentials + 298
737
738         Reviewed by Anders Carlsson.
739
740         * WebProcess/mac/SecItemShimMethods.mm:
741         (WebKit::initializeSecItemShim): Removed an early return that was accidentally added in r105008.
742
743 2012-01-13  Anders Carlsson  <andersca@apple.com>
744
745         Delay updating the root compositing layer if the layer tree state is frozen
746         https://bugs.webkit.org/show_bug.cgi?id=76316
747
748         Reviewed by Dan Bernstein.
749
750         When the layer tree is frozen, stash the root layer in m_pendingRootCompositingLayer and set it in flushLayers.
751
752         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
753         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
754         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
755         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
756
757 2012-01-13  Anders Carlsson  <andersca@apple.com>
758
759         Implement TiledCoreAnimationDrawingArea::setLayerTreeStateIsFrozen
760         https://bugs.webkit.org/show_bug.cgi?id=76308
761
762         Reviewed by Sam Weinig.
763
764         Keep track of whether the layer tree state is frozen and suspend/resume the layer flush scheduler accordingly.
765
766         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
767         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
768         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
769         (WebKit::TiledCoreAnimationDrawingArea::setLayerTreeStateIsFrozen):
770         (WebKit::TiledCoreAnimationDrawingArea::layerTreeStateIsFrozen):
771         (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync):
772         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
773
774 2012-01-13  Anders Carlsson  <andersca@apple.com>
775
776         Disable implicit animations when setting the root compositing layer
777         https://bugs.webkit.org/show_bug.cgi?id=76304
778
779         Reviewed by Sam Weinig.
780
781         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
782         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
783
784 2012-01-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
785
786         TextureMapper: Extract layer transform logic to a LayerTransform class.
787         https://bugs.webkit.org/show_bug.cgi?id=76291
788
789         Reviewed by Noam Rosenthal.
790
791         Move the paint call before the visible rect collection to make sure that
792         transforms are computed. This will increase the delay for the visible rects
793         to get to the WebProcess until we move this calculation out of the UI Process.
794         This fixes an assert triggering in LayerTransform::combineTransforms.
795
796         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
797         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
798
799 2012-01-13  Brent Fulgham  <bfulgham@webkit.org>
800
801         [WinCairo] Build correction.
802
803         * Shared/WebGraphicsContext.h: Use proper include path for RefPtrCairo.h.
804
805 2012-01-12  Martin Robinson  <mrobinson@igalia.com>
806
807         [GTK] [WebKit2] WebKitURIRequest and WebKitURIResponse should wrap the corresponding WebCore classes
808         https://bugs.webkit.org/show_bug.cgi?id=74478
809
810         Reviewed by Gustavo Noronha Silva.
811
812         Have WebKitURIRequest wrap a ResourceRquesst and WebKitURIResponse wrap a ResourceResponse.
813         They are the WebCore types they are meant to represent and we will need to expose more
814         information from them in the future to make them useful. Later we can have ResourceResponse
815         generate a SoupMessage lazily if necessary.
816
817         * GNUmakefile.am:
818         * UIProcess/API/gtk/WebKitURIRequest.cpp:
819         (webkit_uri_request_class_init): Remove the set property vmethod.
820         (webkit_uri_request_new): The URI property is no longer settable.
821         (webkitURIRequestCreateForResourceRequest): Added this private constructor.
822         (webkit_uri_request_get_uri): Now we just get the URI directly from the ResourceRequest.
823         * UIProcess/API/gtk/WebKitURIResponse.cpp:
824         (webkit_uri_response_class_init): Remove the set property vmethod.
825         (webkit_uri_response_get_uri): Get the URI directly from the ResourceReponse.
826         (webkit_uri_response_get_status_code): Get the status code directly from the ResourceResponse.
827         (webkit_uri_response_get_content_length): Get the content length directly from the ResourceResponse.
828         (webkitURIResponseCreateForResourceResponse): Added this private constructor.
829         * UIProcess/API/gtk/WebKitURIResponsePrivate.h: Removed unnecessary methods.
830
831 2012-01-12  No'am Rosenthal  <noam.rosenthal@nokia.com>
832
833         [Qt][WK2] WebProcesses crashes when composited reflections/masks are present
834         https://bugs.webkit.org/show_bug.cgi?id=75883
835
836         Reviewed by Kenneth Rohde Christiansen.
837
838         Make sure masks and replica layers can access layerTreeTileClient. Let masks
839         have the right contents/visible rect so that they can render content tiles.
840         Default the mask's size to be the layer's size.
841
842         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
843         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
844         (WebCore::WebGraphicsLayer::setSize):
845         (WebCore::WebGraphicsLayer::setMaskLayer):
846         (WebCore::WebGraphicsLayer::setReplicatedByLayer):
847         (WebCore::WebGraphicsLayer::syncCompositingState):
848         (WebCore::WebGraphicsLayer::setContentsScale):
849         (WebCore::WebGraphicsLayer::setVisibleContentRect):
850         (WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
851         (WebCore::WebGraphicsLayer::updateTileBuffersRecursively):
852         (WebCore::WebGraphicsLayer::layerTreeTileClient):
853         (WebCore::WebGraphicsLayer::purgeBackingStores):
854         (WebCore::WebGraphicsLayer::recreateBackingStoreIfNeeded):
855         (WebCore::WebGraphicsLayer::setLayerTreeTileClient):
856         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
857         (WebCore::WebGraphicsLayer::maskTarget):
858         (WebCore::WebGraphicsLayer::setMaskTarget):
859
860 2012-01-12  Kenneth Rohde Christiansen  <kenneth@webkit.org>
861
862         [Qt] Set the input method hints on the QtQuick item
863         https://bugs.webkit.org/show_bug.cgi?id=76169
864
865         Reviewed by Simon Hausmann.
866
867         Set the input method hints given the HTMLElement type and state.
868
869         * Shared/EditorState.cpp:
870         (WebKit::EditorState::encode):
871         (WebKit::EditorState::decode):
872         * Shared/EditorState.h:
873         (WebKit::EditorState::EditorState):
874         * UIProcess/qt/QtWebPageEventHandler.cpp:
875         (QtWebPageEventHandler::updateTextInputState):
876         * WebProcess/WebPage/WebPage.cpp:
877         (WebKit::WebPage::editorState):
878
879 2012-01-12  Eunmi Lee  <eunmi15.lee@samsung.com>
880
881         [EFL][WK2] Update and show ewk_view with updated webpage.
882         https://bugs.webkit.org/show_bug.cgi?id=76023
883
884         Reviewed by Andreas Kling.
885
886         Update ewk_view with BackingStore image which is rendered webpage
887         image by WebProcess, and show updated image's area when
888         PageClientImpl::setViewNeedsDisplay() is called.
889         The ewk_view_display() function is used to display updated area of
890         evas_object_image and the ewk_view_image_data_set() function is used
891         to set evas_object_image's data with rendered webpage.
892
893         * UIProcess/API/efl/PageClientImpl.cpp:
894         (WebKit::PageClientImpl::setViewNeedsDisplay):
895         * UIProcess/API/efl/ewk_private.h: Added.
896         * UIProcess/API/efl/ewk_view.cpp:
897         (ewk_view_add):
898         (ewk_view_display):
899         (ewk_view_image_data_set):
900         * UIProcess/cairo/BackingStoreCairo.cpp:
901         (WebKit::BackingStore::incorporateUpdate):
902
903 2012-01-12  Ryuan Choi  <ryuan.choi@samsung.com>
904
905         [EFL][WK2] Network is not available when SOUP is enabled.
906         https://bugs.webkit.org/show_bug.cgi?id=76112
907
908         Reviewed by Andreas Kling.
909
910         ecore_main_loop_glib_integrate should be called to use glib based library
911         such as SOUP.
912
913         * WebProcess/efl/WebProcessMainEfl.cpp:
914         (WebKit::WebProcessMainEfl):
915
916 2012-01-12  Ryuan Choi  <ryuan.choi@samsung.com>
917
918         [EFL][WK2] Add PLATFORM(EFL) in SharedMemory.h, WebProcessStore.h, WebEditorClient.cpp
919         https://bugs.webkit.org/show_bug.cgi?id=76115
920
921         Reviewed by Andreas Kling.
922
923         This patch added PLATFORM(EFL) guard in SharedMemory.h to use UNIX_DOMAIN_SOCKETS
924         and WebProcessStore.h to have font family preference
925         and WebEditorClient.cpp to use platform specific handleKeyboardEvent(),
926         handleInputMethodKeydown()
927
928         * Platform/SharedMemory.h:
929         * Shared/WebPreferencesStore.h:
930         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
931
932 2012-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
933
934         [GTK] Web process should use the same locale than UI process
935         https://bugs.webkit.org/show_bug.cgi?id=76054
936
937         Reviewed by Gustavo Noronha Silva.
938
939         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
940         (WebKit::childSetupFunction): Make child process use the same
941         locale than its parent.
942
943 2012-01-11  Ryuan Choi  <ryuan.choi@samsung.com>
944
945         [WK2] Share cairo specific codes with EFL port.
946         https://bugs.webkit.org/show_bug.cgi?id=75457
947
948         Reviewed by Brent Fulgham.
949
950         Change PLATFORM(GTK) to USE(CAIRO) in WebGraphicsContext{h,cpp} to share
951         with EFL port.
952
953         * Shared/WebGraphicsContext.cpp:
954         (WebKit::WebGraphicsContext::WebGraphicsContext):
955         * Shared/WebGraphicsContext.h:
956
957 2012-01-11  Beth Dakin  <bdakin@apple.com>
958
959         https://bugs.webkit.org/show_bug.cgi?id=75904
960         WebKit 1: Scrollbar uiStateTransitionProgress requires tracking the mouse all 
961         the time
962         -and corresponding-
963         <rdar://problem/10498816>
964
965         Reviewed by Darin Adler.
966
967         This patch gets rid of the optional parameter called onlyUpdateScrollbars for 
968         WebCore::EventHandler::mouseMoved() and instead moves that functionality into 
969         its own function called passMouseMovedEventToScrollbars().
970         * WebProcess/WebPage/WebPage.cpp:
971         (WebKit::handleMouseEvent):
972
973 2012-01-11  Brent Fulgham  <bfulgham@webkit.org>
974
975         WinCairo build correction.
976
977         * UIProcess/WebPageProxy.h: Don't define viewWidget for WinCairo port.
978
979 2012-01-11  Anders Carlsson  <andersca@apple.com>
980
981         Webpages flash white when switching between windows
982         https://bugs.webkit.org/show_bug.cgi?id=76080
983         <rdar://problem/9893565>
984
985         Reviewed by Dan Bernstein.
986
987         Introduce a _windowHasValidBackingStore boolean and only paint the background (white or clear)
988         * UIProcess/API/mac/WKView.mm:
989         (-[WKView setFrameSize:]):
990         Set _windowHasValidBackingStore to false if the new size is different from the old size.
991
992         (-[WKView viewDidMoveToWindow]):
993         Set _windowHasValidBackingStore to false.
994
995         (-[WKView _windowDidMiniaturize:]):
996         Set _windowHasValidBackingStore to false.
997
998         (-[WKView _windowDidChangeBackingProperties:]):
999         Set _windowHasValidBackingStore to false.
1000
1001         (-[WKView drawRect:]):
1002         Only call drawPageBackground if _windowHasValidBackingStore is false. Set it to true after painting.
1003
1004 2012-01-11  Anders Carlsson  <andersca@apple.com>
1005
1006         Fix the Mac GCC build.
1007
1008         Work around the fact that GCC doesn't work very well with Blocks and C++ objets.
1009
1010         * UIProcess/mac/WebProcessProxyMac.mm:
1011         (WebKit::dispatchFunctionOnQueue):
1012         (WebKit::WebProcessProxy::secItemRequest):
1013         (WebKit::WebProcessProxy::secKeychainItemRequest):
1014
1015 2012-01-11  No'am Rosenthal  <noam.rosenthal@nokia.com>
1016
1017         [Qt][WK2] Directly-composited images sometimes appear with a wrong geometry
1018         https://bugs.webkit.org/show_bug.cgi?id=75882
1019
1020         Reviewed by Simon Hausmann.
1021
1022         When assigning a directly composited image to a TextureMapperNode in WebKit2, we take
1023         contentsRect() onto account. However, contentsRect() might be changed after the image
1024         is already assigned.
1025         We have to reassign the image when contentsRect() changes. This is a pretty cheap
1026         operation, since the image is already converted to a texture and we simply change the
1027         geometric values.
1028
1029         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
1030         (WebKit::LayerTreeHostProxy::syncLayerParameters):
1031         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
1032         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
1033
1034 2012-01-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1035
1036         [Qt] Add the editor rect to the EditorState
1037         https://bugs.webkit.org/show_bug.cgi?id=76053
1038
1039         Reviewed by Simon Hausmann.
1040
1041         Also rename some members to match the new Qt naming scheme.
1042
1043         * Shared/EditorState.cpp:
1044         (WebKit::EditorState::encode):
1045         (WebKit::EditorState::decode):
1046         * Shared/EditorState.h:
1047         * UIProcess/API/qt/qquickwebview.cpp:
1048         (QQuickWebView::inputMethodQuery):
1049         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1050         (WebKit::WebEditorClient::respondToChangedSelection):
1051         * WebProcess/WebPage/WebPage.cpp:
1052         (WebKit::WebPage::editorState):
1053
1054 2012-01-11  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
1055
1056         [GTK] Linking of big binaries should be serialized to avoid thrashing
1057         https://bugs.webkit.org/show_bug.cgi?id=75977
1058
1059         Reviewed by Martin Robinson.
1060
1061         Added artificial dependencies so that libwebkitgtk is always
1062         linked first, libwebkit2gtk second, and WebKitPluginProcess
1063         last. Automake unfortunately replaces the whole rule used to build
1064         the libraries if the actual name is used to add the dependency, so
1065         we use helper variables to work around that.
1066
1067         * GNUmakefile.am:
1068
1069 2012-01-11  Ryuan Choi  <ryuan.choi@samsung.com>
1070
1071         [EFL][WK2] Rename viewObject to viewWidget
1072         https://bugs.webkit.org/show_bug.cgi?id=75947
1073
1074         Reviewed by Martin Robinson.
1075
1076         Rename viewObject to viewWidget for the EFL port to use WidgetBackingStore
1077         which calls viewWidget().
1078
1079         * UIProcess/API/efl/PageClientImpl.cpp:
1080         (WebKit::PageClientImpl::PageClientImpl):
1081         (WebKit::PageClientImpl::setViewNeedsDisplay):
1082         (WebKit::PageClientImpl::viewSize):
1083         * UIProcess/API/efl/PageClientImpl.h:
1084         (WebKit::PageClientImpl::create):
1085         (WebKit::PageClientImpl::viewWidget):
1086         * UIProcess/WebPageProxy.h:
1087         * UIProcess/efl/WebPageProxyEfl.cpp:
1088         (WebKit::WebPageProxy::viewWidget):
1089
1090 2012-01-10  Mark Rowe  <mrowe@apple.com>
1091
1092         REGRESSION (r104377): All pages print blank on Snow Leopard
1093         <http://webkit.org/b/75879> / <rdar://problem/10674335>
1094
1095         We need to explicitly load PDFKit.framework before using PDFDocument and friends.
1096         On SnowLeopard the framework is not necessarily loaded by anything else before we
1097         print, which would lead to us failing to allocate the PDFDocument that we use for
1098         drawing the content from the web process.
1099
1100         Reviewed by Dan Bernstein.
1101
1102         * UIProcess/API/mac/WKPrintingView.mm:
1103         (pdfKitFrameworkPath): Construct the path to the PDFKit framework.
1104         (classFromPDFKit): Ensure that the PDFKit framework is loaded, and then retrieve the
1105         given class from it.
1106         (pdfAnnotationLinkClass): ASSERT that we found the class.
1107         (pdfDocumentClass): Ditto.
1108
1109 2012-01-10  Chris Marrin  <cmarrin@apple.com>
1110
1111         Wrapped allowedCompositingTriggers in ACCELERATED_COMPOSITING ifdef to make non-accelerated builds work
1112
1113         Unreviewed.
1114
1115         * WebProcess/WebCoreSupport/WebChromeClient.h:
1116
1117 2012-01-10  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
1118
1119         [Qt][WK2]REGRESSION(r102435): It made tst_QQuickWebView::show() crash
1120         https://bugs.webkit.org/show_bug.cgi?id=74176
1121
1122         Reviewed by Noam Rosenthal.
1123
1124         Check texture mapper exists already in ensureRootLayer to avoid recrecation.
1125         Check if root layer was deleted already in purgeGLResources.
1126         Added multipleWebViewWindows and multipleWebViews API tests.
1127
1128         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
1129         (tst_QQuickWebView::multipleWebViewWindows):
1130         (tst_QQuickWebView::multipleWebViews):
1131         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
1132         (WebKit::LayerTreeHostProxy::ensureRootLayer):
1133         (WebKit::LayerTreeHostProxy::purgeGLResources):
1134
1135 2012-01-10  Ryosuke Niwa  <rniwa@webkit.org>
1136
1137         Snow Leopard build fix.
1138
1139         * UIProcess/API/mac/PageClientImpl.h:
1140         * UIProcess/API/mac/PageClientImpl.mm:
1141
1142 2012-01-10  Anders Carlsson  <andersca@apple.com>
1143
1144         Hang opening movie that requires authentication
1145         https://bugs.webkit.org/show_bug.cgi?id=75989
1146
1147         Reviewed by Sam Weinig.
1148
1149         Change the way the keychain calls are processed to avoid deadlocks:
1150
1151         1. When a keychain call is made, the web process sends an asynchronous request message to the UI process,
1152            avoiding the need to bounce calls to the main thread (since CoreIPC only allows sending
1153            synchronous messages from the main thread). Incidentally, this fixes <rdar://problem/9428041>.
1154         2. The Web Process now waits on the calling thread, (for a condition variable to be signalled) for a reply message.
1155         3. The UI process handles the incoming message request message on the connection work queue and uses
1156            dispatch_async to a global dispatch queue where the keychain call is made.
1157            We use a global queue to prevent the connection work queue from blocking on the call.
1158         4. The UI process then sends an asynchronous reply message back to the web process. This message is sent from
1159            the global dispatch queue.
1160         5. The Web Process handles the reply message on the connection queue, adds the reply to a map and signals
1161            the condition variable that the web process is waiting on and the thread that made the keychain call
1162            can resume execution.
1163
1164         * Shared/mac/SecItemRequestData.cpp:
1165         (WebKit::SecItemRequestData::SecItemRequestData):
1166         (WebKit::SecItemRequestData::encode):
1167         (WebKit::SecItemRequestData::decode):
1168         * Shared/mac/SecItemRequestData.h:
1169         (WebKit::SecItemRequestData::type):
1170         Add a type to SecItemRequestData and encode/decode it.
1171
1172         * Shared/mac/SecItemResponseData.h:
1173         (WebKit::SecItemResponseData::resultObject):
1174         Make this return a reference so we can call leakRef() on it.
1175
1176         * Shared/mac/SecKeychainItemRequestData.cpp:
1177         (WebKit::SecKeychainItemRequestData::SecKeychainItemRequestData):
1178         (WebKit::SecKeychainItemRequestData::~SecKeychainItemRequestData):
1179         (WebKit::SecKeychainItemRequestData::attributeList):
1180         (WebKit::SecKeychainItemRequestData::encode):
1181         (WebKit::SecKeychainItemRequestData::decode):
1182         * Shared/mac/SecKeychainItemRequestData.h:
1183         (WebKit::SecKeychainItemRequestData::type):
1184         Add a type, and put the OwnPtr and OwnArrayPtr in a RefCounted struct so we can
1185         correctly copy this object.
1186
1187         * UIProcess/WebConnectionToWebProcess.cpp:
1188         (WebKit::WebConnectionToWebProcess::WebConnectionToWebProcess):
1189         Don't open the connection here, the WebProcessProxy object needs to add itself as a queue client before opening.
1190     
1191         * UIProcess/WebProcessProxy.cpp:
1192         (WebKit::WebProcessProxy::disconnect):
1193         Remove the WebProcessProxy object from the list of connection queue clients.
1194
1195         (WebKit::WebProcessProxy::didReceiveMessageOnConnectionWorkQueue):
1196         Call didReceiveWebProcessProxyMessageOnConnectionWorkQueue.
1197
1198         (WebKit::WebProcessProxy::didFinishLaunching):
1199         Add the WebProcessProxy as a queue client and open the connection.
1200
1201         * UIProcess/WebProcessProxy.h:
1202         WebProcessProxy should inherit from CoreIPC::Connection::QueueClient. Replace all individual keychain
1203         handler functions with two generic functions, secItemRequest and secKeychainItemRequest.
1204     
1205         * UIProcess/WebProcessProxy.messages.in:
1206         Replace individual keychain messages with SecItemRequest and SecKeychainItemRequest messages.
1207
1208         * UIProcess/mac/WebProcessProxyMac.mm:
1209         (WebKit::handleSecItemRequest):
1210         Call the right SecItem function depending on the request type and send back the result.
1211
1212         (WebKit::WebProcessProxy::secItemRequest):
1213         Dispatch handleSecItemRequest on a global dispatch queue.
1214
1215         (WebKit::handleSecKeychainItemRequest):
1216         Call the right SecKeychainItem function depending on the request type and send back the result.
1217         
1218         (WebKit::WebProcessProxy::secKeychainItemRequest):
1219         Dispatch handleSecKeychainItemRequest on a global dispatch queue.
1220         
1221         * WebKit2.xcodeproj/project.pbxproj:
1222         Update for added/removed files.
1223
1224         * WebProcess/WebProcess.h:
1225         Add secItemResponse and secKeychainItemResponse message handlers.
1226
1227         * WebProcess/WebProcess.messages.in:
1228         Add SecItemResponse and SecKeychainItemResponse messages.
1229
1230         * WebProcess/mac/CoreIPCClientRunLoop.h:
1231         * WebProcess/mac/CoreIPCClientRunLoop.mm:
1232         This is no longer needed.
1233
1234         * WebProcess/mac/KeychainItemShimMethods.h:
1235         * WebProcess/mac/KeychainItemShimMethods.mm:
1236         (WebKit::managedAttributeLists):
1237         Make this an atomically initialized static.
1238
1239         (WebKit::managedAttributeListsMutex):
1240         Add an atomically initialized mutex.
1241
1242         (WebKit::allocateAttributeListContents):
1243         Use the managedAttributeListsMutex to make this function callable from any thread.
1244
1245         (WebKit::managedKeychainItemContents):
1246         Make this an atomically initialized static.
1247         
1248         (WebKit::managedKeychainItemContentsMutex):
1249         Add an atomically initialized mutex.
1250
1251         (WebKit::allocateKeychainItemContentData):
1252         Use the managedAttributeListsMutex to make this function callable from any thread.
1253
1254         (WebKit::webFreeAttributeListContent):
1255         Use locking so this can be called from any thread.
1256
1257         (WebKit::webFreeKeychainItemContent):
1258         Ditto.
1259
1260         (WebKit::responseMap):
1261         Add responseMap thread-safe singleton for holding incoming responses.
1262
1263         (WebKit::generateSecKeychainItemRequestID):
1264         Return a unique item request id, using OSAtomicIncrement64Barrier for atomicity.
1265
1266         (WebKit::didReceiveSecKeychainItemResponse):
1267         Pass the response over the response map.
1268
1269         (WebKit::sendSeqKeychainItemRequest):
1270         Send a request message and wait for a response using ResponseMap::waitForResponse.
1271
1272         (WebKit::webSecKeychainItemCopyContent):
1273         Send a request using sendSeqKeychainItemRequest.
1274
1275         (WebKit::webSecKeychainItemCreateFromContent):
1276         Ditto.
1277
1278         (WebKit::webSecKeychainItemModifyContent):
1279         Ditto.
1280
1281         * WebProcess/mac/KeychainShimResponseMap.h:
1282         New thread-safe helper class that stores a map of responses and lets client wait for a response
1283         with a given ID.
1284
1285         (KeychainShimResponseMap::waitForResponse):
1286         Wait until the response is available in the hash map, then return it.
1287
1288         (KeychainShimResponseMap::didReceiveResponse):
1289         Add the response to the hash map and signal the condition variable.
1290
1291         * WebProcess/mac/SecItemShimMethods.h:
1292         * WebProcess/mac/SecItemShimMethods.mm:
1293         (WebKit::responseMap):
1294         Add responseMap thread-safe singleton for holding incoming responses.
1295
1296         (WebKit::generateSecItemRequestID):
1297         Return a unique item request id, using OSAtomicIncrement64Barrier for atomicity.
1298
1299         (WebKit::didReceiveSecItemResponse):
1300         Pass the response over the response map.
1301
1302         (WebKit::sendSeqItemRequest):
1303         Send a request message and wait for a response using ResponseMap::waitForResponse.
1304
1305         (WebKit::webSecItemCopyMatching):
1306         Send a request using sendSeqItemRequest.
1307
1308         (WebKit::webSecItemAdd):
1309         Ditto.
1310
1311         (WebKit::webSecItemUpdate):
1312         Ditto.
1313
1314         (WebKit::webSecItemDelete):
1315         Ditto.
1316
1317         * WebProcess/mac/WebProcessMac.mm:
1318         (WebKit::WebProcess::secItemResponse):
1319         Call didReceiveSecItemResponse.
1320
1321         (WebKit::WebProcess::secKeychainItemResponse):
1322         Call didReceiveSecKeychainItemResponse.
1323
1324 2012-01-10  Anders Carlsson  <andersca@apple.com>
1325
1326         DispatchOnConnectionQueue messages should have a Connection parameter
1327         https://bugs.webkit.org/show_bug.cgi?id=75986
1328
1329         Reviewed by Adam Roben.
1330
1331         Message handlers for messages with the DispatchOnConnectionQueue should have a CoreIPC::Connection
1332         parameter, making it easier to send messages back over that connection.
1333
1334         * Platform/CoreIPC/HandleMessage.h:
1335         (CoreIPC::callMemberFunction):
1336         (CoreIPC::handleMessageOnConnectionQueue):
1337         * Scripts/webkit2/messages.py:
1338         (async_case_statement):
1339         (generate_message_handler):
1340         * Scripts/webkit2/messages_unittest.py:
1341         * WebProcess/WebPage/EventDispatcher.cpp:
1342         (WebKit::EventDispatcher::wheelEvent):
1343         (WebKit::EventDispatcher::gestureEvent):
1344         * WebProcess/WebPage/EventDispatcher.h:
1345         * WebProcess/WebProcess.cpp:
1346         (WebKit::WebProcess::pluginProcessCrashed):
1347         * WebProcess/WebProcess.h:
1348
1349 2012-01-10  Chris Marrin  <cmarrin@apple.com>
1350
1351         Turn off the FilterTrigger in WebKit and WebKit2
1352         https://bugs.webkit.org/show_bug.cgi?id=75914
1353
1354         Reviewed by Simon Fraser.
1355
1356         Implement allowedCompositingTriggers to turn on all compositing triggers except FilterTrigger.
1357
1358         * WebProcess/WebCoreSupport/WebChromeClient.h:
1359         (WebKit::WebChromeClient::allowedCompositingTriggers):
1360
1361 2012-01-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1362
1363         Unreviewed potential Mac WK2 build fix.
1364
1365         * UIProcess/PageClient.h: forward declare WebGestureEvent.
1366
1367 2012-01-10  Csaba Osztrogonác  <ossy@webkit.org>
1368
1369         Unreviewed, rolling out an accidental commit r104569.
1370
1371         * Shared/EditorState.cpp:
1372         (WebKit::EditorState::encode):
1373         (WebKit::EditorState::decode):
1374         * Shared/EditorState.h:
1375         * UIProcess/API/qt/qquickwebview.cpp:
1376         (QQuickWebView::inputMethodQuery):
1377         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1378         (WebKit::WebEditorClient::respondToChangedSelection):
1379         * WebProcess/WebPage/WebPage.cpp:
1380         (WebKit::WebPage::editorState):
1381
1382 2012-01-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1383
1384         Unreviewed potential Mac WK2 build fix.
1385
1386         * UIProcess/API/mac/PageClientImpl.h:
1387         * UIProcess/API/mac/PageClientImpl.mm:
1388         (WebKit::PageClientImpl::doneWithGestureEvent):
1389
1390 2012-01-10  Rafael Brandao  <rafael.lobo@openbossa.org>
1391
1392         [Qt][WK2] Add font-related API tests for QWebPreferences
1393         https://bugs.webkit.org/show_bug.cgi?id=75739
1394
1395         Reviewed by Zoltan Herczeg.
1396
1397         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
1398         * UIProcess/API/qt/tests/qmltests/common/font-preferences.html: Added.
1399
1400 2012-01-10  Simon Hausmann  <simon.hausmann@nokia.com>
1401
1402         [Qt] Fix failing WK2 layout tests after r104557
1403
1404         Reviewed by Kenneth Rohde Christiansen.
1405
1406         * UIProcess/WebPageProxy.cpp:
1407         (WebKit::WebPageProxy::didReceiveEvent): Add missing break to not
1408         handle mouseDown as gesture event.
1409
1410 2012-01-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1411
1412         Unreviewed buildfix.
1413
1414         * UIProcess/WebPageProxy.h:
1415
1416 2012-01-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1417
1418         Implement the input panel request/close handling
1419
1420         Reviewed by Simon Hausmann.
1421
1422         With the current patch we only request the input panel as a
1423         response to a user tap. Close requests, on the other hand,
1424         is always respected.
1425
1426         As multiple show/hide requests can happen while processing
1427         the tap gesture, input panel visibility changes are postponed
1428         until the tap gesture ends.
1429
1430         The input panel will become visible if the WebCore editor is
1431         in canEdit mode and thus work for content-editable, meaning
1432         that it won't close the input panel if you click on a link
1433         (eg. editCommand) while in content-editable mode.
1434
1435         * UIProcess/PageClient.h:
1436         * UIProcess/WebPageProxy.cpp:
1437         (WebKit::WebPageProxy::handleGestureEvent):
1438         (WebKit::WebPageProxy::editorStateChanged):
1439         (WebKit::WebPageProxy::didReceiveEvent):
1440
1441             Add a new doneWithGestureEvent method to the PageClient
1442             as well as add a updateTextInputState similar to that of mac.
1443
1444         * UIProcess/WebPageProxy.h:
1445         * UIProcess/qt/QtPageClient.cpp:
1446         (QtPageClient::updateTextInputState):
1447         (QtPageClient::doneWithGestureEvent):
1448
1449             Propagate the new events to the Qt EventHandler.
1450
1451         * UIProcess/qt/QtPageClient.h:
1452         * UIProcess/qt/QtWebPageEventHandler.cpp:
1453         * UIProcess/qt/QtWebPageEventHandler.h:
1454         (QtWebPageEventHandler::QtWebPageEventHandler):
1455         (QtWebPageEventHandler::handleSingleTapEvent):
1456         (setInputPanelVisible):
1457         (QtWebPageEventHandler::updateTextInputState):
1458         (QtWebPageEventHandler::doneWithGestureEvent):
1459
1460             Handle postponing of the input method visibility change
1461             and the actual showing/hiding.
1462
1463 2012-01-10  Eunmi Lee  <eunmi15.lee@samsung.com>
1464
1465         [EFL][WK2] Remove codes to move and resize the clip.
1466         https://bugs.webkit.org/show_bug.cgi?id=75428
1467
1468         Reviewed by Andreas Kling.
1469
1470         Remove codes to move and resize the clip because clip is not used now.
1471         We have to show whole area of evas_object_image so we don't have to
1472         clip any area.
1473         In the WebKit1 Efl, the clip is used to clip the area to show during
1474         weak zoom, so we can use codes to manipulate the clip when we want to
1475         implement weak zoom for WebKit2 Efl.
1476
1477         * UIProcess/API/efl/ewk_view.cpp:
1478         (_ewk_view_smart_calculate):
1479
1480 2012-01-09  Andras Becsi  <andras.becsi@nokia.com>
1481
1482         [Qt][WK2] Pinch zoom should affect the page size
1483         https://bugs.webkit.org/show_bug.cgi?id=74601
1484
1485         Reviewed by Kenneth Rohde Christiansen.
1486
1487         The current implementation uses the scale property of the QQuickWebPage
1488         to scale the page in response to pinch gestures.
1489         However for layout and anchoring to work correctly in QML, pinching needs
1490         to change the page size.
1491         This patch applies the pinch scale to the page size and to the transformation
1492         matrix of the drawing area.
1493         Thus the page item's coordinate system is no longer a direct representation
1494         of the WebCore::Page coordinate system and it is no longer suitable as
1495         an inertial frame of reference for input events. The event propagation had
1496         to be moved to the QQuickWebView and the positions translated to content
1497         coordinates when NativeWebEvents are created.
1498         Re-landing with fixed event delivery for the test infrastructure.
1499
1500         * Shared/NativeWebMouseEvent.h:
1501         * Shared/NativeWebTouchEvent.h:
1502         * Shared/NativeWebWheelEvent.h:
1503         * Shared/qt/NativeWebMouseEventQt.cpp:
1504         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
1505         * Shared/qt/NativeWebTouchEventQt.cpp:
1506         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
1507         * Shared/qt/NativeWebWheelEventQt.cpp:
1508         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
1509         * Shared/qt/WebEventFactoryQt.cpp:
1510         (WebKit::WebEventFactory::createWebMouseEvent):
1511         (WebKit::WebEventFactory::createWebWheelEvent):
1512         (WebKit::WebEventFactory::createWebTouchEvent):
1513         * Shared/qt/WebEventFactoryQt.h:
1514         * UIProcess/API/qt/qquickwebpage.cpp:
1515         (QQuickWebPage::geometryChanged):
1516         (QQuickWebPagePrivate::QQuickWebPagePrivate):
1517         (QQuickWebPagePrivate::paintToCurrentGLContext):
1518         (QQuickWebPage::usesTraditionalDesktopBehaviour):
1519         (QQuickWebPage::setUsesTraditionalDesktopBehaviour):
1520         (QQuickWebPage::eventHandler):
1521         (QQuickWebPage::setContentSize):
1522         (QQuickWebPage::contentSize):
1523         (QQuickWebPage::setContentScale):
1524         (QQuickWebPage::contentScale):
1525         (QQuickWebPage::transformFromItem):
1526         (QQuickWebPage::transformToItem):
1527         (QQuickWebPagePrivate::updateSize):
1528         * UIProcess/API/qt/qquickwebpage_p.h:
1529         * UIProcess/API/qt/qquickwebpage_p_p.h:
1530         * UIProcess/API/qt/qquickwebview.cpp:
1531         (QQuickWebViewPrivate::enableMouseEvents):
1532         (QQuickWebViewPrivate::disableMouseEvents):
1533         (QQuickWebViewPrivate::loadDidCommit):
1534         (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
1535         (QQuickWebViewPrivate::didChangeContentsSize):
1536         (QQuickWebViewPrivate::didChangeViewportProperties):
1537         (QQuickWebViewPrivate::pageDidRequestScroll):
1538         (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
1539         (QQuickWebViewPrivate::PostTransitionState::apply):
1540         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
1541         (QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour):
1542         (QQuickWebViewExperimental::useTraditionalDesktopBehaviour):
1543         (QQuickWebView::mapToWebContent):
1544         (QQuickWebView::mapRectToWebContent):
1545         (QQuickWebView::mapFromWebContent):
1546         (QQuickWebView::mapRectFromWebContent):
1547         (QQuickWebView::geometryChanged):
1548         (QQuickWebView::keyPressEvent):
1549         (QQuickWebView::keyReleaseEvent):
1550         (QQuickWebView::inputMethodEvent):
1551         (QQuickWebView::focusInEvent):
1552         (QQuickWebView::focusOutEvent):
1553         (QQuickWebView::touchEvent):
1554         (QQuickWebView::mousePressEvent):
1555         (QQuickWebView::mouseMoveEvent):
1556         (QQuickWebView::mouseReleaseEvent):
1557         (QQuickWebView::mouseDoubleClickEvent):
1558         (QQuickWebView::wheelEvent):
1559         (QQuickWebView::hoverEnterEvent):
1560         (QQuickWebView::hoverMoveEvent):
1561         (QQuickWebView::hoverLeaveEvent):
1562         (QQuickWebView::dragMoveEvent):
1563         (QQuickWebView::dragEnterEvent):
1564         (QQuickWebView::dragLeaveEvent):
1565         (QQuickWebView::dropEvent):
1566         (QQuickWebView::event):
1567         * UIProcess/API/qt/qquickwebview_p.h:
1568         * UIProcess/API/qt/qquickwebview_p_p.h:
1569         * UIProcess/API/qt/qwebviewportinfo.cpp:
1570         (QWebViewportInfo::contentsSize):
1571         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
1572         (tst_QQuickWebView::scrollRequest):
1573         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
1574         (WebKit::QtPinchGestureRecognizer::recognize):
1575         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1576         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
1577         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
1578         (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
1579         (WebKit::QtViewportInteractionEngine::event):
1580         (WebKit::QtViewportInteractionEngine::wheelEvent):
1581         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
1582         (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
1583         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
1584         (WebKit::QtViewportInteractionEngine::applyConstraints):
1585         (WebKit::QtViewportInteractionEngine::currentCSSScale):
1586         (WebKit::QtViewportInteractionEngine::panGestureStarted):
1587         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
1588         (WebKit::QtViewportInteractionEngine::panGestureEnded):
1589         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
1590         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
1591         (WebKit::QtViewportInteractionEngine::scaleContent):
1592         * UIProcess/qt/QtViewportInteractionEngine.h:
1593         * UIProcess/qt/QtWebPageEventHandler.cpp:
1594         (QtWebPageEventHandler::handleEvent):
1595         (QtWebPageEventHandler::handleMouseMoveEvent):
1596         (QtWebPageEventHandler::handleMousePressEvent):
1597         (QtWebPageEventHandler::handleMouseReleaseEvent):
1598         (QtWebPageEventHandler::handleWheelEvent):
1599         (QtWebPageEventHandler::handleHoverLeaveEvent):
1600         (QtWebPageEventHandler::handleHoverMoveEvent):
1601         (QtWebPageEventHandler::handleDragEnterEvent):
1602         (QtWebPageEventHandler::handleDragMoveEvent):
1603         (QtWebPageEventHandler::handleDropEvent):
1604         (QtWebPageEventHandler::handleSingleTapEvent):
1605         (QtWebPageEventHandler::handleDoubleTapEvent):
1606         (QtWebPageEventHandler::touchEvent):
1607         * UIProcess/qt/QtWebPageEventHandler.h:
1608
1609 2012-01-09  Eunmi Lee  <eunmi15.lee@samsung.com>
1610
1611         [EFL][WK2] Set color_set function to the clipped smart class.
1612         https://bugs.webkit.org/show_bug.cgi?id=75286
1613
1614         Reviewed by Andreas Kling.
1615
1616         Set _ewk_view_smart_color_set() function to the clipped smart class's color_set,
1617         so application can set webpage's background color using evas_object_color_set() API.
1618
1619         * UIProcess/API/efl/ewk_view.cpp:
1620         (_ewk_view_smart_color_set):
1621         (ewk_view_smart_class_init):
1622
1623 2012-01-08  Dan Bernstein  <mitz@apple.com>
1624
1625         REGRESSION (r103859): WKViews leak
1626         https://bugs.webkit.org/show_bug.cgi?id=75805
1627
1628         The flags changed event monitor added in r103859 was retaining the WKView (as it references
1629         self in the handler block), causing it to leak.
1630
1631         * UIProcess/API/mac/WKView.mm:
1632         (-[WKView dealloc]): Moved call to remove the flags changed event monitor from here...
1633         (-[WKView viewDidMoveToWindow]): ...to here. Moved call to add the flags changed event
1634         monitor to here from...
1635         (-[WKView initWithFrame:contextRef:pageGroupRef:]): ...here.
1636
1637 2012-01-06  Mark Rowe  <mrowe@apple.com>
1638
1639         REGRESSION (WebKit2): Save as PDF no longer generates links to URLs
1640         <http://webkit.org/b/65076> / <rdar://problem/9606246>
1641
1642         WebKit2 printing works by having the web process render the page content to a PDF. The PDF
1643         data is then shipped to the UI process which will render it in to the printing graphics context.
1644         Links were being lost because the API used to do the rendering of the PDF in to the printing
1645         graphics context, CGContextDrawPDFPage, did not preserve the links that were present in the
1646         PDF content received from the web process.
1647
1648         To fix this we switch to using PDFKit for drawing the PDF in to the printing graphics context.
1649         PDFKit provides the ability for us to iterate over the links in the PDF content ourselves and
1650         add links in to the printing graphics context.
1651
1652         Reviewed by Alexey Proskuryakov.
1653
1654         * UIProcess/API/mac/WKPrintingView.h:
1655         * UIProcess/API/mac/WKPrintingView.mm:
1656         (pdfAnnotationLinkClass): Look up the PDFAnnotationLink class from PDFKit as WebKit2 loads PDFKit lazily.
1657         (pdfDocumentClass): Ditto.
1658         (-[WKPrintingView _drawPDFDocument:page:atPoint:]): Switch to using the PDFKit equivalents of several types.
1659         Iterate over the annotations present in the PDFPage, calling CGPDFContextSetURLForRect for each PDFAnnotationLink
1660         that we find.
1661         (-[WKPrintingView _drawPreview:]): Create an NSData to feed to PDFDocument.
1662         (-[WKPrintingView drawRect:]): Ditto.
1663         * WebKit2Prefix.h: Add the usual workaround to make Objective-C exceptions compile when C++ exception handling is disabled.
1664
1665 2012-01-06  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
1666
1667         [Qt] [WK2] Minibrowser leaks memory ~6-7Mb per reload
1668         https://bugs.webkit.org/show_bug.cgi?id=75746
1669
1670         Reset WebGraphicsLayer::m_layerTreeTileClient of all dependent 
1671         layers from ~LayerTreeHostQt(). This replaces r103760 which
1672         causes leaks of GraphicsLayerTextureMapper objects on UI side. 
1673
1674         Reviewed by Noam Rosenthal.
1675
1676         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
1677         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
1678         (WebCore::WebGraphicsLayer::setLayerTreeTileClient):
1679         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
1680         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
1681         (WebKit::LayerTreeHostQt::~LayerTreeHostQt):
1682
1683 2012-01-06  Alexey Proskuryakov  <ap@apple.com>
1684
1685         [Mac] Thread verifier assertions when printing
1686         https://bugs.webkit.org/show_bug.cgi?id=75738
1687
1688         Reviewed by Sam Weinig.
1689
1690         * UIProcess/API/mac/WKPrintingView.mm:
1691         (-[WKPrintingView dealloc]): Dealloc in main thread, so that WebFrameProxy doesn't get
1692         deref'ed from a secondary one.
1693         (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): This method calls out to client,
1694         which only expects that on main thread.
1695         (-[WKPrintingView knowsPageRange:]): Call _adjustPrintingMarginsForHeaderAndFooter on main
1696         thread.
1697
1698 2012-01-06  Alexey Proskuryakov  <ap@apple.com>
1699
1700         Need to allow SCNetworkReachability service in sandbox profile
1701         https://bugs.webkit.org/show_bug.cgi?id=75724
1702         <rdar://problem/10652415>
1703
1704         Reviewed by Mark Rowe.
1705
1706         * WebProcess/com.apple.WebProcess.sb:
1707
1708 2012-01-06  Benjamin Poulain  <bpoulain@apple.com>
1709
1710         [Mac] Sort the resources of WebKit2.xcodeproj
1711         https://bugs.webkit.org/show_bug.cgi?id=75636
1712
1713         Reviewed by Andreas Kling.
1714
1715         * WebKit2.xcodeproj/project.pbxproj:
1716
1717 2012-01-06  Rafael Brandao  <rafael.lobo@openbossa.org>
1718
1719         [Qt][WK2] QQuickWebView breaks when an empty url is loaded
1720         https://bugs.webkit.org/show_bug.cgi?id=75445
1721
1722         Reviewed by Tor Arne Vestbø.
1723
1724         * UIProcess/API/qt/qquickwebview.cpp:
1725         (QQuickWebView::load):
1726         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml: Check if a request to load
1727         an empty url is ignored. 'about:blank' should be used instead to load an empty page.
1728         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
1729
1730 2012-01-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1731
1732         [Qt] Move listing of include paths and libs to pri files in sources
1733
1734         Includepaths are sometimes modified by non-Qt contributors so keeping
1735         them in files inside Sources makes it more likely that they are updated
1736         along with project files for the other ports.
1737
1738         Using pri files instead of prf files for this also has the benefit that
1739         the include() from the main target file can be parsed and followed by
1740         Qt Creator -- something that does not work with load().
1741
1742         Dependency from a target to a library through the WEBKIT variable are
1743         handled through forwarding-files in Tools/qmake/mkspecs/modules, which
1744         set the source root of the module and include the right pri file.
1745
1746         Ideally we'd use the variant of include() that takes an optional
1747         namespace to read the variables into, or the fromfile() function,
1748         but both of these add an overhead of about 40% on the total qmake
1749         runtime, due to making a deep copy of all the variables in the
1750         project or re-reading all the prf files from scratch.
1751
1752         Reviewed by Simon Hausmann.
1753         Reviewed by Ossy.
1754
1755         * Target.pri:
1756         * WebKit2.pri: Renamed from Tools/qmake/mkspecs/features/webkit2.prf.
1757
1758 2012-01-06  Zeno Albisser  <zeno@webkit.org>
1759
1760         [Qt][WK2] Add test for application URL schemes.
1761         https://bugs.webkit.org/show_bug.cgi?id=74933
1762
1763         Reviewed by Kenneth Rohde Christiansen.
1764
1765         * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml: Added.
1766         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
1767
1768 2012-01-05  Dan Bernstein  <mitz@apple.com>
1769
1770         <rdar://problem/10633760> Update copyright strings
1771
1772         Reviewed by Mark Rowe.
1773
1774         * Info.plist:
1775         * PluginProcess/Info.plist:
1776         * WebProcess/Info.plist:
1777
1778 2012-01-05  Anders Carlsson  <andersca@apple.com>
1779
1780         Crash when trying to invalidate the NPRuntimeObjectMap for a plug-in in a subframe
1781         https://bugs.webkit.org/show_bug.cgi?id=75667
1782         <rdar://problem/10389454>
1783
1784         Reviewed by Kevin Decker.
1785
1786         NPRuntimeObjectMap::invalidate is called whenever a plug-in view is destroyed. If invalidate is called for an object map
1787         whose plug-in has a null frame, we'd crash.
1788
1789         The plug-in will have a null frame if the plug-in view is destroyed because its containing frame has been removed from the document,
1790         and if the plug-in view is being destroyed asynchronously due to the plug-in itself calling JavaScript that will remove the frame
1791         (see PluginView::unprotectPluginFromDestruction).
1792
1793         The reason NPRuntimeObjectMap::invalidate will crash when the frame is null is because we were trying to access the frame's global
1794         object, causing a null dereference. The reason we were trying to get at the frame's global object was to create a Strong handle to
1795         a JSNPObject so we could stick the object in a vector so we could later iterate over the vector elements and call invalidate() on
1796         each JSNPObject which will end up releasing the underlying NPObject.
1797
1798         However, it turns out that we don't need to stick the JSNPObject in a vector; we can just get the underlying NPObject directly and
1799         stick that in a vector and then iterate over the NPObjects, releasing them.
1800
1801         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1802         (WebKit::NPRuntimeObjectMap::invalidate):
1803
1804 2012-01-05  Alexey Proskuryakov  <ap@apple.com>
1805
1806         REGRESSION (r98912-r99538): Crash in WebKit::WebFrameLoaderClient::didDetectXSS
1807         https://bugs.webkit.org/show_bug.cgi?id=75578
1808
1809         Reviewed by Daniel Bates.
1810
1811         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1812         (WebKit::InjectedBundlePageLoaderClient::didDetectXSSForFrame):
1813         Check for a correct struct member existence.
1814
1815 2012-01-05  Alexey Proskuryakov  <ap@apple.com>
1816
1817         WK2: Safari fails to open a PostScript file in Preview from context menu
1818         https://bugs.webkit.org/show_bug.cgi?id=75643
1819         <rdar://problem/9823430>
1820
1821         Reviewed by Dan Bernstein.
1822
1823         * UIProcess/API/mac/PDFViewController.mm: (WebKit::PDFViewController::setPDFDocumentData):
1824         Append ".pdf" to file name when converting data, as suggested file name is created for
1825         original MIME type.
1826
1827 2012-01-05  Zeno Albisser  <zeno@webkit.org>
1828
1829         [Qt][WK2] Implement custom URL schemes defined in QML.
1830         https://bugs.webkit.org/show_bug.cgi?id=74931
1831
1832         Allow creation of custom UrlSchemeDelegates from QML.
1833         A UrlSchemeDelegate contains a handler signal that is triggered
1834         when a url matching the defined scheme is requested.
1835         To allow for this a derivation of QNetworkAccessManager
1836         is necessary.
1837         The request is then handled in QML/JS and a reply
1838         is sent back from the UIProcess to the WebProcess.
1839
1840         Reviewed by Kenneth Rohde Christiansen.
1841
1842         * Shared/qt/QtNetworkReplyData.cpp: Added.
1843         (WebKit::QtNetworkReplyData::QtNetworkReplyData):
1844         (WebKit::QtNetworkReplyData::encode):
1845         (WebKit::QtNetworkReplyData::decode):
1846         * Shared/qt/QtNetworkReplyData.h: Added.
1847         * Shared/qt/QtNetworkRequestData.cpp: Added.
1848         (WebKit::QtNetworkRequestData::QtNetworkRequestData):
1849         (WebKit::QtNetworkRequestData::encode):
1850         (WebKit::QtNetworkRequestData::decode):
1851         * Shared/qt/QtNetworkRequestData.h: Added.
1852         * Target.pri:
1853         * UIProcess/API/qt/qquicknetworkreply.cpp: Added.
1854         (QQuickNetworkReply::QQuickNetworkReply):
1855         (QQuickNetworkReply::contentType):
1856         (QQuickNetworkReply::setContentType):
1857         (QQuickNetworkReply::operation):
1858         (QQuickNetworkReply::setOperation):
1859         (QQuickNetworkReply::contentDisposition):
1860         (QQuickNetworkReply::setContentDisposition):
1861         (QQuickNetworkReply::location):
1862         (QQuickNetworkReply::setLocation):
1863         (QQuickNetworkReply::lastModified):
1864         (QQuickNetworkReply::setLastModified):
1865         (QQuickNetworkReply::cookie):
1866         (QQuickNetworkReply::setCookie):
1867         (QQuickNetworkReply::userAgent):
1868         (QQuickNetworkReply::setUserAgent):
1869         (QQuickNetworkReply::server):
1870         (QQuickNetworkReply::setServer):
1871         (QQuickNetworkReply::data):
1872         (QQuickNetworkReply::setData):
1873         (QQuickNetworkReply::send):
1874         (QQuickNetworkReply::networkRequestData):
1875         (QQuickNetworkReply::setNetworkRequestData):
1876         (QQuickNetworkReply::networkReplyData):
1877         * UIProcess/API/qt/qquicknetworkreply_p.h: Added.
1878         * UIProcess/API/qt/qquicknetworkrequest_p.h: Added.
1879         * UIProcess/API/qt/qquickurlschemedelegate.cpp: Added.
1880         (QQuickUrlSchemeDelegate::QQuickUrlSchemeDelegate):
1881         (QQuickUrlSchemeDelegate::scheme):
1882         (QQuickUrlSchemeDelegate::setScheme):
1883         (QQuickUrlSchemeDelegate::request):
1884         (QQuickUrlSchemeDelegate::reply):
1885         * UIProcess/API/qt/qquickurlschemedelegate_p.h: Added.
1886         * UIProcess/API/qt/qquickwebview.cpp:
1887         (QQuickWebViewExperimental::QQuickWebViewExperimental):
1888         (QQuickWebViewExperimental::schemeDelegates_At):
1889         (QQuickWebViewExperimental::schemeDelegates_Append):
1890         (QQuickWebViewExperimental::schemeDelegates_Count):
1891         (QQuickWebViewExperimental::schemeDelegates_Clear):
1892         (QQuickWebViewExperimental::schemeDelegates):
1893         (QQuickWebViewExperimental::invokeApplicationSchemeHandler):
1894         (QQuickWebViewExperimental::sendApplicationSchemeReply):
1895         * UIProcess/API/qt/qquickwebview_p.h:
1896         * UIProcess/WebPageProxy.h:
1897         * UIProcess/WebPageProxy.messages.in:
1898         * UIProcess/qt/QtPageClient.cpp:
1899         (QtPageClient::handleApplicationSchemeRequest):
1900         * UIProcess/qt/QtPageClient.h:
1901         * UIProcess/qt/WebPageProxyQt.cpp:
1902         (WebKit::WebPageProxy::registerApplicationScheme):
1903         (WebKit::WebPageProxy::resolveApplicationSchemeRequest):
1904         (WebKit::WebPageProxy::sendApplicationSchemeReply):
1905         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1906         (WebKit::WebFrameLoaderClient::createNetworkingContext):
1907         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
1908         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
1909         * WebProcess/WebPage/WebPage.h:
1910         * WebProcess/WebPage/WebPage.messages.in:
1911         * WebProcess/WebPage/qt/WebPageQt.cpp:
1912         (WebKit::WebPage::registerApplicationScheme):
1913         (WebKit::WebPage::receivedApplicationSchemeRequest):
1914         (WebKit::WebPage::applicationSchemeReply):
1915         * WebProcess/qt/QtNetworkAccessManager.cpp: Added.
1916         (WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
1917         (WebKit::QtNetworkAccessManager::obtainOriginatingWebPage):
1918         (WebKit::QtNetworkAccessManager::createRequest):
1919         (WebKit::QtNetworkAccessManager::registerApplicationScheme):
1920         * WebProcess/qt/QtNetworkAccessManager.h: Added.
1921         * WebProcess/qt/QtNetworkReply.cpp: Added.
1922         (WebKit::QtNetworkReply::QtNetworkReply):
1923         (WebKit::QtNetworkReply::setData):
1924         (WebKit::QtNetworkReply::setReplyData):
1925         (WebKit::QtNetworkReply::readData):
1926         (WebKit::QtNetworkReply::bytesAvailable):
1927         (WebKit::QtNetworkReply::setHeader):
1928         (WebKit::QtNetworkReply::abort):
1929         (WebKit::QtNetworkReply::close):
1930         (WebKit::QtNetworkReply::setReadBufferSize):
1931         (WebKit::QtNetworkReply::canReadLine):
1932         (WebKit::QtNetworkReply::finalize):
1933         * WebProcess/qt/QtNetworkReply.h: Added.
1934         * WebProcess/qt/WebProcessQt.cpp:
1935         (WebKit::WebProcess::platformInitializeWebProcess):
1936
1937 2012-01-05  Fady Samuel  <fsamuel@chromium.org>
1938
1939         Move scalePageBy from eventSender to window.internals
1940         https://bugs.webkit.org/show_bug.cgi?id=64512
1941
1942         Reviewed by Simon Fraser.
1943
1944         * win/WebKit2.def:
1945         * win/WebKit2CFLite.def:
1946
1947 2012-01-05  Alexander Færøy  <alexander.faeroy@nokia.com>
1948
1949         Pass WebFrame instead of WebCore::Frame to the WebKit2 specific FrameNetworkingContext
1950         https://bugs.webkit.org/show_bug.cgi?id=75550
1951
1952         Make the WebKit2 FrameNetworkingContext implementation store the
1953         WebFrame instead of the WebCore::Frame as this is needed for the Qt
1954         port to implement a.o. HTTP autentication and SSL support.
1955
1956         As the WebFrameNetworkingContext is partly shared across all WebKit2 ports,
1957         all port specific files have been modified.
1958
1959         For the Qt implementation of FrameNetworkingContext, we also set a
1960         property to the originatingObject for the page ID. We also switch to
1961         using an OwnPtr instead of a raw C++ pointer for the
1962         m_originatingObject member.
1963
1964         Based on original patch by Peter Hartmann.
1965
1966         Reviewed by Kenneth Rohde Christiansen.
1967
1968         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1969         (WebKit::WebFrameLoaderClient::createNetworkingContext):
1970         * WebProcess/WebCoreSupport/efl/WebFrameNetworkingContext.h:
1971         (WebFrameNetworkingContext::create):
1972         (WebFrameNetworkingContext::WebFrameNetworkingContext):
1973         * WebProcess/WebCoreSupport/gtk/WebFrameNetworkingContext.h:
1974         (WebFrameNetworkingContext::create):
1975         (WebFrameNetworkingContext::WebFrameNetworkingContext):
1976         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
1977         (WebKit::WebFrameNetworkingContext::create):
1978         (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext):
1979         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
1980         (WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext):
1981         (WebCore::WebFrameNetworkingContext::~WebFrameNetworkingContext):
1982         (WebCore::WebFrameNetworkingContext::create):
1983         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
1984         * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h:
1985         (WebFrameNetworkingContext::create):
1986         (WebFrameNetworkingContext::WebFrameNetworkingContext):
1987
1988 2012-01-05  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1989
1990         [Qt] Implement QQuickWebView::inputMethodQuery
1991
1992         Reviewed by Simon Hausmann.
1993
1994         Implement the current Qt5 queries of inputMethodQuery.
1995
1996         * UIProcess/API/qt/qquickwebview.cpp:
1997         (QQuickWebView::inputMethodQuery):
1998         * UIProcess/API/qt/qquickwebview_p.h:
1999
2000 2012-01-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2001
2002         [GTK] Add methods to get/set the WebView zoom level to WebKit2 GTK+ API
2003         https://bugs.webkit.org/show_bug.cgi?id=75248
2004
2005         Reviewed by Gustavo Noronha Silva.
2006
2007         It uses the page zoom factor unconditionally for now.
2008
2009         * UIProcess/API/gtk/WebKitWebView.cpp:
2010         (webkitWebViewSetProperty):
2011         (webkitWebViewGetProperty):
2012         (webkit_web_view_class_init): Add WebKitWebView:zoom-level
2013         property.
2014         (webkit_web_view_set_zoom_level): Set current zoom level.
2015         (webkit_web_view_get_zoom_level): Get current zoom level.
2016         * UIProcess/API/gtk/WebKitWebView.h:
2017         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
2018         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2019         (testWebViewZoomLevel):
2020         (beforeAll):
2021
2022 2012-01-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2023
2024         [GTK] Rename webkit_web_view_load_alternate_html as webkit_web_view_replace_content in WebKit2 GTK+
2025         https://bugs.webkit.org/show_bug.cgi?id=75433
2026
2027         Reviewed by Martin Robinson.
2028
2029         * UIProcess/API/gtk/WebKitWebView.cpp:
2030         (webkitWebViewLoadFail): Use webkit_web_view_replace_content().
2031         (webkitWebViewLoadChanged): Do not emit load-changed signal when
2032         replacing content.
2033         (webkitWebViewLoadFailed): Do not emit load-failed signal when
2034         replacing content.
2035         (webkitWebViewSetEstimatedLoadProgress): Do not emit
2036         notify::estimated-load-progress signal when replacing content.
2037         (webkit_web_view_replace_content):
2038         * UIProcess/API/gtk/WebKitWebView.h:
2039         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
2040         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
2041         (beforeAll):
2042         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2043         (replaceContentTitleChangedCallback):
2044         (replaceContentLoadCallback):
2045         (testWebViewReplaceContent):
2046         (beforeAll):
2047         * UIProcess/API/gtk/tests/WebViewTest.cpp:
2048         (WebViewTest::replaceContent):
2049         * UIProcess/API/gtk/tests/WebViewTest.h:
2050
2051 2012-01-05  Keunsoon Lee  <keunsoon.lee@samsung.com>
2052
2053         [WK2][EFL] creating dummy functions for Download class on Efl port.
2054         https://bugs.webkit.org/show_bug.cgi?id=75246
2055
2056         dummy functions for Download class on Efl port
2057
2058         Reviewed by Hajime Morita.
2059
2060         * PlatformEfl.cmake: add new file to compile
2061         * WebProcess/Downloads/efl: Added.
2062         * WebProcess/Downloads/efl/DownloadEfl.cpp: Added.
2063         (WebKit::Download::start):
2064         (WebKit::Download::startWithHandle):
2065         (WebKit::Download::cancel):
2066         (WebKit::Download::platformInvalidate):
2067         (WebKit::Download::didDecideDestination):
2068         (WebKit::Download::platformDidFinish):
2069         (WebKit::Download::receivedCredential):
2070         (WebKit::Download::receivedRequestToContinueWithoutCredential):
2071         (WebKit::Download::receivedCancellation):
2072         (WebKit::Download::useCredential):
2073         (WebKit::Download::continueWithoutCredential):
2074         (WebKit::Download::cancelAuthenticationChallenge):
2075
2076 2012-01-04  Dan Bernstein  <mitz@apple.com>
2077
2078         Allow WebProcess to launch a client process and become its first WebProcess.
2079
2080         This is the WebKit2 part of fixing <http://webkit.org/b/75444> Debugging WebProcess requires running a UI process first and waiting to attach
2081
2082         Reviewed by Anders Carlsson.
2083
2084         * PluginProcess/mac/PluginProcessMainMac.mm:
2085         (WebKit::PluginProcessMain): Added a newline to stderr output.
2086         * UIProcess/Launcher/mac/EnvironmentVariables.cpp:
2087         (WebKit::EnvironmentVariables::preexistingProcessServiceNameKey): Added. Returns the name
2088         of the environment variable that optionally tells a UI processs to look for a preexisting
2089         web process instead of launching a new one.
2090         (WebKit::EnvironmentVariables::preexistingProcessTypeKey): Added. Returns the name of the
2091         environment variable that tells a UI process the type of the preexisting web process
2092         indicated by the other variable.
2093         * UIProcess/Launcher/mac/EnvironmentVariables.h:
2094         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2095         (WebKit::ProcessLauncher::launchProcess): Changed to look for a preexisting web process if
2096         the aforementioned environment variables are set and the preexisting process has not been
2097         used yet.
2098         * WebProcess/mac/WebProcessMainMac.mm:
2099         (WebKit::WebProcessMain): Changed to look for the -client-executable command-line option,
2100         and if present, launch the specified executable, setting variables in its environment that
2101         tell it to use this preexisting web process, then wait for it to send a send right to its
2102         listening port.
2103
2104 2012-01-04  Alexey Proskuryakov  <ap@apple.com>
2105
2106         First sentence is missing or clipped when printing a inline PDF
2107         https://bugs.webkit.org/show_bug.cgi?id=75514
2108         <rdar://problem/10640680>
2109
2110         Reviewed by Dan Bernstein.
2111
2112         * UIProcess/WebPageProxy.cpp:
2113         (WebKit::WebPageProxy::headerHeight):
2114         (WebKit::WebPageProxy::footerHeight):
2115         (WebKit::WebPageProxy::drawHeader):
2116         (WebKit::WebPageProxy::drawFooter):
2117         Do not ask the client about headers and footers when printing a PDF.
2118
2119 2012-01-04  Alexander Færøy  <alexander.faeroy@nokia.com>
2120
2121         [Qt] Fix test regressions after r104025
2122         https://bugs.webkit.org/show_bug.cgi?id=75545
2123
2124         Reviewed by Kenneth Rohde Christiansen.
2125
2126         * WebProcess/WebPage/WebPage.cpp:
2127         (WebKit::WebPage::editorState):
2128
2129 2012-01-04  Andras Becsi  <andras.becsi@nokia.com>
2130
2131         REGRESSION(r104028): Broke editing tests and event coordinates in desktop behaviour
2132         https://bugs.webkit.org/show_bug.cgi?id=75542
2133
2134
2135         [Qt][WK2] Pinch zoom should affect the page size
2136         https://bugs.webkit.org/show_bug.cgi?id=74601
2137
2138         Unreviewed roll-out.
2139
2140         * Shared/NativeWebMouseEvent.h:
2141         * Shared/NativeWebTouchEvent.h:
2142         * Shared/NativeWebWheelEvent.h:
2143         * Shared/qt/NativeWebMouseEventQt.cpp:
2144         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2145         * Shared/qt/NativeWebTouchEventQt.cpp:
2146         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
2147         * Shared/qt/NativeWebWheelEventQt.cpp:
2148         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
2149         * Shared/qt/WebEventFactoryQt.cpp:
2150         (WebKit::WebEventFactory::createWebMouseEvent):
2151         (WebKit::WebEventFactory::createWebWheelEvent):
2152         (WebKit::WebEventFactory::createWebTouchEvent):
2153         * Shared/qt/WebEventFactoryQt.h:
2154         * UIProcess/API/qt/qquickwebpage.cpp:
2155         (QQuickWebPage::keyPressEvent):
2156         (QQuickWebPage::keyReleaseEvent):
2157         (QQuickWebPage::inputMethodEvent):
2158         (QQuickWebPage::focusInEvent):
2159         (QQuickWebPage::focusOutEvent):
2160         (QQuickWebPage::mousePressEvent):
2161         (QQuickWebPage::mouseMoveEvent):
2162         (QQuickWebPage::mouseReleaseEvent):
2163         (QQuickWebPage::mouseDoubleClickEvent):
2164         (QQuickWebPage::wheelEvent):
2165         (QQuickWebPage::hoverEnterEvent):
2166         (QQuickWebPage::hoverMoveEvent):
2167         (QQuickWebPage::hoverLeaveEvent):
2168         (QQuickWebPage::dragMoveEvent):
2169         (QQuickWebPage::dragEnterEvent):
2170         (QQuickWebPage::dragLeaveEvent):
2171         (QQuickWebPage::dropEvent):
2172         (QQuickWebPage::geometryChanged):
2173         (QQuickWebPage::event):
2174         (QQuickWebPage::touchEvent):
2175         (QQuickWebPagePrivate::QQuickWebPagePrivate):
2176         (QQuickWebPagePrivate::paintToCurrentGLContext):
2177         * UIProcess/API/qt/qquickwebpage_p.h:
2178         * UIProcess/API/qt/qquickwebpage_p_p.h:
2179         * UIProcess/API/qt/qquickwebview.cpp:
2180         (QQuickWebViewPrivate::enableMouseEvents):
2181         (QQuickWebViewPrivate::disableMouseEvents):
2182         (QQuickWebViewPrivate::loadDidCommit):
2183         (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
2184         (QQuickWebViewPrivate::didChangeContentsSize):
2185         (QQuickWebViewPrivate::didChangeViewportProperties):
2186         (QQuickWebViewPrivate::pageDidRequestScroll):
2187         (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
2188         (QQuickWebViewPrivate::PostTransitionState::apply):
2189         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
2190         (QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour):
2191         (QQuickWebViewExperimental::useTraditionalDesktopBehaviour):
2192         (QQuickWebView::geometryChanged):
2193         (QQuickWebView::focusInEvent):
2194         (QQuickWebView::focusOutEvent):
2195         * UIProcess/API/qt/qquickwebview_p.h:
2196         * UIProcess/API/qt/qquickwebview_p_p.h:
2197         * UIProcess/API/qt/qwebviewportinfo.cpp:
2198         (QWebViewportInfo::contentsSize):
2199         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2200         (tst_QQuickWebView::scrollRequest):
2201         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
2202         (WebKit::QtPinchGestureRecognizer::recognize):
2203         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2204         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
2205         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
2206         (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
2207         (WebKit::QtViewportInteractionEngine::event):
2208         (WebKit::QtViewportInteractionEngine::wheelEvent):
2209         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
2210         (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
2211         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
2212         (WebKit::QtViewportInteractionEngine::applyConstraints):
2213         (WebKit::QtViewportInteractionEngine::currentCSSScale):
2214         (WebKit::QtViewportInteractionEngine::panGestureStarted):
2215         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
2216         (WebKit::QtViewportInteractionEngine::panGestureEnded):
2217         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
2218         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
2219         (WebKit::QtViewportInteractionEngine::scaleContent):
2220         * UIProcess/qt/QtViewportInteractionEngine.h:
2221         * UIProcess/qt/QtWebPageEventHandler.cpp:
2222         (QtWebPageEventHandler::handleEvent):
2223         (QtWebPageEventHandler::handleMouseMoveEvent):
2224         (QtWebPageEventHandler::handleMousePressEvent):
2225         (QtWebPageEventHandler::handleMouseReleaseEvent):
2226         (QtWebPageEventHandler::handleWheelEvent):
2227         (QtWebPageEventHandler::handleHoverLeaveEvent):
2228         (QtWebPageEventHandler::handleHoverMoveEvent):
2229         (QtWebPageEventHandler::handleDragEnterEvent):
2230         (QtWebPageEventHandler::handleDragMoveEvent):
2231         (QtWebPageEventHandler::handleDropEvent):
2232         (QtWebPageEventHandler::handleSingleTapEvent):
2233         (QtWebPageEventHandler::handleDoubleTapEvent):
2234         (QtWebPageEventHandler::touchEvent):
2235         * UIProcess/qt/QtWebPageEventHandler.h:
2236
2237 2012-01-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2238
2239         [Qt] Introduce new qmake variable 'WEBKIT' for signaling dependencies
2240
2241         The custom qmake variable 'WEBKIT' is used for signaling that a
2242         target depends in some way on other subproject of the WebKit
2243         project. For now this is limited to the set of intermediate
2244         libraries: wtf, javascriptcore, webcore, and webkit2.
2245
2246         This replaces the previous convension of using load(foo) for
2247         just include paths, and CONFIG += foo to also link against foo.
2248
2249         Adding a dependency results in additional include paths being
2250         available, and potentially linking to the library. This is
2251         decided by the build system based on conditions such as what
2252         kind of target is being built and the general build config.
2253
2254         An advantage to his approach is that it simplifies the individual
2255         foo.prf files, for example by allowing us to use INCLUDEPATH +=
2256         and LIBS += as normal instead of prepending.
2257
2258         Reviewed by Simon Hausmann.
2259
2260         * Target.pri:
2261         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
2262
2263 2012-01-03  Andras Becsi  <andras.becsi@nokia.com>
2264
2265         [Qt][WK2] Pinch zoom should affect the page size
2266         https://bugs.webkit.org/show_bug.cgi?id=74601
2267
2268         Reviewed by Kenneth Rohde Christiansen and Simon Hausmann.
2269
2270         The current implementation uses the scale property of the QQuickWebPage
2271         to scale the page in response to pinch gestures.
2272         However for layout and anchoring to work correctly in QML, pinching needs
2273         to change the page size.
2274         This patch applies the pinch scale to the page size and to the transformation
2275         matrix of the drawing area.
2276         Thus the page item's coordinate system is no longer a direct representation
2277         of the WebCore::Page coordinate system and it is no longer suitable as
2278         an inertial frame of reference for input events. The event propagation had
2279         to be moved to the QQuickWebView and the positions translated to content
2280         coordinates when NativeWebEvents are created.
2281
2282         * Shared/NativeWebMouseEvent.h:
2283         * Shared/NativeWebTouchEvent.h:
2284         * Shared/NativeWebWheelEvent.h:
2285         * Shared/qt/NativeWebMouseEventQt.cpp:
2286         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2287         * Shared/qt/NativeWebTouchEventQt.cpp:
2288         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
2289         * Shared/qt/NativeWebWheelEventQt.cpp:
2290         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
2291         * Shared/qt/WebEventFactoryQt.cpp:
2292         (WebKit::WebEventFactory::createWebMouseEvent):
2293         (WebKit::WebEventFactory::createWebWheelEvent):
2294         (WebKit::WebEventFactory::createWebTouchEvent):
2295         * Shared/qt/WebEventFactoryQt.h:
2296         * UIProcess/API/qt/qquickwebpage.cpp:
2297         (QQuickWebPage::geometryChanged):
2298         (QQuickWebPagePrivate::QQuickWebPagePrivate):
2299         (QQuickWebPagePrivate::paintToCurrentGLContext):
2300         (QQuickWebPage::usesTraditionalDesktopBehaviour):
2301         (QQuickWebPage::setUsesTraditionalDesktopBehaviour):
2302         (QQuickWebPage::eventHandler):
2303         (QQuickWebPage::setContentSize):
2304         (QQuickWebPage::contentSize):
2305         (QQuickWebPage::setContentScale):
2306         (QQuickWebPage::contentScale):
2307         (QQuickWebPage::transformFromItem):
2308         (QQuickWebPage::transformToItem):
2309         (QQuickWebPagePrivate::updateSize):
2310         * UIProcess/API/qt/qquickwebpage_p.h:
2311         * UIProcess/API/qt/qquickwebpage_p_p.h:
2312         * UIProcess/API/qt/qquickwebview.cpp:
2313         (QQuickWebViewPrivate::enableMouseEvents):
2314         (QQuickWebViewPrivate::disableMouseEvents):
2315         (QQuickWebViewPrivate::loadDidCommit):
2316         (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
2317         (QQuickWebViewPrivate::didChangeContentsSize):
2318         (QQuickWebViewPrivate::didChangeViewportProperties):
2319         (QQuickWebViewPrivate::pageDidRequestScroll):
2320         (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
2321         (QQuickWebViewPrivate::PostTransitionState::apply):
2322         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
2323         (QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour):
2324         (QQuickWebViewExperimental::useTraditionalDesktopBehaviour):
2325         (QQuickWebView::mapToWebContent):
2326         (QQuickWebView::mapRectToWebContent):
2327         (QQuickWebView::mapFromWebContent):
2328         (QQuickWebView::mapRectFromWebContent):
2329         (QQuickWebView::geometryChanged):
2330         (QQuickWebView::keyPressEvent):
2331         (QQuickWebView::keyReleaseEvent):
2332         (QQuickWebView::inputMethodEvent):
2333         (QQuickWebView::focusInEvent):
2334         (QQuickWebView::focusOutEvent):
2335         (QQuickWebView::touchEvent):
2336         (QQuickWebView::mousePressEvent):
2337         (QQuickWebView::mouseMoveEvent):
2338         (QQuickWebView::mouseReleaseEvent):
2339         (QQuickWebView::mouseDoubleClickEvent):
2340         (QQuickWebView::wheelEvent):
2341         (QQuickWebView::hoverEnterEvent):
2342         (QQuickWebView::hoverMoveEvent):
2343         (QQuickWebView::hoverLeaveEvent):
2344         (QQuickWebView::dragMoveEvent):
2345         (QQuickWebView::dragEnterEvent):
2346         (QQuickWebView::dragLeaveEvent):
2347         (QQuickWebView::dropEvent):
2348         (QQuickWebView::event):
2349         * UIProcess/API/qt/qquickwebview_p.h:
2350         * UIProcess/API/qt/qquickwebview_p_p.h:
2351         * UIProcess/API/qt/qwebviewportinfo.cpp:
2352         (QWebViewportInfo::contentsSize):
2353         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2354         (tst_QQuickWebView::scrollRequest):
2355         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
2356         (WebKit::QtPinchGestureRecognizer::recognize):
2357         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2358         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
2359         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
2360         (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
2361         (WebKit::QtViewportInteractionEngine::event):
2362         (WebKit::QtViewportInteractionEngine::wheelEvent):
2363         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
2364         (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
2365         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
2366         (WebKit::QtViewportInteractionEngine::applyConstraints):
2367         (WebKit::QtViewportInteractionEngine::currentCSSScale):
2368         (WebKit::QtViewportInteractionEngine::panGestureStarted):
2369         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
2370         (WebKit::QtViewportInteractionEngine::panGestureEnded):
2371         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
2372         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
2373         (WebKit::QtViewportInteractionEngine::scaleContent):
2374         * UIProcess/qt/QtViewportInteractionEngine.h:
2375         * UIProcess/qt/QtWebPageEventHandler.cpp:
2376         (QtWebPageEventHandler::handleEvent):
2377         (QtWebPageEventHandler::handleMouseMoveEvent):
2378         (QtWebPageEventHandler::handleMousePressEvent):
2379         (QtWebPageEventHandler::handleMouseReleaseEvent):
2380         (QtWebPageEventHandler::handleWheelEvent):
2381         (QtWebPageEventHandler::handleHoverLeaveEvent):
2382         (QtWebPageEventHandler::handleHoverMoveEvent):
2383         (QtWebPageEventHandler::handleDragEnterEvent):
2384         (QtWebPageEventHandler::handleDragMoveEvent):
2385         (QtWebPageEventHandler::handleDropEvent):
2386         (QtWebPageEventHandler::handleSingleTapEvent):
2387         (QtWebPageEventHandler::handleDoubleTapEvent):
2388         (QtWebPageEventHandler::touchEvent):
2389         * UIProcess/qt/QtWebPageEventHandler.h:
2390
2391 2012-01-03  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2392
2393         [Qt] Clean up Qt specific part of editorState()
2394
2395         Reviewed by Simon Hausmann.
2396
2397         Use unsigned instead of int.
2398         No need to clone the range as we don't modify it.
2399         Support selections which include a composition.
2400         If we are not in editable content make sure to use the document element
2401         as the scope for calculating the positions and lengths.
2402         Remove compositionStart/Length as there cannot be a selection and
2403         composition at the same time.
2404
2405         Only tested manually as we don't have everything in place yet
2406         to properly test this.
2407
2408         * Shared/EditorState.h:
2409         * WebProcess/WebPage/WebPage.cpp:
2410         (WebKit::WebPage::editorState):
2411
2412 2012-01-04  Mihnea Ovidenie  <mihnea@adobe.com>
2413
2414         [Mac]Fix build after changeset 103997
2415         https://bugs.webkit.org/show_bug.cgi?id=75530
2416
2417         Reviewed by Andreas Kling.
2418
2419         * UIProcess/API/mac/WKView.mm:
2420
2421 2012-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2422
2423         [GTK] Scrollbars are drawn behind the window resize grip
2424         https://bugs.webkit.org/show_bug.cgi?id=75384
2425
2426         Reviewed by Martin Robinson.
2427
2428         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2429         (webkitWebViewBaseNotifyResizerSizeForWindow): Get the size of the
2430         main window resize grip and send it to the page proxy if it
2431         overlaps with the view.
2432         (toplevelWindowResizeGripVisibilityChanged): Call
2433         webkitWebViewBaseNotifyResizerSizeForWindow().
2434         (webkitWebViewBaseRealize): Get the toplevel window and connect to
2435         notify::resize-grip-visible signal.
2436         (webkitWebViewBaseSizeAllocate): Call
2437         webkitWebViewBaseNotifyResizerSizeForWindow().
2438
2439 2012-01-03  Jon Lee  <jonlee@apple.com>
2440
2441         Leak of WebNotificationClient when page is destroyed
2442         https://bugs.webkit.org/show_bug.cgi?id=74980
2443         <rdar://problem/10611231>
2444
2445         Reviewed by Mark Rowe.
2446
2447         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
2448         (WebKit::WebNotificationClient::notificationControllerDestroyed): Delete the instance.
2449         * WebProcess/WebCoreSupport/WebNotificationClient.h:
2450
2451 2012-01-03  Sam Weinig  <sam@webkit.org>
2452
2453         Remove unnecessary forward declaration of Function
2454         https://bugs.webkit.org/show_bug.cgi?id=75485
2455
2456         Reviewed by Dan Bernstein.
2457
2458         * Platform/WorkQueue.h:
2459
2460 2012-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2461
2462         [GTK] Simplify loader client WebKit2 GTK+ API
2463         https://bugs.webkit.org/show_bug.cgi?id=74605
2464
2465         Reviewed by Gustavo Noronha Silva.
2466
2467         Remove WebKitWebLoaderClient from public API keeping it as a
2468         private object. Loading API has been reduced to two signals in
2469         WebKitWebView.
2470
2471         * GNUmakefile.am: Remove WebKitWebLoaderClientPrivate.h.
2472         * UIProcess/API/gtk/WebKitDefines.h: Remove forward delcarations
2473         that are no longer needed.
2474         * UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
2475         (didStartProvisionalLoadForFrame): Emit
2476         WebKitWebView::load-changed signal with Started event.
2477         (didReceiveServerRedirectForProvisionalLoadForFrame): Emit
2478         WebKitWebView::load-changed signal with Redirected event.
2479         (didFailProvisionalLoadWithErrorForFrame): Emit
2480         WebKitWebView::load-failed signal with Started event.
2481         (didCommitLoadForFrame): Emit WebKitWebView::load-changed signal
2482         with Committed event.
2483         (didFinishLoadForFrame): Emit WebKitWebView::load-changed signal
2484         with Finished event.
2485         (didFailLoadWithErrorForFrame): Emit WebKitWebView::load-failed
2486         signal with Committed event.
2487         (webkit_web_loader_client_init):
2488         (webkit_web_loader_client_class_init):
2489         * UIProcess/API/gtk/WebKitWebLoaderClient.h: Remove public API and
2490         move private API here.
2491         * UIProcess/API/gtk/WebKitWebLoaderClientPrivate.h: Removed.
2492         * UIProcess/API/gtk/WebKitWebView.cpp:
2493         (webkitWebViewLoadFail): Default implementation of
2494         WebKitWebView::load-failed signal to show a custom error page.
2495         (webkit_web_view_class_init): Add load-changed and load-failed
2496         signals.
2497         (webkitWebViewLoadChanged): Emit WebKitWebView::load-changed with
2498         the given event.
2499         (webkitWebViewLoadFailed): Emit WebKitWebView::load-failed signal
2500         with the given event, failing uri and error.
2501         * UIProcess/API/gtk/WebKitWebView.h:
2502         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
2503         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Remove loader
2504         client section.
2505         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Remove loader
2506         client symbols.
2507         * UIProcess/API/gtk/docs/webkit2gtk.types: Remove
2508         webkit_web_loader_client_get_type.
2509         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
2510         (loadChangedCallback):
2511         (loadFailedCallback):
2512         (LoadTrackingTest::LoadTrackingTest):
2513         (LoadTrackingTest::~LoadTrackingTest):
2514         (LoadTrackingTest::provisionalLoadStarted):
2515         (LoadTrackingTest::provisionalLoadReceivedServerRedirect):
2516         (LoadTrackingTest::provisionalLoadFailed):
2517         (LoadTrackingTest::loadCommitted):
2518         (LoadTrackingTest::loadFinished):
2519         (LoadTrackingTest::loadFailed):
2520         * UIProcess/API/gtk/tests/LoadTrackingTest.h:
2521         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
2522         (testLoadingError):
2523         (LoadStopTrackingTest::loadCommitted):
2524         (LoadStopTrackingTest::loadFailed):
2525         (testLoadCancelled):
2526         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2527         (beforeAll):
2528         * UIProcess/API/gtk/webkit2.h: Remove loader client header.
2529         * UIProcess/API/gtk/webkit2marshal.list:
2530
2531 2012-01-03  Rafael Brandao  <rafael.lobo@openbossa.org>
2532
2533         [Qt][WK2] tst_favIconLoad.qml crashes on debug mode
2534         https://bugs.webkit.org/show_bug.cgi?id=75448
2535
2536         Reviewed by Kenneth Rohde Christiansen.
2537
2538         * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: Loads
2539         "about:blank" instead of an empty url between tests to clean favicon.
2540
2541 2012-01-02  Dan Bernstein  <mitz@apple.com>
2542
2543         Fixed a typo I made in r103871.
2544
2545         Fixes <http://webkit.org/b/75450> Inline PDF doesn't preview correctly when attempting to print its frame
2546
2547         * WebProcess/WebPage/WebPage.cpp:
2548         (WebKit::WebPage::drawRectToPDF): Changed USE(GC) to USE(CG).
2549
2550 2012-01-02  Andy Estes  <aestes@apple.com>
2551
2552         Fix the Windows build (again).
2553
2554         * Platform/CoreIPC/Connection.h:
2555
2556 2012-01-02  Sam Weinig  <sam@webkit.org>
2557
2558         Fix windows build.
2559
2560         * Platform/CoreIPC/Connection.h:
2561         * Platform/CoreIPC/win/ConnectionWin.cpp:
2562         * Platform/RunLoop.h:
2563         Missing declarations/includes of BinarySemaphore.
2564
2565 2012-01-02  Sam Weinig  <sam@webkit.org>
2566
2567         Move dispatchSentMessagesUntil out of the RunLoop class.
2568         https://bugs.webkit.org/show_bug.cgi?id=75320
2569
2570         Reviewed by Dan Bernstein.
2571
2572         * Platform/CoreIPC/Connection.cpp:
2573         (CoreIPC::Connection::SyncMessageState::waitWhileDispatchingSentWin32Messages):
2574         * Platform/CoreIPC/Connection.h:
2575         * Platform/CoreIPC/win/ConnectionWin.cpp:
2576         (CoreIPC::Connection::dispatchSentMessagesUntil):
2577         * Platform/win/RunLoopWin.cpp:
2578
2579 2012-01-02  Dan Bernstein  <mitz@apple.com>
2580
2581         Build fix.
2582
2583         * Platform/CoreIPC/mac/ConnectionMac.cpp:
2584         * Platform/mac/SharedMemoryMac.cpp:
2585
2586 2012-01-02  Nikolas Zimmermann  <nzimmermann@rim.com>
2587
2588         Not reviewed. Fix build on Lion, by including mach_error.h in two places that need it.
2589
2590         * PluginProcess/mac/PluginProcessMainMac.mm:
2591         * WebProcess/mac/WebProcessMainMac.mm:
2592
2593 2012-01-01  Dan Bernstein  <mitz@apple.com>
2594
2595         EnvironmentUtilities::stripValuesEndingWithString enters an infinite loop if the search value
2596         occurs a component other than the first.
2597
2598         Reviewed by Anders Carlsson.
2599
2600         * Platform/unix/EnvironmentUtilities.cpp:
2601         (WebKit::EnvironmentUtilities::stripValuesEndingWithString): Changed to start the search for
2602         the next colon after the current colon.
2603
2604 2012-01-01  Dan Bernstein  <mitz@apple.com>
2605
2606         Improved reproting of kernel return codes.
2607
2608         Reviewed by Anders Carlsson.
2609
2610         * Platform/CoreIPC/mac/ConnectionMac.cpp:
2611         (CoreIPC::Connection::exceptionSourceEventHandler): Added the error string to the log message.
2612         * Platform/mac/SharedMemoryMac.cpp:
2613         (WebKit::SharedMemory::create): Ditto.
2614         * PluginProcess/mac/PluginProcessMainMac.mm:
2615         (WebKit::PluginProcessMain): Ditto. Also changed to log to stderr.
2616         * WebProcess/mac/WebProcessMainMac.mm:
2617         (WebKit::WebProcessMain): Ditto.
2618
2619 2011-12-31  Dan Bernstein  <mitz@apple.com>
2620
2621         Continue trying to fix the ASSERT-enabled Windows build after r103858.
2622
2623         * WebProcess/WebPage/WebPage.cpp:
2624         (WebKit::WebPage::drawRectToPDF):
2625         (WebKit::WebPage::drawPagesToPDF):
2626
2627 2011-12-31  Dan Bernstein  <mitz@apple.com>
2628
2629         Start trying to fix the Windows build after r103858.
2630
2631         * WebProcess/WebPage/WebPage.cpp:
2632         (WebKit::drawPDFPage):
2633
2634 2011-12-31  Dan Bernstein  <mitz@apple.com>
2635
2636         <rdar://problem/10463059> Cannot print USPS shipping labels
2637         http://webkit.org/b/72801
2638
2639         Reviewed by Anders Carlsson and Alexey Proskuryakov.
2640
2641         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
2642         (appendValuesInPDFNameSubtreeToVector): Copied from WebKit/mac/WebView/WebPDFDocumentExtras.mm.
2643         (getAllValuesInPDFNameTree): Ditto.
2644         (getAllScriptsInPDFDocument): Copied allScriptsInPDFDocument() from WebPDFDocumentExtras.mm
2645         and changed it to append to a Vector<RetainPtr<CFStringRef> >.
2646         (WebKit::BuiltInPDFView::create): Changed to take a WebFrame* rather than a Page*.
2647         (WebKit::BuiltInPDFView::BuiltInPDFView): Ditto. Updated initializer accordingly.
2648         (WebKit::BuiltInPDFView::pdfDocumentDidLoad): Copied and adapted code from
2649         -[WebPDFRepresentation finishedLoadingWithDataSource:] to run scripts from the PDF with a
2650         Doc object as the this object.
2651         (WebKit::BuiltInPDFView::initialize): Adapted for the change from having a Page* to having
2652         a WebFrame*.
2653         (WebKit::BuiltInPDFView::destroy): Ditto.
2654         (WebKit::BuiltInPDFView::isActive): Ditto.
2655         (WebKit::jsPDFDocInitialize): Added. Refs the BuiltInPDFView which is the private object for
2656         this Doc.
2657         (WebKit::jsPDFDocFinalize): Added. Derefs the BuiltInPDFView for this Doc.
2658         (WebKit::BuiltInPDFView::jsPDFDocPrint): Added. Calls WebCore::Chrome::print().
2659         (WebKit::BuiltInPDFView::makeJSPDFDoc): Copied from WebKit/mac/WebView/WebJSPDFDoc.mm and
2660         modified to use this BuiltInPDFView as the private object of the Doc being made.
2661         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
2662         (WebKit::BuiltInPDFView::disconnectFromPage): Adapted for the change from having a Page* to
2663         having a WebFrame*.
2664         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2665         (WebKit::WebFrameLoaderClient::createPlugin): Pass the WebFrame to WebPage::createPlugin().
2666         * WebProcess/WebPage/WebPage.cpp:
2667         (WebKit::WebPage::createPlugin): Added a WebFrame* parameter, which is used when creating
2668         a BuiltInPDFView.
2669         * WebProcess/WebPage/WebPage.h:
2670
2671 2011-12-31  Dan Bernstein  <mitz@apple.com>
2672
2673         <rdar://problem/8553040> REGRESSION (WebKit2): Safari status text doesn't change when you change the modifier keys without moving the mouse
2674         https://bugs.webkit.org/show_bug.cgi?id=75404
2675
2676         Reviewed by Jon Honeycutt.
2677
2678         * UIProcess/API/mac/WKView.mm:
2679         (-[WKView dealloc]): Remove the flags changed event monitor.
2680         (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): Added. Similarly to
2681         -[WebHTMLView _postFlagsChangedEvent:], creates a mouse moved event and passes it to
2682         -mouseMoved:.
2683         (-[WKView initWithFrame:contextRef:pageGroupRef:]): Create a local event monitor for flags
2684         changed events.
2685
2686 2011-12-31  Dan Bernstein  <mitz@apple.com>
2687
2688         <rdar://problem/8750356> REGRESSION (WebKit2): Printing a subframe containing a PDF prints the on-screen view instead of the entire PDF document
2689         <http://webkit.org/b/75232>
2690
2691         Reviewed by Alexey Proskuryakov.
2692
2693         * UIProcess/API/C/WKPage.cpp:
2694         (WKPageDrawPagesToPDF): Added WKPrintInfo parameter, which is passed through as a PrintInfo
2695         to the WebPageProxy.
2696         * UIProcess/API/C/WKPagePrivate.h:
2697         * UIProcess/API/mac/WKPrintingView.mm:
2698         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Changed to pass the PrintInfo
2699         down to WebPageProxy::drawPagesToPDF.
2700         (-[WKPrintingView _drawPreview:]): Changed to pass the PrintInfo down to
2701         WebPageProxy::drawRectToPDF.
2702         * UIProcess/API/mac/WKView.mm:
2703         (-[WKView canChangeFrameLayout:]): Changed to use WebFrameProxy::isDisplayingPDFDocument, which
2704         works for subframes as well.
2705         (-[WKView printOperationWithPrintInfo:forFrame:]): Added a FIXME.
2706         * UIProcess/WebFrameProxy.cpp:
2707         (WebKit::WebFrameProxy::isDisplayingPDFDocument): Added.
2708         * UIProcess/WebFrameProxy.h:
2709         * UIProcess/WebPageProxy.cpp:
2710         (WebKit::WebPageProxy::drawRectToPDF): Added a PrintInfo parameter, which is passed through to
2711         the Web process.
2712         (WebKit::WebPageProxy::drawPagesToPDF): Ditto.
2713         * UIProcess/WebPageProxy.h:
2714         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
2715         Added an override of pdfDocumentForPrinting() which returns the PDFDocument.
2716         * WebProcess/Plugins/Plugin.h:
2717         (WebKit::Plugin::pdfDocumentForPrinting): Added. This base class implementation returns 0.
2718         * WebProcess/Plugins/PluginView.h:
2719         (WebKit::PluginView::pdfDocumentForPrinting): Added. Calls through to the Plugin.
2720         * WebProcess/WebPage/WebPage.cpp:
2721         (WebKit::pdfDocumentForPrintingFrame): Added this helper function. If the frame is displaying
2722         a plug-in document, allows the plug-in to provide a PDF document for printing.
2723         (WebKit::WebPage::beginPrinting): Added an early return if the frame provides a PDF document
2724         for printing.
2725         (WebKit::WebPage::computePagesForPrinting): If the frame provides a PDF document for printing,
2726         create for each page in the PDF document a page rect with the size available for printing.
2727         (WebKit::drawPDFPage): Added this helper function, which draws a page from the PDF document
2728         into one of the aforementioned page rects. It rotates the PDF page 90 degrees if necessary to
2729         better match the aspect ratio of the paper, then it centers it on the paper. This matches the
2730         behavior of a PDFView when printed with default settings.
2731         (WebKit::WebPage::drawRectToPDF): If the frame provides a PDF document for printing, draw the
2732         PDF pages falling within the requested rect.
2733         (WebKit::WebPage::drawPagesToPDF): If the frame provides a PDF document for printing, draw
2734         the requested pages.
2735         * WebProcess/WebPage/WebPage.h:
2736         * WebProcess/WebPage/WebPage.messages.in: Added a PrintInfo parameter to DrawRectToPDF and
2737         DrawPagesToPDF.
2738
2739 2011-12-30  Dan Bernstein  <mitz@apple.com>
2740
2741         EnvironmentUtilities::stripValuesEndingWithString fails when the variable ends with the search value
2742         https://bugs.webkit.org/show_bug.cgi?id=75389
2743
2744         Reviewed by Anders Carlsson.
2745
2746         * Platform/unix/EnvironmentUtilities.cpp:
2747         (WebKit::EnvironmentUtilities::stripValuesEndingWithString): Fixed an off-by-1 error when
2748         examining the character after the match.
2749
2750 2011-12-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2751
2752         [Qt] Remove unused m_signalListeners from WorkQueue
2753         https://bugs.webkit.org/show_bug.cgi?id=75354
2754
2755         Reviewed by Andreas Kling.
2756
2757         This is unused since r76507.
2758
2759         * Platform/WorkQueue.h:
2760         * Platform/qt/WorkQueueQt.cpp:
2761         (WorkQueue::platformInvalidate):
2762
2763 2011-12-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2764
2765         [GTK] Context menu is hidden right after showing it when first menu item is not disabled
2766         https://bugs.webkit.org/show_bug.cgi?id=75357
2767
2768         Reviewed by Martin Robinson.
2769
2770         The problem is that we are passing GDK_CURRENT_TIME (which is 0)
2771         to gtk_popup_menu, because the events are async and
2772         gtk_get_current_event is NULL when calling gtk_menu_popup. GtkMenu
2773         has a timeout to decide whether the press-release was fast enough
2774         and ignore the button release event in that case. That way, a
2775         normal right click shows the menu while a long press hides the
2776         menu when the button is released. So, we need to know the real time
2777         when the right button was pressed and pass it to gtk_popup_menu.
2778
2779         * UIProcess/WebPageProxy.h: Make
2780         currentlyProcessedMouseDownEvent() public.
2781         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2782         (WebKit::WebContextMenuProxyGtk::showContextMenu): Use
2783         WebPageProxy::currentlyProcessedMouseDownEvent() to get the
2784         current mouse event and pass its button number and time to
2785         gtk_popup_menu.
2786
2787 2011-12-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2788
2789         [GTK] Fix several conding style issues in WebKit2 GTK+ code
2790         https://bugs.webkit.org/show_bug.cgi?id=75339
2791
2792         Reviewed by Martin Robinson.
2793
2794         In addition to the WebKit coding style, code in UIProcess/API/gtk
2795         should follow style and conventions described here
2796         http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
2797
2798         * UIProcess/API/gtk/WebKitSettings.cpp: Remove trailing whitespaces.
2799         (webkit_settings_class_init): Remove trailing whitespaces, fix
2800         indentation issues in API doc comments, add missing trailing to
2801         some properties.
2802         (webkit_settings_set_enable_fullscreen): Move the code after
2803         get_enable_fullscreen() for consistency.
2804         * UIProcess/API/gtk/WebKitSettings.h: Remove trailing
2805         whitespaces. Fix * placement and line up parameters.
2806         * UIProcess/API/gtk/WebKitWebView.cpp: Remove several empty lines.
2807         (webkit_web_view_class_init): Mark property nicks and blurbs for translation.
2808         (webkitWebViewSetTitle): Remove trailing whitespaces.
2809         * UIProcess/API/gtk/WebKitWebView.h: Line up parameters.
2810         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Use the angle-bracket
2811         form for including file from WebCore and wtf. Use GRefPtr for
2812         GtkIMContext and bool instead of gboolean. Use the placement new
2813         syntax for private struct instead of new/delete.
2814         (webkitWebViewBaseRealize):
2815         (webkitWebViewBaseFinalize):
2816         (webkit_web_view_base_init):
2817         (webkitWebViewBaseFocusInEvent):
2818         (webkitWebViewBaseFocusOutEvent):
2819         (webkitWebViewBaseKeyPressEvent): Remove trailing whitespaces.
2820         (webkitWebViewBaseKeyReleaseEvent):
2821         (webkit_web_view_base_class_init):
2822         (webkitWebViewBaseGetIMContext):
2823
2824 2011-12-28  Balazs Kelemen  <kbalazs@webkit.org>
2825
2826         [Qt][WK2] Crash in ~WebGraphicsLayer when running fast/multicol/pagination-* tests
2827         https://bugs.webkit.org/show_bug.cgi?id=75000
2828
2829         Reviewed by Noam Rosenthal.
2830
2831         Don't adopt a tile client that belongs to a parent layer.
2832         This is unnecessary and also unsafe because we can live
2833         through that client.
2834
2835         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
2836         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
2837
2838 2011-12-27  Dan Bernstein  <mitz@apple.com>
2839
2840         [mac] Stop using bootstrap_look_up2
2841         https://bugs.webkit.org/show_bug.cgi?id=75280
2842
2843         Reviewed by Mark Rowe.
2844
2845         * PluginProcess/mac/PluginProcessMainMac.mm:
2846         (WebKit::PluginProcessMain): Changed to use bootstrap_look_up() instead of
2847         bootstrap_look_up2().
2848         * WebProcess/mac/WebProcessMainMac.mm:
2849         (WebKit::WebProcessMain): Ditto.
2850
2851 2011-12-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2852
2853         [Qt] Make the inputMethodEvent set or confirm the composition
2854         https://bugs.webkit.org/show_bug.cgi?id=75256
2855
2856         Reviewed by Chang Shu.
2857
2858         * UIProcess/qt/QtWebPageEventHandler.cpp:
2859         (QtWebPageEventHandler::inputMethodEvent):
2860
2861 2011-12-26  Mark Rowe  <mrowe@apple.com>
2862
2863         <http://webkit.org/b/75196> REGRESSION(r103643): Command-clicking a link no longer opens a new tab.
2864
2865         r103643 contained some botched copy-paste code that caused the state of the Command key
2866         to be lost when translating from a WebKit2 event to a WebCore event.
2867
2868         Reviewed by Dan Bernstein.
2869
2870         * Shared/WebEventConversion.cpp:
2871         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): Test for the correct modifier.
2872         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): Ditto.
2873         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent): Ditto.
2874         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent): Ditto.
2875         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent): Ditto.
2876
2877 2011-12-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2878
2879         Fix a crash in WebProcess when starting a download not initiated by a WebPage
2880         https://bugs.webkit.org/show_bug.cgi?id=75225
2881
2882         Reviewed by Darin Adler.
2883
2884         * WebProcess/WebProcess.cpp:
2885         (WebKit::WebProcess::downloadRequest): Check initiatingPage is not
2886         NULL before using it.
2887
2888 2011-12-25  Dan Bernstein  <mitz@apple.com>
2889
2890         Find indicators overlap when a match spans multiple text boxes
2891         https://bugs.webkit.org/show_bug.cgi?id=75220
2892
2893         Reviewed by Darin Adler.
2894
2895         * UIProcess/FindIndicator.cpp:
2896         (WebKit::findIndicatorsForTextRectsOverlap): Added this helper function that checks for
2897         pairwise intersections between all indicator rects.
2898         (WebKit::FindIndicator::FindIndicator): Changed to use a single rect (the union of all text
2899         rects) if any two indicator rects would otherwise overlap. This is similar to what Safari
2900         does, and it eliminates overlapping rects for adjacent text boxes. In rare cases (such as when
2901         a match spans two lines and adjacent text boxes on one of those lines) it results in a find
2902         indicator that is too large and obscures some non-match text.
2903         * UIProcess/FindIndicator.h:
2904
2905 2011-12-21  Sam Weinig  <sam@webkit.org>
2906
2907         Start extracting platform specific bits out of PlatformEvents
2908         https://bugs.webkit.org/show_bug.cgi?id=75063
2909
2910         Reviewed by Anders Carlsson.
2911
2912         * Shared/WebEventConversion.cpp:
2913         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2914         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
2915         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
2916         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
2917         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
2918         * UIProcess/API/mac/WKView.mm:
2919         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2920         (InitWebCoreSystemInterface):
2921
2922 2011-12-22  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2923
2924         [Qt] [WK2] Use HashMap instead of Vector in the builtin bundle
2925         https://bugs.webkit.org/show_bug.cgi?id=75112
2926
2927         Reviewed by Andreas Kling.
2928
2929         Fix my own FIXME now that HashMap have support to hold OwnPtr as value.
2930
2931         * WebProcess/qt/QtBuiltinBundle.cpp:
2932         (WebKit::QtBuiltinBundle::didCreatePage):
2933         (WebKit::QtBuiltinBundle::willDestroyPage):
2934         (WebKit::QtBuiltinBundle::handleMessageToNavigatorQtObject):
2935         (WebKit::QtBuiltinBundle::handleSetNavigatorQtObjectEnabled):
2936         * WebProcess/qt/QtBuiltinBundle.h:
2937
2938 2011-12-22  Anders Carlsson  <andersca@apple.com>
2939
2940         Remove the last of the WebKit2 display throttling
2941         https://bugs.webkit.org/show_bug.cgi?id=75109
2942
2943         Reviewed by Adam Roben.
2944
2945         The code to do display throttling in WebKit2 is complex and doesn't really help us except
2946         on an old benchmark that's no longer representative of real-world behavior; let's rip it out instead.
2947
2948         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2949         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2950         (WebKit::DrawingAreaImpl::displayTimerFired):
2951         (WebKit::DrawingAreaImpl::display):
2952         * WebProcess/WebPage/DrawingAreaImpl.h:
2953         * WebProcess/WebPage/WebPage.cpp:
2954         (WebKit::WebPage::wheelEvent):
2955         (WebKit::WebPage::wheelEventSyncForTesting):
2956
2957 2011-12-22  Anders Carlsson  <andersca@apple.com>
2958
2959         Get rid of didStartAnimatedScroll and didCompleteAnimatedScroll
2960         https://bugs.webkit.org/show_bug.cgi?id=75107
2961
2962         Reviewed by Adam Roben.
2963
2964         This is another step towards removing the display throttling in WebKit2.
2965
2966         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2967         (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
2968         * WebProcess/WebCoreSupport/WebChromeClient.h:
2969
2970 2011-12-22  Anders Carlsson  <andersca@apple.com>
2971
2972         Remove didStartRubberBand and didCompleteRubberBand callbacks
2973         https://bugs.webkit.org/show_bug.cgi?id=75102
2974
2975         Reviewed by Adam Roben.
2976
2977         The code to do display throttling in WebKit2 is complex and doesn't really help us except
2978         on an old benchmark that's no longer representative of real-world behavior; let's rip it out instead.
2979
2980         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2981         * WebProcess/WebCoreSupport/WebChromeClient.h:
2982
2983 2011-12-22  Ryuan Choi <ryuan.choi@samsung.com>, Tomasz Morawski <t.morawski@samsung.com>
2984
2985         [EFL][WK2] Add an option to build WebKit2.
2986         https://bugs.webkit.org/show_bug.cgi?id=61999
2987
2988         Reviewed by Eric Seidel.
2989
2990         Add build script for WebKit2 on EFL port.
2991
2992         * CMakeLists.txt:
2993         * PlatformEfl.cmake: Added.
2994
2995 2011-12-21  Eunmi Lee  <eunmi15.lee@samsung.com>
2996
2997         [EFL][WK2] Add efl port's ewk_view files
2998         https://bugs.webkit.org/show_bug.cgi?id=61915
2999
3000         Reviewed by Eric Seidel.
3001
3002         This is the initial version of WebKit2 EFL port's ewk_view.
3003         The ewk_view is Evas_Object to show the rendered web contents.
3004
3005         * UIProcess/API/efl/ewk_view.cpp: Added.
3006         (_ewk_view_smart_changed):
3007         (_ewk_view_smart_focus_in):
3008         (_ewk_view_smart_focus_out):
3009         (_ewk_view_smart_mouse_wheel):
3010         (_ewk_view_smart_mouse_down):
3011         (_ewk_view_smart_mouse_up):
3012         (_ewk_view_smart_mouse_move):
3013         (_ewk_view_smart_key_down):
3014         (_ewk_view_smart_key_up):
3015         (_ewk_view_on_focus_in):
3016         (_ewk_view_on_focus_out):
3017         (_ewk_view_on_mouse_wheel):
3018         (_ewk_view_on_mouse_down):
3019         (_ewk_view_on_mouse_up):
3020         (_ewk_view_on_mouse_move):
3021         (_ewk_view_on_key_down):
3022         (_ewk_view_on_key_up):
3023         (_ewk_view_priv_new):
3024         (_ewk_view_priv_del):
3025         (_ewk_view_smart_add):
3026         (_ewk_view_smart_del):
3027         (_ewk_view_smart_resize):
3028         (_ewk_view_smart_move):
3029         (_ewk_view_smart_calculate):
3030         (_ewk_view_smart_show):
3031         (_ewk_view_smart_hide):
3032         (ewk_view_smart_class_init):
3033         (_ewk_view_smart_class_new):
3034         (ewk_view_add):
3035         (ewk_view_page_get):
3036         * UIProcess/API/efl/ewk_view.h: Added.
3037
3038 2011-12-21  Timothy Hatcher  <timothy@apple.com>
3039
3040         Web Inspector: suppress incremental rendering and use application chrome mode
3041
3042         https://webkit.org/b/75026
3043
3044         Reviewed by Joseph Pecoraro.
3045
3046         * UIProcess/WebInspectorProxy.cpp:
3047         (WebKit::createInspectorPageGroup): Set suppress incremental rendering and use application chrome mode.
3048
3049 2011-12-21  Sam Weinig  <sam@webkit.org>
3050
3051         Cleanup up clients when deallocating WebKit2 API objects
3052         https://bugs.webkit.org/show_bug.cgi?id=75014
3053
3054         Reviewed by Adam Roben.
3055
3056         * UIProcess/API/mac/WKBrowsingContextController.mm:
3057         (-[WKBrowsingContextController dealloc]):
3058         * UIProcess/API/mac/WKConnection.mm:
3059         (-[WKConnection dealloc]):
3060         Clear clients on dealloc.
3061
3062 2011-12-21  Rafael Brandao  <rafael.lobo@openbossa.org>
3063
3064         [Qt][WK2] Add tests for favicon and fix icon url decoding issue
3065         https://bugs.webkit.org/show_bug.cgi?id=74967
3066
3067         Reviewed by Simon Hausmann.
3068
3069         * UIProcess/API/qt/qwebiconimageprovider.cpp: We already receive the url
3070         without the percent encoding and we should access WebIconDatabase with
3071         an encoded url. Added a test to cover this behavior.
3072         (QWebIconImageProvider::requestImage):
3073         * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: Added.
3074         * UIProcess/API/qt/tests/qmltests/common/favicon.html: Added.
3075         * UIProcess/API/qt/tests/qmltests/common/favicon.png: Added.
3076         * UIProcess/API/qt/tests/qmltests/common/favicon2.html: Added.
3077         * UIProcess/API/qt/tests/qmltests/common/small-favicon.png: Added.
3078         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
3079
3080 2011-12-21  Sam Weinig  <sam@webkit.org>
3081
3082         Exception thrown when running WKBrowsingContextLoadDelegateTest.SimpleLoad test
3083         https://bugs.webkit.org/show_bug.cgi?id=75012
3084
3085         Reviewed by Adam Roben.
3086
3087         * UIProcess/API/mac/WKProcessGroup.mm:
3088         (-[WKProcessGroup dealloc]):
3089         Clear the WKContext's connection client.
3090
3091 2011-12-21  Michael Brüning  <michael.bruning@nokia.com>
3092
3093         [Qt][WK2] Fix tst_QQuickWebView::scrollRequest() API test
3094         https://bugs.webkit.org/show_bug.cgi?id=73994
3095
3096         Reviewed by Kenneth Rohde Christiansen.
3097
3098         Added a viewport meta tag so that the view is actually scrollable and
3099         does not get scaled to not be scrollable. Corrected the style
3100         definition for the <div> tag. Removed unneeded text in div
3101
3102         Rolled back changes some of the changes from the previous patch
3103         (r102453) because they weren't necessary.
3104
3105         * UIProcess/API/qt/tests/html/scroll.html:
3106         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3107         (tst_QQuickWebView::scrollRequest): Partially rolled back changes.
3108
3109 2011-12-21  Jessie Berlin  <jberlin@apple.com>
3110
3111         Windows build fix.
3112
3113         Replace all instances of "WebPropupMenuProxy" with "WebPopupMenuProxy".
3114
3115         * UIProcess/win/WebPopupMenuProxyWin.cpp:
3116         (WebKit::WebPopupMenuProxyWin::showPopupMenu):
3117         (WebKit::WebPopupMenuProxyWin::setFocusedIndex):
3118
3119 2011-12-20  Anders Carlsson  <andersca@apple.com>
3120
3121         Add ScrollableArea::contentsResized and have it call the scroll animator
3122         https://bugs.webkit.org/show_bug.cgi?id=74966
3123
3124         Reviewed by Sam Weinig.
3125
3126         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
3127         (WebKit::BuiltInPDFView::scrollbarStyleChanged):
3128
3129 2011-12-20  Anders Carlsson  <andersca@apple.com>
3130
3131         Try to fix the Windows build.
3132
3133         * UIProcess/win/WebPopupMenuProxyWin.cpp:
3134         (WebKit::WebPopupMenuProxyWin::showPopupMenu):
3135         (WebKit::WebPopupMenuProxyWin::setFocusedIndex):
3136
3137 2011-12-20  Simon Hausmann  <simon.hausmann@nokia.com>
3138
3139         [Qt][WK2] Remove statusBarMessageChanged
3140         https://bugs.webkit.org/show_bug.cgi?id=74405
3141
3142         Reviewed by Tor Arne Vestbø.
3143
3144         Removing support for window.status updates from the public
3145         QML API. See bug for details.
3146
3147         * UIProcess/API/qt/qquickwebview_p.h:
3148         * UIProcess/qt/QtWebPageUIClient.cpp:
3149         (QtWebPageUIClient::QtWebPageUIClient):
3150         * UIProcess/qt/QtWebPageUIClient.h:
3151
3152 2011-12-20  Anders Carlsson  <andersca@apple.com>
3153
3154         Add ScrollableArea wrappers for a bunch of ScrollAnimator member functions
3155         https://bugs.webkit.org/show_bug.cgi?id=74951
3156
3157         Reviewed by Sam Weinig.
3158
3159         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
3160         (WebKit::BuiltInPDFView::paint):
3161         (WebKit::BuiltInPDFView::handleMouseEvent):
3162         (WebKit::BuiltInPDFView::handleMouseEnterEvent):
3163         (WebKit::BuiltInPDFView::handleMouseLeaveEvent):
3164
3165 2011-12-20  Brent Fulgham  <bfulgham@webkit.org>
3166
3167         [WinCairo] Unreviewed build fix.
3168
3169         * win/WebKit2CFLite.def: Add missing export declaration.
3170
3171 2011-12-20  Simon Hausmann  <simon.hausmann@nokia.com>
3172
3173         [Qt] Build fix for gcc used on WK2 build bot.
3174
3175         * UIProcess/qt/QtWebPagePolicyClient.cpp:
3176         (QtWebPagePolicyClient::decidePolicyForNavigationAction): Don't do case:
3177         with values outside the range of the type. Instead switch() on the int instead.
3178
3179 2011-12-20  Rafael Brandao  <rafael.lobo@openbossa.org>
3180
3181         [Qt] Extend QQuickWebview::navigationRequested API
3182         https://bugs.webkit.org/show_bug.cgi?id=73818
3183
3184         Reviewed by Simon Hausmann.
3185
3186         Added url of the originating frame on QWebNavigationRequest,
3187         accessible via 'request.originatingUrl' on QML. Download action
3188         was moved to experimental, so in order to use it you should set
3189         'request.action = WebViewExperimental.DownloadRequest' on QML.
3190
3191         * UIProcess/API/qt/qquickwebview_p.h:
3192         * UIProcess/API/qt/qwebnavigationrequest.cpp:
3193         (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
3194         (QWebNavigationRequest::QWebNavigationRequest):
3195         (QWebNavigationRequest::originatingUrl):
3196         * UIProcess/API/qt/qwebnavigationrequest_p.h:
3197         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
3198         Tests were modified a bit to reuse urls and also added a test case to check
3199         originating url once a request is done.
3200         * UIProcess/qt/QtWebPagePolicyClient.cpp:
3201         (QtWebPagePolicyClient::decidePolicyForNavigationAction):
3202         * UIProcess/qt/QtWebPagePolicyClient.h:
3203
3204 2011-12-20  Balazs Kelemen  <kbalazs@webkit.org>
3205
3206         [Qt] WK2 Debugging quirks need some improvement
3207         https://bugs.webkit.org/show_bug.cgi?id=74859
3208
3209         Reviewed by Simon Hausmann.
3210
3211         Improvements added to make debugging WebKit2 more
3212         confortable and efficient:
3213         1. Unify debugging quirks. From now all of them are controlled
3214         by the QT_WEBKIT2_DEBUG environment variable.
3215         2. Disable crash handlers for WebKitTestRunner if debugging quirks
3216         are used to make it possible to use postmortem debugging via core dumps
3217         which is extremely useful for debugging bugs triggered by layout tests.
3218         3. Disable test timeout for WebKitTestRunner if debugging quirks
3219         are used because that makes debugging impossible.
3220
3221         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3222         (WebKit::QtWebProcess::setupChildProcess):
3223         * WebProcess/qt/WebProcessMainQt.cpp:
3224         (WebKit::WebProcessMainQt):
3225
3226 2011-12-20  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3227
3228         [Qt][WK2]REGRESSION(r103310): It broke tst_QQuickWebView::loadNonexistentFileUrl() API test
3229         https://bugs.webkit.org/show_bug.cgi?id=74923
3230
3231         Rubber-stamped by Csaba Osztrogonác.
3232
3233         Fixing API usage after http://trac.webkit.org/changeset/103310.
3234
3235         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3236         (tst_QQuickWebView::loadNonexistentFileUrl):
3237
3238 2011-12-20  Simon Hausmann  <simon.hausmann@nokia.com>
3239
3240         [Qt] Favicon support should work with multiple web contexts
3241         https://bugs.webkit.org/show_bug.cgi?id=74922
3242
3243         Reviewed by Tor Arne Vestbø.
3244
3245         * UIProcess/API/qt/qquickwebview.cpp:
3246         (QQuickWebViewPrivate::initialize): Remove unnecessary use of QtWebContext::defaultContext(). There is
3247         already a member variable "context" which is the correct one.
3248         (QQuickWebViewPrivate::setIcon): Ditto.
3249         * UIProcess/API/qt/qwebiconimageprovider.cpp:
3250         (QWebIconImageProvider::requestImage): Extract the context id from the image id and use it to
3251         query the correct icon database.
3252         * UIProcess/qt/QtWebContext.cpp: Provide a mapping from id to qtwebcontext.
3253         (WebKit::generateContextID):
3254         (WebKit::QtWebContext::QtWebContext):
3255         (WebKit::QtWebContext::~QtWebContext):
3256         (WebKit::QtWebContext::contextByID):
3257         (WebKit::QtWebContext::initialize):
3258         * UIProcess/qt/QtWebContext.h:
3259         (WebKit::QtWebContext::context):
3260         (WebKit::QtWebContext::contextID):
3261         * UIProcess/qt/QtWebIconDatabaseClient.cpp:
3262         (QtWebIconDatabaseClient::QtWebIconDatabaseClient):
3263         (QtWebIconDatabaseClient::requestIconForPageURL): Store the context id in the icon url.
3264         * UIProcess/qt/QtWebIconDatabaseClient.h:
3265
3266 2011-12-20  Rafael Brandao  <rafael.lobo@openbossa.org>
3267
3268         [Qt][WK2] Implement favicon support
3269         https://bugs.webkit.org/show_bug.cgi?id=71082
3270
3271         Reviewed by Simon Hausmann.
3272
3273         Added attribute to QQuickWebView named "icon" that should be used
3274         as source for QQuickImage in order to display it. All images
3275         pointing to it will refresh when the icon is ready. We also use IDs
3276         to make it possible to handle different icons for the same page URL
3277         at different times (i.e. dynamically changing favicon).
3278
3279         IconDatabase storage lies on UIProcess and the synchronous call for
3280         the icon that happens on WebIconDatabase won't need to send any message
3281         to WebProcess. The part of IconDatabase on WebProcess handles the download
3282         of the resource whenever it is needed. Then the content downloaded is sent
3283         through IPC to the actual database, on UIProcess.
3284
3285         * Target.pri:
3286         * UIProcess/API/qt/qquickwebview.cpp:
3287         (QQuickWebViewPrivate::initialize):
3288         (QQuickWebViewPrivate::_q_onIconChangedForPageURL):
3289         (QQuickWebViewPrivate::setIcon):
3290         (QQuickWebView::icon):
3291         * UIProcess/API/qt/qquickwebview_p.h:
3292         * UIProcess/API/qt/qquickwebview_p_p.h:
3293         * UIProcess/API/qt/qwebiconimageprovider.cpp: Added.
3294         (QWebIconImageProvider::QWebIconImageProvider):
3295         (QWebIconImageProvider::~QWebIconImageProvider):
3296         (QWebIconImageProvider::requestImage):
3297         * UIProcess/API/qt/qwebiconimageprovider_p.h: Added.
3298         * UIProcess/WebContext.h:
3299         * UIProcess/WebIconDatabase.cpp:
3300         (WebKit::WebIconDatabase::synchronousIconURLForPageURL):
3301         (WebKit::WebIconDatabase::imageForPageURL): Added iconSize parameter
3302         and a default value for it to not break the old usage. The support for
3303         multiple sizes of favicons is still missing on WebCore.
3304         * UIProcess/WebIconDatabase.h:
3305         * UIProcess/qt/QtWebContext.cpp:
3306         (WebKit::QtWebContext::initialize):
3307         * UIProcess/qt/QtWebContext.h:
3308         (WebKit::QtWebContext::iconDatabase):
3309         * UIProcess/qt/QtWebIconDatabaseClient.cpp: Added.
3310         (toQtWebIconDatabaseClient):
3311         (QtWebIconDatabaseClient::QtWebIconDatabaseClient):
3312         (QtWebIconDatabaseClient::~QtWebIconDatabaseClient):
3313         (QtWebIconDatabaseClient::didChangeIconForPageURL):
3314         (QtWebIconDatabaseClient::iconImageForPageURL):
3315         (QtWebIconDatabaseClient::iconURLHashForPageURL):
3316         (QtWebIconDatabaseClient::requestIconForPageURL):
3317         (QtWebIconDatabaseClient::retainIconForPageURL):
3318         (QtWebIconDatabaseClient::releaseIconForPageURL):
3319         * UIProcess/qt/QtWebIconDatabaseClient.h: Added.
3320         * UIProcess/qt/QtWebPageLoadClient.cpp:
3321         (QtWebPageLoadClient::didStartProgress):
3322
3323 2011-12-20  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3324
3325         [Qt] Improve QQuickWebView error handling API
3326         https://bugs.webkit.org/show_bug.cgi?id=73815
3327
3328         Reviewed by Simon Hausmann.
3329
3330         Modifying loadFail signal to include the error description
3331         and changing the ErrorType enum to ErrorDomain, to stay aligned
3332         with ResourceError API itself.
3333
3334         * UIProcess/API/qt/qquickwebview_p.h:
3335         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml:
3336         * UIProcess/qt/QtWebPageLoadClient.cpp:
3337         (QtWebPageLoadClient::dispatchLoadFailed):
3338
3339 2011-12-19  Sam Weinig  <sam@webkit.org>
3340
3341         Add support for scrollLineDown: and scrollLineUp: NSResponder selectors
3342         https://bugs.webkit.org/show_bug.cgi?id=74907
3343
3344         Reviewed by Dan Bernstein.
3345
3346         * UIProcess/API/mac/WKView.mm:
3347         Add implementations for scrollLineDown: and scrollLineUp: using our
3348         fun macros.
3349
3350 2011-12-19  Sam Weinig  <sam@webkit.org>
3351
3352         More PlatformEvent cleanup
3353         https://bugs.webkit.org/show_bug.cgi?id=74831
3354
3355         Reviewed by Dan Bernstein.
3356
3357         * WebProcess/WebPage/WebPage.cpp:
3358         (WebKit::handleContextMenuEvent):
3359         Update to use new names, access style.
3360
3361 2011-12-16  Jon Lee  <jonlee@apple.com>
3362
3363         [WK2] Extend show notification API to include the source page
3364         https://bugs.webkit.org/show_bug.cgi?id=74751
3365         <rdar://problem/10514541>
3366
3367         Reviewed by John Sullivan.
3368
3369         We add the source page that dispatched the notification in the API for convenience. In order to include the page,
3370         we move the show() message sent by WebNotificationManager from WebNotificationManagerProxy to WebPageProxy.
3371
3372         * WebProcess/Notifications/WebNotificationManager.cpp:
3373         (WebKit::WebNotificationManager::show): We aim the message at WebPageProxy instead of WebNotificationManagerProxy.
3374
3375         * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Remove the show() message.
3376         * UIProcess/WebPageProxy.messages.in: Add a showNotification() message.
3377
3378         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
3379         (WebKit::WebNotificationManagerProxy::show): This function is now called from the WebPageProxy.
3380         * UIProcess/Notifications/WebNotificationManagerProxy.h:
3381
3382         * UIProcess/API/C/WKNotificationProvider.h:
3383         * UIProcess/Notifications/WebNotificationProvider.cpp:
3384         (WebKit::WebNotificationProvider::show):
3385         * UIProcess/Notifications/WebNotificationProvider.h:
3386         * UIProcess/WebPageProxy.cpp:
3387         (WebKit::WebPageProxy::showNotification):
3388         * UIProcess/WebPageProxy.h:
3389
3390 2011-12-19  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3391
3392         [Qt][WK2] QWebDownloadItems are leaking
3393         https://bugs.webkit.org/show_bug.cgi?id=74618
3394
3395         Reviewed by Kenneth Rohde Christiansen.
3396
3397         QWebDownloadItems are leaking when WebProcess raises a
3398         download failure before sending didReceiveResponse back to UIProcess.
3399         This can happen when QtFileDownloader fails in determineFilename(), for instance.
3400         It happens when QtDownloadManager::downloadFailed() is reached
3401         and has an "empty" downloadItem, which means we never got to
3402         QtDownloadManager::downloadReceivedResponse(). At this point
3403         QQuickWebView::downloadRequested() signal hasn't been emitted and
3404         the downloadItem will have null parent. Therefore, it will leak
3405         unless we delete it ourselves.
3406
3407         * UIProcess/qt/QtDownloadManager.cpp:
3408         (WebKit::QtDownloadManager::downloadFailed):
3409
3410 2011-12-19  Anders Carlsson  <andersca@apple.com>
3411
3412         Send gesture events through the event dispatcher and scrolling coordinator
3413         https://bugs.webkit.org/show_bug.cgi?id=74879
3414
3415         Reviewed by Andreas Kling.
3416
3417         * UIProcess/WebPageProxy.cpp:
3418         (WebKit::WebPageProxy::handleGestureEvent):
3419         Use the EventDispatcher message.
3420
3421         * WebProcess/WebPage/EventDispatcher.cpp:
3422         (WebKit::EventDispatcher::gestureEvent):
3423         Try to send the event to the scrolling coordinator first before dispatching it on the main thread.
3424
3425         (WebKit::EventDispatcher::dispatchGestureEvent):
3426         Just call through to the WebPageProxy.
3427
3428         * WebProcess/WebPage/EventDispatcher.h:
3429         * WebProcess/WebPage/EventDispatcher.messages.in:
3430         * WebProcess/WebPage/WebPage.h:
3431         * WebProcess/WebPage/WebPage.messages.in:
3432         Move the GestureEvent message from WebPage to EventDispatcher.
3433
3434 2011-12-19  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3435
3436         [Qt] Setting QWebPreferences affect multiple WebViews
3437         https://bugs.webkit.org/show_bug.cgi?id=71559
3438
3439         Reviewed by Kenneth Rohde Christiansen.
3440
3441         The QWebPreferences are per WebView, but the actual implementation
3442         in WebKit2 make them per page group. Currently we share only one
3443         page group between all the views, so if we set preferences
3444         to one WebView the preferences are shared between them all, generating
3445         unexpected behavior. This patch fixes this by making each WebView have
3446         its own page group.
3447
3448         * UIProcess/API/qt/qquickwebview.cpp:
3449         (QQuickWebViewPrivate::QQuickWebViewPrivate):
3450         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
3451
3452 2011-12-19  Eric Carlson  <eric.carlson@apple.com>
3453
3454         Enable <track> for Mac build
3455         https://bugs.webkit.org/show_bug.cgi?id=74838
3456
3457         Reviewed by Darin Adler.
3458
3459         * Configurations/FeatureDefines.xcconfig:
3460
3461 2011-12-19  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3462
3463         [Qt] [WK2] Fix build error due to unused variables
3464         https://bugs.webkit.org/show_bug.cgi?id=74862
3465
3466         Reviewed by Kenneth Rohde Christiansen.
3467
3468         * UIProcess/qt/QtWebPageEventHandler.cpp:
3469         (QtWebPageEventHandler::inputMethodEvent):
3470