mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Invalidate and flush shadow tree stylesheets where needed
This commit is contained in:
parent
18c1b8f690
commit
519cc2c317
8 changed files with 115 additions and 25 deletions
|
@ -2430,6 +2430,7 @@ pub trait LayoutDocumentHelpers {
|
|||
unsafe fn will_paint(&self);
|
||||
unsafe fn quirks_mode(&self) -> QuirksMode;
|
||||
unsafe fn style_shared_lock(&self) -> &StyleSharedRwLock;
|
||||
unsafe fn shadow_roots(&self) -> Vec<LayoutDom<ShadowRoot>>;
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
@ -2474,6 +2475,16 @@ impl LayoutDocumentHelpers for LayoutDom<Document> {
|
|||
unsafe fn style_shared_lock(&self) -> &StyleSharedRwLock {
|
||||
(*self.unsafe_get()).style_shared_lock()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
unsafe fn shadow_roots(&self) -> Vec<LayoutDom<ShadowRoot>> {
|
||||
(*self.unsafe_get())
|
||||
.shadow_roots
|
||||
.borrow_for_layout()
|
||||
.iter()
|
||||
.map(|sr| sr.to_layout())
|
||||
.collect()
|
||||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#is-a-registrable-domain-suffix-of-or-is-equal-to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue