Commit graph

16155 commits

Author SHA1 Message Date
Manish Goregaokar
dd3159f2f5 Express unique ownership of arc in StyleStructRef, add vacated state
MozReview-Commit-ID: GwOw0HaC9S7
2017-05-04 07:15:18 -07:00
Manish Goregaokar
c85aae4abd Add iterators for vector types
MozReview-Commit-ID: I7oOpYhVP5S
2017-05-04 07:15:16 -07:00
bors-servo
36f26148e6 Auto merge of #16725 - nox:moz-osx-font-smoothing, r=Wafflespeanut
Implement -moz-osx-font-smoothing

<!-- 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/16725)
<!-- Reviewable:end -->
2017-05-04 07:42:43 -05:00
Anthony Ramine
c78fd3a0ce Implement -moz-osx-font-smoothing 2017-05-04 14:37:19 +02:00
bors-servo
6aa552d59f Auto merge of #16706 - alicemaz:master, r=nox
Bump base64 to 0.4.2

<!-- Please describe your changes on the following line: -->
we have just released a security patch for base64 (preventing integer overflow when sizing a buffer for encoded output). this bumps the version in the three Cargo.toml files that pull it in. there should be no observable difference in behavior, no non-malicious input should be able to trigger this state

---
<!-- 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 is a small fix to a dependency with no practical difference in operation from previous.

<!-- 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/16706)
<!-- Reviewable:end -->
2017-05-04 06:08:37 -05:00
bors-servo
ca277aabe6 Auto merge of #16724 - heycam:reenable-metrics, r=bholley
style: Re-enable font metrics querying for ch and ex units in Stylo traversal.

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

<!-- 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/16724)
<!-- Reviewable:end -->
2017-05-04 03:46:28 -05:00
Cameron McCormack
aa9bb07a93 style: Re-enable font metrics querying for ch and ex units in Stylo traversal. 2017-05-04 16:22:08 +08:00
bors-servo
dd47b1ba6c Auto merge of #16714 - emilio:atoms, r=heycam
style: Fix stylo's atom script.

It's been broken since bug 1358968.

<!-- 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/16714)
<!-- Reviewable:end -->
2017-05-04 03:03:56 -05:00
Jeremy Chen
729b4f7901 Bug 1360144 - make stroke-{*} animatable for stylo. r=boris
This part includes making stroke-linecap, stroke-linejoin, stroke-miterlimit,
stroke-opacity, and stroke-dasharray animatable.

For properties that already implemented Interpolate trait and clone() for
glue code, we can just make them animatable by replacing the animation_value_type
with proper type name. So, set animation_value_type to 'discrete' for
stroke-linecap and stroke-linejoin. Set animation_value_type to 'ComputedValue'
for stroke-miterlimit and stroke-opacity.

As to stroke-dasharray, we need to implement Interpolate trait and glue codes
for it.
2017-05-04 14:31:38 +08:00
bors-servo
896a920ff5 Auto merge of #16707 - CJKu:bug-1359787, r=manish
Stylo: Implement {specified|computed}::LayerImage.

<!-- Please describe your changes on the following line: -->
Bug 1359787 - Stylo: Unite the implementation of background-image/ mask-image and border-image-source in {background|svg|border}.mako.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
- [ ] 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/16707)
<!-- Reviewable:end -->
2017-05-03 21:49:33 -05:00
bors-servo
e8aa3759bd Auto merge of #16500 - MortimerGoro:unsafe_heap, r=asajeffrey
Fix unsafe Heap constructor usage in DOM objects

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

See https://github.com/servo/rust-mozjs/issues/343#issuecomment-294513870

Heap::new() constructor is unsafe. Heap should be set after reflect_dom_object call in order to prevent potential GC crashes.

<!-- 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/16500)
<!-- Reviewable:end -->
2017-05-03 21:07:32 -05:00
bors-servo
01f169d8c1 Auto merge of #16568 - WholeGrainGoats:master, r=Manishearth
font-feature-settings gecko glue code

<!-- Please describe your changes on the following line: -->
FeatureTagValue value property changed to use u32. ToCss for
FeatureTagValue changed to allow conversion from u32 to string. Parse
for the same struct updated to convert from string to u32. Added two
functions to transfer settings to gecko and copy settings.

---
<!-- 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 #15975  (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/16568)
<!-- Reviewable:end -->
2017-05-03 19:41:59 -05:00
bors-servo
53b391daf8 Auto merge of #16713 - emilio:calc-in-calc, r=manishearth
style: Allow parsing nested calc() expressions.

<!-- 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/16713)
<!-- Reviewable:end -->
2017-05-03 18:33:03 -05:00
Imanol Fernandez
efb59b7ecd Fix unsafe Heap constructor usage in DOM objects 2017-05-04 01:07:23 +02:00
Juan C. Gonzalez-Zurita
a3dbf1d275 font-feature-settings gecko glue code
FeatureTagValue value property changed to use u32. ToCss for
FeatureTagValue changed to allow conversion from u32 to string. Parse
for the same struct updated to convert from string to u32. Added two
functions to transfer settings to gecko and copy settings.
2017-05-03 17:40:22 -04:00
Hiroyuki Ikezoe
23f7807e38 Support all properties for -moz-appearance
Now all properties in nsCSSProps::kMozAppearanceKTable are in
keyword list of -moz-appearance.
2017-05-04 06:27:45 +09:00
Emilio Cobos Álvarez
cd43331963
style: Allow parsing nested calc() expressions. 2017-05-03 23:21:06 +02:00
Alice Maz
947e86bb45 Bump base64 to 0.4.2 2017-05-03 20:58:29 +00:00
Emilio Cobos Álvarez
9f352af4b0
style: Fix stylo's atom script. 2017-05-03 21:44:26 +02:00
bors-servo
ed7686b42c Auto merge of #16712 - z1mvader:atomize_ns_prefix, r=SimonSapin
Changed all prefixes from DOMString to the atomic Prefix from html5ever

<!-- Please describe your changes on the following line: -->
I just changed the `prefix` parameters on the constructors of several HTML elements. The type now is `Option<Prefix>`. I also changed the sizes of the `sizeof.rs` unit test to match the new values.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it should not affect anything else

<!-- 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/16712)
<!-- Reviewable:end -->
2017-05-03 13:33:56 -05:00
Christian Poveda
62821a6915 Solving merge conficts related to the html5ever_atoms -> html5ever change 2017-05-03 12:57:49 -05:00
bors-servo
74c36cb35d Auto merge of #16652 - Gankro:bincode-ipc-5, r=jdm
Update to webrender's new bincode IPC

**DO NO MERGE YET**

This is the required update to Servo for my changes to webrender in https://github.com/servo/webrender/pull/1181

<!-- 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/16652)
<!-- Reviewable:end -->
2017-05-03 12:44:37 -05:00
Alexis Beingessner
db02979c4f Update to use webrender bincode IPC 2017-05-03 12:37:20 -04:00
Christian Poveda
875e422fe6 Changed all prefixes from DOMString to the atomic Prefix from html5ever 2017-05-03 10:17:42 -05:00
bors-servo
3905b5af18 Auto merge of #16655 - servo:jdm-patch-1, r=emilio
Fix broken unit tests

These are tests that only get run on TravisCI, apparently, so they were broken by be0139ff3c and 32c624e585 without anybody noticing.

<!-- 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/16655)
<!-- Reviewable:end -->
2017-05-03 09:47:44 -05:00
Josh Matthews
f3f9e28e88 Make unit tests pass on TravisCI. 2017-05-03 10:32:27 -04:00
bors-servo
8b41c7c137 Auto merge of #16689 - servo:m5e, r=nox
Upgrade to html5ever 0.16

<!-- 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/16689)
<!-- Reviewable:end -->
2017-05-03 08:42:41 -05: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
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
Brad Werth
2b6c494f85 Change StyleSet to track stylesheets by unique ID.
MozReview-Commit-ID: Ky3P53o4Euw
2017-05-02 13:38:13 -07: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
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
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
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
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