Commit graph

1362 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
bab6077c1c
Revert #19666 since we do create NAC elements and expect them to be inline.
This reverts commit 1970e82b0d, reversing
changes made to e882660ea6.

The reparenting logic is still bogus, but I'll figure out how to deal with that
in a bit.
2017-12-31 17:00:26 +01:00
bors-servo
1970e82b0d Auto merge of #19666 - emilio:root-and-item, r=upsuper
style: Simplify the skip item based display fixup adjustment.

In practice the only NAC that possibly inherits from a grid or flex container
are pseudos.

In Gecko, if the root element is an item container, custom anon content would
also sometimes incorrectly inherit from that (see bug 1405635), but that's fixed
in Stylo.

We remove the IS_ROOT_ELEMENT blockification from the "skip display fixup"
check, since the root element is never NAC or anything like that, so there's no
need for the check.

This also fixes some reparenting fishiness related to pseudo-elements. We were
only skipping the fixup when reparenting anon boxes, not when reparenting normal
element styles, nor when reparenting other pseudo styles which are not anon
boxes.

<!-- 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/19666)
<!-- Reviewable:end -->
2017-12-31 07:01:10 -06:00
Emilio Cobos Álvarez
e464f5b020
style: Simplify the skip item based display fixup adjustment.
In practice the only NAC that possibly inherits from a grid or flex container
are pseudos.

In Gecko, if the root element is an item container, custom anon content would
also sometimes incorrectly inherit from that (see bug 1405635), but that's fixed
in Stylo.

We remove the IS_ROOT_ELEMENT blockification from the "skip display fixup"
check, since the root element is never NAC or anything like that, so there's no
need for the check.

This also fixes some reparenting fishiness related to pseudo-elements. We were
only skipping the fixup when reparenting anon boxes, not when reparenting normal
element styles, nor when reparenting other pseudo styles which are not anon
boxes.
2017-12-31 13:57:49 +01:00
Emilio Cobos Álvarez
e6623e23c1
style: Update bindings. 2017-12-31 10:02:47 +01:00
Emilio Cobos Álvarez
dd1cef1a6c
style: Stop duplicating slots.
Bug: 1427001
Reviewed-by: smaug
MozReview-Commit-ID: Cq647BcOzbe
2017-12-31 09:01:55 +01:00
Gecko Backout
cf8b8db87d Backed out changeset dda1c7951937 for build bustage force-cargo-library-build. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/19660
2017-12-31 01:17:32 +00:00
Emilio Cobos Álvarez
89e6d1d62e
style: Update bindings. 2017-12-30 20:14:13 +01:00
Emilio Cobos Álvarez
72e0bfa52f
style: Stop duplicating slots.
Bug: 1427001
Reviewed-by: smaug
MozReview-Commit-ID: Cq647BcOzbe
2017-12-30 12:36:52 +01:00
Emilio Cobos Álvarez
99dfc67d60
style: Specify the type of a pointer.
This avoids nightly warnings.
2017-12-29 19:17:29 +01:00
Xidorn Quan
11bd1bc38c Convert NS_STYLE_BORDER_IMAGE_REPEAT_* to an enum class. 2017-12-21 18:27:40 +11:00
Emilio Cobos Álvarez
a931789f37
style: Update bindings. 2017-12-19 20:47:16 +01:00
Nazım Can Altınova
9882d0bae5 style: Move text-align outside of the mako file. 2017-12-18 11:58:06 -06: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
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
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
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
Xidorn Quan
d2042d7ed1 Add @supports -moz-bool-pref() support for stylo. 2017-12-08 14:12:02 -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
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
Nazım Can Altınova
98e7bc2aaa stylo: Update bindings 2017-12-06 00:12:45 +03:00
Emilio Cobos Álvarez
8c18e01425
style: Update bindings. 2017-12-05 19:00:42 +01: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
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
Cameron McCormack
64c5a8a6e8 style: Regenerate Gecko bindings. 2017-12-05 13:22:22 +08:00
Cameron McCormack
c5a3d752b8 style: Regenerate Gecko bindings. 2017-12-05 10:11:48 +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
Cameron McCormack
ec4f9a5f3b style: Update Gecko bindings. 2017-12-04 09:21:54 +08: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
bors-servo
45bbbac9d9 Auto merge of #19454 - emilio:has-class-is-stupid, r=upsuper
style: Add a missing fast-path in GeckoElement::each_class.

This shows up when inserting elements in the bloom filter.

<!-- 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/19454)
<!-- Reviewable:end -->
2017-12-02 01:40:00 -06:00
Emilio Cobos Álvarez
d570fc8164
style: Remove pretty useless layer of abstraction. 2017-12-02 03:23:22 +01:00
bors-servo
f7aa22a87e Auto merge of #19451 - emilio:inlining-is-fun, r=upsuper
style: Inline some things that should never ever appear in a profile.

<!-- 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/19451)
<!-- Reviewable:end -->
2017-12-01 16:52:34 -06:00
Emilio Cobos Álvarez
a4cb6b8f09
style: Formatting nits in snapshot_helpers-related code. 2017-12-01 20:37:45 +01:00
Emilio Cobos Álvarez
bea7b31445
style: Add a missing fast-path in GeckoElement::each_class.
This shows up when inserting elements in the bloom filter.
2017-12-01 20:37:28 +01:00
Emilio Cobos Álvarez
382a89511a
style: Add a fast-path for GeckoElement::is_root. 2017-12-01 20:17:53 +01:00
Emilio Cobos Álvarez
2bbeda97d3
style: Inline some things that should never ever appear in a profile. 2017-12-01 20:04:33 +01:00
Ting-Yu Lin
668795ad16 style: Update gecko bindings
MozReview-Commit-ID: CBPdp0e1k6h
2017-12-01 15:01:15 +08:00
Emilio Cobos Álvarez
1168305e93
style: Update bindings. 2017-11-30 14:23:49 +01:00
Ting-Yu Lin
f8648ff602 style: Update Gecko bindings
MozReview-Commit-ID: J7VPWvOtP88
2017-11-29 18:01:49 +08:00