Commit graph

28547 commits

Author SHA1 Message Date
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
bors-servo
4725a05bfb Auto merge of #18188 - mrobinson:overflow-stacking-context, r=mbrubeck
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.

<!-- 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
- [ ] 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/18188)
<!-- Reviewable:end -->
2017-08-24 01:31:34 -05: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
Clément DAVID
ab73f3d61d Automatically verify that derive() lists are alphabetically ordered 2017-08-23 21:04:14 +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
2e775abfa4 Auto merge of #18201 - servo:cssparserup, r=upsuper
Update cssparser to 0.19.2

Pull in https://github.com/servo/rust-cssparser/pull/173, which together with #18159 fixes #17205.

<!-- 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/18201)
<!-- Reviewable:end -->
2017-08-23 08:52:20 -05: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
Emilio Cobos Álvarez
570da3b512
style: Assert that only servo passes in UA sheets explicitly.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-23 14:10:44 +02:00
bors-servo
4077953cf5 Auto merge of #18197 - BorisChiou:stylo/transform/2dmatrix, r=birtles
stylo: Bug 1387990 - Fix the interpolation of 2d matrix.

Write a 2d matrix decomposition for Gecko, so the visual results and test results
could match those in Gecko. In long-term, we should let Gecko follow the spec, so we
can drop the redundant implementation.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1387990](https://bugzilla.mozilla.org/show_bug.cgi?id=1387990).
- [X] These changes do not require tests because these patches fix the test failures in Gecko and we have tests already in Gecko.

<!-- 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/18197)
<!-- Reviewable:end -->
2017-08-23 05:04:20 -05:00
Simon Sapin
4d10edf1df Update cssparser to 0.19.2
Pull in https://github.com/servo/rust-cssparser/pull/173,
which together with #18159 fixes #17205
2017-08-23 11:44:23 +02:00
Boris Chiou
172b4aadda Use rewritten decomposition of 2d matrix to compute distance.
So we can align the result with interpolation.
2017-08-23 17:10:29 +08:00
Emilio Cobos Álvarez
bf45a20760
style: Implement finer-grained stylist rebuilds.
MozReview-Commit-ID: ALsH9kSqHb0
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-23 11:06:42 +02:00
bors-servo
5b4c9c7c77 Auto merge of #18181 - paulrouget:close_browser, r=cbrewster
Make it possible to close a browsing context from the embedder

<!-- 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 #18006 (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/18181)
<!-- Reviewable:end -->
2017-08-23 03:55:27 -05:00
Paul Rouget
ecdcfa8226 Make it possible to close a browsing context from the embedder 2017-08-23 10:23:16 +02:00
Emilio Cobos Álvarez
1c67a7dc14
style: Ensure the flusher is completely consumed before getting dropped.
This will be necessary for future patches.

MozReview-Commit-ID: FgWaoRCMdw2
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-23 09:30:47 +02:00
Emilio Cobos Álvarez
15594dda10
style: Add a StylesheetFlusher abstraction to enable more incremental rebuilds.
MozReview-Commit-ID: 8RBUUErm4bm
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-23 09:30:46 +02:00
Emilio Cobos Álvarez
029ab24671
style: Add a no-op constructor of StyleSheetEntry, in preparation for more changes.
MozReview-Commit-ID: 6Kz0S7YYmFC
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-23 09:26:22 +02:00
Emilio Cobos Álvarez
e1517d62af
style: Simplify and improve the per origin stylesheet invalidation setup.
MozReview-Commit-ID: adDDRhNnOw
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-23 09:26:21 +02:00
Emilio Cobos Álvarez
a98fd5e2b6
style: Make the StyleSheetSet::flush API slightly nicer.
MozReview-Commit-ID: LfJxZA9zhaE
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-23 09:24:50 +02:00
Boris Chiou
9b76cd9d1c Rewrite decomposition of 2d matrix.
The implementation of 2d matrix decomposition in Servo matches that in
spec, but its result is really different from that in Gecko, so the
visual results on the main thread and on the compositor thread are
really different and we got many test failures. Therefore, let's write a
different algorithm of decomposition of 2d matrix for Stylo, and keep
the original one for Servo.

The output of new implemented 2d matrix decomposition is a Decomposed3DMatrix,
so we can reuse the interpolation and re-composition code. (Just like
what we do in Gecko.)
2017-08-23 14:39:00 +08:00
bors-servo
1c9c0334ba Auto merge of #18195 - hiikezoe:disable-style-cache-for-animations, r=bholley,birtles
Don't cache style data if the element has running animations.

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

https://bugzilla.mozilla.org/show_bug.cgi?id=1379203
---
<!-- 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/18195)
<!-- Reviewable:end -->
2017-08-22 23:43:25 -05:00
bors-servo
20c73e7f7d Auto merge of #18196 - bholley:restyle_roots, r=emilio
stylo: Maintain a restyle root and use it to cull the traversal

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

<!-- 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/18196)
<!-- Reviewable:end -->
2017-08-22 22:04:34 -05:00
Bobby Holley
d4aa8e3cef Track the restyle root and use it to do less work during the traversal.
MozReview-Commit-ID: A8O3JOpsv4E
2017-08-22 19:34:46 -07:00
Bobby Holley
0534f72925 Update bindings. 2017-08-22 18:08:17 -07:00
Hiroyuki Ikezoe
6ed7c69281 Don't cache style data if the element has running animations. 2017-08-23 09:51:27 +09:00
bors-servo
9c338a2929 Auto merge of #18193 - servo:jdm-patch-2, r=SimonSapin
Move fast checks into earlier Travis task.

This allows quicker feedback about whether the manifest needs updating; otherwise it has to wait until all builds and tests are complete.

<!-- 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/18193)
<!-- Reviewable:end -->
2017-08-22 18:55:12 -05:00
bors-servo
85e6f6f7cc Auto merge of #18177 - MortimerGoro:oes_standard_derivatives, r=emilio
Implement WebGL OES_standard_derivatives extension.

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

Implement WebGL OES_standard_derivatives extension. Some Three.js 3D models fail to render because of the lack of this extension.

---
<!-- 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/18177)
<!-- Reviewable:end -->
2017-08-22 17:45:00 -05:00
bors-servo
111e9951c9 Auto merge of #18093 - pyfisch:compositionevent, r=jdm
Add CompositionEvent bindings

<!-- Please describe your changes on the following line: -->
Needed for better keyboard input. See also #17578

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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/18093)
<!-- Reviewable:end -->
2017-08-22 16:03:23 -05:00