Skip to content

Excise SubpageId and use only PipelineIds#11698

Merged
bors-servo merged 3 commits intoservo:masterfrom
aneeshusa:remove-subpage-id
Sep 14, 2016
Merged

Excise SubpageId and use only PipelineIds#11698
bors-servo merged 3 commits intoservo:masterfrom
aneeshusa:remove-subpage-id

Conversation

@aneeshusa
Copy link
Copy Markdown
Contributor

@aneeshusa aneeshusa commented Jun 10, 2016

SubpageId was originally introduced in 2013 to help iframes keep track of
their associated (children) pipelines. However, since each pipeline
already has a PipelineId, and those are unique, those are sufficient
to keep track of children.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix Remove SubpageId #11694 (github issue number if applicable).
  • There are tests for these changes OR
  • These changes do not require tests because refactoring

This change is Reviewable

@highfive
Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @asajeffrey: components/constellation/pipeline.rs, components/webdriver_server/lib.rs, components/constellation/constellation.rs
  • @jgraham: components/webdriver_server/lib.rs
  • @KiChjang: components/script/dom/bindings/global.rs, components/script/dom/xmlhttprequest.rs, components/script/dom/servohtmlparser.rs, components/script/dom/window.rs, components/script_traits/lib.rs, components/script_traits/lib.rs, components/script/dom/document.rs, components/script/dom/browsingcontext.rs, components/script/dom/workerglobalscope.rs, components/script_traits/script_msg.rs, components/script_traits/script_msg.rs, components/script/dom/worker.rs, components/script/webdriver_handlers.rs, components/script/dom/serviceworker.rs, components/script/dom/dedicatedworkerglobalscope.rs, components/script/script_thread.rs, components/script/dom/htmliframeelement.rs, components/script/dom/console.rs, components/script/dom/storage.rs, components/script/dom/htmlformelement.rs, components/script/dom/bindings/trace.rs, components/script/dom/serviceworkerglobalscope.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 Jun 10, 2016
@aneeshusa
Copy link
Copy Markdown
Contributor Author

BTW, this isn't a rebase of #7792; I learned a lot about how Servo works by doing this myself :)

@aneeshusa aneeshusa force-pushed the remove-subpage-id branch from 9bd1139 to 775786d Compare June 10, 2016 11:37
@highfive
Copy link
Copy Markdown

New code was committed to pull request.

@bors-servo
Copy link
Copy Markdown
Contributor

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

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Jun 10, 2016
@cbrewster
Copy link
Copy Markdown
Contributor

Would it be possible to get rid of the (PipelineId, PipelineId)s?

@aneeshusa aneeshusa force-pushed the remove-subpage-id branch from 775786d to 3492085 Compare June 11, 2016 01:44
@aneeshusa
Copy link
Copy Markdown
Contributor Author

aneeshusa commented Jun 11, 2016

Rebased (not sure why highfive didn't leave a comment).

@ConnorGBrewster in general, the second PipelineId is necessary to identify which pipeline the message is about, and the first PipelineId is for the parent, which is needed to find the relevant iframe via get_browsing_context() -> active_document() -> find_iframe().

It's possible that in some cases this may be able to be reduced to just the child PipelineId, but it's not obvious to me that that holds and I'd like to leave that for a follow-up.

@cbrewster
Copy link
Copy Markdown
Contributor

@aneeshusa makes sense, I was thinking you could just do the child and do the lookup in the constellation. But yeah that seems like it would be out of scope for this PR.

@bors-servo
Copy link
Copy Markdown
Contributor

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

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Jun 12, 2016
@aneeshusa aneeshusa force-pushed the remove-subpage-id branch from 3492085 to 23ce28c Compare June 26, 2016 15:04
None => return warn!("Message sent to closed pipeline {}.", pipeline_id),
None => return warn!("Message sent to closed pipeline {}.", parent_pipeline_id),
};
let document = document.r();
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.

Note: @asajeffrey removed this line in #11695, but this seemed inadvertent to me so I brought it back. Not sure about this change.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please remove it again.

@aneeshusa aneeshusa force-pushed the remove-subpage-id branch from 23ce28c to 19cf404 Compare June 26, 2016 19:17
@cbrewster
Copy link
Copy Markdown
Contributor

@bors-servo try

bors-servo pushed a commit that referenced this pull request Jun 26, 2016
Excise SubpageId and use only PipelineIds

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

SubpageId was originally introduced in 2013 to help iframes keep track of
their associated (children) pipelines. However, since each pipeline
already has a PipelineId, and those are unique, those are sufficient
to keep track of children.

---
<!-- 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 fix #11694  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11698)
<!-- Reviewable:end -->
@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Trying commit 19cf404 with merge c36df77...

@bors-servo
Copy link
Copy Markdown
Contributor

💔 Test failed - mac-dev-unit

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 26, 2016
@cbrewster
Copy link
Copy Markdown
Contributor

This is looking awesome! I have a couple things for you to look at, but other than that, it looks good. I especially like the move to more consistent naming.

I would like to see if there is a way to avoid passing parent and child pipelines everywhere and I would like to have FrameType moved to the Pipeline itself, but I think both those can be done in separate PRs.

After the fixes, it would probably be good to have someone else do a look over the changes.


Reviewed 7 of 17 files at r1, 1 of 13 files at r7, 4 of 16 files at r10, 11 of 12 files at r12, 1 of 1 files at r13.
Review status: all files reviewed at latest revision, 5 unresolved discussions, some commit checks failed.


components/constellation/constellation.rs, line 1363 [r13] (raw file):

        // This makes things like contentDocument work correctly.
        if let Some((parent_pipeline_id, _)) = pipeline_info {
            match self.pipelines.get(&next_pipeline_id) {

This match can go away.


components/script/script_thread.rs, line 1197 [r13] (raw file):

        // Kick off the fetch for the new resource.
        let new_load = InProgressLoad::new(new_pipeline_id, Some((parent_pipeline_id, frame_type)),

Should this be the child pipeline id instead of the parent?


components/script/script_thread.rs, line 1427 [r13] (raw file):

    fn handle_page_headers_available(&self, id: &PipelineId,
                                     metadata: Option<Metadata>) -> Option<ParserRoot> {
        let idx = self.incomplete_loads.borrow().iter().position(|load| { load.pipeline_id == *id });

See above about child pipeline instead of parent.


components/script/dom/htmliframeelement.rs, line 226 [r13] (raw file):

    }

    pub fn pipeline(&self) -> Option<PipelineId> {

That's weird that we had both pipeline() and pipeline_id()...


Comments from Reviewable

@cbrewster cbrewster added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors. S-tests-failed The changes caused existing tests to fail. labels Jun 26, 2016
@bors-servo
Copy link
Copy Markdown
Contributor

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

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Jul 3, 2016
@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Trying commit 56fbfd4 with merge 93414ce...

bors-servo pushed a commit that referenced this pull request Sep 13, 2016
Excise SubpageId and use only PipelineIds

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

SubpageId was originally introduced in 2013 to help iframes keep track of
their associated (children) pipelines. However, since each pipeline
already has a PipelineId, and those are unique, those are sufficient
to keep track of children.

---
<!-- 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 fix #11694  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11698)
<!-- Reviewable:end -->
@bors-servo
Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Sep 13, 2016
@aneeshusa aneeshusa removed the S-awaiting-answer Someone asked a question that requires an answer. label Sep 13, 2016
@aneeshusa
Copy link
Copy Markdown
Contributor Author

Failures look like intermittents and linux-rel passed wpt ok. r? @asajeffrey

@asajeffrey
Copy link
Copy Markdown
Contributor

@bors-sevo: r+

@asajeffrey
Copy link
Copy Markdown
Contributor

@bors-servo: r+

@bors-servo
Copy link
Copy Markdown
Contributor

📌 Commit 56fbfd4 has been approved by asajeffrey

@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. S-tests-failed The changes caused existing tests to fail. labels Sep 13, 2016
@cbrewster
Copy link
Copy Markdown
Contributor

@bors-servo retry

@bors-servo
Copy link
Copy Markdown
Contributor

⚡ Previous build results for arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, windows-dev are reusable. Rebuilding only mac-rel-wpt...

@notriddle
Copy link
Copy Markdown
Contributor

@bors-servo clean force retry r+

@bors-servo
Copy link
Copy Markdown
Contributor

💡 This pull request was already approved, no need to approve it again.

  • This pull request is currently being tested. If there's no response from the continuous integration service, you may use retry to trigger a build again.

@bors-servo
Copy link
Copy Markdown
Contributor

📌 Commit 56fbfd4 has been approved by notriddle

@highfive highfive assigned notriddle and unassigned asajeffrey Sep 14, 2016
@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit 56fbfd4 with merge 161e074...

bors-servo pushed a commit that referenced this pull request Sep 14, 2016
Excise SubpageId and use only PipelineIds

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

SubpageId was originally introduced in 2013 to help iframes keep track of
their associated (children) pipelines. However, since each pipeline
already has a PipelineId, and those are unique, those are sufficient
to keep track of children.

---
<!-- 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 fix #11694  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11698)
<!-- Reviewable:end -->
@bors-servo
Copy link
Copy Markdown
Contributor

☀️ Test successful - arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove SubpageId

9 participants