Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Unified Diff: third_party/WebKit/Source/core/frame/Frame.cpp

Issue 2625773002: Reenable framebusting (Closed)
Patch Set: Pass through FrameReplicationState Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b9731fff21bfd2b679f3641b2dc96ffc35b8bb0e..36729ad46393f405d1d0a128f320b3bc3125a1e4 100644
--- a/third_party/WebKit/Source/core/frame/Frame.cpp
+++ b/third_party/WebKit/Source/core/frame/Frame.cpp
@@ -174,8 +174,7 @@ bool Frame::canNavigate(const Frame& targetFrame) {
canNavigateWithoutFramebusting(targetFrame, errorReason);
const bool sandboxed = securityContext()->getSandboxFlags() != SandboxNone;
const bool hasUserGesture =
- isLocalFrame() ? toLocalFrame(this)->document()->hasReceivedUserGesture()
- : false;
+ isLocalFrame() ? toLocalFrame(this)->hasReceivedUserGesture() : false;
// Top navigation in sandbox with or w/o 'allow-top-navigation'.
if (targetFrame != this && sandboxed && targetFrame == tree().top()) {
@@ -400,6 +399,12 @@ void Frame::didChangeVisibilityState() {
childFrames[i]->didChangeVisibilityState();
}
+void Frame::setDocumentHasReceivedUserGesture() {
+ m_hasReceivedUserGesture = true;
+ if (Frame* parent = tree().parent())
+ parent->setDocumentHasReceivedUserGesture();
+}
+
Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner)
: m_treeNode(this),
m_host(host),
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698