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

Record the frame type (IFrame or MozBrowserIFrame) in the pipeline. #11430

Conversation

@asajeffrey
Copy link
Member

asajeffrey commented May 26, 2016

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 test-tidy does not report any errors
  • These changes do not require tests because this is a refactoring

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

This is a first step towards supporting the notion of multiple top-level browsing contexts in Servo, by making the constellation aware of which content is loaded in a mozbrowser iframe.


This change is Reviewable

@highfive
Copy link

highfive commented May 26, 2016

Heads up! This PR modifies the following files:

  • @asajeffrey: components/constellation/pipeline.rs, components/constellation/constellation.rs
  • @KiChjang: components/script/dom/htmliframeelement.rs, components/script/dom/bindings/trace.rs, components/script_traits/lib.rs, components/script_traits/lib.rs
@highfive
Copy link

highfive commented May 26, 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 May 26, 2016

cc @ConnorGBrewster

@KiChjang
Copy link
Member

KiChjang commented May 26, 2016

@bors-servo delegate=ConnorGBrewster

r? @ConnorGBrewster

@bors-servo
Copy link
Contributor

bors-servo commented May 26, 2016

✌️ @ConnorGBrewster can now approve this pull request

@highfive highfive assigned cbrewster and unassigned KiChjang May 26, 2016
@cbrewster
Copy link
Member

cbrewster commented May 26, 2016

I think these changes look good! Just a few nits with some of the comments.

-S-awaiting-review +S-needs-code-changes +S-awaiting-answer

Previously, bors-servo wrote…

✌️ @ConnorGBrewster can now approve this pull request


Reviewed 6 of 6 files at r1.
Review status: all files reviewed at latest revision, 4 unresolved discussions.


components/constellation/constellation.rs, line 1844 [r1] (raw file):

                return true;
            }
            // TODO: terminate the search when we hit a mozbrowser iframe?

I would think you would terminate the search when hitting a mozbrowser iframe, but I am not 100% sure.


components/constellation/constellation.rs, line 2030 [r1] (raw file):

                    None => return None,
                },
                None => return None,

Should the warn! be kept here?


components/constellation/constellation.rs, line 2036 [r1] (raw file):

    // https://developer.mozilla.org/en-US/docs/Web/Events/mozbrowserlocationchange
    // Note that this is a no-op if the pipeline is not an immediate child iframe of a mozbrowser iframe

Maybe this should say // Note that this is a no-op if the pipeline is not a mozbrowser iframe


components/constellation/constellation.rs, line 2046 [r1] (raw file):

        });

        // If this is an iframe, then send the event with new url

Could we update this comment to say If this is a mozbrowser iframe, then send the event with new url


Comments from Reviewable

@highfive
Copy link

highfive commented May 26, 2016

New code was committed to pull request.

@asajeffrey
Copy link
Member Author

asajeffrey commented May 26, 2016

Review status: all files reviewed at latest revision, 4 unresolved discussions.


components/constellation/constellation.rs, line 1844 [r1] (raw file):

Previously, ConnorGBrewster (Connor Brewster) wrote…

I would think you would terminate the search when hitting a mozbrowser iframe, but I am not 100% sure.

Done.

components/constellation/constellation.rs, line 2030 [r1] (raw file):

Previously, ConnorGBrewster (Connor Brewster) wrote…

Should the warn! be kept here?

Done.

components/constellation/constellation.rs, line 2036 [r1] (raw file):

Previously, ConnorGBrewster (Connor Brewster) wrote…

Maybe this should say // Note that this is a no-op if the pipeline is not a mozbrowser iframe

Done.

components/constellation/constellation.rs, line 2046 [r1] (raw file):

Previously, ConnorGBrewster (Connor Brewster) wrote…

Could we update this comment to say If this is a mozbrowser iframe, then send the event with new url

Done.

Comments from Reviewable

@cbrewster
Copy link
Member

cbrewster commented May 26, 2016

r=me after the TODO comment is removed and this is squashed

-S-awaiting-review

Previously, highfive wrote…

New code was committed to pull request.


Review status: 5 of 6 files reviewed at latest revision, 5 unresolved discussions.


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

    fn Mozbrowser(&self) -> bool {
        // We don't want to allow mozbrowser iframes within iframes
        // TODO: why not?

Remove comment?


Comments from Reviewable

@asajeffrey
Copy link
Member Author

asajeffrey commented May 26, 2016

Review status: 5 of 6 files reviewed at latest revision, 5 unresolved discussions.


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

Previously, ConnorGBrewster (Connor Brewster) wrote…

Remove comment?

Well, I still don't understand why not, but done.

Comments from Reviewable

@asajeffrey asajeffrey force-pushed the asajeffrey:constellation-record-mozbrowser-parent-info branch from 16b1255 to d92dfe1 May 26, 2016
@highfive
Copy link

highfive commented May 26, 2016

New code was committed to pull request.

@asajeffrey
Copy link
Member Author

asajeffrey commented May 26, 2016

Fixed and squashed. @bors-servo: r=ConnorGBrewster

@bors-servo
Copy link
Contributor

bors-servo commented May 26, 2016

📌 Commit d92dfe1 has been approved by ConnorGBrewster

@bors-servo
Copy link
Contributor

bors-servo commented May 26, 2016

Testing commit d92dfe1 with merge 64cca22...

bors-servo added a commit that referenced this pull request May 26, 2016
…ent-info, r=ConnorGBrewster

Record the frame type (IFrame or MozBrowserIFrame) in the pipeline.

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 this is a refactoring

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

This is a first step towards supporting the notion of multiple top-level browsing contexts in Servo, by making the constellation aware of which content is loaded in a mozbrowser iframe.

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

bors-servo commented May 26, 2016

@bors-servo bors-servo merged commit d92dfe1 into servo:master May 26, 2016
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@bors-servo bors-servo mentioned this pull request May 26, 2016
3 of 3 tasks complete
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

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