Commit graph

1643 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
2d0e69f4a1 Bug 1824957 - Remove a bunch of now completely dead XUL layout code. r=layout-reviewers,desktop-theme-reviewers,devtools-reviewers,dao,TYLin
And some related tests.

A bunch of -moz-box* properties are web exposed, so I'll file a
follow-up for hiding them.

Differential Revision: https://phabricator.services.mozilla.com/D173819
2023-03-29 21:23:55 +00:00
Emilio Cobos Álvarez
cb2a32d8af Bug 1823455 - Merge ScrollFrameHelper and nsHTMLScrollFrame. r=layout-reviewers,TYLin
Now that we've removed nsXULScrollFrame, ScrollFrameHelper can be
subsumed under nsHTMLScrollFrame.

I want to do this before making scrollbars non-XUL.

Renaming to mozilla::ScrollFrame is left for a follow-up bug.

Differential Revision: https://phabricator.services.mozilla.com/D173063
2023-03-22 13:06:40 +00:00
Andi-Bogdan Postelnicu
10f49d4180 Bug 1660405 - Move away from mozilla::IsNaN in favor of std::isnan. r=nbp,media-playback-reviewers,sergesanspaille,padenot
Differential Revision: https://phabricator.services.mozilla.com/D173035
2023-03-22 11:35:33 +00:00
Stanca Serban
e31a178029 Backed out 7 changesets (bug 1660405) for causing bustages on Linux x64 opt. CLOSED TREE
Backed out changeset ad1a5f59214f (bug 1660405)
Backed out changeset a39e95f0aafe (bug 1660405)
Backed out changeset 48629ee0d70d (bug 1660405)
Backed out changeset 8419b99aab60 (bug 1660405)
Backed out changeset 535cc12c8bed (bug 1660405)
Backed out changeset e27052da4927 (bug 1660405)
Backed out changeset 11b0f9cf8091 (bug 1660405)
2023-03-22 13:05:53 +02:00
Andi-Bogdan Postelnicu
a5d28acdd6 Bug 1660405 - Move away from mozilla::IsNaN in favor of std::isnan. r=nbp,media-playback-reviewers,sergesanspaille,padenot
Differential Revision: https://phabricator.services.mozilla.com/D173035
2023-03-22 09:27:56 +00:00
Emilio Cobos Álvarez
fdabf61900 Bug 1820661 - Make image-set without valid images render nothing. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D172341
2023-03-13 11:22:06 +00:00
Emilio Cobos Álvarez
b5ab8c533c Bug 1564526 - Remove CachedBorderImageData. r=tnikkel
See comments in the bug, which still stand.

This cache is barely hit, and when it is hit it causes correctness
issues, see bug 1815022 for a recent example.

Differential Revision: https://phabricator.services.mozilla.com/D171391
2023-03-08 12:04:03 +00:00
Tiaan Louw
c8476cb106 Bug 1817641 - Convert RGBA to AbsoluteColor for computed/animated/resolved CSS colors r=emilio
Computed color values will not be in the correct format, closer to the
one specified by the author.  This also means that colors accross the
code are stored now as AbsoluteColor or StyleAbsoluteColor.  This allows
color space/gamut information to be available for use.

Some animation related test failures had to be changed, because colors
now has greater precision.  Animated a color now causes a lot more
animation updates, which was not initially expected.  See the bug for
discussion.

Differential Revision: https://phabricator.services.mozilla.com/D171021
2023-03-07 11:28:15 +00:00
Emilio Cobos Álvarez
7fea7835ba Bug 1819936 - Move legacy -moz-box collapse to its own CSS property. r=jwatt
Make display: -moz-box's visibility: collapse handling switchable by its
own CSS property.

Longer term maybe we should switch the front-end away from visibility:
collapse altogether (there are some alternatives), but for now this will
allow to move the front-end to switch to modern `display: flex` while
keeping `visibility: collapse` work as in -moz-box.

Differential Revision: https://phabricator.services.mozilla.com/D171472
2023-03-06 11:14:40 +00:00
Em Zhan
f1f7772453 Bug 1814469 - Implement CSS exponential functions. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D170842
2023-03-05 10:42:36 +00:00
Boris Chiou
f9afc9203f Bug 1818666 - Support offset-position in the style system. r=emilio
Also, we make it animatable but don't apply it to the motion transform and
don't run it on the compositor for now (so it works for getComputedStyle but
doesn't have rendering result).

Per spec: https://w3c.github.io/csswg-drafts/css-values/#calc-serialize,
we tweak the WPT to let calc() serialize the percentage first, and maintain
zero-valued terms, i.e. 0%. (We are doing the same thing as
offset-anchor, so it should be fine with other browsers.)

Besides, I tweak the serialization of shorthand a little bit so we match
the implementation of WebKit.

Differential Revision: https://phabricator.services.mozilla.com/D170972
2023-03-03 23:10:34 +00:00
Emilio Cobos Álvarez
22b93499fa Bug 1818811 - Make -moz-box-layout: flex default, and clean-up CSS. r=Gijs,extension-reviewers,settings-reviewers,desktop-theme-reviewers,dao
Now it's on by default everywhere, so all this is not needed. No behavior
change effectively since the xul.css bits being removed effectively achieve the
same.

Differential Revision: https://phabricator.services.mozilla.com/D170944
2023-02-27 12:41:13 +00:00
Emilio Cobos Álvarez
5f6910e75e Bug 1817071 - Remove -moz-image-region support from layout. r=layout-reviewers,tnikkel
There are no users of non-auto values, so we can just simplify some code and
remove the property.

Differential Revision: https://phabricator.services.mozilla.com/D170010
2023-02-21 12:19:44 +00:00
Fred Chasen
cb0a8abc0b Bug 1591210 - Add forced-color-adjust property r=emilio
Adds the forced-color-adjust property and ForcedColorAdjust keywords.
Updates tweak_when_ignoring_colors to check for `none` value of that property when determining if a color adjustment in needed.
Adds a check for `none` when styling selections to make sure they can be styled in forced color modes.

Differential Revision: https://phabricator.services.mozilla.com/D169000
2023-02-16 21:29:07 +00:00
Marian-Vasile Laza
91a3c1e0ce Backed out changeset f4fe07518400 (bug 1591210) for web-platform failures on forced-colors-mode-14.html. CLOSED TREE 2023-02-14 06:40:31 +02:00
Fred Chasen
6f6759dce8 Bug 1591210 - Add forced-color-adjust property r=emilio
Adds the forced-color-adjust property and ForcedColorAdjust keywords.
Updates tweak_when_ignoring_colors to check for `none` value of that property when determining if a color adjustment in needed.
Adds a check for `none` when styling selections to make sure they can be styled in forced color modes.

Differential Revision: https://phabricator.services.mozilla.com/D169000
2023-02-14 00:52:26 +00:00
Emilio Cobos Álvarez
d9cada2cc6 Bug 876085 - Remove unneeded dirty reflows. r=longsonr
We've reworked change hints tons of times since this was filed, this
works now.

Differential Revision: https://phabricator.services.mozilla.com/D169119
2023-02-07 21:43:22 +00:00
Boris Chiou
933cc122ea Bug 1809005 - Make scroll-timeline-{name|axis} be a coordinating list property group. r=emilio
Named scroll progress timelines are declared in the coordinated value list
constructed from the longhands of the scroll-timeline shorthand property,
which form a coordinating list property group with scroll-timeline-name as
the coordinating list base property.

In the meantime, we also update its shorthand to match the current spec.

Differential Revision: https://phabricator.services.mozilla.com/D166596
2023-01-26 23:20:55 +00:00
Boris Chiou
b3bfaef9d7 Bug 1808409 - Part 2: Support view-timeline-inset in style system. r=emilio
Support view-timeline-inset: `[ [ auto | <length-percentage> ]{1,2} ]#`.
And its initial value is 0.

Differential Revision: https://phabricator.services.mozilla.com/D166243
2023-01-24 22:21:19 +00:00
Boris Chiou
291aa8c242 Bug 1808409 - Part 1: Support view-timeline-name and view-timeline-axis in style system. r=emilio
view-timeline-name: `none | <custom-ident>#`
view-timeline-axis: `[ block | inline | vertical | horizontal ]#`

Note:
Both view-timeline-name and scroll-timeline-name should accept `auto`.
We will fix it in this patch series.

Differential Revision: https://phabricator.services.mozilla.com/D166242
2023-01-24 22:21:19 +00:00
Iulian Moraru
2d819bdcae Backed out 4 changesets (bug 1808409) for causing wpt failures on scroll-timeline-shorthand.tentative.html. CLOSED TREE
Backed out changeset aea8be500e7a (bug 1808409)
Backed out changeset b50dbfe47f74 (bug 1808409)
Backed out changeset 65a7fc0d9447 (bug 1808409)
Backed out changeset 412406551464 (bug 1808409)
2023-01-24 03:41:08 +02:00
Boris Chiou
464f0cdf7e Bug 1808409 - Part 2: Support view-timeline-inset in style system. r=emilio
Support view-timeline-inset: `[ [ auto | <length-percentage> ]{1,2} ]#`.
And its initial value is 0.

Differential Revision: https://phabricator.services.mozilla.com/D166243
2023-01-23 21:39:24 +00:00
Boris Chiou
722d422cfb Bug 1808409 - Part 1: Support view-timeline-name and view-timeline-axis in style system. r=emilio
view-timeline-name: `none | <custom-ident>#`
view-timeline-axis: `[ block | inline | vertical | horizontal ]#`

Note:
Both view-timeline-name and scroll-timeline-name should accept `auto`.
We will fix it in this patch series.

Differential Revision: https://phabricator.services.mozilla.com/D166242
2023-01-23 21:39:24 +00:00
Emilio Cobos Álvarez
391ea11d99 Bug 1810946 - Use the same computed time representation between Servo and Gecko. r=boris
Same as above.

Differential Revision: https://phabricator.services.mozilla.com/D167126
2023-01-19 10:06:38 +00:00
Emilio Cobos Álvarez
b830123d55 Bug 1810946 - Share computed animation-iteration-count representation between Servo and Gecko. r=boris
This removes the special AnimationIterationCount -> f32 conversion from
gecko.mako.rs which will be useful to simplify coordinated properties.

Differential Revision: https://phabricator.services.mozilla.com/D167123
2023-01-19 10:06:38 +00:00
Stanca Serban
148d5639c3 Backed out 4 changesets (bug 1810946) for causing bustages in nsStyleStruct.cpp. CLOSED TREE
Backed out changeset 8bc18b0e7a91 (bug 1810946)
Backed out changeset 1d02bd23dabe (bug 1810946)
Backed out changeset 258c2f8c1bc9 (bug 1810946)
Backed out changeset bd491b11178a (bug 1810946)
2023-01-19 04:40:39 +02:00
Emilio Cobos Álvarez
57f3c8cbfe Bug 1810946 - Use the same computed time representation between Servo and Gecko. r=boris
Same as above.

Differential Revision: https://phabricator.services.mozilla.com/D167126
2023-01-19 02:06:07 +00:00
Jonathan Watt
43752f0573 Bug 1798323 - Style changes to support the 'page-orientation' property. r=AlaskanEmily
Differential Revision: https://phabricator.services.mozilla.com/D161800
2023-01-16 15:03:44 +00:00
Martin Robinson
162cce2f3e Bug 1663685 - Do not apply content-visibility to elements with a principal internal table box r=emilio
The code for determining this is now shared with that for `contain: size`,
since the specification says that `content-visibility` follows `contain:
size` in determining applicability.

Differential Revision: https://phabricator.services.mozilla.com/D166689
2023-01-13 09:13:58 +00:00
Dan Robertson
ab82eb7020 Bug 1804583 - image orientation should be used for data url requests. r=emilio
- Images with a data url source should be treated as same-origin requests,
   meaning that the image-orientation should be respected.
 - Add web platform test for a image with a data url source and
   image-orientation: none.
 - Fix the blob url test for image-orientation: none.

Differential Revision: https://phabricator.services.mozilla.com/D164237
2023-01-09 18:21:19 +00:00
Ben Freist
b0759509dd Bug 1808757 - [refactor] Migrate defines to constexpr vars r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D166110
2023-01-09 09:03:42 +00:00
Ben Freist
476cccc35c Bug 1808888 - [refactor] Migrate NS_STYLE_LIST_STYLE_POSITION_* defines r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D166140
2023-01-09 07:07:13 +00:00
Ben Freist
8b3a740547 Bug 1805097 - [refactor] Migrate NS_STYLE_MASONRY_* defines r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D164422
2023-01-03 12:14:56 +00:00
Oriol Brufau
8847a0669e Bug 1800952 - Compute column-rule-width to 0 when column-rule-style is none. r=emilio
Depends on D164554

Differential Revision: https://phabricator.services.mozilla.com/D164549
2023-01-02 21:11:30 +00:00
Ben Freist
ce6cd37bc7 Bug 1802799 - [refactor] Migrate NS_STYLE_TEXT_DECORATION_STYLE_* defines r=emilio,geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D163177
2022-12-19 22:47:24 +00:00
Noemi Erli
1fd46e75dd Backed out changeset 5e2df12572bc (bug 1798323) for causing failures in test_css-properties-db.js CLOSED TREE 2022-12-19 18:25:03 +02:00
Jonathan Watt
67b52dcd3b Bug 1798323 - Style changes to support the 'page-orientation' property. r=AlaskanEmily
Differential Revision: https://phabricator.services.mozilla.com/D161800
2022-12-19 15:37:38 +00:00
Iulian Moraru
9a68bda010 Backed out changeset 370f2bb05766 (bug 1800952) for causing mass build bustages on ServoCSSPropList.mako.py. CLOSED TREE 2022-12-15 00:43:58 +02:00
Oriol Brufau
7f26be9e72 Bug 1800952 - Compute column-rule-width to 0 when column-rule-style is none. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D164549
2022-12-14 21:22:02 +00:00
Noemi Erli
32e3cc6311 Backed out changeset 5c04131a0427 (bug 1800952) for causing build bustages in ServoCSSPropList CLOSED TREE 2022-12-14 18:52:47 +02:00
Oriol Brufau
726571b313 Bug 1800952 - Compute column-rule-width to 0 when column-rule-style is none. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D164549
2022-12-14 16:40:41 +00:00
Oriol Brufau
e88cac7142 Bug 1804406 - Prevent internal SVG elements from becoming query containers for size features. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D164045
2022-12-07 12:25:34 +00:00
Oriol Brufau
8503cb2ad0 Bug 1803928 - Make mContain and mEffectiveContainment private. r=emilio
Depends on D163779

Differential Revision: https://phabricator.services.mozilla.com/D163783
2022-12-05 11:59:38 +00:00
Oriol Brufau
f07e8d492c Bug 1803928 - Fix style containment not triggered by 'contain'. r=emilio
'container-type' and 'content-visibility' can trigger various kinds of
containment, but this was done via nsStyleDisplay::EffectiveContainment,
to avoid affecting the computed value of 'contain'.

This was fine except for style containment, which needs to set the flag
SELF_OR_ANCESTOR_HAS_CONTAIN_STYLE in order to really work, but this was
only done with 'contain: style'.

So this patch removes nsStyleDisplay::EffectiveContainment, and instead
uses two fields for containment: mContain and mEffectiveContainment.
This is somewhat analogous to mDisplay and mOriginalDisplay, though in
that case the computed value is the modified display.

Also fixes a typo in IsContainStyle() that made it return true for any
kind of containment, not just for style containment.

Differential Revision: https://phabricator.services.mozilla.com/D163779
2022-12-05 11:59:38 +00:00
Csoregi Natalia
331968b159 Backed out 2 changesets (bug 1803928) for causing content-visibility failures. CLOSED TREE
Backed out changeset dcabb419cdbe (bug 1803928)
Backed out changeset 5b1393c957ab (bug 1803928)
2022-12-05 00:24:24 +02:00
Oriol Brufau
bf4845408c Bug 1803928 - Make mContain and mEffectiveContainment private. r=emilio
Depends on D163779

Differential Revision: https://phabricator.services.mozilla.com/D163783
2022-12-04 20:36:08 +00:00
Oriol Brufau
e68bfbe8dc Bug 1803928 - Fix style containment not triggered by 'contain'. r=emilio
'container-type' and 'content-visibility' can trigger various kinds of
containment, but this was done via nsStyleDisplay::EffectiveContainment,
to avoid affecting the computed value of 'contain'.

This was fine except for style containment, which needs to set the flag
SELF_OR_ANCESTOR_HAS_CONTAIN_STYLE in order to really work, but this was
only done with 'contain: style'.

So this patch removes nsStyleDisplay::EffectiveContainment, and instead
uses two fields for containment: mContain and mEffectiveContainment.
This is somewhat analogous to mDisplay and mOriginalDisplay, though in
that case the computed value is the modified display.

Also fixes a typo in IsContainStyle() that made it return true for any
kind of containment, not just for style containment.

Differential Revision: https://phabricator.services.mozilla.com/D163779
2022-12-04 20:36:07 +00:00
Connor Pearson
bf9ac2fb21 Bug 1785117 - Implement CSS mod() and rem() functions. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163166
2022-11-29 13:05:39 +00:00
Ben Freist
a0881d2bec Bug 1801458 - [refactor] Migrate NS_STYLE_UNICODE_BIDI_* defines r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162487
2022-11-22 18:37:02 +00:00
Ben Freist
e3194e24e2 Bug 1800396 - [refactor] Migrate NS_STYLE_TEXT_COMBINE_UPRIGHT_* defines r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D161965
2022-11-14 08:43:36 +00:00