mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
style: Add a fast path to each_anonymous_content_child.
If we know that we don't have anon children it is pointless to go through FFI.
This commit is contained in:
parent
d232705106
commit
f815d2f9c6
1 changed files with 4 additions and 0 deletions
|
@ -1121,6 +1121,10 @@ impl<'le> TElement for GeckoElement<'le> {
|
||||||
where
|
where
|
||||||
F: FnMut(Self),
|
F: FnMut(Self),
|
||||||
{
|
{
|
||||||
|
if !self.may_have_anonymous_children() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let array: *mut structs::nsTArray<*mut nsIContent> =
|
let array: *mut structs::nsTArray<*mut nsIContent> =
|
||||||
unsafe { bindings::Gecko_GetAnonymousContentForElement(self.0) };
|
unsafe { bindings::Gecko_GetAnonymousContentForElement(self.0) };
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue