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

12263 Коммитов

Автор SHA1 Сообщение Дата
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
Mats Palmgren 790c50dcf0 Bug 1520396 - [css-logical] Implement the border-block/border-inline shorthands. r=emilio 2019-01-16 19:26:15 +01:00
Mats Palmgren 1db6a31ac4 Bug 1520236 - [css-logical] Implement the border-{block,inline}-{color,style,width} shorthands. r=emilio 2019-01-16 19:26:15 +01:00
Mats Palmgren 0cdadab9e8 Bug 1520229 - [css-logical] Implement the inset-block/inline shorthands. r=emilio 2019-01-16 19:26:14 +01:00
Emilio Cobos Álvarez b44ff327e9 Bug 1520154 - Move cursor to cbindgen. r=boris
The only reason it was on style_traits is so that they could use it from some
other crates, but Servo eventually ends up getting the value from an integer, so
may as well pass it around and do that in the end of the process anyway.

Differential Revision: https://phabricator.services.mozilla.com/D16557
2019-01-16 14:13:07 +01:00
Emilio Cobos Álvarez d3c8dea1ae Bug 1520229 - [css-logical] Implement the inset shorthand. r=mats
Reviewers: mats

Reviewed By: mats

Bug #: 1520229

Differential Revision: https://phabricator.services.mozilla.com/D16704
2019-01-20 18:32:11 +01:00
Mats Palmgren 663f6ee46c Bug 1519944 - [css-logical] Implement the margin-block/inline shorthands. r=emilio 2019-01-15 02:27:44 +01:00
Mats Palmgren 9a48b50d31 Bug 1519847 - [css-logical] Implement the padding-block/inline shorthands. r=emilio 2019-01-14 19:22:03 +01:00
Emilio Cobos Álvarez ecd9b9bc0f Bug 1519729 - Rustfmt recent changes. 2019-01-13 21:55:56 +01:00
Emilio Cobos Álvarez f8f381bf03 Bug 1519629 - Document a few more macros. 2019-01-13 21:55:43 +01:00
lqd 2b08ae08b2 Bug 1519729 - Typo fix in new doc-comment. r=emilio
Cherry-picks a commit from https://github.com/servo/servo/pull/22674

Co-Authored-By: SimonSapin <simon.sapin@exyr.org>
2019-01-13 21:55:05 +01:00
Simon Sapin 9d5e559547 Bug 1519729 - Document public macros. r=emilio
Undocumented public macros emit warnings in nightly-2019-01-11,
and we #![deny] that warning.

Cherry-picks a commit from https://github.com/servo/servo/pull/22674
2019-01-13 21:54:38 +01:00
Simon Sapin 9bdfa9feca Bug 1519729 - Remove unused macro. r=emilio
Cherry-picks a commit from https://github.com/servo/servo/pull/22674
2019-01-13 21:53:43 +01:00
Bobby Holley b381fba212 Bug 1519454 - Put malloc_size_of_derive on crates.io, and add a reduced fork of malloc_size_of for WebRender. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D16353


--HG--
rename : servo/components/malloc_size_of_derive/LICENSE-APACHE => gfx/wr/wr_malloc_size_of/LICENSE-APACHE
rename : servo/components/malloc_size_of_derive/LICENSE-MIT => gfx/wr/wr_malloc_size_of/LICENSE-MIT
rename : servo/components/malloc_size_of_derive/LICENSE-APACHE => third_party/rust/malloc_size_of_derive/LICENSE-APACHE
rename : servo/components/malloc_size_of_derive/LICENSE-MIT => third_party/rust/malloc_size_of_derive/LICENSE-MIT
rename : servo/components/malloc_size_of_derive/lib.rs => third_party/rust/malloc_size_of_derive/lib.rs
2019-01-12 12:36:22 -08:00
Bogdan Tara 1b63fe08ee Backed out 4 changesets (bug 1519454) for api.rs build bustage CLOSED TREE
Backed out changeset 21d74c03c00a (bug 1519454)
Backed out changeset 054028a8d4a7 (bug 1519454)
Backed out changeset e9b1d04247de (bug 1519454)
Backed out changeset f3ef205b4f63 (bug 1519454)

--HG--
rename : third_party/rust/malloc_size_of_derive/LICENSE-APACHE => servo/components/malloc_size_of_derive/LICENSE-APACHE
rename : third_party/rust/malloc_size_of_derive/LICENSE-MIT => servo/components/malloc_size_of_derive/LICENSE-MIT
rename : third_party/rust/malloc_size_of_derive/lib.rs => servo/components/malloc_size_of_derive/lib.rs
2019-01-12 21:54:54 +02:00
Bobby Holley 466c21b4c4 Bug 1519454 - Put malloc_size_of_derive on crates.io, and add a reduced fork of malloc_size_of for WebRender. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D16353

--HG--
rename : servo/components/malloc_size_of_derive/LICENSE-APACHE => gfx/wr/wr_malloc_size_of/LICENSE-APACHE
rename : servo/components/malloc_size_of_derive/LICENSE-MIT => gfx/wr/wr_malloc_size_of/LICENSE-MIT
rename : servo/components/malloc_size_of_derive/LICENSE-APACHE => third_party/rust/malloc_size_of_derive/LICENSE-APACHE
rename : servo/components/malloc_size_of_derive/LICENSE-MIT => third_party/rust/malloc_size_of_derive/LICENSE-MIT
rename : servo/components/malloc_size_of_derive/lib.rs => third_party/rust/malloc_size_of_derive/lib.rs
extra : moz-landing-system : lando
2019-01-12 19:21:56 +00:00
Cameron McCormack 7fc8e05804 Bug 1519296 - Part 4: Remove ServoStyleSet::PrependStyleSheet r=emilio
Depends on D16283

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

--HG--
extra : moz-landing-system : lando
2019-01-12 06:45:45 +00:00
Boris Chiou bdec90c4ee Bug 1348519 - Part 2: Implement Animate for track lists on grid-template-{columns|rows}. r=emilio
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1348519#c6 and
https://github.com/w3c/csswg-drafts/issues/3201:

Currently grid-template-rows/columns interpolate “per computed value”, which
means that if the number of tracks differs, or any track changes to/from a
particular keyword value to any other value, or if a line name is added/removed
at any position, the entire track listing is interpolated as “discrete”.
But we "agree" with two more granular options:

1. Check interpolation type per track, rather than for the entire list, before
   falling back to discrete. I.e. a length-percentage track can animate between
   two values while an adjacent auto track flips discretely to min-content.
2. Allow discrete interpolation of line name changes independently of track
   sizes.

Besides, for the repeat() function, it's complicated to support interpolation
between different repeat types (i.e. auto-fill, auto-fit) and different repeat
counts, so we always fall-back to discrete if the first parameter of repeat()
is different.

Depends on D16339

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

--HG--
extra : moz-landing-system : lando
2019-01-12 02:22:39 +00:00
Boris Chiou 6a58da235c Bug 1348519 - Part 1: Support field_bound on Animate. r=emilio
So we can derive Animate on more generic types.

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

--HG--
extra : moz-landing-system : lando
2019-01-12 02:19:04 +00:00
Daniel Varga 1b2c69a5c1 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2019-01-11 06:23:02 +02:00
Daniel Varga f0a9c979bb Merge mozilla-inbound to mozillia-central. a=merge 2019-01-11 06:14:14 +02:00
Emilio Cobos Álvarez 06e203c285 Bug 1519269 - Rustfmt recent changes. 2019-01-11 01:02:56 +01:00
Shanavas M 03d98acfa8 Bug 1519269 - Remove OrderedMap in favor of IndexMap. r=emilio
This cherry-picks https://github.com/servo/servo/pull/22656.
2019-01-11 01:02:54 +01:00