Title: [101879] trunk/Source/WebKit/chromium
- Revision
- 101879
- Author
- [email protected]
- Date
- 2011-12-02 16:53:47 -0800 (Fri, 02 Dec 2011)
Log Message
[chromium] add setOpener method to WebFrame
https://bugs.webkit.org/show_bug.cgi?id=73379
Patch by Karl Koscher <[email protected]> on 2011-12-02
Reviewed by Darin Fisher.
* public/WebFrame.h:
(WebKit::WebFrame::clearOpener): now an inline call to setOpener(0)
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::setOpener): sets window.opener
* src/WebFrameImpl.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (101878 => 101879)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-12-03 00:41:34 UTC (rev 101878)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-12-03 00:53:47 UTC (rev 101879)
@@ -1,3 +1,16 @@
+2011-12-02 Karl Koscher <[email protected]>
+
+ [chromium] add setOpener method to WebFrame
+ https://bugs.webkit.org/show_bug.cgi?id=73379
+
+ Reviewed by Darin Fisher.
+
+ * public/WebFrame.h:
+ (WebKit::WebFrame::clearOpener): now an inline call to setOpener(0)
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::setOpener): sets window.opener
+ * src/WebFrameImpl.h:
+
2011-12-02 Kent Tamura <[email protected]>
Unreviewed, rolling out r101337.
Modified: trunk/Source/WebKit/chromium/public/WebFrame.h (101878 => 101879)
--- trunk/Source/WebKit/chromium/public/WebFrame.h 2011-12-03 00:41:34 UTC (rev 101878)
+++ trunk/Source/WebKit/chromium/public/WebFrame.h 2011-12-03 00:53:47 UTC (rev 101879)
@@ -188,9 +188,12 @@
// Returns the frame that opened this frame or 0 if there is none.
virtual WebFrame* opener() const = 0;
+ // Sets the frame that opened this one or 0 if there is none.
+ virtual void setOpener(const WebFrame*) = 0;
+
// Reset the frame that opened this frame to 0.
// This is executed between layout tests runs
- virtual void clearOpener() = 0;
+ void clearOpener() { setOpener(0); }
// Returns the parent frame or 0 if this is a top-most frame.
virtual WebFrame* parent() const = 0;
Modified: trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp (101878 => 101879)
--- trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2011-12-03 00:41:34 UTC (rev 101878)
+++ trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2011-12-03 00:53:47 UTC (rev 101879)
@@ -671,11 +671,6 @@
return viewImpl();
}
-void WebFrameImpl::clearOpener()
-{
- m_frame->loader()->setOpener(0);
-}
-
WebFrame* WebFrameImpl::opener() const
{
Frame* opener = 0;
@@ -684,6 +679,12 @@
return fromFrame(opener);
}
+void WebFrameImpl::setOpener(const WebFrame* frame)
+{
+ m_frame->loader()->setOpener(frame ?
+ static_cast<const WebFrameImpl*>(frame)->m_frame : 0);
+}
+
WebFrame* WebFrameImpl::parent() const
{
Frame* parent = 0;
Modified: trunk/Source/WebKit/chromium/src/WebFrameImpl.h (101878 => 101879)
--- trunk/Source/WebKit/chromium/src/WebFrameImpl.h 2011-12-03 00:41:34 UTC (rev 101878)
+++ trunk/Source/WebKit/chromium/src/WebFrameImpl.h 2011-12-03 00:53:47 UTC (rev 101879)
@@ -83,7 +83,7 @@
virtual bool hasVerticalScrollbar() const;
virtual WebView* view() const;
virtual WebFrame* opener() const;
- virtual void clearOpener();
+ virtual void setOpener(const WebFrame*);
virtual WebFrame* parent() const;
virtual WebFrame* top() const;
virtual WebFrame* firstChild() const;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes