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
The preference is only exposed if media.videocontrols.picture-in-picture.enabled is set
to true.
Differential Revision: https://phabricator.services.mozilla.com/D42688
--HG--
extra : moz-landing-system : lando
This makes it easier to see the implementation for a particular platform
without getting confused by code for other platforms.
The SPARC code was deleted because we don't have a JIT backend for it anymore.
Differential Revision: https://phabricator.services.mozilla.com/D42804
--HG--
extra : moz-landing-system : lando
This patch ultimately overrides the user-agent which Fennec users send to Google Search pages, choosing a phone- or tablet-specific UA as appropriate.
It involves adding four new metadata keys to the webcompat addon's metadata for user-agent overrides: blocks, permanentPref, experiment, telemetryKey:
- "blocks" specifies URLs for which any requests should be aborted. This allows us to block the Google service worker for now, as it has caused "content corrupted" issues in the past with other enhanced search addons (see https://github.com/wisniewskit/google-search-fixer/issues/1).
- "permanentPref" specifies an about:config preference, which dictates whether the injection is used. Users may set this to `false` to disable the injection outright, and permanently; `true` or `undefined` values allow the injection to function normally.
- "experiment" specifies the name of the experiment this feature is optionally gated behind. Only a Fennec-specific implementation is provided in this patch. The implementation simply queries Switchboard to determine if the experiment is active.
- "telemetryKey" specifies which telemetry key should be flipped to "true" when this injection runs. We will use this to note whether enhanced search has actually been enabled for this profile. Only a Fennec-specific implementation is given in this patch, which actually just sets a Fennec Shared Preference, which Fennec's core telemetry ping later reads in Java to know what the ping should contain.
Differential Revision: https://phabricator.services.mozilla.com/D41074
--HG--
extra : moz-landing-system : lando
Marking these constructors as `constexpr` encourages the compiler to
constant-initialize most of the `gScalars` array, rather than generating
a giant glob of code to move the (constant) values into the array at
runtime.
Differential Revision: https://phabricator.services.mozilla.com/D42842
--HG--
extra : moz-landing-system : lando
This patch adds a fixed-size array of client usages to OriginInfo and modifies
quota tracking APIs to require the client type to be passed in.
A new method ResetUsageForClient is implemented. The method is used during
client-specific origin clearing. ResetUsageForClient is much faster than calling
GetUsageForOrigin and calling DecreaseUsageForOrigin after that.
LockedUsage now has an assertion that verifies that the total sum of client
usages matches total origin usage. This method should be called instead of
touching mUsage directly.
A new assertion is added to GetQuotaObject which verifies that passed file
belongs to the given persistence type, origin, and client.
Differential Revision: https://phabricator.services.mozilla.com/D38028
--HG--
extra : moz-landing-system : lando
If either the Realm or the request needs full-parsing, we disable lazy
parsing.
Differential Revision: https://phabricator.services.mozilla.com/D42560
--HG--
extra : moz-landing-system : lando
We already have an accessor to make sure this is can only be set but not
cleared so hide the underlying storage.
Differential Revision: https://phabricator.services.mozilla.com/D42559
--HG--
extra : moz-landing-system : lando
The hasIntroductionInfo flag is equivalent to checking for the existance
introducerFilename so use that instead. Also remove unused setter for
the introducer script.
Differential Revision: https://phabricator.services.mozilla.com/D42558
--HG--
extra : moz-landing-system : lando
This prevents a whole host of OOM issues from occurring intermittently
when running these tests.
Differential Revision: https://phabricator.services.mozilla.com/D42654
--HG--
extra : moz-landing-system : lando
If either the Realm or the request needs full-parsing, we disable lazy
parsing.
Differential Revision: https://phabricator.services.mozilla.com/D42560
--HG--
extra : moz-landing-system : lando
We already have an accessor to make sure this is can only be set but not
cleared so hide the underlying storage.
Differential Revision: https://phabricator.services.mozilla.com/D42559
--HG--
extra : moz-landing-system : lando
The hasIntroductionInfo flag is equivalent to checking for the existance
introducerFilename so use that instead. Also remove unused setter for
the introducer script.
Differential Revision: https://phabricator.services.mozilla.com/D42558
--HG--
extra : moz-landing-system : lando
This patch adds a test case to check the visibility of the track counter
is correct in different situations, including zero tracker, one tracker
and multiple trackers.
Also, this patch fixes an issue that the
BrowserTestUtils.waitForAttributes() won't work if the waiting
attributes doesn't have a value or has an empty string as its value.
We check the value of the observing attribute to verify if it is
existing, however an empty string will be treated as a false, so it
won't pass the check if the attribute doesn't have a value. Hence, we
should use hasAttribute() instead of getAttribute() to check the
existence of the attribute.
Differential Revision: https://phabricator.services.mozilla.com/D42718
--HG--
extra : moz-landing-system : lando
By only hiding the tracker counter when the tracker counter is zero and
show the counter always other than that. By doing so, the counter
would be shown properly according the tracker number.
Differential Revision: https://phabricator.services.mozilla.com/D42717
--HG--
extra : moz-landing-system : lando
We use the locale of the application to show the number of the trakcer
counter.
Differential Revision: https://phabricator.services.mozilla.com/D42716
--HG--
extra : moz-landing-system : lando