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

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

Issue 1410093006: Exempt about: URLs from self-reference check for nested frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/LayoutTests/fast/frames/srcdoc/srcdoc-deep-nested-frames.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 323d50475cdcb4b872ed4d2ae4631dc1af0587da..4c5e763458b6cdeb52ee451cd1f3e99d20d665ea 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -754,6 +754,10 @@ EphemeralRange LocalFrame::rangeForPoint(const IntPoint& framePoint)
bool LocalFrame::isURLAllowed(const KURL& url) const
{
+ // srcdoc is always allowed
+ if (equalIgnoringFragmentIdentifier(document()->completeURL(AtomicString("about:srcdoc")), url))
dcheng 2015/10/29 14:47:07 How about using Document::isSrcdocDocument() inste
+ return true;
+
// We allow one level of self-reference because some sites depend on that,
// but we don't allow more than one.
bool foundSelfReference = false;
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/frames/srcdoc/srcdoc-deep-nested-frames.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698