[Qt] Resolve import and web-process paths automatically for QML tests
[WebKit.git] / Source / WebKit2 / ChangeLog
1 2011-11-17  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2
3         [Qt] Resolve import and web-process paths automatically for QML tests
4
5         Reviewed by Kenneth Rohde Christiansen.
6
7         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
8         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
9         (main):
10
11 2011-11-17  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
12
13         [Qt] Move WebKit2 C++ APIs to private API and build QML extension plugin on top of that
14
15         A new extension object has been added to QQuickWebView (the same approach should be used
16         for other API classes that need experimental APIs). The QML extension mechanism is then
17         built on top of the experimental object.
18
19         https://bugs.webkit.org/show_bug.cgi?id=72522
20
21         Reviewed by Simon Hausmann.
22
23         * Target.pri:
24         * UIProcess/API/qt/qquickwebpage.cpp:
25         * UIProcess/API/qt/qquickwebpage.h: Removed.
26         * UIProcess/API/qt/qquickwebpage_p.h:
27         * UIProcess/API/qt/qquickwebpage_p_p.h: Renamed from Source/WebKit2/UIProcess/API/qt/qquickwebviewprivateextension_p.h.
28         * UIProcess/API/qt/qquickwebview.cpp:
29         (QQuickWebViewExperimental::QQuickWebViewExperimental):
30         (QQuickWebViewExperimental::~QQuickWebViewExperimental):
31         (QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour):
32         (QQuickWebView::QQuickWebView):
33         (QQuickWebView::experimental):
34         * UIProcess/API/qt/qquickwebview.h: Removed.
35         * UIProcess/API/qt/qquickwebview_p.h:
36         * UIProcess/API/qt/qquickwebview_p_p.h: Copied from Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h.
37         * UIProcess/API/qt/qquickwebviewprivateextension.cpp: Removed.
38         * UIProcess/API/qt/qwebdownloaditem.cpp:
39         * UIProcess/API/qt/qwebdownloaditem.h: Removed.
40         * UIProcess/API/qt/qwebdownloaditem_p.h:
41         * UIProcess/API/qt/qwebdownloaditem_p_p.h: Copied from Source/WebKit2/UIProcess/API/qt/qwebdownloaditem_p.h.
42         (QWebDownloadItemPrivate::didReceiveResponse):
43         * UIProcess/API/qt/qwebpreferences.cpp:
44         * UIProcess/API/qt/qwebpreferences.h: Removed.
45         * UIProcess/API/qt/qwebpreferences_p.h:
46         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
47         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
48         (DesktopWebView::DesktopWebView):
49         * UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro:
50         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
51         * UIProcess/qt/QtDownloadManager.cpp:
52         * UIProcess/qt/QtViewInterface.cpp:
53         * UIProcess/qt/QtWebError.h:
54         * UIProcess/qt/QtWebPageProxy.cpp:
55
56 2011-11-17  Kenneth Rohde Christiansen  <kenneth@webkit.org>
57
58         Unreviewed build fix.
59
60         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
61         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
62
63 2011-11-16  Kenneth Rohde Christiansen  <kenneth@webkit.org>
64
65         Make use-fixed-layout work reliable
66         https://bugs.webkit.org/show_bug.cgi?id=72511
67
68         Reviewed by Simon Hausmann.
69
70         The code handling use-fixed-layout wasn't 100% reliable. The code
71         was changed to make sure the value is always correct.
72
73         It also doesn't set the value by looking at the previous FrameView,
74         as that wouldn't work in cases, such as when the web process has
75         crashed.
76
77         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
78         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
79         * WebProcess/WebPage/WebPage.cpp:
80         (WebKit::WebPage::WebPage):
81         (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
82         (WebKit::WebPage::setUseFixedLayout):
83         * WebProcess/WebPage/WebPage.h:
84         (WebKit::WebPage::useFixedLayout):
85
86             Store the state as m_useFixedLayout so that it can be used
87             from the WebFrameLoaderClient.
88
89 2011-11-17  Zalan Bujtas  <zbujtas@gmail.com>
90
91         [Qt][WK2] Do not apply new viewport properties until after the first visually non-empty layout.
92         https://bugs.webkit.org/show_bug.cgi?id=72508
93
94         Delay applying viewport properties on the viewport item until after the first visually non-empty
95         layout finished. It enables the viewport to be intact until the new page is ready to be rendered.
96
97         Reviewed by Kenneth Rohde Christiansen.
98
99         * UIProcess/API/qt/qquickwebview.cpp:
100         (QQuickWebViewPrivate::QQuickWebViewPrivate):
101         (QQuickWebViewPrivate::loadDidCommit):
102         (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
103         (QQuickWebViewPrivate::didChangeContentsSize):
104         (QQuickWebViewPrivate::didChangeViewportProperties):
105         (QQuickWebViewPrivate::updateViewportSize):
106         (QQuickWebViewPrivate::computeViewportConstraints):
107         * UIProcess/API/qt/qquickwebview_p.h:
108         (PostTransitionState::isTransitioningToNewPage):
109         * UIProcess/qt/ClientImpl.cpp:
110         (qt_wk_didFirstVisuallyNonEmptyLayoutForFrame):
111         (setupPageLoaderClient):
112         * UIProcess/qt/QtViewInterface.cpp:
113         (WebKit::QtViewInterface::didFinishFirstNonEmptyLayout):
114         (WebKit::QtViewInterface::didChangeContentsSize):
115         (WebKit::QtViewInterface::didChangeViewportProperties):
116         (WebKit::QtViewInterface::startDrag):
117         * UIProcess/qt/QtViewInterface.h:
118         * UIProcess/qt/QtViewportInteractionEngine.cpp:
119         (WebKit::QtViewportInteractionEngine::reset):
120         (WebKit::QtViewportInteractionEngine::applyConstraints):
121         * UIProcess/qt/QtViewportInteractionEngine.h:
122         * UIProcess/qt/QtWebPageProxy.cpp:
123         (QtWebPageProxy::didFinishFirstNonEmptyLayout):
124         (QtWebPageProxy::didChangeContentsSize):
125         (QtWebPageProxy::didChangeViewportProperties):
126         (QtWebPageProxy::startDrag):
127         * UIProcess/qt/QtWebPageProxy.h:
128
129 2011-11-17  Eunmi Lee  <eunmi15.lee@samsung.com>
130
131         Reviewed by Martin Robinson.
132
133         [WK2] Move gtk/BackingStoreGtk.cpp to cairo/BackingStoreCairo.cpp to share with EFL port.
134         https://bugs.webkit.org/show_bug.cgi?id=62444
135
136         Rename gtk/BackingStoreGtk.cpp to cairo/BackingStoreCairo.cpp to share with EFL port.
137         The gtk/BackingStoreGtk.cpp only has cairo dependency, so it can be shared with other port
138         that uses cairo.
139
140         * GNUmakefile.am:
141         * UIProcess/BackingStore.h:
142         * UIProcess/cairo/BackingStoreCairo.cpp: Renamed from Source/WebKit2/UIProcess/gtk/BackingStoreGtk.cpp.
143         (WebKit::BackingStore::paint):
144         (WebKit::BackingStore::incorporateUpdate):
145         (WebKit::BackingStore::scroll):
146
147 2011-11-17  Nayan Kumar K  <nayankk@motorola.com>
148
149         [WebKit2][gtk] Add few more properties to WebKitSettings
150         https://bugs.webkit.org/show_bug.cgi?id=72468
151
152         Reviewed by Martin Robinson.
153
154         Add 'enable-private-browsing', 'enable-developer-extras, 'enable-resizable-text-areas'
155         and 'enable-tabs-to-links' properties to WebKitSettings.
156
157         * UIProcess/API/gtk/WebKitSettings.cpp:
158         (webKitSettingsSetProperty): Add new set functions.
159         (webKitSettingsGetProperty): Add new get functions.
160         (webkit_settings_class_init): Add new properties.
161         (webkit_settings_get_enable_private_browsing): Get 'enable-private-browsing' property.
162         (webkit_settings_set_enable_private_browsing): Set 'enable-private-browsing' property.
163         (webkit_settings_get_enable_developer_extras): Get 'enable-developer-extras' property.
164         (webkit_settings_set_enable_developer_extras): Set 'enable-developer-extras' property.
165         (webkit_settings_get_enable_resizable_text_areas): Get 'enable-resizable-text-areas' property.
166         (webkit_settings_set_enable_resizable_text_areas): Set 'enable-resizable-text-areas' property.
167         (webkit_settings_get_enable_tabs_to_links): Get 'enable-tabs-to-links' property.
168         (webkit_settings_set_enable_tabs_to_links): Set 'enable-tabs-to-links' property.
169         * UIProcess/API/gtk/WebKitSettings.h: New public APIs added.
170         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: New APIs added.
171         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
172         (testWebKitSettings): Add new tests.
173
174 2011-11-17  Carlos Garcia Campos  <cgarcia@igalia.com>
175
176         Unreviewed. Fix WebKit2 GTK+ build after r100569.
177
178         * WebProcess/Downloads/soup/DownloadSoup.cpp:
179         (WebKit::DownloadClient::didReceiveResponse):
180
181 2011-11-17  Nayan Kumar K  <nayankk@motorola.com>
182
183         [WebKit2][gtk] Fix assert while running TestWebKitSettings
184         https://bugs.webkit.org/show_bug.cgi?id=72469
185
186         Reviewed by Martin Robinson.
187
188         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
189         (testWebKitSettings): Correct the test.
190
191 2011-11-16  Carlos Garcia Campos  <cgarcia@igalia.com>
192
193         [GTK] Use a URI instead of local path to create download destination in WebKit2
194         https://bugs.webkit.org/show_bug.cgi?id=72500
195
196         Reviewed by Philippe Normand.
197
198         * WebProcess/Downloads/soup/DownloadSoup.cpp:
199         (WebKit::DownloadClient::didReceiveResponse): Use
200         g_file_new_for_uri() instad of g_file_new_for_path(). Also use
201         adoptGRef to fix a memory leak.
202
203 2011-11-16  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
204
205         [Qt] Fix build after WTR AX support
206         https://bugs.webkit.org/show_bug.cgi?id=72560
207
208         Reviewed by Geoffrey Garen.
209
210         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
211         (WKAccessibilityRootObject):
212         (WKAccessibilityFocusedObject):
213
214 2011-11-11  Adrienne Walker  <enne@google.com>
215
216         [chromium] Expose mock scrollbars to window.internals
217         https://bugs.webkit.org/show_bug.cgi?id=72195
218
219         Reviewed by James Robinson.
220
221         * win/WebKit2.def:
222         * win/WebKit2CFLite.def:
223
224 2011-11-16  Dan Bernstein  <mitz@apple.com>
225
226         WebKit2 part of <rdar://problem/10262242> Add API for paginated display
227         https://bugs.webkit.org/show_bug.cgi?id=72537
228
229         Reviewed by Anders Carlsson.
230
231         * Shared/WebPageCreationParameters.cpp:
232         (WebKit::WebPageCreationParameters::encode): Encode the pagination mode and gap between pages.
233         (WebKit::WebPageCreationParameters::decode): Decode the pagination mode and gap between pages.
234         * Shared/WebPageCreationParameters.h: Added paginationMode and gapBetweenPages members.
235         * UIProcess/API/C/WKPage.cpp:
236         (WKPageSetPaginationMode): Added this API wrapper.
237         (WKPageGetPaginationMode): Ditto.
238         (WKPageSetGapBetweenPages): Ditto.
239         (WKPageGetGapBetweenPages): Ditto.
240         (WKPageGetPageCount): Ditto.
241         * UIProcess/API/C/WKPagePrivate.h: Added an enum and a definition of WKPaginationMode and
242         accessors.
243         * UIProcess/API/mac/WKBrowsingContextController.mm:
244         (-[WKBrowsingContextController setPaginationMode:]): Added this API wrapper.
245         (-[WKBrowsingContextController paginationMode]): Ditto.
246         (-[WKBrowsingContextController setGapBetweenPages:]): Ditto.
247         (-[WKBrowsingContextController gapBetweenPages]): Ditto.
248         (-[WKBrowsingContextController pageCount]): Ditto.
249         * UIProcess/API/mac/WKBrowsingContextControllerPrivate.h: Added. Includes an enum and a definition
250         of WKBrowsingContextPaginationMode and property declarations.
251         * UIProcess/WebPageProxy.cpp:
252         (WebKit::WebPageProxy::WebPageProxy): Added intialization of m_paginationMode, m_gapBetweenPages,
253         and m_pageCount.
254         (WebKit::WebPageProxy::setPaginationMode): Added this accessor, which caches the value and sends
255         a message to the WebPage.
256         (WebKit::WebPageProxy::setGapBetweenPages): Ditto.
257         (WebKit::WebPageProxy::creationParameters): Set the pagination mode and gap between pages in the
258         creation parameters.
259         (WebKit::WebPageProxy::didChangePageCount): Added. Updates the cached page count.
260         * UIProcess/WebPageProxy.h:
261         (WebKit::WebPageProxy::paginationMode): Added this getter that returns a cached value.
262         (WebKit::WebPageProxy::gapBetweenPages): Ditto.
263         (WebKit::WebPageProxy::pageCount): Ditto.
264         * UIProcess/WebPageProxy.messages.in: Added DidChangedPageCount, sent when the page count changes
265         after layout.
266         * WebKit2.xcodeproj/project.pbxproj: Added WKBrowsingContextControllerPrivate.h.
267         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 
268         (WebKit::WebFrameLoaderClient::dispatchDidLayout): Added a call to WebPage::mainFrameDidLayout(),
269         allowing the page to respond to changes in the column count.
270         * WebProcess/WebPage/WebPage.cpp:
271         (WebKit::WebPage::WebPage): Added initializer for m_cachedPageCount.
272         (WebKit::WebPage::setPaginationMode): Added.
273         (WebKit::WebPage::setGapBetweenPages): Added.
274         (WebKit::WebPage::mainFrameDidLayout): Added. Sends a DidChangePageCount message to the UI process
275         if the page count has changed.
276         * WebProcess/WebPage/WebPage.h:
277         * WebProcess/WebPage/WebPage.messages.in: Added SetPaginationMode and SetGapBetweenPages messages.
278
279 2011-11-16  Chris Fleizach  <cfleizach@apple.com>
280
281         WebKitTestRunner needs to support accessibility-related DRT APIs
282         https://bugs.webkit.org/show_bug.cgi?id=42131
283
284         Allow the injected bundle to retrieve the focused and root accessibility
285         objects.
286
287         Reviewed by Beth Dakin.
288
289         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
290         (WKAccessibilityRootObject):
291         (WKAccessibilityFocusedObject):
292         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
293
294 2011-11-16  Beth Dakin  <bdakin@apple.com>
295
296         https://bugs.webkit.org/show_bug.cgi?id=72400
297         Scrollbar uiStateTransitionProgress requires tracking the mouse all the time
298         -and corresponding-
299         <rdar://problem/10409328>
300
301         Reviewed by Darin Adler.
302
303         Set up our initial tracking area based on the currently recommended scrollbar 
304         style. Track the mouse all the time if the style is legacy.
305         * UIProcess/API/mac/WKView.mm:
306         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
307
308         Now that we might be getting mouseMoved events all the time even when the window 
309         is not key, make sure we opt into the new 'onlyUpdateScrollbars' mode for 
310         EventHandler::mouseMoved() when the window is not focused.
311         * WebProcess/WebPage/WebPage.cpp:
312         (WebKit::handleMouseEvent):
313         (WebKit::WebPage::mouseEvent):
314         (WebKit::WebPage::mouseEventSyncForTesting):
315
316 2011-11-16  Martin Robinson  <mrobinson@igalia.com>
317
318         [GTK][WEBKIT2] Link error running gtkdoc-scangobj
319         https://bugs.webkit.org/show_bug.cgi?id=72365
320
321         Reviewed by Xan Lopez.
322
323         * webkit2gtk.pc.in: Add a libjavascriptcore requirement to the WebKit2 pkgconfig
324         file so that the compiler links to it.
325
326 2011-11-16  Balazs Kelemen  <kbalazs@webkit.org>
327
328         [WK2][X11] Don't leak the colormap we created for the plugin
329         https://bugs.webkit.org/show_bug.cgi?id=72144
330
331         Reviewed by Xan Lopez.
332
333         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
334         (WebKit::NetscapePlugin::platformDestroy):
335
336 2011-11-16  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
337
338         [Qt] [WK2] Crash in Connection::readyReadHandler() on socket error
339         https://bugs.webkit.org/show_bug.cgi?id=72392
340
341         Reviewed by Simon Hausmann.
342
343         Add QWeakPointer to SocketNotifierResourceGuard::m_socketNotifier to track
344         deallocation of referenced object.
345
346         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
347         (CoreIPC::SocketNotifierResourceGuard::SocketNotifierResourceGuard):
348         (CoreIPC::SocketNotifierResourceGuard::~SocketNotifierResourceGuard):
349
350 2011-11-16  Zeno Albisser  <zeno@webkit.org>
351
352         [Qt][WK2][Mac] MiniBrowser cannot create socketpair.
353         https://bugs.webkit.org/show_bug.cgi?id=72389
354
355         Use SOCK_DGRAM on mac instead of SOCK_SEQPACKET.
356
357         Reviewed by Tor Arne Vestbø.
358
359         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
360
361 2011-11-15  Carlos Garcia Campos  <cgarcia@igalia.com>
362
363         [GTK] Add webkit_web_view_load_request() to WebKit2 GTK+ API
364         https://bugs.webkit.org/show_bug.cgi?id=72380
365
366         Reviewed by Martin Robinson.
367
368         It adds an initial implementation of WebKitNetworkRequest
369         class that only contains a URI for now.
370
371         * GNUmakefile.am:
372         * UIProcess/API/gtk/WebKitNetworkRequest.cpp: Added.
373         (webkitNetworkRequestFinalize):
374         (webkitNetworkRequestGetProperty):
375         (webkitNetworkRequestSetProperty):
376         (webkit_network_request_class_init):
377         (webkit_network_request_init):
378         (webkit_network_request_new):
379         (webkit_network_request_get_uri):
380         * UIProcess/API/gtk/WebKitNetworkRequest.h: Added.
381         * UIProcess/API/gtk/WebKitWebView.cpp:
382         (webkit_web_view_load_request): Use WKPageLoadURLRequest() to load
383         the given WebKitNetworkRequest.
384         * UIProcess/API/gtk/WebKitWebView.h:
385         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
386         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
387         (testLoadRequest):
388         (beforeAll):
389         * UIProcess/API/gtk/tests/WebViewTest.cpp:
390         (WebViewTest::loadRequest):
391         * UIProcess/API/gtk/tests/WebViewTest.h:
392         * UIProcess/API/gtk/webkit2.h:
393
394 2011-11-15  Andy Estes  <aestes@apple.com>
395
396         Consolidate the logic that creates run loop observers for flushing layer tree changes to CoreAnimation
397         https://bugs.webkit.org/show_bug.cgi?id=72106
398
399         Reviewed by Anders Carlsson.
400
401         Remove code that schedules layer flushes and use LayerFlushScheduler instead.
402
403         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h: Replace
404         m_flushPendingLayerChangesRunLoopObserver with m_layerFlushScheduler
405         and implement the LayerFlushSchedulerClient interface.
406         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
407         (WebKit::LayerTreeHostCAMac::LayerTreeHostCAMac): Instantiate
408         m_layerFlushScheduler with the LayerTreeHost as the client.
409         (WebKit::LayerTreeHostCAMac::~LayerTreeHostCAMac):
410         (WebKit::LayerTreeHostCAMac::scheduleLayerFlush): Call LayerFlushScheduler::schedule().
411         (WebKit::LayerTreeHostCAMac::setLayerFlushSchedulingEnabled): Call
412         LayerFlushScheduler::suspend() or LayerFlushScheduler::resume().
413         (WebKit::LayerTreeHostCAMac::invalidate): Call LayerFlushScheduler::invalidate().
414         (WebKit::LayerTreeHostCAMac::flushLayers): Do the work that
415         flushPendingLayerChangesRunLoopObserverCallback() used to do.
416         (WebKit::LayerTreeHostCAMac::didPerformScheduledLayerFlush): Call LayerFlushScheduler::invalidate().
417
418 2011-11-15  Sam Weinig  <sam@webkit.org>
419
420         Add a connection client to the WKContext, to notify when new connections to the WebProcess are established
421         https://bugs.webkit.org/show_bug.cgi?id=72433
422
423         Reviewed by Anders Carlsson.
424
425         * UIProcess/API/C/WKContext.cpp:
426         (WKContextSetConnectionClient):
427         * UIProcess/API/C/WKContext.h:
428         * UIProcess/WebContext.cpp:
429         (WebKit::WebContext::initializeConnectionClient):
430         * UIProcess/WebContext.h:
431         Add connection client API.
432
433         * UIProcess/WebContextConnectionClient.cpp: Added.
434         (WebKit::WebContextConnectionClient::didCreateConnection):
435         * UIProcess/WebContextConnectionClient.h: Added.
436         Add basic implementation of the client. It is currently never triggered.
437
438 2011-11-15  Jongseok Yang  <js45.yang@samsung.com>
439
440         [SOUP][WK2] Add initial WebCookieManagerSoup.cpp for webkit2
441         https://bugs.webkit.org/show_bug.cgi?id=72235
442
443         Reviewed by Gustavo Noronha Silva.
444
445         Add WebCookieManagerSoup.cpp and implement functions for the cookie accept policy.
446         It's required when using the soup network backend.
447         Remove WebCookieManagerEfl.cpp and WebCookieManagerGtk.cpp because GTK port and
448         EFL port use soup network backend without a network backend of their own.
449
450         * GNUmakefile.am:
451         * WebProcess/Cookies/efl/WebCookieManagerEfl.cpp: Removed.
452         * WebProcess/Cookies/gtk/WebCookieManagerGtk.cpp: Removed.
453         * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp: Added.
454         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
455         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
456
457 2011-11-15  Jochen Eisinger  <jochen@chromium.org>
458
459         Rename ReferrerPolicy to clarify its meaning
460         https://bugs.webkit.org/show_bug.cgi?id=72420
461
462         Reviewed by Nate Chapin.
463
464         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
465         (WebKit::WebContextMenuClient::searchWithGoogle):
466         * WebProcess/WebPage/WebPage.cpp:
467         (WebKit::WebPage::linkClicked):
468
469 2011-11-15  Sam Weinig  <sam@webkit.org>
470
471         Fix windows build.
472
473         * win/WebKit2Generated.make:
474
475 2011-11-15  Sam Weinig  <sam@webkit.org>
476
477         Add WebKit2 API object to represent a connection
478         https://bugs.webkit.org/show_bug.cgi?id=72421
479
480         Reviewed by Anders Carlsson.
481
482         * GNUmakefile.am:
483         * Target.pri:
484         * WebKit2.xcodeproj/project.pbxproj:
485         * win/WebKit2.vcproj:
486         Add new files.
487
488         * Shared/API/c/WKBase.h:
489         Add type.
490
491         * Shared/API/c/WKConnectionRef.cpp: Added.
492         (WKConnectionGetTypeID):
493         (WKConnectionSetConnectionClient):
494         (WKConnectionPostMessage):
495         * Shared/API/c/WKConnectionRef.h: Added.
496         Expose interface. Currently no support for synchronous messages.
497
498         * Shared/API/c/WKSharedAPICast.h:
499         Define relationship between WebConnection <-> WKConnectionRef.
500
501         * Shared/APIObject.h:
502         Add API type.
503
504         * Shared/WebConnection.cpp: Added.
505         (WebKit::WebConnection::~WebConnection):
506         (WebKit::WebConnection::initializeConnectionClient):
507         * Shared/WebConnection.h: Added.
508         (WebKit::WebConnection::type):
509         Sketch out the connection object. It is currently abstract
510         to allow different implementations for the UI and WebProcess sides
511         while retaining the same interface.
512
513         * Shared/WebConnectionClient.cpp: Added.
514         (WebKit::WebConnectionClient::didReceiveMessage):
515         (WebKit::WebConnectionClient::didClose):
516         * Shared/WebConnectionClient.h: Added.
517         Add simple client.
518
519         * UIProcess/API/C/WebKit2.h:
520         Add new file.
521
522 2011-11-15  Chris Fleizach2  <cfleizach@apple.com>
523
524         AX: WKAccessibilityWebObjectPage should not call super in accessibilityAttributeValue:
525         https://bugs.webkit.org/show_bug.cgi?id=72344
526
527         Reviewed by Beth Dakin.
528
529         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
530         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
531
532 2011-11-15  Anders Carlsson  <andersca@apple.com>
533
534         HostWindow screenToWindow/windowToScreen should be screenToRootView/rootViewToScreen
535         https://bugs.webkit.org/show_bug.cgi?id=72397
536
537         Reviewed by Dan Bernstein.
538
539         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
540         (WebKit::WebChromeClient::screenToRootView):
541         (WebKit::WebChromeClient::rootViewToScreen):
542         * WebProcess/WebCoreSupport/WebChromeClient.h:
543
544 2011-11-14  Anders Carlsson  <andersca@apple.com>
545
546         HostWindow invalidation functions should use root view coordinates
547         https://bugs.webkit.org/show_bug.cgi?id=72338
548
549         Reviewed by Dan Bernstein.
550
551         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
552         (WebKit::WebChromeClient::invalidateRootView):
553         (WebKit::WebChromeClient::invalidateContentsAndRootView):
554         * WebProcess/WebCoreSupport/WebChromeClient.h:
555
556 2011-11-15  Carlos Garcia Campos  <cgarcia@igalia.com>
557
558         [GTK] Implement download support in WebKit2
559         https://bugs.webkit.org/show_bug.cgi?id=72258
560
561         Reviewed by Martin Robinson.
562
563         * WebProcess/Downloads/Download.h:
564         * WebProcess/Downloads/soup/DownloadSoup.cpp:
565         (WebKit::DownloadClient::DownloadClient):
566         (WebKit::DownloadClient::downloadFailed):
567         (WebKit::DownloadClient::didReceiveResponse):
568         (WebKit::DownloadClient::didReceiveData):
569         (WebKit::DownloadClient::didFinishLoading):
570         (WebKit::DownloadClient::didFail):
571         (WebKit::DownloadClient::wasBlocked):
572         (WebKit::DownloadClient::cannotShowURL):
573         (WebKit::Download::start):
574         (WebKit::Download::startWithHandle):
575         (WebKit::Download::cancel):
576         (WebKit::Download::platformInvalidate):
577
578 2011-11-15  Mario Sanchez Prada  <msanchez@igalia.com>
579
580         [GTK][WEBKIT2] Add enable-caret-browsing property to WebKitSettings
581         https://bugs.webkit.org/show_bug.cgi?id=72267
582
583         Reviewed by Martin Robinson.
584
585         Allow getting and setting the 'enable-caret-browsing' property
586         through WebKitSettings.
587
588         * UIProcess/API/gtk/WebKitSettings.cpp:
589         (webKitSettingsSetProperty): Added property setter.
590         (webKitSettingsGetProperty): Added propery getter.
591         (webkit_settings_class_init): Install property.
592         (webkit_settings_get_enable_caret_browsing): Added.
593         (webkit_settings_set_enable_caret_browsing): Added.
594         * UIProcess/API/gtk/WebKitSettings.h: Expose new public APIs.
595         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new sections for gtk-doc generation.
596         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
597         (testWebKitSettings): Added new API test.
598
599 2011-11-14  Julien Chaffraix  <jchaffraix@webkit.org>
600
601         Add --css-grid-layout to build-webkit and the build systems
602         https://bugs.webkit.org/show_bug.cgi?id=72320
603
604         Reviewed by Ojan Vafai.
605
606         * Configurations/FeatureDefines.xcconfig:
607
608 2011-11-14  Tony Chang  <tony@chromium.org>
609
610         Remove the CSS3_FLEXBOX compile time flag and enable on all ports
611         https://bugs.webkit.org/show_bug.cgi?id=72196
612
613         Reviewed by Ojan Vafai.
614
615         * Configurations/FeatureDefines.xcconfig:
616
617 2011-11-14  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
618
619         Intermittent asserts in TextureMapperGL::bindSurface on MiniBrowser startup
620         https://bugs.webkit.org/show_bug.cgi?id=72299
621
622         Reviewed by Noam Rosenthal.
623
624         Added check that clipping rect is valid.
625         Clear GL error that might remain from QT GL operations.
626         Added GL error assert for scissor test operations.
627
628         * UIProcess/API/qt/qquickwebpage.cpp:
629         (QQuickWebPagePrivate::paintToCurrentGLContext):
630
631 2011-11-14  Anders Carlsson  <andersca@apple.com>
632
633         Only send progress notifications for the main frame
634         https://bugs.webkit.org/show_bug.cgi?id=72302
635
636         Reviewed by Sam Weinig.
637
638         Since it's impossible in the API to tell which frame the progress notifications are for, just send them to the main frame for now.
639
640         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
641         (WebKit::WebFrameLoaderClient::postProgressStartedNotification):
642         (WebKit::WebFrameLoaderClient::postProgressEstimateChangedNotification):
643         (WebKit::WebFrameLoaderClient::postProgressFinishedNotification):
644
645 2011-11-14  Alexis Menard  <alexis.menard@openbossa.org>
646
647         [Qt][WK2] Cleanup QML tests.
648         https://bugs.webkit.org/show_bug.cgi?id=72259
649
650         Reviewed by Simon Hausmann.
651
652         Cleanup QML tests. This patch removes the duplicates after the merge of both views.
653         I also isolated the desktop specific bits into its own directory.
654
655         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_download.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_download.qml.
656         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml.
657         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_messaging.qml.
658         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationPolicyForUrl.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_navigationPolicyForUrl.qml.
659         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml: Removed.
660         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadZeroSizeView.qml: Removed.
661         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml: Removed.
662         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml: Removed.
663         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml: Removed.
664         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml: Removed.
665         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml: Removed.
666         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadFail.qml.
667         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgress.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgress.qml.
668         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgressSignal.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgressSignal.qml.
669         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadZeroSizeView.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadZeroSizeView.qml.
670         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_preferences.qml.
671         * UIProcess/API/qt/tests/qmltests/WebView/tst_properties.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml.
672         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
673
674 2011-11-14  Mario Sanchez Prada  <msanchez@igalia.com>
675
676         Add support for the caretBrowsingEnabled preference in WebKit2
677         https://bugs.webkit.org/show_bug.cgi?id=72266
678
679         Reviewed by Chris Fleizach.
680
681         * Shared/WebPreferencesStore.h: Add caretBrowsingEnabled getter
682         and setter macro.
683         * UIProcess/API/C/WKPreferences.h:
684         * UIProcess/API/C/WKPreferences.cpp:
685         (WKPreferencesSetCaretBrowsingEnabled): Added.
686         (WKPreferencesGetCaretBrowsingEnabled): Added.
687         * WebProcess/WebPage/WebPage.cpp:
688         (WebKit::WebPage::updatePreferences): Update the
689         caretBrowsingEnabledKey preference.
690
691 2011-11-14  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
692
693         [Qt] Remove reference to QWebNavigationController
694         https://bugs.webkit.org/show_bug.cgi?id=72257
695
696         Reviewed by Simon Hausmann.
697
698         QWebNavigationController was removed in r99946, this is just a leftover.
699
700         * UIProcess/API/qt/qquickwebview.cpp:
701         (QQuickWebViewPrivate::QQuickWebViewPrivate):
702         * UIProcess/API/qt/qquickwebview_p.h:
703
704 2011-11-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
705
706         [Qt] the QQuickWebView should support double-tap to zoom
707         https://bugs.webkit.org/show_bug.cgi?id=72030
708
709         Reviewed by Andreas Kling.
710
711         * UIProcess/qt/QtViewInterface.cpp:
712         * UIProcess/qt/QtViewInterface.h:
713         * UIProcess/qt/QtViewportInteractionEngine.cpp:
714         (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
715         (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
716         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
717         * UIProcess/qt/QtViewportInteractionEngine.h:
718         * UIProcess/qt/QtWebPageProxy.cpp:
719         (QtWebPageProxy::didFindZoomableArea):
720
721 2011-11-14  Zalan Bujtas  <zbujtas@gmail.com>
722
723         Build breaks with --no-javascript-debugger --no-inspector
724         https://bugs.webkit.org/show_bug.cgi?id=72228
725
726         Reviewed by Simon Hausmann.
727
728         * UIProcess/WebPageProxy.cpp:
729         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
730
731 2011-11-13  Mark Rowe  <mrowe@apple.com>
732
733         Fix the 32-bit build.
734
735         * WebProcess/mac/WebProcessMac.mm:
736         (WebKit::initializeSandbox): Use a format specifier and cast that works on more architectures.
737
738 2011-11-12  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
739
740         [Qt][Symbian] Remove support for WINSCW compiler
741         https://bugs.webkit.org/show_bug.cgi?id=70178
742
743         Reviewed by Chang Shu.
744
745         * Shared/API/c/WKString.h:
746
747 2011-11-12  Dan Bernstein  <mitz@apple.com>
748
749         <rdar://problem/10294191> REGRESSION (WebKit2): Lookup bubble sized and positioned incorrectly (vertically off)
750         https://bugs.webkit.org/show_bug.cgi?id=72217
751
752         Reviewed by Dave Hyatt.
753
754         * UIProcess/API/mac/PageClientImpl.mm:
755         (WebKit::PageClientImpl::didPerformDictionaryLookup): Rather than adding the NSFont’s ascender
756         to the top of the text rect to establish the baseline here...
757         * WebProcess/WebPage/mac/WebPageMac.mm:
758         (WebKit::WebPage::performDictionaryLookupForRange): ...do it here, using the WebCore::Font’s
759         ascender, which is what’s actually used when drawing the text.
760
761 2011-11-11  Nayan Kumar K  <nayankk@motorola.com>
762
763         [GTK][WEBKIT2] Add font and charset properties to WebKitWebSettings
764         https://bugs.webkit.org/show_bug.cgi?id=68996
765
766         Reviewed by Martin Robinson.
767
768         Provision to query and set the font related properties (such as
769         font-family, font-size) and charset properties (such as default-
770         charset) is added.
771
772         * UIProcess/API/gtk/WebKitSettings.cpp: Added font and encoding properties.
773         (webKitSettingsSetProperty): GObject set property function.
774         (webKitSettingsGetProperty): GObject get property function.
775         (webkit_settings_class_init): Few more signals installed.
776         (webkit_settings_init): Initialization of instance variables.
777         (webkit_web_settings_get_default_font_family): Get 'default-font-family'.
778         (webkit_web_settings_set_default_font_family): Set 'default-font-family'.
779         (webkit_web_settings_get_monospace_font_family): Get 'monospace-font-family'.
780         (webkit_web_settings_set_monospace_font_family): Set 'monospace-font-family'.
781         (webkit_web_settings_get_serif_font_family): Get 'serif-font-family'.
782         (webkit_web_settings_set_serif_font_family): Set 'serif-font-family'.
783         (webkit_web_settings_get_sans_serif_font_family): Get 'sans-serif-font-family'.
784         (webkit_web_settings_set_sans_serif_font_family): Get 'sans-serif-font-family'.
785         (webkit_web_settings_get_cursive_font_family): Get 'cursive-font-family'.
786         (webkit_web_settings_set_cursive_font_family): Set 'cursive-font-family'.
787         (webkit_web_settings_get_fantasy_font_family): Get 'fantasy-font-family'.
788         (webkit_web_settings_set_fantasy_font_family): Set 'fantasy-font-family'.
789         (webkit_web_settings_get_pictograph_font_family): Get 'pictograph-font-family'.
790         (webkit_web_settings_set_pictograph_font_family): Set 'pictograph-font-family'.
791         (webkit_web_settings_get_default_font_size): Get 'default-font-size'.
792         (webkit_web_settings_set_default_font_size): Set 'default-font-size'.
793         (webkit_web_settings_get_default_monospace_font_size): Get 'default-monospace-font-size'.
794         (webkit_web_settings_set_default_monospace_font_size): Set 'default-monospace-font-size'.
795         (webkit_web_settings_get_minimum_font_size): Get 'minimum-font-size'.
796         (webkit_web_settings_set_minimum_font_size): Set 'minimum-font-size'.
797         (webkit_web_settings_get_default_charset): Get 'default-charset'.
798         (webkit_web_settings_set_default_charset): Set 'default-charset'.
799         * UIProcess/API/gtk/WebKitSettings.h: Add new sections for gtk-doc generation.
800         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Expose new public APIs.
801         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
802         (testWebKitSettings): Add new tests.
803
804 2011-11-11  Shinya Kawanaka  <shinyak@google.com>
805
806         Implement legacy text check emulation in unified text check interface.
807         https://bugs.webkit.org/show_bug.cgi?id=70299
808
809         Reviewed by Hajime Morita.
810
811         * win/WebKit2.def:
812         * win/WebKit2CFLite.def:
813
814 2011-11-11  Alexey Proskuryakov  <ap@apple.com>
815
816         WebProcess should use AppSandbox style quarantine
817         https://bugs.webkit.org/show_bug.cgi?id=72168
818         <rdar://problem/10434292>
819
820         Reviewed by Darin Adler.
821
822         * WebProcess/mac/WebProcessMac.mm: (WebKit::initializeSandbox): Just enable it.
823
824 2011-11-11  Darin Adler  <darin@apple.com>
825
826         * WebKit2.xcodeproj/project.pbxproj: Let a newer Xcode update this file.
827         If an older Xcode downgrades this file and we have a risk of some kind of
828         oscillating commit situation, please contact me so I know not to do this again.
829
830 2011-11-11  Mark Hahnenberg  <mhahnenberg@apple.com>
831
832         Add jsCast to replace static_cast
833         https://bugs.webkit.org/show_bug.cgi?id=72071
834
835         Reviewed by Geoffrey Garen.
836
837         Added new jsCast and changed all of the static_cast sites in functions that 
838         are in the MethodTable to use jsCast instead.
839
840         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
841         (WebKit::JSNPObject::getCallData):
842         (WebKit::JSNPObject::getConstructData):
843         (WebKit::JSNPObject::getOwnPropertySlot):
844         (WebKit::JSNPObject::getOwnPropertyDescriptor):
845         (WebKit::JSNPObject::put):
846         (WebKit::JSNPObject::deleteProperty):
847         (WebKit::JSNPObject::deletePropertyByIndex):
848         (WebKit::JSNPObject::getOwnPropertyNames):
849
850 2011-11-11  Timothy Hatcher  <timothy@apple.com>
851
852         Only use the textured window style mask when there is no override inspector page.
853
854         https://webkit.org/b/72142
855
856         Reviewed by Dan Bernstein.
857
858         * UIProcess/mac/WebInspectorProxyMac.mm:
859         (WebKit::WebInspectorProxy::platformOpen): Don't set NSTexturedBackgroundWindowMask if
860         there is an override inspector page. Make setAutorecalculatesContentBorderThickness:,
861         setContentBorderThickness: and WKNSWindowMakeBottomCornersSquare conditional.
862
863 2011-11-11  Simon Hausmann  <simon.hausmann@nokia.com>
864
865         [Qt] Remove dead MeeGoTouch code.
866
867         Reviewed by Tor Arne Vestbø.
868
869         * WebProcess/qt/WebProcessMainQt.cpp:
870         (WebKit::WebProcessMainQt):
871
872 2011-11-11  Alexis Menard  <alexis.menard@openbossa.org>
873
874         [Qt] Add a way to have experimental features in WebKit2
875         https://bugs.webkit.org/show_bug.cgi?id=67707
876
877         Reviewed by Kenneth Rohde Christiansen.
878
879         Add new QML extensions for our public view. This extension
880         returns the private object of the view so that the user could
881         use unstable/unreleased APIs. This requires our private class
882         to be exported and QObject subclass.
883
884         * Target.pri:
885         * UIProcess/API/qt/qquickwebview.cpp:
886         * UIProcess/API/qt/qquickwebview_p.h:
887         * UIProcess/API/qt/qquickwebviewprivateextension.cpp: Added.
888         (QQuickWebViewPrivateExtension::QQuickWebViewPrivateExtension):
889         (QQuickWebViewPrivateExtension::viewPrivate):
890         * UIProcess/API/qt/qquickwebviewprivateextension_p.h: Added.
891
892 2011-11-11  Simon Hausmann  <simon.hausmann@nokia.com>
893
894         [Qt][WK2] Remove QWebNavigationController
895         https://bugs.webkit.org/show_bug.cgi?id=72113
896
897         Reviewed by Andreas Kling.
898
899         Fold the functions and properties of QWebNavigationController into
900         QQuickWebView.
901
902         * Target.pri:
903         * UIProcess/API/qt/WKView.h:
904         * UIProcess/API/qt/qquickwebpage.cpp:
905         (QQuickWebPagePrivate::QQuickWebPagePrivate):
906         * UIProcess/API/qt/qquickwebpage.h:
907         * UIProcess/API/qt/qquickwebpage_p.h:
908         * UIProcess/API/qt/qquickwebview.cpp:
909         (QQuickWebViewPrivate::initialize):
910         (QQuickWebView::goBack):
911         (QQuickWebView::goForward):
912         (QQuickWebView::stop):
913         (QQuickWebView::reload):
914         (QQuickWebView::canGoBack):
915         (QQuickWebView::canGoForward):
916         (QQuickWebView::canStop):
917         (QQuickWebView::canReload):
918         (QQuickWebView::title):
919         * UIProcess/API/qt/qquickwebview.h:
920         * UIProcess/API/qt/qwebnavigationcontroller.cpp: Removed.
921         * UIProcess/API/qt/qwebnavigationcontroller.h: Removed.
922         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
923         (tst_QQuickWebView::navigationStatusAtStartup):
924         (LoadStartedCatcher::onLoadStarted):
925         (tst_QQuickWebView::stopEnabledAfterLoadStarted):
926         (tst_QQuickWebView::backAndForward):
927         (tst_QQuickWebView::reload):
928         (tst_QQuickWebView::stop):
929
930 2011-11-10  Beth Dakin  <bdakin@apple.com>
931
932         Once more for the QT build.
933
934         * UIProcess/qt/QtWebPageProxy.cpp:
935         (QtWebPageProxy::setFindIndicator):
936         * UIProcess/qt/QtWebPageProxy.h:
937
938 2011-11-10  Beth Dakin  <bdakin@apple.com>
939
940         More attempted build fix.
941
942         * UIProcess/API/efl/PageClientImpl.cpp:
943         (WebKit::PageClientImpl::setFindIndicator):
944         * UIProcess/API/efl/PageClientImpl.h:
945         * UIProcess/API/gtk/PageClientImpl.cpp:
946         (WebKit::PageClientImpl::setFindIndicator):
947         * UIProcess/API/gtk/PageClientImpl.h:
948
949 2011-11-10  Anders Carlsson  <andersca@apple.com>
950
951         Fix 32-bit build.
952
953         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
954         (-[WKContentLayer drawInContext:]):
955
956 2011-11-10  Beth Dakin  <bdakin@apple.com>
957
958         Speculative build fix.
959
960         * UIProcess/win/WebView.cpp:
961         (WebKit::WebView::setFindIndicator):
962         * UIProcess/win/WebView.h:
963
964 2011-11-10  Beth Dakin  <bdakin@apple.com>
965
966         https://bugs.webkit.org/show_bug.cgi?id=66584
967         WebKit2's find bouncy looks blurry after dragging window onto >1.0 scale factor 
968         display
969         -and corresponding-
970         <rdar://problem/9987559>
971
972         Reviewed by Anders Carlsson.
973
974         The setFindIndicator message and various functions of the same name must all take 
975         an additional parameter indicating whether or not setting the find indicator 
976         should result in a bounce animation. This is because when the device scale factor 
977         changes, if there is currently a find indicator, it must be re-set to a higher or 
978         lower resolution version, but we don't want the bounce animation to happen again.
979         * UIProcess/API/mac/FindIndicatorWindow.h:
980         * UIProcess/API/mac/FindIndicatorWindow.mm:
981         (WebKit::FindIndicatorWindow::setFindIndicator):
982         * UIProcess/API/mac/PageClientImpl.h:
983         * UIProcess/API/mac/PageClientImpl.mm:
984         (WebKit::PageClientImpl::setFindIndicator):
985         * UIProcess/API/mac/WKView.mm:
986         (-[WKView _setFindIndicator:fadeOut:animate:]):
987         * UIProcess/API/mac/WKViewInternal.h:
988         * UIProcess/PageClient.h:
989         * UIProcess/WebPageProxy.cpp:
990         (WebKit::WebPageProxy::setFindIndicator):
991         * UIProcess/WebPageProxy.h:
992         * UIProcess/WebPageProxy.messages.in:
993
994         New function FindController::isShowingOverlay() is used to determine if 
995         FindController::deviceScaleFactorDidChange() needs to be called.
996         * WebProcess/WebPage/FindController.h:
997         (WebKit::FindController::isShowingOverlay): 
998
999         FindController::deviceScaleFactorDidChange() calls updateFindIndicator to re-
1000         generate the bitmap at the appropriate scale factor, but tells it not to animate 
1001         this time.
1002         (WebKit::FindController::deviceScaleFactorDidChange):
1003
1004         updateFindIndicator() takes a new parameter indicating whether or not the 
1005         FindIndicator should animate. It defaults to true since the deviceScaleFactor 
1006         changing is the only case currently where we do not want it to animate.
1007         * WebProcess/WebPage/FindController.cpp:
1008         (WebKit::FindController::updateFindIndicator):
1009         (WebKit::FindController::hideFindIndicator):
1010
1011         Calls into FindController::deviceScaleFactorDidChange() when the scale factor has 
1012         changed and the find overlay is showing.
1013         * WebProcess/WebPage/WebPage.cpp:
1014         (WebKit::WebPage::setDeviceScaleFactor):
1015
1016 2011-11-10  Timothy Hatcher  <timothy@apple.com>
1017
1018         Make WKViews in NSPopovers render as they would in active windows.
1019
1020         The NSWindowDid{Become,Resign}KeyNotifications are not fired when NSPopovers
1021         are shown or hidden since they share key with the parent window. So WKView
1022         needs to update the active state during order on/off screen notifications.
1023
1024         https://webkit.org/b/68435
1025
1026         Reviewed by John Sullivan.
1027
1028         * UIProcess/API/mac/WKView.mm:
1029         (-[WKView _windowDidOrderOffScreen:]): Call viewStateDidChange with WebPageProxy::ViewWindowIsActive.
1030         (-[WKView _windowDidOrderOnScreen:]): Ditto.
1031
1032 2011-11-10  Anders Carlsson  <andersca@apple.com>
1033
1034         Add a simple content layer to TiledCoreAnimationDrawingArea
1035         https://bugs.webkit.org/show_bug.cgi?id=72044
1036
1037         Reviewed by Darin Adler.
1038
1039         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1040         Add a content layer member variable.
1041
1042         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1043         (-[WKContentLayer _initWithWebPage:WebKit::]):
1044         Add initializer.
1045
1046         (-[WKContentLayer drawInContext:]):
1047         Lay out and draw the web page.
1048
1049         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
1050         Add the content layer as a sublayer of the root layer.
1051
1052         (WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplay):
1053         (WebKit::TiledCoreAnimationDrawingArea::scroll):
1054         Tell the content layer to paint.
1055
1056         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
1057         Resize the content layer as well.
1058
1059 2011-11-10  Anders Carlsson  <andersca@apple.com>
1060
1061         The WKView layer hosting subview needs to be flipped
1062         https://bugs.webkit.org/show_bug.cgi?id=72042
1063
1064         Reviewed by Darin Adler.
1065
1066         In order to match the Core Animation layer hierarchy, the layer hosting WKView
1067         subview needs to be flipped.
1068
1069         * UIProcess/API/mac/WKView.mm:
1070         (-[WKFlippedView isFlipped]):
1071         Add a NSView subview whose sole purpose is to be flipped.
1072
1073         (-[WKView _enterAcceleratedCompositingMode:]):
1074         Create a WKFlippedView instead of a regular NSView.
1075
1076 2011-11-10  Balazs Kelemen  <kbalazs@webkit.org>
1077
1078         [Qt] X11 plugins need to be reworked for Qt5
1079         https://bugs.webkit.org/show_bug.cgi?id=70023
1080
1081         Reviewed by Simon Hausmann.
1082
1083         * Target.pri:
1084         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
1085         (WebKit::PluginInfoStore::pluginsDirectories):
1086         Kill the last dependency from the WebKit1 plugin system.
1087         This is necessary because currently we don't build the WebKit1
1088         plugin code. The function is equivalent with the XP_UNIX part of
1089         PluginDatabase::defaultPluginDirectories.
1090
1091         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1092         (WebKit::NPN_GetValue):
1093         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1094         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1095         (WebKit::getPluginDisplay):
1096         (WebKit::x11Screen):
1097         (WebKit::displayDepth):
1098         (WebKit::rootWindowID):
1099         (WebKit::NetscapePlugin::x11HostDisplay):
1100         (WebKit::NetscapePlugin::platformPostInitialize):
1101         (WebKit::NetscapePlugin::platformDestroy):
1102         (WebKit::NetscapePlugin::platformGeometryDidChange):
1103         (WebKit::NetscapePlugin::platformPaint):
1104         (WebKit::initializeXEvent):
1105         Rework plugin initialization and drawing model.
1106
1107 2011-11-10  Martin Robinson  <mrobinson@igalia.com>
1108
1109         [GTK] [WebKit2] Fix remaining gtkdoc errors
1110         https://bugs.webkit.org/show_bug.cgi?id=71990
1111
1112         Reviewed by Philippe Normand.
1113
1114         * UIProcess/API/gtk/WebKitWebView.cpp: Update add the phrase "property" to
1115         references to properties, because the gtkdoc stylesheet does not differeniate
1116         between properties and signals. Standardize the way we talk about property
1117         notifications.
1118         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add an include to silence 
1119         warnings about GIR annotations.
1120         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add the decorators the private section.
1121
1122 2011-11-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1123
1124         [Qt] Clean up how singe / double taps are handled
1125         https://bugs.webkit.org/show_bug.cgi?id=72024
1126
1127         Reviewed by Simon Hausmann.
1128
1129         Move all decision making to the QtWebPageProxy.
1130
1131         * UIProcess/qt/QtTapGestureRecognizer.cpp:
1132         (WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer):
1133         (WebKit::QtTapGestureRecognizer::recognize):
1134         (WebKit::QtTapGestureRecognizer::tapTimeout):
1135         * UIProcess/qt/QtTapGestureRecognizer.h:
1136         * UIProcess/qt/QtWebPageProxy.cpp:
1137         (QtWebPageProxy::QtWebPageProxy):
1138         (QtWebPageProxy::handleSingleTapEvent):
1139         (QtWebPageProxy::handleDoubleTapEvent):
1140         * UIProcess/qt/QtWebPageProxy.h:
1141
1142 2011-11-10  Simon Hausmann  <simon.hausmann@nokia.com>
1143
1144         [Qt] Clean up build system
1145
1146         Reviewed by Tor Arne Vestbø.
1147
1148         Now that we use whole-archive linking we can fold the files that contain exported
1149         symbols back into the WebKit2 static library.
1150
1151         * Target.pri: Fold in sources from WebKit2.pri.
1152         * WebKit2.pri: Removed.
1153
1154 2011-11-10  Alexis Menard  <alexis.menard@openbossa.org>
1155
1156         [Qt] Merge QTouchWebView and QDesktopWebView into one class
1157         https://bugs.webkit.org/show_bug.cgi?id=71355
1158
1159         Reviewed by Kenneth Rohde Christiansen.
1160
1161         Merge QTouchWebView and QDesktopWebView into one class called
1162         QQuickWebView and its attached page QQuickWebPage. You can switch to the
1163         traditional desktop use case with the private header. Also now on desktop
1164         platforms AC is turn on by default. I also merged our two
1165         subclasses of QtViewInterface into one as the split doesn't make
1166         that much sense anymore. In the future we want to be able to enable the
1167         traditional desktop use case depending the platform the code is running.
1168         API tests and QML tests have been updated.
1169
1170         * Target.pri:
1171         * UIProcess/API/qt/WKView.h:
1172         * UIProcess/API/qt/qbasewebview.cpp: Removed.
1173         * UIProcess/API/qt/qbasewebview_p.h: Removed.
1174         * UIProcess/API/qt/qdesktopwebview.cpp: Removed.
1175         * UIProcess/API/qt/qdesktopwebview.h: Removed.
1176         * UIProcess/API/qt/qdesktopwebview_p.h: Removed.
1177         * UIProcess/API/qt/qquickwebpage.cpp: Renamed from Source/WebKit2/UIProcess/API/qt/qtouchwebpage.cpp.
1178         (QQuickWebPage::QQuickWebPage):
1179         (QQuickWebPage::~QQuickWebPage):
1180         (QQuickWebPage::keyPressEvent):
1181         (QQuickWebPage::keyReleaseEvent):
1182         (QQuickWebPage::inputMethodEvent):
1183         (QQuickWebPage::focusInEvent):
1184         (QQuickWebPage::focusOutEvent):
1185         (QQuickWebPage::mousePressEvent):
1186         (QQuickWebPage::mouseMoveEvent):
1187         (QQuickWebPage::mouseReleaseEvent):
1188         (QQuickWebPage::mouseDoubleClickEvent):
1189         (QQuickWebPage::wheelEvent):
1190         (QQuickWebPage::hoverEnterEvent):
1191         (QQuickWebPage::hoverMoveEvent):
1192         (QQuickWebPage::hoverLeaveEvent):
1193         (QQuickWebPage::dragMoveEvent):
1194         (QQuickWebPage::dragEnterEvent):
1195         (QQuickWebPage::dragLeaveEvent):
1196         (QQuickWebPage::dropEvent):
1197         (QQuickWebPage::geometryChanged):
1198         (QQuickWebPage::event):
1199         (QQuickWebPage::touchEvent):
1200         (QQuickWebPage::itemChange):
1201         (QQuickWebPagePrivate::QQuickWebPagePrivate):
1202         (QQuickWebPagePrivate::initializeSceneGraphConnections):
1203         (QQuickWebPagePrivate::setPageProxy):
1204         (computeEffectiveOpacity):
1205         (QQuickWebPagePrivate::paintToCurrentGLContext):
1206         (QQuickWebPagePrivate::_q_onAfterSceneRender):
1207         (QQuickWebPagePrivate::_q_onSceneGraphInitialized):
1208         * UIProcess/API/qt/qquickwebpage.h: Renamed from Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h.
1209         * UIProcess/API/qt/qquickwebpage_p.h: Renamed from Source/WebKit2/UIProcess/API/qt/qtouchwebpage_p.h.
1210         * UIProcess/API/qt/qquickwebview.cpp: Added.
1211         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1212         (QQuickWebViewPrivate::enableMouseEvents):
1213         (QQuickWebViewPrivate::disableMouseEvents):
1214         (QQuickWebViewPrivate::initialize):
1215         (QQuickWebViewPrivate::initializeDesktop):
1216         (QQuickWebViewPrivate::initializeTouch):
1217         (QQuickWebViewPrivate::loadDidCommit):
1218         (QQuickWebViewPrivate::contentSizeChanged):
1219         (QQuickWebViewPrivate::scrollPositionRequested):
1220         (QQuickWebViewPrivate::_q_viewportUpdated):
1221         (QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged):
1222         (QQuickWebViewPrivate::_q_onVisibleChanged):
1223         (QQuickWebViewPrivate::updateViewportSize):
1224         (QQuickWebViewPrivate::updateViewportConstraints):
1225         (QQuickWebViewPrivate::didChangeViewportProperties):
1226         (QQuickWebViewPrivate::runJavaScriptAlert):
1227         (QQuickWebViewPrivate::runJavaScriptConfirm):
1228         (QQuickWebViewPrivate::runJavaScriptPrompt):
1229         (QQuickWebViewPrivate::chooseFiles):
1230         (QQuickWebViewPrivate::_q_onOpenPanelFilesSelected):
1231         (QQuickWebViewPrivate::_q_onOpenPanelFinished):
1232         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
1233         (toPolicyAction):
1234         (hasMetaMethod):
1235         (QQuickWebViewPrivate::navigationPolicyForURL):
1236         (QQuickWebViewPrivate::setPageProxy):
1237         (QQuickWebView::QQuickWebView):
1238         (QQuickWebView::~QQuickWebView):
1239         (QQuickWebView::page):
1240         (QQuickWebView::load):
1241         (QQuickWebView::postMessage):
1242         (QQuickWebView::url):
1243         (QQuickWebView::loadProgress):
1244         (QQuickWebView::title):
1245         (QQuickWebView::navigationController):
1246         (QQuickWebView::preferences):
1247         (QQuickWebView::geometryChanged):
1248         (QQuickWebView::touchEvent):
1249         (QQuickWebView::pageRef):
1250         * UIProcess/API/qt/qquickwebview.h: Renamed from Source/WebKit2/UIProcess/API/qt/qbasewebview.h.
1251         * UIProcess/API/qt/qquickwebview_p.h: Added.
1252         * UIProcess/API/qt/qtouchwebview.cpp: Removed.
1253         * UIProcess/API/qt/qtouchwebview.h: Removed.
1254         * UIProcess/API/qt/qtouchwebview_p.h: Removed.
1255         * UIProcess/API/qt/tests/commonviewtests/commonviewtests.pro: Removed.
1256         * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp: Removed.
1257         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp: Removed.
1258         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h: Removed.
1259         * UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp: Removed.
1260         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_download.qml:
1261         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml:
1262         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadFail.qml:
1263         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgress.qml:
1264         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml:
1265         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadZeroSizeView.qml:
1266         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_messaging.qml:
1267         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_navigationPolicyForUrl.qml:
1268         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_preferences.qml:
1269         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml:
1270         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml:
1271         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml:
1272         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml:
1273         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml:
1274         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgressSignal.qml:
1275         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadZeroSizeView.qml:
1276         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml:
1277         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
1278         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
1279         (DesktopWebView::DesktopWebView):
1280         (main):
1281         * UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qdesktopwebview/qdesktopwebview.pro.
1282         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: Added.
1283         (tst_QQuickWebView::tst_QQuickWebView):
1284         (tst_QQuickWebView::init):
1285         (tst_QQuickWebView::cleanup):
1286         (tst_QQuickWebView::webView):
1287         (tst_QQuickWebView::accessPage):
1288         (tst_QQuickWebView::navigationStatusAtStartup):
1289         (LoadStartedCatcher::LoadStartedCatcher):
1290         (LoadStartedCatcher::onLoadStarted):
1291         (tst_QQuickWebView::stopEnabledAfterLoadStarted):
1292         (tst_QQuickWebView::baseUrl):
1293         (tst_QQuickWebView::loadEmptyUrl):
1294         (tst_QQuickWebView::loadEmptyPageViewVisible):
1295         (tst_QQuickWebView::loadEmptyPageViewHidden):
1296         (tst_QQuickWebView::loadNonexistentFileUrl):
1297         (tst_QQuickWebView::backAndForward):
1298         (tst_QQuickWebView::reload):
1299         (tst_QQuickWebView::stop):
1300         (tst_QQuickWebView::loadProgress):
1301         (tst_QQuickWebView::show):
1302         * UIProcess/API/qt/tests/qtouchwebview/qtouchwebview.pro: Removed.
1303         * UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp: Removed.
1304         * UIProcess/API/qt/tests/testwindow.h:
1305         * UIProcess/TiledDrawingAreaProxy.h:
1306         * UIProcess/qt/QtGestureRecognizer.cpp:
1307         (WebKit::QtGestureRecognizer::QtGestureRecognizer):
1308         (WebKit::QtGestureRecognizer::setViewportInteractionEngine):
1309         * UIProcess/qt/QtGestureRecognizer.h:
1310         * UIProcess/qt/QtPanGestureRecognizer.cpp:
1311         (WebKit::QtPanGestureRecognizer::setViewportInteractionEngine):
1312         (WebKit::QtPanGestureRecognizer::recognize):
1313         * UIProcess/qt/QtPanGestureRecognizer.h:
1314         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
1315         (WebKit::QtPinchGestureRecognizer::recognize):
1316         (WebKit::QtPinchGestureRecognizer::setViewportInteractionEngine):
1317         * UIProcess/qt/QtPinchGestureRecognizer.h:
1318         * UIProcess/qt/QtTouchViewInterface.cpp: Removed.
1319         * UIProcess/qt/QtTouchViewInterface.h: Removed.
1320         * UIProcess/qt/QtViewInterface.cpp: Added.
1321         (WebKit::QtViewInterface::QtViewInterface):
1322         (WebKit::QtViewInterface::didFindZoomableArea):
1323         (WebKit::QtViewInterface::sceneGraphUpdateQueue):
1324         (WebKit::QtViewInterface::setViewNeedsDisplay):
1325         (WebKit::QtViewInterface::drawingAreaSize):
1326         (WebKit::QtViewInterface::contentSizeChanged):
1327         (WebKit::QtViewInterface::scrollPositionRequested):
1328         (WebKit::QtViewInterface::isActive):
1329         (WebKit::QtViewInterface::hasFocus):
1330         (WebKit::QtViewInterface::isVisible):
1331         (WebKit::QtViewInterface::startDrag):
1332         (WebKit::QtViewInterface::didChangeViewportProperties):
1333         (WebKit::QtViewInterface::didChangeUrl):
1334         (WebKit::QtViewInterface::didChangeTitle):
1335         (WebKit::QtViewInterface::didChangeToolTip):
1336         (WebKit::QtViewInterface::didChangeStatusText):
1337         (WebKit::QtViewInterface::didChangeCursor):
1338         (WebKit::QtViewInterface::loadDidBegin):
1339         (WebKit::QtViewInterface::loadDidCommit):
1340         (WebKit::QtViewInterface::loadDidSucceed):
1341         (WebKit::QtViewInterface::loadDidFail):
1342         (WebKit::QtViewInterface::didChangeLoadProgress):
1343         (WebKit::QtViewInterface::didMouseMoveOverElement):
1344         (WebKit::QtViewInterface::showContextMenu):
1345         (WebKit::QtViewInterface::hideContextMenu):
1346         (WebKit::QtViewInterface::runJavaScriptAlert):
1347         (WebKit::QtViewInterface::runJavaScriptConfirm):
1348         (WebKit::QtViewInterface::runJavaScriptPrompt):
1349         (WebKit::QtViewInterface::processDidCrash):
1350         (WebKit::QtViewInterface::didRelaunchProcess):
1351         (WebKit::QtViewInterface::engine):
1352         (WebKit::QtViewInterface::downloadRequested):
1353         (WebKit::QtViewInterface::chooseFiles):
1354         * UIProcess/qt/QtViewInterface.h:
1355         * UIProcess/qt/QtWebPageProxy.h:
1356         (QtWebPageProxy::setViewportInteractionEngine):
1357         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
1358         * WebKit2.pri:
1359
1360 2011-11-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1361
1362         Unreviewed. Fix make distcheck build.
1363
1364         * GNUmakefile.am: Fix typos in gtk-doc files and scripts.
1365
1366 2011-11-10  Simon Hausmann  <simon.hausmann@nokia.com>
1367
1368         Unreviewed Mac build fix: Remove TapAndHold gesture type.
1369
1370         It broke the build because it's unhandled. Remove it since it's not
1371         supported at the moment anyway. (looks like an accidental addition?)
1372
1373         * Shared/WebEvent.h:
1374         * UIProcess/qt/QtTapGestureRecognizer.cpp:
1375         (WebKit::QtTapGestureRecognizer::tapAndHoldTimeout):
1376
1377 2011-11-09  Simon Hausmann  <simon.hausmann@nokia.com>
1378
1379         [Qt] Enable exports and constructor functions in static libs
1380
1381         Reviewed by Tor Arne Vestbø.
1382
1383         * WebProcess/WebPage/qt/WebPageQt.cpp:
1384         (WebKit::WebPage::platformInitialize): Remove unnecessary manual Qt resource
1385         initialization.
1386
1387 2011-11-10  Zeno Albisser  <zeno.albisser@nokia.com>
1388
1389         [Qt][WK2] Add Tap Gesture recognition to UIProcess
1390         https://bugs.webkit.org/show_bug.cgi?id=71841
1391
1392         Add a Tap gesture recognizer that delivers GestureSingleTap
1393         and GestureTapAndHold events through the WebPageProxy.
1394         Add a GestureTapAndHold to WebEvent.
1395         Add a DoubleTap gesture for zooming in and out.
1396
1397         This patch is based on work of Benjamin Poulain.
1398
1399         Reviewed by Kenneth Rohde Christiansen.
1400
1401         * Shared/WebEvent.h:
1402         * Target.pri:
1403         * UIProcess/qt/QtTapGestureRecognizer.cpp: Added.
1404         (WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer):
1405         (WebKit::QtTapGestureRecognizer::setWebPageProxy):
1406         (WebKit::QtTapGestureRecognizer::recognize):
1407         (WebKit::QtTapGestureRecognizer::tapTimeout):
1408         (WebKit::QtTapGestureRecognizer::tapAndHoldTimeout):
1409         (WebKit::QtTapGestureRecognizer::reset):
1410         (WebKit::QtTapGestureRecognizer::timerEvent):
1411         * UIProcess/qt/QtTapGestureRecognizer.h: Added.
1412         * UIProcess/qt/QtWebPageProxy.cpp:
1413         (QtWebPageProxy::QtWebPageProxy):
1414         (QtWebPageProxy::processDidCrash):
1415         (QtWebPageProxy::doneWithTouchEvent):
1416         * UIProcess/qt/QtWebPageProxy.h:
1417
1418 2011-11-09  Shinya Kawanaka  <shinyak@google.com>
1419
1420         Internals.markerRangeForNode should be able to take markers by specifying a marker type.
1421         https://bugs.webkit.org/show_bug.cgi?id=71792
1422
1423         Reviewed by Hajime Morita.
1424
1425         * win/WebKit2.def: Exposed necessary references.
1426         * win/WebKit2CFLite.def: ditto.
1427
1428 2011-10-26  Martin Robinson  <mrobinson@igalia.com>
1429
1430         [GTK] [WebKit] Replace the gtkdoc autools magic with something more flexible
1431         https://bugs.webkit.org/show_bug.cgi?id=70877
1432
1433         Reviewed by Philippe Normand.
1434
1435         Add a script that runs gtkdoc manually instead of using the autotools
1436         magic. Remove now unused gtkdoc files.
1437
1438         * GNUmakefile.am: Remove references to removed gtkdoc files.
1439         * UIProcess/API/gtk/docs/GNUmakefile.am: Removed.
1440         * UIProcess/API/gtk/docs/build-gtkdoc: Added.
1441         * UIProcess/API/gtk/docs/gtkdoc.py: Added.
1442         * UIProcess/API/gtk/docs/version.xml.in: Removed.
1443
1444 2011-11-09  Alexey Proskuryakov  <ap@apple.com>
1445
1446         <rdar://problem/10423024> WebProcess doesn't use AuthBrokerAgent for proxy credentials
1447         https://bugs.webkit.org/show_bug.cgi?id=71964
1448
1449         Reviewed by Darin Adler.
1450
1451         * WebProcess/com.apple.WebProcess.sb: Allow mach-lookup of com.apple.cfnetwork.AuthBrokerAgent.
1452
1453 2011-11-09  Anders Carlsson  <andersca@apple.com>
1454
1455         Element::boundsInWindowSpace should be Element::boundsInRootViewSpace
1456         https://bugs.webkit.org/show_bug.cgi?id=71955
1457
1458         Reviewed by Sam Weinig.
1459
1460         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1461         (WebKit::InjectedBundleNodeHandle::elementBounds):
1462         Call Element::boundsInRootViewSpace.
1463
1464 2011-11-09  Alexis Menard  <alexis.menard@openbossa.org>
1465
1466         WebGraphicsLayer behaves wrongly when no contentsScale is set.
1467         https://bugs.webkit.org/show_bug.cgi?id=71959
1468
1469         Reviewed by Noam Rosenthal.
1470
1471         The contentsScale needs to get a default value just like
1472         TiledBackingStore in case no value is explicitely set.
1473
1474         It is covered by existing tests.
1475
1476         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
1477         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
1478
1479 2011-11-09  Mark Hahnenberg  <mhahnenberg@apple.com>
1480
1481         De-virtualize JSObject::getOwnPropertyDescriptor
1482         https://bugs.webkit.org/show_bug.cgi?id=71523
1483
1484         Reviewed by Sam Weinig.
1485
1486         Added getOwnPropertyDescriptor to the MethodTable, changed all of the 
1487         virtual versions of getOwnPropertyDescriptor to static ones, and 
1488         changed all of the call sites to the corresponding lookup in the MethodTable.
1489
1490         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1491         (WebKit::JSNPObject::getOwnPropertyDescriptor):
1492         * WebProcess/Plugins/Netscape/JSNPObject.h:
1493
1494 2011-11-09  Alexandru Chiculita  <achicu@adobe.com>
1495
1496         Fixing build on MacOSX SL after 71838
1497         https://bugs.webkit.org/show_bug.cgi?id=71912
1498
1499         Reviewed by Anders Carlsson.
1500
1501         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1502         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
1503
1504 2011-11-09  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1505
1506         [WebKit2] Prepare viewport meta handling for desktop usage
1507         https://bugs.webkit.org/show_bug.cgi?id=71907
1508
1509         Reviewed by Simon Hausmann.
1510
1511         This is only used by Qt so far. Now we don't always layout pages
1512         without the viewport meta tag, using 980 as the layout width, but
1513         instead we use that value (it is a setting) as a minimum value, or
1514         else we use the viewport width.
1515
1516         * UIProcess/API/qt/qtouchwebview.cpp:
1517         (QTouchWebViewPrivate::updateViewportSize):
1518         (QTouchWebViewPrivate::updateViewportConstraints):
1519         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1520         (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
1521         * WebProcess/WebPage/WebPage.cpp:
1522         (WebKit::WebPage::setViewportSize):
1523
1524 2011-11-09  Simon Hausmann  <simon.hausmann@nokia.com>
1525
1526         Unreviewed, rolling out r99701.
1527         http://trac.webkit.org/changeset/99701
1528
1529         Breaks Qt mac build
1530
1531         * WebProcess/WebPage/qt/WebPageQt.cpp:
1532         (initResources):
1533         (WebKit::WebPage::platformInitialize):
1534
1535 2011-11-09  Simon Hausmann  <simon.hausmann@nokia.com>
1536
1537         [Qt] Enable exports and constructor functions in static libs
1538
1539         Reviewed by Tor Arne Vestbø.
1540
1541         * WebProcess/WebPage/qt/WebPageQt.cpp:
1542         (WebKit::WebPage::platformInitialize): Remove unnecessary manual Qt resource
1543         initialization.
1544
1545 2011-11-09  Simon Hausmann  <simon.hausmann@nokia.com>
1546
1547         [Qt] Fix geolocation enabled build.
1548
1549         Reviewed by Tor Arne Vestbø.
1550
1551         * Target.pri: Add QT += location to get the right module includes.
1552         * UIProcess/qt/WebGeolocationProviderQt.cpp: Include the moc file with the right name (GeoLocation -> Geolocation)
1553         * UIProcess/qt/WebGeolocationProviderQt.h: Removed the ENABLE(GEOLOCATION) guards, otherwise moc doesn't generate
1554         code, because it can't interpret the ENABLE() macro.
1555
1556 2011-11-09  Simon Hausmann  <simon.hausmann@nokia.com>
1557
1558         [Qt] Build system cleanup
1559         https://bugs.webkit.org/show_bug.cgi?id=71815
1560
1561         Reviewed by Kenneth Rohde Christiansen.
1562
1563         * Target.pri: Removed duplicated sources that are compiled also into QtWebKit.so through api.pri.
1564         * UIProcess/qt/WebGeolocationProviderQt.cpp: Include the moc file here, as it should only be compiled
1565         if geolocation is enabled.
1566         * UIProcess/qt/WebGeolocationProviderQt.h: Provide ENABLE(GEOLOCATION) guards around class definition.
1567
1568 2011-11-08  Simon Hausmann  <simon.hausmann@nokia.com>
1569
1570         [Qt] Replace use of QApplication with QGuiApplication
1571         https://bugs.webkit.org/show_bug.cgi?id=71794
1572
1573         Reviewed by Andreas Kling.
1574
1575         * Platform/CoreIPC/unix/ConnectionUnix.cpp: Remove unnecessary QApplication inclusion.
1576         * Platform/qt/RunLoopQt.cpp: Replace QApplication include with QCoreApplication.
1577         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: Ditto.
1578         * UIProcess/Launcher/qt/ThreadLauncherQt.cpp: Remove unnecessary QApplication inclusion.
1579         * UIProcess/qt/QtWebPageProxy.cpp:
1580         (QtWebPageProxy::handleMousePressEvent): Replace QApplication usage with QStyleHints.
1581         (QtWebPageProxy::handleMouseDoubleClickEvent): Ditto.
1582
1583 2011-11-07  Adam Barth  <abarth@webkit.org>
1584
1585         Move static "policy" state from SecurityOrigin.cpp to SecurityPolicy.cpp
1586         https://bugs.webkit.org/show_bug.cgi?id=71755
1587
1588         Reviewed by Eric Seidel.
1589
1590         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1591         (WebKit::InjectedBundle::addOriginAccessWhitelistEntry):
1592         (WebKit::InjectedBundle::removeOriginAccessWhitelistEntry):
1593         (WebKit::InjectedBundle::resetOriginAccessWhitelists):
1594         * WebProcess/Plugins/PluginView.cpp:
1595         (WebKit::PluginView::loadURL):
1596
1597 2011-11-08  Brent Fulgham  <bfulgham@webkit.org>
1598
1599         [WinCairo] Unreviewed build fix after r99613.
1600
1601         * win/WebKit2CFLite.def: Add missing export.
1602
1603 2011-11-08  Brent Fulgham  <bfulgham@webkit.org>
1604
1605         [WinCairo] Unreviewed build fix after r98624 and r99613.
1606
1607         * win/WebKit2CFLite.def: Add missing exports.
1608
1609 2011-11-08  Beth Dakin  <bdakin@apple.com>
1610
1611         https://bugs.webkit.org/show_bug.cgi?id=71856
1612         WebKit should use new NSWindowDidChangeBackingPropertiesNotification instead of 
1613         old NSWindowDidChangeResolutionNotification
1614         -and corresponding-
1615         <rdar://problem/10317253>
1616
1617         Reviewed by Tim Hatcher.
1618
1619         * UIProcess/API/mac/WKView.mm:
1620         (-[WKView addWindowObserversForWindow:]):
1621         (-[WKView removeWindowObservers]):
1622
1623         We have to check that the backing scale factor actually changed since this 
1624         notification can also be used to signify other changes. 
1625         (-[WKView _windowDidChangeBackingProperties:]):
1626
1627 2011-11-08  Anders Carlsson  <andersca@apple.com>
1628
1629         Add a basic layer hierarchy to the Core Animation drawing area
1630         https://bugs.webkit.org/show_bug.cgi?id=71838
1631
1632         Reviewed by Sam Weinig.
1633
1634         * UIProcess/API/mac/WKView.mm:
1635         (-[WKView drawRect:]):
1636         Return early if we're using a tiled drawing area.
1637
1638         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1639         If we're using a tiled drawing area, make the WKView layer backed and set its layer
1640         to a simple CALayer with a white background and set the view's content redraw policy
1641         to never to avoid ever calling drawRect.
1642
1643         * UIProcess/DrawingAreaProxy.h:
1644         (WebKit::DrawingAreaProxy::didUpdateGeometry):
1645         * UIProcess/DrawingAreaProxy.messages.in:
1646         Add a new didUpdateGeometry message.
1647
1648         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1649         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1650         (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
1651         Initialize m_isWaitingForDidUpdateGeometry.
1652
1653         (WebKit::TiledCoreAnimationDrawingAreaProxy::sizeDidChange):
1654         Send an UpdateGeometry message to the web process and wait for a reply.
1655
1656         (WebKit::TiledCoreAnimationDrawingAreaProxy::enterAcceleratedCompositingMode):
1657         Tell the web page proxy to enter accelerated compositing mode.
1658
1659         (WebKit::TiledCoreAnimationDrawingAreaProxy::exitAcceleratedCompositingMode):
1660         Assert that this function is never called.
1661
1662         (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
1663         Send another UpdateGeometry message if needed.
1664
1665         (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
1666         Add helper function to actually send the UpdateGeometry message.
1667
1668         * WebProcess/WebPage/DrawingArea.h:
1669         (WebKit::DrawingArea::updateGeometry):
1670         * WebProcess/WebPage/DrawingArea.messages.in:
1671         Add UpdateGeometry message.
1672
1673         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1674         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1675         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
1676         Create a red root layer and a remote layer client that hosts it.
1677
1678         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
1679         Resize the root layer and tell the UI process that we've updated the geometry.
1680
1681 2011-11-08  Dan Bernstein  <mitz@apple.com>
1682
1683         <rdar://problem/10262225> Allow RenderView to have columns
1684         https://bugs.webkit.org/show_bug.cgi?id=71840
1685
1686         * win/WebKit2.def: Export Page::setPagination() for WebCoreTestSupport.
1687
1688 2011-11-08  Jon Lee  <jonlee@apple.com>
1689
1690         [WK2] Expose acceptMIMETypes for file inputs
1691         https://bugs.webkit.org/show_bug.cgi?id=71836
1692         <rdar://problem/10407367>
1693
1694         Reviewed by Anders Carlsson.
1695
1696         * Shared/WebOpenPanelParameters.cpp:
1697         (WebKit::WebOpenPanelParameters::acceptMIMETypes):
1698         * Shared/WebOpenPanelParameters.h:
1699         * UIProcess/API/C/WKOpenPanelParameters.cpp:
1700         (WKOpenPanelParametersCopyAcceptedMIMETypes):
1701         * UIProcess/API/C/WKOpenPanelParameters.h:
1702
1703 2011-11-08  Zan Dobersek  <zandobersek@gmail.com>
1704
1705         [WK2][GTK] The default database & local storage directory names should note they exist for Gtk port's needs
1706         https://bugs.webkit.org/show_bug.cgi?id=71837
1707
1708         Reviewed by Martin Robinson.
1709
1710         Ensure that directories for databases and local storage are in a 'webkitgtk'
1711         directory in current user's data directory, noting they originate from the Gtk port.
1712
1713         * UIProcess/gtk/WebContextGtk.cpp:
1714         (WebKit::WebContext::platformDefaultDatabaseDirectory):
1715         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
1716
1717 2011-11-08  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1718
1719         [Qt] Workaround some problems in QML API tests
1720         https://bugs.webkit.org/show_bug.cgi?id=71818
1721
1722         Reviewed by Tor Arne Vestbø.
1723
1724         This commit workaround the issue of QML's QtTest crashing when we run tests after
1725         "windowShown". We delay to the next run of the mainloop. This workaround is not
1726         pretty but shouldn't affect the semantics of the tests. And we benefit more from
1727         having working tests right now.
1728
1729         This patch also improves Download to: wait for the load before emitting click, and
1730         properly identifying the "succeeded" signal of the downloadItem object.
1731
1732         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_download.qml:
1733         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml:
1734         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_navigationPolicyForUrl.qml:
1735
1736 2011-11-08  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1737
1738         Clean up QtViewportInteractionEngine
1739
1740         Reviewed by Simon Hausmann.
1741
1742         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1743         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
1744         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
1745
1746             Rename the method to make it more obvious what it does. Avoid implicit
1747             conversion to/from QVariant.
1748
1749         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
1750         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
1751         (WebKit::QtViewportInteractionEngine::itemSizeChanged):
1752
1753             Only call this method on item size changes, and not for every interaction
1754             with the viewport item. Before this change it was even being called during
1755             animations.
1756
1757         * UIProcess/qt/QtViewportInteractionEngine.h:
1758         (WebKit::QtViewportInteractionEngine::scaleAnimationValueChanged):
1759
1760             Rename to make it clean that this is called from the animator.
1761
1762 2011-11-08  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1763
1764         [Qt] Improve the animation time constant
1765         https://bugs.webkit.org/show_bug.cgi?id=71790
1766
1767         Reviewed by Simon Hausmann.
1768
1769         Use 250 milliseconds instead of 400, which feels a lot more natural
1770         and makes the mini browser feel more responsive.
1771
1772         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1773
1774 2011-11-08  Alexis Menard  <alexis.menard@openbossa.org>
1775
1776         [Qt] Merge QtDesktopWebPageProxy and QtTouchWebPageProxy into QtWebPageProxy.
1777         https://bugs.webkit.org/show_bug.cgi?id=71355
1778
1779         Reviewed by Simon Hausmann.
1780
1781         As we try to unify our public API offer we need to merge our double
1782         WebPageProxy implementations first into a common class. That will help
1783         to merge our TouchWebView and DesktopWebView views into one class later.
1784         This commit just merge stuff around and doesn't contain any functional changes.
1785
1786         * Target.pri:
1787         * UIProcess/API/qt/qdesktopwebview.cpp:
1788         (QDesktopWebViewPrivate::init):
1789         * UIProcess/API/qt/qtouchwebpage.cpp:
1790         (QTouchWebPagePrivate::paintToCurrentGLContext):
1791         * UIProcess/API/qt/qtouchwebpage.h:
1792         * UIProcess/API/qt/qtouchwebpage_p.h:
1793         * UIProcess/API/qt/qtouchwebview.cpp:
1794         (QTouchWebViewPrivate::init):
1795         (QTouchWebViewPrivate::_q_viewportUpdated):
1796         (QTouchWebViewPrivate::_q_viewportTrajectoryVectorChanged):
1797         * UIProcess/API/qt/qtouchwebview_p.h:
1798         * UIProcess/qt/QtDesktopWebPageProxy.cpp: Removed.
1799         * UIProcess/qt/QtDesktopWebPageProxy.h: Removed.
1800         * UIProcess/qt/QtTouchWebPageProxy.cpp: Removed.
1801         * UIProcess/qt/QtTouchWebPageProxy.h: Removed.
1802         * UIProcess/qt/QtWebPageProxy.cpp:
1803         (dragOperationToDropAction):
1804         (QtWebPageProxy::QtWebPageProxy):
1805         (QtWebPageProxy::handleEvent):
1806         (QtWebPageProxy::handleMouseMoveEvent):
1807         (QtWebPageProxy::handleMousePressEvent):
1808         (QtWebPageProxy::handleMouseReleaseEvent):
1809         (QtWebPageProxy::handleMouseDoubleClickEvent):
1810         (QtWebPageProxy::handleWheelEvent):
1811         (QtWebPageProxy::handleHoverLeaveEvent):
1812         (QtWebPageProxy::handleHoverMoveEvent):
1813         (QtWebPageProxy::handleDragEnterEvent):
1814         (QtWebPageProxy::handleDragLeaveEvent):
1815         (QtWebPageProxy::handleDragMoveEvent):
1816         (QtWebPageProxy::handleDropEvent):
1817         (QtWebPageProxy::timerEvent):
1818         (QtWebPageProxy::processDidCrash):
1819         (QtWebPageProxy::didReceiveDownloadResponse):
1820         (QtWebPageProxy::paintContent):
1821         (QtWebPageProxy::createDrawingAreaProxy):
1822         (QtWebPageProxy::renderToCurrentGLContext):
1823         (QtWebPageProxy::doneWithTouchEvent):
1824         (QtWebPageProxy::setVisibleContentRectAndScale):
1825         (QtWebPageProxy::setVisibleContentRectTrajectoryVector):
1826         (QtWebPageProxy::touchEvent):
1827         (QtWebPageProxy::findZoomableAreaForPoint):
1828         * UIProcess/qt/QtWebPageProxy.h:
1829
1830 2011-11-08  Zan Dobersek  <zandobersek@gmail.com>
1831
1832         [WK2][GTK] Application cache directory is incorrectly set
1833         https://bugs.webkit.org/show_bug.cgi?id=70680
1834
1835         Reviewed by Philippe Normand.
1836
1837         Correctly set application cache directory to be in current
1838         user's default cache directory.
1839
1840         * UIProcess/gtk/WebContextGtk.cpp:
1841         (WebKit::WebContext::applicationCacheDirectory):
1842
1843 2011-11-07  Emil A Eklund  <eae@chromium.org>
1844
1845         Revert platform and scrolling to ints
1846         https://bugs.webkit.org/show_bug.cgi?id=71585
1847
1848         Reviewed by Eric Seidel.
1849
1850         Replace all uses of LayoutUnit and related types with ints in platform
1851         and scrolling code.
1852
1853         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
1854         (WebKit::BuiltInPDFView::invalidateScrollbarRect):
1855         (WebKit::BuiltInPDFView::visibleHeight):
1856         (WebKit::BuiltInPDFView::visibleWidth):
1857         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
1858
1859 2011-11-07  Adam Barth  <abarth@webkit.org>
1860
1861         Move DomainRelaxationForbidden scheme registry to SchemeRegistry
1862         https://bugs.webkit.org/show_bug.cgi?id=71750
1863
1864         Reviewed by Eric Seidel.
1865
1866         * WebProcess/WebProcess.cpp:
1867         (WebKit::WebProcess::setDomainRelaxationForbiddenForURLScheme):
1868
1869 2011-11-07  Beth Dakin  <bdakin@apple.com>
1870
1871         https://bugs.webkit.org/show_bug.cgi?id=71490
1872         Support uiStateTransitionProgress for scrollbars
1873         -and corresponding-
1874         <rdar://problem/9849612>
1875
1876         Reviewed by Sam Weinig.
1877
1878         Scrollbar::mouseUp() now takes a PlatformMouseEvent as a parameter.
1879         * UIProcess/win/WebPopupMenuProxyWin.cpp:
1880         (WebKit::WebPopupMenuProxyWin::onLButtonUp):
1881         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
1882         (WebKit::BuiltInPDFView::handleMouseEvent):
1883
1884 2011-11-07  Alexey Proskuryakov  <ap@apple.com>
1885
1886         The Full Keyboard Access preference should be read in the UI process
1887         https://bugs.webkit.org/show_bug.cgi?id=71734
1888         <rdar://problem/9237619>
1889
1890         Reviewed by Darin Adler.
1891
1892         This is consistent with how other global preferences (like language) are handled, and lets
1893         us tighten up the sandbox a little.
1894
1895         * Shared/WebProcessCreationParameters.cpp:
1896         (WebKit::WebProcessCreationParameters::encode):
1897         (WebKit::WebProcessCreationParameters::decode):
1898         * Shared/WebProcessCreationParameters.h:
1899         Added fullKeyboardAccessEnabled, so that newly started processes have the right preference value.
1900
1901         * UIProcess/WebContext.h:
1902         * UIProcess/WebContext.cpp:
1903         (WebKit::WebContext::fullKeyboardAccessModeChanged): If preference changes while a web process
1904         is already running, tell it.
1905         (WebKit::WebContext::ensureWebProcess): Set parameters.fullKeyboardAccessEnabled from current
1906         preference.
1907
1908         * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::fullKeyboardAccessEnabled):
1909         * UIProcess/mac/WebProcessProxyMac.mm: (WebKit::WebProcessProxy::fullKeyboardAccessEnabled):
1910         * UIProcess/WebProcessProxy.h:
1911         Proxy it to Objective-C code. WebProcessProxy is as good place to have the static function
1912         as any. One day, we will make code more consistent with language and other global preferences.
1913
1914         * UIProcess/mac/WKFullKeyboardAccessWatcher.h: Copied from Source/WebKit2/WebProcess/mac/WKFullKeyboardAccessWatcher.h.
1915         * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: Copied from Source/WebKit2/WebProcess/mac/WKFullKeyboardAccessWatcher.mm.
1916         * WebProcess/mac/WKFullKeyboardAccessWatcher.h: Removed.
1917         * WebProcess/mac/WKFullKeyboardAccessWatcher.mm: Removed.
1918         (-[WKFullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]): Once retrieved,
1919         push the preference value.
1920
1921         * WebKit2.xcodeproj/project.pbxproj: WKFullKeyboardAccessWatcher is now in UI process.
1922
1923         * WebProcess/WebProcess.h:
1924         * WebProcess/WebProcess.cpp:
1925         (WebKit::WebProcess::WebProcess):
1926         (WebKit::WebProcess::fullKeyboardAccessModeChanged):
1927         (WebKit::WebProcess::fullKeyboardAccessEnabled):
1928         * WebProcess/mac/WebProcessMac.mm:
1929         WebCprocess now holds the preference value in a mamber value, which UI process pushes
1930         updates to.
1931
1932         * WebProcess/WebProcess.messages.in: Added a message for changes preference value.
1933
1934         * WebProcess/com.apple.WebProcess.sb: We no longer need read access to com.apple.universalaccess.plist.
1935
1936 2011-11-07  Anders Carlsson  <andersca@apple.com>
1937
1938         Add TiledCoreAnimationDrawingArea stub classes
1939         https://bugs.webkit.org/show_bug.cgi?id=71729
1940
1941         Reviewed by Sam Weinig.
1942
1943         * Shared/DrawingAreaInfo.h:
1944         * UIProcess/API/mac/WKView.mm:
1945         (-[WKView _shouldUseTiledDrawingArea]):
1946         (-[WKView WebKit::]):
1947         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
1948         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: Copied from Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp.
1949         (WebKit::TiledCoreAnimationDrawingAreaProxy::create):
1950         (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
1951         (WebKit::TiledCoreAnimationDrawingAreaProxy::~TiledCoreAnimationDrawingAreaProxy):
1952         (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
1953         (WebKit::TiledCoreAnimationDrawingAreaProxy::sizeDidChange):
1954         * WebKit2.xcodeproj/project.pbxproj:
1955         * WebProcess/WebPage/DrawingArea.cpp:
1956         (WebKit::DrawingArea::create):
1957         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Copied from Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp.
1958         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: Copied from Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp.
1959         (WebKit::TiledCoreAnimationDrawingArea::create):
1960         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
1961         (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
1962         (WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplay):
1963         (WebKit::TiledCoreAnimationDrawingArea::scroll):
1964         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
1965         (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync):
1966
1967 2011-11-07  Anders Carlsson  <andersca@apple.com>
1968
1969         Follow-up build fix.
1970
1971         * WebProcess/WebPage/DrawingAreaImpl.h:
1972
1973 2011-11-07  Anders Carlsson  <andersca@apple.com>
1974
1975         Remove unused DrawingArea::syncCompositingLayers
1976         https://bugs.webkit.org/show_bug.cgi?id=71717
1977
1978         Reviewed by John Sullivan.
1979
1980         * WebProcess/WebPage/DrawingArea.h:
1981         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1982         * WebProcess/WebPage/TiledDrawingArea.h:
1983
1984 2011-11-07  Anders Carlsson  <andersca@apple.com>
1985
1986         Rename NetscapePlugin::wantsWindowRelativeNPWindowCoordinates to NetscapePlugin::wantsPluginRelativeNPWindowCoordinates
1987         https://bugs.webkit.org/show_bug.cgi?id=71708
1988
1989         Reviewed by Sam Weinig.
1990
1991         The name wantsPluginRelativeNPWindowCoordinates is more clear than wantsWindowRelativeNPWindowCoordinates. Rename the functions
1992         everywhere and, since the meaning is now inverted, invert the checks and return values.
1993
1994         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1995         (WebKit::NetscapePlugin::callSetWindow):
1996         (WebKit::NetscapePlugin::geometryDidChange):
1997         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1998         * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
1999         (WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
2000         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2001         (WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
2002         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2003         (WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
2004         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2005         (WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
2006
2007 2011-11-07  Anders Carlsson  <andersca@apple.com>
2008
2009         NetscapePlugin::wantsWindowRelativeNPWindowCoordinates should return false on Mac
2010         https://bugs.webkit.org/show_bug.cgi?id=71707
2011
2012         Reviewed by Sam Weinig.
2013
2014         This changes the way the fake Carbon plug-in window is positioned, so that it's always the same size
2015         and location as the plug-in (relative to the screen).
2016
2017         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2018         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2019         (WebKit::NetscapePlugin::platformGeometryDidChange):
2020         Call updateFakeWindowBounds.
2021
2022         (WebKit::NetscapePlugin::updateFakeWindowBounds):
2023         Convert the plug-in position to screen coordinates and set the window bounds to be the location and
2024         size of the plug-in, where the location is relative to the screen.
2025
2026         (WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates):
2027         Return false.
2028
2029         (WebKit::NetscapePlugin::windowAndViewFramesChanged):
2030         Call updateFakeWindowBounds.
2031
2032 2011-11-07  Sam Weinig  <sam@webkit.org>
2033
2034         WKPage.h should be in PrivateHeaders.
2035
2036         Rubber-stamped by Anders Carlsson.
2037
2038         * WebKit2.xcodeproj/project.pbxproj:
2039         Mark WKPage.h private.
2040
2041 2011-11-07  Anders Carlsson  <andersca@apple.com>
2042
2043         Simplify NetscapePlugin::convertPoint and make it work (in theory) with transformed plug-ins
2044         https://bugs.webkit.org/show_bug.cgi?id=71699
2045
2046         Reviewed by Sam Weinig.
2047
2048         Add a getScreenTransform function which given a coordinate space returns a transform that converts a
2049         point from that coordinate space to the screen coordinate space. We then get the source -> screen transform
2050         and the destination -> screen transform. We invert the destination -> screen transform, multiply it with the
2051         source -> screen transform and use mapPoint to get a complete affine transform from the source to the destination space
2052         and use mapPoint to map the source point and return the destination point.
2053
2054         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2055         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2056         (WebKit::NetscapePlugin::getScreenTransform):
2057         (WebKit::NetscapePlugin::convertPoint):
2058
2059         * WebProcess/Plugins/PluginView.cpp:
2060         (WebKit::PluginView::initializePlugin):
2061         Call windowAndViewFramesChanged before viewGeometryDidChange so that the window and view frames will be up to date by
2062         the time NPP_SetWindow is called in the plug-in.
2063
2064 2011-11-07  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2065
2066         [Qt] Put handling of gestures and their interaction in one place
2067         https://bugs.webkit.org/show_bug.cgi?id=71682
2068
2069         Reviewed by Simon Hausmann.
2070
2071         Before this patch, the interaction (ie. cancelling animations, events)
2072         was handled in the respective recognizers which then knew about each
2073         others.
2074
2075         * UIProcess/qt/QtGestureRecognizer.h:
2076         (WebKit::QtGestureRecognizer::isRecognized):
2077         * UIProcess/qt/QtPanGestureRecognizer.cpp:
2078         (WebKit::QtPanGestureRecognizer::recognize):
2079         * UIProcess/qt/QtPanGestureRecognizer.h:
2080         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
2081         (WebKit::QtPinchGestureRecognizer::recognize):
2082         * UIProcess/qt/QtPinchGestureRecognizer.h:
2083         * UIProcess/qt/QtTouchWebPageProxy.cpp:
2084         (QtTouchWebPageProxy::QtTouchWebPageProxy):
2085         (QtTouchWebPageProxy::doneWithTouchEvent):
2086         * UIProcess/qt/QtTouchWebPageProxy.h:
2087         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2088         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
2089         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
2090         (WebKit::QtViewportInteractionEngine::scrollAnimationActive):
2091         (WebKit::QtViewportInteractionEngine::interruptScrollAnimation):
2092         (WebKit::QtViewportInteractionEngine::panGestureActive):
2093         (WebKit::QtViewportInteractionEngine::scaleAnimationActive):
2094         (WebKit::QtViewportInteractionEngine::interruptScaleAnimation):
2095         (WebKit::QtViewportInteractionEngine::pinchGestureActive):
2096         * UIProcess/qt/QtViewportInteractionEngine.h:
2097
2098 2011-11-07  Simon Hausmann  <simon.hausmann@nokia.com>
2099
2100         [Qt] Make it possible to include qdesktopwebview.h from apps
2101
2102         Reviewed by Tor Arne Vestbø.
2103
2104         * UIProcess/API/qt/qdesktopwebview.h: Don't include C API headers, forward
2105         declare the structs manually.
2106
2107 2011-11-07  Simon Hausmann  <simon.hausmann@nokia.com>
2108
2109         [Qt] Fix failing inspector tests after build system changes
2110         https://bugs.webkit.org/show_bug.cgi?id=71677
2111
2112         Reviewed by Tor Arne Vestbø.
2113
2114         Ensure symbols from the qt resource system are referenced
2115         from outside the static webcore library. One way of doing that is
2116         to initialize the resources right away, as explained in the documentation
2117         of th Qt resource system.
2118
2119         * WebProcess/WebPage/qt/WebPageQt.cpp:
2120         (initResources):
2121         (WebKit::WebPage::platformInitialize):
2122
2123 2011-11-03  Anders Carlsson  <andersca@apple.com>
2124
2125         Add NetscapePlugin::convertFromRootView
2126         https://bugs.webkit.org/show_bug.cgi?id=71526
2127
2128         Reviewed by Sam Weinig.
2129
2130         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2131         (WebKit::NetscapePlugin::convertFromRootView):
2132         New function that converts a point from root view coordinates to plug-in coordinates.
2133         Returns false if the conversion can't be done.
2134
2135         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2136         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2137         (WebKit::fillInCocoaEventFromMouseEvent):
2138         (WebKit::initializeMouseEvent):
2139         (WebKit::NetscapePlugin::platformHandleMouseEvent):
2140         (WebKit::NetscapePlugin::platformHandleWheelEvent):
2141         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
2142         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
2143         Use convertFromRootView instead of subtracting m_frameRectInWindowCoordinates.location() from the
2144         event position (which is in root view coordinates).
2145
2146 2011-11-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2147
2148         [Qt] Refactor and clean up the qmake build system
2149
2150         The qmake build system has accumulated a bit of cruft and redundancy
2151         over time. There's also a fairly tight coupling between how to build
2152         the various targets, and _what_ to build, making it harder to add new
2153         rules or sources. This patch aims to elevate these issues somewhat.
2154
2155         This is a short-list of the changes:
2156
2157           * The rules for how to build targets are now mostly contained as
2158             prf-files in Tools/qmake/mkspecs/features. Using mkspecs also
2159             allows us to do pre- and post-processing of each project file,
2160             which helps to clean up the actual project files.
2161
2162           * Derived sources are no longer generated as a separate make-step
2163             but is part of each target's project file as a subdir. Makefile
2164             rules are used to ensure that we run make on the derived sources
2165             before running qmake on the actual target makefile. This makes
2166             it easier to keep a proper dependency between derived sources
2167             and the target.
2168
2169           * We use GNU make and the compiler to generate dependencies on
2170             UNIX-based systems running Qt 5. This allows us to lessen the
2171             need to run qmake, which should reduce compile time.
2172
2173           * WebKit2 is now build by default if building with Qt 5. It can
2174             be disabled by passing --no-webkit2 to build-webkit.
2175
2176         The result of these changes are hopefully a cleaner and easier
2177         build system to modify, and faster build times due to no longer
2178         running qmake on every single build. It's also a first step
2179         towards possibly generating the list of sources using another
2180         build system.
2181
2182         https://bugs.webkit.org/show_bug.cgi?id=71222
2183
2184         Reviewed by Simon Hausmann.
2185
2186         * DerivedSources.pri: Renamed from Source/WebKit2/DerivedSources.pro.
2187         * Target.pri: Copied from Source/WebKit2/WebKit2.pro.
2188         * UIProcess/API/qt/tests/tests.pri:
2189         * UIProcess/API/qt/tests/tests.pro: Removed.
2190         * WebKit2.pri:
2191         * WebKit2.pro:
2192         * WebKit2API.pri: Removed.
2193         * WebProcess.pro:
2194
2195 2011-11-04  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2196
2197         [Qt] Support programmatic scrolling with the QTouchWebView
2198
2199         Reviewed by Simon Hausmann.
2200
2201         As more code can be shared between the programmatic scrolling and the
2202         method for ensuring that the contents are within valid bounds, this
2203         patch includes a bit of refactoring as well.
2204
2205         * UIProcess/API/qt/qdesktopwebview_p.h:
2206         (QDesktopWebViewPrivate::scrollPositionRequested):
2207         * UIProcess/API/qt/qtouchwebview.cpp:
2208         (QTouchWebViewPrivate::scrollPositionRequested):
2209         * UIProcess/API/qt/qtouchwebview_p.h:
2210         * UIProcess/qt/QtTouchViewInterface.cpp:
2211         (WebKit::QtTouchViewInterface::scrollPositionRequested):
2212         * UIProcess/qt/QtTouchViewInterface.h:
2213         * UIProcess/qt/QtViewInterface.h:
2214         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2215         (WebKit::QtViewportInteractionEngine::event):
2216         (WebKit::boundPosition):
2217         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
2218         (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
2219         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
2220         (WebKit::QtViewportInteractionEngine::setConstraints):
2221         (WebKit::QtViewportInteractionEngine::pinchGestureEnded):
2222         (WebKit::QtViewportInteractionEngine::contentViewportChanged):
2223         * UIProcess/qt/QtViewportInteractionEngine.h:
2224         * UIProcess/qt/QtWebPageProxy.cpp:
2225         (QtWebPageProxy::pageDidRequestScroll):
2226         * UIProcess/qt/QtWebPageProxy.h:
2227
2228 2011-11-03  Mark Hahnenberg  <mhahnenberg@apple.com>
2229
2230         De-virtualize JSObject::getPropertyNames
2231         https://bugs.webkit.org/show_bug.cgi?id=71306
2232
2233         Reviewed by Darin Adler.
2234
2235         Added getPropertyNames to the MethodTable, changed all the virtual 
2236         implementations of getPropertyNames to static ones, and replaced 
2237         all call sites with corresponding lookups in the MethodTable.
2238
2239         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2240         (WebKit::NPJSObject::enumerate):
2241
2242 2011-11-03  Anders Carlsson  <andersca@apple.com>
2243
2244         Get rid of NetscapePlugin::m_clipRectInWindowCoordinates
2245         https://bugs.webkit.org/show_bug.cgi?id=71521
2246
2247         Reviewed by Dan Bernstein.
2248
2249         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2250         (WebKit::NetscapePlugin::geometryDidChange):
2251         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2252
2253 2011-11-03  Anders Carlsson  <andersca@apple.com>
2254
2255         Use convertToRootView(IntPoint()) instead of m_frameRectInWindowCoordinates.location() where possible
2256         https://bugs.webkit.org/show_bug.cgi?id=71520
2257
2258         Reviewed by Dan Bernstein.
2259
2260         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2261         (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate):
2262         (WebKit::NetscapePlugin::platformPaint):
2263         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2264         (WebKit::NetscapePlugin::platformHandleMouseEvent):
2265         (WebKit::NetscapePlugin::platformHandleWheelEvent):
2266         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
2267         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
2268
2269 2011-11-03  Anders Carlsson  <andersca@apple.com>
2270
2271         Add NetscapePlugin::convertToRootView
2272         https://bugs.webkit.org/show_bug.cgi?id=71519
2273
2274         Reviewed by Darin Adler.
2275
2276         Yet another step towards eliminating uses of m_frameRectInWindowCoordinates.
2277
2278         Also, use the "root view" terminology, since that's really what we mean here.
2279
2280         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2281         (WebKit::NetscapePlugin::callSetWindow):
2282         Use convertToRootView to get the plug-in location and clip rect in root view coordinates.
2283
2284         (WebKit::NetscapePlugin::convertToRootView):
2285         Apply the m_pluginToRootViewTransform.mapPoint transform.
2286
2287         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2288         Add convertToRootView.
2289
2290 2011-11-03  Anders Carlsson  <andersca@apple.com>
2291
2292         Move plug-in size and backing store checks to PluginProxy::updateBackingStore
2293         https://bugs.webkit.org/show_bug.cgi?id=71508
2294
2295         Reviewed by Darin Adler.
2296
2297         * WebProcess/Plugins/PluginProxy.cpp:
2298         (WebKit::PluginProxy::geometryDidChange):
2299         Remove code to send back an empty backing store if the plug-in size is empty
2300         or doesn't need a backing store. This check is now done...
2301
2302         (WebKit::PluginProxy::updateBackingStore):
2303         ...here.
2304
2305 2011-11-03  Anders Carlsson  <andersca@apple.com>
2306
2307         Get rid of PluginControllerProxy::m_frameRectInWindowCoordinates
2308         https://bugs.webkit.org/show_bug.cgi?id=71506
2309
2310         Reviewed by Darin Adler.
2311
2312         * PluginProcess/PluginControllerProxy.cpp:
2313         (WebKit::PluginControllerProxy::geometryDidChange):
2314         This no longer needs to take the frame rect in window coordinates.
2315
2316         * PluginProcess/PluginControllerProxy.h:
2317         * PluginProcess/PluginControllerProxy.messages.in:
2318         Remove frameRectInWindowCoordinates from the GeometryDidChange message.
2319
2320         * WebProcess/Plugins/PluginProxy.cpp:
2321         (WebKit::PluginProxy::geometryDidChange):
2322         Don't pass frameRectInWindowCoordinates when sending GeometryDidChange.
2323
2324 2011-11-03  Anders Carlsson  <andersca@apple.com>
2325
2326         Get rid of Plugin::wantsWindowRelativeCoordinates()
2327         https://bugs.webkit.org/show_bug.cgi?id=71504
2328
2329         Reviewed by Darin Adler.
2330
2331         Since all Plugin subclasses now return false for wantsWindowRelativeCoordinates,
2332         we can go ahead and remove it.
2333
2334         * PluginProcess/PluginControllerProxy.cpp:
2335         (WebKit::PluginControllerProxy::paint):
2336         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2337         (WebKit::NetscapePlugin::snapshot):
2338         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2339         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
2340         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
2341         * WebProcess/Plugins/Plugin.h:
2342         * WebProcess/Plugins/PluginProxy.cpp:
2343         * WebProcess/Plugins/PluginProxy.h:
2344         * WebProcess/Plugins/PluginView.cpp:
2345         (WebKit::PluginView::paint):
2346
2347 2011-11-03  Anders Carlsson  <andersca@apple.com>
2348
2349         NetscapePlugin::wantsWindowRelativeCoordinates should return false for all ports
2350         https://bugs.webkit.org/show_bug.cgi?id=71501
2351
2352         Reviewed by Darin Adler.
2353
2354         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2355         (WebKit::NetscapePlugin::wantsWindowRelativeCoordinates):
2356         Return false.
2357
2358         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2359         (WebKit::NetscapePlugin::platformGeometryDidChange):
2360         Use m_pluginSize instead of m_frameRectInWindowCoordinates.size().
2361
2362         (WebKit::NetscapePlugin::platformPaint):
2363         No need to translate back and forth between window and plug-in relative coordinates anymore.
2364
2365 2011-11-03  Darin Adler  <darin@apple.com>
2366
2367         Change remaining callers of releaseRef to call leakRef
2368         https://bugs.webkit.org/show_bug.cgi?id=71422
2369
2370         Reviewed by Darin Fisher.
2371
2372         * Platform/mac/ModuleMac.mm:
2373         (WebKit::Module::load):
2374         * Shared/API/c/WKArray.cpp:
2375         (WKArrayCreate):
2376         * Shared/API/c/WKData.cpp:
2377         (WKDataCreate):
2378         * Shared/API/c/WKDictionary.cpp:
2379         (WKDictionaryCopyKeys):
2380         * Shared/API/c/WKGeometry.cpp:
2381         (WKPointCreate):
2382         (WKSizeCreate):
2383         (WKRectCreate):
2384         * Shared/API/c/WKMutableArray.cpp:
2385         (WKMutableArrayCreate):
2386         * Shared/API/c/WKMutableDictionary.cpp:
2387         (WKMutableDictionaryCreate):
2388         * Shared/API/c/WKNumber.cpp:
2389         (WKBooleanCreate):
2390         (WKDoubleCreate):
2391         (WKUInt64Create):
2392         * Shared/API/c/WKSharedAPICast.h:
2393         (WebKit::toCopiedAPI):
2394         (WebKit::toCopiedURLAPI):
2395         * Shared/API/c/cf/WKErrorCF.cpp:
2396         (WKErrorCreateWithCFError):
2397         * Shared/API/c/cf/WKURLRequestCF.cpp:
2398         (WKURLRequestCreateWithCFURLRequest):
2399         * Shared/API/c/cf/WKURLResponseCF.cpp:
2400         (WKURLResponseCreateWithCFURLResponse):
2401         * Shared/API/c/mac/WKURLRequestNS.mm:
2402         (WKURLRequestCreateWithNSURLRequest):
2403         * Shared/API/c/mac/WKURLResponseNS.mm:
2404         (WKURLResponseCreateWithNSURLResponse):
2405         * Shared/cf/ArgumentCodersCF.cpp:
2406         (CoreIPC::decode):
2407         * UIProcess/API/C/WKBackForwardList.cpp:
2408         (WKBackForwardListCopyBackListWithLimit):
2409         (WKBackForwardListCopyForwardListWithLimit):
2410         * UIProcess/API/C/WKContext.cpp:
2411         (WKContextCreate):
2412         (WKContextCreateWithInjectedBundlePath):
2413         * UIProcess/API/C/WKCredential.cpp:
2414         (WKCredentialCreate):
2415         (WKCredentialCreateWithCertificateInfo):
2416         * UIProcess/API/C/WKDatabaseManager.cpp:
2417         (WKDatabaseManagerGetOriginKey):
2418         (WKDatabaseManagerGetOriginQuotaKey):
2419         (WKDatabaseManagerGetOriginUsageKey):
2420         (WKDatabaseManagerGetDatabaseDetailsKey):
2421         (WKDatabaseManagerGetDatabaseDetailsNameKey):
2422         (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
2423         (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
2424         (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
2425         * UIProcess/API/C/WKFrame.cpp:
2426         (WKFrameCopyChildFrames):
2427         * UIProcess/API/C/WKGeolocationPosition.cpp:
2428         (WKGeolocationPositionCreate):
2429         * UIProcess/API/C/WKGrammarDetail.cpp:
2430         (WKGrammarDetailCreate):
2431         * UIProcess/API/C/WKPage.cpp:
2432         (WKPageGetSessionHistoryURLValueType):
2433         (WKPageCopySessionState):
2434         * UIProcess/API/C/WKPreferences.cpp:
2435         (WKPreferencesCreateWithIdentifier):
2436         * UIProcess/API/C/win/WKView.cpp:
2437         (WKViewCreate):
2438         * UIProcess/win/WebUndoClient.cpp:
2439         (WebKit::WebUndoClient::registerEditCommand):
2440         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2441         (WKBundleFrameCopyChildFrames):
2442         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
2443         (WKBundleNodeHandleCreate):
2444         (WKBundleNodeHandleCopyDocument):
2445         (WKBundleNodeHandleCopyHTMLTableCellElementCellAbove):
2446         (WKBundleNodeHandleCopyDocumentFrame):
2447         (WKBundleNodeHandleCopyHTMLFrameElementContentFrame):
2448         (WKBundleNodeHandleCopyHTMLIFrameElementContentFrame):
2449         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2450         (WKBundlePageCopyTrackedRepaintRects):
2451         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
2452         (WKBundleScriptWorldCreateWorld):
2453         Use leakRef.
2454
2455 2011-11-02  Darin Adler  <darin@apple.com>
2456
2457         Change remaining callers of releaseRef to call leakRef
2458         https://bugs.webkit.org/show_bug.cgi?id=71422
2459
2460         Reviewed by Darin Fisher.
2461
2462         * Platform/mac/ModuleMac.mm:
2463         (WebKit::Module::load): Use leakRef.
2464         (WebKit::Module::unload): Use leakRef, and cast to void
2465         to avoid unused return value warning.
2466
2467         * Shared/API/c/WKArray.cpp:
2468         (WKArrayCreate):
2469         * Shared/API/c/WKData.cpp:
2470         (WKDataCreate):
2471         * Shared/API/c/WKDictionary.cpp:
2472         (WKDictionaryCopyKeys):
2473         * Shared/API/c/WKGeometry.cpp:
2474         (WKPointCreate):
2475         (WKSizeCreate):
2476         (WKRectCreate):
2477         * Shared/API/c/WKMutableArray.cpp:
2478         (WKMutableArrayCreate):
2479         * Shared/API/c/WKMutableDictionary.cpp:
2480         (WKMutableDictionaryCreate):
2481         * Shared/API/c/WKNumber.cpp:
2482         (WKBooleanCreate):
2483         (WKDoubleCreate):
2484         (WKUInt64Create):
2485         * Shared/API/c/WKSharedAPICast.h:
2486         (WebKit::toCopiedAPI):
2487         (WebKit::toCopiedURLAPI):
2488         * Shared/API/c/cf/WKErrorCF.cpp:
2489         (WKErrorCreateWithCFError):
2490         * Shared/API/c/cf/WKURLRequestCF.cpp:
2491         (WKURLRequestCreateWithCFURLRequest):
2492         * Shared/API/c/cf/WKURLResponseCF.cpp:
2493         (WKURLResponseCreateWithCFURLResponse):
2494         * Shared/API/c/mac/WKURLRequestNS.mm:
2495         (WKURLRequestCreateWithNSURLRequest):
2496         * Shared/API/c/mac/WKURLResponseNS.mm:
2497         (WKURLResponseCreateWithNSURLResponse):
2498         * Shared/cf/ArgumentCodersCF.cpp:
2499         (CoreIPC::decode):
2500         * UIProcess/API/C/WKBackForwardList.cpp:
2501         (WKBackForwardListCopyBackListWithLimit):
2502         (WKBackForwardListCopyForwardListWithLimit):
2503         * UIProcess/API/C/WKContext.cpp:
2504         (WKContextCreate):
2505         (WKContextCreateWithInjectedBundlePath):
2506         * UIProcess/API/C/WKCredential.cpp:
2507         (WKCredentialCreate):
2508         (WKCredentialCreateWithCertificateInfo):
2509         * UIProcess/API/C/WKDatabaseManager.cpp:
2510         (WKDatabaseManagerGetOriginKey):
2511         (WKDatabaseManagerGetOriginQuotaKey):
2512         (WKDatabaseManagerGetOriginUsageKey):
2513         (WKDatabaseManagerGetDatabaseDetailsKey):
2514         (WKDatabaseManagerGetDatabaseDetailsNameKey):
2515         (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
2516         (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
2517         (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
2518         * UIProcess/API/C/WKFrame.cpp:
2519         (WKFrameCopyChildFrames):
2520         * UIProcess/API/C/WKGeolocationPosition.cpp:
2521         (WKGeolocationPositionCreate):
2522         * UIProcess/API/C/WKGrammarDetail.cpp:
2523         (WKGrammarDetailCreate):
2524         * UIProcess/API/C/WKPage.cpp:
2525         (WKPageGetSessionHistoryURLValueType):
2526         (WKPageCopySessionState):
2527         * UIProcess/API/C/WKPreferences.cpp:
2528         (WKPreferencesCreateWithIdentifier):
2529         * UIProcess/API/C/win/WKView.cpp:
2530         (WKViewCreate):
2531         * UIProcess/win/WebUndoClient.cpp:
2532         (WebKit::WebUndoClient::registerEditCommand):
2533         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2534         (WKBundleFrameCopyChildFrames):
2535         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
2536         (WKBundleNodeHandleCreate):
2537         (WKBundleNodeHandleCopyDocument):
2538         (WKBundleNodeHandleCopyHTMLTableCellElementCellAbove):
2539         (WKBundleNodeHandleCopyDocumentFrame):
2540         (WKBundleNodeHandleCopyHTMLFrameElementContentFrame):
2541         (WKBundleNodeHandleCopyHTMLIFrameElementContentFrame):
2542         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2543         (WKBundlePageCopyTrackedRepaintRects):
2544         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
2545         (WKBundleScriptWorldCreateWorld):
2546         Use leakRef.
2547
2548 2011-11-03  Anders Carlsson  <andersca@apple.com>
2549
2550         NetscapePlugin should use plug-in relative coordinates on Mac
2551         https://bugs.webkit.org/show_bug.cgi?id=71486
2552
2553         Reviewed by Adam Roben.
2554
2555         * PluginProcess/PluginControllerProxy.cpp:
2556         (WebKit::PluginControllerProxy::paint):
2557         Don't translate the graphics context when the plug-in doesn't want window relative coordinates.
2558         This also fixed a bug I introduced in my previous commit where we'd always pass the dirty rect in
2559         plug-in coordinates even if the plug-in wants window relative coordinates.
2560
2561         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2562         (WebKit::NetscapePlugin::snapshot):
2563         Don't do the whole translate dance if the plug-in doesn't want window relative coordinates.
2564
2565         (WebKit::NetscapePlugin::wantsWindowRelativeCoordinates):
2566         Return false for PLATFORM_ARCHITECTURE(MAC).
2567
2568         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2569         (WebKit::NetscapePlugin::platformPaint):
2570         Simplify code now that we know that the we're always given plug-in relative coordinates.
2571
2572 2011-11-03  Anders Carlsson  <andersca@apple.com>
2573
2574         PluginControllerProxy's dirty rect should be in plug-in coordinates
2575         https://bugs.webkit.org/show_bug.cgi?id=71481
2576
2577         Reviewed by Sam Weinig.
2578
2579         * PluginProcess/PluginControllerProxy.cpp:
2580         (WebKit::PluginControllerProxy::paint):
2581         Convert the dirty rect to window coordinates before passing it to the plug-in.
2582
2583         (WebKit::PluginControllerProxy::invalidate):
2584         No need to convert the dirty rect to window coordinates.
2585
2586         (WebKit::PluginControllerProxy::paintEntirePlugin):
2587         Use m_pluginSize instead of m_frameRectInWindowCoordinates.isEmpty.
2588
2589 2011-11-03  Anders Carlsson  <andersca@apple.com>
2590
2591         Use the right function to determine whether NPWindow coordinates should be window relative
2592         https://bugs.webkit.org/show_bug.cgi?id=71480
2593
2594         Reviewed by Adam Roben.
2595
2596         We want to use wantsWindowRelativeNPWindowCoordinates here, and not wantsWindowRelativeCoordinates
2597         which is a temporary function that will be removed (and that returns the wrong value!)
2598
2599         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2600         (WebKit::NetscapePlugin::geometryDidChange):
2601
2602 2011-11-03  Simon Hausmann  <simon.hausmann@nokia.com>
2603
2604         Unreviewed build fix after r99195.
2605
2606         The right name is restrictMinimumScaleFactorToViewportSize.
2607
2608         * UIProcess/API/qt/qtouchwebview.cpp:
2609         (QTouchWebViewPrivate::updateViewportConstraints):
2610
2611 2011-11-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2612
2613         [GTK] Use WEBKIT_API instead of WK_EXPORT in WebKitEnumTypes.h
2614         https://bugs.webkit.org/show_bug.cgi?id=71457
2615
2616         Reviewed by Martin Robinson.
2617
2618         * GNUmakefile.am:
2619
2620 2011-11-03  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2621
2622         [Qt] Bounce back limits are wrong in some situations
2623         https://bugs.webkit.org/show_bug.cgi?id=71471
2624
2625         Reviewed by Simon Hausmann.
2626
2627         The valid position points were in viewport coordinates, but we were
2628         requiring valid position points in content coordinates.
2629
2630         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2631         (WebKit::QtViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
2632
2633 2011-11-03  Fady Samuel  <fsamuel@chromium.org>
2634
2635         Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
2636         https://bugs.webkit.org/show_bug.cgi?id=70609
2637
2638         Reviewed by Kenneth Rohde Christiansen.
2639
2640         * UIProcess/API/qt/qtouchwebview.cpp:
2641         (QTouchWebViewPrivate::updateViewportConstraints):
2642         * WebProcess/WebPage/WebPage.cpp:
2643         (WebKit::WebPage::viewportConfigurationAsText):
2644
2645 2011-11-03  Andras Becsi  <andras.becsi@nokia.com>
2646
2647         [Qt][WK2] Fix the signal signature of the loadFailed API test.
2648
2649         Rubber-stamped by Simon Hausmann.
2650
2651         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
2652         (WebViewAbstraction::touchViewLoadFailed):
2653         (WebViewAbstraction::desktopViewLoadFailed):
2654
2655 2011-11-03  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2656
2657         [Qt] Fix an assertion under WebPage::setViewportSize.
2658         https://bugs.webkit.org/show_bug.cgi?id=71473
2659
2660         Reviewed by Simon Hausmann.
2661
2662         The web view can have an empty size and it causes the assert in computeViewportAttributes.
2663         Don't notify the web page of such a size change in this case.
2664
2665         * UIProcess/API/qt/qtouchwebview.cpp:
2666         (QTouchWebViewPrivate::updateViewportSize):
2667
2668 2011-11-03  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2669
2670         [WK2] State variable name refactor in WebPageProxy.cpp
2671         https://bugs.webkit.org/show_bug.cgi?id=71467
2672
2673         Reviewed by Andreas Kling.
2674
2675         Renaming m_inDecidePolicyForMIMEType to m_inDecidePolicyForResponse after
2676         https://bugs.webkit.org/show_bug.cgi?id=55827 .
2677
2678         * UIProcess/WebPageProxy.cpp:
2679         (WebKit::WebPageProxy::WebPageProxy):
2680         (WebKit::WebPageProxy::receivedPolicyDecision):
2681         (WebKit::WebPageProxy::decidePolicyForResponse):
2682         * UIProcess/WebPageProxy.h:
2683
2684 2011-11-03  Nayan Kumar K  <nayankk@motorola.com>
2685
2686         [GTK][WEBKIT2] Add support for title property in WebKitWebView.
2687         https://bugs.webkit.org/show_bug.cgi?id=68074
2688
2689         Reviewed by Philippe Normand.
2690
2691         Support for 'title' property is added in WebKitWebView.
2692         Functions to get the value of this property is provided.
2693
2694         * UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
2695         (didReceiveTitleForFrame): LoaderClient titleRecieve callback.
2696         (webkitWebLoaderClientAttachLoaderClientToPage): Register didReceiveTitleForFrame callback.
2697         * UIProcess/API/gtk/WebKitWebView.cpp:
2698         (webkitWebViewGetProperty): 'title' property get function.
2699         (webkit_web_view_class_init): Register new property.
2700         (webkitWebViewSetTitle): Notify WebKitWebView about title receive.
2701         (webkit_web_view_get_title): API to get main frame title.
2702         * UIProcess/API/gtk/WebKitWebView.h: webkit_web_view_get_title API expose.
2703         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Added private API.
2704         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
2705         (testWebViewTitle): Test webkit_web_view_get_title API.
2706         (beforeAll): Add testWebViewTitle test.
2707
2708 2011-11-03  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2709
2710         [Qt][WK2] Download support and API in UIProcess
2711         https://bugs.webkit.org/show_bug.cgi?id=68962
2712
2713         Reviewed by Simon Hausmann.
2714
2715         We implement our WkContextDownloadClient and the needed callbacks.
2716         We also add APIs by exposing QWebDownloadItem. Objects from this type
2717         have their ownership handled by QDesktopWebView and will be created or
2718         destroyed as needed. Classes implementing ViewInterface (QDesktopWebViewPrivate
2719         and TouchViewInterface) will receive a signal (downloadRequested) with a pointer
2720         to the recently created QWebDownloadItem. With that they can connect the proper
2721         signals and slots, set the download destination path and then call start().
2722         Objects of this type will provide the progress of a download, a slot to cancel it,
2723         and signals for getting finished or failure status.
2724         QWebDownloadItem was also exposed in QML.
2725         Qt needed an asynchronous way for UIProcess to return a destination path to WebProcess,
2726         therefore the startTransfer API was added to WebKit2's Download handlers.
2727
2728         * Shared/qt/WebCoreArgumentCodersQt.cpp:
2729         (CoreIPC::::encode):
2730         (CoreIPC::::decode):
2731         Add encoding and decoding of suggestedFilename for ResourceResponse.
2732
2733         * UIProcess/API/qt/WKView.h:
2734         * UIProcess/API/qt/qbasewebview.h: Add signal downloadRequested.
2735         * UIProcess/API/qt/qdesktopwebview.cpp:
2736         (QDesktopWebViewPrivate::downloadRequested):
2737         * UIProcess/API/qt/qdesktopwebview_p.h:
2738
2739         * UIProcess/API/qt/qwebdownloaditem.cpp: Added.
2740         (QWebDownloadItemPrivate::QWebDownloadItemPrivate):
2741         (QWebDownloadItem::QWebDownloadItem):
2742         (QWebDownloadItem::~QWebDownloadItem):
2743         (QWebDownloadItem::url):
2744         (QWebDownloadItem::destinationPath):
2745         (QWebDownloadItem::setDestinationPath):
2746         (QWebDownloadItem::suggestedFilename):
2747         (QWebDownloadItem::mimeType):
2748         (QWebDownloadItem::expectedContentLength):
2749         (QWebDownloadItem::totalBytesReceived):
2750         (QWebDownloadItem::cancel):
2751         (QWebDownloadItem::start):
2752         * UIProcess/API/qt/qwebdownloaditem.h: Added.
2753         * UIProcess/API/qt/qwebdownloaditem_p.h: Added.
2754         (QWebDownloadItemPrivate::didReceiveResponse):
2755
2756         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_download.qml: Added.
2757         * UIProcess/API/qt/tests/qmltests/common/download.html: Added.
2758         * UIProcess/API/qt/tests/qmltests/common/download.zip: Added.
2759         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
2760
2761         * UIProcess/Downloads/DownloadProxy.cpp:
2762         (WebKit::DownloadProxy::startTransfer): Qt only function added.
2763         * UIProcess/Downloads/DownloadProxy.h:
2764
2765         * UIProcess/PageClient.h: Added Qt specific function to call handleDownloadRequest from QtWebPageProxy.
2766
2767         * UIProcess/WebContext.cpp:
2768         (WebKit::WebContext::download):
2769         Using WebPageProxy::handleDownloadRequest to bootstrap a download through PageClient.
2770
2771         * UIProcess/WebPageProxy.cpp:
2772         (WebKit::WebPageProxy::receivedPolicyDecision):
2773         Using handleDownloadRequest() to bootstrap a download through PageClient.
2774         (WebKit::WebPageProxy::handleDownloadRequest): Calls PageClient::handleDownloadRequest().
2775         * UIProcess/WebPageProxy.h:
2776
2777         * UIProcess/qt/QtDownloadManager.cpp: Added.
2778         (WebKit::toQtDownloadManager):
2779         (WebKit::qt_wk_didReceiveResponse):
2780         (WebKit::qt_wk_didCreateDestination):
2781         (WebKit::qt_wk_didFinishDownload):
2782         (WebKit::qt_wk_didFailDownload):
2783         (WebKit::qt_wk_didReceiveDataForDownload):
2784         (QtDownloadManager::downloadReceivedResponse): Will reach QtWebPageProxy::didReceiveDownloadResponse.
2785         (QtDownloadManager::downloadCreatedDestination):
2786         (QtDownloadManager::downloadFinished):
2787         (QtDownloadManager::downloadFailed):
2788         (QtDownloadManager::downloadDataReceived):
2789         * UIProcess/qt/QtDownloadManager.h: Added.
2790         Bootstrap our WKContextDownloadClient and set its callbacks.
2791         This entity will also handle all downloads and keep a map of them.
2792         It will be kept alive together with the WebContext as a static member
2793         of QtWebPageProxy, so we can keep it across several WebPages and, therefore,
2794         WebViews.
2795
2796         * UIProcess/qt/QtWebPageProxy.cpp:
2797         (QtWebPageProxy::defaultWKContext):
2798         (QtWebPageProxy::~QtWebPageProxy):
2799         (QtWebPageProxy::handleDownloadRequest):
2800         (QtWebPageProxy::didReceiveDownloadResponse):
2801         * UIProcess/qt/QtWebPageProxy.h:
2802         From now on it will keep a static QtDownloadManager to live together
2803         with the default WebContext. It implements PageClient::handleDownloadRequest.
2804         QtWebPageProxy::didReceiveDownloadResponse will emit the view's signal downloadRequested.
2805
2806        * UIProcess/qt/QtTouchViewInterface.h:
2807         (WebKit::QtTouchViewInterface::downloadRequested):
2808         * UIProcess/qt/QtViewInterface.h:
2809
2810         * UIProcess/qt/qweberror.cpp:
2811         (QWebError::description):
2812         * UIProcess/qt/qweberror.h:
2813         (QWebError::errorCodeAsDownloadError):
2814         Add Download error handling to QWebError and a new API
2815         to retrieve the error description from the original ResourceError.
2816         Also, it now has QWebDownloadItem::DownloadError errorCodeAsDownloadError()
2817         that returns the error code as a DownloadError.
2818
2819         * WebKit2.pro:
2820         * WebKit2API.pri:
2821
2822         * WebProcess/Downloads/Download.h:
2823         * WebProcess/Downloads/DownloadManager.cpp:
2824         (WebKit::DownloadManager::startTransfer):
2825         * WebProcess/Downloads/DownloadManager.h:
2826         Adding Qt specific startTransfer function.
2827
2828         * WebProcess/Downloads/qt/DownloadQt.cpp:
2829         (WebKit::Download::start):
2830         (WebKit::Download::startWithHandle):
2831         (WebKit::Download::didDecideDestination):
2832         (WebKit::Download::startTransfer):
2833         * WebProcess/Downloads/qt/QtFileDownloader.cpp:
2834         (WebKit::QtFileDownloader::init): start() was renamed to init().
2835         (WebKit::QtFileDownloader::determineFilename):
2836         Calling onReadyRead() here was unnecessary and it was triggering the overall
2837         download process even before DownloadManager finished startDownload(). This
2838         was leading to a DownloadManager with an empty list of downloads.
2839         (WebKit::QtFileDownloader::startTransfer): decidedDestination() became startTransfer().
2840         (WebKit::QtFileDownloader::abortDownloadWritingAndEmitError):
2841         (WebKit::QtFileDownloader::handleDownloadResponse):
2842         (WebKit::QtFileDownloader::onReadyRead):
2843         (WebKit::QtFileDownloader::onFinished):
2844         (WebKit::QtFileDownloader::cancel):
2845         * WebProcess/Downloads/qt/QtFileDownloader.h:
2846
2847         * WebProcess/WebProcess.cpp:
2848         (WebKit::WebProcess::startTransfer):
2849         * WebProcess/WebProcess.h:
2850         * WebProcess/WebProcess.messages.in:
2851         Adding Qt specific message StartTransfer and handling function.
2852
2853 2011-11-03  Nayan Kumar K  <nayankk@motorola.com>
2854
2855         Add webkit_web_view_load_html and webkit_web_view_load_plain_text APIs.
2856         https://bugs.webkit.org/show_bug.cgi?id=69249
2857
2858         Reviewed by Philippe Normand.
2859
2860         This patch adds support for 2 more load APIs, namely
2861         webkit_web_view_load_html and webkit_web_view_load_plain_text.
2862
2863         * UIProcess/API/gtk/WebKitWebView.cpp:
2864         (webkit_web_view_load_html): New API to load html string.
2865         (webkit_web_view_load_plain_text): New API to load plain text.
2866         * UIProcess/API/gtk/WebKitWebView.h: Public API addition.
2867         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
2868         (testLoadHtml): Test webkit_web_view_load_html API.
2869         (testLoadPlainText): Test webkit_web_view_load_plain_text API.
2870         (beforeAll): Add new tests.
2871         * UIProcess/API/gtk/tests/WebViewTest.cpp:
2872         (WebViewTest::loadHtml): Test webkit_web_view_load_html API.
2873         (WebViewTest::loadPlainText): Test webkit_web_view_load_plain_text API.
2874         * UIProcess/API/gtk/tests/WebViewTest.h:
2875
2876 2011-11-03  Simon Hausmann  <simon.hausmann@nokia.com>
2877
2878         [Qt][WK2] Failing assertion with desktop webview when touch mocking in MinBrowser
2879         https://bugs.webkit.org/show_bug.cgi?id=71452
2880
2881         Reviewed by Andreas Kling.
2882
2883         Don't re-implement touchEvent(), we don't intend to support touch events as we
2884         receive them from the QQuickCanvas at this point.
2885
2886         * UIProcess/API/qt/qdesktopwebview.cpp:
2887         * UIProcess/API/qt/qdesktopwebview.h:
2888
2889 2011-11-03  Simon Hausmann  <simon.hausmann@nokia.com>
2890
2891         [Qt] [WK2] MiniBrowser assert in QtWebProccess on startup in debug build.
2892         https://bugs.webkit.org/show_bug.cgi?id=71196
2893
2894         Reviewed by Kenneth Rohde Christiansen.
2895
2896         Ensure AC is turned off for the desktop view before we launch the process.
2897         This avoids "accidential" enterAc/exitAc calls that cause failing assertions
2898         because we don't really support AC in this setup.
2899
2900         The touch side works the same way, i.e. enable the preference before calling
2901         init().
2902
2903         * UIProcess/qt/QtDesktopWebPageProxy.cpp:
2904         (QtDesktopWebPageProxy::QtDesktopWebPageProxy):
2905
2906 2011-11-03  Balazs Kelemen  <kbalazs@webkit.org>
2907
2908         [Qt] X11 plugins need to be reworked for Qt5
2909         https://bugs.webkit.org/show_bug.cgi?id=70023
2910
2911         Reviewed by Simon Hausmann.
2912
2913         Disable X11 plugins.
2914         * config.h:
2915
2916 2011-11-03  Simon Hausmann  <simon.hausmann@nokia.com>
2917
2918         Unreviewed Qt build fix(es).
2919
2920         * UIProcess/qt/QtDesktopWebPageProxy.cpp:
2921         (QtDesktopWebPageProxy::handleDragMoveEvent): Adapt to dragSession API change.
2922         (QtDesktopWebPageProxy::handleDropEvent): Ditto.
2923         * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
2924         (WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates): Implement here
2925         also, for plugin-disabled builds.
2926
2927 2011-11-03  ChangSeok Oh  <shivamidow@gmail.com>
2928
2929         [GTK] Fix build-break on r99143
2930         https://bugs.webkit.org/show_bug.cgi?id=71440
2931
2932         Reviewed by Philippe Normand.
2933
2934         dragOperation() should be replaced with dragSession().operation since it was removed.
2935         And didDetectXSSForFrame of WKPageLoaderClient should be relocated.
2936
2937         * UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
2938         (webkitWebLoaderClientAttachLoaderClientToPage):
2939         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2940         (webkitWebViewBaseDragDataReceived):
2941         (webkitWebViewBaseDragMotion):
2942
2943 2011-11-03  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
2944
2945         [Qt] Flagging usage of X11 headers under PLAT_ARCH(X11)
2946         https://bugs.webkit.org/show_bug.cgi?id=71409
2947
2948         Reviewed by Simon Hausmann.
2949
2950         Build fix for building qtwebkit with latest qt5 which has removed Qt X11 headers.
2951
2952         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2953
2954 2011-11-03  Philippe Normand  <pnormand@igalia.com>
2955
2956         Unreviewed, GTK build fix after r99093...
2957
2958         * PluginProcess/PluginControllerProxy.h:
2959
2960 2011-11-02  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
2961
2962         [Qt] [WK] Debug build broken
2963         https://bugs.webkit.org/show_bug.cgi?id=71417
2964
2965         Add WKNumber.h for WKBooleanGetTypeID
2966         Replace WKGetTypeId with WKGetTypeID
2967         Add initialization for didDetectXSSForFrame member in WKBundlePageLoaderClient
2968         instance.
2969
2970         Reviewed by Noam Rosenthal.
2971
2972         * WebProcess/qt/QtBuiltinBundle.cpp:
2973         (WebKit::QtBuiltinBundle::handleSetNavigatorQtObjectEnabled):
2974         * WebProcess/qt/QtBuiltinBundlePage.cpp:
2975         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
2976
2977 2011-11-02  Mark Hahnenberg  <mhahnenberg@apple.com>
2978
2979         De-virtualize JSObject::getOwnPropertyNames
2980         https://bugs.webkit.org/show_bug.cgi?id=71307
2981
2982         Reviewed by Darin Adler.
2983
2984         Added getOwnPropertyNames to the MethodTable, changed all the virtual 
2985         implementations of getOwnPropertyNames to static ones, and replaced 
2986         all call sites with corresponding lookups in the MethodTable.
2987
2988         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2989         (WebKit::JSNPObject::getOwnPropertyNames):
2990         * WebProcess/Plugins/Netscape/JSNPObject.h:
2991
2992 2011-11-02  Anders Carlsson  <andersca@apple.com>
2993
2994         Don't call NPP_SetWindow if the plug-in size or clip rect hasn't changed if the plug-in isn't using window relative coordinates
2995         https://bugs.webkit.org/show_bug.cgi?id=71418
2996
2997         Reviewed by Adam Roben.
2998
2999         This avoids calling into the plug-in when only the plug-in position relative to the window changes.
3000     
3001         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3002         (WebKit::NetscapePlugin::geometryDidChange):
3003
3004 2011-11-02  Jon Lee  <jonlee@apple.com>
3005
3006         Fix syntax error.
3007
3008         * WebProcess/WebPage/WebPage.cpp:
3009         (WebKit::WebPage::performDragControllerAction):
3010
3011 2011-11-02  Jon Lee  <jonlee@apple.com>
3012
3013         Fix build error from r99108.
3014
3015         * WebProcess/WebPage/WebPage.cpp:
3016         (WebKit::WebPage::performDragControllerAction):
3017
3018 2011-11-02  Dean Jackson  <dino@apple.com>
3019
3020         Add ENABLE_CSS_SHADERS flag
3021         https://bugs.webkit.org/show_bug.cgi?id=71394
3022
3023         Reviewed by Sam Weinig.
3024
3025         * Configurations/FeatureDefines.xcconfig:
3026
3027 2011-11-02  Anders Carlsson  <andersca@apple.com>
3028
3029         Allow the various plug-in ports to decide whether NPWindow coordinates should be window-relative
3030         https://bugs.webkit.org/show_bug.cgi?id=71415
3031
3032         Reviewed by Darin Adler.
3033
3034         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3035         (WebKit::NetscapePlugin::callSetWindow):
3036         Remove the PLUGIN_ARCHITECTURE(X11) ifdef and set the NPWindow members
3037         based on the return value of wantsWindowRelativeNPWindowCoordinates.
3038
3039         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3040         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3041         (WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates):
3042         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
3043         (WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates):
3044         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
3045         (WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates):
3046         Add platform specific implementations.
3047
3048 2011-11-02  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
3049
3050         [Qt] [WK] Debug build broken after r99065
3051         https://bugs.webkit.org/show_bug.cgi?id=71397
3052
3053         Remove reference to panGestureActive becuase it is not defined anywhere.
3054
3055         Reviewed by Simon Hausmann.
3056
3057         * UIProcess/qt/QtViewportInteractionEngine.cpp:
3058         (WebKit::QtViewportInteractionEngine::panGestureStarted):
3059
3060 2011-11-02  Jon Lee  <jonlee@apple.com>
3061
3062         Update dragging info on mac when user is dragging files into view
3063         https://bugs.webkit.org/show_bug.cgi?id=71325
3064         <rdar://problem/10379193>
3065
3066         Reviewed by Darin Adler.
3067
3068         * UIProcess/API/mac/WKView.mm:
3069         (-[WKView draggingUpdated:]): Based on the DragSession, we update NSDraggingInfo
3070         to update the badge and dragging formation.
3071
3072 2011-11-02  Jon Lee  <jonlee@apple.com>
3073
3074         Expand DragController to provide more information about the dragging session
3075         https://bugs.webkit.org/show_bug.cgi?id=71324
3076         <rdar://problem/10379175>
3077
3078         Reviewed by Darin Adler.
3079
3080         We now pass the DragSession struct from the Web to the UI process, instead of the
3081         DragOperation enum.
3082
3083         * Scripts/webkit2/messages.py:
3084         * Shared/WebCoreArgumentCoders.cpp:
3085         (CoreIPC::::encode):
3086         (CoreIPC::::decode):
3087         * Shared/WebCoreArgumentCoders.h:
3088         * UIProcess/API/mac/WKView.mm:
3089         (-[WKView draggingUpdated:]):
3090         * UIProcess/WebPageProxy.cpp:
3091         (WebKit::WebPageProxy::WebPageProxy): We now cache the last known DragSession state
3092         (WebKit::WebPageProxy::didPerformDragControllerAction):
3093         * UIProcess/WebPageProxy.h:
3094         (WebKit::WebPageProxy::dragSession):
3095         (WebKit::WebPageProxy::resetDragOperation):
3096         * UIProcess/WebPageProxy.messages.in:
3097         * UIProcess/win/WebView.cpp:
3098         (WebKit::WebView::keyStateToDragOperation):
3099         (WebKit::WebView::DragEnter):
3100         (WebKit::WebView::DragOver):
3101         * WebProcess/WebPage/WebPage.cpp:
3102         (WebKit::WebPage::performDragControllerAction):
3103
3104 2011-11-02  Anders Carlsson  <andersca@apple.com>
3105
3106         Get rid of Plugin::deprecatedGeometryDidChange
3107         https://bugs.webkit.org/show_bug.cgi?id=71411
3108
3109         Reviewed by Sam Weinig.
3110
3111         Now that all Plugin subclasses implement geometryDidChange and do all the work there
3112         we can get rid of deprecatedGeometryDidChange.
3113
3114         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3115         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3116         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
3117         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
3118         * WebProcess/Plugins/Plugin.h:
3119         * WebProcess/Plugins/PluginProxy.cpp:
3120         * WebProcess/Plugins/PluginProxy.h:
3121         * WebProcess/Plugins/PluginView.cpp:
3122         (WebKit::PluginView::viewGeometryDidChange):
3123
3124 2011-11-02  Anders Carlsson  <andersca@apple.com>
3125
3126         Move back functions that were not added.
3127
3128         * UIProcess/API/C/WKPage.h:
3129
3130 2011-11-02  Anders Carlsson  <andersca@apple.com>
3131
3132         Fix build and WebKit2 ABI.
3133
3134         * Shared/APIClientTraits.cpp:
3135         * Shared/APIClientTraits.h:
3136         Add page loader client sizes.
3137
3138         * UIProcess/API/C/WKPage.h:
3139         Move the newly added callback functions in the loader client last and bump the
3140         WKPageLoaderClient version.
3141         
3142 2011-11-02  Anders Carlsson  <andersca@apple.com>
3143
3144         Fix build.
3145
3146         * WebProcess/Plugins/PluginView.h:
3147
3148 2011-11-02  Tom Sepez  <tsepez@chromium.org>
3149
3150         XSSAuditor is silent
3151         https://bugs.webkit.org/show_bug.cgi?id=70973
3152
3153         Reviewed by Adam Barth.
3154
3155         * UIProcess/API/C/WKPage.h:
3156         * UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
3157         (webkitWebLoaderClientAttachLoaderClientToPage):
3158         * UIProcess/WebLoaderClient.cpp:
3159         (WebKit::WebLoaderClient::didDetectXSSForFrame):
3160         * UIProcess/WebLoaderClient.h:
3161         * UIProcess/WebPageProxy.cpp:
3162         (WebKit::WebPageProxy::didDetectXSSForFrame):
3163         * UIProcess/WebPageProxy.h:
3164         * UIProcess/WebPageProxy.messages.in:
3165         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3166         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3167         (WebKit::InjectedBundlePageLoaderClient::didDetectXSSForFrame):
3168         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3169         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3170         (WebKit::WebFrameLoaderClient::didDetectXSS):
3171         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3172
3173 2011-11-02  Anders Carlsson  <andersca@apple.com>
3174
3175         More window relative coordinate usage removal
3176         https://bugs.webkit.org/show_bug.cgi?id=71393
3177
3178         Reviewed by Adam Roben.
3179
3180         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
3181         (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate):
3182         Just use m_clipRect instead of converting m_clipRectInWindowCoordinates to plug-in coordinates.
3183
3184         (WebKit::NetscapePlugin::platformPaint):
3185         Use m_pluginSize instead of m_frameRectInWindowCoordinates.size().
3186
3187         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
3188         (WebKit::NetscapePlugin::platformPaint):
3189         Ditto.
3190
3191 2011-11-02  Anders Carlsson  <andersca@apple.com>
3192
3193         Fix non-Mac builds and remove #if PLATFORM(MAC) around all contents scale factor functions.
3194
3195         * PluginProcess/PluginControllerProxy.cpp:
3196         (WebKit::PluginControllerProxy::PluginControllerProxy):
3197         (WebKit::PluginControllerProxy::contentsScaleFactor):
3198         (WebKit::PluginControllerProxy::geometryDidChange):
3199         * PluginProcess/PluginControllerProxy.h:
3200         * PluginProcess/PluginCreationParameters.cpp:
3201         (WebKit::PluginCreationParameters::PluginCreationParameters):
3202         (WebKit::PluginCreationParameters::encode):
3203         (WebKit::PluginCreationParameters::decode):
3204         * PluginProcess/PluginCreationParameters.h:
3205         * PluginProcess/mac/PluginControllerProxyMac.mm:
3206         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3207         (WebKit::NetscapePlugin::contentsScaleFactor):
3208         (WebKit::NetscapePlugin::getAuthenticationInfo):
3209         (WebKit::NetscapePlugin::snapshot):
3210         (WebKit::NetscapePlugin::contentsScaleFactorChanged):
3211         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3212         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3213         * WebProcess/Plugins/Plugin.h:
3214         * WebProcess/Plugins/PluginController.h:
3215         * WebProcess/Plugins/PluginProxy.cpp:
3216         (WebKit::PluginProxy::initialize):
3217         (WebKit::PluginProxy::contentsScaleFactorChanged):
3218         (WebKit::PluginProxy::contentsScaleFactor):
3219         * WebProcess/Plugins/PluginProxy.h:
3220         * WebProcess/Plugins/PluginView.cpp:
3221         (WebKit::PluginView::contentsScaleFactor):
3222
3223 2011-11-02  Anders Carlsson  <andersca@apple.com>
3224
3225         Use m_pluginSize instead of m_frameRectInWindowCoordinates.size() in NetscapePlugin.
3226         https://bugs.webkit.org/show_bug.cgi?id=71390
3227
3228         Reviewed by Adam Roben.
3229
3230         m_pluginSize is always equal to m_frameRectInWindowCoordinates.size() and this moves us one
3231         sall step further towards eliminating m_frameRectInWindowCoordinates.
3232
3233         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3234         (WebKit::NetscapePlugin::invalidate):
3235         (WebKit::NetscapePlugin::snapshot):
3236
3237 2011-11-02  Anders Carlsson  <andersca@apple.com>
3238
3239         Fix non-Mac builds.
3240
3241         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3242         (WebKit::NetscapePlugin::snapshot):
3243
3244 2011-11-02  Anders Carlsson  <andersca@apple.com>
3245
3246         Plug-in snapshots are blurry in HiDPI
3247         https://bugs.webkit.org/show_bug.cgi?id=71387
3248         <rdar://problem/10385393>
3249
3250         Reviewed by Adam Roben.
3251
3252         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3253         (WebKit::NetscapePlugin::snapshot):
3254         Create the backing store in the right size and apply the contents scale factor
3255         to the newly created graphics context.
3256
3257         * WebProcess/Plugins/PluginView.cpp:
3258         (WebKit::PluginView::paint):
3259         Pass the scale factor to ShareableBitmap::paint.
3260
3261 2011-11-02  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3262
3263         [Qt] Implement message exchange between WebView and the web page
3264         https://bugs.webkit.org/show_bug.cgi?id=70545
3265
3266         Reviewed by Noam Rosenthal.
3267
3268         Adds a mechanism for the WebView to send messages to the JavaScript environment
3269         of the web page. In the WebView we have a method postMessage() and a signal
3270         messageReceived(), while in the web page we expose a navigator.qt object with a
3271         postMessage() method and a onmessage property. The messages are objects that
3272         follow the same structure as MessageEvents.
3273
3274         The feature is disabled by default, and can be enabled by setting
3275         QWebPreferences::navigatorQtObjectEnabled property to true. Changes take effect
3276         after the next load(). QML tests are included.
3277
3278         * UIProcess/qt/ClientImpl.h:
3279         * UIProcess/qt/ClientImpl.cpp:
3280         (setupContextInjectedBundleClient): Helper to register the injected bundle client.
3281         (qt_wk_didReceiveMessageFromInjectedBundle): Decode and dispatch a message received
3282         from the WebProcess to the WebPageProxy.
3283
3284         * UIProcess/PageClient.h:
3285         (WebKit::PageClient::didReceiveMessageFromNavigatorQtObject):
3286         * UIProcess/WebPageProxy.cpp:
3287         (WebKit::WebPageProxy::didReceiveMessageFromNavigatorQtObject):
3288         * UIProcess/WebPageProxy.h:
3289         Handle messages received from the navigator.qt object via the injected bundle. Called
3290         from the ClientImpl.
3291
3292         * UIProcess/API/qt/qbasewebview.cpp:
3293         (QBaseWebView::postMessage):
3294         (QBaseWebViewPrivate::setPageProxy):
3295         * UIProcess/API/qt/qbasewebview.h:
3296         * UIProcess/API/qt/qwebpreferences.cpp:
3297         (QWebPreferences::navigatorQtObjectEnabled):
3298         (QWebPreferences::setNavigatorQtObjectEnabled):
3299         * UIProcess/API/qt/qwebpreferences.h:
3300         The signal, slot and the setting to enable the feature.
3301
3302         * UIProcess/qt/QtWebPageProxy.cpp:
3303         (QtWebPageProxy::defaultWKContext): setup the injected bundle client for this the
3304         default context so we can listen to messages from it.
3305
3306         (QtWebPageProxy::QtWebPageProxy):
3307         (QtWebPageProxy::didReceiveMessageFromNavigatorQtObject):
3308         (QtWebPageProxy::setNavigatorQtObjectEnabled):
3309         (QtWebPageProxy::postMessageToNavigatorQtObject):
3310         * UIProcess/qt/QtWebPageProxy.h:
3311         (QtWebPageProxy::navigatorQtObjectEnabled):
3312         Enabling and sending messages to the navigator.qt object are done by sending messages to
3313         the injected bundle, identifying the page that we want to act on.
3314
3315         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_messaging.qml: Added.
3316         * UIProcess/API/qt/tests/qmltests/common/messaging.html: Added.
3317         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
3318         * WebProcess/qt/QtBuiltinBundle.cpp:
3319         (WebKit::QtBuiltinBundle::initialize):
3320         (WebKit::QtBuiltinBundle::didReceiveMessage):
3321         (WebKit::QtBuiltinBundle::handleMessageToNavigatorQtObject):
3322         (WebKit::QtBuiltinBundle::handleSetNavigatorQtObjectEnabled):
3323         * WebProcess/qt/QtBuiltinBundle.h:
3324         * WebProcess/qt/QtBuiltinBundlePage.cpp:
3325         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
3326         (WebKit::QtBuiltinBundlePage::~QtBuiltinBundlePage):
3327         (WebKit::QtBuiltinBundlePage::didClearWindowForFrame):
3328         (WebKit::qt_postMessageCallback):
3329         (WebKit::QtBuiltinBundlePage::postMessageFromNavigatorQtObject):
3330         (WebKit::createWrappedMessage):
3331         (WebKit::QtBuiltinBundlePage::didReceiveMessageToNavigatorQtObject):
3332         (WebKit::QtBuiltinBundlePage::setNavigatorQtObjectEnabled):
3333         (WebKit::QtBuiltinBundlePage::registerNavigatorQtObject):
3334         (WebKit::QtBuiltinBundlePage::navigatorQtObjectClass):
3335         * WebProcess/qt/QtBuiltinBundlePage.h:
3336         (WebKit::QtBuiltinBundlePage::navigatorQtObjectEnabled):
3337
3338 2011-11-02  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3339
3340         [Qt] Fix qmltest API test failures related to r98973.
3341         https://bugs.webkit.org/show_bug.cgi?id=71280
3342
3343         Reviewed by Noam Rosenthal.
3344
3345         Most of the API was moved from TouchWebView.page to TouchWebView directly.
3346         Fixed the qml tests to reflect this change.
3347
3348         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml:
3349         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml:
3350         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml:
3351         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml:
3352         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgressSignal.qml:
3353         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadZeroSizeView.qml:
3354         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml:
3355
3356 2011-11-02  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3357
3358         [Qt] Handle interruption of page interaction better
3359         https://bugs.webkit.org/show_bug.cgi?id=71366
3360
3361         Reviewed by Simon Hausmann.
3362
3363         Touching the screen when a kinetic scrolling animation is running or
3364         it is bouncing back because it was out of bounds, the animation is
3365         immediately stopped and the content is immediately put into valid
3366         bounds.
3367
3368         Touching the screen when the contents is bouncing back from a pinch
3369         zoom which was out of bounds, we do not stop the animation, but
3370         instead ignored the touch events while the animation lasts.
3371
3372         In the future we want to queue the events instead.
3373
3374         This also fixes some issues which was present before: As the bounce
3375         back animation from pinch zoom centers the content using the contents
3376         point which was in the center of the viewport, this animation could
3377         not be used when stopping a pan animation, as it wouldn't position the
3378         content at the place it was when the pan animation was interrupted.
3379
3380         * UIProcess/qt/QtPanGestureRecognizer.cpp:
3381         (WebKit::QtPanGestureRecognizer::recognize):
3382         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
3383         (WebKit::QtPinchGestureRecognizer::recognize):
3384         * UIProcess/qt/QtViewportInteractionEngine.cpp:
3385         (WebKit::QtViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
3386         (WebKit::QtViewportInteractionEngine::reset):
3387         (WebKit::QtViewportInteractionEngine::setConstraints):
3388         (WebKit::QtViewportInteractionEngine::panAnimationActive):
3389         (WebKit::QtViewportInteractionEngine::panGestureStarted):
3390         (WebKit::QtViewportInteractionEngine::panGestureCancelled):
3391         (WebKit::QtViewportInteractionEngine::pinchAnimationActive):
3392         * UIProcess/qt/QtViewportInteractionEngine.h:
3393
3394 2011-11-02  Zalan Bujtas  <zbujtas@gmail.com>
3395
3396         [Qt][WK2] Move content to resize (setResizesToContentsUsingLayoutSize) from UI process to Web process
3397         https://bugs.webkit.org/show_bug.cgi?id=71107
3398
3399         Reviewed by Kenneth Rohde Christiansen.
3400
3401         Reduce the number of IPC calls to WebProcess by moving the content to resize
3402         calls from UI process to Web process.
3403
3404         * UIProcess/API/qt/qtouchwebview.cpp:
3405         (QTouchWebViewPrivate::updateViewportSize):
3406         (QTouchWebViewPrivate::updateViewportConstraints):
3407         (QTouchWebView::geometryChanged):
3408         * UIProcess/API/qt/qtouchwebview_p.h:
3409         * UIProcess/WebPageProxy.cpp:
3410         (WebKit::WebPageProxy::setViewportSize):
3411         (WebKit::WebPageProxy::preferencesDidChange):
3412         * UIProcess/WebPageProxy.h:
3413         * UIProcess/qt/QtTouchWebPageProxy.cpp:
3414         * UIProcess/qt/QtTouchWebPageProxy.h:
3415         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3416         (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
3417         * WebProcess/WebPage/WebPage.messages.in:
3418
3419 2011-10-18  Dinu Jacob  <dinu.jacob@nokia.com>
3420
3421         [Qt][WK2]: Shouldn't send unhandled TouchCancel event to gesture recognizers
3422         https://bugs.webkit.org/show_bug.cgi?id=70333
3423
3424         Reviewed by Simon Hausmann.
3425
3426         Gesture recognizers should be reset for unhandled TouchCancel event.
3427
3428         * UIProcess/qt/qtouchwebpageproxy.cpp:
3429         (QTouchWebPageProxy::doneWithTouchEvent):
3430
3431 2011-11-02  Simon Hausmann  <simon.hausmann@nokia.com>
3432
3433         [Qt][WK2] Add support for touch event testing to WebKitTestRunner
3434         https://bugs.webkit.org/show_bug.cgi?id=71310
3435
3436         Reviewed by Kenneth Rohde Christiansen.
3437
3438         * UIProcess/WebPageProxy.cpp:
3439         (WebKit::WebPageProxy::handleTouchEvent): Add support for m_shouldSendEventsSynchronously.
3440         * UIProcess/qt/QtDesktopWebPageProxy.cpp:
3441         (QtDesktopWebPageProxy::handleEvent): Handle plain touch events in the desktop page proxy by
3442         forwarding them appropriately. We will receive them from WTR through ::event, but we won't
3443         receive them from QQuickCanvas (i.e. the user) because that doesn't uses ::event but only
3444         dedicated fooEvent() handlers, of which we don't re-implement the touch version.
3445         (QtDesktopWebPageProxy::handleTouchEvent): Forward touch events to WebPageProxy.
3446         * UIProcess/qt/QtDesktopWebPageProxy.h:
3447         * WebProcess/WebPage/WebPage.cpp:
3448         (WebKit::WebPage::touchEventSyncForTesting): Add support for synchronous touch event testing,
3449         similar to the way it's done for mouse events.
3450         * WebProcess/WebPage/WebPage.h: Ditto.
3451         * WebProcess/WebPage/WebPage.messages.in: Ditto.
3452
3453 2011-11-02  Simon Hausmann  <simon.hausmann@nokia.com>
3454
3455         [WK2] Remove unused/duplicated modifiers member from WebTouchEvent
3456         https://bugs.webkit.org/show_bug.cgi?id=71353
3457
3458         Reviewed by Kenneth Rohde Christiansen.
3459
3460         WebTouchEvent::m_[ctrl,alt,meta,shift]Key are redundant compared to
3461         WebEvent::m_modifiers. The latter is fully populated and used, the former
3462         can be safely removed.
3463
3464         * Shared/WebEvent.h:
3465         * Shared/WebTouchEvent.cpp:
3466         (WebKit::WebTouchEvent::WebTouchEvent):
3467         * Shared/qt/WebEventFactoryQt.cpp:
3468         (WebKit::WebEventFactory::createWebTouchEvent):
3469
3470 2011-11-02  Philippe Normand  <pnormand@igalia.com>
3471
3472         Unreviewed, skip testWebKitSettingsNewWithSettings affected by bug
3473         70127.
3474
3475         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
3476         (testWebKitSettingsNewWithSettings):
3477
3478 2011-11-01  Andras Becsi  <andras.becsi@nokia.com>
3479
3480         [Qt][WK2] Make API tests less noisy
3481         https://bugs.webkit.org/show_bug.cgi?id=71295
3482
3483         Reviewed by Simon Hausmann.
3484
3485         Suppress superfluous debug messages of Qt5.
3486
3487         * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp:
3488         * UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp:
3489         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
3490         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
3491         (main):
3492         * UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp:
3493         * UIProcess/API/qt/tests/util.cpp:
3494         (messageHandler):
3495         * UIProcess/API/qt/tests/util.h:
3496
3497 2011-11-01  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3498
3499         [Qt] Merge common desktop and touch view APIs under a base class.
3500         https://bugs.webkit.org/show_bug.cgi?id=71280
3501
3502         Reviewed by Andreas Kling.
3503
3504         - Make QDesktopWebView and QTouchWebView inherit from QBaseWebView.
3505         - Move methods from QTouchWebPage to QTouchWebView (through the base class).
3506
3507         We use the same convenience macros as Qt internally by hiding QObject::d_ptr
3508         with QBaseWebView::d_ptr instead of inheriting QBaseWebViewPrivate from
3509         QQuickItemPrivate.
3510         Also, QBaseWebView currently inherits from QQuickPaintedItem since QDesktopWebView
3511         needs it, but should be changed as soon as this is not required anymore.
3512
3513         * UIProcess/API/qt/qbasewebview.cpp: Added.
3514         (QBaseWebViewPrivate::QBaseWebViewPrivate):
3515         (QBaseWebViewPrivate::setPageProxy):
3516         (QBaseWebView::QBaseWebView):
3517         (QBaseWebView::~QBaseWebView):
3518         (QBaseWebView::load):
3519         (QBaseWebView::url):
3520         (QBaseWebView::loadProgress):
3521         (QBaseWebView::title):
3522         (QBaseWebView::navigationController):
3523         (QBaseWebView::preferences):
3524         * UIProcess/API/qt/qbasewebview.h: Copied from Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h.
3525         * UIProcess/API/qt/qbasewebview_p.h: Copied from Source/WebKit2/UIProcess/API/qt/qtouchwebpage_p.h.
3526         (QBaseWebViewPrivate::~QBaseWebViewPrivate):
3527         * UIProcess/API/qt/qdesktopwebview.cpp:
3528         (QDesktopWebViewPrivate::QDesktopWebViewPrivate):
3529         (QDesktopWebViewPrivate::enableMouseEvents):
3530         (QDesktopWebViewPrivate::disableMouseEvents):
3531         (QDesktopWebViewPrivate::webView):
3532         (QDesktopWebViewPrivate::setViewNeedsDisplay):
3533         (QDesktopWebViewPrivate::drawingAreaSize):
3534         (QDesktopWebViewPrivate::hasFocus):
3535         (QDesktopWebViewPrivate::isVisible):
3536         (QDesktopWebViewPrivate::startDrag):
3537         (QDesktopWebViewPrivate::didChangeUrl):
3538         (QDesktopWebViewPrivate::didChangeTitle):
3539         (QDesktopWebViewPrivate::didChangeStatusText):
3540         (QDesktopWebViewPrivate::loadDidBegin):
3541         (QDesktopWebViewPrivate::loadDidSucceed):
3542         (QDesktopWebViewPrivate::loadDidFail):
3543         (QDesktopWebViewPrivate::didChangeLoadProgress):
3544         (QDesktopWebViewPrivate::showContextMenu):
3545         (QDesktopWebViewPrivate::runJavaScriptAlert):
3546         (QDesktopWebViewPrivate::runJavaScriptConfirm):
3547         (QDesktopWebViewPrivate::runJavaScriptPrompt):
3548         (QDesktopWebView::QDesktopWebView):
3549         (QDesktopWebViewPrivate::init):
3550         (QDesktopWebView::~QDesktopWebView):
3551         (QDesktopWebView::geometryChanged):
3552         (QDesktopWebView::paint):
3553         (QDesktopWebView::event):
3554         (QDesktopWebView::pageRef):
3555         (QDesktopWebViewPrivate::processDidCrash):
3556         (QDesktopWebViewPrivate::didRelaunchProcess):
3557         (QDesktopWebViewPrivate::engine):
3558         (QDesktopWebViewPrivate::chooseFiles):
3559         (QDesktopWebViewPrivate::_q_onOpenPanelFilesSelected):
3560         (QDesktopWebViewPrivate::_q_onOpenPanelFinished):
3561         (QDesktopWebViewPrivate::didMouseMoveOverElement):
3562         (QDesktopWebViewPrivate::navigationPolicyForURL):
3563         * UIProcess/API/qt/qdesktopwebview.h:
3564         * UIProcess/API/qt/qdesktopwebview_p.h:
3565         * UIProcess/API/qt/qtouchwebpage.cpp:
3566         (QTouchWebPage::event):
3567         (QTouchWebPage::geometryChanged):
3568         (QTouchWebPagePrivate::QTouchWebPagePrivate):
3569         (QTouchWebPagePrivate::setPageProxy):
3570         (QTouchWebPagePrivate::paintToCurrentGLContext):