Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImprove Spec compliance of the iframe "name" attribute #20713
Closed
Comments
bors-servo
added a commit
that referenced
this issue
Jun 6, 2018
[WIP] Implement Window.open and related infrastructure <!-- Please describe your changes on the following line: --> Implement https://html.spec.whatwg.org/multipage/window-object.html#window-open-steps and related infra... --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach build-geckolib` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #20673 fix #13241 fix #20887 fix #20713 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20678) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Jun 6, 2018
[WIP] Implement Window.open and related infrastructure <!-- Please describe your changes on the following line: --> Implement https://html.spec.whatwg.org/multipage/window-object.html#window-open-steps and related infra... --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach build-geckolib` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #20673 fix #13241 fix #20887 fix #20713 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20678) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Jun 6, 2018
[WIP] Implement Window.open and related infrastructure <!-- Please describe your changes on the following line: --> Implement https://html.spec.whatwg.org/multipage/window-object.html#window-open-steps and related infra... --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach build-geckolib` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #20673 fix #13241 fix #20887 fix #20713 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20678) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Jun 7, 2018
[WIP] Implement Window.open and related infrastructure <!-- Please describe your changes on the following line: --> Implement https://html.spec.whatwg.org/multipage/window-object.html#window-open-steps and related infra... --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach build-geckolib` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #20673 fix #13241 fix #20887 fix #20713 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20678) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Jul 19, 2018
Implement Window.open and related infrastructure <!-- Please describe your changes on the following line: --> Implement https://html.spec.whatwg.org/multipage/window-object.html#window-open-steps and related infra... --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach build-geckolib` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #20673 fix #13241 fix #20887 fix #20713 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20678) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Aug 10, 2018
Implement Window.open and related infrastructure <!-- Please describe your changes on the following line: --> Implement https://html.spec.whatwg.org/multipage/window-object.html#window-open-steps and related infra... --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach build-geckolib` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #20673 fix #13241 fix #20887 fix #20713 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20678) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Aug 10, 2018
Implement Window.open and related infrastructure <!-- Please describe your changes on the following line: --> Implement https://html.spec.whatwg.org/multipage/window-object.html#window-open-steps and related infra... --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach build-geckolib` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #20673 fix #13241 fix #20887 fix #20713 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20678) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Aug 10, 2018
Implement Window.open and related infrastructure <!-- Please describe your changes on the following line: --> Implement https://html.spec.whatwg.org/multipage/window-object.html#window-open-steps and related infra... --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach build-geckolib` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #20673 fix #13241 fix #20887 fix #20713 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20678) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current behavior:
Currently,
Iframe.SetNameonly "sets the name" if the iframe has a browsing context/window proxy:servo/components/script/dom/htmliframeelement.rs
Line 473 in bf66767
So when the "name" attribute is mutated before the iframe is inserted in the document, this has no effect:
servo/components/script/dom/htmliframeelement.rs
Line 527 in bf66767
Tests:
Some tests assume the attribute can be mutated "with effect" before the iframe has been inserted in the document:
servo/tests/wpt/web-platform-tests/html/browsers/windows/noreferrer-window-name.html
Line 43 in bf66767
There might be other tests testing this more specifically, or such a test could be written otherwise.
Desired behavior:
Per the spec "When the browsing context is created, if the attribute is present, the browsing context name must be set to the value of this attribute;", and after that "Whenever the name attribute is set, the nested browsing context's name must be changed to the new value. If the attribute is removed, the browsing context name must be set to the empty string." https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-iframe-name
"When an iframe element is inserted into a document that has a browsing context, the user agent must create a new browsing context, set the element's nested browsing context to the newly-created browsing context, and then process the iframe attributes for the "first time". https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element
Currently, "process_the_iframe_attributes" doesn't involve any previously set name, so it should be updated to set the name of the newly created browsing context to be the "name" attribute of the iframe:
servo/components/script/dom/htmliframeelement.rs
Line 206 in bf66767