mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Expose a way to flush shadow root stylesheets from layout
This commit is contained in:
parent
e9f0e76d3c
commit
cd07574235
2 changed files with 21 additions and 7 deletions
|
@ -86,7 +86,9 @@ use style::font_metrics::ServoMetricsProvider;
|
|||
use style::properties::{ComputedValues, PropertyDeclarationBlock};
|
||||
use style::selector_parser::{extended_filtering, PseudoElement, SelectorImpl};
|
||||
use style::selector_parser::{AttrValue as SelectorAttrValue, Lang, NonTSPseudoClass};
|
||||
use style::shared_lock::{Locked as StyleLocked, SharedRwLock as StyleSharedRwLock};
|
||||
use style::shared_lock::{
|
||||
Locked as StyleLocked, SharedRwLock as StyleSharedRwLock, SharedRwLockReadGuard,
|
||||
};
|
||||
use style::str::is_whitespace;
|
||||
use style::stylist::CascadeData;
|
||||
use style::CaseSensitivityExt;
|
||||
|
@ -216,6 +218,14 @@ impl<'sr> ServoShadowRoot<'sr> {
|
|||
chain: PhantomData,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn flush_stylesheets(&self, guard: &SharedRwLockReadGuard) {
|
||||
unsafe {
|
||||
&self
|
||||
.shadow_root
|
||||
.flush_stylesheets::<ServoLayoutElement>(guard)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ln> TNode for ServoLayoutNode<'ln> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue