mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Match :lang() using snapshots correctly.
This commit is contained in:
parent
c7e2500311
commit
f492c8fe6e
6 changed files with 134 additions and 11 deletions
|
@ -181,4 +181,14 @@ impl ElementSnapshot for GeckoElementSnapshot {
|
|||
callback,
|
||||
bindings::Gecko_SnapshotClassOrClassList)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn lang_attr(&self) -> Option<Atom> {
|
||||
let ptr = unsafe { bindings::Gecko_SnapshotLangValue(self) };
|
||||
if ptr.is_null() {
|
||||
None
|
||||
} else {
|
||||
Some(unsafe { Atom::from_addrefed(ptr) })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue