summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-29 23:28:22 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-29 23:28:22 +0000
commit12b2adaafe3f962f756ee565475f47574dcc3026 (patch)
tree64274c028bfa00313f9bbd4dbeadf549dcac002a /chrome/browser/tab_contents
parenteeeb4b429da8fffc6e33c3c566c285f594d41e3f (diff)
downloadchromium_src-12b2adaafe3f962f756ee565475f47574dcc3026.zip
chromium_src-12b2adaafe3f962f756ee565475f47574dcc3026.tar.gz
chromium_src-12b2adaafe3f962f756ee565475f47574dcc3026.tar.bz2
Initialize DOMUI handlers if the DOM itself is re-used
Back/forward causes a page navigation, triggering a new DOMUI to be created. Since the page is the same, however, WebKit doesn't actually do a navigation, and the DOM remains intact, so the onload handler doesn't fire and cause the newly-created DOMUI to be initialized. This change notifies the DOMUI object when it has been bound to a RenderView that may have an existing DOM on the HTML/JS side, so that it can tell the page to re-trigger initialization if necessary. BUG=60768 TEST=Open DOMUI prefs, go to another pref section, press the Back button, then try to change the search engines. Review URL: http://codereview.chromium.org/5120005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_manager.cc b/chrome/browser/tab_contents/render_view_host_manager.cc
index 664b7f5..c9e6373 100644
--- a/chrome/browser/tab_contents/render_view_host_manager.cc
+++ b/chrome/browser/tab_contents/render_view_host_manager.cc
@@ -495,6 +495,8 @@ void RenderViewHostManager::CommitPending() {
// Next commit the DOM UI, if any.
dom_ui_.swap(pending_dom_ui_);
+ if (dom_ui_.get() && pending_dom_ui_.get() && !pending_render_view_host_)
+ dom_ui_->DidBecomeActiveForReusedRenderView();
pending_dom_ui_.reset();
// It's possible for the pending_render_view_host_ to be NULL when we aren't