feat: add page surfaces and collapsible sidebar
This commit is contained in:
@@ -336,6 +336,8 @@ impl Worker {
|
||||
"click"
|
||||
| "focus"
|
||||
| "scroll"
|
||||
| "page-pan"
|
||||
| "page-zoom"
|
||||
| "tab-activate"
|
||||
| "tab-close"
|
||||
| "tab-detach"
|
||||
@@ -422,7 +424,10 @@ impl Worker {
|
||||
|| frame.session != input.session
|
||||
|| (input.kind != "window-close" && frame.layout_version != input.layout_version)
|
||||
|| frame.fault.is_some()
|
||||
|| if input.kind == "window-close" || input.kind.starts_with("developer-open:") {
|
||||
|| if input.kind == "window-close"
|
||||
|| input.kind.starts_with("developer-open:")
|
||||
|| matches!(input.kind.as_str(), "page-pan" | "page-zoom")
|
||||
{
|
||||
input.mount != 0
|
||||
} else if matches!(
|
||||
input.kind.as_str(),
|
||||
@@ -447,6 +452,14 @@ impl Worker {
|
||||
"event targets an obsolete or inactive frame",
|
||||
));
|
||||
}
|
||||
if input.kind == "page-zoom" && frame.surface.mode != crate::page::Mode::Canvas
|
||||
|| input.kind == "page-pan" && frame.surface.mode == crate::page::Mode::Window
|
||||
{
|
||||
return RequestProgress::Complete(error_response(
|
||||
StatusCode(400),
|
||||
"camera input is unavailable in this Page mode",
|
||||
));
|
||||
}
|
||||
Some(input)
|
||||
} else {
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user