Document::initSecurityContext() fails to call securityOrigin().grantLoadLocalResources()
authorjocelyn.turcotte@digia.com <jocelyn.turcotte@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Dec 2012 17:01:57 +0000 (17:01 +0000)
committerjocelyn.turcotte@digia.com <jocelyn.turcotte@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Dec 2012 17:01:57 +0000 (17:01 +0000)
commit0d504acb7d4a9ae28f8aba2dacf1a70b4dc76666
treeea72ca0ea020b38edb57f75feee2cc90070d1d6b
parentca09ef539037aa9b43aefb9a74ab3f38eea84b33
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@136404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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