Commit graph

6718 commits

Author SHA1 Message Date
bors-servo
a9c17970c1 Auto merge of #19576 - canaltinova:text-align, r=Manishearth,emilio
style: Move text-align outside of the mako file.

I will need this refactoring before my next job. I didn't actually fix the FIXME's along the way. My other PR probably will cover these.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19576)
<!-- Reviewable:end -->
2017-12-18 12:12:52 -06:00
Nazım Can Altınova
9882d0bae5 style: Move text-align outside of the mako file. 2017-12-18 11:58:06 -06:00
Emilio Cobos Álvarez
0e781384cd
style: Add a FIXME comment that I need to write a test-case for. 2017-12-18 14:19:17 +01:00
bors-servo
8aba41d951 Auto merge of #19583 - CYBAI:move-will-change-out-of-mako, r=emilio
style: Move will-change outside of mako

This is a sub-PR of #19015
r? emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19582
- [x] These changes do not require tests

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19583)
<!-- Reviewable:end -->
2017-12-16 16:39:37 -06:00
Emilio Cobos Álvarez
af3a50a9d9
style: Remove the grid pref.
Bug: 1398492
Reviewed-by: mats
MozReview-Commit-ID: 6Qez8NE8oze
2017-12-16 22:10:22 +01:00
CYBAI
2eb396613b
style: Move will-change outside of mako 2017-12-16 21:47:59 +01:00
bors-servo
a31fd24ce9 Auto merge of #19581 - emilio:grid-line-serialize, r=canaltinova
style: Fix grid line serialization to avoid redundant spacing.

This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1425227.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19581)
<!-- Reviewable:end -->
2017-12-16 09:13:48 -06:00
Emilio Cobos Álvarez
de4dd638eb
style: Fix grid line serialization to avoid redundant spacing.
This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1425227.
2017-12-16 01:26:18 +01:00
Brian Birtles
150db42ef6 Update references to Web Animations spec 2017-12-15 16:21:26 -06:00
bors-servo
e631d167bf Auto merge of #19578 - emilio:parse-keyword, r=Manishearth,canaltinova
Allow deriving Parse on keywords.

This makes patches like #19576 much easier.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19578)
<!-- Reviewable:end -->
2017-12-15 14:55:49 -06:00
Emilio Cobos Álvarez
8fbdbc8f95
style: Use derive(Parse) for X and Y. 2017-12-15 20:15:32 +01:00
Emilio Cobos Álvarez
4abd1dc819
style: Use derive(Parse) for RepeatKeyword. 2017-12-15 20:15:31 +01:00
Emilio Cobos Álvarez
7036cb0077
Allow deriving Parse for keywords. 2017-12-15 20:01:31 +01:00
bors-servo
90290cfafe Auto merge of #19564 - emilio:push-applicable-simple, r=mbrubeck
style: Slightly simplify push_applicable_declarations.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19564)
<!-- Reviewable:end -->
2017-12-15 11:28:16 -06:00
Felipe Nakandakari
eb88a298f6 style: move list-style-image out of mako
cleaner way to set boxed param

redefine get_initial_value to none

make parse method clearer

remove some extra lines
2017-12-15 16:23:53 +11:00
Emilio Cobos Álvarez
94e895c61e
style: Slightly simplify push_applicable_declarations. 2017-12-14 18:04:02 +01:00
bors-servo
26feea3be5 Auto merge of #19556 - emilio:quotes-mako, r=emilio
Move list quotes out of mako.

Rebase of https://github.com/servo/servo/pull/19154.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19556)
<!-- Reviewable:end -->
2017-12-14 01:39:38 -06:00
bors-servo
c258bfb430 Auto merge of #19551 - emilio:anon-box-visited, r=heycam
style: Make anon boxes account for :visited.

This should fix one of the test failures of:

  https://bugzilla.mozilla.org/show_bug.cgi?id=616436

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19551)
<!-- Reviewable:end -->
2017-12-13 22:47:38 -06:00
Emilio Cobos Álvarez
604c520343
style: Make anon boxes account for :visited.
This should fix one of the test failures of:

  https://bugzilla.mozilla.org/show_bug.cgi?id=616436
2017-12-14 05:02:54 +01:00
Emilio Cobos Álvarez
03f3521216
style: Use more Box<[]> and Box<str> for quotes. 2017-12-14 04:05:25 +01:00
Connor Brewster
16f627a18a
style: Move list quotes out of mako 2017-12-14 03:43:10 +01:00
bors-servo
714c1b2455 Auto merge of #19548 - CYBAI:move-outline-style-out-of-mako, r=emilio
style: Move outline-style outside of mako

This is a sub-PR of #19015
r? emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19546
- [x] These changes do not require tests

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19548)
<!-- Reviewable:end -->
2017-12-13 19:30:26 -06:00
CYBAI
b9b91b33be style: Move outline-style outside of mako 2017-12-13 11:41:59 +08:00
Manish Goregaokar
337e5288c2 Add weighted telemetry probes for parallel restyles 2017-12-12 10:13:23 -06:00
Manish Goregaokar
d573081fe5 Add telemetry probe for fraction of restyles that are parallel 2017-12-12 10:08:11 -06:00
Simon Sapin
890257ebc3 Check that 'style' is compiled in a supported configuration.
Provide an explanatory error message when the compilation would fail because of missing or duplicate items.
2017-12-10 02:58:31 +01:00
bors-servo
c6bf85eca9 Auto merge of #19536 - emilio:compound-selector-list, r=mbrubeck
style: Move the code to parse a list of compound selectors.

I'll need this for ::slotted().

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19536)
<!-- Reviewable:end -->
2017-12-09 17:15:14 -06:00
bors-servo
95520ca39c Auto merge of #19533 - emilio:unused-code-should-die, r=emilio
style: Remove unused SelectorImpl::pseudo_element_cascade_type.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19533)
<!-- Reviewable:end -->
2017-12-09 15:27:49 -06:00
Emilio Cobos Álvarez
dbf0183b0f
style: Use ? in Option more often. 2017-12-09 20:26:09 +01:00
bors-servo
5f4f355cea Auto merge of #19537 - mbrubeck:try, r=nox
style: Use the ? operator for Option

This is stable in Rust 1.22 (#19532).

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because it is refactoring only

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19537)
<!-- Reviewable:end -->
2017-12-09 10:50:55 -06:00
Matt Brubeck
3005a26daf style: Use the ? operator for Option 2017-12-09 08:29:53 -08:00
Emilio Cobos Álvarez
b1f25a2b1f
style: Move the code to parse a list of compound selectors.
I'll need this for ::slotted().
2017-12-09 16:47:37 +01:00
Emilio Cobos Álvarez
bf564e0238
style: Simplify naming and signatures of single-colon pseudo stuff.
Also drop a few FIXMEs while at it, since they look bogus.
2017-12-09 16:12:22 +01:00
Emilio Cobos Álvarez
c93b844125
style: Remove unused SelectorImpl::pseudo_element_cascade_type. 2017-12-09 16:03:09 +01:00
bors-servo
f8a87a76b2 Auto merge of #19530 - emilio:extend-not-much, r=jdm
style: Don't unconditionally extend() the declaration block vector.

Since it appears in profiles when used from CSSOM, like the one in the bug
mentioned in the comment.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19530)
<!-- Reviewable:end -->
2017-12-08 19:59:38 -06:00
bors-servo
42a3c1631c Auto merge of #19526 - upsuper:moz-bool-pref, r=emilio
Add @supports -moz-bool-pref() support for stylo

This is the Servo side change for [bug 1267890](https://bugzilla.mozilla.org/show_bug.cgi?id=1267890).

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19526)
<!-- Reviewable:end -->
2017-12-08 18:49:39 -06:00
bors-servo
7a87337235 Auto merge of #19520 - emilio:simplify-visited, r=jryans
selectors: Simplify :visited by only using the "is inside link" information.

Right now we go through a lot of hoops to see if we ever see a relevant link.

However, that information is not needed: if the element is a link, we'll always
need to compute its visited style because its its own relevant link.

If the element inherits from a link, we need to also compute the visited style
anyway.

So the "has a relevant link been found" is pretty useless when we know what are
we inheriting from.

The branches at the beginning of matches_complex_selector_internal were
affecting performance, and there are no good reasons to keep them.

I've verified that this passes all the visited tests in mozilla central, and
that the test-cases too-flaky to be landed still pass.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19520)
<!-- Reviewable:end -->
2017-12-08 17:37:32 -06:00
Emilio Cobos Álvarez
3fe28e380c
style: Don't unconditionally extend() the declaration block vector.
Since it appears in profiles when used from CSSOM, like the one in the bug
mentioned in the comment.
2017-12-08 21:30:58 +01:00
Xidorn Quan
d2042d7ed1 Add @supports -moz-bool-pref() support for stylo. 2017-12-08 14:12:02 -06:00
bors-servo
07bd84ecc8 Auto merge of #19510 - servo:heapsize, r=nox
Update some dependencies, remove heapsize from the build

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19510)
<!-- Reviewable:end -->
2017-12-08 07:49:54 -06:00
Simon Sapin
e17697fb0e Update euclid, azure, skia, offscreen_gl_context, plane-split, webrender 2017-12-08 14:32:28 +01:00
Emilio Cobos Álvarez
3119db724a
selectors: Simplify :visited by only using the "is inside link" information.
Right now we go through a lot of hoops to see if we ever see a relevant link.

However, that information is not needed: if the element is a link, we'll always
need to compute its visited style because its its own relevant link.

If the element inherits from a link, we need to also compute the visited style
anyway.

So the "has a relevant link been found" is pretty useless when we know what are
we inheriting from.

The branches at the beginning of matches_complex_selector_internal were
affecting performance, and there are no good reasons to keep them.

I've verified that this passes all the visited tests in mozilla central, and
that the test-cases too-flaky to be landed still pass.
2017-12-08 05:35:12 +01:00
bors-servo
254bbf50a7 Auto merge of #19517 - mbrubeck:uluru, r=emilio
Defend against bugs in SelectorFlagsMap

Some defensive programming:

* Make `SelectorFlagsMap::apply_flags` private so it's easier to ensure it is called from the correct thread.

* Clear the cache and the map at the same time; otherwise `apply_flags` leaves `SelectorFlagsMap` in an inconsistent state.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they do not change behavior

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19517)
<!-- Reviewable:end -->
2017-12-07 19:09:07 -06:00
Matt Brubeck
3e34c0295e Defend against bugs in SelectorFlagsMap
* Make `SelectorFlagsMap::apply_flags` private so it's easier to ensure
  it is called from the correct thread.

* Clear the cache and the map at the same time; otherwise it leaves
  `SelectorFlagsMap` in an inconsistent state.
2017-12-07 16:45:04 -08:00
Simon Sapin
76270ad6c1 Update app_units and webrender 2017-12-08 01:09:38 +01:00
bors-servo
0c13f14aaa Auto merge of #19512 - mbrubeck:uluru, r=emilio
Improve LRU cache behavior in SelectorFlagsMap

This code used to insert duplicate entries to avoid expensive shuffling of the LRU cache.  With uluru this is no longer necessary, because reordering the cache is cheap.

Now it uses the `LRUCache::find` method from uluru 0.2 to update entries in-place.  This should increase cache hits by eliminating unnecessary evictions.

This PR also updates `arrayvec` because `uluru` depends on it, and `immeta` because it depends on `arrayvec`.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they don't change behavior

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19512)
<!-- Reviewable:end -->
2017-12-07 16:02:44 -06:00
Bastien Orivel
4b16ff7236 Bump string_cache, html5ever and xml5ever 2017-12-07 20:37:38 +01:00
Matt Brubeck
1f22041f5f Improve LRU cache behavior in SelectorFlagsMap
This code used to insert duplicate entries to avoid expensive shuffling
of the LRU cache.  With uluru this is no longer necessary, because
reordering the cache is cheap.

Now it uses the `LRUCache::find` method from uluru 0.2 to update entries
in-place.  This should improve the hit rate, because it eliminates
unnecessary evictions.
2017-12-07 10:05:38 -08:00
Matt Brubeck
99c2db0549 Update to uluru 0.2 and arrayvec 0.4 2017-12-07 10:05:38 -08:00
Emilio Cobos Álvarez
af879523ea
style: Make all keywords CamelCase for consistency.
This prevents confusion and paves the ground for derive(Parse) of them.
2017-12-06 02:35:10 +01:00