mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Auto merge of #18752 - emilio:cc-parent, r=bzbarsky
style: Use the flattened tree parent to find the closest non-nac ancestor of an element. This only matters for document level NAC like canvas custom content, in which case otherwise we inherit from the document element (which is wrong). Bug: 1405635 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18752) <!-- Reviewable:end -->
This commit is contained in:
commit
35e84c5cdf
1 changed files with 2 additions and 2 deletions
|
@ -930,7 +930,7 @@ impl<'le> TElement for GeckoElement<'le> {
|
||||||
|
|
||||||
fn closest_non_native_anonymous_ancestor(&self) -> Option<Self> {
|
fn closest_non_native_anonymous_ancestor(&self) -> Option<Self> {
|
||||||
debug_assert!(self.is_native_anonymous());
|
debug_assert!(self.is_native_anonymous());
|
||||||
let mut parent = match self.parent_element() {
|
let mut parent = match self.traversal_parent() {
|
||||||
Some(e) => e,
|
Some(e) => e,
|
||||||
None => return None,
|
None => return None,
|
||||||
};
|
};
|
||||||
|
@ -940,7 +940,7 @@ impl<'le> TElement for GeckoElement<'le> {
|
||||||
return Some(parent);
|
return Some(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
parent = match parent.parent_element() {
|
parent = match parent.traversal_parent() {
|
||||||
Some(p) => p,
|
Some(p) => p,
|
||||||
None => return None,
|
None => return None,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue