We no longer use the same code to resize windows and so (bug 1694061),
so keeping screen-relative coordinates is not really needed.
Instead, keep the size of the resized element around and do the math in
frame-relative coordinates, which is better behavior in presence of CSS
transforms.
Differential Revision: https://phabricator.services.mozilla.com/D150058
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
On Wayland popup flipping and such is not Firefox's responsibility.
Once we've decided the final popup position because the compositor told
us, we move the popup to a fixed position, and internally the popup
becomes unanchored.
Using this boolean to make decisions after the initial popuppositioned
event is wrong, so avoid exposing it to JS.
Differential Revision: https://phabricator.services.mozilla.com/D142679
They are just convenience for :root[lwthemetextcolor="light"] (and dark,
respectively), but they generally shouldn't be used for dark mode
theming. In the past it was the only way to do it but now we have
prefers-color-scheme.
While at it, change lwthemetextcolor to be "lwtheme-brighttext" for
consistency with similar code we have for popups etc, and move it to
_setDarkModeAttributes.
While at it, remove layout.css.moz-lwtheme.content.enabled (which is
false always, we unshipped these from content successfully).
Differential Revision: https://phabricator.services.mozilla.com/D141593
We keep the parent alive for wrapping. It's unnecessary to keep alive
the individual element / range / etc. Pass the relevant global /
document.
Differential Revision: https://phabricator.services.mozilla.com/D138357
There's only one caller of it and it's not sound: The runnable captures a
raw frame pointer etc. Instead, just do a dispatch to the main thread
and call OpenMenu there. This simplifies the following patch.
Differential Revision: https://phabricator.services.mozilla.com/D131082
Make the stencil-based off-thread API names follow the convention:
* ...OffThread
* Finish...OffThread
* Cancel...OffThread
This patch stack adds more functions for module/decode, with the above naming
convention.
Differential Revision: https://phabricator.services.mozilla.com/D133042
Make the stencil-based off-thread API names follow the convention:
* ...OffThread
* Finish...OffThread
* Cancel...OffThread
This patch stack adds more functions for module/decode, with the above naming
convention.
Differential Revision: https://phabricator.services.mozilla.com/D133042
Building with --disable-xul has been busted since _at least_ bug
1082579, for more than 7 years (I didn't try to track that down
further). It's time to recognize that the option serves no purpose.
Differential Revision: https://phabricator.services.mozilla.com/D133161
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.
There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.
Differential Revision: https://phabricator.services.mozilla.com/D132289
There's only one caller of it and it's not sound: The runnable captures a
raw frame pointer etc. Instead, just do a dispatch to the main thread
and call OpenMenu there. This simplifies the following patch.
Differential Revision: https://phabricator.services.mozilla.com/D131082
Currently, checking whether an `EventTarget` is `nsINode` (or its concrete
classes) or not requires a QI, but it's expensive and used a lot while we
handle each event. Therefore, it'd be nicer for creating a virtual method,
`EventTarget::IsNode()` and use it for the check.
If trying to convert `EventTarget` to a concrete class, it may require two
virtual method calls. I'm not sure whether it's cheaper than a QI, but at
least, it won't depend on the UUID check order of `QueryInterface()` when
multiple interfaces are implemented.
Differential Revision: https://phabricator.services.mozilla.com/D129781