Commit graph

22572 commits

Author SHA1 Message Date
Xidorn Quan
45eea00171 Move {lower,upper}-alpha to extra_servo_values
These two counter styles are supported via @counter-style rules in UA
style sheet in Gecko.
2016-12-20 17:18:45 +11:00
bors-servo
e13f001793 Auto merge of #14644 - servo:ever-so-slightly-less-unstable, r=heycam
Ever so slightly less unstable

<!-- 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: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/14644)
<!-- Reviewable:end -->
2016-12-19 22:09:02 -08:00
Simon Sapin
53f5023685 Fix/silence some warnings 2016-12-20 07:07:06 +01:00
Simon Sapin
01442ba1ae Remove usage of std::intrinsics::discriminant_value. 2016-12-20 07:07:05 +01:00
Simon Sapin
17a183808e Remove usage of unstable rustc_unicode crate. 2016-12-20 07:07:04 +01:00
bors-servo
56f236724c Auto merge of #14631 - ConnorGBrewster:datetime_fix, r=Ms2ger
Make datetime just reflect

<!-- Please describe your changes on the following line: -->
This just uses `make_getter!` for `datetime` rather than checking if `datetime` has data and falling back to the child data if `datetime` has no data.

I reverted 2 of the test changes and added back an old test that makes sure that child content is not returned when `datetime` is empty.

---
<!-- 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 #14611 (github issue number if applicable).

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

<!-- 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/14631)
<!-- Reviewable:end -->
2016-12-19 12:33:07 -08:00
bors-servo
d05cae5072 Auto merge of #14304 - KiChjang:css-style-rule-style, r=Manishearth
Implement CSSStyleRule.style

<!-- 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 #14209 (github issue number if applicable).

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

<!-- 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/14304)
<!-- Reviewable:end -->
2016-12-19 11:29:02 -08:00
Ms2ger
75be03041c Use the API base URL in Fetch APIs. 2016-12-19 19:43:26 +01:00
Ms2ger
fbed4d23d6 Ensure that the API base URL is used in Fetch APIs. 2016-12-19 19:36:24 +01:00
Ms2ger
26cf0a7a8c Make the multi-global tests more robust. 2016-12-19 19:12:38 +01:00
Connor Brewster
fa912b01ea Make datetime just reflect 2016-12-19 09:04:13 -07:00
bors-servo
d918c14247 Auto merge of #14629 - larsbergstrom:revert_rustup, r=nox
Revert "Update Rust to 1.15.0-nightly (8f02c429a 2016-12-15)."

This reverts commit 5618e79768.

<!-- Please describe your changes on the following line: -->
According to @nox, this breaks MacOS. Should be fine tomorrow:
rust-lang/rust#38430

r? @nox @Ms2ger (or whomever)

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

<!-- 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/14629)
<!-- Reviewable:end -->
2016-12-19 06:33:09 -08:00
Lars Bergstrom
cba3881a12 Revert "Update Rust to 1.15.0-nightly (8f02c429a 2016-12-15)."
This reverts commit 5618e79768.
2016-12-19 08:29:06 -06:00
bors-servo
077a54de19 Auto merge of #14481 - servo:rustup, r=Ms2ger
Update Rust to 1.15.0-nightly (8f02c429a 2016-12-15).

<!-- 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/14481)
<!-- Reviewable:end -->
2016-12-19 03:58:56 -08:00
Ms2ger
5618e79768 Update Rust to 1.15.0-nightly (8f02c429a 2016-12-15). 2016-12-19 12:58:11 +01:00
bors-servo
cb6a870077 Auto merge of #14485 - servo:rule-tree-bench, r=heycam
style: Add a simple rule-tree benchmarks.

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

r? @heycam

Numbers on my machine, for the record:

```
test rule_tree::bench::bench_expensive_insersion          ... bench:   7,211,081 ns/iter (+/- 1,933,866)
test rule_tree::bench::bench_expensive_insersion_parallel ... bench:  78,728,097 ns/iter (+/- 11,738,010)
test rule_tree::bench::bench_insertion_basic              ... bench:     665,333 ns/iter (+/- 68,089)
test rule_tree::bench::bench_insertion_basic_parallel     ... bench:   1,587,203 ns/iter (+/- 372,124)
```

<!-- 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/14485)
<!-- Reviewable:end -->
2016-12-19 00:47:34 -08:00
Emilio Cobos Álvarez
fc6bed28ff
style: Use a HashSet in free-list check. 2016-12-19 09:47:00 +01:00
Emilio Cobos Álvarez
e67ea42c3f
style: Add simple rule-tree benchmarks. Fix rule node drop race. 2016-12-19 09:46:59 +01:00
bors-servo
8412008525 Auto merge of #14625 - heycam:sheets-changed, r=upsuper
stylo: Add FFI function to make the Stylist realize we have modified style sheets.

Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1324341 by @upsuper.

<!-- 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/14625)
<!-- Reviewable:end -->
2016-12-18 21:49:28 -08:00
Cameron McCormack
5d75143e8f stylo: Add FFI function to make the Stylist realize we have modified style sheets. 2016-12-19 13:42:23 +08:00
Keith Yeung
aa99f18806 Add WPT test for CSSStyleRule.style property 2016-12-18 15:23:06 -08:00
Keith Yeung
4738ce1af5 Implement CSSStyleRule.style 2016-12-17 23:03:40 -08:00
bors-servo
11dffa8958 Auto merge of #14608 - upsuper:bug1323147, r=heycam
Use string and nsCSSProperty for stylo CSSOM FFI

<!-- Please describe your changes on the following line: -->
This is the Servo side change of [bug 1323147](https://bugzilla.mozilla.org/show_bug.cgi?id=1323147) which has been reviewed by @heycam and @SimonSapin on Bugzilla.

r? @heycam

<!-- 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/14608)
<!-- Reviewable:end -->
2016-12-17 18:22:10 -08:00
bors-servo
f6163c77b9 Auto merge of #14622 - emilio:last-restyle, r=bholley
stylo: Track the last restyle generation properly.

I couldn't reproduce locally, but I believe this fixes:

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

r? @heycam

<!-- 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/14622)
<!-- Reviewable:end -->
2016-12-17 14:40:33 -08:00
bors-servo
164426a7f9 Auto merge of #14430 - julienw:access-quirks-mode-from-layout, r=emilio
Expose Quirks Mode information in the layout data and code

<!-- Please describe your changes on the following line: -->
This patch exposes the Quirks (NoQuirks/LimitedQuirks/Quirks) state to the layout subsystem.

---
<!-- 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).
Prelimary work for issue #11704.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
(Waiting for guidance of where/which tests I could do here)

<!-- 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/14430)
<!-- Reviewable:end -->
2016-12-17 13:25:06 -08:00
Julien Wajsberg
d024787188 Expose Quirks Mode information in the style shared context r=emilio 2016-12-17 11:15:32 -08:00
Emilio Cobos Álvarez
3db6514252
stylo: Track the last restyle generation properly.
I couldn't reproduce locally, but I believe this fixes:

https://bugzilla.mozilla.org/show_bug.cgi?id=1323890
2016-12-17 10:48:45 +01:00
bors-servo
9d2b98e6f8 Auto merge of #14598 - DominoTree:master, r=canaltinova
Fix linear gradient's specified form #13892

<!-- Please describe your changes on the following line: -->
WIP for #13892

---
<!-- 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 #13892  (github issue number if applicable).

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

<!-- 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/14598)
<!-- Reviewable:end -->
2016-12-16 15:11:29 -08:00
Nick Price
5d56946bc2 Maintain Corner type, add None type to AngleOrCorner 2016-12-16 17:49:15 -05:00
bors-servo
71b68ea0de Auto merge of #14000 - Wafflespeanut:grid, r=Manishearth
Stylo: Basic support for grid-{row,column}-{start,end}

<!-- 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-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors

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

<!-- 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/14000)
<!-- Reviewable:end -->
2016-12-16 14:23:40 -08:00
bors-servo
6efea399ed Auto merge of #14593 - szeged:getgattchildren, r=jdm
Implement GetGATTChildren

<!-- Please describe your changes on the following line: -->
Implement the [GetGATTChildren](https://webbluetoothcg.github.io/web-bluetooth/#getgattchildren) function for webbluetooth.

---
<!-- 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: -->
- [X] There are tests for these changes

<!-- 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/14593)
<!-- Reviewable:end -->
2016-12-16 12:30:41 -08:00
Attila Dusnoki
b0103682fa Implement GetGATTChildren 2016-12-16 21:02:58 +01:00
bors-servo
a4ecdf2d5f Auto merge of #14610 - bholley:style_context_refactor, r=emilio
Simplify style context architecture and make it safer

See the discussion at https://bugzilla.mozilla.org/show_bug.cgi?id=1323372

Not done here, but want to get a try run in on the first patch.

<!-- 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/14610)
<!-- Reviewable:end -->
2016-12-16 11:38:27 -08:00
Bobby Holley
648ce1e44e Make the DomTraversalContext own the SharedStyleContext and share it immutably across the traversal.
This allows us to get rid of a bunch of lifetimes and simplify a lot of code. It
also lets us get rid of that nasty lifetime transmute, which is awesome.

The situation with thread-local contexts is still suboptimal, but we fix that in
subsequent patches.
2016-12-16 10:57:27 -08:00
bors-servo
38f136175e Auto merge of #14540 - servo:at-import, r=SimonSapin,Ms2ger
style: Basic @import support.

r? @SimonSapin or @mbrubeck

cc @heycam and @bholley

<!-- 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/14540)
<!-- Reviewable:end -->
2016-12-16 09:43:19 -08:00
Emilio Cobos Álvarez
8356c3386a
style: Fix @import serialization. 2016-12-16 17:59:47 +01:00
Emilio Cobos Álvarez
b9901fbd89
script: Abstract HTMLLinkElement and StyleElement into StylesheetOwner. 2016-12-16 17:59:45 +01:00
bors-servo
0c56499bdc Auto merge of #14589 - servo:harden-script, r=jdm+Ms2ger
Reduce calls into arbitrary code with the ScriptThread::documents borrow held.

<!-- 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/14589)
<!-- Reviewable:end -->
2016-12-16 08:53:27 -08:00
Josh Matthews
14d8ae2478 Add a tidy check for problematic match cases in script_thread.rs 2016-12-16 11:52:45 -05:00
Emilio Cobos Álvarez
072db0279a
script: Clarify htmllinkelement's comment about pending_loads. 2016-12-16 16:57:21 +01:00
Emilio Cobos Álvarez
d4d4af9cf7
Update test expectations. 2016-12-16 16:57:21 +01:00
Emilio Cobos Álvarez
7582a2d59d
script: Move the stylesheet loading code from htmllinkelement to stylesheet_loader. Make it track subresource loads properly. 2016-12-16 16:57:20 +01:00
Emilio Cobos Álvarez
21bf91c386
script: Add infrastructure to track subresource loads in <link> and <style> elements. 2016-12-16 16:57:20 +01:00
Emilio Cobos Álvarez
b86aa41568
script: Add CSSImportRule WebIDL interface. 2016-12-16 16:57:20 +01:00
Emilio Cobos Álvarez
ca93a2dcec
style: Add a way to update an empty stylesheet for @import.
We'll update the empty stylesheet we've created when instantiating the
ImportRule when the stylesheet finishes loading.
2016-12-16 16:57:19 +01:00
Emilio Cobos Álvarez
a42cfae153
style: Add a StylesheetLoader abstraction, and make it a no-op on Geckolib.
Servo doesn't compile at this stage.
2016-12-16 16:57:19 +01:00
Emilio Cobos Álvarez
444fef164e
style: Add a struct to represent import rules, and parse them correctly. 2016-12-16 16:57:18 +01:00
bors-servo
e5d783c454 Auto merge of #14615 - servo:import, r=Ms2ger
Prepare for @import support.

<!-- 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/14615)
<!-- Reviewable:end -->
2016-12-16 06:41:45 -08:00
Emilio Cobos Álvarez
85b6e5ad80 style: Move Stylist::device into an Arc 2016-12-16 15:10:37 +01:00
Emilio Cobos Álvarez
62d65c1872 style: Simplify some code in media_queries.rs 2016-12-16 14:53:17 +01:00