This makes it easier to get parity between legacy and regular flex
without having to either have tons of arbitrary attribute selectors in
the xul sheet, nor adding attribute lookup hacks to the html flexbox
layout.
Also, reimplement the remaining supported flex attribute-values (0 and 1)
purely in terms of CSS rules in xul.css (regardless of whether
emulate-moz-box-with-flex is enabled).
In practice these are pretty uncommon and the style attribute does the
trick in every case I've tried.
Add a debug-only assertion to ensure we preserve behavior for now.
Add a new test with another behavior difference between flexbox
emulation and old xul layout because the old reftest now passes. Use
replaced elements, which in modern flex are treated differently.
Differential Revision: https://phabricator.services.mozilla.com/D154394
dom/ and dom/webidl/ : Default these files back to DOM: Core & HTML
PluginChild.jsm: Apparently this is only still used for GMP things.
browser/base/content/ : The remaining tests are mostly EME related, so I switched it over to that.
widget/tests/ : No plugin files remain, so I removed the rule.
Differential Revision: https://phabricator.services.mozilla.com/D154537
This makes it easier to get parity between legacy and regular flex
without having to either have tons of arbitrary attribute selectors in
the xul sheet, nor adding attribute lookup hacks to the html flexbox
layout.
Also, reimplement the remaining supported flex attribute-values (0 and 1)
purely in terms of CSS rules in xul.css (regardless of whether
emulate-moz-box-with-flex is enabled).
In practice these are pretty uncommon and the style attribute does the
trick in every case I've tried.
Add a debug-only assertion to ensure we preserve behavior for now.
Add a new test with another behavior difference between flexbox
emulation and old xul layout because the old reftest now passes. Use
replaced elements, which in modern flex are treated differently.
Differential Revision: https://phabricator.services.mozilla.com/D154394
We implement SendNativeTouchpadPan/SynthesizeNativeTouchpadPan (like Windows does for this test).
I tried to use the existing functions SendNativeMouseScrollEvent/SynthesizeNativeMouseScrollEvent which are implemented on Linux and which are what we use for mac on this test, but it's already used for other stuff and it would be very clunky to overload it to make it work for this too.
I didn't see any way to "tag" the gdk events with more info, so making the observer notifier work was clunky. Similarly for getting the phase start/update/end work.
Differential Revision: https://phabricator.services.mozilla.com/D154386
Both Chrome and Edge on Windows also move the swipe-to-nav arrow icon, the
distance of move seems to be a fixed value, it doesn't depend on the browser
window size. So we also use a fixed value, 100px here.
Chrome on Mac also moves the icon, but in a slightly different way. The icon is
a semicircle shape, it never leaves the edge of the browser window even if it's
moving during swipe gestures. So we introduce a new preference named
"browser.swipe.navigation-icon-move-distance" to implement platform dependent
swipe-to-nav icon behaviors. As of now the value on platforms other than Windows
is zero so that the icon never moves on the platforms.
Depends on D152951
Differential Revision: https://phabricator.services.mozilla.com/D150433
Both Chrome and Edge on Windows also move the swipe-to-nav arrow icon, the
distance of move seems to be a fixed value, it doesn't depend on the browser
window size. So we also use a fixed value, 100px here.
Chrome on Mac also moves the icon, but in a slightly different way. The icon is
a semicircle shape, it never leaves the edge of the browser window even if it's
moving during swipe gestures. So we introduce a new preference named
"browser.swipe.navigation-icon-move-distance" to implement platform dependent
swipe-to-nav icon behaviors. As of now the value on platforms other than Windows
is zero so that the icon never moves on the platforms.
Differential Revision: https://phabricator.services.mozilla.com/D150433
This simplifies a bit the tabbrowser/tab switcher code, and makes it
work in all windows.
The WPT failures are due to bug 1780212.
Differential Revision: https://phabricator.services.mozilla.com/D151822
I can't seem to reproduce the original problem anymore. It was a little tricky. As such I wasn't able to make a test that reproduces, but this test is where I would have started.
Differential Revision: https://phabricator.services.mozilla.com/D147178
The timeout in requestIdleCallback is a deadline, so we wait until the firrst time we are idle and then call the callback, or if we haven't gone idle before the timeout period then just call the callback. So it functions as a maximum, not a minimum. So if we are already idle it could callback right away.
So wait one frame to make sure any other potential events, input etc is flushed before we move on.
I haven't debugged this in detail but this seems to fix the problem and seems reasonable.
Differential Revision: https://phabricator.services.mozilla.com/D147120
Since bug 1757928 we don't vary the value. If a user were to change this value then the opacity of the swipe to nav ui element would not be in sync with the decision to navigate or not. So remove it so things can't break. The pref widget.swipe.whole-page-pixel-size should be used instead now to control sensitivity.
Differential Revision: https://phabricator.services.mozilla.com/D145828
This member is no longer used on Windows, and having it in the
base class doesn't provide a real abstraction anyway since
the child classes will break if anything about it is changed.
Differential Revision: https://phabricator.services.mozilla.com/D145132
`IMEContentObserver` observes the text node change which contains the current
composition string. Therefore, it can let `TextComposition` know where is
updated by web apps and adjust offset and length in the text node.
Differential Revision: https://phabricator.services.mozilla.com/D141193
Due to breaking `mobile.twitter.com/explore` for Hebrew IME users on Android,
this patch backs out the patches for bug 1753420 except the last patch which
just rename some methods and variables.
Differential Revision: https://phabricator.services.mozilla.com/D143684
Actually, `nsIClipboard.emptyClipboard` on macOS doesn't clear system
clipboard. Since other platforms clear it, so I would like to change to same
behaviour.
Also, since we have base class of `nsIClipboard`, we should Inherit it to share
code.
Differential Revision: https://phabricator.services.mozilla.com/D143312
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
`IMEContentObserver` observes the text node change which contains the current
composition string. Therefore, it can let `TextComposition` know where is
updated by web apps and adjust offset and length in the text node.
Differential Revision: https://phabricator.services.mozilla.com/D141193
I couldn't see any value in running these for private and non-private mode, since all of those differences are up in Javascript land.
Differential Revision: https://phabricator.services.mozilla.com/D139608
I couldn't see any value in running these for private and non-private mode, since all of those differences are up in Javascript land.
Differential Revision: https://phabricator.services.mozilla.com/D139608
pref handling is removed from WinWindowOcclusionTrackerInteractiveTest. Instead, WinWindowOcclusionTracker::EnsureDisplayStatusObserver() and WinWindowOcclusionTracker::EnsureSessionChangeObserver() are added.
Differential Revision: https://phabricator.services.mozilla.com/D133601
Unfortunately, the adding test cannot reproduce the crash, but I have no idea
how to make `mSelection` being `Nothing` until next native event loop. Anyway,
it's worthwhile to add new tests.
This patch just avoids `ContentCacheInParent::GetTextRect` referring
`mSelection` when there is no text rects and `mSelection` is `Nothing`.
Differential Revision: https://phabricator.services.mozilla.com/D138876
Implementation of WindowOcclusionCalculator::Initialize() is borrowed from InitializeVirtualDesktopManagerTask::Run().
And implementation of WindowOcclusionCalculator::IsWindowOnCurrentVirtualDesktop() is borrowed from chromium's WindowOcclusionCalculator::IsWindowOnCurrentVirtualDesktop()
Differential Revision: https://phabricator.services.mozilla.com/D133327
Finally, making `WidgetQueryContentEvent::Succeeded` return `true` when there
is no selection when its message is `eQuerySelectedText`, and making
`ContentEventHandler::OnQuerySelectedText` set the no selection range data even
when the queried selection type is "normal. Then, all things which are
changed by the previous patches start to work.
And this patch adds a simple test for `ContentCache` and update tests of
`nsITextInputProcessor`.
Differential Revision: https://phabricator.services.mozilla.com/D137432
It's intended to indicate whether the selection is collapsed or not, but it can
be referred by other members, there is no reasonable user and the name makes
developers confused.
Differential Revision: https://phabricator.services.mozilla.com/D137422
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
pref handling is removed from WinWindowOcclusionTrackerInteractiveTest. Instead, WinWindowOcclusionTracker::EnsureDisplayStatusObserver() and WinWindowOcclusionTracker::EnsureSessionChangeObserver() are added.
Differential Revision: https://phabricator.services.mozilla.com/D133601