Commit graph

25652 commits

Author SHA1 Message Date
Imanol Fernandez
e6d17f80a4 Fix WebGL premultiplied alpha. Fix texImage2D calls with RGB images. 2017-04-28 11:49:48 +02:00
Xidorn Quan
81af3be034 Update binding files. 2017-04-28 16:55:28 +08:00
Keith Yeung
2d5833d3af Fix fixed table layout column width distribution 2017-04-27 23:35:26 -07:00
Hiroyuki Ikezoe
b5bcc6e5eb Mark some tests for timing-function as FAIL.
Those test cases are apparently wrong. Keyword values (e.g. 'ease')
should not be serialized as cubic-bezier function.
https://drafts.csswg.org/css-timing/#serializing-a-timing-function

On gecko, we also mark those tests FAIL.

https://hg.mozilla.org/mozilla-central/file/2cca333f546f/testing/web-platform/meta/css/css-transitions-1/transition-001.html.ini
https://hg.mozilla.org/mozilla-central/file/2cca333f546f/testing/web-platform/meta/css/css-transitions-1/transition-timing-function-001.html.ini
2017-04-28 13:43:53 +09:00
bors-servo
f1287814db Auto merge of #16601 - servo:cargoup, r=nox
Update to cargo 0.19.0-nightly (994e552 2017-04-25)

This should be unblocked now: https://github.com/servo/servo/pull/15852#issuecomment-296379226

<!-- 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/16601)
<!-- Reviewable:end -->
2017-04-27 23:32:54 -05:00
Glenn Watson
3a30d30a9c Update WR (various bits and pieces).
* Split out positioning and clipping per display item.
* Only send scroll states for clips that actually scroll.
* NV12 texture format support.
* Make dithering a feature.
* Handle radial gradients with invalid radii.
2017-04-28 13:46:04 +10:00
bors-servo
d8bcc0db1a Auto merge of #16609 - nox:quirks, r=Manishearth,emilio
Implement unitless length quirk

The Gecko side doesn't propagate its quirks mode yet.

<!-- 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/16609)
<!-- Reviewable:end -->
2017-04-27 22:32:24 -05:00
Xidorn Quan
767e10b29d Implement CSSOM support for @supports. 2017-04-28 09:11:01 +08:00
Xidorn Quan
f19b9763cf Move GetRules function into macro. 2017-04-28 09:10:52 +08:00
bors-servo
eb975ab890 Auto merge of #16641 - emilio:dupedupedupedupe, r=bholley
Bug 1360399: Don't deduplicate revalidation selectors. r=bholley

It's unfortunate, but it's a correctness issue. I was looking at the
expectations update here:

 * 659cddddd4

And investigating it I realised that it's wrong to coalesce selectors like that,
because we keep the bloom filter flags.

So in the test cases disabled, we have a selector that looks like this:

```
msub > :not(:first-child),
msup > :not(:first-child),
msubsup > :not(:first-child),
mmultiscripts > :not(:first-child) {
    -moz-script-level: +1;
    -moz-math-display: inline;
}
```

And an element that looks like this:

```
<msubsup><mi></mi><mi></mi></msubsup>
```

We're only inserting the first selector msub > :not(:first-child) into the set,
so when we're going to match the <mi> elements we fast-reject it in both cases
due to the bloom filter, so they share style.

I can't see an easy way to fix this keeping the deduplication. If we keep it, we
need to remove the bloom filter optimization, which means that we'd trash the
cache for every first-child in the document (the :not(:first-child) effectively
becomes a global rule).

MozReview-Commit-ID: 9VPkmdj9zDg
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-27 19:59:25 -05:00
Emilio Cobos Álvarez
7a556a7f03
Bug 1360399: Don't deduplicate revalidation selectors. r=bholley
It's unfortunate, but it's a correctness issue. I was looking at the
expectations update here:

 * 659cddddd4

And investigating it I realised that it's wrong to coalesce selectors like that,
because we keep the bloom filter flags.

So in the test cases disabled, we have a selector that looks like this:

msub > :not(:first-child),
msup > :not(:first-child),
msubsup > :not(:first-child),
mmultiscripts > :not(:first-child) {
    -moz-script-level: +1;
    -moz-math-display: inline;
}

And an element that looks like this:

<msubsup><mi></mi><mi></mi></msubsup>

We're only inserting the first selector msub > :not(:first-child) into the set,
so when we're going to match the <mi> elements we fast-reject it in both cases
due to the bloom filter, so they share style.

I can't see an easy way to fix this keeping the deduplication. If we keep it, we
need to remove the bloom filter optimization, which means that we'd trash the
cache for every first-child in the document (the :not(:first-child) effectively
becomes a global rule).

MozReview-Commit-ID: 9VPkmdj9zDg
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-28 02:57:54 +02:00
Hiroyuki Ikezoe
f15896078a Use FunctionKeyword for computed_value of timing-function as well. 2017-04-28 09:11:58 +09:00
Hiroyuki Ikezoe
90ab181a6c Factor out serialize keywoded timing function values.
This will be used for computed timing function as well.
2017-04-28 09:11:58 +09:00
bors-servo
04aac0247a Auto merge of #16637 - bzbarsky:probing-lazy-pseudos, r=emilio
Fix Stylist::lazily_compute_pseudo_element_style to return None when it should.

We have a fast path to return None if we have no rules for the pseudo-element at
all, but we should also return None if we have no _matching_ rules for it for
the given originating element.  This is relied on by consumers like
Servo_ResolvePseudoStyle, which needs to be able to detect the "no styles for
this pseudo-element for this originating element case", to support probing for
whether work for a specific pseudo-element should be done at all.

<!-- 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
- [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/16637)
<!-- Reviewable:end -->
2017-04-27 18:31:20 -05:00
bors-servo
5c321737c6 Auto merge of #16639 - aneeshusa:skip-nonexisting-dirs-when-cleaning-nightlies, r=jdm
Avoid searching for old nightlies in missing dirs

These directories may be missing (e.g. a first time build or due to Buildbot cleaning),
so don't try to look inside them for old nightlies if so.

I noticed this in http://build.servo.org/builders/arm32/builds/6815/steps/shell__1/logs/stdio.

<!-- 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
- [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/16639)
<!-- Reviewable:end -->
2017-04-27 17:18:55 -05:00
Aneesh Agrawal
ba874d67bb Avoid searching for old nightlies in missing dirs
These directories may be missing (e.g. a first time build),
so don't try to look inside them for old nightlies if so.
2017-04-27 17:30:56 -04:00
Pyfisch
ce3e1406ca Handle unimplemented size keywords for radial gradients. 2017-04-27 22:07:31 +02:00
Pyfisch
0708d62f16 Set /css-flexbox-1_dev/html/align-content-004.htm.ini to PASS 2017-04-27 22:07:31 +02:00
Pyfisch
c9461985c1 Fix gradient position if background-clip is present. 2017-04-27 22:07:31 +02:00
Pyfisch
1c4ae53a88 Pass repeating gradients to webrender. 2017-04-27 22:07:31 +02:00
Pyfisch
803bc0395c Fix gradient math and positioning. Formatting.
Start adding repeating gradients.
2017-04-27 22:07:31 +02:00
Pyfisch
6768614fdd Use content_box instead of absoulte bounds in radial_gradient. 2017-04-27 22:07:31 +02:00
Pyfisch
0215947733 Implement radial gradient size keywords. 2017-04-27 22:07:31 +02:00
Pyfisch
f4bad2d920 Partially implement radial gradients.
Missing: repeating radial gradients and keyword sizes.
2017-04-27 22:07:31 +02:00
Boris Zbarsky
c9fd747e69 Fix Stylist::lazily_compute_pseudo_element_style to return None when it should.
We have a fast path to return None if we have no rules for the pseudo-element at
all, but we should also return None if we have no _matching_ rules for it for
the given originating element.  This is relied on by consumers like
Servo_ResolvePseudoStyle, which needs to be able to detect the "no styles for
this pseudo-element for this originating element case", to support probing for
whether work for a specific pseudo-element should be done at all.
2017-04-27 16:00:40 -04:00
bors-servo
2c445169ad Auto merge of #16635 - bholley:too_many_revalidation_selectors, r=emilio
Too many revalidation selectors

https://bugzilla.mozilla.org/show_bug.cgi?id=1358693
2017-04-27 13:14:01 -05:00
Bobby Holley
f4d81b010b Properly handle -moz-any for revalidation selectors.
Note that, while the comment is correct that there is a fair amount of -moz-any
usage in the UA sheet, it's always used as an ancestor selector, and thus ignored
for our purposes. Nevertheless, it's straightforward enough to support properly,
so we do that here.

MozReview-Commit-ID: Kz1yNfPUIaP
2017-04-27 11:13:11 -07:00
Bobby Holley
6e413653e7 Add unit tests for revalidation selectors.
If these break, our cache may be subtly wrong in certain situations, which may
be hard to detect.

MozReview-Commit-ID: AXG2tpGnQ6k
2017-04-27 11:13:04 -07:00
Bobby Holley
25832b962f Check for adjacent duplicates when accumulating revalidation selectors.
MozReview-Commit-ID: 4C8L5u1S1sL
2017-04-27 11:12:57 -07:00
Bobby Holley
7e69cf82be Store SelectorInner and only revalidate up to the rightmost ancestor combinator.
MozReview-Commit-ID: HiTGVhwuvCE
2017-04-27 11:12:51 -07:00
Bobby Holley
32c624e585 Require Clone for SelectorImpl so that all the types that are parameterized on it can derive(Clone).
It's not clear to me why this is a requirement, but it seems to be one.

MozReview-Commit-ID: JM0DKjHHfT
2017-04-27 11:12:45 -07:00
Bobby Holley
2df9dc2b03 Use a different visitor pass for gathering revalidation selectors.
This allows us to ignore everything to the left of the rightmost simple selector.

MozReview-Commit-ID: 6I4VzKos22n
2017-04-27 11:12:39 -07:00
Bobby Holley
dd4575c23a Separate revalidation checking from attribute sensitivity checking.
The current code is busted because:
* It unconditionally flags for revalidation if the sensitivities are not yet
  sensitive to attributes.
* It uses is_attr_selector, despite the fact that ID and Class are both handled
  by the style sharing cache and should not trigger revalidation.

MozReview-Commit-ID: C7d8QrdKcFm
2017-04-27 11:12:32 -07:00
bors-servo
ab3f5b0d9f Auto merge of #16634 - jryans:text-combine-upright-fixup, r=heycam
Stylo: Text combine upright style adjustment

Ports the text-combine-upright writing mode adjustment to Servo.

Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1359603.
2017-04-27 11:42:43 -05:00
J. Ryan Stinnett
a5907e03c9 Tweak style adjust ordering to better match Gecko
To ease comparison between Gecko's `nsStyleContext::ApplyStyleFixups` and the
Servo equivalent, move them into a similar ordering.

MozReview-Commit-ID: GV89pbzA8IH
2017-04-27 11:40:00 -05:00
J. Ryan Stinnett
676d177f17 Extra spec comments for style adjustments
MozReview-Commit-ID: J6qxBpQ43Ax
2017-04-27 11:39:59 -05:00
J. Ryan Stinnett
978239927d Port text-combine-upright writing mode fixup to Servo
Ports the Gecko fixup for text-combine-upright writing mode to Servo.  In
addition, this passes the current pseudo element (if any) down to the cascade
for use during the fixup process.

MozReview-Commit-ID: BkHd4AvSsOt
2017-04-27 11:39:59 -05:00
J. Ryan Stinnett
78a2e3be51 Correct typo about pseudo_element macros
MozReview-Commit-ID: 3PDBeOdsX4D
2017-04-27 11:39:58 -05:00
bors-servo
f598adc3ad Auto merge of #16628 - nox:INTERPOL, r=emilio
Parse interpolation hints (fixes #15166)

<!-- 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/16628)
<!-- Reviewable:end -->
2017-04-27 10:41:04 -05:00
bors-servo
a6c3bc6a49 Auto merge of #16624 - chenpighead:stylo-make-border-spacing-animatable, r=boris
stylo: Make border-spacing animatable

Two things are included in this patch:

1. Implement ComputeDistance for border-spacing, so we could get the right
distance while doing animations.

2. Implement clone function for gecko glue code of border-spacing, so we
could make animations of border-spacing work properly in stylo build.

Gecko side patch: Bug 1354437

<!-- 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/16624)
<!-- Reviewable:end -->
2017-04-27 09:33:20 -05:00
Anthony Ramine
ae82cdab34 Parse interpolation hints (fixes #15166) 2017-04-27 15:04:36 +02:00
bors-servo
c633e291c9 Auto merge of #16630 - emilio:nac, r=bholley,hiro
Make stylo traverse Native Anonymous Content, fixing a bunch of restyle bugs.

<!-- 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/16630)
<!-- Reviewable:end -->
2017-04-27 07:39:42 -05:00
Emilio Cobos Álvarez
be0139ff3c
Bug 1331047: Implement the new traversal semantics for stylo. r=bholley,hiro
MozReview-Commit-ID: 4BXx9JpGZKX
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-27 14:26:48 +02:00
Emilio Cobos Álvarez
85ad961104
Update bindings.
MozReview-Commit-ID: 7fFBpR4YzN5
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-27 14:26:44 +02:00
bors-servo
3f8f34ed13 Auto merge of #16629 - emilio:dirty-doc, r=heycam
Bug 1336863: Ensure we don't restyle with outdated rules.

<!-- 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/16629)
<!-- Reviewable:end -->
2017-04-27 06:45:49 -05:00
Emilio Cobos Álvarez
7a88ca284d
Bug 1336863: Ensure we don't restyle with outdated rules. 2017-04-27 13:08:27 +02:00
Jeremy Chen
1cbe9b9a1a Stylo: Make border-spacing animatable
Two things are included in this patch:

1. Implement ComputeDistance for border-spacing, so we could get the right
distance while doing animations.

2. Implement clone function for gecko glue code of border-spacing, so we
could make animations of border-spacing work properly in stylo build.

Gecko side patch: Bug 1354437
2017-04-27 17:39:38 +08:00
Anthony Ramine
1091af6fee Copy the damn unitless-length.html test in /_mozilla/
It's the exact same thing as the one in WPT, but without the intermittent
'top' and 'bottom' failures which are unrelated to the damn quirk.
2017-04-27 10:42:31 +02:00
Anthony Ramine
d53eb777e1 Implement the unitless length quirk for word-spacing 2017-04-27 10:42:27 +02:00
Anthony Ramine
59a7819aa9 Implement the unitless length quirk for vertical-align 2017-04-27 10:42:25 +02:00