Commit graph

27039 commits

Author SHA1 Message Date
bors-servo
9ba71fcd57 Auto merge of #17481 - jryans:move-rule-node, r=bholley
Stylo: Move match and cascade temporaries to CurrentElementInfo

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

<!-- 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/17481)
<!-- Reviewable:end -->
2017-06-22 17:46:55 -07:00
bors-servo
efed75ae5a Auto merge of #17484 - canaltinova:upup, r=emilio
Bump cssparser version to 0.16.1 in toml files

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

<!-- 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/17484)
<!-- Reviewable:end -->
2017-06-22 16:52:00 -07:00
Jonathan Chan
80dee7a65f Force HTMLStyleElement to create a new CSSStyleSheet when re-parsing.
We already call Document::invalidate_style_sheets and set
the stylesheet member to a new Stylesheet. This matches the behavior of
Firefox, and means the new CSSStyleSheet you get from accessing .sheet
from JS will be correct instead of stale.

(::get_cssom_stylesheet already tries to use the new Stylesheet, but
MutNullableJS::or_init is called, so if we already created a
CSSStyleSheet we will continue to return that one).
2017-06-22 15:51:59 -07:00
J. Ryan Stinnett
c32c0ac9dc Drop root_flow to avoid rule node leaks 2017-06-22 17:50:10 -05:00
bors-servo
c6f60b57b5 Auto merge of #17463 - bholley:rust_stable_17, r=heycam
Bump rust-stable-version to 1.17

Per https://groups.google.com/d/msg/mozilla.dev.platform/1l0d5HbQMXw/RNZs0iXsAgAJ

<!-- 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/17463)
<!-- Reviewable:end -->
2017-06-22 15:45:47 -07:00
Nazım Can Altınova
5362c5ee74 Bump cssparser version to 0.16.1 in toml files 2017-06-22 15:44:03 -07:00
bors-servo
7fbbfde278 Auto merge of #17462 - bholley:bloom_optimizations, r=emilio
various bloom filter optimizations

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

<!-- 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/17462)
<!-- Reviewable:end -->
2017-06-22 14:39:30 -07:00
J. Ryan Stinnett
87c51bd8bf Shrink ElementData by moving pseudo count to type
`ElementStyles` holds an optional list of values for each eager pseudo-element.
However, the type was declared as a slice instead of a fixed size array, so an
extra 8 bytes were being allocated to hold the size, even though it never
changes.

Moving the constant size into the type reduces `ElementStyles` and `ElementData`
by 8 bytes.

MozReview-Commit-ID: GaO6DKFxUMo
2017-06-22 15:47:34 -05:00
J. Ryan Stinnett
2b5c56e6a8 Move match and cascade temporaries to CurrentElementInfo
Before this change, the `ComputedStyle` struct that is part of permanent style
data per element holds 2 `StrongRuleNode`s (unvisited and visited) and 2
`Arc<ComputedValues>` (unvisited and visited).

Both rule nodes and the visited values don't actually need to be here.  This
patch moves these 3 to new temporary storage in `CascadeInputs` on
`CurrentElementInfo` during the match and cascade process.  Rule nodes are
pushed down inside the `ComputedValues` for later access after the cascade.
(Visited values were already available there.)

The permanent style data per element now has just the `Arc<ComputedValues>` for
itself and eager pseudo-elements (plus the `RestyleHint`).

MozReview-Commit-ID: 3wq52ERMpdi
2017-06-22 15:47:32 -05:00
J. Ryan Stinnett
c3b2a2f4de Copy ComputedStyle to context
In the patch after this, the existing `ComputedStyle` type is renamed and
repurposed as temporary storage of inputs for the cascade.  To make it a bit
easier to follow what code is new, this patch starts by copying `ComputedStyle`
to context.rs without changes.

MozReview-Commit-ID: 41COA5rEoz7
2017-06-22 15:34:28 -05:00
Alan Jeffrey
d70964b881 Re-enabled iframe-append-to-child-document.html 2017-06-22 15:25:14 -05:00
Michael Howell
a782798783 Add libx11-dev to the list of build deps
https://github.com/servo/rust-xlib/issues/44
2017-06-22 12:58:14 -07:00
bors-servo
2414688f5a Auto merge of #17461 - canaltinova:currentcolor, r=emilio
Bump cssparser to 1.16.1

This will fix #15397

---
<!-- 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/17461)
<!-- Reviewable:end -->
2017-06-22 12:10:46 -07:00
bors-servo
b9d66df2f5 Auto merge of #17458 - glennw:update-wr-clip-cache, r=jdm
Update WR (move clips to gpu cache).

<!-- 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/17458)
<!-- Reviewable:end -->
2017-06-22 10:27:43 -07:00
Jyotsna Prakash
433cd90bc3 return Option from GlobalScope::current
handles the case where GlobalScope::current calls CurrentGlobalOrNull
and the result is null
2017-06-22 10:04:06 -07:00
Alan Jeffrey
030e01c1d1 Added exception-handling to worker wpt tests. 2017-06-22 11:28:58 -05:00
Gecko Backout
1f79c01dfe Backed out changeset f5041651b877 (bug 17452) as requested by glob. r=backout
Backs out https://github.com/servo/servo/pull/17452
2017-06-22 16:10:03 +00:00
bors-servo
0fce761bb3 Auto merge of #17457 - cynicaldevil:trim-parse-node-data, r=nox
Remove target and data fields from parse_node_data

<!-- Please describe your changes on the following line: -->
`parse_node_data` does not need to store `data` and `target`, they can automatically be passed as parameters to the parser operation (`ParseOperation::CreatePI`) that we already create to be processed.

Also, this frees up `process_op` from depending on the sink's `parse_node_data` field, which will later allow for the sink to exist on the parser thread separately.

---
<!-- 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/17457)
<!-- Reviewable:end -->
2017-06-22 09:09:07 -07:00
bors-servo
813eed222e Auto merge of #17456 - asajeffrey:script-paint-worklets-size, r=emilio
Paint worklet size should agree with Chrome.

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

Getting our implementation to agree with Chrome about the definition of the size parameter to a paint worklet.

---
<!-- 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 #17376
- [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/17456)
<!-- Reviewable:end -->
2017-06-22 07:54:10 -07:00
Alan Jeffrey
dded87e402 Paint worklet size should agree with Chrome. 2017-06-22 09:51:30 -05:00
Fernando Jiménez Moreno
c4ccc759e7 stylo: Implement custom property value getter 2017-06-22 16:38:30 +02:00
Ting-Yu Lin
1795af5e57 stylo: Fix pseudo element matching for rules in XBL stylesheets (bug 1372876)
MozReview-Commit-ID: JeliK45G8MT
2017-06-22 22:37:51 +08:00
bors-servo
dfc44a0d35 Auto merge of #17455 - canaltinova:webkit-displays, r=Manishearth
Implement webkit prefixed values for display property

Added -webkit-{flex,inline-flex} values as flex, inline-flex. I didn't do this gecko only since that doesn't require anything in layout side.

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

<!-- 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/17455)
<!-- Reviewable:end -->
2017-06-22 06:35:41 -07:00
bors-servo
50bef977d0 Auto merge of #17452 - larsbergstrom:readme_change_for_backout, r=metajack
Commiting a trivial README.md change for the Firefox sheriffs to backout

This change is intended to be used to test the backout scripts from the Firefox side. See the following mail thread for more details:
https://groups.google.com/forum/#!topic/mozilla.dev.servo/j4C7U_H_T2A

<!-- 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/17452)
<!-- Reviewable:end -->
2017-06-22 05:22:10 -07:00
bors-servo
7d785e75cd Auto merge of #17447 - emilio:root-disconnected-subtree, r=heycam,Manishearth
style: Be more strict when setting the root font size.

Before this commit, we assumed that if the element had no parent element, it was
the root of the document, which is plain false, since we can arrive there from,
let's say, getComputedStyle on a detached node.

Bug: 1374062
Reviewed-By: heycam
MozReview-Commit-ID: 65DxdzXgd0J

<!-- 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/17447)
<!-- Reviewable:end -->
2017-06-22 04:17:04 -07:00
bors-servo
3e686b7d1e Auto merge of #17260 - jyc:CSSStyleRule-style-test, r=jdm,emilio
Correctly test CSSStyleRule.style.

<!-- 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 do not require tests

This is part of a series of PRs to fix https://github.com/servo/servo/issues/17182

<!-- 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/17260)
<!-- Reviewable:end -->
2017-06-22 03:19:32 -07:00
bors-servo
bd2df70c3c Auto merge of #17444 - hiikezoe:fnv-hashmap-for-animation, r=emilio
Use FnvHashmap instead of HashMap for AnimationValueMap.

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

---
- [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/17444)
<!-- Reviewable:end -->
2017-06-22 02:22:34 -07:00
bors-servo
0913d65243 Auto merge of #17446 - servo:derive-all-the-things, r=emilio
Simplify machinery to serialise optional parts of CSS values

<!-- 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/17446)
<!-- Reviewable:end -->
2017-06-22 01:19:51 -07:00
bors-servo
6b99318f55 Auto merge of #17443 - emilio:smallwat, r=SimonSapin
style: Don't use SmallVec::into_iter to move into another vector.

See bug 1374848 for why.

<!-- 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/17443)
<!-- Reviewable:end -->
2017-06-22 00:14:38 -07:00
bors-servo
64782bc6e3 Auto merge of #17419 - camlorn:master, r=jgraham
Windows can run WPT

<!-- Please describe your changes on the following line: -->
This PR contains fixes that address the specific errors in #17392: WTP workarounds for Windows terminals (see #8313), modifications to `mach test --all` that allow `test_tidy` to be called properly, and modifications to the test harness for WPT that allow it to run when OpenSSL isn't found.  How to handle OpenSSL on Windows is probably a separate issue because it doesn't have a straightforward answer: we either need to provide specific instructions to users or bundle it in binary form ourselves.

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

<!-- Either: -->
- [x] These changes do not require tests because they fix test running.

<!-- 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/17419)
<!-- Reviewable:end -->
2017-06-21 23:12:38 -07:00
bors-servo
e364f849b0 Auto merge of #17459 - indygreg:backout-testing, r=Manishearth
Servo backout testing

We deployed the Servo VCS backout service recently and want to test it. The goal is to land this PR so it is replicated to the Firefox repo. Then we'll back out this PR from the Firefox repo, which should trigger a new PR against Servo to do the backout.

The changed code is not wrong. So if things don't go as planned, it shouldn't harm anyone.

<!-- 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/17459)
<!-- Reviewable:end -->
2017-06-21 22:13:25 -07:00
Bobby Holley
a971168ca1 Bump rust-stable-version to 1.17.
Per https://groups.google.com/d/msg/mozilla.dev.platform/1l0d5HbQMXw/RNZs0iXsAgAJ
2017-06-21 20:01:41 -07:00
Bobby Holley
71e76a054d Be smarter when clearing the bloom filter. 2017-06-21 19:53:16 -07:00
Bobby Holley
28c35ac9df Improve bloom microbenchmarks.
The current code is mostly bechmarking Rust's default hash routines for
integers, which is not interesting to us. We add generating function
that jumps around "enough" and also add benchmarks for clear().

It's hard to read too much into the numbers because we can't reliably
simulate L1/L2 cache behavior with cargo bench, but the results show
about 40ns for clear() about 2ns for insert, and about 1.5ns for
contains/remove. This informs our thinking in the next patch.
2017-06-21 19:53:15 -07:00
Bobby Holley
5b857686e2 Make selectors benchmark tests work again. 2017-06-21 19:53:15 -07:00
Bobby Holley
5d5c715152 Switch the bloom element list to a SmallVec and track pushed hashes. 2017-06-21 19:53:15 -07:00
Bobby Holley
0f0e0d81fb Push elements in order in StyleBloom::rebuilds.
This is important because we're about to start storing a parallel list
of pushed hashes, and the current behavior here will cause mismatches
there.

We take the opportunity to bump the SmallVec size to 16, since each
entry is only a word and we really want to avoid heap-allocating. And
then we switch to drain(), because of
https://github.com/rust-lang/rust/issues/42763
2017-06-21 19:53:15 -07:00
Simon Sapin
837cb6ddb2 Pass some 48-bytes closures by references instead of by value. 2017-06-22 02:02:31 +02:00
Nazım Can Altınova
e272b4183b Bump cssparser to 1.16.1 2017-06-21 16:42:54 -07:00
Gregory Szorc
6294931e20 Add Gregory Szorc to mail map 2017-06-21 15:39:50 -07:00
bors-servo
1ae76ec246 Auto merge of #17405 - pyfisch:gradient-tests, r=jdm
Add some more tests for gradients

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

@jdm proposed to add these tests directly to servo.

@bors-servo try

---
<!-- 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/17405)
<!-- Reviewable:end -->
2017-06-21 14:44:25 -07:00
Glenn Watson
a447f1a579 Update WR (move clips to gpu cache). 2017-06-22 05:30:56 +10:00
bors-servo
ed5485ed18 Auto merge of #17361 - servo:jdm-patch-7, r=nox
Add expected error for worker error event test.

Fixes #14775.

<!-- 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/17361)
<!-- Reviewable:end -->
2017-06-21 12:10:23 -07:00
Nikhil Shagrithaya
48e04d8d8f Remove target and data fields from parse_node_data 2017-06-22 00:40:21 +05:30
Nazım Can Altınova
82ef35b7e8 Implement webkit prefixed values for display property 2017-06-21 12:00:08 -07:00
Pyfisch
4935fbf555 Add some more tests for gradients 2017-06-21 20:19:06 +02:00
Emilio Cobos Álvarez
6fefe522a3
style: Assert we never style a root element from another document.
Right now when calling getComputedStyle with an element from another document,
we return the style using the pres context of that document, not of the document
of the window getComputedStyle was called on, so this holds.

But it will stop holding if we ever change this, so assert it doesn't happen.

Bug: 1374062
Reviewed-By: Manishearth
MozReview-Commit-ID: 3g8yQWWdsen
2017-06-21 19:55:02 +02:00
bors-servo
3e698340ac Auto merge of #17343 - ferjm:bug1355368.fontweight.keyword, r=upsuper
stylo: make font-weight descriptor in @font-face preserve keyword values

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1355368

<!-- 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/17343)
<!-- Reviewable:end -->
2017-06-21 10:40:35 -07:00
bors-servo
b211664e87 Auto merge of #17439 - bholley:compound_left_to_right, r=SimonSapin
Match compound selectors left-to-right (second try)

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

<!-- 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/17439)
<!-- Reviewable:end -->
2017-06-21 09:28:43 -07:00
Lars Bergstrom
f78309a2d7 Commiting a trivial README.md change for the Firefox sheriffs to test backout. 2017-06-21 10:27:17 -05:00