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

Unified Diff: Source/core/frame/LocalFrame.cpp

Issue 248083003: Mouse event handlers use user gesture tokens on top-level LocalFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review comments addressed Created 6 years, 8 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 | « Source/core/frame/LocalFrame.h ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/LocalFrame.cpp
diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp
index 2e322cefd8fdf2ed767b3d9cdf91c9f018960732..d1f6be381ab3a6a7cf2f139d07cec2a35d5e7d4a 100644
--- a/Source/core/frame/LocalFrame.cpp
+++ b/Source/core/frame/LocalFrame.cpp
@@ -616,4 +616,13 @@ void LocalFrame::disconnectOwnerElement()
Frame::disconnectOwnerElement();
}
+LocalFrame* LocalFrame::localFrameRoot()
+{
+ LocalFrame* curFrame = this;
+ while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->isLocalFrame())
+ curFrame = curFrame->tree().parent();
+
+ return curFrame;
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/frame/LocalFrame.h ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698