Commit Graph

1668 Commits

Author SHA1 Message Date
Daniel Holbert
af69b59aae Bug 1896711 part 3: Use MakeRefPtr/MakeAndAddRef to reduce boilerplate, in layout/base. r=TYLin
Also remove some unnecessary null-checks for objects that we're allocating
infallibly.

Differential Revision: https://phabricator.services.mozilla.com/D210389
2024-05-15 07:29:20 +00:00
Emilio Cobos Álvarez
0a1d2b49ff Bug 1895870 - Simplify refresh driver observer set-up. r=smaug
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
2024-05-14 08:12:03 +00:00
Jonathan Kew
10169b1937 Bug 1890773 - Create a pref to control how letter-spacing is inserted around characters. r=layout-reviewers,emilio
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
2024-04-11 18:41:37 +00:00
Emilio Cobos Álvarez
dadf0fbdef Bug 1888242 - Simplify viewport handling in RDM. r=bradwerth,devtools-reviewers,ochameau
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
2024-04-02 15:21:04 +00:00
Peter Van der Beken
9e9199880e Bug 1640839 - Stop generating a sentinel value at the end of WebIDL enums. r=mccr8,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201344
2024-03-02 07:50:25 +00:00
Natalia Csoregi
10b9ceb789 Backed out 13 changesets (bug 1640839) for causing bustage on Element.cpp CLOSED TREE
Backed out changeset 179ceb82c9e5 (bug 1640839)
Backed out changeset 73f498a821f0 (bug 1640839)
Backed out changeset dc2d3d0e0365 (bug 1640839)
Backed out changeset ddc989ac0509 (bug 1640839)
Backed out changeset e595bb3feea8 (bug 1640839)
Backed out changeset c85aca04e27f (bug 1640839)
Backed out changeset 98e8e3a4047a (bug 1640839)
Backed out changeset 59ef180517db (bug 1640839)
Backed out changeset af2f5e293662 (bug 1640839)
Backed out changeset 89aa6d9dc598 (bug 1640839)
Backed out changeset 67b722a722f9 (bug 1640839)
Backed out changeset 24a9665c6ced (bug 1640839)
Backed out changeset d93f199385e9 (bug 1640839)
2024-03-01 18:23:08 +02:00
Peter Van der Beken
e0fa109cb0 Bug 1640839 - Stop generating a sentinel value at the end of WebIDL enums. r=mccr8,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201344
2024-03-01 14:31:15 +00:00
Emilio Cobos Álvarez
8b123421cc Bug 1877672 - Simplify some uses of FunctionRef that now can use lambdas. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D200158
2024-02-02 19:21:20 +00:00
Daniel Holbert
ce082c11a7 Bug 1876811: Remove nsPresContext's cache for about:config pref "layout.scrollbar.side". r=TYLin
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
2024-01-28 05:57:50 +00:00
Daniel Holbert
f23466965d Bug 1876811: Remove nsPresContext's cache for about:config pref bidi.direction. r=TYLin,emilio
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
2024-01-28 05:57:49 +00:00
Daniel Holbert
d4fd37085d Bug 1876811: Change about:config pref 'dom.send_after_paint_to_content' to a static pref instead of defining it in all.js. r=TYLin
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
2024-01-28 05:57:49 +00:00
Stanca Serban
659562d00c Backed out 3 changesets (bug 1876811) for causing bp-nu bustages in nsGfxScrollFrame.cpp.
Backed out changeset 1e79d9e65ec0 (bug 1876811)
Backed out changeset 126b8c56970e (bug 1876811)
Backed out changeset 5e1c10a5832c (bug 1876811)
2024-01-27 09:18:03 +02:00
Daniel Holbert
a5c393ac96 Bug 1876811: Remove nsPresContext's cache for about:config pref "layout.scrollbar.side". r=TYLin
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
2024-01-27 06:02:57 +00:00
Daniel Holbert
17b4c78a21 Bug 1876811: Remove nsPresContext's cache for about:config pref bidi.direction. r=TYLin,emilio
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
2024-01-27 06:02:57 +00:00
Daniel Holbert
2d3a4ab8f2 Bug 1876811: Change about:config pref 'dom.send_after_paint_to_content' to a static pref instead of defining it in all.js. r=TYLin
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
2024-01-27 06:02:56 +00:00
Noemi Erli
e7135e747c Backed out 3 changesets (bug 1876811) for causing failures in nsGfxScrollFrame.cpp CLOSED TREE
Backed out changeset d7fa22972e13 (bug 1876811)
Backed out changeset 2e6f427c053a (bug 1876811)
Backed out changeset 2b7e8a3f4751 (bug 1876811)
2024-01-27 03:41:30 +02:00
Daniel Holbert
b81d2e8be2 Bug 1876811: Remove nsPresContext's cache for about:config pref "layout.scrollbar.side". r=TYLin
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
2024-01-27 01:05:27 +00:00
Daniel Holbert
41fdc19464 Bug 1876811: Remove nsPresContext's cache for about:config pref bidi.direction. r=TYLin,emilio
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
2024-01-27 01:05:27 +00:00
Daniel Holbert
d6183197e1 Bug 1876811: Change about:config pref 'dom.send_after_paint_to_content' to a static pref instead of defining it in all.js. r=TYLin
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
2024-01-27 01:05:26 +00:00
Daniel Holbert
b424b41795 Bug 1876677: Change about:config pref 'layout.scrollbar.side' to a static pref instead of being defined in all.js. r=TYLin,emilio
Differential Revision: https://phabricator.services.mozilla.com/D199690
2024-01-26 19:02:57 +00:00
Frédéric Wang
b5056e1feb Bug 1765615 - Handle most changes to CSS contain and content-visibility without needing to reconstruct frames. r=layout-reviewers,emilio
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
2024-01-17 08:22:48 +00:00
Jonathan Kew
f9312fc171 Bug 1872545 - Hoist color-font palette cache out of TextRunDrawParams to the nsPresContext or CanvasRenderingContext2D, for greater effectiveness. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D197463
2024-01-04 11:07:44 +00:00
Iulian Moraru
27b6f41469 Backed out changeset 21beaf6ba627 (bug 1872545) for causing windows build bustages on FontPaletteCache.cpp. CLOSED TREE 2024-01-04 01:54:01 +02:00
Jonathan Kew
e976fa1b8c Bug 1872545 - Hoist color-font palette cache out of TextRunDrawParams to the nsPresContext or CanvasRenderingContext2D, for greater effectiveness. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D197463
2024-01-03 22:54:10 +00:00
Cristian Tuns
7695546799 Backed out changeset 395cc57551ec (bug 1872545) for causing build bustages in rust.mk CLOSED TREE 2024-01-03 05:14:31 -05:00
Jonathan Kew
66b754598a Bug 1872545 - Hoist color-font palette cache out of TextRunDrawParams to the nsPresContext or CanvasRenderingContext2D, for greater effectiveness. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D197463
2024-01-02 13:12:29 +00:00
Narcis Beleuzu
99b9ad7672 Backed out changeset e959df5e9484 (bug 1872545) for bustages on COLRFonts.cpp 2024-01-02 13:50:05 +02:00
Jonathan Kew
c018bc5255 Bug 1872545 - Hoist color-font palette cache out of TextRunDrawParams to the nsPresContext or CanvasRenderingContext2D, for greater effectiveness. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D197463
2024-01-02 09:52:49 +00:00
Sean Feng
02aed49dba Bug 1867152 - Fix the assertion in nsPresContext::UserInputEventsAllowed r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D196106
2023-12-12 22:49:38 +00:00
Cosmin Sabou
522da0fe26 Backed out changeset 496886cb30a5 (bug 1867152) for bc failures on browser_user_input_handling_delay.js. CLOSED TREE 2023-12-12 21:48:27 +02:00
Sean Feng
ee1d6bccd1 Bug 1867152 - Fix the assertion in nsPresContext::UserInputEventsAllowed r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D196106
2023-12-12 15:17:53 +00:00
Olli Pettay
0f0bf87d2b Bug 1869112 - don't try to access StyleSet if mPresShell is null, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D195956
2023-12-09 18:01:51 +00:00
Olli Pettay
e8eceb76ea Bug 1868746 - Drop styleset from Document sooner, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D195771
2023-12-07 20:50:14 +00:00
Cathie Chen
4b1cd0cb92 Bug 1866566 - If there is change in over-all relevancy, update HiddenByContentVisibility for animations, r=emilio,hiro
Differential Revision: https://phabricator.services.mozilla.com/D195009
2023-12-06 13:36:59 +00:00
Cosmin Sabou
424d51a33c Backed out changeset d9e8e468a2f2 (bug 1866566) for wpt failures on content-visibility-animation-with-scroll-timeline-in-hidden-subtree.html. 2023-12-05 18:59:19 +02:00
Cathie Chen
7ad6cf3016 Bug 1866566 - If there is change in over-all relevancy, update HiddenByContentVisibility for animations, r=emilio,hiro
Differential Revision: https://phabricator.services.mozilla.com/D195009
2023-12-05 15:57:51 +00:00
Jonathan Watt
61ff6ba12e Bug 1866011 p2. Rename nsIDocShell.contentViewer. r=emilio,credential-management-reviewers,devtools-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D194370
2023-11-24 09:10:52 +00:00
Jonathan Watt
efb5a74fbc Bug 1865480. Rename nsIContentViewer to nsIDocumentViewer. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D193987
2023-11-21 12:45:59 +00:00
Sean Feng
2d6e584e05 Bug 1722322 - Implement LargestContentfulPaint r=emilio
Spec: https://w3c.github.io/largest-contentful-paint

Differential Revision: https://phabricator.services.mozilla.com/D151079
2023-11-02 20:53:36 +00:00
Sandor Molnar
d23e2827b7 Backed out 7 changesets (bug 1722322) for causing bp-nu bustages
Backed out changeset 0ebd32e273b8 (bug 1722322)
Backed out changeset 7a75717f127c (bug 1722322)
Backed out changeset c2a6440a83d7 (bug 1722322)
Backed out changeset 9955756855bd (bug 1722322)
Backed out changeset 37fccb407777 (bug 1722322)
Backed out changeset f52b1f28f753 (bug 1722322)
Backed out changeset 0121c8cf5d2f (bug 1722322)
2023-11-02 21:27:24 +02:00
Sean Feng
cacfa492a8 Bug 1722322 - Implement LargestContentfulPaint r=emilio
Spec: https://w3c.github.io/largest-contentful-paint

Differential Revision: https://phabricator.services.mozilla.com/D151079
2023-11-02 17:04:47 +00:00
Emilio Cobos Álvarez
2181461fd3 Bug 1859945 - Restore old content-inaccessible-about:blank behavior. r=nika
While not perfect, as you noted, it's probably good enough. It's also a
bit safer, probably.

Differential Revision: https://phabricator.services.mozilla.com/D191413
2023-10-20 09:10:56 +00:00
Sean Feng
01ab7f3328 Bug 1856497 - Allow user input events to bypass the delay handling check if this is a non-visible document r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D190133
2023-10-12 16:38:17 +00:00
Sean Feng
8bcf58cf05 Bug 1856514 - Make sure nsRefreshDriver will tick enough times for user input handling r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D190108
2023-10-11 19:39:37 +00:00
Emilio Cobos Álvarez
5139b5a4a2 Bug 1857915 - Remove about:PreferenceStyleSheet. r=morgan,devtools-reviewers,nchevobbe
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
2023-10-11 17:47:50 +00:00
Emilio Cobos Álvarez
d02e297b2d Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
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
2023-10-10 08:51:12 +00:00
Emilio Cobos Álvarez
4eb43ef123 Bug 1853323 - Remove browser.underline_anchors. r=settings-reviewers,mconley
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
2023-09-15 15:37:15 +00:00
Sean Feng
a682aea259 Bug 1830820 - Introduce some delays to user input handling r=smaug
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
2023-09-05 18:28:52 +00:00
Iulian Moraru
8cc0bded61 Backed out 2 changesets (bug 1830820) for causing marionette failures on test_actions_wheel.py. CLOSED TREE
Backed out changeset e930161a5935 (bug 1830820)
Backed out changeset 4df110e417d4 (bug 1830820)
2023-08-31 20:55:06 +03:00
Sean Feng
98bef8ea08 Bug 1830820 - Introduce some delays to user input handling r=smaug
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
2023-08-31 15:56:47 +00:00