Document::initSecurityContext() fails to call securityOrigin().grantLoadLocalResources()
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>
Tue, 4 Dec 2012 15:44:48 +0000 (16:44 +0100)
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>
Tue, 4 Dec 2012 15:45:30 +0000 (16:45 +0100)
commit0d84466d757621046458c609fb3ac640a06cab4f
tree6a9d468e6bcf9271d2b4c51f224bfbb642320e34
parent56a644a26fa61a8e5c0270e15687e7ef25c0312a
Document::initSecurityContext() fails to call securityOrigin().grantLoadLocalResources()
https://bugs.webkit.org/show_bug.cgi?id=68711

Reviewed by Adam Barth.

Source/WebCore:

It currently fails since Document::loader() will return 0 until
Frame::setDocument is called and we are doing this check before it happens.

Delay the check and let the FrameLoader take care of doing grantLoadLocalResources()
on the Document along with other header checks in FrameLoader::didBeginDocument.

* dom/Document.cpp:
(WebCore::Document::initSecurityContext):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didBeginDocument):

Source/WebKit/qt:

* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::testStopScheduledPageRefresh): Unmark the expected failure.

Change-Id: Iec4f0106c42af572a1e4a8d352baa9d1a2fc8a1a
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp