And initialized it only in ctors so that in the next change we can use it to
tell whether this pan event may trigger swipe or not without calling
SwipeTracker::CanTriggerSwipe every time.
There's an unintuitive change in a GTest sending a horizontal pan-start event.
With this changeset, all incomming pan-start events on desktop platforms
basically set mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection
to true even if the event is generated in GTests. So the pan start event runs
into the short circuit path for swipe-to-navigation. This is a good thing because
it means the GTest replicates what our browser does properly.
Differential Revision: https://phabricator.services.mozilla.com/D160435
There's a bug (bug 1800022) that wheel event listeners in the browser process
badly interact with overscroll even so we'd avoid the bug here.
Differential Revision: https://phabricator.services.mozilla.com/D161752
Otherwise prefs set in the previous test case will persist. In fact
some of test cases were lacking "browser.swipe.navigation-icon-move-distance".
Differential Revision: https://phabricator.services.mozilla.com/D161751
I don't have time to dig into them right now so disable there for now.
I could repro the flickering on Arch Linux, but I couldn't repro the
incorrectly-transparent popup or the incorrectly-open extension popup...
Differential Revision: https://phabricator.services.mozilla.com/D162240
This restores the previous behavior in a somewhat more principled way.
The extensions code is still broken in multi-monitor cases, but that's a
more complicated fix.
Differential Revision: https://phabricator.services.mozilla.com/D161997
When minimizing a fullscreen window, frame state is kept with
mFullscreenMode = true but mSizeMode = nsSizeMode_Minimized.
Calling EnsureSizeMode(nsSizeMode_Fullscreen) in this state would call
EnsureFullscreenMode(true), but that'd bail out without actually
setting the fullscreen sizemode, causing confusion.
Before the regressing patch that was papered over because
nsSizeMode_Fullscreen was passed explicitly to OnSizeModeChange(), but
the underlying state was already wrong before my patch.
Add some comments and documentation to the fullscreen-relevant members,
since initially I was rather confused about this code.
Differential Revision: https://phabricator.services.mozilla.com/D161982
This patch does **not** make `ContentEventHandler` return consistent rect
for invisible text node, however, it should be okay for now because users
cannot put caret into invisible text node and cannot type text into it.
For avoiding the warning spam of `ContentCacheInChild` in automated tests,
`ContentEventHandler::OnQueryTextRectArray` shouldn't give it up correcting
character rects in invisible text nodes. And as mentioned above, using
similar rects to visible character around there is okay. Therefore, this
patch makes `OnQueryTextRectArray` fills invisible text rects with caret
rect before following visible character if they are followed by visible
characters. Otherwise, i.e., if invisible text rects are the last things
in the range, make it use caret rect after the last visible character.
Note that if the range is completely in invisible nodes, the value will be
computed in the fallback part of the method. It still has issues, but it
does not happen so many times in the automated tests. Therefore, this patch
does not treat the case.
Differential Revision: https://phabricator.services.mozilla.com/D160593
_NETSCAPE_URL hints target application it should store URL link instead of copy the pointed data.
Don't use that for internal URL (mailbox:/// and similar).
Differential Revision: https://phabricator.services.mozilla.com/D161442
There is no Core: Widget - Android now, so we should update bug component of
widget/android. Also, I add GVE for GVE path.
Differential Revision: https://phabricator.services.mozilla.com/D161413
- Use 5 min timeout value to mTempFileTimerID so D&D files from /tmp are removed after a longer period.
- Remove all temporary files from nsDragService destructor.
- Add more logs.
Differential Revision: https://phabricator.services.mozilla.com/D161409
[Int]CoordTyped no longer inherits Units because otherwise
instances of [Int]IntPointTyped may get one Base subobject because
it inherits Units, and others because of BasePoint's Coord members,
which end up increasing the [Int]CoordTyped's objects size (since
according to the ISO C++ standard, different Base subobject are
required to have different addresses).
Differential Revision: https://phabricator.services.mozilla.com/D160713
We can't report monitor/screen shift to layout on Wayland. It causes wrong popup placement as all window/popup coordinates are used relatively to parent on Wayland.
Also we can't get/set position of toplevel windows on Wayland.
Differential Revision: https://phabricator.services.mozilla.com/D160784
On Android when SWGL is enabled, occasionally when switching tabs it
refuses to render the new tab. The user will instead be left with the
contents of the previous tab, or if they have just switched to firefox
they will be left with a black screen.
This occurs when SyncResumeResizeCompositor is called from java code
prior to the gecko compositor having been created. This results in us
delaying the call to UiCompositorController::ResumeAndResize().
Instead, once the compositor eventually gets created we call
UiCompositorController::Resume() (without the resize).
This means that the compositor widget is left with a zero size, and
RenderCompositorLayersSWGL bails early on compositing as a result.
To fix this, we cache the X, Y, width, and height arguments passed to
SyncResumeResizeCompositor. Then to resume the compositor when it
eventually gets created, we call ResumeAndResize() with the cached
values, rather than just calling Resume.
Differential Revision: https://phabricator.services.mozilla.com/D161046
At the moment, launching with `-private-window` (which we now do more easily with `private_browsing.exe` and the associated shortcut) when private browsing is disabled will open a private-looking window that is not private...which is very misleading.
This includes:
* Shortcut creation (which will end up with private shortcuts that open non-private windows)
* Setting AUMID and window/taskbar icons
The latter is handled with a guard in the two places we do it (nsWindow.cpp & BrowserContentHandler.jsm). Ideally, no caller would ever request a private window when private browsing is disabled...but I don't think that's a realistic possibility.
I also noticed we're doing some unnecessary work in the jump list builder when private browsing is disabled, so I fixed that.
I don't think this is reasonably testable in automation (ultimately, AUMID and icons are attributes of the Windows API objects, and we don't have the scaffolding to retrieve those in tests) -- but I'd be happy to be wrong about this.
Differential Revision: https://phabricator.services.mozilla.com/D160568
Otherwise Chromium gets confused when pasting (Signal is an Electron
application).
I need to dig a bit more, but this doesn't prevent the fix for
bug 1774285 from working, and fixes the issue here.
It's probably a Chromium bug that this doesn't work tho since,
as mentioned in comment 0, it works on other Windows applications.
Differential Revision: https://phabricator.services.mozilla.com/D160808
DONTBUILD because this is just whitespace cleanup.
I found the files to fix up here using this command:
grep -r ' ' * 2>/dev/null | grep -v "other-licenses" | grep "idl:"
I replaced the tab characters with however many spaces seemed consistent with
the indentation in the surrounding code (and did some minor space-indentation
cleanup in contextual lines to preserve alignment, in a few cases).
Differential Revision: https://phabricator.services.mozilla.com/D160577
This prevents a11y from getting instantiated shortly after clipboard paste, in
order to prevent hangs with the Windows 11 suggested actions feature.
When combined with the previous patch, the behavior is the following:
* For users with a11y already-enabled:
* No hang (due to clipboard flush).
* Quick actions menu is positioned at selection offset.
* For users with a11y disabled (most):
* No hang (due to no a11y instantiation + clipboard flush).
* Quick actions menu is positioned at pointer (cursor) offset.
Co-Authored-By: Emilio Cobos Álvarez <emilio@crisal.io>
Differential Revision: https://phabricator.services.mozilla.com/D160652
Depends on D160646
WebRender is a mature feature. We should start blocking it on known bad
devices over allowlisting known good devices. This may enable WebRender
in a few more obscure places than we shipped before.
Differential Revision: https://phabricator.services.mozilla.com/D160120
WebRender is a mature feature. We should start blocking it on known bad
devices over allowlisting known good devices. This may enable WebRender
in a few more obscure places than we shipped before.
Differential Revision: https://phabricator.services.mozilla.com/D160120
When compositor session exists, gfxConfig is already initialized.
If first AppWindow is destroyed in nsAppShellService::JustCreateTopWindow() because of error, the first window could be destroyed before calling gfxConfig::Init(). gfxConfig::Init() is called from gfxPlatform::GetPlatform(). gfxPlatform::GetPlatform() is called just before creating compositor by nsBaseWidget::CreateCompositor()
Differential Revision: https://phabricator.services.mozilla.com/D160453
In bug 1772839 we were seeing a large number of crashes due to
encountering a webrender error after exhausting all fallback
configurations. At least in some cases, this was due to the compositor
being resumed with an Android Surface that was already in an abandoned
state, meaning we can never succeed in creating an EGL Surface.
We added a check for this condition, and a workaround, to the
GeckoView java code. However, we are still seeing crash reports
matching this signature. To help determine whether these are also due
to the Surface being abandoned, or due to some other reason, this
patch adds a deliberate crash much earlier in the pipeline if we
detect an abandoned Surface.
Differential Revision: https://phabricator.services.mozilla.com/D160042
Ensure that when we evaluate the downloadable blocklist, we actually
only use the downloadable blocklist. We should not include any platform
specific checks in these prefs, as it causes confusion about why the
prefs were set in the first place. Allowlisted features should be
ignored when evaluating the downloadable blocklist; if we wish to
override the ALLOW/ALLOW_QUALIFIED/DENIED statuses, we should use OK or
BLOCKED_DEVICE or similar instead.
This caused allowlisted features (like WebRender) to be taken away from
users in the most recent nightly.
Differential Revision: https://phabricator.services.mozilla.com/D160408
If we get via OnFrameChanging, we compute a new sizemode, but never store it on
the widget, yet we notify that it has changed.
We were relying on a call to mWindow->SetSizeMode from the widget delegate
which I removed in:
c9785cd100
Instead, call EnsureSizeMode to make sure we already have the right sizemode
when notifying our listener.
Differential Revision: https://phabricator.services.mozilla.com/D160365
If we get via OnFrameChanging, we compute a new sizemode, but never store it on
the widget, yet we notify that it has changed.
We were relying on a call to mWindow->SetSizeMode from the widget delegate
which I removed in:
c9785cd100
Instead, call EnsureSizeMode to make sure we already have the right sizemode
when notifying our listener.
Differential Revision: https://phabricator.services.mozilla.com/D160365
Ensure that when we evaluate the downloadable blocklist, we actually
only use the downloadable blocklist. We should not include any platform
specific checks in these prefs, as it causes confusion about why the
prefs were set in the first place. Allowlisted features should be
ignored when evaluating the downloadable blocklist; if we wish to
override the ALLOW/ALLOW_QUALIFIED/DENIED statuses, we should use OK or
BLOCKED_DEVICE or similar instead.
This caused allowlisted features (like WebRender) to be taken away from
users in the most recent nightly.
Differential Revision: https://phabricator.services.mozilla.com/D160408
We have added a number of new status codes, for the allowlist and new
errors that were not previously handled by the code managing the gfx
blocklist prefs. We also now iterate over the range of features instead
of manually listing the features, as some were missed during previous
additions.
Differential Revision: https://phabricator.services.mozilla.com/D160053
Some users may keep disabling TSF while we were improving TSF implementation due
to avoiding some bugs.
Currently, we don't test IMM handler. Therefore, I think that we should rename
the pref and make users run well-tested path to handle IME.
Depends on D159818
Differential Revision: https://phabricator.services.mozilla.com/D159819
This pref is used for behavior check of how newer TSF behave without IMC.
Therefore, this shouldn't be used by users. However, like bug 1367692 and
bug 1409155, this may be useful when we meet a critical bug of old IME in
newer Windows. Thus we should keep this pref.
Depends on D159817
Differential Revision: https://phabricator.services.mozilla.com/D159818
It's introduced in bug 1367692 to make it possible to test the bug of old
MS-IME on Windows 10 with later versions. Now, the bug and the old versions
have gone. Therefore, we don't need this pref anymore.
Depends on D159816
Differential Revision: https://phabricator.services.mozilla.com/D159817