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

Script lookup iframes by frameid #13646

Merged

Conversation

@asajeffrey
Copy link
Member

asajeffrey commented Oct 7, 2016

Lookup iframes by FrameId rather than PipelineId. This should make lookup much more reliable, since the frame id doesn't change.

cc @ConnorGBrewster @aneeshusa


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

This change is Reviewable

@highfive
Copy link

highfive commented Oct 7, 2016

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/htmliframeelement.rs, components/script/dom/document.rs, components/script_traits/script_msg.rs, components/script_traits/script_msg.rs, components/script/script_thread.rs, components/script_traits/lib.rs, components/script_traits/lib.rs
@highfive
Copy link

highfive commented Oct 7, 2016

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@asajeffrey
Copy link
Member Author

asajeffrey commented Oct 7, 2016

The first commit in this PR is actually #13627, we shouldn't merge this one until it lands.

@bors-servo
Copy link
Contributor

bors-servo commented Oct 10, 2016

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

@asajeffrey asajeffrey force-pushed the asajeffrey:script-lookup-iframes-by-frameid branch from b1d34f7 to 7948fd5 Oct 11, 2016
@bors-servo
Copy link
Contributor

bors-servo commented Oct 13, 2016

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

@asajeffrey asajeffrey force-pushed the asajeffrey:script-lookup-iframes-by-frameid branch from 7948fd5 to 94c7391 Oct 13, 2016
@asajeffrey
Copy link
Member Author

asajeffrey commented Oct 13, 2016

Rebased.

Copy link
Member

nox left a comment

Just a question, otherwise r=me.

@@ -85,7 +85,7 @@ pub enum ScriptMsg {
LoadUrl(PipelineId, LoadData, bool),
/// Dispatch a mozbrowser event to a given iframe,
/// or to the window if no subpage id is provided.
/// First PipelineId is for the parent, second PipelineId is for the actual pipeline.
/// First PipelineId is for the parent, second PipelineId is in the frame.

This comment has been minimized.

@nox

nox Oct 17, 2016

Member

What does it mean that it is "in the frame"? It still lives here so it's a but confusing.

This comment has been minimized.

@asajeffrey

asajeffrey Oct 17, 2016

Author Member

Good point, that second pipeline id should be a frame id.

@asajeffrey asajeffrey force-pushed the asajeffrey:script-lookup-iframes-by-frameid branch from 94c7391 to bc290df Oct 21, 2016
@asajeffrey
Copy link
Member Author

asajeffrey commented Oct 21, 2016

Working on this, turns out there were bugs, sigh.

@bors-servo
Copy link
Contributor

bors-servo commented Oct 21, 2016

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

@jdm
Copy link
Member

jdm commented Oct 24, 2016

I haven't done more than skim recent changes in this PR, but I'm concerned about the changes to how the document load event is initiated. The old design was that it was fine to optimistically enqueue a "I think the document is finished loading everything" event, because when being run it would first check if that were actually the case. Some of the changes and comments around them make me worried that this is no longer true.

@asajeffrey
Copy link
Member Author

asajeffrey commented Oct 24, 2016

@jdm yes, this is what I've been spending my time debugging. I now understand better what the document loading code is doing, I even wrote some comments so that future me might remember this. At least the wpt test suite caught this.

@asajeffrey asajeffrey force-pushed the asajeffrey:script-lookup-iframes-by-frameid branch 3 times, most recently from 5129976 to 9631237 Oct 24, 2016
@asajeffrey
Copy link
Member Author

asajeffrey commented Oct 28, 2016

This PR triggered issue #13964, fixed by #13965, which should land before this does.

bors-servo added a commit that referenced this pull request Nov 2, 2016
…try>

Script thread with no root document

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

This PR removes the single root document from the script thread, and replaces it by a lookup table from `PipelineId`s to `Document`s. This is needed if we're going to share script threads, as per #633.

The last commit is the one that matters, the ones before are #13646.

cc @jdm @Ms2ger @ConnorGBrewster
---
<!-- 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 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/14013)
<!-- Reviewable:end -->
@asajeffrey asajeffrey force-pushed the asajeffrey:script-lookup-iframes-by-frameid branch from 7ecee09 to e886199 Nov 2, 2016
@asajeffrey
Copy link
Member Author

asajeffrey commented Nov 2, 2016

Rebased. @bors-servo try

@bors-servo
Copy link
Contributor

bors-servo commented Nov 2, 2016

Trying commit e886199 with merge ac21b50...

bors-servo added a commit that referenced this pull request Nov 2, 2016
…=<try>

Script lookup iframes by frameid

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

Lookup iframes by `FrameId` rather than `PipelineId`. This should make lookup much more reliable, since the frame id doesn't change.

cc @ConnorGBrewster @aneeshusa
---

<!-- 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 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/13646)

<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 2, 2016

bors-servo added a commit that referenced this pull request Nov 3, 2016
…try>

Script thread with no root document

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

This PR removes the single root document from the script thread, and replaces it by a lookup table from `PipelineId`s to `Document`s. This is needed if we're going to share script threads, as per #633.

The last commit is the one that matters, the ones before are #13646.

cc @jdm @Ms2ger @ConnorGBrewster
---
<!-- 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 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/14013)
<!-- Reviewable:end -->
@asajeffrey asajeffrey force-pushed the asajeffrey:script-lookup-iframes-by-frameid branch from e886199 to f3993d9 Nov 3, 2016
@asajeffrey
Copy link
Member Author

asajeffrey commented Nov 3, 2016

Squashed and rebased @bors-servo r=ConnorGBrewster

@bors-servo
Copy link
Contributor

bors-servo commented Nov 3, 2016

📌 Commit f3993d9 has been approved by ConnorGBrewster

@highfive highfive assigned cbrewster and unassigned nox Nov 3, 2016
bors-servo added a commit that referenced this pull request Nov 3, 2016
…try>

Script thread with no root document

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

This PR removes the single root document from the script thread, and replaces it by a lookup table from `PipelineId`s to `Document`s. This is needed if we're going to share script threads, as per #633.

The last commit is the one that matters, the ones before are #13646.

cc @jdm @Ms2ger @ConnorGBrewster
---
<!-- 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 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/14013)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 3, 2016

Testing commit f3993d9 with merge ce725c9...

bors-servo added a commit that referenced this pull request Nov 3, 2016
…=ConnorGBrewster

Script lookup iframes by frameid

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

Lookup iframes by `FrameId` rather than `PipelineId`. This should make lookup much more reliable, since the frame id doesn't change.

cc @ConnorGBrewster @aneeshusa
---

<!-- 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 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/13646)

<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 4, 2016

@bors-servo bors-servo merged commit f3993d9 into servo:master Nov 4, 2016
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
bors-servo added a commit that referenced this pull request Nov 8, 2016
Script thread with no root document

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

This PR removes the single root document from the script thread, and replaces it by a lookup table from `PipelineId`s to `Document`s. This is needed if we're going to share script threads, as per #633.

The last commit is the one that matters, the ones before are #13646.

cc @jdm @Ms2ger @ConnorGBrewster
---
<!-- 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 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/14013)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Nov 8, 2016
Script thread with no root document

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

This PR removes the single root document from the script thread, and replaces it by a lookup table from `PipelineId`s to `Document`s. This is needed if we're going to share script threads, as per #633.

The last commit is the one that matters, the ones before are #13646.

cc @jdm @Ms2ger @ConnorGBrewster
---
<!-- 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 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/14013)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

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