Commit graph

1564 commits

Author SHA1 Message Date
Nazım Can Altınova
ea507aa1d3 Implement column-rule shorthand for stylo 2016-11-30 00:52:12 +03:00
Nazım Can Altınova
a067c46e96 Implement background-blend-mode and make align-items work in stylo 2016-11-30 00:52:10 +03:00
bors-servo
4dbca055c6 Auto merge of #14383 - Razican:column-rule-style, r=Wafflespeanut
Stylo: implement column-rule-style

Implemented `column-rule-style` in stylo.

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

- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a style addition and I added the screenshot.

Screenshot:
![screenshot from 2016-11-27 21-59-38](https://cloud.githubusercontent.com/assets/597469/20652731/0a7ccbfc-b4ff-11e6-8e4c-1547897bcf25.png)

<!-- 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/14383)
<!-- Reviewable:end -->
2016-11-28 04:57:28 -08:00
bors-servo
b18ec28fa7 Auto merge of #14355 - upsuper:rulelist-mutate, r=Manishearth
Move algorithm for insertRule and deleteRule to style component

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

r? @Manishearth

---
<!-- 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 _____

<!-- 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/14355)
<!-- Reviewable:end -->
2016-11-27 15:40:19 -08:00
Razican
255d497a99 Implemented colum-rule-style 2016-11-28 00:03:20 +01:00
Ravi Shankar
dee1a65a69 Use the ParserContext along with Parser in the parse function 2016-11-27 08:49:20 +05:30
bors-servo
c4f87f451f Auto merge of #14358 - chenpighead:webkit-text-stroke, r=canaltinova
stylo - implement -webkit-text-fill-color and -webkit-text-stroke.

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

Implement -webkit-text-fill-color property.
Implement -webkit-text-stroke property, along with -webkit-text-stroke-width and -webkit-text-stroke-color longhand properties.

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

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

<!-- 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/14358)
<!-- Reviewable:end -->
2016-11-26 07:17:34 -08:00
bors-servo
a0269027db Auto merge of #14365 - canaltinova:block-important, r=emilio
Property declaration block serialization should check for importance

<!-- Please describe your changes on the following line: -->
r? @emilio , @Manishearth

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

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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/14365)
<!-- Reviewable:end -->
2016-11-26 05:09:55 -08:00
Jeremy Chen
3042747fcc stylo - implement -webkit-text-fill-color and -webkit-text-stroke. 2016-11-26 20:31:48 +08:00
Nazım Can Altınova
d4c3035659 Property declaration block serialization should check for importance 2016-11-26 14:16:33 +03:00
Gregory
84e9277771 implement support for the width media query
failing test for correct to_css of "width"

separate test for mq and to_css

implement css serialization for Eq

remove PASS test expectation

remove FIXME

simplify serialization
2016-11-26 17:31:41 +08:00
bors-servo
d98abaec20 Auto merge of #14300 - bholley:restyle_driven_traversal, r=emilio
stylo: Basic infrastructure for RestyleHint-driven traversal

Gecko Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=131701

(Don't review yet, will flag on the gecko bug when the time comes)

<!-- 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/14300)
<!-- Reviewable:end -->
2016-11-25 09:00:44 -08:00
bors-servo
67a4ecd68e Auto merge of #14357 - BorisChiou:Bug1317178, r=emilio
Use single_value_to_css in Servo_DeclarationBlock_SerializeOneValue

These are the servo-side changes for [bug 1317178](https://bugzilla.mozilla.org/show_bug.cgi?id=1317178). @Manishearth has already reviewed them there. Please merge these patches until the gecko-side changes for [bug 1317178](https://bugzilla.mozilla.org/show_bug.cgi?id=1317178) is landed.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1317178](https://bugzilla.mozilla.org/show_bug.cgi?id=1317178).
- [X] These changes do not require tests because there are existing tests for this in mozilla-central

<!-- 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/14357)
<!-- Reviewable:end -->
2016-11-25 02:39:52 -08:00
Cameron McCormack
64ff6dc103 Implement StyleSheet.disabled. 2016-11-25 11:27:51 +08:00
Bobby Holley
e65b1be07b Revert restyled_previous_sibling_element tracking, and separate child preprocessing.
I realized that I fixed this issue incorrectly when the test failed before. Our design
document specifies that restyle hints must be expanded by the parent before traversing
children, so that we can properly apply LaterSiblings restyle hints. This includes
parents that do not themselves need processing (StylingMode::Traverse).

So we need to preprocess children even in the case where we don't restyle the parent.
On the flip side, we do in fact know whether a child needs processing before enqueuing
it, so we can skip the conservative visit I added before.

MozReview-Commit-ID: AEiRzdsN0h5
2016-11-24 17:07:40 -08:00
Bobby Holley
992f7dddf4 Bug 1317016 - Basic infrastructure for RestyleHint-driven traversal.
MozReview-Commit-ID: 7wH5XcILVmX
2016-11-24 17:07:38 -08:00
Boris Chiou
bec05615d1 Bug 1317178 - Use single_value_to_css in Servo_DeclarationBlock_SerializeOneValue. r=manishearth 2016-11-25 09:00:37 +08:00
Cameron McCormack
89f064b013 Move Servo_GetStyleVariables definition from the Gecko side. 2016-11-25 08:21:00 +08:00
bors-servo
a9b0eb101f Auto merge of #14356 - heycam:nac-no-doc, r=emilio
stylo: don't match native anonymous content to user/author rules

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

This makes us skip user and document style sheets when performing the cascade for Gecko native anonymous content.  It was reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1293809 by @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/14356)
<!-- Reviewable:end -->
2016-11-23 23:32:32 -08:00
Cameron McCormack
22b62e0913 Don't match native anonymous content to user/author rules. 2016-11-24 13:00:12 +08:00
Xidorn Quan
3e7818f177 Refactor the state computation code 2016-11-24 15:44:29 +11:00
Xidorn Quan
03bcb7a26a Move "remove a CSS rule" algorithm to style 2016-11-24 15:38:40 +11:00
Xidorn Quan
134ef33842 Move "insert a CSS rule" algorithm to style
This also changes the algorithm to match w3c/csswg-drafts#754 instead of
the current cssom draft, because that makes the code simpler and matches
implementation of other browsers.
2016-11-24 15:38:40 +11:00
Xidorn Quan
3c5871f83a Add FFI for debug info of CSSStyleRule 2016-11-24 10:28:38 +11:00
Xidorn Quan
9ee2ec5a35 Add stylo FFI for CSSStyleRule.style 2016-11-24 10:28:38 +11:00
Xidorn Quan
66669e48ef Add stylo FFI for cssText getters of CSSStyleRule 2016-11-24 10:28:38 +11:00
Xidorn Quan
a9296bc89c Add stylo FFI for CSSStyleRule 2016-11-24 10:28:38 +11:00
Xidorn Quan
9d4ab0d3e9 Add stylo FFI for CSSRuleList 2016-11-24 10:28:38 +11:00
bors-servo
210b1be1d0 Auto merge of #14347 - jcdyer:cdyer/len-parsing, r=Wafflespeanut
Only allow border-image-outset to use non-negative numbers.

Restricts border-image-outline to only allow positive values.

Fixes #14295

---
<!-- 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 #14295.

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

<!-- 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/14347)
<!-- Reviewable:end -->
2016-11-23 12:30:41 -08:00
J. Cliff Dyer
46c4c9ce66 Only allow border-image-outset to use non-negative values. 2016-11-23 13:20:29 -05:00
Manish Goregaokar
95cbf1a885 Address review comments 2016-11-23 10:15:58 -08:00
Manish Goregaokar
18742e72fa Update test expectations 2016-11-23 09:32:48 -08:00
Manish Goregaokar
0e19f456bc Fixup error from #14238 2016-11-23 09:32:47 -08:00
Manish Goregaokar
8108fc465a Add CSSNamespaceRule.{namespaceURI, prefix} 2016-11-23 09:32:46 -08:00
Manish Goregaokar
64442090ba Add CSSKeyframesRule.{findRule, deleteRule, appendRule} 2016-11-23 09:32:44 -08:00
Manish Goregaokar
2793d5f0a9 Handle parser state in CSSOM insert_rule 2016-11-23 09:31:29 -08:00
Manish Goregaokar
1d20d75cb2 Add insertRule() and deleteRule() on CSSStyleSheet 2016-11-23 09:30:29 -08:00
bors-servo
a2babd6db8 Auto merge of #14316 - canaltinova:stylo-properties, r=emilio
Implement parsing/serialization and/or gecko glue for some properties

<!-- Please describe your changes on the following line: -->
The PR covers implementation and/or gecko glue for these properties:

1. Implemented parsing/serialization and gecko glue for column-rule-width, column-rule-color and column-span longhand properties (column-span is not implemented in gecko yet but I wanted to complete column properties :) )
2.  Implemented parsing/serialization and gecko glue for text-emphasis-color longhand and text-emphasis shorthand properties.
3. Implemented gecko glue for column-gap and order properties

I implemented column-rule-width and column-rule-color properties with `-moz-` prefixes, but I can remove them if it's not right.
I coudn't test them in full stylo build yet (LLVM messed up my current clang). But I'll test them soon.

r? @Manishearth or @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

<!-- Either: -->
- [X] These changes do not require tests

<!-- 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/14316)
<!-- Reviewable:end -->
2016-11-22 23:51:21 -08:00
Xidorn Quan
9ad80f280a Remove unused check_bindings 2016-11-23 15:24:40 +11:00
Nazım Can Altınova
c8c7240dc2 Implement gecko glue for column-gap and order properties 2016-11-23 01:50:55 +03:00
Nazım Can Altınova
852fdca1c5 Implement parsing/serialization of text-emphasis-color and text-emphasis 2016-11-23 01:50:53 +03:00
bors-servo
bcf4184483 Auto merge of #14296 - Wafflespeanut:either, r=emilio
Some generic impls for Either<Length, T>

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

We seem to be using `parse_non_negative` a lot for `LengthOrFoo` types, so it's better to have generic impls (now, and in the future) for such things (assuming that `Length` will always be in the first variant of `Either`).

---
<!-- 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] These changes do not require tests because it's a refactor

<!-- 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/14296)
<!-- Reviewable:end -->
2016-11-22 14:59:11 -06:00
Ravi Shankar
dc7c1c6270 Some impls for Either<A, B> 2016-11-22 22:59:03 +05:30
Simon Sapin
f044659b7c Use selectors::SelectorList 2016-11-22 14:50:23 +01:00
Simon Sapin
81a3de3299 Remove SelectorImpl aliases 2016-11-22 14:50:22 +01:00
Simon Sapin
82b13d50e3 Update to selectors 0.15 2016-11-22 14:50:21 +01:00
Shing Lyu
43002f2f07 Added stylo glue for drop-shadow filter 2016-11-22 10:53:20 +08:00
Shing Lyu
5248c5847d Implement drop-shadow CSS parser 2016-11-22 10:52:53 +08:00
bors-servo
30867001d1 Auto merge of #14232 - servo:moar-locks, r=upsuper
CSSOM: Make Stylesheet fields have their own synchronization

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

r? @upsuper

---
<!-- 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 1314208.

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

<!-- 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/14232)
<!-- Reviewable:end -->
2016-11-21 19:33:57 -06:00
Nazım Can Altınova
61431b7fd6 Implement parsing/serialization of column-rule-width, column-rule-color and column-span 2016-11-21 23:04:43 +03:00