Skip to content

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

Merged
bors-servo merged 1 commit into
servo:masterfrom
asajeffrey:constellation-record-mozbrowser-parent-info
May 26, 2016
Merged

bors-servo merged 1 commit into
servo:masterfrom
asajeffrey:constellation-record-mozbrowser-parent-info

Conversation

@asajeffrey

@asajeffrey asajeffrey commented May 26, 2016 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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
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 May 26, 2016
@asajeffrey asajeffrey added A-constellation Involves the constellation I-refactor No impact; the issue is one of maintainability or tidiness. Proposed solution requires refactoring. labels May 26, 2016
@asajeffrey

Copy link
Copy Markdown
Contributor Author

cc @ConnorGBrewster

@KiChjang

Copy link
Copy Markdown
Contributor

@bors-servo delegate=ConnorGBrewster

r? @ConnorGBrewster

@bors-servo

Copy link
Copy Markdown
Contributor

✌️ @ConnorGBrewster can now approve this pull request

@highfive highfive assigned cbrewster and unassigned KiChjang May 26, 2016
@cbrewster cbrewster removed the S-awaiting-review There is new code that needs to be reviewed. label May 26, 2016
@cbrewster

Copy link
Copy Markdown
Contributor

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

@cbrewster cbrewster added S-awaiting-answer Someone asked a question that requires an answer. S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels May 26, 2016
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels May 26, 2016
@highfive

Copy link
Copy Markdown

New code was committed to pull request.

@asajeffrey

Copy link
Copy Markdown
Contributor Author

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

@asajeffrey asajeffrey added S-needs-squash Some (or all) of the commits in the PR should be combined. and removed S-awaiting-answer Someone asked a question that requires an answer. labels May 26, 2016
@cbrewster

cbrewster commented May 26, 2016 •

Copy link
Copy Markdown
Contributor

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

@cbrewster cbrewster removed the S-awaiting-review There is new code that needs to be reviewed. label May 26, 2016
@asajeffrey

Copy link
Copy Markdown
Contributor Author

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 constellation-record-mozbrowser-parent-info branch from 16b1255 to d92dfe1 Compare May 26, 2016 17:56
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 26, 2016
@highfive

Copy link
Copy Markdown

New code was committed to pull request.

@asajeffrey

Copy link
Copy Markdown
Contributor Author

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

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit d92dfe1 has been approved by ConnorGBrewster

@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 May 26, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit d92dfe1 with merge 64cca22...

bors-servo pushed 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
Copy Markdown
Contributor

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

@bors-servo
bors-servo merged commit d92dfe1 into servo:master May 26, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label May 26, 2016
@bors-servo bors-servo mentioned this pull request May 26, 2016
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-constellation Involves the constellation 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