зеркало из https://github.com/mozilla/gecko-dev.git
292a6bb2ce
We need to start engagement event recording when the view opens due to `openViewOnFocus`. We already do for mouse clicks since we call `engagementEvent.start` from `_on_mousedown`. But we don't for the Ctrl/Command-L key shortcut. The shortcut command calls `openLocation` in browser.js, which calls `gURLBar.startQuery` but not `engagementEvent.start`. Every time we call `engagementEvent.start`, we do it before calling `input.startQuery`. The one exception is in `input._on_drop` because there we just handle the dropped value directly instead of starting a new query with it. The inverse is also mostly true, i.e., every time we call `input.startQuery`, we also call `engagementEvent.start`. The three exceptions are: in UITour (where it looks like we should be calling `urlbar.search` instead), in `UrlbarInput` after picking a keyword offer result, and in `openLocation` in browser.js (mentioned above). So really the only valid place is after picking a keyword entry. So, it makes sense to move `engagementEvent.start()` into `input.startQuery` so that callers don't have to call it. I added an `event` param to `startQuery`, since `engagementEvent.start` needs one. I considered removing that need. It's possible, but then we would need a way to avoid calling `engagementEvent.start` in the keyword offer case, so `startQuery` would need something like a `suppressEngagementEvent` param. `event` basically functions as that, so I left it. Another thing to point out about this patch is that I chose to record a "typed" value when the pageproxystate is invalid and the view opens due to `openViewOnFocus`. The view does not show the user's top sites in that case, so "topsites" seems wrong. Differential Revision: https://phabricator.services.mozilla.com/D42749 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
about | ||
aboutconfig | ||
aboutlogins | ||
attribution | ||
build | ||
contextualidentity | ||
controlcenter/content | ||
customizableui | ||
dirprovider | ||
downloads | ||
enterprisepolicies | ||
extensions | ||
installerprefs | ||
library | ||
migration | ||
newtab | ||
originattributes | ||
payments | ||
places | ||
preferences | ||
privatebrowsing | ||
protections | ||
protocolhandler | ||
resistfingerprinting | ||
safebrowsing/content/test | ||
search | ||
sessionstore | ||
shell | ||
syncedtabs | ||
tests | ||
touchbar | ||
translation | ||
uitour | ||
urlbar | ||
.eslintrc.js | ||
BrowserComponents.manifest | ||
BrowserContentHandler.jsm | ||
BrowserGlue.jsm | ||
components.conf | ||
distribution.js | ||
moz.build | ||
nsIBrowserHandler.idl |