Commit Graph

840 Commits

Author SHA1 Message Date
Cameron McCormack
5e27c1bd6b Bug 1642261 - Part 2: Add telemetry for -moz-appearance usage. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77637
2020-06-05 00:39:50 +00:00
Emilio Cobos Álvarez
31ea245f41 Bug 1643201 - Miscellaneous build fixes.
Depends on D78198

Differential Revision: https://phabricator.services.mozilla.com/D78199
2020-06-04 00:35:08 +00:00
Bogdan Tara
ffdcf42e89 Backed out 2 changesets (bug 1642261) for browser_use_counters.js failures CLOSED TREE
Backed out changeset dd4c99038ede (bug 1642261)
Backed out changeset 308d2f7a4a13 (bug 1642261)
2020-06-03 11:43:20 +03:00
Cameron McCormack
061da14b2e Bug 1642261 - Part 2: Add telemetry for -moz-appearance usage. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77637
2020-06-03 05:15:21 +00:00
Narcis Beleuzu
726ebdec39 Backed out 2 changesets (bug 1642261) for mochitest failures on test_property_database.html . CLOSED TREE
Backed out changeset 32b26c1984f6 (bug 1642261)
Backed out changeset 68456151c046 (bug 1642261)
2020-06-03 07:30:23 +03:00
Cameron McCormack
8cf9670c90 Bug 1642261 - Part 2: Add telemetry for -moz-appearance usage. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77637
2020-06-02 13:15:04 +00:00
Boris Chiou
57938596a7 Bug 1640036 - Update aspec-ratio syntax for HTML IMG mapped ratio. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D76942
2020-05-27 21:43:00 +00:00
Boris Chiou
599c6939d9 Bug 1635939 - Let aspect-ratio (css-sizing-4) support 'auto | <ratio>'. r=emilio
In order to test its parsing and serialization, we expose it but protect
it behind a pref.

Besides, I would like to drop layout.css.aspect-ratio-number.enabled in
the next patch because the spec has been updated. It seems we don't have
to keep this pref and we should always use Number.

Differential Revision: https://phabricator.services.mozilla.com/D74955
2020-05-21 06:45:10 +00:00
Cameron McCormack
3ccaaa0422 Bug 1621773 - Gracefully handle errors creating shared memory UA style sheets. r=emilio
We still panic in a debug build, so that developers can notice when they
need to add a new static atom after modifying UA sheets.

We also add telemetry to note when this happens, add an app note to a
crash report, in case any crash later on occurs, and re-up the existing,
expired shared memory sheet telemetry probes so we can look at them
again.

Differential Revision: https://phabricator.services.mozilla.com/D73188
2020-05-11 00:11:45 +00:00
Simon Giesecke
40a765717d Bug 1626570 - Improve handling of copying arrays in layout/style/ and servo/. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D72351
2020-05-05 10:42:23 +00:00
Razvan Maries
c2b627950c Backed out 10 changesets (bug 1626570) for build bustages. CLOSED TREE
Backed out changeset a3f17d392234 (bug 1626570)
Backed out changeset 5247e1ddd5d6 (bug 1626570)
Backed out changeset c339fd44c9f8 (bug 1626570)
Backed out changeset 4c69a4c013b3 (bug 1626570)
Backed out changeset e85450d69351 (bug 1626570)
Backed out changeset 793f978248b3 (bug 1626570)
Backed out changeset 68b4c2418d83 (bug 1626570)
Backed out changeset 52d0911d4ad3 (bug 1626570)
Backed out changeset a7d4e3a59ee3 (bug 1626570)
Backed out changeset 6c06d397a5d2 (bug 1626570)
2020-05-05 13:37:08 +03:00
Simon Giesecke
e59bae7061 Bug 1626570 - Improve handling of copying arrays in layout/style/ and servo/. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D72351
2020-05-05 09:46:56 +00:00
Philipp Zech
e7364f83d0 Bug 1625745 - Convert counter-system #defines to enum classes. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D72554
2020-05-03 14:36:55 +00:00
Emilio Cobos Álvarez
6341ebf29a Bug 1632363 - Fix some warnings introduced by the previous patches.
MANUAL PUSH: Avoid reviewer information from previous patches from
getting lost.
2020-04-23 05:11:04 +02:00
Emilio Cobos Álvarez
2be2ef7470 Bug 1630676 - Reformat recent changes, various build fixes, and tidy fixes. 2020-04-16 21:17:50 +02:00
Ciure Andrei
aec781a233 Backed out 11 changesets (bug 1630676) for causing multiple failures CLOSED TREE
Backed out changeset c1fbe364b76c (bug 1630676)
Backed out changeset 629970c8f0b7 (bug 1630676)
Backed out changeset 1530f4a9aef2 (bug 1630676)
Backed out changeset a5b60fb5a0e1 (bug 1630676)
Backed out changeset a6e1a31c3e0d (bug 1630676)
Backed out changeset 4df9717e28f0 (bug 1630676)
Backed out changeset c76b0b0e503b (bug 1630676)
Backed out changeset 3c89aec57d0a (bug 1630676)
Backed out changeset 369cf504584d (bug 1630676)
Backed out changeset d7eff4acb616 (bug 1630676)
Backed out changeset 1d47c9354eeb (bug 1630676)
2020-04-16 21:45:51 +03:00
Emilio Cobos Álvarez
a891140d96 Bug 1630676 - Fix a typo introduced earlier in this bug.
MANUAL PUSH: orange

CLOSED TREE
2020-04-16 19:25:26 +02:00
Emilio Cobos Álvarez
694173c605 Bug 1630676 - Reformat recent changes, various build fixes, and tidy fixes.
MANUAL PUSH: Review information for upstream patches would get lost otherwise.
2020-04-16 18:38:02 +02:00
Cameron McCormack
7c920706b1 Bug 1623819 - Part 2: Assert that initial values in style structs match those in property definitions. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67930

--HG--
extra : moz-landing-system : lando
2020-04-08 05:31:26 +00:00
Emilio Cobos Álvarez
a214514a58 Bug 1624080 - Simplify the implementation of HasAuthorSpecifiedRules. r=heycam
This patch computes the author-specified properties during the CSS cascade, and
removes the complex rule-tree-based implementation that tries to do the cascade
again.

This changes behavior in two ways, one of them which is not observable to
content, I believe:

 * revert now re-enables the native styling. This was brought up in
   https://github.com/w3c/csswg-drafts/issues/4777 and I think it is a bug-fix.

   This is observable to content, and I'm adding a test for it.

 * We don't look at inherited styles from our ancestors when `inherit` is
   specified in a non-author stylesheet. This was introduced for bug 452969 but
   we don't seem to inherit background anymore for file controls or such. It
   seems back then file controls used to have a text-field.

   I audited forms.css and ua.css and we don't explicitly inherit
   padding / border / background-color into any nested form control.

We keep the distinction between border/background and padding, because the later
has some callers. I think we should try to align with Chromium in the long run
and remove the padding bit.

We need to give an appearance to the range-thumb and such so that we can assert
that we don't call HasAuthorSpecifiedRules on non-themed stuff. I used a new
internal value for that.

Differential Revision: https://phabricator.services.mozilla.com/D67722

--HG--
extra : moz-landing-system : lando
2020-03-26 16:48:01 +00:00
Razvan Maries
7155f2665a Backed out changeset ac0d06c0ca93 (bug 1624080) for assertion failures. CLOSED TREE 2020-03-26 16:52:18 +02:00
Emilio Cobos Álvarez
c556351cd0 Bug 1624080 - Simplify the implementation of HasAuthorSpecifiedRules. r=heycam
This patch computes the author-specified properties during the CSS cascade, and
removes the complex rule-tree-based implementation that tries to do the cascade
again.

This changes behavior in two ways, one of them which is not observable to
content, I believe:

 * revert now re-enables the native styling. This was brought up in
   https://github.com/w3c/csswg-drafts/issues/4777 and I think it is a bug-fix.

   This is observable to content, and I'm adding a test for it.

 * We don't look at inherited styles from our ancestors when `inherit` is
   specified in a non-author stylesheet. This was introduced for bug 452969 but
   we don't seem to inherit background anymore for file controls or such. It
   seems back then file controls used to have a text-field.

   I audited forms.css and ua.css and we don't explicitly inherit
   padding / border / background-color into any nested form control.

We keep the distinction between border/background and padding, because the later
has some callers. I think we should try to align with Chromium in the long run
and remove the padding bit.

We need to give an appearance to the range-thumb and such so that we can assert
that we don't call HasAuthorSpecifiedRules on non-themed stuff. I used a new
internal value for that.

Differential Revision: https://phabricator.services.mozilla.com/D67722

--HG--
extra : moz-landing-system : lando
2020-03-26 13:23:42 +00:00
Erik Nordin
17dbae2125 Bug 1613511 - Disallow @import rules for all Constructable StyleSheets functions r=emilio
- Add enum AllowImportRules to CSS parsing.
- `replaceSync()` will skip over @import rules and continue parsing.
- `replace()` will skip over @import rules and continue parsing.
- `insertRule()` will throw a syntax error on @import rules.
- Modify WPT test cases to reflect these changes.

Differential Revision: https://phabricator.services.mozilla.com/D61882

--HG--
extra : moz-landing-system : lando
2020-03-12 18:11:09 +00:00
Hiroyuki Ikezoe
f0b17ecc30 Bug 1510120 - Block running background-color animation on the compositor if there is any current-color keyframe. r=boris,flod
Differential Revision: https://phabricator.services.mozilla.com/D63629

--HG--
extra : moz-landing-system : lando
2020-03-03 21:48:01 +00:00
Emilio Cobos Álvarez
5e65211744 Bug 1617472 - Use enums for text-align / text-align-last. r=jfkthame
This also fixes some backwards logic in nsBlockFrame::ReflowDirtyLines, and adds
some static assertions to nsGenericHTMLElement that almost cause a very subtle
bug.

Depends on D63792

Differential Revision: https://phabricator.services.mozilla.com/D63793

--HG--
extra : moz-landing-system : lando
2020-02-24 13:32:57 +00:00
Emilio Cobos Álvarez
d6aacafdfd Bug 1614198 - Merge ImageLayer and Image. r=heycam
ImageLayer is almost the only usage of Image, so keeping them in the same enum
makes the resulting C++ struct smaller, and makes it map more cleanly to
nsStyleImage.

Differential Revision: https://phabricator.services.mozilla.com/D62161

--HG--
extra : moz-landing-system : lando
2020-02-10 20:02:31 +00:00
Mihai Alexandru Michis
a53731fa59 Backed out changeset a3695dec8b66 (bug 1614198) for causing bustages in ImageLayer
CLOSED TREE
2020-02-10 21:48:26 +02:00
Emilio Cobos Álvarez
0ca6f95831 Bug 1614198 - Merge ImageLayer and Image. r=heycam
ImageLayer is almost the only usage of Image, so keeping them in the same enum
makes the resulting C++ struct smaller, and makes it map more cleanly to
nsStyleImage.

Differential Revision: https://phabricator.services.mozilla.com/D62161

--HG--
extra : moz-landing-system : lando
2020-02-10 19:25:40 +00:00
Emilio Cobos Álvarez
ca641d574f Bug 1612114 - Invalidate shadow root style data on insertion if needed. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D61293

--HG--
extra : moz-landing-system : lando
2020-02-03 12:40:36 +00:00
Emilio Cobos Álvarez
1fdf0e61d3 Bug 1611912 - Add a style flag for the root element style. r=heycam
This is needed to make the root element not a containing block in presence of
filters or what not.

Differential Revision: https://phabricator.services.mozilla.com/D61167

--HG--
extra : moz-landing-system : lando
2020-01-31 14:51:06 +00:00
Emilio Cobos Álvarez
6bfbf10f25 Bug 1611711 - Remove kCursorKTable. r=jwatt
(And while at it, format the end of the other keyword tables so that
cleanup_ktables.py works).

It seems `Window.setCursor` is only used once in our code, maybe
we should remove it...

Differential Revision: https://phabricator.services.mozilla.com/D61090

--HG--
extra : moz-landing-system : lando
2020-01-26 20:17:41 +00:00
Emilio Cobos Álvarez
a25126cd0d Bug 1611181 - Make direction use an enum class. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D60857

--HG--
extra : moz-landing-system : lando
2020-01-24 11:46:14 +00:00
Emilio Cobos Álvarez
fd83f48756 Bug 1609737 - Simplify calc expressions earlier. r=boris
This simplifies a bit the code, and guarantees that all calc()s have percentages
and lengths.

I also wanted to remove unclamped_length() / specified_percentage() (for the
same reason as the above patch), but they're needed for animations for now. When
I implement min() / max() for <length-percentage> they'll be fixed.

Differential Revision: https://phabricator.services.mozilla.com/D60194

--HG--
extra : moz-landing-system : lando
2020-01-23 09:18:39 +00:00
Emilio Cobos Álvarez
caa966f9de Bug 1609737 - Forbid accessing the length and percentage parts of a LengthPercentage separately. r=boris
This is just not a thing you can do if you have min() / max() / etc, as the min
/ max value may depend on the percentage basis.

Differential Revision: https://phabricator.services.mozilla.com/D60168

--HG--
extra : moz-landing-system : lando
2020-01-23 09:18:39 +00:00
Cosmin Sabou
39c82e1497 Backed out 2 changesets (bug 1609737) for causing build bustages on nsCSSRenderingGradients after backing out Bug 1609711. CLOSED TREE
Backed out changeset d12980bbc425 (bug 1609737)
Backed out changeset 51f3f1a1efb8 (bug 1609737)
2020-01-23 07:39:48 +02:00
Emilio Cobos Álvarez
9b78285fd3 Bug 1609737 - Simplify calc expressions earlier. r=boris
This simplifies a bit the code, and guarantees that all calc()s have percentages
and lengths.

I also wanted to remove unclamped_length() / specified_percentage() (for the
same reason as the above patch), but they're needed for animations for now. When
I implement min() / max() for <length-percentage> they'll be fixed.

Differential Revision: https://phabricator.services.mozilla.com/D60194

--HG--
extra : moz-landing-system : lando
2020-01-23 00:36:34 +00:00
Emilio Cobos Álvarez
b06718c3dc Bug 1609737 - Forbid accessing the length and percentage parts of a LengthPercentage separately. r=boris
This is just not a thing you can do if you have min() / max() / etc, as the min
/ max value may depend on the percentage basis.

Differential Revision: https://phabricator.services.mozilla.com/D60168

--HG--
extra : moz-landing-system : lando
2020-01-23 00:36:27 +00:00
Boris Chiou
98e40ec294 Bug 1592822 - Replace StyleVecU8 with ipc::ByteBuf. r=emilio
We generate ByteBuf by rust bindgen, so we can drop StyleVecU8.
One potential follow-up is that we can merge this together with WrVecU8.

Differential Revision: https://phabricator.services.mozilla.com/D60328

--HG--
rename : ipc/glue/ByteBuf.h => ipc/glue/ByteBufUtils.h
extra : moz-landing-system : lando
2020-01-22 20:18:40 +00:00
Boris Chiou
ffa1ebad7b Bug 1592822 - Use Serde for OffsetRotate and PositionOrAuto. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60088

--HG--
extra : moz-landing-system : lando
2020-01-22 20:18:38 +00:00
Boris Chiou
14387265a7 Bug 1592822 - Use Serde for SVGOffsetPath. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60087

--HG--
extra : moz-landing-system : lando
2020-01-22 20:18:35 +00:00
Boris Chiou
38cc52c091 Bug 1592822 - Use Serde for Transform. r=emilio
Though this may make us use more space when serializing
StyleTransform, but we don't have to do extra conversion on the compostior
side, and this makes us easier to maintain the Rust type.

Differential Revision: https://phabricator.services.mozilla.com/D60045

--HG--
extra : moz-landing-system : lando
2020-01-22 20:20:38 +00:00
Boris Chiou
7b90a66fcb Bug 1592822 - Use Serde for rotate, scale, and translate properties. r=emilio
The only drawback is: we resolve LengthPercentage value before passing
translate property through IPC, so its percentage part is redundant.
However, this makes us easier to maintain the Rust type.

Differential Revision: https://phabricator.services.mozilla.com/D60044

--HG--
extra : moz-landing-system : lando
2020-01-22 20:18:31 +00:00
Bogdan Tara
958c34b738 Backed out 6 changesets (bug 1592822) for bustages complaining about layout/painting/nsDisplayList.cpp CLOSED TREE
Backed out changeset 90d0f2ebd310 (bug 1592822)
Backed out changeset 9890bad86a0e (bug 1592822)
Backed out changeset 43870cc90433 (bug 1592822)
Backed out changeset d80e0e3f5b87 (bug 1592822)
Backed out changeset 99be49183325 (bug 1592822)
Backed out changeset 9ce641556acc (bug 1592822)

--HG--
extra : histedit_source : fa4e4b2c899510f1d39ee3baa0374e2ce16d2815
2020-01-22 21:17:39 +02:00
Boris Chiou
4f3076794c Bug 1592822 - Replace StyleVecU8 with ipc::ByteBuf. r=emilio
We generate ByteBuf by rust bindgen, so we can drop StyleVecU8.
One potential follow-up is that we can merge this together with WrVecU8.

Differential Revision: https://phabricator.services.mozilla.com/D60328

--HG--
rename : ipc/glue/ByteBuf.h => ipc/glue/ByteBufUtils.h
extra : moz-landing-system : lando
2020-01-22 18:42:54 +00:00
Boris Chiou
e10013895e Bug 1592822 - Use Serde for OffsetRotate and PositionOrAuto. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60088

--HG--
extra : moz-landing-system : lando
2020-01-22 18:40:19 +00:00
Boris Chiou
40f3cb3d65 Bug 1592822 - Use Serde for SVGOffsetPath. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60087

--HG--
extra : moz-landing-system : lando
2020-01-22 18:40:11 +00:00
Boris Chiou
9735c2e972 Bug 1592822 - Use Serde for Transform. r=emilio
Though this may make us use more space when serializing
StyleTransform, but we don't have to do extra conversion on the compostior
side, and this makes us easier to maintain the Rust type.

Differential Revision: https://phabricator.services.mozilla.com/D60045

--HG--
extra : moz-landing-system : lando
2020-01-22 18:40:09 +00:00
Boris Chiou
73f0ae66a9 Bug 1592822 - Use Serde for rotate, scale, and translate properties. r=emilio
The only drawback is: we resolve LengthPercentage value before passing
translate property through IPC, so its percentage part is redundant.
However, this makes us easier to maintain the Rust type.

Differential Revision: https://phabricator.services.mozilla.com/D60044

--HG--
extra : moz-landing-system : lando
2020-01-22 18:40:07 +00:00
nordzilla
5465ed1ec0 Bug 1607268 - Implement replaceSync() Functionality r=emilio,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D58881

--HG--
extra : moz-landing-system : lando
2020-01-14 22:34:40 +00:00
Makoto Kato
c2e7d5dc85 Bug 1503656 - Part 2. Use Device for parameter instead of CssEnvironment. r=emilio
CssEnvironment alwasy is in Device, so use Device as parameter instead of CssEnvironment.

Differential Revision: https://phabricator.services.mozilla.com/D52507

--HG--
extra : moz-landing-system : lando
2020-01-08 11:56:25 +00:00