summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage/WebFrame.cpp')
-rw-r--r--Source/WebKit2/WebProcess/WebPage/WebFrame.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp b/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
index b32543eee..43f443829 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
@@ -357,6 +357,14 @@ String WebFrame::innerText() const
return m_coreFrame->document()->documentElement()->innerText();
}
+WebFrame* WebFrame::parentFrame() const
+{
+ if (!m_coreFrame || !m_coreFrame->ownerElement() || !m_coreFrame->ownerElement()->document())
+ return 0;
+
+ return static_cast<WebFrameLoaderClient*>(m_coreFrame->ownerElement()->document()->frame()->loader()->client())->webFrame();
+}
+
PassRefPtr<ImmutableArray> WebFrame::childFrames()
{
if (!m_coreFrame)