Commit Graph

11989 Commits

Author SHA1 Message Date
kingdido999
f9451c567a Bug 1491577 - Format hashglobe. r=emilio
This cherry-picks servo/servo#21648.
2018-09-15 19:21:23 +02:00
Hiroyuki Ikezoe
17186e2c2f Bug 1483111 - Implement any-hover and any-pointer media queries features. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3609
2018-08-17 20:29:37 +09:00
Nicholas Nethercote
67bc77d4cf Bug 1497734 - Rename nsStaticAtom subclasses. r=heycam
Specifically:
- nsICSSAnonBoxPseudo --> nsCSSAnonBoxPseudoStaticAtom
- nsICSSPseudoElement --> nsCSSPseudoElementStaticAtom

The `nsI` prefix isn't necessary because these are no longer XPIDL types, and
the `StaticAtom` suffix makes their meaning clearer.

--HG--
extra : rebase_source : b68dd7c73f5036dcd6be4c3700b757441f59f9f2
2018-10-10 16:49:13 +11:00
Hiroyuki Ikezoe
ef03e2a299 Bug 1035774 - Add media feature keys for hover and pointer. r=heycam,emilio
Summary:
https://drafts.csswg.org/mediaqueries-4/#hover
https://drafts.csswg.org/mediaqueries-4/#pointer

In this patch series, we don't introduce any-hover and any-pointer media
features yet, but functionalities for them on each platform backends will be
introduced in this patch series, so eIntID_AllPointerCapabilities and relevant
stuff is added in this patch for the convenience that each platform backends
can be reviewed at once.

Differential Revision: https://phabricator.services.mozilla.com/D3296
2018-08-14 17:13:04 +09:00
Cameron McCormack
fe196275ba Bug 1489529 - Update comments to no longer point to nsRuleNode. r=emilio
There are a few mentions of nsRuleNode left but they are mostly
historical references so it makes sense to keep them.

Differential Revision: https://phabricator.services.mozilla.com/D5505
2018-09-12 17:37:37 +10:00
Brad Werth
0af3cd1d2f Bug 1434963 Part 2: Expand the Parser trait to allow anonymous CORS to be applied. r=emilio
Depends on D5106

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

--HG--
extra : moz-landing-system : lando
2018-09-11 18:11:05 +00:00
Brad Werth
1795d0bec9 Bug 1434963 Part 1: Change Gecko_ImageValue_Create to take a CORS mode argument. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D5106

--HG--
extra : moz-landing-system : lando
2018-09-11 18:11:02 +00:00
Emilio Cobos Álvarez
e1f2213a03 Bug 1490311 - Remove unused nsStyleFont::{EnableZoom, UnZoomText}. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D5530
2018-09-11 20:08:19 +02:00
Emilio Cobos Álvarez
1f3f128954 Bug 1489676 - Teach ComputeSquaredDistance derive about #[animation(constant)]. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D5337
2018-09-11 00:12:49 +02:00
Daniel Varga
d34223c4cb Backed out changeset 85d1a0c3f60c (bug 1489676) for mochitest failures at dom/animation/test/mozilla/test_distance_of_path_function.html on a CLOSED TREE 2018-09-10 13:36:56 +03:00
Emilio Cobos Álvarez
911670e275 Bug 1489676 - Teach ComputeSquaredDistance derive about #[animation(constant)]. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D5337

--HG--
extra : moz-landing-system : lando
2018-09-10 09:42:27 +00:00
Henri Sivonen
1a38ec4710 Bug 1486711 - Fill logically uninitialized parts of an XPCOM string's buffer with a marker byte in debug builds. r=froydnj
MozReview-Commit-ID: IwLikJpacAW

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

--HG--
extra : moz-landing-system : lando
2018-09-07 05:47:57 +00:00
chansuke
41097313c4 Bug 1489862 - Format style component. r=emilio
This cherry-picks servo/servo#21652.
2018-09-09 17:03:19 +02:00
Boris Chiou
58b7c8f2bd Bug 1486094 - Part 5: Use the standalone struct and enum for the flags in SVG path. r=emilio,birtles
We define the standalone types for using derive macro easily and overriding
the behaviors of this traits. This could avoid defining the general
behavior of booleans.

Depends on D4788

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

--HG--
extra : moz-landing-system : lando
2018-09-07 22:25:59 +00:00
Boris Chiou
6604dde882 Bug 1486094 - Part 2: Make offset-path:path() animatable. r=birtles
Here, we change the animation type of offset-path as ComputedValue, so
we could do animation on it. Also enable the wpt for offset-path
interpolation. In test_transition_per_property.html, we add some basic tests
ifor offset-path.

ToAnimatedZero for PathCommand will be dropped later.

Because the animations of arcs with mismatched flags are fallen back to
discrete animations, the result of getComputedValue is not normalized in this
case. This makes some wpt failed even though the progress is 100%.

Depends on D4786

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

--HG--
extra : moz-landing-system : lando
2018-09-07 22:29:12 +00:00
Boris Chiou
7f3e5437ff Bug 1486094 - Part 1: Make SVGPathData and |clip-path:path()| animatable. r=birtles
Implement Animate trait for SVGPathData.

The basic idea is: we normalize |this| and |other| svg paths, and then
do interpolation on the normalized svg paths. The normalization is to
convert relative coordinates into absolute coordinates, so we could do
real number interpolation on each path command directly.

In this patch, we also make |clip-path:path()| animatable.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 22:15:50 +00:00
chansuke
0f1a2fb4bc Bug 1489667 - Format component of style_derive. r=emilio
This cherry-picks servo/servo#21635
2018-09-08 00:22:21 +02:00
Nicholas Nethercote
7398ecce66 Bug 1449787 - Make static atom pointers constexpr. r=froydnj,emilio
This saves one word per static atom, per process.

The `nsGkAtoms` change is only a small part of this commit.

In regen_atoms.py:

- There is now only one link name per platform: nsGkAtoms::sAtoms[].

- But there is a new constant per atom, giving the index into
  nsGkAtoms::sAtoms[].

- And the `atom!` macro for each atom indexes into nsGkAtoms::sAtoms[] using
  the index constant.

- A couple of `*mut` pointers are now `*const`.

Elsewhere, the `(nsStaticAtom*)` casts within the `AppendElement()` calls are
necessary to avoid link errors, presumably due to some template instantiation
wrinkle.

--HG--
extra : rebase_source : 629642e708c8bc6e27d6057beae5f35955fdd837
2018-10-04 09:16:11 +10:00
Nicholas Nethercote
a588d0a4e0 Bug 1449787 - Tweak regen_atoms.py. r=emilio
Specifically, give all the string templates the ''' form, and give them all
`_TEMPLATE` suffixes. This requires slightly changing the newline handling.

--HG--
extra : rebase_source : c89a77bc6d2cbc19cfaf51bbc694c4f3f8be10ba
2018-10-02 08:43:37 +10:00
Pyfisch
bdac24a9e1 Bug 1488854: Rustfmt malloc_size_of & derive. r=emilio 2018-09-05 19:31:09 +02:00
kingdido999
348835a0d3 Bug 1488854: Format components fallible and geometry. r=emilio
This cherry-picks servo/servo#21598.
2018-09-05 19:31:02 +02:00
Emilio Cobos Álvarez
a4f9eea8e5 Bug 1488414 - Use decomposition to interpolate matched perspective transform operations. r=birtles
Looks like this produces sensible results for interpolation with 0, though I'm
not really convinced about the results from, let's say, 1px to 2000px in the
attached test-case, I would've expected a linear interpolation from that to go
through normal length interpolation.

css-transforms-1 says:

  > Two transform functions with the same name and the same number of arguments
  > are interpolated numerically without a former conversion. The calculated
  > value will be of the same transform function type with the same number of
  > arguments.
  >
  > Special rules apply to <matrix()>.

Which is what we do... I was going to file a spec issue but turns out that it's
already addressed in css-transforms-2:

  https://drafts.csswg.org/css-transforms-2/#interpolation-of-transform-functions

Which says:

  > The transform functions <matrix()>, matrix3d() and perspective() get
  > converted into 4x4 matrices first and interpolated as defined in section
  > Interpolation of Matrices afterwards.

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

--HG--
extra : moz-landing-system : lando
2018-09-05 13:35:06 +00:00
Emilio Cobos Álvarez
f6e7b25483 Bug 1488155 - Only no-op visited <-> unvisited changes. r=heycam
Other changes should really be (and are) indistinguishable.

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

--HG--
extra : moz-landing-system : lando
2018-09-05 12:52:16 +00:00
Boris Chiou
8e384ca9b3 Bug 1487838 - Add a pref for |clip-path:path()|. r=xidorn
Add a preference, layout.css.clip-path-path.enabled, for |clip-path:path()|.

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

--HG--
extra : moz-landing-system : lando
2018-09-05 04:50:33 +00:00
Emilio Cobos Álvarez
ac475c939f Bug 1487856 - Make the author styles disabled stuff actually disable style attribute, animations, and XBL rules. r=heycam
This also removes one of my FIXMEs from when I was looking at this code.

We don't seem to have a pre-existing test for this feature, sigh. I'll try to
write one if I have cycles for it...

Note that it not applying XBL rules is a feature, given the current state of
affairs. Video controls and such are right now unusable with no styles enabled.

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

--HG--
extra : moz-landing-system : lando
2018-09-03 07:31:29 +00:00
Emilio Cobos Álvarez
05121efc1a Bug 1487259 - Make <svg:use> in shadow tree apply the rules from the originating tree. r=xidorn,firefox-style-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D4674

--HG--
extra : moz-landing-system : lando
2018-09-03 22:52:12 +00:00
Emilio Cobos Álvarez
90fb0f988a Bug 1488172 - Fix Servo and unit tests build. r=me 2018-09-03 14:13:36 +02:00
Simon Sapin
6223dfe2a5 Bug 1488172 - Update bindgen to 0.39.0. r=emilio
This imports servo/servo#21516.
2018-09-03 14:14:02 +02:00
Simon Sapin
4970761136 Bug 1488172 - Publish selectors v1.20.0. r=emilio
This imports servo/servo#21494.
2018-09-03 14:13:36 +02:00
Emilio Cobos Álvarez
84ee4596a9 Bug 1488172 - Appease Servo's tidy lint. r=me 2018-09-03 14:13:36 +02:00
Craig Disselkoen
80876a6b23 Bug 1488172 - Remove outdated comment in stylist.rs. r=emilio
This imports servo/servo#21487.
2018-09-03 14:13:36 +02:00
Emilio Cobos Álvarez
9db4ab4300 Bug 1487615 - Simplify the Lang pseudo-class stuff a bit. r=xidorn,firefox-style-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D4754

--HG--
extra : moz-landing-system : lando
2018-09-02 22:54:12 +00:00
Emilio Cobos Álvarez
51ed361ea0 Bug 1487615 - Use proper escaping for pseudo-class strings. r=xidorn
We always serialize as an atom, which is the previous behavior (though previous
code was using string escaping which I think was not totally sound either...).

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

--HG--
extra : moz-landing-system : lando
2018-09-02 22:54:57 +00:00
Emilio Cobos Álvarez
5b48747b22 Bug 1487137 - Shrink CascadeData by turning the bloom filters into hash sets. r=xidorn
We're wasting 1kb there, which is kind of stupid.

The only advantage of using a bloom filter is that memory usage doesn't increase
even if there's a gazillion attribute selectors and such. But:

 * For IDs we already have a bunch of data structures for invalidation and such
   which key on the id, so the bloom filter would be a very minor thing.

 * For attribute selectors we don't have such a data structure, but if people
   used a gazillion attribute selectors we should!

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

--HG--
extra : moz-landing-system : lando
2018-09-02 23:03:47 +00:00
Cameron McCormack
f6f506926c Bug 1487598 - Use an Atom to store pseudo-class string arguments. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D4740
2018-08-31 17:05:56 +10:00
Cameron McCormack
8cac942c02 Bug 1487582 - Use an Atom to represent Direction values in pseudo-classes. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D4730
2018-08-31 15:18:59 +10:00
Emilio Cobos Álvarez
20da0ddffb Bug 1487135 - Make the allocation of AuthorStyles for ShadowRoot lazy. r=xidorn,firefox-style-system-reviewers
So that we don't waste a bunch of memory with stuff like <svg:use>. I
plan to shrink AuthorStyles further, but this should help regardless, and isn't
very complex.

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

--HG--
extra : moz-landing-system : lando
2018-08-30 12:00:00 +00:00
Ciure Andrei
d716a04e20 Merge inbound to mozilla-central. a=merge 2018-08-29 00:58:21 +03:00
Henri Sivonen
c3d01b0fe9 Bug 1484045 - Prohibit shrinking of the string's buffer in appends of Latin1 to UTF-16 and vice versa. r=froydnj
This restores the old allocation semantics for "append" operations between
Latin1 and UTF-16 while keeping the buffer re-use optimization for the
"assign" cases.

MozReview-Commit-ID: 8JCw3AaCNLN

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

--HG--
extra : moz-landing-system : lando
2018-08-28 14:13:17 +00:00
Boris Chiou
4a1bf6f650 Bug 1485433 - Parse byte slice in PathParser. r=emilio
We only care about ascii char for svg path, so we could parse the string
as byte slice.

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

--HG--
extra : moz-landing-system : lando
2018-08-27 18:14:49 +00:00
arthur.iakab
5527acb8d8 Merge inbound to mozilla-central a=merge 2018-08-25 01:08:22 +03:00
Boris Chiou
a1909a88ff Bug 1246764 - Part 2: Define path() for clip-path. r=emilio
For now, |clip-path: path()| is chrome-only, and not for shape-outside,
so we only implement the parser for clip-path. Besides, I didn't put
path() in BasicShape because path() doesn't use the reference box to
resolve the percentage or keywords (i.e. SVG path only accept floating
point or integer number as the css pixel value). Therefore, I add it into
ShapeSource, instead of BasicShape.

Differential Revision: https://phabricator.services.mozilla.com/D3633
2018-08-24 11:37:53 -07:00
Boris Chiou
2e062cc88c Bug 1246764 - Part 1: Move SVGPathData and its parser into svg_path.rs. r=emilio
SVGPathData will be used by clip-path and offset-path (and/or more on the
properties which support <basic-shape>). Therefore, let's move
SVGPathData out of motion.rs.

Differential Revision: https://phabricator.services.mozilla.com/D3631
2018-08-24 11:37:44 -07:00
Xidorn Quan
7e1e060971 Bug 1424106 - Accept unknown webkit pseudo-element. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D4186

--HG--
extra : source : 9537cee04b53aa60d3f40a1b9d05ab8f739a92f8
2018-08-24 22:17:37 +10:00
Emilio Cobos Álvarez
385e2369c5 Bug 1485951 - Adjust an assertion to account for the changes from bug 1485930. r=me 2018-08-24 13:44:21 +02:00
Boris Chiou
c1a2d39873 Bug 1485823 - Use cbindgen for basic_shape::FillRule. r=xidorn
Just a minor fix to use cbindgen to avoid the conversion between
basic_shape::FillRule and mozilla::StyleFillRule.

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

--HG--
extra : moz-landing-system : lando
2018-08-23 23:00:16 +00:00
Boris Chiou
2cddc42d0f Bug 1485766 - Drop the manually implementation of ToCSS for BasicShape::Polygon. r=emilio
The implementation of ToCSS for Polygon has some rule, and we could use skip_if
to handle and serialization of fill-rule. However, we should derive ToCSS for
the pair of LengthOrPercentages, so define a new type for it.

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

--HG--
extra : moz-landing-system : lando
2018-08-23 20:32:53 +00:00
Xidorn Quan
2c6a391e1b Bug 1485930 - Make tree pseudo-element prefix not case-sensitive. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D4185

--HG--
extra : moz-landing-system : lando
2018-08-24 09:23:05 +00:00
Emilio Cobos Álvarez
4a3ec62885 Bug 1485655: Remove an assertion that doesn't hold in some cases. r=me 2018-08-23 16:56:27 +02:00
Emilio Cobos Álvarez
ab460a4f52 Bug 1425700 - Make the counters non-atomic counters and merge afterwards. r=bholley
This was consistently faster in the benchmark (even when counters were disabled,
which was slightly suspicious, but...).

Anyway, it's not really much code, most of it is FFI copy-pasta.

Differential Revision: https://phabricator.services.mozilla.com/D3874
2018-08-28 15:58:24 +02:00
Emilio Cobos Álvarez
e2379f3921 Bug 1425700 - Add a test for the use counters. r=heycam
Mostly testing that they work, and that they record what we expect them to
record, that is, the actual property that was parsed, and not the properties
that it'd resolve or expand to.

That may be another tricky part for CSSOM, I think style setters would fail an
alias test if implemented with the current setup (we do the property lookup in
C++).

Differential Revision: https://phabricator.services.mozilla.com/D3829
2018-08-28 15:58:21 +02:00
Emilio Cobos Álvarez
7f1f4ab7f0 Bug 1425700 - Hook the use counters into StyleSheet parsing. r=heycam
Still not hooked into telemetry, I talked with :janerik and :gfritzsche about
that, but test incoming!

This intentionally doesn't handle CSSOM and such for now, will file followups
for those, though should be trivial.

I want to unify / clean up how we do the use counters and the error reporting
stuff for CSSOM, since the current function call still shows up in profiles,
but that should be a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D3828
2018-08-28 15:58:19 +02:00
Emilio Cobos Álvarez
62a00ac718 Bug 1425700 - Add a very simple use counter implementation. r=heycam
As simple as I could make it, for now. We can improve on this.

Differential Revision: https://phabricator.services.mozilla.com/D3827
2018-08-28 15:58:17 +02:00
Coroiu Cristina
9c90e3fa96 Backed out changeset e85309ff67f4 (bug 1352643) for wpt failures at /css/css-images/gradient/color-stops-parsing.html on a CLOSED TREE 2018-10-03 02:37:44 +03:00
Ryan Hunt
629e76085a Bug 1352643 - Implement multi-position gradient color-stops syntax. r=emilio
This commit adds the multi-position gradient color-stops syntax.

GradientItem::parse_comma_separated is extended to attempt to parse
a LengthOrPercent after each color stop. If it succeeds, it appends
an additional color stop with a duplicate color and the specified
position.

This change is only to the parsing, serialization is left unchanged
as per [1].

[1] https://github.com/w3c/csswg-drafts/issues/2714

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

--HG--
extra : rebase_source : 88f2e9276c626bf4e195f10c5b5713861eeb5760
extra : source : 18e81538f6f439a8c02a03f21fff22cc5e6128f4
2018-10-01 14:26:23 -05:00
Emilio Cobos Álvarez
26115b46cb Bug 1485044: Unbust unit test build. r=me 2018-08-22 12:00:30 +02:00
Noemi Erli
2d8f83047a Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-22 12:54:34 +03:00
Noemi Erli
a3eb003ecf Merge inbound to mozilla-central. a=merge
--HG--
rename : testing/web-platform/tests/css/motion/offset-path-string.html => testing/web-platform/tests/css/motion/offset-path-string-001.html
2018-08-22 12:49:02 +03:00
Emilio Cobos Álvarez
3ef3f33868 Bug 1485044: Remove useless StyleDisplay conversion. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D3896
2018-08-22 11:25:58 +02:00
Emilio Cobos Álvarez
b974be2748 Bug 1485037: Use a consistent style for longhands. r=heycam
It's a bit of a mess.

Differential Revision: https://phabricator.services.mozilla.com/D3892
2018-08-22 11:25:23 +02:00
Emilio Cobos Álvarez
ac3701edd3 Bug 1474317: Make text-orientation, unicode-bidi, contain and will-change non-animatable. r=heycam
Per recent CSSWG resolutions:

  https://github.com/w3c/csswg-drafts/issues/2737
  https://github.com/w3c/csswg-drafts/issues/2751

Differential Revision: https://phabricator.services.mozilla.com/D3888
2018-08-22 11:24:39 +02:00
Emilio Cobos Álvarez
0cf34bf459 Bug 1484316: Serialize clip-path and shape-outside using Servo. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D3653
2018-08-22 11:20:41 +02:00
Cameron McCormack
61ab3b7383 Bug 1485252 - Add MallocSizeOf impls for 128-bit integers. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D3947

--HG--
extra : moz-landing-system : lando
2018-08-22 05:37:39 +00:00
Ciure Andrei
40b18c41b7 Backed out 7 changesets (bug 1429298) for xpcshell failures properties-db.js CLOSED TREE
Backed out changeset 48214a8e1b6b (bug 1429298)
Backed out changeset cc2785ab879e (bug 1429298)
Backed out changeset c217209a3b04 (bug 1429298)
Backed out changeset 196fc7b48b84 (bug 1429298)
Backed out changeset 761e9bb54adb (bug 1429298)
Backed out changeset 0b9ec0d707b5 (bug 1429298)
Backed out changeset 38ad1cc1b0c8 (bug 1429298)

--HG--
rename : testing/web-platform/tests/css/motion/offset-path-string-002.html => testing/web-platform/tests/css/motion/offset-path-string.html
2018-08-22 08:01:49 +03:00
Boris Chiou
9c3c5fcf1d Bug 1429298 - Part 3: Use macro for path parser. r=emilio
There are a lot of duplicates, so we use macro to refine them.

Depends on D2963

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

--HG--
extra : moz-landing-system : lando
2018-08-22 01:20:21 +00:00
Boris Chiou
4171197c25 Bug 1429298 - Part 2: Define offset-path and implement it in style system. r=emilio
Define OffsetPath & SVGPathData on the servo-side, and StyleMotion &
StyleSVGPath on the gecko-side. We parse the SVG Path string into a
vector of PathCommand. To build the gfx::Path, we will convert it into
gfx::Path later in a different patch.

The basic flow is:
  - Parse SVG Path String into SVGPathData (in Rust).
  - Use cbindgen to make sure the layout of PathCommand and StylePathCommand, and then set the Box[PathCommand] into nsTArray<StylePathCommand>.
  - Try to convert nsTArray<StylePathCommand> into gfx::Path. (This part will be implemented in a different patch.)

Finally, we use the gfx::Path to create a motion path transform.
The layout implementation is in the later patch.

Depends on D2962

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

--HG--
extra : moz-landing-system : lando
2018-08-22 01:24:13 +00:00
Boris Chiou
d935ea329c Bug 1429298 - Part 3: Use macro for path parser. r=emilio
There are a lot of duplicates, so we use macro to refine them.

Differential Revision: https://phabricator.services.mozilla.com/D2966
2018-08-21 22:41:39 -07:00
Boris Chiou
a8bd6dfc8a Bug 1429298 - Part 2: Define offset-path and implement it in style system. r=emilio
Define OffsetPath & SVGPathData on the servo-side, and StyleMotion &
StyleSVGPath on the gecko-side. We parse the SVG Path string into a
vector of PathCommand. To build the gfx::Path, we will convert it into
gfx::Path later in a different patch.

The basic flow is:
* Parse SVG Path String into SVGPathData (in Rust).
* Use cbindgen to make sure the layout of PathCommand and StylePathCommand,
  and then set the Box[PathCommand] into nsTArray<StylePathCommand>.
* Try to convert nsTArray<StylePathCommand> into gfx::Path. (This part
  will be implemented in a different patch.)

Finally, we use the gfx::Path to create a motion path transform.
The layout implementation is in the later patch.

Differential Revision: https://phabricator.services.mozilla.com/D2963
2018-08-21 22:41:38 -07:00
Henri Sivonen
9f7d45a15a Bug 1482093 - Make conversions from UTF-16 and Latin1 to UTF-8 utilize the slop in the first ASCII-sized allocation. r=nika
MozReview-Commit-ID: 4Y8K1JZkXWq

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

--HG--
extra : moz-landing-system : lando
2018-08-20 18:47:39 +00:00
Cameron McCormack
771b9fb2f1 Bug 1484575 - Simplify PropertyDeclarationBlock::get a little. r=xidorn
Depends On D3747

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

--HG--
extra : moz-landing-system : lando
2018-08-20 04:11:37 +00:00
Cameron McCormack
2ccae542f5 Bug 1484571 - Replace NormalDeclarationIterator return type with impl Trait. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D3747

--HG--
extra : moz-landing-system : lando
2018-08-20 05:34:16 +00:00
Emilio Cobos Álvarez
1bffebea0b Bug 1484459: Appease Servo's tidy lint. r=me 2018-08-18 19:07:08 +02:00
Emilio Cobos Álvarez
8d50b26faf Bug 1484459: Port servo to the new media query system. r=me
Port `width`, and also add the `scan` media feature so I don't need to add
ugliness just to workaround the unused keyword_evaluator macro.

This is not part of the Gecko build in any case.
2018-08-18 19:07:06 +02:00
Emilio Cobos Álvarez
b68adb6896 Bug 1484459: Update num-traits in style. r=me 2018-08-18 19:07:05 +02:00
Csoregi Natalia
3e61ab4489 Merge inbound to mozilla-central. a=merge 2018-08-18 12:46:20 +03:00
Daniel Varga
3ee92b7a2f Merge mozilla-central to autoland 2018-08-18 01:04:09 +03:00
Emilio Cobos Álvarez
94eb4ee48e Bug 1483808 - Make webkit device-pixel-ratio media queries a proper alias to resolution. r=dholbert
According to the spec:

  https://compat.spec.whatwg.org/#css-media-queries-webkit-device-pixel-ratio

And to the Chromium implementation:

  https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/css/media_query_evaluator.cc?l=366&rcl=1d7328865bcf06a687aafc18ff95d55317030672

They're no different than resolution.

In our implementation `resolution` does slightly different stuff. Given we
still haven't shipped -webkit-device-pixel-ratio, making this match resolution
looks better than the opposite.

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

--HG--
extra : moz-landing-system : lando
2018-08-17 21:25:37 +00:00
Daniel Varga
707a0b3f74 Merge mozilla-inbound to mozilla-central. a=merge 2018-08-18 00:53:04 +03:00
Xidorn Quan
f2d834dde8 Bug 1484146 - Use AspectRatio directly for RangeOrOperator::evaluate. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3587

--HG--
extra : moz-landing-system : lando
2018-08-17 12:46:02 +00:00
Margareta Eliza Balazs
0b2fdd0c87 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-17 12:50:13 +03:00
Margareta Eliza Balazs
6c198262de Merge inbound to mozilla-central. a=merge 2018-08-17 12:46:14 +03:00
Nicholas Nethercote
6b176ea952 Bug 1484096 - Remove use of fnv in bloom.rs. r=heycam
To support that, this patch also does the following.

- Removes the insert(), remove() and might_contain() methods, because they are
  specialized versions of insert_hash(), remove_hash(), and
  might_contain_hash(), and they are only used by tests within this file.

- Moves hash() from the top level into create_and_insert_some_stuff().

- Changes create_and_insert_some_stuff() so that instead of hashing consecutive
  integers, it instead hashes stringified consecutive integers, which matches
  real usage a little better.

- Raises the false_positives limit a little to account for the above changes.

--HG--
extra : rebase_source : f839ff86986d5c8a17506a808ba676f69c7ef407
2018-08-17 15:33:22 +10:00
Emilio Cobos Álvarez
accc448c34 Bug 1483823 - Deduplicate system metric atoms. r=xidorn
Now that :-moz-system-metric is gone, there's no real reason for the atoms to
be separate.

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

--HG--
extra : moz-landing-system : lando
2018-08-17 01:07:22 +00:00
Xidorn Quan
464ef30ab4 Bug 1475033 part 3 - Add scrollbar-width property. r=heycam
MozReview-Commit-ID: CmCbaZosUrU

--HG--
extra : rebase_source : 85136c729524fdd8b9cdfcbf30e2bb35accd0d4a
2018-08-01 14:13:41 +10:00
Daniel Varga
36e523e699 Merge mozilla-central to mozilla-inbound 2018-08-18 01:05:36 +03:00
Emilio Cobos Álvarez
d0af9148ee No bug - Remove an inaccurate and useless debug message. r=me 2018-08-17 23:26:24 +02:00
Emilio Cobos Álvarez
5a92426ddb Bug 1483964: Manually inline class and ID getters. r=xidorn
Somewhat ugly but hopefully not too much. Somehow it ends up removing more lines
than adding.

Differential Revision: https://phabricator.services.mozilla.com/D3536
2018-08-17 14:26:45 +02:00
Emilio Cobos Álvarez
e0013844c5 No bug - Add some spec links to media queries. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D3489

--HG--
extra : moz-landing-system : lando
2018-08-16 10:05:52 +00:00
Xidorn Quan
398c9582ea No bug - Simplify some code in NoCalcLength::parse_dimension. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3473

--HG--
extra : moz-landing-system : lando
2018-08-16 09:34:43 +00:00
Emilio Cobos Álvarez
03eea217a8 Bug 1481961: Rewrite media queries so that they work on an evaluator function. r=xidorn
This moves most of the code to be Rust, except potentially some evaluator
functions, and allows to unblock the use case from any-hover / any-pointer and
remove nsMediaFeatures.

Differential Revision: https://phabricator.services.mozilla.com/D2976
2018-08-15 16:09:19 +02:00
Emilio Cobos Álvarez
f0f42a0ad0 Bug 1477773: Simplify visited-related code in invalidation. r=xidorn
We match with AllLinksVisitedAndUnvisited for style invalidation, and we already
do a subtree restyle because :visited matching doesn't depend on the actual
element state.

So all this stuff is just not needed. The comment points to the attribute tests
in bug 1328509, but those still trivially pass with this change.

I think this was unneeded since I introduced AllLinksVisitedAndUnvisited, or
maybe since https://github.com/servo/servo/pull/19520. In any case it doesn't
really matter, and I already had done this cleanup in my WIP patches for
bug 1406622, but I guess this is a slightly more suitable place to land them :)

Differential Revision: https://phabricator.services.mozilla.com/D3305
2018-08-15 12:55:32 +02:00
Emilio Cobos Álvarez
6493ebbcf0 Bug 1477773: no-op visited changes earlier if visited links are disabled. r=xidorn
We force a repaint from ContentStateChangedInternal if visited links are
disabled, and that's observable. Let's cut it off as early as we can to avoid
timing attacks even when :visited is disabled.

Differential Revision: https://phabricator.services.mozilla.com/D3304
2018-08-15 12:54:26 +02:00
Cameron McCormack
be0a66bcfb Bug 1483121 - Generate static atom hash in StaticAtoms.py. r=njn,emilio
Summary: Depends On D3286

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1483121

Differential Revision: https://phabricator.services.mozilla.com/D3295
2018-08-15 15:52:42 +10:00
Cameron McCormack
b17e6b4468 Bug 1482782 - Part 6: Remove support for multiple static atom sources. r=njn,emilio
Summary: Depends On D3284

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3285
2018-08-15 15:46:42 +10:00
Cameron McCormack
99d9013b12 Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3283

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-15 15:46:39 +10:00
Cameron McCormack
4a23b5ff06 Bug 1482782 - Part 4: Move CSS pseudo-element atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3282

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3283
2018-08-15 15:46:00 +10:00
Cameron McCormack
8ae48d7906 Bug 1482782 - Part 3: Define atom type in nsGkAtomList.h. r=njn
Summary: Depends On D3281

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3282
2018-08-15 15:46:00 +10:00
Narcis Beleuzu
d20e8e7674 Backed out 8 changesets (bug 1483121, bug 1482782) for build bustages on nsDirectoryService.cpp. CLOSED TREE
Backed out changeset 0a8334bbcf45 (bug 1483121)
Backed out changeset cb2dcb859071 (bug 1482782)
Backed out changeset c834d4ca2eef (bug 1482782)
Backed out changeset 887de0efbb67 (bug 1482782)
Backed out changeset 018fdb50a6be (bug 1482782)
Backed out changeset 33a8aa8096c9 (bug 1482782)
Backed out changeset e3632354f16e (bug 1482782)
Backed out changeset 46f8319bee82 (bug 1482782)
2018-08-15 09:14:41 +03:00
Cameron McCormack
0b89d2391b Bug 1483121 - Generate static atom hash in StaticAtoms.py. r=njn,emilio
Summary: Depends On D3286

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1483121

Differential Revision: https://phabricator.services.mozilla.com/D3295
2018-08-15 15:52:42 +10:00
Cameron McCormack
e816227f97 Bug 1482782 - Part 6: Remove support for multiple static atom sources. r=njn,emilio
Summary: Depends On D3284

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3285
2018-08-15 15:46:42 +10:00
Cameron McCormack
d9edae8bde Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3283

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-15 15:46:39 +10:00
Cameron McCormack
cc6c806369 Bug 1482782 - Part 4: Move CSS pseudo-element atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3282

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3283
2018-08-15 15:46:00 +10:00
Cameron McCormack
caeb752d2f Bug 1482782 - Part 3: Define atom type in nsGkAtomList.h. r=njn
Summary: Depends On D3281

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3282
2018-08-15 15:46:00 +10:00
arthur.iakab
34ad5ebaac Merge mozilla central to inbound 2018-08-15 01:05:50 +03:00
Nathan Froyd
aa277d9e8b Bug 1483344 - remove unused kernel32-sys dependency from style; r=emilio 2018-08-14 16:46:28 -04:00
Henri Sivonen
8e541f1e0a Bug 1473337 - Omit ASCII-case length calculation for short strings when performing an encoding conversion that expands non-ASCII. r=Nika
MozReview-Commit-ID: 88k27XnFym9

--HG--
extra : rebase_source : d633eee2a8f64df22663607125ca99a42c59ec6d
2018-07-05 09:27:29 +03:00
Andreea Pavel
5d75e43adc Merge mozilla-inbound to mozilla-central. a=merge 2018-08-14 19:15:33 +03:00
Henri Sivonen
3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Xidorn Quan
33b8a6dacd Bug 1483090 - Rename StyleUserInterface to StyleUI. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3276

--HG--
extra : moz-landing-system : lando
2018-08-14 08:37:37 +00:00
Cameron McCormack
a2eba7a28c Bug 1482677 - Remove unused BorrowedAtom. r=emilio,TYLin
MozReview-Commit-ID: FEnicnGj118

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

--HG--
extra : moz-landing-system : lando
2018-08-12 11:16:25 +00:00
L. David Baron
09f62c0e05 Bug 1481866: Swap order of values in 'overflow' shorthand property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3069

--HG--
extra : moz-landing-system : lando
2018-08-10 02:20:53 +00:00
Xidorn Quan
5295feba4e Bug 1481984 - Use function pointer rather than Fn trait object for collect_property_completion_keywords. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D2985

--HG--
extra : moz-landing-system : lando
2018-08-09 13:49:47 +00:00
Xidorn Quan
34de342864 Bug 1464786 - Implement flow-relative values for resize property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D2908

--HG--
extra : moz-landing-system : lando
2018-08-08 23:40:06 +00:00
Xidorn Quan
d37916aaf6 Bug 1481792 - Make several more specified values Copy. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D2932

--HG--
extra : moz-landing-system : lando
2018-08-08 12:06:19 +00:00
Xidorn Quan
3b8f9b869d Bug 1481781 - Add check for non-Copy specified value to ensure specified_is_copy always returns the right result. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D2931

--HG--
extra : moz-landing-system : lando
2018-08-08 12:07:34 +00:00
Csoregi Natalia
0f4d50ff52 Merge inbound to mozilla-central. a=merge 2018-08-08 12:58:36 +03:00
Xidorn Quan
346661e6fd Bug 1481125 - Put overflow: -moz-scrollbar-* behind pref. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D2845

--HG--
extra : moz-landing-system : lando
2018-08-07 13:57:45 +00:00
Boris Chiou
094fddc2b9 Bug 1480649 - Use union to wrap different shape-like types. r=xidorn
1. We will add more shape-like types in the future, so it's better to
   use union to reduce the memory usage.
2. Those shape-like types are mutual exclusive, so we could use union to
   wrap them.

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

--HG--
extra : moz-landing-system : lando
2018-08-07 07:56:01 +00:00
Emilio Cobos Álvarez
772d9c43fe Bug 1481162 - Cleanup invalidation processor constructor. r=xidorn
It used to be this way because of lifetime issues (plus the shadow
datas were in RwLocks at some point IIRC). Now we guarantee that as long as the
element is away the cascade data is as well, so we don't need to thread it
around.

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

--HG--
extra : moz-landing-system : lando
2018-08-07 10:36:18 +00:00
Emilio Cobos Álvarez
447592a848 Bug 1481156 - Remove unused selectors methods. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2767

--HG--
extra : moz-landing-system : lando
2018-08-06 23:52:52 +00:00
Emilio Cobos Álvarez
c0434853c1 Bug 1481204 - Don't print rerun-if-changed files until binding generation has succeeded. r=xidorn
Otherwise they may clobber useful output.

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

--HG--
extra : moz-landing-system : lando
2018-08-07 00:33:34 +00:00
Olli Pettay
5a669d2747 Bug 1469521 - Change storage of previous and next children in nsINode, r=bz
--HG--
extra : rebase_source : 4cb50889c2cfc788cab7037d26d114e35205e998
2018-08-06 22:29:27 +03:00
Emilio Cobos Álvarez
a8579f90d1 Bug 1481681: Fix Servo build and unit tests. r=me 2018-08-08 01:39:59 +02:00
Emilio Cobos Álvarez
ef6c33c8d4 Bug 1481681: Appease Servo's tidy lint. r=me 2018-08-08 01:39:58 +02:00
Emilio Cobos Álvarez
4d3c28d75d Bug 1481681: Sync some dependencies with servo. r=me 2018-08-08 01:39:57 +02:00
Emilio Cobos Álvarez
ad4bea98ba No bug - Fixup some indentation. r=me
DONTBUILD
2018-08-07 20:32:19 +02:00
Emilio Cobos Álvarez
dc8f531c74 Bug 1480054: Restrict XUL tree pseudos on nightly and early-beta. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2598

MozReview-Commit-ID: I1dUPuGKkyX
2018-08-06 15:41:24 +02:00
Margareta Eliza Balazs
235bf9e602 Backed out 2 changesets (bug 1480054) for reftest failures in build/tests/reftest/tests/layout/reftests/bugs/664127-1.xul on a CLOSED TREE
Backed out changeset 854bba84bd34 (bug 1480054)
Backed out changeset 37861e92aa13 (bug 1480054)
2018-08-06 14:09:07 +03:00
Emilio Cobos Álvarez
85dc56828a Bug 1480054: Restrict XUL tree pseudos on nightly and early-beta. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2598

MozReview-Commit-ID: I1dUPuGKkyX
2018-08-06 10:36:49 +02:00
Benjamin Bouvier
89148b70bf Bug 1499359: Apply rustfmt on build_gecko.rs; r=emilio
--HG--
extra : rebase_source : 74f09b27c66813324da3124e6755dfc8e4ded362
extra : amend_source : 42325322006a5dbb612d189c4650bd7ade0a1303
extra : histedit_source : 107298236f4d1e2376af3c8bd1a52db2d2b2ab80
2018-10-16 15:18:26 +02:00
Benjamin Bouvier
84de140754 Bug 1499359; Remove unused HashMap import and remove namespacing around Table; r=emilio
--HG--
extra : rebase_source : e1d7c90db0ef0f00acbd61e889623db6502ade5d
extra : histedit_source : 55392c2910ae58a2c1f1cc322de515855c4add66
2018-10-16 15:17:10 +02:00
Emilio Cobos Álvarez
3cd323e6da Bug 1480043: Remove the concept of 'canonical' pseudos. r=xidorn
We only have this so that ::-moz-placeholder keeps serializing as
::-moz-placeholder, but I don't think anybody really cares.

Edge aliases ::-webkit-input-placeholder to ::-ms-input-placeholder at parse
time as well, as can be seen in:

```
let s = document.createElement('style');
s.innerHTML = `input::-webkit-input-placeholder { color: red };`;
document.body.appendChild(s);
document.body.innerHTML = s.sheet.cssRules[0].cssText;
```

And I think this is more consistent with what we do for CSS properties that are
aliases.

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

MozReview-Commit-ID: 3ImDWamJhxh
2018-08-01 15:57:47 +02:00
Dorel Luca
d0a0ae30d5 Merge mozilla-inbound to mozilla-central. a=merge 2018-08-01 12:51:56 +03:00
Cameron McCormack
046bd5fe7f Bug 1475197 - Part 1: Shrink selectors::Component to 24 bytes. r=emilio
This saves about 37 KiB of memory across the UA style sheets.

MozReview-Commit-ID: EoZnlmyWwxX

--HG--
extra : rebase_source : cd8ef0ba838618f9a4583b7d9896caa3a0602199
2018-07-16 12:15:47 +10:00
shindli
0a48a3cd3c Backed out 3 changesets (bug 1428676) for bc failures in browser/base/content/test/static/browser_parsable_css.js on a CLOSED TREE
Backed out changeset 6ba5975115fc (bug 1428676)
Backed out changeset 7f1270a9ec3d (bug 1428676)
Backed out changeset 662bfc31a950 (bug 1428676)
2018-07-31 19:30:46 +03:00
Jonathan Watt
11e49726b5 Bug 1428676 pt 1. Add a '-moz-menulist-button' value to '-moz-appearance'. r=emilio
The '-moz-menulist-button' value currently behavies identically to the
'menulist-button' value.  This is not implemented as an alias because later
patches in this patch series will change the behavior of our pre-existing
'menulist-button' value to more closely match what Chrome does.
2018-06-19 20:12:45 +01:00
Jonathan Watt
e8a416046f Bug 1428676 pt 1. Add a '-moz-menulist-button' value to '-moz-appearance'. r=emilio
The '-moz-menulist-button' value currently behavies identically to the
'menulist-button' value.  This is not implemented as an alias because later
patches in this patch series will change the behavior of our pre-existing
'menulist-button' value to more closely match what Chrome does.

--HG--
extra : rebase_source : b66bf6427db5be2eb12f4e0aa36d22a4da46555a
2018-06-19 20:12:45 +01:00
Emilio Cobos Álvarez
39c2e77024 Bug 1479398: Micro-optimize is_root to avoid poking at the parent in the common case. r=xidorn
We can discard the common case of an element having another element or document
fragment parent, which is the common case.

Then we can discard detached subtrees looking at is_in_document().

The only case where we have a non-content parent is the document case:

  https://searchfox.org/mozilla-central/rev/033d45ca70ff32acf04286244644d19308c359d5/dom/base/Element.cpp#1683

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

MozReview-Commit-ID: EWHwgqkl1r5
2018-07-31 15:01:40 +02:00
Emilio Cobos Álvarez
6c81e2e79c Bug 1479450: Convert GetStringValue to use Servo. r=xidorn
And remove gPropertyTable / kCSSRawProperties while at it.

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

MozReview-Commit-ID: 8U87BcBkrJF
2018-07-31 12:05:00 +02:00
Emilio Cobos Álvarez
2996813963 Bug 1479450: Implement nsCSSProps::LookupProperty using Rust. r=xidorn
Always assume allowed-for-all-content. There are a couple callers which weren't
doing that:

 * A unit test -> removed.

 * ComputeAnimationDistance: Used for testing (in transitions_per_property), and
   for the animation inspector. The animation inspector shouldn't show
   non-enabled properties. The transitions_per_property test already relies on
   getComputedStyle stuff which only uses eForAllContent.

 * GetCSSImageURLs: I added this API for the context menu page and such. It
   doesn't rely on non-enabled-everywhere properties, it was only using
   eInChrome because it was a ChromeOnly API, but it doesn't really need this.

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

MozReview-Commit-ID: 4VOi5Su3Bos
2018-07-31 12:00:15 +02:00
Emilio Cobos Álvarez
e3eb5e407c Back out changeset 89fcb03e210c (Bug 1479398) because it's not reviewed yet. r=backout
MozReview-Commit-ID: 84HzaAj5BTu
2018-07-30 14:25:49 +02:00
Emilio Cobos Álvarez
4d76331dcf Bug 1479012: Improve logging for attribute changes. r=xidorn
And general Element logging. We now print all the attributes for comparison.

If this turns out to be too verbose we can change it to diff them or something.

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

MozReview-Commit-ID: 1Gl9AumdnvZ
2018-07-30 14:19:30 +02:00
Emilio Cobos Álvarez
c383561848 Bug 1479398: Micro-optimize is_root to avoid poking at the parent in the common case. r=xidorn
Summary:
We can discard the common case of an element having another element or document
fragment parent, which is the common case.

Then we can discard detached subtrees looking at is_in_document().

The only case where we have a non-content parent is the document case:

  https://searchfox.org/mozilla-central/rev/033d45ca70ff32acf04286244644d19308c359d5/dom/base/Element.cpp#1683

Reviewers: xidorn

Tags: #secure-revision

Bug #: 1479398

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

MozReview-Commit-ID: H2mWHBmk5g1
2018-07-30 14:19:29 +02:00
Emilio Cobos Álvarez
aa0e9a95a5 Bug 1478985: Add a root bucket to the selector map. r=xidorn
:root can't change without getting unbound from the tree so no fancy stuff other
than that needed.

This removes a lot of revalidation and attribute invalidation matching from the
Chrome, and looks like it should be a good idea in general.

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

MozReview-Commit-ID: 9B0EO9teczi
2018-07-30 12:57:37 +02:00
Emilio Cobos Álvarez
dbf24cdab5 Bug 1478990: Make NonCustomPropertyId <-> nsCSSPropertyId conversions fast. r=xidorn
We have a different order in nsCSSPropertyId for no good reason. The only
invariant there is that longhands come before shorthands, and shorthands before
aliases.

Luckily that's also an invariant that NonCustomPropertyId has, so we can reuse
them.

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

MozReview-Commit-ID: 1hsQu6hmqiN
2018-07-30 12:51:19 +02:00
Emilio Cobos Álvarez
8c4ec8b3ba Bug 1479216: Restore the order of Scrollbarbutton appearance values. r=xidorn
The patch at bug 1478391 comment 6 changed the way the math in Scrollbarbutton*
worked, which pretty surely caused this.

Restore the original order and math to be the same as before bug 1478391.

MozReview-Commit-ID: CK3iOqeX2NW
2018-07-29 01:02:44 +02:00
Nicholas Nethercote
6a531f189d Bug 1477628 - Convert FnvHash{Set,Map} instances to FxHash{Set,Map} (attempt 2). r=heycam 2018-07-27 16:49:04 +10:00
Bogdan Tara
92db9979a0 Backed out changeset 72b855b514f9 (bug 1477628) for rusttests build bustages CLOSED TREE 2018-07-27 07:00:56 +03:00
Nicholas Nethercote
2475b3e62f Bug 1477628 - Convert FnvHash{Set,Map} instances to FxHash{Set,Map}. r=heycam
It doesn't appear to make much difference to performance, but it does let us
remove the `fnv` crate from the repo.
2018-07-27 09:01:15 +10:00
Emilio Cobos Álvarez
517256e365 Bug 1478391: Autogenerate StyleAppearance. r=jwatt
This builds on bug 1428676 and introduces StyleAppearance, which replaces the
NS_THEME_* constants.

Really sorry for the size of the patch.

There's a non-trivial change in the gtk theme, which I submitted separately as
bug 1478385.

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

MozReview-Commit-ID: DiSmMWK7Krp
2018-07-26 17:06:17 +02:00