Commit graph

756 commits

Author SHA1 Message Date
Igor Gutorov
4ee9eb8563 style: Move cursor property out of mako 2018-01-20 19:06:29 +02:00
Emilio Cobos Álvarez
212b2f56c7
style: Make the Gecko font-size calc() code do what it means to do.
It makes no sense to pass a custom base size of zero in presence of rem, ex, or
ch units.

Bug: 1431031
Reviewed-by: Manishearth
MozReview-Commit-ID: 7ZZwRzQKREX
2018-01-18 15:11:08 +01:00
Emilio Cobos Álvarez
49535d6987
style: Cleanup a bit the calc code.
I happened to be looking at it.

MozReview-Commit-ID: Ketot34XtOX
2018-01-17 15:26:13 +01:00
Emilio Cobos Álvarez
404148c82e
style: Don't allow fallback alignment in place-content shorthand.
Bug: 1430622
Reviewed-by: xidorn,mats
MozReview-Commit-ID: sALBFJeqvr
2018-01-16 17:51:24 +01:00
bors-servo
2ff3e119fa Auto merge of #19749 - gootorov:move_-moz-context-properties_from_mako, r=emilio
style: Move -moz-context-properties outside of mako.

<!-- Please describe your changes on the following line: -->
Sub-PR of #19015

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

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

<!-- 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/19749)
<!-- Reviewable:end -->
2018-01-15 06:04:30 -06:00
bors-servo
f2036e7661 Auto merge of #19757 - emilio:bye-custom-cascade, r=nox
style: Remove -servo-text-decorations-in-effect

It is bogus, because it depends on the display property as it's cascaded, but
the display property can change afterwards, for example, if we get blockified
because we're the root element or a flex item.

Replace it with a normal field instead.

Also, it carries some weight, because it's the last property that uses this
concept of "derived" property, and "custom cascade". So we can remove some code
after this.

Compute it after the cascade process in StyleAdjuster.

<!-- 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/19757)
<!-- Reviewable:end -->
2018-01-15 05:14:49 -06:00
bors-servo
ec34023d7a Auto merge of #19766 - jonleighton:issue-19765, r=emilio
Move image-orientation property outside of mako

Fixes https://github.com/servo/servo/issues/19765

r? emilio

<!-- 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/19766)
<!-- Reviewable:end -->
2018-01-14 16:55:15 -06:00
Jon Leighton
bd55639d01 Move image-orientation property outside of mako
Fixes https://github.com/servo/servo/issues/19765
2018-01-14 21:19:12 +01:00
Emilio Cobos Álvarez
8732a1d7de
style: Remove -servo-text-decorations-in-effect.
It is bogus, because it depends on the display property as it's cascaded, but
the display property can change afterwards, for example, if we get blockified
because we're the root element or a flex item.

Replace it with a normal field instead.

Also, it carries some weight, because it's the last property that uses this
concept of "derived" property, and "custom cascade". So we can remove some code
after this.

Compute it after the cascade process in StyleAdjuster.
2018-01-14 17:10:44 +01:00
Igor Gutorov
90978c1777 Make MozContextProperties a different type 2018-01-13 22:29:52 +02:00
CYBAI
0291a75b3c style: Remove -servo-display-for-hypothetical-box from longhand 2018-01-13 20:54:50 +08:00
Igor Gutorov
c72066af2d style: Move -moz-context-properties outside of mako 2018-01-12 17:46:02 +02:00
CYBAI
2bc02bc78d style: Move paint-order outside of mako 2018-01-10 21:26:33 +08:00
lizhixun
aa1b9a25f6 style: Make Contain::parse simpler 2018-01-04 13:13:49 -08:00
lizhixun
4c23f09934 style: Move contain outside of mako 2018-01-03 23:13:56 -08:00
CYBAI
a764d9065e style: Move display outside of mako 2018-01-01 23:51:08 +08:00
CYBAI
05b014e720 style: Move touch-action outside of mako 2017-12-28 23:13:39 +08:00
Jon Leighton
53e868e203 Refactor ListStyleType 2017-12-23 21:24:46 +01:00
Jon Leighton
214b423bbd Move list-style-type outside of mako
Closes issue #19629
2017-12-23 13:01:30 +01:00
bors-servo
a9c17970c1 Auto merge of #19576 - canaltinova:text-align, r=Manishearth,emilio
style: Move text-align outside of the mako file.

I will need this refactoring before my next job. I didn't actually fix the FIXME's along the way. My other PR probably will cover these.

---
- [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/19576)
<!-- Reviewable:end -->
2017-12-18 12:12:52 -06:00
Nazım Can Altınova
9882d0bae5 style: Move text-align outside of the mako file. 2017-12-18 11:58:06 -06:00
CYBAI
2eb396613b
style: Move will-change outside of mako 2017-12-16 21:47:59 +01:00
Emilio Cobos Álvarez
8fbdbc8f95
style: Use derive(Parse) for X and Y. 2017-12-15 20:15:32 +01:00
Emilio Cobos Álvarez
4abd1dc819
style: Use derive(Parse) for RepeatKeyword. 2017-12-15 20:15:31 +01:00
Felipe Nakandakari
eb88a298f6 style: move list-style-image out of mako
cleaner way to set boxed param

redefine get_initial_value to none

make parse method clearer

remove some extra lines
2017-12-15 16:23:53 +11:00
Emilio Cobos Álvarez
03f3521216
style: Use more Box<[]> and Box<str> for quotes. 2017-12-14 04:05:25 +01:00
Connor Brewster
16f627a18a
style: Move list quotes out of mako 2017-12-14 03:43:10 +01:00
CYBAI
b9b91b33be style: Move outline-style outside of mako 2017-12-13 11:41:59 +08:00
Emilio Cobos Álvarez
af879523ea
style: Make all keywords CamelCase for consistency.
This prevents confusion and paves the ground for derive(Parse) of them.
2017-12-06 02:35:10 +01:00
Nazım Can Altınova
1c48a3bedb stylo: Hide accidentally exposed subgrid behind prefs 2017-12-06 00:05:26 +03:00
Emilio Cobos Álvarez
35d0e7cf0f
style: use the same type for overflow-clip-box longhands.
Needed to add the hacky padding_box scheme, will fix it up later.
2017-12-05 19:00:14 +01:00
Emilio Cobos Álvarez
23d69ea77d
style: Support calc() in color functions. 2017-12-05 10:06:24 +01:00
Emilio Cobos Álvarez
e91c9ec7fe
style: Formatting nits in color parsing. 2017-12-05 10:01:37 +01:00
bors-servo
e4dba3abef Auto merge of #19462 - emilio:angle-parsing, r=nox
style: Cleanup Angle parsing.

This PR also contains a functional change, allowing to parse unitless zero angles in hue-rotate().

See the links and the comments for why.

<!-- 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/19462)
<!-- Reviewable:end -->
2017-12-03 09:14:59 -06:00
Emilio Cobos Álvarez
93fc9ab63a
style: Remove free parsing functions, use Integer::parse and Number::parse instead. 2017-12-02 16:15:11 +01:00
Emilio Cobos Álvarez
3631b1e197
style: Deduplicate Angle parsing code. 2017-12-02 15:39:06 +01:00
Emilio Cobos Álvarez
55439e6222
style: Allow parsing unitless zero angles in hue-rotate().
Per https://github.com/w3c/fxtf-drafts/issues/228
2017-12-02 15:39:05 +01:00
Emilio Cobos Álvarez
25ae329156
style: Formatting nits in gradient parsing. 2017-12-02 15:20:01 +01:00
Emilio Cobos Álvarez
848a8581ac
style: Don't waste an allocation when failing to parse a color.
I see that allocation show up in the profiles, and it makes sense, because
system colors and such are common in Firefox, and they're just wasting it.

Note that the clone() added is refcounted.
2017-12-01 20:55:24 +01:00
bors-servo
fa3f3896d3 Auto merge of #19412 - CYBAI:grid-template-areas-out-of-mako, r=emilio
style: Move grid-template-areas outside of mako

This is a sub-PR of #19015
r? emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19409
- [x] These changes do not require tests

<!-- 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/19412)
<!-- Reviewable:end -->
2017-11-29 15:24:33 -06:00
CYBAI
003ddfc945 style: Move grid-template-areas outside of mako 2017-11-29 22:36:55 +08:00
Ting-Yu Lin
923ffcf2cc style: Support shape-image: <image>
MozReview-Commit-ID: GSCZIMEpCS2
2017-11-29 11:27:31 +08:00
bors-servo
66d0a41127 Auto merge of #19378 - CYBAI:grid-auto-flow-out-of-mako, r=emilio
style: Move grid-auto-flow outside of mako

This is a sub-PR of #19015
r? emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19375
- [x] These changes do not require tests

<!-- 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/19378)
<!-- Reviewable:end -->
2017-11-28 05:16:49 -06:00
Boris Chiou
3a38e815ec Implement Servo_ParseTransformIntoMatrix.
DOMMatrix needs to convert a specified transform list into a matrix, so
we could rewrite to_transform_3d_matrix by generics for both specified
and computed transform lists.

Besides, we have to update the test case because we use Transform3D<f64> to
compute the matrix, instead of Transform3D<f32>, so the result will be
the same as that in Gecko. Using 0.3 may cause floating point issue
because (0.3f32 as f64) is not equal to 0.3 (i.e. floating point precision
issue), so using 0.25 instead.
2017-11-28 10:08:12 +08:00
CYBAI
09321bfb68 style: Move grid-auto-flow outside of mako 2017-11-26 23:51:02 +08:00
Gecko Backout
9651a5572e Backed out changeset 1fdcd69d2524 for Build Bustage. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/19376
2017-11-26 11:00:42 +00:00
Ting-Yu Lin
f3dbaad222 style: Support shape-image: <image>
MozReview-Commit-ID: GSCZIMEpCS2
2017-11-26 17:07:52 +08:00
bors-servo
8f61fde390 Auto merge of #19366 - CYBAI:font-family-out-of-mako, r=emilio
style: Move font-family outside of mako

This is a sub-PR of #19015
Besides, this is the last PR for `font.mako.rs`! 🎉
r? emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19355
- [x] These changes do not require tests

<!-- 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/19366)
<!-- Reviewable:end -->
2017-11-25 13:06:31 -06:00
CYBAI
a470ebd501 style: Move font-family outside of mako 2017-11-26 00:36:00 +08:00
Botond Ballo
5e2622f259 Bug 951793 - Style support for overscroll-behavior in Stylo. r=emilio 2017-11-24 16:48:04 -05:00