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

Pass not none value in setfullscreen #23128

Merged

Conversation

Projects
None yet
5 participants
@kamal-umudlu
Copy link
Contributor

commented Mar 28, 2019

Diagnose

Entering fullscreen mode is passing None value to Window when set_fullscreen function is called which prevents
Servo actually entering fullscreen mode.
In addition, the function exit_fullscreen in document.rs is passing True value to
SetFullscreenState which doesn't allow to exit from fullscreen mode.

Solution

  1. Instead of passing None value when FullScreenState is true, window.get_primary_monitor() is called in order to pass a monitor id.
    This fix make Servo actually enter fullscreen mode.
  2. Changed SetFullscreenState to false when exit_fullscreen function is called.
  3. In addition, added new implementation to support exiting from fullscreen mode by pressing Escape button.

Testing Plan

After my change in windows.rs and document.rs,
the Servo app can enter/exit fullscreen mode.
In addition, the ESC button support
allows to exit from fullscreenmode.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #22853
  • There are tests for these changes OR
  • These changes do not require tests because ___

This change is Reviewable

@highfive

This comment has been minimized.

Copy link

commented Mar 28, 2019

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

@highfive

This comment has been minimized.

Copy link

commented Mar 28, 2019

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/document.rs, components/constellation/constellation.rs, components/script/script_thread.rs
  • @cbrewster: components/constellation/constellation.rs
  • @paulrouget: ports/servo/browser.rs, ports/servo/glutin_app/window.rs, components/constellation/constellation.rs, components/compositing/windowing.rs, components/servo/lib.rs
  • @KiChjang: components/script/dom/document.rs, components/script/script_thread.rs, components/script_traits/lib.rs
@highfive

This comment has been minimized.

Copy link

commented Mar 28, 2019

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!

@jdm jdm added the S-needs-rebase label Mar 28, 2019

@jdm
Copy link
Member

left a comment

Great work! Now we just need to:

  • remove the patch files
  • remove the merge commit
  • rebase against master

https://github.com/servo/servo/wiki/Github-workflow has our recommended workflow.

Show resolved Hide resolved doc/22853.patch Outdated
Show resolved Hide resolved components/script/script_thread.rs
Show resolved Hide resolved components/script_traits/lib.rs Outdated
Show resolved Hide resolved components/constellation/constellation.rs Outdated
Show resolved Hide resolved components/constellation/constellation.rs Outdated
Show resolved Hide resolved doc/22853_Support.patch Outdated
@jdm

This comment has been minimized.

Copy link
Member

commented Apr 1, 2019

Great! All we need now is for you to rebase this branch against a recent master revision, and squash all the commits into one.

@kamal-umudlu kamal-umudlu force-pushed the kamal-umudlu:pass_not_none_value_in_setfullscreen branch from cfe4a5e to b878c76 Apr 1, 2019

@kamal-umudlu

This comment has been minimized.

Copy link
Contributor Author

commented Apr 1, 2019

@jdm I am done squashing. Please let me know if I need to do anything else.

@jdm

This comment has been minimized.

Copy link
Member

commented Apr 1, 2019

It looks like a rebase error caused it to stop compiling.

@kamal-umudlu

This comment has been minimized.

Copy link
Contributor Author

commented Apr 1, 2019

I am building servo again to check what makes it to fail

Bug: #22853 - Make Window::set_fullscreen pass a non-None value when …
…entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False

Added patch for bug:22853

Added implementation to exit from fullscreen mode by pressing ESC button

Added patch that supports to exit from fullscreen mode by pressing ESC

Deleted patch files

Added all requested changes on project

Removed the loop over self.pending_changes in switch_fullscreen_mode function

Bug #22853 - Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False

Added missing bracket in constellation.rs file to fix build issue

Bug: #22853 --> Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False

@kamal-umudlu kamal-umudlu force-pushed the kamal-umudlu:pass_not_none_value_in_setfullscreen branch from 25ceb99 to a8995fb Apr 1, 2019

@kamal-umudlu

This comment has been minimized.

Copy link
Contributor Author

commented Apr 1, 2019

There was a missing bracket in the code. I squash commits again and pushed changes.

@jdm

This comment has been minimized.

Copy link
Member

commented Apr 1, 2019

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Apr 1, 2019

📌 Commit a8995fb has been approved by jdm

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2019

⌛️ Testing commit a8995fb with merge a10770d...

bors-servo added a commit that referenced this pull request Apr 2, 2019

Auto merge of #23128 - kamal-umudlu:pass_not_none_value_in_setfullscr…
…een, r=jdm

Pass not none value in setfullscreen

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

Entering fullscreen mode is passing `None` value to `Window` when `set_fullscreen` function is called which prevents
Servo actually entering fullscreen mode.
In addition, the function `exit_fullscreen` in `document.rs` is passing True value to
`SetFullscreenState` which doesn't allow to exit from fullscreen mode.

# Solution

1. Instead of passing `None` value when `FullScreenState` is true, `window.get_primary_monitor()` is called in order to pass a monitor id.
This fix make Servo actually enter fullscreen mode.
2. Changed `SetFullscreenState` to false when `exit_fullscreen` function is called.
3. In addition, added new implementation to support exiting from fullscreen mode by pressing `Escape` button.

# Testing Plan

After my change in [windows.rs and document.rs](kamal-umudlu@af6b598),
the Servo app can enter/exit fullscreen mode.
In addition, the [`ESC button support`](kamal-umudlu@14ebd5b)
allows to exit from fullscreenmode.

---
<!-- 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 #22853

<!-- Either: -->
- [X] 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/23128)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2019

⛄️ The build was interrupted to prioritize another pull request.

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2019

⌛️ Testing commit a8995fb with merge c5da330...

bors-servo added a commit that referenced this pull request Apr 2, 2019

Auto merge of #23128 - kamal-umudlu:pass_not_none_value_in_setfullscr…
…een, r=jdm

Pass not none value in setfullscreen

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

Entering fullscreen mode is passing `None` value to `Window` when `set_fullscreen` function is called which prevents
Servo actually entering fullscreen mode.
In addition, the function `exit_fullscreen` in `document.rs` is passing True value to
`SetFullscreenState` which doesn't allow to exit from fullscreen mode.

# Solution

1. Instead of passing `None` value when `FullScreenState` is true, `window.get_primary_monitor()` is called in order to pass a monitor id.
This fix make Servo actually enter fullscreen mode.
2. Changed `SetFullscreenState` to false when `exit_fullscreen` function is called.
3. In addition, added new implementation to support exiting from fullscreen mode by pressing `Escape` button.

# Testing Plan

After my change in [windows.rs and document.rs](kamal-umudlu@af6b598),
the Servo app can enter/exit fullscreen mode.
In addition, the [`ESC button support`](kamal-umudlu@14ebd5b)
allows to exit from fullscreenmode.

---
<!-- 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 #22853

<!-- Either: -->
- [X] 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/23128)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2019

@bors-servo bors-servo merged commit a8995fb into servo:master Apr 2, 2019

4 checks passed

Taskcluster (pull_request) TaskGroup: success
Details
Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.