Commit graph

24805 commits

Author SHA1 Message Date
Hiroyuki Ikezoe
03d354afba Rename animatable to animation_type.
animation_type takes following values:

animation_type="none" for non-animatable properties
animation_type="normal" for animatable properties
animation_type="discrete" for animatable but discrete type of animations

We use string value to distinguish the case where no animation_type is
specified.
animation_type="discrete" will be used in a subsequent patch to make a property
animatable as discrete type.
2017-04-07 10:38:28 +09:00
bors-servo
3beaa8d2e9 Auto merge of #16289 - bholley:primary_before_pseudos, r=emilio
Cascade the primary style before matching pseudos

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

<!-- 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/16289)
<!-- Reviewable:end -->
2017-04-06 16:32:14 -05:00
Bobby Holley
8acb4ed87c Match eager pseudos after the primary cascade.
This is necessary in order to make the computation of eager pseudos depend on
the primary ComputedValues, which we want to do for ::first-letter/::first-line.

This also fixes a bug where the behavior of EagerPseudoStyles::is_empty was reversed
in both the implementation and the callsite.

MozReview-Commit-ID: EXBxclyHWXu
2017-04-06 14:31:16 -07:00
bors-servo
24cea409f2 Auto merge of #16284 - mrobinson:scroll-root-clip, r=glennw
Use real clips when generating scroll roots

This is the first step toward removing inherited clips in favor of
scroll roots for handling overflow and CSS clipping. This will allow us
to more easily handle elements that should not be clipped. While we are
still using inherited clips here, we now properly clip some types of
content that wasn't clipped before.

<!-- 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/16284)
<!-- Reviewable:end -->
2017-04-06 14:32:16 -05:00
bors-servo
208d5dbfb6 Auto merge of #16283 - emilio:cleanup-parse-non-negative, r=Wafflespeanut
style: Multiple cleanups around parsing code.

<!-- 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/16283)
<!-- Reviewable:end -->
2017-04-06 13:57:40 -05:00
Emilio Cobos Álvarez
846c950b6b
style: More cleanups around length parsing and viewport rule parsing. 2017-04-06 20:56:24 +02:00
Emilio Cobos Álvarez
705ecb4557
style: Multiple style nits across parsing code. 2017-04-06 20:56:23 +02:00
Emilio Cobos Álvarez
726f918b46
style: Cleanup viewport rule parsing. 2017-04-06 20:56:22 +02:00
Bobby Holley
19743a67ba Rearrange compute_style and eliminate MatchResults.
This simplifies things by avoiding the computation of MatchResults when we
don't need them.

We continue to compute rule_nodes_changed, even though we don't use it
for the moment, since we will need it soon for various incremental restyle
optimizations.

MozReview-Commit-ID: 4qsUYaD5Bs2
2017-04-06 11:28:24 -07:00
Bobby Holley
42f5aea76a Remove shareable boolean from ComputedValues and simplify code.
This code is all vestigial at this point, presumably after a refactoring.

MozReview-Commit-ID: CV0lKMStq13
2017-04-06 11:28:18 -07:00
Bobby Holley
f9de1dedd8 Factor out the application of selector flags into a helper.
MozReview-Commit-ID: 2FZxnBxvaOb
2017-04-06 11:28:07 -07:00
Martin Robinson
0353aad4e3 Use real clips when generating scroll roots
This is the first step toward removing inherited clips in favor of
scroll roots for handling overflow and CSS clipping. This will allow us
to more easily handle elements that should not be clipped. While we are
still using inherited clips here, we now properly clip some types of
content that wasn't clipped before.
2017-04-06 14:46:02 +02:00
bors-servo
21eafebd37 Auto merge of #16279 - glennw:update-wr-inset-box-shadow-clip, r=pcwalton
Update WR (inset box shadow + border-radius + clip).

<!-- 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/16279)
<!-- Reviewable:end -->
2017-04-06 06:27:50 -05:00
bors-servo
f3fd8238ce Auto merge of #15784 - jdm:ssltests, r=nox,jgraham
Make SSL tests work

These changes fix #6919.

<!-- 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/15784)
<!-- Reviewable:end -->
2017-04-06 05:53:14 -05:00
Josh Matthews
6f590a87bf Move hosts module into net crate. Remove obsolete functions. 2017-04-06 19:25:47 +09:00
Josh Matthews
e772086b8c Enable the WPT referrer-policy tests that use HTTPS. 2017-04-06 19:25:45 +09:00
Josh Matthews
e218935936 Remove invalid cert test that can no longer test anything useful. 2017-04-06 19:25:43 +09:00
Josh Matthews
f12bb9db4f Add a test verifying that HTTPS WPT tests work. 2017-04-06 19:25:42 +09:00
Josh Matthews
ba132e0b4c Remove unnecessary NetworkHttpRequestFactory abstraction. 2017-04-06 19:25:39 +09:00
Josh Matthews
e9fdc4c72a Replace hosts when making TCP connections, not when verifying SSL certs. 2017-04-06 19:25:37 +09:00
Josh Matthews
dc99104f55 Add command-line argument to use a custom SSL certificate database. 2017-04-06 19:25:34 +09:00
bors-servo
3272861fca Auto merge of #16186 - jdm:shutdown-js, r=jgraham
Provide pull request link when syncing web-platform-tests with upstream

This allows other people watching that repository to see where the review of the test changes occurred.

<!-- 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/16186)
<!-- Reviewable:end -->
2017-04-06 05:13:58 -05:00
bors-servo
d7fb2cc27f Auto merge of #16280 - hiikezoe:handle-base-style, r=heycam,birtles
Handle base style

<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1311257

---
<!-- 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 it's for stylo.

<!-- 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/16280)
<!-- Reviewable:end -->
2017-04-05 22:53:30 -05:00
bors-servo
4229ccab4e Auto merge of #16281 - servo:atomic_opaque, r=heycam
Add std::atomic to opaque_types in build_gecko

Recent change in bug 1277709 makes ThreadSafeAutoRefCnt start using std::atomic, which somehow doesn't not have #[derive(Debug)] on Windows, which makes all objects which includes ThreadSafeAutoRefCnt to stop having #[derive(Debug)]. This breaks stylo build on Windows.

By adding it as an opaque type, std::atomic would derive Debug again.

<!-- 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/16281)
<!-- Reviewable:end -->
2017-04-05 22:11:14 -05:00
Xidorn Quan
ed5c49c102 Add std::atomic to opaque_types in build_gecko
Recent change in bug 1277709 makes ThreadSafeAutoRefCnt start using std::atomic, which somehow doesn't not have #[derive(Debug)] on Windows, which makes all objects which includes ThreadSafeAutoRefCnt to stop having #[derive(Debug)]. This breaks stylo build on Windows.

By adding it as an opaque type, std::atomic would derive Debug again.
2017-04-06 13:06:51 +10:00
Hiroyuki Ikezoe
3da46d9f79 Update bindings. 2017-04-06 11:27:29 +09:00
Glenn Watson
1c9f724bed Update WR (inset box shadow + border-radius + clip). 2017-04-06 12:27:23 +10:00
Hiroyuki Ikezoe
c6ab7a31f0 Use underlying value for missing keyframes.
mBaseStyleValuesForServo is a nsRefPtrHashtable<nsUint32HashKey, RawServoAnimationValue>
In this patch, we use void* instead of exposing nsRefPtrHashtable in FFI
because we just use the hash table as an argument of a C++ function, it means
we don't touch the hash table in Rust at all.
2017-04-06 10:30:41 +09:00
Hiroyuki Ikezoe
6fe0a0e22e Move stuff of KeyframeEffectReadOnly::ComposeStyleRule in Rust.
After this, we will implement additive or accumulative calculation
in this Rust function.
2017-04-06 10:30:40 +09:00
Hiroyuki Ikezoe
56dc7294e5 Add FFI functions to get progress value and current position in a segment.
Two functions added in this patch get progress value from ComputedTiming
or get the position in a given AnimationPropertySegment.
Without these FFIs, we need to expose Maybe<> and Nullable<> and handle
them in Rust.
2017-04-06 10:30:39 +09:00
Hiroyuki Ikezoe
f1d3f23bfa Expose ComputedTiming to FFI.
This will be also used for animation value composition in Rust.
2017-04-06 10:30:38 +09:00
Hiroyuki Ikezoe
68be131165 Move AnimationPropertySegment in a separate header and expose it in FFI.
This will be used for animation value composition in Rust.
2017-04-06 10:30:37 +09:00
Hiroyuki Ikezoe
97aacb242e Add an FFI function that returns an AnimationValue for a given nsCSSPropertyID from computed values.
When we compose style for a given nsCSSPropertyID in the case where
we have no specified values in target keyframe, we use this AnimationValue
for composition as if it's specified.
2017-04-06 10:30:28 +09:00
Hiroyuki Ikezoe
fb6aceba31 Add a function that returns a base computed values (i.e. computed values without any animations rules).
This base value will be used for additive, accumulative animations
and also SMIL.
2017-04-06 10:08:52 +09:00
Hiroyuki Ikezoe
2c0b821564 Make cascade_with_rules() take a boolean representing whether the cascade is for pseudo element or not.
cascade_with_rules() doesn't mutate any already-computed styles.
2017-04-06 10:08:51 +09:00
Hiroyuki Ikezoe
c22d4e518c Make cascade_with_rules take SharedStyleContext instead StyleContext. 2017-04-06 10:08:50 +09:00
Hiroyuki Ikezoe
4516d25889 Make TransitionProperty::from_declaration() convert PropertyDeclaration::{CSSWideKeyword,WithVariables} as well. 2017-04-06 10:08:43 +09:00
bors-servo
c41ade06eb Auto merge of #16278 - hiikezoe:make-letter-spacing-animatable, r=emilio
Make letter-spacing animatable.

This is a PR of https://bugzilla.mozilla.org/show_bug.cgi?id=1353921

From the spec: 'normal' value computes to zero.

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

<!-- Either: -->
- [X] There are tests for these changes in web-platform-test (web-animations/animation-model/animation-types/interpolation-per-property.html)

<!-- 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/16278)
<!-- Reviewable:end -->
2017-04-05 18:58:35 -05:00
Hiroyuki Ikezoe
b801e07ec5 Make letter-spacing animatable.
From the spec: 'normal' value computes to zero.
2017-04-06 08:38:04 +09:00
bors-servo
b89dc6a08c Auto merge of #16276 - servo:cargo-geckolib, r=Wafflespeanut
Add cargo-geckolib and rustc-geckolib commands to mach

<!-- 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/16276)
<!-- Reviewable:end -->
2017-04-05 16:30:19 -05:00
bors-servo
656f5d3911 Auto merge of #16277 - servo:1.16, r=Manishearth
Update stable Rust version to 1.16.0

Firefox did this in https://bugzilla.mozilla.org/show_bug.cgi?id=1351031

Together with https://github.com/servo/servo/pull/16276, this gets us support for `./mach cargo-geckolib check`.

<!-- 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/16277)
<!-- Reviewable:end -->
2017-04-05 15:49:42 -05:00
bors-servo
1e6bd4a134 Auto merge of #16265 - stshine:oh-box-model, r=emilio
Inherit 'text-overflow' and 'overflow' in text fragment

This is an implementation detail that is necessary for 'text-overflow'
to work properly.

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

<!-- 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/16265)
<!-- Reviewable:end -->
2017-04-05 15:09:14 -05:00
Simon Sapin
17704172b4 Update stable Rust version to 1.16.0
Firefox did this in https://bugzilla.mozilla.org/show_bug.cgi?id=1351031
2017-04-05 22:02:53 +02:00
Simon Sapin
9f5ba0aee9 Make ./mach rustc and ./mach cargo bootstrap. 2017-04-05 21:52:10 +02:00
Simon Sapin
ca08ff876b Add cargo-geckolib and rustc-geckolib commands to mach. 2017-04-05 21:50:44 +02:00
bors-servo
be35f564bd Auto merge of #16274 - CarlosMcs:negative-flex-basis, r=emilio
Reject negative values of flex-basis.

Fixes #15902

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

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

<!-- 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/16274)
<!-- Reviewable:end -->
2017-04-05 12:09:20 -05:00
Carlos Martinez
b85f1a0240 Reject negative values of flex-basis.
Fixes #15902
2017-04-05 18:59:09 +02:00
bors-servo
bf7c044955 Auto merge of #16272 - nox:net, r=jdm
Net enhancements

<!-- 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/16272)
<!-- Reviewable:end -->
2017-04-05 09:27:55 -05:00
bors-servo
c12b17d276 Auto merge of #15904 - sendilkumarn:image-area, r=jdm
making image element areas good at finding areas

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

<!-- 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/15904)
<!-- Reviewable:end -->
2017-04-05 08:49:22 -05:00
bors-servo
c2f3cf0205 Auto merge of #16262 - jdm:connection-pool, r=nox
Enable HTTP connection pooling

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15694
- [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/16262)
<!-- Reviewable:end -->
2017-04-05 08:09:23 -05:00