Make sure to use the same scale the browser-chrome would actually use by
rounding to full app units.
This is especially visible with 1.5 text scale factor.
Differential Revision: https://phabricator.services.mozilla.com/D153099
In order to support record the last user input for touch given APZ won't
synthesize mouse event for touch in parent process. Using pointer event could
support pen input nicely, too.
Differential Revision: https://phabricator.services.mozilla.com/D151282
In order to support record the last user input for touch given APZ won't
synthesize mouse event for touch in parent process. Using pointer event could
support pen input nicely, too.
Differential Revision: https://phabricator.services.mozilla.com/D151282
In order to support record the last user input for touch given APZ won't
synthesize mouse event for touch in parent process. Using pointer event could
support pen input nicely, too.
Differential Revision: https://phabricator.services.mozilla.com/D151282
The `widget->DispatchInputEvent` codepath only works in gecko CI
configurations, so to allow this to be used for e.g. WebDriver
implement a path that doesn't go via the parent process.
Differential Revision: https://phabricator.services.mozilla.com/D150632
The `widget->DispatchInputEvent` codepath only works in gecko CI
configurations, so to allow this to be used for e.g. WebDriver
implement a path that doesn't go via the parent process.
Differential Revision: https://phabricator.services.mozilla.com/D150632
The `widget->DispatchInputEvent` codepath only works in gecko CI
configurations, so to allow this to be used for e.g. WebDriver
implement a path that doesn't go via the parent process.
Differential Revision: https://phabricator.services.mozilla.com/D150632
Implements showing a "Paste" popup at the last mouse position (which
overlapped the browser window) when a certain custom event is received.
Creating and dispatchting that event is implemented in one of the
following parts.
Differential Revision: https://phabricator.services.mozilla.com/D135333
This is reasonably straight-forward and should allow us change the
desired behavior on platforms if / when we need.
Also, this adds tests for the feature by using the relevant float pref
(though we can't easily assert the full-zoom behavior because it changes
the size of the reftest window itself).
Differential Revision: https://phabricator.services.mozilla.com/D148902
This is reasonably straight-forward and should allow us change the
desired behavior on platforms if / when we need.
Also, this adds tests for the feature by using the relevant float pref
(though we can't easily assert the full-zoom behavior because it changes
the size of the reftest window itself).
Differential Revision: https://phabricator.services.mozilla.com/D148902
GTK already did this, sorta, in a platform-specific way: by hacking in the
scale factor in the CSS screen code. I think this is cleaner, since we have a
centralized place to compute the full zoom in nsPresContext, and that code path
is fairly well tested.
This also would make it trivial to make this text zoom rather than full zoom in
the future, if we wanted (which is probably _technically_ more correct, even
though less pretty less pretty).
This also allows us to remove some hacks where we were undoing the text scale
factor on Linux (since stuff like scrollbars already ignore full zoom).
Depends on D148675
Differential Revision: https://phabricator.services.mozilla.com/D148676
Add a dom/base/rust crate called just "dom" where we can share these.
Most of the changes are automatic:
s/mozilla::EventStates/mozilla::dom::ElementState/
s/EventStates/ElementState/
s/NS_EVENT_STATE_/ElementState::/
s/NS_DOCUMENT_STATE_/DocumentState::/
And so on. This requires a new cbindgen version to avoid ugly casts for
large shifts.
Differential Revision: https://phabricator.services.mozilla.com/D148537
It's used by the DevTools to emulate touch events from mouse events in the
responsive design mode. Therefore, we should make it accept IPC messages
even if it's not in the automation mode, but it's in the responsive design mode.
Differential Revision: https://phabricator.services.mozilla.com/D148365
None of the consumer need to mutate styles, and this saves some ugly
const_casting on the next patch.
Doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D147555
The root is always an element node. So, it should take and store the root node
as `dom::Element` rather than `nsIContent`.
Differential Revision: https://phabricator.services.mozilla.com/D147135
Fenix's Picture-In-Picture uses full screen mode. So it isn't same as Firefox
Desktop. When exiting full screen, Fenix's window may not same as before
entering full screen.
When this occurs,
1. When device is portrait orientation, user changes to full screen by content
script.
2. Fenix enters to full screen then orientation is changed to landscape.
3. User changes that device is changed to landscape by hand.
4. Fenix enters PiP mode. Android (Home screen) change to portrait orientation.
Then PiP window keeps landscape orientation.
5. When exiting PiP, full screen will be exited.
6. Device is landscape (by Step 3.), so Fenix window is landscape. But Gecko
restores 1.'s viewport by `nsIDOMWindowUtils.exitFullScreen`. So viewport
becomes portrait orientation size even if window is landscape orientation.
For PiP mode, although nsIDOMWindowUtils.exitFullScreen is used, it doesn't
consider this situation. So I would like to add non-restore option for it.
Differential Revision: https://phabricator.services.mozilla.com/D143992
Currently nsDOMWindowUtils::CompareCanvases assumes that if the data from two different
canvases is the same, then the strides of the snapshots should be the same. However, this
is not the case for DrawTargetWebgl, and this can cause various reftests to fail when
accelerated Canvas2D is enabled. All we actually care about is that the size and data
contents is the same, whereas the stride has no consequence other than that we need to
note it for proper traversal of the data for both snapshots.
Depends on D144381
Differential Revision: https://phabricator.services.mozilla.com/D144382
Orientation lock allows on full screen state only now. Then if exiting full
screen, orientation lock is unlocked without `screen.orientation.unlock` call.
Although we store orientation lock state in browsing context, we don't clear
when exiting full screen. So when current content is re-activated by switching
tab etc, we try to apply orientation lock state from browsing context
unfortunately.
So we should clear this state when exiting full screen even if `unlock` isn't
called.
Differential Revision: https://phabricator.services.mozilla.com/D142938
Otherwise we can return without the widget even seeing the event. This is how other test functions are implemented.
We need this to make the test in bug 1757928 pass.
Differential Revision: https://phabricator.services.mozilla.com/D142943
Chrome code should be able to rely on CSS pixel * devicePixelRatio =
device pixel.
Chrome code that cares about the override should use
BrowsingContext.overrideDPPX. We were exposing the no-override value in
WindowUtils but that's unneeded now.
Differential Revision: https://phabricator.services.mozilla.com/D141323
This API essentially reports whether the refresh driver is actively consuming
CPU. This is intended for use in regression tests for bugs about the refresh
driver needlessly cycling.
Differential Revision: https://phabricator.services.mozilla.com/D139218
This API essentially reports whether the refresh driver is actively consuming
CPU. This is intended for use in regression tests for bugs about the refresh
driver needlessly cycling.
Differential Revision: https://phabricator.services.mozilla.com/D139218
This API essentially reports whether the refresh driver is actively consuming
CPU. This is intended for use in regression tests for bugs about the refresh
driver needlessly cycling.
Differential Revision: https://phabricator.services.mozilla.com/D139218
For all purposes, this is the same as devicePixelRatio. It was meant to
skip the resistFingerprinting check the devicePixelRatio getter does,
but we do that now using CallerType in WebIDL, so if we cared about that
for these tests (which we don't) we could just do
SpecialPowers.wrap(window).devicePixelRatio.
As a follow-up we could move the NoOverride to window for symmetry. But
it's only used by devtools touch simulation so not sure if worth it.
Differential Revision: https://phabricator.services.mozilla.com/D138021