Commit graph

25052 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
e5484250db
style: Remove the dependency on font-kit from style.
No good reason to have this IMO, and helps remove some #[cfg] blocks.
2020-06-18 23:51:17 +02:00
Emilio Cobos Álvarez
7a696cbffe
style: build / rebase fixes. 2020-06-18 23:51:17 +02:00
Emilio Cobos Álvarez
56283a3226
style: Fix FontFamilyList definition. 2020-06-18 23:51:17 +02:00
Emilio Cobos Álvarez
1f797ca24d
style: Remove prefers-color-scheme: no-preference.
It was removed from the spec.

Differential Revision: https://phabricator.services.mozilla.com/D78834
2020-06-18 23:51:16 +02:00
Emilio Cobos Álvarez
33b548ae64
style: Use an enum class for LookAndFeel::FontID.
Differential Revision: https://phabricator.services.mozilla.com/D76696
2020-06-18 23:51:16 +02:00
neil
7b5953da95
style: Remove the layout.css.scrollbar-width.enabled and layout.css.scrollbar-color.enabled prefs.
Differential Revision: https://phabricator.services.mozilla.com/D78400
2020-06-18 23:51:16 +02:00
Colomban Wendling
af2e157c88
style: Fix tree column header color to follow theme.
The background color for the tree column headers is drawn using the
system APIs, but the foreground uses custom colors, which didn't follow
theme.  This can lead to unreadable text with specific colors, e.g.
leading to black on black.

Fix this by using system colors for the foreground as well.  It also
adds on-hover styling to match possible background change on hover.

Differential Revision: https://phabricator.services.mozilla.com/D78073
2020-06-18 23:51:15 +02:00
Emilio Cobos Álvarez
8f215a8444
style: Port the style crate to rust 2018.
Differential Revision: https://phabricator.services.mozilla.com/D80101
2020-06-18 23:51:15 +02:00
Cameron McCormack
9b980e2f49
style: Add telemetry for -moz-appearance usage.
Differential Revision: https://phabricator.services.mozilla.com/D77637
2020-06-18 23:51:15 +02:00
Emilio Cobos Álvarez
c578a82adc
style: Fix some manual occurrences of try().
Depends on D80099

Differential Revision: https://phabricator.services.mozilla.com/D80100
2020-06-18 23:51:15 +02:00
Emilio Cobos Álvarez
3884328ce3
style: Clear last_parsed_property_id right after successfully parsing the value.
Rather than waiting until parsing another id (successfully or
unsuccessfully).

If we error before we even get to PropertyId::parse, we'd incorrectly
associate the error with the wrong property, incorrectly omitting it
sometimes.

Differential Revision: https://phabricator.services.mozilla.com/D78260
2020-06-18 23:51:14 +02:00
Emilio Cobos Álvarez
685e749cfc
style: Switch all callsites of try() to try_parse() in the style crate.
Fully automated via:

  $ rg -l '\.try\(' | xargs sed -i 's/\.try(/.try_parse(/g'
  $ cd servo/components/style && cargo +nightly fmt

Differential Revision: https://phabricator.services.mozilla.com/D80099
2020-06-18 23:51:14 +02:00
Philipp Zech
5af0d7ca7c
style: Remove StyleFontSize enum from nsStyleConsts.h.
Differential Revision: https://phabricator.services.mozilla.com/D77511
2020-06-18 23:51:14 +02:00
bors-servo
60f4fedcbf
Auto merge of #26970 - mrobinson:fix-animation-delay, r=jdm
animations: Don't apply animation delay to every iteration

The delay should only be applied to the animation before the first
iteration.

---
<!-- 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-18 17:24:18 -04:00
Josh Matthews
da3b3e3985
Fix refcell_backtrace feature. 2020-06-18 12:56:33 -04:00
Martin Robinson
f92164144e animations: Don't apply animation delay to every iteration
The delay should only be applied to the animation before the first
iteration.
2020-06-18 16:36:14 +02:00
bors-servo
1b55ab5804
Auto merge of #26787 - szeged:texi2d_3, r=jdm
Add support for WebGL2 TexImage2D

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

I've enabled the `tests/wpt/webgl/tests/deqp/` 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 part of #26512
- [x] There are tests for these changes

@mmatyas @zakorgy @jdm
<!-- 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-18 09:58:55 -04:00
Anthony Ramine
235df94f2e Compute content sizes lazily in layout 2020 2020-06-18 14:11:02 +02:00
Istvan Miklos
6591fa54f9 Add support for WebGL2 TexImage2D
Adds initial support for one of the WebGL2 `TexImage2D` call.
2020-06-18 09:59:04 +02:00
bors-servo
429bb9e874
Auto merge of #26955 - gterzian:fix_parser_borrow, r=jdm
Do not trace pending parsers

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

FIX https://github.com/servo/servo/issues/26857

---
<!-- 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-17 23:20:45 -04:00
Matthias Deiml
25080e3fa5 Use global.get_referrer() when appropiate 2020-06-17 22:08:06 +02:00
Matthias Deiml
47355766ed Fix invalid use of ReferrerUrl 2020-06-17 19:07:15 +02:00
Matthias Deiml
fa18cf620f Make url for "client" referrer mandatory 2020-06-17 19:07:14 +02:00
Gregory Terzian
558a55c0b2 do not trace pending parsers 2020-06-17 22:49:19 +08:00
Martin Robinson
e901fa2c39 Cancel animations for nodes which are removed from the DOM
This includes nodes which are being reparented.
2020-06-17 16:35:06 +02:00
bors-servo
d9b2cf53e8
Auto merge of #26922 - gterzian:shutdown_webrender, r=jdm
Blockingly shut-down webrender api

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

FIX https://github.com/servo/servo/issues/26876

---
<!-- 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-17 08:55:43 -04:00
Kunal Mohan
00b3f785c4 Add GPUSampler and GPUTextureView to BindingResource
Add validation for BindGroups
2020-06-17 12:45:40 +05:30
Gregory Terzian
59896748b5 blockingly shut-down webrender when exiting webgl_thread 2020-06-17 13:47:13 +08:00
bors-servo
6d9b2eef29
Auto merge of #26943 - jdm:promise-incumbent, r=Manishearth
Fix panic on vimeo.com

The only time we end up enqueuing a promise reaction job with a null incumbent global argument is when SpiderMonkey does some weird stuff behind the scenes for its JS Debugger support (based on https://searchfox.org/mozilla-central/rev/2c1092dc68c63f7bad6da6a03c5883a5ab5ff2ca/js/src/builtin/Promise.cpp#3168). This commit works around that case and adds a regression test so we don't forget about that in the future.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26930
- [x] There are tests for these changes
2020-06-16 20:03:28 -04:00
bors-servo
0ce03d4dc0
Auto merge of #26929 - jdm:dict-jsval, r=nox
Convert parent dictionary values when converting dictionaries to JS

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26928
- [x] There are tests for these changes OR
2020-06-16 19:27:53 -04:00
Josh Matthews
edf86d1bdc dom: Convert parent dictionary values when converting dictionaries to JS. 2020-06-16 17:34:30 -04:00
bors-servo
596e9105c5
Auto merge of #26875 - servo:jdm-patch-44, r=gterzian
Don't pretend we support SharedArrayBuffer.

Fixes #26874.
2020-06-16 17:27:07 -04:00
Josh Matthews
2e4cee9971 dom: Avoid panic when SpiderMonkey enqueues dummy promise jobs. 2020-06-16 17:21:18 -04:00
Josh Matthews
83578265b4 Don't pretend we support SharedArrayBuffer. 2020-06-16 14:39:20 -04:00
bors-servo
b4c2d3b717
Auto merge of #26942 - mrobinson:combine-declaration-structs, r=emilio
Combine AnimationAndTransitionDeclarations and AnimationRules

These two structs are very similar, so we can combine them.

<!-- 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] These changes do not require tests because they should not change behavior.

<!-- 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-16 14:23:28 -04:00
Martin Robinson
36701e0223 Combine AnimationAndTransitionDeclarations and AnimationRules
These two structs are very similar, so we can combine them.
2020-06-16 19:25:52 +02:00
bors-servo
16a99daa22
Auto merge of #26906 - gterzian:fix_streams_and_re-direct, r=Manishearth
Fix streaming request bodies

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

FIX #26904

At this point I'm not sure if the hyper `Body::wrap_stream` integration by way of the IPC route is broken, or if perhaps there is a problem with the WPT server not handling the requests properly, as I am getting a bunch of:

```
 0:04.54 INFO STDERR: 127.0.0.1 - - [13/Jun/2020 18:22:08] code 400, message Bad request syntax ('4')
 0:04.54 INFO STDERR: 127.0.0.1 - - [13/Jun/2020 18:22:08] "4" 400 -
```

In any case, the `start_reading` call in `body.rs` had to be put into the other function, since it should not be called for each chunk(this was actually failing before).

I've also added the chunked header in case the source is a stream.

Last thing to figure out, why is the request data not actually reaching the server, or not being handled properly by it.

---
<!-- 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-16 13:01:20 -04:00
Martin Robinson
f3e373bc62 Add animation and transition support for pseudo-elements
This change extends the DocumentAnimationSet to hold animations for
pseudo-elements. Since pseudo-elements in Servo are not in the DOM like
in Gecko, they need to be handled a bit carefully in stylo.  When a
pseudo-element has an animation, recascade the style. Finally, this
change passes the pseudo-element string properly to animation events.

Fixes: #10316
2020-06-16 16:33:55 +02:00
bors-servo
ba5568a0a6
Auto merge of #26921 - mrobinson:animation-set-key, r=jdm
Add DocumentAnimationSet and AnimationSetKey

This will be used in order to hold animations for pseudo elements in the
DocumentAnimationSet. Also no longer store the OpaqueNode in the
animation and transition data structures. This is already part of the
DocumentAnimationSet key.

---
<!-- 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 do not require tests because they should not change behavior.

<!-- 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-16 03:25:29 -04:00
Gregory Terzian
719b395c40 fix streaming request bodies, terminate fetch if the body stream errors 2020-06-16 13:14:38 +08:00
bors-servo
abc3ed40c9
Auto merge of #26872 - kunalmohan:gpu-canvas-context, r=kvark,jdm
Implement GPUSwapChain and GPUCanvasContext and interface with Webrender

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

---
<!-- 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. -->
2020-06-15 14:22:21 -04:00
bors-servo
24cc72ba85
Auto merge of #26852 - servo:layout-2020-independent-kind, r=SimonSapin
Some more boring stuff to change how we compute content sizes
2020-06-15 14:02:42 -04:00
Anthony Ramine
db80b8e3c1 Make IndependentFormattingContext an enum 2020-06-15 18:09:15 +02:00
Anthony Ramine
07d8c28d4a Make outer_inline and outer_inline_and_percentages free functions
They now take a closure that will compute the content sizes on demand.
2020-06-15 18:09:15 +02:00
Anthony Ramine
d0a1066d2d Remove PositioningContext::create_and_layout_positioned
It has only one call site.
2020-06-15 18:09:15 +02:00
Anthony Ramine
b53959d23d Move IndependentFormattingContext::as_replaced to IndependentFormattingContextContents 2020-06-15 18:09:15 +02:00
Anthony Ramine
b66dd66403 Rename contents to context in AbsolutelyPositionedBox 2020-06-15 18:09:15 +02:00
bors-servo
f31d345c81
Auto merge of #26902 - jdm:focus-fixes, r=nox
Focus correctness improvements

These changes improve the behaviour of focus in Hubs rooms, and are expected to improve web compat around other dynamic pages that receive keyboard events as well.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26901 and fix #26900.
- [x] There are tests for these changes
2020-06-15 11:49:30 -04:00
Josh Matthews
d55424e88f Update document focus when element focusability changes. 2020-06-15 11:22:28 -04:00
Josh Matthews
757371f4f0 Make clicking on an element request focus for focusable elements. 2020-06-15 11:22:28 -04:00