Commit Graph

14919 Commits

Author SHA1 Message Date
Logan Rosen
f024d94b2b Bug 1786490 - reformat the tree using black 23.3.0 r=sylvestre,webdriver-reviewers,taskgraph-reviewers,whimboo,jmaher,ahal,perftest-reviewers,geckoview-reviewers,afinder,m_kato
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D186092
2023-09-06 16:14:30 +00:00
Emilio Cobos Álvarez
726f71faf3 Bug 1850827 - Simplify how we draw window decorations. r=stransky,rmader,desktop-theme-reviewers,dao
This makes the rounded bottom corners work on X11, and makes the top
corner drawing less insane.

Differential Revision: https://phabricator.services.mozilla.com/D187345
2023-09-06 11:07:58 +00:00
Boris Chiou
00c109f7d0 Bug 1838106 - Use approx_eq() to compare two direction vectors. r=dholbert
Basically, if two normalized direction vectors are the same, we do
interpolation on the angle only. However, after normalization, there may
be some differences because of the floating-point precision, even though
these two vectors have the same direction. Therefore we have to add an
tolerance when comparing them.

Differential Revision: https://phabricator.services.mozilla.com/D187153
2023-09-05 22:52:13 +00:00
Emilio Cobos Álvarez
884175baf6 Bug 1850827 - Implement rounded bottom corners in GTK. r=rmader
The implementation is uglier than it needs to be. We basically need to
override the GTK styles for the window decorations with the desired
radius.

This is because of two reasons:

 * Adwaita on gtk3 doesn't provide a bottom corner radius.
 * Even if it did we couldn't reasonably query it, see comment 4.

So in order for stuff to look sensible we need to make sure that we and
GTK agree on what radius to use. Using the titlebar radius makes sense
here.

Differential Revision: https://phabricator.services.mozilla.com/D187343
2023-09-05 18:07:08 +00:00
Emilio Cobos Álvarez
5c0f63af95 Bug 1851649 - Simplify and speed-up display parsing. r=mstange
This avoids uselessly rewinding the parser for single-keyword display
values, and generally makes the code easier to follow.

Differential Revision: https://phabricator.services.mozilla.com/D187431
2023-09-05 17:44:09 +00:00
Gregory Pappas
010e86db22 Bug 1851098 - Remove layout.css.page-size.enabled pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187348
2023-09-04 18:11:43 +00:00
Gregory Pappas
6ff411a901 Bug 1851093 - Remove layout.css.font-metrics-overrides.enabled pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187351
2023-09-04 16:02:13 +00:00
Gregory Pappas
119bfeb092 Bug 1842480 - Remove layout.css.overflow-logical.enabled pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187352
2023-09-03 16:58:12 +00:00
Gregory Pappas
f1f85c22d5 Bug 1851096 - Remove layout.css.hyphenate-character.enabled pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187314
2023-09-02 15:24:55 +00:00
Gregory Pappas
9975f85dbe Bug 1842503 - Remove layout.css.scrollbar-gutter.enabled pref r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D187252
2023-09-02 02:18:41 +00:00
Boris Chiou
8828547018 Bug 1737209 - Fix the conversion from (axis,angle) pair to the quaternion vector. r=emilio
Basically, quaternion vectors make sense only when the rotation is within
(-360deg, 360deg). If its angle is larger than or equal to 360deg, its
direction may be different, so we have to tweak the conversion.

Also, tweak the code of interpolation for rotate3D to match the spec and
put more comments there.

Differential Revision: https://phabricator.services.mozilla.com/D186998
2023-09-01 20:15:51 +00:00
Boris Chiou
503c205902 Bug 1737209 - Remove unused functions of decomposing 2d and 3d matrix. r=zrhoffman
We keep these functions because we used them for compositor animations before
merging stylo. Now we always use the equivalent rust version for all the
transform interpolation, on both the main thread and the compositor thread.

Differential Revision: https://phabricator.services.mozilla.com/D187072
2023-09-01 20:15:51 +00:00
Jonathan Kew
66cb47bdc1 Bug 1850170 - Don't use negate-values-and-swap-bounds to negate CSS clamp() when min > max, because the result is order-dependent. r=emilio
This fixes the incorrect result when negating a clamp() where the min value is greater than max.
Added some extra tests to clamp-length-computed.html; the last example fails in Gecko without
the patch here.

Differential Revision: https://phabricator.services.mozilla.com/D187113
2023-08-31 11:27:16 +00:00
Emilio Cobos Álvarez
3d98cc8260 Bug 1850342 - Do not expose :-moz-broken to content. r=boris
This is not standard, and we don't use it internally (some chrome
stylesheets use it tho).

In the past this pseudo-class was more useful because it matched the
state for which <img> elements used an inline, but that's no longer
true, see bug 1196668 and co.

Depends on D186938

Differential Revision: https://phabricator.services.mozilla.com/D186939
2023-08-30 12:06:41 +00:00
Emilio Cobos Álvarez
6070e00f0a Bug 1850342 - Remove non-standard, un-tested :-moz-loading pseudo-class. r=layout-reviewers,jfkthame
This is technically web-exposed, but if we needed to introduce it for
compat we could always re-introduce it matching false.

Differential Revision: https://phabricator.services.mozilla.com/D186938
2023-08-30 10:38:52 +00:00
Emilio Cobos Álvarez
848f2d7c33 Bug 1850414 - Simplify style sheet source-map URL code. r=layout-reviewers,firefox-style-system-reviewers,webidl,smaug,boris
The old code was basically doing string copies that are totally
redundant, in a not-very performant way too.

This was from the time where stylo had to live with the old style
engine, and there's no need to keep the copy around anymore.

Differential Revision: https://phabricator.services.mozilla.com/D186974
2023-08-30 09:27:06 +00:00
Iulian Moraru
9a9b90c906 Backed out changeset f0edb489e577 (bug 1850342) for causing dt failures on browser_rules_inactive_css_visited.js. CLOSED TREE 2023-08-30 01:24:44 +03:00
Emilio Cobos Álvarez
afdec6f2a3 Bug 1850342 - Remove non-standard, un-tested :-moz-loading pseudo-class. r=layout-reviewers,jfkthame
This is technically web-exposed, but if we needed to introduce it for
compat we could always re-introduce it matching false.

Differential Revision: https://phabricator.services.mozilla.com/D186938
2023-08-29 20:57:30 +00:00
Cosmin Sabou
5b129b77c5 Backed out changeset f14569b8319b (bug 1850342) for causing dt failures on browser_rules_inactive_css_visited.js. CLOSED TREE 2023-08-29 21:14:42 +03:00
David Shin
04b9d09912 Bug 1819453: Remove pref for linear easing function. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D186537
2023-08-29 17:55:40 +00:00
Emilio Cobos Álvarez
286082f4f1 Bug 1850342 - Remove non-standard, un-tested :-moz-loading pseudo-class. r=layout-reviewers,jfkthame
This is technically web-exposed, but if we needed to introduce it for
compat we could always re-introduce it matching false.

Differential Revision: https://phabricator.services.mozilla.com/D186938
2023-08-29 16:56:37 +00:00
Tiaan Louw
13b6ed06e8 Bug 1850500 - Clean up color conversion code r=emilio
- Remove the use of pow when not needed.
- Use rust built in to_radians/to_degrees.
- Use more accurate white point values.
- Make the code clearer in places.

Differential Revision: https://phabricator.services.mozilla.com/D187029
2023-08-29 16:15:55 +00:00
Ziran Sun
e41abe4026 Bug 1840478 - Fetching inherits value of a CSS registered custom propertie. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D186626
2023-08-29 08:55:36 +00:00
Emilio Cobos Álvarez
c918409058 Bug 1850293 - Make directionality state not intrinsic. r=smaug
Allows us to reclaim some node bits too.

Differential Revision: https://phabricator.services.mozilla.com/D186893
2023-08-28 23:39:11 +00:00
Zach Hoffman
2ce483a230 Bug 1846628 - [css-properties-values-api] Optionally allow computationally dependent values in ComputedValue::parse r=emilio
This will be useful at computed value time, when registered properties
can be be computationally dependent.

Differential Revision: https://phabricator.services.mozilla.com/D186996
2023-08-28 23:11:43 +00:00
Zach Hoffman
8ede0e5841 Bug 1850369 - [css-properties-values-api] Add UrlExtraData to PropertyRegistration r=emilio
This will be used later at computed value time.

Differential Revision: https://phabricator.services.mozilla.com/D186955
2023-08-28 19:12:55 +00:00
Emilio Cobos Álvarez
426b623319 Bug 1836948 - Use the main thread as part of the style thread pool. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D180079
2023-08-28 17:55:31 +00:00
Tiaan Louw
bd56598fe2 Bug 1839837 - Detect default color interpolation method for *-gradient() syntax r=emilio
The default color interpolation method is detected during parse time.
The equality with the specified method is stored on the gradient and
then during serialization the method is omitted if it was the default.

Differential Revision: https://phabricator.services.mozilla.com/D185492
2023-08-22 21:01:14 +00:00
Boris Chiou
ce64275561 Bug 1819464 - Part 2: Add content-box and stroke-box into transform-box in style. r=emilio
Also, add a prefernce for content-box and stroke-box. So we have to
define a new type, TransformBox, and let content-box and stroke-box
behind the preference.

Differential Revision: https://phabricator.services.mozilla.com/D185363
2023-08-22 19:49:03 +00:00
Boris Chiou
bf16b44176 Bug 1819464 - Part 1: Use view-box as the initial value for transform-box. r=emilio
Per spec, the initial value of transform-box should be view-box.
https://drafts.csswg.org/css-transforms-1/#transform-box

This doesn't have impact on the mapping of transform-box for SVG and CSS
layout. Just make sure the initial value is correct.

Differential Revision: https://phabricator.services.mozilla.com/D185362
2023-08-22 19:49:03 +00:00
Ziran Sun
a6ba06ef27 Bug 1840478 - Introduce stylist as a memeber for stylebuilder. r=emilio,zrhoffman
Differential Revision: https://phabricator.services.mozilla.com/D186615
2023-08-21 17:58:38 +00:00
Jamie Nicol
052ad0b26d Bug 1848766 - Add API to get stylo threadpool thread handles. r=emilio
On Unix platforms this is a pthread_t, and on windows it is a HANDLE.

Differential Revision: https://phabricator.services.mozilla.com/D186237
2023-08-18 12:01:23 +00:00
Cristina Horotan
e2fc203923 Backed out 3 changesets (bug 1848766) for causing build bustage at AndroidPerformanceHintManager.cpp CLOSED TREE
Backed out changeset a645cf8f45e9 (bug 1848766)
Backed out changeset 065b16762c94 (bug 1848766)
Backed out changeset 4e1c2cc65d1c (bug 1848766)
2023-08-18 14:53:08 +03:00
Jamie Nicol
fdf073cfa0 Bug 1848766 - Add API to get stylo threadpool thread handles. r=emilio
On Unix platforms this is a pthread_t, and on windows it is a HANDLE.

Differential Revision: https://phabricator.services.mozilla.com/D186237
2023-08-18 11:19:12 +00:00
Markus Stange
4a7f89beed Bug 1843946 - Make the MiscContainer for eAtomArray refcounted. r=emilio
This makes it cheaper to copy the nsAttrValue, which improves innerHTML times on Speedometer
because it reduces the time spent creating and destroying valueForAfterSetAttr.

It will also make it possible to reuse eAtomArray values across elements.

This patch adds a copying operation in AllocClassMatchingInfo which is needed
now that the MiscContainer's mValue.mAtomArray is immutable. This is a bit
unfortunate: In the past, this was doing one atom array allocation, and now
it's doing two; one during parsing and one during the copy. However, I would
expect that most calls to getElementsByClassName only supply a single class
name and not a set of space-separated class names, but I haven't measured it.
If this copy turns out to make things slower, we can probably avoid it by
adding a way to parse a string into an AtomArray directly without going
through nsAttrValue.

Before: https://share.firefox.dev/3DAhLzm
After: https://share.firefox.dev/456TMTM

Differential Revision: https://phabricator.services.mozilla.com/D183810
2023-08-17 19:02:39 +00:00
Jonathan Kew
e817e48777 Bug 1849010 - Implement the font-synthesis-position property. r=devtools-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D186448
2023-08-17 17:29:30 +00:00
Cosmin Sabou
737e83bb1a Backed out changeset 66c374acc3fb (bug 1849010) for causing font-synthesis failures. 2023-08-17 18:55:57 +03:00
Jonathan Kew
4adcc08ba9 Bug 1849010 - Implement the font-synthesis-position property. r=devtools-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D186448
2023-08-17 14:54:01 +00:00
Emilio Cobos Álvarez
29a01bdd3d Bug 1847440 - Always store relative line numbers in CSS rules. r=zrhoffman
CSS rules were storing absolute rather than relative line numbers (this
was done to match the old style system).

So when we hit the cached inline stylesheet code-path, for which we
share the CSS rules of the stylesheet, for the cache hit the line
numbers were completely off.

This particular page was probably regressed by bug 1834081, but the
issue could happen before with Shadow DOM.

Always store relative numbers and convert to absolute when asked by the
inspector, rather than the other way around.

This is simpler and makes the cache work.

Differential Revision: https://phabricator.services.mozilla.com/D185916
2023-08-16 09:37:27 +00:00
David Shin
19eba0b7a1 Bug 1848170: Use fully-computed piecewise linear function for both computed and specified value. r=emilio
Later spec change specifies that the serialized value always has one input and
one output entries for each linear stop entry, so specified and computed values
no longer have any difference.

Get rid of prefs for WPT too, since they're default-enabled on on channels.

Differential Revision: https://phabricator.services.mozilla.com/D186021
2023-08-15 13:26:25 +00:00
Emilio Cobos Álvarez
d6dbe01c5c Bug 1848639 - Remove zoom transform-based compat hack. r=dholbert
This was never good enough. Remove it to work towards a proper (ish)
`zoom` implementation.

Differential Revision: https://phabricator.services.mozilla.com/D186137
2023-08-14 16:19:16 +00:00
Iulian Moraru
0f5b622bf4 Backed out changeset 5197801f499d (bug 1848639) for causing multiple build bustages related to "zoom". CLOSED TREE 2023-08-14 18:40:30 +03:00
Emilio Cobos Álvarez
b1ddce8435 Bug 1848639 - Remove zoom transform-based compat hack. r=dholbert
This was never good enough. Remove it to work towards a proper (ish)
`zoom` implementation.

Differential Revision: https://phabricator.services.mozilla.com/D186137
2023-08-14 14:34:20 +00:00
Tiaan Louw
d97fe6397d Bug 1848131 - Replace computed alpha NaN values with zero r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185920
2023-08-10 12:58:37 +00:00
Tiaan Louw
bc45488c4e Bug 1847509 - Remove colors with static initializers r=emilio
This fixes a regression where the size of the binaries were increased.

Differential Revision: https://phabricator.services.mozilla.com/D185849
2023-08-10 05:57:17 +00:00
Boris Chiou
378ff4b2f1 Bug 1598158 - Support offset-path:url() in style. r=devtools-reviewers,emilio
In layout, we build a default `path("m 0 0")` for now. We will implement
it later.

Besides, we don't support compositor animations for `url()`, so we don't
have to serialize it for IPC.

Note:
`<url>` includes `url()` and `src()`. For now we only support `url()`.
We should revisit `src()` in Bug 1845390.

Differential Revision: https://phabricator.services.mozilla.com/D184429
2023-08-07 22:04:01 +00:00
Emilio Cobos Álvarez
71c77f23bd Bug 1843783 - Deal with wide keyword fallbacks after substitution. r=zrhoffman
See spec issue for what to do about revert / revert-layer.

Differential Revision: https://phabricator.services.mozilla.com/D184953
2023-08-07 13:29:43 +00:00
Tiaan Louw
891c4741c0 Bug 1844333 - Clamp and normalize color values to appropriate ranges. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D183983
2023-08-04 21:19:28 +00:00
Tiaan Louw
a2d75730cc Bug 1845693 - Make AbsoluteColor deal with legacy and modern color syntax more concise r=emilio
Now the default of a color is the modern syntax and converting to legacy
syntax is very explicit.

AbsoluteColor::new can now take u8, f32 and Option<f32> as component
arguments and the flags will be set automagically.

Differential Revision: https://phabricator.services.mozilla.com/D184685
2023-08-04 12:39:58 +00:00
Boris Chiou
7902a61494 Bug 1846817 - Change the initial value of offset-position to be normal. r=dholbert
Per spec issue, https://github.com/w3c/fxtf-drafts/issues/522, its
initial value should be normal. (This has been merged into the spec.)

Note: css/motion/inheritance.html was updated in the WPT remote repo, so
I intentionally didn't change it and added the expection for now.

Differential Revision: https://phabricator.services.mozilla.com/D185230
2023-08-03 18:42:17 +00:00