diff options
author | bors-servo <servo-ops@mozilla.com> | 2021-08-07 14:15:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-07 14:15:24 -0400 |
commit | cc1f89863ce0e93ff7ce4f4855bd888df67a51fb (patch) | |
tree | 054acebad9ac93397fdf9b2fa1025f94caabf07b /components/script_plugins/lib.rs | |
parent | bd92fad81a24d08208a5739cad4bde6eb58d6ce8 (diff) | |
parent | 3e56446dd5d1d4ee09a55ce9dbdaeb7776cfa8ca (diff) | |
download | servo-cc1f89863ce0e93ff7ce4f4855bd888df67a51fb.tar.gz servo-cc1f89863ce0e93ff7ce4f4855bd888df67a51fb.zip |
Auto merge of #28560 - yvt:fix-nosrc-iframe-load-2, r=jdm
The "process the iframe attributes" steps shouldn't enqueue the iframe load event steps (anymore)
Fixes `HtmlIFrameElement::process_the_iframe_attributes` (which implements [the "process the `iframe` attributes" steps][1]) queueing an element task to execute [the iframe load event steps][2], which causes another `load` event to be fired on the iframe in addition to the one asynchronously generated by [the "create a new nested browsing context" steps][3].
The following timeline shows what happens when a `src`-less `iframe` element is parser-inserted and which step this PR intends to remove. (This does not necessarily match Servo's current behavior exactly - Most notably, `T2`'s steps might run late because the "create a nested browsing context" steps' implementation actually [parses][5] a blank HTML document.)
```diff
T0 (networking task source)
| Insert the `iframe` element, causing the following steps to be executed:
| | Create a new nested browsing context
| | | Create a new browsing context
| | | | Completely finish loading the `iframe` element's `Document`
| | | | | Queue element task T2.
| |
| | Process the `iframe` attributes
- | | | Queue element task T1
- T1 (DOM manipulation task source)
- | Execute the `iframe` load event steps
- | | Fire `load` for the `iframe` element
T2 (DOM manipulation task source)
| Execute the `iframe` load event steps
| | Fire `load` for the `iframe` element
```
This bug likely originates from [a bug][4] in the specification.
[1]: https://html.spec.whatwg.org/multipage/#process-the-iframe-attributes
[2]: https://html.spec.whatwg.org/multipage/#iframe-load-event-steps
[3]: https://html.spec.whatwg.org/multipage/#creating-a-new-nested-browsing-context
[4]: https://github.com/whatwg/html/pull/5797
[5]: https://html.spec.whatwg.org/multipage/#the-end
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24501, #15727, and the `cross-origin-objects-on-new-window.html` part of #26299
---
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___
Diffstat (limited to 'components/script_plugins/lib.rs')
0 files changed, 0 insertions, 0 deletions