Commit graph

21989 commits

Author SHA1 Message Date
bors-servo
7adf022dfa
Auto merge of #23837 - cburgos:bugfix/link_called-update, r=jdm
update link_called when link function called.

<!-- Please describe your changes on the following line: -->
On call of WebGLProgram::link update link_called to true

---
<!-- 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 #23722  (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/23837)
<!-- Reviewable:end -->
2019-07-24 20:20:14 -04:00
marmeladema
88cacfb009 Modify *::get_cx methods to return a safe JSContext instead of a raw one 2019-07-24 09:53:10 +01:00
marmeladema
2c5d0a6ebc Convert CGTraitInterface to use safe JSContext instead of raw JSContext 2019-07-24 08:24:50 +01:00
marmeladema
808fa65aef Convert internal methods to handle safe JSContext instead of raw JSContext 2019-07-24 08:18:22 +01:00
marmeladema
2fb3f1f983 Callbacks now uses safe JSContext instead of raw JSContext 2019-07-24 08:18:22 +01:00
marmeladema
6e4caf1153 DefineDOMInterfaceMethod now takes a SafeJSContext instead of a JSContext
as first argument.
2019-07-24 08:18:22 +01:00
marmeladema
aa0e4f5c76 GetPerInterfaceObject methods now takes a SafeJSContext instead of a JSContext
as first argument.
2019-07-24 08:18:22 +01:00
marmeladema
0a5a9bc7bc CreateInterfaceObjects now takes a SafeJSContext instead of a JSContext
as first argument.
2019-07-24 08:18:21 +01:00
marmeladema
35dc5320ab Wrap(Global)Method now takes a SafeJSContext instead of a JSContext
as first argument.
2019-07-24 08:18:21 +01:00
marmeladema
cd0eb88a3e ConstructorEnabled now takes a SafeJSContext instead of a JSContext
a first argument. The function cannot be made safe because of call
to unsafe function is_exposed_in.
2019-07-24 08:18:20 +01:00
marmeladema
dbcd8d7af2 Add safe JSontext wrapper around unsafe RawJSContext 2019-07-24 08:18:20 +01:00
marmeladema
5d85f60f7d Rename JSContext from js::jsapi to RawJSContext 2019-07-24 08:18:19 +01:00
bors-servo
7ffe65e672
Auto merge of #23745 - georgeroman:implement_get_element_property_wd_command, r=jdm
Implement GetElementProperty wd command

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

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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/23745)
<!-- Reviewable:end -->
2019-07-23 21:24:57 -04:00
bors-servo
8f7440f368
Auto merge of #23827 - emilio:gecko-sync, r=emilio,manishearth
style: Sync changes from mozilla-central, and update euclid

See individual commits for details.

<!-- 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/23827)
<!-- Reviewable:end -->
2019-07-23 18:42:00 -04:00
Emilio Cobos Álvarez
3d57c22e9c Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they
only use euclid internally so that's not blocking landing the rest of the
changes.

Given the size of this patch, I think it's useful to get this landed as-is.
2019-07-23 23:09:55 +02:00
Emilio Cobos Álvarez
2ff7cb5a37
style: Appease tidy. 2019-07-23 22:54:12 +02:00
Emilio Cobos Álvarez
3da8f85914
style: Fix a warning in Servo builds by moving a macro to where it's used. 2019-07-23 22:54:11 +02:00
Emilio Cobos Álvarez
8665d9dc12
Fix Servo build. 2019-07-23 22:54:10 +02:00
longsonr
243520fb27
style: Change dominant-baseline from reset to inherit.
Bug: 1353164
Reviewed-by: heycam
2019-07-23 22:54:09 +02:00
Charlie Marlow
6bc1b97a6c
style: renamed text-decoration-width to text-decoration-thickness.
Differential Revision: https://phabricator.services.mozilla.com/D38586
2019-07-23 22:54:09 +02:00
Nicolas Silva
239f2da9d9
style: Update to euclid 0.20.
Differential Revision: https://phabricator.services.mozilla.com/D38530
2019-07-23 22:54:08 +02:00
Emilio Cobos Álvarez
66eae2fc81
style: Remove the ability to build Gecko without the bindgen feature.
This is not used for anything, as far as I can tell.

Differential Revision: https://phabricator.services.mozilla.com/D38584
2019-07-23 22:54:07 +02:00
Emilio Cobos Álvarez
137044a3db
style: Update animations when a pseudo-element had animations but no longer has, and has been re-framed in the meantime.
This is the easy fix.

The hard fix (outlined in the comment) would be nice, but I don't think this bug
alone justifies it.

Differential Revision: https://phabricator.services.mozilla.com/D38184
2019-07-23 22:54:06 +02:00
Thomas Nguyen
59cf10d1b0
style: Modify URLExtraData rust debug to include referrerInfo.
Differential Revision: https://phabricator.services.mozilla.com/D36475
2019-07-23 22:54:06 +02:00
longsonr
2ab9156401
style: Remove dominant-baseline values that no longer exist.
Bug: 1353164
Reviewed-by: heycam
2019-07-23 22:54:05 +02:00
Boris Chiou
87231e676d
style: Add percentage for opacity (i.e. <alpha-value>).
The following properties accept <alpha-value> [1], which is
"<number> | <percentage>", so we update the parser, spec links, and
their web-platform-tests.
1. opacity
2. flood-opacity
3. fill-opacity
4. stroke-opacity
5. stop-opacity
6. -moz-window-opacity

Besides, shape-image-threshold [2] still only accepts <number>, so we need
to support a different version of `Opacity::parse()`.

[1] https://drafts.csswg.org/css-color/#typedef-alpha-value
[2] https://drafts.csswg.org/css-shapes/#shape-image-threshold-property

Differential Revision: https://phabricator.services.mozilla.com/D37493
2019-07-23 22:54:04 +02:00
Emilio Cobos Álvarez
65bf72f131
style: Set the property restrictions flags from the centralized list.
Differential Revision: https://phabricator.services.mozilla.com/D37721
2019-07-23 22:54:04 +02:00
Emilio Cobos Álvarez
e33a799775
style: Centralize property restrictions.
The assertion in properties.mako.rs ensures I got this right.

Differential Revision: https://phabricator.services.mozilla.com/D37720
2019-07-23 22:54:03 +02:00
Emilio Cobos Álvarez
2a500eadd3
style: scroll-margin properties shouldn't apply to first-line / first-letter.
From https://drafts.csswg.org/css-scroll-snap-1/#placement:

> None of the properties in this module apply to the ::first-line and
> ::first-letter pseudo-elements.

Differential Revision: https://phabricator.services.mozilla.com/D37719
2019-07-23 22:54:02 +02:00
Emilio Cobos Álvarez
b8e3247b32
style: Update spec link for font-variation-settings.
It had got outdated.

Differential Revision: https://phabricator.services.mozilla.com/D37718
2019-07-23 22:54:01 +02:00
Emilio Cobos Álvarez
10cb9c07aa
style: Don't apply property restrictions to pseudo-elements in UA stylesheets.
And remove some of the ::placeholder and ::cue hacks where we need to use
!important to make the property not apply for content but apply on UA sheets.

The comment about the white-space property was wrong, we don't enforce it with
!important in the UA stylesheets for <input> (we do for <textarea> though), so
I've kept the flag since it really applies.

Differential Revision: https://phabricator.services.mozilla.com/D37717
2019-07-23 22:54:01 +02:00
Cameron McCormack
e3b57efc7e
style: Ignore pref-controlled properties in cached scrollbar style assertions.
Now if you add a new inherited, pref-controlled property, you must
declare whether it can have an effect on scrollbar styles.  If no,
then the property will be skipped in the assertions that check
whether our cached styles are equal to those we would compute.

Differential Revision: https://phabricator.services.mozilla.com/D37507
2019-07-23 22:54:00 +02:00
Boris Chiou
145acbf876
style: Part 2: Retire the support for 3-valued syntax for position.
According to this resolved spec issue:
https://github.com/w3c/csswg-drafts/issues/2140,
we retire the 3-valued <position> on
1. `object-position`
2. `perspective-origin`,
3. `mask-position`
4. `circle()` and `ellipse()`
, but still keep the support for `background-position`.

Besides, I simply run this python script to generate the .ini file:
```
s = sys.argv[1] + ".ini"
with open(s, "w") as f:
    f.write('[{}]\n'.format(sys.argv[1]))
    f.write('  expected: FAIL\n')
    f.write('  bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1559276\n')
```

Differential Revision: https://phabricator.services.mozilla.com/D37126
2019-07-23 22:53:59 +02:00
Jonathan Kew
6cf87d23f8
style: Add an 'auto' value for the CSS 'quotes' property, and make it use language-dependent quote marks.
Differential Revision: https://phabricator.services.mozilla.com/D36429
2019-07-23 22:53:59 +02:00
alwu
c00045b0c9
style: set CSS properties directly on '::cue'.
According to the spec [1], we have to set those CSS properties on the root node,
and then this root node would have a child node, background box [2], which would
contain all other child nodes.

In our case, the background box is `cueDiv` [3].

In theory, all those properties set on the root node should be inherited by the
background box. However, when the background box is a pseudo element `::cue`,
they won't be directly inherit from the the background box's parent, inherited
styles would acutally come from video instead.

Therefore, we have to directly set these properties on the pseudo element and
mark them as `!important` to avoid being overrided by user style script.

[1] https://www.w3.org/TR/webvtt1/#ref-for-list-of-webvtt-node-objects-9
[2] https://www.w3.org/TR/webvtt1/#webvtt-cue-background-box
[3] https://searchfox.org/mozilla-central/rev/11712bd3ce7454923e5931fa92eaf9c01ef35a0a/dom/media/webvtt/vtt.jsm#533-534

Differential Revision: https://phabricator.services.mozilla.com/D35694
2019-07-23 22:53:58 +02:00
bors-servo
e948c7dcc6
Auto merge of #23824 - servo:stylo-uninit, r=emilio
Stylo: replace uses of mem::uninitialized with MaybeUninit

<!-- 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/23824)
<!-- Reviewable:end -->
2019-07-23 16:28:42 -04:00
George Roman
e34a15c5ef Implement GetElementProperty WebDriver command 2019-07-23 23:19:08 +03:00
bors-servo
dcce668d3a
Auto merge of #23820 - georgeroman:link_text_selectors_for_find_element_wd_commands, r=jdm
Implement Link and PartialLink text selectors for FindElement and related WebDriver commands

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

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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/23820)
<!-- Reviewable:end -->
2019-07-23 14:36:10 -04:00
Christopher Burgos
bae975258d update link_called when link function called. 2019-07-23 12:03:24 -04:00
bors-servo
4470035f75
Auto merge of #23822 - servo:rustup, r=jdm
Upgrade to rustc 1.38.0-nightly (273f42b59 2019-07-21)

<!-- 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/23822)
<!-- Reviewable:end -->
2019-07-23 11:58:54 -04:00
bors-servo
7afe2153e8
Auto merge of #23814 - Manishearth:events, r=asajeffrey
Partial support for events in WebXR

Needs https://github.com/servo/webxr/pull/20

r? @asajeffrey

<!-- 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/23814)
<!-- Reviewable:end -->
2019-07-23 09:44:59 -04:00
bors-servo
fdbb317d7a
Auto merge of #23774 - sreeise:media_fragment_parser, r=ferjm
Media fragment parser

<!-- Please describe your changes on the following line: -->
Media fragment parser for audio and video.

---
<!-- 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 #22366 (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/23774)
<!-- Reviewable:end -->
2019-07-23 05:00:01 -04:00
Manish Goregaokar
3f95d304ec Support XRTest.disconnectAllDevices() 2019-07-23 00:52:33 -07:00
George Roman
ef7b58f0cd Check existence of property in get_property_jsval 2019-07-23 10:00:19 +03:00
George Roman
0ec852eb41 Implement link and partial link text selectors for FindElement and related WebDriver commands 2019-07-23 09:55:47 +03:00
sreeise
dc11219496 Media fragment parser 2019-07-22 21:39:55 -04:00
Manish Goregaokar
b0002a003d Make use of ended flag, get rid of XRLayer 2019-07-22 09:32:01 -07:00
Manish Goregaokar
b66cbd364a Support end events and end() 2019-07-22 09:32:01 -07:00
Manish Goregaokar
638cc92e89 Add XRSessionEvent 2019-07-22 09:32:01 -07:00
Manish Goregaokar
c9204375eb Attach XR event callbacks 2019-07-22 09:32:01 -07:00