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

Remove CompositorEventListener trait #11443

Merged
merged 2 commits into from Jun 1, 2016

Conversation

@kyleheadley
Copy link
Contributor

kyleheadley commented May 26, 2016


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #11339 (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

highfive commented May 26, 2016

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @larsbergstrom (or someone else) soon.

@asajeffrey
Copy link
Member

asajeffrey commented May 26, 2016

Hi Kyle. Now you get to see reviewable in action, lucky you.

@asajeffrey
Copy link
Member

asajeffrey commented May 26, 2016

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


components/compositing/compositor_thread.rs, line 8 [r1] (raw file):

use SendableFrameTree;
use compositor::{self, CompositingReason};

Add IOCompositor to the use list, so it can be used below?


components/compositing/compositor_thread.rs, line 289 [r1] (raw file):

    pub fn create<Window>(window: Rc<Window>,
                          state: InitialCompositorState)
                          -> Box<compositor::IOCompositor<Window>>

If we're returning ownership of the IOCompositor<Window>, can we get rid of the Box? I think it was only needed because CompoositorEventListener was a trait.


components/servo/lib.rs, line 100 [r1] (raw file):

/// loop to pump messages between the embedding application and
/// various browser components.
pub struct Browser<Window: WindowMethods + 'static> {

Ah, that's interesting, Browser is now parametric in Window.


components/servo/lib.rs, line 101 [r1] (raw file):

/// various browser components.
pub struct Browser<Window: WindowMethods + 'static> {
    compositor: Box<IOCompositor<Window>>,

Do we need this Box?


Comments from Reviewable

@asajeffrey
Copy link
Member

asajeffrey commented May 26, 2016

Reviewed 1 of 1 files at r2, 1 of 1 files at r3.
Review status: all files reviewed at latest revision, 4 unresolved discussions.


Comments from Reviewable

@highfive
Copy link

highfive commented May 26, 2016

New code was committed to pull request.

@kyleheadley
Copy link
Contributor Author

kyleheadley commented May 26, 2016

Thanks for the quick review! Do I comment here?

I adjusted the use case above. The boxes don't have to be there, but E-Easy Issue #10261 deals with that, so I left it for another contributor.

The modification in main.rs and lib.rs was scary, but I think it conforms better to the comments in those files, linking the Browser and WindowMethods.

@asajeffrey
Copy link
Member

asajeffrey commented May 26, 2016

You reply back on reviewable. I think it's worth removing the box while you're there, as it really only makes sense for trait objects.

@highfive
Copy link

highfive commented May 26, 2016

New code was committed to pull request.

@asajeffrey
Copy link
Member

asajeffrey commented May 26, 2016

Looks good, can you squash the commits now?

Previously, highfive wrote…

New code was committed to pull request.


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


Comments from Reviewable

@kyleheadley kyleheadley force-pushed the kyleheadley:remove_trait_11339 branch from 1997cb2 to b0d20d8 May 26, 2016
@highfive
Copy link

highfive commented May 26, 2016

New code was committed to pull request.

@asajeffrey
Copy link
Member

asajeffrey commented May 26, 2016

@bors-servo
Copy link
Contributor

bors-servo commented May 26, 2016

📌 Commit b0d20d8 has been approved by asajeffrey

@asajeffrey
Copy link
Member

asajeffrey commented May 26, 2016

They're you go, that's the process!

@bors-servo
Copy link
Contributor

bors-servo commented May 27, 2016

Testing commit b0d20d8 with merge c9dca59...

bors-servo added a commit that referenced this pull request May 27, 2016
Remove CompositorEventListener trait

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

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

bors-servo commented May 27, 2016

💔 Test failed - linux-dev

@Ms2ger
Copy link
Contributor

Ms2ger commented May 27, 2016

./mach build-cef is failing.

@jdm
Copy link
Member

jdm commented May 27, 2016

browser.rs:30:14: 30:21 error: wrong number of type arguments: expected 1, found 0 [E0243]
browser.rs:30     OnScreen(Browser),
                           ^~~~~~~
browser.rs:30:14: 30:21 help: run `rustc --explain E0243` to see a detailed explanation
browser.rs:31:15: 31:22 error: wrong number of type arguments: expected 1, found 0 [E0243]
browser.rs:31     OffScreen(Browser),
                            ^~~~~~~
@asajeffrey
Copy link
Member

asajeffrey commented May 27, 2016

@kyleheadley oops, ports/cef needs updated.

@asajeffrey
Copy link
Member

asajeffrey commented May 27, 2016

I think the fix is to replace Browser by Browser<glutin_app::window::Window>.

@kyleheadley
Copy link
Contributor Author

kyleheadley commented May 27, 2016

yes, and the other Browser by Browser<window::Window>. I've got it working but was about to try to rebase off the current master because it's been a few days.

Is there another build I should try? Or leave the others to test on the proper system?

@highfive
Copy link

highfive commented May 27, 2016

New code was committed to pull request.

@jdm
Copy link
Member

jdm commented May 27, 2016

You'll need to change ports/gonk/src/main.rs as well, since it refers to the Browser type. It's harder to build locally, so those changes will probably need to be validated by the builders.

@highfive
Copy link

highfive commented May 27, 2016

New code was committed to pull request.

@asajeffrey
Copy link
Member

asajeffrey commented May 27, 2016

OK, let's see what happens now. @bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented May 27, 2016

📌 Commit 021fa97 has been approved by asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented May 27, 2016

Testing commit 021fa97 with merge 8982568...

bors-servo added a commit that referenced this pull request May 27, 2016
Remove CompositorEventListener trait

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

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

bors-servo commented May 27, 2016

💔 Test failed - mac-rel-wpt

@highfive
Copy link

highfive commented May 27, 2016

  ▶ Unexpected subtest result in /cssom-view/elementScroll.html:
  │ FAIL [expected PASS] Element scrollTop/Left getter/setter test
  │   → assert_equals: changed scrollTop should be 40 expected 30 but got 0
  │ 
  │ window.onload/&lt;@http://web-platform.test:8000/cssom-view/elementScroll.html:12:13
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1397:20
  │ test@http://web-platform.test:8000/resources/testharness.js:495:9
  └ window.onload@http://web-platform.test:8000/cssom-view/elementScroll.html:5:9

  ▶ Unexpected subtest result in /cssom-view/elementScroll.html:
  │ FAIL [expected PASS] Element scrollTo test
  │   → assert_equals: changed scrollLeft should be 70 expected 80 but got 0
  │ 
  │ window.onload/&lt;@http://web-platform.test:8000/cssom-view/elementScroll.html:26:13
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1397:20
  │ test@http://web-platform.test:8000/resources/testharness.js:495:9
  └ window.onload@http://web-platform.test:8000/cssom-view/elementScroll.html:23:9

  ▶ Unexpected subtest result in /cssom-view/elementScroll.html:
  │ FAIL [expected PASS] cssom-view - elementScroll
  │   → assert_equals: increment of scrollLeft should be 10 expected 10 but got 0
  │ 
  │ window.onload/&lt;@http://web-platform.test:8000/cssom-view/elementScroll.html:36:13
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1397:20
  │ test@http://web-platform.test:8000/resources/testharness.js:495:9
  └ window.onload@http://web-platform.test:8000/cssom-view/elementScroll.html:30:9

  ▶ Unexpected subtest result in /cssom-view/elementScroll.html:
  │ FAIL [expected PASS] Element scroll test
  │   → assert_equals: changed scrollLeft should be 60 expected 50 but got 0
  │ 
  │ window.onload/&lt;@http://web-platform.test:8000/cssom-view/elementScroll.html:19:13
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1397:20
  │ test@http://web-platform.test:8000/resources/testharness.js:495:9
  └ window.onload@http://web-platform.test:8000/cssom-view/elementScroll.html:16:9
@kyleheadley kyleheadley force-pushed the kyleheadley:remove_trait_11339 branch from 021fa97 to a8155cc May 27, 2016
@highfive
Copy link

highfive commented May 27, 2016

New code was committed to pull request.

@bors-servo
Copy link
Contributor

bors-servo commented May 28, 2016

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

@asajeffrey
Copy link
Member

asajeffrey commented May 31, 2016

@kyleheadley The appveyor build failure is spurious, try rebasing against the upstream master, and see if that fixes things.

@jdm jdm removed the S-awaiting-review label May 31, 2016
@kyleheadley kyleheadley force-pushed the kyleheadley:remove_trait_11339 branch from a8155cc to f6682c2 May 31, 2016
@asajeffrey
Copy link
Member

asajeffrey commented Jun 1, 2016

Hmm, more spurious appveyor failures. @bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Jun 1, 2016

📌 Commit f6682c2 has been approved by asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Jun 1, 2016

Testing commit f6682c2 with merge c641ec9...

bors-servo added a commit that referenced this pull request Jun 1, 2016
Remove CompositorEventListener trait

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

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

bors-servo commented Jun 1, 2016

@bors-servo bors-servo merged commit f6682c2 into servo:master Jun 1, 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
@asajeffrey
Copy link
Member

asajeffrey commented Jun 1, 2016

Yay!

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.

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