Commit graph

1607 commits

Author SHA1 Message Date
Tom Schuster
14d55c325c Bug 1838415 - Introduce RFPTarget::FontVisibilityBaseSystem + LangPack. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D181235
2023-06-26 07:17:38 +00:00
Jonathan Kew
7d0978de1e Bug 1839614 - patch 2 - Move the browser.display.auto_quality_min_font_size pref into StaticPrefs. r=gfx-reviewers,lsalzman
No change in behavior here; this is to prepare for offscreen-canvas workers
to be able to access the pref (following patch).

Depends on D181636

Differential Revision: https://phabricator.services.mozilla.com/D181637
2023-06-23 15:12:19 +00:00
Emilio Cobos Álvarez
4cc6758558 Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar
We have more readable and faster versions (that just omit the namespace
arg).

Mostly done via sed, with a couple helpers to use the faster lookups
where possible.

Differential Revision: https://phabricator.services.mozilla.com/D181795
2023-06-23 10:01:32 +00:00
Tim Huang
3703efc7d8 Bug 1835567 - Don't apply font-visibility restrictions to devtool contexts. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D179646
2023-06-05 12:33:39 +00:00
Tom Schuster
b4c6e62b3c Bug 1834737 - Make RFPTarget parameter of Document::ShouldResistFingerprinting non-optional. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D178925
2023-05-31 09:46:54 +00:00
Emilio Cobos Álvarez
58914ffca6 Bug 1832427 - Don't apply full/text zoom to print docs. r=dholbert
Usually this happened because the frontend never specified any zoom for
these, but once we started honoring the system scale factor, well...

For printing, we should use the print scale factor to determine
css-to-device scale. I assume text scale we could keep, but that doesn't
seem worth it and it seems preferable to keep stuff consistent between
zoom and OS text scale / zoom.

I don't know of another reasonable way to test this other than this (and
it kinda sucks), but I'm open to ideas.

Differential Revision: https://phabricator.services.mozilla.com/D177709
2023-05-12 22:03:05 +00:00
Emilio Cobos Álvarez
3a99b7feb9 Bug 1831136 - Plumb android text scale via nsLookAndFeel. r=geckoview-reviewers,dholbert,owlish
That's how we do it for all other platforms. Do this rather than via a
custom mostly-untested pref, which allows us to simplify text zoom
handling.

Differential Revision: https://phabricator.services.mozilla.com/D177062
2023-05-11 19:01:19 +00:00
Nazım Can Altınova
c730bbb51e Bug 1832061 - Add a profiler frame label for UpdateContainerQueryStyles call with relevant for js flag r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D177544
2023-05-10 10:20:29 +00:00
Jonathan Kew
237f8fffc1 Bug 1829160 - Don't apply font-visibility restrictions to chrome contexts. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D177357
2023-05-08 19:10:01 +00:00
Sean Feng
2d1d0cda93 Bug 1830778 - Rename some contentful paint related variables/functions to make it clear they are based on FirstContentfulPaint r=emilio
Currently these functions and related variables are based on
FirstContentfulPaint, however the naming are too generic. With the
LargestContentfulPaint implementation, they will not only
handle paints for FirstContentfulPaint but also LargestContentfulPaint,
so we need to rename them.

Differential Revision: https://phabricator.services.mozilla.com/D151077
2023-05-01 22:11:40 +00:00
Jonathan Kew
0026f56411 Bug 1697980 - Implement new uppercase mapping of eszett (U+00DF) to U+1E9E, but preffed-off by default due to inconsistent font support. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D175620
2023-04-18 07:06:09 +00:00
Norisz Fay
0e011d8b41 Backed out changeset 9e43f68395b4 (bug 1697980) for causing reftest failures on 1425243-2.html CLOSED TREE 2023-04-17 21:57:08 +03:00
Jonathan Kew
e8a99621ca Bug 1697980 - Implement new uppercase mapping of eszett (U+00DF) to U+1E9E, but preffed-off by default due to inconsistent font support. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D175620
2023-04-17 12:46:49 +00:00
Emily McDonough
afd9c3eee4 Bug 1576298 - Remove DeviceSizeIsPageSize from nsDocShell and nsPresContext. r=emilio
This comes from bug 890195, and it was superseded by bug 1575097.

This isn't used for anything anymore, and we can remove the otherwise unused
MediaFeatureChangeReason flag as well.

Differential Revision: https://phabricator.services.mozilla.com/D174492
2023-04-03 17:11:24 +00:00
Tom Ritter
05dec93396 Bug 1821131: Exempt a document from stricter font-visibility rules with the ETP toggle r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D172041
2023-03-22 15:22:53 +00:00
Emilio Cobos Álvarez
471df3eab7 Bug 1821131 - Make font visibility part of the fontconfig substitution cache key. r=jfkthame
This is one possible option, the other one is to just cache the
substitute results.

Differential Revision: https://phabricator.services.mozilla.com/D172578
2023-03-22 13:11:25 +00:00
Daniel Holbert
1f9c5e8d05 Bug 1821735 part 2: Drop 'Get' prefix from 'nsPresContext::GetBidiEngine' since it's infallible. r=jfkthame
For pointer-type getters, we have a convention that a "Get" prefix implies
"warning, this might return null" , whereas lack-of-a-"Get" implies that the
return value is guaranteed to be non-null.

In the case of this `GetBidiEngine` API, this convention doesn't directly apply
since the return value isn't pointer-typed. But it's still backed by a
dynamically-allocated resource which we dereference at the return statement,
and some of the callers take the pointer-value of what's returned and pass that
along elsewhere. So it's helpful (and more concise) to drop "Get" to convey
that yes, we're sure the returned thing is indeed a real object.

Differential Revision: https://phabricator.services.mozilla.com/D172301
2023-03-10 21:58:44 +00:00
Daniel Holbert
874d57b555 Bug 1821735 part 1: Use MakeUnique to allocate UniquePtr in nsPresContext. r=jfkthame
We were previously using foo.reset(new) which technically works, but MakeUnique
is preferred, for reasons documented in UniquePtr.h, under "There are various
benefits to using MakeUnique instead of |new| expressions."

Differential Revision: https://phabricator.services.mozilla.com/D172300
2023-03-10 21:58:43 +00:00
Boris Chiou
d548aea8a2 Bug 1814786 - Part 4: Introduce TimelineCollection and TimelineManager. r=emilio
Just like how we handle the CSSAnimation and CSSTransition. We use
TimelineCollection to store the named progress timeline objects created
by scroll-timeline-name and view-timeline-name, and reuse
ElementAnimationData to handle the life time of TimelineCollection.

Also, introduce TimelineManager to update timelines generated by CSS.

We add one test which mutates the scroll-timeline-axis to make sure we
restyle the animations associtated with the existing timelines. It will
be passed when we start to use the new framework, in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D169271
2023-03-07 23:57:54 +00:00
Emilio Cobos Álvarez
e22c322da5 Bug 1812868 - Tweak RDM and theme setup. r=mstange
This is in order to make nsPresContext::UseOverlayScrollbars() thread-safe for
stylo usage.

Document::GetBrowsingContext() does ref-counting of main-thread-only
objects, and we don't want that.

Similarly nsPresContext::Theme() mutates the pres context which is not
something we can do from multiple threads.

Reviewed in: https://phabricator.services.mozilla.com/D168148
2023-02-20 00:01:11 +01:00
Sandor Molnar
2bc700c04b Backed out 2 changesets (bug 1812868) for causing bug 1817539. CLOSED TREE
Backed out changeset 07c689de250c (bug 1812868)
Backed out changeset e7d370501c50 (bug 1812868)
2023-02-18 09:34:04 +02:00
Emilio Cobos Álvarez
ad4bd6a3ba Bug 1812868 - Expose scrollbar-inline-size as a CSS variable to chrome code. r=mstange
For that we need to:

 * Make GetDPIRatioForScrollbarPart thread-safe: This was using the
   widget for bug 1727289, but just looking at the print preview scale
   is enough to fix that.

 * Make nsPresContext::UseOverlayScrollbars() thread-safe: We store the
   RDM pane stuff in the pres context.

The rest is pretty straight-forward.

Differential Revision: https://phabricator.services.mozilla.com/D168148
2023-02-17 21:15:06 +00:00
Emilio Cobos Álvarez
be40d4df76 Bug 1814668 - Fix viewport size invalidation on MVM changes. r=hiro
The MVM doesn't change the document viewer bounds nor the view manager
bounds (maybe it used to?). Right now when exiting RDM, depending on the
order of operations (if MVM reset is the last thing to happen) we end up
with a wrong viewport size, because nsDocShell::SetSize is
short-circuited here[1].

Instead, force a resize reflow with the current dimensions which is what
the dynamic toolbar code also does, for example.

[1]: https://searchfox.org/mozilla-central/rev/5ccb73c0217d1710b10d6e6e297cf3396d10ec23/view/nsViewManager.cpp#172

Differential Revision: https://phabricator.services.mozilla.com/D169806
2023-02-15 13:58:40 +00:00
Emilio Cobos Álvarez
61b953b167 Bug 1813148 - Don't return already_AddRefed in nsPresContext::GetRootWidget. r=dholbert
Let the caller addref it if needed.

I wrote this because I wanted to make some code dealing with it
thread-safe, but I ended up writing a less sketchy solution. However I
still think this is worth it.

It seems this only returns an already_AddRefed because before it used to
be an XPCOM-ish thing where the widget was returned as an out-param.

For now it doesn't change behavior but there are some callers that would
benefit from having less addref/release calls if they only need to read
simple stuff from the widget.

Differential Revision: https://phabricator.services.mozilla.com/D168141
2023-01-27 19:50:59 +00:00
Tom Schuster
b698c332c0 Bug 1811863 - Use a more precise RFP check in nsPresContext::UpdateFontVisibility. r=jfkthame
Depends on D167822

Differential Revision: https://phabricator.services.mozilla.com/D167823
2023-01-27 14:08:59 +00:00
Timothy Nikkel
38a10cda4c Bug 1810055. Truncate some uri specs recorded by the profiler to avoid crashes. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D166742
2023-01-13 01:38:13 +00:00
Emilio Cobos Álvarez
f27d2f89cc Bug 1797752 - Make sure container queries make forward progress. r=Oriol
Instead of keeping a set of frames to update, keep a depth-ordered frame
list. Factor out the DirtyRootList for this.

Make sure that we're updating ancestor containers before children, and
make sure to store the last container state even if we end up not
updating (due to the element being in mUpdatedContainerQueryContents),
so that following layouts are stable.

This fixes the timeout in inline-size-bfc-floats, and the same kind of
instability in auto-scrollbars.html (if you take a profile of that test
you can see us infinitely recursing), as well as fixing various other
tests.

It causes a regression in nested-query-containers.html, probably to do with
ib-splits (since it's a block inside an inline and so on, and the frame
tree depth doesn't match the content tree depth, most likely). That
might need extra tweaks but it doesn't seem terribly concerning, so I'd
rather get this in.

Differential Revision: https://phabricator.services.mozilla.com/D165628
2022-12-29 10:01:22 +00:00
Oriol Brufau
4f2a45d1eb Bug 1807676 - Avoid RegisterContainerQueryFrame for non-primary frames. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D165553
2022-12-27 19:13:14 +00:00
Martin Robinson
abb5044ca7 Bug 1803377 - Rename the values of the IntrinsicDirty enum r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163607
2022-12-02 12:27:31 +00:00
Botond Ballo
68c71a503c Bug 1802225 - Remove Layers.{h,cpp}. r=tnikkel,geckoview-reviewers,jgilbert,media-playback-reviewers,padenot,m_kato
Where appropriate, `#include "Layers.h"` is replaced with
more specific inclusions.

Differential Revision: https://phabricator.services.mozilla.com/D162934
2022-11-29 01:52:03 +00:00
Nazım Can Altınova
3cc7287baf Bug 1691820 - Add a profiler marker for the first contentful paint metric r=florian
Differential Revision: https://phabricator.services.mozilla.com/D162558
2022-11-25 11:37:16 +00:00
Emilio Cobos Álvarez
d38d7fc847 Bug 1801517 - Remove nsPresContext::IsRootContentDocument(). r=hiro
The Element caller only cares about avoiding a flush and can use the
observable parent layout stuff.

The scrollframe one clearly wants the cross-process version according to
the comment.

Differential Revision: https://phabricator.services.mozilla.com/D162477
2022-11-21 08:04:58 +00:00
Emilio Cobos Álvarez
5f5e60ffb2 Bug 1801126 - Add a profiler marker for container query updates. r=dshin
Differential Revision: https://phabricator.services.mozilla.com/D162293
2022-11-18 09:34:07 +00:00
Emilio Cobos Álvarez
44ef3b8685 Bug 1799435 - Make RFP checks faster. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161447
2022-11-08 02:36:25 +00:00
Emilio Cobos Álvarez
dcedd55035 Bug 1794040 - Simplify container-type implementation. r=dshin
It was made a bitfield so that we could include style. But then style
containment was removed and the bitfield keeps causing us to do wrong
check (since INLINE_SIZE intersects SIZE).

So just make it an enum. This causes a progression and a test that
failed now times out (which is a pre-existing issue, just like the
pseudo-elements test that times out).

Differential Revision: https://phabricator.services.mozilla.com/D160371
2022-10-27 10:48:58 +00:00
Marian-Vasile Laza
52127c7dd1 Backed out changeset bee94ed5a33d (bug 1794040) for causing wpt failures on container-type-containment.html. 2022-10-26 22:31:01 +03:00
Emilio Cobos Álvarez
3a328a3ef8 Bug 1794040 - Simplify container-type implementation. r=dshin
It was made a bitfield so that we could include style. But then style
containment was removed and the bitfield keeps causing us to do wrong
check (since INLINE_SIZE intersects SIZE).

So just make it an enum. This causes a progression and a test that
failed now times out (which is a pre-existing issue, just like the
pseudo-elements test that times out).

Differential Revision: https://phabricator.services.mozilla.com/D160371
2022-10-26 16:56:07 +00:00
Jonathan Kew
b593702fb8 Bug 1791782 - Connect CSS font-palette features to rendering via the presContext. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157959
2022-10-07 23:00:46 +00:00
Noemi Erli
5b0216e320 Backed out 9 changesets (bug 1791778, bug 1791782, bug 1791780, bug 1791777) for causing build bustages in TestCOLRv1.cpp CLOSED TREE
Backed out changeset aeb44b79bf31 (bug 1791782)
Backed out changeset 292fd3a1b6dd (bug 1791782)
Backed out changeset 9947218170d0 (bug 1791780)
Backed out changeset 528b4c022a44 (bug 1791778)
Backed out changeset c734ff661a66 (bug 1791778)
Backed out changeset 6585dd386ee3 (bug 1791777)
Backed out changeset af4243189ef1 (bug 1791777)
Backed out changeset a47ae5f76514 (bug 1791777)
Backed out changeset 24ce615e77fd (bug 1791777)
2022-10-08 00:08:57 +03:00
Jonathan Kew
1ced95e237 Bug 1791782 - Connect CSS font-palette features to rendering via the presContext. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157959
2022-10-07 18:58:53 +00:00
Cristian Tuns
18e597b504 Backed out 9 changesets (bug 1791777, bug 1791780, bug 1791778, bug 1791782) for causing build bustages on TestCOLRv1.cpp CLOSED TREE
Backed out changeset f145a34cfbc1 (bug 1791782)
Backed out changeset 2f12216fbeda (bug 1791782)
Backed out changeset 61bd2a4496bf (bug 1791780)
Backed out changeset 4e4eb99a7fd9 (bug 1791778)
Backed out changeset 32d171a28810 (bug 1791778)
Backed out changeset e317795cd27a (bug 1791777)
Backed out changeset 5e32d5a01917 (bug 1791777)
Backed out changeset cf87497dbead (bug 1791777)
Backed out changeset 586c735b005e (bug 1791777)
2022-10-07 13:46:43 -04:00
Jonathan Kew
c8bc44d595 Bug 1791782 - Connect CSS font-palette features to rendering via the presContext. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157959
2022-10-07 16:53:36 +00:00
Norisz Fay
30ef428f43 Backed out 9 changesets (bug 1791780, bug 1791782, bug 1791778, bug 1791777) for causing multiple mochitest failures CLOSED TREE
Backed out changeset 6de1ade5a9b6 (bug 1791782)
Backed out changeset ce96452a38a1 (bug 1791782)
Backed out changeset 7cc8e027f5a7 (bug 1791780)
Backed out changeset 8e023280032c (bug 1791778)
Backed out changeset 26d65d76d02a (bug 1791778)
Backed out changeset a98dd552df64 (bug 1791777)
Backed out changeset 766386309ee5 (bug 1791777)
Backed out changeset 7de66a218ba4 (bug 1791777)
Backed out changeset 1d17c257444e (bug 1791777)
2022-10-07 17:36:38 +03:00
Jonathan Kew
03bc9753c5 Bug 1791782 - Connect CSS font-palette features to rendering via the presContext. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157959
2022-10-07 12:16:53 +00:00
Emilio Cobos Álvarez
d9a694f78f Bug 1791281 - Simplify our setup for font metric queries from style. r=jfkthame
While looking at moving the flag around I realized that the only reason
we have FontMetricsProvider and co is because we didn't have access to
the per-document font-prefs cache. That's trivial to fix tho, so do
that and simplify the setup for font queries even more.

Differential Revision: https://phabricator.services.mozilla.com/D157589
2022-09-20 19:30:45 +00:00
Emilio Cobos Álvarez
c6d17806fa Bug 1790067 - Restore nsPresContext's bitfield layout for now.
MANUAL PUSH: Orange fix CLOSED TREE

Differential Revision: https://phabricator.services.mozilla.com/D157585
2022-09-17 12:16:32 -07:00
Aleksandr Shoronov
a4b7225fb8 Bug 1790067 - Removed the warning about non-cell relative parts of table. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157583
2022-09-17 14:37:32 +00:00
Hiroyuki Ikezoe
9beefe9c65 Bug 1787079 - Call UIResolutionChangedInternal instead of AppUnitsPerDevPixelChanged in nsPresContext::PreferenceChanged. r=emilio
AppUnitsPerDevPixelChanged doesn't propagate the change to BrowserParent, thus
`BrowserParent::mDefaultScale` will be stale. UIResolutionChangedInternal
propagates the change into BrowserParent properly so that the `mDefaultScale`
will be properly updated.

Another approach is to observe preference changes in BrowserParent itself, but
observing layout specific preferences, "layout.css.dpi" or
"layout.css.devPixelsPerPx" in BrowserParent is a bit odd.

Without this change D155946 makes fixed-width-viewport-inflation.html fail
because the test changes "layout.css.devPixelsPerPx" value.

Differential Revision: https://phabricator.services.mozilla.com/D157266
2022-09-15 10:13:15 +00:00
Sandor Molnar
cddb6cfdb3 Backed out 6 changesets (bug 1787079) for causing browser-chrome failures in layout/base/tests/browser_bug1787079.js CLOSED TREE
Backed out changeset b6075adb01a7 (bug 1787079)
Backed out changeset d5d0f8bb0be4 (bug 1787079)
Backed out changeset dce92508b5a3 (bug 1787079)
Backed out changeset 650f8d455e0e (bug 1787079)
Backed out changeset 1a9828bbf04b (bug 1787079)
Backed out changeset 3580b308ec59 (bug 1787079)
2022-09-14 06:13:39 +03:00
Hiroyuki Ikezoe
87ba6da044 Bug 1787079 - Call UIResolutionChangedInternal instead of AppUnitsPerDevPixelChanged in nsPresContext::PreferenceChanged. r=emilio
AppUnitsPerDevPixelChanged doesn't propagate the change to BrowserParent, thus
`BrowserParent::mDefaultScale` will be stale. UIResolutionChangedInternal
propagates the change into BrowserParent properly so that the `mDefaultScale`
will be properly updated.

Another approach is to observe preference changes in BrowserParent itself, but
observing layout specific preferences, "layout.css.dpi" or
"layout.css.devPixelsPerPx" in BrowserParent is a bit odd.

Without this change D155946 makes fixed-width-viewport-inflation.html fail
because the test changes "layout.css.devPixelsPerPx" value.

Depends on D156266

Differential Revision: https://phabricator.services.mozilla.com/D157266
2022-09-14 01:15:55 +00:00