Commit graph

1201 commits

Author SHA1 Message Date
Ms2ger
c1e8beacdc Remove unused content-blocker dependency from unit tests. 2017-03-09 10:29:34 +01:00
bors-servo
dc3b32c853 Auto merge of #15861 - projektir:make-text-decoration-testable, r=Wafflespeanut
Make text decoration testable and do not serialize initial text-decoration-style

Servo now uses the same name for the text-decoration-line longhand property as Gecko. This was done to enable testing of the text-decoration shorthand.

The text-decoration shorthand has been fixed to not serialize initial text-decoration-style.

---

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

---

- [x ] There are tests for these changes

<!-- 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/15861)
<!-- Reviewable:end -->
2017-03-08 21:39:30 -08:00
projektir
b4c50de31e Don't serialize initial text-decoration-style #15790 2017-03-09 00:33:17 -05:00
Emilio Cobos Álvarez
20d0e71232
style: Add a test for other valid uses of calc() 2017-03-08 16:54:30 +01:00
bors-servo
c11d398010 Auto merge of #15866 - servo:whitespace, r=nox
Require spaces around operators in calc() (fixes #15486)

<!-- 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/15866)
<!-- Reviewable:end -->
2017-03-08 06:12:54 -08:00
Anthony Ramine
8666e82dbc Silence a warning 2017-03-08 14:32:27 +01:00
radhika2896
0138bbcdd1 Require spaces around operators in calc() (fixes #15486) 2017-03-08 14:32:25 +01:00
bors-servo
1f2e1e8b84 Auto merge of #15867 - servo:negative, r=nox
Reject negative factors in filter functions (fixes #15494)

<!-- 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/15867)
<!-- Reviewable:end -->
2017-03-08 05:28:59 -08:00
bors-servo
4fc7034370 Auto merge of #15856 - servo:dedup, r=Manishearth
Deduplicate declarations on insertion, not at the end of parsing a block

<!-- 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 #15558 (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/15856)
<!-- Reviewable:end -->
2017-03-08 03:07:04 -08:00
Jason Tran
b7edf34c8c Reject negative factors in filter functions (fixes #15494) 2017-03-08 11:54:12 +01:00
Simon Sapin
da4e5146e9 Make PropertyDeclarationBlock::important_count private. 2017-03-07 23:37:31 +01:00
Simon Sapin
7444be686c Fix a warning 2017-03-07 23:37:27 +01:00
Ms2ger
5a61d8b2ea Remove unused content blocker code.
I don't know what it is for, so I believe it would be better to remove it
entirely until and unless we start using it.
2017-03-07 10:29:27 +01:00
bors-servo
1d497857e8 Auto merge of #15836 - upsuper:animation, r=emilio,bholley
Fix animation shorthand parsing (again)

This is from [bug 1343168](https://bugzilla.mozilla.org/show_bug.cgi?id=1343168) and mostly same as #15793 which was backed out in #15814.

<!-- 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/15836)
<!-- Reviewable:end -->
2017-03-06 19:24:01 -08:00
avinash
f48f0567cf Add ServoUrl as a parameter to report_error(...) of ParseErrorReporter
passes test-tidy
removed match and used map

added new test test_report_error_passing_correct_url(...) and modified old unit tests

removed the option for servourl and tidied up

removed the duplicate test.

made a few more changes after @cbrewster suggestions.

changed _url to url in few places

fixed the indenting
2017-03-06 09:06:42 -06:00
Xidorn Quan
6b03760213 Simplify animation shorthand parsing code 2017-03-06 22:01:15 +11:00
Xidorn Quan
6273fa0305 Make animation-name parse none 2017-03-06 22:00:04 +11:00
austinprete
a2074f2653 Implement parsing/serialization for caret-color 2017-03-05 10:52:32 -07:00
bors-servo
8c4931f26f Auto merge of #15702 - shubDhond:master, r=upsuper
Invalid three value positions are no longer accepted

<!-- Please describe your changes on the following line: -->
- Position parse no longer accepts invalid three value positions

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

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

<!-- 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/15702)
<!-- Reviewable:end -->
2017-03-04 03:11:44 -08:00
Bobby Holley
3a56899201 Revert "Auto merge of #15793 - upsuper:animation, r=emilio,bholley"
This reverts commit 7cd4c69c40, reversing
changes made to 1b1fadb8b8.
2017-03-03 11:50:15 -08:00
bors-servo
1842b2e25e Auto merge of #15808 - servo:moz-user-select, r=nox,SimonSapin
Add remaining keyword values of -moz-user-select (fixes #15197)

<!-- 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/15808)
<!-- Reviewable:end -->
2017-03-03 08:17:44 -08:00
Karan Singh
3d5b607ba5 Add remaining keyword values of -moz-user-select (fixes #15197) 2017-03-03 16:13:54 +01:00
Sumant Manne
8aac575019 Implemented nosniff for fetch algorithm 2017-03-03 15:50:58 +01:00
Xidorn Quan
1bb1eeeb53 Simplify animation shorthand parsing code 2017-03-03 16:12:09 +11:00
Xidorn Quan
550c64cbf2 Make animation-name parse none 2017-03-03 16:12:06 +11:00
Xidorn Quan
2cc6593fa1 Don't serialize shorthand when some but not all of its longhands are CSS-wide keyword
Shorthand cannot represent CSS-wide keyword in individual longhands, and
thus we cannot serialize longhand with CSS-wide keyword as part of a
shorthand.
2017-03-02 11:09:05 +11:00
Xidorn Quan
03f6d21cb5 Make DeclaredValue store CSSWideKeyword
Rather than having separate variant for each CSS-wide keyword.
2017-03-02 11:09:05 +11:00
Karl
ec865c3702 Fix border shorthand serialization
Fix border shorthand serialization when sides are not identical
2017-02-28 20:27:09 -05:00
Simon Sapin
288ef97055 Update cssparser for https://github.com/servo/rust-cssparser/pull/123 2017-02-28 17:16:36 +01:00
Simon Sapin
bcd4d166ac Fix unused warning 2017-02-28 17:16:34 +01:00
Xidorn Quan
f33b0b4ea3 Have shorthand parsing functions return values
Shorthands are responsible to set all its longhands to a proper value,
rather than returning None.

Fixes #15380.
2017-02-28 15:24:08 +11:00
bors-servo
b2539090fa Auto merge of #15613 - Varentsov:master, r=upsuper
fix {transform,perspective}-origin accepts (and ignores) anything for…

… their second part of value

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

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

<!-- 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/15613)
<!-- Reviewable:end -->
2017-02-26 17:40:23 -08:00
bors-servo
3086b3d291 Auto merge of #15733 - absoludity:fix-background-serialization, r=upsuper
Background serialization of multiple values.

Similar to animation, the serialization of multiple backgrounds should
return the longhands serialization if there are an unequal number of
values for the required properties. This is part of #15398

<!-- 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
- [] These changes fix #__ (github issue number if applicable).

<!-- 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/15733)
<!-- Reviewable:end -->
2017-02-26 16:54:11 -08:00
Neck Varentsov
89f96c0848 rebase and fix tidiness lint 2017-02-26 22:52:51 +03:00
Neck Varentsov
fd6718ec15 add test test_effects_parser_exhaustion 2017-02-26 20:54:14 +03:00
Neck Varentsov
6d311c5465 add tests 2017-02-26 20:54:14 +03:00
bors-servo
94e563e4d9 Auto merge of #15735 - servo:cssparserup, r=emilio
Update cssparser to 0.11

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

<s>Depends on https://github.com/servo/rust-cssparser/pull/122.</s>

---
<!-- 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/15735)
<!-- Reviewable:end -->
2017-02-26 02:19:32 -08:00
Simon Sapin
2f996e34f5 Use ascii_case_insensitive_phf_map! in PropertyId::parse 2017-02-26 11:10:33 +01:00
Simon Sapin
33ef6f78e5 Update to cssparser 0.11 2017-02-26 11:09:53 +01:00
Michael Nelson
f5af381f19 Fixes serialization of multiple transitions.
Similar to animations and backgrounds, multiple transitions should be
serialized as a list of shorthand values only if the number of values
for each longhand property is the same. Otherwise we default to the
longhand serialization. Fixes #15398
2017-02-26 20:48:18 +11:00
Michael Nelson
3a812b02a6 Background serialization of multiple values.
Similar to animation, the serialization of multiple backgrounds should
return the longhands serialization if there are an unequal number of
values for the required properties.
2017-02-26 07:37:06 +11:00
Emilio Cobos Álvarez
6875c65d37
Bug 1341083: Implement dynamic restyling for display: contents. r=heycam
MozReview-Commit-ID: KimTU2j4V4p
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-02-25 19:58:56 +01:00
Nazım Can Altınova
d7c227f614
Fix parsing of ClipRect 2017-02-25 00:10:43 +03:00
bors-servo
a204c4176d Auto merge of #15715 - nox:custom-derive, r=SimonSapin
Make #[dom_struct] a proc_macro attribute

The rustup is needed for https://github.com/rust-lang/rust/pull/40039.

<!-- 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/15715)
<!-- Reviewable:end -->
2017-02-24 05:56:30 -08:00
bors-servo
b52288af00 Auto merge of #15685 - absoludity:fix-animation-serialization-15398-pt2, r=upsuper
Fix animation serialization 15398 pt2

Fixes animation serialization so that an animation shorthand is serialized only when the value lists have the same length (part of #15398)

There are two commits here - the first is a refactoring to update PropertyDeclarationBlock::to_css to match the spec (please see the full commit message for perhaps too many details).

The second commit utilizes the changes in the first, and updates the animation serialization itself to write an empty serialization if the longhand value lists have different lengths, as per the original issue.
Interestingly, the refactoring of the first commit simplified quite a lot more than the fix for this bug, in particular, the special case of 'overflow' shorthand serialization is handled by default, without the extra special case code (now removed).

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15398 (github issue number if applicable).
- [X] There are tests for these changes OR

<!-- 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/15685)
<!-- Reviewable:end -->
2017-02-23 20:12:30 -08:00
Michael Nelson
bcafe21dc9 Animation shorthand should be serialized only when the value lists have the same length.
Fixes #15398

The previous commit did most of the work here of updating the algorithm
to skip shorthands if a shorthand value was an empty string. This commit
just updates animations LonghandToSerialize's implementation of
to_css_declared to write an empty string value if the list lengths
differ (and updates the test to match).
2017-02-24 12:03:04 +11:00
Simon Sapin
64885c4213 Update to rustc 1.17.0-nightly (413a975e3 2017-02-23)
Fix #15704
2017-02-24 01:49:29 +01:00
Glenn Watson
30ff2f8f0d Introduce CSSPixel as a replacement for ViewportPx and PagePx. 2017-02-24 06:58:10 +10:00
bors-servo
56a99577b3 Auto merge of #15535 - froydnj:global-style-thread-pool, r=bholley
geckolib: use a global thread pool for styling

By having a single thread pool, rather than one per document, we use less memory.  This addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1324250.

This may be obvious to an experienced Rust programmer, but I went with raw pointers because trying to use `Option` global variables resulted in complaints about turning on feature flags in nightly Rust.  Since this is for stylo, nightly features are not appropriate here.

---
<!-- 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/15535)
<!-- Reviewable:end -->
2017-02-23 10:15:41 -08:00
Nathan Froyd
4a1dd9fa57 stylo-tests: update for geckolib changes 2017-02-23 12:06:45 -05:00