Commit graph

25652 commits

Author SHA1 Message Date
cku
748359f4c4 Stylo: Update test cases in serialize.rs for mask-image and background-image. 2017-05-03 20:51:33 +08:00
cku
3c3e7f63ee Stylo: Implement {specified|computed}::LayerImage. 2017-05-03 20:51:33 +08:00
bors-servo
1b9e1cc1f2 Auto merge of #16704 - BorisChiou:stylo/transition/compute_from_string, r=birtles
stylo: Bug 1346052 - Add Servo_AnimationValue_Compute.

This is an interdependent patch of Bug 1346052. We need this FFI to compute the AnimationValue from a property id and a string, so nsDOMWindowUtils::ComputeAnimationDistance() can use this FFI to get the AnimationValue.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1346052](https://bugzilla.mozilla.org/show_bug.cgi?id=1346052).
- [X] These changes do not require tests because we have some tests for this 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/16704)
<!-- Reviewable:end -->
2017-05-02 23:46:15 -05:00
Boris Chiou
a46960dbfa Bug 1346052 - Add Servo_AnimationValue_Compute for AnimationValue::FromString.
We need this FFI to compute the AnimationValue from a property id and a
string.
2017-05-03 11:59:55 +08:00
bors-servo
fb6015a75b Auto merge of #16695 - Manishearth:kw-inherit, r=heycam
Do not inherit kw font size if it was not used due to MathML

See https://bugzilla.mozilla.org/show_bug.cgi?id=1361126#c9

<!-- 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/16695)
<!-- Reviewable:end -->
2017-05-02 22:33:15 -05:00
Manish Goregaokar
b298a2bb8e Do not inherit kw font size if it was not used due to MathML 2017-05-02 19:43:12 -07:00
bors-servo
7b1006936a Auto merge of #16702 - bholley:custom_arc, r=emilio
Use a custom arc in the style system

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

<!-- 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/16702)
<!-- Reviewable:end -->
2017-05-02 20:01:10 -05:00
Bobby Holley
fd1c814e78 Bump the DOM element sizes.
This will go back down soonish when NonZero stablizes and we can use it in
StyleArc, which I expect will be long before the memory overhead here matters.
2017-05-02 17:59:53 -07:00
Bobby Holley
7dba36ed73 Make StyleBuilder more efficient using stylearc.
MozReview-Commit-ID: 8wSsYPEmYE4
2017-05-02 17:35:45 -07:00
Bobby Holley
7b0679848b Fix up script and layout. 2017-05-02 17:35:45 -07:00
Bobby Holley
d78ca4c4f9 Use StyleArc in the style system.
MozReview-Commit-ID: flF0fv9E9M
2017-05-02 17:35:44 -07:00
Bobby Holley
6d8fc600b8 Strip down StyleArc to what we need.
We remove most of the doc comments to minimize the number of lines
of forked code.

MozReview-Commit-ID: LehEisKxkJW
2017-05-02 17:34:40 -07:00
Bobby Holley
46bc0525f7 Fork std::arc.
This is a verbatim copy of the source at [1]. It won't compile on stable rust,
but I'm including it here to make the changes clear.

[1] https://doc.rust-lang.org/src/alloc/arc.rs.html

MozReview-Commit-ID: XEbOK4fXQX
2017-05-02 17:34:39 -07:00
bors-servo
536d63c670 Auto merge of #16698 - bradwerth:cloneRight, r=heycam
Change StyleSet to track stylesheets by unique ID.

MozReview-Commit-ID: Ky3P53o4Euw

https://bugzilla.mozilla.org/show_bug.cgi?id=1348481
https://reviewboard.mozilla.org/r/128850/

---
<!-- 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/16698)
<!-- Reviewable:end -->
2017-05-02 18:15:05 -05:00
Brad Werth
2b6c494f85 Change StyleSet to track stylesheets by unique ID.
MozReview-Commit-ID: Ky3P53o4Euw
2017-05-02 13:38:13 -07:00
bors-servo
32f4273e38 Auto merge of #16520 - asajeffrey:wpt-adopt-node-security-checks, r=jdm
Added WPT test case for same-origin-domain checking after adopting a node

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

This adds a WPT test case to make sure that after adopting a node, accessing it does not cause a security error.

---
<!-- 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] 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/16520)
<!-- Reviewable:end -->
2017-05-02 13:36:48 -05:00
Alan Jeffrey
71f3d8a320 Added mozilla wpt test for adopted nodes passing same-origin-domain checks. 2017-05-02 13:26:10 -05:00
bors-servo
225b505d22 Auto merge of #16687 - aneeshusa:keep-stable-rustc-during-clean-nightlies, r=mbrubeck
Keep stable rustc versions in `clean-nightlies`

Check the `rust-stable-version` file to keep the last n
versions of both the nightly and the stable compiler.

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #16675 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they should be checked manually

<!-- 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/16687)
<!-- Reviewable:end -->
2017-05-02 12:37:03 -05:00
Simon Sapin
6c518c89b9 Upgrade to html5ever 0.16 2017-05-02 19:24:28 +02:00
Connor Brewster
5c53f5b7fa Make History attributes and methods throw 2017-05-02 11:22:36 -06:00
bors-servo
f56032b920 Auto merge of #16512 - alfredoyang:use_native_font_handle, r=asajeffrey
Use NativeFontHandle instead of CGFont

<!-- Please describe your changes on the following line: -->
```serde``` is removed from ```core-graphics```, ```NativeFontHandle``` implements serialization and we should use ```NativeFontHandle``` instead of ```CGFont```.

This PR depends on followings.
https://github.com/servo/core-graphics-rs/pull/82
https://github.com/servo/webrender/pull/1133

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

<!-- Either: -->
- [X] These changes do not require tests according to issue comment.

<!-- 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/16512)
<!-- Reviewable:end -->
2017-05-02 10:59:44 -05:00
bors-servo
5e2d383274 Auto merge of #16693 - nox:touch-action, r=emilio
Implement touch-action in stylo (fixes #16372)

<!-- 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/16693)
<!-- Reviewable:end -->
2017-05-02 09:46:59 -05:00
Anthony Ramine
5684acc498 Implement touch-action in stylo (fixes #16372) 2017-05-02 16:46:13 +02:00
bors-servo
688733a0be Auto merge of #16692 - nox:justify-items, r=emilio
Try to parse legacy before overflow for JustifyItems

<!-- 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/16692)
<!-- Reviewable:end -->
2017-05-02 07:38:46 -05:00
Anthony Ramine
86d18863e1 Try to parse legacy before overflow for JustifyItems
"left" matches `<overflow-position>? && <self-position>`, even though it
might have been "left legacy".
2017-05-02 13:08:10 +02:00
Anthony Ramine
1ee1d85934 Simplify parsing code of JustifyItems 2017-05-02 13:07:30 +02:00
bors-servo
f779661392 Auto merge of #16690 - hiikezoe:multiple-properties-in-keyframe, r=birtles
Set multiple properties in a keyframe correctly.

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

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

<!-- 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/16690)
<!-- Reviewable:end -->
2017-05-02 06:03:40 -05:00
bors-servo
997a3e8374 Auto merge of #16691 - heycam:custom-prop-name, r=xidorn
style: Correctly serialize CSS Custom Property names.

From https://bugzilla.mozilla.org/show_bug.cgi?id=1361303, and reviewed by Xidorn over there.
2017-05-02 04:19:59 -05:00
Cameron McCormack
53eb1bb5c6 style: Correctly serialize CSS Custom Property names. 2017-05-02 17:18:37 +08:00
Hiroyuki Ikezoe
7ef036d120 Set multiple properties in a keyframe correctly. 2017-05-02 18:02:10 +09:00
bors-servo
f1ae547b9f Auto merge of #16688 - KuoE0:make-stylo-support-mozmm-unit, r=xidorn
Make stylo support mozmm unit

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

This issue is reported at https://bugzilla.mozilla.org/show_bug.cgi?id=1356104. Mozmm is defined at https://developer.mozilla.org/zh-TW/docs/Web/CSS/length.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the tests already exist in Gecko.

<!-- 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/16688)
<!-- Reviewable:end -->
2017-05-02 02:27:39 -05:00
Aneesh Agrawal
cc86993857 Keep stable rustc versions in clean-nightlies
Check the `rust-stable-version` file to keep the last n
versions of both the nightly and the stable compiler.
2017-05-02 02:41:55 -04:00
KuoE0
507c90d40b Make style system support mozmm unit and compute it correctly.
MozReview-Commit-ID: hCUs8xuNd1
2017-05-02 14:16:17 +08:00
KuoE0
fc1e4e95ed Add a new FFI function Gecko_GetAppUnitsPerPhysicalInch to get the physical inch of device context in Gecko.
MozReview-Commit-ID: HiLkw5r05OT
2017-05-02 14:16:12 +08:00
bors-servo
f284a15e4b Auto merge of #16686 - aethanyc:bug1321754, r=heycam
stylo: Parse eSafeAgentSheetFeatures as agent sheet

This was reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1321754

<!-- 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/16686)
<!-- Reviewable:end -->
2017-05-01 23:52:36 -05:00
bors-servo
49e055264d Auto merge of #16684 - glennw:update-wr-dash-xforms, r=mbrubeck
Update WR (new dashed borders, basic preserve-3d 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/16684)
<!-- Reviewable:end -->
2017-05-01 23:02:02 -05:00
Ting-Yu Lin
81fdd0bfc8 stylo: Parse eSafeAgentSheetFeatures as agent sheet
This was reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1321754

MozReview-Commit-ID: 7GdsOP8lBxk
2017-05-02 11:42:49 +08:00
bors-servo
4426236adf Auto merge of #16681 - mbrubeck:slice_patterns, r=emilio
Stop using unstable slice_patterns feature

cc #5286

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because no functionality changed

<!-- 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/16681)
<!-- Reviewable:end -->
2017-05-01 21:48:33 -05:00
bors-servo
8850a01b81 Auto merge of #16683 - nox:place-content, r=emilio
Fix serialisation of place-content

<!-- 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/16683)
<!-- Reviewable:end -->
2017-05-01 19:57:40 -05:00
Glenn Watson
ff38b6d2f0 Update WR (new dashed borders, basic preserve-3d support). 2017-05-02 10:39:30 +10:00
Anthony Ramine
16dd584bcc Fix serialisation of place-content 2017-05-02 00:52:32 +02:00
bors-servo
4f13bc3829 Auto merge of #16682 - emilio:font-size-inherit, r=bholley
Guard inheriting font-size with what we actually need.

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

<!-- 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/16682)
<!-- Reviewable:end -->
2017-05-01 17:45:43 -05:00
Emilio Cobos Álvarez
17ec634665
Guard inheriting font-size with what we actually need.
MozReview-Commit-ID: C4QaV5cNLh5
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-01 23:56:58 +02:00
Matt Brubeck
10478b4fa3 Stop using unstable slice_patterns feature 2017-05-01 14:19:00 -07:00
bors-servo
52920ed645 Auto merge of #16680 - mbrubeck:abort, r=jdm
Replace intrinsics::abort with process::abort

This removes some unsafe/unstable code and replaces it with a new safe/stable alternative.

Note that `process::abort` is not identical to `intrinsics::abort`, since it runs global cleanups to do things like flush stderr (though neither function performs stack unwinding).  I don't *think* the difference matters for our use cases.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they should not change functionality

<!-- 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/16680)
<!-- Reviewable:end -->
2017-05-01 16:06:45 -05:00
Matt Brubeck
a239419cc0 Replace intrinsics::abort with process::abort 2017-05-01 13:47:31 -07:00
bors-servo
e92a79619e Auto merge of #16670 - emilio:sharing-is-sometimes-hard, r=bholley
style: Account for cousin sharing in the revalidation logic.

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

<!-- 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/16670)
<!-- Reviewable:end -->
2017-05-01 14:20:43 -05:00
Emilio Cobos Álvarez
f879140ad2
style: Reftest for bogus style sharing across cousins. 2017-05-01 20:22:19 +02:00
Emilio Cobos Álvarez
e09ae428eb
style: Account for cousin sharing in the revalidation logic.
Fixes bug 1361013.
2017-05-01 20:22:16 +02:00
bors-servo
487da47ea4 Auto merge of #16677 - mbrubeck:always-be-updating, r=jdm
Update dependencies to latest compatible versions

Cargo.lock changes only, does not affect stylo.  One new dependency because `brotli` split into two crates.

---
- [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 because they touch Cargo.lock only

<!-- 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/16677)
<!-- Reviewable:end -->
2017-05-01 12:38:22 -05:00