mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
stylo: Implement ServoStyleRule::SelectorMatchesElement
This commit is contained in:
parent
f380d1cfc1
commit
fc8d0eeae0
3 changed files with 57 additions and 0 deletions
|
@ -2144,6 +2144,16 @@ extern "C" {
|
|||
pub fn Servo_StyleRule_GetSelectorCount(rule: RawServoStyleRuleBorrowed,
|
||||
count: *mut u32);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_StyleRule_SelectorMatchesElement(arg1:
|
||||
RawServoStyleRuleBorrowed,
|
||||
arg2:
|
||||
RawGeckoElementBorrowed,
|
||||
index: u32,
|
||||
pseudo_type:
|
||||
CSSPseudoElementType)
|
||||
-> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_ImportRule_GetHref(rule: RawServoImportRuleBorrowed,
|
||||
result: *mut nsAString);
|
||||
|
|
|
@ -694,6 +694,11 @@ impl<'le> GeckoElement<'le> {
|
|||
let node = self.as_node();
|
||||
unsafe { Gecko_GetDocumentLWTheme(node.owner_doc()) }
|
||||
}
|
||||
|
||||
/// Owner document quirks mode getter.
|
||||
pub fn owner_document_quirks_mode(&self) -> QuirksMode {
|
||||
self.as_node().owner_doc().mCompatMode.into()
|
||||
}
|
||||
}
|
||||
|
||||
/// Converts flags from the layout used by rust-selectors to the layout used
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue