Skip to content
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

Implement srcdoc support for iframes #4767

Closed
jdm opened this issue Jan 29, 2015 · 1 comment
Closed

Implement srcdoc support for iframes #4767

jdm opened this issue Jan 29, 2015 · 1 comment
Labels

Comments

@jdm
Copy link
Member

@jdm jdm commented Jan 29, 2015

Explanation: https://bocoup.com/blog/third-party-javascript-development-future#iframe-srcdoc
Spec:

Code:

  • components/script/dom/htmliframeelement.rs
  • components/script/script_thread.rs

Basic test:
./mach test-wpt tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/srcdoc_process_attributes.html

@jdm jdm added the A-content/dom label Jan 29, 2015
@jdm
Copy link
Member Author

@jdm jdm commented Oct 25, 2017

This can probably take advantage of the infrastruture that was developed for #17083.

@tigercosmos tigercosmos self-assigned this Jun 7, 2018
@amj23897 amj23897 mentioned this issue Oct 29, 2019
3 of 3 tasks complete
bors-servo added a commit that referenced this issue Nov 4, 2019
Implement srcdoc support for iframes

<!-- Please describe your changes on the following line: -->
This PR contains changes related to adding srcdoc attribute parsing support for iframes in Servo. The following changes have been made:

- uncomment the [srcdoc](https://github.com/servo/servo/blob/f63b404e0cbf30380c4043700861110d06e548bb/components/script/dom/webidls/HTMLIFrameElement.webidl#L10-L11) WebIDL attribute, and implement the attribute getter.
- add a field to [LoadData](https://github.com/servo/servo/blob/e6b271d32981ad95442c029bf72bd35efc88f9c5/components/script_traits/lib.rs#L137-L164) for storing the srcdoc contents when loading a srcdoc iframe.
- (partially) implemented a new `page_load_about_srcdoc` method to `script_thread.rs` which loads the special `about:srcdoc` URL [per the specification](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes) and takes the srcdoc contents as an argument
- call this new method from [handle_new_layout](https://github.com/servo/servo/blob/e6b271d32981ad95442c029bf72bd35efc88f9c5/components/script/script_thread.rs#L2409-L2412) when it's detected that a srcdoc iframe is being loaded
- (partially) in [attribute_mutated](https://github.com/servo/servo/blob/e6b271d32981ad95442c029bf72bd35efc88f9c5/components/script/dom/htmliframeelement.rs#L560), ensure that changing the `srcdoc` attribute of an iframe element [follows the specification](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element:the-iframe-element-9).

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes are a part of fix #4767  (GitHub issue number if applicable)

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo added a commit that referenced this issue Nov 4, 2019
Implement srcdoc support for iframes

<!-- Please describe your changes on the following line: -->
This PR contains changes related to adding srcdoc attribute parsing support for iframes in Servo. The following changes have been made:

- uncomment the [srcdoc](https://github.com/servo/servo/blob/f63b404e0cbf30380c4043700861110d06e548bb/components/script/dom/webidls/HTMLIFrameElement.webidl#L10-L11) WebIDL attribute, and implement the attribute getter.
- add a field to [LoadData](https://github.com/servo/servo/blob/e6b271d32981ad95442c029bf72bd35efc88f9c5/components/script_traits/lib.rs#L137-L164) for storing the srcdoc contents when loading a srcdoc iframe.
- (partially) implemented a new `page_load_about_srcdoc` method to `script_thread.rs` which loads the special `about:srcdoc` URL [per the specification](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes) and takes the srcdoc contents as an argument
- call this new method from [handle_new_layout](https://github.com/servo/servo/blob/e6b271d32981ad95442c029bf72bd35efc88f9c5/components/script/script_thread.rs#L2409-L2412) when it's detected that a srcdoc iframe is being loaded
- (partially) in [attribute_mutated](https://github.com/servo/servo/blob/e6b271d32981ad95442c029bf72bd35efc88f9c5/components/script/dom/htmliframeelement.rs#L560), ensure that changing the `srcdoc` attribute of an iframe element [follows the specification](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element:the-iframe-element-9).

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes are a part of fix #4767  (GitHub issue number if applicable)

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo added a commit that referenced this issue Nov 5, 2019
Implement srcdoc support for iframes

<!-- Please describe your changes on the following line: -->
This PR contains changes related to adding srcdoc attribute parsing support for iframes in Servo. The following changes have been made:

- uncomment the [srcdoc](https://github.com/servo/servo/blob/f63b404e0cbf30380c4043700861110d06e548bb/components/script/dom/webidls/HTMLIFrameElement.webidl#L10-L11) WebIDL attribute, and implement the attribute getter.
- add a field to [LoadData](https://github.com/servo/servo/blob/e6b271d32981ad95442c029bf72bd35efc88f9c5/components/script_traits/lib.rs#L137-L164) for storing the srcdoc contents when loading a srcdoc iframe.
- (partially) implemented a new `page_load_about_srcdoc` method to `script_thread.rs` which loads the special `about:srcdoc` URL [per the specification](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes) and takes the srcdoc contents as an argument
- call this new method from [handle_new_layout](https://github.com/servo/servo/blob/e6b271d32981ad95442c029bf72bd35efc88f9c5/components/script/script_thread.rs#L2409-L2412) when it's detected that a srcdoc iframe is being loaded
- (partially) in [attribute_mutated](https://github.com/servo/servo/blob/e6b271d32981ad95442c029bf72bd35efc88f9c5/components/script/dom/htmliframeelement.rs#L560), ensure that changing the `srcdoc` attribute of an iframe element [follows the specification](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element:the-iframe-element-9).

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes are a part of fix #4767  (GitHub issue number if applicable)

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo added a commit that referenced this issue Nov 12, 2019
Implement srcdoc support for iframes

<!-- Please describe your changes on the following line: -->
This PR contains changes related to adding srcdoc attribute parsing support for iframes in Servo. The following changes have been made:

- uncomment the [srcdoc](https://github.com/servo/servo/blob/f63b404e0cbf30380c4043700861110d06e548bb/components/script/dom/webidls/HTMLIFrameElement.webidl#L10-L11) WebIDL attribute, and implement the attribute getter.
- add a field to [LoadData](https://github.com/servo/servo/blob/e6b271d32981ad95442c029bf72bd35efc88f9c5/components/script_traits/lib.rs#L137-L164) for storing the srcdoc contents when loading a srcdoc iframe.
- (partially) implemented a new `page_load_about_srcdoc` method to `script_thread.rs` which loads the special `about:srcdoc` URL [per the specification](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes) and takes the srcdoc contents as an argument
- call this new method from [handle_new_layout](https://github.com/servo/servo/blob/e6b271d32981ad95442c029bf72bd35efc88f9c5/components/script/script_thread.rs#L2409-L2412) when it's detected that a srcdoc iframe is being loaded
- (partially) in [attribute_mutated](https://github.com/servo/servo/blob/e6b271d32981ad95442c029bf72bd35efc88f9c5/components/script/dom/htmliframeelement.rs#L560), ensure that changing the `srcdoc` attribute of an iframe element [follows the specification](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element:the-iframe-element-9).

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes are a part of fix #4767  (GitHub issue number if applicable)

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo added a commit that referenced this issue Nov 12, 2019
Implement srcdoc support for iframes

<!-- Please describe your changes on the following line: -->
This PR contains changes related to adding srcdoc attribute parsing support for iframes in Servo. The following changes have been made:

- uncomment the [srcdoc](https://github.com/servo/servo/blob/f63b404e0cbf30380c4043700861110d06e548bb/components/script/dom/webidls/HTMLIFrameElement.webidl#L10-L11) WebIDL attribute, and implement the attribute getter.
- add a field to [LoadData](https://github.com/servo/servo/blob/e6b271d32981ad95442c029bf72bd35efc88f9c5/components/script_traits/lib.rs#L137-L164) for storing the srcdoc contents when loading a srcdoc iframe.
- (partially) implemented a new `page_load_about_srcdoc` method to `script_thread.rs` which loads the special `about:srcdoc` URL [per the specification](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes) and takes the srcdoc contents as an argument
- call this new method from [handle_new_layout](https://github.com/servo/servo/blob/e6b271d32981ad95442c029bf72bd35efc88f9c5/components/script/script_thread.rs#L2409-L2412) when it's detected that a srcdoc iframe is being loaded
- (partially) in [attribute_mutated](https://github.com/servo/servo/blob/e6b271d32981ad95442c029bf72bd35efc88f9c5/components/script/dom/htmliframeelement.rs#L560), ensure that changing the `srcdoc` attribute of an iframe element [follows the specification](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element:the-iframe-element-9).

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes are a part of fix #4767  (GitHub issue number if applicable)

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.