Commit graph

28547 commits

Author SHA1 Message Date
bors-servo
a40e5353b3 Auto merge of #17541 - heycam:is-needed, r=emilio
style: Make GeckoElement::traversal_children faster.

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

<!-- 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/17541)
<!-- Reviewable:end -->
2017-06-28 11:59:31 -07:00
Cameron McCormack
8f8f01f96d style: Update Gecko bindings. 2017-06-28 11:59:13 -07:00
Cameron McCormack
25dde5120c style: Use placement new/delete StyleChildrenIterator FFI functions.
MozReview-Commit-ID: L0bhymGJqRx
2017-06-28 11:59:13 -07:00
Cameron McCormack
07ede8cb2a style: Use faster check to determine whether a StyleChildrenIterator is needed.
MozReview-Commit-ID: KNmdtnlEmfc
2017-06-28 11:58:50 -07:00
Cameron McCormack
0b2b30f301 style: Remove unused TElement::children_and_traversal_children_might_differ.
MozReview-Commit-ID: GUmuxpdvAa8
2017-06-28 11:58:50 -07:00
Cameron McCormack
84c61fa15e style: Look to base XBL bindings for content too. r=bholley
MozReview-Commit-ID: DFep2S6jnWf
2017-06-28 11:58:50 -07:00
KuoE0
2063f2217e Bug 1373159 - [servo] Make '-moz-context-properties' support 'fill-opacity' and 'stroke-opacity'.
MozReview-Commit-ID: Buzlxfwpr6h
2017-06-28 10:45:15 -07:00
bors-servo
71f1f4b508 Auto merge of #17547 - mbrubeck:lwtheme, r=emilio
Bug 1367312 - stylo: Implement :-moz-lwtheme* pseudo-classes.

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

[bug 1367312]: https://bugzilla.mozilla.org/show_bug.cgi?id=1367312

<!-- 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/17547)
<!-- Reviewable:end -->
2017-06-28 10:08:37 -07:00
Matt Brubeck
e0b864d787 Bug 1367312 - stylo: Implement :-moz-lwtheme* pseudo-classes.
https://bugzilla.mozilla.org/show_bug.cgi?id=1367312
2017-06-28 09:41:33 -07:00
bors-servo
522d24d126 Auto merge of #17543 - servo:derive-all-the-things, r=emilio
Make text-shadow and box-shadow use SimpleShadow

<!-- 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/17543)
<!-- Reviewable:end -->
2017-06-28 07:28:45 -07:00
Anthony Ramine
201d7e79e7 Make text-shadow and box-shadow use SimpleShadow 2017-06-28 16:28:25 +02:00
bors-servo
51dd0c65cd Auto merge of #17527 - cbrewster:iframe_cycles, r=asajeffrey
Don't return window proxy if it has been discarded

<!-- 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 #17479 (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/17527)
<!-- Reviewable:end -->
2017-06-28 01:59:16 -07:00
Connor Brewster
79f3237692 Don't return window proxy if it has been discarded 2017-06-27 22:14:19 -10:00
bors-servo
65ff4a399c Auto merge of #17535 - jyc:unsafe-no-jsmanaged-field-ty, r=jdm
Have unsafe_no_jsmanaged_fields! macro take a type as argument rather than an ident.

We only write unsafe_no_jsmanaged_fields!(SomeType), and the
documentation says it is to be used for types.

<!-- 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
- [X] These changes do not require tests because it should be checked at compile time

<!-- 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/17535)
<!-- Reviewable:end -->
2017-06-28 00:25:03 -07:00
Jonathan Chan
a4cbbeef14 Have unsafe_no_jsmanaged_fields! macro take a type as argument rather than an ident.
We only write unsafe_no_jsmanaged_fields!(SomeType), and the
documentation says it is to be used for types.
2017-06-27 15:59:00 -07:00
bors-servo
de0ee6cebf Auto merge of #17530 - servo:derive-all-the-things, r=emilio
Improve sequence values in style

<!-- 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/17530)
<!-- Reviewable:end -->
2017-06-27 15:34:15 -07:00
Anthony Ramine
395f6be0a6 Use the Separator trait for the filter property 2017-06-27 23:40:16 +02:00
Anthony Ramine
813883e1bd Don't use SmallVec<[T; 1]> for computed values with an empty default 2017-06-27 23:37:51 +02:00
Anthony Ramine
da9d2001db Change space_separated_allowed into separator 2017-06-27 23:37:49 +02:00
Anthony Ramine
c03f5f19ab Introduce CommaWithSpace
This allows us to support stroke-dasharray the same way as comma-separated
values.
2017-06-27 23:37:48 +02:00
Anthony Ramine
17875b8a81 Introduce Separator::parse 2017-06-27 23:37:44 +02:00
Anthony Ramine
6c17bb03ce Derive ToComputedValue for Either<A, B> 2017-06-27 23:36:45 +02:00
bors-servo
9070ca1c3c Auto merge of #17428 - shinglyu:lineargradient, r=nox
Convert -webkit-linear-gradient coordinate system for Stylo

<!-- Please describe your changes on the following line: -->
This patch will fix the -webkit-linear-gradient direction issue in Stylo. I decided to NOT change the behavior of Servo, because according to the webcompat spec the webkit prefixed version should just be an alias of non-prefixed version. But we might want to remove support for old syntax like "-webkit-linear-gradient(top, ...)" (without "to"), because they are not in the spec anymore.

The Gecko layout system use different coordinate systems for prefixed and non-prefixed version, so I did a conversion, but for Servo I keep the modern version only.

Since I believe we should not support old syntax in Servo, so I'm not going to put the test in Servo. I'll submit my test cases to the Gecko wpt test instead.

---
<!-- 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 [Bug 1372821](https://bugzilla.mozilla.org/show_bug.cgi?id=1372821)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because test will be submitted to the Gecko side

<!-- 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/17428)
<!-- Reviewable:end -->
2017-06-27 14:34:01 -07:00
bors-servo
79ee821bef Auto merge of #17525 - emilio:text-decoration, r=heycam
style: Fix propagation of text-decoration lines.

This also paves up the ground to be able to fix #16825.

<!-- 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/17525)
<!-- Reviewable:end -->
2017-06-27 12:44:33 -07:00
bors-servo
2843eb5ddf Auto merge of #17517 - canaltinova:font-lang-override, r=SimonSapin
stylo: Implement font-language-override descriptor for @font-face rule

Generally  we use computed values for `@font-face` rule descriptors but that descriptor is a bit different than the others in gecko side. It accepts strings instead of unsigned integer(which is computed value of this property). So we had to use SpecifiedValue for that in here.

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

<!-- 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/17517)
<!-- Reviewable:end -->
2017-06-27 11:35:33 -07:00
bors-servo
12ff92592f Auto merge of #17532 - bholley:set_explicit_style, r=emilio
stylo: Attach styles explicitly to generated content

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

<!-- 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/17532)
<!-- Reviewable:end -->
2017-06-27 10:27:49 -07:00
Bobby Holley
8ab65d1731 Hand the already-resolved style directly to servo when creating generated content. 2017-06-27 10:08:42 -07:00
bors-servo
083bb49d0d Auto merge of #17524 - HarveyHunt:rename_privatize_test, r=jdm
tests: Rename privatize.rs to deny_public_fields.rs

Privatize is no longer mentioned in the codebase, as of 8bcf36b9a5, so
rename the relevant test to avoid confusion.

---
<!-- 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] These changes do not require tests because the affected file is a test itself.

<!-- 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/17524)
<!-- Reviewable:end -->
2017-06-27 09:25:46 -07:00
bors-servo
8cb8089665 Auto merge of #17529 - zakorgy:bluetooth-wpt, r=jdm
Move Bluetooth WPT tests one directory up

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

Moved the Bluetooth WPT tests one folder up, to not interfere when running tests under mozilla folder, because these tests take a long time to run.

Bluetooth WPT tests can now run with `./mach test-wpt tests/wpt/mozilla/tests/bluetooth/` instead of `./mach test-wpt tests/wpt/mozilla/tests/mozilla/bluetooth/`.

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

<!-- 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/17529)
<!-- Reviewable:end -->
2017-06-27 08:25:59 -07:00
bors-servo
f93fccac57 Auto merge of #17523 - emilio:cleanup-traversal, r=nox
style: Cleanup traversal.rs

Mostly reflowing comments that have become too long or two short with
refactorings, and using consistent indentation.

<!-- 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/17523)
<!-- Reviewable:end -->
2017-06-27 07:08:42 -07:00
Zakor Gyula
649ccef021 Move Bluetooth WPT tests one directory up 2017-06-27 12:16:26 +02:00
bors-servo
4e8cf678bf Auto merge of #17528 - bzbarsky:first-letter-better, r=emilio
Fix stylo support for first-letter

<!-- 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 https://bugzilla.mozilla.org/show_bug.cgi?id=1324618

<!-- 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/17528)
<!-- Reviewable:end -->
2017-06-26 23:46:13 -07:00
Boris Zbarsky
746f245f32 Fix style computation for first-letter pseudo-elements with inline ancestors.
We should inherit from the inline, not its parent block.

Gecko bug 1324618 part 10 servo bits: https://bugzilla.mozilla.org/show_bug.cgi?id=1324618
2017-06-26 23:29:18 -07:00
Boris Zbarsky
d40e27d6e5 Reframe less on restyles that involve nonexistent first-letter frames in Gecko.
Gecko bug 1324618 part 9 servo bits: https://bugzilla.mozilla.org/show_bug.cgi?id=1324618
2017-06-26 23:27:39 -07:00
Boris Zbarsky
40dd807df3 Assert that compute_style_difference is only called with eager pseudos.
Gecko bug 1324618 part 3: https://bugzilla.mozilla.org/show_bug.cgi?id=1324618
2017-06-26 23:24:56 -07:00
Boris Zbarsky
18ab0087ae Add some comments to may_generate_pseudo; no real behavior changes for now.
Gecko bug 1324618 part 2: https://bugzilla.mozilla.org/show_bug.cgi?id=1324618
2017-06-26 23:24:08 -07:00
Boris Zbarsky
acb27de71c Fix dynamic restyling that changes whether our element may generate a pseudo to clear out stale pseudo styles.
Gecko bug 1324618 part 1: https://bugzilla.mozilla.org/show_bug.cgi?id=1324618
2017-06-26 23:23:04 -07:00
Emilio Cobos Álvarez
69e650ea68
style: Fix propagation of text-decoration lines. 2017-06-26 23:12:18 -07:00
bors-servo
8d9b995b34 Auto merge of #17522 - streichgeorg:master, r=emilio
Replace ParseNodeID with ParseNodeId

<!-- Please describe your changes on the following line: -->
---
Not really much to this...
<!-- 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 #17519 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] 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/17522)
<!-- Reviewable:end -->
2017-06-26 22:46:27 -07:00
bors-servo
4b99a75508 Auto merge of #17526 - hiikezoe:check-has_new_animation_style, r=birtles
Check has_new_animation_style along with for_css_rule_changes() in ne…

…eds_animations_update().

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

---
- [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/17526)
<!-- Reviewable:end -->
2017-06-26 21:12:32 -07:00
Hiroyuki Ikezoe
ae1ccdd456 Check has_new_animation_style along with for_css_rule_changes() in needs_animations_update(). 2017-06-27 08:26:16 +09:00
Emilio Cobos Álvarez
1c2fcb16ca
style: Cleanup duplicated code in the definition of ComputedValues. 2017-06-26 15:52:43 -07:00
Emilio Cobos Álvarez
5c7632f4c4
style: Add some flags to the computed values.
This will allow us to fix propagation of text-decoration, and also to implement
inlinization of ruby kids.

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-06-26 15:52:42 -07:00
Harvey Hunt
eb98adf039 tests: Rename privatize.rs to deny_public_fields.rs
Privatize is no longer mentioned in the codebase, as of 8bcf36b9a5, so
rename the relevant test to avoid confusion.
2017-06-26 22:44:44 +01:00
Emilio Cobos Álvarez
5a481547b8
style: Cleanup traversal.rs
Mostly reflowing comments that have become too long or two short with
refactorings, and using consistent indentation.
2017-06-26 22:48:17 +02:00
streichgeorg
fa6fc141c8 replaced ParseNodeID with ParseNodeId 2017-06-26 14:06:26 +02:00
Nazım Can Altınova
3421694f12 stylo: Implement font-language-override descriptor for @font-face rule 2017-06-25 18:51:18 -07:00
bors-servo
3f2d747689 Auto merge of #17514 - HarveyHunt:deny-public-fields-error-message, r=jdm
deny_public_fields: display field identifier in help message

Use a binding's field identifier to produce more descriptive output.
Fall back to a binding's identifier if a field identifier is not
available.

Additionally, make the privatize.rs compiletest more specific and
wrap the identifier in backticks to aid readability.

As an aside, should I send a PR to rename ```compile-fail/privatize.rs``` to ```compile-fail/deny_public_fields.rs``` as privatize isn't mentioned in the codebase any more?

```
$ find . -name "*privatize*"
./tests/compiletest/plugin/compile-fail/privatize.rs
```

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

<!-- 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/17514)
<!-- Reviewable:end -->
2017-06-25 10:45:42 -07:00
Harvey Hunt
6081241962 deny_public_fields: display field identifier in help message
Use a binding's field identifier to produce more descriptive output.
Fall back to a binding's identifier if a field identifier is not
available.

Additionally, make the privatize.rs compiletest more specific and
wrap the identifier in backticks to aid readability.
2017-06-25 18:12:43 +01:00
bors-servo
d8ae463839 Auto merge of #17383 - o0Ignition0o:profiler_chan_by_reference, r=jdm
#17363 : Passing ProfilerChan by reference to the send_profile_data method.

<!-- Please describe your changes on the following line: -->
Passed the ProfilerChan by reference to the send_profile_data method.

I wonder if I should also refactor the
`pub fn profile<T, F>(category: ProfilerCategory, meta: Option<TimerMetadata>, profiler_chan: ProfilerChan, callback: F) -> T where F: FnOnce() -> T method ` , but I don't feel confident enough to make the call, since I don't really understand what it would imply.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the project would not compile if there were missing by reference calls.

<!-- 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/17383)
<!-- Reviewable:end -->
2017-06-25 09:06:28 -07:00