Index: third_party/WebKit/Source/core/frame/Frame.cpp |
diff --git a/third_party/WebKit/Source/core/frame/Frame.cpp b/third_party/WebKit/Source/core/frame/Frame.cpp |
index ab7a50184a2baa5636cdd71ad122233d114f4d20..1b6b9e7afbcfe0496541a2af988aa6ebe38f0c1e 100644 |
--- a/third_party/WebKit/Source/core/frame/Frame.cpp |
+++ b/third_party/WebKit/Source/core/frame/Frame.cpp |
@@ -288,6 +288,14 @@ Settings* Frame::settings() const |
return nullptr; |
} |
+bool Frame::isCrossOrigin() const |
+{ |
+ // Check to see if the frame can script into the top level document. |
+ const SecurityOrigin* securityOrigin = securityContext()->getSecurityOrigin(); |
+ Frame* top = tree().top(); |
+ return top && !securityOrigin->canAccess(top->securityContext()->getSecurityOrigin()); |
+} |
+ |
Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner) |
: m_treeNode(this) |
, m_host(host) |