Граф коммитов

12285 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 99549860f7 Bug 1529058 - Use Rust types from transform-origin / perspective-origin. r=mattwoodrow
Depends on D20381

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

--HG--
extra : moz-landing-system : lando
2019-02-19 20:28:47 +00:00
Emilio Cobos Álvarez c4ae51b99d Bug 1529058 - Use Rust types for perspective and z-index. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D20381

--HG--
extra : moz-landing-system : lando
2019-02-19 23:04:45 +00:00
Asfiya 2b8ec74bf6 Bug 1528940 - convert NS_STYLE_FLEX_DIRECTION to an enum class in nsStyleConsts.h r=emilio
Converted the #define variable NS_STYLE_FLEX_DIRECTION to an enum class in nsStyleConsts.h and made changes in other files that access it

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

--HG--
extra : moz-landing-system : lando
2019-02-19 17:01:59 +00:00
scharing 87df459a63 Bug 1528464 - Convert NS_STYLE_MASK_MODE_* to enum class r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D20063

--HG--
extra : moz-landing-system : lando
2019-02-19 16:54:52 +00:00
Emilio Cobos Álvarez bf84e7fd35 Bug 1528035 - Improve #[derive(Parse)]. r=xidorn
I want to do this so that I can get rid of Either<>. The reasons for getting rid
of either is multiple:

 * It doesn't generate as nice C++ code using cbindgen.
 * It isn't that nice to use either from Rust.
 * cbindgen has bugs with zero-sized types.

I started using this for ColorOrAuto and a few others, for now.

Differential Revision: https://phabricator.services.mozilla.com/D19844
2019-02-19 15:22:55 +01:00
Emilio Cobos Álvarez c9cb04e111 Bug 1527972 - Use Rust types for some misc properties. r=jwatt
-moz-tab-size, border-image-outset and border-image-slice.

This is not a particularly interesting patch, just removes some code. We can
remove way more code when a few related properties are also ported.

Differential Revision: https://phabricator.services.mozilla.com/D19825
2019-02-19 15:22:40 +01:00
Emilio Cobos Álvarez d2cbf071d5 Bug 1528712 - Remove nsFont::featureValueLookup. r=jfkthame
It's a global object, it doesn't have to be stored in nsFont. Pass it from the
caller like the user font set and co.

Depends on D20141

Differential Revision: https://phabricator.services.mozilla.com/D20142
2019-02-19 14:54:04 +01:00
Emilio Cobos Álvarez 8ccb77e27d Bug 1528712 - Remove a couple trivial dependencies on nsPresContext. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D20141
2019-02-19 14:54:01 +01:00
Emilio Cobos Álvarez dad3a20b22 Bug 1525955 - Include anon boxes in CSSPseudoElementType, to remove ComputedStyle::mPseudoTag. r=heycam
This is more consistent with what the Rust bits of the style system do, and
removes a pointer from ComputedStyle which is always nice.

This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as
anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those.

Can't wait for XUL trees to die.

Depends on D19001

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

--HG--
extra : moz-landing-system : lando
2019-02-19 13:44:33 +00:00
Ciure Andrei 965d533ca4 Backed out 2 changesets (bug 1528712) for Linux spcshell and reftest failures (test_ext_browserSettings.js, 1022481-1.html) CLOSED TREE
Backed out changeset 2d5c4e71e258 (bug 1528712)
Backed out changeset d981515b874b (bug 1528712)
2019-02-19 14:25:57 +02:00
Emilio Cobos Álvarez f97a9f50a2 Bug 1528712 - Remove nsFont::featureValueLookup. r=jfkthame
It's a global object, it doesn't have to be stored in nsFont. Pass it from the
caller like the user font set and co.

Depends on D20141

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

--HG--
extra : moz-landing-system : lando
2019-02-18 14:03:47 +00:00
Emilio Cobos Álvarez 522e6c9366 Bug 1528712 - Remove a couple trivial dependencies on nsPresContext. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D20141

--HG--
extra : moz-landing-system : lando
2019-02-19 11:17:28 +00:00
Hiroyuki Ikezoe 64a777f7b5 Bug 1528834 - Implement scroll-snap-align parser and serializer. r=emilio
https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-align

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

--HG--
extra : moz-landing-system : lando
2019-02-18 23:10:08 +00:00
Hiroyuki Ikezoe 0a5721ad9c Bug 1528640 - Implement scroll-padding parser and serializer. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D20103

--HG--
extra : moz-landing-system : lando
2019-02-18 02:46:09 +00:00
Hiroyuki Ikezoe 842f78da12 Bug 1528639 - Implement scroll-margin parser and serializer. r=emilio
The reason why we use  RelaxedAtomBoolis that
ScrollSnapUtils::GetSnapPointForDestination() is called both from the main and
the compositor threads, and the function will have a branch depending on the
pref value.

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

--HG--
extra : moz-landing-system : lando
2019-02-18 02:25:54 +00:00
Jonathan Kingston 83bd9bdac8 Bug 1494034 - Add support for CSS prefers-color-scheme media feature. r=emilio 2019-02-15 21:40:35 +01:00
Cosmin Sabou a4b19fcd61 Merge mozilla-inbound to mozilla-central. a=merge
--HG--
rename : browser/components/nsBrowserContentHandler.js => browser/components/BrowserContentHandler.jsm
2019-02-15 20:39:45 +02:00
Brian Birtles 95e299f85d Bug 1524480 - Don't share styles when an element has animations applied to it; r=emilio
We already avoid putting styles in the shared style cache for an element that
has animations[1] but if we are doing the initial style of two siblings where
the _second_ has animations applied, there is nothing to stop us from trying to
share with the first (un-animated) element. This patch adds a check to prevent
sharing in that case since sharing style between animated elements is unsound
for the reasons described in [1].

A number of tests including:

  testing/web-platform/tests/web-animations/animation-model/animation-types/visibility.html

will fail without this fix once we remove the style flush from
KeyframeEffect::SetKeyframes later in this patch series.

[1] https://searchfox.org/mozilla-central/rev/6e3cc153566f5f288ae768a2172385b8436d61dd/servo/components/style/sharing/mod.rs#597

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

--HG--
extra : moz-landing-system : lando
2019-02-15 06:35:04 +00:00
Emilio Cobos Álvarez 9db2ce6d9b Bug 1527542 - Use rust types for background-size. r=jwatt
Hopefully straight-forward.

Differential Revision: https://phabricator.services.mozilla.com/D19625
2019-02-15 04:09:26 +01:00
Emilio Cobos Álvarez 95454d416b Bug 1527438 - Use Rust types for Position. r=jwatt
This one should be much easier to review / much more pleasant to see :-)

Differential Revision: https://phabricator.services.mozilla.com/D19563
2019-02-15 04:05:32 +01:00
Emilio Cobos Álvarez aec730ed7d Bug 1527410 - Preserve calc() rounding behavior. r=heycam,jrmuizel
See the comment. I don't really this is ideal, I filed bug 1528114 to
investigate changing that.

Differential Revision: https://phabricator.services.mozilla.com/D19584
2019-02-15 03:59:34 +01:00
Emilio Cobos Álvarez e9ae3b0907 Bug 1527410 - Use Rust sizes for flex-basis, width, height, and their min/max properties. r=jwatt
Really sorry for the size of the patch :(

Only intentional behavior change is in the uses of HasLengthAndPercentage(),
where it's easier to do the right thing. The checks that used to check for
(IsCalcUnit() && CalcHasPercentage()) are wrong since bug 957915.

Differential Revision: https://phabricator.services.mozilla.com/D19553
2019-02-15 03:59:31 +01:00
Emilio Cobos Álvarez dc933f3117 Bug 1526736 - Rename MozLength to Size, and MaxLength to MaxSize. r=heycam
MozLength is not a very descriptive name. If we're going to use it in both Gecko
and Servo we may as well name it something more accurate.

I would've chosen `ContentSize` per CSS2[1][2] if it wasn't a lie in presence
of box-sizing. I don't have better ideas than `Size`, given that.

[1]: https://drafts.csswg.org/css2/visudet.html#propdef-width
[2]: https://drafts.csswg.org/css2/box.html#content-width

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

--HG--
extra : moz-landing-system : lando
2019-02-11 10:59:49 +00:00
Alan Jeffrey 9dbc608ab3 No bug - Cherry-pick changes from Servo PR #22825. r=npotb 2019-02-10 06:51:02 +01:00
Emilio Cobos Álvarez 29b0cd4d4c Bug 1523140 - Derive more length stuff, and shrink MaxLength / MozLength's repr(C) representation. r=boris
This patch:

 * Makes LengthPercentageOrAuto generic, and removes a bunch of code fo
   LengthPercentageOrNone, which was used only for servo and now can use the
   normal MaxLength (with a cfg() guard for the ExtremumLength variant).

 * Shrinks MaxLength / MozLength's repr(C) reperesentation by reducing enum
   nesting. The shrinking is in preparation for using them from C++ too, though
   that'd be a different bug.

 * Moves NonNegative usage to the proper places so that stuff for them can be
   derived.

I did this on top of bug 1523071 to prove both that it could be possible and
that stuff wasn't too messy. It got a bit messy, but just because of a bug I
had fixed in bindgen long time ago already, so this updates bindgen's patch
version to grab a fix instead of ugly workarounds :)

Differential Revision: https://phabricator.services.mozilla.com/D17762
2019-02-10 06:51:00 +01:00
Emilio Cobos Álvarez 8101ae2ea8 Bug 1523071 - Use Rust lengths for margin / padding / inset. r=jwatt
Also for the intersection observer root margin, since it was easier to fix it
up and clean it up than not doing it.

This is the first big step to get rid of nscoord. It duplicates a bit of logic
in nsLayoutUtils since for now max/min-width/height are still represented with
nsStyleCoord, but I think I prefer to land this incrementally.

I didn't add helpers for the physical accessors of the style rect sides that
nsStyleSides has (top/bottom/left/right) since I think we generally should
encourage the logical versions, but let me know if you want me to do that.

Differential Revision: https://phabricator.services.mozilla.com/D17739
2019-02-10 04:11:58 +01:00
Emilio Cobos Álvarez ca19235faa Bug 1523071 - Use the style system's LengthPercentage for shape-margin. r=jwatt
This also makes us pass a few WPTs because we stop losing precision when
serializing the computed value.

Differential Revision: https://phabricator.services.mozilla.com/D17738
2019-02-10 04:11:00 +01:00
Emilio Cobos Álvarez 0b8aea8fdd Bug 1523071 - Add bindings for LengthPercentage, and use it for text-indent. r=jwatt
Which is the only property that uses LengthPercentage alone.

Differential Revision: https://phabricator.services.mozilla.com/D17737
2019-02-10 04:10:24 +01:00
Emilio Cobos Álvarez 286396f97a Bug 1525955 - Cleanup a bit after bug 1525371. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D19001

--HG--
extra : moz-landing-system : lando
2019-02-08 22:40:26 +00:00
Emilio Cobos Álvarez a820ea341b Bug 1525371 - followup: fix rusttests to reopen the CLOSED TREE. 2019-02-07 11:38:57 +01:00
Emilio Cobos Álvarez 38e4d112d2 Bug 1440384 - Generate combined transform just once. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D18567
2019-02-04 23:14:41 +01:00
Emilio Cobos Álvarez a155f63750 Bug 1523712 - Make -moz-binding chrome / UA only. r=boris
But enable it in all tests because a lot of them rely on using it in the
style="" attribute for example, or in inline stylesheets, which will no longer
parse this (even in chrome documents), and we don't want to rewrite all the XUL
and XBL tests.

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

--HG--
extra : moz-landing-system : lando
2019-01-30 20:55:54 +00:00
Emilio Cobos Álvarez 6f7882539b No bug - rustfmt recent changes. 2019-01-29 03:22:06 +01:00
Emilio Cobos Álvarez 7c36c5a9ae Bug 1523142 - Simplify some conversion code used for mapped attributes. r=firefox-style-system-reviewers,boris
These days for the types we share computed value representation we don't really
need any special code.

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

--HG--
extra : moz-landing-system : lando
2019-01-28 00:04:06 +00:00
Emilio Cobos Álvarez 1381add9e4 Bug 1521405 - Cleanup a few shorthand properties. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D17082
2019-01-23 18:53:45 +01:00
Bobby Holley 819658d44b Bug 1521187 - Derive more. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D17029
2019-01-22 12:19:22 -08:00
Bobby Holley c0182b02f9 Bug 1521187 - Add a dependency on derive_more. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D17028


--HG--
rename : third_party/rust/semver/.cargo-checksum.json => third_party/rust/semver-0.6.0/.cargo-checksum.json
rename : third_party/rust/semver/Cargo.toml => third_party/rust/semver-0.6.0/Cargo.toml
rename : third_party/rust/semver/README.md => third_party/rust/semver-0.6.0/README.md
rename : third_party/rust/semver/src/lib.rs => third_party/rust/semver-0.6.0/src/lib.rs
rename : third_party/rust/semver/src/version.rs => third_party/rust/semver-0.6.0/src/version.rs
rename : third_party/rust/semver/src/version_req.rs => third_party/rust/semver-0.6.0/src/version_req.rs
2019-01-22 12:19:22 -08:00
Cameron McCormack 6898c96479 Bug 1521652 - Run rustfmt on servo/ports/geckolib/. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D17177

--HG--
extra : moz-landing-system : lando
2019-01-22 01:59:21 +00:00
Razvan Maries e89eab8264 Merge mozilla-inbound to mozilla-central a=merge 2019-01-21 13:34:31 +02:00
Emilio Cobos Álvarez c16bf47250 Bug 1521399 - Remove layout.css.overflow.moz-scrollbars.enabled. r=mats
We've been shipping it for a few releases already, see bug 1481125.

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

--HG--
extra : moz-landing-system : lando
2019-01-21 01:35:00 +00:00
Emilio Cobos Álvarez 330daedbea Bug 1521392 - Make tidy happy. 2019-01-20 17:52:24 +01:00
Emilio Cobos Álvarez 9a934ed822 Bug 1521392 - Cherry-pick Servo-only changes to malloc_size_of. 2019-01-20 16:29:22 +01:00
Emilio Cobos Álvarez ea73c6b7e9 Bug 1521392 - Fix servo build and rustfmt recent changes. 2019-01-20 16:29:19 +01:00
Emilio Cobos Álvarez 564b5b883b Bug 1520989 - Represent the percentage in LengthPercentage with something other than an option. r=firefox-style-system-reviewers,boris
Not the prettiest, but it will work, and LengthPercentage will be 12 bytes which is pretty good (we could do better if wanted I guess):

  * Au(i32) length;
  * f32 percentage;
  * AllowedNumericType(u8) clamping_mode;
  * bool has_percentage;
  * bool was_calc;

This will allow me to start moving C++ stuff to use this representation.

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

--HG--
extra : moz-landing-system : lando
2019-01-18 19:32:27 +00:00
Martin Stransky 8ddc948f81 Bug 1433667 - Honour system titlebar button left/right placement, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D16466

--HG--
extra : moz-landing-system : lando
2019-01-18 13:52:29 +00:00
Mats Palmgren 9c04886e64 Bug 1520684 part 2 - [css-logical] Implement the flow-relative border-radius properties. r=emilio 2019-01-17 21:49:07 +01:00
Mats Palmgren 5890654480 Bug 1520684 part 1 - Add plumbing for handling physical/logical corner values. r=emilio 2019-01-17 21:49:07 +01:00
Mats Palmgren e11d61d0d9 Bug 1520236 - [css-logical] Implement the border-{block,inline}-{color,style,width} shorthands. r=emilio 2019-01-17 20:02:41 +01:00
Martin Stransky 53be695239 Bug 1490344 - [Linux/Gtk] Enable hidden system titlebar by default on Gnome, r=dao
This patch implements -moz-gtk-csd-hide-titlebar-by-default media query
to check if the system titlebar should be disabled by default on Linux systems
(it's already disabled on Window/Mac).

It also removes explicit definition of browser.tabs.drawInTitlebar preference on Linux.
When browser.tabs.drawInTitlebar is missing the -moz-gtk-csd-hide-titlebar-by-default
is used to obtain the titlebar state. When browser.tabs.drawInTitlebar is set
in about:config or by Customize menu, the user peference is used instead of the default.

It also fixes a -moz-gtk-csd-available media query,
it was always true regardless the actual system setting.

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

--HG--
extra : moz-landing-system : lando
2019-01-17 12:44:49 +00:00
Noemi Erli d3bda31250 Backed out changeset 009cf5f885ba (bug 1520236) for multiple failures in logical-box-border-color-visited-link-002.html 2019-01-17 01:18:00 +02:00