Commit graph

16155 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
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
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:

 * https://hg.mozilla.org/integration/autoland/rev/659cddddd434

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
Pyfisch
ce3e1406ca Handle unimplemented size keywords for radial gradients. 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
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
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
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
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
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
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
Anthony Ramine
16dd554534 Implement the unitless length quirk for text-indent 2017-04-27 10:42:23 +02:00
Anthony Ramine
dd6d3d62c6 Implement the unitless length quirk for padding 2017-04-27 10:42:22 +02:00
Anthony Ramine
3f947395ad Implement the unitless length quirk for padding-* 2017-04-27 10:42:20 +02:00
Anthony Ramine
37118e1e45 Implement the unitless length quirk for physical size extremums 2017-04-27 10:42:18 +02:00
Anthony Ramine
2aea6d8907 Implement the unitless length quirk for margin 2017-04-27 10:42:16 +02:00
Anthony Ramine
bcc6d4580d Implement the unitless length quirk for margin-* 2017-04-27 10:42:14 +02:00
Anthony Ramine
72186c200c Implement the unitless length quirk for letter-spacing 2017-04-27 10:42:12 +02:00
Anthony Ramine
65f74ea934 Implement the unitless length quirk for physical size properties 2017-04-27 10:42:10 +02:00
Anthony Ramine
0e7308e6dc Implement the unitless length quirk for font-size 2017-04-27 10:42:08 +02:00
Anthony Ramine
ba59fafb44 Implement the unitless length quirk for clip 2017-04-27 10:42:06 +02:00
Anthony Ramine
46913ffe1d Implement the unitless length quirk for position properties 2017-04-27 10:42:04 +02:00
Anthony Ramine
91cc30046b Implement the unitless length quirk for border-width 2017-04-27 10:42:03 +02:00
Anthony Ramine
b5a558e592 Implement the unitless length quirk for border-*-width 2017-04-27 10:42:01 +02:00
Anthony Ramine
03d24e8361 Implement the unitless length quirk for border-spacing 2017-04-27 10:41:59 +02:00
Anthony Ramine
080f74ca63 Implement the unitless length quirk for background-position 2017-04-27 10:41:57 +02:00
Anthony Ramine
f68e2fded9 Propagate quirks mode all the way to ParserContext
The quirks mode is still not properly propagated in geckolib.
2017-04-27 10:41:55 +02:00