Commit graph

1200 commits

Author SHA1 Message Date
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
Ting-Yu Lin
14ec5a662f style: Update Gecko bindings
MozReview-Commit-ID: FUsLXeucoz2
2017-11-29 11:27:42 +08:00
Ting-Yu Lin
923ffcf2cc style: Support shape-image: <image>
MozReview-Commit-ID: GSCZIMEpCS2
2017-11-29 11:27:31 +08:00
bors-servo
823da9e34a Auto merge of #19388 - BorisChiou:stylo/dommatrix/parser, r=emilio,heycam
stylo: Implement Servo_ParseTransformIntoMatrix

This is an inter-dependent patch of Bug 1408310.

DOMMatrix needs to convert a specified transform list into a matrix, so we rewrite
to_transform_3d_matrix by generics for both specified and computed transform lists.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1408310](https://bugzilla.mozilla.org/show_bug.cgi?id=1408310).
- [X] These changes do not require tests because we can count on the wpt tests for DOMMatrix on Gecko side.

<!-- 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/19388)
<!-- Reviewable:end -->
2017-11-27 20:13:34 -06:00
Boris Chiou
3a38e815ec Implement Servo_ParseTransformIntoMatrix.
DOMMatrix needs to convert a specified transform list into a matrix, so
we could rewrite to_transform_3d_matrix by generics for both specified
and computed transform lists.

Besides, we have to update the test case because we use Transform3D<f64> to
compute the matrix, instead of Transform3D<f32>, so the result will be
the same as that in Gecko. Using 0.3 may cause floating point issue
because (0.3f32 as f64) is not equal to 0.3 (i.e. floating point precision
issue), so using 0.25 instead.
2017-11-28 10:08:12 +08:00
bors-servo
7c99ae3bb8 Auto merge of #19398 - emilio:visited-as-an-image, r=dholbert
style: Disable :visited if the document is being used as an image.

Bug: 1420001
Reviewed-by: dholbert
MozReview-Commit-ID: F9MeT1kXZER
2017-11-27 14:57:57 -06:00
Emilio Cobos Álvarez
f94601d0a7
style: Disable :visited if the document is being used as an image.
Bug: 1420001
Reviewed-by: dholbert
MozReview-Commit-ID: F9MeT1kXZER
2017-11-27 21:20:14 +01:00
bors-servo
769b643c0f Auto merge of #19380 - emilio:my-existence-seems-a-continuous-fight-with-xbl, r=heycam
style: Bring back the optimization to avoid traversing XBL subtrees that will likely change.

Bug: 1420496
Reviewed-by: heycam
MozReview-Commit-ID: 3sIGtcVOt0r

<!-- 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/19380)
<!-- Reviewable:end -->
2017-11-27 13:35:28 -06:00
Emilio Cobos Álvarez
92e9f12bd0
style: Remove quite useless StyleChange constructor. 2017-11-27 15:17:44 +01:00
Emilio Cobos Álvarez
98be9cf175
style: Update bindings. 2017-11-26 16:48:07 +01:00
Gecko Backout
8679bafa93 Backed out changeset 077ce85c466b for failing devtools webconsole/test/browser_webconsole_bug_595934_message_categories.js on Windows 7 debug without e10s. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/19374
2017-11-26 11:02:41 +00:00
Gecko Backout
9651a5572e Backed out changeset 1fdcd69d2524 for Build Bustage. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/19376
2017-11-26 11:00:42 +00:00
Ting-Yu Lin
a04d0cb5f1 style: Update Gecko bindings
MozReview-Commit-ID: FUsLXeucoz2
2017-11-26 17:08:00 +08:00