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

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

Issue 698743002: [WIP] Adding support for <iframe>s to slimming paint. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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
Index: Source/core/frame/Frame.cpp
diff --git a/Source/core/frame/Frame.cpp b/Source/core/frame/Frame.cpp
index cc04f692752cab7a1c1c01af6fb82ed9b16099d9..e0ae2e401941a29683456d9188d4dd1e6cd61902 100644
--- a/Source/core/frame/Frame.cpp
+++ b/Source/core/frame/Frame.cpp
@@ -132,6 +132,14 @@ bool Frame::isLocalRoot() const
return tree().parent()->isRemoteFrame();
}
+LocalFrame* Frame::localRoot() const
+{
+ Frame* frame = const_cast<Frame*>(this);
+ while (frame && !frame->isLocalRoot())
+ frame = frame->tree().parent();
+ return toLocalFrame(frame);
+}
+
HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const
{
return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : 0;

Powered by Google App Engine
This is Rietveld 408576698