Commit graph

12490 commits

Author SHA1 Message Date
bors-servo
c025a794dd Auto merge of #15749 - glennw:update-wr-tiling, r=nox
Update WR (image tiling, inset box shadow fixes, new key api).

<!-- 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/15749)
<!-- Reviewable:end -->
2017-02-26 15:22:25 -08:00
Glenn Watson
64a9a45b2a Update WR (image tiling, inset box shadow fixes, new key api). 2017-02-27 08:54:28 +10:00
Simon Sapin
7c5ac06cd2 Merge pull request #15745 from servo/hoist
Cascade: skip duplicated properties before rather than after a virtual call
2017-02-26 23:09:44 +01:00
Simon Sapin
d007eef5c7 Remove some accessors for public fields.
(Maybe they date from this was a trait?)
2017-02-26 19:24:51 +01:00
Simon Sapin
e0c63efe01 Remove/don’t call no-op compute_font_hash method for stylo.
This removes a potentially-costly Arc::mut call.
2017-02-26 19:24:51 +01:00
Simon Sapin
4ad844f7bd Rename PropertyBitField to LonghandIdSet 2017-02-26 19:24:50 +01:00
Simon Sapin
c81ebca7df Move PropertyBitField out of its module 2017-02-26 19:02:55 +01:00
Simon Sapin
16a34ef6b6 Remove PropertyBitField::{get,set}_* methods 2017-02-26 19:02:54 +01:00
Simon Sapin
958c33a95f Remove unnecessary ref in some patterns 2017-02-26 19:02:54 +01:00
Simon Sapin
86562992da Cascade: skip duplicated properties before rather than after a virtual call. 2017-02-26 19:02:53 +01:00
Simon Sapin
0b4877590f Move deduplicate_property_declarations to PropertyDeclaration::deduplicate 2017-02-26 19:02:51 +01:00
Simon Sapin
066c5a01b2 Rewrite deduplicate_property_declarations to not require Mako. 2017-02-26 19:02:51 +01:00
bors-servo
261df34ced Auto merge of #15649 - zimio:issue-15591-rewrite-ban-type-lint, r=Wafflespeanut
Rewrite the ban-type lint in Python

<!-- Please describe your changes on the following line: -->
Rewrite the ban-type lint in Python.

Question: Should the old ban-type lint written in rust be deleted?

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

<!-- 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/15649)
<!-- Reviewable:end -->
2017-02-26 09:35:12 -08:00
Anthony Ramine
4eac29f100 Update ws to 0.6
This is exactly the same as 0.5.4, but without a semver violation.
2017-02-26 15:24:43 +01: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
Simon Sapin
0f2d000a23 Borrow input to match_ignore_ascii_case!
In cssparser version 0.11, this macro will stop implicitly borrowing its
own input.
2017-02-26 10:40:09 +01:00
Simon Sapin
4fa3e8e82c Replace 1-variant match_ignore_ascii_case! with expect_ident_matching 2017-02-26 10:39:10 +01:00
Simon Sapin
ba6d791ff5 Define keyword values in ASCII lowercase
The match_ignore_ascii_case! macro does ASCII-case-insensitive matching.
In cssparser verion 0.11, it will require its patterns to be already
lower case.
2017-02-26 10:38:07 +01:00
Manish Goregaokar
3721b8b6a9 Disallow keyword values in min/max-size properties in the block direction 2017-02-25 23:26:21 -08:00
bors-servo
eb281531f8 Auto merge of #15730 - emilio:adjust-float, r=SimonSapin
style: Adjust float if the element is positioned per CSS 2.1 section 9.7

We've found crashes related to this in Gecko.

r? @simonsapin or @heycam

<!-- 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/15730)
<!-- Reviewable:end -->
2017-02-25 12:23:36 -08: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
Jefry Lagrange
ebcb15d6f2 Rewrite the ban-type lint in Python
Delete old rust ban lint and move tests to python tidy

Fix ban lint regex and fix test
2017-02-25 15:56:06 +01:00
bors-servo
26de7c6bc4 Auto merge of #14740 - glasserc:extremum-length, r=Manishearth
Add support for keyword values for min-width and max-width

This is a follow-up to #14432 which got closed and can no longer be re-opened.

This PR aims to add support for keyword-values max-content, min-content, fit-content, and fill-available to the properties that use them, namely min-width, min-height, max-width, and max-height.

It's still untested because I still haven't figured out how to do that. I guess I should write or find some web page that uses these properties.

Refs #13821.

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #13821  (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/14740)
<!-- Reviewable:end -->
2017-02-24 14:08:58 -08:00
Nazım Can Altınova
d7c227f614
Fix parsing of ClipRect 2017-02-25 00:10:43 +03:00
Ethan Glasser-Camp
dd4f331603 Add support for MaxLength
This builds on the ExtremumLength type from the previous commit.
2017-02-24 15:44:49 -05:00
Emilio Cobos Álvarez
e67f5c7585
style: Adjust float if the element is positioned per CSS 2.1 section 9.7
We've found crashes related to this in Gecko.
2017-02-24 21:28:56 +01:00
bors-servo
050d9d9097 Auto merge of #15710 - canaltinova:clip, r=emilio
Implement gecko glue for clip property

<!-- Please describe your changes on the following line: -->
Implemented gecko glue for clip property.

Clip property looks slightly different in gecko. `auto` top and left values are preserved as auto in [gecko](http://searchfox.org/mozilla-central/rev/39e4b25a076c59d2e7820297d62319f167871449/layout/style/nsRuleNode.cpp#10294,10316) but converted to 0 in [servo](https://dxr.mozilla.org/servo/rev/65624dbfc28442b58145215f524eb13aeb2cadf6/components/style/values/specified/mod.rs#942). Gecko is setting `NS_STYLE_CLIP_TOP_AUTO` and `NS_STYLE_CLIP_LEFT_AUTO` flags with that information. But I tried this property in stylo build and it is working correctly like this. It looks like it doesn't change the outcome of the property.
~Do we really need to set these flags?~
Manishearth and bz said that auto and 0 values are same.

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

<!-- Either: -->
- [X] These changes do not require tests because this is stylo side change.

<!-- 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/15710)
<!-- Reviewable:end -->
2017-02-24 07:44:48 -08: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
cd803afd1e Auto merge of #15691 - servo:moz-alt-content, r=bzbarsky
Stylo: add `content: -moz-alt-content`

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

Part of https://bugzilla.mozilla.org/show_bug.cgi?id=1341642

---
<!-- 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/15691)
<!-- Reviewable:end -->
2017-02-24 05:00:24 -08:00
Nazım Can Altınova
c3da55dd74
Implement gecko glue for clip property 2017-02-24 15:17:23 +03:00
bors-servo
db3de6e8d3 Auto merge of #15722 - hiikezoe:use-computed-values, r=Manishearth
Use servo's computed values to generater keyframes

<!-- Please describe your changes on the following line: -->
This is the servo side changes for https://bugzilla.mozilla.org/show_bug.cgi?id=1338927 reviewed by @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
- [X] These changes do not require tests because it's for stylo

<!-- 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/15722)
<!-- Reviewable:end -->
2017-02-24 04:09:33 -08:00
Anthony Ramine
b2adcfb40b Test that StorageEvent's URL is empty from document.createEvent 2017-02-24 12:22:10 +01:00
Hiroyuki Ikezoe
bb3f2e9dba Drop Servo_AnimationValues_Populate. 2017-02-24 19:13:13 +09:00
Hiroyuki Ikezoe
b45e3f1011 Add RawGeckoComputedKeyframeValuesList in build_gecko.rs. 2017-02-24 19:13:04 +09:00
Hiroyuki Ikezoe
be29e8db00 Update bindings. 2017-02-24 19:12:54 +09:00
bors-servo
0e33756e8d Auto merge of #15717 - nox:cookie, r=asajeffrey
Remove rustc-serialize from cookie and url

<!-- 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/15717)
<!-- Reviewable:end -->
2017-02-24 00:14:03 -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
bors-servo
f9f55789b8 Auto merge of #15712 - nox:rustc-serialize, r=metajack
Remove rustc-serialize from style and style_traits

<!-- 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/15712)
<!-- Reviewable:end -->
2017-02-23 19:19:34 -08:00
bors-servo
3bf81c389b Auto merge of #13561 - mathieuh:request-constructor, r=jdm
Make Request throw less often (fixes #13457)

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

<!-- 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/13561)

<!-- Reviewable:end -->
2017-02-23 17:54:40 -08:00
Anthony Ramine
2efa5092da Remove rustc-serialize from url 2017-02-24 02:48:42 +01:00
Anthony Ramine
3ad540853c Remove rustc-serialize from cookie 2017-02-24 02:39:57 +01: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
Anthony Ramine
31e9d81c0f Make #[dom_struct] a proc_macro attribute 2017-02-24 01:50:51 +01: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
bors-servo
1d13e6a2df Auto merge of #15700 - glennw:zoom-wip-2, r=mbrubeck
Introduce CSSPixel as a replacement for ViewportPx and PagePx.

<!-- 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/15700)
<!-- Reviewable:end -->
2017-02-23 16:01:16 -08:00
Mathieu Hordesseaux
6f97ce826b Make Request throw less often (fixes #13457) 2017-02-23 18:55:52 -05:00
bors-servo
6c9e94b1c0 Auto merge of #15697 - glennw:border-image, r=jdm,pcwalton
Add support for most of the border-image properties, pass to WR.

This adds support for:
 * border-image (images, not gradients yet)
 * border-image-source
 * border-image-slice
 * border-image-repeat (stretch + repeat only for now)

Remaining work:
 * Connect border-image-outset (WR supports this).
 * border-image-width

<!-- 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/15697)
<!-- Reviewable:end -->
2017-02-23 13:40:40 -08:00
Ethan Glasser-Camp
76de979231 Implement a MinLength type
Implement an ExtremumLength type which contains all the enumerated
keyword values for min-width, min-height, max-width, and
max-height. Then, implement a MinLength which can be used for min-width
and min-height. So far this just maps to Gecko values.

Refs #13821.
2017-02-23 16:28:26 -05:00