Commit graph

16155 commits

Author SHA1 Message Date
Manish Goregaokar
709912bcd3 Rollup merge of #17013 - mbrubeck:stylo, r=emilio
Bug 1363639 - stylo: Make interpolation of rect() match Gecko

<!-- 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/17013)
<!-- Reviewable:end -->
2017-05-24 11:59:27 -07:00
Manish Goregaokar
c5b47f769e Rollup merge of #17010 - CJKu:bug-1348490, r=emilio
Stylo: match both ::placehoder & ::moz-placeholder for placeholder ps…

<!-- Please describe your changes on the following line: -->
The first patch of "Bug 1348490 - stylo: need support for ::-moz-placeholder pseudo element"

Part 2 need to be landed immediately after Part 1 be merged into servo repo:
https://reviewboard.mozilla.org/r/141264/diff/9#index_header

Bugzilla link:
https://bugzilla.mozilla.org/show_bug.cgi?id=1348490
---
<!-- 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 _____

<!-- 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/17010)
<!-- Reviewable:end -->
2017-05-24 11:59:25 -07:00
Manish Goregaokar
b34f1c8aa9 Rollup merge of #17000 - upsuper:webkit-media-feature, r=emilio
Add -webkit-prefix for serialization when necessary

<!-- 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/17000)
<!-- Reviewable:end -->
2017-05-24 11:59:24 -07:00
Manish Goregaokar
34b0eefff7 Rollup merge of #16993 - emilio:moz-placeholder, r=heycam
stylo: Parse but never match :-moz-placeholder as a pseudo-class.

Fixes bug 1366709.

<!-- 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/16993)
<!-- Reviewable:end -->
2017-05-24 11:59:23 -07:00
bors-servo
bb310efbb9 Auto merge of #17015 - glennw:fix-batching, r=jdm
Fix the -Z wr-no-batch option.

The DebugOpts struct uses the Default trait to set all the values
to false initialily. So bools in the DebugOpts struct must be
negative verbs to work correctly.

This drops the draw call count on HN from ~2000 back to ~5.

<!-- 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/17015)
<!-- Reviewable:end -->
2017-05-24 09:21:07 -05:00
Ravi Shankar
101e09e560 Add shorthand parsing and serialization for grid 2017-05-24 19:46:03 +05:30
Ravi Shankar
7b68d8d8bf Add shorthand parsing/serialization for grid-template 2017-05-24 19:45:34 +05:30
Bobby Holley
47fd83da57 Add a fast path for eq_ignore_ascii_case. 2017-05-24 15:48:43 +02:00
Malo Jaffré
f867d6b66d Don't use mem::transmute in from_gecko-weight
Fixes #16966.
2017-05-24 15:04:10 +02:00
bors-servo
df9286d67c Auto merge of #16974 - emilio:rule-tree-cleanup, r=heycam
style: Minor cleanups in the rule tree code.

<!-- 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/16974)
<!-- Reviewable:end -->
2017-05-24 07:12:25 -05:00
Xidorn Quan
7d48c9fa90 Only allow color value at the last element. 2017-05-24 21:53:52 +10:00
Xidorn Quan
766feec4c0 Reject "text" value in background shorthand. 2017-05-24 20:27:18 +10:00
bors-servo
98edf5d54d Auto merge of #17004 - nox:rollup, r=nox
Rollup of 7 pull requests

- Successful merges: #16885, #16886, #16932, #16939, #16948, #16986, #16995
- Failed merges:

<!-- 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/17004)
<!-- Reviewable:end -->
2017-05-24 04:26:19 -05:00
bors-servo
b4cebe1920 Auto merge of #17002 - servo:derive-all-the-things, r=emilio
Introduce style::values::generics::rect ▭

<!-- 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/17002)
<!-- Reviewable:end -->
2017-05-24 02:18:01 -05:00
Behnam Esfahbod
4df0ad2bc5 [script/textinput] Fix warning: unreachable pattern
The `cfg` attribute in use resulted in two match arms for two cases on
`macos`. Since both arms had a main functionality in common, I merged
them and conditions the extra `macos` part.

```
warning: unreachable pattern
   -->
/Users/behnam/code/servo/servo/components/script/textinput.rs:696:13
    |
696 |             (None, Key::Home) => {
    |             ^^^^^^^^^^^^^^^^^
    |
    = note: #[warn(unreachable_patterns)] on by default

warning: unreachable pattern
   -->
/Users/behnam/code/servo/servo/components/script/textinput.rs:700:13
    |
700 |             (None, Key::End) => {
    |             ^^^^^^^^^^^^^^^^
    |
    = note: #[warn(unreachable_patterns)] on by default
```
2017-05-24 01:42:10 -05:00
Xidorn Quan
4a53599647 Update binding files. 2017-05-24 16:18:19 +10:00
Xidorn Quan
737733eaae Use the new struct in stylo. 2017-05-24 15:54:13 +10:00
bors-servo
7f80d9cb45 Auto merge of #17001 - birtles:accumulative-animation, r=hiro
Support accumulative animation

These are the Servo side changes for [Mozilla bug 1353202](https://bugzilla.mozilla.org/show_bug.cgi?id=1353202).

<!-- 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/17001)
<!-- Reviewable:end -->
2017-05-24 00:03:42 -05:00
Hiroyuki Ikezoe
976b3ba6e7 Don't process style attribute changes in animation-only restyle. 2017-05-24 14:00:31 +09:00
Hiroyuki Ikezoe
a921d1af22 Make replace_rules returning boolean.
We only use whether the return value is IMPORTANT_RULES_CHANGED or not, so we
can just return true if an important rules was changed in the function.
Also, we can just return false in case of animation rules changes sine for
animation we can ensure there is no importan rules.
Because of these changes, replace_rule_node does not borrow |result| so that
we can drop a scope there.
2017-05-24 14:00:17 +09:00
Glenn Watson
0235bf2c4d Fix the -Z wr-no-batch option.
The DebugOpts struct uses the Default trait to set all the values
to false initialily. So bools in the DebugOpts struct must be
negative verbs to work correctly.

This drops the draw call count on HN from ~2000 back to ~5.
2017-05-24 13:27:38 +10:00
Hiroyuki Ikezoe
fce7c2d885 Check ElementHasAnimations before trying to get animations rules.
In case of ::before and ::after element, the generated content has no
ElementHasAnimations flag, their parent has the flag.
2017-05-24 11:12:10 +09:00
Hiroyuki Ikezoe
4935d972e5 Use animation values that have been processed during animation-only restyle for normal restyle. 2017-05-24 11:11:57 +09:00
Hiroyuki Ikezoe
35e0e3aa11 Move AnimationRules into declaration_block.rs. 2017-05-24 11:11:42 +09:00
Hiroyuki Ikezoe
d30c4fe79d Use SMIL override value that has been processed during animation-only restyles for normal restyle.
In the case where we process an element which has SMIL animations in normal travesal
the SMIL styles must have been computed in animation-only restyles. So we
have only to pick the computed styles instead of recomputing it.
2017-05-24 11:11:26 +09:00
Brian Birtles
af919f4433 Add support for iteration composite modes 2017-05-24 11:08:52 +09:00
Brian Birtles
4d187524c6 Support addition of font-stretch
Although there are no specific tests for this yet if any code does try
to perform addition or accumulation with a font-stretch value it will
likely fail the bounds check in the Into trait. To avoid that this
patch provides an basic implementation of add_weighted for font-stretch
that should work correctly with portions whose sum is outside the [0.0,
1.0] range.
2017-05-24 11:08:51 +09:00
Brian Birtles
d45ee9d662 Support accumulation of transform lists 2017-05-24 11:08:50 +09:00
Brian Birtles
64b0d59d21 Define accumulate method on Animatable trait 2017-05-24 11:08:50 +09:00
Brian Birtles
2782c3391c Update bindings 2017-05-24 11:08:50 +09:00
bors-servo
f3a694a7b4 Auto merge of #16999 - bzbarsky:fix-text-overflow-handling, r=Manishearth
Fix stylo's text-overflow handling to match gecko.

A single value sets the text-overflow on the _end_ of the text, not both start and end.

<!-- 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: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/16999)
<!-- Reviewable:end -->
2017-05-23 20:39:24 -05:00
Matt Brubeck
a8cce41ba9 Bug 1363639 - stylo: Make interpolation of rect() match Gecko 2017-05-23 17:28:52 -07:00
bors-servo
96d6b30eff Auto merge of #16998 - bzbarsky:fix-contain-flags, r=emilio
The 'contain' property can affect whether a box is a fixed-pos containing block

This makes will-change:contain work correctly.

<!-- 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: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/16998)
<!-- Reviewable:end -->
2017-05-23 16:52:31 -05:00
Boris Zbarsky
9f482c1430 Fix stylo's text-overflow handling to match gecko.
A single value sets the text-overflow on the _end_ of the text, not both start and end.
2017-05-23 14:35:45 -04:00
cku
6143e95d74 Stylo: match both ::placehoder & ::moz-placeholder for placeholder pseudo-elements. 2017-05-24 00:34:52 +08:00
Ravi Shankar
7dbd17bf70 Fix parsing bugs in grid-gap and grid-line 2017-05-23 21:42:13 +05:30
bors-servo
5e58c52272 Auto merge of #17005 - emilio:backdrop-fixup, r=emilio
stylo: Fixup an embarrassing typo that has turned everything orange.

I messed up when turning the conditions the other way around in #16981.

<!-- 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/17005)
<!-- Reviewable:end -->
2017-05-23 10:50:13 -05:00
Emilio Cobos Álvarez
fa93d82041
style: Reject non-positive resolution values in media queries.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1366961
See: https://github.com/w3c/csswg-drafts/issues/1454
2017-05-23 15:52:48 +02:00
bors-servo
f35c7a577d Auto merge of #16990 - emilio:selector-map, r=upsuper
Remove dead code in restyle_hints submodule, and move SelectorMap to its own submodule.

<!-- 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/16990)
<!-- Reviewable:end -->
2017-05-23 08:40:37 -05:00
Emilio Cobos Álvarez
ec6d7e855d
stylo: Fixup an embarrassing typo that has turned everything orange. 2017-05-23 14:50:27 +02:00
Emilio Cobos Álvarez
e51ca0958e
style: Add a SelectorMapEntry trait. 2017-05-23 14:48:06 +02:00
Emilio Cobos Álvarez
a67e880256
style: Move SelectorMap to its own submodule. 2017-05-23 14:48:04 +02:00
Emilio Cobos Álvarez
bc8382ebe9
style: Use a FnvHashMap for ExtraStyleData, and remove unused stuff from PerDocumentStyleDataImpl. 2017-05-23 14:47:18 +02:00
Emilio Cobos Álvarez
5749886336
style: Remove dead code in restyle_hints module. 2017-05-23 14:47:16 +02:00
Anthony Ramine
078d4ed40c Use generics for border-image-slice property 2017-05-23 14:36:54 +02:00
Anthony Ramine
78e9945908 Rollup merge of #16995 - servo:selectorsup, r=emilio
Selectors 0.18 is published, bump to 0.19

<!-- 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/16995)
<!-- Reviewable:end -->
2017-05-23 14:14:19 +02:00
Anthony Ramine
ce69511935 Rollup merge of #16986 - achiwhane:master, r=emilio
Fix style issues as per #16980

Fixed spacing between variables on some lines. These changes fix #16980.

<!-- 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/16986)
<!-- Reviewable:end -->
2017-05-23 14:14:18 +02:00
Anthony Ramine
7cae54ea18 Rollup merge of #16886 - mbrubeck:doc, r=glennw
Fix markdown warning in parse_product doc comment

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because no code 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/16886)
<!-- Reviewable:end -->
2017-05-23 14:14:11 +02:00
Anthony Ramine
95fc78884c Rollup merge of #16885 - jonathanGB:master, r=jdm
Bug 1270740 - remove requestAutocomplete reference

<!-- Please describe your changes on the following line: -->
I was in charge of removing the `requestAutocomplete` feature in [mozilla-central](https://bugzilla.mozilla.org/show_bug.cgi?id=1270740), and needed to remove a reference to that feature in the **servo** comments. The change, therefore, is really trivial.

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

<!-- Either: -->
- [X] These changes do not require tests because I simply removed a comment

<!-- 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/16885)
<!-- Reviewable:end -->
2017-05-23 14:14:09 +02:00
bors-servo
84c1f904cb Auto merge of #16985 - emilio:cache, r=bholley
layout: Stop mutating the style data from layout.

This is part of #16982.

Right now we have some code that tries to cache stuff in the style data during
layout.

This code is extremely rarely executed, only for `<details>` and `<summary>`.

I think if we really really want to cache these, we should find a place in the
layout data for it.

For now, let's move it away (and all the other layout code) from mutating the
style data from layout.

<!-- 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/16985)
<!-- Reviewable:end -->
2017-05-23 06:35:16 -05:00