upload webkit/tizen 2.0_beta source.
[framework/web/webkit-efl.git] / Source / WebKit2 / ChangeLog
1 2012-05-30  Mario Sanchez Prada  <msanchez@igalia.com>
2
3         [GTK][WK2] Errors in documentation about  webkit_web_view_run_javascript()
4         https://bugs.webkit.org/show_bug.cgi?id=87866
5
6         Reviewed by Martin Robinson.
7
8         * UIProcess/API/gtk/WebKitWebView.cpp: Fix errors.
9
10 2012-05-30  Andy Estes  <aestes@apple.com>
11
12         WebProcessMainMac.mm doesn't need to import WKView.h.
13
14         Rubber-stamped by Anders Carlsson. 
15
16         * WebProcess/mac/WebProcessMainMac.mm:
17
18 2012-05-30  Marcelo Lira  <marcelo.lira@openbossa.org>
19
20         WebKit2: Implement layoutTestController.setPluginsEnabled() in WebKitTestRunner.
21         https://bugs.webkit.org/show_bug.cgi?id=58593
22
23         Adds the ability to change the pluginsEnabled flag in WebCore::Settings
24         to WebKitTestRunner's LayoutTestController. The flag is modified via the
25         public C API of the WebProcess.
26
27         Reviewed by Darin Adler.
28
29         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
30         (WKBundleSetPluginsEnabled):
31         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
32         * WebProcess/InjectedBundle/InjectedBundle.cpp:
33         (WebKit::InjectedBundle::setPluginsEnabled): Calls the setPluginsEnabled
34         method for the WebCore::Settings of each WebCore::Page in the current
35         page group.
36         (WebKit):
37         * WebProcess/InjectedBundle/InjectedBundle.h:
38         (InjectedBundle):
39
40 2012-05-30  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
41
42         HashTable.h has using directives for std::pair and std::make_pair
43         https://bugs.webkit.org/show_bug.cgi?id=29919
44
45         Reviewed by Darin Adler.
46
47         Change code to use std::pair and std::make_pair.
48
49         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
50         (WebKit::DynamicLinkerEnvironmentExtractor::processEnvironmentVariable):
51         * UIProcess/WebContext.cpp:
52         (WebKit::WebContext::postMessageToInjectedBundle):
53
54 2012-05-30  Kenneth Rohde Christiansen  <kenneth@webkit.org>
55
56         Unreviewed: Fix wrongly typed Qt slot.
57
58         * UIProcess/qt/QtViewportInteractionEngine.cpp:
59         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
60
61 2012-05-30  Kenneth Rohde Christiansen  <kenneth@webkit.org>
62
63         [Qt] Move ViewportAttribute related methods to the interaction engine.
64         https://bugs.webkit.org/show_bug.cgi?id=87855
65
66         Reviewed by Simon Hausmann.
67
68         Move the logic of didChange{ViewportProperties|ContentsSize} to the
69         interaction engine and update our testing object.
70
71         * UIProcess/API/qt/qquickwebview.cpp:
72         (QQuickWebViewLegacyPrivate::QQuickWebViewLegacyPrivate):
73         (QQuickWebViewFlickablePrivate::didChangeViewportProperties):
74         (QQuickWebViewFlickablePrivate::didChangeContentsSize):
75         * UIProcess/API/qt/qquickwebview_p_p.h:
76         (QQuickWebViewPrivate):
77         * UIProcess/API/qt/qwebkittest.cpp:
78         (QWebKitTest::contentsScale):
79         (QWebKitTest::devicePixelRatio):
80         (QWebKitTest::initialScale):
81         (QWebKitTest::minimumScale):
82         (QWebKitTest::maximumScale):
83         (QWebKitTest::isScalable):
84         (QWebKitTest::layoutSize):
85         * UIProcess/qt/QtViewportInteractionEngine.cpp:
86         (WebKit::QtViewportInteractionEngine::viewportAttributesChanged):
87         (WebKit):
88         (WebKit::QtViewportInteractionEngine::pageContentsSizeChanged):
89         * UIProcess/qt/QtViewportInteractionEngine.h:
90         (QtViewportInteractionEngine):
91
92 2012-05-30  Kenneth Rohde Christiansen  <kenneth@webkit.org>
93
94         [Qt] Do renames in ViewportInteractionEngine as agreed upon
95         https://bugs.webkit.org/show_bug.cgi?id=87845
96
97         Reviewed by Simon Hausmann.
98
99         Mostly moving methods around and renaming them to be more
100         consistent and avoid terminology clashes.
101
102         * UIProcess/API/qt/qquickwebview.cpp:
103         (QQuickWebViewFlickablePrivate::didChangeViewportProperties):
104         (QQuickWebViewFlickablePrivate::pageDidRequestScroll):
105         (QQuickWebViewFlickablePrivate::didChangeContentsSize):
106         * UIProcess/qt/QtViewportInteractionEngine.cpp:
107         (WebKit::boundPosition):
108         (WebKit):
109         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
110         (WebKit::QtViewportInteractionEngine::setPageItemRectVisible):
111         (WebKit::QtViewportInteractionEngine::animatePageItemRectVisible):
112         (WebKit::QtViewportInteractionEngine::flickMoveStarted):
113         (WebKit::QtViewportInteractionEngine::flickMoveEnded):
114         (WebKit::QtViewportInteractionEngine::pageItemPositionChanged):
115         (WebKit::QtViewportInteractionEngine::pageContentPositionRequest):
116         (WebKit::QtViewportInteractionEngine::scaleAnimationValueChanged):
117         (WebKit::QtViewportInteractionEngine::computePosRangeForPageItemAtScale):
118         (WebKit::QtViewportInteractionEngine::focusEditableArea):
119         (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
120         (WebKit::QtViewportInteractionEngine::nearestValidBounds):
121         (WebKit::QtViewportInteractionEngine::cancelScrollAnimation):
122         (WebKit::QtViewportInteractionEngine::pinchGestureEnded):
123         (WebKit::QtViewportInteractionEngine::pageItemSizeChanged):
124         * UIProcess/qt/QtViewportInteractionEngine.h:
125         (WebKit::QtViewportInteractionEngine::setDevicePixelRatio):
126         (QtViewportInteractionEngine):
127
128 2012-05-30  Mariusz Grzegorczyk  <mariusz.g@samsung.com>, Ryuan Choi  <ryuan.choi@samsung.com>
129
130         [EFL][WK2] Fix WebKit2-EFL build
131         https://bugs.webkit.org/show_bug.cgi?id=83693
132
133         Reviewed by Carlos Garcia Campos.
134
135         * CMakeLists.txt: Move IDL generator codes to generate port specific *.messages.in.
136         * PlatformEfl.cmake: Add soup related files after r115411 and includes to fix build break.
137         * UIProcess/API/efl/PageClientImpl.cpp: Fix build break with ENABLE_TOUCH_EVENTS.
138         (WebKit):
139         (WebKit::PageClientImpl::doneWithTouchEvent):
140         * UIProcess/API/efl/PageClientImpl.h:
141         (PageClientImpl):
142         * WebProcess/WebCoreSupport/WebChromeClient.cpp: Fix build break with ENABLE_INPUT_TYPE_COLOR and ENABLE_REGISTER_PROTOCOL_HANDLER.
143         (WebKit):
144         (WebKit::WebChromeClient::createColorChooser):
145         * WebProcess/WebCoreSupport/WebChromeClient.h:
146         (WebChromeClient):
147         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Fix build break with ENABLE_WEB_INTENTS
148         (WebKit):
149         (WebKit::WebFrameLoaderClient::dispatchIntent):
150         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
151         (WebCore):
152         (WebFrameLoaderClient):
153         * WebProcess/WebProcess.cpp: Guard PLATFORM_STRATEGIES codes.
154         (WebKit::WebProcess::didGetPlugins):
155         * WebProcess/soup/WebSoupRequestManager.cpp: Try to share with EFL port.
156         (WebKit::WebSoupRequestManager::didHandleURIRequest):
157
158 2012-05-30  Kenneth Rohde Christiansen  <kenneth@webkit.org>
159
160         [Qt] Variable renaming as preparation of further refactoring.
161
162         Rubberstamped by Simon Hausmann.
163
164         Change m_viewport to m_viewportItem and m_content to m_pageItem.
165
166         * UIProcess/qt/QtViewportInteractionEngine.cpp:
167         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
168         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
169         (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
170         (WebKit::QtViewportInteractionEngine::flickableMoveStarted):
171         (WebKit::QtViewportInteractionEngine::flickableMoveEnded):
172         (WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate):
173         (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
174         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
175         (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
176         (WebKit::QtViewportInteractionEngine::focusEditableArea):
177         (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
178         (WebKit::QtViewportInteractionEngine::nearestValidBounds):
179         (WebKit::QtViewportInteractionEngine::reset):
180         (WebKit::QtViewportInteractionEngine::setCSSScale):
181         (WebKit::QtViewportInteractionEngine::currentCSSScale):
182         (WebKit::QtViewportInteractionEngine::scrollAnimationActive):
183         (WebKit::QtViewportInteractionEngine::panGestureActive):
184         (WebKit::QtViewportInteractionEngine::panGestureStarted):
185         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
186         (WebKit::QtViewportInteractionEngine::panGestureEnded):
187         (WebKit::QtViewportInteractionEngine::panGestureCancelled):
188         (WebKit::QtViewportInteractionEngine::cancelScrollAnimation):
189         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
190         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
191         (WebKit::QtViewportInteractionEngine::scaleContent):
192         * UIProcess/qt/QtViewportInteractionEngine.h:
193         (QtViewportInteractionEngine):
194
195 2012-05-30  Zalan Bujtas  <zbujtas@gmail.com>
196
197         [Qt][WK2] Do not use anonymous variables for ViewportUpdateDeferrer.
198         https://bugs.webkit.org/show_bug.cgi?id=87831
199
200         Reviewed by Kenneth Rohde Christiansen.
201
202         * UIProcess/qt/QtViewportInteractionEngine.cpp:
203         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
204         (WebKit::QtViewportInteractionEngine::cancelScrollAnimation):
205         (WebKit::QtViewportInteractionEngine::itemSizeChanged):
206
207 2012-05-30  Carlos Garcia Campos  <cgarcia@igalia.com>
208
209         Unreviewed. Fix WebKit2GTK+ API tests in the bots.
210
211         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
212         (testWebViewCanShowMIMEType): Remove the check for multimedia and
213         plugins MIME types since they depend on the configuration and they
214         are not available in the bots.
215
216 2012-05-29  Jer Noble  <jer.noble@apple.com>
217
218         Noticeable delay taking an HTML5 trailer fullscreen.
219         https://bugs.webkit.org/show_bug.cgi?id=87794
220
221         Reviewed by Darin Adler.
222
223         Work around a not-entirely understood delay when using the results of a CGWindowListCreateImage()
224         call as the contents of a placeholder view.  The backing of the resulting CGImageRef resides on
225         the WindowServer, and drawing that image requires synchronous calls to the WindowServer process.
226         By copying the image data, up front, into our own process, we can avoid those synchronous calls
227         later and avoid the delay-causing drawing behavior.
228
229         * UIProcess/mac/WKFullScreenWindowController.mm:
230         (CGImageDeepCopy): Added a helper function which copies the image data into a new CGImage.
231         (-[WKFullScreenWindowController enterFullScreen:]): Use the above.
232
233 2012-05-29  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
234
235         [GTK] [WK2] Reproducible crash in performDragControllerAction
236         https://bugs.webkit.org/show_bug.cgi?id=87744
237
238         Reviewed by Martin Robinson.
239
240         Fix a crash by using deref() instead of delete to dereference and
241         release the platformData of DragData.
242
243         * WebProcess/WebPage/WebPage.cpp:
244         (WebKit::WebPage::performDragControllerAction):
245
246 2012-05-29  Simon Pena  <spena@igalia.com>
247
248         [GTK] Missing field initializers for WKPageLoaderClient and WKPageUIClient
249         https://bugs.webkit.org/show_bug.cgi?id=87745
250
251         Reviewed by Carlos Garcia Campos.
252
253         Add missing initializers for WKPageLoaderClient and
254         WKPageUIClient, for callbacks WKPagePluginDidFailCallback and
255         WKPageUnavailablePluginButtonClickedCallback, introduced in
256         revision r116716.
257
258         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
259         (attachLoaderClientToView): Initialize WKPagePluginDidFailCallback
260         * UIProcess/API/gtk/WebKitUIClient.cpp:
261         (attachUIClientToView): Initialize callback
262         WKPageUnavailablePluginButtonClickedCallback
263
264 2012-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
265
266         [GTK] Policy decision headers are not included in the main webkit2.h header
267         https://bugs.webkit.org/show_bug.cgi?id=87753
268
269         Reviewed by Martin Robinson.
270
271         * UIProcess/API/gtk/webkit2.h: Include
272         WebKitNavigationPolicyDecision.h and WebKitResponsePolicyDecision.h.
273
274 2012-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
275
276         [GTK] Add webkit_web_view_can_show_mime_type() to WebKit2 GTK+ API
277         https://bugs.webkit.org/show_bug.cgi?id=85998
278
279         Reviewed by Martin Robinson.
280
281         And use it in the default handler of WebKitWebView::decide-policy
282         signal to decide whether to use or ignore a response policy
283         decision depending on whether the mime type of the response can be
284         displayed in the WebView or not.
285
286         * UIProcess/API/gtk/WebKitURIResponse.cpp:
287         (webkitURIResponseGetProperty): Add getter for mime-type property.
288         (webkit_uri_response_class_init): Add mime-type property.
289         (webkit_uri_response_get_mime_type): Return the mime type of the
290         response.
291         * UIProcess/API/gtk/WebKitURIResponse.h:
292         * UIProcess/API/gtk/WebKitWebView.cpp:
293         (webkitWebViewDecidePolicy): In case of response policy decisions,
294         use the URI response to decide what to do: download if the
295         response is an attachment, use if the mime type is supported by
296         the web view or ignore otherwise.
297         (webkit_web_view_can_show_mime_type): Returns whether the given
298         mime type can be displayed in the WebView or not.
299         * UIProcess/API/gtk/WebKitWebView.h:
300         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
301         * UIProcess/API/gtk/tests/TestResources.cpp:
302         (testWebResourceResponse):
303         (testWebResourceMimeType):
304         (serverCallback):
305         (beforeAll):
306         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
307         (testWebViewCanShowMIMEType):
308         (beforeAll):
309
310 2012-05-29  David Barr  <davidbarr@chromium.org>
311
312         Introduce ENABLE_CSS_IMAGE_RESOLUTION compile flag
313         https://bugs.webkit.org/show_bug.cgi?id=87685
314
315         Reviewed by Eric Seidel.
316
317         Add a configuration option for CSS image-resolution support, disabling it by default.
318
319         * Configurations/FeatureDefines.xcconfig:
320
321 2012-05-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
322
323         [Qt] Move tests from DesktopBehavior which can be made to work
324         https://bugs.webkit.org/show_bug.cgi?id=87736
325
326         Rubberstamped by Simon Hausmann.
327
328         Move and modify the following tests to WebView/ and make them
329         use touch events.
330
331         * UIProcess/API/qt/tests/qmltests/WebView/tst_itemSelector.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml.
332         * UIProcess/API/qt/tests/qmltests/WebView/tst_messaging.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml.
333         * UIProcess/API/qt/tests/qmltests/WebView/tst_multiFileUpload.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_multiFileUpload.qml.
334         * UIProcess/API/qt/tests/qmltests/WebView/tst_singleFileUpload.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_singleFileUpload.qml.
335
336 2012-05-29  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
337
338         [Qt] Sync up favicon-implementation with WebView url changes in r118158
339
340         https://bugs.webkit.org/show_bug.cgi?id=87133
341
342         We now base64-encode the page url in the image-provider url, so that any
343         normalization done by QUrl will not mess up the page-url. The logic of
344         creating and parsing the provider-url has been moved into the image
345         provider, to keep it in one place.
346
347         We were also releasing icons (even ones we hadn't retained), which we can't
348         do since we don't know when the icon url is no longer in use.
349
350         Reviewed-by Simon Hausmann.
351
352         * UIProcess/API/qt/qquickwebview.cpp:
353         (QQuickWebViewPrivate::initialize):
354         (QQuickWebViewPrivate::loadProgressDidChange):
355         (QQuickWebViewPrivate::_q_onUrlChanged):
356         (QQuickWebViewPrivate::_q_onIconChangedForPageURL):
357         (QQuickWebViewPrivate::updateIcon):
358         (QQuickWebView::icon):
359         * UIProcess/API/qt/qquickwebview_p.h:
360         * UIProcess/API/qt/qquickwebview_p_p.h:
361         (QQuickWebViewPrivate):
362         * UIProcess/API/qt/qwebiconimageprovider.cpp:
363         (QWebIconImageProvider::iconURLForPageURLInContext):
364         (QWebIconImageProvider::requestImage):
365         * UIProcess/API/qt/qwebiconimageprovider_p.h:
366         (WebKit):
367         * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml:
368         * UIProcess/qt/QtWebIconDatabaseClient.cpp:
369         (WebKit::QtWebIconDatabaseClient::didChangeIconForPageURL):
370         (WebKit::QtWebIconDatabaseClient::iconForPageURL):
371         (WebKit):
372         (WebKit::QtWebIconDatabaseClient::iconImageForPageURL):
373         * UIProcess/qt/QtWebIconDatabaseClient.h:
374         (QtWebIconDatabaseClient):
375
376 2012-05-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
377
378         [Qt][WK2] Fix failing qmltests::FitToView::test_basic()
379         https://bugs.webkit.org/show_bug.cgi?id=87236
380
381         Reviewed by Simon Hausmann.
382
383         The fix is a combination of things. First of all some events
384         were emitted at the wrong times or when nothing had changed.
385
386         We also initialized the view saying it was suspended which is
387         not correct.
388
389         Another bug was that the touch tap, didn't result in marking
390         the view as having user interaction. This was recently fixed
391         in r118493.
392
393         * UIProcess/API/qt/qquickwebpage.cpp:
394         (QQuickWebPage::setContentsScale):
395         * UIProcess/API/qt/qquickwebview.cpp:
396         (QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):
397
398             Make sure pageIsSuspended is initialized to false.
399
400         (QQuickWebViewFlickablePrivate::_q_onInformVisibleContentChange):
401
402             Early bail out if there is no change.
403
404             Inform contentScaleCommitted if the scale changed since last time.
405
406         (QQuickWebViewFlickablePrivate::didChangeContentsSize):
407
408             Make sure to commit the right signals, ie. *Changed and not *Committed.
409
410         * UIProcess/API/qt/qquickwebview_p.h:
411         * UIProcess/API/qt/qwebkittest.cpp:
412         (touchPoint):
413         (QWebKitTest::sendTouchEvent):
414         (QWebKitTest::touchTap):
415         (QWebKitTest::touchDoubleTap):
416
417             Add proper touch emulation for the testing system. Call directly
418             to our WebKit API (avoid Qt event loop) to ensure all events gets
419             delivered.
420
421         * UIProcess/API/qt/qwebkittest_p.h:
422         * UIProcess/qt/QtViewportInteractionEngine.cpp:
423         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
424
425             Assert that a ViewportUpdateDeferrer is always used when calling
426             this method.
427
428         (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
429
430             Remove work around now we have the proper fix in place.
431
432         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
433
434             Do not send the informVisibleContentChange manually, use the
435             ViewportUpdateDeferrer instead.
436
437         (WebKit::QtViewportInteractionEngine::cancelScrollAnimation):
438
439             Add missing ViewportUpdateDeferrer.
440
441         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
442
443             No reason to emit informVisibleContentChange before pinch
444             start, as it is always done on end (due to the ViewportUpdateDeferrer).
445
446         (WebKit::QtViewportInteractionEngine::itemSizeChanged):
447
448             Add missing ViewportUpdateDeferrer.
449
450 2012-05-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
451
452         [Qt] [WK2] Allow user to inject JS scripts when the page loads
453         https://bugs.webkit.org/show_bug.cgi?id=85827
454
455         Reviewed by Simon Hausmann.
456
457         Create a new experimental property to list URLs of JS scripts that should be
458         loaded when a page is loaded. These scripts will run in the normal JS environment
459         of the page.
460
461         The supported URL schemes are file:/// and qrc:///. The scripts are read from the
462         UI process and transfered to the Web process.
463
464         Together with the experimental messaging API this provides a way for the
465         application to manipulate the DOM (by injecting a script that does the
466         manipulation and communicating with it via postMessage). This covers some of the
467         use cases of QWebElement in our WK1 API.
468
469         * UIProcess/API/qt/qquickwebview.cpp:
470         (QQuickWebViewPrivate::didRelaunchProcess):
471         (readUserScript):
472         (QQuickWebViewPrivate::updateUserScripts):
473         (QQuickWebViewExperimental::userScripts):
474         (QQuickWebViewExperimental::setUserScripts):
475         * UIProcess/API/qt/qquickwebview_p.h:
476         * UIProcess/API/qt/qquickwebview_p_p.h:
477         (QQuickWebViewPrivate):
478         * UIProcess/API/qt/tests/qmltests/WebView.pro:
479         * UIProcess/API/qt/tests/qmltests/WebView/tst_userScripts.qml: Added.
480         * UIProcess/API/qt/tests/qmltests/common/append-document-title.js: Added.
481         * UIProcess/API/qt/tests/qmltests/common/big-user-script.js: Added.
482         * UIProcess/API/qt/tests/qmltests/common/change-document-title.js: Added.
483         * UIProcess/API/qt/tests/qmltests/resources.qrc: Added.
484         * UIProcess/WebPageProxy.h:
485         (WebPageProxy):
486         * UIProcess/qt/WebPageProxyQt.cpp:
487         (WebKit::WebPageProxy::setUserScripts):
488         (WebKit):
489         * WebProcess/WebPage/WebPage.h:
490         (WebPage):
491         * WebProcess/WebPage/WebPage.messages.in:
492         * WebProcess/WebPage/qt/WebPageQt.cpp:
493         (WebKit::WebPage::setUserScripts):
494         (WebKit):
495
496 2012-05-29  Sheriff Bot  <webkit.review.bot@gmail.com>
497
498         Unreviewed, rolling out r118752.
499         http://trac.webkit.org/changeset/118752
500         https://bugs.webkit.org/show_bug.cgi?id=87731
501
502         incomplete patch (Requested by cmarcelo on #webkit).
503
504         * UIProcess/API/qt/qquickwebview.cpp:
505         (QQuickWebViewPrivate::didRelaunchProcess):
506         * UIProcess/API/qt/qquickwebview_p.h:
507         * UIProcess/API/qt/qquickwebview_p_p.h:
508         (QQuickWebViewPrivate):
509         * UIProcess/API/qt/tests/qmltests/WebView.pro:
510         * UIProcess/WebPageProxy.h:
511         (WebPageProxy):
512         * UIProcess/qt/WebPageProxyQt.cpp:
513         * WebProcess/WebPage/WebPage.h:
514         (WebPage):
515         * WebProcess/WebPage/WebPage.messages.in:
516         * WebProcess/WebPage/qt/WebPageQt.cpp:
517
518 2012-05-21  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
519
520         [Qt] [WK2] Allow user to inject JS scripts when the page loads
521         https://bugs.webkit.org/show_bug.cgi?id=85827
522
523         Reviewed by Simon Hausmann.
524
525         Create a new experimental property to list URLs of JS scripts that should be
526         loaded when a page is loaded. These scripts will run in the normal JS environment
527         of the page.
528
529         The supported URL schemes are file:/// and qrc:///. The scripts are read from the
530         UI process and transfered to the Web process.
531
532         Together with the experimental messaging API this provides a way for the
533         application to manipulate the DOM (by injecting a script that does the
534         manipulation and communicating with it via postMessage). This covers some of the
535         use cases of QWebElement in our WK1 API.
536
537         * UIProcess/API/qt/qquickwebview.cpp:
538         (QQuickWebViewPrivate::didRelaunchProcess):
539         (readUserScript):
540         (QQuickWebViewPrivate::updateUserScripts):
541         (QQuickWebViewExperimental::userScripts):
542         (QQuickWebViewExperimental::setUserScripts):
543         * UIProcess/API/qt/qquickwebview_p.h:
544         * UIProcess/API/qt/qquickwebview_p_p.h:
545         (QQuickWebViewPrivate):
546         * UIProcess/API/qt/tests/qmltests/WebView.pro:
547         * UIProcess/API/qt/tests/qmltests/WebView/tst_userScripts.qml: Added.
548         * UIProcess/API/qt/tests/qmltests/common/append-document-title.js: Added.
549         * UIProcess/API/qt/tests/qmltests/common/big-user-script.js: Added.
550         * UIProcess/API/qt/tests/qmltests/common/change-document-title.js: Added.
551         * UIProcess/API/qt/tests/qmltests/resources.qrc: Added.
552         * UIProcess/WebPageProxy.h:
553         (WebPageProxy):
554         * UIProcess/qt/WebPageProxyQt.cpp:
555         (WebKit::WebPageProxy::setUserScripts):
556         (WebKit):
557         * WebProcess/WebPage/WebPage.h:
558         (WebPage):
559         * WebProcess/WebPage/WebPage.messages.in:
560         * WebProcess/WebPage/qt/WebPageQt.cpp:
561         (WebKit::WebPage::setUserScripts):
562         (WebKit):
563
564 2012-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
565
566         [GTK] Add return value information to WebKitWebView::load-failed signal documentation
567         https://bugs.webkit.org/show_bug.cgi?id=87704
568
569         Reviewed by Martin Robinson.
570
571         * UIProcess/API/gtk/WebKitWebView.cpp:
572         (webkit_web_view_class_init):
573
574 2012-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
575
576         [GTK] Add WebKitWebInspector.h to the list of WebKit2 GTK public headers
577         https://bugs.webkit.org/show_bug.cgi?id=87703
578
579         Reviewed by Martin Robinson.
580
581         * GNUmakefile.list.am: Add WebKitWebInspector.h to webkit2gtk_h_api.
582
583 2012-05-25  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
584
585         WebKitTestRunner needs to support layoutTestController.setJavaScriptProfilingEnabled
586         https://bugs.webkit.org/show_bug.cgi?id=42328
587
588         Reviewed by Eric Seidel.
589
590         Removed unneeded setJavaScriptProfilingEnabled function from WTR after its
591         move to windows.internals.settings.
592
593         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
594         * WebProcess/InjectedBundle/API/c/WKBundleInspector.h:
595         * WebProcess/WebPage/WebInspector.cpp:
596         (WebKit::WebInspector::setJavaScriptProfilingEnabled):
597         * win/WebKit2.def:
598
599 2012-05-28  No'am Rosenthal  <noam.rosenthal@nokia.com>
600
601         Remove unused argument coders for animation
602         https://bugs.webkit.org/show_bug.cgi?id=87435
603
604         Reviewed by Sam Weinig.
605
606         Left the used argument coders only, behind a proper USE(UI_SIDE_COMPOSITING) flag.
607
608         * Shared/WebCoreArgumentCoders.cpp:
609         (CoreIPC):
610         * Shared/WebCoreArgumentCoders.h:
611
612 2012-05-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
613
614         Move allowRoundingHacks to Internals interface
615         https://bugs.webkit.org/show_bug.cgi?id=87328
616
617         Reviewed by Hajime Morita.
618
619         * win/WebKit2.def: Add setAllowsRoundingHacks() to symbol filter.
620
621 2012-05-26  Geoffrey Garen  <ggaren@apple.com>
622
623         WebKit should be lazy-finalization-safe (esp. the DOM) v2
624         https://bugs.webkit.org/show_bug.cgi?id=87581
625
626         Reviewed by Oliver Hunt.
627
628         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
629         (WebKit::JSNPObject::destroy):
630         (WebKit::JSNPObject::leakNPObject):
631         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
632         (WebKit::NPRuntimeObjectMap::finalize): Use static_cast instead of jsCast because
633         jsCast does Structure-based validation, and our Structure is not guaranteed
634         to be alive when we get finalized.
635
636 2012-05-25  Maciej Stachowiak  <mjs@apple.com>
637
638         REGRESSION (r116720): Subframe PDF scrolls extremely slowly
639         https://bugs.webkit.org/show_bug.cgi?id=87557
640         <rdar://problem/11499408>
641
642         Reviewed by Anders Carlsson.
643         
644         It's not possible to make an automated test for this.
645
646         * WebProcess/Plugins/PDF/BuiltInPDFView.mm:
647         (WebKit::BuiltInPDFView::wantsWheelEvents): Return true instead of false and delete
648         misleading comment. While the built-in PDF view would get added to the set of scrollable
649         areas anyway, there are some code paths that check wantsWheelEvents explicitly, so it seems
650         necessary to reutrn true.
651
652 2012-05-25  Brady Eidson  <beidson@apple.com>
653
654         https://bugs.webkit.org/show_bug.cgi?id=87418
655         WebBackForwardList should separate "has no current index" from the integer value of the current index
656
657         This patch also renames "m_current" to "m_currentIndex" for clarity and symmetry with
658         other variable names that reference "index",
659
660         It also removes the m_closed and m_enabled flags which were never actually used.
661
662         Reviewed by Darin Adler.
663
664         * UIProcess/WebBackForwardList.cpp:
665         (WebKit::WebBackForwardList::WebBackForwardList):
666         (WebKit::WebBackForwardList::addItem):
667         (WebKit::WebBackForwardList::goToItem):
668         (WebKit::WebBackForwardList::currentItem):
669         (WebKit::WebBackForwardList::backItem):
670         (WebKit::WebBackForwardList::forwardItem):
671         (WebKit::WebBackForwardList::itemAtIndex):
672         (WebKit::WebBackForwardList::backListCount):
673         (WebKit::WebBackForwardList::forwardListCount):
674         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
675         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
676         (WebKit::WebBackForwardList::clear):
677
678         * UIProcess/WebBackForwardList.h:
679         (WebKit::WebBackForwardList::currentIndex):
680         (WebBackForwardList):
681
682         * UIProcess/cf/WebBackForwardListCF.cpp:
683         (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
684         (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation):
685
686 2012-05-25  Beth Dakin  <bdakin@apple.com>
687
688         https://bugs.webkit.org/show_bug.cgi?id=87529
689         Background tabs hosted in window server flash before painting 
690         when they first become active
691
692         Reviewed by Anders Carlsson.
693
694         Initialize to LayerHostingModeInWindowServer if that is 
695         available to avoid having to re-make the context and re-set 
696         everything later on.
697         * UIProcess/WebPageProxy.cpp:
698         (WebKit::WebPageProxy::WebPageProxy):
699
700 2012-05-25  Mario Sanchez Prada  <msanchez@igalia.com>
701
702         [GTK][WK2] Implement API for generic permission requests
703         https://bugs.webkit.org/show_bug.cgi?id=84018
704
705         Reviewed by Martin Robinson.
706
707         Added new 'permission-request' signal to WebKitWebView, to be
708         fired when WebKit needs confirmation from the user on whether to
709         allow or deny certain operations, such as sharing the user's
710         location with web site through the Geolocation API.
711
712         New WebKitPermissionRequest interface, providing allow() and
713         deny() operations, to be called over the objects implementing it
714         when emitted along with the new 'permission-request' signal.
715
716         * UIProcess/API/gtk/WebKitPermissionRequest.cpp: Added.
717         (webkit_permission_request_default_init):
718         (webkit_permission_request_allow):
719         (webkit_permission_request_deny):
720         * UIProcess/API/gtk/WebKitPermissionRequest.h: Added.
721         (_WebKitPermissionRequestIface):
722         * GNUmakefile.am: Added new files.
723
724         Added the new signal to WebKitWebView, providing a default handler
725         that will just deny the request when the signal is not handled.
726
727         * UIProcess/API/gtk/WebKitWebView.cpp:
728         (webkitWebViewDecidePermissionRequest): Default handler.
729         (webkit_web_view_class_init): Declare the new signal and connect
730         to the default handler.
731         (webkitWebViewMakePermissionRequest): Helper function to create a
732         make a new permission request and emit the new signal signal.
733         * UIProcess/API/gtk/WebKitWebView.h:
734         (_WebKitWebViewClass):
735         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Declare the creational
736         function webkitWebViewMakePermissionRequest for internal use only.
737
738         Updated documentation files.
739
740         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
741         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
742
743 2012-05-25  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
744
745         [WK2] Fix client interface size for WKPageContextMenuClient.
746         https://bugs.webkit.org/show_bug.cgi?id=87472
747
748         Reviewed by Carlos Garcia Campos.
749
750         Add correct offset for version 1 and 2 of WKPageContextMenuClient.
751         Revision 109750 introduces a new API and increases size of interfaceSizesByVersion
752         but the table is not properly initialized for newly introduced version 2.
753
754         * Shared/APIClientTraits.cpp:
755         (WebKit):
756
757 2012-05-24  Andreas Kling  <kling@webkit.org>
758
759         Mac bots crashing under PluginInfo destructor.
760         <http://webkit.org/b/87414>
761         <rdar://problem/11527172>
762
763         Reviewed by Darin Adler.
764
765         We can't safely pass WTF::String to another thread without a deref() race,
766         so pass the PluginInfo vector by pointer instead of by value.
767
768         * UIProcess/WebContext.cpp:
769         (WebKit::WebContext::sendDidGetPlugins):
770         (WebKit::WebContext::handleGetPlugins):
771         * UIProcess/WebContext.h:
772
773 2012-05-25  Zalan Bujtas  <zbujtas@gmail.com>
774
775         [Qt][WK2] Fix failing qmltests::FitToView::test_basic()
776         https://bugs.webkit.org/show_bug.cgi?id=87236
777
778         Reviewed by Kenneth Rohde Christiansen.
779
780         Rename contentViewportChanged to informVisibleContentChange() to
781         reflect its functionality better. Centralize m_hadUserInteraction flag
782         setting and add assertions on it to ensure that designated
783         functions are called only on user interaction.
784
785         * UIProcess/API/qt/qquickwebview.cpp:
786         (QQuickWebViewFlickablePrivate::onComponentComplete):
787         (QQuickWebViewFlickablePrivate::updateViewportSize):
788         (QQuickWebViewFlickablePrivate::_q_onInformVisibleContentChange):
789         (QQuickWebViewFlickablePrivate::_q_resume):
790         * UIProcess/API/qt/qquickwebview_p.h:
791         * UIProcess/API/qt/qquickwebview_p_p.h:
792         (QQuickWebViewPrivate::_q_onInformVisibleContentChange):
793         (QQuickWebViewFlickablePrivate):
794         * UIProcess/qt/QtViewportInteractionEngine.cpp:
795         (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
796         (WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate):
797         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
798         (WebKit::QtViewportInteractionEngine::touchBegin):
799         (WebKit::QtViewportInteractionEngine::focusEditableArea):
800         (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
801         (WebKit::QtViewportInteractionEngine::panGestureStarted):
802         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
803         * UIProcess/qt/QtViewportInteractionEngine.h:
804         (QtViewportInteractionEngine):
805
806 2012-05-24  Tim Horton  <timothy_horton@apple.com>
807
808         Add feature defines for web-facing parts of CSS Regions and Exclusions
809         https://bugs.webkit.org/show_bug.cgi?id=87442
810         <rdar://problem/10887709>
811
812         Reviewed by Dan Bernstein.
813
814         * Configurations/FeatureDefines.xcconfig:
815
816 2012-05-24  Geoffrey Garen  <ggaren@apple.com>
817
818         WebKit should be lazy-finalization-safe (esp. the DOM)
819         https://bugs.webkit.org/show_bug.cgi?id=87456
820
821         Reviewed by Filip Pizlo.
822
823         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
824         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject): Use the new idioms.
825
826         (WebKit::NPRuntimeObjectMap::invalidate): Check for null while iterating,
827         since that's possible now.
828
829         (WebKit::NPRuntimeObjectMap::finalize): Use the new idioms.
830
831 2012-05-24  Brady Eidson  <beidson@apple.com>
832
833         Fix the build after http://trac.webkit.org/changeset/118441
834         Also fix a glaring bug with the new code, will run it by original reviewer retroactively.
835
836         * UIProcess/cf/WebBackForwardListCF.cpp:
837         (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): Fix up the types of the ? operands
838           to appease super-strict compilers. Don't allow negative indexes (besides the -1 "No index" index).
839
840 2012-05-24  Brady Eidson  <beidson@apple.com>
841
842         <rdar://problem/10090764> and https://bugs.webkit.org/show_bug.cgi?id=87417
843         (Unrepro) Crashes saving session state in WebBackForwardList
844
845         Reviewed by Darin Adler.
846
847         * UIProcess/WebBackForwardList.cpp:
848         (WebKit::WebBackForwardList::addItem): Null check the proposed item and also m_page, to make
849           sure the page hasn't been closed making this list inactive. Be more aggressive about
850           clearing the current entries out if there is no current item index.
851         (WebKit::WebBackForwardList::itemAtIndex): Early null return if there is no current index.
852         (WebKit::WebBackForwardList::clear): Don't put the current item back in the array if there was
853           no current item.
854
855         * UIProcess/cf/WebBackForwardListCF.cpp:
856         (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Don't create a meaningless WebURL.
857           Don't successfully return a dictionary if any of the entries were null. Be more aggressive about
858           validating the current index we plan to return in the dictionary.
859         (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): More aggressively validate the
860           current index read from disk. Replace a meaningless sanity check with our typical ASSERT.
861
862 2012-05-24  Anders Carlsson  <andersca@apple.com>
863
864         Make sure that the layer hosting mode is up-to-date when reconnecting to a new web process
865         https://bugs.webkit.org/show_bug.cgi?id=87421
866         <rdar://problem/11510337>
867
868         Reviewed by Beth Dakin.
869
870         Send over the layer hosting mode as part of the web page creation parameters and create the right
871         layer hosting context based on the mode.
872
873         * Shared/WebPageCreationParameters.cpp:
874         (WebKit::WebPageCreationParameters::encode):
875         (WebKit::WebPageCreationParameters::decode):
876         * Shared/WebPageCreationParameters.h:
877         (WebPageCreationParameters):
878         * UIProcess/WebPageProxy.cpp:
879         (WebKit::WebPageProxy::creationParameters):
880         * WebProcess/WebPage/WebPage.cpp:
881         (WebKit::WebPage::WebPage):
882         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
883         (TiledCoreAnimationDrawingArea):
884         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
885         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
886         (WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
887         (WebKit):
888         (WebKit::TiledCoreAnimationDrawingArea::updateLayerHostingContext):
889
890 2012-05-24  John Mellor  <johnme@chromium.org>
891
892         Font Boosting: Add compile flag and runtime setting
893         https://bugs.webkit.org/show_bug.cgi?id=87394
894
895         Reviewed by Adam Barth.
896
897         Add ENABLE_FONT_BOOSTING.
898
899         * Configurations/FeatureDefines.xcconfig:
900
901 2012-05-24  Yael Aharon  <yael.aharon@nokia.com>
902
903         [Qt] Stop using the flag FIXED_POSITION_CREATES_STACKING_CONTEXT
904         https://bugs.webkit.org/show_bug.cgi?id=87392
905
906         Reviewed by Antonio Gomes.
907
908         Turn on the setting setFixedPositionCreatesStackingContext.
909
910         * WebProcess/WebPage/WebPage.cpp:
911         (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
912
913 2012-05-24  Alexey Proskuryakov  <ap@apple.com>
914
915         [WK2] Let the client give local files universal access on a case by case basis
916         https://bugs.webkit.org/show_bug.cgi?id=87174
917         <rdar://problem/11024330>
918
919         Reviewed by Maciej Stachowiak.
920
921         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
922         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
923         (WebKit::InjectedBundlePageLoaderClient::shouldForceUniversalAccessFromLocalURL):
924         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
925         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
926         (WebKit::WebFrameLoaderClient::shouldForceUniversalAccessFromLocalURL):
927         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
928         * WebProcess/qt/QtBuiltinBundlePage.cpp:
929         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
930         Added glue code to call bundle client.
931
932 2012-05-24  Alexander Færøy  <alexander.faeroy@nokia.com>
933
934         Reorder arguments to compare() in the QML WebView tests
935         https://bugs.webkit.org/show_bug.cgi?id=87374
936
937         Reviewed by Simon Hausmann.
938
939         Based on patch by Kenneth Rohde Christiansen.
940
941         The reordering is necessary to get correct information printed when
942         the tests fails. Without this, the test suite will display the bogus
943         value and not the expected value.
944
945         This patch also removes the delayed windowShown since this is not
946         needed anymore, due to us using the touch events instead of mouse
947         events.
948
949         * UIProcess/API/qt/tests/qmltests/WebView/tst_doubleTapToZoom.qml:
950
951 2012-05-24  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
952
953         [Qt] Tiles not painted after wheel or keyboard scroll.
954         https://bugs.webkit.org/show_bug.cgi?id=87358
955
956         Reviewed by Kenneth Rohde Christiansen.
957
958         After performing a scroll requested from the WebProcess we also need
959         to inform the painting layer of the viewport change.
960
961         * UIProcess/qt/QtViewportInteractionEngine.cpp:
962         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
963
964 2012-05-24  Andras Becsi  <andras.becsi@nokia.com>
965
966         [Qt][WK2] Fix bounce-back animation on pinch->pan
967         https://bugs.webkit.org/show_bug.cgi?id=87266
968
969         Reviewed by Kenneth Rohde Christiansen.
970
971         If ending an out-of-bounds pinch gesture with releasing one finger
972         (transition to a pan gesture) the bounce back animation blinks in
973         the end position immediately first, then animates the content back
974         into bounds.
975
976         QtViewportInteractionEngine::cancelScrollAnimation should return
977         early if there is no active kinetic animation.
978
979         * UIProcess/qt/QtViewportInteractionEngine.cpp:
980         (WebKit::QtViewportInteractionEngine::cancelScrollAnimation):
981
982 2012-05-23  Ojan Vafai  <ojan@chromium.org>
983
984         add back the ability to disable flexbox
985         https://bugs.webkit.org/show_bug.cgi?id=87147
986
987         Reviewed by Tony Chang.
988
989         * Configurations/FeatureDefines.xcconfig:
990
991 2012-05-23  Jer Noble  <jer.noble@apple.com>
992
993         REGRESSION (117623) - Entering/exiting fullscreen HTML5 videos, there is a quick animated fade
994         https://bugs.webkit.org/show_bug.cgi?id=87294
995
996         Reviewed by Darin Adler.
997
998         When setting the sublayers array on the layer hosting view, wrap the call in a CATransaction which disables
999         animations.
1000
1001         * UIProcess/API/mac/WKView.mm:
1002         (-[WKView _updateAcceleratedCompositingMode:WebKit::]):
1003
1004 2012-05-23  Dinu Jacob  <dinu.jacob@nokia.com>
1005
1006         [Qt][Wk2] Assertion failure when selecting an option in select list with size attribute greater than one
1007         https://bugs.webkit.org/show_bug.cgi?id=86974
1008
1009         Reviewed by Simon Hausmann.
1010
1011         Select list with size attribute greater than one will not initially have any
1012         item in selected state (if no option has 'selected' tag), resulting in
1013         m_selectedModelIndex in WebPopupMenuProxyQt to be invalid. Hence, need to check
1014         whether the old index is invalid before accessing the item at that index.
1015
1016         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml: Added new test that
1017           tests selection in a select list with size attribute value of 2.
1018         * UIProcess/API/qt/tests/qmltests/common/selectwithsize.html: Added.
1019         * UIProcess/qt/WebPopupMenuProxyQt.cpp:
1020         (WebKit::PopupMenuItemModel::select): Check whether old index is valid before accessing
1021           the item at that index.
1022
1023 2012-05-23  Jer Noble  <jer.noble@apple.com>
1024
1025         REGRESSION (r116188): After exiting full screen, Safari window is frozen, then inline video speeds through frames as it catches up with audio
1026         https://bugs.webkit.org/show_bug.cgi?id=87206
1027
1028         Reviewed by Darin Adler.
1029
1030         When re-enabling the Safari window's autodisplay flag, also force the window to re-display.
1031         Otherwise, the window will not repaint itself until it is forced to by user interaction.
1032
1033         * UIProcess/mac/WKFullScreenWindowController.mm:
1034         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
1035
1036 2012-05-23  Martin Robinson  <mrobinson@igalia.com>
1037
1038         [GTK] [WebKit2] Add an API to enable and disable composited layer indicators
1039         https://bugs.webkit.org/show_bug.cgi?id=87053
1040
1041         Reviewed by Carlos Garcia Campos.
1042
1043         Add a WebKitSetting that allows the client to enable and disable debug
1044         borders and repaint counters for accelerated content.
1045
1046         * UIProcess/API/gtk/WebKitSettings.cpp:
1047         (webKitSettingsSetProperty): Added.
1048         (webKitSettingsGetProperty): Added.
1049         (webkit_settings_class_init): Add the new property.
1050         (webkit_settings_set_draw_compositing_indicators): Added.
1051         (webkit_settings_get_draw_compositing_indicators): Added.
1052         * UIProcess/API/gtk/WebKitSettings.h:
1053         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add the new API points to the
1054         documentation.
1055         * UIProcess/API/gtk/test/TestWebKitSettings.h: Add a new unit test.
1056
1057 2012-05-23  Michael BrĂĽning  <michael.bruning@nokia.com>
1058
1059         [Qt][WK2] Small refactoring WebPage::confirmComposition.
1060         https://bugs.webkit.org/show_bug.cgi?id=87243
1061
1062         Reviewed by Kenneth Rohde Christiansen.
1063
1064         Change nested if into an early return to reduce complexity.
1065
1066         * WebProcess/WebPage/qt/WebPageQt.cpp:
1067         (WebKit::WebPage::confirmComposition):
1068
1069 2012-05-22  Alexander Færøy  <alexander.faeroy@nokia.com>
1070
1071         [Qt] Missing tests for the evaluateJavaScript API
1072         https://bugs.webkit.org/show_bug.cgi?id=86351
1073
1074         Reviewed by Kenneth Rohde Christiansen.
1075
1076         * UIProcess/API/qt/tests/qmltests/WebView/tst_evaluateJavaScript.qml:
1077         * UIProcess/API/qt/tests/qmltests/common/evaluatejavascript.html: Added.
1078
1079 2012-05-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1080
1081         [Qt] FloatSize Qt Support
1082         https://bugs.webkit.org/show_bug.cgi?id=87237
1083
1084         Reviewed by Andreas Kling.
1085
1086         Basic cleanup possible to new Qt support in FloatSize.
1087
1088         * UIProcess/API/qt/qquickwebpage.cpp:
1089         (QQuickWebPagePrivate::updateSize):
1090         * UIProcess/API/qt/qwebkittest.cpp:
1091         (QWebKitTest::layoutSize):
1092
1093 2012-04-18  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1094
1095         [Qt] Make the web view's url property follow the active url
1096
1097         https://bugs.webkit.org/show_bug.cgi?id=77554
1098
1099         The url property of the webview now reflects the 'active' url of the
1100         page, which maps to either the currently loading url, in the case of
1101         an ongoing load, or the result of a load, even when the load failed.
1102
1103         In practice this means that setting the url though QML, or navigating
1104         to a new url in the page by e.g clicking, will both instantly change
1105         the url-property of the webview to the target url. This differs from
1106         earlier behavior, where we would update the url when the load
1107         committed.
1108
1109         An optional argument is added to loadHtml(), to allow setting
1110         the unreachable url when providing replacement content for failed
1111         loads.
1112
1113         Finally, the location bar in the minibrowser is updated to behave
1114         a bit more like normal browsers in terms of when the url will change
1115         and how active focus is handled.
1116
1117         Reviewed by Simon Hausmann.
1118
1119         * UIProcess/API/qt/qquickwebview.cpp:
1120         (QQuickWebViewPrivate::onComponentComplete):
1121         (QQuickWebView::reload):
1122         (QQuickWebView::url):
1123         (QQuickWebView::setUrl):
1124         (QQuickWebView::loadHtml):
1125         * UIProcess/API/qt/qquickwebview_p.h:
1126         * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
1127         * UIProcess/API/qt/tests/qmltests/WebView.pro:
1128         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
1129         * UIProcess/API/qt/tests/qmltests/common/link.html: Added.
1130         * UIProcess/API/qt/tests/qmltests/common/redirect.html: Added.
1131         * UIProcess/qt/QtWebPageLoadClient.cpp:
1132         (QtWebPageLoadClient::QtWebPageLoadClient):
1133         (QtWebPageLoadClient::didStartProvisionalLoadForFrame):
1134         (QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoadForFrame):
1135         (QtWebPageLoadClient::didCommitLoadForFrame):
1136         (QtWebPageLoadClient::dispatchLoadFailed):
1137         (QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame):
1138         (QtWebPageLoadClient::didFailLoadWithErrorForFrame):
1139         * UIProcess/qt/QtWebPageLoadClient.h:
1140         (QtWebPageLoadClient):
1141
1142 2012-05-23  Simon Hausmann  <simon.hausmann@nokia.com>
1143
1144         [Qt] Race condition in LayerTreeHost/Proxy can cause blank rendering
1145         https://bugs.webkit.org/show_bug.cgi?id=87239
1146
1147         Reviewed by Kenneth Rohde Christiansen.
1148
1149         On the UI process side the WebLayerTreeRenderer/LayerTreeHostProxy pair is
1150         created with m_active = false, which makes it ignore any incoming layer updates.
1151         It remains inactive until the ContentsSGNode is created and setActive(true) is called.
1152
1153         On the web process side the LayerTreeHost is created with m_waitingForUIProcess = false.
1154
1155         Those two variables must be in sync, otherwise a race condition can
1156         happen: The web process sends updates to the ui process before the
1157         ContentsSGNode is created. This can happen for example when re-using an
1158         existing WebProcess to create a QQuickWebView and load a page very fast
1159         from the disk cache. The update arrives on the ui process side, but it
1160         is discarded because setActive(true) hasn't been called yet. As a
1161         result any updates that would for example create and populate the tiles
1162         required for rendering are ignored.
1163
1164         This patch ensures that the variables are initialized with the same values and that calling
1165         setActive(true) will trigger the rendering of the next frame.
1166
1167         * UIProcess/WebLayerTreeRenderer.cpp:
1168         (WebKit::WebLayerTreeRenderer::setActive):
1169         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
1170         (WebKit::LayerTreeHostQt::LayerTreeHostQt):
1171
1172 2012-05-23  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1173
1174         [Qt] Make QtWebError return the failing URL as a QString instead of QUrl
1175
1176         We don't want to use QUrl inside QtWebKit (only in the API layer), due
1177         to how QUrl normalizes the url.
1178
1179         Reviewed by Simon Hausmann.
1180
1181         * UIProcess/qt/QtWebError.cpp:
1182         (WebKit::QtWebError::url):
1183         * UIProcess/qt/QtWebError.h:
1184
1185 2012-05-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1186
1187         [GTK] Add inspector API to WebKit2 GTK+
1188         https://bugs.webkit.org/show_bug.cgi?id=87113
1189
1190         Reviewed by Martin Robinson.
1191
1192         * GNUmakefile.list.am: Add new files to compilation.
1193         * UIProcess/API/C/gtk/WKInspectorClientGtk.cpp: Added.
1194         (WKInspectorSetInspectorClientGtk):
1195         * UIProcess/API/C/gtk/WKInspectorClientGtk.h: Added.
1196         * UIProcess/API/gtk/WebKitPrivate.h:
1197         * UIProcess/API/gtk/WebKitWebInspector.cpp: Added.
1198         (webkitWebInspectorFinalize):
1199         (webkit_web_inspector_init):
1200         (webkit_web_inspector_class_init):
1201         (openWindow): Emit WebKitWebInspector::open-window singal.
1202         (didClose): Emit WebKitWebInspector::closed signal.
1203         (bringToFront): Emit WebKitWebInspector::bring-to-front singal.
1204         (inspectedURLChanged): Set the inspected URI and emit
1205         GObject::notify signal if it changed.
1206         (attach): Emit WebKitWebInspector::attach signal.
1207         (detach): Emit WebKitWebInspector::detach signal.
1208         (didChangeAttachedHeight): Set the attached height and emit
1209         GObject::notify signal if it changed.
1210         (webkitWebInspectorCreate): Ceate a new WebKitWebInspector object
1211         for the given WKInspector. Also initialize and set the inspector
1212         client.
1213         (webkit_web_inspector_get_web_view): Return the web view used to
1214         render the inspector.
1215         (webkit_web_inspector_get_inspected_uri): Return the URI that is
1216         being inspected.
1217         (webkit_web_inspector_is_attached): Whether the inspector view is
1218         currently attached.
1219         (webkit_web_inspector_attach): Request to attach the inspector.
1220         (webkit_web_inspector_detach): Request to detach the inspector.
1221         (webkit_web_inspector_show): Request to show the inspector.
1222         (webkit_web_inspector_close): Request to close the inspector.
1223         (webkit_web_inspector_get_attached_height): Return the height that
1224         the inspector view should have when attached.
1225         * UIProcess/API/gtk/WebKitWebInspector.h: Added.
1226         * UIProcess/API/gtk/WebKitWebInspectorPrivate.h: Added.
1227         * UIProcess/API/gtk/WebKitWebView.cpp:
1228         (webkit_web_view_get_inspector): Return the WebKitWebInspector
1229         associated to the web view.
1230         * UIProcess/API/gtk/WebKitWebView.h:
1231         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
1232         WebKitWebInspector.
1233         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ad new symbols.
1234         * UIProcess/API/gtk/docs/webkit2gtk.types: Add
1235         webkit_web_inspector_get_type.
1236         * UIProcess/API/gtk/tests/GNUmakefile.am: Add new test for the
1237         inspector API.
1238         * UIProcess/API/gtk/tests/TestInspector.cpp: Added.
1239         (testInspectorDefault):
1240         (testInspectorCustom):
1241         (testInspectorWindowDestroyed):
1242         (beforeAll):
1243         (afterAll):
1244         * UIProcess/API/gtk/tests/WebViewTest.cpp:
1245         (WebViewTest::showInWindowAndWaitUntilMapped): Add optional
1246         parameter to create a toplevel or popup window.
1247         (WebViewTest::resizeView): Helper function to set the widget
1248         allocation to a given size.
1249         * UIProcess/API/gtk/tests/WebViewTest.h:
1250         * UIProcess/API/gtk/webkit2.h: Include WebKitWebInspector.h
1251         * UIProcess/WebInspectorProxy.h:
1252         (WebKit::WebInspectorProxy::inspectorView): Return the view used
1253         to render the inspector.
1254         * UIProcess/gtk/WebInspectorClientGtk.cpp: Added.
1255         (WebKit::WebInspectorClientGtk::openWindow):
1256         (WebKit::WebInspectorClientGtk::didClose):
1257         (WebKit::WebInspectorClientGtk::bringToFront):
1258         (WebKit::WebInspectorClientGtk::inspectedURLChanged):
1259         (WebKit::WebInspectorClientGtk::attach):
1260         (WebKit::WebInspectorClientGtk::detach):
1261         (WebKit::WebInspectorClientGtk::didChangeAttachedHeight):
1262         * UIProcess/gtk/WebInspectorClientGtk.h: Added.
1263         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1264         (WebKit::inspectorViewDestroyed): Close the inspector page when
1265         the inspector view is destroyed, instead of when the inspector
1266         window is deleted, because the inspector view can now be inside a
1267         window created by the user.
1268         (WebKit::WebInspectorProxy::initializeInspectorClientGtk):
1269         Initialze the inspector client.
1270         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Add a
1271         weak pointer to the inspector view to make sure it's NULL when
1272         destroyed.
1273         (WebKit::WebInspectorProxy::createInspectorWindow): Call
1274         openWindow on the inspector client, and return early if the
1275         callback was handled.
1276         (WebKit::WebInspectorProxy::platformOpen): Connect to destroy
1277         signal of the inspector view to close the page when the view is
1278         destroyed.
1279         (WebKit::WebInspectorProxy::platformDidClose): Call didClose on
1280         the inspector client.
1281         (WebKit::WebInspectorProxy::platformBringToFront): Call
1282         bringToFront on the inspector client, and return early if the
1283         callback was handled.
1284         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Call
1285         inspectedURLChanged on the inspector client.
1286         (WebKit::WebInspectorProxy::platformAttach): Call attach on the
1287         inspector client and return if the callback was handled.
1288         (WebKit::WebInspectorProxy::platformDetach): Call detach on the
1289         inspector client and return if the callback was handled.
1290         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Call
1291         didChangeAttachedHeight on the inspector client.
1292
1293 2012-05-22  Anders Carlsson  <andersca@apple.com>
1294
1295         Functions dispatched by dispatchAfterEnsuringUpdatedScrollPosition can be called after drawing area has been destroyed
1296         https://bugs.webkit.org/show_bug.cgi?id=87173
1297         <rdar://problem/11474087>
1298
1299         Reviewed by Beth Dakin.
1300
1301         Don't try to call forceRepaint if the drawing area has already been destroyed.
1302
1303         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1304         (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
1305
1306 2012-05-22  Anders Carlsson  <andersca@apple.com>
1307
1308         Crash when a plug-in view outlives its containing WebPage
1309         https://bugs.webkit.org/show_bug.cgi?id=87163
1310         <rdar://problem/10849258>
1311
1312         Reviewed by Dan Bernstein.
1313
1314         In rare cases, when a plug-in is kept alive for some reason it can outlive its WebPage. When that happens,
1315         the PluginView destructor will try to access the (deleted) web page and we'll crash.
1316
1317         Fix this by making the WebPage destructor iterate over all the registered plug-ins and null out the m_webPage pointer.
1318         Don't try to access the WebPage object if it's null.
1319
1320         Also, remove PLATFORM(MAC) ifdefs around the HashSet of known plug-in views as well as the member functions that access the set;
1321         we want this to be cross platform now.
1322
1323         * WebProcess/Plugins/PluginView.cpp:
1324         (WebKit::PluginView::PluginView):
1325         (WebKit::PluginView::~PluginView):
1326         (WebKit::PluginView::webPageDestroyed):
1327         (WebKit):
1328         * WebProcess/Plugins/PluginView.h:
1329         (PluginView):
1330         * WebProcess/WebPage/WebPage.cpp:
1331         (WebKit::WebPage::~WebPage):
1332         (WebKit::WebPage::scalePage):
1333         (WebKit):
1334         * WebProcess/WebPage/WebPage.h:
1335         (WebPage):
1336
1337 == Rolled over to ChangeLog-2012-05-22 ==