Commit Graph
1647 Commits
Author SHA1 Message Date
Masayuki Nakano 6388e58841 Bug 2044523 - Make nsPIDOMWindow.h stop including nsPIDOMWindowInlines.h r=dom-core-reviewers,geckoview-reviewers,media-playback-reviewers,webrtc-reviewers,win-reviewers,layout-reviewers,manuel,aosmond,smaug,bwc,gstoll,dholbert,farre,m_kato
This patch does not make some header files stop including the inline
header because fixing them require more changes.

Note that `#include "nsComponentManagerUtils.h"` is fixing a bustage
caused by "use of undeclared identifier 'do_CreateInstance'" error.

Differential Revision: https://phabricator.services.mozilla.com/D304432
2026-06-09 03:49:55 +00:00
Gregory Pappas 677fcfdeaa Bug 2024649 - Remove LayoutUtils.sys.mjs r=emilio,geckoview-reviewers,Sasha,jonalmeida
After bug 1691346, LayoutUtils is a thin wrapper over a few methods on
windowUtils. I think we can get rid of it and just call these methods
directly now.

Differential Revision: https://phabricator.services.mozilla.com/D288661
2026-06-06 04:55:03 +00:00
Daniel Holbert b9c26953f1 Bug 2044510: Pass already_AddRefed types by-value instead of by rvalue reference, in dom/base/. r=dom-core-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D304358
2026-06-05 21:06:35 +00:00
Emilio Cobos Álvarez 8a2eeff8e8 Bug 2044694 - Move ScrollOffsetUpdateType out of FrameMetrics to avoid unnecessary FrameMetrics.h includes. r=botond,layout-reviewers,TYLin
Differential Revision: https://phabricator.services.mozilla.com/D304480
2026-06-05 01:19:42 +00:00
Tom Schuster 3fec848f3e Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeMouseScrollEvent. r=masayuki,win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D301261
2026-06-01 14:01:36 +00:00
Tom Schuster 5fb4496e9e Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeKeyEvent. r=masayuki,win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D301246
2026-06-01 14:01:33 +00:00
Tom Schuster 86424bc2fa Bug 2039903 - Change from nsIWidget::Modifiers to nsIWidget::NativeModifiers. r=masayuki,geckoview-reviewers,win-reviewers,m_kato,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D300802
2026-06-01 14:01:29 +00:00
rperta 700e284d7c Revert "Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeMouseScrollEvent. r=masayuki,win-reviewers,gstoll" for causing build bustages
This reverts commit 312ba34b1e.

Revert "Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeKeyEvent. r=masayuki,win-reviewers,gstoll"

This reverts commit cdcd922a07.

Revert "Bug 2039903 - Use proper types for PBrowser::SynthesizeNativeMouseEvent. r=masayuki"

This reverts commit 45369938ed.

Revert "Bug 2039903 - Change from nsIWidget::Modifiers to nsIWidget::NativeModifiers. r=masayuki,geckoview-reviewers,win-reviewers,m_kato,gstoll"

This reverts commit 479f174ddb.
2026-06-01 11:32:48 +00:00
Tom Schuster 312ba34b1e Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeMouseScrollEvent. r=masayuki,win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D301261
2026-06-01 10:06:07 +00:00
Tom Schuster cdcd922a07 Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeKeyEvent. r=masayuki,win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D301246
2026-06-01 10:06:05 +00:00
Tom Schuster 479f174ddb Bug 2039903 - Change from nsIWidget::Modifiers to nsIWidget::NativeModifiers. r=masayuki,geckoview-reviewers,win-reviewers,m_kato,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D300802
2026-06-01 10:06:01 +00:00
Masayuki Nakano db3102dc57 Bug 2039766 - part 3: Get rid of mUseNativeLineBreak of WidgetQueryContentEvent and WidgetSelectionEvent r=dom-core,smaug
Now, `IMEContentObserver` can always use the selection cache.

Differential Revision: https://phabricator.services.mozilla.com/D300910
2026-05-18 00:58:53 +00:00
Leo Tenenbaum 14e83643ee Bug 2037794 - Set properties of original caret instead of drag+drop caret where needed. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D299228
2026-05-15 17:25:28 +00:00
Atila Butkovits 6706fac649 Revert "Bug 2037794 - Set properties of original caret instead of drag+drop caret where needed. r=masayuki" for causing failures at test_drag_drop_caret.html.
This reverts commit 524b0cc22b.
2026-05-15 13:53:29 +00:00
Leo Tenenbaum 524b0cc22b Bug 2037794 - Set properties of original caret instead of drag+drop caret where needed. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D299228
2026-05-15 13:07:26 +00:00
Hiroyuki Ikezoe d1ee4bd4a8 Bug 2031468 - Disable ::-webkit-scrollbar on a per-domain blocklist. r=firefox-style-system-reviewers,layout-reviewers,emilio
Some sites probe `@supports selector(::-webkit-scrollbar)` to detect
WebKit/Blink and then ship styles that depend on real WebKit scrollbar
behavior, which our partial `::-webkit-scrollbar` support does not match.
Give us a way to disable the pseudo-element on specific domains while
keeping it enabled everywhere else; on listed domains the pseudo is
treated as unknown by the selector parser, so `@supports selector(...)`
also reports it as unsupported.

Differential Revision: https://phabricator.services.mozilla.com/D299295
2026-05-11 09:15:25 +00:00
Serban Stanca 06e30b558f Revert "Bug 2031468 - Disable ::-webkit-scrollbar on a per-domain blocklist. r=firefox-style-system-reviewers,layout-reviewers,emilio" for causing Android reftests failures.
This reverts commit 8a0a6843b1.
2026-05-11 07:48:05 +00:00
Hiroyuki Ikezoe 8a0a6843b1 Bug 2031468 - Disable ::-webkit-scrollbar on a per-domain blocklist. r=firefox-style-system-reviewers,layout-reviewers,emilio
Some sites probe `@supports selector(::-webkit-scrollbar)` to detect
WebKit/Blink and then ship styles that depend on real WebKit scrollbar
behavior, which our partial `::-webkit-scrollbar` support does not match.
Give us a way to disable the pseudo-element on specific domains while
keeping it enabled everywhere else; on listed domains the pseudo is
treated as unknown by the selector parser, so `@supports selector(...)`
also reports it as unsupported.

Differential Revision: https://phabricator.services.mozilla.com/D299295
2026-05-11 05:12:18 +00:00
Emilio Cobos Álvarez 5cb0f8ece8 Bug 2035112 - Use right appunits value for conversion to dev pixels. r=gregp,layout-reviewers,dshin
The regressing patch transformed the coordinates to rootPresContext, but
kept using the original app-units-per-dev-px value.

Differential Revision: https://phabricator.services.mozilla.com/D298222
2026-05-04 13:50:50 +00:00
Sylvestre Ledru 741bbdea29 Bug 2036402 - Apply std::move in dom/base where values can be moved instead of copied r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D298095
2026-05-04 11:17:52 +00:00
Emilio Cobos Álvarez 1ddad57128 Bug 2034055 - Clean up NodeList / HTMLCollection set-up. r=smaug
Make them concrete classes rather than interfaces, and make the
inheritance chain simpler.

Differential Revision: https://phabricator.services.mozilla.com/D296484
2026-04-28 07:38:27 +00:00
Silaghi ce61f876cc Revert "Bug 2034055 - Clean up NodeList / HTMLCollection set-up. r=smaug" for causing wpt failures at BaseContentList
This reverts commit cde3e5607b.
2026-04-28 03:43:46 +00:00
Emilio Cobos Álvarez cde3e5607b Bug 2034055 - Clean up NodeList / HTMLCollection set-up. r=smaug
Make them concrete classes rather than interfaces, and make the
inheritance chain simpler.

Differential Revision: https://phabricator.services.mozilla.com/D296484
2026-04-28 00:24:11 +00:00
rperta 3063625a6b Revert "Bug 2024649 - Remove LayoutUtils.sys.mjs r=emilio,geckoview-reviewers,Sasha,jonalmeida" for causing gv failures
This reverts commit ee9679f7e0.
2026-04-21 11:10:10 +00:00
Gregory Pappas ee9679f7e0 Bug 2024649 - Remove LayoutUtils.sys.mjs r=emilio,geckoview-reviewers,Sasha,jonalmeida
After bug 1691346, LayoutUtils is a thin wrapper over a few methods on
windowUtils. I think we can get rid of it and just call these methods
directly now.

Differential Revision: https://phabricator.services.mozilla.com/D288661
2026-04-21 09:46:57 +00:00
Adam Vandolder 76fd69fd59 Bug 700123 - Part 2: Track the fullscreen keyboard lock status and propagate it to the browser chrome. r=dom-core,edgar
Differential Revision: https://phabricator.services.mozilla.com/D291646
2026-04-15 12:41:44 +00:00
Atila Butkovits d2726a670e Revert "Bug 700123 - Part 4: Make exiting PointerLock occur on long-press when fullscreen keyboard lock is enabled. r=dom-core,edgar" for causing failures at test_fullscreen-api.html.
This reverts commit 123362df12.

Revert "Bug 700123 - Part 3: Make exiting fullscreen require long-pressing the Escape key when the fullscreen keyboard lock is enabled. r=edgar,dom-core,masayuki"

This reverts commit a11e06665e.

Revert "Bug 700123 - Part 2: Track the fullscreen keyboard lock status and propagate it to the browser chrome. r=dom-core,edgar"

This reverts commit 1179447423.

Revert "Bug 700123 - Part 1: Add keyboardLock option to requestFullscreen. r=webidl,saschanaz"

This reverts commit ac8fd5e4de.
2026-04-15 06:43:20 +00:00
Adam Vandolder 1179447423 Bug 700123 - Part 2: Track the fullscreen keyboard lock status and propagate it to the browser chrome. r=dom-core,edgar
Differential Revision: https://phabricator.services.mozilla.com/D291646
2026-04-14 22:57:03 +00:00
Jonathan Watt 017557984b Bug 2030928. Rename mozilla::ScrollAxis to mozilla::AxisScrollParams. r=credential-management-reviewers,layout-reviewers,emilio,dimi
The current mozilla::ScrollAxis struct in PresShellForwards.h isn't a simple
axis enum. It carries information about where to scroll to along a specific
axis, and under what conditions that should happen. So 'ScrollAxis' isn't the
best name.

Now we're introducing WebIDL 'ScrollAxis' in bug 1350457:

https://drafts.csswg.org/scroll-animations-1/#scrolltimeline-interface

The extensive use of PresShellForwards.h's ScrollAxis in DOM code makes it
conflict with this new DOM enum. Rather than try to fix this through lots of
explitic namespacing, this patch renames PresShellForwards.h's ScrollAxis.

Differential Revision: https://phabricator.services.mozilla.com/D293485
2026-04-14 12:59:21 +00:00
Brad Werth 3169838537 Bug 2023407: Force WR pixel capture to use specific known directory. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D289396
2026-03-30 20:35:25 +00:00
Sylvestre Ledru 9eb1a31a98 Bug 2023419 - Remove Emacs/Vim modelines from dom/ r=emilio,media-playback-reviewers,webidl,padenot
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287843
2026-03-16 21:02:32 +00:00
Gregory Pappas 880e3432d7 Bug 1691346 - Fix mispositioned <select> popup in transformed non-oop iframe r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D285739
2026-03-16 13:35:51 +00:00
serge-sans-paille 78faa720d8 Bug 2017377 - Remove MOZ_RUNINIT occurrences for trivially constructible types r=necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,layout-reviewers,timhuang,padenot,emilio,valentin,gstoll
And also for types with very simple constructors, following adjustment
to the GlobalVariableInitialization pass.

This basically means flagging some default constructors constexpr, and
the global variable declaration constinit.

Maybe<...> types are left without annotation, marking them constinit is
incompatible with Bug 1992162.

In some cases, this depends on libstdc++ version which lags behind
other standard library we use, then MOZ_GLIBCXX_CONSTINIT is used.

Differential Revision: https://phabricator.services.mozilla.com/D284267
2026-02-26 16:31:02 +00:00
rperta e10f03a3d6 Revert "Bug 2017377 - Remove MOZ_RUNINIT occurrences for trivially constructible types r=necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,layout-reviewers,timhuang,padenot,emilio,valentin,gstoll" for causing build bustages on xpcrtfuzzing.cpp
This reverts commit ea54d84735.

This reverts commit 3e4bbf72af.
2026-02-26 11:35:21 +00:00
serge-sans-paille ea54d84735 Bug 2017377 - Remove MOZ_RUNINIT occurrences for trivially constructible types r=necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,layout-reviewers,timhuang,padenot,emilio,valentin,gstoll
And also for types with very simple constructors, following adjustment
to the GlobalVariableInitialization pass.

This basically means flagging some default constructors constexpr, and
the global variable declaration constinit.

Maybe<...> types are left without annotation, marking them constinit is
incompatible with Bug 1992162.

In some cases, this depends on libstdc++ version which lags behind
other standard library we use, then MOZ_GLIBCXX_CONSTINIT is used.

Differential Revision: https://phabricator.services.mozilla.com/D284267
2026-02-26 08:05:32 +00:00
Cristian Tuns 46ee0caf26 Revert "Bug 2017377 - Remove MOZ_RUNINIT occurrences for trivially constructible types r=necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,layout-reviewers,timhuang,padenot,emilio,valentin,gstoll" for causing multiple build bustages regarding MOZ_RUNINIT
This reverts commit fbb2488509.

Revert "Bug 2017377 - Improve GlobalVariableInitialization pass to catch common patterns r=firefox-static-analysis-reviewers,sylvestre"

This reverts commit c4d03b539a.
2026-02-25 22:03:14 +00:00
serge-sans-paille fbb2488509 Bug 2017377 - Remove MOZ_RUNINIT occurrences for trivially constructible types r=necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,layout-reviewers,timhuang,padenot,emilio,valentin,gstoll
And also for types with very simple constructors, following adjustment
to the GlobalVariableInitialization pass.

This basically means flagging some default constructors constexpr, and
the global variable declaration constinit.

Maybe<...> types are left without annotation, marking them constinit is
incompatible with Bug 1992162.

In some cases, this depends on libstdc++ version which lags behind
other standard library we use, then MOZ_GLIBCXX_CONSTINIT is used.

Differential Revision: https://phabricator.services.mozilla.com/D284267
2026-02-25 21:02:30 +00:00
Emilio Cobos Álvarez 30b7a3d89a Bug 2014922 - Untangle pseudo-element and anon box definitions. r=firefox-style-system-reviewers,xpcom-reviewers,layout-reviewers,dshin,nika
I looked at this because in bug 2014331 I need to mark more pseudos as
element-backed, and it's kinda silly the state our setup is in right
now.

This is all a somewhat historical mess, because in the old style system
pseudo-elements were just atoms, and we had that different types of atom
setup. The source of truth for these right now lives in a header macro
file, which isn't very flexible.

But now we have PseudoStyleType which represents both pseudos and anon
boxes, and is similar to the rust side PseudoElement enum.

Plus, the ::-moz-tree pseudo-elements are defined as anon boxes which
doesn't make any sense, so move them to pseudo-elements while at it.

Unify this in a similar way we treat CSS properties: Source of truth is
in pseudo_elements.toml / anon_boxes.toml, and we generate Rust and C++
as needed. This allows removing the nsStaticAtom subclass thing from
XPCOM, too.

This avoids some nasty duplication around which pseudos are pref-gated
and what not as well.

Differential Revision: https://phabricator.services.mozilla.com/D282076
2026-02-06 07:39:54 +00:00
Norisz Fay 27f4694604 Revert "Bug 2014922 - Untangle pseudo-element and anon box definitions. r=firefox-style-system-reviewers,xpcom-reviewers,layout-reviewers,dshin,nika" for causing bustage @ ElementAnimationData.h
This reverts commit c70290c619.
2026-02-06 05:34:42 +00:00
Emilio Cobos Álvarez c70290c619 Bug 2014922 - Untangle pseudo-element and anon box definitions. r=firefox-style-system-reviewers,xpcom-reviewers,layout-reviewers,dshin,nika
I looked at this because in bug 2014331 I need to mark more pseudos as
element-backed, and it's kinda silly the state our setup is in right
now.

This is all a somewhat historical mess, because in the old style system
pseudo-elements were just atoms, and we had that different types of atom
setup. The source of truth for these right now lives in a header macro
file, which isn't very flexible.

But now we have PseudoStyleType which represents both pseudos and anon
boxes, and is similar to the rust side PseudoElement enum.

Plus, the ::-moz-tree pseudo-elements are defined as anon boxes which
doesn't make any sense, so move them to pseudo-elements while at it.

Unify this in a similar way we treat CSS properties: Source of truth is
in pseudo_elements.toml / anon_boxes.toml, and we generate Rust and C++
as needed. This allows removing the nsStaticAtom subclass thing from
XPCOM, too.

This avoids some nasty duplication around which pseudos are pref-gated
and what not as well.

Differential Revision: https://phabricator.services.mozilla.com/D282076
2026-02-06 03:42:45 +00:00
Tyler Etchart f390e11787 Bug 1996681 - Removed old translations C++ DOM code r=translations-reviewers,saschanaz,nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D281248
2026-01-30 22:00:02 +00:00
Glenn Watson 1cbd89d61c Bug 2011111 - Add support for testing no invalidation / raster in webrender reftests r=ipc-reviewers,gfx-reviewers,nical,nika
In certain scenarios, we want to validate that an updated display list
from WR doesn't cause any rasterization, even if the content of the
display list itself may have different values.

Follow up patches will add more tests for different cases, and then
build on this functionality to change how external_scroll_offset works
in webrender.

This functionality is also useful for confirming that fractional changes
to values are snapped correctly and don't cause unnecessary raster.

Differential Revision: https://phabricator.services.mozilla.com/D279486
2026-01-20 21:29:05 +00:00
Edgar Chen 45b0830967 Bug 1977766 - Move nsIDOMWindowUtils.sendTouchEvent*() to a ChromeOnly WebIDL method; r=hiro,smaug,webidl,devtools-reviewers,layout-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D277283
2026-01-16 07:57:14 +00:00
Jamie Nicol a09cc08c82 Bug 2004135 - Handle error case in CanvasToDataSourceSurface(). r=gfx-reviewers,nical
If SurfaceFromElement::GetSourceSurface() returns null, then return
null. This is correctly handled by the calling function
CompareCanvases.

Differential Revision: https://phabricator.services.mozilla.com/D275213
2025-12-08 13:26:36 +00:00
Botond Ballo d187022266 Bug 1999440 - Use ScrollModeForScrollBehavior() in nsDOMWindowUtils::ScrollToVisual(). r=hiro
This function is used by GeckoView to expose scrollTo() and scrollBy()
functions to the GeckoView's embedder. These have a conceptually
similar purpose to window.scrollTo() and window.scrollBy(), and so
should be governed by scroll-behavior physics rather than scroll snap
physics.

Differential Revision: https://phabricator.services.mozilla.com/D272348
2025-12-04 01:25:25 +00:00
Hiroyuki Ikezoe ab3a78ebe7 Bug 1999559 - Drop OverflowHidden flag from the ScrollFrameIntoView for zoom-to-focused-input. r=botond
With our current default behavior, `interactive-widget=resizes-visual`,
it doesn't make sense we need to scroll to out-of-view elements.

The only one downside of this change is with `resizes-content` if the root
element is `overflow:hidden` and if the focused input element is initially
positioned at the area where the software keyboard will cover up, then
the focused input element will not be scroleld into view. Chrome has the
same resctiction.

Differential Revision: https://phabricator.services.mozilla.com/D272184
2025-12-02 21:31:00 +00:00
Hiroyuki Ikezoe fe16ae088c Bug 1999432 - Focibly use WhereToScroll::Nearest for zoom-to-focused-input for position:fixed elements. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D272119
2025-12-02 10:32:38 +00:00
Emilio Cobos Álvarez ba0e228d4f Bug 2000639 - Remove nsViewManager. r=jwatt
After the previous patches, nsViewManager is basically a backpointer to
its pres shell.

Remove it and just make PresShell manage the root view directly. After
this is done, we can decide what to do about nsView (which is itself
little more than a widget listener that forwards to pres shell right
now).

This technically starts listening to mParentWidget slightly later (on
pres shell creation), but I think that's ok.

Differential Revision: https://phabricator.services.mozilla.com/D272890
2025-11-28 10:48:18 +00:00
Emilio Cobos Álvarez 79e3fdc22a Bug 2000153 - Clean up widget event dispatch. r=masayuki
Make all nsIWidgetListener::HandleEvent go through a single
nsIWidget::DispatchEvent().

Differential Revision: https://phabricator.services.mozilla.com/D272601
2025-11-17 04:28:20 +00:00
Jan Varga f6a33ca75b Bug 1998939 - Add safe CSSPropertyId factory helpers and fix a mis construction; r=emilio,firefox-style-system-reviewers
Introduce new factory helper methods on CSSPropertyId to safely construct a
property identifier from either a non custom property id or a custom property.

The patch also fixes an existing mis construction in
nsDOMWindowUtils::ComputeAnimationDistance, which incorrectly built a
CSSPropertyId for custom properties.

Differential Revision: https://phabricator.services.mozilla.com/D271787
2025-11-16 12:17:50 +00:00