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
Implement Window.open and related infrastructure #20678
Merged
+830
−528
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f408b79
implement window.open, create auxiliary browsing context
gterzian 21bf5a3
implement opener, disowning
gterzian e27ba16
share event-loops based on eTLD+1
gterzian a0082c5
iframe: use value of name attr to set nested bc name
gterzian fee5428
make auxiliary browsing-context script-closeable
gterzian 96f7546
rudimentary handling of tabs
gterzian e784f5a
Refactor embedder NewBrowser flow
gterzian File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.
Loading status checks…
Refactor embedder NewBrowser flow
- Loading branch information
commit e784f5a9f7a4c3eec92b946b0debd4cbcb942ae7
| @@ -67,11 +67,6 @@ impl Browser { | ||
| mem::replace(&mut self.event_queue, Vec::new()) | ||
| } | ||
|
|
||
| pub fn set_browser_id(&mut self, browser_id: BrowserId) { | ||
| self.browser_id = Some(browser_id); | ||
| self.browsers.push(browser_id); | ||
| } | ||
|
|
||
| pub fn handle_window_events(&mut self, events: Vec<WindowEvent>) { | ||
| for event in events { | ||
| match event { | ||
| @@ -302,6 +297,9 @@ impl Browser { | ||
| EmbedderMsg::BrowserCreated(new_browser_id) => { | ||
| // TODO: properly handle a new "tab" | ||
| self.browsers.push(new_browser_id); | ||
| if self.browser_id.is_none() { | ||
| self.browser_id = Some(new_browser_id); | ||
| } | ||
| self.event_queue.push(WindowEvent::SelectBrowser(new_browser_id)); | ||
| } | ||
| EmbedderMsg::KeyEvent(ch, key, state, modified) => { | ||
| @@ -332,6 +330,7 @@ impl Browser { | ||
| // TODO: close the appropriate "tab". | ||
gterzian
Author
Member
|
||
| let _ = self.browsers.pop(); | ||
| if let Some(prev_browser_id) = self.browsers.last() { | ||
| self.browser_id = Some(*prev_browser_id); | ||
| self.event_queue.push(WindowEvent::SelectBrowser(*prev_browser_id)); | ||
| } else { | ||
| self.event_queue.push(WindowEvent::Quit); | ||
ProTip!
Use n and p to navigate between commits in a pull request.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
I'm not sure what this todo is about.