Skip to content

Navigation Menu

Sign in
Sign up

Implement <select> parser "relaxation" — for "customizable" <select> - #113

Merged
sideshowbarker merged 1 commit into
master from
sideshowbarker/relaxed-select-parsing
Mar 17, 2026
Merged

Implement <select> parser "relaxation" — for "customizable" <select> #113
sideshowbarker merged 1 commit into
master from
sideshowbarker/relaxed-select-parsing

Conversation

@sideshowbarker

@sideshowbarker sideshowbarker commented Dec 30, 2025
edited
Loading

Copy link
Copy Markdown
Member

Relax select parsing to allow more child elements, and handle the selectedcontent element for cloning option content.

This comment was marked as outdated.

This comment was marked as outdated.

@hsivonen hsivonen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry about the delay.

As discussed on Matrix, I think the way this patch makes the cloning work on what the parser saw is incorrect and the spec instead requires the cloning to work on what's in the live DOM, which may be different if the option element opens, the network stalls, setTimeout modifies the DOM, and network resumes.

Further remarks in an inline comment.

sideshowbarker reacted with thumbs up emoji
Comment thread src/nu/validator/htmlparser/sax/SAXTreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/sax/SAXTreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/impl/ElementName.java Outdated
sideshowbarker force-pushed the sideshowbarker/relaxed-select-parsing branch 5 times, most recently from f7b4c0f to 87fe37a Compare February 2, 2026 05:35
Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java Outdated

@hsivonen hsivonen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm sorry that I've been in a very bad time management loop.

This looks very good, but there are some minor issues.

Thank you!

Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/impl/TreeBuilder.java
Comment thread src/nu/validator/htmlparser/dom/DOMTreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/sax/SAXTreeBuilder.java
Comment thread src/nu/validator/htmlparser/sax/SAXTreeBuilder.java Outdated
Comment thread src/nu/validator/htmlparser/xom/XOMTreeBuilder.java
Comment thread src/nu/validator/htmlparser/xom/XOMTreeBuilder.java Outdated

This comment was marked as outdated.

sideshowbarker force-pushed the sideshowbarker/relaxed-select-parsing branch from 66f24d6 to 8ad0683 Compare March 12, 2026 14:12

Copy link
Copy Markdown
Member Author

@hsivonen OK, all comments now resolved, I think. Ready for you to review again.

Comment thread gwt-src/nu/validator/htmlparser/gwt/BrowserTreeBuilder.java Outdated

@hsivonen hsivonen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's merge this. Thank you and sorry about delay.

@hsivonen hsivonen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thank you!

Relax "select"-element parsing to allow more child elements, and handle
the "selectedcontent" element for cloning "option"-element content.
sideshowbarker force-pushed the sideshowbarker/relaxed-select-parsing branch from 39f24fc to f275246 Compare March 17, 2026 06:11
sideshowbarker merged commit b5b1812 into master Mar 17, 2026
12 checks passed
sideshowbarker deleted the sideshowbarker/relaxed-select-parsing branch March 17, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hsivonen hsivonen hsivonen approved these changes
@alphan102 alphan102 Awaiting requested review from alphan102

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /