Commit Graph

9071 Commits

Author SHA1 Message Date
Jonathan Kew
fe46c531b3 Bug 1612399 - Don't apply text-combine-upright in sideways-* writing modes. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61326

--HG--
extra : moz-landing-system : lando
2020-01-31 10:11:19 +00:00
Thomas Dolezal
28e6a65cfb Bug 1612143 - Replacing table-layout defines with an enum r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61260

--HG--
extra : moz-landing-system : lando
2020-01-31 01:23:23 +00:00
Emilio Cobos Álvarez
4812f9408a Bug 1611583 - Use cbindgen for css-align types. r=dholbert
This provides stronger typing and removes a bunch of subtle constants matching.

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

--HG--
extra : moz-landing-system : lando
2020-01-31 00:56:49 +00:00
Thomas Dolezal
a63c10f0de Bug 1611041 - Convert image-rendering #defines to an enum class. r=emilio
MANUAL PUSH: Contributor didn't use Phabricator and I don't want patch to rot
2020-01-30 04:50:24 +01:00
Martin McNickle
9f727fc9c5 Bug 1611829 - Convert scroll-behavior #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61164

--HG--
extra : moz-landing-system : lando
2020-01-28 09:12:29 +00:00
Martin McNickle
0c665c265e Bug 1611043 - Convert mask-type #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60987

--HG--
extra : moz-landing-system : lando
2020-01-27 14:59:41 +00:00
Emilio Cobos Álvarez
f97d7df528 Bug 1610085 - Tweak background-color and color handling in ignored-colors mode. r=jwatt
We're resetting `color` to the default color when there's a declaration that
applies in order to make stuff like this:

<div style="color: transparent">
  <div style="color: red">
    Red
  </div>
</div>

To not show transparent. But the behavior we want is more like "override with
default color iff there's no other declaration that would set the color from an
user or UA sheet".

This implements that behavior, plus avoids it if we're not inheriting
from transparent, so that stuff like this preserves the behavior from before bug
844349:

<a href="foo">
  <span style="color: red">Should be the red color</span>
</a>

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

--HG--
extra : moz-landing-system : lando
2020-01-26 22:57:21 +00:00
Csoregi Natalia
3a270b7de3 Backed out changeset 239f7622187e (bug 1610085) for background color failures on test_dont_use_document_colors.html. CLOSED TREE 2020-01-26 23:14:39 +02:00
Emilio Cobos Álvarez
64099dcf90 Bug 1610085 - Tweak background-color and color handling in ignored-colors mode. r=jwatt
We're resetting `color` to the default color when there's a declaration that
applies in order to make stuff like this:

<div style="color: transparent">
  <div style="color: red">
    Red
  </div>
</div>

To not show transparent. But the behavior we want is more like "override with
default color iff there's no other declaration that would set the color from an
user or UA sheet".

This implements that behavior, plus avoids it if we're not inheriting
from transparent, so that stuff like this preserves the behavior from before bug
844349:

<a href="foo">
  <span style="color: red">Should be the red color</span>
</a>

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

--HG--
extra : moz-landing-system : lando
2020-01-26 20:16:47 +00:00
Sakura Mochizuki
edc2287d2f Bug 1611040 - Convert dominant-baseline #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61046

--HG--
extra : moz-landing-system : lando
2020-01-25 10:51:24 +00:00
Boris Chiou
cad48f3f6a Bug 1609786 - Make the empty svg path valid. r=emilio
Per SVG2 spec, the EBNF allows the path data string to be empty.
An empty path data string disables rendering of the path.
Therefore, we should make path('') a valid path string.

The related spec issue: https://github.com/w3c/fxtf-drafts/issues/392.
Now we serialize `path("")` as `path("")` for offset-path and clip-path.

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

--HG--
extra : moz-landing-system : lando
2020-01-24 18:59:03 +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
Martin McNickle
56f3626ca9 Bug 1611044 - Convert stroke-linejoin #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60865

--HG--
extra : moz-landing-system : lando
2020-01-23 17:19:27 +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
Emilio Cobos Álvarez
031b6afee0 Bug 1610801 - Remove font-size calc() hack to propagate keyword information. r=manishearth
It does not make any sense with min() / max() / clamp. So just forget the
keyword info when calc() is used. This also removes a bit of complex / hacky
code.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 23:46:24 +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
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
Ting-Yu Lin
ab534fe8d2 Bug 1308636 Part 3 - Remove moz-prefixed aliases for column-gap and CSS multi-column properties. r=dbaron
Introduce a new pref "layout.css.prefixes.columns" to guard the prefixed
aliases.

The modification to `properties-db.js` was generated by
`./mach devtools-css-db`.

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

--HG--
extra : moz-landing-system : lando
2020-01-16 21:45:19 +00:00
Emilio Cobos Álvarez
6110aba7be Bug 1609489 - Remove lazy_static usage from custom_properties.rs. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D60039

--HG--
extra : moz-landing-system : lando
2020-01-16 05:41:16 +00:00
Emilio Cobos Álvarez
595faf4731 Bug 1609428 - Implement min() / max() / clamp() for simple css types behind a pref. r=boris
So for everything but <length> and <length-percentage>, which have more complex
mechanics.

The pref is off for now of course.

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

--HG--
extra : moz-landing-system : lando
2020-01-15 19:43:08 +00:00
Emilio Cobos Álvarez
28f1dbebc9 Bug 1609256 - Centralize calc function parsing. r=boris
So that extending it to support other math functions like min / max / etc is
simpler.

There should be no behavior change with this patch, though I added a comment to
some places where we don't do calc() clamping correctly (though other browsers
don't either so...).

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

--HG--
extra : moz-landing-system : lando
2020-01-15 00:46:01 +00:00
Emilio Cobos Álvarez
fff6c9e1ac Bug 981248 - Rewrite <input type=number> to avoid an anonymous input. r=masayuki,surkov,jwatt,ntim,jfkthame,smaug
Instead, subclass nsTextControlFrame. This simplifies the code and avoids
correctness issues.

I kept the localization functionality though it is not spec compliant. But I
filed a bug to remove it in a followup.

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

--HG--
extra : moz-landing-system : lando
2020-01-14 19:01:05 +00:00
Emilio Cobos Álvarez
a543b6df2f Bug 844349 - Do not ignore color: transparent in high contrast mode. r=jwatt
PDFJS uses it, for example to allow text selection. It's not great if it shows
on top of the actual PDF :-)

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

--HG--
extra : moz-landing-system : lando
2020-01-14 20:25:03 +00:00
Mihai Alexandru Michis
0d01c60c37 Backed out 2 changesets (bug 981248) for causing multiple failures.
CLOSED TREE

Backed out changeset 7a96708cc8b7 (bug 981248)
Backed out changeset 1eace7bd28d9 (bug 981248)
2020-01-14 19:28:17 +02:00
Emilio Cobos Álvarez
da2e4ef888 Bug 981248 - Rewrite <input type=number> to avoid an anonymous input. r=masayuki,surkov,jwatt,ntim,jfkthame,smaug
Instead, subclass nsTextControlFrame. This simplifies the code and avoids
correctness issues.

I kept the localization functionality though it is not spec compliant. But I
filed a bug to remove it in a followup.

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

--HG--
extra : moz-landing-system : lando
2020-01-14 15:05:22 +00:00
Makoto Kato
29c7b3f5dd Bug 1503656 - Part 3. Don't use hardcoded value for safearea. r=emilio
To implement safe area support on Gecko, we should get safe area from Device.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 11:56:25 +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
Makoto Kato
7574b8612d Bug 1503656 - Part 1. Always use CssEnvironment from media query's device. r=emilio
Although CssEnvironment is in Device of media query implementation, some code
creates CssEnvironment instance without Device. So I would like always to use it from Device of media query.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 11:55:28 +00:00
Emilio Cobos Álvarez
ba0cc69e47 Bug 1607049 - Pack LengthPercentage better. r=jwatt
So that it takes one pointer instead of two, and doesn't make nsStylePosition's
size blow up.

This is not as ugly as I was fearing, thankfully, though it requires a bit of
boilerplate. I think it's acceptable.

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

--HG--
extra : moz-landing-system : lando
2020-01-13 13:23:22 +00:00
Emilio Cobos Álvarez
d4c2489000 Bug 1607049 - Move LengthPercentage to its own file. r=jwatt
I'm (sadly) about to make it a bit more complicated to pack it better. So we
may as well do this so it is easier to reason about navigate.

I also reordered things a bit, and removed some From<> implementations and
such.

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

--HG--
rename : servo/components/style/values/computed/length.rs => servo/components/style/values/computed/length_percentage.rs
extra : moz-landing-system : lando
2020-01-13 13:23:44 +00:00
Emilio Cobos Álvarez
d10341c0bc Bug 1607049 - Split LengthPercentage again. r=boris
This is needed to support min() / max() / clamp(), etc, as those need to be a
tree of values and thus need heap storage.

This unfortunately grows LengthPercentage to be two pointers, which is bad as
it blows up the size of nsStylePosition enough to trigger the size assertions.

This patch comments out the assertion for now, the follow-up patches will
uncomment them.

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

--HG--
extra : moz-landing-system : lando
2020-01-13 13:21:58 +00:00
Xidorn Quan
87fdc21f61 Bug 1513275 - Ensure nested ruby level container don't escape from line break suppression. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D58351

--HG--
extra : moz-landing-system : lando
2020-01-10 23:47:28 +00:00
Emilio Cobos Álvarez
74eedc7178 No bug - Minor comment fix.
Differential Revision: https://phabricator.services.mozilla.com/D59310

--HG--
extra : moz-landing-system : lando
2020-01-09 11:36:02 +00:00
Emilio Cobos Álvarez
65ad59b310 Bug 1607553 - Make an assertion a release assert in nightly. r=heycam
If this can happen legitimately, this will help fuzzers to catch it.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 00:55:18 +00:00
Emilio Cobos Álvarez
547c9db8cd Bug 1606130 - Make display: -moz-box more similar to other display types for block layout. r=jfkthame,surkov
It is unexpected (see bug) that a -moz-box is affected by baseline alignment.
Make -moz-box be block-outside, and -moz-inline-box be inline-outside, instead
of the bespoke thing we have now.

This is more similar to everything else, and fixes the bug.

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

--HG--
extra : moz-landing-system : lando
2020-01-07 21:00:42 +00:00
Bogdan Tara
6571a2a6fb Backed out changeset 23d862866f3a (bug 1606130) for android crashtest complaining about 1547420-1.html 2020-01-07 22:53:10 +02:00
Emilio Cobos Álvarez
ff938720a8 Bug 1606130 - Make display: -moz-box more similar to other display types for block layout. r=jfkthame,surkov
It is unexpected (see bug) that a -moz-box is affected by baseline alignment.
Make -moz-box be block-outside, and -moz-inline-box be inline-outside, instead
of the bespoke thing we have now.

This is more similar to everything else, and fixes the bug.

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

--HG--
extra : moz-landing-system : lando
2020-01-07 18:02:05 +00:00
Emilio Cobos Álvarez
ab672d9f29 Bug 1605803 - Use cbindgen for content property. r=xidorn
This cleans up and also allows us to keep the distinction between content: none
and content: normal, which allows us to fix the computed style we return from
getComputedStyle().

Do this last bit from the resolved value instead of StyleAdjuster, because
otherwise we need to tweak every initial struct for ::before / ::after.

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

--HG--
extra : moz-landing-system : lando
2020-01-05 13:10:39 +00:00
Ting-Yu Lin
9cbd872e72 Bug 1499281 - Remove column-span pref in column.mako.rs. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D58399

--HG--
extra : moz-landing-system : lando
2019-12-31 16:15:12 +00:00