mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Move paintWorklet from "Window" to "CSS" according to new specification
Relevant discussion: https://github.com/w3c/css-houdini-drafts/issues/410
This commit is contained in:
parent
9e1479bbdd
commit
c7e3def9b2
7 changed files with 21 additions and 14 deletions
|
@ -1022,17 +1022,17 @@ impl WindowMethods for Window {
|
|||
fetch::Fetch(&self.upcast(), input, init)
|
||||
}
|
||||
|
||||
// https://drafts.css-houdini.org/css-paint-api-1/#paint-worklet
|
||||
fn PaintWorklet(&self) -> DomRoot<Worklet> {
|
||||
self.paint_worklet.or_init(|| self.new_paint_worklet())
|
||||
}
|
||||
|
||||
fn TestRunner(&self) -> DomRoot<TestRunner> {
|
||||
self.test_runner.or_init(|| TestRunner::new(self.upcast()))
|
||||
}
|
||||
}
|
||||
|
||||
impl Window {
|
||||
// https://drafts.css-houdini.org/css-paint-api-1/#paint-worklet
|
||||
pub fn paint_worklet(&self) -> DomRoot<Worklet> {
|
||||
self.paint_worklet.or_init(|| self.new_paint_worklet())
|
||||
}
|
||||
|
||||
pub fn task_canceller(&self) -> TaskCanceller {
|
||||
TaskCanceller {
|
||||
cancelled: Some(self.ignore_further_async_events.borrow().clone()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue