Commit graph

33063 commits

Author SHA1 Message Date
bors-servo
ec6f71e8fa
Auto merge of #20626 - avadacatavra:pwm-spec, r=asajeffrey
added spec comments for progressive web metrics

<!-- Please describe your changes on the following line: -->
r? @asajeffrey

---
<!-- 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 build-geckolib` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #20624 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's 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/20626)
<!-- Reviewable:end -->
2018-04-11 16:33:38 -04:00
ddh
e5a009ee98 added spec comments 2018-04-11 21:29:03 +01:00
bors-servo
7462eda675
Auto merge of #20619 - upsuper:properties-data, r=emilio
Have nscssproperty a method of data instances

<!-- 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/20619)
<!-- Reviewable:end -->
2018-04-11 14:41:15 -04:00
bors-servo
ae117be752
Auto merge of #20579 - cbrewster:about_blank_replace, r=asajeffrey
Replace initial about:blank loads

<!-- 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 build-geckolib` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14720 (github issue number if applicable).

<!-- Either: -->
- [X] 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/20579)
<!-- Reviewable:end -->
2018-04-11 11:12:52 -04:00
Connor Brewster
5f85824ab3 Replace initial about:blank loads 2018-04-11 09:51:22 -05:00
Connor Brewster
004549da9f Update pipeline activity before closing pipelines 2018-04-11 09:01:01 -05:00
bors-servo
5182c81c11
Auto merge of #20620 - emilio:imagevalue, r=heycam
style: Simplify ImageValue.

Bug: 1452987
Reviewed-by: heycam
MozReview-Commit-ID: 5LRaaEPSSdY

<!-- 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/20620)
<!-- Reviewable:end -->
2018-04-11 03:52:46 -04:00
Emilio Cobos Álvarez
1b84019832
style: Update bindings.
MozReview-Commit-ID: Fxe4m6jgBuZ
2018-04-11 09:50:20 +02:00
Emilio Cobos Álvarez
1d8e64c8ee
style: Simplify ImageValue.
Bug: 1452987
Reviewed-by: heycam
MozReview-Commit-ID: 5LRaaEPSSdY
2018-04-11 09:47:47 +02:00
Xidorn Quan
1599357cff Make nscssproperty a method of longhand/shorthand/alias class. 2018-04-11 15:55:11 +10:00
Xidorn Quan
2aee174b6d Put alias instances into {longhand,shorthand}.alias. 2018-04-11 15:55:09 +10:00
bors-servo
9a900ef019
Auto merge of #20603 - bholley:rustfmt_style, r=Manishearth
Run rustfmt on selectors, servo_arc, and style

Now that rustfmt is getting close to stable, and work on the style system has died down a bit, it seemed like an opportune time to auto-format the style crates.

The first commit disables import reordering, since tidy and rustfmt don't currently agree on the correct ordering. The second commit does a bunch of manual fixups such that the output of rustfmt passes tidy. The third commit runs rustfmt on the three aforementioned crate.

There are a few dozen warnings in the style crate about lines longer than 100 characters. It would be good to fix these, but I don't have time for that now.

<!-- 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/20603)
<!-- Reviewable:end -->
2018-04-10 21:00:11 -04:00
Bobby Holley
c99bcdd4b8 Run rustfmt on selectors, servo_arc, and style.
This was generated with:

./mach cargo fmt --package selectors &&
./mach cargo fmt --package servo_arc &&
./mach cargo fmt --package style

Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
2018-04-10 17:35:15 -07:00
Bobby Holley
f7ae1a37e3 Manual fixups so that the rustfmt output won't trigger tidy. 2018-04-10 17:33:25 -07:00
Bobby Holley
b292f78363 Disable import reordering for now.
Tidy wants it one way, and the latest nightly of rustfmt wants it
another way.
2018-04-10 17:32:53 -07:00
bors-servo
0f85c64519
Auto merge of #20616 - emilio:border-image-repeat, r=nox
style: Simplify border-image-repeat serialization.

We're the only ones to preserve explicitly the second keyword, as noticed in:

  https://github.com/w3c/web-platform-tests/pull/10170

Reland of #20610 because it got backed out because I wasn't paying attention to IRC.
2018-04-10 18:46:39 -04:00
Emilio Cobos Álvarez
68ce13aae4
style: Simplify border-image-repeat serialization.
We're the only ones to preserve explicitly the second keyword, as noticed in:

  https://github.com/w3c/web-platform-tests/pull/10170
2018-04-11 00:43:45 +02:00
bors-servo
cba8b083d3
Auto merge of #20614 - asajeffrey:script-dissimilar-orgin-postMessage-from-incumbent, r=cbrewster
Use the incumbent global as the source of x-origin postMessage

<!-- 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 build-geckolib` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #20604 (github issue number if applicable).
- [X] These changes do not require tests because it's already caught by existing WPT

<!-- 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/20614)
<!-- Reviewable:end -->
2018-04-10 15:10:07 -04:00
bors-servo
acf81b2b22
Auto merge of #20613 - moz-servo-sync:gecko-backout, r=mbrubeck
Backed out changeset d186bcce1235 for failing on layout/style/test/test_shorthand_property_getters.html on a CLOSED TREE

Backed out changeset d186bcce1235 for failing on layout/style/test/test_shorthand_property_getters.html on a CLOSED TREE

Backs out https://github.com/servo/servo/pull/20610

<!-- 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/20613)
<!-- Reviewable:end -->
2018-04-10 14:15:11 -04:00
Alan Jeffrey
cef3f0e039 Use the incumbent global as the source of x-origin postMessage 2018-04-10 12:25:26 -05:00
Gecko Backout
007218b9ec Backed out changeset d186bcce1235 for failing on layout/style/test/test_shorthand_property_getters.html on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/20610
2018-04-10 16:44:34 +00:00
bors-servo
07dd37a0cf
Auto merge of #20610 - emilio:border-image-repeat, r=nox
style: Simplify border-image-repeat serialization.

We're the only ones to preserve explicitly the second keyword, as noticed in:

  https://github.com/w3c/web-platform-tests/pull/10170

<!-- 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/20610)
<!-- Reviewable:end -->
2018-04-10 08:49:28 -04:00
Emilio Cobos Álvarez
2f324aa665
style: Simplify border-image-repeat serialization.
We're the only ones to preserve explicitly the second keyword, as noticed in:

  https://github.com/w3c/web-platform-tests/pull/10170
2018-04-10 13:43:09 +02:00
bors-servo
ce72e52656
Auto merge of #20598 - servo:webgl, r=Manishearth
Four nondescript WebGL improvements

<!-- 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/20598)
<!-- Reviewable:end -->
2018-04-10 04:28:40 -04:00
bors-servo
e31fefdf78
Auto merge of #20602 - hiikezoe:dont-make-logical-properties-animatable, r=emilio
Don't make logical properties animatable

|animation_type| was renamed in 94fb839fdd, but the commit missed renaming
one place.  It means that some of logical properties might have been
accidentally animatable.  Logical properties should be animatable but we
haven't yet implemented the proper Animate trait for logical properties.

<!-- 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/20602)
<!-- Reviewable:end -->
2018-04-10 03:30:13 -04:00
bors-servo
e11c2d9755
Auto merge of #20606 - emilio:host, r=xidorn
style: Implement the functional :host(..) selector.

We could invalidate in a slightly more fine-grained way, but I don't think it's
worth the churn vs. keeping the special-cases minimal.

Bug: 1452640
Reviewed-by: xidorn
MozReview-Commit-ID: 5DkQrgwg9GW

<!-- 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/20606)
<!-- Reviewable:end -->
2018-04-10 02:16:30 -04:00
Emilio Cobos Álvarez
eaefaa890e
style: Implement the functional :host(..) selector.
We could invalidate in a slightly more fine-grained way, but I don't think it's
worth the churn vs. keeping the special-cases minimal.

Bug: 1452640
Reviewed-by: xidorn
MozReview-Commit-ID: 5DkQrgwg9GW
2018-04-10 08:04:09 +02:00
Hiroyuki Ikezoe
162d563180 Don't make logical properties animatable
|animation_type| was renamed in 94fb839fdd, but the commit missed renaming
one place.  It means that some of logical properties might have been
accidentally animatable.  Logical properties should be animatable but we
haven't yet implemented the proper Animate trait for logical properties.
2018-04-10 09:43:20 +09:00
bors-servo
bfb9fe6159
Auto merge of #20474 - servo:nonzero, r=nox
Use new std::num::NonZero* types instead of deprecated core::nonzero::NonZero

<!-- 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/20474)
<!-- Reviewable:end -->
2018-04-09 15:44:16 -04:00
Simon Sapin
52dceb3d5f Use new std::num::NonZero* types instead of deprecated core::nonzero::NonZero 2018-04-09 21:43:26 +02:00
Simon Sapin
3d6614e314 Upgrade to rustc 1.27.0-nightly (056f589fb 2018-04-07) 2018-04-09 21:43:25 +02:00
Anthony Ramine
f837354cb7 Do not emit a WebGL error for "gl_" prefixed names in gl.getAttribLocation 2018-04-09 15:52:56 +02:00
Anthony Ramine
561c41097f Fix filtering of reserved WebGL names in gl.getAttribLocation 2018-04-09 14:44:02 +02:00
Anthony Ramine
fcb6d5112e Properly check for cubic dimensions in gl.copyTexImage2D 2018-04-09 14:44:02 +02:00
bors-servo
cb754b2627
Auto merge of #20597 - emilio:host, r=xidorn
style: Implement the non-functional :host selector.

Kinda tricky because :host only matches rules on the shadow root where the rules
come from. So we need to be careful during invalidation and style sharing.

I didn't use the non_ts_pseudo_class_list bits because as soon as we implement
the :host(..) bits we're going to need to special-case it anyway.

The general schema is the following:

 * Rightmost featureless :host selectors are handled inserting them in the
   host_rules hashmap. Note that we only insert featureless stuff there. We
   could insert all of them and just filter during matching, but that's slightly
   annoying.

 * The other selectors, like non-featureless :host or what not, are added to the
   normal cascade data. This is harmless, since the shadow host rules are never
   matched against the host, so we know they'll just never match, and avoids
   adding more special-cases.

 * Featureless :host selectors to the left of a combinator are handled during
   matching, in the special-case of next_element_for_combinator in selectors.
   This prevents this from being more invasive, and keeps the usual fast path
   slim, but it's a bit hard to match the spec and the implementation.

   We could keep a copy of the SelectorIter instead in the matching context to
   make the handling of featureless-ness explicit in match_non_ts_pseudo_class,
   but we'd still need the special-case anyway, so I'm not fond of it.

 * We take advantage of one thing that makes this sound. As you may have
   noticed, if you had `root` element which is a ShadowRoot, and you matched
   something like `div:host` against it, using a MatchingContext with
   current_host == root, we'd incorrectly report a match. But this is impossible
   due to the following constraints:

    * Shadow root rules aren't matched against the host during styling (except
      these featureless selectors).

    * DOM APIs' current_host needs to be the _containing_ host, not the element
      itself if you're a Shadow host.

Bug: 992245
Reviewed-by: xidorn
MozReview-Commit-ID: KayYNfTXb5h

<!-- 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/20597)
<!-- Reviewable:end -->
2018-04-09 06:41:59 -04:00
Emilio Cobos Álvarez
db5db13559
style: Implement the non-functional :host selector.
Kinda tricky because :host only matches rules on the shadow root where the rules
come from. So we need to be careful during invalidation and style sharing.

I didn't use the non_ts_pseudo_class_list bits because as soon as we implement
the :host(..) bits we're going to need to special-case it anyway.

The general schema is the following:

 * Rightmost featureless :host selectors are handled inserting them in the
   host_rules hashmap. Note that we only insert featureless stuff there. We
   could insert all of them and just filter during matching, but that's slightly
   annoying.

 * The other selectors, like non-featureless :host or what not, are added to the
   normal cascade data. This is harmless, since the shadow host rules are never
   matched against the host, so we know they'll just never match, and avoids
   adding more special-cases.

 * Featureless :host selectors to the left of a combinator are handled during
   matching, in the special-case of next_element_for_combinator in selectors.
   This prevents this from being more invasive, and keeps the usual fast path
   slim, but it's a bit hard to match the spec and the implementation.

   We could keep a copy of the SelectorIter instead in the matching context to
   make the handling of featureless-ness explicit in match_non_ts_pseudo_class,
   but we'd still need the special-case anyway, so I'm not fond of it.

 * We take advantage of one thing that makes this sound. As you may have
   noticed, if you had `root` element which is a ShadowRoot, and you matched
   something like `div:host` against it, using a MatchingContext with
   current_host == root, we'd incorrectly report a match. But this is impossible
   due to the following constraints:

    * Shadow root rules aren't matched against the host during styling (except
      these featureless selectors).

    * DOM APIs' current_host needs to be the _containing_ host, not the element
      itself if you're a Shadow host.

Bug: 992245
Reviewed-by: xidorn
MozReview-Commit-ID: KayYNfTXb5h
2018-04-09 12:19:05 +02:00
Anthony Ramine
68898f4ebd Fix the error emitted for invalid targets in WebGLTexture::bind
It doesn't actually matter because this is only called from
WebGLRenderingContext::BindTexture, which already checks the target,
but better be safe than sorry.
2018-04-09 11:46:12 +02:00
bors-servo
0f20e82690
Auto merge of #20592 - upsuper:is-inherited, r=emilio
Use Servo code to check whether a property is inherited

This is the Servo side change of [bug 1452534](https://bugzilla.mozilla.org/show_bug.cgi?id=1452534).

<!-- 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/20592)
<!-- Reviewable:end -->
2018-04-09 05:19:48 -04:00
Xidorn Quan
22cf429c35 Use Servo code to check whether a property is inherited. 2018-04-09 19:10:44 +10:00
bors-servo
5d6db35854
Auto merge of #20591 - servo:bluetooth, r=emilio
Fix /_mozilla/bluetooth/interfaces.html

<!-- 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/20591)
<!-- Reviewable:end -->
2018-04-09 04:29:15 -04:00
Anthony Ramine
3076151a1f Fix /_mozilla/bluetooth/interfaces.html 2018-04-09 10:20:12 +02:00
bors-servo
e460b4ab8a
Auto merge of #20575 - Manishearth:filler-y, r=emilio
Use correct filler y value when animating with an implied-y translate()s

r=emilio https://bugzilla.mozilla.org/show_bug.cgi?id=1451724

<!-- 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/20575)
<!-- Reviewable:end -->
2018-04-09 01:47:58 -04:00
bors-servo
954ac8157f
Auto merge of #20586 - emilio:moz-gradient-pref, r=xidorn
style: Respect the -moz- gradient pref again.

This hopefully allows us to unship them eventually.

Bug: 1451874
Reviewed-by: xidorn
MozReview-Commit-ID: 2MDRZLmLMM0

<!-- 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/20586)
<!-- Reviewable:end -->
2018-04-07 11:07:55 -04:00
Emilio Cobos Álvarez
3927b3453a
style: Respect the -moz- gradient pref again.
This hopefully allows us to unship them eventually.

Bug: 1451874
Reviewed-by: xidorn
MozReview-Commit-ID: 2MDRZLmLMM0
2018-04-07 16:40:38 +02:00
bors-servo
ecfcf35c26
Auto merge of #20583 - emilio:affine-stuff, r=upsuper
selectors: Don't serialize :nth-child(-n) as -1n.

<!-- 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/20583)
<!-- Reviewable:end -->
2018-04-07 10:10:35 -04:00
bors-servo
ccc9d1c4c2
Auto merge of #20582 - upsuper:cssom-append, r=emilio
Have CSSOM append rather than replace slot in declaration block

The early return for identical setting in importance matching as well as the comment before `index_to_remove` are removed because the order is web-exposing regardless of whether it's from CSSOM or parsing. e.g. `top: 1px; left: 2px; top: 1px;` is effectively `left: 2px; top: 1px;`,
not `top: 1px; left: 2px;`.

This is patch for [bug 1415330](https://bugzilla.mozilla.org/show_bug.cgi?id=1415330), for spec change in w3c/csswg-drafts#2516. And corresponding test will be added in w3c/web-platform-tests#10354.

<!-- 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/20582)
<!-- Reviewable:end -->
2018-04-07 09:18:28 -04:00
Emilio Cobos Álvarez
1eab5927a5
selectors: Don't serialize :nth-child(-n) as -1n. 2018-04-07 14:54:23 +02:00
bors-servo
a35c9e71a3
Auto merge of #20584 - emilio:bye-undisplayed-maps, r=bz
style: Add an FFI function to see if an element is display: contents.

Bug: 1303605
Reviewed-by: bz

<!-- 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/20584)
<!-- Reviewable:end -->
2018-04-07 07:54:41 -04:00
Emilio Cobos Álvarez
c3185eab01
style: Add an FFI function to see if an element is display: contents.
Bug: 1303605
Reviewed-by: bz
2018-04-07 13:26:22 +02:00
Xidorn Quan
3274e84278 Have CSSOM append rather than replace slot in declaration block.
The early return for identical setting in importance matching as well
as the comment before `index_to_remove` are removed because the order
is web-exposing regardless of whether it's from CSSOM or parsing. e.g.
`top: 1px; left: 2px; top: 1px;` is effectively `left: 2px; top: 1px;`,
not `top: 1px; left: 2px;`.
2018-04-07 19:58:27 +10:00