Commit graph

346 commits

Author SHA1 Message Date
Daniel Adams
9212ed203a
Enable OpenXR backend from the WebXR crate (#32817)
* Enable OpenXR backend from the WebXR crate

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Ensure openxr feature is only included on windows

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Add cfgs for OpenXR usages

Signed-off-by: Daniel Adams <msub2official@gmail.com>

---------

Signed-off-by: Daniel Adams <msub2official@gmail.com>
2024-07-20 06:24:40 +00:00
Martin Robinson
959ffad99a
layout: Add support for table captions (#32657)
This adds initial support for table captions. To do this, the idea of
the table wrapper becomes a bit more concrete. Even so, the wrapper is
still reponsible for allocating space for the grid's border and padding,
as those properties are specified on the wrapper and not grid in CSS.

In order to account for this weirdness of HTML/CSS captions and grid are
now laid out and placed with a negative offset in the table wrapper
content rect.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2024-07-03 18:24:19 +00:00
Martin Robinson
7ea894774f
Add a directory listing feature for file URLs (#32580)
Signed-off-by: Bobulous <Bobulous@users.noreply.github.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Bobulous <Bobulous@users.noreply.github.com>
2024-06-26 08:02:50 +00:00
Martin Robinson
44064b1439
layout: Add very basic support for showing text in input boxes (#32365)
This only paints text in input fields. Selection and cursor are still
not painted.

In addition to adding this feature, the change also updates the
user-agent.css with the latest from the HTML specification. Extra
padding and extraneous settings (such as a bogus line-height and
min-height) are also removed from servo.css. This leads to some new
passes.

There are some new passes, this introduces failures as inserting text
reveals issues that were hidden before. Notably:

- failures in `/html/editing/editing-0/spelling-and-grammar-checking/`:
  We do not support spell-checking.
- Most of the rest of the new failures are missing features of input
  boxes that are also missing in legacy layout.
2024-06-20 10:13:50 +00:00
Gregory Terzian
3d78d60619
implement basic infra for ResizeObserver (#31108) 2024-06-17 16:44:07 +00:00
Hieu Do
3d70243438
webgpu: Parse and forward backend prefs to wgpu (#32410)
Signed-off-by: Hieu Do <hieudn.uh@gmail.com>
2024-05-31 17:51:36 +00:00
Oriol Brufau
b30b79a93a
Cleanup UA styles for anonymous table rows and cells (#31661)
These properties were being set to their initial value, this wasn't
needed because they are non-inherited properties and there isn't
anything else setting them.
2024-03-14 11:53:27 +00:00
Martin Robinson
49ae9bb442
layout: Fix the pseudo for anonymous tables (#31578)
Anonymous tables should not use legacy pseudos, as the legacy layout
engine had them inherit lots of random properites that lead to bad
layout in the new layout engine.

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2024-03-08 10:32:51 +00:00
Oriol Brufau
007a31c1b5
Enable CSS Tables by default (#31470)
And remove the pref `layout.tables.enabled`.
2024-03-07 10:09:10 +00:00
Sebastian C
0342d6beb0
<hr> elements are expected to have a default overflow:hidden (#31297)
* <hr> elements are expected to have a default overflow:hidden
See https://github.com/whatwg/html/pull/2724

Signed-off-by: Sebastian C <sebsebmc@gmail.com>

* Use full defined hr style

Signed-off-by: Sebastian C <sebsebmc@gmail.com>

* update legacy test expectation

Signed-off-by: Sebastian C <sebsebmc@gmail.com>

---------

Signed-off-by: Sebastian C <sebsebmc@gmail.com>
2024-02-10 21:27:50 +00:00
Mukilan Thiyagarajan
d8958f9693
android: disable JIT in SM to workaround #31134 (#31270)
The crash when loading servo.org happens in the JIT code
emitted by SM's CacheIRCompiler to invoke the VM function
`ProxyGetPropertyByValue`.

To disable this code path, it is not sufficient to disable
just the baseline JIT (which exposed in servo under the
pref `js.baseline.enabled`) but also the baseline
interpreter which is controlled by a different flag in SM.

This PR disables renames the `js.baseline.enabled` pref in
Servo to `js.baseline_jit.enabled` and introduces a new
pref `js.baseline_interpreter.enabled` that controls the
baseline interpreter.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2024-02-07 03:59:28 +00:00
Martin Robinson
81f5157522
Add support for table fixups (#30868)
This adds support for fixing up tables so that internal table elements
that are not properly parented in the DOM have the correct box tree
structure according to the CSS Table specification [1]. Note that this
only comes into play when building the DOM via script, as HTML 5 has its
own table fixups that mean that the box tree construction fixups here
are not necessary.

There are no tests for this change. In general, it's hard to write tests
against the shape of the box tree, because it depends on the DOM. We
plan to test this via WPT tests once layout is complete.

1. https://drafts.csswg.org/css-tables/#table-internal-element

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2023-12-22 12:11:58 +00:00
Martin Robinson
f0b4162328
Add initial support for table box tree construction (#30799)
This is the first part of constructing the box tree for table layout. No
layout is actually done and the construction of tables is now hidden
behind a flag (in order to not regress WPT).  Notably, this does not
handle anonymous table part construction, when the DOM does not reflect
a fully-formed table. That's part two.

Progress toward #27459.

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Manish Goregaokar <manishsmail@gmail.com>
2023-12-05 11:10:45 +00:00
Oriol Brufau
733222fffe Further changes required by Servo 2023-11-24 08:57:14 +01:00
Martin Robinson
fd31da9102
Anonymous boxes that wrap inlines should not inherit overflow (#30579)
In legacy layout, anonymous text wrappers were inheriting the `overflow`
and `text-overflow` properties. This results in the creation of extra
clipping for these anonymous wrappers which could clip away floats. We
will likely implement `text-overflow` differently in non-legacy layout.

This change marks all legacy layout pseudo elements as "legacy" and also
adds a new pseudo element for non-legacy layout that does not inherit
`overflow`.

Fixes #30562.

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2023-10-19 13:43:55 +00:00
Ngo Iok Ui (Wu Yu Wei)
38a325cc1c
Add shell.background-color.rgba to prefs (#30488)
* Add shell.transparent-background.enabled to prefs

* Rename config to background_color

* Rename to background-color and.rgba add PrefValue::Array variant
2023-10-04 13:16:16 +00:00
Ennui Langeweile
80d9a2bb4f
Treat the keygen element as obsolete (#30429)
* Eradicate the `keygen` element

* Run `./mach fmt`

* Fix relevant Servo test

* Fix outdated manifest
2023-09-26 21:37:46 +00:00
Delan Azabani
c3c6c95a9b
constellation: crash to a new “sad tab” error page (#30290)
* constellation: crash to a new “sad tab” page

* check in resources/crash.html

* use a separate enum variant instead of keying on reason

* fmt + tidy

* rename Resource::Crash to Resource::CrashHTML

* clean up crash page and add details (reason + backtrace)

* avoid repeating crash errors in script::script_thread warn log

* make new LoadData init more idiomatic

* clarify comments and new fields

* fix doc comment style
2023-09-06 09:52:37 +00:00
Atbrakhi
37923d7fa3
remove minibrowser from prefs (#30127) 2023-08-19 08:29:44 +00:00
Martin Robinson
bce7622cde
Switch to rustls and webpki-roots (#30025)
This change replaces OpenSSL with rustls and also the manually curated
CA certs file with webpki-roots (effectively the same thing, but as a
crate).

Generally speaking the design of the network stack is the same. Changes:

- Code around certificate overrides needed to be refactored to work with
  rustls so the various thread-safe list of certificates is refactored
  into `CertificateErrorOverrideManager`
- hyper-rustls takes care of setting ALPN protocols for HTTP requests,
  so for WebSockets this is moved to the WebSocket code.
- The safe set of cypher suites is chosen, which seem to correspond to
  the "Modern" configuration from [1]. This can be adjusted later.
- Instead of passing a string of PEM CA certificates around, an enum is
  used that includes parsed Certificates (or the default which reads
  them from webpki-roots).
- Code for starting up an SSL server for testing is cleaned up a little,
  due to the fact that the certificates need to be overriden explicitly
  now. This is due to the fact that the `webpki` crate is more stringent
  with self-signed certificates than SSL (CA certificates cannot used as
  end-entity certificates). [2]

1. https://wiki.mozilla.org/Security/Server_Side_TLS
2. https://github.com/briansmith/webpki/issues/114

Fixes #7888.
Fixes #13749.
Fixes #26835.
Fixes #29291.
2023-08-08 14:00:10 +00:00
Atbrakhi
4bf2bca167
Minibrowser: Introduce minibrowser.enabled prefs (#29995)
* Introduce minibrowser.enabled prefs

* commit signoff
2023-07-13 14:24:33 +00:00
Martin Robinson
d31cdb682f
Make the choice of layout runtime setting
Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
2023-07-06 14:49:24 +02:00
Martin Robinson
c58d74fe62
Remove UWP / Hololens support 2023-07-05 09:12:09 +02:00
Emilio Cobos Álvarez
349edff768
It was removed from the spec and it's disabled everywhere.
This also removes the meta viewport support (which was implemented on top), but that also had a single test and is disabled everywhere, so I'm not too concerned, it can be implemented again if / when needed.
2023-06-30 16:28:21 +02:00
Martin Robinson
ec3b2826ae
Remove the DOMToTexture feature
This relies on WebRender's frame output API, `set_output_image_handler`,
which has been removed from the latest upstream [1]. It's sad to remove
this feature, which was probably a lot of work to implement, but it
seems difficult to patch WebRender to restore this functionality.

Fixes #29936.

1. https://hg.mozilla.org/mozilla-central/rev/361521e3c52324809553c555fb066d50f023d9bf
2023-06-27 11:39:52 +02:00
Martin Robinson
ae819d690e
Layout 2020: Remove the floats preference
Enable floats always. It doesn't make sense to have this preference as
it's a basic feature of an experimental layout engine.
2023-06-13 19:30:54 +02:00
Patrick Walton
cdec48328e Place floats in layout 2020, but don't flow text around the floats yet.
This commit puts floats behind the `layout.floats.enabled` pref, because of the
following issues and unimplemented features:

* Inline formatting contexts don't take floats into account, so text doesn't
  flow around the floats yet.

* Non-floated block formatting contexts don't take floats into account, so BFCs
  can overlap floats.

* Block formatting contexts that contain floats don't expand vertically to
  contain all the floats. That is, floats can stick out the bottom of BFCs,
  contra spec.
2023-06-03 06:09:21 +02:00
Alex Touchet
cfa716e1d0
Update servo.icns icon 2020-11-17 19:36:54 -08:00
Josh Matthews
7449f42306 Move action buttons above invalid certificate details. 2020-08-06 15:08:08 -04:00
Paul Rouget
0c00022ae0 Introduce shell.crash_reporter.enabled pref 2020-08-03 17:31:34 +02:00
bors-servo
c26a803fee
Auto merge of #27429 - asajeffrey:webxr-user-intent-pref, r=Manishearth
Add a pref to indicate user intent to enter webxr

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

Add a pref to indicate that the user has indicated intent to enter webxr.

---
<!-- 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 it's a command-line pref

<!-- 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-07-29 18:25:12 -04:00
Alan Jeffrey
4894e8f2c4 Add a pref to indicate user intent to enter webxr 2020-07-29 16:42:48 -05:00
Manish Goregaokar
9fe70e6b71 Move secondary view support into a pref 2020-07-27 20:45:42 -07:00
bors-servo
a242913629
Auto merge of #26710 - AbhishekSharma102:issue_26571, r=jdm,gterzian
Compile external scripts off the main thread

<!-- 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 #26571  (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-07-21 18:29:47 -04:00
AbhishekSharma102
1119dd119e Added off thread compilation
Co-authored-by: Gregory Terzian <2792687+gterzian@users.noreply.github.com>
Co-authored-by: Abhishek Sharma <20724848+AbhishekSharma102@users.noreply.github.com>
2020-07-21 16:20:51 -04:00
Paul Rouget
1b0de562ed Remove simpleservo antialiasing option, rely on pref 2020-07-21 06:30:06 +02:00
Paul Rouget
b8d6b1d52d Support package-prefs.json for libsimpleservo 2020-07-17 08:30:11 +02:00
bors-servo
ef4f5e5264
Auto merge of #27265 - jdm:hubs-stubs2, r=ferjm
Add stubs for HTMLCanvasElement.captureStream and WebRTC transceiver APIs

These stubs are hidden by default and only exist to allow getting past the relevant code that invokes them on hubs.mozilla.org.
2020-07-15 03:33:20 -04:00
Josh Matthews
e6cdfddea6 dom: Hide debugging extension methods behind a pref. 2020-07-14 22:39:59 -04:00
Josh Matthews
84efd56e57 dom: Add WebRTC transceiver stubs. 2020-07-14 12:48:45 -04:00
Josh Matthews
1ae117f67b dom: Add stub implementation for HTMLCanvasElement.captureStream. 2020-07-14 12:48:45 -04:00
bors-servo
a77a1f7bf4
Auto merge of #27235 - asajeffrey:webxr-sessionavailable, r=jdm
Add a sessionavailable event that allows content to enter an XR session without a user gesture

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

This allows servo to implement immersive web apps. https://immersive-web.github.io/webxr/#application-launch

---
<!-- 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 I'm not sure we should have a WPT for something this non-standard.

<!-- 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-07-10 18:14:10 -04:00
Alan Jeffrey
63663fada9 Add a sessionavailable event that allows content to enter an XR session without a user gesture 2020-07-10 14:09:18 -05:00
Josh Matthews
aa80f91399 dom: Use pref macro for IDL conditional guards. 2020-07-09 23:22:48 -04:00
Alan Jeffrey
a2142d7dbd Add support for webxr cubemap and spherical 360 rendering 2020-07-09 14:02:23 -05:00
Alex Touchet
5541186fa0
Delete Servo.ico 2020-07-06 14:47:27 -07:00
Alex Touchet
c379b65307
Update Servo logo files 2020-06-29 23:20:54 -07:00
Josh Matthews
2550600131 net: Use a POST request for allowing certs temporarily. 2020-06-09 16:51:21 -04:00
Josh Matthews
6a6662195e net: Add option to temporarily accept certs that failed the handshake. 2020-06-09 15:03:18 -04:00
Josh Matthews
0ce2aa917a net: Pass certs that fail the SSL handshake out of the network layer. 2020-06-09 15:03:18 -04:00