diff options
author | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 22:34:06 +0000 |
---|---|---|
committer | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 22:34:06 +0000 |
commit | f6c2459d185424c66e4ef99eed7dc966039715e0 (patch) | |
tree | 6e2ce58cadb57edeb57c8bfa2127191164fb3222 /chrome/renderer/user_script_idle_scheduler.h | |
parent | a6e82fccc2b73736c7a99e6293c6dfc04c6957ae (diff) | |
download | chromium_src-f6c2459d185424c66e4ef99eed7dc966039715e0.zip chromium_src-f6c2459d185424c66e4ef99eed7dc966039715e0.tar.gz chromium_src-f6c2459d185424c66e4ef99eed7dc966039715e0.tar.bz2 |
Don't re-run content scripts on fragment navigations.
This regression was inadvertently introduced by a fix to make executeScript
run after a fragment navigation (bug 29541). That patch was:
http://codereview.chromium.org/566041
The problem is that on frame navigations (didChangeLocationWithinPage), we end
up creating a new UserScriptIdleScheduler, so this patch keeps track of the
previous has_run state and propagates that to the new UserScriptIdleScheduler.
BUG=35924
TEST=Steps to verify are outlined in bug report
Review URL: http://codereview.chromium.org/646017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39939 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/user_script_idle_scheduler.h')
-rw-r--r-- | chrome/renderer/user_script_idle_scheduler.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/renderer/user_script_idle_scheduler.h b/chrome/renderer/user_script_idle_scheduler.h index d4825a5..25b75eb 100644 --- a/chrome/renderer/user_script_idle_scheduler.h +++ b/chrome/renderer/user_script_idle_scheduler.h @@ -22,22 +22,21 @@ class WebFrame; // // The intent of this mechanism is to prevent user scripts from slowing down // fast pages (run after load), while still allowing them to run relatively -// timelily for pages with lots of slow subresources. +// timely for pages with lots of slow subresources. class UserScriptIdleScheduler { public: UserScriptIdleScheduler(RenderView* view, WebKit::WebFrame* frame); bool has_run() { return has_run_; } + void set_has_run(bool has_run) { has_run_ = has_run; } + // Called when the DOM has been completely constructed. void DidFinishDocumentLoad(); // Called when the document has completed loading. void DidFinishLoad(); - // Called when the document has navigated to a fragment. - void DidChangeLocationWithinPage(); - // Called when the client has gone away and we should no longer run scripts. void Cancel(); |