Commit graph

2892 commits

Author SHA1 Message Date
Anthony Ramine
a0886213b6 Support font-feature-settings as a @font-face descriptor 2017-05-18 18:16:22 +02:00
Simon Sapin
5e60865d19 Use size_of_test! macro in style and stylo tests. 2017-05-18 17:17:29 +02:00
Anthony Ramine
a108bd5237 Support hashless color quirk in border-color 2017-05-18 11:05:39 +02:00
Anthony Ramine
d0b9bd9c64 Refactor how calc() clamping is done on computed values (fixes #15296) 2017-05-18 10:14:59 +02:00
bors-servo
a5ff57b20f Auto merge of #16891 - kvark:preserve3d, r=glennw,emilio
Using TransformStyle::Preserve3D

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

The changes were reviewed previously as a part of WR update PRs, but then we decided to move them out.
r? @emilio

---
<!-- 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/16891)
<!-- Reviewable:end -->
2017-05-17 20:38:14 -05:00
Paolo Amadini
693ec08387 Allow -moz-stack-sizing to work in a single direction only. 2017-05-17 19:46:04 +01:00
bors-servo
5622c2af81 Auto merge of #16858 - nox:quirks, r=SimonSapin
Implement the hashless color quirk (fixes #15341)

<!-- 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/16858)
<!-- Reviewable:end -->
2017-05-17 08:08:00 -05:00
Anthony Ramine
9964b328b1 Implement the hashless color quirk (fixes #15341) 2017-05-17 14:12:58 +02:00
bors-servo
15271f5961 Auto merge of #16896 - mbrubeck:image-inherit, r=Manishearth
Bug 1365100 - stylo: Fix inheritance of multiple background images. r=Manishearth

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

<!-- 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/16896)
<!-- Reviewable:end -->
2017-05-16 16:13:43 -05:00
Matt Brubeck
c8262ba99f Bug 1365100 - stylo: Fix inheritance of multiple background images. 2017-05-16 12:53:36 -07:00
Boris Zbarsky
a03c0233c6 Fix the two-value form of text-overflow to work in stylo 2017-05-16 13:04:52 -04:00
Dzmitry Malyshau
d04a64394e Using TransformStyle::Preserve3D 2017-05-16 11:08:32 -04:00
Xidorn Quan
ff1ac8346f Make stylo use counter-style for list-style-type and counter functions. 2017-05-16 14:42:48 +10:00
Xidorn Quan
0667287bf6 Relax the requirement of Atom::with. 2017-05-16 14:42:45 +10:00
bors-servo
5403c2fff0 Auto merge of #16864 - CJKu:bug-1364273, r=heycam
Stylo: Change mask-repeat initial value from no-repeat to repeat.

<!-- Please describe your changes on the following line: -->
Change mask-repeat initial value from no-repeat to repeat.

Gecko bug link:
https://bugzilla.mozilla.org/show_bug.cgi?id=1364273
---
<!-- 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/16864)
<!-- Reviewable:end -->
2017-05-15 19:42:57 -05:00
cku
f9b370719d Stylo: Pass style list's image_value to gecko. 2017-05-16 02:34:16 +08:00
cku
ff5043c8b5 Stylo: Pass cursor's image_value to gecko. 2017-05-16 01:42:33 +08:00
cku
c04195f79e Stylo: Pass content's image_value to gecko. 2017-05-16 01:42:32 +08:00
cku
2fe55e82d3 Stylo: Let SpecifiedUrl be able to carry ImageValue. 2017-05-16 01:42:30 +08:00
bors-servo
eb7314b412 Auto merge of #16859 - nox:gradients, r=emilio
Rewrite style images with a good dose of generics 💉

<!-- 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/16859)
<!-- Reviewable:end -->
2017-05-15 09:13:38 -05:00
Anthony Ramine
ea4e7299d4 Implement -webkit-gradient() (fixes #16542) 2017-05-15 15:36:26 +02:00
Anthony Ramine
73f77e0a53 Rename LayerImage to ImageLayer and make it a type alias 2017-05-15 15:36:21 +02:00
cku
373307f9c2 Stylo: Change mask-repeat initial value from no-repeat to repeat. 2017-05-15 21:01:29 +08:00
Brian Birtles
49bc7b9e69 Add add() method to Animatable interface 2017-05-15 12:53:14 +09:00
Brian Birtles
2f07b29296 Rewrite interpolate() in terms of a more general add_weighted() function
Generalizing the procedure like this will allow us to re-use it for addition of
most types.
2017-05-15 12:26:21 +09:00
bors-servo
8366b4d4f9 Auto merge of #16855 - emilio:rem-root, r=upsuper
style: Set root font-size right after cascading font-size

This way rem in the root element works as expected.

This fixes layout/reftests/css-valuesandunits/unit-rem-root-width.html 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/16855)
<!-- Reviewable:end -->
2017-05-14 18:53:28 -05:00
Nazım Can Altınova
85fb3efd76
stylo: -moz-image-region shouldn't parse unitless lengths in quirks mode 2017-05-14 21:01:46 +03:00
Emilio Cobos Álvarez
51166375c6
style: Set root font-size right after cascading font-size
This way rem in the root element works as expected.

This fixes layout/reftests/css-valuesandunits/unit-rem-root-width.html in Gecko.
2017-05-14 16:27:12 +02:00
bors-servo
dab2df3565 Auto merge of #16853 - upsuper:font-feature-settings-serialization, r=emilio
Fix serialization of font-feature-settings

<!-- 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/16853)
<!-- Reviewable:end -->
2017-05-13 23:56:25 -05:00
Xidorn Quan
7d37804eac Fix serialization of font-feature-settings 2017-05-14 10:52:28 +10:00
Hiroyuki Ikezoe
b6b3187efa Make ParsingMode bitflags.
assert_parsing_mode_match() is mostly the same as
assert_restyle_hints_match().
2017-05-14 07:15:19 +09:00
Hiroyuki Ikezoe
fcc50ea421 Rename LengthParsingMode to ParsingMode and LengthParsingMode::SVG to PasingMode::AllowUnitlessLength.
We need another flag that represents allow-negative-number for SMIL, so
this enum will also comprise the another parsing mode that allows negative number.
2017-05-14 07:15:19 +09:00
bors-servo
4613c0382a Auto merge of #16829 - hiikezoe:disallow-negative-duration, r=emilio
Disallow negative duration for animation and transition

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

<!-- Either: -->
- [X] There are tests for these changes written by @simon-whitehead . Thank you!

<!-- 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/16829)
<!-- Reviewable:end -->
2017-05-13 15:12:15 -05:00
Hiroyuki Ikezoe
285da1b621 Add clear method for LonghandIdSet. 2017-05-14 03:58:26 +09:00
Simon Sapin
dd38c0969d Fix illegal_floating_point_literal_pattern again and rustup…
… to compiler that has it, to avoid regressing again.
2017-05-13 14:23:25 +02:00
Xidorn Quan
5b4f0686c7 Make font-feature-settings a subprop of font 2017-05-13 17:26:23 +10:00
bors-servo
29f5b226ac Auto merge of #16824 - Manishearth:font-size-generic-changed, r=heycam
Recalculate font-size when generic changes

With the MathML refactorings this feature got lost. It would still get
recalculated when explicitly specified as a keyword, but not otherwise.

To avoid hitting the font metrics provider too often, we only do this
when the generic changes. Otherwise we trust the existing calculated
font.

I swear, once Stylo lands I'm going to campaign to remove font-size from CSS entirely. 😩

<!-- 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/16824)
<!-- Reviewable:end -->
2017-05-12 23:59:25 -05:00
Manish Goregaokar
b1482437b1 Recalculate font-size when generic changes
With the MathML refactorings this feature got lost. It would still get
recalculated when explicitly specified as a keyword, but not otherwise.

To avoid hitting the font metrics provider too often, we only do this
when the generic changes. Otherwise we trust the existing calculated
font.
2017-05-12 20:44:30 -07:00
Hiroyuki Ikezoe
130a08f0b5 Disallow negative duration for animation and transition. 2017-05-13 11:17:46 +09:00
Manish Goregaokar
f80690fa41 font-variant-caps should accept all-small-caps and all-petite-caps 2017-05-11 15:00:55 -07:00
bors-servo
48b5e5ebc4 Auto merge of #16805 - brisad:master, r=Wafflespeanut
Make no_viewport_percentage! use an absolute path for HasViewportPerc…

…entage

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

<!-- Either: -->
- [X] These changes do not require tests because the compiler warnings should be enough

<!-- 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/16805)
<!-- Reviewable:end -->
2017-05-11 07:30:30 -05:00
Michael Brennan
f7459fd848 Make no_viewport_percentage! use an absolute path for HasViewportPercentage 2017-05-11 14:24:03 +02:00
bors-servo
15f3db5abf Auto merge of #16794 - emilio:table-text-fixup, r=Manishearth
style: Adjust text-align properly for -moz- values in tables.

Fixes bug 1363576.

<!-- 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/16794)
<!-- Reviewable:end -->
2017-05-10 17:24:57 -05:00
Anthony Ramine
70ec61cf01 Refactor Position
A specified position is now a struct made of two values of different types,
the first one being PositionComponent<X>, and the second one PositionComponent<Y>.

A position component is represented by the new enum PositionComponent<Side>,
with the three values Center, Length(LengthOrPercentage), and
Side(Side, Option<LengthOrPercentage>).

Side keywords are represented by the X and Y enums, which don't include a value
for the center keyword anymore. They are accompanied by the Side trait, which
allows us to determine whether a side keyword is "left" or "top".

This refactor simplified the parsing and serialisation code and exposed bugs in it,
where it would reject valid <position> values followed by arbitrary tokens,
and where it would fail to prefer "left" to "right" when serialising positions
in basic shapes.
2017-05-10 16:56:01 +02:00
Emilio Cobos Álvarez
3ec2b4f486
style: Adjust text-align properly for -moz- values in tables.
Fixes bug 1363576.

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-10 12:59:14 +02:00
bors-servo
0040160b38 Auto merge of #16792 - birtles:make-animatable-trait, r=hiro
Combine ComputeDuration and Interpolate into a single trait

Pull request for [Gecko bug 1363573](https://bugzilla.mozilla.org/show_bug.cgi?id=1363573)

The pull request has been reviewed by @hiikezoe

---
- [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 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/16792)
<!-- Reviewable:end -->
2017-05-10 02:05:43 -05:00
Brian Birtles
6dfc1d1aa8 Merge ComputeDistance trait into Animatable trait 2017-05-10 14:41:26 +09:00
Xidorn Quan
512c2e9d88 Fix serialization of counters function. 2017-05-10 14:38:32 +10:00
Brian Birtles
4d25e87ac6 Rename the Interpolate trait to Animatable 2017-05-10 13:38:06 +09:00
Jeremy Chen
1c8e6eb30c stylo: Fix the serialization of image-orientation property. r=heycam
Gecko bug: Bug 1363295
2017-05-09 23:01:44 +08:00