Attempt to fix layout test failures following <https://trac.webkit.org/changeset...
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Jun 2017 02:11:30 +0000 (02:11 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Jun 2017 02:11:30 +0000 (02:11 +0000)
commitf9d24e6922654af9ecf18bfd11dc5859afd13e7b
tree67983a121aee6bf670146f0dbf04708f6cd4bff8
parente83242be28e46275746979f7aaabd1b1be0b759c
Attempt to fix layout test failures following <https://trac.webkit.org/changeset/218028/webkit>
(https://bugs.webkit.org/show_bug.cgi?id=158121)
<rdar://problem/26012994>

For now, if we do not have a frame then consider the document a secure context. One way this can happen
is the page accesses a frame that was removed from the document as demonstrated by the test:
fast/dom/Window/property-access-on-cached-window-after-frame-removed.html. Treating a frameless
document as a secure context also matches Blink's implementation:
<https://chromium.googlesource.com/chromium/src/+/fc202b2b1174f5732f7b9e63a6c46fd01ac2be02/third_party/WebKit/Source/core/dom/Document.cpp#4079>.

* dom/Document.cpp:
(WebCore::Document::isSecureContext):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@218037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp