From: Ian Jackson Date: Thu, 28 Jan 2021 16:08:38 +0000 (+0000) Subject: wdt: wip new pos handling trait X-Git-Tag: otter-0.4.0~663 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=47a8426f60baddd6bf1bd42c20cc5c667d1e3f6b;p=otter.git wdt: wip new pos handling trait Signed-off-by: Ian Jackson --- diff --git a/wdriver.rs b/wdriver.rs index 742177ce..c335c0cc 100644 --- a/wdriver.rs +++ b/wdriver.rs @@ -1103,6 +1103,17 @@ impl Drop for FinalInfoCollection { } } +trait IntoInWindow { + fn w_into<'g>(self, w: &'g WindowGuard) -> Result; +} + +impl IntoInWindow for Pos { + #[throws(AE)] + fn w_into<'g>(self, w: &'g WindowGuard) -> WebPos { + w.posg2posw(self)? + } +} + impl Drop for Setup { fn drop(&mut self) { (||{