In Bug 1758103, we stopped default behaviour after detecting a "touchstart" event when selecting the PiP toggle; this was to prevent a click event from running and affecting video playback when PiP initializes. However, in doing so, we failed to restart the doc state properties "isClickingToggle" and "clickedElement", which are responsible for determining where and when we suppress other events. This patch ensures that we actually restart those properties so that we can interact with other elements on the content window after opening PiP.
Differential Revision: https://phabricator.services.mozilla.com/D166244
We want to be precise about types used here. Although in practice unsigned
is the same as uint32_t, it's not guaranteed. We want to definitely use
32-bit multiplication as it can be faster than 64-bit.
Differential Revision: https://phabricator.services.mozilla.com/D164889
Rename the `m` and `p` variables to match those used in the Hacker's Delight
book where the algorithm is presented. There were also some inconsistent
names in comments that this fixes.
Differential Revision: https://phabricator.services.mozilla.com/D164887
I wrote this while debugging / fixing bug 1806438, and this is kind of
related and needed to fix that bug in one of my machines.
This ensures that all size mode changes go through a central place.
In order to do that, we need to pass whether we need to ShowWindow()
since doing it redundantly in some cases like windows-triggered sizemode
changes would break stuff.
Differential Revision: https://phabricator.services.mozilla.com/D166254
Otherwise we might restore nonsensical bounds because Windows moves
minimized windows to crazy positions like -32000, -32000.
Differential Revision: https://phabricator.services.mozilla.com/D165913
This commit trades away consistency in order to reduce code execution.
Hopefully this avoids executing code that is likely not "shutdown
safe" and is inadvertently restarting services or otherwise hanging
when run during shutdown.
The trade off is that the written targeting snapshot may now be
incomplete (which was always the case in the face of runtime errors,
e.g., corrupt a database) or internally inconsistent (which is
probably new). For example, weekly usage could be populated but most
frecent sites could be empty, contradicting the usage. This trade-off
is accepted: occassionally targeting the user "in the
past" (generally, with data captured 30 minutes ago) is preferable to
relatively frequent shutdown crashes.
I would have liked to have checked for `shuttingDown` in
[CachedTargetingGetter](https://searchfox.org/mozilla-central/rev/abf6758ed833c203f84703aa2e3e3d317571b1e9/browser/components/newtab/lib/ASRouterTargeting.jsm#152),
but doing so might throw exceptions (or inject `null` values) where
they were not anticipated, which carries risks that I couldn't easily
mitigate.
If the measure implemented here is ineffective, we'll likely need to
restrict the set of targeting data collected, but I hope to avoid
that, since it reduces the flexibility of the background messaging
targeting significantly, and we may want the agility provided by rich
targeting at an unknown time in the future.
Differential Revision: https://phabricator.services.mozilla.com/D165916
Presently we pull wptserve 3.0 from pypi, however it is incompatible with Python 3.10 that is shipping as default on more and more platforms (e.g. Linux).
This patch instead pulls the in-tree version of wptserve which is more up to date and compatible and should help future proof the Raptor and Talos tests.
Differential Revision: https://phabricator.services.mozilla.com/D166388
Transition the group position calculation - specifically the code in Update -
to Pivot such that we can handle finding siblings across intervening generic
container accessibles, such as SECTIONs. This fixes issues with finding the
values of "pos in set" and "set size" for descendant owned elements in compound
ARIA widgets. This revision also updates and adds tests for this functionality.
Differential Revision: https://phabricator.services.mozilla.com/D165756
Properly test for and handle errors in target-surface creation and
mapping.
(Additionally, perform some drive-by cleanup/modernization.)
Differential Revision: https://phabricator.services.mozilla.com/D166126
Given that the `PdfDataListener.readData` method, in PdfStreamConverter.jsm, always return TypedArray data we update the `NetworkManager` for consistency.
This is done to allow upcoming changes that will enable transferring, rather than copying, more data within the PDF Viewer.
Differential Revision: https://phabricator.services.mozilla.com/D166439
Not strictly related to this bugzilla issue, but while I was updating this test file accordingly
to the other changes needed for this bugzilla issue, I did notice this test was slower to complete
than how much I was expecting.
The underlying issue was that the call to `extension.terminateBackground` was missing the
`disableResetIdleForTest` and so `terminateBackground` was exiting earlier due to pending
api event listeners calls (which was expected given that we were just firing webRequest
events) and the event page was actually being suspended after an additional idle timeout.
Differential Revision: https://phabricator.services.mozilla.com/D166383