Commit Graph

11987 Commits

Author SHA1 Message Date
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
Emilio Cobos Álvarez
f48df04e5b Bug 1478330: Generate StyleDisplay using cbindgen. r=heycam
We use the same setup WR uses, which is checking-in the files.

But I think it's much better than keeping the two things in sync manually :)

When you add a new value, you need to add it to the rust source, then run the
command, but since it doesn't need to build the style crate (it uses the Rust
AST, doesn't build) there's no problem.

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

MozReview-Commit-ID: DnXkNAzP54H
2018-07-26 17:06:05 +02:00
shindli
a007b2dc62 Backed out changeset 230ea1f373ff (bug 1478330) for Linting failure on a CLOSED TREE 2018-07-26 16:49:19 +03:00
Emilio Cobos Álvarez
42a2ddb5b9 Bug 1478330: Generate StyleDisplay using cbindgen. r=heycam
We use the same setup WR uses, which is checking-in the files.

But I think it's much better than keeping the two things in sync manually :)

When you add a new value, you need to add it to the rust source, then run the
command, but since it doesn't need to build the style crate (it uses the Rust
AST, doesn't build) there's no problem.

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

MozReview-Commit-ID: DnXkNAzP54H
2018-07-26 15:35:24 +02:00
Hiroyuki Ikezoe
3353a9c0e3 Bug 1365045 - Introduce nsCSSKeywordAndBoolTableEntry. r=heycam
The values in the boolean context depend on its feature.  For examples, in the
case of prefers-reduced-motion 'no-preference' means false and 'reduced' mean
true in the boolean context, whereas in the case of prefers-contrast
'no-preference' means false and other two values, 'high' and 'low' means true
in the boolean context.  To support it we introduce a child struct of
nsCSSKTableEntry that has an additional field representing the value in the
boolean context and use it when we have no specified value in the media feature
(i.e. in the boolean context).

MozReview-Commit-ID: 79HiW8l5ous
2018-07-24 16:50:47 +09:00
Emilio Cobos Álvarez
1a53242e60 Bug 1477883: Appease Servo's tidy lint. r=me
MozReview-Commit-ID: CqqndCexGKW
2018-07-24 04:03:24 +02:00
Emilio Cobos Álvarez
d2466a05c8 Bug 1477883: Fix servo build. r=me
MozReview-Commit-ID: LU5Id4244ft
2018-07-24 04:03:22 +02:00
Emilio Cobos Álvarez
d94136a13b Bug 1477883: Update itoa. r=me
Has been updated in servo for a long time, and we already have the new version
in tree.

MozReview-Commit-ID: 1yNOsqwLign
2018-07-24 04:03:21 +02:00
nupurbaghel
0db62cee2a Bug 1477883: Cherry-pick style changes from servo/servo#21181. r=emilio
MozReview-Commit-ID: FpZ0YvXEYmP
2018-07-24 04:03:20 +02:00
Bastien Orivel
29f51fc11b Bug 1477883: Update parking_lot to 0.6. r=emilio
Cherry-pick of servo/servo#21216.

MozReview-Commit-ID: 4sTKSSCbrP4
2018-07-24 04:03:18 +02:00
Coroiu Cristina
44141cfda4 Merge inbound to mozilla-central a=merge 2018-07-24 00:43:44 +03:00
Ting-Yu Lin
222d82f138 Bug 1477533 - Convert NS_STYLE_COLUMN_SPAN_* to an enum class. r=heycam
MozReview-Commit-ID: F8M1DlpBop2

--HG--
extra : rebase_source : f98d97be38c6f2a8b3cf6624db3df15389cb0123
2018-07-21 19:53:44 -07:00
Ting-Yu Lin
a6015f5b37 Bug 1477533 - Convert NS_STYLE_COLUMN_FILL_* to an enum class. r=heycam
I put Balance as the first item in StyleColumnFill because it is the default
value.

MozReview-Commit-ID: A4DVMLL6XBa

--HG--
extra : rebase_source : 8c8d07b724bcd49dd4f4057fcbf0ccd46ed591ff
2018-07-21 12:00:26 -07:00
Ting-Yu Lin
582327218e Bug 1477533 - Use static const class variable to represent column-count: auto. r=heycam
NS_STYLE_COLUMN_COUNT_UNLIMITED is unused, so I remove it.

MozReview-Commit-ID: HLHLn9ZbkUY

--HG--
extra : rebase_source : 9bf00e1db00051c4454719e205633717fabde050
2018-07-20 17:09:31 -07:00
Emilio Cobos Álvarez
0c01140e18 Bug 1477553: Hide display: -moz-box|-moz-inline-box from content on Nightly and early beta. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2288

MozReview-Commit-ID: F9BeAneKY6e
2018-07-23 17:27:17 +02:00
Cosmin Sabou
39220f357c Backed out 2 changesets (bug 1477553) for reftest failures on xulscroll.html.
Backed out changeset a5bebad6bb23 (bug 1477553)
Backed out changeset 8d4b97056365 (bug 1477553)
2018-07-23 18:03:10 +03:00
Emilio Cobos Álvarez
e8373c682f Bug 1477553: Hide display: -moz-box|-moz-inline-box from content on Nightly and early beta. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2288

MozReview-Commit-ID: F9BeAneKY6e
2018-07-23 15:31:30 +02:00
Cosmin Sabou
51ed9f0129 Backed out changeset d0cb9041aa08 (bug 1477553) for browser chrome mochitest failures on /browser_parsable_css.js. 2018-07-23 13:17:09 +03:00
Emilio Cobos Álvarez
6eb98a1602 Bug 1477553: Hide display: -moz-box|-moz-inline-box from content on Nightly and early beta. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2288

MozReview-Commit-ID: F9BeAneKY6e
2018-07-23 10:33:32 +02:00
Emilio Cobos Álvarez
ecbdd3e854 Bug 1475511: Add @-moz-document media-document(image|video|plugin). r=xidorn
MozReview-Commit-ID: CD3O1vGLAoV
2018-07-21 23:02:17 +02:00
Emilio Cobos Álvarez
5c6cb85b41 Bug 1475511: Make document condition parsing a bit nicer. r=xidorn
MozReview-Commit-ID: Gi0FxrEAYcE
2018-07-21 23:02:15 +02:00
Emilio Cobos Álvarez
5bb3038c05 Bug 1475511: UrlMatchingFunction -> DocumentMatchingFunction. r=xidorn
MozReview-Commit-ID: HLcaVmehFW7
2018-07-21 23:02:12 +02:00
Emilio Cobos Álvarez
68f214df2a Bug 1450250: Make svg:use use an actual shadow tree. r=heycam
Summary:
This fixes a couple fuzz bugs and prevents special-casing <svg:use> even more in
bug 1431255.

Unfortunately not as many hacks went away as I'd have hoped, since we still need
to match document rules, see the linked SVGWG issues.

But blocks_ancestor_combinators goes away, which is nice since it's on a very
hot path.

Test Plan: WPT for style invalidation, covered by existing tests otherwise.

Reviewers: heycam

Tags: #secure-revision

Bug #: 1450250

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

MozReview-Commit-ID: C4mthjoSNFh
2018-07-20 14:44:51 +02:00
Xidorn Quan
b787149a33 Bug 1473180 part 5 - Remove DeclarationPushMode. r=emilio
MozReview-Commit-ID: LFgYeKE1SNk

--HG--
extra : rebase_source : 45fb9604be9385734826cf998270b495f9d0088b
extra : source : 4d6292b1edd2ab39dd0002f35de46a7120283dcf
2018-07-19 10:11:04 +10:00
Xidorn Quan
c4c124a4b7 Bug 1473180 part 4 - Remove DeclarationPushMode::Update and related code. r=emilio
MozReview-Commit-ID: 1fI5YRa54lQ

--HG--
extra : rebase_source : 489bfd938d60d47f8a839db7d7c999a8b1a678ed
extra : source : 05ce3e0531dcbe9da89d1a2ae4efe629cddc73d0
2018-07-19 10:11:04 +10:00
Xidorn Quan
34c9dd8f3f Bug 1473180 part 3 - Use the new algorithm for setting property. r=emilio
MozReview-Commit-ID: HQsVwWAGPBL

--HG--
extra : rebase_source : 7280d1a0278e698ebc2fb664874aea53a19a3d3f
extra : source : 08a40cf9746a83fceb124dd148d02ccb0d2e4864
2018-07-19 10:11:04 +10:00
Xidorn Quan
114fa2263a Bug 1473180 part 2 - Add new algorithm for setting property to be used in later commit. r=emilio
MozReview-Commit-ID: CdM8hDB6rFj

--HG--
extra : rebase_source : 898635ecb98a27b5b3caff4bb809b96f64e1f45d
extra : source : 0c8cbf0f371c2598d67f92d36972534cf77c5e43
2018-07-19 10:11:04 +10:00
Xidorn Quan
203b718775 Bug 1473180 part 1 - Introduce a concept of logical group. r=emilio
MozReview-Commit-ID: GXlf8JNML4N

--HG--
extra : rebase_source : e64861316080064d19fd1dbd96ce075a8c0b811e
extra : source : 8831c486a9db5137251ba15c19be5d1e7673774a
2018-07-19 10:11:04 +10:00
Emilio Cobos Álvarez
7a19e88052 Bug 1474959: Remove IS_STYLE_IF_VISITED. r=xidorn
MozReview-Commit-ID: 8rnlaMOJisA
2018-07-18 22:15:10 +02:00
Emilio Cobos Álvarez
7fb0be4298 Bug 1474959: Push visited style computation a bit further down. r=xidorn
MozReview-Commit-ID: 1DILenWIw4D
2018-07-18 22:15:09 +02:00
Emilio Cobos Álvarez
243930608d Bug 1309752: Cleanup might_need_transitions_update. r=birtles
Thought I had to update this as well, but nope. When basically any style changes
we already update transitions.

needs_transitions_update already handles the physical mapping changing by
checking whether any transition for the physical property remain there or not.

MozReview-Commit-ID: 6vKwal4yzRU
2018-07-18 12:10:19 +02:00
Emilio Cobos Álvarez
12f787b7b4 Bug 1309752: Update animations if the logical to physical property mapping changes. r=birtles
MozReview-Commit-ID: 1lbOcniojVO
2018-07-18 12:10:17 +02:00
Emilio Cobos Álvarez
9b504cb749 Bug 1309752: Animate logical properties. r=birtles
The setup is that AnimationValue only contains physical properties, and
we physicalize when building keyframes and transitions.

MozReview-Commit-ID: 9dI20N0LFrk
2018-07-18 12:10:16 +02:00
Emilio Cobos Álvarez
476d05caeb Bug 1309752: Introduce PropertyDeclaration::to_physical. r=heycam
MozReview-Commit-ID: FAL04K5G948
2018-07-18 12:10:15 +02:00
Margareta Eliza Balazs
fb3762edac Merge inbound to mozilla-central. a=merge 2018-07-18 12:33:29 +03:00
Bobby Holley
6bd85a621e Bug 1476445 - Use an acquire load for is_unique in servo_arc. r=manishearth
MozReview-Commit-ID: Dv7Rql4KUgr

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

--HG--
extra : moz-landing-system : lando
2018-07-17 22:23:26 +00:00
Philipp Klein
0d439e200e Bug 1473804: Add doc comments to specified float and clear CSS property. r=emilio
DONTBUILD, because comment-only change.

MozReview-Commit-ID: 1Ls9NKrDlES
2018-07-17 10:31:09 +02:00
Emilio Cobos Álvarez
10c9edc486 Bug 1476054: Remove a useless cfg. r=me
MozReview-Commit-ID: HrVqhA6FiIA
2018-07-17 10:23:26 +02:00
Emilio Cobos Álvarez
352d3ea810 Bug 1476054: Fix Servo build and unit tests build. r=me
MozReview-Commit-ID: Azyet6aYLez
2018-07-17 10:23:26 +02:00
Emilio Cobos Álvarez
adf95c2d09 Bug 1476054: Fixes and cleanups for Servo PR #21156. r=me
Similar to the previous patch, logical clear doesn't appear in computed style
objects.

MozReview-Commit-ID: FbN0hiUGzYa
2018-07-17 10:23:26 +02:00
Philipp Klein
b662e473ba Bug 1476054: Move clear CSS property outside mako. r=emilio
Imports servo/servo#21156.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

MozReview-Commit-ID: CLZN4FdUvDN
2018-07-17 10:15:47 +02:00
Emilio Cobos Álvarez
bbc6f5b7f2 Bug 1476054: Fixes and cleanups for Servo PR #21139. r=me
Logical floats don't appear in the computed style objects, so there's no need to
check for them.

MozReview-Commit-ID: 3ocJrRB3jeO
2018-07-17 10:15:46 +02:00
Philipp Klein
2c17f5a8ec Bug 1476054: Move float CSS property outside mako. r=emilio
Imports servo/servo#21139.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

MozReview-Commit-ID: EoLK36GMq3d
2018-07-17 10:15:45 +02:00
Gurzau Raul
c05f725b1e Backed out 6 changesets (bug 1476054) for failing on servo/ports/geckolib/glue.rs on a CLOSED TREE
Backed out changeset f4941fe345ad (bug 1476054)
Backed out changeset cc571c618e4c (bug 1476054)
Backed out changeset 0a712d7bcb66 (bug 1476054)
Backed out changeset 62293a989ed2 (bug 1476054)
Backed out changeset ef2a43e3fc6c (bug 1476054)
Backed out changeset a2bb0089cf1d (bug 1476054)
2018-07-16 23:56:23 +03:00
Emilio Cobos Álvarez
7dd15c8788 Bug 1476054: Remove a useless cfg. r=me
MozReview-Commit-ID: HrVqhA6FiIA
2018-07-16 21:38:49 +02:00
Emilio Cobos Álvarez
1e1dcdda64 Bug 1476054: Fix Servo build and unit tests build. r=me
MozReview-Commit-ID: Azyet6aYLez
2018-07-16 21:38:47 +02:00
Emilio Cobos Álvarez
9325870208 Bug 1476054: Fixes and cleanups for Servo PR #21156. r=me
Similar to the previous patch, logical clear doesn't appear in computed style
objects.

MozReview-Commit-ID: FbN0hiUGzYa
2018-07-16 21:38:46 +02:00
Philipp Klein
c501db36f9 Bug 1476054: Move clear CSS property outside mako. r=emilio
Imports servo/servo#21156.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

MozReview-Commit-ID: CLZN4FdUvDN
2018-07-16 21:38:45 +02:00
Emilio Cobos Álvarez
cd116a52c4 Bug 1476054: Fixes and cleanups for Servo PR #21139. r=me
Logical floats don't appear in the computed style objects, so there's no need to
check for them.

MozReview-Commit-ID: 3ocJrRB3jeO
2018-07-16 21:38:44 +02:00
Philipp Klein
2912d63914 Bug 1476054: Move float CSS property outside mako. r=emilio
Imports servo/servo#21139.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

MozReview-Commit-ID: EoLK36GMq3d
2018-07-16 21:38:43 +02:00
Sylvestre Ledru
13b20f9b86 Bug 1468273 - autopep8 on gfx/ r=ted
MozReview-Commit-ID: 8j8EU3E08GP

--HG--
extra : rebase_source : 1f38ac0b7283505622cc95a120a0a0d4cea96803
2018-06-10 14:13:44 +02:00
Dan Glastonbury
5cb001e979 Bug 1467622 - P4: Correct background/foreground ratio mixing. r=xidorn
MozReview-Commit-ID: InAZVcH2Vkt

--HG--
extra : rebase_source : 6fde424ad8e425c393c84457425da1f9188f4cfc
2018-07-03 14:15:06 +10:00
Dan Glastonbury
c9c954a337 Bug 1467622 - P1: nsStyleSVGPaint - Change nscolor to StyleComplexColor. r=xidorn
MozReview-Commit-ID: 1bbQzOoOuBe

--HG--
extra : rebase_source : 1631a71a78b0e6fbc4842ee14e11e946a5063afa
2018-06-27 17:07:37 +10:00
Emilio Cobos Álvarez
1bee1307a0 Bug 1475220: Cleanup push_applicable_declarations. r=xidorn
This patch changes the behavior to skipping XBL rules for
getDefaultComputedStyle.

MozReview-Commit-ID: 52cwDyBAXO
2018-07-13 14:09:34 +02:00
Xidorn Quan
2c5c2a4e44 Bug 1475229 - Remove unused parent parameter in ComputedValues::new. r=emilio
MozReview-Commit-ID: EBG0TS7tI4P

--HG--
extra : source : 9e548c6bf4a2c9f7795b30ac84e2251b86fb637f
2018-07-13 22:06:05 +10:00
Cameron McCormack
441af12cbe Bug 1475191 - Measure heap allocations hanging off selector components. r=emilio
MozReview-Commit-ID: D7vZQ7v8owS

--HG--
extra : rebase_source : c94ae45bdf2d39b1fdd5ee75b964db80989fadfa
2018-07-12 19:44:00 +10:00
Xidorn Quan
adb26a8735 Bug 1461285 followup - Remove a unused line to fix a warning. 2018-07-12 14:19:16 +10:00
Brindusan Cristian
232d35f4b9 Backed out 5 changesets (bug 1467622) for reftest failures on layout/reftests/svg/smil/style/anim-css-fill-1-from-by-curcol-hex.svg. CLOSED TREE
Backed out changeset 8694fe928b04 (bug 1467622)
Backed out changeset 74533cad9479 (bug 1467622)
Backed out changeset e1dbee410e98 (bug 1467622)
Backed out changeset 56142038cc7f (bug 1467622)
Backed out changeset 90cede21bad1 (bug 1467622)
2018-07-11 09:37:26 +03:00
Dan Glastonbury
ef55fbc2dd Bug 1467622 - P4: Correct background/foreground ratio mixing. r=xidorn
MozReview-Commit-ID: InAZVcH2Vkt

--HG--
extra : rebase_source : ab691a3b6ae2398b6b1f9913ce1a5cd0918b2791
2018-07-03 14:15:06 +10:00
Dan Glastonbury
0a83cfb70f Bug 1467622 - P1: nsStyleSVGPaint - Change nscolor to StyleComplexColor. r=xidorn
MozReview-Commit-ID: 1bbQzOoOuBe

--HG--
extra : rebase_source : 879e7d644f1dc3873cdfb352fce21e3d085db55a
2018-06-27 17:07:37 +10:00
Xidorn Quan
9a1b70328e Bug 1461285 part 3 - Have the CSSOM appending behavior behind a pref and only enable it on Nightly. r=emilio
MozReview-Commit-ID: 6BzPTNjXjyA

--HG--
extra : rebase_source : a109383ea2a55949da8d2ab3346940fa1eb76055
2018-07-11 10:54:47 +10:00
Xidorn Quan
c66d8c4ca5 Bug 1461285 part 2 - Add a declaration iterator to AllShorthand for simplify code. r=emilio
MozReview-Commit-ID: 9w2B3SpdkQo

--HG--
extra : rebase_source : e6b597f19f99a927c641d9aa123c5bc0248d46d2
2018-07-11 10:52:52 +10:00
Xidorn Quan
c237e1be0d Bug 1461285 part 1 - Rename DeclarationSource to DeclarationPushMode. r=emilio
MozReview-Commit-ID: Iyv9JrXrpzl

--HG--
extra : rebase_source : d0fac58c300bdde21a0225d7793f554487f48791
2018-07-09 16:03:32 +10:00
Cameron McCormack
8d5efb0c93 Bug 1473450 - Remove angle values from image-orientation. r=emilio
MozReview-Commit-ID: FB74ILJM6Fm

--HG--
extra : rebase_source : 0902aff63e0db070d2fdda3568453975f752b988
2018-07-05 12:04:58 +10:00
Boris Chiou
c8d7bee5ff Bug 1467277 - Avoid getting zero normalized vector of rotate3d for animations. r=hiro
If we have a rotate axis whose length is extremely large, we will get an
infinite value, and its normalized vector is a zero vector, instead of an
unit vector, i.e. (x/inf, y/inf, z/inf) == (0, 0, 0).
The solution is: we scale the vector, so the length becomes a finite value,
and we could get a valid unit vector. Therefore, we use
a different normalization method, robust_normalize().

MozReview-Commit-ID: L8SteFe09aO

--HG--
extra : rebase_source : 4568c8bf906a9246e4ef13672a9ed541852b974a
2018-07-05 15:41:23 -07:00
Boris Chiou
f0bf583292 Bug 1467277 - Bump euclid to 0.18 for style, style_traits, malloc_size_of, and tests. r=emilio
In order to drop old euclid version, we still need to bump euclid for
plane-split and gfx/*. However, it needs more update and is not related to
this bug, so let's do that in other place. Here, we bump euclid to
0.18.1, and update style/values/generics/transform.rs for it.

MozReview-Commit-ID: JfNAxkR8wgs

--HG--
rename : third_party/rust/euclid/.cargo-checksum.json => third_party/rust/euclid-0.17.3/.cargo-checksum.json
rename : third_party/rust/euclid/Cargo.toml => third_party/rust/euclid-0.17.3/Cargo.toml
rename : third_party/rust/euclid/src/homogen.rs => third_party/rust/euclid-0.17.3/src/homogen.rs
rename : third_party/rust/euclid/src/length.rs => third_party/rust/euclid-0.17.3/src/length.rs
rename : third_party/rust/euclid/src/lib.rs => third_party/rust/euclid-0.17.3/src/lib.rs
rename : third_party/rust/euclid/src/macros.rs => third_party/rust/euclid-0.17.3/src/macros.rs
rename : third_party/rust/euclid/src/point.rs => third_party/rust/euclid-0.17.3/src/point.rs
rename : third_party/rust/euclid/src/rect.rs => third_party/rust/euclid-0.17.3/src/rect.rs
rename : third_party/rust/euclid/src/rotation.rs => third_party/rust/euclid-0.17.3/src/rotation.rs
rename : third_party/rust/euclid/src/scale.rs => third_party/rust/euclid-0.17.3/src/scale.rs
rename : third_party/rust/euclid/src/side_offsets.rs => third_party/rust/euclid-0.17.3/src/side_offsets.rs
rename : third_party/rust/euclid/src/size.rs => third_party/rust/euclid-0.17.3/src/size.rs
rename : third_party/rust/euclid/src/transform2d.rs => third_party/rust/euclid-0.17.3/src/transform2d.rs
rename : third_party/rust/euclid/src/transform3d.rs => third_party/rust/euclid-0.17.3/src/transform3d.rs
rename : third_party/rust/euclid/src/trig.rs => third_party/rust/euclid-0.17.3/src/trig.rs
rename : third_party/rust/euclid/src/vector.rs => third_party/rust/euclid-0.17.3/src/vector.rs
extra : rebase_source : 0594429c74c7391f80b4e291cd7fe9cbddd72b33
2018-07-09 12:10:50 -07:00
Andreea Pavel
721e84c658 Backed out changeset 641b02da5961 (bug 1473450) for failing xpchsell and mochitest on a CLOSED TREE 2018-07-10 09:28:59 +03:00
Cameron McCormack
e2ce31efc1 Bug 1473450 - Remove angle values from image-orientation. r=emilio
MozReview-Commit-ID: FB74ILJM6Fm

--HG--
extra : rebase_source : 8c13a67086aedad73a642b5125bbb44f48068f5d
2018-07-05 12:04:58 +10:00
Oriol Brufau
281b4c08f4 Bug 1472567 - Honor logical border colors in visited links r=emilio
MozReview-Commit-ID: IF8yvkFmPc4

--HG--
extra : rebase_source : 56d82de88c9390007a7fea5f2f8ef99292ad61d8
2018-07-05 12:56:34 +02:00
Emilio Cobos Álvarez
0d461a5f71 No bug - Trivial indentation fix. r=me
MozReview-Commit-ID: JqBxF7i0HQZ
2018-07-08 03:23:43 +02:00
Cameron McCormack
81599f34a7 Bug 1473735 - Add memory reporting for MediaQueryLists. r=emilio
MozReview-Commit-ID: 87rgRtQOOyG

--HG--
extra : rebase_source : a2ba4e1ed29fd7249378f9496c2059fa26316c3c
2018-07-06 11:09:12 +10:00
Emilio Cobos Álvarez
c6c50bd593 Bug 1473779: Make writing-mode and direction non-animatable. r=heycam
Per https://github.com/w3c/csswg-drafts/issues/2751

MozReview-Commit-ID: GCG3vJWNPfC
2018-07-06 10:19:02 +02:00
Emilio Cobos Álvarez
cbec672d29 Bug 1473779: Reformat most of inherited_box.mako.rs. r=heycam
image-orientation is being changed as we speak, so I left it there to avoid
bitrot.

MozReview-Commit-ID: IwpA5HEuVU
2018-07-06 10:19:01 +02:00
Emilio Cobos Álvarez
8305165582 Bug 1473793: Other minor properties.mako.rs cleanups and improvements. r=heycam
Also, add an is_logical method, which we'll use in a bit.

MozReview-Commit-ID: Hq63wgbiRRu
2018-07-06 09:45:37 +02:00
Emilio Cobos Álvarez
2a9c99acc0 Bug 1473793: Add a clone helper that works regardless of whether the property is logical. r=heycam
MozReview-Commit-ID: 74jdo8vPOAc
2018-07-06 09:45:24 +02:00
Emilio Cobos Álvarez
d62b4d6a71 Bug 1473793: Remove dead code. r=heycam
MozReview-Commit-ID: Ifx8tjAJSAM
2018-07-06 09:44:37 +02:00
Bobby Holley
a4d6a5ba57 Bug 1431285 - Cap the number of style threads at six. r=emilio
MozReview-Commit-ID: 3qI1mIvDn8j

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

--HG--
extra : moz-landing-system : lando
2018-07-03 23:47:48 +00:00
Emilio Cobos Álvarez
291f42059a Bug 1472552 - Reformat font.mako.rs. r=xidorn
To be consistent, use the block indentation the rest of the Rust code uses.

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

--HG--
extra : moz-landing-system : lando
2018-07-01 23:06:17 +00:00
Emilio Cobos Álvarez
3a5427ddbd Bug 1472538: Update bindgen. r=xidorn
Surprisingly painless.

I'll update to 0.37.4 instead of .3, but that only contains
https://github.com/rust-lang-nursery/rust-bindgen/pull/1343 on top to prevent
build warnings.

MozReview-Commit-ID: H0uMtdGnXvL
2018-07-01 16:04:49 +02:00
Emilio Cobos Álvarez
84cc9de89a No bug - Appease Servo's tidy lint.
MozReview-Commit-ID: 3PxU77BJFEB
2018-07-01 01:02:43 +02:00
Emilio Cobos Álvarez
0f194fedad No bug - Fix Servo unit tests. r=me
MozReview-Commit-ID: E87qwt1XHEO
2018-07-01 00:52:10 +02:00
Emilio Cobos Álvarez
9b5901a3b4 No bug - Fix servo build.
MozReview-Commit-ID: EEuyLgAv8LR
2018-07-01 00:52:09 +02:00
Emilio Cobos Álvarez
f73f11f891 No bug - Remove stray newline. r=me
MozReview-Commit-ID: 4oTHDBjMJHp
2018-06-30 17:19:50 +02:00
Emilio Cobos Álvarez
f36a3eac08 Bug 1472443: Serialize content properties using Servo. r=xidorn
... and cleanup unused keywords / getters using the scripts in
layout/style/tools

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

MozReview-Commit-ID: BRUGcje7X0q
2018-06-30 17:14:12 +02:00
Emilio Cobos Álvarez
fac54cd7df Bug 1472443: Make StyleContentType an enum class. r=xidorn
Most of it is automated by:

  %s/eStyleContentType_/StyleContentType::/g
  %s/nsStyleContentType/StyleContentType/g

But I removed some parentheses by hand.

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

MozReview-Commit-ID: 3IcirjIYX5p
2018-06-30 17:13:07 +02:00
Emilio Cobos Álvarez
97cf1e0c02 Bug 1116638: Expose logical props in computed style. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D1862

--HG--
extra : moz-landing-system : lando
2018-06-30 13:45:43 +00:00
Olli Pettay
2e00f64ed1 Bug 1419661, if ExtendedDOMSlots are used before slots, use FatSlots to have fewer allocations, r=mrbkap 2018-06-30 01:30:37 +03:00
Gerald Squelart
fadefb87a2 Bug 1459524 - Removed layout.css.all-shorthand.enabled pref - r=heycam
The 'all' shorthand has shipped a long time ago, so this pref is not needed
anymore.

MozReview-Commit-ID: GND8qSVAfCG

--HG--
extra : rebase_source : 10708e749911fa95554ed423a5782db61df67cd0
2018-06-28 14:51:38 +10:00
Emilio Cobos Álvarez
b6ebd48752 Bug 1454165 - Make :host() and ::slotted() account for the inner selector's specificity. r=xidorn
As resolved in https://github.com/w3c/csswg-drafts/issues/1915.

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

--HG--
extra : moz-landing-system : lando
2018-06-28 10:58:06 +00:00
shindli
d288e9cae7 Merge inbound to mozilla-central. a=merge 2018-06-29 00:53:32 +03:00
Olli Pettay
ecc23dbcc5 Bug 1471871 - Unconditionally enable :defined in chrome (but not unconditionally enabled for querySelector), r=emilio
--HG--
extra : rebase_source : d0d559d52dd09d8f4ce5a08e33dc0680b3ed62f1
2018-06-28 15:58:11 +03:00
Olli Pettay
d87b0df953 Bug 1331334 - Implement :defined pseudo-class for custom elements, r=emilio
--HG--
extra : rebase_source : 5f95c38166d00ae07ef523ab8ecb5b4cb59eceaf
2018-06-28 14:55:45 +03:00
Emilio Cobos Álvarez
688e2c1d75 Bug 1464782: Put offset-* aliases behind a pref. r=xidorn
MozReview-Commit-ID: Hl6Muim3wVH
2018-06-27 16:12:04 +02:00
Emilio Cobos Álvarez
d73b4b0679 Bug 1464782: Rename offset-* logical properties to inset-*. r=xidorn
MozReview-Commit-ID: BW44sru99RF
2018-06-27 16:12:01 +02:00
Xidorn Quan
dca9867a8f Bug 1471114 part 2 - Generate ComputedStyleMap entry list from property data. r=emilio
This changes the order of properties returned from gCS. The old order
doesn't make much sense, and other browsers don't agree on an identical
order either, so it should be trivial to change it. Also the spec isn't
super clear / useful in this case.

Several -moz-prefixed properties are excluded from the list due to their
being internal. I suspect they are never accessible anyway, so probably
nothing gets changed by this.

MozReview-Commit-ID: 9LfangjpJ3P

--HG--
extra : source : 879a7265c35f51c5954d8a44ccd374a606ecba0e
2018-06-27 15:34:29 +10:00
Xidorn Quan
46cae3d7aa Bug 1471104 followup - Upgrade cssparser and revendor.
MozReview-Commit-ID: 74rBgkJEcYd

--HG--
extra : rebase_source : a30d17b3d7e24f1a61c01d1dc442d6ce60c1dde3
extra : source : 8ff268ee87b7392391a6b6aa981f9180c45b27b6
2018-06-27 10:43:21 +10:00
Xidorn Quan
dadd7149ea Bug 1471104 - Remove location from preludes and take it from argument. r=emilio
MozReview-Commit-ID: HeJUQvkacaf

--HG--
extra : rebase_source : b63b2949249ddb6d8e063a98bfeaa7656e6183fe
extra : source : 6f32be6912db802563ad33ae1d70756f3b3dcd8a
2018-06-27 10:42:51 +10:00
Xidorn Quan
43c1228a41 Bug 1471486 part 2 - Use RUSTFMT env in stylo build script. r=emilio
MozReview-Commit-ID: JOg0xkmG5Yx

--HG--
extra : rebase_source : a4b45da2932518a7236f9f306a0edfc145c8038e
2018-06-27 15:28:22 +10:00
Emilio Cobos Álvarez
65c63991fb Bug 1471063: Simplify selector serialization. r=xidorn
MozReview-Commit-ID: 959U7yd5W9j
2018-06-26 14:15:58 +02:00
Emilio Cobos Álvarez
fac77fa281 Bug 1471063: Deindent the serialization loop. r=xidorn
MozReview-Commit-ID: GPlUAx7YXVb
2018-06-26 14:15:57 +02:00
Emilio Cobos Álvarez
5bb17d3cf9 Bug 1471063: Remove unneeded combinator check in selector-matching. r=xidorn
The combinator doesn't change during the loop, no need to check it.

MozReview-Commit-ID: KIAt0WiEOtI
2018-06-26 14:15:56 +02:00
Margareta Eliza Balazs
c866c30fcf Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-26 12:24:32 +03:00
Hiroyuki Ikezoe
0b9b61abdd Bug 1418806 - Try to allocate possible size for AnimationValueMap before composing. r=birtles
The EffectSet count does not exactly represent the count what we really need
for AnimationValueMap, but in most cases it matches.  For example;

1) The element has two different keyframes animations

 @keyframes anim1 {
   to { opacity: 0; }
 }
 @keyframes anim2 {
   to { transform: rotate(360deg); }
 }

 In this case the number matches.

2) The element has two animations but both keyframes have the same CSS property

 @keyframes anim1 {
   to { opacity: 0; }
 }
 @keyframes anim2 {
   to { opacity: 0.1; }
 }

 In this case the number doesn't match, moreover it results more memory than we
 ever needed, but this case is presumably less common.

3) The element has an animation having keyframes for two different CSS
   properties.

 @keyframes anim {
   from { opacity: 0; transform: rotate(360deg); }
 }

 In this kind of cases, the number doesn't match.  But even so, this patch
 reduces the opportunities that the AnimationValueMap tries to allocate a new
 memory (i.e. less opportunities on expanding the map).

Note that when the hash map is expanded, we do allocate a new RawTable with the
new size then replace the old one with the new one [1], so I believe this
change will reduce the crash rate to some extent.

[1] https://hg.mozilla.org/mozilla-central/file/15c95df467be/servo/components/hashglobe/src/hash_map.rs#l734

MozReview-Commit-ID: 6tcF9aqXh7a

--HG--
extra : rebase_source : 366989d3a2756f5a5711503a57f42f3b746d93a5
2018-06-26 11:08:24 +09:00