Skip to content

IFrame elements now manage FrameIds rather than the constellation.#13498

Merged
bors-servo merged 1 commit intoservo:masterfrom
asajeffrey:script-iframe-stores-frameid
Oct 7, 2016
Merged

IFrame elements now manage FrameIds rather than the constellation.#13498
bors-servo merged 1 commit intoservo:masterfrom
asajeffrey:script-iframe-stores-frameid

Conversation

@asajeffrey
Copy link
Copy Markdown
Contributor

@asajeffrey asajeffrey commented Sep 29, 2016

This PR stores the FrameId as well as the PipelineId in an html iframe. The iframes are now responsible for creating frame ids, not the constellation.

This is the first step in fixing #633, because it means we know the frame id of each script thread when it is created. It also means we can share the frame id, for example using it in the debugger.

cc @jdm, @ConnorGBrewster and @ejpbruel.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because it's a refactoring.

This change is Reviewable

@asajeffrey asajeffrey added I-refactor No impact; the issue is one of maintainability or tidiness. Proposed solution requires refactoring. A-content/script Related to the script thread A-constellation Involves the constellation labels Sep 29, 2016
@highfive
Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/htmliframeelement.rs, components/script_traits/lib.rs, components/script_traits/lib.rs, components/script/dom/bindings/trace.rs

@highfive
Copy link
Copy Markdown

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 29, 2016
Copy link
Copy Markdown
Member

@glennw glennw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - just one comment request :)

next_pipeline_namespace_id: PipelineNamespaceId(0),
root_frame_id: None,
next_frame_id: FrameId(0),
next_pipeline_namespace_id: PipelineNamespaceId(1),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment explaining why this starts at 1?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@glennw
Copy link
Copy Markdown
Member

glennw commented Oct 6, 2016

@asajeffrey Nice! Squash and r=me

@jdm jdm added S-needs-squash Some (or all) of the commits in the PR should be combined. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 6, 2016
@asajeffrey asajeffrey force-pushed the script-iframe-stores-frameid branch from 3a06846 to b400461 Compare October 6, 2016 23:01
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 6, 2016
@asajeffrey
Copy link
Copy Markdown
Contributor Author

Squashed. Thanks! @bors-servo r=glennw

@bors-servo
Copy link
Copy Markdown
Contributor

📌 Commit b400461 has been approved by glennw

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-squash Some (or all) of the commits in the PR should be combined. labels Oct 6, 2016
@asajeffrey asajeffrey mentioned this pull request Oct 6, 2016
3 tasks
@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit b400461 with merge 12973e5...

bors-servo pushed a commit that referenced this pull request Oct 6, 2016
IFrame elements now manage FrameIds rather than the constellation.

<!-- Please describe your changes on the following line: -->

This PR stores the FrameId as well as the PipelineId in an html iframe. The iframes are now responsible for creating frame ids, not the constellation.

This is the first step in fixing #633, because it means we know the frame id of each script thread when it is created. It also means we can share the frame id, for example using it in the debugger.

cc @jdm, @ConnorGBrewster and @ejpbruel.

---
<!-- 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 do not require tests because it's a refactoring.

<!-- 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/13498)
<!-- Reviewable:end -->
@bors-servo
Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 7, 2016
@bors-servo
Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #13596) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Oct 7, 2016
@asajeffrey asajeffrey force-pushed the script-iframe-stores-frameid branch from b400461 to 466dcd8 Compare October 7, 2016 16:50
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Oct 7, 2016
@asajeffrey asajeffrey force-pushed the script-iframe-stores-frameid branch from 466dcd8 to 8ecb13b Compare October 7, 2016 16:56
@asajeffrey
Copy link
Copy Markdown
Contributor Author

Rebased, and fixed test failure due to left-over fake root pipeline. @bors-servo r=glennw

@bors-servo
Copy link
Copy Markdown
Contributor

📌 Commit 8ecb13b has been approved by glennw

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors. labels Oct 7, 2016
@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit 8ecb13b with merge faecd9d...

bors-servo pushed a commit that referenced this pull request Oct 7, 2016
IFrame elements now manage FrameIds rather than the constellation.

<!-- Please describe your changes on the following line: -->

This PR stores the FrameId as well as the PipelineId in an html iframe. The iframes are now responsible for creating frame ids, not the constellation.

This is the first step in fixing #633, because it means we know the frame id of each script thread when it is created. It also means we can share the frame id, for example using it in the debugger.

cc @jdm, @ConnorGBrewster and @ejpbruel.

---
<!-- 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 do not require tests because it's a refactoring.

<!-- 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/13498)
<!-- Reviewable:end -->
@bors-servo
Copy link
Copy Markdown
Contributor

💔 Test failed - mac-dev-unit

@highfive highfive added S-tests-failed The changes caused existing tests to fail. S-awaiting-review There is new code that needs to be reviewed. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. S-tests-failed The changes caused existing tests to fail. labels Oct 7, 2016
@asajeffrey asajeffrey force-pushed the script-iframe-stores-frameid branch from d89d2f3 to f53408d Compare October 7, 2016 19:11
@asajeffrey
Copy link
Copy Markdown
Contributor Author

Fixed failing unit tests by adding a TEST_PIPELINE_ID. @bors-servo r=glennw (on IRC).

@bors-servo
Copy link
Copy Markdown
Contributor

📌 Commit f53408d has been approved by glennw

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 7, 2016
@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit f53408d with merge d01a866...

bors-servo pushed a commit that referenced this pull request Oct 7, 2016
IFrame elements now manage FrameIds rather than the constellation.

<!-- Please describe your changes on the following line: -->

This PR stores the FrameId as well as the PipelineId in an html iframe. The iframes are now responsible for creating frame ids, not the constellation.

This is the first step in fixing #633, because it means we know the frame id of each script thread when it is created. It also means we can share the frame id, for example using it in the debugger.

cc @jdm, @ConnorGBrewster and @ejpbruel.

---
<!-- 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 do not require tests because it's a refactoring.

<!-- 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/13498)
<!-- Reviewable:end -->
@bors-servo
Copy link
Copy Markdown
Contributor

@bors-servo bors-servo merged commit f53408d into servo:master Oct 7, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-constellation Involves the constellation A-content/script Related to the script thread I-refactor No impact; the issue is one of maintainability or tidiness. Proposed solution requires refactoring.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants