servo/components/constellation
Simon Wülker 0e99539dab
Support single-value <select> elements (#35684)
https://github.com/user-attachments/assets/9aba75ff-4190-4a85-89ed-d3f3aa53d3b0



Among other things this adds a new `EmbedderMsg::ShowSelectElementMenu`
to tell the embedder to display a select popup at the given location.

This is a draft because some small style adjustments need to be made:
* the select element should always have the width of the largest option
* the border should be part of the shadow tree

Apart from that, it's mostly ready for review.

<details><summary>HTML for demo video</summary>

```html
<html>

<body>
<select id="c" name="choice">
  <option value="first">First Value</option>
  <option value="second">Second Value</option>
  <option value="third">Third Value</option>
</select>
</body>
</html>
```
</details>

---

<!-- 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] Part of https://github.com/servo/servo/issues/3551
- [ ] 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. -->

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-04-03 12:11:55 +00:00
..
browsingcontext.rs base: Finish rename of TopLevelBrowsingContextId to WebViewId (#35896) 2025-03-11 10:56:10 +00:00
Cargo.toml Organize component Cargo.toml dependencies (#36224) 2025-03-30 19:03:54 +00:00
constellation.rs libservo: Remove a couple EmbedderMethods (#36276) 2025-04-01 22:59:50 +00:00
event_loop.rs compositor: Remove the script channel from the compositor (#36089) 2025-03-23 11:19:27 +00:00
lib.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
logging.rs Create a constellation_traits crate (#36088) 2025-03-22 15:49:08 +00:00
pipeline.rs libservo: Remove a couple EmbedderMethods (#36276) 2025-04-01 22:59:50 +00:00
sandboxing.rs api: Flatten and simplify Servo preferences (#34966) 2025-01-14 13:54:06 +00:00
serviceworker.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
session_history.rs Migrate to the 2024 edition (#35755) 2025-03-13 10:28:11 +00:00
tracing.rs Support single-value <select> elements (#35684) 2025-04-03 12:11:55 +00:00
webview.rs base: Finish rename of TopLevelBrowsingContextId to WebViewId (#35896) 2025-03-11 10:56:10 +00:00