Commit graph

5935 commits

Author SHA1 Message Date
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
Emilio Cobos Álvarez
37cd870a9e
style: Make to_camel_case support numbers too.
This is needed to convert preserve-3d into Preserve3d.
2017-12-05 23:36:14 +01:00
Nazım Can Altınova
98e7bc2aaa stylo: Update bindings 2017-12-06 00:12:45 +03:00
Nazım Can Altınova
1c48a3bedb stylo: Hide accidentally exposed subgrid behind prefs 2017-12-06 00:05:26 +03:00
bors-servo
c20fd7d58a Auto merge of #19494 - Eijebong:smallvec, r=emilio
Update smallvec to 0.6

<!-- 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/19494)
<!-- Reviewable:end -->
2017-12-05 13:44:19 -06:00
bors-servo
479847d8b9 Auto merge of #19497 - emilio:overflow-clip-box, r=emilio,nox
style: Add internal overflow-clip-box-block/-inline properties and make overflow-clip-box a shorthand.

These are the changes from bug 1422839. First commit is reviewed by me, the second is a fixup to that.

<!-- 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/19497)
<!-- Reviewable:end -->
2017-12-05 12:43:45 -06:00
Emilio Cobos Álvarez
8c18e01425
style: Update bindings. 2017-12-05 19:00:42 +01:00
Emilio Cobos Álvarez
35d0e7cf0f
style: use the same type for overflow-clip-box longhands.
Needed to add the hacky padding_box scheme, will fix it up later.
2017-12-05 19:00:14 +01:00
Mats Palmgren
cdf7ae51b6
style: Add internal overflow-clip-box-block/-inline properties and make overflow-clip-box a shorthand.
Bug: 1422839
Reviewed-by: emilio
2017-12-05 18:20:21 +01:00
bors-servo
e2a7360e17 Auto merge of #19487 - Eijebong:bump, r=jdm
Update lazy_static to 1.0

For now it'll be duplicated

<!-- 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/19487)
<!-- Reviewable:end -->
2017-12-05 10:31:16 -06:00
Boris Chiou
aa52e644fe Implement the Servo parser for FontFaceSet Web API. 2017-12-05 21:33:14 +08:00
Boris Chiou
1e29e64000 Implement the Servo parser for font descriptors Web API.
According to the spec, this parser should follow what we do for
@font_face rule, so we use the same type to parse the input, instead of
using the parser of their specified values.
2017-12-05 21:33:07 +08:00
bors-servo
8f30880d36 Auto merge of #19493 - emilio:chrome-perf, r=xidorn,Manishearth
style: Some stylo-chrome perf tweaks.

<!-- 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/19493)
<!-- Reviewable:end -->
2017-12-05 06:05:25 -06:00
Bastien Orivel
6f8ba39dce Update smallvec to 0.6 2017-12-05 12:03:20 +01:00
Emilio Cobos Álvarez
bd890cc9bc
style: Sharing formatting nits.
MozReview-Commit-ID: 3tSiyBquR1v
2017-12-05 11:21:32 +01:00
Emilio Cobos Álvarez
720b88b028
style: Inline Gecko_GetSMILOverrideDeclarationBlock.
Bug: 1422641
Reviewed-by: xidorn, Manishearth
MozReview-Commit-ID: E8cM7zRZHn1
2017-12-05 11:21:31 +01:00
Emilio Cobos Álvarez
ecb92065d3
style: Inline Gecko_Namespace.
Bug: 1422636
Reviewed-by: xidorn
MozReview-Commit-ID: FFdmaYCDxnv
2017-12-05 11:13:10 +01:00
Emilio Cobos Álvarez
026bacafb3
style: Inline the Rust bits of GetDocumentState.
Bug: 1422633
Reviewed-by: xidorn
MozReview-Commit-ID: 9zvZF72ljS
2017-12-05 11:12:54 +01:00
Emilio Cobos Álvarez
dcd81b92e0
style: Update bindings. 2017-12-05 11:07:37 +01:00
Emilio Cobos Álvarez
23d69ea77d
style: Support calc() in color functions. 2017-12-05 10:06:24 +01:00
Emilio Cobos Álvarez
e91c9ec7fe
style: Formatting nits in color parsing. 2017-12-05 10:01:37 +01:00
Emilio Cobos Álvarez
ea5efd9e2f
style: Update cssparser to 0.23. 2017-12-05 10:01:37 +01:00
Cameron McCormack
64c5a8a6e8 style: Regenerate Gecko bindings. 2017-12-05 13:22:22 +08:00
Cameron McCormack
7015d5b22e style: Add a new CSS error type for lone value parsing errors.
This allows us to report errors in functions that want to just parse a
single CSS value, rather than a value for a particular property declaration.

The one value type that we need to support for now is <color> value parsing
errors, so just add formatting/support for that.
2017-12-05 13:22:22 +08:00
Cameron McCormack
c5a3d752b8 style: Regenerate Gecko bindings. 2017-12-05 10:11:48 +08:00
Cameron McCormack
c49554d4c4 style: Add FFI function to parse a @counter-style descriptor. 2017-12-05 10:04:52 +08:00
Cameron McCormack
374f0091c1 geckolib: Add FFI function to parse a @counter-style name. 2017-12-05 10:04:52 +08:00
Gecko Backout
25436276ae Backed out 1 changesets because the gecko part (bug 1420117) has to be backed out for the mochitests r=backout on a CLOSED TREE
Backed out changeset baada68cad47

Backs out https://github.com/servo/servo/pull/19441
2017-12-05 00:18:35 +00:00
Bastien Orivel
c3f919ec0e Update lazy_static to 1.0
For now it'll be duplicated
2017-12-04 22:51:13 +01:00
Cameron McCormack
ec4f9a5f3b style: Update Gecko bindings. 2017-12-04 09:21:54 +08:00
Cameron McCormack
3513b31091 style: Add FFI function to parse a @counter-style descriptor. 2017-12-04 08:57:46 +08:00
bors-servo
e4dba3abef Auto merge of #19462 - emilio:angle-parsing, r=nox
style: Cleanup Angle parsing.

This PR also contains a functional change, allowing to parse unitless zero angles in hue-rotate().

See the links and the comments for why.

<!-- 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/19462)
<!-- Reviewable:end -->
2017-12-03 09:14:59 -06:00
bors-servo
14f757817e Auto merge of #19463 - emilio:bye-parse-functions, r=jdm
style: Remove free parsing functions, use Integer::parse and Number::parse instead.

<!-- 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/19463)
<!-- Reviewable:end -->
2017-12-03 06:02:12 -06:00
bors-servo
d198caa9ff Auto merge of #19436 - aethanyc:shape-image-threshold, r=heycam
style: Support 'shape-image-threshold' property

This has been reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1265343

<!-- 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/19436)
<!-- Reviewable:end -->
2017-12-02 10:03:16 -06:00