-
-
Notifications
You must be signed in to change notification settings - Fork 989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LibWeb: Implement :modal pseudo class #345
LibWeb: Implement :modal pseudo class #345
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but can we get a test for this?
So there's a WPT test for it, but ladybirds WPT infrastructure is a bit confusing and doesnt' seem complete. Where would an internal test for this go and what would it look like? Also any ideas on the leaks in the CI? @AtkinsSJ |
I wouldn't worry too much about the leak, that seems very unrelated. We rely a lot on internal tests for now. They go in Tests/LibWeb. This would probably make sense as a layout test, so you'd create an html file in there with two dialogs, one modal and one not, and apply some CSS that affects only one, in a way that shows up in the layout. There's a |
329070e
to
aeec74a
Compare
@AtkinsSJ is that test the sort of thing you were looking for? |
Adds the :modal pseudo class which matches dialogs opened with showModal().
aeec74a
to
b0d30f9
Compare
Apologies, I didn't spot that. After some debugging I've found that this change in rendering while a regression visually is actually correct. So I've updated the baseline for it. The below CSS is used in Default.css and I believe there's a bug in the implementation in some of these CSS properties. Which leads to the "incorrect" rendering of modal dialogs after this change.
|
Adds the
:modal
pseudo class which matches dialogs opened with showModal().Passes all but 1 assertions within the first subtest of https://wpt.live/css/selectors/modal-pseudo-class.html
That final assertion seems to be failing due to a spec bug: whatwg/html#10452
I'll do a follow up PR to fix this in Ladybird once the spec is updated.