Commit graph

783 commits

Author SHA1 Message Date
Daisuke Akatsuka
d8dcc52c9a implements nsStyleImageRequest type properties animatable 2017-07-05 13:11:58 +09:00
Daisuke Akatsuka
d885747a18 implements nsStyleImage type properties animatable 2017-07-05 13:10:58 +09:00
Daisuke Akatsuka
4924a4832f implements URLValue type properties animatable 2017-07-05 13:08:12 +09:00
Daisuke Akatsuka
b3def4a84e implements u8 and array type properties animatable 2017-07-05 13:07:22 +09:00
Daisuke Akatsuka
961bdee6a3 implements nsFont type properties animatable 2017-07-05 13:07:20 +09:00
Daisuke Akatsuka
699ec02e8b implements nsStyleBorder type properties animatable 2017-07-05 13:07:08 +09:00
Daisuke Akatsuka
0555977c66 implements nsStyleQuoteValues type properties animatable 2017-07-05 13:00:02 +09:00
Daisuke Akatsuka
7d1374e019 implements nsStyleTextOverflow type properties animatable 2017-07-05 12:59:12 +09:00
Daisuke Akatsuka
6316b7aeb8 implements nsStyleCounterData type properties animatable 2017-07-05 12:58:10 +09:00
Daisuke Akatsuka
a155a6341d implements nsStyleSides type properties animatable 2017-07-05 12:57:30 +09:00
Daisuke Akatsuka
34980689a7 implements nsStyleGridLine type properties animatable 2017-07-05 12:55:51 +09:00
Daisuke Akatsuka
983361eb0f implements nsStyleCoord type properties animatable 2017-07-05 12:54:45 +09:00
Manish Goregaokar
6c94ace6e5 Revert "style: Cleanup duplicated code in the definition of ComputedValues."
This reverts commit 1c2fcb16ca.
2017-07-03 21:48:12 -07:00
bors-servo
7a71035793 Auto merge of #17268 - servo:grid, r=wafflespeanut,canaltinova
Add support for subgrids and fix some other grid properties

This covers the `subgrid <line-name-lists>?` for `grid-template` (for gecko, and hence, 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/17268)
<!-- Reviewable:end -->
2017-07-03 17:10:25 -07:00
Ravi Shankar
9d9d99ec25 Switch to GridTemplateComponent for subgrid line names 2017-07-03 17:08:00 -07:00
Nazım Can Altınova
5d0f7f10e0 stylo: Fix font-variant-alternates property 2017-06-29 13:33:38 -07:00
bors-servo
9d1b26de1f Auto merge of #17549 - KuoE0:make-moz-context-properties-support-fill-opacity-and-stroke-opacity, r=heycam
Make '-moz-context-properties' support 'fill-opacity' and 'stroke-opacity'.

Enable 'fill-opacity' and 'stroke-opacity' for '-moz-context-properties' to make the context-{fill|stroke}-opacity work in SVG-as-an-image.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because the test cases will be added 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/17549)
<!-- Reviewable:end -->
2017-06-28 13:01:32 -07:00
KuoE0
2063f2217e Bug 1373159 - [servo] Make '-moz-context-properties' support 'fill-opacity' and 'stroke-opacity'.
MozReview-Commit-ID: Buzlxfwpr6h
2017-06-28 10:45:15 -07:00
Anthony Ramine
201d7e79e7 Make text-shadow and box-shadow use SimpleShadow 2017-06-28 16:28:25 +02:00
Anthony Ramine
395f6be0a6 Use the Separator trait for the filter property 2017-06-27 23:40:16 +02:00
Emilio Cobos Álvarez
1c2fcb16ca
style: Cleanup duplicated code in the definition of ComputedValues. 2017-06-26 15:52:43 -07:00
Emilio Cobos Álvarez
5c7632f4c4
style: Add some flags to the computed values.
This will allow us to fix propagation of text-decoration, and also to implement
inlinization of ruby kids.

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-06-26 15:52:42 -07:00
Anthony Ramine
ae1c890c9e Rename DropShadow to SimpleShadow 2017-06-23 16:25:50 +02:00
J. Ryan Stinnett
2b5c56e6a8 Move match and cascade temporaries to CurrentElementInfo
Before this change, the `ComputedStyle` struct that is part of permanent style
data per element holds 2 `StrongRuleNode`s (unvisited and visited) and 2
`Arc<ComputedValues>` (unvisited and visited).

Both rule nodes and the visited values don't actually need to be here.  This
patch moves these 3 to new temporary storage in `CascadeInputs` on
`CurrentElementInfo` during the match and cascade process.  Rule nodes are
pushed down inside the `ComputedValues` for later access after the cascade.
(Visited values were already available there.)

The permanent style data per element now has just the `Arc<ComputedValues>` for
itself and eager pseudo-elements (plus the `RestyleHint`).

MozReview-Commit-ID: 3wq52ERMpdi
2017-06-22 15:47:32 -05:00
Emilio Cobos Álvarez
6fefe522a3
style: Assert we never style a root element from another document.
Right now when calling getComputedStyle with an element from another document,
we return the style using the pres context of that document, not of the document
of the window getComputedStyle was called on, so this holds.

But it will stop holding if we ever change this, so assert it doesn't happen.

Bug: 1374062
Reviewed-By: Manishearth
MozReview-Commit-ID: 3g8yQWWdsen
2017-06-21 19:55:02 +02:00
Anthony Ramine
6f4061d4ad Use generics for the filter property
This introduces an additional shadow type for drop-shadow().
2017-06-20 13:48:53 +02:00
Ravi Shankar
c145dd7b0c Cleanup some old code 2017-06-18 21:18:43 -07:00
Mantaroh Yoshinaga
87e580a33d Make filter property animatable. 2017-06-19 09:47:26 +09:00
Anthony Ramine
608e7f71a2 Make computed types hold Percentage instead of bare CSSFloat 2017-06-15 16:59:03 +02:00
Anthony Ramine
9f03553ed5 Use CustomIdent in GridLine 2017-06-15 14:15:19 +02:00
Anthony Ramine
51a4481388 Use CustomIdent for transition-property 2017-06-15 13:03:23 +02:00
Anthony Ramine
cdcc8157c6 Use CustomIdent in will-change 2017-06-15 13:00:59 +02:00
Xidorn Quan
08c12062c7 Resolve counter style during parallel traversal when possible. 2017-06-14 20:05:38 +10:00
bors-servo
ff17af064b Auto merge of #17262 - Manishearth:bindings, r=Manishearth
Update bindings for StyleImageLayerRepeat

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

<!-- 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/17262)
<!-- Reviewable:end -->
2017-06-09 15:56:10 -07:00
Manish Goregaokar
fd0ac4f31e Update bindings for StyleImageLayerRepeat 2017-06-09 13:26:16 -07:00
bors-servo
88b47b0154 Auto merge of #17253 - dadaa:bug1368610, r=hiikezoe,nox,emilio
Bug1368610 - stylo: implement primitive (bit, uXX) type of discrete animatable properties

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

---
<!-- 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. The tests will land in dom/animation/test of m-c. Test code is patch 6 of https://bugzilla.mozilla.org/show_bug.cgi?id=1368610

<!-- 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/17253)
<!-- Reviewable:end -->
2017-06-09 10:01:35 -07:00
Daisuke Akatsuka
a3d2b67cd5 Implements properties that need to change only the animation type animatable 2017-06-09 23:47:07 +09:00
Daisuke Akatsuka
367c0a4b43 Implements numeric field type properties animatable 2017-06-09 23:46:51 +09:00
Daisuke Akatsuka
9751fb9358 Implements other bit type properties animatable 2017-06-09 23:46:37 +09:00
Daisuke Akatsuka
f358ec069c Implements gecko keyword bit type properties animatable 2017-06-09 23:46:28 +09:00
Daisuke Akatsuka
21b7b256c2 Implements bitflags properties animatable 2017-06-09 23:46:11 +09:00
bors-servo
1555f0fc41 Auto merge of #17215 - servo:derive-all-the-things, r=emilio
Derive more ToCss impls

<!-- 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/17215)
<!-- Reviewable:end -->
2017-06-09 05:00:45 -07:00
bors-servo
e386e42481 Auto merge of #17223 - BorisChiou:stylo/animation/tab_size, r=hiro,Manishearth
stylo: Make -moz-{tab-size, box-flex, image-region, outline-radius} animatable.

Make -moz-tab-size, -moz-box-flex, -moz-image-region, and -moz-outline-radius animatable, so test_transitions_per_property.html doesn't get any exception of these properties.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix Bug 1370803, Bug 1370808, Bug 1370845, and Bug 1370846.
- [X] These changes do not require tests because we have test in Gecko side already.

<!-- 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/17223)
<!-- Reviewable:end -->
2017-06-08 20:00:24 -07:00
Boris Chiou
5c915bd4ae Make -moz-outline-radius-{*} animatable. 2017-06-09 10:50:27 +08:00
Boris Chiou
e517d21de8 Set zero to mImageRegion.{height,width} if {bottom,right} is auto.
Let's follow how Gecko does for this part (in nsRuleNode::ComputeListData).
We set mImageRegion.height or mImageRegion.width to zero if bottom or right is
None (i.e. auto).
2017-06-09 00:35:43 +08:00
Boris Chiou
4e78755303 Make -moz-image-region animatable. 2017-06-09 00:35:28 +08:00
Boris Chiou
f34b9e2317 Make -moz-tab-size animatable. 2017-06-08 22:46:16 +08:00
Anthony Ramine
d55d726a21 Derive ToCss for cursor keywords 2017-06-08 11:20:40 +02:00
Xidorn Quan
5c643adb98 Simplify caret-color conversion. 2017-06-08 12:59:28 +10:00
Xidorn Quan
742c45f859 Remove complex_color parameter. 2017-06-08 12:59:24 +10:00