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

Ports refactoring #20228

Merged
merged 7 commits into from Mar 22, 2018
Merged

Ports refactoring #20228

merged 7 commits into from Mar 22, 2018

Conversation

paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Mar 7, 2018

Depends on #20071 and #19895

This PR does 3 things:

  1. merge all the embedder coordinates callbacks into one
  2. hand the embedder messages directly to the embedder
  3. split the embedder code in 2 files: window.rs and browser.rs

This is in preparation for tabs support in ports/. We want to separate the windowing logic (glutin stuff) and the browsing logic (tabs management, browsers state, etc). It's also easier to bypass the callbacks and directly handle events.


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

This change is Reviewable

@highfive
Copy link

highfive commented Mar 7, 2018

Heads up! This PR modifies the following files:

  • @asajeffrey: components/webdriver_server/lib.rs, components/script/dom/screen.rs, components/constellation/constellation.rs, components/script/dom/window.rs
  • @cbrewster: components/constellation/constellation.rs
  • @jgraham: components/webdriver_server/lib.rs
  • @fitzgen: components/script/dom/screen.rs, components/script_traits/script_msg.rs, components/script/dom/window.rs, components/script_traits/lib.rs
  • @KiChjang: components/script/dom/screen.rs, components/script_traits/script_msg.rs, components/script/dom/window.rs, components/script_traits/lib.rs

@highfive
Copy link

highfive commented Mar 7, 2018

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
  • 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 Mar 7, 2018
@paulrouget paulrouget changed the title [WIP] Ports refactor [WIP] Ports refactoring Mar 7, 2018
@bors-servo
Copy link
Contributor

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

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Mar 8, 2018
@jdm jdm assigned jdm and unassigned metajack Mar 9, 2018
@jdm jdm added S-blocked-on-external Something, somewhere else, needs to happen before this PR can be merged. S-needs-rebase There are merge conflict errors. and removed S-needs-rebase There are merge conflict errors. S-awaiting-review There is new code that needs to be reviewed. labels Mar 9, 2018
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 16, 2018
@bors-servo
Copy link
Contributor

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

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Mar 16, 2018
@paulrouget paulrouget force-pushed the ports_refactor branch 2 times, most recently from fd2c0e7 to 1533372 Compare March 17, 2018 09:50
(EmbedderMsg::KeyEvent(top_level_browsing_context, ch, key, state, modified),
ShutdownState::NotShuttingDown) => {
if state == KeyState::Pressed {
let msg = EmbedderMsg::KeyEvent(top_level_browsing_context, ch, key, state, modified);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a way to not re-construct the event here?

Copy link
Member

Choose a reason for hiding this comment

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

If we did not have to check the state, we could match (msg @ EmbedderMsg::KeyEvent(..), ShutdownState::NotShuttingDown); otherwise we would need to match a clone of the message and push the original.

@paulrouget paulrouget changed the title [WIP] Ports refactoring Ports refactoring Mar 17, 2018
@paulrouget
Copy link
Contributor Author

@jdm r?

@paulrouget
Copy link
Contributor Author

paulrouget commented Mar 19, 2018

@bors-servo try

  • not sure what's happening with Travis: "There was an error while trying to fetch the log."

@bors-servo
Copy link
Contributor

⌛ Trying commit 1533372 with merge 53a74a4...

bors-servo pushed a commit that referenced this pull request Mar 19, 2018
Ports refactoring

Depends on #20071 and #19895

This PR does 3 things:
1) merge all the embedder coordinates callbacks into one
2) hand the embedder messages directly to the embedder
3) split the embedder code in 2 files: window.rs and browser.rs

This is in preparation for tabs support in `ports/`. We want to separate the windowing logic (glutin stuff) and the browsing logic (tabs management, browsers state, etc). It's also easier to bypass the callbacks and directly handle events.

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/20228)
<!-- Reviewable:end -->
@paulrouget paulrouget mentioned this pull request Mar 19, 2018
@jdm jdm removed S-blocked-on-external Something, somewhere else, needs to happen before this PR can be merged. S-needs-rebase There are merge conflict errors. labels Mar 19, 2018
@paulrouget
Copy link
Contributor Author

@jdm all green. Want to look at the last commit?

@jdm
Copy link
Member

jdm commented Mar 22, 2018

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 18a02f8 has been approved by jdm

@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 Mar 22, 2018
@bors-servo
Copy link
Contributor

⌛ Testing commit 18a02f8 with merge 2de8937...

bors-servo pushed a commit that referenced this pull request Mar 22, 2018
Ports refactoring

Depends on #20071 and #19895

This PR does 3 things:
1) merge all the embedder coordinates callbacks into one
2) hand the embedder messages directly to the embedder
3) split the embedder code in 2 files: window.rs and browser.rs

This is in preparation for tabs support in `ports/`. We want to separate the windowing logic (glutin stuff) and the browsing logic (tabs management, browsers state, etc). It's also easier to bypass the callbacks and directly handle events.

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

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

💔 Test failed - mac-rel-wpt4

@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 Mar 22, 2018
@bors-servo
Copy link
Contributor

⚡ Previous build results for android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, windows-msvc-dev are reusable. Rebuilding only mac-rel-wpt4...

@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: jdm
Pushing 2de8937 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-tests-failed The changes caused existing tests to fail.
Projects
Status: Done
Android MVP
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants