There's no call to AddRefreshObserver(FlushType::Layout), so we don't
need to track layout flushes. The only reason we need
mLayoutFlushObservers is so that reflows triggered from the style flush
get processed. But at that point, we can just flush layout directly.
There's no really good distinction between style flushes and layout
flushes with container queries anyways, so this makes the code simpler
to reason about.
Differential Revision: https://phabricator.services.mozilla.com/D209924
With the pref set to 0 by default, this does not change any existing behavior.
My intention is that a following patch will set it to 2 in Nightly. This will affect
a bunch of reftests, and so test/expectation adjustments will also be needed.
Differential Revision: https://phabricator.services.mozilla.com/D207150
In particular:
* Always handle meta viewport in RDM. This fixes bug 1625999 too by
making touch simulation enabled and disabled consistent.
* Restore the resolution to 1 when toggling RDM. This is just simpler,
and we're not keeping around the visual viewport offsets anyways
so...
* Deal with the change more easily, at the same point we switch
scrollbars etc.
Differential Revision: https://phabricator.services.mozilla.com/D206266
Instead, just directly use the StaticPrefs getter for this pref at the one
usage-site, and remove the now-unnecessary GetCachedIntPref getter and
enum-parameter-type that was previously used to query the value.
This patch doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D199782
Instead, just directly use the StaticPrefs getter for this pref at all the
usage-sites (including the callsite of GetCachedIntPref that queries for this
value via a no-longer-necessary enum value).
This patch doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D199781
While we're at it, remove nsPresContext's caching machinery for this pref,
and just directly use the StaticPrefs getter at the one usage site.
This patch doesn't affect behavior.
Differential Revision: https://phabricator.services.mozilla.com/D199780
Instead, just directly use the StaticPrefs getter for this pref at the one
usage-site, and remove the now-unnecessary GetCachedIntPref getter and
enum-parameter-type that was previously used to query the value.
This patch doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D199782
Instead, just directly use the StaticPrefs getter for this pref at all the
usage-sites (including the callsite of GetCachedIntPref that queries for this
value via a no-longer-necessary enum value).
This patch doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D199781
While we're at it, remove nsPresContext's caching machinery for this pref,
and just directly use the StaticPrefs getter at the one usage site.
This patch doesn't affect behavior.
Differential Revision: https://phabricator.services.mozilla.com/D199780
Instead, just directly use the StaticPrefs getter for this pref at the one
usage-site, and remove the now-unnecessary GetCachedIntPref getter and
enum-parameter-type that was previously used to query the value.
This patch doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D199782
Instead, just directly use the StaticPrefs getter for this pref at all the
usage-sites (including the callsite of GetCachedIntPref that queries for this
value via a no-longer-necessary enum value).
This patch doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D199781
While we're at it, remove nsPresContext's caching machinery for this pref,
and just directly use the StaticPrefs getter at the one usage site.
This patch doesn't affect behavior.
Differential Revision: https://phabricator.services.mozilla.com/D199780
Right now, we reconstruct frames in response to a change in the CSS
`contain` property or `content-visibility`. This patch tries to optimize
this a bit:
1. Updates involving style containment change continue to force a
reconstruction, due to the need to handle counters/quotes.
2. Updates involving paint/layout containment change only force a
reconstruction if it's needed to handle absolutely/fixed
positioned descendants or floats (for this one, see also bug 1874826).
3. Other containment changes will only force a reflow and repaint.
Per the CSS contain spec, layout, style and paint containments are
enabled for `content-visibility: hidden` and `content-visibility: auto`.
As a consequence, changing `content-visibility` between `hidden` and
`auto` values no longer requires reconstruction. Changing between these
values and `visible` may need a reconstruction although authors may
generally avoid that in practice by forcing `style` containment.
Differential Revision: https://phabricator.services.mozilla.com/D197043
These days, after bug 1853323, about:PreferenceStyleSheet is basically
just an empty sheet for most users. For the ones that isn't, it's either
slightly or completely broken (see below).
If we were to implement this today, we'd do it with privileged env()
variables or media queries, and add a bunch of tests for different
combinations, but I don't think it's worth the effort:
* There's no UI for any of these prefs.
* There are no tests for any of these prefs.
* browser.display.focus_ring_or_anything is not great, it's better
replaced by browser.display.show_focus_rings, which actually makes
the :focus-visible pseudo-class work. Otherwise the native controls
may show no rings even though this pref is set.
* for browser.display.focus_ring_style = 0, the color used
(-moz-mac-focusring) is not implemented in any non-macOS platform.
* The ::-moz-focus-inner rules are completely useless nowadays, because
::-moz-focus-inner only works on the windows native theme (which
isn't used on content).
* The focus colors are not color-scheme aware.
So given those, and that if you want the specific current behavior,
these are trivially implementable as a web extension (by using a user
stylesheet), I think we should just remove this code altogether.
Differential Revision: https://phabricator.services.mozilla.com/D190464
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.
I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).
Differential Revision: https://phabricator.services.mozilla.com/D190450
This is weirdly placed in the colors dialog, and adds a global selector
to the UA sheet for no great reason.
This sub-setting doesn't really make a lot of sense. We don't let you
force underlines in any way, so any site CSS will override it (unlike
colors, where you can actually override the site).
Just move this to the UA sheet properly.
Differential Revision: https://phabricator.services.mozilla.com/D188326
In some edge cases, we may start handling user input events that
are not supposed to be handled by the current document.
This patch introduces some delay to handle user input events.
Differential Revision: https://phabricator.services.mozilla.com/D180976
In some edge cases, we may start handling user input events that
are not supposed to be handled by the current document.
This patch introduces some delay to handle user input events.
Differential Revision: https://phabricator.services.mozilla.com/D180976