Created attachment 620559
WIP v3: Flag loads as "browsed to" for better control/coverage of 
persisting/resetting search

The goal for this version was to approximate the behavior described in
Bug 565740, Comment 4.

This patch has the various URI loaders that should persist the search
use |nsIWebNavigation::LOAD_FLAGS_BROWSED_TO|.  The flag indicates the
load is organic to the current user activity.

That flag gets transformed in |nsDocShell| to an instance variable
|mBrowsedTo|.  That's checked by callers to
|nsIWebProgressListener::OnLocationChange|, so they can include the
|LOCATION_CHANGE_BROWSED_TO| flag.  In turn, tabbrowser's listener will
persist the search data (engine/value) if it hears that flag.

Load types accounted for:
1. Persists search:
  1. New (blank) tabs
  2. Search bar
  3. Content Link loads (current, tab, tabshifted, window)
  4. Replacing current page with a frame
  5. JS loads (eg, Google Search results when JavaScript is enabled)
  6. Session restore loads
  7. Undo close tab loads

2. Resets search to default:
  1. Chrome (about:) Link loads (eg, new tab page thumbnail click)
  2. External load (eg, from command line when browser is already open)
  3. Chrome loads (other than [1.1] and [1.2]) including location bar and places

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/306017

Title:
  Firefox search box should be tab specific

To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/306017/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to