mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
traverse Shadow DOM boundaries when determining element lang (#34529)
Signed-off-by: Ville Lindholm <ville@lindholm.dev>
This commit is contained in:
parent
3363e1a261
commit
af8f35f5ef
2 changed files with 1 additions and 10 deletions
|
@ -4146,7 +4146,7 @@ impl Element {
|
|||
// https://html.spec.whatwg.org/multipage/#language
|
||||
pub fn get_lang(&self) -> String {
|
||||
self.upcast::<Node>()
|
||||
.inclusive_ancestors(ShadowIncluding::No)
|
||||
.inclusive_ancestors(ShadowIncluding::Yes)
|
||||
.filter_map(|node| {
|
||||
node.downcast::<Element>().and_then(|el| {
|
||||
el.get_attribute(&ns!(xml), &local_name!("lang"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue