Commit graph

16155 commits

Author SHA1 Message Date
Julian Seward
8b15347217 stylo: Drop thread pool stack size to 100K.
Reviewed in bug 1376883 by bholley.
2017-08-25 15:36:21 +02:00
Emilio Cobos Álvarez
5cd10b9eb7
style: Use consistent indentation in the stylist code. 2017-08-25 13:34:57 +02:00
Boris Chiou
4580b530a8 Use DirectionVector as an alias of euclid::Vector3D<f32>.
Therefore, we can reuse the methods of Vector3D, instead of implementing
similar ones.
2017-08-25 18:25:15 +08:00
Boris Chiou
5c2d8507be Implement to_transform_3d_matrix for computing distance of mismatched transform lists.
We could use this method to convert a TransformList into a Matrix, and
use this matrix for computing distance for Stylo and rendering the transform
for Servo.

This is an equivalent of nsStyleTransformMatrix::ReadTransforms in Gecko.
2017-08-25 18:25:14 +08:00
Emilio Cobos Álvarez
723d31a4d8
style: Remove SharedStyleContext::quirks_mode. 2017-08-25 12:23:30 +02:00
bors-servo
772a8464eb Auto merge of #18215 - emilio:applicable-pseudo, r=heycam
style: Only store applicable ::before / ::after pseudo styles during the traversal.

This should help memory usage quite a bit.

<!-- 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/18215)
<!-- Reviewable:end -->
2017-08-25 02:30:50 -05:00
Emilio Cobos Álvarez
ff700aba75
style: Only store applicable ::before / ::after pseudo styles during the traversal. 2017-08-25 08:46:22 +02:00
bors-servo
69e28f0709 Auto merge of #18225 - jdm:unused-visitor-argument, r=emilio
Remove unused selector visitor argument.

The real win here is avoiding cloning the iterator when nobody actually uses it.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes

<!-- 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/18225)
<!-- Reviewable:end -->
2017-08-25 01:10:03 -05:00
Gecko Backout
12b02ce9d5 Backed out changeset 01348a3860f7 for build bustage
CLOSED TREE

Backs out https://github.com/servo/servo/pull/18222
2017-08-25 03:45:31 +00:00
Josh Matthews
ffa9dd1c7c Remove unused selector visitor argument. 2017-08-24 18:17:25 -07:00
bors-servo
d7f7d550ab Auto merge of #18223 - Manishearth:stylo-scrollsnap, r=emilio
Handle calcs in ScrollSnapPoints conversions

fixes bug 1393580

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

<!-- 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/18223)
<!-- Reviewable:end -->
2017-08-24 18:42:44 -05:00
bors-servo
76e77be041 Auto merge of #18222 - canaltinova:font-feature-values-lookup, r=emilo,xidorn
stylo: Implement font feature values lookup

This PR reviewed by emilio and xidorn on bugzilla

---
<!-- 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 [Bug 1355721](https://bugzilla.mozilla.org/show_bug.cgi?id=1355721)

<!-- 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/18222)
<!-- Reviewable:end -->
2017-08-24 17:36:44 -05:00
Remi THEBAULT
e186b52b04 implement PerformanceObserverInit.buffered (fixes #18108) 2017-08-24 23:30:35 +02:00
Manish Goregaokar
131949750f Handle calcs in ScrollSnapPoints conversions 2017-08-24 14:28:23 -07:00
bors-servo
4598ddb0bc Auto merge of #18221 - MortimerGoro:webgl_fnv, r=jdm
Use FnvHashMap in WebGL implementation.

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

Follow up from the WebGL redesign: https://github.com/servo/servo/pull/17891

---
<!-- 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/18221)
<!-- Reviewable:end -->
2017-08-24 16:25:53 -05:00
Nazım Can Altınova
984463fdcb Update bindings 2017-08-24 13:33:55 -07:00
Imanol Fernandez
0a64455c71 Use FnvHashMap in WebGL implementation. 2017-08-24 22:18:34 +02:00
bors-servo
1e0ebf1c1a Auto merge of #18207 - bradwerth:reuseImports, r=xidorn
Add a reusable sheets parameter to Servo_StyleSheet_FromUTF8Bytes.

MozReview-Commit-ID: DdMQpUY1WcJ

<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1387933
https://reviewboard.mozilla.org/r/171308/

---
<!-- 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: -->
- [ ] 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/18207)
<!-- Reviewable:end -->
2017-08-24 14:58:49 -05:00
Nazım Can Altınova
6d7a1903b8 Implement font feature values lookup for stylo 2017-08-24 12:41:36 -07:00
Nazım Can Altınova
0251b2bfb6 Convert the @font-feature-values declarations to lowercase
The @font-feature-values declaration identifiers are asci case insensitive.
We should convert all of them to lowercase to be able to reduce the same
declarations. Also gecko stores them as lowercase in gfxFontFeatureValueSet.
2017-08-24 12:39:55 -07:00
bors-servo
d4ddec8d33 Auto merge of #18209 - jdm:devirtualize, r=mbrubeck
Devirtualize CSS error reporting.

This removes a trait object from the path of reporting a CSS error.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes

<!-- 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/18209)
<!-- Reviewable:end -->
2017-08-24 13:19:25 -05:00
Josh Matthews
1297c0ff51 Devirtualize CSS error reporting. 2017-08-24 10:41:06 -07:00
Brad Werth
cdcd7edb01 Add a reusable sheets parameter to Servo_StyleSheet_FromUTF8Bytes.
MozReview-Commit-ID: DdMQpUY1WcJ
2017-08-24 10:38:52 -07:00
bors-servo
270d445f27 Auto merge of #18214 - hiikezoe:animation-name-change-in-css-rule, r=birtles
Try to update running CSS animations when CSS rules are changed.

In the case where values in CSS rules changed directly by CSSOM, the old
value in the CSS rule block is immediately replaced by the new one. So if
the element, which is applied to the CSS rule, has running animations, the
new value is used during cascading process in animation-only restyle. Thus
in a subsequent normal restyle, we can't tell whether the value in the CSS
rule has changed or not. As a result, transitions may not be triggered
(bug 1393323) and CSS animations may not be cancelled if the updated
animation-name is 'none' (bug 1392851).

For the latter case of CSS animations where animation-name has been updated to
'none', this patch introduces a workaround whereby we trigger an update of
running animations whenever the traversal is triggered by changes to CSS rules
and we have existing CSS animations.

<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1392851

---
<!-- 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

<!-- 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/18214)
<!-- Reviewable:end -->
2017-08-24 06:48:53 -05:00
bors-servo
1aacbce053 Auto merge of #18213 - aethanyc:improve-debug-log, r=emilio
Improve debug log related to selector matching

<!-- 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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it only modifies debug log

<!-- 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/18213)
<!-- Reviewable:end -->
2017-08-24 05:17:27 -05:00
Ting-Yu Lin
a23596d377 Improve debug log related to selector matching
Move debug log in matches_complex_selector_internal to the front so that the
entire complex selector can be printed.

MozReview-Commit-ID: KXBDpbzBv0I
2017-08-24 17:05:35 +08:00
bors-servo
d3c2017b23 Auto merge of #18208 - servo:derive-all-the-things, r=emilio
Use darling and derive more things

<!-- 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/18208)
<!-- Reviewable:end -->
2017-08-24 04:05:03 -05:00
Anthony Ramine
ff67fc751d Introduce #[animation]
For now, only #[animation(error)] is supported on variants and it makes
both #[derive(Animate)] and #[derive(ComputeSquaredDistance)] ignore
this particular variant.
2017-08-24 11:04:19 +02:00
Hiroyuki Ikezoe
b7d7a43ce4 Try to update running CSS animations when CSS rules are changed.
In the case where values in CSS rules changed directly by CSSOM, the old
value in the CSS rule block is immediately replaced by the new one. So if
the element, which is applied to the CSS rule, has running animations, the
new value is used during cascading process in animation-only restyle. Thus
in a subsequent normal restyle, we can't tell whether the value in the CSS
rule has changed or not. As a result, transitions may not be triggered
(bug 1393323) and CSS animations may not be cancelled if the updated
animation-name is 'none' (this bug).

For the latter case of CSS animations where animation-name has been updated to
'none', this patch introduces a workaround whereby we trigger an update of
running animations whenever the traversal is triggered by changes to CSS rules
and we have existing CSS animations.
2017-08-24 17:43:59 +09:00
Martin Robinson
f1b98393cc Allow overflow:scroll without a stacking context
Fix the long-standing bug where items that are positioned and have
overflow:scroll or overflow:auto automatically create stacking
contexts. In order to do this we need to fix another bug where display
list sorting can put a Clip or ScrollFrame definition after the first
time it is used in a display list.
2017-08-24 08:30:45 +02:00
Anthony Ramine
17d97cf87b Use darling in style_derive
This allows use to handle #[css] in a way simpler fashion.
2017-08-24 01:28:58 +02:00
Anthony Ramine
49a5ceca9b Derive ToAnimatedZero for Either<A, B> 2017-08-24 01:28:34 +02:00
bors-servo
4743696189 Auto merge of #18179 - davidcl:master, r=jdm
Automatically verify that derive() lists are alphabetically ordered #…

<!-- Please describe your changes on the following line: -->
Automatically verify that derive() lists are alphabetically ordered #18172

---
<!-- 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 #18172 (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/18179)
<!-- Reviewable:end -->
2017-08-23 17:18:31 -05:00
bors-servo
bde7135a3b Auto merge of #18205 - JJayet:ios_support, r=jdm
Add initial iOS User-Agent

This commit adds an initial iOS User-Agent as discussed here : https://github.com/servo/servo/issues/18154#issuecomment-324382850

---
<!-- 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 (continues to) fix #18154.

<!-- Either: -->
- [X] These changes do not require tests because too little is done

<!-- 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/18205)
<!-- Reviewable:end -->
2017-08-23 16:05:35 -05:00
bors-servo
173079c144 Auto merge of #18155 - ferjm:pwm.perf.timeline, r=jdm
Add paint metrics to Performance Timeline API

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18111
- [X] There are tests for these changes

<!-- 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/18155)
<!-- Reviewable:end -->
2017-08-23 15:06:12 -05:00
Clément DAVID
c5fe235112 order derivable traits lists
Ignoring :
 - **generated**.rs
 - python/tidy/servo_tidy_tests/rust_tidy.rs
2017-08-23 21:38:44 +02:00
bors-servo
acd08c75f7 Auto merge of #18020 - BrunoBernardino:feature-canvas-filltext, r=jdm
Implement CanvasRenderingContext2d.fillText's "unimplemented" message

Basic skeleton for implementing CanvasRenderingContext2d.fillText,  only adding methods and parameters in the right place, and a basic test, with some `println!()`.

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

This is only the beginning. It were my first couple of hours looking at Rust and Servo.

However, I have _no clue_ how to get the text to render now (basically go from the `println!()` to something else).

It's also possible I messed something up with the `DOMString.parse()` but not entirely sure.

I'm doing this PR as a starting point to get help and learn more about this, _or_ at least maybe save someone some time while implementing this, if no one's able to take the time and show me where/how.

Because it's still a work-in-progress, I'm leaving the boxes below unchecked (even though there are no errors).

---
<!-- 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 #11681 and #17963

<!-- Either: -->
- [x] There are tests for these changes

<!-- 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/18020)
<!-- Reviewable:end -->
2017-08-23 14:00:47 -05:00
Jonathan Jayet
17cf44022f Added initial iOS User-Agent 2017-08-23 20:47:21 +02:00
bors-servo
16c1446137 Auto merge of #18204 - servo:quote, r=bustage
Fix quote dependency version

<!-- 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/18204)
<!-- Reviewable:end -->
2017-08-23 12:13:18 -05:00
Anthony Ramine
12b9a42774 Fix quote dependency version 2017-08-23 18:35:42 +02:00
Bruno Bernardino
2af828485f
Implement CanvasRenderingContext2d.fillText's "unimplemented" message 2017-08-23 17:34:55 +01:00
bors-servo
e61a043a56 Auto merge of #18189 - JJayet:ios_support, r=larsbergstrom
First step toward iOS Support

This mostly prevents Gaol/sandboxing to be used during compilation.
There are a number of issues with : `expat-sys`, `servo-freetype-sys`, `fontsan`, `heartbeats-simple-sys`, `mozjs_sys`.

Also modified `components/script/dom/navigatorinfo.rs` in order to add iOS.

```rust
#[cfg(target_os = "ios")]
pub fn Platform() -> DOMString {
    DOMString::from("iOS")
}
```

See here for more informations : https://github.com/servo/servo/issues/18154

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes partially work on #18154

- [X] These changes do not require tests because it deals with the compile toolchain

<!-- 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/18189)
<!-- Reviewable:end -->
2017-08-23 10:59:39 -05:00
Fernando Jiménez Moreno
2d0037f195 Add paint metrics to Performance Timeline API 2017-08-23 17:30:13 +02:00
Jonathan Jayet
1a447c6984 First step toward iOS Support 2017-08-23 17:16:30 +02:00
bors-servo
e629f8da7b Auto merge of #18200 - servo:derive-all-the-things, r=emilio
Introduce style_derive::cg

<!-- 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/18200)
<!-- Reviewable:end -->
2017-08-23 10:01:15 -05:00
Anthony Ramine
f275895028 Introduce style_derive::cg 2017-08-23 16:52:04 +02:00
bors-servo
c5cf6dc965 Auto merge of #18191 - emilio:incremental-rebuilds, r=SimonSapin,heycam
style: Implement finer-grained stylist rebuilds.

This is on top of #18170, and aims to resolve https://bugzilla.mozilla.org/show_bug.cgi?id=1386045.

<!-- 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/18191)
<!-- Reviewable:end -->
2017-08-23 07:40:03 -05:00
Emilio Cobos Álvarez
fca2f48f86
style: Remove outdated comment.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-23 14:10:45 +02:00
Emilio Cobos Álvarez
3fd8a534d7
style: Rename SheetRebuildKind::rebuild_invalidation to should_rebuild_invalidation.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-23 14:10:45 +02:00
Emilio Cobos Álvarez
e648dd7822
style: Mention that it's worth to split CascadeData to make clearing clearer.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-23 14:10:44 +02:00