diff options
author | creis@google.com <creis@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-22 17:53:25 +0000 |
---|---|---|
committer | creis@google.com <creis@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-22 17:53:25 +0000 |
commit | 2b74c093728f3bf35a0dc6b444bde69074f99f5d (patch) | |
tree | 8878e66d5b532d77a72c78579f744a3f45e12890 /webkit | |
parent | 2461cf0a67fec9bf61c5c80ca64a9a234c0d0e8d (diff) | |
download | chromium_src-2b74c093728f3bf35a0dc6b444bde69074f99f5d.zip chromium_src-2b74c093728f3bf35a0dc6b444bde69074f99f5d.tar.gz chromium_src-2b74c093728f3bf35a0dc6b444bde69074f99f5d.tar.bz2 |
Swaps renderer processes on links with rel=noreferrer and target=_blank.
We now detect these types of navigations in RenderView and allow the browser process to handle them. This allows us to swap process if the navigation is cross-site. Requires exposing suppressOpenerInNewFrame in WebFrame to accurately detect these links.
BUG=24447
TEST=RenderViewHostManagerTest.SwapProcessOnRelNoreferrerWithTargetBlank
Review URL: http://codereview.chromium.org/284015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29783 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/api/public/WebFrame.h | 4 | ||||
-rw-r--r-- | webkit/glue/webframe_impl.cc | 4 | ||||
-rw-r--r-- | webkit/glue/webframe_impl.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/webkit/api/public/WebFrame.h b/webkit/api/public/WebFrame.h index 04c862d..965a510 100644 --- a/webkit/api/public/WebFrame.h +++ b/webkit/api/public/WebFrame.h @@ -303,6 +303,10 @@ namespace WebKit { // Returns true if a user gesture is currently being processed. virtual bool isProcessingUserGesture() const = 0; + // Returns true if this frame is in the process of opening a new frame + // with a suppressed opener. + virtual bool willSuppressOpenerInNewFrame() const = 0; + // Editing ------------------------------------------------------------- diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc index 08b7281..de4f772 100644 --- a/webkit/glue/webframe_impl.cc +++ b/webkit/glue/webframe_impl.cc @@ -880,6 +880,10 @@ bool WebFrameImpl::isProcessingUserGesture() const { return frame()->loader()->isProcessingUserGesture(); } +bool WebFrameImpl::willSuppressOpenerInNewFrame() const { + return frame()->loader()->suppressOpenerInNewFrame(); +} + void WebFrameImpl::replaceSelection(const WebString& wtext) { String text = webkit_glue::WebStringToString(wtext); RefPtr<DocumentFragment> fragment = createFragmentFromText( diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h index 8ec1f9f..d2ee953 100644 --- a/webkit/glue/webframe_impl.h +++ b/webkit/glue/webframe_impl.h @@ -130,6 +130,7 @@ class WebFrameImpl : public WebKit::WebFrame, public RefCounted<WebFrameImpl> { virtual void commitDocumentData(const char* data, size_t length); virtual unsigned unloadListenerCount() const; virtual bool isProcessingUserGesture() const; + virtual bool willSuppressOpenerInNewFrame() const; virtual void replaceSelection(const WebKit::WebString& text); virtual void insertText(const WebKit::WebString& text); virtual void setMarkedText( |