Skip to content

Move Ctrl-F12 keybindings outside of libservo - #17652

Merged
bors-servo merged 2 commits into
servo:masterfrom
Tremoneck:debug_key_mover
Jul 11, 2017
Merged

bors-servo merged 2 commits into
servo:masterfrom
Tremoneck:debug_key_mover

Conversation

@Tremoneck

@Tremoneck Tremoneck commented Jul 10, 2017 •

Copy link
Copy Markdown
Contributor

Creates a new WindowEvent called ToggleProfiller, when this Event is queued the profiler is toggled.
When Crtl + F12 are pressed the Event is queued.


  • There are tests for these changes OR
  • These changes do not require tests because _____

This change is Reviewable

@highfive

Copy link
Copy Markdown

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

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jul 10, 2017
Comment thread components/compositing/windowing.rs Outdated
KeyEvent(Option<char>, Key, KeyState, KeyModifiers),
/// Sent when Ctr+R/Apple+R is called to reload the current page.
Reload,
//Toggles the profiler on and off

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Use 3 slashes + space: // -> ///

Copy link
Copy Markdown
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 use for just //, if not maybe this schould be added to test-tidy

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes. double slashes are for regular comments. triple are for documentation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah ok, that makes sense

Comment thread components/compositing/compositor.rs Outdated
}
}

WindowEvent::ToggleProfiler => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you rename this to ToggleWebRenderProfiler? Because their is also a regular profiler.

@paulrouget paulrouget left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe use a better commit message: "Move WR profiler keybindings to /ports/"

Comment thread ports/glutin/window.rs Outdated
self.event_queue.borrow_mut().push(WindowEvent::Quit);
}
}
(CMD_OR_CONTROL, None, Key::F12) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Use just "CONTROL" here, not "CMD_OR_CONTROL".

@paulrouget

paulrouget commented Jul 11, 2017 •

Copy link
Copy Markdown
Contributor

Also:

I realize this is probably not necessary anymore:

pub fn set_webrender_profiler_enabled(&mut self, enabled: bool) {
and
pub fn set_webrender_profiler_enabled(&mut self, enabled: bool) {
- remove these functions.

… and when you catch WindowEvent::ToggleProfiler, after calling self.webrender.set_profiler_enabled, you want to refresh WR, so add this: self.webrender_api.generate_frame(None);

@emilio

emilio commented Jul 11, 2017

Copy link
Copy Markdown
Member

@bors-servo delegate=paulroget

@bors-servo

Copy link
Copy Markdown
Contributor

✌️ @paulroget can now approve this pull request

@emilio

emilio commented Jul 11, 2017

Copy link
Copy Markdown
Member

@bors-servo delegate=paulrouget

  • Someday I'll learn to write

@bors-servo

Copy link
Copy Markdown
Contributor

✌️ @paulrouget can now approve this pull request

@paulrouget paulrouget assigned paulrouget and unassigned asajeffrey Jul 11, 2017
@Tremoneck

Copy link
Copy Markdown
Contributor Author

I just run the failing tests test-unit myself, and the compiling of style_tests, which fails in travis, works for me. Is here a way to rerun the test?

@paulrouget

Copy link
Copy Markdown
Contributor

@Tremoneck that's just a travis issue.

The retry will happen once you push again (or explicitly ask for a retry).

Your changes look good. Once you address #17652 (comment) it should be fine.

@paulrouget

Copy link
Copy Markdown
Contributor

@bors-servo: retry

…and servo/lib.rs and inlining this function in compositing/compositor.rs

@paulrouget paulrouget left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@bors-servo r+

This looks good to me. Thank you.

@KiChjang

Copy link
Copy Markdown
Contributor

@bors-servo r=paulrouget

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 6309d51 has been approved by paulrouget

@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. labels Jul 11, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 6309d51 with merge ee95bda...

bors-servo pushed a commit that referenced this pull request Jul 11, 2017
Move Ctrl-F12 keybindings outside of libservo

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

Creates a new WindowEvent called ToggleProfiller, when this Event is queued the profiler is toggled.
When Crtl + F12 are pressed the Event is queued.

---
<!-- 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 #17647 (github issue number if applicable).

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

<!-- 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/17652)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
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: paulrouget
Pushing ee95bda to master...

@bors-servo
bors-servo merged commit 6309d51 into servo:master Jul 11, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jul 11, 2017
@Tremoneck
Tremoneck deleted the debug_key_mover branch July 11, 2017 11:13
@paulrouget

Copy link
Copy Markdown
Contributor

Thank you @Tremoneck

@Tremoneck

Copy link
Copy Markdown
Contributor Author

I enjoyed it and will probably start doing more, when I have more time available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move Ctrl-F12 keybindings outside of libservo

7 participants