Rename a couple of NetscapePlugin and PluginProxy member variables
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-10-27  Anders Carlsson  <andersca@apple.com>
2
3         Rename a couple of NetscapePlugin and PluginProxy member variables
4         https://bugs.webkit.org/show_bug.cgi?id=71086
5
6         Reviewed by Sam Weinig.
7
8         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
9         (WebKit::NetscapePlugin::invalidate):
10         (WebKit::NetscapePlugin::callSetWindow):
11         (WebKit::NetscapePlugin::snapshot):
12         (WebKit::NetscapePlugin::deprecatedGeometryDidChange):
13         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
14         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
15         (WebKit::NetscapePlugin::platformPaint):
16         (WebKit::NetscapePlugin::platformHandleMouseEvent):
17         (WebKit::NetscapePlugin::platformHandleWheelEvent):
18         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
19         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
20         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
21         (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate):
22         (WebKit::NetscapePlugin::platformPaint):
23         * WebProcess/Plugins/PluginProxy.cpp:
24         (WebKit::PluginProxy::paint):
25         (WebKit::PluginProxy::geometryDidChange):
26         (WebKit::PluginProxy::deprecatedGeometryDidChange):
27         (WebKit::PluginProxy::update):
28         * WebProcess/Plugins/PluginProxy.h:
29         * WebProcess/Plugins/PluginView.cpp:
30         (WebKit::PluginView::viewGeometryDidChange):
31
32 2011-10-31  Andras Becsi  <andras.becsi@nokia.com>
33
34         [Qt][WK2] Fix qmltests after r98460 added widgets dependency.
35
36         Reviewed by Simon Hausmann.
37
38         Use QApplication and QtWidgets until we get rid of the widgets dependency of QScroller.
39
40         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
41         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
42         (main):
43
44 2011-10-31  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
45
46         [Qt] Make QWebPreferences hold a QtWebPageProxy
47         https://bugs.webkit.org/show_bug.cgi?id=71219
48
49         Reviewed by Andreas Kling.
50
51         Change QWebPreferences to keep a pointer to QtWebPageProxy.  The reason is that
52         some features we want to control (like the messaging exchange between WebView and
53         the web process) are not available via WKPreferencesRef.
54
55         QtWebPageProxy now uses an OwnPtr to keep the QWebPreferences to clarify the
56         ownership relationship. Before this change the QWebPreferences created was leaking.
57
58         * UIProcess/API/qt/qwebpreferences.cpp:
59         (QWebPreferencesPrivate::createPreferences):
60         (QWebPreferencesPrivate::testAttribute):
61         (QWebPreferencesPrivate::setAttribute):
62         (QWebPreferencesPrivate::setFontFamily):
63         (QWebPreferencesPrivate::fontFamily):
64         (QWebPreferencesPrivate::setFontSize):
65         (QWebPreferencesPrivate::fontSize):
66         (QWebPreferencesPrivate::preferencesRef):
67         * UIProcess/API/qt/qwebpreferences.h:
68         * UIProcess/API/qt/qwebpreferences_p.h:
69         * UIProcess/qt/QtWebPageProxy.cpp:
70         (QtWebPageProxy::QtWebPageProxy):
71         (QtWebPageProxy::preferences):
72         * UIProcess/qt/QtWebPageProxy.h:
73
74 2011-10-31  Carlos Garcia Campos  <cgarcia@igalia.com>
75
76         [GTK] Add webkit_settings_new_with_settings() to WebKit2 GTK+ API
77         https://bugs.webkit.org/show_bug.cgi?id=71111
78
79         Reviewed by Martin Robinson.
80
81         Convenient method to create a WebKitSettings object with initial
82         settings.
83
84         * UIProcess/API/gtk/WebKitSettings.cpp:
85         (webkit_settings_new_with_settings):
86         * UIProcess/API/gtk/WebKitSettings.h:
87         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
88         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
89         (testWebKitSettingsNewWithSettings):
90         (beforeAll):
91
92 2011-10-31  Carlos Garcia Campos  <cgarcia@igalia.com>
93
94         [GTK] Add methods to get/set the settings of a web view to WebKit2 GTK+ API
95         https://bugs.webkit.org/show_bug.cgi?id=71109
96
97         Reviewed by Martin Robinson.
98
99         * GNUmakefile.am: Add WebKitSettingsPrivate.h.
100         * UIProcess/API/gtk/WebKitSettings.cpp:
101         (webkitSettingsAttachSettingsToPage): Set the preferences of the
102         given WebKitSettings object to the page group of the given WKPage.
103         * UIProcess/API/gtk/WebKitSettingsPrivate.h: Added.
104         * UIProcess/API/gtk/WebKitWebView.cpp:
105         (webkitWebViewConstructed): Create the default WebKitSettings for
106         the view.
107         (webkit_web_view_set_settings):
108         (webkit_web_view_get_settings):
109         * UIProcess/API/gtk/WebKitWebView.h:
110         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
111         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
112         (testWebViewSettings):
113         (beforeAll):
114
115 2011-10-31  Carlos Garcia Campos  <cgarcia@igalia.com>
116
117         Unreviewed. Fix make distcheck build.
118
119         * GNUmakefile.am: Remove docs/GNUmakefile.in from EXTRA_DIST,
120         since its generation was removed from configure.ac in r98498.
121
122 2011-10-28  Jeff Miller  <jeffm@apple.com>
123
124         More work on WebKit2 should respect WebKitOmitPDFSupport preference on the Mac
125         https://bugs.webkit.org/show_bug.cgi?id=71156
126         
127         Don't include PDF and PostScript types in the set of MIME types with custom representations
128         when initializing the web process if WebKitOmitPDFSupport is set.
129         
130         I believe the previous patch r98513 was actually sufficient to prevent PDFs from being
131         shown inline when this preference was set, but to be complete we should exclude the MIME
132         types here as well.
133
134         Reviewed by Alexey Proskuryakov.
135
136         * UIProcess/mac/WebContextMac.mm:
137         (WebKit::WebContext::platformInitializeWebProcess):
138
139 2011-10-28  John Sullivan  <sullivan@apple.com>
140
141         WebKit2 part of:
142         https://bugs.webkit.org/show_bug.cgi?id=71142
143         Whether backspace goes Back should be configurable
144
145         Reviewed by Sam Weinig.
146
147         * Shared/WebPreferencesStore.h:
148         Declared backspaceKeyNavigationEnabled property using macro. This initializes
149         it to true, to match current behavior.
150         
151         * UIProcess/API/C/WKPreferences.cpp:
152         (WKPreferencesSetBackspaceKeyNavigationEnabled):
153         New function, pass value to impl.
154         (WKPreferencesGetBackspaceKeyNavigationEnabled):
155         New function, returns result from impl.
156         
157         * UIProcess/API/C/WKPreferences.h:
158         Declared API functions for new preference.
159         
160         * WebProcess/WebPage/WebPage.cpp:
161         (WebKit::WebPage::updatePreferences):
162         Updates WebCore settings from WebKit2 prefs.
163
164 2011-10-28  Timothy Hatcher  <timothy@apple.com>
165
166         Support using a different front-end for the Web Inspector in WebKit2.
167
168         rdar://problem/10318665
169         https://webkit.org/b/71089
170
171         Reviewed by Sam Weinig.
172
173         * Shared/WebProcessCreationParameters.cpp:
174         (WebKit::WebProcessCreationParameters::encode): Added webInspectorBasePath and webInspectorLocalizedStringsPath.
175         (WebKit::WebProcessCreationParameters::decode): Ditto.
176         * Shared/WebProcessCreationParameters.h:
177         * UIProcess/API/C/WKContext.cpp:
178         (WKContextSetOverrideWebInspectorBaseDirectory): Added. Calls through to WebContext.
179         (WKContextSetOverrideWebInspectorPagePath): Ditto.
180         (WKContextSetOverrideWebInspectorLocalizedStringsPath): Ditto.
181         * UIProcess/API/C/WKContextPrivate.h:
182         * UIProcess/WebContext.cpp:
183         (WebKit::WebContext::ensureWebProcess): Set webInspectorBasePath and webInspectorLocalizedStringsPath.
184         * UIProcess/WebContext.h:
185         (WebKit::WebContext::overrideWebInspectorBaseDirectory): Added.
186         (WebKit::WebContext::setOverrideWebInspectorBaseDirectory): Added.
187         (WebKit::WebContext::overrideWebInspectorPagePath): Added.
188         (WebKit::WebContext::setOverrideWebInspectorPagePath): Added.
189         (WebKit::WebContext::setOverrideWebInspectorLocalizedStringsPath): Added.
190         * UIProcess/mac/WebInspectorProxyMac.mm:
191         (WebKit::WebInspectorProxy::inspectorPageURL): Use WebContext::overrideWebInspectorPagePath if set.
192         (WebKit::WebInspectorProxy::inspectorBaseURL): Use WebContext::overrideWebInspectorBaseDirectory if set.
193         * WebProcess/WebPage/WebInspector.h:
194         * WebProcess/WebPage/mac/WebInspectorMac.mm:
195         (WebKit::globalInspectorLocalizedStringsURL): Added. Static storage for the setting.
196         (WebKit::WebInspector::setLocalizedStringsPath): Added. Set globalInspectorLocalizedStringsURL.
197         (WebKit::WebInspector::localizedStringsURL): Return globalInspectorLocalizedStringsURL.
198         * WebProcess/com.apple.WebProcess.sb: Added read-only subpath for WEBKIT_WEB_INSPECTOR_DIR.
199         * WebProcess/mac/WebProcessMac.mm:
200         (WebKit::appendReadonlySandboxDirectory): Check path for empty to prevent an exception when
201         calling through to fileSystemRepresentation.
202         (WebKit::initializeSandbox): Added WEBKIT_WEB_INSPECTOR_DIR parameter.
203         (WebKit::WebProcess::platformInitializeWebProcess): Call WebInspector::setLocalizedStringsPath.
204
205 2011-10-28  Alexey Proskuryakov  <ap@apple.com>
206
207         Clean up BuiltInPDFView a little
208         https://bugs.webkit.org/show_bug.cgi?id=71133
209
210         Reviewed by Daniel Bates.
211
212         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp: (WebKit::BuiltInPDFView::createScrollbar):
213         Removed an incorrect FIXME. Custom scrollbars specified in a document don't apply
214         to subframes, and thus shouldn't apply to PDFs.
215
216         * WebProcess/Plugins/PDF/BuiltInPDFView.h: (WebKit::BuiltInPDFView::zoomAnimatorTransformChanged):
217         Moved to a correct location. This is not a Plugin method, but a ScrollView one.
218
219 2011-10-28  Jochen Eisinger  <jochen@chromium.org>
220
221         Rename a number of methods mentioning JavaScript to just Script instead
222         https://bugs.webkit.org/show_bug.cgi?id=71105
223
224         Reviewed by Adam Barth.
225
226         * WebProcess/WebPage/WebPage.cpp:
227         (WebKit::WebPage::updatePreferences):
228
229 2011-10-28  Csaba Osztrogonác  <ossy@webkit.org>
230
231         [Qt] Adapt to QSG* to QQuick* API change in qtdeclarative
232         https://bugs.webkit.org/show_bug.cgi?id=70494
233
234         One more buildfix. (unreviewed)
235
236         * UIProcess/API/qt/qtouchwebpage.cpp:
237         (computeEffectiveOpacity):
238         (QTouchWebPage::itemChange):
239
240 2011-10-28  Simon Hausmann  <simon.hausmann@nokia.com>
241
242         [Qt] Adapt to QSG* to QQuick* API change in qtdeclarative
243         https://bugs.webkit.org/show_bug.cgi?id=70494
244
245         Reviewed by Kenneth Christiansen.
246
247         Use QQuick* instead of QSG* as well as QStandardPaths
248         instead of QDesktopLocation.
249
250         * UIProcess/API/qt/qdesktopwebview.cpp:
251         (QDesktopWebView::QDesktopWebView):
252         (QDesktopWebView::geometryChanged):
253         (QDesktopWebView::event):
254         (QDesktopWebViewPrivate::engine):
255         * UIProcess/API/qt/qdesktopwebview.h:
256         * UIProcess/API/qt/qtouchwebpage.cpp:
257         (QTouchWebPage::QTouchWebPage):
258         (QTouchWebPage::event):
259         (QTouchWebPage::geometryChanged):
260         * UIProcess/API/qt/qtouchwebpage.h:
261         * UIProcess/API/qt/qtouchwebview.cpp:
262         (QTouchWebView::QTouchWebView):
263         (QTouchWebView::geometryChanged):
264         (QTouchWebView::touchEvent):
265         * UIProcess/API/qt/qtouchwebview.h:
266         * UIProcess/API/qt/tests/testwindow.h:
267         (TestWindow::TestWindow):
268         (TestWindow::resizeEvent):
269         * UIProcess/qt/QtDesktopWebPageProxy.cpp:
270         (QtDesktopWebPageProxy::createPopupMenuProxy):
271         * UIProcess/qt/QtSGUpdateQueue.cpp:
272         (WebKit::QtSGUpdateQueue::QtSGUpdateQueue):
273         * UIProcess/qt/QtSGUpdateQueue.h:
274         * UIProcess/qt/QtTouchViewInterface.cpp:
275         (WebKit::QtTouchViewInterface::engine):
276         * UIProcess/qt/QtViewportInteractionEngine.cpp:
277         (WebKit::contentRectInViewportCoordinates):
278         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
279         * UIProcess/qt/QtViewportInteractionEngine.h:
280         * UIProcess/qt/WebContextQt.cpp:
281         (WebKit::defaultDataLocation):
282         * UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
283         (WebKit::WebPopupMenuProxyQtDesktop::WebPopupMenuProxyQtDesktop):
284         * UIProcess/qt/WebPopupMenuProxyQtDesktop.h:
285         (WebKit::WebPopupMenuProxyQtDesktop::create):
286
287 2011-10-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
288
289         [Qt] Make the kinetic engine use the same curve and constants as on the N9
290         https://bugs.webkit.org/show_bug.cgi?id=71102
291
292         Reviewed by Simon Hausmann.
293
294         Now that we are using the QScroller for kinetic scrolling and page
295         interaction, we need to make sure it uses the same curve (exponential)
296         and the same values as the MeeGo Touch physics engine used on the N9.
297
298         * UIProcess/qt/QtViewportInteractionEngine.cpp:
299         (WebKit::QtViewportInteractionEngine::reset):
300
301 2011-10-28  Carlos Garcia Campos  <cgarcia@igalia.com>
302
303         [GTK] Add webkit_web_view_get_uri() to WebKit2 GTK+ API
304         https://bugs.webkit.org/show_bug.cgi?id=70814
305
306         Reviewed by Gustavo Noronha Silva.
307
308         * UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
309         (didStartProvisionalLoadForFrame): Update WebView URI to make sure
310         it's updated to provisional URL.
311         (didReceiveServerRedirectForProvisionalLoadForFrame): Update
312         WebView URI if there's a server redirection.
313         (didCommitLoadForFrame): Update WebView URI to make sure it
314         contains the final one.
315         (didSameDocumentNavigationForFrame): Update WebView URI when a
316         navigation action within the same document is performed.
317         (webkitWebLoaderClientAttachLoaderClientToPage): Add
318         implementation for didSameDocumentNavigationForFrame callback.
319         * UIProcess/API/gtk/WebKitWebView.cpp:
320         (webkit_web_view_class_init): Add URI property.
321         (webkitWebViewUpdateURI): Check whether current active URI has
322         changed to updated it and emit ::notify signal if it changes.
323         (webkit_web_view_load_uri): Call webkitWebViewUpdateURI() to make
324         sure the active URI is updated when load operation is started.
325         (webkit_web_view_load_alternate_html): Ditto.
326         (webkit_web_view_reload): Ditto.
327         (webkit_web_view_reload_bypass_cache): Ditto.
328         (webkit_web_view_go_back): Ditto.
329         (webkit_web_view_go_forward): Ditto.
330         (webkit_web_view_get_uri): Ditto.
331         (webkit_web_view_go_to_back_forward_list_item): Ditto.
332         * UIProcess/API/gtk/WebKitWebView.h:
333         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Add
334         webkitWebViewUpdateURI().
335         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
336         (provisionalLoadStartedCallback): Check provisional URL is the
337         requested URI.
338         (provisionalLoadReceivedServerRedirectCallback): Check provisional
339         URL after server redirection is the expected redirected URI.
340         (provisionalLoadFailedCallback): Check active URI.
341         (loadCommittedCallback): Ditto.
342         (loadFinishedCallback): Ditto.
343         (loadFailedCallback): Ditto
344         (LoadTrackingTest::LoadTrackingTest): Check active URI is NULL
345         before any loading operation has started.
346         * UIProcess/API/gtk/tests/LoadTrackingTest.h:
347         (LoadTrackingTest::setRedirectURI): Set the redirect URI to check
348         it after a server redirection.
349         * UIProcess/API/gtk/tests/TestBackForwardList.cpp:
350         (testBackForwardListNavigation): Use WebViewTest methods for
351         navigation actions instead of using WebKitWebView API directly.
352         (testBackForwardListLimitAndCache): Ditto.
353         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
354         (testLoadingStatus): Ditto.
355         (testLoadingError): Ditto.
356         (testLoadAlternateContent): Ditto.
357         (testLoadCancelled): Ditto.
358         (testWebViewReload): Ditto.
359         (testLoadProgress): Ditto.
360         (testWebViewActiveURI): Add a test to check that notify signal is
361         emitted when active URI changes and it's correctly updated when
362         loader client signals are emitted.
363         (beforeAll): Add active-uri test.
364         * UIProcess/API/gtk/tests/WebViewTest.cpp: Add custom load methods
365         wrapping the WebKitWebView ones, to initialize the active URI to
366         the requested one, so that it can be checked by the loader client
367         test.
368         (WebViewTest::loadURI):
369         (WebViewTest::loadAlternateHTML):
370         (WebViewTest::goBack):
371         (WebViewTest::goForward):
372         (WebViewTest::goToBackForwardListItem):
373         * UIProcess/API/gtk/tests/WebViewTest.h:
374
375 2011-10-21  No'am Rosenthal  <noam.rosenthal@nokia.com>
376
377         [Qt][WK2] Synchronize tiling with accelerated compositing
378         https://bugs.webkit.org/show_bug.cgi?id=69151
379
380         Reviewed by Simon Hausmann.
381
382         Make QTouchWebView always render with accelerated compositing.
383         At first, the web content would only render after the rest of the scene has rendered. In a
384         future patch we'll enable rendering the web content via an FBO, which would cover all other
385         cases as well.
386
387         Right now this only works for QTouchWebView, and thus accelerated compositing is disabled
388         for desktop web-views. This required adding some settings enablers in Q
389         WebPreferencesPrivate. Those are not exposed to the public API, as they are an implementation
390         detail.
391
392         * UIProcess/API/qt/qtouchwebpage.cpp:
393         (QTouchWebPage::QTouchWebPage):
394         (QTouchWebPage::initSceneGraphConnections):
395         (QTouchWebPagePrivate::QTouchWebPagePrivate):
396         (QTouchWebPagePrivate::setPage):
397         (computeEffectiveOpacity):
398         (QTouchWebPagePrivate::paintToCurrentGLContext):
399         (QTouchWebPagePrivate::_q_onAfterSceneRender):
400         (QTouchWebPagePrivate::_q_onSceneGraphInitialized):
401         (QTouchWebPage::itemChange):
402         * UIProcess/API/qt/qtouchwebpage.h:
403         * UIProcess/API/qt/qtouchwebpage_p.h:
404         * UIProcess/API/qt/qwebpreferences.cpp:
405         (QWebPreferencesPrivate::testAttribute):
406         (QWebPreferencesPrivate::setAttribute):
407         (QWebPreferencesPrivate::get):
408         * UIProcess/API/qt/qwebpreferences_p.h:
409         * UIProcess/TiledDrawingAreaProxy.cpp:
410         (WebKit::TiledDrawingAreaProxy::renderNextFrame):
411         * UIProcess/qt/QtDesktopWebPageProxy.cpp:
412         (QtDesktopWebPageProxy::QtDesktopWebPageProxy):
413         * UIProcess/qt/QtTouchViewInterface.cpp:
414         (WebKit::QtTouchViewInterface::setViewNeedsDisplay):
415         * UIProcess/qt/QtTouchWebPageProxy.cpp:
416         (QtTouchWebPageProxy::QtTouchWebPageProxy):
417         (QtTouchWebPageProxy::createDrawingAreaProxy):
418         (QtTouchWebPageProxy::renderToCurrentGLContext):
419         (QtTouchWebPageProxy::setVisibleContentRectAndScale):
420         (QtTouchWebPageProxy::setVisibleContentRectTrajectoryVector):
421         (QtTouchWebPageProxy::renderNextFrame):
422         * UIProcess/qt/QtTouchWebPageProxy.h:
423         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
424         (WebKit::LayerTreeHost::supportsAcceleratedCompositing):
425         * WebProcess/WebPage/qt/WebPageQt.cpp:
426         (WebKit::WebPage::platformInitialize):
427         * WebProcess/qt/WebProcessMainQt.cpp:
428         (WebKit::WebProcessMainQt):
429
430 2011-10-27  Martin Robinson  <mrobinson@igalia.com>
431
432         Fix the GTK+ build after r98664.
433
434         * WebProcess/Plugins/Plugin.h: Add an IntSize forward declaration.
435
436 2011-10-27  Anders Carlsson  <andersca@apple.com>
437
438         Add a Plugin::geometryDidChange that will work with transforms
439         https://bugs.webkit.org/show_bug.cgi?id=71072
440
441         Reviewed by Simon Fraser.
442
443         Add a new Plugin::geometryDidChange pure virtual member function, that takes
444         the size of the plug-in, the clip rect (in plug-in coordinates), and a matrix that makes
445         it possible to convert between root view coordinates and plug-in coordinates.
446
447         PluginView only calls this new geometryDidChange member function if 
448         Plugin::wantsWindowRelativeCoordinates returns false, which is only true for BuiltInPDFView right now.
449
450         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
451         (WebKit::NetscapePlugin::geometryDidChange):
452         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
453         Add stub.
454
455         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
456         (WebKit::BuiltInPDFView::updateScrollbars):
457         (WebKit::BuiltInPDFView::pdfDocumentDidLoad):
458         (WebKit::BuiltInPDFView::paintContent):
459         (WebKit::BuiltInPDFView::deprecatedGeometryDidChange):
460         (WebKit::BuiltInPDFView::geometryDidChange):
461         (WebKit::BuiltInPDFView::setScrollOffset):
462         (WebKit::BuiltInPDFView::maximumScrollPosition):
463         (WebKit::BuiltInPDFView::visibleHeight):
464         (WebKit::BuiltInPDFView::visibleWidth):
465         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
466         There's no need to keep track of the plug-in rect anymore.
467
468         * WebProcess/Plugins/Plugin.h:
469         Add and document geometryDidChange.
470
471         * WebProcess/Plugins/PluginProxy.cpp:
472         (WebKit::PluginProxy::geometryDidChange):
473         * WebProcess/Plugins/PluginProxy.h:
474         Add stub.
475
476         * WebProcess/Plugins/PluginView.cpp:
477         (WebKit::PluginView::viewGeometryDidChange):
478         Call geometryDidChange.
479
480 2011-10-27  Joseph Pecoraro  <pecoraro@apple.com>
481
482         Reviewed by David Kilzer.
483
484         Make FeatureDefines Identical Across OS X Projects
485         https://bugs.webkit.org/show_bug.cgi?id=71051
486
487         * Configurations/FeatureDefines.xcconfig:
488
489 2011-10-27  Anders Carlsson  <andersca@apple.com>
490
491         Rename Plugin::geometryDidChange to Plugin::deprecatedGeometryDidChange
492         https://bugs.webkit.org/show_bug.cgi?id=71065
493
494         Reviewed by Simon Fraser.
495
496         In preparation for adding a version of geometryDidChange that doesn't take window coordinates.
497
498         * PluginProcess/PluginControllerProxy.cpp:
499         (WebKit::PluginControllerProxy::geometryDidChange):
500         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
501         (WebKit::NetscapePlugin::deprecatedGeometryDidChange):
502         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
503         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
504         (WebKit::BuiltInPDFView::deprecatedGeometryDidChange):
505         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
506         * WebProcess/Plugins/Plugin.h:
507         * WebProcess/Plugins/PluginProxy.cpp:
508         (WebKit::PluginProxy::deprecatedGeometryDidChange):
509         * WebProcess/Plugins/PluginProxy.h:
510         * WebProcess/Plugins/PluginView.cpp:
511         (WebKit::PluginView::viewGeometryDidChange):
512
513 2011-10-27  Michael Saboff  <msaboff@apple.com>
514
515         Investigate storing strings in 8-bit buffers when possible
516         https://bugs.webkit.org/show_bug.cgi?id=66161
517
518         Added export of StringImpl::getData16SlowCase for linking tests.
519
520         Reviewed by Geoffrey Garen.
521
522         * win/WebKit2.def:
523
524 2011-10-27  Sam Weinig  <sam@webkit.org>
525
526         Add allowsPlugIns property to WKBrowsingContextGroup
527         https://bugs.webkit.org/show_bug.cgi?id=70987
528
529         Reviewed by Anders Carlsson.
530
531         Test: WKBrowsingContextGroupTest.GetSetPluginsEnabled
532
533         * UIProcess/API/mac/WKBrowsingContextGroup.h:
534         * UIProcess/API/mac/WKBrowsingContextGroup.mm:
535         (-[WKBrowsingContextGroup allowsJavaScript]):
536         (-[WKBrowsingContextGroup setAllowsJavaScript:]):
537         Rename to allowsJavaScript/setAllowsJavaScript.
538
539         (-[WKBrowsingContextGroup allowsPlugIns]):
540         (-[WKBrowsingContextGroup setAllowsPlugIns:]):
541         Add allowsPlugIns/setAllowsPlugIns.
542
543 2011-10-27  Carlos Garcia Campos  <cgarcia@igalia.com>
544
545         [Cairo] Implement ShareableBitmap::paint() when scaleFactor=1
546         https://bugs.webkit.org/show_bug.cgi?id=71027
547
548         Reviewed by Martin Robinson.
549
550         Fixes windowless plugins in GTK+ port.
551
552         * Shared/cairo/ShareableBitmapCairo.cpp:
553         (WebKit::ShareableBitmap::paint): When scaleFactor is 1, simply
554         call the paint method that doesn't receive a scaleFactor.
555
556 2011-10-27  Sheriff Bot  <webkit.review.bot@gmail.com>
557
558         Unreviewed, rolling out r98556.
559         http://trac.webkit.org/changeset/98556
560         https://bugs.webkit.org/show_bug.cgi?id=71031
561
562         The test added by the patch doesn't pass on Snow Leopard
563         (Requested by rniwa on #webkit).
564
565         * win/WebKit2.def:
566         * win/WebKit2CFLite.def:
567
568 2011-10-27  Mark Hahnenberg  <mhahnenberg@apple.com>
569
570         De-virtualize JSCell::toThisObject
571         https://bugs.webkit.org/show_bug.cgi?id=70958
572
573         Reviewed by Geoffrey Garen.
574
575         Converted all instances of toThisObject to static functions, 
576         added toThisObject to the MethodTable, and replaced all call sites
577         with a corresponding lookup in the MethodTable.
578
579         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
580         (WebKit::NPJSObject::invoke):
581
582 2011-10-27  Adam Roben  <aroben@apple.com>
583
584         Add WKBundlePageGetBackingScaleFactor
585
586         Fixes <http://webkit.org/b/71025> <rdar://problem/10355037> REGRESSION (r97191): Clients
587         can't reliably determine the scale factor of snapshots returned via
588         WKBundlePageCreateSnapshot* API
589
590         Reviewed by Sam Weinig.
591
592         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
593         (WKBundlePageGetBackingScaleFactor):
594         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
595         Added. Calls through to WebPage::deviceScaleFactor.
596
597         * WebProcess/WebPage/WebPage.cpp:
598         (WebKit::WebPage::deviceScaleFactor):
599         * WebProcess/WebPage/WebPage.h:
600         Added. Calls through to Page::deviceScaleFactor.
601
602 2011-10-27  Zalan Bujtas  <zbujtas@gmail.com>
603
604         [Qt][WK2]Add setViewportSize API to WebKit2.
605         https://bugs.webkit.org/show_bug.cgi?id=71006
606
607         Reviewed by Kenneth Rohde Christiansen.
608
609         Fixed layout rendering needs the viewport size information on the WebProcess
610         side to be able to do viewport attribute calculations.
611
612         * WebProcess/WebPage/WebPage.cpp:
613         (WebKit::WebPage::setViewportSize):
614         * WebProcess/WebPage/WebPage.h:
615         (WebKit::WebPage::viewportSize):
616         * WebProcess/WebPage/WebPage.messages.in:
617
618 2011-10-27  Alexis Menard  <alexis.menard@openbossa.org>
619
620         [Qt][WK2] Move the C API callback setup out of QtWebPageProxy
621         https://bugs.webkit.org/show_bug.cgi?id=70965
622
623         Reviewed by Andreas Kling.
624
625         Move out the setup of C API callback into ClientImpl file
626         so that QtWebPageProxy will be less polluted.
627
628         * UIProcess/qt/ClientImpl.cpp:
629         (qt_wk_didStartProvisionalLoadForFrame):
630         (qt_wk_didFailProvisionalLoadWithErrorForFrame):
631         (qt_wk_didCommitLoadForFrame):
632         (qt_wk_didFinishLoadForFrame):
633         (qt_wk_didFailLoadWithErrorForFrame):
634         (qt_wk_didSameDocumentNavigationForFrame):
635         (qt_wk_didReceiveTitleForFrame):
636         (qt_wk_didStartProgress):
637         (qt_wk_didChangeProgress):
638         (qt_wk_didFinishProgress):
639         (qt_wk_runJavaScriptAlert):
640         (qt_wk_runJavaScriptConfirm):
641         (qt_wk_runJavaScriptPrompt):
642         (qt_wk_setStatusText):
643         (qt_wk_runOpenPanel):
644         (qt_wk_mouseDidMoveOverElement):
645         (qt_wk_decidePolicyForNavigationAction):
646         (qt_wk_decidePolicyForResponse):
647         (setupPageLoaderClient):
648         (setupPageUiClient):
649         (setupPagePolicyClient):
650         * UIProcess/qt/ClientImpl.h:
651         * UIProcess/qt/QtWebPageProxy.cpp:
652         (QtWebPageProxy::init):
653         * UIProcess/qt/QtWebPageProxy.h:
654         (QtWebPageProxy::viewInterface):
655
656 2011-10-27  Zeno Albisser  <zeno.albisser@nokia.com>
657
658         [Qt][WK2] Remove QAction from MiniBrowser
659         https://bugs.webkit.org/show_bug.cgi?id=70525
660
661         This fixes the commonview tests that were failing
662         after r98447.
663         WebViewAbstraction must forward actions to both
664         the TouchWebView and the DesktopWebView.
665
666         Reviewed by Kenneth Rohde Christiansen.
667
668         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
669         (WebViewAbstraction::goBack):
670         (WebViewAbstraction::goForward):
671         (WebViewAbstraction::stop):
672         (WebViewAbstraction::reload):
673
674 2011-10-27  Zalan Bujtas  <zbujtas@gmail.com>
675
676         [Qt][WK2]Content size changed event does not require viewport attribute calculation.
677         https://bugs.webkit.org/show_bug.cgi?id=70920
678
679         Reviewed by Kenneth Rohde Christiansen.
680         
681         Remove unnecessary recalculation of viewport attributes.
682
683         * UIProcess/qt/QtTouchViewInterface.cpp:
684         (WebKit::QtTouchViewInterface::contentSizeChanged):
685
686 2011-10-27  Shinya Kawanaka  <shinyak@google.com>
687
688         Implement legacy text check emulation in unified text check interface.
689         https://bugs.webkit.org/show_bug.cgi?id=70299
690
691         Reviewed by Hajime Morita.
692
693         * win/WebKit2.def:
694         * win/WebKit2CFLite.def:
695
696 2011-10-27  Philippe Normand  <pnormand@igalia.com>
697
698         [GStreamer] WebAudio AudioFileReader implementation
699         https://bugs.webkit.org/show_bug.cgi?id=69834
700
701         Reviewed by Martin Robinson.
702
703         * GNUmakefile.am: Link against libfftw.
704
705 2011-10-26  Alexey Proskuryakov  <ap@apple.com>
706
707         REGRESSION (r98153): Safari crashes if WebProcess crashed during printing
708         https://bugs.webkit.org/show_bug.cgi?id=70982
709
710         Reviewed by Dan Bernstein.
711
712         * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
713         Null check page, it may be invalid already.
714
715 2011-10-26  Jeff Miller  <jeffm@apple.com>
716
717         WebKit2 should respect secret WebKitOmitPDFSupport preference on the Mac
718         https://bugs.webkit.org/show_bug.cgi?id=70943
719         
720         If WebKitOmitPDFSupport pref is set, disable both the new "plug-in" for subframes and the PDFKit-based support for the main frame only.
721
722         Reviewed by Alexey Proskuryakov.
723
724         * UIProcess/WebContext.cpp:
725         (WebKit::WebContext::getPlugins): Don't register built-in PDF plugin if WebKitOmitPDFSupport pref is set.
726         
727         * UIProcess/WebContext.h: Added omitPDFSupport().
728         
729         * UIProcess/WebFrameProxy.cpp:
730         (WebKit::WebFrameProxy::canShowMIMEType): Don't show PDFs if WebKitOmitPDFSupport is set.
731         
732         * UIProcess/mac/WebContextMac.mm:
733         (WebKit::WebContext::omitPDFSupport): Added.
734
735 2011-10-26  Sam Weinig  <sam@webkit.org>
736
737         Add initial setting to WKBrowsingContextGroup
738         https://bugs.webkit.org/show_bug.cgi?id=70942
739
740         Reviewed by Anders Carlsson.
741
742         Test: WKBrowsingContextGroupTest.
743
744         * UIProcess/API/mac/WKBrowsingContextGroup.h:
745         * UIProcess/API/mac/WKBrowsingContextGroup.mm:
746         (-[WKBrowsingContextGroup isJavaScriptEnabled]):
747         (-[WKBrowsingContextGroup setJavaScriptEnabled:]):
748         Add setting to enabled/disable javascript. By default it is enabled. 
749
750 2011-10-25  Alexey Proskuryakov  <ap@apple.com>
751
752         Embedded PDFs should be known to DocumentLoader
753         https://bugs.webkit.org/show_bug.cgi?id=70864
754
755         Reviewed by Darin Adler.
756
757         * WebProcess/Plugins/Plugin.h: Plugin stream load notifications now contain a suggested
758         file name, in case the plug-in wants to save the file properly.
759
760         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
761         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
762         (WebKit::BuiltInPDFView::addArchiveResource): Add the PDF as resource in DocumentLoader.
763         (WebKit::BuiltInPDFView::pdfDocumentDidLoad): Call addArchiveResource.
764         (WebKit::BuiltInPDFView::initialize): We need to remember source URL to create a resource
765         for that. The URL needs to match one in HitTestResult, so we can't use response URL.
766         (WebKit::BuiltInPDFView::streamDidReceiveResponse): Remember suggested file name, so
767         that we could put it in archive resource later.
768         (WebKit::BuiltInPDFView::manualStreamDidReceiveResponse): Ditto.
769
770         * PluginProcess/PluginControllerProxy.cpp:
771         (WebKit::PluginControllerProxy::streamDidReceiveResponse):
772         (WebKit::PluginControllerProxy::manualStreamDidReceiveResponse):
773         Pass an empty string for suggested file name. No plug-in that runs in a separate process
774         cares about it, so it's not sent to the plugin process.
775
776         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
777         (WebKit::NetscapePlugin::streamDidReceiveResponse):
778         (WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
779         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
780         Updated for new signatures.
781
782         * WebProcess/Plugins/PluginProxy.cpp:
783         (WebKit::PluginProxy::streamDidReceiveResponse):
784         (WebKit::PluginProxy::manualStreamDidReceiveResponse):
785         * WebProcess/Plugins/PluginProxy.h:
786         Updated for new signatures.
787
788         * WebProcess/Plugins/PluginView.cpp:
789         (WebKit::PluginView::Stream::didReceiveResponse):
790         (WebKit::PluginView::manualLoadDidReceiveResponse):
791         Pass suggested file name to plug-in, in case the plug-in wants to save the file properly.
792
793 2011-10-26  Mark Hahnenberg  <mhahnenberg@apple.com>
794
795         Remove getOwnPropertySlotVirtual
796         https://bugs.webkit.org/show_bug.cgi?id=70741
797
798         Reviewed by Geoffrey Garen.
799
800         Removed all declarations and definitions of getOwnPropertySlotVirtual.
801         Also replaced all call sites to getOwnPropertyVirtualVirtual with a 
802         corresponding lookup in the MethodTable.
803
804         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
805         * WebProcess/Plugins/Netscape/JSNPObject.h:
806
807 2011-10-26  Alejandro G. Castro  <alex@igalia.com>
808
809         [GTK] [WK2] Add WebKit2 distcheck support
810         https://bugs.webkit.org/show_bug.cgi?id=70933
811
812         Reviewed by Martin Robinson.
813
814         * GNUmakefile.am: Add a bunch of missing files from API and
815         sources, also include more files in the EXTRA_DIST.
816         * UIProcess/API/gtk/docs/GNUmakefile.am: Add the version.xml to
817         the cleaning section.
818
819 2011-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
820
821         [GTK] Fix gtk-doc warnings and style issues in WebKit2 GTK+ API
822         https://bugs.webkit.org/show_bug.cgi?id=70930
823
824         Reviewed by Martin Robinson.
825
826         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
827         * UIProcess/API/gtk/WebKitSettings.cpp:
828         (webkit_settings_class_init):
829         * UIProcess/API/gtk/WebKitWebView.h:
830         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
831
832 2011-10-26  Anders Carlsson  <andersca@apple.com>
833
834         Use the right contents scale factor for non-Mac plug-ins
835         https://bugs.webkit.org/show_bug.cgi?id=70939
836
837         Reviewed by Adam Roben.
838
839         * WebProcess/Plugins/PluginProxy.cpp:
840         (WebKit::PluginProxy::paint):
841         (WebKit::PluginProxy::geometryDidChange):
842         (WebKit::PluginProxy::update):
843
844 2011-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
845
846         [GTK] Add missing symbols to WebKit2 gtk-doc files
847         https://bugs.webkit.org/show_bug.cgi?id=70927
848
849         Reviewed by Martin Robinson.
850
851         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add sections for
852         WebKitBackForwardList, WebKitBackForwardListItem and WebKitSettings.
853         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add missing symbols.
854         * UIProcess/API/gtk/docs/webkit2gtk.types: Add missing types.
855
856 2011-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
857
858         [GTK] Inconsistent name of WebKitSettings macros
859         https://bugs.webkit.org/show_bug.cgi?id=70924
860
861         Reviewed by Martin Robinson.
862
863         Rename WEBKIT_TYPE_WEB_SETTINGS as WEBKIT_TYPE_SETTINGS and
864         WEBKIT_IS_WEB_SETTINGS as WEBKIT_IS_SETTINGS.
865
866         * UIProcess/API/gtk/WebKitSettings.cpp:
867         (webkit_settings_init):
868         (webkit_settings_new):
869         (webkit_settings_get_enable_javascript):
870         (webkit_settings_set_enable_javascript):
871         (webkit_settings_get_auto_load_images):
872         (webkit_settings_set_auto_load_images):
873         (webkit_settings_get_load_icons_ignoring_image_load_setting):
874         (webkit_settings_set_load_icons_ignoring_image_load_setting):
875         (webkit_settings_get_enable_offline_web_application_cache):
876         (webkit_settings_set_enable_offline_web_application_cache):
877         (webkit_settings_get_enable_html5_local_storage):
878         (webkit_settings_set_enable_html5_local_storage):
879         (webkit_settings_get_enable_html5_database):
880         (webkit_settings_set_enable_html5_database):
881         (webkit_settings_get_enable_xss_auditor):
882         (webkit_settings_set_enable_xss_auditor):
883         (webkit_settings_get_enable_frame_flattening):
884         (webkit_settings_set_enable_frame_flattening):
885         (webkit_settings_get_enable_plugins):
886         (webkit_settings_set_enable_plugins):
887         (webkit_settings_get_enable_java):
888         (webkit_settings_set_enable_java):
889         (webkit_settings_get_javascript_can_open_windows_automatically):
890         (webkit_settings_set_javascript_can_open_windows_automatically):
891         (webkit_settings_get_enable_hyperlink_auditing):
892         (webkit_settings_set_enable_hyperlink_auditing):
893         * UIProcess/API/gtk/WebKitSettings.h:
894
895 2011-10-26  Andras Becsi  <andras.becsi@nokia.com>
896
897         [Qt][WK2] Rename clean-up of QtPinchGestureRecognizer and QtViewportInteractionEngine
898         https://bugs.webkit.org/show_bug.cgi?id=70903
899
900         Reviewed by Kenneth Rohde Christiansen.
901
902         Rename computeTouchCenter to computePinchCenter,
903         and use the plural form of coordinate where appropriate.
904
905         * UIProcess/API/qt/qtouchwebview.cpp:
906         (QTouchWebViewPrivate::_q_viewportUpdated):
907         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
908         (WebKit::computePinchCenter):
909         (WebKit::QtPinchGestureRecognizer::recognize):
910         * UIProcess/qt/QtViewportInteractionEngine.cpp:
911         (WebKit::contentRectInViewportCoordinates):
912         (WebKit::QtViewportInteractionEngine::event):
913         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
914         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
915         (WebKit::QtViewportInteractionEngine::scaleContent):
916         * UIProcess/qt/QtViewportInteractionEngine.h:
917
918 2011-10-26  Zalan Bujtas  <zbujtas@gmail.com>
919
920         Name viewport change event consistently.
921         https://bugs.webkit.org/show_bug.cgi?id=70901
922
923         Reviewed by Kenneth Rohde Christiansen.
924
925         Use ViewportPropertiesDidChange term consistently throughout WebKit.
926
927         * UIProcess/API/efl/PageClientImpl.cpp:
928         (WebKit::PageClientImpl::didChangeViewportProperties):
929         * UIProcess/API/efl/PageClientImpl.h:
930         * UIProcess/API/gtk/PageClientImpl.cpp:
931         (WebKit::PageClientImpl::didChangeViewportProperties):
932         * UIProcess/API/gtk/PageClientImpl.h:
933         * UIProcess/API/mac/PageClientImpl.h:
934         * UIProcess/API/mac/PageClientImpl.mm:
935         (WebKit::PageClientImpl::didChangeViewportProperties):
936         * UIProcess/API/qt/qdesktopwebview.cpp:
937         (QDesktopWebViewPrivate::didChangeViewportProperties):
938         * UIProcess/API/qt/qdesktopwebview_p.h:
939         * UIProcess/API/qt/qtouchwebview.cpp:
940         (QTouchWebViewPrivate::didChangeViewportProperties):
941         * UIProcess/API/qt/qtouchwebview_p.h:
942         * UIProcess/PageClient.h:
943         * UIProcess/WebPageProxy.cpp:
944         (WebKit::WebPageProxy::didChangeViewportProperties):
945         * UIProcess/WebPageProxy.h:
946         * UIProcess/WebPageProxy.messages.in:
947         * UIProcess/qt/QtDesktopWebPageProxy.cpp:
948         (QtDesktopWebPageProxy::didChangeViewportProperties):
949         * UIProcess/qt/QtDesktopWebPageProxy.h:
950         * UIProcess/qt/QtTouchViewInterface.cpp:
951         (WebKit::QtTouchViewInterface::didChangeViewportProperties):
952         * UIProcess/qt/QtTouchViewInterface.h:
953         * UIProcess/qt/QtViewInterface.h:
954         * UIProcess/qt/QtWebPageProxy.cpp:
955         (QtWebPageProxy::didChangeViewportProperties):
956         * UIProcess/qt/QtWebPageProxy.h:
957         * UIProcess/win/WebView.cpp:
958         (WebKit::WebView::didChangeViewportProperties):
959         * UIProcess/win/WebView.h:
960         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
961         (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
962         * WebProcess/WebCoreSupport/WebChromeClient.h:
963
964 2011-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
965
966         [GTK] Remove g_thread_init() calls from gtk-doc scanner too
967         https://bugs.webkit.org/show_bug.cgi?id=70908
968
969         Reviewed by Gustavo Noronha Silva.
970
971         * UIProcess/API/gtk/docs/GNUmakefile.am:
972
973 2011-10-25  Andras Becsi  <andras.becsi@nokia.com>
974
975         [Qt][WK2] Add the animations on the ViewportInteractionEngine
976         https://bugs.webkit.org/show_bug.cgi?id=66664
977
978         Reviewed by Kenneth Rohde Christiansen.
979
980         Introduce a QScroller based panning and a QVariantAnimation based scale animation.
981         QScroller also handles flick gestures and animates overshoot.
982         If a pinch gesture ends, the scale animation will scale and reposition the content
983         such that it is within valid boundaries. The content is by default animated such
984         that the content position as seen in the center of the visible viewport stays
985         in the center, unless the content would be out of valid bounds.
986         The patch also simplifies the ViewportUpdateGuard by using reference counting
987         instead of a boolean for defering update requests.
988
989         * UIProcess/qt/QtPanGestureRecognizer.cpp:
990         (WebKit::QtPanGestureRecognizer::recognize):
991         * UIProcess/qt/QtPanGestureRecognizer.h:
992         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
993         (WebKit::QtPinchGestureRecognizer::recognize):
994         * UIProcess/qt/QtTouchWebPageProxy.cpp:
995         (QtTouchWebPageProxy::doneWithTouchEvent):
996         * UIProcess/qt/QtViewportInteractionEngine.cpp:
997         (WebKit::bindToScaleLimits):
998         (WebKit::ViewportUpdateGuard::ViewportUpdateGuard):
999         (WebKit::ViewportUpdateGuard::~ViewportUpdateGuard):
1000         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
1001         (WebKit::QtViewportInteractionEngine::innerBoundedScale):
1002         (WebKit::QtViewportInteractionEngine::outerBoundedScale):
1003         (WebKit::QtViewportInteractionEngine::updateVisibleRect):
1004         (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
1005         (WebKit::QtViewportInteractionEngine::event):
1006         (WebKit::QtViewportInteractionEngine::stopAnimations):
1007         (WebKit::QtViewportInteractionEngine::calculateBoundariesForScale):
1008         (WebKit::QtViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
1009         (WebKit::QtViewportInteractionEngine::reset):
1010         (WebKit::QtViewportInteractionEngine::setConstraints):
1011         (WebKit::QtViewportInteractionEngine::panGestureStarted):
1012         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
1013         (WebKit::QtViewportInteractionEngine::panGestureCancelled):
1014         (WebKit::QtViewportInteractionEngine::panGestureEnded):
1015         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
1016         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
1017         (WebKit::QtViewportInteractionEngine::pinchGestureEnded):
1018         (WebKit::QtViewportInteractionEngine::contentViewportChanged):
1019         * UIProcess/qt/QtViewportInteractionEngine.h:
1020         (WebKit::QtViewportInteractionEngine::scroller):
1021         (WebKit::QtViewportInteractionEngine::ScaleAnimation::ScaleAnimation):
1022         (WebKit::QtViewportInteractionEngine::ScaleAnimation::updateCurrentValue):
1023
1024 2011-10-26  Zeno Albisser  <zeno.albisser@nokia.com>
1025
1026         [Qt][WK2] Rewrite MiniBrowser in QML
1027         https://bugs.webkit.org/show_bug.cgi?id=70315
1028
1029         Add the first QML based implementation of MiniBrowser.
1030
1031         Patch by Jocelyn Turcotte <jocelyn.turcotte@nokia.com>,
1032                  Zeno Albisser <zeno.albisser@nokia.com>
1033
1034         Reviewed by Tor Arne Vestbø.
1035
1036         * UIProcess/API/qt/qdesktopwebview.cpp:
1037         (QDesktopWebView::mousePressEvent):
1038
1039  2011-10-20  Zeno Albisser  <zeno.albisser@nokia.com>
1040
1041         [Qt][WK2] Disable Context Menus until we have a proper QML implementation
1042         https://bugs.webkit.org/show_bug.cgi?id=70537
1043
1044         This is just a temporary fix to avoid crashes in QtGui based
1045         MiniBrowser that does not link to QtWidgets.
1046
1047         Patch by Jocelyn Turcotte <jocelyn.turcotte@nokia.com>,
1048                  Zeno Albisser <zeno.albisser@nokia.com>
1049
1050         Reviewed by Simon Hausmann.
1051
1052         * UIProcess/qt/WebContextMenuProxyQt.cpp:
1053         (WebKit::WebContextMenuProxyQt::showContextMenu):
1054         (WebKit::WebContextMenuProxyQt::createContextMenu):
1055
1056 2011-10-25  Zeno Albisser  <zeno.albisser@nokia.com>
1057
1058         [Qt][WK2] Remove QAction from MiniBrowser
1059         https://bugs.webkit.org/show_bug.cgi?id=70525
1060
1061         In order to rewrite MiniBrowser in QML we need a suitable
1062         mechanism for triggering navigation actions.
1063         Due to the QtWidgets dependency of QAction the current
1064         solution is not suitable anymore. Therefore we introduce
1065         invokable methods and export properties in QWebNavigationController.
1066
1067         Patch by Jocelyn Turcotte <jocelyn.turcotte@nokia.com>,
1068                  Zeno Albisser <zeno.albisser@nokia.com>
1069
1070         Reviewed by Simon Hausmann.
1071
1072         * UIProcess/API/qt/WKView.h:
1073         * UIProcess/API/qt/qdesktopwebview.h:
1074         * UIProcess/API/qt/qtouchwebpage.h:
1075         * UIProcess/API/qt/qwebkittypes.h: Removed.
1076         * UIProcess/API/qt/qwebnavigationcontroller.cpp:
1077         (QWebNavigationController::QWebNavigationController):
1078         (QWebNavigationController::canGoBack):
1079         (QWebNavigationController::canGoForward):
1080         (QWebNavigationController::canStop):
1081         (QWebNavigationController::canReload):
1082         (QWebNavigationController::goBack):
1083         (QWebNavigationController::goForward):
1084         (QWebNavigationController::stop):
1085         (QWebNavigationController::reload):
1086         * UIProcess/API/qt/qwebnavigationcontroller.h:
1087         * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp:
1088         (tst_CommonViewTests::backAndForward):
1089         (tst_CommonViewTests::reload):
1090         (tst_CommonViewTests::stop):
1091         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
1092         (WebViewAbstraction::goBack):
1093         (WebViewAbstraction::goForward):
1094         (WebViewAbstraction::stop):
1095         (WebViewAbstraction::reload):
1096         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h:
1097         * UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp:
1098         (tst_QDesktopWebView::navigationStatusAtStartup):
1099         (LoadStartedCatcher::onLoadStarted):
1100         (tst_QDesktopWebView::stopEnabledAfterLoadStarted):
1101         * UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp:
1102         (tst_QTouchWebView::navigationStatusAtStartup):
1103         * UIProcess/qt/ClientImpl.cpp:
1104         (dispatchLoadSucceeded):
1105         (dispatchLoadFailed):
1106         (qt_wk_didStartProvisionalLoadForFrame):
1107         (qt_wk_didCommitLoadForFrame):
1108         (qt_wk_didSameDocumentNavigationForFrame):
1109         * UIProcess/qt/QtWebPageProxy.cpp:
1110         (QtWebPageProxy::QtWebPageProxy):
1111         (QtWebPageProxy::canGoBack):
1112         (QtWebPageProxy::goBack):
1113         (QtWebPageProxy::canGoForward):
1114         (QtWebPageProxy::goForward):
1115         (QtWebPageProxy::canStop):
1116         (QtWebPageProxy::stop):
1117         (QtWebPageProxy::canReload):
1118         (QtWebPageProxy::reload):
1119         (QtWebPageProxy::navigationStateChanged):
1120         (QtWebPageProxy::didRelaunchProcess):
1121         (QtWebPageProxy::processDidCrash):
1122         * UIProcess/qt/QtWebPageProxy.h:
1123         * WebKit2API.pri:
1124
1125 2011-10-26  Ryosuke Niwa  <rniwa@webkit.org>
1126
1127         Another GTK build fix attempt after r98413 and r98416.
1128
1129         * WebProcess/Plugins/PluginProxy.cpp:
1130         (WebKit::PluginProxy::paint):
1131         (WebKit::PluginProxy::geometryDidChange):
1132         (WebKit::PluginProxy::update):
1133
1134 2011-10-25  Ryosuke Niwa  <rniwa@webkit.org>
1135
1136         C/C++ needs ; after each statement.
1137
1138         * PluginProcess/PluginControllerProxy.cpp:
1139         (WebKit::PluginControllerProxy::geometryDidChange):
1140
1141 2011-10-25  Ryosuke Niwa  <rniwa@webkit.org>
1142
1143         GTK build fix attempt after r98413 and r98416.
1144
1145         * PluginProcess/PluginControllerProxy.cpp:
1146         (WebKit::PluginControllerProxy::paint):
1147         (WebKit::PluginControllerProxy::geometryDidChange):
1148
1149 2011-10-25  Mark Hahnenberg  <mhahnenberg@apple.com>
1150
1151         Remove deletePropertyVirtual
1152         https://bugs.webkit.org/show_bug.cgi?id=70738
1153
1154         Reviewed by Geoffrey Garen.
1155
1156         Removed all declarations and definitions of deletePropertyVirtual.
1157         Also replaced all call sites to deletePropertyVirtual with a 
1158         corresponding lookup in the MethodTable.
1159
1160         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1161         * WebProcess/Plugins/Netscape/JSNPObject.h:
1162         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1163         (WebKit::NPJSObject::removeProperty):
1164
1165 2011-10-25  Brent Fulgham  <bfulgham@webkit.org>
1166
1167         [WinCairo] Unreviewed build fix after r97587.
1168
1169         * win/WebKit2CFLite.def:
1170
1171 2011-10-25  Anders Carlsson  <andersca@apple.com>
1172
1173         CG plug-ins are always given a context with a scale factor of 1, even when the device scale factor is something else
1174         https://bugs.webkit.org/show_bug.cgi?id=67227
1175         <rdar://problem/10048319>
1176
1177         Reviewed by Sam Weinig.
1178
1179         * PluginProcess/PluginControllerProxy.cpp:
1180         (WebKit::PluginControllerProxy::paint):
1181         Apply the scale factor when painting.
1182
1183         * WebProcess/Plugins/PluginProxy.cpp:
1184         (WebKit::PluginProxy::paint):
1185         Apply the scale factor when painting.
1186
1187         (WebKit::PluginProxy::geometryDidChange):
1188         Make sure to apply the contents scale factor to the backing store size.
1189
1190         (WebKit::PluginProxy::update):
1191         Apply the scale factor (when painting).
1192
1193 2011-10-25  Mark Hahnenberg  <mhahnenberg@apple.com>
1194
1195         Remove putVirtual
1196         https://bugs.webkit.org/show_bug.cgi?id=70740
1197
1198         Reviewed by Geoffrey Garen.
1199
1200         Removed all declarations and definitions of putVirtual.
1201         Also replaced all call sites to putVirtual with a 
1202         corresponding lookup in the MethodTable.
1203
1204         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1205         * WebProcess/Plugins/Netscape/JSNPObject.h:
1206         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1207         (WebKit::NPJSObject::setProperty):
1208
1209 2011-10-25  Anders Carlsson  <andersca@apple.com>
1210
1211         Plug-ins have no way to find out when the device scale factor changes
1212         https://bugs.webkit.org/show_bug.cgi?id=67226
1213         <rdar://problem/10048276>
1214
1215         Reviewed by Sam Weinig.
1216
1217         * PluginProcess/PluginControllerProxy.cpp:
1218         (WebKit::PluginControllerProxy::geometryDidChange):
1219         * PluginProcess/PluginControllerProxy.h:
1220         This now takes the contentsScaleFactor and calls contentsScaleFactorChanged on its plug-in
1221         if the scale factor changes.
1222
1223         * PluginProcess/PluginControllerProxy.messages.in:
1224         GeometryDidChange now takes a contents scale factor parameter.
1225
1226         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1227         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1228         (WebKit::NetscapePlugin::contentsScaleFactorChanged):
1229         Implement contentsScaleFactorChanged and call NPP_SetValue with the new scale factor.
1230
1231         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
1232         (WebKit::BuiltInPDFView::contentsScaleFactorChanged):
1233         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
1234         Add stub.
1235
1236         * WebProcess/Plugins/Plugin.h:
1237         Add pure virtual contentsScaleFactorChanged member function.
1238
1239         * WebProcess/Plugins/PluginProxy.cpp:
1240         (WebKit::PluginProxy::geometryDidChange):
1241         Add geometryDidChange overload that doesn't take any parameters. Make it send over the
1242         new scale factor to the plug-in process.
1243
1244         (WebKit::PluginProxy::contentsScaleFactorChanged):
1245         Call geometryDidChange.
1246
1247         * WebProcess/Plugins/PluginView.cpp:
1248         (WebKit::PluginView::setDeviceScaleFactor):
1249         Call Plugin::contentsScaleFactorChanged.
1250
1251         * WebProcess/WebPage/WebPage.cpp:
1252         (WebKit::WebPage::setDeviceScaleFactor):
1253         Call setDeviceScaleFactor on all registered plug-ins.
1254
1255 2011-10-25  Beth Dakin  <bdakin@apple.com>
1256
1257         https://bugs.webkit.org/show_bug.cgi?id=70852
1258         Setting up a HiDPI base-level GraphicsContext should be more straightforward for 
1259         WebKit2
1260
1261         Reviewed by Dan Bernstein.
1262
1263         When we need a base-level HiDPI GraphicsContext, call into new GraphicsContext api 
1264         GraphicsContext::applyDeviceScaleFactor() rather than manually scaling and 
1265         adjusting the base CTM.
1266         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1267         (WebKit::DrawingAreaImpl::display):
1268         * WebProcess/WebPage/WebPage.cpp:
1269         (WebKit::WebPage::snapshotInViewCoordinates):
1270         (WebKit::WebPage::scaledSnapshotInDocumentCoordinates):
1271
1272 2011-10-25  Anders Carlsson  <andersca@apple.com>
1273
1274         Plug-ins have to use JavaScript to find out the current device scale factor
1275         https://bugs.webkit.org/show_bug.cgi?id=67225
1276         <rdar://problem/10048258>
1277
1278         Reviewed by Darin Adler.
1279
1280         * PluginProcess/PluginControllerProxy.cpp:
1281         (WebKit::PluginControllerProxy::PluginControllerProxy):
1282         Initialize m_contentsScaleFactor.
1283
1284         * PluginProcess/PluginControllerProxy.h:
1285         Add contentsScaleFactor member function and m_contentsScaleFactor member variable.
1286
1287         * PluginProcess/PluginCreationParameters.cpp:
1288         (WebKit::PluginCreationParameters::PluginCreationParameters):
1289         (WebKit::PluginCreationParameters::encode):
1290         (WebKit::PluginCreationParameters::decode):
1291         * PluginProcess/PluginCreationParameters.h:
1292         Add contentsScaleFactor to the creation parameters.
1293
1294         * PluginProcess/mac/PluginControllerProxyMac.mm:
1295         (WebKit::PluginControllerProxy::contentsScaleFactor):
1296         Return the cached m_contentsScaleFactor.
1297
1298         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1299         (WebKit::NPN_GetValue):
1300         Handle getting the scale factor by calling NetscapePlugin::contentsScaleFactor.
1301
1302         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1303         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1304         (WebKit::NetscapePlugin::contentsScaleFactor):
1305         Ask the plug-in controller for the contents scale factor.
1306
1307         * WebProcess/Plugins/PluginController.h:
1308         Add contentsScaleFactor pure virtual member function.
1309
1310         * WebProcess/Plugins/PluginProxy.cpp:
1311         (WebKit::PluginProxy::initialize):
1312         Set contentsScaleFactor in the creation parameters.
1313
1314         * WebProcess/Plugins/PluginView.cpp:
1315         (WebKit::PluginView::contentsScaleFactor):
1316         Get the device scale factor from the page.
1317
1318         * WebProcess/Plugins/PluginView.h:
1319         Add contentsScaleFactor().
1320
1321         * WebProcess/WebPage/WebPage.cpp:
1322         (WebKit::WebPage::setDeviceScaleFactor):
1323         Bail if the scale factor didn't change.
1324
1325 2011-10-25  Sam Weinig  <sam@webkit.org>
1326
1327         Flesh out WKBrowsingContextLoadDelegate a bit
1328         https://bugs.webkit.org/show_bug.cgi?id=70846
1329
1330         Add didReceiveServerRedirectForProvisionalLoad, didFailProvisionalLoad
1331         and didFailLoad.
1332
1333         Reviewed by Anders Carlsson.
1334
1335         Test: WKBrowsingContextLoadDelegateTest
1336
1337         * UIProcess/API/mac/WKBrowsingContextController.mm:
1338         (didReceiveServerRedirectForProvisionalLoadForFrame):
1339         (didFailProvisionalLoadWithErrorForFrame):
1340         (didFailLoadWithErrorForFrame):
1341         (setUpPageLoaderClient):
1342         * UIProcess/API/mac/WKBrowsingContextLoadDelegate.h:
1343
1344 2011-10-25  Anders Carlsson  <andersca@apple.com>
1345
1346         Assertion failure when zooming a PDF in an iframe
1347         https://bugs.webkit.org/show_bug.cgi?id=70849
1348
1349         Reviewed by Alexey Proskuryakov.
1350
1351         If the plug-in doesn't want window relative coordinates, we shouldn't give the plug-in window relative coordinates.
1352
1353         * WebProcess/Plugins/PluginView.cpp:
1354         (WebKit::PluginView::viewGeometryDidChange):
1355
1356 2011-10-25  Sam Weinig  <sam@webkit.org>
1357
1358         Make loadFileURL:restrictToFilesWithin: work, albeit, without the correct
1359         restrictions for now.
1360
1361         Reviewed by Anders Carlsson.
1362
1363         * UIProcess/API/mac/WKBrowsingContextController.mm:
1364         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
1365
1366 2011-10-25  Anders Carlsson  <andersca@apple.com>
1367
1368         PDF SUBFRAMES: Incomplete repaint after pinch to zoom
1369         https://bugs.webkit.org/show_bug.cgi?id=70821
1370         <rdar://problem/10312733>
1371
1372         Reviewed by Simon Fraser.
1373
1374         Add a new pure virtual member function, Plugin::wantsWindowRelativeCoordinates.
1375         If a plug-in subclass returns true, we'll keep giving the plug-in coordinates that
1376         are relative to the containing window. If a plug-in subclass returns false, we'll give it
1377         coordinates in a much more sane coordinate system, with the origin at the top left corner of the plug-in.
1378
1379         Change BuiltinPDFView to return false so that it'll work correctly with pinch to zoom.
1380         
1381         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1382         (WebKit::NetscapePlugin::wantsWindowRelativeCoordinates):
1383         Make wantsWindowRelativeCoordinates return true.
1384
1385         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
1386         (WebKit::BuiltInPDFView::paint):
1387         Remove translation since the graphics context is already set up in the right way.
1388
1389         (WebKit::BuiltInPDFView::paintContent):
1390         No need to offset by the plug-in view location anymore.
1391
1392         (WebKit::BuiltInPDFView::paintControls):
1393         Account for the scrollbars being children of the parent scroll view here.
1394
1395         (WebKit::BuiltInPDFView::wantsWindowRelativeCoordinates):
1396         Return false.
1397
1398         (WebKit::BuiltInPDFView::convertFromContainingViewToScrollbar):
1399         Implement this so that scrollbar hit testing works correctly.
1400
1401         * WebProcess/Plugins/Plugin.h:
1402         Add wantsWindowRelativeCoordinates.
1403
1404         * WebProcess/Plugins/PluginProxy.cpp:
1405         (WebKit::PluginProxy::wantsWindowRelativeCoordinates):
1406         Return true for now.
1407
1408         * WebProcess/Plugins/PluginView.cpp:
1409         (WebKit::PluginView::renderer):
1410         Add simple getter.
1411
1412         (WebKit::PluginView::paint):
1413         Handle the case when the plug-in doesn't want window relative coordinates.
1414
1415         (WebKit::PluginView::transformsAffectFrameRect):
1416         Return true here.
1417
1418         (WebKit::PluginView::viewGeometryDidChange):
1419         No need to adjust the bounds to account for the scale factor now, since the frame rect will always be the
1420         same regardless of the transform.
1421
1422         (WebKit::PluginView::clipRectInWindowCoordinates):
1423         Ditto.
1424
1425 2011-10-25  John Sullivan  <sullivan@apple.com>
1426
1427         "Open with" item missing from PDF context menu in some cases
1428         https://bugs.webkit.org/show_bug.cgi?id=70828
1429         <rdar://problem/10034302>
1430
1431         Reviewed by Anders Carlsson.
1432
1433         * UIProcess/API/mac/PDFViewController.mm:
1434         (insertOpenWithDefaultPDFMenuItem):
1435         New helper function, extracted from -menuForEvent:. Identical to original code except
1436         that it inserts the item at a specified index, rather than always at the end.
1437         (-[WKPDFView menuForEvent:]):
1438         Now keeps track of whether the Open With item has been inserted while iterating through
1439         the PDFKit-supplied menu items looking for a "Copy" item. If a "Copy" item is not found,
1440         inserts the Open With item at the top of the context menu.
1441
1442 2011-10-25  Zeno Albisser  <zeno.albisser@nokia.com>
1443
1444         [Qt][WK2] QDesktopWebView and QTouchWebView should be declared in the meta type system.
1445         https://bugs.webkit.org/show_bug.cgi?id=70693
1446
1447         This change allows us to use the template based features of the meta type system
1448         such as using the WebView classes as types for QVariant.
1449
1450         Reviewed by Simon Hausmann.
1451
1452         * UIProcess/API/qt/qdesktopwebview.h:
1453         * UIProcess/API/qt/qtouchwebview.h:
1454
1455 2011-10-25  Zalan Bujtas  <zbujtas@gmail.com>
1456
1457         [Qt][WK2] Remove redundant setPageIsVisible() API
1458         https://bugs.webkit.org/show_bug.cgi?id=70520
1459
1460         Use DrawingAreaProxy::visibilityDidChange() instead of DrawingAreaProxy::setPageIsVisible()
1461         Remove DrawingAreaProxy::setPageIsVisible(), not used anymore.
1462         This change disables the ability of suspending and resuming painting for TiledDrawingAreaProxy.
1463         However, TiledDrawingAreaProxy is about to be deprecated by using DrawingAreaProxyImpl
1464         as the UI process drawing area proxy for tiled based rendering.
1465
1466         Reviewed by Simon Hausmann.
1467
1468         * UIProcess/API/qt/qtouchwebpage.cpp:
1469         (QTouchWebPage::QTouchWebPage):
1470         (QTouchWebPagePrivate::setPage):
1471         * UIProcess/API/qt/qtouchwebpage.h:
1472         * UIProcess/API/qt/qtouchwebview.cpp:
1473         (QTouchWebView::QTouchWebView):
1474         (QTouchWebView::touchEvent):
1475         (QTouchWebView::onVisibleChanged):
1476         * UIProcess/API/qt/qtouchwebview.h:
1477         * UIProcess/DrawingAreaProxy.h:
1478         * UIProcess/DrawingAreaProxyImpl.cpp:
1479         * UIProcess/DrawingAreaProxyImpl.h:
1480         * UIProcess/TiledDrawingAreaProxy.cpp:
1481         (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
1482         (WebKit::TiledDrawingAreaProxy::deviceScaleFactorDidChange):
1483         * UIProcess/TiledDrawingAreaProxy.h:
1484         * UIProcess/WebPageProxy.cpp:
1485         (WebKit::WebPageProxy::viewStateDidChange):
1486         * UIProcess/qt/QtWebPageProxy.cpp:
1487         * UIProcess/qt/QtWebPageProxy.h:
1488
1489 2011-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1490
1491         [GTK] Add go_to_back_forward_list_item() to WebKit2 GTK+ API
1492         https://bugs.webkit.org/show_bug.cgi?id=69825
1493
1494         Reviewed by Martin Robinson.
1495
1496         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
1497         (webkitBackForwardListItemGetWKItem):
1498         * UIProcess/API/gtk/WebKitBackForwardListPrivate.h:
1499         * UIProcess/API/gtk/WebKitWebView.cpp:
1500         (webkit_web_view_go_to_back_forward_list_item):
1501         * UIProcess/API/gtk/WebKitWebView.h:
1502         * UIProcess/API/gtk/tests/TestBackForwardList.cpp:
1503         (testBackForwardListNavigation):
1504
1505 2011-10-25  Vamshikrishna Yellenki  <vamshi@motorola.com>
1506
1507         [WK2]Critical warning while building WebKit2 GTK+
1508         https://bugs.webkit.org/show_bug.cgi?id=70591
1509
1510         Reviewed by Martin Robinson.
1511
1512         * WebProcess/WebPage/WebPage.cpp: Included DataObjectGtk.h to avoid warnings for GTK
1513
1514 2011-10-24  Sam Weinig  <sam@webkit.org>
1515
1516         Simplify url accessors on WKBrowsingContextController
1517         https://bugs.webkit.org/show_bug.cgi?id=70797
1518
1519         Reviewed by Anders Carlsson.
1520
1521         * UIProcess/API/C/WKPage.cpp:
1522         (WKPageCopyActiveURL):
1523         (WKPageCopyProvisionalURL):
1524         (WKPageCopyCommittedURL):
1525         * UIProcess/API/C/WKPage.h:
1526         Add accessors to C SPI.
1527
1528         * UIProcess/API/mac/WKBrowsingContextController.h:
1529         Remove unreachableURL accessor for now. It may make a glorious return when we have
1530         error page support.
1531
1532         * UIProcess/API/mac/WKBrowsingContextController.mm:
1533         (-[WKBrowsingContextController activeURL]):
1534         (-[WKBrowsingContextController provisionalURL]):
1535         (-[WKBrowsingContextController committedURL]):
1536         Implement these in terms of the new C SPI.
1537
1538         * UIProcess/WebPageProxy.cpp:
1539         (WebKit::WebPageProxy::activeURL):
1540         Add computation of the "active" URL, which is the URL one would show
1541         in an address field. It is the pending URL when there is one, the provisional
1542         URL when there is one, and otherwise the committed/final URL.
1543
1544         (WebKit::WebPageProxy::provisionalURL):
1545         (WebKit::WebPageProxy::committedURL):
1546         Add access to the main frame URL.
1547         * UIProcess/WebPageProxy.h:
1548
1549 2011-10-24  Sam Weinig  <sam@webkit.org>
1550
1551         Hook up minimalist load delegate to WKBrowsingContextController
1552         https://bugs.webkit.org/show_bug.cgi?id=70764
1553
1554         Reviewed by Simon Fraser.
1555
1556         * UIProcess/API/mac/WKBrowsingContextController.h:
1557         * UIProcess/API/mac/WKBrowsingContextController.mm:
1558         (-[WKBrowsingContextController loadDelegate]):
1559         (-[WKBrowsingContextController setLoadDelegate:]):
1560         Add loadDelegate getter/setter. As per convention, the delegate is not
1561         retained.
1562
1563         (didStartProvisionalLoadForFrame):
1564         (didCommitLoadForFrame):
1565         (didFinishLoadForFrame):
1566         (setUpPageLoaderClient):
1567         (-[WKBrowsingContextController initWithPageRef:]):
1568         Hookup the delegate to a WKPageLoaderClient.
1569
1570         * UIProcess/API/mac/WKBrowsingContextLoadDelegate.h: Added.
1571         Add load delegate as a proper protocol.
1572
1573         * WebKit2.xcodeproj/project.pbxproj:
1574         Add new file.
1575
1576 2011-10-24  Michael Saboff  <msaboff@apple.com>
1577
1578         WebKit doesn't build with recent changes to libdispatch
1579         https://bugs.webkit.org/show_bug.cgi?id=70737
1580
1581         Added initialization for new WebKitSystemInterface function 
1582         CreateVMPressureDispatchOnMainQueue.
1583
1584         Reviewed by Geoffrey Garen.
1585
1586         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1587         (InitWebCoreSystemInterface):
1588
1589 2011-10-24  Sam Weinig  <sam@webkit.org>
1590
1591         Add URL getters for the WKBrowsingContextController
1592         https://bugs.webkit.org/show_bug.cgi?id=70752
1593
1594         Reviewed by Anders Carlsson.
1595
1596         * UIProcess/API/mac/WKBrowsingContextController.h:
1597         * UIProcess/API/mac/WKBrowsingContextController.mm:
1598         (autoreleased):
1599         Added helpers for autoreleasing.
1600
1601         (-[WKBrowsingContextController activeURL]):
1602         Added buy not implemented yet.
1603
1604         (-[WKBrowsingContextController pendingURL]):
1605         (-[WKBrowsingContextController provisionalURL]):
1606         (-[WKBrowsingContextController commitedURL]):
1607         (-[WKBrowsingContextController unreachableURL]):
1608         Added getters.
1609
1610         (-[WKBrowsingContextController title]):
1611         Convert to new autoreleased helper.
1612
1613 2011-10-24  Sam Weinig  <sam@webkit.org>
1614
1615         Add zoom and title support to Objective-C WebKit2 API
1616         https://bugs.webkit.org/show_bug.cgi?id=70744
1617
1618         Reviewed by Darin Adler.
1619
1620         * UIProcess/API/mac/WKBrowsingContextController.h:
1621         * UIProcess/API/mac/WKBrowsingContextController.mm:
1622         (-[WKBrowsingContextController title]):
1623         (-[WKBrowsingContextController textZoom]):
1624         (-[WKBrowsingContextController setTextZoom:]):
1625         (-[WKBrowsingContextController pageZoom]):
1626         (-[WKBrowsingContextController setPageZoom:]):
1627
1628 2011-10-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1629
1630         [GTK] Fix make distcheck build
1631         https://bugs.webkit.org/show_bug.cgi?id=69745
1632
1633         Reviewed by Martin Robinson.
1634
1635         * GNUmakefile.am:
1636
1637 2011-10-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1638
1639         [GTK] Initial implementation of back forward list for WebKit2 GTK+ API
1640         https://bugs.webkit.org/show_bug.cgi?id=69343
1641
1642         Reviewed by Martin Robinson.
1643
1644         * GNUmakefile.am: Add new files to compilation.
1645         * UIProcess/API/gtk/WebKitBackForwardList.cpp: Added.
1646         (webkitBackForwardListFinalize):
1647         (webkit_back_forward_list_init):
1648         (webkit_back_forward_list_class_init):
1649         (webkitBackForwardListGetOrCreateItem): Helper function that
1650         creates a new WebKitBackForwardListItem for the given
1651         WebBackForwardListItem or returns it from the cache if it's
1652         already cached.
1653         (webkitBackForwardListCreateList): Helper function to convert a
1654         WKArray of WebBackForwardListItems into a GList of
1655         WebKitBackForwardListItems.
1656         (webkitBackForwardListCreate): Create a new WebKitBackForwardList.
1657         (webkitBackForwardListChanged): Emits changed signal when the back
1658         forward list changes.
1659         (webkit_back_forward_list_get_current_item):
1660         (webkit_back_forward_list_get_back_item):
1661         (webkit_back_forward_list_get_forward_item):
1662         (webkit_back_forward_list_get_nth_item):
1663         (webkit_back_forward_list_get_length):
1664         (webkit_back_forward_list_get_back_list):
1665         (webkit_back_forward_list_get_back_list_with_limit):
1666         (webkit_back_forward_list_get_forward_list):
1667         (webkit_back_forward_list_get_forward_list_with_limit):
1668         * UIProcess/API/gtk/WebKitBackForwardList.h: Added.
1669         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Added.
1670         (webkitBackForwardListItemFinalize):
1671         (webkit_back_forward_list_item_init):
1672         (webkit_back_forward_list_item_class_init):
1673         (historyItemsMap): Global cache for WebKitBackForwardListItems.
1674         (webkitBackForwardListItemFinalized):
1675         (webkitBackForwardListItemGetOrCreate): Helper function that
1676         creates a new WebKitBackForwardListItem for the given
1677         WebBackForwardListItem or returns it from the global cache if it's
1678         already cached.
1679         (webkit_back_forward_list_item_get_uri):
1680         (webkit_back_forward_list_item_get_title):
1681         (webkit_back_forward_list_item_get_original_uri):
1682         * UIProcess/API/gtk/WebKitBackForwardListItem.h: Added.
1683         * UIProcess/API/gtk/WebKitBackForwardListPrivate.h: Added.
1684         * UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
1685         (didChangeBackForwardList): Call webkitBackForwardListChanged() to
1686         notify that the list has changed.
1687         (webkitWebLoaderClientAttachLoaderClientToPage): Add
1688         implementation for didChangeBackForwardList.
1689         * UIProcess/API/gtk/WebKitWebView.cpp:
1690         (webkitWebViewConstructed):
1691         (webkit_web_view_get_back_forward_list): Return the back forward
1692         list of the view.
1693         * UIProcess/API/gtk/WebKitWebView.h:
1694         * UIProcess/API/gtk/tests/GNUmakefile.am: Add new test.
1695         * UIProcess/API/gtk/tests/TestBackForwardList.cpp: Added.
1696         (serverCallback):
1697         (testBackForwardListNavigation):
1698         (testBackForwardListLimitAndCache):
1699         (beforeAll):
1700         (afterAll):
1701         * UIProcess/API/gtk/tests/TestMain.h:
1702         (Test::~Test): Check there are no objects leaked.
1703         (Test::objectFinalized): Callback called when a GObject is
1704         deleted, used to remove the watched object the list.
1705         (Test::assertObjectIsDeletedWhenTestFinishes): Add an object to
1706         the list of watched objects and add a weak pointer to remove it
1707         from the list when the object is finalized. If there aren't
1708         objects leaked, the list should be empty when the test finishes.
1709         * UIProcess/API/gtk/tests/WebViewTest.cpp:
1710         (WebViewTest::WebViewTest): Watch the web view to make sure it's
1711         not leaked.
1712         * UIProcess/API/gtk/tests/WebViewTest.h: Make WebViewTest inherit
1713         from Test class.
1714         * UIProcess/API/gtk/webkit2.h: Include WebKitBackForwardList.h and
1715         WebKitBackForwardListItem.h.
1716         * UIProcess/API/gtk/webkit2marshal.list:
1717
1718 2011-10-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1719
1720         [GTK] Add helper function to set the loader client in WebKitWebView
1721         https://bugs.webkit.org/show_bug.cgi?id=70594
1722
1723         Reviewed by Martin Robinson.
1724
1725         * UIProcess/API/gtk/WebKitWebView.cpp:
1726         (webkitWebViewSetLoaderClient): Helper function to set the loader
1727         client.
1728         (webkitWebViewConstructed): Use webkitWebViewSetLoaderClient() to
1729         avoid unnecessary checks.
1730         (webkit_web_view_set_loader_client): Use
1731         webkitWebViewSetLoaderClient().
1732
1733 2011-10-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1734
1735         [GTK] Remove g_thread_init() calls
1736         https://bugs.webkit.org/show_bug.cgi?id=70717
1737
1738         Reviewed by Xan Lopez.
1739
1740         With newer glib it's not needed anymore and with previous versions
1741         it was already called by g_type_init().
1742
1743         * UIProcess/API/gtk/tests/TestMain.cpp:
1744         (main):
1745
1746 2011-10-24  Zeno Albisser  <zeno.albisser@nokia.com>
1747
1748         [Qt][WK2] WebView does not get focus when being clicked / touched in MiniBrowser.
1749         https://bugs.webkit.org/show_bug.cgi?id=70613
1750
1751         Make TouchWebView and DesktopWebView take the focus whenever it receives
1752         a MouseClick or a TouchEvent.
1753
1754         Reviewed by Simon Hausmann.
1755
1756         * UIProcess/API/qt/qdesktopwebview.cpp:
1757         (QDesktopWebView::mousePressEvent):
1758         * UIProcess/API/qt/qtouchwebview.cpp:
1759         (QTouchWebView::touchEvent):
1760         * UIProcess/API/qt/qtouchwebview.h:
1761
1762 2011-10-24  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
1763
1764         [GTK] [WK2] Memory leaks in WebContextGtk.cpp
1765         https://bugs.webkit.org/show_bug.cgi?id=70505
1766
1767         Free the output of g_build_filename()
1768
1769         Reviewed by Martin Robinson.
1770
1771         * UIProcess/gtk/WebContextGtk.cpp:
1772         (WebKit::WebContext::platformDefaultDatabaseDirectory):
1773         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
1774
1775 2011-10-23  Mark Hahnenberg  <mhahnenberg@apple.com>
1776
1777         Remove getConstructDataVirtual
1778         https://bugs.webkit.org/show_bug.cgi?id=70638
1779
1780         Reviewed by Darin Adler.
1781
1782         Removed all declarations and definitions of getConstructDataVirtual.
1783         Also replaced all call sites to getConstructDataVirtual with a 
1784         corresponding lookup in the MethodTable.
1785
1786         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1787         * WebProcess/Plugins/Netscape/JSNPObject.h:
1788
1789 2011-10-21  Alexey Proskuryakov  <ap@apple.com>
1790
1791         [WK2] Clicking a print button in a PDF doesn't do anything
1792         https://bugs.webkit.org/show_bug.cgi?id=70663
1793         <rdar://problem/9795014>
1794
1795         Reviewed by Dan Bernstein.
1796
1797         * UIProcess/WebPageProxy.h:
1798         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::printMainFrame): Added a public method
1799         that PDFViewController could call.
1800
1801         * UIProcess/API/mac/PDFViewController.h:
1802         * UIProcess/API/mac/PDFViewController.mm:
1803         (-[WKPDFView PDFViewPerformPrint:]):
1804         (WebKit::PDFViewController::print):
1805         Connect PDFView delegate method for printing.
1806
1807 2011-10-21  Sam Weinig  <sam@webkit.org>
1808
1809         Lookup does not work on text using web fonts in WebKit2
1810         https://bugs.webkit.org/show_bug.cgi?id=70669
1811         <rdar://problem/10147441>
1812
1813         Reviewed by Anders Carlsson.
1814
1815         * WebProcess/WebPage/mac/WebPageMac.mm:
1816         (WebKit::WebPage::performDictionaryLookupForRange):
1817         If the font for the range is web font (and therefore no NSFont is 
1818         available), use the system font of the same size. While not great,
1819         it approximates what WebKit1 does.
1820
1821 2011-10-21  Sam Weinig  <sam@webkit.org>
1822
1823         Fix crash below CoreIPC::MessageSender<WebKit::WebPage>::send<Messages::WebPageProxy::DidPerformDictionaryLookup>
1824         https://bugs.webkit.org/show_bug.cgi?id=70667
1825         <rdar://problem/9622186>
1826
1827         Reviewed by Anders Carlsson.
1828
1829         * Shared/DictionaryPopupInfo.cpp:
1830         (WebKit::DictionaryPopupInfo::encode):
1831         (WebKit::DictionaryPopupInfo::decode):
1832         Account for the fact that the options dictionary can be null. This is due to Lookup passing
1833         back a null, rather than empty, dictionary when it could not find any interesting characteristics.
1834
1835 2011-10-21  Sam Weinig  <sam@webkit.org>
1836
1837         Add WKBrowsingContextGroup which wraps WKPageGroupRef
1838         https://bugs.webkit.org/show_bug.cgi?id=70665
1839
1840         Reviewed by Anders Carlsson.
1841
1842         * UIProcess/API/mac/WKBrowsingContextGroup.h: Added.
1843         * UIProcess/API/mac/WKBrowsingContextGroup.mm: Added.
1844         (-[WKBrowsingContextGroup initWithIdentifier:]):
1845         (-[WKBrowsingContextGroup dealloc]):
1846         (-[WKBrowsingContextGroup pageGroupRef]):
1847         * UIProcess/API/mac/WKBrowsingContextGroupInternal.h: Added.
1848         * UIProcess/API/mac/WKView.h:
1849         * UIProcess/API/mac/WKView.mm:
1850         (-[WKView initWithFrame:processGroup:browsingContextGroup:]):
1851         * WebKit2.xcodeproj/project.pbxproj:
1852
1853 2011-10-21  Sam Weinig  <sam@webkit.org>
1854
1855         Mark member variables of WebKit2 API @private
1856         https://bugs.webkit.org/show_bug.cgi?id=70655
1857
1858         Reviewed by Simon Fraser.
1859
1860         * UIProcess/API/mac/WKBrowsingContextController.h:
1861         * UIProcess/API/mac/WKView.h:
1862
1863 2011-10-21  Sam Weinig  <sam@webkit.org>
1864
1865         Rename WKProcessCluster to WKProcessGroup
1866         https://bugs.webkit.org/show_bug.cgi?id=70654
1867
1868         Reviewed by Simon Fraser.
1869
1870         * UIProcess/API/mac/WKProcessCluster.h: Removed.
1871         * UIProcess/API/mac/WKProcessCluster.mm: Removed.
1872         * UIProcess/API/mac/WKProcessClusterInternal.h: Removed.
1873         * UIProcess/API/mac/WKProcessGroup.h: Copied from Source/WebKit2/UIProcess/API/mac/WKProcessCluster.h.
1874         * UIProcess/API/mac/WKProcessGroup.mm: Copied from Source/WebKit2/UIProcess/API/mac/WKProcessCluster.mm.
1875         (-[WKProcessGroup initWithInjectedBundleURL:]):
1876         * UIProcess/API/mac/WKProcessGroupInternal.h: Copied from Source/WebKit2/UIProcess/API/mac/WKProcessClusterInternal.h.
1877         * UIProcess/API/mac/WKView.h:
1878         * UIProcess/API/mac/WKView.mm:
1879         (-[WKView initWithFrame:processCluster:]):
1880         * WebKit2.xcodeproj/project.pbxproj:
1881
1882 2011-10-21  Sam Weinig  <sam@webkit.org>
1883
1884         Remove ability to create a WKView without a WKContextRef and WKPageGroupRef
1885         https://bugs.webkit.org/show_bug.cgi?id=70653
1886
1887         Reviewed by Simon Fraser.
1888
1889         Requiring a context and pagegroup removes the concept of global contexts,
1890         which is something that is both confusing, and makes Objective-C wrapping
1891         harder.
1892
1893         * UIProcess/API/mac/WKView.mm:
1894         (-[WKView initWithFrame:processCluster:]):
1895         * UIProcess/API/mac/WKViewPrivate.h:
1896         Remove init methods that didn't take both a context and a pagegroup.
1897
1898 2011-10-21  Alexey Proskuryakov  <ap@apple.com>
1899
1900         [WK2] Crash after printing a view with accelerated compositing content
1901         https://bugs.webkit.org/show_bug.cgi?id=70643
1902         <rdar://problem/9479083>
1903
1904         Reviewed by Darin Adler.
1905
1906         * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
1907         We cannot rely on -[WKView drawRect:] calling endPrinting() for us. That call to endPrinting()
1908         is still necessary to paint e.g. when resizing a window while a print dialog is present.
1909
1910 2011-10-21  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
1911
1912         [WK2] WebFrameLoaderClient::shouldFallback() should use a port-specific implementation
1913         https://bugs.webkit.org/show_bug.cgi?id=70055
1914
1915         Reviewed by Luiz Agostini.
1916
1917         In QtWebKit 1, our FrameLoaderClient::shouldFallback was checking for InterruptedForPolicyChange
1918         error. In WebKit2, we are relying on the common implementation for WebFrameLoaderClient::shouldFallback
1919         which doesn't check for the same error. Here we add this check only for Qt.
1920
1921         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1922         (WebKit::WebFrameLoaderClient::shouldFallBack):
1923
1924 2011-10-21  Anders Carlsson  <andersca@apple.com>
1925
1926         Flash of white when loading a page after a web process crash
1927         https://bugs.webkit.org/show_bug.cgi?id=70615
1928         <rdar://problem/10306906>
1929
1930         Reviewed by Darin Adler.
1931
1932         * UIProcess/API/mac/WKView.mm:
1933         (-[WKView _processDidCrash]):
1934         (-[WKView _didRelaunchProcess]):
1935         Remove calls to setNeedsDisplay here.
1936
1937         * UIProcess/WebPageProxy.cpp:
1938         (WebKit::WebPageProxy::processDidCrash):
1939         Call setNeedsDisplay, but only if calling out to the loader client didn't relaunch the web process.
1940
1941         * WebProcess/WebPage/DrawingArea.h:
1942         (WebKit::DrawingArea::setPaintingEnabled):
1943         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1944         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
1945         (WebKit::DrawingAreaImpl::setNeedsDisplay):
1946         (WebKit::DrawingAreaImpl::scroll):
1947         (WebKit::DrawingAreaImpl::setPaintingEnabled):
1948         * WebProcess/WebPage/DrawingAreaImpl.h:
1949         Add a way to disable painting completely for a drawing area.
1950
1951         * WebProcess/WebPage/WebPage.cpp:
1952         (WebKit::WebPage::WebPage):
1953         Disable painting while setting up the web page, otherwise we'll get paint requests when we set the
1954         active state of the web page.
1955
1956 2011-10-21  Csaba Osztrogonác  <ossy@webkit.org>
1957
1958         [Qt][WK2] Buildfix for newer Qt5. Remove duplicated defines.
1959
1960         Reviewed by Simon Hausmann.
1961
1962         * UIProcess/API/qt/tests/util.h:
1963
1964 2011-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1965
1966         Unreviewed. Fix WebKit2 GTK+ build after r98081.
1967
1968         * UIProcess/API/gtk/WebKitWebView.h:
1969
1970 2011-10-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1971
1972         Unreviewed, rolling out r98085.
1973         http://trac.webkit.org/changeset/98085
1974         https://bugs.webkit.org/show_bug.cgi?id=70589
1975
1976         It broke the build (Requested by Ossy on #webkit).
1977
1978         * UIProcess/API/qt/tests/util.h:
1979
1980 2011-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1981
1982         [GTK] Fix API documentation comment for webkit_web_view_get_estimated_load_progress()
1983         https://bugs.webkit.org/show_bug.cgi?id=70587
1984
1985         Reviewed by Philippe Normand.
1986
1987         It's should start with /** to be recognized as API documentation.
1988
1989         * UIProcess/API/gtk/WebKitWebView.cpp:
1990
1991 2011-10-21  Csaba Osztrogonác  <ossy@webkit.org>
1992
1993         [Qt][WK2] Unreviewed buildfix for newer Qt5. Remove duplicated defines.
1994
1995         * UIProcess/API/qt/tests/util.h:
1996
1997 2011-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1998
1999         [GTK] Add can_go_back/forward methods to WebKit2 GTK+ API
2000         https://bugs.webkit.org/show_bug.cgi?id=69823
2001
2002         Reviewed by Martin Robinson.
2003
2004         * UIProcess/API/gtk/WebKitWebView.cpp:
2005         (webkit_web_view_go_back):
2006         (webkit_web_view_can_go_back):
2007         (webkit_web_view_go_forward):
2008         (webkit_web_view_can_go_forward):
2009         * UIProcess/API/gtk/WebKitWebView.h:
2010
2011 2011-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2012
2013         [GTK] Add webkit_web_view_stop_loading() to WebKit2 GTK+ API
2014         https://bugs.webkit.org/show_bug.cgi?id=69610
2015
2016         Reviewed by Martin Robinson.
2017
2018         * UIProcess/API/gtk/WebKitWebView.cpp:
2019         (webkit_web_view_stop_loading):
2020         * UIProcess/API/gtk/WebKitWebView.h:
2021         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
2022         (provisionalLoadFailedCallback):
2023         (loadFailedCallback):
2024         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
2025         (LoadStopTrackingTest::loadCommitted):
2026         (LoadStopTrackingTest::loadFailed):
2027         (LoadStopTrackingTest::loadFinished):
2028         (testLoadCancelled):
2029         (serverCallback):
2030         (beforeAll):
2031
2032 2011-10-20  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2033
2034         [Qt][WK2] qweberror* should follow the new file and class naming rules
2035         https://bugs.webkit.org/show_bug.cgi?id=70550
2036
2037         Reviewed by Noam Rosenthal.
2038
2039         Renaming qweberror* files and class to QtWebError*.
2040         QWebErrorPrivate is now merged into QtWebError.
2041
2042         * UIProcess/API/qt/qdesktopwebview.cpp:
2043         (QDesktopWebViewPrivate::loadDidFail):
2044         * UIProcess/API/qt/qdesktopwebview_p.h:
2045         * UIProcess/qt/ClientImpl.cpp:
2046         (dispatchLoadFailed):
2047         * UIProcess/qt/QtTouchViewInterface.cpp:
2048         (WebKit::QtTouchViewInterface::loadDidFail):
2049         * UIProcess/qt/QtTouchViewInterface.h:
2050         * UIProcess/qt/QtViewInterface.h:
2051         * UIProcess/qt/QtWebError.cpp: Renamed from Source/WebKit2/UIProcess/qt/qweberror.cpp.
2052         (QtWebError::QtWebError):
2053         (QtWebError::type):
2054         (QtWebError::errorCode):
2055         (QtWebError::url):
2056         * UIProcess/qt/QtWebError.h: Renamed from Source/WebKit2/UIProcess/qt/qweberror.h.
2057         (QtWebError::errorCodeAsHttpStatusCode):
2058         (QtWebError::errorCodeAsNetworkError):
2059         * UIProcess/qt/QtWebPageProxy.cpp:
2060         (QtWebPageProxy::loadDidFail):
2061         * UIProcess/qt/QtWebPageProxy.h:
2062         * UIProcess/qt/qweberror_p.h: Removed.
2063         * WebKit2.pro:
2064
2065 2011-10-20  Alexey Proskuryakov  <ap@apple.com>
2066
2067         REGRESSION (r96823): Contextual menu closes immediately when control-clicking in Flash plug-in
2068         https://bugs.webkit.org/show_bug.cgi?id=70534
2069         <rdar://problem/10308827>
2070
2071         Reviewed by Darin Adler.
2072
2073         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::handleContextMenuEvent):
2074         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2075         * WebProcess/Plugins/Plugin.h:
2076         * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::handleContextMenuEvent):
2077         * WebProcess/Plugins/PluginProxy.h:
2078         * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::handleEvent):
2079         Return true when handling contextmenu event, so that plug-ins won't get a default WebKit
2080         context menu. We can't know if the plug-in is handling mousedown (or even mouseup) by
2081         displaying a menu.
2082
2083         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
2084         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp: (WebKit::BuiltInPDFView::handleContextMenuEvent):
2085         PDF is the only "plug-in" that wants default WebKit menu now.
2086
2087 2011-10-20  Sam Weinig  <sam@webkit.org>
2088
2089         Put the WebKit2 C SPI in PrivateHeaders
2090         https://bugs.webkit.org/show_bug.cgi?id=70549
2091
2092         Reviewed by Dan Bernstein.
2093
2094         No change in behavior.
2095
2096         * WebKit2.xcodeproj/project.pbxproj:
2097
2098 2011-10-20  Brady Eidson  <beidson@apple.com>
2099
2100         <rdar://problem/9412849> and https://bugs.webkit.org/show_bug.cgi?id=70535
2101         WK2 - Crash deref'ing a null context menu
2102
2103         Reviewed by Darin Adler.
2104
2105         * WebProcess/WebPage/WebPage.cpp:
2106         (WebKit::WebPage::didSelectItemFromActiveContextMenu): In some cases that we still can't reproduce,
2107           this message can be received in the WebProcess after the context menu has been cleared, leading
2108           to a crash. Turning the ASSERT in to an early return will prevent the crash while we try to learn more
2109           about how this could happen.
2110
2111 2011-10-20  Gustavo Noronha Silva  <gns@gnome.org>
2112
2113         GTK+ build fix. Wk2 documentation will be dealt with in future
2114         patches.
2115
2116         * UIProcess/API/gtk/docs/GNUmakefile.am:
2117
2118 2011-10-20  Mark Hahnenberg  <mhahnenberg@apple.com>
2119
2120         Rename static deleteProperty to deletePropertyByIndex
2121         https://bugs.webkit.org/show_bug.cgi?id=70257
2122
2123         Reviewed by Geoffrey Garen.
2124
2125         Renaming versions of deleteProperty that use an unsigned as the property
2126         name to "deletePropertyByIndex" in preparation for adding them to the 
2127         MethodTable, which requires unique names for each method.
2128
2129         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2130         (WebKit::JSNPObject::deletePropertyVirtual):
2131         (WebKit::JSNPObject::deletePropertyByIndex):
2132         * WebProcess/Plugins/Netscape/JSNPObject.h:
2133
2134 2011-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2135
2136         [GTK] Remove WebKitWebLoaderClientPrivate
2137         https://bugs.webkit.org/show_bug.cgi?id=70488
2138
2139         Reviewed by Philippe Normand.
2140
2141         It's unused since r97920.
2142
2143         * GNUmakefile.am: Add WebKitWebLoaderClientPrivate.h.
2144         * UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
2145         (webkitWebLoaderClientAttachLoaderClientToPage): Renamed to make
2146         it clear it's a private method of WebKitWebLoaderClient.
2147         (webkit_web_loader_client_init): Remove
2148         WebKitWebLoaderClientPrivate initialization.
2149         (webkit_web_loader_client_class_init): Removed adding
2150         WebKitWebLoaderClientPrivate struct as private data.
2151         * UIProcess/API/gtk/WebKitWebLoaderClient.h: Remove
2152         WebKitWebLoaderClientPrivate definition.
2153         * UIProcess/API/gtk/WebKitWebLoaderClientPrivate.h: Move
2154         webkitWebLoaderClientAttachLoaderClientToPage method here since
2155         it's a private method implemented in WebKitWebLoaderClient, not in
2156         WebKitWebView.
2157         * UIProcess/API/gtk/WebKitWebView.cpp:
2158         (webkit_web_view_set_loader_client): Use
2159         webkitWebLoaderClientAttachLoaderClientToPage.
2160         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Remove
2161         webkitWebLoaderClientAttachLoaderClientToPage prototype.
2162
2163 2011-10-10  Martin Robinson  <mrobinson@igalia.com>
2164
2165         [GTK] [WebKit2] Allow sharing page clients between WebViews
2166         https://bugs.webkit.org/show_bug.cgi?id=69814
2167
2168         No longer associate WebPage client wrappers with a WebKitWebView. This allows the
2169         same client to be used with more than one WebKitWebView.
2170
2171         Reviewed by Xan Lopez.
2172
2173         * GNUmakefile.am: Add the new WebKitWebViewPrivate header.
2174         * UIProcess/API/gtk/WebKitDefines.h: Added some forward declarations for API classes.
2175         * UIProcess/API/gtk/WebKitWebLoaderClient.cpp: C API callbacks now convert their WKPageRef argument
2176         into a WebKitWebView directly and pass it as a parameter to signals. Remove the web-view property.
2177         * UIProcess/API/gtk/WebKitWebLoaderClient.h: Move the estimated-progress property to WebKitWebView.
2178         * UIProcess/API/gtk/WebKitWebView.cpp: Add an estimated-load-progress property.
2179         (webkitWebViewConstructed):Only allocate one default WebKitWebLoaderClient.
2180         (webkitWebViewGetProperty): Add support for the new property.
2181         (webkit_web_view_class_init): Ditto.
2182         (webkitWebViewSetEstimatedLoadProgress): Added this private method so that the WebKitWebLoaderClient
2183         can update the appropriate WebKitWebView.
2184         (webkit_web_view_set_loader_client): Attach the C API callbacks here now.
2185         (webkit_web_view_get_estimated_load_progress): Moved from WebKitWebLoaderClient.
2186         * UIProcess/API/gtk/WebKitWebView.h: Added new method definition.
2187         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Copied from Source/WebKit2/UIProcess/API/gtk/WebKitDefines.h.
2188         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp: Updated the load tracking tests callbacks to take the new parameter.
2189         (LoadTrackingTest::LoadTrackingTest): Listen to the WebKitWebView property now.
2190         (LoadTrackingTest::estimatedProgressChanged):
2191         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: Added a test to verify that two WebViews share the same default client.
2192         * UIProcess/API/gtk/webkit2marshal.list: Updated the marshallers here.
2193
2194 2011-10-19  Anders Carlsson  <andersca@apple.com>
2195
2196         White flash when painting a previously crashed WKView
2197         https://bugs.webkit.org/show_bug.cgi?id=70453
2198         <rdar://problem/10306906>
2199
2200         Reviewed by John Sullivan.
2201
2202         * UIProcess/WebPageProxy.cpp:
2203         (WebKit::WebPageProxy::reattachToWebProcess):
2204         Call waitForBackingStoreUpdateOnNextPaint so we'll wait for the next paint instead of painting white.
2205
2206 2011-10-19  Beth Dakin  <bdakin@apple.com>
2207
2208         https://bugs.webkit.org/show_bug.cgi?id=70396
2209         Focus rings are too thin in HiDPI in WebKit2
2210         -and corresponding-
2211         <rdar://problem/10086876>
2212
2213         Reviewed by Dan Bernstein.
2214
2215         Rename wkSetPatternBaseCTM to wkSetBaseCTM
2216         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2217         (InitWebCoreSystemInterface):
2218
2219         When setting up a HiDPI context, we must also set the base CTM.
2220         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2221         (WebKit::DrawingAreaImpl::display):
2222         * WebProcess/WebPage/WebPage.cpp:
2223         (WebKit::WebPage::scaledSnapshotInDocumentCoordinates):
2224         (WebKit::WebPage::snapshotInViewCoordinates):
2225
2226 2011-10-19  Sam Weinig  <sam@webkit.org>
2227
2228         Add skeleton of an Objective-C WebKit2 API
2229         https://bugs.webkit.org/show_bug.cgi?id=70438
2230
2231         Reviewed by Anders Carlsson.
2232
2233         Adds WKBrowsingContextController (WKPageRef wrapper) and WKProcessCluster
2234         (WKContextRef wrapper) as initial files of an Objective-C WebKit2 API. Also,
2235         hook them up so that you can get a WKBrowsingContextController from the WKView
2236         and you can create a WKView associated with a WKProcessCluster. These names are
2237         not final, and this work is mainly about getting the wrapper lifetimes worked
2238         out.
2239
2240         * UIProcess/API/mac/WKBrowsingContextController.h: Added.
2241         * UIProcess/API/mac/WKBrowsingContextController.mm: Added.
2242         (-[WKBrowsingContextController dealloc]):
2243         (-[WKBrowsingContextController pageRef]):
2244         (-[WKBrowsingContextController loadRequest:]):
2245         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
2246         (-[WKBrowsingContextController stopLoading]):
2247         (-[WKBrowsingContextController reload]):
2248         (-[WKBrowsingContextController reloadFromOrigin]):
2249         (-[WKBrowsingContextController goForward]):
2250         (-[WKBrowsingContextController canGoForward]):
2251         (-[WKBrowsingContextController goBack]):
2252         (-[WKBrowsingContextController canGoBack]):
2253         (-[WKBrowsingContextController initWithPageRef:]):
2254         * UIProcess/API/mac/WKBrowsingContextControllerInternal.h: Added.
2255         Add wrapper for WKPageRef.
2256
2257         * UIProcess/API/mac/WKProcessCluster.h: Added.
2258         * UIProcess/API/mac/WKProcessCluster.mm: Added.
2259         (-[WKProcessCluster init]):
2260         (-[WKProcessCluster initWithInjectedBundleURL:]):
2261         (-[WKProcessCluster dealloc]):
2262         (-[WKProcessCluster contextRef]):
2263         * UIProcess/API/mac/WKProcessClusterInternal.h: Added.
2264         Add wrapper for WKContextRef.
2265
2266         * UIProcess/API/mac/WKView.h:
2267         * UIProcess/API/mac/WKView.mm:
2268         (-[WKView initWithFrame:processCluster:]):
2269         Add new init method which takes a WKProcessCluster.
2270
2271         (-[WKView browsingContextController]):
2272         Add accessor for the WKBrowsingContextController. This works by lazily creating
2273         the wrapper and caching it in the view itself.
2274
2275         * WebKit2.xcodeproj/project.pbxproj:
2276         Add new files.
2277
2278 2011-10-19  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2279
2280         [Qt] [WK2] Rename files and classes to follow conventions
2281         https://bugs.webkit.org/show_bug.cgi?id=70391
2282
2283         Reviewed by Noam Rosenthal.
2284
2285         Rename the files and classes following the agreed conventions on
2286         QtWebKit mailing list -- which are based on existing usage we have.
2287
2288         - Public API follow Qt conventions: qsomething.cpp qsomething.h with class named QSomething
2289
2290         - Private classes for public API classes follow Qt conventions:
2291           qsomething_p.h qsomething_p.cpp (if needed), with class named QSomethingPrivate
2292
2293         - Subclasses and Qt-specific implementations of WebKit/WebCore classes use Qt suffix:
2294           FrameLoaderClientQt.cpp
2295
2296         - Other classes created for using in our port use Qt prefix: QtFileDownloader, QtViewInterface
2297
2298         This is documented in https://trac.webkit.org/wiki/QtWebKitHacking
2299
2300         * UIProcess/API/qt/qdesktopwebview.cpp:
2301         (QDesktopWebViewPrivate::chooseFiles):
2302         (toPolicyAction):
2303         (QDesktopWebViewPrivate::navigationPolicyForURL):
2304         * UIProcess/API/qt/qdesktopwebview_p.h:
2305         * UIProcess/API/qt/qtouchwebpage.cpp:
2306         (QTouchWebPage::updatePaintNode):
2307         (QTouchWebPagePrivate::setPage):
2308         * UIProcess/API/qt/qtouchwebpage.h:
2309         * UIProcess/API/qt/qtouchwebpage_p.h:
2310         * UIProcess/API/qt/qtouchwebview.cpp:
2311         (QTouchWebViewPrivate::updateViewportConstraints):
2312         * UIProcess/API/qt/qtouchwebview.h:
2313         * UIProcess/API/qt/qtouchwebview_p.h:
2314         * UIProcess/TiledDrawingAreaProxy.h:
2315         * UIProcess/qt/ClientImpl.cpp:
2316         (toQtViewInterface):
2317         (toQtPolicyInterface):
2318         (qt_wk_runJavaScriptAlert):
2319         (qt_wk_runJavaScriptConfirm):
2320         (qt_wk_runJavaScriptPrompt):
2321         (qt_wk_setStatusText):
2322         (qt_wk_runOpenPanel):
2323         (qt_wk_mouseDidMoveOverElement):
2324         (qt_wk_decidePolicyForNavigationAction):
2325         * UIProcess/qt/QtDesktopWebPageProxy.cpp: Renamed from Source/WebKit2/UIProcess/qt/qdesktopwebpageproxy.cpp.
2326         (dragOperationToDropAction):
2327         (QtDesktopWebPageProxy::QtDesktopWebPageProxy):
2328         (QtDesktopWebPageProxy::createDrawingAreaProxy):
2329         (QtDesktopWebPageProxy::paintContent):
2330         (QtDesktopWebPageProxy::setViewportArguments):
2331         (QtDesktopWebPageProxy::doneWithTouchEvent):
2332         (QtDesktopWebPageProxy::createPopupMenuProxy):
2333         (QtDesktopWebPageProxy::handleEvent):
2334         (QtDesktopWebPageProxy::handleMouseMoveEvent):
2335         (QtDesktopWebPageProxy::handleMousePressEvent):
2336         (QtDesktopWebPageProxy::handleMouseReleaseEvent):
2337         (QtDesktopWebPageProxy::handleMouseDoubleClickEvent):
2338         (QtDesktopWebPageProxy::handleWheelEvent):
2339         (QtDesktopWebPageProxy::handleHoverLeaveEvent):
2340         (QtDesktopWebPageProxy::handleHoverMoveEvent):
2341         (QtDesktopWebPageProxy::handleDragEnterEvent):
2342         (QtDesktopWebPageProxy::handleDragLeaveEvent):
2343         (QtDesktopWebPageProxy::handleDragMoveEvent):
2344         (QtDesktopWebPageProxy::handleDropEvent):
2345         (QtDesktopWebPageProxy::timerEvent):
2346         * UIProcess/qt/QtDesktopWebPageProxy.h: Renamed from Source/WebKit2/UIProcess/qt/qdesktopwebpageproxy.h.
2347         * UIProcess/qt/QtGestureRecognizer.cpp:
2348         (WebKit::QtGestureRecognizer::QtGestureRecognizer):
2349         * UIProcess/qt/QtGestureRecognizer.h:
2350         * UIProcess/qt/QtPanGestureRecognizer.cpp:
2351         (WebKit::QtPanGestureRecognizer::QtPanGestureRecognizer):
2352         * UIProcess/qt/QtPanGestureRecognizer.h:
2353         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
2354         (WebKit::QtPinchGestureRecognizer::QtPinchGestureRecognizer):
2355         * UIProcess/qt/QtPinchGestureRecognizer.h:
2356         * UIProcess/qt/QtPolicyInterface.h: Renamed from Source/WebKit2/UIProcess/qt/PolicyInterface.h.
2357         * UIProcess/qt/QtSGTileNode.cpp: Renamed from Source/WebKit2/UIProcess/qt/SGTileNode.cpp.
2358         (WebKit::QtSGTileNode::QtSGTileNode):
2359         (WebKit::QtSGTileNode::setBackBuffer):
2360         (WebKit::QtSGTileNode::swapBuffersIfNeeded):
2361         * UIProcess/qt/QtSGTileNode.h: Renamed from Source/WebKit2/UIProcess/qt/SGTileNode.h.
2362         * UIProcess/qt/QtSGUpdateQueue.cpp: Renamed from Source/WebKit2/UIProcess/qt/SGUpdateQueue.cpp.
2363         (WebKit::NodeUpdateCreateTile::NodeUpdateCreateTile):
2364         (WebKit::NodeUpdateRemoveTile::NodeUpdateRemoveTile):
2365         (WebKit::NodeUpdateSetBackBuffer::NodeUpdateSetBackBuffer):
2366         (WebKit::NodeUpdateSwapTileBuffers::NodeUpdateSwapTileBuffers):
2367         (WebKit::QtSGUpdateQueue::QtSGUpdateQueue):
2368         (WebKit::QtSGUpdateQueue::createTileNode):
2369         (WebKit::QtSGUpdateQueue::removeTileNode):
2370         (WebKit::QtSGUpdateQueue::setNodeBackBuffer):
2371         (WebKit::QtSGUpdateQueue::swapTileBuffers):
2372         (WebKit::QtSGUpdateQueue::applyUpdates):
2373         (WebKit::QtSGUpdateQueue::getScaleNode):
2374         * UIProcess/qt/QtSGUpdateQueue.h: Renamed from Source/WebKit2/UIProcess/qt/SGUpdateQueue.h.
2375         (WebKit::QtSGUpdateQueue::isSwapPending):
2376         (WebKit::NodeUpdate::NodeUpdate):
2377         (WebKit::NodeUpdate::~NodeUpdate):
2378         * UIProcess/qt/QtTouchViewInterface.cpp: Renamed from Source/WebKit2/UIProcess/qt/TouchViewInterface.cpp.
2379         (WebKit::QtTouchViewInterface::QtTouchViewInterface):
2380         (WebKit::QtTouchViewInterface::didFindZoomableArea):
2381         (WebKit::QtTouchViewInterface::sceneGraphUpdateQueue):
2382         (WebKit::QtTouchViewInterface::setViewNeedsDisplay):
2383         (WebKit::QtTouchViewInterface::drawingAreaSize):
2384         (WebKit::QtTouchViewInterface::contentSizeChanged):
2385         (WebKit::QtTouchViewInterface::isActive):
2386         (WebKit::QtTouchViewInterface::hasFocus):
2387         (WebKit::QtTouchViewInterface::isVisible):
2388         (WebKit::QtTouchViewInterface::startDrag):
2389         (WebKit::QtTouchViewInterface::didReceiveViewportArguments):
2390         (WebKit::QtTouchViewInterface::didChangeUrl):
2391         (WebKit::QtTouchViewInterface::didChangeTitle):
2392         (WebKit::QtTouchViewInterface::didChangeToolTip):
2393         (WebKit::QtTouchViewInterface::didChangeStatusText):
2394         (WebKit::QtTouchViewInterface::didChangeCursor):
2395         (WebKit::QtTouchViewInterface::loadDidBegin):
2396         (WebKit::QtTouchViewInterface::loadDidCommit):
2397         (WebKit::QtTouchViewInterface::loadDidSucceed):
2398         (WebKit::QtTouchViewInterface::loadDidFail):
2399         (WebKit::QtTouchViewInterface::didChangeLoadProgress):
2400         (WebKit::QtTouchViewInterface::showContextMenu):
2401         (WebKit::QtTouchViewInterface::hideContextMenu):
2402         (WebKit::QtTouchViewInterface::runJavaScriptAlert):
2403         (WebKit::QtTouchViewInterface::runJavaScriptConfirm):
2404         (WebKit::QtTouchViewInterface::runJavaScriptPrompt):
2405         (WebKit::QtTouchViewInterface::processDidCrash):
2406         (WebKit::QtTouchViewInterface::didRelaunchProcess):
2407         (WebKit::QtTouchViewInterface::engine):
2408         * UIProcess/qt/QtTouchViewInterface.h: Renamed from Source/WebKit2/UIProcess/qt/TouchViewInterface.h.
2409         (WebKit::QtTouchViewInterface::chooseFiles):
2410         (WebKit::QtTouchViewInterface::didMouseMoveOverElement):
2411         * UIProcess/qt/QtTouchWebPageProxy.cpp: Renamed from Source/WebKit2/UIProcess/qt/qtouchwebpageproxy.cpp.
2412         (QtTouchWebPageProxy::QtTouchWebPageProxy):
2413         (QtTouchWebPageProxy::createDrawingAreaProxy):
2414         (QtTouchWebPageProxy::processDidCrash):
2415         (QtTouchWebPageProxy::paintContent):
2416         (QtTouchWebPageProxy::doneWithTouchEvent):
2417         (QtTouchWebPageProxy::handleEvent):
2418         (QtTouchWebPageProxy::setVisibleContentRectAndScale):
2419         (QtTouchWebPageProxy::setVisibleContentRectTrajectoryVector):
2420         (QtTouchWebPageProxy::setResizesToContentsUsingLayoutSize):
2421         (QtTouchWebPageProxy::touchEvent):
2422         (QtTouchWebPageProxy::findZoomableAreaForPoint):
2423         (QtTouchWebPageProxy::renderNextFrame):
2424         * UIProcess/qt/QtTouchWebPageProxy.h: Renamed from Source/WebKit2/UIProcess/qt/qtouchwebpageproxy.h.
2425         (QtTouchWebPageProxy::touchViewInterface):
2426         (QtTouchWebPageProxy::drawingArea):
2427         * UIProcess/qt/QtViewInterface.h: Renamed from Source/WebKit2/UIProcess/qt/ViewInterface.h.
2428         * UIProcess/qt/QtViewportInteractionEngine.cpp: Renamed from Source/WebKit2/UIProcess/qt/ViewportInteractionEngine.cpp.
2429         (WebKit::visibleRectInContentCoordinate):
2430         (WebKit::contentRectInViewportCoordinate):
2431         (WebKit::ViewportUpdateGuard::ViewportUpdateGuard):
2432         (WebKit::ViewportUpdateGuard::~ViewportUpdateGuard):
2433         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
2434         (WebKit::QtViewportInteractionEngine::~QtViewportInteractionEngine):
2435         (WebKit::QtViewportInteractionEngine::reset):
2436         (WebKit::QtViewportInteractionEngine::setConstraints):
2437         (WebKit::QtViewportInteractionEngine::panGestureStarted):
2438         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
2439         (WebKit::QtViewportInteractionEngine::panGestureCancelled):
2440         (WebKit::QtViewportInteractionEngine::panGestureEnded):
2441         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
2442         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
2443         (WebKit::QtViewportInteractionEngine::pinchGestureEnded):
2444         (WebKit::QtViewportInteractionEngine::contentViewportChanged):
2445         (WebKit::QtViewportInteractionEngine::updateContentIfNeeded):
2446         (WebKit::QtViewportInteractionEngine::updateContentScaleIfNeeded):
2447         (WebKit::QtViewportInteractionEngine::updateContentPositionIfNeeded):
2448         (WebKit::QtViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
2449         (WebKit::QtViewportInteractionEngine::animateContentPositionIntoBoundariesIfNeeded):
2450         (WebKit::QtViewportInteractionEngine::animateContentScaleIntoBoundariesIfNeeded):
2451         (WebKit::QtViewportInteractionEngine::scaleContent):
2452         * UIProcess/qt/QtViewportInteractionEngine.h: Renamed from Source/WebKit2/UIProcess/qt/ViewportInteractionEngine.h.
2453         (WebKit::QtViewportInteractionEngine::Constraints::Constraints):
2454         (WebKit::operator==):
2455         * UIProcess/qt/QtWebPageProxy.cpp:
2456         (QtWebPageProxy::QtWebPageProxy):
2457         (QtWebPageProxy::registerEditCommand):
2458         * UIProcess/qt/QtWebPageProxy.h:
2459         * UIProcess/qt/QtWebUndoCommand.cpp: Renamed from Source/WebKit2/UIProcess/qt/WebUndoCommandQt.cpp.
2460         (QtWebUndoCommand::QtWebUndoCommand):
2461         (QtWebUndoCommand::~QtWebUndoCommand):
2462         (QtWebUndoCommand::redo):
2463         (QtWebUndoCommand::undo):
2464         * UIProcess/qt/QtWebUndoCommand.h: Renamed from Source/WebKit2/UIProcess/qt/WebUndoCommandQt.h.
2465         (QtWebUndoCommand::inUndoRedo):
2466         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
2467         (WebKit::TiledDrawingAreaProxy::updateWebView):
2468         * UIProcess/qt/WebContextMenuProxyQt.cpp:
2469         (WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt):
2470         (WebKit::WebContextMenuProxyQt::create):
2471         * UIProcess/qt/WebContextMenuProxyQt.h:
2472         * WebKit2.pro:
2473
2474 2011-10-19  Tomasz Morawski  <t.morawski@samsung.com>
2475
2476         [EFL][WK2] Added missing dummy interpretKeyEvent function
2477         https://bugs.webkit.org/show_bug.cgi?id=70311
2478
2479         Reviewed by Ryosuke Niwa.
2480
2481         Added missing dummy interpretKeyEvent function needed to compile WK2.
2482
2483         * WebProcess/WebPage/efl/WebPageEfl.cpp:
2484         (WebKit::WebPage::interpretKeyEvent):
2485
2486 2011-10-18  Sam Weinig  <sam@webkit.org>
2487
2488         Move uses of C SPI out of WKView.h and into WKViewPrivate.h
2489         https://bugs.webkit.org/show_bug.cgi?id=70387
2490
2491         Reviewed by Dan Bernstein.
2492
2493         * UIProcess/API/mac/WKViewPrivate.h:
2494         Move declarations here.
2495
2496         * UIProcess/API/mac/WKView.h:
2497         * UIProcess/API/mac/WKView.mm:
2498         (-[WKView _updateRemoteAccessibilityRegistration:]):
2499         (-[WKView initWithFrame:]):
2500         (-[WKView initWithFrame:contextRef:]):
2501         (-[WKView _registerDraggedTypes]):
2502         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
2503         (-[WKView pageRef]):
2504         (-[WKView canChangeFrameLayout:]):
2505         (-[WKView printOperationWithPrintInfo:forFrame:]):
2506         (-[WKView setFrame:andScrollBy:]):
2507         Move definitions to private category.
2508
2509         * UIProcess/API/mac/PDFViewController.mm:
2510         * UIProcess/mac/WKFullScreenWindowController.mm:
2511         * UIProcess/mac/WebInspectorProxyMac.mm:
2512         Update to include WKViewPrivate.h where necessary.
2513
2514 2011-10-18  Sam Weinig  <sam@webkit.org>
2515
2516         Stop leaking internal names in WKView API header
2517         https://bugs.webkit.org/show_bug.cgi?id=70380
2518
2519         Reviewed by Anders Carlsson.
2520
2521         Move _frameSizeUpdatesDisabledCount to WKViewData. Since we cannot change the size of
2522         WKView due to the fragile Objective-C ABI, we must rename the existing variable unused. If
2523         drop 32-bit support, we will be able to remove it.
2524
2525         * UIProcess/API/mac/WKView.h:
2526         * UIProcess/API/mac/WKView.mm:
2527         (-[WKView disableFrameSizeUpdates]):
2528         (-[WKView enableFrameSizeUpdates]):
2529         (-[WKView frameSizeUpdatesDisabled]):
2530         * WebKit2.xcodeproj/project.pbxproj:
2531
2532 2011-10-18  Alexey Proskuryakov  <ap@apple.com>
2533
2534         Expose PDF information in hit test result
2535         https://bugs.webkit.org/show_bug.cgi?id=70353
2536
2537         Reviewed by Sam Weinig.
2538
2539         * Shared/WebHitTestResult.cpp:
2540         (WebKit::WebHitTestResult::Data::encode):
2541         (WebKit::WebHitTestResult::Data::decode):
2542         * Shared/WebHitTestResult.h:
2543         (WebKit::WebHitTestResult::absolutePDFURL):
2544         * UIProcess/API/C/WKHitTestResult.cpp:
2545         (WKHitTestResultCopyAbsolutePDFURL):
2546         * UIProcess/API/C/WKHitTestResult.h:
2547         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
2548         (WKBundleHitTestResultCopyAbsolutePDFURL):
2549         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
2550         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2551         (WebKit::InjectedBundleHitTestResult::absolutePDFURL):
2552         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
2553         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2554         (WebKit::WebChromeClient::mouseDidMoveOverElement):
2555         Pass through PDF URL from hit testing to injected bundle client.
2556
2557 2011-10-18  Enrica Casucci  <enrica@apple.com>
2558
2559         Crash in WebProcess at com.apple.AppKit: -[NSFilePromiseDragSource draggedImage:endedAt:operation:] + 101
2560         https://bugs.webkit.org/show_bug.cgi?id=70340
2561         <rdar://problem/9548174>
2562                 
2563         We have seen a number of crash reports for this issue that seem to occurr when
2564         the user drags an image from a web page onto the desktop.
2565         We have not been able to reproduce this crash, therefore this is a speculative fix,
2566         but the theory is that the dragging source has been already released when draggedImage
2567         is called.
2568         This patch attempts a fix for the problem by retaining the dragging source when
2569         NSFilePromiseDragSource is created.
2570
2571         Reviewed by Darin Adler.
2572
2573         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2574         (-[WKPasteboardFilePromiseOwner initWithSource:]):
2575         (-[WKPasteboardFilePromiseOwner dealloc]):
2576
2577 2011-10-18  Alexey Proskuryakov  <ap@apple.com>
2578
2579         [WK2] Crash after storing credentials in Keychain
2580         https://bugs.webkit.org/show_bug.cgi?id=70376
2581         <rdar://problem/9647503>
2582
2583         Reviewed by Dan Bernstein.
2584
2585         * Shared/mac/SecKeychainItemResponseData.cpp:
2586         (WebKit::SecKeychainItemResponseData::encode):
2587         (WebKit::SecKeychainItemResponseData::decode):
2588         Actually send keychain item over, too. In shimSecKeychainItemCreateFromContent(), we are
2589         going to use it to override SecKeychainItemCreateFromContent(), and we cannot return noErr
2590         from this function without returning a non-null keychain item.
2591
2592 2011-10-18  Damian Kaleta  <dkaleta@apple.com>
2593
2594         This revised fix doesn't break SL build.
2595         https://bugs.webkit.org/show_bug.cgi?id=70345
2596
2597         Reviewed and landed by Sam Weinig.
2598
2599         * UIProcess/API/mac/WKView.mm:
2600         (+[WKView hideWordDefinitionWindow]): Hides the definition window.
2601         * UIProcess/API/mac/WKViewPrivate.h:
2602
2603 2011-10-18  Sam Weinig  <sam@webkit.org>
2604
2605         Move spellCheckerDocumentTag and handleCorrectionPanelResult from WKViewPrivate to WKViewInternal
2606         https://bugs.webkit.org/show_bug.cgi?id=70377
2607
2608         Reviewed by Anders Carlsson.
2609
2610         * UIProcess/API/mac/WKView.mm:
2611         (-[WKView spellCheckerDocumentTag]):
2612         (-[WKView handleCorrectionPanelResult:]):
2613         Move definition of methods to (Internal) area.
2614
2615         * UIProcess/API/mac/WKViewInternal.h:
2616         Add methods.
2617
2618         * UIProcess/API/mac/WKViewPrivate.h:
2619         Remove methods.
2620
2621         * UIProcess/cf/WebBackForwardListCF.cpp:
2622         Add missing newline.
2623
2624         * UIProcess/mac/CorrectionPanel.mm:
2625         Change #include to WKViewInternal.h
2626
2627         * WebKit2.xcodeproj/project.pbxproj:
2628         Sort some files.
2629
2630 2011-10-18  Sam Weinig  <sam@webkit.org>
2631
2632         Move WKView helper files into a sub-group
2633         https://bugs.webkit.org/show_bug.cgi?id=70375
2634
2635         Reviewed by Darin Adler.
2636
2637         * WebKit2.xcodeproj/project.pbxproj:
2638         Move some files around.
2639
2640 2011-10-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2641
2642         Unreviewed, rolling out r97788.
2643         http://trac.webkit.org/changeset/97788
2644         https://bugs.webkit.org/show_bug.cgi?id=70366
2645
2646         broke compile (Requested by inferno-sec on #webkit).
2647
2648         * UIProcess/API/mac/WKView.mm:
2649         * UIProcess/API/mac/WKViewPrivate.h:
2650
2651 2011-10-18  Damian Kaleta  <dkaleta@apple.com>
2652
2653         Add WebKit API to hide the definition window
2654         https://bugs.webkit.org/show_bug.cgi?id=70345
2655
2656         Reviewed by Anders Carlsson.
2657
2658         * UIProcess/API/mac/WKView.mm:
2659         (-[WKView hideWordDefinitionWindow]): Hides the definition window.
2660         * UIProcess/API/mac/WKViewPrivate.h:
2661
2662 2011-10-18  Adam Barth  <abarth@webkit.org>
2663
2664         Always enable ENABLE(XPATH)
2665         https://bugs.webkit.org/show_bug.cgi?id=70217
2666
2667         Reviewed by Eric Seidel.
2668
2669         * Configurations/FeatureDefines.xcconfig:
2670
2671 2011-10-18  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2672
2673         [Qt] Merge QML plugin for WebKit2 with the original WebKit1 plugin
2674
2675         We don't need a separate plugin, as we no longer expose the WK2
2676         APIs under QtWebKit.experimental, but now use QtWebKit. The version
2677         was also changed to 3.0 instead of 5.0, as the original plugin was
2678         versioned 1.0, and bumping to 3.0 fits the scheme used by QtWebKit releases.
2679
2680         Reviewed by Andreas Kling.
2681
2682         * UIProcess/API/qt/qmlplugin/plugin.cpp: Removed.
2683         * UIProcess/API/qt/qmlplugin/qmldir: Removed.
2684         * UIProcess/API/qt/qmlplugin/qmlplugin.pro: Removed.
2685         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml:
2686         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadFail.qml:
2687         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgress.qml:
2688         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml:
2689         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_navigationPolicyForUrl.qml:
2690         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_preferences.qml:
2691         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml:
2692         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml:
2693         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml:
2694         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml:
2695         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml:
2696         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgressSignal.qml:
2697         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadZeroSizeView.qml:
2698         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml:
2699
2700 2011-10-18  Dinu Jacob  <dinu.jacob@nokia.com>
2701
2702         [Qt][WK2] ASSERT when displaying context menu in input field
2703         https://bugs.webkit.org/show_bug.cgi?id=69859
2704
2705         Reviewed by Simon Hausmann.
2706
2707         When creating a submenu in the context menu, the submenu of type
2708         QWidget is statically cast to QObject before calling setParent on
2709         it. QObject::setParent asserts if the object is a QWidget. So, call
2710         setParent of QWidget itself.
2711
2712         * UIProcess/qt/WebContextMenuProxyQt.cpp:
2713         (WebKit::WebContextMenuProxyQt::createContextMenu):
2714
2715 2011-10-18  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2716
2717         [Qt] Fix linkHoveredDoesntEmitRepeated test in the bot
2718         https://bugs.webkit.org/show_bug.cgi?id=70329
2719
2720         Reviewed by Andreas Kling.
2721
2722         Use LoadSpy::wait() instead of the TestCase::tryCompare(). They should be equivalent,
2723         but I'm getting strange results with tryCompare(). This commit also adds an extra check
2724         to make sure the hovered link is the correct one.
2725
2726         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml:
2727
2728 2011-10-18  Alexis Menard  <alexis.menard@openbossa.org>
2729
2730         [Qt][WK2] Some QML tests were accidentally committed.
2731         https://bugs.webkit.org/show_bug.cgi?id=70321
2732
2733         Reviewed by Andreas Kling.
2734
2735         These tests were committed by accident. They should not be there.
2736
2737         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_preferences.qml:
2738
2739 2011-10-18  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2740
2741         [Qt] Send mouse move events when we handle HoverEnter/Leave in QDesktopWebView
2742         https://bugs.webkit.org/show_bug.cgi?id=70297
2743
2744         Reviewed by Simon Hausmann.
2745
2746         Qt treat the first and last hover movements as special HoverMove and HoverLeave events, but
2747         WebKit doesn't make the difference, so we need to create move events for them.
2748
2749         While HoverEnter is in practice equivalent to HoverMove, the HoverLeave event is a bit
2750         different because we want to emulate that the mouse is not only leaving the current node, but
2751         completely leaving the whole document. The way to do this is to manufacture a move event with
2752         a very far position, and was inspired by WebView::handleMouseEvent() in
2753         Source/WebKit/win/WebView.cpp.
2754
2755         This patch fixes DesktopWebViewLinkHovered QML tests.
2756
2757         * UIProcess/qt/qdesktopwebpageproxy.cpp:
2758         (QDesktopWebPageProxy::handleEvent):
2759         (QDesktopWebPageProxy::handleHoverLeaveEvent):
2760         * UIProcess/qt/qdesktopwebpageproxy.h:
2761
2762 2011-10-18  Alexis Menard  <alexis.menard@openbossa.org>
2763
2764         [Qt][WK2] WebPreferences are impossible to use in QML.
2765         https://bugs.webkit.org/show_bug.cgi?id=70141
2766
2767         Reviewed by Kenneth Rohde Christiansen.
2768
2769         Make it possible to use qwkpreferences in QML. Renamed it
2770         to follow our new style regarding class names. This class is 
2771         now a QObject that is exposed as a property of the view.
2772         The tests give an idea of the usage.
2773
2774         * UIProcess/API/qt/WKView.h:
2775         * UIProcess/API/qt/qdesktopwebview.cpp:
2776         (QDesktopWebView::preferences):
2777         * UIProcess/API/qt/qdesktopwebview.h:
2778         * UIProcess/API/qt/qmlplugin/plugin.cpp:
2779         (WebKit2QmlPlugin::registerTypes):
2780         * UIProcess/API/qt/qtouchwebpage.cpp:
2781         (QTouchWebPage::preferences):
2782         * UIProcess/API/qt/qtouchwebpage.h:
2783         * UIProcess/API/qt/qwebpreferences.cpp: Added.
2784         (QWebPreferencesPrivate::createPreferences):
2785         (QWebPreferencesPrivate::testAttribute):
2786         (QWebPreferencesPrivate::setAttribute):
2787         (QWebPreferencesPrivate::setFontFamily):
2788         (QWebPreferencesPrivate::fontFamily):
2789         (QWebPreferencesPrivate::setFontSize):
2790         (QWebPreferencesPrivate::fontSize):
2791         (QWebPreferences::QWebPreferences):
2792         (QWebPreferences::~QWebPreferences):
2793         (QWebPreferences::autoLoadImages):
2794         (QWebPreferences::setAutoLoadImages):
2795         (QWebPreferences::javascriptEnabled):
2796         (QWebPreferences::setJavascriptEnabled):
2797         (QWebPreferences::pluginsEnabled):
2798         (QWebPreferences::setPluginsEnabled):
2799         (QWebPreferences::offlineWebApplicationCacheEnabled):
2800         (QWebPreferences::setOfflineWebApplicationCacheEnabled):
2801         (QWebPreferences::localStorageEnabled):
2802         (QWebPreferences::setLocalStorageEnabled):
2803         (QWebPreferences::XSSAuditingEnabled):
2804         (QWebPreferences::setXSSAuditingEnabled):
2805         (QWebPreferences::privateBrowsingEnabled):
2806         (QWebPreferences::setPrivateBrowsingEnabled):
2807         (QWebPreferences::dnsPrefetchEnabled):
2808         (QWebPreferences::setDnsPrefetchEnabled):
2809         (QWebPreferences::standardFontFamily):
2810         (QWebPreferences::setStandardFontFamily):
2811         (QWebPreferences::fixedFontFamily):
2812         (QWebPreferences::setFixedFontFamily):
2813         (QWebPreferences::serifFontFamily):
2814         (QWebPreferences::setSerifFontFamily):
2815         (QWebPreferences::sansSerifFontFamily):
2816         (QWebPreferences::setSansSerifFontFamily):
2817         (QWebPreferences::cursiveFontFamily):
2818         (QWebPreferences::setCursiveFontFamily):
2819         (QWebPreferences::fantasyFontFamily):
2820         (QWebPreferences::setFantasyFontFamily):
2821         (QWebPreferences::minimumFontSize):
2822         (QWebPreferences::setMinimumFontSize):
2823         (QWebPreferences::defaultFontSize):
2824         (QWebPreferences::setDefaultFontSize):
2825         (QWebPreferences::defaultFixedFontSize):
2826         (QWebPreferences::setDefaultFixedFontSize):
2827         * UIProcess/API/qt/qwebpreferences.h: Added.
2828         * UIProcess/API/qt/qwebpreferences_p.h: Added.
2829         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_preferences.qml: Added.
2830         * UIProcess/API/qt/tests/qmltests/common/javascript.html: Added.
2831         * UIProcess/API/qt/tests/qmltests/common/localStorage.html: Added.
2832         * UIProcess/qt/QtWebPageProxy.cpp:
2833         (QtWebPageProxy::preferences):
2834         * UIProcess/qt/QtWebPageProxy.h:
2835         * UIProcess/qt/qwkpreferences.cpp: Removed.
2836         * UIProcess/qt/qwkpreferences.h: Removed.
2837         * UIProcess/qt/qwkpreferences_p.h: Removed.
2838         * WebKit2.pro:
2839         * WebKit2API.pri:
2840
2841 2011-10-18  Tomasz Morawski  <t.morawski@samsung.com>
2842
2843         [EFL][WK2] Fix compilation error by include WebErrors.h file.
2844         https://bugs.webkit.org/show_bug.cgi?id=70309
2845
2846         Unreviewed build fix
2847
2848         Added a header file to fix compilation error.
2849
2850         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
2851
2852 2011-10-18  Adenilson Cavalcanti  <adenilson.silva@openbossa.org>
2853
2854         [Qt][WK2] Implement geolocation provider for qt port
2855         https://bugs.webkit.org/show_bug.cgi?id=59199
2856
2857         Reviewed by Simon Hausmann.
2858
2859         Based on patch by Kenneth Christiansen <kenneth.r.christiansen@nokia.com>
2860
2861         Implements default location provider for WK2 QtWebKit (WebGeolocationProviderQt),
2862         allowing QtWebKit clients to implement or override their own provider using WK2 APIs.
2863
2864         * UIProcess/API/C/WKGeolocationManager.h:
2865         * UIProcess/qt/WebContextQt.cpp:
2866         (WebKit::WebContext::platformInitializeWebProcess):
2867         * UIProcess/qt/WebGeolocationProviderQt.cpp: Added.
2868         (toLocationProvider):
2869         (locationStartUpdating):
2870         (locationStopUpdating):
2871         (WebGeolocationProviderQt::create):
2872         (WebGeolocationProviderQt::provider):
2873         (WebGeolocationProviderQt::WebGeolocationProviderQt):
2874         (WebGeolocationProviderQt::~WebGeolocationProviderQt):
2875         (WebGeolocationProviderQt::updateTimeout):
2876         (WebGeolocationProviderQt::positionUpdated):
2877         (WebGeolocationProviderQt::startUpdating):
2878         (WebGeolocationProviderQt::stopUpdating):
2879         * UIProcess/qt/WebGeolocationProviderQt.h: Added.
2880         * WebKit2.pro:
2881
2882 2011-10-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2883
2884         [UNIX] Use SOCK_SEQPACKET when available
2885         https://bugs.webkit.org/show_bug.cgi?id=61287
2886
2887         Reviewed by Darin Adler.
2888
2889         Sockets of type SEQPACKET are actually DGRAM sockets but that
2890         notifies the other end when the connection is closed. When
2891         SEQPACKET sockets are not available GTK+ port uses STREAM sockets
2892         while Qt port uses DGRAM sockets.
2893
2894         * PluginProcess/PluginProcess.cpp: Use SOCK_SEQPACKET if possible.
2895         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2896         (WebKit::ProcessLauncher::launchProcess): Ditto.
2897         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2898         (WebKit::ProcessLauncher::launchProcess): Ditto.
2899
2900 2011-10-17  Jon Lee  <jonlee@apple.com>
2901
2902         Filtering of URLs when serializing back forward list saves bad current index value
2903         https://bugs.webkit.org/show_bug.cgi?id=70282
2904         <rdar://problem/10057763>
2905
2906         Reviewed by Sam Weinig.
2907
2908         When reading the serialized b-f list, perform a sanity check on the current index.
2909         If it is invalid, we set it to NoCurrentItemIndex to prevent further corruption of
2910         the list.
2911
2912         When serializing the b-f list, currentIndex can be negative in the case where the list
2913         has one item only, and that item gets filtered out. In this instance currentIndex should
2914         just be -1. A crashing case showed an index that was more negative, a situation that I
2915         could not replicate. Since this value will get cleaned up when the b-f list is restored,
2916         I just strengthened the assertion to check for a more negative index in case we run into it again.
2917
2918         * UIProcess/cf/WebBackForwardListCF.cpp:
2919         (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Update the assertion
2920         in case we go beyond NoCurrentItemIndex (which, as an int, is -1).
2921         (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation):
2922
2923 2011-10-14  Chris Marrin  <cmarrin@apple.com>
2924
2925         Throttle rate of requestAnimationFrame when page is not visible
2926         https://bugs.webkit.org/show_bug.cgi?id=67873
2927
2928         Reviewed by Anders Carlsson.
2929
2930         Plumb through notification when the window is hidden/shown or
2931         minimized/unminimized
2932
2933         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2934         (WebKit::DrawingAreaImpl::suspendPainting):
2935         (WebKit::DrawingAreaImpl::resumePainting):
2936
2937 2011-10-17  No'am Rosenthal  <noam.rosenthal@nokia.com>
2938
2939         [Qt][WK2] Synchronize tiling with accelerated compositing
2940         https://bugs.webkit.org/show_bug.cgi?id=69151
2941
2942         Reviewed by Simon Hausmann.
2943
2944         Make the tiled "non-composited" content and the composited layers go through the same
2945         code path on WebKit2. Instead of having a "drawing area" that handles the non-composited
2946         content and a seperate layer tree, we put everything in a layer tree, with the non-
2947         composited content being a layer in the tree.
2948
2949         This allows fixing several issues with websites that have large content areas that are
2950         composited or overlap with composited layers.
2951
2952         Layer-tree synchronization is done by passing WebKit2 messages between a LayerTreeHost
2953         on the WebProcess and a LayerTreeHostProxy on the UI process. Every layer in the tree has
2954         its own tiled backing store, and uses the LayerTreeHost communication channel to pass
2955         content up to the UI process. The UI process will later creates its own GraphicsLayer tree,
2956         based on TextureMapper, which can be painted directly with OpenGL.
2957
2958         Several optimizations are available for the non-composited layer as well, e.g. specifying
2959         a trajectory and updating the visible rect together with the content scale.
2960
2961         This code is currently disabled, a separate patch will enable it and glue it to
2962         QTouchWebPage.
2963
2964         * DerivedSources.pro:
2965         * Platform/CoreIPC/MessageID.h:
2966         * Scripts/webkit2/messages.py:
2967         * Shared/LayerTreeContext.h:
2968         * Shared/WebLayerTreeInfo.cpp:
2969         (WebKit::WebLayerInfo::encode):
2970         (WebKit::WebLayerInfo::decode):
2971         * Shared/WebLayerTreeInfo.h:
2972         * Shared/qt/LayerTreeContextQt.cpp:
2973         (WebKit::LayerTreeContext::LayerTreeContext):
2974         (WebKit::LayerTreeContext::~LayerTreeContext):
2975         (WebKit::LayerTreeContext::encode):
2976         (WebKit::LayerTreeContext::decode):
2977         (WebKit::LayerTreeContext::isEmpty):
2978         (WebKit::operator==):
2979         * UIProcess/DrawingAreaProxy.cpp:
2980         (WebKit::DrawingAreaProxy::updateWebView):
2981         (WebKit::DrawingAreaProxy::contentsRect):
2982         * UIProcess/DrawingAreaProxy.h:
2983         (WebKit::DrawingAreaProxy::viewportVisibleRect):
2984         (WebKit::DrawingAreaProxy::isBackingStoreReady):
2985         (WebKit::DrawingAreaProxy::paintToCurrentGLContext):
2986         (WebKit::DrawingAreaProxy::setVisibleContentsRectAndScale):
2987         (WebKit::DrawingAreaProxy::setVisibleContentRectTrajectoryVector):
2988         (WebKit::DrawingAreaProxy::createTileForLayer):
2989         (WebKit::DrawingAreaProxy::updateTileForLayer):
2990         (WebKit::DrawingAreaProxy::removeTileForLayer):
2991         (WebKit::DrawingAreaProxy::didReceiveLayerTreeHostProxyMessage):
2992         (WebKit::DrawingAreaProxy::page):
2993         * UIProcess/DrawingAreaProxyImpl.cpp:
2994         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
2995         (WebKit::DrawingAreaProxyImpl::didReceiveLayerTreeHostProxyMessage):
2996         (WebKit::DrawingAreaProxyImpl::setVisibleContentsRectAndScale):
2997         (WebKit::DrawingAreaProxyImpl::setVisibleContentRectTrajectoryVector):
2998         (WebKit::DrawingAreaProxyImpl::paintToCurrentGLContext):
2999         * UIProcess/DrawingAreaProxyImpl.h:
3000         * UIProcess/LayerTreeHostProxy.h: Added.
3001         (WebKit::LayerTreeHostProxy::layerByID):
3002         (WebKit::LayerTreeHostProxy::rootLayer):
3003         (WebKit::LayerTreeHostProxy::notifyAnimationStarted):
3004         (WebKit::LayerTreeHostProxy::notifySyncRequired):
3005         (WebKit::LayerTreeHostProxy::showDebugBorders):
3006         (WebKit::LayerTreeHostProxy::showRepaintCounter):
3007         (WebKit::LayerTreeHostProxy::paintContents):
3008         * UIProcess/LayerTreeHostProxy.messages.in: Added.
3009         * UIProcess/WebPageProxy.cpp:
3010         (WebKit::WebPageProxy::didReceiveMessage):
3011         * UIProcess/qt/LayerTreeHostProxyQt.cpp: Added.
3012         * WebKit2.pro:
3013         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3014         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
3015         (WebCore::WebGraphicsLayer::~WebGraphicsLayer):
3016         (WebCore::WebGraphicsLayer::setChildren):
3017         (WebCore::WebGraphicsLayer::addChild):
3018         (WebCore::WebGraphicsLayer::addChildAtIndex):
3019         (WebCore::WebGraphicsLayer::addChildAbove):
3020         (WebCore::WebGraphicsLayer::addChildBelow):
3021         (WebCore::WebGraphicsLayer::replaceChild):
3022         (WebCore::WebGraphicsLayer::removeFromParent):
3023         (WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
3024         (WebCore::WebGraphicsLayer::setContentsToImage):
3025         (WebCore::WebGraphicsLayer::setNeedsDisplay):
3026         (WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
3027         (WebCore::WebGraphicsLayer::syncCompositingState):
3028         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
3029         (WebCore::WebGraphicsLayer::tiledBackingStorePaintBegin):
3030         (WebCore::WebGraphicsLayer::setContentsScale):
3031         (WebCore::WebGraphicsLayer::setRootLayer):
3032         (WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector):
3033         (WebCore::WebGraphicsLayer::setVisibleContentRect):
3034         (WebCore::WebGraphicsLayer::tiledBackingStorePaint):
3035         (WebCore::WebGraphicsLayer::tiledBackingStorePaintEnd):
3036         (WebCore::WebGraphicsLayer::tiledBackingStoreUpdatesAllowed):
3037         (WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
3038         (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
3039         (WebCore::WebGraphicsLayer::tiledBackingStoreBackgroundColor):
3040         (WebCore::WebGraphicsLayer::createTile):
3041         (WebCore::WebGraphicsLayer::updateTile):
3042         (WebCore::WebGraphicsLayer::removeTile):
3043         (WebCore::WebGraphicsLayer::updateTileBuffersRecursively):
3044         (WebCore::WebGraphicsLayer::layerTreeTileClient):
3045         (WebCore::WebGraphicsLayer::updateContentBuffers):
3046         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
3047         (WebCore::WebGraphicsLayer::setLayerTreeTileClient):
3048         * WebProcess/WebPage/DrawingArea.h:
3049         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3050         (WebKit::DrawingAreaImpl::didReceiveLayerTreeHostMessage):
3051         * WebProcess/WebPage/DrawingAreaImpl.h:
3052         * WebProcess/WebPage/LayerTreeHost.cpp:
3053         (WebKit::LayerTreeHost::create):
3054         * WebProcess/WebPage/LayerTreeHost.h:
3055         (WebKit::LayerTreeHost::setVisibleContentRectAndScale):
3056         (WebKit::LayerTreeHost::setVisibleContentRectTrajectoryVector):
3057         (WebKit::LayerTreeHost::setVisibleContentRectForLayer):
3058         (WebKit::LayerTreeHost::renderNextFrame):
3059         * WebProcess/WebPage/LayerTreeHost.messages.in: Added.
3060         * WebProcess/WebPage/TiledDrawingArea.cpp:
3061         (WebKit::TiledDrawingArea::didReceiveLayerTreeHostMessage):
3062         * WebProcess/WebPage/TiledDrawingArea.h:
3063         * WebProcess/WebPage/WebPage.cpp:
3064         (WebKit::WebPage::didReceiveMessage):
3065         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
3066         (WebKit::LayerTreeHostQt::create):
3067         (WebKit::LayerTreeHostQt::~LayerTreeHostQt):
3068         (WebKit::LayerTreeHostQt::LayerTreeHostQt):
3069         (WebKit::LayerTreeHostQt::setLayerFlushSchedulingEnabled):
3070         (WebKit::LayerTreeHostQt::scheduleLayerFlush):
3071         (WebKit::LayerTreeHostQt::cancelPendingLayerFlush):
3072         (WebKit::LayerTreeHostQt::setShouldNotifyAfterNextScheduledLayerFlush):
3073         (WebKit::LayerTreeHostQt::setRootCompositingLayer):
3074         (WebKit::LayerTreeHostQt::invalidate):
3075         (WebKit::LayerTreeHostQt::setNonCompositedContentsNeedDisplay):
3076         (WebKit::LayerTreeHostQt::scrollNonCompositedContents):
3077         (WebKit::LayerTreeHostQt::forceRepaint):
3078         (WebKit::LayerTreeHostQt::sizeDidChange):
3079         (WebKit::LayerTreeHostQt::didInstallPageOverlay):
3080         (WebKit::LayerTreeHostQt::didUninstallPageOverlay):
3081         (WebKit::LayerTreeHostQt::setPageOverlayNeedsDisplay):
3082         (WebKit::LayerTreeHostQt::flushPendingLayerChanges):
3083         (WebKit::LayerTreeHostQt::didSyncCompositingStateForLayer):
3084         (WebKit::LayerTreeHostQt::didDeleteLayer):
3085         (WebKit::LayerTreeHostQt::performScheduledLayerFlush):
3086         (WebKit::LayerTreeHostQt::layerFlushTimerFired):
3087         (WebKit::LayerTreeHostQt::createPageOverlayLayer):
3088         (WebKit::LayerTreeHostQt::destroyPageOverlayLayer):
3089         (WebKit::LayerTreeHostQt::adoptImageBackingStore):
3090         (WebKit::LayerTreeHostQt::releaseImageBackingStore):
3091         (WebKit::LayerTreeHostQt::notifyAnimationStarted):
3092         (WebKit::LayerTreeHostQt::notifySyncRequired):
3093         (WebKit::LayerTreeHostQt::paintContents):
3094         (WebKit::LayerTreeHostQt::showDebugBorders):
3095         (WebKit::LayerTreeHostQt::showRepaintCounter):
3096         (WebKit::LayerTreeHost::supportsAcceleratedCompositing):
3097         (WebKit::LayerTreeHostQt::createTile):
3098         (WebKit::LayerTreeHostQt::updateTile):
3099         (WebKit::LayerTreeHostQt::removeTile):
3100         (WebKit::LayerTreeHostQt::setVisibleContentRectForLayer):
3101         (WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
3102         (WebKit::LayerTreeHostQt::setVisibleContentRectTrajectoryVector):
3103         (WebKit::LayerTreeHostQt::renderNextFrame):
3104         (WebKit::LayerTreeHostQt::layerTreeTileUpdatesAllowed):
3105 +
3106
3107 2011-10-17  Ada Chan  <adachan@apple.com>
3108
3109         Calling WKPageLoadAlternateHTMLString() where baseURL does not point to a directory causes an invalid message to be returned from WebProcess
3110         https://bugs.webkit.org/show_bug.cgi?id=70168
3111
3112         Reviewed by Alexey Proskuryakov.
3113
3114         * UIProcess/WebProcessProxy.cpp:
3115         (WebKit::WebProcessProxy::assumeReadAccessToBaseURL): Add the file path of url's base URL to m_localPathsWithAssumedReadAccess,
3116         since url may not point to a directory.
3117
3118 2011-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
3119
3120         [GTK] Add methods to get/set a custom text enconding to WebKit2 GTK+ API
3121         https://bugs.webkit.org/show_bug.cgi?id=69524
3122
3123         Reviewed by Martin Robinson.
3124
3125         * UIProcess/API/gtk/WebKitWebView.cpp:
3126         (webkit_web_view_get_custom_charset):
3127         (webkit_web_view_set_custom_charset):
3128         * UIProcess/API/gtk/WebKitWebView.h:
3129         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
3130         (testWebViewCustomCharset):
3131         (beforeAll):
3132
3133 2011-10-14  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3134
3135         [Qt][WK2] Implement decidePolicyForResponse in our PolicyClient
3136         https://bugs.webkit.org/show_bug.cgi?id=69832
3137
3138         Reviewed by Kenneth Rohde Christiansen.
3139
3140         We implement decidePolicyForResponse in our PolicyClient in order to
3141         decide whether a given ResourceResponse should be downloaded or loaded.
3142
3143         * Shared/qt/WebCoreArgumentCodersQt.cpp:
3144         (CoreIPC::::encode):
3145         (CoreIPC::::decode):
3146         Implement serialization of ResourceResponse.
3147
3148         * UIProcess/qt/ClientImpl.cpp:
3149         (qt_wk_decidePolicyForResponse):
3150         * UIProcess/qt/ClientImpl.h:
3151         * UIProcess/qt/QtWebPageProxy.cpp:
3152         (QtWebPageProxy::init):
3153
3154 2011-10-17  Nayan Kumar K  <nayankk@motorola.com>
3155
3156         [WebKit2][gtk] Rename WEBKIT_POLICY_ERROR_CANNOT_SHOW_URL to WEBKIT_POLICY_ERROR_CANNOT_SHOW_URI
3157         https://bugs.webkit.org/show_bug.cgi?id=70040
3158
3159         Reviewed by Martin Robinson.
3160
3161         * UIProcess/API/gtk/WebKitError.cpp:
3162         * UIProcess/API/gtk/WebKitError.h:
3163
3164 2011-10-16  Adam Barth  <abarth@webkit.org>
3165
3166         Always enable ENABLE(DOM_STORAGE)
3167         https://bugs.webkit.org/show_bug.cgi?id=70189
3168
3169         Reviewed by Eric Seidel.
3170
3171         * Configurations/FeatureDefines.xcconfig:
3172         * WebProcess/WebPage/WebPage.cpp:
3173         (WebKit::WebPage::updatePreferences):
3174         * WebProcess/WebProcess.cpp:
3175         (WebKit::WebProcess::initializeWebProcess):
3176
3177 2011-10-15  Adam Barth  <abarth@webkit.org>
3178
3179         Rename ENABLE(TILED_BACKING_STORE) to USE(TILED_BACKING_STORE)
3180         https://bugs.webkit.org/show_bug.cgi?id=70194
3181
3182         Reviewed by Daniel Bates.
3183
3184         * Shared/DrawingAreaInfo.h:
3185         * UIProcess/DrawingAreaProxy.h:
3186         * UIProcess/DrawingAreaProxy.messages.in:
3187         * UIProcess/PageClient.h:
3188         * UIProcess/TiledDrawingAreaProxy.cpp:
3189         * UIProcess/TiledDrawingAreaProxy.h:
3190         * UIProcess/WebPageProxy.cpp:
3191         * UIProcess/WebPageProxy.h:
3192         * UIProcess/WebPageProxy.messages.in:
3193         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3194         (WebKit::WebChromeClient::contentsSizeChanged):
3195         * WebProcess/WebCoreSupport/WebChromeClient.h:
3196         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3197         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
3198         * WebProcess/WebPage/DrawingArea.cpp:
3199         (WebKit::DrawingArea::create):
3200         * WebProcess/WebPage/DrawingArea.h:
3201         * WebProcess/WebPage/DrawingArea.messages.in:
3202         * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
3203         * WebProcess/WebPage/TiledBackingStoreRemoteTile.h:
3204         * WebProcess/WebPage/TiledDrawingArea.cpp:
3205         * WebProcess/WebPage/TiledDrawingArea.h:
3206         * WebProcess/WebPage/WebPage.cpp:
3207         (WebKit::WebPage::setSize):
3208         * WebProcess/WebPage/WebPage.h:
3209         * WebProcess/WebPage/WebPage.messages.in:
3210
3211 2011-10-15  Sheriff Bot  <webkit.review.bot@gmail.com>
3212
3213         Unreviewed, rolling out r97559.
3214         http://trac.webkit.org/changeset/97559
3215         https://bugs.webkit.org/show_bug.cgi?id=70176
3216
3217         Broke build on Mac (Requested by noamr_ on #webkit).
3218
3219         * DerivedSources.pro:
3220         * Platform/CoreIPC/MessageID.h:
3221         * Scripts/webkit2/messages.py:
3222         * Shared/LayerTreeContext.h:
3223         * Shared/WebLayerTreeInfo.cpp:
3224         (WebKit::WebLayerInfo::encode):
3225         (WebKit::WebLayerInfo::decode):
3226         * Shared/WebLayerTreeInfo.h:
3227         * Shared/qt/LayerTreeContextQt.cpp:
3228         (WebKit::LayerTreeContext::LayerTreeContext):
3229         (WebKit::LayerTreeContext::~LayerTreeContext):
3230         (WebKit::LayerTreeContext::encode):
3231         (WebKit::LayerTreeContext::decode):
3232         (WebKit::LayerTreeContext::isEmpty):
3233         (WebKit::operator==):
3234         * UIProcess/DrawingAreaProxy.cpp:
3235         * UIProcess/DrawingAreaProxy.h:
3236         * UIProcess/DrawingAreaProxyImpl.cpp:
3237         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
3238         * UIProcess/DrawingAreaProxyImpl.h:
3239         * UIProcess/LayerTreeHostProxy.h: Removed.
3240         * UIProcess/LayerTreeHostProxy.messages.in: Removed.
3241         * UIProcess/WebPageProxy.cpp:
3242         (WebKit::WebPageProxy::didReceiveMessage):
3243         * UIProcess/qt/LayerTreeHostProxyQt.cpp: Removed.
3244         * WebKit2.pro:
3245         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3246         (WebCore::deletedLayerIDs):
3247         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
3248         (WebCore::WebGraphicsLayer::~WebGraphicsLayer):
3249         (WebCore::WebGraphicsLayer::setChildren):
3250         (WebCore::WebGraphicsLayer::addChild):
3251         (WebCore::WebGraphicsLayer::addChildAtIndex):
3252         (WebCore::WebGraphicsLayer::addChildAbove):
3253         (WebCore::WebGraphicsLayer::addChildBelow):
3254         (WebCore::WebGraphicsLayer::replaceChild):
3255         (WebCore::WebGraphicsLayer::removeFromParent):
3256         (WebCore::WebGraphicsLayer::setContentsRect):
3257         (WebCore::WebGraphicsLayer::setContentsToImage):
3258         (WebCore::WebGraphicsLayer::setNeedsDisplay):
3259         (WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
3260         (WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
3261         (WebCore::WebGraphicsLayer::didSynchronize):
3262         (WebCore::WebGraphicsLayer::layerInfo):
3263         (WebCore::WebGraphicsLayer::syncCompositingState):
3264         (WebCore::WebGraphicsLayer::needsDisplayRect):
3265         (WebCore::WebGraphicsLayer::takeLayersToDelete):
3266         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
3267         (WebCore::divideIntoTiles):
3268         (WebCore::collectCompositingInfoForThisLayer):
3269         (WebCore::collectCompositingInfoRecursively):
3270         (WebCore::WebGraphicsLayer::sendLayersToUIProcess):
3271         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
3272         * WebProcess/WebPage/DrawingArea.h:
3273         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3274         * WebProcess/WebPage/DrawingAreaImpl.h:
3275         * WebProcess/WebPage/LayerTreeHost.cpp:
3276         (WebKit::LayerTreeHost::create):
3277         * WebProcess/WebPage/LayerTreeHost.h:
3278         * WebProcess/WebPage/LayerTreeHost.messages.in: Removed.
3279         * WebProcess/WebPage/TiledDrawingArea.cpp:
3280         * WebProcess/WebPage/TiledDrawingArea.h:
3281         * WebProcess/WebPage/WebPage.cpp:
3282         (WebKit::WebPage::didReceiveMessage):
3283         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
3284         * WebProcess/WebPage/qt/LayerTreeHostQt.h: Removed.
3285
3286 2011-10-15  No'am Rosenthal  <noam.rosenthal@nokia.com>
3287
3288         [Qt][WK2] Synchronize tiling with accelerated compositing
3289         https://bugs.webkit.org/show_bug.cgi?id=69151
3290
3291         Reviewed by Simon Hausmann.
3292
3293         Make the tiled "non-composited" content and the composited layers go through the same
3294         code path on WebKit2. Instead of having a "drawing area" that handles the non-composited
3295         content and a seperate layer tree, we put everything in a layer tree, with the non-
3296         composited content being a layer in the tree.
3297
3298         This allows fixing several issues with websites that have large content areas that are
3299         composited or overlap with composited layers.
3300
3301         Layer-tree synchronization is done by passing WebKit2 messages between a LayerTreeHost
3302         on the WebProcess and a LayerTreeHostProxy on the UI process. Every layer in the tree has
3303         its own tiled backing store, and uses the LayerTreeHost communication channel to pass
3304         content up to the UI process. The UI process will later creates its own GraphicsLayer tree,
3305         based on TextureMapper, which can be painted directly with OpenGL.
3306
3307         Several optimizations are available for the non-composited layer as well, e.g. specifying
3308         a trajectory and updating the visible rect together with the content scale.
3309
3310         This code is currently disabled, a separate patch will enable it and glue it to
3311         QTouchWebPage.
3312
3313         * DerivedSources.pro:
3314         * Platform/CoreIPC/MessageID.h:
3315         * Scripts/webkit2/messages.py:
3316         * Shared/LayerTreeContext.h:
3317         * Shared/WebLayerTreeInfo.cpp:
3318         (WebKit::WebLayerInfo::encode):
3319         (WebKit::WebLayerInfo::decode):
3320         * Shared/WebLayerTreeInfo.h:
3321         * Shared/qt/LayerTreeContextQt.cpp:
3322         (WebKit::LayerTreeContext::LayerTreeContext):
3323         (WebKit::LayerTreeContext::~LayerTreeContext):
3324         (WebKit::LayerTreeContext::encode):
3325         (WebKit::LayerTreeContext::decode):
3326         (WebKit::LayerTreeContext::isEmpty):
3327         (WebKit::operator==):
3328         * UIProcess/DrawingAreaProxy.cpp:
3329         (WebKit::DrawingAreaProxy::updateWebView):
3330         (WebKit::DrawingAreaProxy::contentsRect):
3331         * UIProcess/DrawingAreaProxy.h:
3332         (WebKit::DrawingAreaProxy::viewportVisibleRect):
3333         (WebKit::DrawingAreaProxy::isBackingStoreReady):
3334         (WebKit::DrawingAreaProxy::paintToCurrentGLContext):
3335         (WebKit::DrawingAreaProxy::setVisibleContentsRectAndScale):
3336         (WebKit::DrawingAreaProxy::setVisibleContentRectTrajectoryVector):
3337         (WebKit::DrawingAreaProxy::createTileForLayer):
3338         (WebKit::DrawingAreaProxy::updateTileForLayer):
3339         (WebKit::DrawingAreaProxy::removeTileForLayer):
3340         (WebKit::DrawingAreaProxy::didReceiveLayerTreeHostProxyMessage):
3341         (WebKit::DrawingAreaProxy::page):
3342         * UIProcess/DrawingAreaProxyImpl.cpp:
3343         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
3344         (WebKit::DrawingAreaProxyImpl::didReceiveLayerTreeHostProxyMessage):
3345         (WebKit::DrawingAreaProxyImpl::setVisibleContentsRectAndScale):
3346         (WebKit::DrawingAreaProxyImpl::setVisibleContentRectTrajectoryVector):
3347         (WebKit::DrawingAreaProxyImpl::paintToCurrentGLContext):
3348         * UIProcess/DrawingAreaProxyImpl.h:
3349         * UIProcess/LayerTreeHostProxy.h: Added.
3350         (WebKit::LayerTreeHostProxy::layerByID):
3351         (WebKit::LayerTreeHostProxy::rootLayer):
3352         (WebKit::LayerTreeHostProxy::notifyAnimationStarted):
3353         (WebKit::LayerTreeHostProxy::notifySyncRequired):
3354         (WebKit::LayerTreeHostProxy::showDebugBorders):
3355         (WebKit::LayerTreeHostProxy::showRepaintCounter):
3356         (WebKit::LayerTreeHostProxy::paintContents):
3357         * UIProcess/LayerTreeHostProxy.messages.in: Added.
3358         * UIProcess/WebPageProxy.cpp:
3359         (WebKit::WebPageProxy::didReceiveMessage):
3360         * UIProcess/qt/LayerTreeHostProxyQt.cpp: Added.
3361         * WebKit2.pro:
3362         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3363         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
3364         (WebCore::WebGraphicsLayer::~WebGraphicsLayer):
3365         (WebCore::WebGraphicsLayer::setChildren):
3366         (WebCore::WebGraphicsLayer::addChild):
3367         (WebCore::WebGraphicsLayer::addChildAtIndex):
3368         (WebCore::WebGraphicsLayer::addChildAbove):
3369         (WebCore::WebGraphicsLayer::addChildBelow):
3370         (WebCore::WebGraphicsLayer::replaceChild):
3371         (WebCore::WebGraphicsLayer::removeFromParent):
3372         (WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
3373         (WebCore::WebGraphicsLayer::setContentsToImage):
3374         (WebCore::WebGraphicsLayer::setNeedsDisplay):
3375         (WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
3376         (WebCore::WebGraphicsLayer::syncCompositingState):
3377         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
3378         (WebCore::WebGraphicsLayer::tiledBackingStorePaintBegin):
3379         (WebCore::WebGraphicsLayer::setContentsScale):
3380         (WebCore::WebGraphicsLayer::setRootLayer):
3381         (WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector):
3382         (WebCore::WebGraphicsLayer::setVisibleContentRect):
3383         (WebCore::WebGraphicsLayer::tiledBackingStorePaint):
3384         (WebCore::WebGraphicsLayer::tiledBackingStorePaintEnd):
3385         (WebCore::WebGraphicsLayer::tiledBackingStoreUpdatesAllowed):
3386         (WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
3387         (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
3388         (WebCore::WebGraphicsLayer::tiledBackingStoreBackgroundColor):
3389         (WebCore::WebGraphicsLayer::createTile):
3390         (WebCore::WebGraphicsLayer::updateTile):
3391         (WebCore::WebGraphicsLayer::removeTile):
3392         (WebCore::WebGraphicsLayer::updateTileBuffersRecursively):
3393         (WebCore::WebGraphicsLayer::layerTreeTileClient):
3394         (WebCore::WebGraphicsLayer::updateContentBuffers):
3395         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
3396         (WebCore::WebGraphicsLayer::setLayerTreeTileClient):
3397         * WebProcess/WebPage/DrawingArea.h:
3398         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3399         (WebKit::DrawingAreaImpl::didReceiveLayerTreeHostMessage):
3400         * WebProcess/WebPage/DrawingAreaImpl.h:
3401         * WebProcess/WebPage/LayerTreeHost.cpp:
3402         (WebKit::LayerTreeHost::create):
3403         * WebProcess/WebPage/LayerTreeHost.h:
3404         (WebKit::LayerTreeHost::setVisibleContentRectAndScale):
3405         (WebKit::LayerTreeHost::setVisibleContentRectTrajectoryVector):
3406         (WebKit::LayerTreeHost::setVisibleContentRectForLayer):
3407         (WebKit::LayerTreeHost::renderNextFrame):
3408         * WebProcess/WebPage/LayerTreeHost.messages.in: Added.
3409         * WebProcess/WebPage/TiledDrawingArea.cpp:
3410         (WebKit::TiledDrawingArea::didReceiveLayerTreeHostMessage):
3411         * WebProcess/WebPage/TiledDrawingArea.h:
3412         * WebProcess/WebPage/WebPage.cpp:
3413         (WebKit::WebPage::didReceiveMessage):
3414         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
3415         (WebKit::LayerTreeHostQt::create):
3416         (WebKit::LayerTreeHostQt::~LayerTreeHostQt):
3417         (WebKit::LayerTreeHostQt::LayerTreeHostQt):
3418         (WebKit::LayerTreeHostQt::setLayerFlushSchedulingEnabled):
3419         (WebKit::LayerTreeHostQt::scheduleLayerFlush):
3420         (WebKit::LayerTreeHostQt::cancelPendingLayerFlush):
3421         (WebKit::LayerTreeHostQt::setShouldNotifyAfterNextScheduledLayerFlush):
3422         (WebKit::LayerTreeHostQt::setRootCompositingLayer):
3423         (WebKit::LayerTreeHostQt::invalidate):
3424         (WebKit::LayerTreeHostQt::setNonCompositedContentsNeedDisplay):
3425         (WebKit::LayerTreeHostQt::scrollNonCompositedContents):
3426         (WebKit::LayerTreeHostQt::forceRepaint):
3427         (WebKit::LayerTreeHostQt::sizeDidChange):
3428         (WebKit::LayerTreeHostQt::didInstallPageOverlay):
3429         (WebKit::LayerTreeHostQt::didUninstallPageOverlay):
3430         (WebKit::LayerTreeHostQt::setPageOverlayNeedsDisplay):
3431         (WebKit::LayerTreeHostQt::flushPendingLayerChanges):
3432         (WebKit::LayerTreeHostQt::didSyncCompositingStateForLayer):
3433         (WebKit::LayerTreeHostQt::didDeleteLayer):
3434         (WebKit::LayerTreeHostQt::performScheduledLayerFlush):
3435         (WebKit::LayerTreeHostQt::layerFlushTimerFired):
3436         (WebKit::LayerTreeHostQt::createPageOverlayLayer):
3437         (WebKit::LayerTreeHostQt::destroyPageOverlayLayer):
3438         (WebKit::LayerTreeHostQt::adoptImageBackingStore):
3439         (WebKit::LayerTreeHostQt::releaseImageBackingStore):
3440         (WebKit::LayerTreeHostQt::notifyAnimationStarted):
3441         (WebKit::LayerTreeHostQt::notifySyncRequired):
3442         (WebKit::LayerTreeHostQt::paintContents):
3443         (WebKit::LayerTreeHostQt::showDebugBorders):
3444         (WebKit::LayerTreeHostQt::showRepaintCounter):
3445         (WebKit::LayerTreeHost::supportsAcceleratedCompositing):
3446         (WebKit::LayerTreeHostQt::createTile):
3447         (WebKit::LayerTreeHostQt::updateTile):
3448         (WebKit::LayerTreeHostQt::removeTile):
3449         (WebKit::LayerTreeHostQt::setVisibleContentRectForLayer):
3450         (WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
3451         (WebKit::LayerTreeHostQt::setVisibleContentRectTrajectoryVector):
3452         (WebKit::LayerTreeHostQt::renderNextFrame):
3453         (WebKit::LayerTreeHostQt::layerTreeTileUpdatesAllowed):
3454
3455 2011-10-15  Sheriff Bot  <webkit.review.bot@gmail.com>
3456
3457         Unreviewed, rolling out r97549.
3458         http://trac.webkit.org/changeset/97549
3459         https://bugs.webkit.org/show_bug.cgi?id=70174
3460
3461         It broke the SL build (Requested by Ossy_weekend on #webkit).
3462
3463         * DerivedSources.pro:
3464         * Platform/CoreIPC/MessageID.h:
3465         * Scripts/webkit2/messages.py:
3466         * Shared/LayerTreeContext.h:
3467         * Shared/WebLayerTreeInfo.cpp:
3468         (WebKit::WebLayerInfo::encode):
3469         (WebKit::WebLayerInfo::decode):
3470         * Shared/WebLayerTreeInfo.h:
3471         * Shared/qt/LayerTreeContextQt.cpp:
3472         (WebKit::LayerTreeContext::LayerTreeContext):
3473         (WebKit::LayerTreeContext::~LayerTreeContext):
3474         (WebKit::LayerTreeContext::encode):
3475         (WebKit::LayerTreeContext::decode):
3476         (WebKit::LayerTreeContext::isEmpty):
3477         (WebKit::operator==):
3478         * UIProcess/DrawingAreaProxy.cpp:
3479         * UIProcess/DrawingAreaProxy.h:
3480         * UIProcess/DrawingAreaProxyImpl.cpp:
3481         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
3482         * UIProcess/DrawingAreaProxyImpl.h:
3483         * UIProcess/LayerTreeHostProxy.h: Removed.
3484         * UIProcess/LayerTreeHostProxy.messages.in: Removed.
3485         * UIProcess/WebPageProxy.cpp:
3486         (WebKit::WebPageProxy::didReceiveMessage):
3487         * UIProcess/qt/LayerTreeHostProxyQt.cpp: Removed.
3488         * WebKit2.pro: