[Qt][WK2] Pages / resources cannot be loaded from qrc files.
authormichael.bruning@digia.com <michael.bruning@digia.com>
Thu, 24 Jan 2013 12:25:19 +0000 (12:25 +0000)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 13 Feb 2013 14:31:39 +0000 (15:31 +0100)
commitca9b6836810d2f9535810790fcca86ab35834caa
tree42506fd66a9d9190d97bdff4822d639a0f84d9cc
parent11a7cbc1a9dc5df9a63e0102c589a6f05d4a39fa
[Qt][WK2] Pages / resources cannot be loaded from qrc files.

https://bugs.webkit.org/show_bug.cgi?id=107031

Reviewed by Jocelyn Turcotte.

Enables WebKit2 Qt applications to load files from the bundled
qrc files. This is achieved by adding a url scheme handler for
the "qrc" scheme using the application scheme handler and ignoring
all handlers for the qrc application scheme that the application might
set.

* UIProcess/API/qt/qquickurlschemedelegate.cpp:
(QQuickQrcSchemeDelegate::QQuickQrcSchemeDelegate):
(QQuickQrcSchemeDelegate::readResourceAndSend):
* UIProcess/API/qt/qquickurlschemedelegate_p.h:
(QQuickQrcSchemeDelegate):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
(QQuickWebViewExperimental::schemeDelegates_Append):
(QQuickWebViewExperimental::invokeApplicationSchemeHandler):
* UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
* UIProcess/API/qt/tests/qmltests/common/qrctest.html: Added.
* UIProcess/API/qt/tests/qmltests/resources.qrc:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change-Id: Ia1cbd499ff9d1ca03373f6fb542d41f25231d656
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/qquickurlschemedelegate.cpp
Source/WebKit2/UIProcess/API/qt/qquickurlschemedelegate_p.h
Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml
Source/WebKit2/UIProcess/API/qt/tests/qmltests/common/qrctest.html [new file with mode: 0644]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/resources.qrc