Commit graph

8563 commits

Author SHA1 Message Date
Josh Matthews
b39955df67 Update webrender. 2020-06-11 14:07:39 -04:00
bors-servo
9e528b8124
Auto merge of #26806 - mrobinson:animations-cascade, r=emilio
Include animations and transitions in the cascade

Instead of applying animations and transitions to styled elements,
include them in the cascade. This allows them to interact properly with
things like font-size and !important rules.

<!-- 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
- [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. -->
2020-06-10 14:14:03 -04:00
Martin Robinson
af0bb1f728 animations: Don't always re-resolve the node style
When animations and transitions change don't always re-resolve node
style, just replace the animation and transition rules and re-cascade.
2020-06-10 17:03:58 +02:00
WPT Sync Bot
7ef7c78b1b Update web-platform-tests to revision 57727f82763c80c89a94593a7b0960abcf4daa4a 2020-06-10 10:42:31 +00:00
bors-servo
1a561242cf
Auto merge of #26831 - servo-wpt-sync:wpt_update_09-06-2020, r=jdm
Sync WPT with upstream (09-06-2020)

Automated downstream sync of changes from upstream as of 09-06-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-06-09 23:51:15 -04:00
bors-servo
7eacfa4f0d
Auto merge of #26823 - jdm:single-renderapi, r=asajeffrey
Update webrender

These changes reflect changes in webrender's API that make RenderApiSender and RenderApi objects more challenging to share. This PR moves us to a model where:
* the compositor owns the main RenderApi object
* other threads that need to create transactions or manipulate fonts proxy those operations to the compositor (script/layout use IPC, while other threads use non-IPC channels)
* the webgl thread owns its own independent RenderApi
2020-06-09 19:34:08 -04:00
Josh Matthews
4c6f01b60a
Fix 2020 result. 2020-06-09 17:50:51 -04:00
Josh Matthews
8ab195652e
Fix 2020 result. 2020-06-09 17:50:28 -04:00
bors-servo
cb4e3cb16a
Auto merge of #26758 - jdm:stacking-context-transform-zero, r=mrobinson
Don't create empty stacking contexts in display lists

A recent change to euclid exposed that our display lists can contain Rects that contain NaN values. These NaNs originate from creating stacking contexts with transforms that scale the horizontal or vertical dimensions to 0. WebRender isn't prepared to handle these, so we need to not produce these empty stacking contexts when building the display list.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26592 and fix #26590
- [x] There are tests for these changes
2020-06-09 13:37:30 -04:00
Josh Matthews
c88bea8d93 Update mix-blend-mode reftest results. 2020-06-09 13:05:16 -04:00
Josh Matthews
2a83b80eed Add reftest for empty stacking contexts. 2020-06-09 11:30:18 -04:00
bors-servo
8e3d12bfcb
Auto merge of #26794 - gterzian:update_xhr, r=jdm
Update XHR send to use XMLHttpRequestBodyInit

<!-- Please describe your changes on the following line: -->

FIX #26723

---
<!-- 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: -->
- [ ] 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. -->
2020-06-09 10:25:11 -04:00
WPT Sync Bot
2a42c14544 Update web-platform-tests to revision a5cb9597799c5f9bf0a809006161a0c50055828f 2020-06-09 10:26:43 +00:00
Martin Robinson
364235ac0c Include animations and transitions in the cascade
Instead of applying animations and transitions to styled elements,
include them in the cascade. This allows them to interact properly with
things like font-size and !important rules.
2020-06-09 11:41:07 +02:00
Gregory Terzian
a97d2e3b9b xhr: update test-suite to reflect use of XMLHttpRequestBodyInit 2020-06-09 13:17:24 +08:00
bors-servo
0645d8c36d
Auto merge of #26805 - mrobinson:add-pseudo-tag-to-layout-2020, r=SimonSapin
layout_2020: Tag fragments with their pseudo content type

This will allow us to answer queries and properly handle animations in
the future for fragments generated for pseudo content.

<!-- 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
- [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. -->
2020-06-06 13:26:19 -04:00
Martin Robinson
89855afa4d layout_2020: Tag fragments with their pseudo content type
This will allow us to answer queries and properly handle animations in
the future for fragments generated for pseudo content.
2020-06-06 17:25:08 +02:00
Martin Robinson
b875f14e86 Better computation of animation keyframes
This begins to address #26625 by properly applying CSS variables during
keyframe computation and no longer using `apply_declarations`. Instead,
walk the declarations, combining them into IntermediateComputedKeyframe,
maintaining declarations that modify CSS custom properties. Then compute
a set of AnimationValues for each keyframe and use those to produce
interpolated animation values.
2020-06-05 13:40:29 +02:00
bors-servo
98fe360390
Auto merge of #26788 - servo:energy, r=jdm
Remove support for energy and heartbeats profiling

Both are disabled by default (energy at compile-time, heartbeats with a run-time option). Neither is tested of CI. Neither has been used in a long time. They might have Undefined Behavior: https://github.com/servo/servo/issues/26550#issuecomment-634238098. They each depend on a mostly-unmaintained C library. The thread-safety expectation of those libraries are unknown.
2020-06-04 19:29:46 -04:00
Simon Sapin
b282bd3a44 Remove support for heartbeats profiling 2020-06-04 22:53:56 +02:00
bors-servo
e2d980a071
Auto merge of #26480 - CYBAI:missing-on, r=jdm
Prefix `on` for function name of inline events

While checking what needs to be done for the spec-update, I've noticed the logic of checking `is window-reflecting element (e.g. body and frameset)` is already handled by the `is` casting function.

However, we still failed to pass the tests because we're missing `on` prefix for inline functions.

I'm not sure if this patch is good enough (or maybe at least I need to add a comment for why adding `on` prefix?).

Besides, I checked [how Gecko handles](https://searchfox.org/mozilla-central/rev/8bc4e35c9bb47c1fe3131e6155d9f482e1efef9a/dom/events/EventListenerManager.cpp#1012-1022) and looks like they also just pass the atom directly.
But, the [generated atom](https://searchfox.org/mozilla-central/source/__GENERATED__/xpcom/ds/nsGkAtomList.h#775) is prefixed with `on` which is correct to just pass it into the `CompileFunction`.

---
<!-- 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 #26479
- [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. -->
2020-06-04 16:45:22 -04:00
Simon Sapin
64124f7a5e Layout 2020 skeleton for display: flex, behind a pref 2020-06-04 13:09:57 +02:00
bors-servo
8536cee72c
Auto merge of #25873 - gterzian:implement_readablestream_support, r=jdm
Implement readablestream support

<!-- Please describe your changes on the following line: -->

FIX #21482
FIX #24876
FIX #26392

---
<!-- 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: -->
- [ ] 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. -->
2020-06-04 03:04:00 -04:00
Gregory Terzian
bd5796c90b integrate readablestream with fetch and blob 2020-06-04 11:38:35 +08:00
bors-servo
4d95efeebf
Auto merge of #26775 - servo:gecko-sync, r=emilio
style: sync changes from mozilla-central.
2020-06-03 23:02:22 -04:00
Emilio Cobos Álvarez
16cb51097f
style: Fix some unit tests.
We need to grow dependency by a pointer because of the parent chain for
:is() / :where() unfortunately.
2020-06-04 04:12:03 +02:00
bors-servo
7758d4ff62
Auto merge of #25432 - warren-fisher:HTMLConstructor, r=jdm
Extract some of CGClassConstructHook to utils.rs

<!-- Please describe your changes on the following line: -->

Moving some of the functionality from the massive tripled quoted string in CGClassConstructHook in `components/script/dom/bindings/codegen/CodegenRust.py` to `components/script/dom/bindings/utils.rs`. Must be made unsafe because of UnwrapObjectDynamic and other functions. Added imports as necessary as well, as well as cleaning up using test-tidy.

---
<!-- 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 #25395 (GitHub issue number if applicable)

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because the issue says so

<!-- 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. -->
2020-06-03 16:59:32 -04:00
Warren Fisher
2da07ed164 Reduce code duplication. Move some of CodegenRust.py to htmlconstructor.rs 2020-06-03 15:13:34 -04:00
Josh Matthews
e744e0935f
Remove non-2020 failure. 2020-06-02 22:37:53 -04:00
Josh Matthews
8b2eda4717
Remove intermittent failure. 2020-06-02 22:37:37 -04:00
WPT Sync Bot
7f8c29593f Update web-platform-tests to revision fd60ba25a0726dfea59024d8143240b355c46a55 2020-06-02 13:10:28 +00:00
WPT Sync Bot
ce1de3b503 Update web-platform-tests to revision c99723afe33bc5b265e41c1a9446eaff7f8e0d57 2020-05-31 11:24:52 +00:00
bors-servo
14303bd651
Auto merge of #26719 - servo-wpt-sync:wpt_update_30-05-2020, r=jdm
Sync WPT with upstream (30-05-2020)

Automated downstream sync of changes from upstream as of 30-05-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-05-30 14:39:15 -04:00
Josh Matthews
9e9a1b2aa4
Add 2020 failure. 2020-05-30 11:21:32 -04:00
WPT Sync Bot
1c115a1737 Update web-platform-tests to revision 8fd32a0f7c18d32ae9e147d267746accc3ee9ad5 2020-05-30 10:56:10 +00:00
Bastien Orivel
c4273d86f2 Fix the webidl for Headers
Make the HeadersInit type match the spec.

Fixes #26441
2020-05-30 12:46:51 +02:00
Josh Matthews
791a96efc4
Remove non-2020 failure. 2020-05-29 16:39:28 -04:00
WPT Sync Bot
4702cbe05c Update web-platform-tests to revision e529eb9501876273c9612f5602bc530723a01147 2020-05-29 11:22:44 +00:00
WPT Sync Bot
1b463fce85 Update web-platform-tests to revision 5c34fc630374b9eb0559139a486ff1a2e4247c4f 2020-05-28 11:23:41 +00:00
bors-servo
4094d16323
Auto merge of #26668 - CYBAI:fix-module-current-script, r=jdm
Set `currentScript` to `null` for module scripts

I misunderstood the test case when I worked on #23545. That test case is
actually not related to dynamic import; instead, the reason why it
crashes is, `currentScript` should be updated to `null`.

In spec, the step 6 of [execute-the-script-block](https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block) only says `Assert: document's currentScript attribute is null.` but doesn't says it should be set to null. Not sure if it can be improved.

---
- [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)
- [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. -->
2020-05-27 08:58:36 -04:00
bors-servo
9f0ec12863 Auto merge of #26664 - servo-wpt-sync:wpt_update_26-05-2020, r=servo-wpt-sync
Sync WPT with upstream (26-05-2020)

Automated downstream sync of changes from upstream as of 26-05-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-05-27 05:38:27 -04:00
bors-servo
93a6c37836
Auto merge of #26659 - mrobinson:events, r=jdm
Add support for remaining animation and transition events

This PR adds support for remaining animation and transitions events.
There are two commits here. The first is a bit more complicated: it reworks
how rooting is done for animating nodes. Instead of having the `ScriptThread`
try to track which animations are active via events (which can be inaccurate),
it just maintains roots for nodes that are actually present in the animations-
-related data structures. The second commit adds support for the new events.

Unfortunately, the existing events tests either rely on the Web Animations API
or other behavior (for example, that changing animation delay restarts
an animation). Since those two things are out-of-scope for this change,
I've forked some of the WPT tests, removed the reliance on the Web
Animations API, and added them to Servo's internal tests.

---
<!-- 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 #21564.
- [x] There are tests for these changes OR

<!-- 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. -->
2020-05-27 01:50:39 -04:00
CYBAI
a0df94bddc Set currentScript to null for module scripts
I misunderstood the test case when I worked on #23545. That test case is
actually not related to dynamic import; instead, the reason why it
crashes is, `currentScript` should be updated to `null`.
2020-05-27 11:22:04 +09:00
Martin Robinson
77aa3721c5 Add support for remaining animation and transition events
Fixes #21564.
2020-05-26 20:34:58 +02:00
WPT Sync Bot
fc2af06212 Update web-platform-tests to revision 82b3595ce0ea99dd2a04b578421b4d281e53ee31 2020-05-26 11:20:12 +00:00
bors-servo
57846678c2
Auto merge of #26638 - szeged:texi2d_2, r=jdm
Add support for WebGL2 TexImage2D

Adds initial support for one of the WebGL2 `TexImage2D` call.

<!-- Please describe your changes on the following line: -->
I've enabled the `conformance2/textures/image/` tests and updated the test expectations.

---
<!-- 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] 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.-->
@mmatyas @zakorgy @jdm
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2020-05-26 06:13:27 -04:00
Istvan Miklos
b298160ff2 Add support for WebGL2 TexImage2D
Adds initial support for one of the WebGL2 `TexImage2D` call.
2020-05-26 11:33:58 +02:00
bors-servo
641eb362e8
Auto merge of #26637 - servo-wpt-sync:wpt_update_25-05-2020, r=servo-wpt-sync
Sync WPT with upstream (25-05-2020)

Automated downstream sync of changes from upstream as of 25-05-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-05-25 19:40:52 -04:00
bors-servo
2fd427270d
Auto merge of #26609 - mrobinson:improve-transition-finishing, r=jdm
Improve ending of transitions

For legacy reasons, transitions were marked as finished after updating the
style. According to the spec, they should be marked as finished when
animations are updated and before restyle. This change does that as well
as preventing replacement of finished transitions.

Having finished transitions survive a full restyle cycle and allowing
the replacement of finished transition could lead to issues where
animations are removed from the global list of animating transitions
too soon:

 1. A transitions finishes
 2. Restyle
 3. The transition is marked as finished and events are queued
 4. Restyle cancels finished transition and replaces it instead of
    clearing finished transition
 5. Events are sent for the incorrectly canceled transition, removing it
    completely from the list of running transitions due to the extra
    event.

---
<!-- 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] There are tests for these changes
2020-05-25 11:07:50 -04:00
WPT Sync Bot
68953a4264 Update web-platform-tests to revision b577b1f9580a61524cde099a7763edb96c810faa 2020-05-25 11:29:39 +00:00