diff options
author | Grace Kloba <klobag@google.com> | 2009-07-09 12:50:10 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-07-09 12:50:10 -0700 |
commit | bd00cd22a36eddaf9548f830de8ad6ccca05c118 (patch) | |
tree | 14fdd65a9c9d4fc37bddc1abcc686163e6df7196 /WebKit/android | |
parent | f0577b7564b5d53951ff312441188ff44b1ed4e1 (diff) | |
parent | cb86952d254446a800421b5804f886f8d87cd875 (diff) | |
download | external_webkit-bd00cd22a36eddaf9548f830de8ad6ccca05c118.zip external_webkit-bd00cd22a36eddaf9548f830de8ad6ccca05c118.tar.gz external_webkit-bd00cd22a36eddaf9548f830de8ad6ccca05c118.tar.bz2 |
am cb86952d: Fix #1896846. Move reset the meta data from canHandleRequest to transitionToCommittedForNewPage as canHandleRequest may not trigger to go to a new page. For example, if a link is to open in a new window, even canHandleRequest returns true, the current pag
Merge commit 'cb86952d254446a800421b5804f886f8d87cd875'
* commit 'cb86952d254446a800421b5804f886f8d87cd875':
Fix #1896846. Move reset the meta data from canHandleRequest to transitionToCommittedForNewPage as canHandleRequest may not trigger to go to a new page. For example, if a link is to open in a new window, even canHandleRequest returns true, the current page doesn't switch to a new page. So we should not reset the meta data.
Diffstat (limited to 'WebKit/android')
-rw-r--r-- | WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp index 2bc8619..24d027a 100644 --- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp +++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp @@ -653,15 +653,7 @@ bool FrameLoaderClientAndroid::canHandleRequest(const ResourceRequest& request) m_frame->tree() && m_frame->tree()->parent()) return true; - if (m_webFrame->canHandleRequest(request)) { -#ifdef ANDROID_META_SUPPORT - // reset metadata settings for the top frame as they are not preserved cross page - if (!m_frame->tree()->parent() && m_frame->settings()) - m_frame->settings()->resetMetadataSettings(); -#endif - return true; - } - return false; + return m_webFrame->canHandleRequest(request); } bool FrameLoaderClientAndroid::canShowMIMEType(const String& mimeType) const { @@ -782,6 +774,13 @@ void FrameLoaderClientAndroid::transitionToCommittedFromCachedFrame(WebCore::Cac void FrameLoaderClientAndroid::transitionToCommittedForNewPage() { ASSERT(m_frame); + +#ifdef ANDROID_META_SUPPORT + // reset metadata settings for the main frame as they are not preserved cross page + if (m_frame == m_frame->page()->mainFrame() && m_frame->settings()) + m_frame->settings()->resetMetadataSettings(); +#endif + if (m_frame->settings() && !m_frame->settings()->usesPageCache()) { m_webFrame->transitionToCommitted(m_frame); return; |