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