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
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
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.
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
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
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
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
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.
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
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
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
This reverts commit fbb2488509.
Revert "Bug 2017377 - Improve GlobalVariableInitialization pass to catch common patterns r=firefox-static-analysis-reviewers,sylvestre"
This reverts commit c4d03b539a.
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
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
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
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
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
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
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
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
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