Include the scaling factor in the SizeConstraints struct so that widgets can
correctly constrain their width and height when the widget's scaling factor
differs from the nsPresContext.
Differential Revision: https://phabricator.services.mozilla.com/D109265
We have a warning assertion that wants all contextmenu events to have button 2,
or be marked as a ctrl-click or triggered by the contextmenu keyboard key.
Fixing this avoids a warning in debug builds but is otherwise inconsequential.
Depends on D109825
Differential Revision: https://phabricator.services.mozilla.com/D109826
See the comments as for this might be unexpected. The tests could be
fixed but seems like footgunny, so for now this seems better.
For future reference, the line causing the events getting dispatched to
the wrong document is the IsPrimaryFramePaintSuppressed call in
PuppetWidget::GetCurrentWidgetListener(), which causes
widget->DispatchEvent from nsContentUtils::SendMouseEvent to dispatch
the event to the wrong page.
Differential Revision: https://phabricator.services.mozilla.com/D109807
Actually the page in this case starts getting styled _after_ the load
event, sometimes, but when that happens that also causes a white flash
in other browsers.
Differential Revision: https://phabricator.services.mozilla.com/D109392
We've added block-end padding for block frame in bug 1527949. However,
<textarea> has `overflow-clip-box: content-box` in its inline-axis (See
forms.css), and the existing logic in
nsHTMLScrollFrame::ReflowScrolledFrame(), which inflates the scrolled
frame's overflow areas with its padding, doesn't use the overflow areas
returned in aMetrics. That effectively ignores the efforts in
bug 1527949. Hence this patch.
Differential Revision: https://phabricator.services.mozilla.com/D109464
The widget for popup window on Mac is nsCocoaWindow which doesn't have
any APZC instances so that nsIWidget::AsyncPanZoomEnabled() always returned
false, we need to delegate the call to the nsChildView.
To be honest, I am quite unsure whether other functions using APZC also need
to be delegated or not, but I haven't noticed any issues now, so we will
fix one by one if there are any other issues.
Unfortunately the mochitest for this issue doesn't work both on Linux and
Windows, but it's presumably an issue in our testing machinery relevant with
nsIDOMWindowUtils.sendNativeMouseScrollEvent, it will not be a problem in the
wild because scrolling by real mouse wheel works fine there.
Differential Revision: https://phabricator.services.mozilla.com/D109572
Clicking at the top left previously worked, but doesn't work with browser.proton.enabled.
1. Support a { where: "center" } argument to synthClick in events.js.
2. Use that in the test.
Differential Revision: https://phabricator.services.mozilla.com/D109689
Root WebRenderBridgeParent's ClearResources() call is expected to destroy RenderCompositor. It is necessary to avoid conflict between RenderCompositors and to avoid use after free.
Differential Revision: https://phabricator.services.mozilla.com/D109693
Change ::Create(...LayoutDeviceIntRect...) to scale to desktop coordinates using the parent window scaling factor.
Change ::Create(...DesktopIntRect...) to treat the |aRect| argument as offsets when a child widget is being created per nsIWidget documentation.
Remove unnecessary logic from ::BackingScaleFactorChanged().
Differential Revision: https://phabricator.services.mozilla.com/D106351
Given the result span problem described in bug 1699211 and bug 1699607,
currently there's no way for quick suggest to accurately specify the last index
as its suggested index.
Differential Revision: https://phabricator.services.mozilla.com/D109571
If we parse offthread, then the shape of the template object will be allocated in a separate zone with a different initialShapes set. `CodeGenerator::visitRegExp` will [create a new regexp using the shape of the template object](https://searchfox.org/mozilla-central/rev/4e87b5392eafe1f1d49017e76f7317b06ec0b1d8/js/src/jit/CodeGenerator.cpp#1794-1795). To remain consistent and avoid failed shape guards / bailout loops, we should do the same in `CloneRegExpObject`.
I played around with `offThreadCompileScript` and friends for a while trying to replicate the problem in the shell, but I couldn't get a testcase to work. This fixes the browser issue, though.
Differential Revision: https://phabricator.services.mozilla.com/D109414
The IPDL source added in this stack changes the unified protocol chunking and
triggers problems caused by the missing include.
Differential Revision: https://phabricator.services.mozilla.com/D109024
This migrates WebNavigation.jsm to use messages from PExtensionsParent
generated by the native WebNavigationContent class, and removes the now-unused
WebNavigationContent.js frame script.
Differential Revision: https://phabricator.services.mozilla.com/D103217
This ports the last remaining piece of WebNavigationContent.js, the
DOMContentLoaded event listener, to C++ and adds IPC messages to notify the
parent process of the events. Linkage between the parent IPDL endpoints and
the parent WebNavigation.jsm listeners is added in a subsequent patch.
Differential Revision: https://phabricator.services.mozilla.com/D103216
This ports the WebProgressListener logic from WebNavigationContent.js to the
C++ implementation, and adds IPC messages to send them to the parent process.
Linkage between the parent IPDL endpoints and the listeners in
WebNavigation.jsm is added in a subsequent patch.
Differential Revision: https://phabricator.services.mozilla.com/D103215
This is a skeleton class which will be instantiated at startup in each
process, and eventually track the same events that the deprecated
WebNavigationContent.js frame script currently tracks.
Actual implementation is added in follow-up patches.
Differential Revision: https://phabricator.services.mozilla.com/D103213
This is the start of an actor which will be automatically instantiated in the
parent and each content process which can be used to route most process-level
IPC traffic needed by the extensions framework. It should allow the extensions
framework to keep its IPC glue close to the code that uses it, and simplify
matters for child-side code which needs to run in both parent and content
processes.
Differential Revision: https://phabricator.services.mozilla.com/D103212
There currently isn't a typesafe way to get a property with a given interface
from a property bag from C++. This patch adds one, following the pattern of
similar helpers, like `do_GetInterface`.
Differential Revision: https://phabricator.services.mozilla.com/D103210
The extension framework needs to set specific flags on navigations triggered
by meta refresh headers. Adding this to the load type of all navigations
triggered by meta refreshes allows it to do this without tracking docshells on
which refreshes are attempted so that it can make inferences.
Differential Revision: https://phabricator.services.mozilla.com/D108726
The naming scheme references the hashchange event. This is required by the
extensions framework to call the appropriate navigation listeners when only
the reference fragment is updated by a navigation.
Differential Revision: https://phabricator.services.mozilla.com/D108725
To identify regressions and existing exceptions in Sentry, we tag them
with their mach release (the current base revision).
To ensure that Sentry knows the correct order of revisions, we need to
tell it about each one that lands in mozilla-central.
Differential Revision: https://phabricator.services.mozilla.com/D109681
Since D108508 the X11/EGL backend creates a shared GL context via
`CreateGLContextEGL()` which chains up to `CreateForCompositorWidget()`
with a `nullptr` widget. With the OGL compositor we relied on the
widget giving us a valid color depth, while now we'd fall back to
`gfxVars::ScreenDepth()`.
On X11 color depth is defined as:
> depth means the number of bits in a pixel that are actually used
> to determine the pixel color
i.e. we on a usual system we would get 24bit.
As we require an alpha channel when using WR, the result would be
disappointing. Thus hardcode 32bit color depth for X11/EGL when
creating contexts without widget for now.
In order to keep X11 and Wayland code close together, do the same
on Wayland, even if `gfxVars::ScreenDepth()` returns valid values
there.
Differential Revision: https://phabricator.services.mozilla.com/D109737