de3e4c9fdb6ef310f98858ee0e45c97b6724cbf5
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2012-03-16  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2
3         Merge setVisibleContentsForScaling with setVisibleContentsRectForPanning
4         https://bugs.webkit.org/show_bug.cgi?id=81346
5
6         Reviewed by Simon Hausmann.
7
8         This cleans up the code path and is one step on the way to avoid
9         calling both methods in succession, for instance after ending pinch
10         zoom.
11
12         * UIProcess/API/qt/qquickwebview.cpp:
13         (QQuickWebViewLegacyPrivate::updateViewportSize):
14         (QQuickWebViewFlickablePrivate::_q_commitScaleChange):
15         (QQuickWebViewPrivate::_q_commitPositionChange):
16         * UIProcess/DrawingAreaProxy.h:
17         (WebKit::DrawingAreaProxy::setVisibleContentsRect):
18         * UIProcess/DrawingAreaProxyImpl.cpp:
19         (WebKit::DrawingAreaProxyImpl::setVisibleContentsRect):
20         * UIProcess/DrawingAreaProxyImpl.h:
21         (DrawingAreaProxyImpl):
22         * UIProcess/LayerTreeHostProxy.cpp:
23         (WebKit::LayerTreeHostProxy::setVisibleContentsRect):
24         * UIProcess/LayerTreeHostProxy.h:
25         (LayerTreeHostProxy):
26         * UIProcess/WebLayerTreeRenderer.cpp:
27         (WebKit::WebLayerTreeRenderer::setVisibleContentsRect):
28         * UIProcess/WebLayerTreeRenderer.h:
29         (WebLayerTreeRenderer):
30         * WebProcess/WebPage/LayerTreeHost.h:
31         (WebKit::LayerTreeHost::setVisibleContentsRect):
32         * WebProcess/WebPage/LayerTreeHost.messages.in:
33         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
34         (WebKit::LayerTreeHostQt::setVisibleContentsRect):
35         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
36         (LayerTreeHostQt):
37
38 2012-03-16  YoungTaeck Song  <youngtaeck.song@samsung.com>
39
40         [EFL][WK2] Add ProcessLauncherEfl.cpp
41         https://bugs.webkit.org/show_bug.cgi?id=75464
42
43         Reviewed by Hajime Morita.
44
45         Add first version of ProcessLauncherEfl.cpp including launchProcess() and terminateProcess().
46
47         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: Added.
48         (WebKit::ProcessLauncher::launchProcess):
49         (WebKit::ProcessLauncher::terminateProcess):
50         (WebKit::ProcessLauncher::platformInvalidate):
51
52 2012-03-15  Anders Carlsson  <andersca@apple.com>
53
54         Try to fix the Snow Leopard build.
55
56         * UIProcess/API/mac/PDFViewController.mm:
57         (WebKit::PDFViewController::pdfKitBundle):
58
59 2012-03-07  Jon Lee  <jonlee@apple.com>
60
61         Move NotificationContents into Notification
62         https://bugs.webkit.org/show_bug.cgi?id=80487
63         <rdar://problem/10965519>
64
65         Reviewed by Jian Li.
66
67         * UIProcess/Notifications/WebNotificationManagerProxy.cpp: Remove extraneous include.
68         * WebProcess/Notifications/WebNotificationManager.cpp:
69         (WebKit::WebNotificationManager::show): Refactor to use accessor methods on Notification.
70
71 2012-03-15  Brent Fulgham  <bfulgham@webkit.org>
72
73         Unreviewed build correction. WinCairo export definitions
74         file was not updated when the main Apple file was changed.
75
76         * win/WebKit2CFLite.def: Revise export declarations to match
77         new symbol names.
78
79 2012-03-15  Anders Carlsson  <andersca@apple.com>
80
81         REGRESSION(r107168?): Assertion failures under pageContainsAnyHorizontalScrollbars causing multiple "crashes" on the Lion Intel Debug WebKit2 testers
82         https://bugs.webkit.org/show_bug.cgi?id=81162
83         <rdar://problem/11050423>
84
85         Reviewed by Beth Dakin and Jessie Berlin.
86
87         Downgrade the ASSERT to a simple if check since scrollableArea->isOnActivePage() can return false when layout happens during page transitions.
88
89         * WebProcess/WebPage/WebPage.cpp:
90         (WebKit::pageContainsAnyHorizontalScrollbars):
91
92 2012-03-15  David Hyatt  <hyatt@apple.com>
93
94         https://bugs.webkit.org/show_bug.cgi?id=81258
95
96         Add a preference for enabling the new multi-column layout code that will be based on regions.
97
98         Reviewed by Beth Dakin.
99
100         * Shared/WebPreferencesStore.h:
101         (WebKit):
102         * UIProcess/API/C/WKPreferences.cpp:
103         (WKPreferencesSetRegionBasedColumnsEnabled):
104         (WKPreferencesGetRegionBasedColumnsEnabled):
105         * UIProcess/API/C/WKPreferencesPrivate.h:
106         * WebProcess/WebPage/WebPage.cpp:
107         (WebKit::WebPage::updatePreferences):
108
109 2012-03-14  Anders Carlsson  <andersca@apple.com>
110
111         Can't swipe to go back/forward when the current page is a PDF document
112         https://bugs.webkit.org/show_bug.cgi?id=81194
113         <rdar://problem/6954125>
114
115         Reviewed by Sam Weinig.
116
117         Override -[PDFViewScrollView scrollWheel:] and have the new implementation call
118         -[WKPDFView forwardScrollWheelEvent:] when the PDF is pinned to either the left or right side.
119         WKPDFView will then call PDFController::forwardScrollWheelEvent which checks if we can go back or forward,
120         and passes the event along to the WKView which ends up triggering the swiping machinery in Safari.
121
122         * UIProcess/API/mac/PDFViewController.h:
123         * UIProcess/API/mac/PDFViewController.mm:
124         (-[WKPDFView forwardScrollWheelEvent:]):
125         (WebKit):
126         (WebKit::PDFViewController::forwardScrollWheelEvent):
127         (WebKit::findEnclosingWKPDFView):
128         (WebKit::PDFViewScrollView_scrollWheel):
129         (WebKit::PDFViewController::pdfKitBundle):
130         * UIProcess/WebPageProxy.cpp:
131         (WebKit::WebPageProxy::didCommitLoadForFrame):
132
133 2012-03-15  Brady Eidson  <beidson@apple.com>
134
135         <rdar://problem/11036900> and https://bugs.webkit.org/show_bug.cgi?id=81079
136         REGRESSION(r107844): Clipboard API only remembers most recent data set on clipboard
137
138         Reviewed by Sam Weinig.
139
140         Add the non-destructive "addTypes" to supplement the destructive "setTypes"
141
142         * UIProcess/WebContext.h:
143         * UIProcess/WebContext.messages.in:
144         * UIProcess/mac/WebContextMac.mm:
145         (WebKit::WebContext::addPasteboardTypes):
146
147         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
148         (WebKit::WebPlatformStrategies::addTypes):
149         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
150
151 2012-03-15  Carlos Garcia Campos  <cgarcia@igalia.com>
152
153         [GTK] Implement unicode submenu items
154         https://bugs.webkit.org/show_bug.cgi?id=81117
155
156         Reviewed by Martin Robinson.
157
158         * WebProcess/WebCoreSupport/WebEditorClient.h:
159         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
160         (WebKit::WebEditorClient::shouldShowUnicodeMenu): Implement
161         shouldShowUnicodeMenu() returning always true. When ContextMenu
162         API is implemented for GTK+ the UI process will decide whether to
163         show the unicode menu or not.
164
165 2012-03-15  Andras Becsi  <andras.becsi@nokia.com>
166
167         [Qt][WK2] Fix bounce-back behaviour for panning
168         https://bugs.webkit.org/show_bug.cgi?id=81144
169
170         Reviewed by Kenneth Rohde Christiansen.
171
172         Move the content back to boundaries immediately
173         in response to a tap gesture during the bounce-back
174         animation after panning.
175
176         * UIProcess/qt/QtPanGestureRecognizer.cpp:
177         (WebKit::QtPanGestureRecognizer::recognize):
178         * UIProcess/qt/QtViewportInteractionEngine.h:
179         Make the ensureContentWithinViewportBoundary function public.
180         (QtViewportInteractionEngine):
181
182 2012-03-15  Carlos Garcia Campos  <cgarcia@igalia.com>
183
184         [WK2] WebPageProxy::activeURL should return unreachableURL() when it's not empty
185         https://bugs.webkit.org/show_bug.cgi?id=75465
186
187         Reviewed by Philippe Normand.
188
189         * UIProcess/API/gtk/tests/WebViewTest.cpp:
190         (WebViewTest::replaceContent): Return the main frame
191         unreachableURL if it's not empty.
192         * UIProcess/WebPageProxy.cpp:
193         (WebKit::WebPageProxy::activeURL):
194
195 2012-03-14  Anders Carlsson  <andersca@apple.com>
196
197         java/java-and-plugins.html test failing
198         https://bugs.webkit.org/show_bug.cgi?id=81188
199         <rdar://problem/11048657>
200
201         Reviewed by Sam Weinig.
202
203         When we're marshaling NPObjects that wrap plug-in objects, make sure to check that the
204         current plug-in instance is the same as the plug-in instance the object came from and don't
205         pass the unwrapped object ID if that is the case.
206
207         * Shared/Plugins/NPRemoteObjectMap.cpp:
208         (WebKit::remoteNPObjectID):
209         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
210
211 2012-03-14  Matt Falkenhagen  <falken@chromium.org>
212
213         Allow per-script font settings to be specified in layout tests
214         https://bugs.webkit.org/show_bug.cgi?id=78184
215
216         Reviewed by Hajime Morita.
217
218         This adds per-script font settings to InternalSettings, so it can be used in layout tests instead of
219         the per-script font settings support in DumpRenderTree overridePreference, which has only been implemented
220         for Chromium so far.
221
222         * win/WebKit2.def: Added symbols.
223         * win/WebKit2CFLite.def: Added symbols.
224
225 2012-03-14  Michael Saboff  <msaboff@apple.com>
226
227         REGRESSION(r110383): ASSERTION failures in JSCell::finishCreation causing multiple tests to "crash" on the Lion Intel Debug Bots
228         https://bugs.webkit.org/show_bug.cgi?id=80993
229
230         Reviewed by Mark Rowe.
231
232         Moved $(BUILT_PRODUCTS_DIR)/usr/local/include to the front of HEADER_SEARCH_PATH
233         to fix builds given the wtf move.
234
235         * Configurations/BaseTarget.xcconfig:
236
237 2012-03-14  Andy Estes  <aestes@apple.com>
238
239         Stop shadowing the argument to drawRect: with a local variable.
240
241         Reviewed by Sam Weinig.
242
243         * UIProcess/API/mac/WKView.mm:
244         (-[WKView drawRect:]):
245
246 2012-03-13  Jon Lee  <jonlee@apple.com>
247
248         Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
249         https://bugs.webkit.org/show_bug.cgi?id=80922
250         <rdar://problem/11035082>
251
252         Reviewed by Jian Li.
253
254         You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
255         LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
256         new API. Therefore, APIs that are common between the two will have:
257         #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
258
259         This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
260         the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
261
262         Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
263         * Shared/WebProcessCreationParameters.cpp:
264         (WebKit::WebProcessCreationParameters::encode):
265         (WebKit::WebProcessCreationParameters::decode):
266         * Shared/WebProcessCreationParameters.h:
267         (WebProcessCreationParameters):
268         * UIProcess/WebContext.cpp:
269         (WebKit::WebContext::ensureWebProcess):
270         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
271         (WebKit):
272         (WebKit::NotificationPermissionRequestManager::startRequest):
273         (WebKit::NotificationPermissionRequestManager::cancelRequest):
274         (WebKit::NotificationPermissionRequestManager::permissionLevel):
275         (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
276         * WebProcess/Notifications/WebNotificationManager.cpp:
277         (WebKit):
278         (WebKit::WebNotificationManager::initialize):
279         (WebKit::WebNotificationManager::didUpdateNotificationDecision):
280         (WebKit::WebNotificationManager::didRemoveNotificationDecisions):
281         (WebKit::WebNotificationManager::policyForOrigin):
282         (WebKit::WebNotificationManager::show):
283         (WebKit::WebNotificationManager::cancel):
284         (WebKit::WebNotificationManager::clearNotifications):
285         (WebKit::WebNotificationManager::didDestroyNotification):
286         (WebKit::WebNotificationManager::didShowNotification):
287         (WebKit::WebNotificationManager::didClickNotification):
288         (WebKit::WebNotificationManager::didCloseNotifications):
289         * WebProcess/Notifications/WebNotificationManager.h:
290         (WebNotificationManager):
291         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
292         * WebProcess/WebCoreSupport/WebNotificationClient.h:
293         * WebProcess/WebPage/WebPage.cpp:
294         (WebKit::WebPage::WebPage):
295         (WebKit::WebPage::updatePreferences):
296         * WebProcess/WebProcess.cpp:
297         (WebKit::WebProcess::WebProcess):
298         (WebKit::WebProcess::didReceiveMessage):
299         * WebProcess/WebProcess.h:
300         (WebProcess):
301         * WebProcess/mac/WebProcessMac.mm:
302         (WebKit::WebProcess::platformInitializeWebProcess):
303
304 2012-03-14  Dinu Jacob  <dinu.jacob@nokia.com>
305
306         [Qt][WK2] Move code common to both ProxyAuthentication and Authentication context objects into a base class
307         https://bugs.webkit.org/show_bug.cgi?id=80627
308
309         Reviewed by Kenneth Rohde Christiansen.
310
311         No impact to QML API.
312
313         * UIProcess/qt/QtDialogRunner.cpp:
314         (BaseAuthenticationContextObject):
315         (BaseAuthenticationContextObject::BaseAuthenticationContextObject):
316         (HttpAuthenticationDialogContextObject):
317         (HttpAuthenticationDialogContextObject::HttpAuthenticationDialogContextObject):
318         (HttpAuthenticationDialogContextObject::realm):
319         (ProxyAuthenticationDialogContextObject):
320         (ProxyAuthenticationDialogContextObject::ProxyAuthenticationDialogContextObject):
321         (QtDialogRunner::initForAuthentication):
322
323 2012-03-14  Anders Carlsson  <andersca@apple.com>
324
325         With tiled drawing enabled, clicking a link to a PDF causes a cross-fade
326         https://bugs.webkit.org/show_bug.cgi?id=79247
327         <rdar://problem/10910808>
328
329         Reviewed by Sam Weinig.
330
331         Instead of creating a new CALayer for the WKView when we're in tiled mode, re-use the existing layer that AppKit makes for us.
332         This way, we won't get any implicit animations when we change layer properties (such as sublayers in this case).
333
334         * UIProcess/API/mac/WKView.mm:
335         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
336         (-[WKView wantsUpdateLayer]):
337         (-[WKView updateLayer]):
338
339 2012-03-14  Alexey Proskuryakov  <ap@apple.com>
340
341         WebProcess sometimes hits an assertion in SandboxExtensionTracker::didCommitProvisionalLoad after running regression tests
342         https://bugs.webkit.org/show_bug.cgi?id=81150
343         <rdar://problem/11002254>
344
345         Reviewed by Anders Carlsson.
346
347         * WebProcess/WebPage/WebPage.cpp:
348         (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad):
349         (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad):
350         It's not great, but for now we need to handle this case. Hopefully, some day we'll make
351         both WebKit2 processes better aware of what's going on with loading in WebCore.
352
353 2012-03-14  Anders Carlsson  <andersca@apple.com>
354
355         Fix UI process crash when a plug-in process crashes with a modal dialog showing
356         https://bugs.webkit.org/show_bug.cgi?id=81139
357         <rdar://problem/9641197>
358
359         Reviewed by Dan Bernstein.
360
361         When a plug-in process crashes, its corresponding PluginProcessProxy object is deleted immediately,
362         which is bad if we're currently running a nested run loop.
363
364         Fix this by making PluginProcessProxy ref-counted and protecting it before the call to -[NSApp runModalForWindow:].
365
366         * UIProcess/Plugins/PluginProcessManager.cpp:
367         (WebKit::PluginProcessManager::pluginProcessWithPath):
368         (WebKit::PluginProcessManager::getOrCreatePluginProcess):
369         * UIProcess/Plugins/PluginProcessManager.h:
370         (PluginProcessManager):
371         * UIProcess/Plugins/PluginProcessProxy.cpp:
372         (WebKit::PluginProcessProxy::create):
373         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
374         * UIProcess/Plugins/PluginProcessProxy.h:
375         (PluginProcessProxy):
376         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
377         (WebKit::PluginProcessProxy::setModalWindowIsShowing):
378         (WebKit::PluginProcessProxy::beginModal):
379
380 2012-03-14  Carlos Garcia Campos  <cgarcia@igalia.com>
381
382         [GTK] Handle printing errors in WebKit2
383         https://bugs.webkit.org/show_bug.cgi?id=77197
384
385         Reviewed by Gustavo Noronha Silva.
386
387         * UIProcess/API/gtk/WebKitError.cpp:
388         (webkit_print_error_quark): Add new error domain for print
389         errors.
390         * UIProcess/API/gtk/WebKitError.h: Ad print errors.
391         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
392         (webkit_print_operation_class_init): Add
393         WebKitPrintOperation::failed signal.
394         (drawPagesForPrintingCompleted): Emit WebKitPrintOperation::failed
395         when the print operation failed with the given error.
396         (webkitPrintOperationPrintPagesForFrame): Use
397         PrintFinishedCallback instead of a VoidCallback.
398         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
399         * UIProcess/API/gtk/tests/TestPrinting.cpp:
400         (testPrintOperationPrint):
401         (testPrintOperationErrors): Test different print errors are
402         correctly reported.
403         (beforeAll):
404         * UIProcess/WebPageProxy.cpp:
405         (WebKit::WebPageProxy::close): Invalidate print finished callbacks
406         map.
407         (WebKit::WebPageProxy::printFinishedCallback): Callback called
408         when the print operation has finished in the web process.
409         (WebKit::WebPageProxy::processDidCrash): Invalidate print finished
410         callbacks map.
411         (WebKit::WebPageProxy::drawPagesForPrinting): Use a
412         PrintFinishedCallback instead of a VoidCallback.
413         * UIProcess/WebPageProxy.h:
414         (WebKit): Delcare PrintFinishedCallback as a generic callback.
415         (WebPageProxy):
416         * UIProcess/WebPageProxy.messages.in: Use PrintFinishedCallback
417         instead of VoidCallback as callback argument of
418         DrawPagesForPrinting message.
419         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
420         (WebKit::PrintPagesData::PrintPagesData): Mark the data as invalid
421         when there are no pages to print.
422         (PrintPagesData): Add isValid parameter to mark the data struct as
423         invalid.
424         (WebKit::WebPrintOperationGtk::printPagesIdleDone): Call
425         printPagesDone() instead of printDone().
426         (WebKit::WebPrintOperationGtk::printPagesDone): Renamed.
427         (WebKit::WebPrintOperationGtk::printDone): Notify the UI process
428         that the print operation has finsihed.
429         (WebKit::WebPrintOperationGtk::print): Finish the print if the
430         PrintPagesData struct is not valid.
431         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
432
433 2012-03-13  Jer Noble  <jer.noble@apple.com>
434
435         Lion Intel Debug WebKit2 Tests crashing under [WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]
436         https://bugs.webkit.org/show_bug.cgi?id=81056
437
438         Reviewed by Jessie Berlin.
439
440         Give the InjectedBundlePageFullScreenClient a first crack at beganEnterFullScreen and beganExitFullScreen:
441         * WebProcess/FullScreen/WebFullScreenManager.cpp:
442         (WebKit::WebFullScreenManager::willEnterFullScreen):
443         (WebKit::WebFullScreenManager::willExitFullScreen):
444
445         And call the client function if it exists; otherwise, continue to message the page:
446         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
447         * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp:
448         (WebKit::InjectedBundlePageFullScreenClient::beganEnterFullScreen):
449         (WebKit::InjectedBundlePageFullScreenClient::beganExitFullScreen):
450         * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h:
451
452         Add a custom APIClientTraits for InjectedBundlePageFullScreenClient to handle the API number change.
453         * Shared/APIClientTraits.cpp:
454         * Shared/APIClientTraits.h:
455
456 2012-03-14  Andrey Kosyakov  <caseq@chromium.org>
457
458         Web Inspector: add didCancelFrame timeline event
459         https://bugs.webkit.org/show_bug.cgi?id=80994
460
461         Reviewed by Pavel Feldman.
462
463         * win/WebKit2.def:
464         * win/WebKit2CFLite.def:
465
466 2012-03-13  Anders Carlsson  <andersca@apple.com>
467
468         Find bouncy doesn’t hide when a subframe is scrolled
469         https://bugs.webkit.org/show_bug.cgi?id=81060
470         <rdar://problem/9365329>
471
472         Reviewed by Andreas Kling.
473
474         Instead of hiding the find indicator when pageDidScroll is called, add a check to FindController::drawRect and hide
475         the find indicator there if the find selection bounds have changed since the last call to drawRect.
476
477         * WebProcess/WebPage/FindController.cpp:
478         (WebKit::FindController::updateFindIndicator):
479         (WebKit::FindController::drawRect):
480         * WebProcess/WebPage/FindController.h:
481         (FindController):
482         * WebProcess/WebPage/WebPage.cpp:
483         (WebKit::WebPage::pageDidScroll):
484
485 2012-03-13  Jeff Miller  <jeffm@apple.com>
486
487         Support loading a WKPage from web archive data
488         https://bugs.webkit.org/show_bug.cgi?id=81044
489
490         This code was written by Jessie Berlin.
491
492         Reviewed by Brady Eidson.
493
494         * UIProcess/API/C/WKPage.cpp:
495         (WKPageLoadWebArchiveData): Added.
496         
497         * UIProcess/API/C/WKPage.h: Added WKPageLoadWebArchiveData().
498         
499         * UIProcess/WebPageProxy.cpp:
500         (WebKit::WebPageProxy::loadWebArchiveData): Added.
501         
502         * UIProcess/WebPageProxy.h: Added loadWebArchiveData().
503
504         * WebProcess/WebPage/WebPage.cpp:
505         (WebKit::WebPage::loadWebArchiveData): Added.
506         
507         * WebProcess/WebPage/WebPage.h: Added loadWebArchiveData().
508
509         * WebProcess/WebPage/WebPage.messages.in: Added LoadWebArchiveData message.
510
511 2012-03-13  Adam Barth  <abarth@webkit.org> && Benjamin Poulain  <bpoulain@apple.com>
512
513         Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
514         https://bugs.webkit.org/show_bug.cgi?id=78853
515
516         Reviewed by Adam Barth.
517
518         * Configurations/FeatureDefines.xcconfig:
519         * WebProcess/Geolocation/WebGeolocationManager.cpp:
520         (WebKit::WebGeolocationManager::registerWebPage):
521         (WebKit::WebGeolocationManager::unregisterWebPage):
522         (WebKit::WebGeolocationManager::didChangePosition):
523         (WebKit::WebGeolocationManager::didFailToDeterminePosition):
524         * WebProcess/InjectedBundle/InjectedBundle.cpp:
525         (WebKit::InjectedBundle::setGeoLocationPermission):
526         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
527         (WebKit):
528         * WebProcess/WebCoreSupport/WebChromeClient.h:
529         (WebChromeClient):
530         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
531         * WebProcess/WebCoreSupport/WebGeolocationClient.h:
532         * WebProcess/WebPage/WebPage.cpp:
533         (WebKit::WebPage::WebPage):
534         * mac/WebKit2.order:
535
536 2012-03-13  Max Vujovic  <mvujovic@adobe.com>
537
538         Add a method to window.internals to enable testing of inspector highlight rects
539         https://bugs.webkit.org/show_bug.cgi?id=80338
540
541         Reviewed by Pavel Feldman.
542
543         * win/WebKit2.def: Export symbols for win.
544         * win/WebKit2CFLite.def: Same as above.
545
546 2012-03-13  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
547
548         [Qt] Set correct device width and height.
549         https://bugs.webkit.org/show_bug.cgi?id=80980
550
551         Reviewed by Tor Arne Vestbø.
552
553         * UIProcess/API/qt/qquickwebview.cpp:
554         (QQuickWebViewFlickablePrivate::computeViewportConstraints):
555
556 2012-03-12  Sam Weinig  <sam@webkit.org>
557
558         Fix typo in PageClientImpl where we were overriding viewLayerHostingMode with
559         a function called layerHostingMode.
560
561         Reviewed by Anders Carlsson.
562
563         * UIProcess/API/mac/PageClientImpl.h:
564         * UIProcess/API/mac/PageClientImpl.mm:
565         (WebKit::PageClientImpl::viewLayerHostingMode):
566         Update name and add OVERRIDE to catch this in the future.
567
568 2012-03-12  Enrica Casucci  <enrica@apple.com>
569
570         WebKit2: remove NSPasteboard access for promised data from the WebProcess
571         https://bugs.webkit.org/show_bug.cgi?id=80073
572
573         Reviewed by Alexey Proskuryakov.
574
575         This patch removes the last remaining access to NSPasteboard from the WebProcess.
576         The code in WebDragClient::declareAndWriteDragImage now packages all the data
577         required for the drag and the promised drag types and sends one request to the UI
578         process that will place the data in the NSPasteboard when appropriate.
579         
580         * UIProcess/API/mac/PageClientImpl.h: Added setPromisedData method.
581         * UIProcess/API/mac/PageClientImpl.mm:
582         (WebKit::PageClientImpl::setPromisedData):
583         * UIProcess/API/mac/WKView.mm:
584         (matchesExtensionOrEquivalent): Added.
585         (fileExists): Added.
586         (pathWithUniqueFilenameForPath): Added.
587         (-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]):
588         (-[WKView pasteboardChangedOwner:]):
589         (-[WKView pasteboard:provideDataForType:]):
590         (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
591         * UIProcess/API/mac/WKViewInternal.h: Added _setPromisedData.
592         * UIProcess/PageClient.h:
593         * UIProcess/WebPageProxy.h: Added method for the new message.
594         * UIProcess/WebPageProxy.messages.in: Added setPromisedData message.
595         * UIProcess/mac/WebPageProxyMac.mm:
596         (WebKit::WebPageProxy::setPromisedData):
597         * WebProcess/WebCoreSupport/WebDragClient.cpp:
598         * WebProcess/WebCoreSupport/WebDragClient.h:
599         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
600         (WebKit::WebDragClient::declareAndWriteDragImage):
601         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
602         (InitWebCoreSystemInterface): Added SetMetadataURL.
603
604 2012-03-12  Andras Becsi  <andras.becsi@nokia.com>
605
606         [Qt][WK2] Add support for rudimentary scroll indicators in MiniBrowser
607         https://bugs.webkit.org/show_bug.cgi?id=80832
608
609         Reviewed by Tor Arne Vestbø.
610
611         Since the ScrollDecorator QML component requires a Flickable in its API
612         we need to expose the Flickable in QML for now and we also need to add
613         a notifier because we instantiate the internal Flickable only when the
614         WebView component completes construction.
615
616         * UIProcess/API/qt/qquickwebview.cpp:
617         (QQuickWebViewFlickablePrivate::onComponentComplete):
618         (QQuickWebViewExperimental::flickable):
619         * UIProcess/API/qt/qquickwebview_p.h:
620
621 2012-03-11  Timothy Hatcher  <timothy@apple.com>
622
623         Update how the Web Inspector resources are loaded.
624
625         https://bugs.webkit.org/show_bug.cgi?id=80814
626         rdar://problem/10359959
627
628         Reviewed by John Sullivan.
629
630         * Shared/WebPreferencesStore.h:
631         (WebKit): Added InspectorUsesWebKitUserInterface.
632         * Shared/WebProcessCreationParameters.cpp:
633         (WebKit::WebProcessCreationParameters::encode): Removed webInspectorLocalizedStringsPath.
634         (WebKit::WebProcessCreationParameters::decode): Ditto.
635         * Shared/WebProcessCreationParameters.h: Ditto.
636         (WebProcessCreationParameters): Ditto.
637         * UIProcess/API/C/WKContext.cpp:
638         * UIProcess/API/C/WKContextPrivate.h:
639         * UIProcess/API/C/WKPreferences.cpp:
640         (WKPreferencesSetInspectorUsesWebKitUserInterface): Added.
641         (WKPreferencesGetInspectorUsesWebKitUserInterface): Added.
642         * UIProcess/API/C/WKPreferencesPrivate.h:
643         * UIProcess/WebContext.cpp:
644         (WebKit::WebContext::ensureWebProcess): Removed webInspectorLocalizedStringsPath.
645         * UIProcess/WebContext.h:
646         (WebContext): Ditto.
647         * UIProcess/mac/WebInspectorProxyMac.mm:
648         (WebKit::inspectorReallyUsesWebKitUserInterface): Added.
649         (WebKit::WebInspectorProxy::createInspectorWindow): Use inspectorReallyUsesWebKitUserInterface
650         to determine if texture should be used.
651         (WebKit::WebInspectorProxy::inspectorPageURL): Choose the right path.
652         (WebKit::WebInspectorProxy::inspectorBaseURL): Ditto.
653         * WebProcess/WebPage/WebInspector.h:
654         * WebProcess/WebPage/mac/WebInspectorMac.mm:
655         (WebKit::inspectorReallyUsesWebKitUserInterface):
656         (WebKit::WebInspector::setInspectorUsesWebKitUserInterface): Added.
657         (WebKit::WebInspector::localizedStringsURL):
658         * WebProcess/WebPage/mac/WebPageMac.mm:
659         (WebKit::WebPage::platformPreferencesDidChange): Call WebInspector::setInspectorUsesWebKitUserInterface.
660         * WebProcess/mac/WebProcessMac.mm:
661         (WebKit::WebProcess::platformInitializeWebProcess): Removed call to WebInspector::setLocalizedStringsPath.
662
663 2012-03-11  Andy Estes  <aestes@apple.com>
664
665         Remove unnecessary call to NSSizeToCGSize().
666         https://bugs.webkit.org/show_bug.cgi?id=80817
667
668         Reviewed by Dan Bernstein.
669
670         There is no need to call NSSizeToCGSize() to convert an IntSize to a
671         CGSize. IntSize defines a conversion function to CGSize that will do
672         this for us implicitly.
673
674         * UIProcess/mac/BackingStoreMac.mm:
675         (WebKit::BackingStore::backingStoreContext): Do not call NSSizeToCGSize().
676
677 2012-03-11  Dan Bernstein  <mitz@apple.com>
678
679         WebKit2 lacks API for obtaining a representation of the RenderLayer tree of a page, like WebRenderLayer
680         <http://webkit.org/b/80791>
681
682         Reviewed by Anders Carlsson.
683
684         * CMakeLists.txt:
685         * GNUmakefile.am:
686
687         * Shared/API/c/WKBase.h: Added a type definition of WKRenderLayerRef.
688
689         * Shared/API/c/WKRenderLayer.cpp: Added.
690         (WKRenderLayerGetTypeID): Added. Returns the WKRenderLayer type ID.
691         (WKRenderLayerCopyRendererName): Added this getter wrapper.
692         (WKRenderLayerCopyElementTagName): Ditto.
693         (WKRenderLayerCopyElementID): Ditto.
694         (WKRenderLayerGetElementClassNames): Ditto.
695         (WKRenderLayerGetAbsoluteBounds): Ditto.
696         (WKRenderLayerIsClipping): Ditto.
697         (WKRenderLayerIsClipped): Ditto.
698         (WKRenderLayerIsReflection): Ditto.
699         (WKRenderLayerGetCompositingLayerType): Ditto.
700         (WKRenderLayerGetNegativeZOrderList): Ditto.
701         (WKRenderLayerGetNormalFlowList): Ditto.
702         (WKRenderLayerGetPositiveZOrderList): Ditto.
703
704         * Shared/API/c/WKRenderLayer.h: Added.
705
706         * Shared/APIObject.h: Added TypeRenderLayer to the APIObject::Type enum.
707
708         * Shared/UserMessageCoders.h:
709         (WebKit::UserMessageEncoder::baseEncode): Added WebRenderLayer encoding.
710         (WebKit::UserMessageDecoder::baseDecode): Added WebRenderLayer decoding.
711
712         * Shared/WebRenderLayer.cpp: Added.
713         (WebKit::WebRenderLayer::create): Added. Creates a WebRenderLayer for the page’s main
714         frame’s root layer.
715         (WebKit::WebRenderLayer::createArrayFromLayerList): Added this helper function.
716         (WebKit::WebRenderLayer::WebRenderLayer): Added. Constructs a WebRenderLayer with the
717         renderer name, element tag, ID and class names, metrics, child lists, and compositing
718         layer properties of the given RenderLayer.
719
720         * Shared/WebRenderLayer.h: Added.
721         (WebKit::WebRenderLayer::create):
722         (WebKit::WebRenderLayer::negativeZOrderList):
723         (WebKit::WebRenderLayer::normalFlowList):
724         (WebKit::WebRenderLayer::positiveZOrderList):
725         (WebKit::WebRenderLayer::renderObjectName):
726         (WebKit::WebRenderLayer::elementTagName):
727         (WebKit::WebRenderLayer::elementID):
728         (WebKit::WebRenderLayer::elementClassNames):
729         (WebKit::WebRenderLayer::isReflection):
730         (WebKit::WebRenderLayer::isClipping):
731         (WebKit::WebRenderLayer::isClipped):
732         (WebKit::WebRenderLayer::compositingLayerType):
733         (WebKit::WebRenderLayer::absoluteBoundingBox):
734         (WebKit::WebRenderLayer::WebRenderLayer):
735
736         * Target.pri
737
738         * UIProcess/API/C/WKAPICast.h: Added a mapping between WKRenderLayerRef and WebRenderLayer.
739
740         * WebKit2.xcodeproj/project.pbxproj: Added WebRenderLayer.{cpp,h} and WKRenderLayer.{cpp,h}.
741
742         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
743         (WKBundlePageCopyRenderLayerTree): Added this bundle API for getting the layer tree.
744
745         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
746
747         * win/WebKit2.vcproj:
748
749 2012-03-11  Joseph Pecoraro  <pecoraro@apple.com>
750
751         <http://webkit.org/b/80782> Web Inspector: Crash using released frontendClient when resizing window with closed inspector
752
753         The WebInspectorFrontendClient reference should be cleared when the
754         WebInspectorClient::closeInspectorFrontend is called. This adds a
755         destroyInspectorPage to mirror createInspectorPage and clear the weak
756         pointers that are no longer valid.
757
758         Reviewed by Pavel Feldman.
759
760         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
761         (WebKit::WebInspectorClient::closeInspectorFrontend):
762         (WebKit::WebInspectorClient::didResizeMainFrame):
763         * WebProcess/WebPage/WebInspector.cpp:
764         (WebKit::WebInspector::destroyInspectorPage):
765         * WebProcess/WebPage/WebInspector.h:
766
767 2012-03-11  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
768
769         [Qt] [WK2] Support threaded renderer in WK2
770         https://bugs.webkit.org/show_bug.cgi?id=76661
771
772         Reviewed by Noam Rosenthal.
773
774         Implement Qt5 threaded rendering support for Qt WebKit2.
775         Parts of LayerTreeHostProxy which contain layer tree and layer painting objects 
776         are moved to separate class called WebLayerTreeRenderer. WebLayerTreeRenderer is 
777         thread safe ref counted and referenced by LayerTreeHostProxy and paint node.
778         All layer tree and graphics objects are created, accessed and deallocated from Qt 
779         Scenegraph's paint thread only.
780         Layer tree updates from render queue are fetched in updatePaintNode call stack when 
781         main thread is locked.
782         Messages from paint thread to web process are passed through MainThreadGuardedInvoker 
783         call gate (implemented by Noam Rosenthal and previously reviewed by Kenneth Rohde 
784         Christiansen).
785
786         * Target.pri:
787         * UIProcess/API/qt/qquickwebpage.cpp:
788         (PageProxyNode::PageProxyNode):
789         (PageProxyNode::render):
790         (PageProxyNode::~PageProxyNode):
791         (PageProxyNode::layerTreeRenderer):
792         (PageProxyNode):
793         (PageProxyNode::setScale):
794         (QQuickWebPage::updatePaintNode):
795         (QQuickWebPagePrivate::~QQuickWebPagePrivate):
796         * UIProcess/LayerTreeHostProxy.cpp: Added.
797         (WebKit):
798         (WebKit::LayerTreeHostProxy::LayerTreeHostProxy):
799         (WebKit::LayerTreeHostProxy::~LayerTreeHostProxy):
800         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
801         (WebKit::LayerTreeHostProxy::paintToGraphicsContext):
802         (WebKit::LayerTreeHostProxy::updateViewport):
803         (WebKit::LayerTreeHostProxy::dispatchUpdate):
804         (WebKit::LayerTreeHostProxy::createTileForLayer):
805         (WebKit::LayerTreeHostProxy::updateTileForLayer):
806         (WebKit::LayerTreeHostProxy::removeTileForLayer):
807         (WebKit::LayerTreeHostProxy::deleteCompositingLayer):
808         (WebKit::LayerTreeHostProxy::setRootCompositingLayer):
809         (WebKit::LayerTreeHostProxy::syncCompositingLayerState):
810         (WebKit::LayerTreeHostProxy::didRenderFrame):
811         (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
812         (WebKit::LayerTreeHostProxy::destroyDirectlyCompositedImage):
813         (WebKit::LayerTreeHostProxy::setVisibleContentsRectForPanning):
814         (WebKit::LayerTreeHostProxy::setVisibleContentsRectForScaling):
815         (WebKit::LayerTreeHostProxy::renderNextFrame):
816         (WebKit::LayerTreeHostProxy::purgeBackingStores):
817         * UIProcess/LayerTreeHostProxy.h:
818         (WebKit):
819         (LayerTreeHostProxy):
820         (WebKit::LayerTreeHostProxy::layerTreeRenderer):
821         * UIProcess/WebLayerTreeRenderer.cpp: Renamed from Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp.
822         (WebKit):
823         (MainThreadGuardedInvoker):
824         (WebKit::MainThreadGuardedInvoker::call):
825         (WebKit::MainThreadGuardedInvoker::MainThreadGuardedInvoker):
826         (WebKit::MainThreadGuardedInvoker::invoke):
827         (WebKit::WebLayerTreeRenderer::callOnMainTread):
828         (WebKit::WebLayerTreeRenderer::WebLayerTreeRenderer):
829         (WebKit::WebLayerTreeRenderer::~WebLayerTreeRenderer):
830         (WebKit::WebLayerTreeRenderer::createLayer):
831         (WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
832         (WebKit::WebLayerTreeRenderer::syncAnimations):
833         (WebKit::WebLayerTreeRenderer::paintToGraphicsContext):
834         (WebKit::WebLayerTreeRenderer::setVisibleContentsRectForScaling):
835         (WebKit::WebLayerTreeRenderer::updateViewport):
836         (WebKit::WebLayerTreeRenderer::syncLayerParameters):
837         (WebKit::WebLayerTreeRenderer::deleteLayer):
838         (WebKit::WebLayerTreeRenderer::ensureLayer):
839         (WebKit::WebLayerTreeRenderer::setRootLayerID):
840         (WebKit::WebLayerTreeRenderer::getBackingStore):
841         (WebKit::WebLayerTreeRenderer::createTile):
842         (WebKit::WebLayerTreeRenderer::removeTile):
843         (WebKit::WebLayerTreeRenderer::updateTile):
844         (WebKit::WebLayerTreeRenderer::createImage):
845         (WebKit::WebLayerTreeRenderer::destroyImage):
846         (WebKit::WebLayerTreeRenderer::assignImageToLayer):
847         (WebKit::WebLayerTreeRenderer::swapBuffers):
848         (WebKit::WebLayerTreeRenderer::flushLayerChanges):
849         (WebKit::WebLayerTreeRenderer::renderNextFrame):
850         (WebKit::WebLayerTreeRenderer::ensureRootLayer):
851         (WebKit::WebLayerTreeRenderer::syncRemoteContent):
852         (WebKit::WebLayerTreeRenderer::purgeGLResources):
853         (WebKit::WebLayerTreeRenderer::purgeBackingStores):
854         (WebKit::WebLayerTreeRenderer::detach):
855         (WebKit::WebLayerTreeRenderer::appendUpdate):
856         * UIProcess/WebLayerTreeRenderer.h: Copied from Source/WebKit2/UIProcess/LayerTreeHostProxy.h.
857         (WebKit):
858         (WebLayerTreeRenderer):
859         (WebKit::WebLayerTreeRenderer::layerByID):
860         (WebKit::WebLayerTreeRenderer::rootLayer):
861         (WebKit::WebLayerTreeRenderer::notifyAnimationStarted):
862         (WebKit::WebLayerTreeRenderer::notifySyncRequired):
863         (WebKit::WebLayerTreeRenderer::showDebugBorders):
864         (WebKit::WebLayerTreeRenderer::showRepaintCounter):
865         (WebKit::WebLayerTreeRenderer::paintContents):
866
867 2012-03-09  Jon Lee  <jonlee@apple.com>
868
869         Rename NotificationPresenter to NotificationClient
870         https://bugs.webkit.org/show_bug.cgi?id=80488
871         <rdar://problem/10965558>
872
873         Reviewed by Kentaro Hara.
874
875         Refactor to use renamed WebCore::NotificationClient.
876         * UIProcess/Notifications/WebNotificationManagerProxy.h:
877         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
878         (WebKit::NotificationPermissionRequestManager::startRequest):
879         (WebKit::NotificationPermissionRequestManager::permissionLevel):
880         * WebProcess/Notifications/NotificationPermissionRequestManager.h:
881         (NotificationPermissionRequestManager):
882         * WebProcess/Notifications/WebNotificationManager.cpp:
883         (WebKit::WebNotificationManager::policyForOrigin):
884         * WebProcess/Notifications/WebNotificationManager.h:
885         (WebNotificationManager):
886         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
887         (WebKit::WebNotificationClient::checkPermission):
888         * WebProcess/WebCoreSupport/WebNotificationClient.h:
889         (WebNotificationClient):
890
891 2012-03-09  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
892
893         [Qt] [WK2] Shouldn't use item for clipping rect calculation in paint node.
894         https://bugs.webkit.org/show_bug.cgi?id=80714
895
896         Reviewed by Noam Rosenthal.
897
898         Replace item based clip-rect calculation with clipping-nodes based calculation.
899         This is required for threaded rendering, since we don't have access to the QSGItems
900         from the render thread.
901
902         * UIProcess/API/qt/qquickwebpage.cpp:
903         (QQuickWebPage::QQuickWebPage):
904         (QQuickWebPagePrivate::paintToCurrentGLContext):
905         (PageProxyNode::render):
906         (PageProxyNode::clipRect):
907         (PageProxyNode):
908         * UIProcess/API/qt/qquickwebpage_p_p.h:
909         (QQuickWebPagePrivate):
910         * UIProcess/API/qt/qquickwebview.cpp:
911         (QQuickWebView::QQuickWebView):
912
913 2012-03-09  Enrica Casucci  <enrica@apple.com>
914
915         Move WebNSURLExtras code down to WebCore.
916         https://bugs.webkit.org/show_bug.cgi?id=80611
917
918         Reviewed by Alexey Proskuryakov.
919
920         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
921         (InitWebCoreSystemInterface):
922
923 2012-03-09  Jeff Miller  <jeffm@apple.com>
924
925         Add WKPageEndPrinting() to balance WKPageBeginPrinting()
926         https://bugs.webkit.org/show_bug.cgi?id=80739
927
928         Reviewed by Dan Bernstein.
929
930         * UIProcess/API/C/WKPage.cpp:
931         (WKPageEndPrinting): Added.
932         
933         * UIProcess/API/C/WKPagePrivate.h: Added WKPageEndPrinting().
934
935 2012-03-09  Emil A Eklund  <eae@chromium.org>
936
937         Add roundedPoint to HitTestResult and change platform code to use it
938         https://bugs.webkit.org/show_bug.cgi?id=80715
939
940         Reviewed by James Robinson.
941
942         Change ports to use roundedPoint to avoid exposing subpixel types to
943         platform code.
944
945         * WebProcess/WebPage/WebContextMenu.cpp:
946         (WebKit::WebContextMenu::show):
947
948 2012-03-09  Alexey Proskuryakov  <ap@apple.com>
949
950         [Mac] Pass sandbox profiles through preprocessor
951         https://bugs.webkit.org/show_bug.cgi?id=80651
952
953         Reviewed by Mark Rowe.
954
955         * DerivedSources.make: Preprocess sandbox profiles.
956
957         * PluginProcess/mac/com.apple.WebKit.PluginProcess.sb: Removed.
958         * PluginProcess/mac/com.apple.WebKit.PluginProcess.sb.in: Copied from Source/WebKit2/PluginProcess/mac/com.apple.WebKit.PluginProcess.sb.
959         * WebProcess/com.apple.WebProcess.sb: Removed.
960         * WebProcess/com.apple.WebProcess.sb.in: Copied from Source/WebKit2/WebProcess/com.apple.WebProcess.sb.
961         Renamed to avoid make finding the wrong original in default paths.
962
963         * WebKit2.xcodeproj/project.pbxproj: Copy preprocessed files to Resources, not originals.
964         Also, changed DerivedSources target to use BaseTarget.xcconfig to have correct include paths.
965
966 2012-03-09  Jon Lee  <jonlee@apple.com>
967
968         Add support for ENABLE(LEGACY_NOTIFICATIONS)
969         https://bugs.webkit.org/show_bug.cgi?id=80497
970
971         Reviewed by Adam Barth.
972
973         Prep for b80472: Update API for Web Notifications
974         * Configurations/FeatureDefines.xcconfig:
975
976 2012-03-09  Ashod Nakashian  <ashodnakashian@yahoo.com>
977
978         Bash scripts should support LF endings only
979         https://bugs.webkit.org/show_bug.cgi?id=79509
980
981         Reviewed by David Kilzer.
982
983         * win/build-generated-files.sh: Added properties svn:executable and svn:eol-style.
984
985 2012-03-08  Enrica Casucci  <enrica@apple.com>
986
987         REGRESSION (r109022): Files dragged onto input controls cannot be read due to sandbox violation.
988         https://bugs.webkit.org/show_bug.cgi?id=80203
989         <rdar://problem/10976643>
990
991         Reviewed by Alexey Proskuryakov.
992
993         This patch reverts a small part fo r109022, leaving access to
994         NSPasteboard in the WebProcess when retrieving pathnames for
995         files being dragged. This avoid the sandbox violation until we
996         implement a mechanism to provide a sandbox extension to the WebProcess.
997         
998         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
999         (WebKit::WebPlatformStrategies::getPathnamesForType):
1000
1001 2012-03-09  Sheriff Bot  <webkit.review.bot@gmail.com>
1002
1003         Unreviewed, rolling out r110191, r110202, and r110279.
1004         http://trac.webkit.org/changeset/110191
1005         http://trac.webkit.org/changeset/110202
1006         http://trac.webkit.org/changeset/110279
1007         https://bugs.webkit.org/show_bug.cgi?id=80694
1008
1009         They broke !ENABLE(INSPECTOR) builds (Requested by Ossy on
1010         #webkit).
1011
1012         * win/WebKit2.def:
1013         * win/WebKit2CFLite.def:
1014
1015 2012-03-08  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1016
1017         [Qt] Use Qt's module system for install rules and depending on QtWebKit
1018
1019         Instead of rolling our own install rules we now use the same approach as
1020         every other Qt module, by loading qt_module.prf and qt_module_config.prf.
1021
1022         This ensures that we follow the same semantics as the rest of Qt on
1023         what sort of config options are enabled by default (create_cmake eg.).
1024         It also allows us to use QT += webkit instead of the workaround we had
1025         with CONFIG += qtwebkit.
1026
1027         We do however force Qt to always treat our build as a non-developer build,
1028         so the libraries will end up in the WebKit lib directory instead of the
1029         qtbase directory (as with a normal developer-build). This allows us to
1030         keep the webkit-build self-contained. If Qt is a developer build we still
1031         copy the module file manually to Qt, so that you don't have to install
1032         WebKit to make it available.
1033
1034         For non-developer builds of Qt, it is still possible to use the built
1035         WebKit libraries without having to install them, by having the variable
1036         QMAKE_EXTRA_MODULE_FORWARDS set in the project's .qmake.cache file,
1037         pointing to $WEBKITOUTUTDIR/$CONFIGURATION/modules.
1038
1039         https://bugs.webkit.org/show_bug.cgi?id=80590
1040
1041         Reviewed by Simon Hausmann.
1042
1043         * UIProcess/API/qt/tests/publicapi/publicapi.pro:
1044         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
1045         * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
1046         * UIProcess/API/qt/tests/qmltests/WebView.pro:
1047         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
1048         * UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro:
1049         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
1050         * UIProcess/API/qt/tests/tests.pri:
1051         * UIProcess/API/qt/tests/util.cpp:
1052         * WebProcess.pro:
1053
1054 2012-03-08  No'am Rosenthal  <noam.rosenthal@nokia.com>
1055
1056         [Qt][WK2] Allow transparent WebViews
1057         https://bugs.webkit.org/show_bug.cgi?id=80608
1058
1059         Reviewed by Tor Arne Vestbø.
1060
1061         Added support for transparentBackground in QQuickWebViewExperimental.
1062         This uses the existing drawsTransparentBackground property in WebKit2.
1063         Also, changed LayerTreeHostQt to set the contentsOpaque flag when the root layer changes,
1064         otherwise the change doesn't take effect.
1065
1066         A new API test was added.
1067
1068         * UIProcess/API/qt/qquickwebview.cpp:
1069         (QQuickWebViewPrivate::setTransparentBackground):
1070         (QQuickWebViewPrivate::transparentBackground):
1071         (QQuickWebViewExperimental::transparentBackground):
1072         (QQuickWebViewExperimental::setTransparentBackground):
1073         * UIProcess/API/qt/qquickwebview_p.h:
1074         * UIProcess/API/qt/qquickwebview_p_p.h:
1075         (QQuickWebViewPrivate):
1076         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
1077         (tst_QQuickWebView):
1078         (tst_QQuickWebView::transparentWebViews):
1079         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
1080         (WebKit::LayerTreeHostQt::LayerTreeHostQt):
1081         (WebKit::LayerTreeHostQt::setRootCompositingLayer):
1082
1083 2012-03-08  Gustavo Noronha Silva  <gns@gnome.org>
1084
1085         GTK+ build fix. Only try to get the backing from the layer in when
1086         ACCELERATED_COMPOSITING is enabled.
1087
1088         Rubber-stamped by Ryosuke Niwa.
1089
1090         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1091         (WebKit::screenRectOfContents):
1092
1093 2012-03-08  Ryosuke Niwa  <rniwa@webkit.org>
1094
1095         Mac build fix for micro data API.
1096
1097         * Configurations/FeatureDefines.xcconfig:
1098
1099 >>>>>>> .r110352
1100 2012-03-08  Jer Noble  <jer.noble@apple.com>
1101
1102         Unreviewed Snow Leopard build fix.
1103
1104         On Leopard and Snow Leopard, provide an implementation for -[NSWindow convertRectToScreen:].
1105
1106         * UIProcess/mac/WKFullScreenWindowController.mm:
1107         (-[NSWindow convertRectToScreen:]):
1108
1109 2012-03-08  Jer Noble  <jer.noble@apple.com>
1110
1111         Further unreviewed build fix.
1112
1113         Add in the WebCore namespace, so that IntRect is pulled in.
1114
1115         * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
1116         * UIProcess/qt/WebFullScreenManagerProxyQt.cpp:
1117         * UIProcess/win/WebFullScreenManagerProxyWin.cpp:
1118
1119 2012-03-08  Jer Noble  <jer.noble@apple.com>
1120
1121         Unreviewed build fix.
1122         
1123         Add stub implementations of beganEnterFullScreen and beganExitFullScreen
1124         to platform-specific WebFullScreenManagerProxy implementations.
1125
1126         * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
1127         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
1128         (WebKit::WebFullScreenManagerProxy::beganExitFullScreen):
1129         * UIProcess/qt/WebFullScreenManagerProxyQt.cpp:
1130         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
1131         (WebKit::WebFullScreenManagerProxy::beganExitFullScreen):
1132         * UIProcess/win/WebFullScreenManagerProxyWin.cpp:
1133         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
1134         (WebKit::WebFullScreenManagerProxy::beganExitFullScreen):
1135
1136 2012-03-08  Jer Noble  <jer.noble@apple.com>
1137
1138         Full Screen Refactor Part 3: Animate into Full Screen mode using new animation classes.
1139         https://bugs.webkit.org/show_bug.cgi?id=78928
1140
1141         Reviewed by Anders Carlsson.
1142
1143         Boilerplate changes to WebKit2 IPC messages and supporting functions.
1144         * UIProcess/WebFullScreenManagerProxy.cpp:
1145         (WebKit::WebFullScreenManagerProxy::setAnimatingFullScreen): Added boilerplate.
1146         * UIProcess/WebFullScreenManagerProxy.h:
1147         * UIProcess/WebFullScreenManagerProxy.messages.in:
1148         * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
1149         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen): Added boilerplate.
1150         (WebKit::WebFullScreenManagerProxy::beganExitFullScreen): Added boilerplate.
1151         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1152         (WebKit::screenRectOfContents): Added.  Calculates the screen rect of an element's contents.
1153         (WebKit::WebFullScreenManager::enterFullScreenForElement): Use screenRectOfContents()
1154         (WebKit::WebFullScreenManager::willEnterFullScreen): Ditto. Do not set the background color. Call new BeganEnterFullScreen
1155             XPC message.
1156         (WebKit::WebFullScreenManager::didEnterFullScreen): Do not set the background color.
1157         (WebKit::WebFullScreenManager::willExitFullScreen): Use screenRectOfContents. Do not set the background color. Call new
1158             BeganExitFullScreen XPC message.
1159         (WebKit::WebFullScreenManager::didExitFullScreen): Do not set the background color.
1160         (WebKit::WebFullScreenManager::setAnimatingFullScreen): Added boilerplate.
1161         * WebProcess/FullScreen/WebFullScreenManager.h:
1162         * WebProcess/FullScreen/WebFullScreenManager.messages.in:
1163
1164         * UIProcess/mac/WKFullScreenWindowController.h:
1165         * UIProcess/mac/WKFullScreenWindowController.mm:
1166         (-[WKFullScreenWindowController cancelOperation:]): Renamed from _requestExitWithAnimation:.
1167         (-[WKFullScreenWindowController applicationDidResignActive:]): Call cancelOperation: instead
1168             of _requestExitWithAnimation.
1169         (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): Set the frame of
1170             both the full screen window and the background window.
1171         (-[WKFullScreenWindowController enterFullScreen:]): Save a rendered image of the current
1172             page to use in the placeholder.
1173         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Renamed from 
1174             beganEnterFullScreenAnimation.
1175         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): No need to swap 
1176             placeholder views here, as they were already swapped in beganEnter...:.
1177         (-[WKFullScreenWindowController exitFullScreen]):
1178         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Renamed from 
1179             beganExitFullScreenAnimation.
1180         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Swap web view back into place.
1181         (-[WKFullScreenWindowController close]):
1182         (-[WKFullScreenWindowController animationDidEnd:]): Added.
1183         (createBackgroundFullscreenWindow): Added.
1184         (windowFrameFromApparentFrames): Added.
1185         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Added.
1186         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): Added.
1187
1188 2012-03-08  Jer Noble  <jer.noble@apple.com>
1189
1190         Full Screen Refactor Part 2: Remove unnecessary WebKit2 APIs for Full Screen made
1191         https://bugs.webkit.org/show_bug.cgi?id=78926
1192
1193         Reviewed by John Sullivan.
1194
1195         The following functions (and also their Proxy versions) were removed completely:
1196         WebFullScreenManager::enterAcceleratedCompositingMode(const LayerTreeContext&)
1197         WebFullScreenManager::exitAcceleratedCompositingMode()
1198         WebFullScreenManager::beganEnterFullScreenAnimation()
1199         WebFullScreenManager::finishedEnterFullScreenAnimation(bool)
1200         WebFullScreenManager::beganExitFullScreenAnimation()
1201         WebFullScreenManager::finishedExitFullScreenAnimation(bool)
1202         WebFullScreenManager::getFullScreenRect(WebCore::IntRect&)
1203
1204         * UIProcess/WebFullScreenManagerProxy.cpp:
1205         * UIProcess/WebFullScreenManagerProxy.h:
1206         (WebKit::WebFullScreenManagerProxy::beginEnterFullScreenAnimation):
1207         (WebKit::WebFullScreenManagerProxy::beginExitFullScreenAnimation):
1208         (WebKit::WebFullScreenManagerProxy::disposeOfLayerClient):
1209         (WebFullScreenManagerProxy):
1210         * UIProcess/WebFullScreenManagerProxy.messages.in:
1211         * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
1212         * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
1213         * UIProcess/qt/WebFullScreenManagerProxyQt.cpp:
1214         * UIProcess/win/WebFullScreenManagerProxyWin.cpp:
1215         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation):
1216         * WebKit2.xcodeproj/project.pbxproj:
1217         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1218         (WebKit::WebFullScreenManager::create):
1219         (WebKit::WebFullScreenManager::~WebFullScreenManager):
1220         * WebProcess/FullScreen/WebFullScreenManager.h:
1221         (WebFullScreenManager):
1222         * WebProcess/FullScreen/WebFullScreenManager.messages.in:
1223         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1224         (WebKit::WebChromeClient::exitFullScreenForElement):
1225         * WebProcess/WebCoreSupport/WebChromeClient.h:
1226         (WebChromeClient):
1227
1228         Additionally, the platform-specific WebFullScreenManager subclasses were removed, as no
1229         platform-specific implementations remained after the above functions were removed:
1230         * GNUmakefile.am:
1231         * Target.pri:
1232         * win/WebKit2.vcproj:
1233         * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.cpp: Removed.
1234         * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.h: Removed.
1235         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: Removed.
1236         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: Removed.
1237         * WebProcess/FullScreen/qt/WebFullScreenManagerQt.cpp: Removed.
1238         * WebProcess/FullScreen/qt/WebFullScreenManagerQt.h: Removed.
1239         * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp: Removed.
1240         * WebProcess/FullScreen/win/WebFullScreenManagerWin.h: Removed.
1241
1242 2012-03-08  Matt Lilek  <mrl@apple.com>
1243
1244         Don't enable VIDEO_TRACK on all OS X platforms
1245         https://bugs.webkit.org/show_bug.cgi?id=80635
1246
1247         Reviewed by Eric Carlson.
1248
1249         * Configurations/FeatureDefines.xcconfig:
1250
1251 2012-03-08  Max Vujovic  <mvujovic@adobe.com>
1252
1253         Add a method to window.internals to enable testing of inspector highlight rects
1254         https://bugs.webkit.org/show_bug.cgi?id=80338
1255
1256         Reviewed by Pavel Feldman.
1257
1258         * win/WebKit2.def: Export symbols for win.
1259         * win/WebKit2CFLite.def: Same as above.
1260
1261 2012-03-08  Dinu Jacob  <dinu.jacob@nokia.com>
1262
1263         [Qt WK2] Remove duplicate code related to dialog handling in QQuickWebView
1264         https://bugs.webkit.org/show_bug.cgi?id=80557
1265
1266         Reviewed by Simon Hausmann.
1267
1268         Move common code related to running QtDialogRunner into a separate function
1269  
1270         * UIProcess/API/qt/qquickwebview.cpp:
1271         (QQuickWebViewPrivate::runJavaScriptAlert):
1272         (QQuickWebViewPrivate::runJavaScriptConfirm):
1273         (QQuickWebViewPrivate::runJavaScriptPrompt):
1274         (QQuickWebViewPrivate::handleAuthenticationRequiredRequest):
1275         (QQuickWebViewPrivate::handleProxyAuthenticationRequiredRequest):
1276         (QQuickWebViewPrivate::handleCertificateVerificationRequest):
1277         (QQuickWebViewPrivate::execDialogRunner):
1278         * UIProcess/API/qt/qquickwebview_p_p.h:
1279         (QQuickWebViewPrivate):
1280
1281 2012-03-07  Dinu Jacob  <dinu.jacob@nokia.com>
1282
1283         [Qt] Authentication dialog does not work
1284         https://bugs.webkit.org/show_bug.cgi?id=79738
1285
1286         Reviewed by Simon Hausmann.
1287
1288         QQuickWebView should accept touch events only if there is
1289         no active dialog.
1290
1291         * UIProcess/API/qt/qquickwebview.cpp:
1292         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1293         (QQuickWebViewPrivate::runJavaScriptAlert):
1294         (QQuickWebViewPrivate::runJavaScriptConfirm):
1295         (QQuickWebViewPrivate::runJavaScriptPrompt):
1296         (QQuickWebViewPrivate::handleAuthenticationRequiredRequest):
1297         (QQuickWebViewPrivate::handleProxyAuthenticationRequiredRequest):
1298         (QQuickWebViewPrivate::handleCertificateVerificationRequest):
1299         (QQuickWebView::touchEvent):
1300         * UIProcess/API/qt/qquickwebview_p_p.h:
1301         (QQuickWebViewPrivate):
1302
1303 2012-03-07  Dan Bernstein  <mitz@apple.com>
1304
1305         <rdar://problem/8494396> WebKit2 lacks API for obtaining a representation of the render tree of a page, like WebRenderNode
1306         https://bugs.webkit.org/show_bug.cgi?id=80230
1307
1308         Reviewed by Beth Dakin.
1309
1310         * CMakeLists.txt:
1311         * GNUmakefile.am:
1312
1313         * Shared/API/c/WKBase.h: Added a type definition of WKRenderObjectRef.
1314
1315         * Shared/API/c/WKRenderObject.cpp: Added.
1316         (WKRenderObjectGetTypeID): Added. Returns the WKRenderObject type ID.
1317         (WKRenderObjectCopyName): Added this getter wrapper.
1318         (WKRenderObjectGetAbsolutePosition): Ditto.
1319         (WKRenderObjectGetFrameRect): Ditto.
1320         (WKRenderObjectGetChildren): Ditto.
1321
1322         * Shared/API/c/WKRenderObject.h: Added.
1323
1324         * Shared/APIObject.h: Added TypeRenderObject to the APIObject::Type enum.
1325         * Shared/UserMessageCoders.h:
1326         (WebKit::UserMessageEncoder::baseEncode): Added WebRenderObject encoding.
1327         (WebKit::UserMessageDecoder::baseDecode): Added WebRenderObject decoding.
1328         * Shared/WebRenderObject.cpp: Added.
1329         (WebKit::WebRenderObject::create): Added. Creates a WebRenderObject for the page’s main
1330         frame content renderer.
1331         (WebKit::WebRenderObject::WebRenderObject): Added. Constructs a WebRenderObject with the
1332         name, metrics and children of the given RenderObject, following the rules used in WebKit1
1333         WebRenderNode. In particular, a RenderWidget representing a frame gets the frame’s content
1334         renderer as a child.
1335
1336         * Shared/WebRenderObject.h: Added.
1337         (WebKit::WebRenderObject::create):
1338         (WebKit::WebRenderObject::children):
1339         (WebKit::WebRenderObject::name):
1340         (WebKit::WebRenderObject::absolutePosition):
1341         (WebKit::WebRenderObject::frameRect):
1342         (WebKit::WebRenderObject::WebRenderObject):
1343
1344         * Target.pri:
1345
1346         * UIProcess/API/C/WKAPICast.h: Added a mapping between WKRenderObjectRef and WebRenderObject.
1347
1348         * WebKit2.xcodeproj/project.pbxproj: Added WebRenderObject.{cpp,h} and WKRenderObject.{cpp.h}.
1349
1350         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1351         (WKBundlePageCopyRenderTree): Added this bundle API for getting the render tree.
1352
1353         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1354
1355         * win/WebKit2.vcproj:
1356
1357 2012-03-07  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1358
1359         Pinch zoom acts weirdly on nytimes.com while loading
1360         https://webkit.org/b/80508
1361
1362         Reviewed by Simon Hausmann.
1363
1364         Make sure to suspend the page while doing pinch zooming.
1365         If the page is suspended (which happens while pinch zooming)
1366         then do not send touch events to the page, even if it has
1367         listeners.
1368
1369         * UIProcess/WebPageProxy.cpp:
1370         (WebKit::WebPageProxy::handleTouchEvent):
1371         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1372         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
1373
1374 2012-03-05  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1375
1376         [Qt] QWebNavigationRequest 'action' property should have an enum type instead of int
1377         https://bugs.webkit.org/show_bug.cgi?id=80164
1378
1379         Reviewed by Simon Hausmann.
1380
1381         Use the appropriate enum type instead of int. Make IgnoreRequest have a bigger
1382         value that give some room for us to put Experimental values in the middle. This
1383         way the Experimental values are in a valid range for the original enumeration. To
1384         avoid confusion, the Experimental enumeration was renamed.
1385
1386         * UIProcess/API/qt/qquickwebview_p.h:
1387         * UIProcess/API/qt/qwebnavigationrequest.cpp:
1388         (QWebNavigationRequestPrivate):
1389         (QWebNavigationRequest::setAction):
1390         (QWebNavigationRequest::action):
1391         * UIProcess/API/qt/qwebnavigationrequest_p.h:
1392         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
1393
1394 2012-03-07  Andras Becsi  <andras.becsi@nokia.com>
1395
1396         [WK2] Make it possible to build without geolocation support
1397         https://bugs.webkit.org/show_bug.cgi?id=80426
1398
1399         Reviewed by Simon Hausmann.
1400
1401         Add missing guards.
1402
1403         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
1404         (WebKit::GeolocationPermissionRequestManagerProxy::didReceiveGeolocationPermissionDecision):
1405         * UIProcess/WebPageProxy.cpp:
1406         (WebKit::WebPageProxy::close):
1407         (WebKit::WebPageProxy::processDidCrash):
1408         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
1409         * WebProcess/WebPage/WebPage.cpp:
1410         (WebKit::WebPage::WebPage):
1411         (WebKit):
1412         * WebProcess/WebPage/WebPage.h:
1413         (WebPage):
1414         * WebProcess/WebPage/WebPage.messages.in:
1415
1416 2012-03-06  Raphael Kubo da Costa  <kubo@profusion.mobi>
1417
1418         [CMake] Make the removal of transitive library dependencies work with CMake < 2.8.7.
1419         https://bugs.webkit.org/show_bug.cgi?id=80469
1420
1421         Reviewed by Antonio Gomes.
1422
1423         * CMakeLists.txt: Manually set the LINK_INTERFACE_LIBRARIES target
1424         property on the library being created.
1425
1426 2012-03-06  Hugo Parente Lima  <hugo.lima@openbossa.org>
1427
1428         MiniBrowser --window-size 480x800 www.nytimes.com doesn't paint bottom tiles.
1429         https://bugs.webkit.org/show_bug.cgi?id=80313
1430
1431         Reviewed by Kenneth Rohde Christiansen.
1432
1433         Fix the math to get the visible rectangle and add a method to get it.
1434
1435         * UIProcess/API/qt/qquickwebview.cpp:
1436         (QQuickWebViewPrivate::visibleContentsRect):
1437         (QQuickWebViewFlickablePrivate::_q_commitScaleChange):
1438         (QQuickWebViewPrivate::_q_commitPositionChange):
1439         * UIProcess/API/qt/qquickwebview_p_p.h:
1440         (QQuickWebViewPrivate):
1441
1442 2012-03-05  Joseph Pecoraro  <pecoraro@apple.com>
1443
1444         Web Inspector: Hide dock button when not allowed to dock
1445         https://bugs.webkit.org/show_bug.cgi?id=78575
1446
1447         Reviewed by Pavel Feldman.
1448
1449         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1450         (WebKit::WebInspectorClient::didResizeMainFrame):
1451         * WebProcess/WebCoreSupport/WebInspectorClient.h:
1452         * WebProcess/WebPage/WebInspector.cpp:
1453         (WebKit::WebInspector::updateDockingAvailability):
1454         * WebProcess/WebPage/WebInspector.h:
1455
1456 2012-03-06  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1457
1458         [Qt] Interaction Engine suspends content during pageload.
1459         https://bugs.webkit.org/show_bug.cgi?id=80294
1460
1461         Only suspend content when viewport updates are deferred
1462         for a non-instantanious interaction.
1463
1464         Reviewed by Kenneth Rohde Christiansen.
1465
1466         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1467         (WebKit::ViewportUpdateDeferrer::ViewportUpdateDeferrer):
1468         (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
1469         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
1470         (WebKit::QtViewportInteractionEngine::flickableMoveStarted):
1471         (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
1472         * UIProcess/qt/QtViewportInteractionEngine.h:
1473         (QtViewportInteractionEngine):
1474
1475 2012-03-06  Simon Hausmann  <simon.hausmann@nokia.com>
1476
1477         [Qt] Make QQuickWebView's url property work with a flickable webview
1478
1479         Reviewed by Tor Arne Vestbø.
1480
1481         QQuickWebViewPrivate::onComponentComplete implements the deferred url loading
1482         when the url property is set in the component instantiation. QQuickWebViewFlickablePrivate
1483         is the private sub-class used for a flickable webview, which re-implemented onComponentComplete
1484         but forgot to call the base implementation.
1485
1486         * UIProcess/API/qt/qquickwebview.cpp:
1487         (QQuickWebViewFlickablePrivate::onComponentComplete):
1488
1489 2012-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1490
1491         [GTK] Fix several documentation issues in WebKit2 GTK+ API
1492         https://bugs.webkit.org/show_bug.cgi?id=80281
1493
1494         Reviewed by Martin Robinson.
1495
1496         * UIProcess/API/gtk/WebKitFindController.cpp:
1497         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
1498         (webkit_navigation_policy_decision_class_init):
1499         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
1500         * UIProcess/API/gtk/WebKitWebView.h:
1501
1502 2012-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1503
1504         [GTK] Use a single signal for script dialogs in WebKit2 GTK+ API
1505         https://bugs.webkit.org/show_bug.cgi?id=80271
1506
1507         Reviewed by Martin Robinson.
1508
1509         Add a new signal WebKitWebView::script-dialog that passes a
1510         WebKitScriptDialog boxed type that can be used to build the dialog
1511         and set the responses. It simplifies the API and makes it bindings
1512         friendly.
1513
1514         * GNUmakefile.am:
1515         * UIProcess/API/gtk/WebKitScriptDialog.cpp: Added.
1516         (webkitScriptDialogCopy): Copy method for boxed type.
1517         (webkitScriptDialogFree): Free method for boxed type.
1518         (webkit_script_dialog_get_dialog_type): Return the type of dialog:
1519         alert, confirm or prompt.
1520         (webkit_script_dialog_get_message): Return the message of the dialog.
1521         (webkit_script_dialog_confirm_set_confirmed): Set whether user
1522         confirmed the dialog, for confirm dialogs.
1523         (webkit_script_dialog_prompt_get_default_text): Get the default
1524         text of prompt dialogs.
1525         (webkit_script_dialog_prompt_set_text): Set the text entered by
1526         the user, for prompt dialogs.
1527         * UIProcess/API/gtk/WebKitScriptDialog.h: Added.
1528         * UIProcess/API/gtk/WebKitScriptDialogPrivate.h: Added.
1529         * UIProcess/API/gtk/WebKitWebView.cpp:
1530         (webkitWebViewScriptDialog): Default implementation of
1531         WebKitWebView::script-dialog signal.
1532         (webkit_web_view_class_init): Add WebKitWebView::script-dialog and
1533         remove alert, confirm and propmpt.
1534         (webkitWebViewRunJavaScriptAlert): Create a WebKitScriptDialog and
1535         emit WebKitWebView::script-dialog signal.
1536         (webkitWebViewRunJavaScriptConfirm): Ditto.
1537         (webkitWebViewRunJavaScriptPrompt): Ditto.
1538         * UIProcess/API/gtk/WebKitWebView.h:
1539         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new
1540         symbols.
1541         * UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_script_dialog_get_type().
1542         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
1543         (testWebViewJavaScriptDialogs): Update javascript dialog test to
1544         use the new API.
1545         * UIProcess/API/gtk/webkit2marshal.list:
1546         * UIProcess/API/gtk/webkit2.h:
1547
1548 2012-03-05  Gavin Barraclough  <barraclough@apple.com>
1549
1550         putByIndex should throw in strict mode
1551         https://bugs.webkit.org/show_bug.cgi?id=80335
1552
1553         Reviewed by Filip Pizlo.
1554
1555         Make the MethodTable PutByIndex trap take a boolean 'shouldThrow' parameter.
1556
1557         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1558         (WebKit::NPJSObject::setProperty):
1559
1560 2012-03-05  Joseph Pecoraro  <pecoraro@apple.com>
1561
1562         Unreviewed rollout of r109858 for restructuring.
1563
1564 2012-03-05  Joseph Pecoraro  <pecoraro@apple.com>
1565
1566         <http://webkit.org/b/78575> Web Inspector: Hide dock button when not allowed to dock
1567
1568         Reviewed by Timothy Hatcher.
1569
1570         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1571         (WebKit::WebInspectorClient::updateDockingAvailability):
1572         * WebProcess/WebCoreSupport/WebInspectorClient.h:
1573         * WebProcess/WebPage/WebInspector.cpp:
1574         (WebKit::WebInspector::updateDockingAvailability):
1575         * WebProcess/WebPage/WebInspector.h:
1576
1577 2012-03-05  Anders Carlsson  <andersca@apple.com>
1578
1579         pinch-to-zoom and double-tap flicker when using the new scrolling model
1580         https://bugs.webkit.org/show_bug.cgi?id=80368
1581         <rdar://problem/10866221>
1582
1583         Reviewed by Sam Weinig.
1584
1585         Add a way for drawing areas to respond to callback based force repaint requests asynchronously.
1586         This is currently needed for the tiled drawing area when there might be outstanding scroll updates
1587         that are sent from the scrolling thread to the main thread and we need to ensure that they're processed
1588         before sending a message back.
1589
1590         * WebProcess/WebPage/DrawingArea.h:
1591         (WebKit::DrawingArea::forceRepaintAsync):
1592         Add new member function.
1593
1594         * WebProcess/WebPage/WebPage.cpp:
1595         (WebKit::WebPage::forceRepaint):
1596         Try forceRepaintAsync first.
1597
1598         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1599         (WebKit::forceRepaintAndSendMessage):
1600         Force the repaint and send the message.
1601
1602         (WebKit::dispatchBackToMainThread):
1603         Dispatch a call to forceRepaintAndSendMessage to the main thread.
1604
1605         (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
1606         Dispatch a function on the scrolling thread. Its sole purpose is to dispatch a function back to the
1607         main thread, ensuring that all previously dispatched functions have been executed.
1608
1609 2012-03-05  Enrica Casucci  <enrica@apple.com>
1610
1611         Can't type on some websites (plug-ins steal key events).
1612         <rdar://problem/10892291>
1613
1614         When the plugin is disabled, it is necessary to reset _pluginComplexTextInputIdentifier
1615         in order to return the correct input context. Failure to do so results in the inputContext
1616         method to return the plugin input context instead of the context of the browser view.
1617         
1618         Reviewed by Sam Weinig.
1619
1620         * UIProcess/API/mac/WKView.mm:
1621         (-[WKView _setPluginComplexTextInputState:]):
1622         (-[WKView _handlePluginComplexTextInputKeyDown:]):
1623
1624 2012-03-05  Anders Carlsson  <andersca@apple.com>
1625
1626         Be more aggressive about repainting page overlays
1627         https://bugs.webkit.org/show_bug.cgi?id=80336
1628         <rdar://problem/10965943>
1629
1630         Reviewed by Simon Fraser.
1631
1632         Whenever we're flushing layers and we have a page overlay, check if the main frame
1633         has scrolled or if the main frame root content layer needs to be repainted and force the
1634         overlay layer to be repainted if either of those conditions are true.
1635
1636         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1637         (TiledCoreAnimationDrawingArea):
1638         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1639         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1640         (WebKit::TiledCoreAnimationDrawingArea::shouldRepaintPageOverlayLayer):
1641         (WebKit):
1642
1643 2012-03-05  Sam Weinig  <sam@webkit.org>
1644
1645         Add support for hosting layers in the window server in WebKit2
1646         <rdar://problem/10400246>
1647         https://bugs.webkit.org/show_bug.cgi?id=80310
1648
1649         Reviewed by Anders Carlsson.
1650
1651         This currently only works if you are using TiledCoreAnimation drawing model.
1652
1653         * Platform/mac/LayerHostingContext.h: Renamed from Source/WebKit2/Platform/mac/RemoteLayerClient.h.
1654         * Platform/mac/LayerHostingContext.mm: Renamed from Source/WebKit2/Platform/mac/RemoteLayerClient.mm.
1655         (WebKit::LayerHostingContext::createForPort):
1656         (WebKit::LayerHostingContext::LayerHostingContext):
1657         (WebKit::LayerHostingContext::createForWindowServer):
1658         (WebKit::LayerHostingContext::~LayerHostingContext):
1659         (WebKit::LayerHostingContext::setRootLayer):
1660         (WebKit::LayerHostingContext::rootLayer):
1661         (WebKit::LayerHostingContext::contextID):
1662         (WebKit::LayerHostingContext::invalidate):
1663         Renamed RemoteLayerClient to LayerHostingContext and add ability to use the window server
1664         as the remote context.
1665
1666         * PluginProcess/PluginControllerProxy.cpp:
1667         * PluginProcess/PluginControllerProxy.h:
1668         * PluginProcess/mac/PluginControllerProxyMac.mm:
1669         Update for new names.
1670
1671         * Shared/LayerTreeContext.h:
1672         Add LayerHostingMode enum.
1673
1674         * UIProcess/PageClient.h:
1675         * UIProcess/API/mac/PageClientImpl.h:
1676         * UIProcess/API/mac/PageClientImpl.mm:
1677         (WebKit::PageClientImpl::layerHostingMode):
1678         (WebKit::PageClientImpl::updateAcceleratedCompositingMode):
1679         Add PageClient access points to get the current layer hosting mode,
1680         and a hook to tell the underlying view that the layer hosting context
1681         has changed.
1682
1683         * UIProcess/API/mac/WKViewInternal.h:
1684         * UIProcess/API/mac/WKView.mm:
1685         (-[WKView _updateAcceleratedCompositingMode:WebKit::]):
1686         Implement responding to a new layer hosting context as a simple
1687         exit and re-entrance of compositing.
1688
1689         * UIProcess/DrawingAreaProxy.h:
1690         (WebKit::DrawingAreaProxy::layerHostingModeDidChange):
1691         (WebKit::DrawingAreaProxy::updateAcceleratedCompositingMode):
1692         * UIProcess/DrawingAreaProxy.messages.in:
1693         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1694         (TiledCoreAnimationDrawingAreaProxy):
1695         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1696         (WebKit::TiledCoreAnimationDrawingAreaProxy::layerHostingModeDidChange):
1697         (WebKit::TiledCoreAnimationDrawingAreaProxy::updateAcceleratedCompositingMode):
1698         Pipe layer hosting changes around.
1699
1700         * UIProcess/WebPageProxy.h:
1701         (WebKit::WebPageProxy::layerHostingMode):
1702         * UIProcess/WebPageProxy.cpp:
1703         (WebKit::WebPageProxy::WebPageProxy):
1704         (WebKit::WebPageProxy::viewStateDidChange):
1705         Cache the current layer hosting mode so we don't overzealously
1706         tell the WebProcess to reset its context. Re-check layer hosting
1707         mode each time we are added/removed from a window.
1708
1709         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
1710         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
1711         Update for new names.
1712
1713         * WebProcess/WebPage/DrawingArea.h:
1714         (WebKit::DrawingArea::setDeviceScaleFactor):
1715         (WebKit::DrawingArea::setLayerHostingMode):
1716         * WebProcess/WebPage/DrawingArea.messages.in:
1717         Pipe layer hosting changes around.
1718
1719         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
1720         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
1721         (WebKit::LayerTreeHostCAMac::~LayerTreeHostCAMac):
1722         (WebKit::LayerTreeHostCAMac::platformInitialize):
1723         (WebKit::LayerTreeHostCAMac::invalidate):
1724         Update for new names.
1725
1726         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1727         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1728         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
1729         (WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
1730         Respond to a change in the layer hosting mode by invalidating our old context,
1731         making a new one of the right type, and informing the UIProcess of our new context.
1732
1733         * WebKit2.xcodeproj/project.pbxproj:
1734         Add new files.
1735
1736 2012-03-05  Anders Carlsson  <andersca@apple.com>
1737
1738         Always update the scroll layer position on the main thread when we have an overlay
1739         https://bugs.webkit.org/show_bug.cgi?id=80324
1740
1741         Reviewed by Sam Weinig.
1742
1743         Call setForceMainThreadScrollLayerPositionUpdates when installing and uninstalling page overlays,
1744         so we'll be able to synchronize painting between the tile cache and the page overlays.
1745
1746         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1747         (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
1748         (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
1749
1750 2012-03-05  Timothy Hatcher  <timothy@apple.com>
1751
1752         Change how the Web Inspector Develop menu actions work.
1753
1754         This removes the methods used by Safari's Develop menu. They can now be implemented in Safari.
1755
1756         https://webkit.org/b/80308
1757
1758         Reviewed by John Sullivan.
1759
1760         * UIProcess/API/C/mac/WKInspectorPrivateMac.h: Renamed from Source/WebKit2/UIProcess/API/C/mac/WKInspectorMac.h.
1761         * UIProcess/mac/WebInspectorProxyMac.mm:
1762         (-[WKWebInspectorProxyObjCAdapter inspectorRef]): Added.
1763         * WebKit2.xcodeproj/project.pbxproj: Renamed WKInspectorPrivateMac.h to better reflect its private nature.
1764
1765 2012-03-02  Jon Lee  <jonlee@apple.com>
1766
1767         Add support for notification replaceId in Mac WebKit and WK2
1768         https://bugs.webkit.org/show_bug.cgi?id=80206
1769         <rdar://problem/10965574>
1770
1771         Reviewed by Sam Weinig.
1772
1773         * UIProcess/API/C/WKNotification.cpp: Add WK API.
1774         (WKNotificationCopyReplaceID):
1775         * UIProcess/API/C/WKNotification.h:
1776         * UIProcess/Notifications/WebNotification.cpp:
1777         (WebKit::WebNotification::WebNotification):
1778         * UIProcess/Notifications/WebNotification.h: Add replaceID member.
1779         (WebKit::WebNotification::create):
1780         (WebKit::WebNotification::replaceID):
1781         (WebNotification):
1782         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
1783         (WebKit::WebNotificationManagerProxy::show):
1784         * UIProcess/Notifications/WebNotificationManagerProxy.h:
1785         (WebNotificationManagerProxy):
1786         * UIProcess/WebPageProxy.cpp:
1787         (WebKit::WebPageProxy::showNotification):
1788         * UIProcess/WebPageProxy.h:
1789         (WebPageProxy):
1790         * UIProcess/WebPageProxy.messages.in: Add replaceID to the showNotification message.
1791         * WebProcess/Notifications/WebNotificationManager.cpp:
1792         (WebKit::WebNotificationManager::show):
1793
1794 2012-03-05  Sheriff Bot  <webkit.review.bot@gmail.com>
1795
1796         Unreviewed, rolling out r109748.
1797         http://trac.webkit.org/changeset/109748
1798         https://bugs.webkit.org/show_bug.cgi?id=80296
1799
1800         Made some tests crash, will fix and recommit (Requested by
1801         noamr on #webkit).
1802
1803         * Target.pri:
1804         * UIProcess/API/qt/qquickwebpage.cpp:
1805         (QQuickWebPagePrivate::paintToCurrentGLContext):
1806         (PageProxyNode::PageProxyNode):
1807         (PageProxyNode):
1808         (PageProxyNode::changedStates):
1809         (PageProxyNode::render):
1810         (PageProxyNode::~PageProxyNode):
1811         (QQuickWebPage::updatePaintNode):
1812         (QQuickWebPagePrivate::updateSize):
1813         (QQuickWebPagePrivate::resetPaintNode):
1814         (QQuickWebPagePrivate::~QQuickWebPagePrivate):
1815         * UIProcess/API/qt/qquickwebpage_p_p.h:
1816         (QQuickWebPagePrivate):
1817         * UIProcess/DrawingAreaProxy.h:
1818         (WebKit):
1819         (WebKit::DrawingAreaProxy::layerTreeHostProxy):
1820         (DrawingAreaProxy):
1821         * UIProcess/DrawingAreaProxyImpl.cpp:
1822         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
1823         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
1824         * UIProcess/LayerTreeHostProxy.h:
1825         (LayerTreeHostProxy):
1826         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
1827         (WebKit::LayerTreeHostProxy::syncAnimations):
1828         (WebKit::LayerTreeHostProxy::updateViewport):
1829         (WebKit::LayerTreeHostProxy::syncLayerParameters):
1830         (WebKit::LayerTreeHostProxy::flushLayerChanges):
1831         (WebKit::LayerTreeHostProxy::ensureRootLayer):
1832         (WebKit::LayerTreeHostProxy::syncRemoteContent):
1833         (WebKit::LayerTreeHostProxy::dispatchUpdate):
1834         (WebKit):
1835         (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
1836         (WebKit::LayerTreeHostProxy::purgeGLResources):
1837         * UIProcess/qt/QtWebPageSGNode.cpp: Removed.
1838         * UIProcess/qt/QtWebPageSGNode.h: Removed.
1839
1840 2012-03-05  Joone Hur  <joone.hur@collabora.co.uk>
1841
1842         [GTK] zlib link error with --enable-webkit2
1843         https://bugs.webkit.org/show_bug.cgi?id=79877
1844
1845         Reviewed by Martin Robinson.
1846
1847         zlib should be linked properly.
1848
1849         * GNUmakefile.am: Link $(ZLIB_LIBS) with libwebkit2gtk instead of
1850         linking it with WebKitWebProcess.
1851
1852 2012-03-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1853
1854         [WK2] WKPageGetContextMenuFromProposedContextMenuCallback should pass a HitTestResult
1855         https://bugs.webkit.org/show_bug.cgi?id=77208
1856
1857         Reviewed by Anders Carlsson.
1858
1859         A HitTestResultData is now passed to ShowContextMenu WebPageProxy
1860         message instead of the ContextMenuState. ContextMenu client has
1861         been updated to pass the HitTestResult to the
1862         getContextMenuFromProposedMenu callback.
1863
1864         * GNUmakefile.am: Remove ContextMenuState.h.
1865         * Shared/APIClientTraits.h:
1866         * Shared/ContextMenuState.h: Removed.
1867         * Shared/WebHitTestResult.h:
1868         (WebKit::WebHitTestResult::Data::Data): Add constructor that takes
1869         a WebCore::HitTestResult.
1870         * UIProcess/API/C/WKPage.h: Add HitTestResult parameter to
1871         getContextMenuFromProposedMenu callback and deprecate the old
1872         version.
1873         * UIProcess/WebPageContextMenuClient.cpp:
1874         (WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu):
1875         Pass a HitTestResult to getContextMenuFromProposedMenu or use the
1876         deprecated one if client version is an old one.
1877         * UIProcess/WebPageContextMenuClient.h:
1878         * UIProcess/WebPageProxy.cpp:
1879         (WebKit::WebPageProxy::showContextMenu):
1880         (WebKit::WebPageProxy::internalShowContextMenu): Save the
1881         WebHitTestResult::Data to use it for handling context menu actions.
1882         (WebKit::WebPageProxy::contextMenuItemSelected): Use the saved
1883         WebHitTestResult::Data.
1884         * UIProcess/WebPageProxy.h:
1885         * UIProcess/WebPageProxy.messages.in:
1886         * WebKit2.xcodeproj/project.pbxproj: Remove ContextMenuState.h.
1887         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1888         (WebKit::WebChromeClient::mouseDidMoveOverElement): Use the new
1889         WebHitTestResult::Data constructor that takes a WebCore::HitTestResult.
1890         * WebProcess/WebPage/WebContextMenu.cpp:
1891         (WebKit::WebContextMenu::show): Create a WebHitTestResult::Data
1892         instead of a ContextMenuState and pass it to ShowContextMenu message.
1893         * win/WebKit2.vcproj: ContextMenuState.h.
1894
1895 2012-03-05  No'am Rosenthal  <noam.rosenthal@nokia.com>
1896
1897         [Qt] [WK2] Support threaded renderer in WK2
1898         https://bugs.webkit.org/show_bug.cgi?id=76661
1899
1900         Made the appropriate fixes in the UI process code to make rendering thread-safe.
1901         - Separated the scenegraph node code to QtWebPageSGNode. QtWebPageSGNode has direct access
1902           to LayerTreeHostProxy.
1903
1904         - Each function in LayerTreeHostProxy can be either called from the main thread (handling
1905           messages from the web process), or from the renderer thread (handling the GL context).
1906           The render-queue is locked with a mutex, and messages back to the web process are sent
1907           via callOnMainThread.
1908
1909         - LayerTreeHostProxy is now ThreadSafeRefCounted. That is done to make sure that the GL
1910           resources it creates are only freed when the QtWebPageSGNode is deleted, which can be
1911           before or after the owning DrawingAreaProxy is deleted. This ensures that the class is
1912           deleted only after its GL resources are freed, otherwise those resources may leak.
1913
1914         Based on a patch by Viatcheslav Ostapenko.
1915
1916         Reviewed by Kenneth Rohde Christiansen.
1917
1918         * Target.pri: Added new files.
1919         * UIProcess/API/qt/qquickwebpage.cpp: Moved QtWebPageSGNode out.
1920         (QQuickWebPage::updatePaintNode): Call QtWebPageSGNode
1921         (QQuickWebPagePrivate::updateSize): Call QtWebPageSGNode
1922         (QQuickWebPagePrivate::didDeleteSGWebPageNode): Override QtWebPageSGNode::Client
1923         (QQuickWebPagePrivate::~QQuickWebPagePrivate):
1924         * UIProcess/API/qt/qquickwebpage_p_p.h:
1925         (QQuickWebPagePrivate):
1926         * UIProcess/DrawingAreaProxy.h:
1927         (WebKit):
1928         (WebKit::DrawingAreaProxy::layerTreeHostProxy): Made LayerTreeHostProxy ref-counted.
1929         (DrawingAreaProxy):
1930         * UIProcess/DrawingAreaProxyImpl.cpp:
1931         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
1932         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
1933         * UIProcess/LayerTreeHostProxy.h:
1934         (WebKit):
1935         (WebKit::LayerTreeHostProxy::create):
1936         (LayerTreeHostProxy):
1937         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
1938         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
1939         (WebKit):
1940         (MainThreadGuardedInvoker):
1941             A class that allows invoking functions in the main thread, while guarding a ref-
1942             counted object.
1943
1944         (WebKit::MainThreadGuardedInvoker::call):
1945         (WebKit::MainThreadGuardedInvoker::MainThreadGuardedInvoker):
1946         (WebKit::MainThreadGuardedInvoker::invoke):
1947         (WebKit::LayerTreeHostProxy::syncAnimations):
1948         (WebKit::LayerTreeHostProxy::updateViewport):
1949         (WebKit::LayerTreeHostProxy::detachDrawingArea):
1950         (WebKit::LayerTreeHostProxy::syncLayerParameters):
1951         (WebKit::LayerTreeHostProxy::setShouldRenderNextFrame):
1952         (WebKit::LayerTreeHostProxy::flushLayerChanges):
1953         (WebKit::LayerTreeHostProxy::ensureRootLayer):
1954         (WebKit::LayerTreeHostProxy::syncRemoteContent):
1955         (WebKit::LayerTreeHostProxy::dispatchUpdate):
1956         (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
1957         (WebKit::LayerTreeHostProxy::purgeGLResources):
1958         * UIProcess/qt/QtWebPageSGNode.cpp: Added.
1959         * UIProcess/qt/QtWebPageSGNode.h: Added.
1960
1961 2012-03-04  Raphael Kubo da Costa  <kubo@profusion.mobi>
1962
1963         [CMake] Libraries are installed to /usr/lib and not /usr/lib64 on x86_64
1964         https://bugs.webkit.org/show_bug.cgi?id=71507
1965
1966         Reviewed by Antonio Gomes.
1967
1968         * CMakeLists.txt: Use ${LIB_INSTALL_DIR} instead of hardcoding "lib".
1969
1970 2012-03-03  Simon Hausmann  <simon.hausmann@nokia.com>
1971
1972         [Qt] Fix static_libs_as_shared build
1973         https://bugs.webkit.org/show_bug.cgi?id=80214
1974
1975         Reviewed by Tor Arne Vestbø.
1976
1977         Replace (static) link time dependency to WK1 with entrypoint
1978         in the separate WebProcess for activating the QStyle theme if
1979         necessary.
1980
1981         * Target.pri:
1982         * UIProcess/Launcher/ProcessLauncher.h:
1983         * WebProcess/qt/WebProcessMainQt.cpp:
1984         (WebKit::WebProcessMainQt):
1985         * qt/MainQt.cpp:
1986         (WebKit):
1987         (main):
1988
1989 2012-03-03  Hans Wennborg  <hans@chromium.org>
1990
1991         Implement Speech JavaScript API
1992         https://bugs.webkit.org/show_bug.cgi?id=80019
1993
1994         Reviewed by Adam Barth.
1995
1996         Add ENABLE_SCRIPTED_SPEECH.
1997
1998         * Configurations/FeatureDefines.xcconfig:
1999
2000 2012-03-03  No'am Rosenthal  <noam.rosenthal@nokia.com>
2001
2002         [Qt] Use the existing inheritedOpacity/matrix properties of QSGNode
2003         https://bugs.webkit.org/show_bug.cgi?id=79543
2004
2005         Use QSGNode::inheritedOpacity() and QSGNode::matrix().
2006         Also, remove flags from changedStates() that we don't actually touch.
2007         This is covered by existing API tests.
2008
2009         Reviewed by Kenneth Rohde Christiansen.
2010
2011         * UIProcess/API/qt/qquickwebpage.cpp:
2012         (QQuickWebPagePrivate::paintToCurrentGLContext):
2013         (PageProxyNode::changedStates):
2014         (PageProxyNode::render):
2015         * UIProcess/API/qt/qquickwebpage_p_p.h:
2016         (QQuickWebPagePrivate):
2017
2018 2012-03-03  Anders Carlsson  <andersca@apple.com>
2019
2020         Fix build with newer versions of clang.
2021
2022         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2023         (WebKit::NPN_GetValue):
2024         Cast the switch parameter to unsigned to prevent warnings about case values not being part of the enum type.
2025
2026 2012-03-02  Andy Estes  <aestes@apple.com>
2027
2028         Move nsStringFromWebCoreString out of PageClientImpl
2029         https://bugs.webkit.org/show_bug.cgi?id=80202
2030
2031         Reviewed by Sam Weinig.
2032
2033         nsStringFromWebCoreString() doesn't really belong in PageClientImpl.mm,
2034         and it makes us include PageClientImpl.h in places where we shouldn't.
2035         Move this function into StringUtilities.{h, mm}.
2036
2037         * Platform/mac/StringUtilities.h: Added.
2038         * Platform/mac/StringUtilities.mm: Added.
2039         (WebKit::nsStringFromWebCoreString):
2040         * UIProcess/API/mac/PageClientImpl.h:
2041         * UIProcess/API/mac/PageClientImpl.mm:
2042         * UIProcess/API/mac/WKView.mm:
2043         * UIProcess/mac/WebContextMenuProxyMac.mm:
2044         * UIProcess/mac/WebPageProxyMac.mm:
2045         * UIProcess/mac/WebPopupMenuProxyMac.mm:
2046         * UIProcess/mac/WebPreferencesMac.mm:
2047         * WebKit2.xcodeproj/project.pbxproj:
2048
2049 2012-03-02  Andy Estes  <aestes@apple.com>
2050
2051         Remove com.apple.WebKit.PluginProcess.sb from WebKit2.xcodeproj's Headers build phase
2052         https://bugs.webkit.org/show_bug.cgi?id=80197
2053
2054         Reviewed by Alexey Proskuryakov.
2055
2056         It doesn't belong there, and it makes Xcode consider the project to be
2057         invalid, triggering assertions in some builds of Xcode.
2058
2059         * WebKit2.xcodeproj/project.pbxproj:
2060
2061 2012-03-02  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2062
2063         [Qt] Fix spelling mistake in header guard
2064
2065         Reviewed by Noam Rosenthal.
2066
2067         * UIProcess/API/qt/qwebviewportinfo_p.h:
2068
2069 2012-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2070
2071         [GTK] Invalid check in webkit_web_view_set_zoom_level() when zoom-text-only is enabled
2072         https://bugs.webkit.org/show_bug.cgi?id=80150
2073
2074         Reviewed by Philippe Normand.
2075
2076         * UIProcess/API/gtk/WebKitWebView.cpp:
2077         (webkit_web_view_set_zoom_level): Use
2078         webkit_web_view_get_zoom_level() instead of
2079         WKPageGetPageZoomFactor() to get the current effective zoom level
2080         depending on zoom-text-only setting.
2081
2082 2012-03-02  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2083
2084         Fix build on AppleWebKit after 109548.
2085
2086         * mac/WebKit2.order:
2087
2088 2012-03-02  Simon Hausmann  <simon.hausmann@nokia.com>
2089
2090         [Qt] Fix tests run with WTR not using QStyle theme
2091         https://bugs.webkit.org/show_bug.cgi?id=80147
2092
2093         Reviewed by Csaba Osztrogonác.
2094
2095         Use an environment variable (set by WTR) to select the QStyle theme.
2096         This is a temporary kludge until we rebase the layout tests to use the
2097         QStyle independent "mobile" theme. This also temporarily breaks the
2098         force_static_libs_as_shared build.
2099
2100         * Target.pri:
2101         * WebProcess/qt/WebProcessMainQt.cpp:
2102         (WebKit::WebProcessMainQt):
2103
2104 2012-03-02  Simon Hausmann  <simon.hausmann@nokia.com>
2105
2106         [Qt] Compile WebCore without QtWidgets
2107         https://bugs.webkit.org/show_bug.cgi?id=80141
2108
2109         Reviewed by Tor Arne Vestbø.
2110
2111         * Shared/qt/WebEventFactoryQt.cpp: Removed unnecessary include.
2112         * Target.pri: Require widgets for WK2 for the moment, until bug #79458
2113         is fixed.
2114
2115 2012-03-02  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2116
2117         Suspend/Resume API for pausing timers and animations.
2118         https://bugs.webkit.org/show_bug.cgi?id=76063
2119
2120         Based on the initial work of Zalan Bujtas <zalan.bujtas@nokia.com>,
2121
2122         Adds suspend and resume API for WebKit2 and uses it in Qt to
2123         suspend animations and DOM timers during panning and zoom.
2124
2125         Reviewed by Kenneth Rohde Christiansen.
2126
2127         * UIProcess/API/qt/qquickwebview.cpp:
2128         (QQuickWebViewFlickablePrivate::_q_suspend):
2129         (QQuickWebViewFlickablePrivate::_q_resume):
2130         * UIProcess/WebPageProxy.cpp:
2131         (WebKit::WebPageProxy::WebPageProxy):
2132         (WebKit::WebPageProxy::resumeActiveDOMObjectsAndAnimations):
2133         (WebKit::WebPageProxy::suspendActiveDOMObjectsAndAnimations):
2134         (WebKit::WebPageProxy::processDidCrash):
2135         * UIProcess/WebPageProxy.h:
2136         * WebProcess/WebPage/WebPage.cpp:
2137         (WebKit::WebPage::suspendActiveDOMObjectsAndAnimations):
2138         (WebKit::WebPage::resumeActiveDOMObjectsAndAnimations):
2139         * WebProcess/WebPage/WebPage.h:
2140         * WebProcess/WebPage/WebPage.messages.in:
2141
2142 2012-03-02  Joone Hur  <joone.hur@collabora.co.uk>
2143
2144         Unreviewed. Fix WebKit2 GTK+ build.
2145
2146         * GNUmakefile.am: allow WebKitWebProcess to link with zlib properly.
2147
2148 2012-03-01  Andras Becsi  <andras.becsi@nokia.com>
2149
2150         [Qt][WK2] Make the interaction with the Flickable work on the N9
2151         https://bugs.webkit.org/show_bug.cgi?id=80029
2152
2153         Reviewed by Simon Hausmann.
2154
2155         Because the WebView item accepts all touch events it receives and sends
2156         them to the web process before propagating them to the gesture recognizers,
2157         which is correct behaviour, we can not rely on the touch->mouse conversion
2158         of Qt5 when controlling Flickable. Hence we need to convert the received
2159         touch events to mouse events in the QtFlickProvider.
2160
2161         * UIProcess/qt/QtFlickProvider.cpp:
2162         (QtFlickProvider::handleTouchFlickEvent):
2163         Do the touch to mouse event conversion for the Flickable.
2164         * UIProcess/qt/QtPanGestureRecognizer.cpp:
2165         (WebKit::QtPanGestureRecognizer::recognize):
2166         A touch begin event should cancel the previous pan gesture
2167         and stop the ongoing flick animation.
2168
2169 2012-03-01  Anders Carlsson  <andersca@apple.com>
2170
2171         Assertion failure in pageContainsAnyHorizontalScrollbars() (scrollableArea->isOnActivePage()) when leaving pages with embedded PDFs
2172         https://bugs.webkit.org/show_bug.cgi?id=80044
2173         <rdar://problem/10919940>
2174
2175         Reviewed by Brady Eidson.
2176
2177         Remove the code that would add and remove wheel event handlers since that's not what we want to track.
2178         Instead, dynamically add and remove the view as its scrollbars come and go.
2179
2180         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
2181         (WebKit::BuiltInPDFView::updateScrollbars):
2182         (WebKit::BuiltInPDFView::initialize):
2183         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
2184         (BuiltInPDFView):
2185
2186 2012-03-01  Kangil Han  <kangil.han@samsung.com>
2187
2188         [DRT] Remove all PlainTextController usages in existing tests by adding internal API
2189         https://bugs.webkit.org/show_bug.cgi?id=78570
2190
2191         Reviewed by Hajime Morita.
2192
2193         This patch will remove all PlainTextController usages
2194         in existing DRT tests by adding internal API to WebCore/testing/Internals
2195
2196         * win/WebKit2.def:
2197         * win/WebKit2CFLite.def:
2198
2199 2012-03-01  Nikolas Zimmermann  <nzimmermann@rim.com>
2200
2201         Unreviewed, rolling out r109255.
2202         http://trac.webkit.org/changeset/109255
2203         https://bugs.webkit.org/show_bug.cgi?id=79932
2204
2205         Breaks rounded rects with dashed strokes in SVG
2206
2207         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2208         (InitWebCoreSystemInterface):
2209
2210 2012-03-01  Sergio Villar Senin  <svillar@igalia.com>
2211
2212         [WK2] [GTK] [libsoup] SoupSession should use system CA
2213         https://bugs.webkit.org/show_bug.cgi?id=79657
2214
2215         Reviewed by Martin Robinson.
2216
2217         SoupSession sould use system CA list to validate SSL
2218         certificates. Do not use strict certificate validation though as
2219         we want clients to decide whether or not accept/decline invalid
2220         certificates (API to be added later).
2221
2222         No new tests required as current behaviour does not change at all
2223         as we continue to accept invalid certificates by default.
2224
2225         * WebProcess/gtk/WebProcessMainGtk.cpp:
2226         (WebKit::WebProcessMainGtk):
2227
2228 2012-03-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2229
2230         Unreviewed. Fix WebKit2 GTK+ build.
2231
2232         * UIProcess/API/gtk/WebKitDefines.h:
2233         * UIProcess/API/gtk/WebKitWebView.h:
2234
2235 2012-02-29  Simon Hausmann  <simon.hausmann@nokia.com>
2236
2237         [Qt][WK2] QQuickWebView::event should lookup faster which events QQuickWebPage can handle
2238         https://bugs.webkit.org/show_bug.cgi?id=78047
2239
2240         Reviewed by Kenneth Rohde Christiansen.
2241
2242         Replaced double-dispatch of events with direct forwarding of events from QQuickWebView::*Event to
2243         QtWebPageEventHandler::handle*Event.
2244
2245         * UIProcess/API/qt/qquickwebview.cpp:
2246         (QQuickWebView::keyPressEvent):
2247         (QQuickWebView::keyReleaseEvent):
2248         (QQuickWebView::inputMethodEvent):
2249         (QQuickWebView::focusInEvent):
2250         (QQuickWebView::focusOutEvent):
2251         (QQuickWebView::touchEvent):
2252         (QQuickWebView::mousePressEvent):
2253         (QQuickWebView::mouseMoveEvent):
2254         (QQuickWebView::mouseReleaseEvent):
2255         (QQuickWebView::mouseDoubleClickEvent):
2256         (QQuickWebView::wheelEvent):
2257         (QQuickWebView::hoverEnterEvent):
2258         (QQuickWebView::hoverMoveEvent):
2259         (QQuickWebView::hoverLeaveEvent):
2260         (QQuickWebView::dragMoveEvent):
2261         (QQuickWebView::dragEnterEvent):
2262         (QQuickWebView::dragLeaveEvent):
2263         (QQuickWebView::dropEvent):
2264         (QQuickWebView::event):
2265         * UIProcess/qt/QtWebPageEventHandler.cpp:
2266         (QtWebPageEventHandler::handleMouseMoveEvent):
2267         (QtWebPageEventHandler::handleMousePressEvent):
2268         (QtWebPageEventHandler::handleMouseReleaseEvent):
2269         (QtWebPageEventHandler::handleWheelEvent):
2270         (QtWebPageEventHandler::handleHoverLeaveEvent):
2271         (QtWebPageEventHandler::handleHoverMoveEvent):
2272         (QtWebPageEventHandler::handleDragEnterEvent):
2273         (QtWebPageEventHandler::handleDragLeaveEvent):
2274         (QtWebPageEventHandler::handleDragMoveEvent):
2275         (QtWebPageEventHandler::handleDropEvent):
2276         (QtWebPageEventHandler::handleKeyPressEvent):
2277         (QtWebPageEventHandler::handleKeyReleaseEvent):
2278         (QtWebPageEventHandler::handleFocusInEvent):
2279         (QtWebPageEventHandler::handleFocusOutEvent):
2280         (QtWebPageEventHandler::handleInputMethodEvent):
2281         (QtWebPageEventHandler::handleTouchEvent):
2282         * UIProcess/qt/QtWebPageEventHandler.h:
2283         (QtWebPageEventHandler):
2284
2285 2012-03-01  Csaba Osztrogonác  <ossy@webkit.org>
2286
2287         [Qt][WK2] Unreviewed buildfix after r109277.
2288
2289         * WebProcess/qt/QtBuiltinBundlePage.cpp:
2290         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
2291
2292 2012-02-29  No'am Rosenthal  <noam.rosenthal@nokia.com>
2293
2294         [Qt][WK2] Get rid of the #ifdef mess in LayerTreeHost[Proxy]
2295         https://bugs.webkit.org/show_bug.cgi?id=79501
2296
2297         Use a new UI_SIDE_COMPOSITING flag instead of the several #ifdef flags we currently use.
2298
2299         Reviewed by Kenneth Rohde Christiansen.
2300
2301         * Shared/WebLayerTreeInfo.cpp:
2302         * Shared/WebLayerTreeInfo.h:
2303         * UIProcess/DrawingAreaProxy.cpp:
2304         (WebKit):
2305         * UIProcess/DrawingAreaProxy.h:
2306         (DrawingAreaProxy):
2307         * UIProcess/DrawingAreaProxyImpl.cpp:
2308         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2309         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
2310         (WebKit):
2311         * UIProcess/DrawingAreaProxyImpl.h:
2312         (DrawingAreaProxyImpl):
2313         * UIProcess/LayerTreeHostProxy.h:
2314         (LayerTreeHostProxy):
2315         * UIProcess/WebPageProxy.cpp:
2316         (WebKit::WebPageProxy::didReceiveMessage):
2317         * UIProcess/qt/LayerBackingStore.cpp:
2318         * UIProcess/qt/LayerBackingStore.h:
2319         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2320         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
2321         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
2322         * WebProcess/WebPage/DrawingArea.h:
2323         (DrawingArea):
2324         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2325         (WebKit):
2326         * WebProcess/WebPage/DrawingAreaImpl.h:
2327         (DrawingAreaImpl):
2328         * WebProcess/WebPage/LayerTreeHost.cpp:
2329         (WebKit::LayerTreeHost::create):
2330         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
2331         (WebKit::LayerTreeHostQt::purgeBackingStores):
2332         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
2333         (LayerTreeHostQt):
2334
2335 2012-02-28  Brian Weinstein  <bweinstein@apple.com>
2336
2337         WebKit2: didNewFirstVisuallyNonEmptyLayout should be sent to injected bundle
2338         https://bugs.webkit.org/show_bug.cgi?id=79849
2339         
2340         Tell the injected bundle about didNewFirstVisuallyNonEmptyLayout (we currently
2341         just tell the UI process).
2342
2343         Reviewed by Beth Dakin.
2344
2345         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add didNewFirstVisuallyNonEmptyLayout to version 1.
2346         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2347         (WebKit::InjectedBundlePageLoaderClient::didNewFirstVisuallyNonEmptyLayout): Call through to the
2348             client.
2349         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2350         (InjectedBundlePageLoaderClient):
2351         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2352         (WebKit::WebFrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout): Tell the injected
2353             bundle.
2354
2355 2012-02-29  Tim Horton  <timothy_horton@apple.com>
2356
2357         Make use of CG rounded-rect primitives
2358         https://bugs.webkit.org/show_bug.cgi?id=79932
2359         <rdar://problem/9274953>
2360
2361         Reviewed by Simon Fraser.
2362
2363         Add wkCGPathAddRoundedRect.
2364
2365         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2366         (InitWebCoreSystemInterface):
2367
2368 2012-02-29  Andy Estes  <aestes@apple.com>
2369
2370         CFURLDownloadScheduleWithCurrentMessageQueue only exists on Windows
2371         https://bugs.webkit.org/show_bug.cgi?id=79936
2372
2373         Reviewed by Brady Eidson.
2374
2375         CFURLDownloadScheduleWithCurrentMessageQueue only exists on Windows
2376         platforms. Non-Windows platforms that use CFNetwork-based downloads
2377         should omit this call.
2378
2379         * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
2380         (WebKit::Download::start):
2381
2382 2012-02-29  Rafael Brandao  <rafael.lobo@openbossa.org>
2383
2384         [Qt][WK2] We should not add NetscapeBrowserFuncs.cpp as header
2385         https://bugs.webkit.org/show_bug.cgi?id=79847
2386
2387         Reviewed by Alexey Proskuryakov.
2388
2389         * Target.pri: Fix typo, so we can add ".h" file instead.
2390
2391 2012-02-29  Sam Weinig  <sam@webkit.org>
2392
2393         When invoking Lookup while zoomed in, the highlighted word renders out of line
2394         <rdar://problem/10812527>
2395
2396         Reviewed by Simon Fraser.
2397
2398         * WebProcess/WebPage/mac/WebPageMac.mm:
2399         (WebKit::WebPage::performDictionaryLookupForRange):
2400         Make sure to scale the ascent when determining the origin for the overlay.
2401
2402 2012-02-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2403
2404         [GTK] Use text or page zoom factor in WebKitWebView depending on zoom-text-only
2405         https://bugs.webkit.org/show_bug.cgi?id=75252
2406
2407         Reviewed by Gustavo Noronha Silva.
2408
2409         * UIProcess/API/gtk/WebKitWebView.cpp:
2410         (zoomTextOnlyChanged): Update text/page zoom factor when
2411         zoom-text-only setting changes.
2412         (webkitWebViewSetSettings): Helper function to set the settings
2413         object for the web view, initializing the settings for the page
2414         and connecting to notify::zoom-text-only signal.
2415         (webkitWebViewConstructed): Use webkitWebViewSetSettings().
2416         (webkit_web_view_set_settings): Use webkitWebViewSetSettings() and
2417         disconnect from the notify::zoom-text-only signal of the previous
2418         settings object.
2419         (webkit_web_view_set_zoom_level): Set text/page zoom factor
2420         depending on WebKitSettings:zoom-text-only property.
2421         (webkit_web_view_get_zoom_level): Get text/page zoom factor
2422         depending on WebKitSettings:zoom-text-only property.
2423         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2424         (testWebViewZoomLevel):
2425
2426 2012-02-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2427
2428         [GTK] Add zoom-text-only setting to WebKit2 GTK+ API
2429         https://bugs.webkit.org/show_bug.cgi?id=75249
2430
2431         Reviewed by Gustavo Noronha Silva.
2432
2433         To set whether zoom level of web view should affect only the text
2434         or all page contents. It's disabled by default.
2435
2436         * UIProcess/API/gtk/WebKitSettings.cpp:
2437         (webKitSettingsSetProperty):
2438         (webKitSettingsGetProperty):
2439         (webkit_settings_class_init): Add WebKitSettings:zoom-text-only
2440         property.
2441         (webkit_settings_set_zoom_text_only): Set
2442         WebKitSettings:zoom-text-only.
2443         (webkit_settings_get_zoom_text_only): Get
2444         WebKitSettings:zoom-text-only.
2445         * UIProcess/API/gtk/WebKitSettings.h:
2446         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new
2447         symbols.
2448         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
2449         (testWebKitSettings):
2450
2451 2012-02-29  Sergio Villar Senin  <svillar@igalia.com>
2452
2453         DidFindString should be emitted even if FindOptionsShowOverlay is not enabled
2454         https://bugs.webkit.org/show_bug.cgi?id=76522
2455
2456         Reviewed by Darin Adler.
2457
2458         DidFindString message should be issued always even if neither
2459         FindOptionsShowOverlay or FindOptionsShowHighlight are
2460         provided. The difference is that if any of those flags are present
2461         the find operation will look for all the appearances of the text
2462         in the web view, otherwise it will just look and report the next
2463         occurrence.
2464
2465         This patch removes the temporary workaround added in r109222 to
2466         the WebKitFindController unit tests.
2467
2468         * UIProcess/API/gtk/tests/TestWebKitFindController.cpp:
2469         * WebProcess/WebPage/FindController.cpp:
2470         (WebKit::FindController::findString):
2471
2472 2012-01-19  Sergio Villar Senin  <svillar@igalia.com>
2473
2474         [GTK] [WK2] Add Find API
2475         https://bugs.webkit.org/show_bug.cgi?id=76070
2476
2477         Reviewed by Martin Robinson.
2478
2479         This patch adds a new public find API for the Gtk+ WK2 port. It
2480         defines a new object called WebKitFindController owned by each
2481         WebKitWebView. Clients will use this new object to search strings
2482         in the WebKitWebView.
2483
2484         Changes include also documentation and unit tests for the new
2485         public API.
2486
2487         * GNUmakefile.am:
2488         * UIProcess/API/gtk/WebKitDefines.h:
2489         * UIProcess/API/gtk/WebKitFindController.cpp: Added.
2490         (didFindString): implementation of the WKPage Find interface.
2491         (didFailToFindString): Ditto.
2492         (didCountStringMatches): Ditto.
2493         (webkit_find_controller_init):
2494         (getWKPageFromWebKitWebView):
2495         (webkitFindControllerConstructed):
2496         (webkitFindControllerGetProperty):
2497         (webkitFindControllerSetProperty):
2498         (webkitFindControllerFinalize):
2499         (webkit_find_controller_class_init):
2500         (webkit_find_controller_get_search_text):
2501         (webkit_find_controller_get_options):
2502         (webkit_find_controller_get_max_match_count):
2503         (webkit_find_controller_get_web_view):
2504         (webKitFindControllerPerform):
2505         (webKitFindControllerSetSearchData):
2506         (webkit_find_controller_search): asynchronously looks for the
2507         search string in the WebKitWebView.
2508         (webkit_find_controller_search_finish): unhighlights text matches.
2509         (webkit_find_controller_search_next):
2510         (webkit_find_controller_search_previous):
2511         (webkit_find_controller_count_matches): asynchronously counts the
2512         number of matches of the search string in the WebKitWebView.
2513         * UIProcess/API/gtk/WebKitFindController.h: Added.
2514         * UIProcess/API/gtk/WebKitPrivate.h:
2515         * UIProcess/API/gtk/WebKitWebView.cpp:
2516         (webkit_web_view_get_find_controller): returns the
2517         WebKitFindController instance owned by the WebKitWebView.
2518         * UIProcess/API/gtk/WebKitWebView.h:
2519         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
2520         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
2521         * UIProcess/API/gtk/docs/webkit2gtk.types:
2522         * UIProcess/API/gtk/tests/GNUmakefile.am:
2523         * UIProcess/API/gtk/tests/TestWebKitFindController.cpp: Added.
2524         (testFindControllerTextFound):
2525         (testFindControllerTextNotFound):
2526         (testFindControllerMatchCount):
2527         (testFindControllerMaxMatchCount):
2528         (testFindControllerNext):
2529         (testFindControllerPrevious):
2530         (testFindControllerCountedMatches):
2531         (testFindControllerOptions):
2532         (testFindControllerInstance):
2533         (testFindControllerGetters):
2534         (testFindControllerHide):
2535         (beforeAll):
2536         (afterAll):
2537         * UIProcess/API/gtk/webkit2.h:
2538
2539 2012-02-28  Simon Fraser  <simon.fraser@apple.com>
2540
2541         Update WebKitSystemInterface.
2542
2543         Reviewed by Sam Weinig.
2544
2545         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2546         (InitWebCoreSystemInterface):
2547
2548 2012-02-28  Hugo Parente Lima  <hugo.lima@openbossa.org>
2549
2550         All mouse events after a right click are ignored when they came from WebkitTestRunner
2551         https://bugs.webkit.org/show_bug.cgi?id=77350
2552
2553         Reviewed by Chang Shu.
2554
2555         Never ignore mouse events when using sync events, even if the context menu is being
2556         show but the Ui did replied the ShowContextMenu event with a ContextMenuHidden.
2557
2558         * WebProcess/WebPage/WebPage.cpp:
2559         (WebKit::WebPage::mouseEventSyncForTesting):
2560
2561 2012-02-28  Alexey Proskuryakov  <ap@apple.com>
2562
2563         More build fix.
2564
2565         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: Check for build platform
2566         properly.
2567
2568 2012-02-28  Alexey Proskuryakov  <ap@apple.com>
2569
2570         Build fix.
2571
2572         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue):
2573         Check for build platform properly.
2574
2575 2012-02-28  Enrica Casucci  <enrica@apple.com>
2576
2577         More Pasteboard code cleanup.
2578         https://bugs.webkit.org/show_bug.cgi?id=79816
2579
2580         Removing the last references to NSPasteboard.
2581         
2582         Reviewed by Alexey Proskuryakov.
2583
2584         * WebProcess/WebCoreSupport/WebEditorClient.h:
2585         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2586         (WebKit::WebEditorClient::setInsertionPasteboard):
2587
2588 2012-02-28  Alexey Proskuryakov  <ap@apple.com>
2589
2590         [Mac] Add an experimental SPI for plug-ins to enter sandbox
2591         https://bugs.webkit.org/show_bug.cgi?id=79709
2592
2593         Reviewed by Anders Carlsson.
2594
2595         * PluginProcess/PluginProcess.h: (WebKit::PluginProcess::pluginPath): Exposed plugin path.
2596
2597         * PluginProcess/mac/com.apple.WebKit.PluginProcess.sb: Added.
2598
2599         * WebKit2.xcodeproj/project.pbxproj: Added new files.
2600
2601         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Exposed
2602         a function to access sandboxing functions when available.
2603
2604         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.h: Added.
2605         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: Added.
2606
2607 2012-02-28  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
2608
2609         [Qt] Allow read/write to the WebView.url property
2610         https://bugs.webkit.org/show_bug.cgi?id=77554
2611
2612         Reviewed by Tor Arne Vestbø.
2613
2614         Change QML API WebView.url to read/write to reflect either the url requested by the user.
2615         Also removed WebView.load(url). Defers setting url (loading page) until onComponentComplete is triggered. 
2616         Fixed c++ and qml tests to reflect the new API.
2617
2618         * Target.pri:
2619         * UIProcess/API/qt/qquickwebview.cpp:
2620         (QQuickWebViewPrivate::QQuickWebViewPrivate):
2621         (QQuickWebViewPrivate::onComponentComplete):
2622         (QQuickWebView::setUrl):
2623         * UIProcess/API/qt/qquickwebview_p_p.h:
2624         (QQuickWebViewPrivate):
2625         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
2626         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml:
2627         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
2628         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
2629         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
2630         * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
2631         * UIProcess/API/qt/tests/qmltests/WebView/tst_download.qml:
2632         * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml:
2633         * UIProcess/API/qt/tests/qmltests/WebView/tst_geopermission.qml:
2634         * UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:
2635         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml:
2636         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgress.qml:
2637         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgressSignal.qml:
2638         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
2639         * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml:
2640         * UIProcess/API/qt/tests/qmltests/WebView/tst_origin.qml:
2641         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
2642         * UIProcess/API/qt/tests/qmltests/WebView/tst_properties.qml:
2643         * UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml:
2644         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2645         (tst_QQuickWebView::loadEmptyPageViewHidden):
2646         (tst_QQuickWebView::loadNonexistentFileUrl):
2647
2648 2012-02-28  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2649
2650         [Qt] Signal and property cleanup in QQuickWebView
2651         https://bugs.webkit.org/show_bug.cgi?id=78820
2652
2653         Reviewed by Noam Rosenthal.
2654
2655         - Remove parameters from property change notify signals:
2656           titleChanged, urlChanged, iconChanged, loadProgressChanged
2657         - Rename the parameters of linkHovered to prevent shadoing properties of WebView
2658         - Rename navigationStateChanged to navigationHistoryChanged
2659
2660         * UIProcess/API/qt/qquickwebview.cpp:
2661         (QQuickWebViewPrivate::QQuickWebViewPrivate):
2662         (QQuickWebViewPrivate::initialize):
2663         (QQuickWebViewPrivate::_q_onUrlChanged):
2664         (QQuickWebViewPrivate::setIcon):
2665         * UIProcess/API/qt/qquickwebview_p.h:
2666         * UIProcess/API/qt/qquickwebview_p_p.h:
2667         (QQuickWebViewPrivate):
2668         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
2669         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
2670         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
2671         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2672         (tst_QQuickWebView::loadProgress):
2673         * UIProcess/qt/QtWebPageLoadClient.cpp:
2674         (QtWebPageLoadClient::didCommitLoadForFrame):
2675         (QtWebPageLoadClient::didSameDocumentNavigationForFrame):
2676         (QtWebPageLoadClient::didReceiveTitleForFrame):
2677         (QtWebPageLoadClient::setLoadProgress):
2678         * UIProcess/qt/QtWebPageLoadClient.h:
2679         (QtWebPageLoadClient):
2680
2681 2012-02-28  Mario Sanchez Prada  <msanchez@igalia.com>
2682
2683         [GTK] Add GMainLoop and GMainContext to be handled by GRefPtr
2684         https://bugs.webkit.org/show_bug.cgi?id=79496
2685
2686         Reviewed by Martin Robinson.
2687
2688         Updated places where raw pointers to GMainLoop and GMainContext
2689         were being used, replacing them with GRefPtr-based code.
2690
2691         * Platform/WorkQueue.h:
2692         (WorkQueue):
2693         * Platform/gtk/WorkQueueGtk.cpp:
2694         (WorkQueue::platformInitialize):
2695         (WorkQueue::platformInvalidate):
2696         (WorkQueue::workQueueThreadBody):
2697         (WorkQueue::registerEventSourceHandler):
2698         (WorkQueue::dispatchOnSource):
2699         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
2700         (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
2701         (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
2702         (WebKit::WebPopupMenuProxyGtk::shutdownRunLoop):
2703         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
2704         (WebPopupMenuProxyGtk):
2705
2706 2012-02-28  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2707
2708         [Qt] Initialize QtWebContext as much as we can in its constructor.
2709         https://bugs.webkit.org/show_bug.cgi?id=79809
2710
2711         Reviewed by Tor Arne Vestbø.
2712
2713         The icon database wouldn't be initialized on the QtWebContext while in WebKitTestRunner
2714         since it doesn't call the initialize method on it after creating it.
2715         Remove the initialize method, move the download manager and icon database initialization
2716         in the constructor and call initializeContextInjectedBundleClient directly in
2717         defaultContext to prevent overriding WKTR's injected bundle client.
2718
2719         * UIProcess/qt/QtWebContext.cpp:
2720         (WebKit::QtWebContext::QtWebContext):
2721         (WebKit::QtWebContext::defaultContext):
2722         * UIProcess/qt/QtWebContext.h:
2723         (QtWebContext):
2724
2725 2012-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2726
2727         [GTK] Inconsistent state of WebKitWebView when replacing content in WebKit2
2728         https://bugs.webkit.org/show_bug.cgi?id=79775
2729
2730         Reviewed by Martin Robinson.
2731
2732         Use an enum instead of a boolean to track the status of a
2733         replace_content() load operation. We need to know when the load of
2734         the replace content actually starts to not ignore valid load
2735         events of a previous ongoing load operation.
2736
2737         * UIProcess/API/gtk/WebKitWebView.cpp:
2738         (webkitWebViewLoadChanged): Transit to new replace content state
2739         when replacing content depending on the load event.
2740         (webkitWebViewLoadFailed): Ignore load failed events when
2741         replacing content.
2742         (webkitWebViewSetEstimatedLoadProgress): Ignore load progress when
2743         replacing content.
2744         (webkit_web_view_replace_content): Set replace content status to
2745         WillReplaceContent.
2746         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2747         (replaceContentLoadCallback):
2748         (testWebViewReplaceContent):
2749         * UIProcess/API/gtk/tests/WebViewTest.cpp:
2750         (titleChanged):
2751         (WebViewTest::waitUntilTitleChanged): Convenient method to wait
2752         until title changes. Use with replaceConent() since load events
2753         are not emitted when replacing content.
2754         * UIProcess/API/gtk/tests/WebViewTest.h:
2755
2756 2012-02-27  Anders Carlsson  <andersca@apple.com>
2757
2758         Add basic page overlay support to TiledCoreAnimationDrawingArea
2759         https://bugs.webkit.org/show_bug.cgi?id=79716
2760         <rdar://problem/10923079>
2761
2762         Reviewed by Sam Weinig.
2763
2764         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2765         Make TiledCoreAnimationDrawingArea a GraphicsLayerClient.
2766
2767         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2768         (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
2769         Create the page overlay layer.
2770
2771         (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
2772         Destroy the page overlay layer.
2773
2774         (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
2775         Mark the page overlay layer as needing display.
2776
2777         (WebKit::TiledCoreAnimationDrawingArea::notifyAnimationStarted):
2778         (WebKit::TiledCoreAnimationDrawingArea::notifySyncRequired):
2779         Add empty GraphisLayerClient member function implementations.
2780
2781         (WebKit::TiledCoreAnimationDrawingArea::paintContents):
2782         Ask the page overlay to paint itself.
2783
2784         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2785         Flush the page overlay layer.
2786         
2787         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
2788         Resize the page overlay layer.
2789
2790         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
2791         If we have a page overlay layer, add it as a sublayer of the root layer.
2792
2793         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
2794         Create the page overlay layer and add it as a sublayer of the root layer.
2795
2796         (WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer):
2797         Remove the page overlay layer and destroy it.
2798
2799 2012-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2800
2801         [GTK] Remove virtual methods of WebKitDownload signals in WebKit2 GTK+ API
2802         https://bugs.webkit.org/show_bug.cgi?id=79804
2803
2804         Reviewed by Martin Robinson.
2805
2806         That comes from the first patch that followed the approach of the
2807         first LoaderClient implementation. With current implementation
2808         download signals, except decide-destination, don't need to be
2809         true_handled, and they won't have a default handler
2810         implementation. Also the download object is not supposed to be
2811         inheritable, since instances are created privately by the
2812         WebContext, so it's not possible to override the virtual methods
2813         in derived classes.
2814
2815         * UIProcess/API/gtk/WebKitDownload.cpp:
2816         (webkit_download_class_init):
2817         (webkitDownloadNotifyProgress):
2818         (webkitDownloadFailed):
2819         (webkitDownloadFinished):
2820         * UIProcess/API/gtk/WebKitDownload.h:
2821         (_WebKitDownloadClass):
2822         * UIProcess/API/gtk/webkit2marshal.list:
2823
2824 2012-02-28  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2825
2826         [Qt] Fix build for WK2, do not use enum type if values can be outside the enum
2827         https://bugs.webkit.org/show_bug.cgi?id=79800
2828
2829         Reviewed by Csaba Osztrogonác.
2830
2831         We have two different enums called NavigationRequestAction. If we use one of them
2832         to store the variables, compilers can rightfully warn about comparison with
2833         values from other enums.
2834
2835         We might revisit the strategy of exposing different enumerations in experimental,
2836         but for now, fallback to using int for the 'action' property in
2837         QWebNavigationRequest.
2838
2839         * UIProcess/API/qt/qwebnavigationrequest.cpp:
2840         (QWebNavigationRequestPrivate):
2841         (QWebNavigationRequest::setAction):
2842         (QWebNavigationRequest::action):
2843         * UIProcess/API/qt/qwebnavigationrequest_p.h:
2844         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
2845
2846 2012-02-27  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2847
2848         [Qt] API changes to QWebNavigationRequest
2849         https://bugs.webkit.org/show_bug.cgi?id=78821
2850
2851         Reviewed by Kenneth Rohde Christiansen.
2852
2853         Changes discussed in API review at Szeged: rename 'button' to 'mouseButton',
2854         rename 'modifiers' to 'keyboardModifiers', remove 'originatingUrl' and
2855         use the enum type for 'action'.
2856
2857         * UIProcess/API/qt/qwebnavigationrequest.cpp:
2858         (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
2859         (QWebNavigationRequestPrivate):
2860         (QWebNavigationRequest::QWebNavigationRequest):
2861         (QWebNavigationRequest::setAction):
2862         (QWebNavigationRequest::mouseButton):
2863         (QWebNavigationRequest::keyboardModifiers):
2864         (QWebNavigationRequest::action):
2865         * UIProcess/API/qt/qwebnavigationrequest_p.h:
2866         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
2867         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
2868         * UIProcess/qt/QtWebPagePolicyClient.cpp:
2869         (QtWebPagePolicyClient::decidePolicyForNavigationAction):
2870         * UIProcess/qt/QtWebPagePolicyClient.h:
2871         (QtWebPagePolicyClient):
2872
2873 2012-02-28  Shinya Kawanaka  <shinyak@chromium.org>
2874
2875         Element should be able to have multiple shadow roots.
2876         https://bugs.webkit.org/show_bug.cgi?id=77931
2877
2878         Reviewed by Hajime Morita.
2879
2880         * win/WebKit2.def:
2881         * win/WebKit2CFLite.def:
2882
2883 2012-02-28  Hugo Parente Lima  <hugo.lima@openbossa.org>
2884
2885         [Qt][WK2] Use movementStarted/Ended signals instead of movingChanged on QtViewportInterationEngine
2886         https://bugs.webkit.org/show_bug.cgi?id=79521
2887
2888         Reviewed by Kenneth Rohde Christiansen.
2889
2890         movingChanged() signal is emitted many times, so the use of movementStarted() and
2891         movementEnded() is a better choice.
2892
2893         * UIProcess/qt/QtFlickProvider.cpp:
2894         (QtFlickProvider::QtFlickProvider):
2895         * UIProcess/qt/QtFlickProvider.h:
2896         (QtFlickProvider):
2897         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2898         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
2899         * UIProcess/qt/QtViewportInteractionEngine.h:
2900         (QtViewportInteractionEngine):
2901
2902 2012-02-27  Shinya Kawanaka  <shinyak@chromium.org>
2903
2904         Element::removeShadowRoot() and setShadowRoot() should be moved into ShadowTree.
2905         https://bugs.webkit.org/show_bug.cgi?id=78313
2906
2907         Reviewed by Hajime Morita.
2908
2909         * win/WebKit2.def:
2910         * win/WebKit2CFLite.def:
2911
2912 2012-02-27  Brady Eidson  <beidson@apple.com>
2913
2914         <rdar://problem/10924993> and https://bugs.webkit.org/show_bug.cgi?id=79725
2915         <a ping> doesn't work in WebKit2
2916
2917         Reviewed by Alexey Proskuryakov.
2918
2919         * WebProcess/WebPage/WebPage.cpp:
2920         (WebKit::WebPage::updatePreferences): Push the WK2 <a ping> setting to WebCore::Settings.
2921
2922 2012-02-27  Enrica Casucci  <enrica@apple.com>
2923
2924         WebKit2: implement platform strategy to access Pasteboard in the UI process.
2925         https://bugs.webkit.org/show_bug.cgi?id=79253
2926         <rdar://problem/9971876>
2927
2928         Reviewed by Alexey Proskuryakov.
2929
2930         * UIProcess/WebContext.h:
2931         * UIProcess/WebContext.messages.in: Added messages to access NSPasteboard
2932         in the UI process.
2933         * UIProcess/mac/WebContextMac.mm: Added methods corresponding to the
2934         new messages.
2935         (WebKit::WebContext::getPasteboardTypes):
2936         (WebKit::WebContext::getPasteboardPathnamesForType):
2937         (WebKit::WebContext::getPasteboardStringForType):
2938         (WebKit::WebContext::getPasteboardBufferForType):
2939         (WebKit::WebContext::pasteboardCopy):
2940         (WebKit::WebContext::getPasteboardChangeCount):
2941         (WebKit::WebContext::getPasteboardUniqueName):
2942         (WebKit::WebContext::getPasteboardColor):
2943         (WebKit::WebContext::setPasteboardTypes):
2944         (WebKit::WebContext::setPasteboardPathnamesForType):
2945         (WebKit::WebContext::setPasteboardStringForType):
2946         (WebKit::WebContext::setPasteboardBufferForType):
2947         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: New implementation of the PasteboardStrategy using message exchange
2948         with the UI process.
2949         (WebKit::WebPlatformStrategies::getTypes):
2950         (WebKit::WebPlatformStrategies::bufferForType):
2951         (WebKit::WebPlatformStrategies::getPathnamesForType):
2952         (WebKit::WebPlatformStrategies::stringForType):
2953         (WebKit::WebPlatformStrategies::copy):
2954         (WebKit::WebPlatformStrategies::changeCount):
2955         (WebKit::WebPlatformStrategies::uniqueName):
2956         (WebKit::WebPlatformStrategies::color):
2957         (WebKit::WebPlatformStrategies::setTypes):
2958         (WebKit::WebPlatformStrategies::setBufferForType):
2959         (WebKit::WebPlatformStrategies::setPathnamesForType):
2960         (WebKit::WebPlatformStrategies::setStringForType):
2961
2962 2012-02-27  Dan Bernstein  <mitz@apple.com>
2963
2964         <rdar://problem/9557598> REGRESSION (WebKit2): Non-activating links sometimes don’t work
2965         https://bugs.webkit.org/show_bug.cgi?id=79607
2966
2967         Reviewed by Adele Peterson.
2968
2969         Test: TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm
2970
2971         This was caused by not mapping the mouse event coordinates from window coordinates to
2972         document coordinates.
2973
2974         * WebProcess/WebPage/mac/WebPageMac.mm:
2975         (WebKit::WebPage::performDictionaryLookupAtLocation): Convert the point to main frame
2976         coordinates when performing the hit test.
2977         (WebKit::WebPage::shouldDelayWindowOrderingEvent): Convert the point to the main or focused
2978         frame coordinates when perfomring the hit test.
2979         (WebKit::WebPage::acceptsFirstMouse): Ditto.
2980
2981 2012-02-27  Timothy Hatcher  <timothy@apple.com>
2982
2983         Add WKInspector API to know when the Web Inspector is the frontmost window.
2984
2985         Also makes the Safari Develop menu items work when the Web Inspector is frontmost.
2986
2987         https://webkit.org/b/79649
2988
2989         Reviewed by John Sullivan.
2990
2991         * UIProcess/API/C/WKInspector.cpp:
2992         (WKInspectorIsFront): Added. Call WebInspectorProxy::isFront.
2993         * UIProcess/API/C/WKInspector.h:
2994         * UIProcess/WebInspectorProxy.cpp:
2995         (WebKit::WebInspectorProxy::isFront): Added. Call platformIsFront.
2996         * UIProcess/WebInspectorProxy.h:
2997         * UIProcess/efl/WebInspectorEfl.cpp:
2998         (WebKit::WebInspectorProxy::platformIsFront): Added stub.
2999         * UIProcess/gtk/WebInspectorGtk.cpp:
3000         (WebKit::WebInspectorProxy::platformIsFront): Added stub.
3001         * UIProcess/mac/WebInspectorProxyMac.mm:
3002         (-[WKWebInspectorProxyObjCAdapter showWebInspector:]): Added. Makes the Develop menu items in Safari work when
3003         the Web Inspector window is front.
3004         (-[WKWebInspectorProxyObjCAdapter showErrorConsole:]): Added. Ditto.
3005         (-[WKWebInspectorProxyObjCAdapter showResources:]): Added. Ditto.
3006         (-[WKWebInspectorProxyObjCAdapter viewSource:]): Added. Ditto.
3007         (-[WKWebInspectorProxyObjCAdapter toggleDebuggingJavaScript:]): Added. Ditto.
3008         (-[WKWebInspectorProxyObjCAdapter toggleProfilingJavaScript:]): Added. Ditto.
3009         (-[WKWebInspectorProxyObjCAdapter validateUserInterfaceItem:]): Added. Update the menu item titles.
3010         (WebKit::WebInspectorProxy::platformIsFront): Added. Return if visible and the window is main.
3011         * UIProcess/qt/WebInspectorProxyQt.cpp:
3012         (WebKit::WebInspectorProxy::platformIsFront): Added stub.
3013         * UIProcess/win/WebInspectorProxyWin.cpp:
3014         (WebKit::WebInspectorProxy::platformIsFront): Added stub.
3015
3016 2012-02-26  YoungTaeck Song  <youngtaeck.song@samsung.com>
3017
3018         [EFL][WK2] Add InjectedBundleEfl.cpp
3019         https://bugs.webkit.org/show_bug.cgi?id=75463
3020
3021         Reviewed by Andreas Kling.
3022
3023         Add first version of InjectedBundleEfl.cpp including load() and placeholder for activateMacFontAscentHack().
3024
3025         * WebProcess/InjectedBundle/InjectedBundle.h:
3026         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
3027         (WebKit::InjectedBundle::load):
3028         (WebKit::InjectedBundle::activateMacFontAscentHack):
3029
3030 2012-02-26  Shinya Kawanaka  <shinyak@chromium.org>
3031
3032         Rename ShadowRootList to ShadowTree.
3033         https://bugs.webkit.org/show_bug.cgi?id=79342
3034
3035         Reviewed by Hajime Morita.
3036
3037         * win/WebKit2.def:
3038         * win/WebKit2CFLite.def:
3039
3040 2012-02-26  Hajime Morrita  <morrita@chromium.org>
3041
3042         Move ChromeClient::showContextMenu() to ContextMenuClient
3043         https://bugs.webkit.org/show_bug.cgi?id=79427
3044
3045         Reviewed by Adam Barth.
3046
3047         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3048         * WebProcess/WebCoreSupport/WebChromeClient.h:
3049         (WebChromeClient):
3050         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3051         (WebKit):
3052         (WebKit::WebContextMenuClient::showContextMenu): Moved from WebChromeClient
3053         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
3054         (WebContextMenuClient):
3055         * WebProcess/WebPage/WebPage.cpp:
3056         (WebKit::handleContextMenuEvent):
3057         (WebKit::handleMouseEvent):
3058         (WebKit::WebPage::mouseEvent):
3059         (WebKit::WebPage::mouseEventSyncForTesting):
3060
3061 2012-02-26  Huang Dongsung  <luxtella@company100.net>
3062
3063         Use Functional instead of a MessageQueue for messages to the LayerTreeHostProxy
3064         renderer.
3065         https://bugs.webkit.org/show_bug.cgi?id=79478
3066
3067         This makes a lot of the broilerplate code for message-passing unnecessary, and
3068         results in a much more succinct implementation.
3069
3070         Reviewed by Noam Rosenthal.
3071
3072         * UIProcess/LayerTreeHostProxy.h:
3073         (WebKit):
3074         (LayerTreeHostProxy):
3075         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
3076         (WebKit):
3077         (WebKit::LayerTreeHostProxy::updateTile):
3078         (WebKit::LayerTreeHostProxy::createImage):
3079         (WebKit::LayerTreeHostProxy::syncRemoteContent):
3080         (WebKit::LayerTreeHostProxy::dispatchUpdate):
3081         (WebKit::LayerTreeHostProxy::createTileForLayer):
3082         (WebKit::LayerTreeHostProxy::updateTileForLayer):
3083         (WebKit::LayerTreeHostProxy::removeTileForLayer):
3084         (WebKit::LayerTreeHostProxy::deleteCompositingLayer):
3085         (WebKit::LayerTreeHostProxy::setRootCompositingLayer):
3086         (WebKit::LayerTreeHostProxy::syncCompositingLayerState):
3087         (WebKit::LayerTreeHostProxy::didRenderFrame):
3088         (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
3089         (WebKit::LayerTreeHostProxy::destroyDirectlyCompositedImage):
3090
3091 2012-02-26  Filip Pizlo  <fpizlo@apple.com>
3092
3093         Build fix for SL.
3094
3095         * Platform/mac/RemoteLayerClient.mm:
3096         (WebKit::RemoteLayerClient::RemoteLayerClient):
3097
3098 2012-02-26  Sam Weinig  <sam@webkit.org>
3099
3100         Encapsulate uses of WKSI to setup a remote layer into a new RemoteLayerClient class
3101         https://bugs.webkit.org/show_bug.cgi?id=79612
3102
3103         Reviewed by Anders Carlsson.
3104
3105         * Platform/mac/RemoteLayerClient.h: 
3106         * Platform/mac/RemoteLayerClient.mm: 
3107         (WebKit::RemoteLayerClient::create):
3108         (WebKit::RemoteLayerClient::RemoteLayerClient):
3109         (WebKit::RemoteLayerClient::~RemoteLayerClient):
3110         (WebKit::RemoteLayerClient::clientID):
3111         (WebKit::RemoteLayerClient::invalidate):
3112         New class that encapsulates calls to WKSI WKCARemoteLayerClient*. For platforms
3113         where the use of WKSI is not necessary, due to CARemoteLayerClient being available,
3114         stop using WKSI.
3115
3116         * PluginProcess/PluginControllerProxy.cpp:
3117         * PluginProcess/PluginControllerProxy.h:
3118         * PluginProcess/mac/PluginControllerProxyMac.mm:
3119         (WebKit::PluginControllerProxy::platformInitialize):
3120         (WebKit::PluginControllerProxy::platformDestroy):
3121         (WebKit::PluginControllerProxy::remoteLayerClientID):
3122         (WebKit::PluginControllerProxy::platformGeometryDidChange):
3123         * WebKit2.xcodeproj/project.pbxproj:
3124         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
3125         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
3126         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
3127         (WebKit::WebFullScreenManagerMac::disposeOfLayerClient):
3128         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
3129         (LayerTreeHostCAMac):
3130         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
3131         (WebKit::LayerTreeHostCAMac::platformInitialize):
3132         (WebKit::LayerTreeHostCAMac::invalidate):
3133         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3134         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3135         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
3136         Switch to using RemoteLayerClient.
3137
3138         * UIProcess/mac/WebContextMac.mm:
3139         (WebKit::WebContext::platformInitializeWebProcess):
3140         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3141         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
3142         Use CARemoteLayerServer directly if available.
3143
3144 2012-02-25  Anders Carlsson  <andersca@apple.com>
3145
3146         Address review feedback from Andreas Kling.
3147
3148         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3149         (WebKit::NetscapePlugin::platformHandleMouseEvent):
3150
3151 2012-02-25  Anders Carlsson  <andersca@apple.com>
3152
3153         Mouse tracking incorrect in Silverlight when using multi monitor with offset arrangement
3154         https://bugs.webkit.org/show_bug.cgi?id=79589
3155         <rdar://problem/9719592>
3156
3157         Reviewed by Sam Weinig.
3158
3159         In the Carbon event model, mouse event coordinates are flipped relative to the first screen,
3160         whereas the coordinates we get from the WebMouseEvent are flipped relative to the screen where
3161         the containing WKView is on.
3162
3163         Instead of passing the global coordinates to NPP_HandleEvent, convert them to the flipped screen coordinate
3164         system that the plug-in expects.
3165
3166         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3167         (WebKit::NetscapePlugin::platformHandleMouseEvent):
3168
3169 2012-02-25  Sheriff Bot  <webkit.review.bot@gmail.com>
3170
3171         Unreviewed, rolling out r108900.
3172         http://trac.webkit.org/changeset/108900
3173         https://bugs.webkit.org/show_bug.cgi?id=79587
3174
3175         broke some API tests, will investigate and re-commit
3176         (Requested by noamr on #webkit).
3177
3178         * UIProcess/API/qt/qquickwebpage.cpp:
3179         (computeEffectiveOpacity):
3180         (QQuickWebPagePrivate::paintToCurrentGLContext):
3181         (PageProxyNode::changedStates):
3182         (PageProxyNode::render):
3183         * UIProcess/API/qt/qquickwebpage_p_p.h:
3184         (QQuickWebPagePrivate):
3185
3186 2012-02-25  No'am Rosenthal  <noam.rosenthal@nokia.com>
3187
3188         [Qt] Use the existing inheritedOpacity/matrix properties of QSGNode
3189         https://bugs.webkit.org/show_bug.cgi?id=79543
3190
3191         Use QSGNode::inheritedOpacity() and QSGNode::matrix().
3192         Also, remove flags from changedStates() that we don't actually touch.
3193
3194         Reviewed by Kenneth Rohde Christiansen.
3195
3196         * UIProcess/API/qt/qquickwebpage.cpp:
3197         (QQuickWebPagePrivate::paintToCurrentGLContext):
3198         (PageProxyNode::changedStates):
3199         (PageProxyNode::render):
3200         * UIProcess/API/qt/qquickwebpage_p_p.h:
3201         (QQuickWebPagePrivate):
3202
3203 2012-02-25  Sheriff Bot  <webkit.review.bot@gmail.com>
3204
3205         Unreviewed, rolling out r108816.
3206         http://trac.webkit.org/changeset/108816
3207         https://bugs.webkit.org/show_bug.cgi?id=79562
3208
3209         It made many tests crash and timeout on Qt-WK2 (Requested by
3210         ossy__ on #webkit).
3211
3212         * UIProcess/API/qt/qquickwebview.cpp:
3213         (QQuickWebViewPrivate::QQuickWebViewPrivate):
3214         (QQuickWebViewPrivate::initialize):
3215         (QQuickWebViewPrivate::setIcon):
3216         * UIProcess/API/qt/qquickwebview_p.h:
3217         * UIProcess/API/qt/qquickwebview_p_p.h:
3218         (QQuickWebViewPrivate):
3219         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
3220         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
3221         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
3222         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3223         (tst_QQuickWebView::loadProgress):
3224         * UIProcess/qt/QtWebPageLoadClient.cpp:
3225         (QtWebPageLoadClient::didCommitLoadForFrame):
3226         (QtWebPageLoadClient::didSameDocumentNavigationForFrame):
3227         (QtWebPageLoadClient::didReceiveTitleForFrame):
3228         (QtWebPageLoadClient::setLoadProgress):
3229         * UIProcess/qt/QtWebPageLoadClient.h:
3230         (QtWebPageLoadClient):
3231
3232 2012-02-24  Andy Estes  <aestes@apple.com>
3233
3234         REGRESSION (r108730): Webkit nightlies fails to start due to WKPreferencesGetSuppressIncrementalRendering renaming
3235         https://bugs.webkit.org/show_bug.cgi?id=79515
3236
3237         Reviewed by Alexey Proskuryakov.
3238
3239         Some versions of Safari contain call sites to two functions in WebKit2
3240         that were removed in r108730. Restore these two functions so that these
3241         versions of Safari can be used with WebKit nightly builds.
3242
3243         * UIProcess/API/C/WKPreferences.cpp:
3244         (WKPreferencesSetSuppressIncrementalRendering):
3245         (WKPreferencesGetSuppressIncrementalRendering):
3246         * UIProcess/API/C/WKPreferences.h:
3247
3248 2012-02-24  Jessie Berlin  <jberlin@apple.com>
3249
3250         requestPermission callback not invoked if the WebProcess doesn't have to ask the UI Process
3251         about the permission level.
3252         https://bugs.webkit.org/show_bug.cgi?id=79494
3253
3254         Reviewed by Jon Honeycutt.
3255
3256         Invoke the callback in the case where the permission level is known and no message is sent
3257         to the UI Process.
3258
3259         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
3260         (WebKit::NotificationPermissionRequestManager::startRequest):
3261
3262 2012-02-24  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3263
3264         [Qt] Signal and property cleanup in QQuickWebView
3265         https://bugs.webkit.org/show_bug.cgi?id=78820
3266
3267         Reviewed by Simon Hausmann.
3268
3269         - Remove parameters from property change notify signals:
3270           titleChanged, urlChanged, iconChanged, loadProgressChanged
3271         - Rename the parameters of linkHovered to prevent shadoing properties of WebView
3272         - Rename navigationStateChanged to navigationHistoryChanged
3273
3274         * UIProcess/API/qt/qquickwebview.cpp:
3275         (QQuickWebViewPrivate::QQuickWebViewPrivate):
3276         (QQuickWebViewPrivate::initialize):
3277         (QQuickWebViewPrivate::_q_onUrlChanged):
3278         (QQuickWebViewPrivate::setIcon):
3279         * UIProcess/API/qt/qquickwebview_p.h:
3280         * UIProcess/API/qt/qquickwebview_p_p.h:
3281         (QQuickWebViewPrivate):
3282         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
3283         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
3284         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
3285         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3286         (tst_QQuickWebView::loadProgress):
3287         * UIProcess/qt/QtWebPageLoadClient.cpp:
3288         (QtWebPageLoadClient::didCommitLoadForFrame):
3289         (QtWebPageLoadClient::didSameDocumentNavigationForFrame):
3290         (QtWebPageLoadClient::didReceiveTitleForFrame):
3291         (QtWebPageLoadClient::setLoadProgress):
3292         * UIProcess/qt/QtWebPageLoadClient.h:
3293         (QtWebPageLoadClient):
3294
3295 2012-02-24  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3296
3297         [Qt] API: Unify the loading properties and signals.
3298         https://bugs.webkit.org/show_bug.cgi?id=79486
3299
3300         Reviewed by Simon Hausmann.
3301
3302         - Remove the canReload signal, instead assume that calling reload in those cases
3303           won't have any effect.
3304         - Replace loadStarted, loadSucceeded and loadFailed by a single signal: loadingChanged.
3305           The signal carries an argument with a status and error codes giving the intended context.
3306         - Use loadingChanged as the notification signal for the property "loading" instead of
3307           navigationStateChanged.
3308
3309         Also update all API tests to use the new loading signals and add some utility functions
3310         to track the loading since the new API aims to be more adapted to declarative logic
3311         and the auto tests are using an imperative logic.
3312
3313         * Target.pri:
3314         * UIProcess/API/qt/qquickwebview.cpp:
3315         (QQuickWebViewPrivate::QQuickWebViewPrivate):
3316         (QQuickWebViewPrivate::loadDidSucceed):
3317         (QQuickWebViewPrivate::didChangeLoadingState):
3318         (QQuickWebViewPrivate::processDidCrash):
3319         (QQuickWebViewPrivate::didRelaunchProcess):
3320         * UIProcess/API/qt/qquickwebview_p.h:
3321         * UIProcess/API/qt/qquickwebview_p_p.h:
3322         (QQuickWebViewPrivate):
3323         * UIProcess/API/qt/qwebloadrequest.cpp: Added.
3324         (QWebLoadRequestPrivate):
3325         (QWebLoadRequestPrivate::QWebLoadRequestPrivate):
3326         (QWebLoadRequest::QWebLoadRequest):
3327         (QWebLoadRequest::~QWebLoadRequest):
3328         (QWebLoadRequest::url):
3329         (QWebLoadRequest::status):
3330         (QWebLoadRequest::errorString):
3331         (QWebLoadRequest::errorDomain):
3332         (QWebLoadRequest::errorCode):
3333         * UIProcess/API/qt/qwebloadrequest_p.h: Added.
3334         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
3335         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml:
3336         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
3337         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
3338         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
3339         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
3340         * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml:
3341         * UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:
3342         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml:
3343         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadHtml.qml:
3344         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgress.qml:
3345         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgressSignal.qml:
3346         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
3347         * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml:
3348         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
3349         * UIProcess/API/qt/tests/qmltests/WebView/tst_properties.qml:
3350         * UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml:
3351         * UIProcess/API/qt/tests/qmltests/common/TestWebView.qml: Added.
3352         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3353         (tst_QQuickWebView::navigationStatusAtStartup):
3354         (LoadStartedCatcher::LoadStartedCatcher):
3355         (LoadStartedCatcher::onLoadingChanged):
3356         (tst_QQuickWebView::stopEnabledAfterLoadStarted):
3357         (tst_QQuickWebView::loadEmptyPageViewHidden):
3358         (tst_QQuickWebView::loadNonexistentFileUrl):
3359         (tst_QQuickWebView::backAndForward):
3360         (tst_QQuickWebView::reload):
3361         (tst_QQuickWebView::stop):
3362         (tst_QQuickWebView::loadProgress):
3363         (tst_QQuickWebView::showWebView):
3364         (tst_QQuickWebView::multipleWebViewWindows):
3365         (tst_QQuickWebView::multipleWebViews):
3366         (tst_QQuickWebView::scrollRequest):
3367         * UIProcess/API/qt/tests/util.cpp:
3368         (LoadSpy):
3369         (LoadSpy::LoadSpy):
3370         (LoadSpy::onLoadingChanged):
3371         (waitForLoadSucceeded):
3372         (waitForLoadFailed):
3373         * UIProcess/API/qt/tests/util.h:
3374         * UIProcess/qt/QtWebError.h:
3375         * UIProcess/qt/QtWebPageLoadClient.cpp:
3376         (QtWebPageLoadClient::didStartProvisionalLoadForFrame):
3377         (QtWebPageLoadClient::dispatchLoadFailed):
3378         * UIProcess/qt/QtWebPageLoadClient.h:
3379         (QtWebPageLoadClient):
3380
3381 2012-02-24  Simon Hausmann  <simon.hausmann@nokia.com>
3382
3383         Unreviewed, rolling out r108798.
3384         http://trac.webkit.org/changeset/108798
3385         https://bugs.webkit.org/show_bug.cgi?id=78047
3386
3387         Broke too many Qt WK2 tests.
3388
3389         * UIProcess/API/qt/qquickwebview.cpp:
3390         (QQuickWebView::keyPressEvent):
3391         (QQuickWebView::keyReleaseEvent):
3392         (QQuickWebView::inputMethodEvent):
3393         (QQuickWebView::focusInEvent):
3394         (QQuickWebView::focusOutEvent):
3395         (QQuickWebView::touchEvent):
3396         (QQuickWebView::mousePressEvent):
3397         (QQuickWebView::mouseMoveEvent):
3398         (QQuickWebView::mouseReleaseEvent):
3399         (QQuickWebView::mouseDoubleClickEvent):
3400         (QQuickWebView::wheelEvent):
3401         (QQuickWebView::hoverEnterEvent):
3402         (QQuickWebView::hoverMoveEvent):
3403         (QQuickWebView::hoverLeaveEvent):
3404         (QQuickWebView::dragMoveEvent):
3405         (QQuickWebView::dragEnterEvent):
3406         (QQuickWebView::dragLeaveEvent):
3407         (QQuickWebView::dropEvent):
3408         (QQuickWebView::event):
3409         * UIProcess/qt/QtWebPageEventHandler.cpp:
3410         (QtWebPageEventHandler::handleEvent):
3411         (QtWebPageEventHandler::handleMouseMoveEvent):
3412         (QtWebPageEventHandler::handleMousePressEvent):
3413         (QtWebPageEventHandler::handleMouseReleaseEvent):
3414         (QtWebPageEventHandler::handleWheelEvent):
3415         (QtWebPageEventHandler::handleHoverLeaveEvent):
3416         (QtWebPageEventHandler::handleHoverMoveEvent):
3417         (QtWebPageEventHandler::handleDragEnterEvent):
3418         (QtWebPageEventHandler::handleDragLeaveEvent):
3419         (QtWebPageEventHandler::handleDragMoveEvent):
3420         (QtWebPageEventHandler::handleDropEvent):
3421         (QtWebPageEventHandler::handleKeyPressEvent):
3422         (QtWebPageEventHandler::handleKeyReleaseEvent):
3423         (QtWebPageEventHandler::handleFocusInEvent):
3424         (QtWebPageEventHandler::handleFocusOutEvent):
3425         (QtWebPageEventHandler::inputMethodEvent):
3426         (QtWebPageEventHandler::touchEvent):
3427         * UIProcess/qt/QtWebPageEventHandler.h:
3428         (QtWebPageEventHandler):
3429
3430 2012-02-24  Simon Hausmann  <simon.hausmann@nokia.com>
3431
3432         [Qt][WK2] QQuickWebView::event should lookup faster which events QQuickWebPage can handle
3433         https://bugs.webkit.org/show_bug.cgi?id=78047
3434
3435         Reviewed by Kenneth Rohde Christiansen.
3436
3437         Replaced double-dispatch of events with direct forwarding of events from QQuickWebView::*Event to
3438         QtWebPageEventHandler::handle*Event.
3439
3440         * UIProcess/API/qt/qquickwebview.cpp:
3441         (QQuickWebView::keyPressEvent):
3442         (QQuickWebView::keyReleaseEvent):
3443         (QQuickWebView::inputMethodEvent):
3444         (QQuickWebView::focusInEvent):
3445         (QQuickWebView::focusOutEvent):
3446         (QQuickWebView::touchEvent):
3447         (QQuickWebView::mousePressEvent):
3448         (QQuickWebView::mouseMoveEvent):
3449         (QQuickWebView::mouseReleaseEvent):
3450         (QQuickWebView::mouseDoubleClickEvent):
3451         (QQuickWebView::wheelEvent):
3452         (QQuickWebView::hoverEnterEvent):
3453         (QQuickWebView::hoverMoveEvent):
3454         (QQuickWebView::hoverLeaveEvent):
3455         (QQuickWebView::dragMoveEvent):
3456         (QQuickWebView::dragEnterEvent):
3457         (QQuickWebView::dragLeaveEvent):
3458         (QQuickWebView::dropEvent):
3459         (QQuickWebView::event):
3460         * UIProcess/qt/QtWebPageEventHandler.cpp:
3461         (QtWebPageEventHandler::handleMouseMoveEvent):
3462         (QtWebPageEventHandler::handleMousePressEvent):
3463         (QtWebPageEventHandler::handleMouseReleaseEvent):
3464         (QtWebPageEventHandler::handleWheelEvent):
3465         (QtWebPageEventHandler::handleHoverLeaveEvent):
3466         (QtWebPageEventHandler::handleHoverMoveEvent):
3467         (QtWebPageEventHandler::handleDragEnterEvent):
3468         (QtWebPageEventHandler::handleDragLeaveEvent):
3469         (QtWebPageEventHandler::handleDragMoveEvent):
3470         (QtWebPageEventHandler::handleDropEvent):
3471         (QtWebPageEventHandler::handleKeyPressEvent):
3472         (QtWebPageEventHandler::handleKeyReleaseEvent):
3473         (QtWebPageEventHandler::handleFocusInEvent):
3474         (QtWebPageEventHandler::handleFocusOutEvent):
3475         (QtWebPageEventHandler::handleInputMethodEvent):
3476         (QtWebPageEventHandler::handleTouchEvent):
3477         * UIProcess/qt/QtWebPageEventHandler.h:
3478         (QtWebPageEventHandler):
3479
3480 2012-02-24  Simon Hausmann  <simon.hausmann@nokia.com>
3481
3482         [Qt] Use private QSGRenderNode in QQuickWebView for improved Qt Scene Graph integration
3483         https://bugs.webkit.org/show_bug.cgi?id=79022
3484
3485         Reviewed by Csaba Osztrogonác.
3486
3487         * Target.pri:
3488         * UIProcess/API/qt/qquickwebpage.cpp:
3489         (PageProxyNode::PageProxyNode):
3490         (PageProxyNode::changedStates):
3491         (PageProxyNode::render):
3492         (PageProxyNode):
3493
3494 2012-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3495
3496         [GTK] Encode/decode Null ResourceResponse objects in WebKit2
3497         https://bugs.webkit.org/show_bug.cgi?id=79471
3498
3499         Reviewed by Philippe Normand.
3500
3501         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
3502         (CoreIPC::::encode): Check whether ResourceResponse is Null before
3503         encoding it.
3504         (CoreIPC::::decode): Check whether response is Null and create a
3505         Null ResourceResponse object in such case.
3506
3507 2012-02-24  Shinya Kawanaka  <shinyak@chromium.org>
3508
3509         SpellCheckRequest needs to know the context where the spellcheck happened.
3510         https://bugs.webkit.org/show_bug.cgi?id=79320
3511
3512         Reviewed by Hajime Morita.
3513
3514         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3515         (WebKit::WebEditorClient::requestCheckingOfString):
3516         * WebProcess/WebCoreSupport/WebEditorClient.h:
3517
3518 2012-02-23  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3519
3520         [Qt] Tiling: Improve the method names dealing with moving and scaling.
3521
3522         Rubberstamped by Simon Hausmann.
3523
3524         * UIProcess/API/qt/qquickwebview.cpp:
3525         (QQuickWebViewLegacyPrivate::updateViewportSize):
3526         (QQuickWebViewFlickablePrivate::onComponentComplete):
3527         (QQuickWebViewFlickablePrivate::updateViewportSize):
3528         (QQuickWebViewFlickablePrivate::_q_commitScaleChange):
3529         (QQuickWebViewPrivate::_q_commitPositionChange):
3530         (QQuickWebViewFlickablePrivate::_q_resume):
3531         * UIProcess/API/qt/qquickwebview_p.h:
3532         * UIProcess/API/qt/qquickwebview_p_p.h:
3533         (QQuickWebViewPrivate):
3534         (QQuickWebViewPrivate::_q_commitScaleChange):
3535         (QQuickWebViewFlickablePrivate):
3536         * UIProcess/DrawingAreaProxy.h:
3537         (WebKit::DrawingAreaProxy::setVisibleContentsRectForScaling):
3538         (WebKit::DrawingAreaProxy::setVisibleContentsRectForPanning):
3539         * UIProcess/DrawingAreaProxyImpl.cpp:
3540         (WebKit::DrawingAreaProxyImpl::setVisibleContentsRectForScaling):
3541         (WebKit::DrawingAreaProxyImpl::setVisibleContentsRectForPanning):
3542         * UIProcess/DrawingAreaProxyImpl.h:
3543         (DrawingAreaProxyImpl):
3544         * UIProcess/LayerTreeHostProxy.h:
3545         (LayerTreeHostProxy):
3546         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
3547         (WebKit::LayerTreeHostProxy::setVisibleContentsRectForPanning):
3548         (WebKit::LayerTreeHostProxy::setVisibleContentsRectForScaling):
3549         * UIProcess/qt/QtViewportInteractionEngine.cpp:
3550         (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
3551         (WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate):
3552         (WebKit::QtViewportInteractionEngine::wheelEvent):
3553         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
3554         * UIProcess/qt/QtViewportInteractionEngine.h:
3555         (QtViewportInteractionEngine):
3556         * WebProcess/WebPage/LayerTreeHost.h:
3557         (WebKit::LayerTreeHost::setVisibleContentsRectForScaling):
3558         (WebKit::LayerTreeHost::setVisibleContentsRectForPanning):
3559         (WebKit::LayerTreeHost::setVisibleContentsRectForLayer):
3560         * WebProcess/WebPage/LayerTreeHost.messages.in:
3561         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
3562         (WebKit::LayerTreeHostQt::setVisibleContentsRectForScaling):
3563         (WebKit::LayerTreeHostQt::setVisibleContentsRectForPanning):
3564         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
3565         (LayerTreeHostQt):
3566
3567 2012-02-24  Sergio Villar Senin  <svillar@igalia.com>
3568
3569         [WK2] [GTK] Destructor not invoked in EditorClientFrameDestructionObserver
3570         https://bugs.webkit.org/show_bug.cgi?id=79466
3571
3572         Reviewed by Philippe Normand.
3573
3574         Explicitly cast the observer before deleting it instead of just
3575         deleting a generic pointer. We must to that in order to get the
3576         destructor of the object properly called.
3577
3578         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
3579         (WebKit::EditorClientFrameDestructionObserver::destroyOnClosureFinalization):
3580
3581 2012-02-23  Andy Estes  <aestes@apple.com>
3582
3583         Rename [setS|s]uppressIncrementalRendering to [setS|s]uppressesIncrementalRendering and make it WebPreferences API.
3584         https://bugs.webkit.org/show_bug.cgi?id=79433
3585
3586         Reviewed by Dan Bernstein.
3587
3588         * Shared/WebPreferencesStore.h:
3589         (WebKit):
3590         * UIProcess/API/C/WKPreferences.cpp:
3591         (WKPreferencesSetSuppressesIncrementalRendering):
3592         (WKPreferencesGetSuppressesIncrementalRendering):
3593         * UIProcess/API/C/WKPreferences.h:
3594         * UIProcess/WebInspectorProxy.cpp:
3595         (WebKit::createInspectorPageGroup):
3596         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3597         (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout):
3598         * WebProcess/WebPage/WebPage.cpp:
3599         (WebKit::WebPage::updatePreferences):
3600
3601 2012-02-23  Mario Sanchez Prada  <msanchez@igalia.com>
3602
3603         [GTK] Wrong signal name on emission in WebKitWindowProperties.cpp
3604         https://bugs.webkit.org/show_bug.cgi?id=79352
3605
3606         Reviewed by Philippe Normand.
3607
3608         Emit the signal 'resizable' instead of 'resizable-visible'.
3609
3610         * UIProcess/API/gtk/WebKitWindowProperties.cpp:
3611         (webkitWindowPropertiesSetResizable): Use right signal name.
3612
3613 2012-02-23  Anders Carlsson  <andersca@apple.com>
3614
3615         Flush layer changes after layout when resizing web page
3616         https://bugs.webkit.org/show_bug.cgi?id=79399
3617         <rdar://problem/10920157>
3618
3619         Reviewed by Andreas Kling.
3620
3621         Flush layer changes after layout, otherwise the scrollbars won't be updated
3622         until sometime later which looks bad.
3623
3624         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3625         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
3626
3627 2012-02-23  Daniel Bates  <dbates@webkit.org>
3628
3629         Add missing "Reviewed by" line to change log entry for changeset r108631
3630         (https://bugs.webkit.org/show_bug.cgi?id=79252)
3631
3632         The patch landed in changeset r108631 was reviewed by Martin Robinson.
3633
3634         * ChangeLog:
3635
3636 2012-02-23  Patrick Gansterer  <paroga@webkit.org>
3637
3638         [CMake] Add WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS macro
3639         https://bugs.webkit.org/show_bug.cgi?id=79371
3640
3641         Reviewed by Daniel Bates.
3642
3643         * CMakeLists.txt:
3644
3645 2012-02-23  Simon Hausmann  <simon.hausmann@nokia.com>
3646
3647         [Qt] Add support for touch cancellation
3648         https://bugs.webkit.org/show_bug.cgi?id=79348
3649
3650         Reviewed by Kenneth Rohde Christiansen.
3651
3652         Convert and forward incoming touch cancellation events
3653         to the web process.
3654
3655         * Shared/qt/WebEventFactoryQt.cpp:
3656         (WebKit::webEventTypeForEvent):
3657         (WebKit::WebEventFactory::createWebTouchEvent):
3658         * UIProcess/API/qt/qquickwebview.cpp:
3659         (QQuickWebView::event):
3660         * UIProcess/qt/QtWebPageEventHandler.cpp:
3661         (QtWebPageEventHandler::handleEvent):
3662
3663 2012-02-23  Brent Fulgham  <bfulgham@webkit.org>
3664
3665         [WinCairo] Build fix after r108428.
3666
3667         * win/WebKit2CFLite.def: Add missing export declaration.
3668
3669 2012-02-23  Simon Hausmann  <simon.hausmann@nokia.com>
3670
3671         Unreviewed test fix after r108614: Adjust public API after changes.
3672
3673         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
3674
3675 2012-02-23  Simon Hausmann  <simon.hausmann@nokia.com>
3676
3677         [Qt] Build fix. Qt WebKit2 can not be compiled due to QtWebPageEventHandler.
3678         https://bugs.webkit.org/show_bug.cgi?id=79335
3679
3680         Reviewed by Kenneth Rohde Christiansen.
3681
3682         In the upcoming Qt 5 builds the convenient setInputMethodHints method on QQuickItem
3683         will be removed. There's no need for us to use it, we can implement passing the hints
3684         to the input method right away in our re-implementation of inputMethodQuery, which works
3685         with old and newer Qt 5 builds.
3686
3687         * UIProcess/API/qt/qquickwebview.cpp:
3688         (QQuickWebView::inputMethodQuery):
3689         * UIProcess/qt/QtWebPageEventHandler.cpp:
3690         (QtWebPageEventHandler::updateTextInputState):
3691
3692 2012-02-23  Sergio Villar Senin  <svillar@igalia.com>
3693
3694         [WK2][GTK] WebProcess SIGSEVs due to incorrect clipboard handling
3695         https://bugs.webkit.org/show_bug.cgi?id=79252
3696
3697         Reviewed by Martin Robinson.
3698
3699         Do not execute clipboard callbacks after the Frame associated with
3700         it is destroyed.
3701
3702         This change is already covered by the TestWebViewEditor unit tests
3703         (among others), they hang (because WebProcess dies) without this
3704         patch in Debug builds.
3705
3706         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
3707         (EditorClientFrameDestructionObserver):
3708         (WebKit::EditorClientFrameDestructionObserver::EditorClientFrameDestructionObserver):
3709         (WebKit::EditorClientFrameDestructionObserver::frameDestroyed):
3710         (WebKit::EditorClientFrameDestructionObserver::destroyOnClosureFinalization):
3711         (WebKit):
3712         (WebKit::WebEditorClient::setSelectionPrimaryClipboardIfNeeded):
3713
3714 2012-02-23  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3715
3716         [Qt] Page doesn't get repainted while panning is in progress
3717         https://bugs.webkit.org/show_bug.cgi?id=78602
3718
3719         Reviewed by Simon Hausmann.
3720
3721         The tiling code needed the current visibleContentsRect in order to be
3722         able to create tiles, so we now make sure it gets it. We also needed
3723         to make sure to set the trajectory vector while panning and while the
3724         flicking engine was animating kinetic scrolling.
3725
3726         * UIProcess/API/qt/qquickwebview.cpp:
3727         (QQuickWebViewFlickablePrivate::_q_updateVisibleContentRectAndScale):
3728         (QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged):
3729         * UIProcess/DrawingAreaProxy.h:
3730         (WebKit::DrawingAreaProxy::setVisibleContentRectTrajectoryVector):
3731         * UIProcess/DrawingAreaProxyImpl.cpp:
3732         (WebKit::DrawingAreaProxyImpl::setVisibleContentRectTrajectoryVector):
3733         * UIProcess/DrawingAreaProxyImpl.h:
3734         (DrawingAreaProxyImpl):
3735         * UIProcess/LayerTreeHostProxy.h:
3736         (LayerTreeHostProxy):
3737         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
3738         (WebKit::LayerTreeHostProxy::setVisibleContentRectTrajectoryVector):
3739         * UIProcess/qt/QtViewportInteractionEngine.cpp:
3740         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
3741         (WebKit::QtViewportInteractionEngine::flickableMovingStateChanged):
3742         (WebKit):
3743         (WebKit::QtViewportInteractionEngine::panMoveStarted):
3744         (WebKit::QtViewportInteractionEngine::panMoveEnded):
3745         (WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate):
3746         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
3747         * UIProcess/qt/QtViewportInteractionEngine.h:
3748         (QtViewportInteractionEngine):
3749         * WebProcess/WebPage/LayerTreeHost.h:
3750         (WebKit::LayerTreeHost::setVisibleContentRectTrajectoryVector):
3751         * WebProcess/WebPage/LayerTreeHost.messages.in:
3752         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
3753         (WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
3754         (WebKit::LayerTreeHostQt::setVisibleContentRectTrajectoryVector):
3755         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
3756         (LayerTreeHostQt):
3757
3758 2012-02-23  Patrick Gansterer  <paroga@webkit.org>
3759
3760         [CMAKE][WK2] Cleanup WebKit2/CMakeLists.txt.
3761         https://bugs.webkit.org/show_bug.cgi?id=76122
3762
3763         Reviewed by Eric Seidel.
3764
3765         * CMakeLists.txt: Removed hardcoded WTF_USE_JSC preprocessor definition.
3766
3767 2012-02-23  Simon Hausmann  <simon.hausmann@nokia.com>
3768
3769         [WK2] Trivial build fix after r108615.
3770
3771         * WebProcess/WebPage/WebPage.cpp:
3772         (WebKit::WebPage::WebPage):
3773
3774 2012-02-22  Michael Tyutyunik  <michael.tyutyunik@nokia.com>
3775
3776         [Qt][WK2] navigationType is missing in new API
3777         https://bugs.webkit.org/show_bug.cgi?id=78867
3778
3779         Reviewed by Simon Hausmann.
3780
3781         In QtWebPagePolicyClient::decidePolicyForNavigationAction()
3782         navigationType argument is dropped by mistake. Adding it back
3783         and make it available through NavigationRequest.
3784
3785         * UIProcess/API/qt/qquickwebview_p.h:
3786         * UIProcess/API/qt/qwebnavigationrequest.cpp:
3787         (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
3788         (QWebNavigationRequestPrivate):
3789         (QWebNavigationRequest::QWebNavigationRequest):
3790         (QWebNavigationRequest::navigationType):
3791         * UIProcess/API/qt/qwebnavigationrequest_p.h:
3792         * UIProcess/qt/QtWebPagePolicyClient.cpp:
3793         (QtWebPagePolicyClient::decidePolicyForNavigationAction):
3794         (toQuickWebViewNavigationType):
3795         * UIProcess/qt/QtWebPagePolicyClient.h:
3796         (QtWebPagePolicyClient):
3797
3798 2012-02-22  Anders Carlsson  <andersca@apple.com>
3799
3800         Implement TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange
3801         https://bugs.webkit.org/show_bug.cgi?id=79297
3802         <rdar://problem/10748510>
3803
3804         Reviewed by Beth Dakin.
3805
3806         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
3807         (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
3808         Send a message to the web process.
3809
3810         * WebProcess/WebPage/DrawingArea.h:
3811         (WebKit::DrawingArea::setDeviceScaleFactor):
3812         Add empty stub.
3813
3814         * WebProcess/WebPage/DrawingArea.messages.in:
3815         Add SetDeviceScaleFactor message.
3816
3817         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3818         (WebKit::TiledCoreAnimationDrawingArea::setDeviceScaleFactor):
3819         Call WebPage::setDeviceScaleFactor.
3820
3821 2012-02-22  Brady Eidson  <beidson@apple.com>
3822
3823         <rdar://problem/10406044> and https://bugs.webkit.org/show_bug.cgi?id=79279
3824         Synchronous ShouldGoToBackForwardListItem causes lots of WebProcess hangs
3825
3826         Reviewed by Anders Carlsson.
3827
3828         Anytime the WebProcess sends a sync message up to the UI Process a hang can ensue.
3829         
3830         In the case of shouldGoToBackForwardListItem it seems many clients want a back/forward
3831         notification but don't actually want to make a policy decision.
3832
3833         Making it an asynchronous notification instead of a synchronous policy call will remove the
3834         possibility of a hang here.
3835
3836         If clients later decide it is important to have a policy here we should implement a form of
3837         shouldGoToBackForwardListItem in the bundle loader client.
3838
3839         Add a notification "willGoToBackForwardListItem" to the WKPageLoaderClient:
3840         * UIProcess/API/C/WKPage.h:
3841
3842         * UIProcess/WebPageProxy.cpp:
3843         (WebKit::WebPageProxy::initializeLoaderClient): Tell the WebProcess whether it should be
3844           sending the shouldGoToBackForwardListItem or willGoToBackForwardListItem form of this message.
3845         (WebKit::WebPageProxy::shouldGoToBackForwardListItem): 
3846         (WebKit::WebPageProxy::willGoToBackForwardListItem):
3847         * UIProcess/WebPageProxy.h:
3848         * UIProcess/WebPageProxy.messages.in: Add an asynchronous WillGoToBackForwardListItem message
3849
3850         Store a flag in the WebProcess - Sent from the UIProcess - to tell the FrameLoaderClient which form 
3851         of the callback should be used:
3852         * WebProcess/WebPage/WebPage.cpp:
3853         (WebKit::WebPage::WebPage):
3854         * WebProcess/WebPage/WebPage.h:
3855         (WebKit::WebPage::willGoToBackForwardItemCallbackEnabled):
3856         (WebKit::WebPage::setWillGoToBackForwardItemCallbackEnabled):
3857         * WebProcess/WebPage/WebPage.messages.in:
3858
3859         * UIProcess/WebLoaderClient.cpp:
3860         (WebKit::WebLoaderClient::shouldGoToBackForwardListItem): Only consider calling this for
3861           version 0 clients.
3862         (WebKit::WebLoaderClient::willGoToBackForwardListItem): Later clients get this callback.
3863         * UIProcess/WebLoaderClient.h:
3864         (WebLoaderClient):
3865         
3866         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3867         (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem): Send either the synchronous "should" message
3868           or the asynchronous "will" message depending on which the WebProcess was last told that the
3869           UIProcess expects. There is an edge case where the wrong one might be sent because the WebProcess
3870           hasn't received the message about a change in the WKPageLoaderClient yet but that's probably okay;
3871           It seems unlikely that a UIProcess client would ever rapidly change between v0 and other versions
3872           of the loader client and the UIProcess of WebKit2 is equipped to handle that case if it comes up.
3873
3874 2012-02-16  Jon Lee  <jonlee@apple.com>
3875
3876         [WK2] Clearing notifications does not clean up internal state
3877         https://bugs.webkit.org/show_bug.cgi?id=78861
3878         <rdar://problem/10881167>
3879
3880         Reviewed by Anders Carlsson.
3881
3882         * WebProcess/Notifications/WebNotificationManager.cpp:
3883         (WebKit::WebNotificationManager::clearNotifications): This function was missing removing the notification
3884         entries from the other maps.
3885         (WebKit::WebNotificationManager::didDestroyNotification): When the notification is destroyed, it should
3886         also be removed from the context map.
3887         (WebKit::WebNotificationManager::didCloseNotifications): Refactor to pull out the code that removes
3888         a provided notification from the context map.
3889         (WebKit::WebNotificationManager::removeNotificationFromContextMap): Find the notification in the map, and
3890         remove it. If the map is empty, get rid of the entry.
3891         * WebProcess/Notifications/WebNotificationManager.h:
3892         (WebNotificationManager):
3893
3894 2012-02-22  Jon Lee  <jonlee@apple.com>
3895
3896         Code cleanup in WebNotificationManager (79285)
3897         https://bugs.webkit.org/show_bug.cgi?id=79285
3898         <rdar://problem/10914522>
3899
3900         Reviewed by Anders Carlsson.
3901
3902         * WebProcess/Notifications/WebNotificationManager.cpp:
3903         (WebKit::WebNotificationManager::show): Simplify adding a blank vector to the map using .add(),
3904         similar to what is found in WebNotificationClient.mm in WebKit 1.
3905
3906 2012-02-21  Ryosuke Niwa  <rniwa@webkit.org>
3907
3908         Remove the remaining uses of CSSStyleDeclaration in Editor
3909         https://bugs.webkit.org/show_bug.cgi?id=78939
3910
3911         Reviewed by Enrica Casucci.
3912
3913         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3914         (WebKit::WebEditorClient::shouldApplyStyle):
3915         * WebProcess/WebCoreSupport/WebEditorClient.h:
3916         (WebEditorClient):
3917
3918 2012-02-22  Martin Robinson  <mrobinson@igalia.com>
3919
3920         [GTK] Clean build is broken when using make -j
3921         https://bugs.webkit.org/show_bug.cgi?id=76388
3922
3923         * GNUmakefile.am: Add some WebKit2 sources to global sources lists
3924         so that we can refer to them in separate GNUmakefiles.
3925
3926 2012-02-22  Antaryami Pandia  <antaryami.pandia@motorola.com>
3927
3928         [GTK][WK2] Add WebGL WebSetting.
3929         https://bugs.webkit.org/show_bug.cgi?id=79217
3930
3931         Reviewed by Martin Robinson.
3932
3933         Add a WebSetting to enable/disable Webgl.
3934
3935         * UIProcess/API/gtk/WebKitSettings.cpp:
3936         (webKitSettingsSetProperty):
3937         (webKitSettingsGetProperty):
3938         (webkit_settings_class_init):
3939         (webkit_settings_set_enable_webaudio):
3940         (webkit_settings_get_enable_webgl):
3941         (webkit_settings_set_enable_webgl):
3942         * UIProcess/API/gtk/WebKitSettings.h:
3943         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
3944         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
3945         (testWebKitSettings):
3946
3947 2012-02-22  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3948
3949         [Qt] Disregard previous backing store as soon as possible
3950         https://bugs.webkit.org/show_bug.cgi?id=79232
3951
3952         Reviewed by Simon Hausmann and No'am Rosenthal.
3953
3954         Between creating the new backing store and painting the content,
3955         we do not want to drop the previous one as that might result in
3956         briefly seeing flickering as the old tiles may be dropped before
3957         something replaces them.
3958
3959         But we do need to drop it at some point and we need to make sure
3960         to not spike the memory usage before of this.
3961
3962         What we now do, is to store the previous backing store as before,
3963         but drop all tiles which are not visible and then drop it as soon
3964         as the visible rect (which might change due if followed by a quick
3965         panning) has been fully covered by tiles.
3966
3967         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3968         (WebCore::WebGraphicsLayer::setContentsScale):
3969         (WebCore::WebGraphicsLayer::updateContentBuffers):
3970
3971 2012-02-22  Michael Brüning  <michael.bruning@nokia.com>
3972
3973         [Qt][WK2] Implement proxy authentication handling.
3974         https://bugs.webkit.org/show_bug.cgi?id=78792
3975
3976         Reviewed by Simon Hausmann.
3977
3978         This patch corrects two bugs with the previous implementation:
3979         1. The signal proxyAuthenticationRequired was not connected to a
3980            slot.
3981         2. The slot onProxyAuthenticationRequired had the wrong parameters. 
3982
3983         * WebProcess/qt/QtNetworkAccessManager.cpp:
3984         (WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
3985         (WebKit::QtNetworkAccessManager::onProxyAuthenticationRequired):
3986         * WebProcess/qt/QtNetworkAccessManager.h: Added include.
3987         (QtNetworkAccessManager):
3988
3989 2012-02-22  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3990
3991         Merge setVisibleRectTrajectoryVector and adjustVisibleRect to
3992         the more descriptive coverWithTilesIfNeeded
3993         https://bugs.webkit.org/show_bug.cgi?id=79230
3994
3995         Reviewed by Simon Hausmann.
3996
3997         Replace use by coverWithTilesIfNeeded().
3998
3999         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
4000         (WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector):
4001         (WebCore::WebGraphicsLayer::adjustVisibleRect):
4002         (WebCore::WebGraphicsLayer::computeTransformedVisibleRect):
4003
4004 2012-02-22  Zalan Bujtas  <zbujtas@gmail.com>
4005
4006         [Qt][WK2] Add frame flattening setting to QWebPreferences.
4007         https://bugs.webkit.org/show_bug.cgi?id=79099
4008
4009         Reviewed by Simon Hausmann.
4010
4011         Frame flattening is enabled by default for Qt WebKit2.
4012
4013         * UIProcess/API/qt/qquickwebview.cpp:
4014         (QQuickWebViewPrivate::initialize):
4015         * UIProcess/API/qt/qwebpreferences.cpp:
4016         (QWebPreferencesPrivate::testAttribute):
4017         (QWebPreferencesPrivate::setAttribute):
4018         (QWebPreferences::setNavigatorQtObjectEnabled):
4019         (QWebPreferences::frameFlatteningEnabled):
4020         (QWebPreferences::setFrameFlatteningEnabled):
4021         * UIProcess/API/qt/qwebpreferences_p.h:
4022
4023 2012-02-22  Ryosuke Niwa  <rniwa@webkit.org>
4024
4025         Remove the remaining uses of CSSStyleDeclaration in Editor
4026         https://bugs.webkit.org/show_bug.cgi?id=78939
4027
4028         Reviewed by Enrica Casucci.
4029
4030         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
4031         (WebKit::WebEditorClient::shouldApplyStyle):
4032         * WebProcess/WebCoreSupport/WebEditorClient.h:
4033         (WebEditorClient):
4034
4035 2012-02-21  Carlos Garcia Campos  <cgarcia@igalia.com>
4036
4037         [GTK] Null ResourceErrors are encoded/decoded as empty ResourceErrors
4038         https://bugs.webkit.org/show_bug.cgi?id=79120
4039
4040         Reviewed by Martin Robinson.
4041
4042         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
4043         (CoreIPC::::encode): Encode a boolean to indicate whether it's a
4044         Null error.
4045         (CoreIPC::::decode): Check whether the error is Null and do not
4046         continue decoding in such case.
4047
4048 2012-02-21  No'am Rosenthal  <noam.rosenthal@nokia.com>
4049
4050         [Qt][WK2] Draw tiles of previous contents-scale for opaque layers if they don't intersect with previous tiles
4051         https://bugs.webkit.org/show_bug.cgi?id=78962
4052
4053         Only avoid painting old-scale tiles in semi-transparent situtations if the old
4054         tiles intersect with existing tiles.
4055
4056         Reviewed by Kenneth Rohde Christiansen.
4057
4058         * UIProcess/qt/LayerBackingStore.cpp:
4059         (WebKit::LayerBackingStore::paintToTextureMapper):
4060
4061 2012-02-21  No'am Rosenthal  <noam.rosenthal@nokia.com>
4062
4063         [Qt] Previous web page appears outside content rect
4064         https://bugs.webkit.org/show_bug.cgi?id=78816
4065
4066         Apply a clip on painted tiles if some of the tiles fall outside of the target rect.
4067
4068         Reviewed by Kenneth Rohde Christiansen.
4069
4070         * UIProcess/qt/LayerBackingStore.cpp:
4071         (WebKit::LayerBackingStore::paintToTextureMapper):
4072
4073 2012-02-21  No'am Rosenthal  <noam.rosenthal@nokia.com>
4074
4075         [Qt][WK2] Accelerated animations don't work on Mac
4076         https://bugs.webkit.org/show_bug.cgi?id=78963
4077
4078         Problem came from using a non-RunLoop timer.
4079         Remove the unused viewportUpdateTimer, and use the existing animationTimer instead.
4080         Use a continuous timer that we only stop when animations stop.
4081
4082         Reviewed by Kenneth Rohde Christiansen.
4083
4084         * UIProcess/LayerTreeHostProxy.h:
4085         (LayerTreeHostProxy):
4086         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
4087         (WebKit::LayerTreeHostProxy::LayerTreeHostProxy):
4088         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
4089         (WebKit):
4090         (WebKit::LayerTreeHostProxy::syncAnimations):
4091
4092 2012-02-21  Sam Weinig  <sam@webkit.org>
4093
4094         Attempt to fix the Snow Leopard build.
4095
4096         * Configurations/Base.xcconfig:
4097
4098 2012-02-21  Sam Weinig  <sam@webkit.org>
4099
4100         Use libc++ when building with Clang on Mac
4101         https://bugs.webkit.org/show_bug.cgi?id=78981
4102
4103         Reviewed by Dan Bernstein.
4104
4105         * Configurations/Base.xcconfig:
4106