Commit graph

17337 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
2783297fa9
style: Add a Document::elements_with_id API.
MozReview-Commit-ID: BNtbJp0RI68
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-11-04 11:34:36 +01:00
Gecko Backout
8f8fd517ed Backed out changeset dbd300f4d75b for build bustage. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/19108
2017-11-03 23:56:42 +00:00
bors-servo
a0cd781bdc Auto merge of #19108 - emilio:qsa, r=xidorn,bz
stylo: querySelector{,All} optimizations.

Bug: 1410624

<!-- 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/19108)
<!-- Reviewable:end -->
2017-11-03 14:27:34 -05:00
Emilio Cobos Álvarez
15ef6b0d8a
style: Update bindings. 2017-11-03 20:25:01 +01:00
bors-servo
107ead64d0 Auto merge of #19101 - CYBAI:moz-script-level-out-of-mako, r=emilio
style: Move font -moz-script-level 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 #19068 (github issue number if applicable).
- [x] These changes do not require tests because _____

<!-- 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/19101)
<!-- Reviewable:end -->
2017-11-03 11:09:39 -05:00
Emilio Cobos Álvarez
bcc9c62620
style: Inline a bunch of stuff, fixup indentation of a couple things.
MozReview-Commit-ID: CgUNMeBDOCw
2017-11-03 14:18:49 +01:00
Emilio Cobos Álvarez
e7149f15d7
style: Inline DomDescendants.
MozReview-Commit-ID: HeBxicDHlzt
2017-11-03 14:18:48 +01:00
Emilio Cobos Álvarez
bfabd9f855
style: Allow disabling invalidation-based querySelector from C++
Rust compile times are hard.

MozReview-Commit-ID: 9Xhtf7f3Vzv
2017-11-03 14:18:48 +01:00
Emilio Cobos Álvarez
931aae9760
style: Remove some unneeded indirections in the invalidation code.
MozReview-Commit-ID: 5h5SE3ieC0A
2017-11-03 14:18:47 +01:00
Emilio Cobos Álvarez
9a378a89b4
style: Bump the selector length heuristic.
A selector with combinators has to have length > 2 (a component, a combinator,
another component).

MozReview-Commit-ID: GvMEbRdOVi2
2017-11-03 14:18:46 +01:00
Emilio Cobos Álvarez
eea8ecd345
style: Add a query-selector fast path for #id foo.
MozReview-Commit-ID: DkrLcfQLPga
2017-11-03 14:18:45 +01:00
Emilio Cobos Álvarez
ea8f493ae6
style: Extract a bit better the logic for finding elements with an ID under a subtree.
MozReview-Commit-ID: Hj9yxBk1OvS
2017-11-03 14:18:44 +01:00
Emilio Cobos Álvarez
b03b59b218
style: Optimize all ids in the rightmost compound selector.
This is effectively the same optimization Gecko has now.

MozReview-Commit-ID: 21HrjpHdpOz
2017-11-03 14:18:44 +01:00
Emilio Cobos Álvarez
1fd7269949
style: Add a fast path for querySelector/All with a single id selector using the doc ID table.
MozReview-Commit-ID: JVnDO890kn4
2017-11-03 14:18:43 +01:00
Emilio Cobos Álvarez
be1ba90284
style: Introduce TNode::is_in_document.
MozReview-Commit-ID: BrhhoOghtUL
2017-11-03 14:18:43 +01:00
Emilio Cobos Álvarez
c3876a42a8
style: Move the single simple selector optimizations to a different function.
MozReview-Commit-ID: EEM3AzW2A9s
2017-11-03 13:49:15 +01:00
Emilio Cobos Álvarez
db65c2d346
style: Add a Document::elements_with_id API.
MozReview-Commit-ID: BNtbJp0RI68
2017-11-03 13:49:15 +01:00
CYBAI
d316c55590 style: Move font -moz-script-level outside of mako 2017-11-03 09:49:19 +08:00
bors-servo
c494d25e24 Auto merge of #18750 - Manishearth:transform-generic, r=emilio,xidorn
Make transforms generic

This makes the specified and computed value of transform share a generic
backing enum.

This will eventually be a complete fix for
https://bugzilla.mozilla.org/show_bug.cgi?id=1391145 , and also
incidentally fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1405881

Currently WIP -- the generic transform exists and is used, but this
currently misses some animation and glue cases.

<!-- 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/18750)
<!-- Reviewable:end -->
2017-11-02 17:02:07 -05:00
Manish Goregaokar
cb9645cd17
Comments and minor fixes 2017-11-02 14:37:54 -07:00
Manish Goregaokar
1c12e0ebc6
Rustfmt the new files 2017-11-02 14:30:16 -07:00
Manish Goregaokar
6415294fd5
Fix unit tests 2017-11-02 14:30:15 -07:00
Manish Goregaokar
5098948c0d
Handle distance calculation of new variants 2017-11-02 14:30:14 -07:00
Manish Goregaokar
ca02785e02
Handle case of empty transform lists 2017-11-02 14:30:12 -07:00
Manish Goregaokar
9c9a181f35
Allow cross interpolation between differing translate/scale functions
See ToPrimitive() in StyleAnimationValue.cpp
2017-11-02 14:30:11 -07:00
Manish Goregaokar
f699b8cfb2
Handle animating 2D matrices 2017-11-02 14:30:10 -07:00
Manish Goregaokar
aba00be52d
Add more operations to animation 2017-11-02 14:30:09 -07:00
Manish Goregaokar
e15695289d
Add support for transform functions with an optional final argument in gecko glue 2017-11-02 14:30:08 -07:00
Manish Goregaokar
e20c508a6e
Add support for 2D matrices in Gecko glue 2017-11-02 14:30:07 -07:00
Manish Goregaokar
fc29de8986
Add support for more functions in Gecko glue 2017-11-02 14:30:06 -07:00
Manish Goregaokar
079b25db93
Share transform function lists between set_transform and clone_transform
This will also fix https://bugzilla.mozilla.org/show_bug.cgi?id=1405881
2017-11-02 14:30:05 -07:00
Manish Goregaokar
6631594e28
Replace old transform code with new generic code 2017-11-02 14:30:04 -07:00
Manish Goregaokar
5ce2966bda
Add utilities for converting Transform to euclid types 2017-11-02 14:30:03 -07:00
Manish Goregaokar
2de3464374
Add ToAnimatedZero implementation 2017-11-02 14:30:02 -07:00
Manish Goregaokar
5031d14d1b
Use a generic Matrix3D type 2017-11-02 14:30:01 -07:00
Manish Goregaokar
544989819d
Add parsing support for transform 2017-11-02 14:30:00 -07:00
Manish Goregaokar
d6525e030a
Add specified and computed variants of Transform/TransformOperation 2017-11-02 14:29:59 -07:00
Manish Goregaokar
dcefcc3c22
Add ToComputedValue and ToCss impls 2017-11-02 14:29:58 -07:00
Manish Goregaokar
337d48aa61
Add generic struct for transform 2017-11-02 14:29:57 -07:00
bors-servo
92b49010b1 Auto merge of #19091 - MortimerGoro:webgl2_suite, r=jdm
Add WebGL conformance 2.0.0 tests

<!-- Please describe your changes on the following line: -->

This PR includes WebGL conformance 2.0.0 tests. For now I have disabled three folders in the new suite:
- `Conformance`: Tests WebGL 1.0 API like the current 1.0.3 suite we are using, but it includes a lot more tests and many expectations have to be updated. This is better to do in a separate PR because it will require to update github intermittent paths again and maybe detect new intermittents.
- `Conformance2\textures`: It causes a lot of timeouts because of using videos, svgs, and other complicated formats.
- `deqp`: It's a extra GPU testing suite included in the Khronos 2.0.0 suite. Disabled for now because it causes some timeouts.

So in a nutshell, it uses part of the 2.0.0 suite to test webgl 2.0 and keeps using 1.0.3 in order to test WebGL 1.0. It's good enough to enable TDD for the new WebGL 2.0 features

We can create follow-up issues for the next steps:
* deprecate 1.0.3 and use the new 'conformance' folder in 2.0.0 in order to test WebGL 1.0
* Enable `conformance2/textures` and  'deqp' tests once WebGL 2.0 implementation is more advanced or the timeouts are monitored in more detail.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/19091)
<!-- Reviewable:end -->
2017-11-02 15:52:42 -05:00
Imanol Fernandez
ec1f61d9cc Add configuration for webgl2 tests and update test expectations 2017-11-02 15:12:35 +01:00
Simon Sapin
a5d9d0b32d Make the unrooted_must_root conditional on a default Cargo feature.
Only http://perf.rust-lang.org/ will disable it,
in order to be less subject to changes to rustc internal APIs.
2017-11-02 15:08:04 +01:00
Simon Sapin
27a2bb1582 Make script enable the "style/servo" Cargo feature
This enables it to be compiled without libservo:
```
cargo build --manifest-path components/script/Cargo.toml
```

… and then to be added to http://perf.rust-lang.org/
2017-11-02 15:02:55 +01:00
Henri Sivonen
18a52ea0e9 Avoid decoding XHR type="json" responses as UTF-16BE/LE
https://infra.spec.whatwg.org/#parse-json-from-bytes says to use
"UTF-8 decode" rather than "decode", so UTF-16BE/LE BOM should
not be honored.
2017-11-02 14:28:51 +02:00
bors-servo
edb2db55b7 Auto merge of #19093 - cbrewster:font_weight_cleanup, r=emilio
style: Cleanup font-weight parsing.

Followup for #19086

<!-- 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/19093)
<!-- Reviewable:end -->
2017-11-01 19:37:45 -05:00
Connor Brewster
f37859375e style: Cleanup font-weight parsing. 2017-11-01 17:04:40 -05:00
bors-servo
fa319170eb Auto merge of #19077 - avadacatavra:floats-are-the-actual-worst, r=jdm
changed f64 to u64 for navigation start timing until it had to be float

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18997 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/19077)
<!-- Reviewable:end -->
2017-11-01 16:56:06 -05:00
ddh
0a09ee5cd8 changed f64 to u64 for navigation start timing until it had to be float 2017-11-01 20:45:22 +00:00
Connor Brewster
285d8bb58b style: Move font-weight outside of mako 2017-11-01 11:06:40 -05:00
bors-servo
b23131abf1 Auto merge of #19083 - servo:vis, r=SimonSapin
Fix new failure in Nightly 2017-11-01.

The rustc::declare_lints! macro started using a :vis fragment specifier.

<!-- 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/19083)
<!-- Reviewable:end -->
2017-11-01 08:52:45 -05:00