servo / servo/html5ever

selectedcontent issues

Open
#712 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.6k
Forks
288
Avg merge
2d 22h
Merged PRs (30d)
8

Description

There are a few issues with the selectedcontent implementation of html5ever:

  • The implementation of "clone an option into selectedcontent" is wrong. It does not create a new documentfragment but reparents options onto the root of the current document. I'm not sure how that could've happened, I guess that since #560 was opened the spec has been iterated on.
  • https://github.com/whatwg/html/commit/4ce63af1 removes the </option> transition, and says that the algorithm for "maybe clone an option" needs to be run everytime any option is popped off the stack of open elements. html5ever is lagging behind here, and it seems that runnign something everytime the stack of open elements is truncated requires a larger refactor.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the selectedcontent implementation in html5ever and compare its option-cloning behavior with the WHATWG commit 4ce63af1. Done means cloning creates a new document fragment and the “maybe clone an option” algorithm runs whenever an option is popped from the stack of open elements.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.