Skip to content

Conversation

@PaulTreitel
Copy link
Contributor

Adding error messages across script/dom/subtlecrypto/ecdh_operation.rs.

Testing: No tests as this is just adding error messages
Fixes: (part of) #40756

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Dec 22, 2025
@jdm jdm requested a review from kkoyung December 22, 2025 07:13
Copy link
Member

@kkoyung kkoyung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good once the merge conflict is resolved.

@servo-highfive servo-highfive added S-needs-rebase There are merge conflict errors. and removed S-awaiting-review There is new code that needs to be reviewed. labels Dec 22, 2025
kkoyung and others added 6 commits December 22, 2025 13:52
…ks (servo#41428)

Add several helper functions to JsonWebKey to handle common base64url
decoding tasks across multiple algorithms. Those helper functions
include:

- `JsonWebKey::decode_optional_string_field`: decode optional field
- `JsonWebKey::decode_required_string_field`: decode required field
- `JsonWebKey::decode_primes_from_oth_field`: decode oth field to primes

These help simplify our code for importing keys in JsonWebKey format.

Testing: Refactoring. Existing tests suffice.

Signed-off-by: Kingsley Yung <[email protected]>
Expose `replace_host_table` via test_util so it can be reused by other
crates, notably libservo tests.
    
This allows tests to map arbitrary host names to localhost, so loading
of
arbitrary sites can be done via the lightweight http server (without
reaching
the external network).
    
Arbitrary sites are needed for upcoming `SiteDataManager` site grouping
by
domain.

Testing: A new integration test has been added

Signed-off-by: Jan Varga <[email protected]>
…rvo#41475)

When the original display of an absolutely positioned element changes,
the static position can be affected. However, the static position is
only used when both insets in the same axis are `auto`.

Therefore, this patch avoids dirtying the box tree when both axes have a
non-auto inset.

Testing: Not needed, this should have no observable behavior change

Signed-off-by: Oriol Brufau <[email protected]>
…k` around `FontGroup` (servo#41449)

This change reworks the logic for finding font fallbacks to make it
simpler. I was involved with writing the code for `FontGroupFamily` and
`FontGroupFamilyMember` and I still struggle a bit with understanding
it, so I've chosen to do this. In addition, the change is in preparation
for more flexible font fallback (servo#41426).

The main changes here are:
 1. Move the logic for creating a new descriptor with variations into
    the Font constructor.
 2. Add some more general methods to `FontGroupFamily` such as a
    template iterator.
 3. Use `OnceLock` to avoid a convoluted code structure because of
    mutability and also having boolean "loaded" members. This is what
    `OnceLock` and `OnceCell` are for!
 4. Rename `FontGroupFamilyMember` to `FontGroupFamilyTemplate` to
    stress that it is one template of a particular `FontGroupFamily`.

Testing: This should not change behavior so is covered by existing WPT
tests.

---------

Signed-off-by: Martin Robinson <[email protected]>
@servo-highfive servo-highfive added S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors. and removed S-needs-rebase There are merge conflict errors. labels Dec 22, 2025
@servo-highfive servo-highfive added S-needs-rebase There are merge conflict errors. and removed S-needs-rebase There are merge conflict errors. labels Dec 22, 2025
@servo-highfive servo-highfive removed the S-needs-rebase There are merge conflict errors. label Dec 22, 2025
@PaulTreitel
Copy link
Contributor Author

I apologize if I mucked up this PR. My git skills are underwhelming at best and I wasn't 100% sure what to do. Let me know if there's something I need to fix.

@webbeef
Copy link
Contributor

webbeef commented Dec 22, 2025

You need to sign off your commit (use git commit -s -m "my commit message").

Copy link
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just waiting on a signed version of this commit and then one comment:

let public_key_err =
Error::Operation(Some("Failed to export public key".to_string()));
let private_key_err =
Error::Operation(Some("Failed to export private key".to_string()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth making these functions so that you don't always allocate here.

Suggested change
Error::Operation(Some("Failed to export private key".to_string()));
let public_key_err = ||
Error::Operation(Some("Failed to export public key".to_string()));
let private_key_err = ||
Error::Operation(Some("Failed to export private key".to_string()));

@kkoyung
Copy link
Member

kkoyung commented Dec 30, 2025

I apologize if I mucked up this PR. My git skills are underwhelming at best and I wasn't 100% sure what to do. Let me know if there's something I need to fix.

@PaulTreitel I suggest you roll back to your commit, and then rebase on the main branch from there. This should make your branch cleaner.

# Checkout and pull main branch to get latest commits
git checkout main
git pull

# Checkout your branch
git checkout issue-40756/ecdh

# Make a backup branch (just in case you need to rescue your work).
git branch issue-40756/ecdh/backup

# Roll back to your first commit
git reset --hard 8be314002c2

# Rebase on the main branch
git rebase main

# Resolve the conflict in your editor

# Continue the rebase
git add components/script/dom/subtlecrypto/ecdh_operation.rs
git rebase --continue

You can then do other changes and make new commit. You will need a force push (git push -f) when you finish your changes because of the rebasing.

Feel free to ask if you encounter any problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants