script: Update shadow tree after an <option> element is picked to update visuals of <select> element - #46386
Conversation
|
🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#61158) with upstreamable changes. |
|
@simonwuelker does this look good? |
|
🔨 Triggering try run (#28975862353) for Linux (WPT) |
|
Test results for linux-wpt from try job (#28975862353): Flaky unexpected result (39)
Stable unexpected results that are known to be intermittent (19)
|
|
✨ Try run (#28975862353) succeeded. |
|
✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#61158) title and body. |
mrobinson
left a comment
There was a problem hiding this comment.
The new test should probably go into tests/wpt/tests/html/rendering/replaced-elements/the-select-element/ as this is about rendering and not semantics.
| <select id="select"> | ||
| <option id="20" value="20">20</option> | ||
| <option id="10" value="10">10</option> | ||
| </select> No newline at end of file |
There was a problem hiding this comment.
This file is missing an ending newline, which Git doesn't really like. Also please add a header to this file -- you can find other examples of how reference files should look by looking through these directories.
| <option id="20" value="20">20</option> | ||
| <option id="10" value="10">10</option> | ||
| </select> No newline at end of file |
There was a problem hiding this comment.
Would it be possible to use selected="20" here instead of changing the option order?
There was a problem hiding this comment.
I kind of based format of a PR for a similar issue -> https://github.com/servo/servo/pull/46230/changes
Also, doing selected=20 or value=20 don't work. However, putting the selected attribute on the 20 option still works so I could potentially do that instead of changing option order.
|
✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#61158) title and body. |
So I had actually based my tests of this former PR which fixes a very similar issue and has almost the same ref file -> https://github.com/web-platform-tests/wpt/pull/61062/changes so I was wondering what should be done because in either case I think it makes sense to have the tests for both PRs in the same folder (they test almost the same thing). |
Feel free to move my test over as well if you want, |
…ript Signed-off-by: Avi Raj Kapila <[email protected]>
36687d2 to
a073781
Compare
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#61158). |
…sible-state to correct location Signed-off-by: Avi Raj Kapila <[email protected]>
2bb2c5d to
95e8a24
Compare
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#61158). |
1 similar comment
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#61158). |
Previously, if a user uses
<script>to make a<option>element selected, the change wouldn't get reflected for the<select>element. This is because there was nothing that updated the shadow tree. I thus updatedhtmloptionelement.rsmaking thepick_if_selected_and_resetfunction use&mut JSContextand passing the cx to aupdate_shadow_tree()call after picking the selected option.Testing: This change adds
html/semantics/forms/the-select-element/select-setting-selected-option-from-js-updates-visible-state.html.Fixes: #46356